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

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_InitiateBIT (int32_t cardIndex, int32_t module, int32_t channel, bool_t waitForResult)
 Executes the serial Built-in Test and returns the results. BIT takes the channel off line, executes the tests and then reconnects the channel. The results of the test are returned in the status if waitForResult = 1, otherwise the return value will be any of the statuses listed below with the exception of NAI_ERROR_TIMEOUT and NAI_ERROR_BIT_FAILED.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_CheckBITComplete (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outBitComplete)
 Retrieves the BIT status (complete or incomplete) of the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_ModuleIntitiateBIT (int32_t cardIndex, int32_t module)
 Executes the Initiated Built-In-Test (IBIT) for all channels on a serial module. Use this function if you want to run BIT on all channels simultaneously. If the module does not support the common BIT interface, it will return NAI_ERROR_NOT_SUPPORTED, use naibrd_SER_InitiateBIT() instead. If any of the serial modules channels are enabled or in use, the test will not run on that channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_ModuleCheckBITComplete (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outBITComplete)
 Retrieves the status of the BIT test (complete or incomplete) for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_ModuleCheckPBITComplete (int32_t cardIndex, int32_t module, bool_t *p_outPBITComplete)
 Retrieves the PBIT (Power-on BIT) status of the module specified. The PBIT result will be in the BIT status register.
 

Detailed Description


Function Documentation

◆ naibrd_SER_CheckBITComplete()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_CheckBITComplete ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outBitComplete )

Retrieves the BIT status (complete or incomplete) of the channel specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection 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]).
outBitComplete: (Output) 0 = BIT not done, 1 = BIT complete.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SER_InitiateBIT()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_InitiateBIT ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t waitForResult )

Executes the serial Built-in Test and returns the results. BIT takes the channel off line, executes the tests and then reconnects the channel. The results of the test are returned in the status if waitForResult = 1, otherwise the return value will be any of the statuses listed below with the exception of NAI_ERROR_TIMEOUT and NAI_ERROR_BIT_FAILED.

Warning
For the Built-In-Test to run, the channel needs to be disabled. For modules with more than four channels, the channels need be disabled in pairs ex (1 & 2, 3 & 4 etc.). If both channels are not disabled, it will cause this function to return NAI_ERROR_TIMEOUT.
Parameters
cardIndex: (Input) Logical Card Index assigned to connection 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]).
waitForResult: (Input) This allows this API to either wait for the BIT result before returning or return immediately after BIT is initiated. When returning immediately, please allow 5mS for the BIT to complete. Calling naibrd_SER_GetBITStatus() after BIT is complete will return the results of the last executed test, regardless if this API returns immediately or after the test is complete.
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_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_TIMEOUT when BIT times out (does not finish in time allotted).
  • NAI_ERROR_BIT_FAILED when the BIT indicates a failure.

◆ naibrd_SER_ModuleCheckBITComplete()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_ModuleCheckBITComplete ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * p_outBITComplete )

Retrieves the status of the BIT test (complete or incomplete) for the specified channel.

Note
If IBIT was initiated on a channel, but this function shows that it has not completed, it may not have run. Make sure that the channel and channel pair are both disabled.
Parameters
cardIndex: (Input) Logical Card Index assigned to connection 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_outBITComplete: (Output) 0 = BIT not done, 1 = BIT complete.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SER_ModuleCheckPBITComplete()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_ModuleCheckPBITComplete ( int32_t cardIndex,
int32_t module,
bool_t * p_outPBITComplete )

Retrieves the PBIT (Power-on BIT) status of the module specified. The PBIT result will be in the BIT status register.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
p_outPBITComplete: (Output) TRUE = PBIT complete, FALSE = PBIT not complete.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SER_ModuleIntitiateBIT()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_ModuleIntitiateBIT ( int32_t cardIndex,
int32_t module )

Executes the Initiated Built-In-Test (IBIT) for all channels on a serial module. Use this function if you want to run BIT on all channels simultaneously. If the module does not support the common BIT interface, it will return NAI_ERROR_NOT_SUPPORTED, use naibrd_SER_InitiateBIT() instead. If any of the serial modules channels are enabled or in use, the test will not run on that channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.