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

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetWatchdogQuietTime (int32_t cardIndex, int32_t module, uint32_t quietTime)
 Sets the quiet time duration for the watchdog timer. The watchdog timer is comprised of two parts: quiet time, and window. The quiet time is the time where a strobe is NOT expected to occur, and the window is the time where a SINGLE strobe is expected. A strobe is made by the application by calling naibrd_REF_WatchdogStrobe().
 
nai_status_t NAIAPI naibrd_REF_GetWatchdogQuietTime (int32_t cardIndex, int32_t module, uint32_t *p_outquietTime)
 Retrieves the quiet time duration for the watchdog timer. The watchdog timer is comprised of two parts: quiet time, and window. The quiet time is the time where a strobe is NOT expected to occur, and the window is the time where a SINGLE strobe is expected. A strobe is made by the application by calling naibrd_REF_WatchdogStrobe().
 
nai_status_t NAIAPI naibrd_REF_SetWatchdogWindow (int32_t cardIndex, int32_t module, uint32_t window)
 Sets the window that a call to naibrd_REF_WatchdogStrobe() will be made in. If a call to naibrd_REF_WatchdogStrobe() is not made by the application within the 'window' ('quiet time' + 'window'), the Watchdog Timer Fault will occur.
 
nai_status_t NAIAPI naibrd_REF_GetWatchdogWindow (int32_t cardIndex, int32_t module, uint32_t *p_outwindow)
 Retrieves the window that a call to naibrd_REF_WatchdogStrobe() will be made in. If a call to naibrd_REF_WatchdogStrobe() is not made by the application within the 'window' ('quiet time' + 'window'), the Watchdog Timer Fault will occur.
 
nai_status_t NAIAPI naibrd_REF_WatchdogStrobe (int32_t cardIndex, int32_t module)
 Strobes the Watchdog Timer. A SINGLE call to this function MUST be made by the application within the 'window' or a Watchdog Timer Fault will occur.
 

Detailed Description

Function Documentation

◆ naibrd_REF_GetWatchdogQuietTime()

nai_status_t NAIAPI naibrd_REF_GetWatchdogQuietTime ( int32_t cardIndex,
int32_t module,
uint32_t * p_outquietTime )

Retrieves the quiet time duration for the watchdog timer. The watchdog timer is comprised of two parts: quiet time, and window. The quiet time is the time where a strobe is NOT expected to occur, and the window is the time where a SINGLE strobe is expected. A strobe is made by the application by calling naibrd_REF_WatchdogStrobe().

Please refer to naibrd_REF_SetWatchdogQuietTime for more info and an example.

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_outquietTime: (Output) Watchdog quiet time duration in uS.
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_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_GetWatchdogWindow()

nai_status_t NAIAPI naibrd_REF_GetWatchdogWindow ( int32_t cardIndex,
int32_t module,
uint32_t * p_outwindow )

Retrieves the window that a call to naibrd_REF_WatchdogStrobe() will be made in. If a call to naibrd_REF_WatchdogStrobe() is not made by the application within the 'window' ('quiet time' + 'window'), the Watchdog Timer Fault will occur.

Please refer to naibrd_REF_SetWatchdogQuietTime for an example.

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_outwindow: (Output) Watchdog timer window in uS.
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_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_SetWatchdogQuietTime()

NAIBRDFUNC nai_status_t NAIAPI naibrd_REF_SetWatchdogQuietTime ( int32_t cardIndex,
int32_t module,
uint32_t quietTime )

Sets the quiet time duration for the watchdog timer. The watchdog timer is comprised of two parts: quiet time, and window. The quiet time is the time where a strobe is NOT expected to occur, and the window is the time where a SINGLE strobe is expected. A strobe is made by the application by calling naibrd_REF_WatchdogStrobe().

Example: Watchdog Quiet Time (QT) = 1000uS, Watchdog Window (Wnd)= 50uS

Watchdog Start: First strobe starts the timer. The timer waits for the 1st strobe to start the process. | <– Quiet Time --> | <– Window --> | <– Quiet Time --> ...----—|--------------------—|------—|------—|--------------—... Time: ... 0 1000us | 1050us ... Action: ... 1st Strobe |2nd Strobe @ 1025us| The 2nd strobe occurs 1025us (optimal time) after the 1st.

Subsequent Strobes: Every subsequent strobe MUST occur with the 'Window' based on the occurrence of the previous strobe. | <– Quiet Time --> | <– Window --> | <– Quiet Time --> ...----—|--------------------—|------—|------—|--------------—... Time: ... 1025uS 2025us 2050uS 2075us ... Time relative to 1st strobe. Action: ... Previous Strobe | <- Next Strobe -> | Next Strobe MUST occur within the Window. Time: ... 0 1000us 1050us ... Time relative to the previous (in this case, 2nd) strobe.

The application must CONSTANTLY make a SINGLE call to naibrd_REF_WatchdogStrobe() within the Window (between 1000uS and 1050uS after the previous strobe) or a Watchdog Timer Fault will occur. A fault will disable the output of all channels and a Watchdog Timer Fault status will be set. A module reset will be required to restore the module's functionality.

A Timer fault will occur when: 1) A strobe occurs within the Quiet Time 2) Multiple Strobes within the Window.

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]).
quietTime: (Input) Watchdog quiet time duration in uS.
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_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_SetWatchdogWindow()

nai_status_t NAIAPI naibrd_REF_SetWatchdogWindow ( int32_t cardIndex,
int32_t module,
uint32_t window )

Sets the window that a call to naibrd_REF_WatchdogStrobe() will be made in. If a call to naibrd_REF_WatchdogStrobe() is not made by the application within the 'window' ('quiet time' + 'window'), the Watchdog Timer Fault will occur.

Please refer to naibrd_REF_SetWatchdogQuietTime for an example.

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]).
window: (Input) Watchdog timer window in uS.
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_NOT_SUPPORTED when function is not supported.

◆ naibrd_REF_WatchdogStrobe()

nai_status_t NAIAPI naibrd_REF_WatchdogStrobe ( int32_t cardIndex,
int32_t module )

Strobes the Watchdog Timer. A SINGLE call to this function MUST be made by the application within the 'window' or a Watchdog Timer Fault will occur.

Please refer to naibrd_REF_SetWatchdogQuietTime for an example.

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 module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.