ar_get_time

short ar_get_time (short board, short format, AR_TIMETAG_TYPE * timeTag);

Purpose

This function returns the current time reference value scaled from either the CEI-x30 device internal 64-bit timer or the most recently received IRIG timer reference, as specified via the format parameter.

If the requested time format is for the External IRIG Sample (AR_TIMETAG_EXT_IRIG_64BIT), the returned  timeTag.referenceTimeTag structure member will contain the board internal timer-referenced time-stamp assigned when the last bit of the external IRIG sample was processed by the CEI-x30 IRIG receiver.

Parameters

Input

 

Name

Type

Description

board

short

(input) Device Number of the board to reference, (valid range is 0-15).

format

short

Time format requested.  Valid options are:
AR_TIMETAG_EXT_IRIG_64BIT      (0) 64-bit IRIG sample time in microseconds since beginning of current year
AR_TIMETAG_INT_USEC_64BIT     (1) 64-bit internal board timer in microseconds
AR_TIMETAG_HOST_USEC_64BIT  (2) 64-bit host operating system time scaled to have a 1 microsecond resolution
AR_TIMETAG_INT_USEC_32BIT     (3) 32-bit internal board timer in microseconds
AR_TIMETAG_INT_20USEC_32BIT  (4) 32-bit internal board timer scaled to have a 20 microsecond resolution
AR_TIMETAG_INT_MSEC_32BIT     (6) 32-bit internal board timer scaled to have a 1 millisecond resolution

Output

 

 

Name

Type

Description

timeTag

AR_TIMETAG_TYPE (passed by reference)

(output) The time-tag data structure containing the current board time, (passed by reference).  Defined as follows:


typedef struct {
       
TIME_TAG_TYPE timeTagFormat;         The format of the corresponding timeTag member.
       
TIME_TAG_TYPE timeTag;                   The timer value, format specified via timeTagFormat member.
       
TIME_TAG_TYPE referenceTimeTag;    The timer value in 64-bit 1 microsecond format.
} AR_TIMETAG_TYPE, *pAR_TIMETAG_TYPE;

Return Value

Name

Type

Description

status

short

status of the function call, with valid values of:
ARS_NORMAL           Success.

ARS_INVBOARD        The board parameter value was invalid.
ARS_INVARG            The format parameter value was invalid.

ARS_BOARD_MUTEX  Access to the Board Lock timed-out/failed.

References

Timer Functions
Alphabetical Function Index
Hierarchical Function Index

CEI-x30 API Description