Macros |
#define | filter_setConfig(pu8Param, u8Index, u8NewValue) pu8Param[u8Index]=u8NewValue; filter_init(pu8Param,u8Index); |
#define | filter_dropWeaker(u8dBm) filter_add(FILTER_TYPE_DBM,u8dBm,FILTER_KIND_BLOCK); |
#define | filter_dropStronger(u8dBm) filter_add(FILTER_TYPE_DBM,u8dBm,FILTER_KIND_APPLY); |
#define | filter_dropChoice(u8Choice) filter_add(FILTER_TYPE_CHOICE,u8Choice,FILTER_KIND_BLOCK); |
#define | filter_allowChoice(u8Choice) filter_add(FILTER_TYPE_CHOICE,u8Choice,FILTER_KIND_APPLY); |
#define | filter_dropId(u32Id) filter_add(FILTER_TYPE_ID,u32Id,FILTER_KIND_BLOCK); |
#define | filter_allowId(u32Id) filter_add(FILTER_TYPE_ID,u32Id,FILTER_KIND_APPLY); |
Detailed Description
The FILTER module is used to filter received telegrams according:
When the filter is active telegrams which matches to the data specified with the filter module are dropped and the application does not receive them.
- Note:
- Because of internal changes how the filter module internally works compared to the API V1, it is necessary to define the two arrays, u32gFilterValue[1] and u8gFilterCfg[1] even if filters are not used. This is done in the EO3000I_CFG.c file
-
IDX_FILTER_OPERATOR is valid for all filters!!
-
FILTER_KIND=APPLY => BLOCK all other type of Telegrams.
Macro Definition Documentation
#define filter_setConfig |
( |
|
pu8Param, |
|
|
|
u8Index, |
|
|
|
u8NewValue |
|
) |
| pu8Param[u8Index]=u8NewValue; filter_init(pu8Param,u8Index); |
Sets one filter parameter
- Parameters:
-
[in] | *pu8Param | Pointer to the list of parameters to set. See #filter_param[] |
[in] | u8Index | Index of parameter to set. See FILTER_PARAM_IDX |
[in] | u8NewValue | The parameter value |
- Returns:
- -
- Note:
- This macro is allowed to be used in an interrupt callback function!
- See also:
- filter_init
Function Documentation
void filter_init |
( |
uint8 * |
pu8Param, |
|
|
uint8 |
u8ParamToSet |
|
) |
| |
Sets the filter parameters for radio communication, delete all filters, and disable filter functionality
- Parameters:
-
[in] | *pu8Param | Pointer to the list of parameters to set. See FILTER_PARAM_IDX |
[in] | u8ParamToSet | It has to be SET_ALL_PARAM to set all parameters from FILTER_PARAM_IDX of the list |
- Returns:
- -
- Note:
- This function is allowed to be used in an interrupt callback function ONLY if it is ensured that it is not used at the same time from the main program!
- See also:
- filter_setConfig, FILTER_PARAM_IDX
Adds a filter to the filter list and enables filter functionality
- Parameters:
-
[in] | u8filterType | type of filter, See FILTER_TYPE |
[in] | u32compare | compare value of filter (ID=32 bit, CHOICE=8 bit, REPT=1 bit) |
[in] | u8filterKind | kind of filter, See FILTER_KIND |
- Returns:
- OK added filter to filter buffer
-
MAX_FILTER_REACHED filter buffer is full
- Note:
- If FILTER_TYPE = CHOICE look filterable CHOICE_TYPE
Example 1:
Add filter for Choice,only RPS Telegramms are allowed!!
....
....
....
uint32 u32Id;
....
Example 2:
Add filter for Choice and dBm, only RPS telegrams stronger than -70dBm are received.
In Dolphin APIConfigurator musst set: Filter -> ON Filter by -> OPERATION AND Filter Count -> 4 (in this case >=2)
Example 3:
Add filter for filtered repeating only RPS telegrams
- Note:
- The dBm values are unsigned values but actualy the should be interpretted as - dBm values
- See also:
- filter_del, filter_dropWeaker, filter_dropStronger, filter_dropChoice, filter_allowChoice, filter_dropId, filter_allowId
Deletes a filter from the filter list
- Parameters:
-
[in] | u8filterType | type of filter, See FILTER_TYPE |
[in] | u32compare | compare value of filter (ID=32 bit, CHOICE=8 bit, REPT=1 bit) |
- Returns:
- OK filter deleted from the filter buffer
-
FILTER_NOT_FOUND could not be found in the filter buffer
Example 1:
Add filter for ID 4711 and filter all other IDs to dev/null and then delete filter
- See also:
- filter_add, filter_delAll
Deletes all filters from the filter list and disables filter functionality
- Parameters:
-
- Returns:
- -
Example 1:
Add more filters and then delete filters
- Note:
- This function is allowed to be used in an interrupt callback function ONLY if it is ensured that it is not used at the same time from the main program!
- See also:
- filter_add, filter_del
void filter_enable |
( |
uint8 |
u8enable | ) |
|
Enables or disables filter functionality
- Parameters:
-
[in] | u8enable | TRUE=filter functionality enabled, FALSE=filter functionality disabled |
- Returns:
- -
- Note:
- This function is allowed to be used in an interrupt callback function ONLY if it is ensured that it is not used at the same time from the main program!
- See also:
- filter_add, filter_del
void filter_enable_repeater |
( |
uint8 |
u8enable | ) |
|
Enables or disables filter functionality for selective repeating
- Parameters:
-
[in] | u8enable | TRUE=Filtering for repeater enabled, FALSE=Filtering for repeaterdisabled |
- Returns:
- -
- Note:
- This function is allowed to be used in an interrupt callback function ONLY if it is ensured that it is not used at the same time from the main program!
- See also:
- filter_add, filter_del