Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
|
Functions | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_CAN_GetMaxAcceptFilterCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outmaxFilterCount) |
Retrieve the max filter count for the specified module. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_CAN_EnableAcceptFilters (int32_t cardIndex, int32_t module, int32_t channel, bool_t enableFilters) |
This enables/disables the filtering capability for the specified channel.This is "channel granularity" not "filter granularity". - i.e. either all of the filters for the specified channel are enabled or they are all disabled. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_CAN_SetAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, uint32_t msgId, bool_t isModeA, uint8_t *p_firstTwoBytes) |
This assigns the filter criteria to be used (compared to) after incoming messages pass through the corresponding filter mask. If all bits found in the filter match bits still enabled after passing through the filter mask, the message is "accepted" else the message is "rejected". | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_CAN_GetAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, uint32_t *p_outmsgId, bool_t *p_outisModeA, uint8_t *p_outfirstTwoBytes) |
This retrieve the current filter values for the specified filter index / position. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_CAN_SetAcceptMask (int32_t cardIndex, int32_t module, int32_t channel, int32_t mask, uint32_t msgId, bool_t isModeA, uint8_t *p_firstTwoBytes) |
This assigns the mask criteria to be used - Incoming messages are passed through this mask and then compared to the corresponding filter after it is passed through this same mask. If all of the bits match, the message is accepted. If not the message is rejected. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_CAN_GetAcceptMask (int32_t cardIndex, int32_t module, int32_t channel, int32_t mask, uint32_t *p_outmsgId, bool_t *p_outisModeA, uint8_t *p_outfirstTwoBytes) |
This retrieve the current mask values for the specified mask index / position. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_CAN_RemoveAcceptFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter) |
Clears all filter settings for the specified Card, Module, Channel and Filter. | |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_EnableAcceptFilters | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | enableFilters ) |
This enables/disables the filtering capability for the specified channel.This is "channel granularity" not "filter granularity". - i.e. either all of the filters for the specified channel are enabled or they are all disabled.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
enableFilters | : (Input) NAI_TRUE if enabling, NAI_FALSE otherwise. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
uint32_t * | p_outmsgId, | ||
bool_t * | p_outisModeA, | ||
uint8_t * | p_outfirstTwoBytes ) |
This retrieve the current filter values for the specified filter index / position.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
filter | : (Input) Filter slot to set (0 based). |
p_outmsgId | : (Output) Msg Identifier - bits set here are compared to incoming CAN message identifiers after they are passed through the corresponding filter mask. |
p_outisModeA | : (Output) NAI_TRUE if 11 bit identifier; NAI_FALSE if 29 bit extended identifier. |
p_outfirstTwoBytes | : (Output) Pointer to first two bytes of the payload that were currently assigned to the specified filter index / position. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetAcceptMask | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | mask, | ||
uint32_t * | p_outmsgId, | ||
bool_t * | p_outisModeA, | ||
uint8_t * | p_outfirstTwoBytes ) |
This retrieve the current mask values for the specified mask index / position.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
mask | : (Input) Mask slot to set (0 based). |
p_outmsgId | : (Input) Msg Identifier - bits set here are compared to incoming CAN message identifiers after they are passed through this filter mask. |
p_outisModeA | : (Output) NAI_TRUE if 11 bit identifier; NAI_FALSE if 29 bit extended identifier. |
p_outfirstTwoBytes | : (Input) Pointer to first two bytes of the payload that were currently assigned to the specified mask index / position. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_GetMaxAcceptFilterCount | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t * | p_outmaxFilterCount ) |
Retrieve the max filter count for the specified module.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
p_outmaxFilterCount | : (Output) Maximum number filters that can be configured for given Module ID. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_RemoveAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter ) |
Clears all filter settings for the specified Card, Module, Channel and Filter.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
filter | : (Input) Filter index value specifying which filter to remove configuration (0 based). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_SetAcceptFilter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | filter, | ||
uint32_t | msgId, | ||
bool_t | isModeA, | ||
uint8_t * | p_firstTwoBytes ) |
This assigns the filter criteria to be used (compared to) after incoming messages pass through the corresponding filter mask. If all bits found in the filter match bits still enabled after passing through the filter mask, the message is "accepted" else the message is "rejected".
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
filter | : (Input) Filter slot to set (0 based). |
msgId | : (Input) Msg Identifier - bits set here are compared to incoming CAN message identifiers after they are passed through the corresponding filter mask. |
isModeA | : (Input) Indicates if dealing with 11 bit identifier (ModeA) or 29 bit (Extended) |
p_firstTwoBytes | : (Input) Pointer to first two bytes of the payload. Caller can specify what the 1st two bytes of the data should look like in order to be accepted. Again, the bits set will be used to compare against incoming message payloads after the incoming message payload passes through the corresponding filter mask. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_CAN_SetAcceptMask | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | mask, | ||
uint32_t | msgId, | ||
bool_t | isModeA, | ||
uint8_t * | p_firstTwoBytes ) |
This assigns the mask criteria to be used - Incoming messages are passed through this mask and then compared to the corresponding filter after it is passed through this same mask. If all of the bits match, the message is accepted. If not the message is rejected.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
channel | : (Input) Channel Number of the channel to access (1 - [max channels for module]). |
mask | : (Input) Mask slot to set (0 based). |
msgId | : (Input) Msg Identifier - bits set here are compared to incoming CAN message identifiers. |
isModeA | : (Input) Indicates if dealing with 11 bit identifier (ModeA) or 29 bit (Extended) |
p_firstTwoBytes | : (Input) Pointer to first two bytes of the payload. Caller can specify what the 1st two bytes of the data should look like in order to be accepted. Again, the bits set will be used to compare against incoming message payload. |