AMX NI-2000/3000/4000 Network Card User Manual


 
Appendix B: Clock Manager NetLinx Programming API
142
NI Series WebConsole & Programming Guide
Library Calls
The NetLinx.axi file that ships with NetLinx Studio includes the following Clock Manager-specific
library calls:
NetLinx.axi - Library Calls
CLKMGR_IS_NETWORK_SOURCED() Returns FALSE/0 or TRUE/1.
The default setting is FALSE/0.
CLKMGR_SET_CLK_SOURCE
(CONSTANT INTEGER MODE)
Can be set to CLKMGR_MODE_NETWORK or
CLKMGR_MODE_STANDALONE.
CLKMGR_IS_DAYLIGHTSAVINGS_ON() Returns FALSE/0 or TRUE/1.
The default setting is FALSE/0.
CLKMGR_SET_DAYLIGHTSAVINGS_MODE
(CONSTANT INTEGER ONOFF)
Can be set to ON/TRUE or OFF/FALSE.
CLKMGR_GET_TIMEZONE() Returns Timezone as a string in the format:
UTC[+|-]HH:MM
CLKMGR_SET_TIMEZONE
(CONSTANT CHAR TIMEZONE[])
Input string must have the correct format:
UTC[+|-]HH:MM
CLKMGR_GET_RESYNC_PERIOD() Returns the Clock Manager's re-sync period in
minutes.
The default setting is one (1) hour. This setting has
no effect if the Clock Manager mode is set to STAN-
DALONE.
CLKMGR_SET_RESYNC_PERIOD
(CONSTANT INTEGER PERIOD)
Sets the re-sync period to the specified minute
value. The upper bound is 480 minutes
(i.e., 8 hours).
CLKMGR_GET_DAYLIGHTSAVINGS_OFFSET
(CLKMGR_TIMEOFFSET_STRUCT T)
Populates the TIMEOFFSET structure with the cur-
rent Daylight Savings Offset configured.
The function returns a negative SLONG value if it
encounters an error.
CLKMGR_SET_DAYLIGHTSAVINGS_OFFSET
(CONSTANT CLKMGR_TIMEOFFSET_STRUCT T)
Sets the Daylight Savings Offset to the specified
value.
CLKMGR_GET_ACTIVE_TIMESERVER
(CLKMGR_TIMESERVER_STRUCT T)
Populates the TIMESERVER structure with the cur-
rently active time server's data.
The function returns a negative SLONG value if it
encounters an error.
CLKMGR_SET_ACTIVE_TIMESERVER
(CONSTANT CHAR IP[])
Sets the time server entry that has the matching IP-
ADDRESS to the IP parameter as the active time
server entry.
CLKMGR_GET_TIMESERVERS
(CLKMGR_TIMESERVER_STRUCT T[])
Populates the currently configured time server
entries from the Clock Manager into the specified
TIMESERVER array.
The function returns a negative SLONG value if it
encounters an error, otherwise the return value is
set to the number of records populated into the
CLKMGR_TIMESERVER_STRUCT array.
CLKMGR_ADD_USERDEFINED_TIMESERVER
(CONSTANT CHAR IP[], CONSTANT CHAR URL[],
CONSTANT CHAR LOCATION[])
Adds a user-defined time server entry.
CLKMGR_DELETE_USERDEFINED_TIMESERVER
(CONSTANT CHAR IP[])
Deletes the user-defined entry that has its IP-
ADDRESS matching the parameter.