ar_set_time

short ar_set_time (short board, AR_TIMETAG_TYPE * timeTag);

Purpose

This function assigns a value to the specified CEI-x30 device internal timer or IRIG time generator based on an application-supplied time format value.

Parameters

Input

Name

Type

Description

board

short

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

timeTag

AR_TIMETAG_TYPE (passed by reference)

(input) The time-tag data structure associated with the values to be used to set the respective timer, defined as follows:


typedef struct {
        TIME_TAG_TYPE timeTagFormat;
        TIME_TAG_TYPE timeTag;
        TIME_TAG_TYPE referenceTimeTag;
} AR_TIMETAG_TYPE, *pAR_TIMETAG_TYPE;

 
->timeTagFormat -- timer to assign and format of the "timeTag" value          
AR_TIMETAG_EXT_IRIG_64BIT      (0) 30-bit IRIG encoded time of year
AR_TIMETAG_INT_USEC_64BIT     (1) 64-bit internal board timer in microseconds

->timeTag -- timer value to assign in the format specified via "timeTagFormat"  

For timeTagFormat of AR_TIMETAG_EXT_IRIG_64BIT, the format of timeTag should be IRIG encoded BCD, defined as:

29-28

27-24

23-20

19-18

17-14

13-11

10-7

6-4

3-0

hundreds of days

tens of days

days

tens of hours

hours

tens of minutes

minutes

tens of seconds

seconds

 

For timeTagFormat of AR_TIMETAG_INT_USEC_64BIT, the format of timeTag is a 64-bit integer value with a 1 microsecond resolution.

->referenceTimeTag – member not used                     

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 timeTag structure timeTagFormat member 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