Software Library API naibrd 1.62
See all documentation at naii.docs.com
Filter Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetMaxFilterCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *outMaxFilterCount)
 Retrieve the max filter count for the specified module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_StartFilterChanges (int32_t cardIndex, int32_t module, int32_t channel)
 Sets a bit in the filter control register indicating the user is making filter changes. Calling this function will force the CAN module to ignore any changes made until such time that the naibrd_CAN_ApplyFilterChanges is called.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ApplyFilterChanges (int32_t cardIndex, int32_t module, int32_t channel)
 Clears a bit in the filter control register indicating the user is finished making filter changes. Call this function will force the CAN module to once again check and apply any detected changes to the CAN filtering.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetEnFilterCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t enableFilterCount)
 Specifies the number of CAN filters to be enabled for the specified Card, Module and Channel. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetEnFilterCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t *outEnabledFilterCount)
 Returns the number of CAN acceptance filters enabled for the specified Card, Module and Channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ClearFilter (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_CAN_SetPrioFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable)
 Enables or disables Priority filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetPrioFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outenable)
 Get Priority filter enable setting for the channel specified (J1939 only).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetSrcFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable)
 Enables or disables Source filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSrcFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outenable)
 Get Source filter enable setting for the channel specified (J1939 only).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetDestFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable)
 Enables or disables Destination filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetDestFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outenable)
 Get Destination filter enable setting for the channel specified (J1939 only).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetPGNFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable)
 Enables or disables PGN filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetPGNFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outenable)
 Get PGN filter enable setting for the channel specified (J1939 only).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetPrioFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t priofilter)
 Set the CAN channel's priority filter value. When the priority filter is enabled, only messages with a priority matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetPrioFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t *outpriofilter)
 Get the CAN channel's priority filter value. When the priority filter is enabled, only messages with a priority matching the filter value are accepted (J1939 only).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetSrcFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t srcfilter)
 Set the CAN channel's source filter value. When the source filter is enabled, only messages with a source address matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSrcFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t *outsrcfilter)
 Get the CAN channel's source filter value. When the source filter is enabled, only messages with a source address matching the filter value are accepted (J1939 only).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetDestFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t destfilter)
 Set the CAN channel's destination filter value. When the destination filter is enabled, only messages with a destination address matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetDestFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t *outdestfilter)
 Get the CAN channel's destination filter value. When the destination filter is enabled, only messages with a destination address matching the filter value are accepted (J1939 only).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetPGNFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t pgnfilter)
 Set the CAN channel's PGN filter value. When the PGN filter is enabled, only messages with a PGN matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetPGNFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t *outpgnfilter)
 Get the CAN channel's PGN filter value. When the PGN filter is enabled, only messages with a PGN matching the filter value are accepted (J1939 only).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetAcceptCodeEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable)
 Enables or disables Acceptance Code / Mask filtering for the channel specified (CAN A/B only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetAcceptCodeEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outenable)
 Get Acceptance Code / Mask filter enable setting for the channel specified (CAN A/B only).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetABFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable)
 Enables or disables CAN-A / CAN-B filtering for the channel specified (CAN A/B only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetABFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outenable)
 Get CAN-A / CAN-B filter enable setting for the channel specified (CAN A/B only).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetStdExtFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enableStdMsgs)
 Specifies whether to allow Standard / Extended CAN frames to pass through for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetStdExtFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outEnableStdMsgs)
 Get Standard / Extended Mode filter enable setting for the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetSubRTRFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enableSubRTRMsgs)
 Specifies whether to allow CAN frames that have Substitute RTR bit set to pass through for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSubRTRFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outEnableSubRTRMsgs)
 Get Sub RTR (Substitute Remote Transmission Request) filter enable setting for the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetRTRFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enableRTRMsgs)
 Specifies whether to allow CAN frames that have RTR bit set to pass through for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetRTRFilter (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outEnableRTRMsgs)
 Get RTR (Remote Transmission Request) filter setting for the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetSubRTRFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable)
 Enables or disables substitute remote transmission request filtering for the channel specified (standard frame). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSubRTRFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outenable)
 Get substitute remote transmission request filter enable setting for the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetRTRFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t enable)
 Enables or disables remote transmission request filtering for the channel specified (extended frame). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetRTRFilterEn (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, bool_t *outenable)
 Get remote transmission request filter enable setting for the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetAcceptMask (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t acceptmask)
 Set the CAN channel's Acceptance Mask value. When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetAcceptMask (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t *outacceptmask)
 Get the CAN channel's Acceptance Mask filter value (CAN A/B only). When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetAcceptCode (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t acceptcode)
 Set the CAN channel's Acceptance Code filter value. When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetAcceptCode (int32_t cardIndex, int32_t module, int32_t channel, int32_t filter, int32_t *outacceptcode)
 Get the CAN channel's Acceptance Code filter value (CAN A/B only). When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted.
 

Detailed Description


Function Documentation

◆ naibrd_CAN_ApplyFilterChanges()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ApplyFilterChanges ( int32_t cardIndex,
int32_t module,
int32_t channel )

Clears a bit in the filter control register indicating the user is finished making filter changes. Call this function will force the CAN module to once again check and apply any detected changes to the CAN filtering.

Parameters
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]).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_ClearFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_ClearFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter )

Clears all filter settings for the specified Card, Module, Channel and Filter.

Parameters
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 value specifying which filter to clear configuration.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_INVALID_VALUE when enableFilterCount is < 0 or > GetMaxFilterCount

◆ naibrd_CAN_GetABFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetABFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t * outenable )

Get CAN-A / CAN-B filter enable setting for the channel specified (CAN A/B only).

Parameters
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) Index of acceptance filter (1 based).
outenable: (Output) TRUE: Enabled, FALSE: Disabled.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetAcceptCode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetAcceptCode ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
int32_t * outacceptcode )

Get the CAN channel's Acceptance Code filter value (CAN A/B only). When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted.

Parameters
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) Index of acceptance filter (1 based).
outacceptcode: (Output) Acceptance Code value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetAcceptCodeEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetAcceptCodeEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t * outenable )

Get Acceptance Code / Mask filter enable setting for the channel specified (CAN A/B only).

Parameters
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) Index of acceptance filter (1 based).
outenable: (Output) TRUE: Enabled, FALSE: Disabled.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetAcceptMask()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetAcceptMask ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
int32_t * outacceptmask )

Get the CAN channel's Acceptance Mask filter value (CAN A/B only). When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted.

Parameters
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) Index of acceptance filter (1 based).
outacceptmask: (Output) Acceptance Mask value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetDestFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetDestFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
int32_t * outdestfilter )

Get the CAN channel's destination filter value. When the destination filter is enabled, only messages with a destination address matching the filter value are accepted (J1939 only).

Parameters
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) Index of acceptance filter (1 based).
outdestfilter: (Output) Destination filter value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetDestFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetDestFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t * outenable )

Get Destination filter enable setting for the channel specified (J1939 only).

Parameters
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) Index of acceptance filter (1 based).
outenable: (Output) TRUE: Enabled, FALSE: Disabled.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetEnFilterCount()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetEnFilterCount ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t * outEnabledFilterCount )

Returns the number of CAN acceptance filters enabled for the specified Card, Module and Channel.

Parameters
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]).
outEnabledFilterCount: (Output) Returns how many filters are enabled.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_INVALID_VALUE when enableFilterCount is < 0 or > GetMaxFilterCount

◆ naibrd_CAN_GetMaxFilterCount()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetMaxFilterCount ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t * outMaxFilterCount )

Retrieve the max filter count for the specified module.

Parameters
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]).
outMaxFilterCount: (Output) Maximum number filters that can be configured for given Module ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetPGNFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetPGNFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
int32_t * outpgnfilter )

Get the CAN channel's PGN filter value. When the PGN filter is enabled, only messages with a PGN matching the filter value are accepted (J1939 only).

Parameters
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) Index of acceptance filter (1 based).
outpgnfilter: (Output) PGN filter value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetPGNFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetPGNFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t * outenable )

Get PGN filter enable setting for the channel specified (J1939 only).

Parameters
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) Index of acceptance filter (1 based).
outenable: (Output) TRUE: Enabled, FALSE: Disabled.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetPrioFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetPrioFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
int32_t * outpriofilter )

Get the CAN channel's priority filter value. When the priority filter is enabled, only messages with a priority matching the filter value are accepted (J1939 only).

Parameters
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) Index of acceptance filter (1 based).
outpriofilter: (Output) Priority filter value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetPrioFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetPrioFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t * outenable )

Get Priority filter enable setting for the channel specified (J1939 only).

Parameters
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) Index of acceptance filter (1 based).
outenable: (Output) TRUE: Enabled, FALSE: Disabled.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetRTRFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetRTRFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t * outEnableRTRMsgs )

Get RTR (Remote Transmission Request) filter setting for the channel specified.

Parameters
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) Index of acceptance filter (1 based).
outEnableRTRMsgs: (Output) TRUE: Enabled (Allow messages that have RTR bit set), FALSE: Disabled. (Allow messages that do not have RTR bit set)
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetRTRFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetRTRFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t * outenable )

Get remote transmission request filter enable setting for the channel specified.

Parameters
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) Index of acceptance filter (1 based).
outenable: (Output) TRUE: Enabled, FALSE: Disabled.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetSrcFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSrcFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
int32_t * outsrcfilter )

Get the CAN channel's source filter value. When the source filter is enabled, only messages with a source address matching the filter value are accepted (J1939 only).

Parameters
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) Index of acceptance filter (1 based).
outsrcfilter: (Output) Source filter value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetSrcFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSrcFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t * outenable )

Get Source filter enable setting for the channel specified (J1939 only).

Parameters
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) Index of acceptance filter (1 based).
outenable: (Output) TRUE: Enabled, FALSE: Disabled.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetStdExtFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetStdExtFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t * outEnableStdMsgs )

Get Standard / Extended Mode filter enable setting for the channel specified.

Parameters
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) Index of acceptance filter (1 based).
outEnableStdMsgs: (Output) TRUE: Enabled (Standard messages only), FALSE: Disabled. (Extended messages only)
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetSubRTRFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSubRTRFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t * outEnableSubRTRMsgs )

Get Sub RTR (Substitute Remote Transmission Request) filter enable setting for the channel specified.

Parameters
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) Index of acceptance filter (1 based).
outEnableSubRTRMsgs: (Output) TRUE: Enabled (Allow messages that have Sub RTR bit set), FALSE: Disabled. (Allow messages that do not have Sub RTR bit set)
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_GetSubRTRFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_GetSubRTRFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t * outenable )

Get substitute remote transmission request filter enable setting for the channel specified.

Parameters
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) Index of acceptance filter (1 based).
outenable: (Output) TRUE: Enabled, FALSE: Disabled.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetABFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetABFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t enable )

Enables or disables CAN-A / CAN-B filtering for the channel specified (CAN A/B only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
enable: (Input) TRUE: Enable, FALSE: Disable.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetAcceptCode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetAcceptCode ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
int32_t acceptcode )

Set the CAN channel's Acceptance Code filter value. When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
acceptcode: (Input) Acceptance Code value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetAcceptCodeEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetAcceptCodeEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t enable )

Enables or disables Acceptance Code / Mask filtering for the channel specified (CAN A/B only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
enable: (Input) TRUE: Enable, FALSE: Disable.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetAcceptMask()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetAcceptMask ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
int32_t acceptmask )

Set the CAN channel's Acceptance Mask value. When the Acceptance Code filter is enabled, only messages with an Acceptance Code / Mask matching the filter value are accepted. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
acceptmask: (Input) Acceptance Mask value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetDestFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetDestFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
int32_t destfilter )

Set the CAN channel's destination filter value. When the destination filter is enabled, only messages with a destination address matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
destfilter: (Input) Destination Filter value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetDestFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetDestFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t enable )

Enables or disables Destination filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
enable: (Input) TRUE: Enable, FALSE: Disable.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetEnFilterCount()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetEnFilterCount ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t enableFilterCount )

Specifies the number of CAN filters to be enabled for the specified Card, Module and Channel. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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]).
enableFilterCount: (Input) Specifies how many filters to enable.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_INVALID_VALUE when enableFilterCount is < 0 or > GetMaxFilterCount

◆ naibrd_CAN_SetPGNFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetPGNFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
int32_t pgnfilter )

Set the CAN channel's PGN filter value. When the PGN filter is enabled, only messages with a PGN matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
pgnfilter: (Input) PGN Filter value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetPGNFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetPGNFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t enable )

Enables or disables PGN filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
enable: (Input) TRUE: Enable, FALSE: Disable.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetPrioFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetPrioFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
int32_t priofilter )

Set the CAN channel's priority filter value. When the priority filter is enabled, only messages with a priority matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
priofilter: (Input) Priority Filter value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetPrioFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetPrioFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t enable )

Enables or disables Priority filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
enable: (Input) TRUE: Enable, FALSE: Disable.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetRTRFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetRTRFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t enableRTRMsgs )

Specifies whether to allow CAN frames that have RTR bit set to pass through for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
enableRTRMsgs: (Input) TRUE: (Allow messages that have RTR bit set), FALSE: Disabled. (Allow messages that do not have RTR bit set) .
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetRTRFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetRTRFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t enable )

Enables or disables remote transmission request filtering for the channel specified (extended frame). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
enable: (Input) TRUE: Enable, FALSE: Disable.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetSrcFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetSrcFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
int32_t srcfilter )

Set the CAN channel's source filter value. When the source filter is enabled, only messages with a source address matching the filter value are accepted (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
srcfilter: (Input) Source Filter value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetSrcFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetSrcFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t enable )

Enables or disables Source filtering for the channel specified (J1939 only). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
enable: (Input) TRUE: Enable, FALSE: Disable.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetStdExtFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetStdExtFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t enableStdMsgs )

Specifies whether to allow Standard / Extended CAN frames to pass through for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
enableStdMsgs: (Input) TRUE: Enable (Allow Standard messages only), FALSE: Disable (Allow Extended messages only) .
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetSubRTRFilter()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetSubRTRFilter ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t enableSubRTRMsgs )

Specifies whether to allow CAN frames that have Substitute RTR bit set to pass through for the channel specified. NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
enableSubRTRMsgs: (Input) TRUE: (Allow messages that have Sub RTR bit set), FALSE: Disabled. (Allow messages that do not have Sub RTR bit set) .
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_SetSubRTRFilterEn()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_SetSubRTRFilterEn ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t filter,
bool_t enable )

Enables or disables substitute remote transmission request filtering for the channel specified (standard frame). NOTE: Configuring of filters should be performed between calls to naibrd_CAN_StartFilterChanges and naibrd_CAN_ApplyFilterChanges.

Parameters
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) Index of acceptance filter (1 based).
enable: (Input) TRUE: Enable, FALSE: Disable.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid filter parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CAN_StartFilterChanges()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CAN_StartFilterChanges ( int32_t cardIndex,
int32_t module,
int32_t channel )

Sets a bit in the filter control register indicating the user is making filter changes. Calling this function will force the CAN module to ignore any changes made until such time that the naibrd_CAN_ApplyFilterChanges is called.

Parameters
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]).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.