Software Library API naibrd 1.62
See all documentation at naii.docs.com
IRIG Basic Configuration Functions: Reference Source

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_IRIG_SetReferenceSource (int32_t cardIndex, int32_t module, int32_t channel, uint32_t refSource)
 Sets the desired reference source to be used by the master timer. If the actual reference source is not available to the module, the master timer data will have unexpected results. The options are: 0: IRIG requested 5: RTC requested (can only be requested, never preferred) 7: Free-Running or No reference.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_IRIG_GetReferenceSource (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outRefSource)
 Gets the desired Reference Source that was set by calling naibrd_IRIG_SetReferenceSource(). If this function returns 7 (Free-Running or No Reference), read the master timer to determine the actual reference source. The options are: 0: IRIG requested 5: RTC requested (can only be requested, never preferred) 7: Free-Running or No reference.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_IRIG_GetActualReferenceSource (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outRefSource)
 Gets the current actual Reference Source used by RG1, this is the source of the master time. The output will be one of: 0 = IRIG 3 = RTC (RG1 only) 5 = Has never been set 6 = Losing sync (coasting, possibly still okay). Coasting means that the IRIG time is deviating from the external time source. 7 = Master timer can use the Free-Running time if Free-Running Launch is set. Also means No Reference if the IRIG is not incrementing (coasting, too long).
 

Detailed Description


Function Documentation

◆ naibrd_IRIG_GetActualReferenceSource()

NAIBRDFUNC nai_status_t NAIAPI naibrd_IRIG_GetActualReferenceSource ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t * p_outRefSource )

Gets the current actual Reference Source used by RG1, this is the source of the master time. The output will be one of: 0 = IRIG 3 = RTC (RG1 only) 5 = Has never been set 6 = Losing sync (coasting, possibly still okay). Coasting means that the IRIG time is deviating from the external time source. 7 = Master timer can use the Free-Running time if Free-Running Launch is set. Also means No Reference if the IRIG is not incrementing (coasting, too long).

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_outRefSource: (Output) Reference source 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_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_IRIG_GetReferenceSource()

NAIBRDFUNC nai_status_t NAIAPI naibrd_IRIG_GetReferenceSource ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t * p_outRefSource )

Gets the desired Reference Source that was set by calling naibrd_IRIG_SetReferenceSource(). If this function returns 7 (Free-Running or No Reference), read the master timer to determine the actual reference source. The options are: 0: IRIG requested 5: RTC requested (can only be requested, never preferred) 7: Free-Running or No reference.

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_outRefSource: (Output) Desired reference source.
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.

◆ naibrd_IRIG_SetReferenceSource()

NAIBRDFUNC nai_status_t NAIAPI naibrd_IRIG_SetReferenceSource ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t refSource )

Sets the desired reference source to be used by the master timer. If the actual reference source is not available to the module, the master timer data will have unexpected results. The options are: 0: IRIG requested 5: RTC requested (can only be requested, never preferred) 7: Free-Running or No reference.

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]).
refSource: (Input) Desired reference source.
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_INVALID_VALUE when invalid refSource value is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.