EnOcean Link  1.14.0.0
Middleware to Connect EnOcean easily to other Projects
eodBmFilter Class Reference

uses Telegram dBm values as filter base More...

#include <eodBmFilter.h>

Inheritance diagram for eodBmFilter:
Collaboration diagram for eodBmFilter:

Public Member Functions

 eodBmFilter ()
 
 eodBmFilter (int8_t maxDBm, int8_t minDBm)
 
bool Filter (eoMessage &msg)
 
bool Filter (eoTelegram &tel)
 
virtual uint8_t Serialize (eoArchive &arch)
 
- Public Member Functions inherited from eoIFilter
virtual void RemoveAll ()
 

Public Attributes

int8_t maxdBm
 
int8_t mindBm
 
- Public Attributes inherited from eoIFilter
uint8_t type
 Type.
 

Detailed Description

uses Telegram dBm values as filter base

eodBmFilter is an easy filter, which allows you to filter a Telegram via the dBm Value

Note
the dBm value is a signed! value and normally between (far away)-90...-40dBm(near)
Examples:
GatewayFiltered_example.cpp, tutorial1.cpp, and tutorial6.cpp.

Constructor & Destructor Documentation

◆ eodBmFilter() [1/2]

eodBmFilter::eodBmFilter ( )

Using this constructor, no Telegrams get filtered

◆ eodBmFilter() [2/2]

eodBmFilter::eodBmFilter ( int8_t  maxDBm,
int8_t  minDBm 
)

Constructor which sets max and min DBM

Parameters
maxDBmmaximal dBM Value allowed
minDBmminimal dBM Value needed

Member Function Documentation

◆ Filter() [1/2]

bool eodBmFilter::Filter ( eoMessage msg)
virtual

You can't filter normal messages, as they don't contain a dBm Information!

Parameters
msgMessage to Filter
Returns
false

Reimplemented from eoIFilter.

◆ Filter() [2/2]

bool eodBmFilter::Filter ( eoTelegram tel)
virtual

Filters the Telegram comparing its dBm against the set dBm

Parameters
telTelegram to Filter
Returns
true when the dBm value is between max and min is in the Filter list.

Reimplemented from eoIFilter.

◆ Serialize()

virtual uint8_t eodBmFilter::Serialize ( eoArchive arch)
virtual

Serialization Function which will be called by the eoStorageManager This function will be called by the eoArchive(inside of the eoStorageManager) and allows the class to be Serialized.

Parameters
&archArchive where to Load or to Store.

Reimplemented from eoIFilter.

Member Data Documentation

◆ maxdBm

int8_t eodBmFilter::maxdBm

maximal dBm value which is allowed

Examples:
GatewayFiltered_example.cpp, tutorial1.cpp, and tutorial6.cpp.

◆ mindBm

int8_t eodBmFilter::mindBm

minimal dBm value which is allowed

Examples:
GatewayFiltered_example.cpp, tutorial1.cpp, and tutorial6.cpp.