4.2.4 TSYNC_set ..........................4-200 4.2.5 TSYNC_waitFor ......................... 4-200 4.2.6 API Error Message Returns ....................... 4-201 4.2.7 API Calls Supported by TSync ....................4-201 4.2.8 Clock Service (CS) Calls ......................4-203 4.2.9 Frequency Output (FP) Calls ..................... 4-213 4.2.10 Flash Manager (FS) Calls ......................4-214 4.2.11 General Purpose Input (GI) Calls ....................
Page 6
External Event Input (Time Stamping) ................... 5-2 Match Time ............................ 5-3 Using the Host PC as an External Time Reference for the TSync Board ........5-5 Converting the GPO Outputs to 1PPS Output Signals ..............5-6 Changing the TSync Board’s TimeScale to Local Time Instead of UTC ........5-7 Operation of the TSync-cPCI-PTP ....................
Page 7
This 10 MHz oscillator, central to the TSync timing functions, uses the last known reference to increment (“freewheel”) in the absence of a timing input. The TSync card generates an IRIG AM and DCLS output pair, as well as 10 MHz sine wave and 1PPS outputs.
4) Change to the directory in which the driver files were copied. 5) Extract the driver using the following command: > gunzip –c tsync.<rev>.tar.gz | tar –xvf – 6) Build the driver by issuing the commands below: > cd tsync >...
> make uninstall 2.1.3 Generating the Example Programs The TSync driver provides both a static library (libtsync.a) and a shared library (libtsync.so). The example programs are built linked with the static library. To use the example programs with the shared library, modify the example “makefile” by replacing the libtsync.a with libtsync.so and rebuild.
1) Open a terminal window. 2) Change to the directory in which the driver and its sources were extracted. 3) Build the upgrade tool by issuing the commands below: > cd tsync > cd upgrade > make clean > make To see usage help for the upgrade tool, execute the program with no parameters: >...
4) Change to the directory in which the driver package file was copied. 5) Extract the driver using the following command: > gunzip –c tsync.<rev>.<arch>.pkg.tar.gz | tar –xvf – 6) Install the driver package by issuing the following command: > pkgadd -d tsync.pkg 2.2.2 Uninstalling the Driver...
2.2.3 File Locations The following table illustrates where package contents ultimately reside in relation to the support of either API classification. x86 Architecture File Destination 64-bit API 32-bit API /usr/kernel/drv tsync (driver) tsync.conf /usr/kernel/drv /usr/kernel/drv/amd64 tsync (driver) tsync.conf /usr/kernel/drv/amd64 libtpro_32.a /usr/lib libtsync32.a...
2.3.3 File Locations On 32-bit operating systems, the 32-bit library file and DLL (Tsync.lib & Tsync.dll) are located in the “Spectracom\TSYNC PCI\Dev” directory under “Program Files.” On 64-bit operating systems, the 64-bit library file and DLL (Tsync.lib & Tsync.dll) are located in the “Spectracom\TSYNC PCI\Dev64”...
The control utility provides a graphical interface for performing legacy functionality with the board. The control utility is run as follows: 1) From the Windows Start menu, select the “Programs” folder. 2) Select the “Spectracom Corp\TSync PCI” folder. 3) Select the “TSync Control Utility” program.
Clock Daemon.exe: This program can be run as follows: 1) From the Windows Start menu, select the “Programs” folder. 2) Select the “Spectracom Corp\TSync PCI” folder. 3) Select the “Clock Daemon” program. Device Name: Enter the board to be used as a time source.
Page 17
This program can be removed as a service by running “ClockDaemonService.exe -r” from a command line. The controls for device name and update interval are set up by the “daemon.ini” located in the “Spectracom\TSYNC PCI\Control” folder with the clock daemon executables. This initialization file is shared by both clock daemon executables.
Page 19
This can be done without resetting the host computer by using the reset example program: > cd .. > cd examples > ./SS_Reset 0 0 Where the first 0 is the board instance of the TSync board to be reset.
4.1.1 Tsync.h #ifndef _defined_TSYNC_H #define _defined_TSYNC_H /******************************************************************************* Module: tsync.h Date: 08/08/07 Purpose: This is the TSYNC/TSAT PCI Card interface file. ** (C) Copyright 2006 Spectracom Corporation All rights reserved. *******************************************************************************/ #ifdef __cplusplus extern "C" { #endif #include "tsync_platform_mapping.h" #include "tsync_agps.h"...
Page 22
** Length of driver version string "XX.YY" ** (not including termination) #define TSYNC_DRV_VERSION_LENGTH ( 5 ) #include "tsync_error_codes.h" ** Handle to the TSync board obj available to the user typedef void* TSYNC_BoardHandle; typedef uint8_t CI_CAI; typedef uint8_t CI_IID; #define TSYNC_CAPABILITIES_PER_PAGE...
Page 24
// zone/DST ML_NUM_TIME_SCALES = 4, // Number of time scales ML_TIME_SCALE_MAX = 15 // Maximum number of timescales } ML_TIME_SCALE; typedef enum ML_TIME_START_TYPES = 0, // First time type in the list ML_TIME_DOYTIME = 0, // Year, Day of Year, Hour, Min, // Sec, nsec ML_TIME_BCDTIME = 1,...
Page 25
// Number of hour types } ML_HOUR; // Number of different message formats that can be sent each second #define AL_FMT_MAX typedef enum AL_FMT_SPEC_0 = 0x00000000, // Spectracom format 0 AL_FMT_SPEC_1 = 0x00000001, // Spectracom format 1 AL_FMT_SPEC_2 = 0x00000002, // Spectracom format 2...
Page 26
// port. typedef enum AL_PPS_OTP = 0, // Decoded 1PPS selected AL_PPS_SIG = 1, // External ATC 1PPS input selected } AL_PPS; // The AO_SOURCE enumeration describes the different possible // sources of an ASCII message typedef enum AO_SOURCE_SYSTEM = 0, // System Time is output source (normal) AO_SOURCE_EVTBUF = 1 // Event Buffer } AO_SOURCE;...
Page 27
// Fields conform to IEEE // C37.118-2005 IL_CF_SPEC = 3, // Fields conform to Spectracom // format IL_CF_SPEC_FAA = 4, // Fields conform to Spectracom FAA // format IL_CF_NASA = 5, // Fields conform to NASA formats IL_CF_NUM // Number of CF types } IL_CF;...
Page 29
} REF_SEL; /*** Clock services ***/ /*** Log service ***/ typedef enum LS_ALARM_SYNC = 0, // Not in Sync LS_ALARM_HOLDOVER = 1, // In Holdover LS_ALARM_FREQ_ERR = 2, // Frequency Error LS_ALARM_SELF_REF = 3, // Self Reference only LS_ALARM_SW_ERR = 4, // Software Error LS_ALARM_1PPS = 5,...
Page 30
SS_RESET_FPGA = 2, // Reset the FPGA only SS_RESET_NUM } SS_RESET; typedef enum SS_TS_MIN = 0, // Minimum Timestamp index SS_TS_TIME_REF = 0, // Timestamp on Time Reference // change SS_TS_1PPS_REF = 1, // Timestamp on 1PPS Reference // change SS_TS_TFOM = 2, // Timestamp on TFOM value change...
Page 31
} FR_MODE; /*** LED services ***/ typedef enum EC_MODE_SYNC = 0, // LED indicates sync status EC_MODE_HOLDOVER = 1, // LED indicates holdover status EC_MODE_ALARM = 2, // LED indicates alarm status EC_MODE_1PPS = 3, // LED goes on briefly when 1PPS // occurs EC_MODE_MANUAL = 4,...
Page 32
GL_MODE_SELF = 6 } GL_MODE; /*** GPS Reset types ***/ typedef enum GL_RESET_COLD = 0, // Clear data in RAM (like power-cycle) GL_RESET_WARM = 1, // Clear ephemeris and osc. uncertainty GL_RESET_HOT = 2, // No clear, SW reset, rerun self-test GL_RESET_POS = 3, // Clear position in receiver flash...
Page 39
TSYNC_TimeSecondsObj; /*========================================================================== TSYNC HW TIME OBJECT ==========================================================================*/ typedef struct TSYNC_HWTimeObj TSYNC_TimeObj time; unsigned int bSync; TSYNC_HWTimeObj; /*========================================================================== TSYNC HW TIME SECONDS OBJECT ==========================================================================*/ typedef struct TSYNC_HWTimeSecondsObj TSYNC_TimeSecondsObj time; unsigned int bSync; TSYNC_HWTimeSecondsObj; /*========================================================================== TSYNC WAIT OBJECT ==========================================================================*/ typedef struct TSYNC_WaitObj unsigned int ticks;...
Page 40
TSYNC MEM OBJECT FOR PEEK/POKE ==========================================================================*/ typedef struct TSYNC_MemObj unsigned short offset; /* offset from base register */ unsigned int value; /* value to use at register location */ TSYNC_MemObj; /*========================================================================== TSYNC GET STATUS OBJECT ==========================================================================*/ typedef struct TSYNC_StateObj unsigned int image;...
Page 41
TSYNC_CapabilityObj caps[TSYNC_CAPABILITIES_PER_PAGE]; TSYNC_CapabilityPageObj; /*========================================================================== TSYNC TIME SCALE OBJECT ==========================================================================*/ typedef struct TSYNC_TimeScaleObj ML_TIME_SCALE scale; TSYNC_TimeScaleObj; /*========================================================================== TSYNC TIME SCALE OFFSET OBJECT ==========================================================================*/ typedef struct TSYNC_TimeScaleOffsetObj ML_TIME_SCALE scale; int offset; TSYNC_TimeScaleOffsetObj; /*========================================================================== TSYNC TIME SUBSECOND ADJUSTMENT OBJECT ==========================================================================*/ typedef struct TSYNC_TimeSubsecAdjObj int adjust;...
Page 42
TSYNC_TimeObj effectiveTime; bActive; TSYNC_TimeDiscontObj; /*========================================================================== TSYNC TIME SUBSECOND ADJUSTMENT OBJECT ==========================================================================*/ typedef struct TSYNC_TimeLeapSecondObj offset; TSYNC_TimeObj utcDate; TSYNC_TimeLeapSecondObj; /*========================================================================== TSYNC TIME ZONE OFFSET OBJECT ==========================================================================*/ typedef struct TSYNC_TimeZoneOffsetObj tzOffset; TSYNC_TimeZoneOffsetObj; /*========================================================================== TSYNC TIME DST POINT OBJECT ==========================================================================*/ typedef struct TSYNC_TimeDSTPointObj ML_MONTH month;...
Page 43
TSYNC TIME DST STATE OBJECT ==========================================================================*/ typedef struct TSYNC_TimeDSTStateObj int state; TSYNC_TimeDSTStateObj; /*========================================================================== TSYNC FS IMAGE OBJECT ==========================================================================*/ typedef struct TSYNC_FSImageObj FS_IMG image; TSYNC_FSImageObj; /*========================================================================== TSYNC FS CRC OBJECT ==========================================================================*/ typedef struct TSYNC_FSCRCObj unsigned int crc; TSYNC_FSCRCObj; /*========================================================================== TSYNC FS VERSION OBJECT...
Page 44
} TSYNC_FlagObj; /*========================================================================== TSYNC LS VERSION OBJECT ==========================================================================*/ typedef struct char version[7]; } TSYNC_FirmwareVersionObj; /*========================================================================== TSYNC LS SERIAL NO OBJECT ==========================================================================*/ typedef struct char serno[33]; } TSYNC_SerialNoObj; /*========================================================================== TSYNC METER HANDLE OBJECT ==========================================================================*/ typedef struct TSYNC_METER_HANDLE hnd; } TSYNC_MeterHandle; /*==========================================================================...
Page 49
typedef struct int state; } TSYNC_AgpsServerStateObj; /*========================================================================== PTP MODULE INFO OBJECT ==========================================================================*/ typedef struct unsigned int ptpVerisonNumber; unsigned int softwareVersion; char hardwareVersion; char filler[3]; char softDate[TSYNC_PTP_DATE_STR_LEN]; char softTime[9]; } TSYNC_PTPModuleInfoObj; /*========================================================================== PTP ETHERNET INTERFACE INFO OBJECT ==========================================================================*/ typedef struct int dhcpEnabled; unsigned char staticIpAddr[4];...
Page 50
unsigned int portNumber; int portEnabled; PTL_PTP_STATE portState; int linkConnected; int slaveLogAnn; int slaveLogSync; int slaveLogDelayReq; int slaveOneStepMode; } TSYNC_PTPPortStateObj; /*========================================================================== PTP PORT SETTINGS OBJECT ==========================================================================*/ typedef struct unsigned int portNumber; unsigned int annRcptTimeout; int logAnnInterval; int logSyncInterval; int logDelayReqInterval; int logPeerDelayReqInterval; PTL_DELAY_MECH delayMechanism;...
Page 59
/*========================================================================== GPL: Unicast Master Properties ==========================================================================*/ typedef struct TSYNC_GplUnctMasterProp unsigned int negoEnabled; unsigned int nbSlaveConnected; TSYNC_GplUnctMasterProp; /*========================================================================== GPL: Unicast Master Configuration ==========================================================================*/ typedef struct TSYNC_GplUnctMasterCfg unsigned short minSyncInt; unsigned short maxSyncDur; unsigned short minAnnInt; unsigned short maxAnnDur; unsigned short minDRqInt; unsigned short maxDRqDur;...
Page 60
/*========================================================================== GPL: MAC Address ==========================================================================*/ typedef struct TSYNC_GplMacAddr unsigned char macAddr[6]; TSYNC_GplMacAddr; /*========================================================================== GPL: Sync Ethernet ==========================================================================*/ typedef struct TSYNC_GplSyncEth unsigned int enableSyncE; unsigned int esmcEnable; unsigned int esmcSigCtl; unsigned int ssmCode; TSYNC_GplSyncEth; /*========================================================================== GPL: VLAN ==========================================================================*/ typedef struct TSYNC_GplVlan unsigned int vLanIntEnable;...
Page 61
typedef struct TSYNC_GplSlaveStats unsigned int slaveNum; unsigned int ptpEn; unsigned char cid[8]; unsigned int pid; unsigned char ipV4Addr[4]; unsigned char macAddr[6]; unsigned short syncPeriod; unsigned short annPeriod; unsigned short dRqPeriod; unsigned short syncDur; unsigned short syncRem; unsigned short annDur; unsigned short annRem; unsigned short dRqDur;...
Page 62
* Function: TSYNC_open() * Description: Open the TSYNC device. * Parameters: IN: *hw - Handle *deviceName - Name of the device. * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_open( TSYNC_BoardHandle *hnd, char *deviceName); * Function: TSYNC_close() * Description: Close the TSYNC device.
Page 63
- item id inPayload - transaction specific payload inLength - number of bytes in inPayload maxOutLength - number bytes allowed in outPayload OUT: outPayload - passed back transaction specific data actualOutLength - the actual number of bytes passe back in outPayload * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_set(...
Page 64
* Description: Gets information about an option card in a specified slot. * Parameters: - Board handle nSlot - Option card slot OUT: *pObj - Option card information result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_DCS_getCardInfo( TSYNC_BoardHandle hnd, unsigned int nSlot, TSYNC_OptCardHdrObj *pObj);...
Page 65
DLL_EXPORT TSYNC_ERROR TSYNC_DCS_getSlot( TSYNC_BoardHandle hnd, TSYNC_OptCardFeatInstObj *pObj, *nSlot); * Function: TSYNC_DCS_getOptions() * Description: Gets access of available licensed options * Parameters: - Board handle *pObj - Id and system instance of feature OUT: *fileOption - Option * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_DCS_getOptions( TSYNC_BoardHandle...
Page 66
* Parameters: - Handle *obj - Pointer to the state result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_US_getState( TSYNC_BoardHandle hnd, TSYNC_StateObj *obj); * Function: TSYNC_US_start() * Description: Begin an image update sequence. * Parameters: - Handle *obj - Pointer to the update header information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_US_start(...
Page 67
- Handle OUT: *obj - Pointer to the update end information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_US_end( TSYNC_BoardHandle hnd, TSYNC_UpdateEndObj *obj); * Function: TSYNC_US_cancel() * Description: Cancel the update sequence. * Parameters: - Handle OUT: imageType - the type of update sequence being cancelled * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_US_cancel(...
Page 68
- Handle OUT: *Timep - Pointer to the time result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_CS_getNextSec( TSYNC_BoardHandle hnd, TSYNC_TimeObj *Timep); * Function: TSYNC_CS_getTimeScale() * Description: Get the board's current time scale. * Parameters: - Board handle OUT: pObj - Pointer to the time scale result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_CS_getTimeScale(...
Page 69
pObj - Pointer to the time scale offset information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_CS_setTimeScaleOff( TSYNC_BoardHandle hnd, TSYNC_TimeScaleOffsetObj *pObj); * Function: TSYNC_CS_subsecAdj() * Description: Make a one-time adjustment to the 1PPS on-time point. Adjustment is in nanoseconds. * Parameters: - Board handle pObj - Pointer to the subsecond adjustment information...
Page 70
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_CS_getLeapSec( TSYNC_BoardHandle hnd, TSYNC_TimeLeapSecondObj *pObj); * Function: TSYNC_CS_setLeapSec() * Description: Set a new leap second. Offset is in seconds. * Parameters: - Board handle pObj - Pointer to the leap seconds information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_CS_setLeapSec( TSYNC_BoardHandle...
Page 71
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_CS_getDstRule( TSYNC_BoardHandle hnd, TSYNC_TimeDSTRuleObj *pObj); * Function: TSYNC_CS_setDstRule() * Description: Set the DST rule. DST offset is in seconds. * Parameters: - Board handle pObj - Pointer to the time zone offset rule information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_CS_setDstRule(...
Page 72
TSYNC_ERROR TSYNC_CS_getDstState( TSYNC_BoardHandle hnd, TSYNC_TimeDSTStateObj *pObj); * Function: TSYNC_CS_setDstState() * Description: Set the DST state. * Parameters: - Board handle pObj - Pointer to the DST state information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_CS_setDstState( TSYNC_BoardHandle hnd, TSYNC_TimeDSTStateObj *pObj); * Function: TSYNC_CS_getTimeSec() * Description: Get the time in seconds and nanoseconds format.
Page 73
DLL_EXPORT TSYNC_ERROR TSYNC_CS_getTimeBcd( TSYNC_BoardHandle hnd, TSYNC_TimeBCDObj *pObj); * Function: TSYNC_CS_setTimeBcd() * Description: Set the time in BCD format. * Parameters: - Board handle pObj - Pointer to the time information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_CS_setTimeBcd( TSYNC_BoardHandle hnd, TSYNC_TimeBCDObj *pObj);...
Page 74
pObj - Pointer to the image information OUT: pObj2 - Pointer to the image header result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_FS_getHeader( TSYNC_BoardHandle hnd, TSYNC_FSImageObj *pObj, TSYNC_FSImageHeaderObj *pObj2); * Function: TSYNC_FS_getVersion() * Description: Get the image version for a particular flash image. * Parameters: - Board handle pObj...
Page 75
* Function: TSYNC_LS_setAlarm() * Description: Clear the specified alarm. (Set 0 to clear) * Parameters: - Board handle pObj - Pointer to the alarm index information pObj2 - Pointer to the alarm flag result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_LS_setAlarm( TSYNC_BoardHandle hnd, TSYNC_AlarmObj...
Page 76
* Function: TSYNC_XS_unregister() * Description: Free the specified meter. * Parameters: - Board handle pObj - Pointer to the meter handle information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_XS_unregister( TSYNC_BoardHandle hnd, TSYNC_MeterHandle *pObj); * Function: TSYNC_XS_getWindowSize() * Description: Get the specified meter's error data. Error data is in nanoseconds.
Page 77
DLL_EXPORT TSYNC_ERROR TSYNC_XS_meterCmd( TSYNC_BoardHandle hnd, TSYNC_MeterCommandObj *pObj); /* Superviser Service ====================================================*/ * Function: TSYNC_SS_reset() * Description: Reset the TSYNC board. * Parameters: - Board handle pObj - Pointer to the reset type information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_SS_reset(...
Page 78
* Parameters: - Board handle tfom - Pointer to the maximum TFOM information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_SS_setMaxTfom( TSYNC_BoardHandle hnd, TFOM tfom); * Function: TSYNC_SS_getTfom() * Description: Get the current TFOM. * Parameters: - Board handle OUT: tfom - Pointer to the current TFOM result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT...
Page 79
OUT: nHoldoverTimeout - Pointer to the current timeout state result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_SS_getHoldoverTO( TSYNC_BoardHandle hnd, unsigned int *nHoldoverTimeout); * Function: TSYNC_SS_setHoldoverTO() * Description: Set the current holdover timeout. * Parameters: - Board handle nHoldoverTimeout - Pointer to the current timeout state information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT...
Page 80
* Parameters: - Board handle - The timestamp source OUT: nSeconds - Pointer to the seconds time result nNanos - Pointer to the nanoseconds time result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_SS_getTimestampSec( TSYNC_BoardHandle hnd, SS_TS_SRC src, unsigned int *nSeconds, unsigned int *nNanos);...
Page 81
* Function: TSYNC_RS_getBestRef() * Description: Get current best working priority table entry. * Parameters: - Board handle OUT: pObj - Pointer to the table entry result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_RS_getBestRef( TSYNC_BoardHandle hnd, TSYNC_TableEntryObj *pObj); * Function: TSYNC_RS_getEntry() * Description: Get working priority table entry by index.
Page 82
* Function: TSYNC_RS_setUserDef() * Description: Reset the reference table to the user default settings, if saved user priority table exists. * Parameters: - Board handle * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_RS_setUserDef( TSYNC_BoardHandle hnd); * Function: TSYNC_RS_saveUserDef() * Description: Save the working priority table to the user priority table. * Parameters: - Board handle * Returns: (TSYNC_SUCCESS) Success...
Page 83
- Board handle index - Table entry index priority - Pointer to the priority information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_RS_setPriority( TSYNC_BoardHandle hnd, unsigned int index, unsigned int priority); * Function: TSYNC_RS_getEnable() * Description: Get specified working priority table entry's enable state. * Parameters: - Board handle index...
Page 84
* Function: TSYNC_IN_getStatus() * Description: Get the board's initialization results. * Parameters: - Board handle pageNum - Table entry index OUT: pObj - Pointer to the initialization status result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IN_getStatus( TSYNC_BoardHandle hnd, unsigned int pageNum, TSYNC_InitStatusResult *pObj);...
Page 85
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GI_setEdge( TSYNC_BoardHandle hnd, ID_PIN index, EDGE edge); * Function: TSYNC_GI_getTsEnable() * Description: Get the GPI's timestamp enable state used when time stamping input changes. * Parameters: - Board handle index - The input index OUT: bEnable - The enabled result * Returns: (TSYNC_SUCCESS) Success...
Page 86
* Parameters: - Board handle index - The input index OUT: bType - The timestamp type * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GI_getTsType( TSYNC_BoardHandle hnd, ID_PIN index, int *bType); * Function: TSYNC_GI_getAsciiTs() * Description: Get the latest ASCII Timestamp. * Parameters: - Board handle index - The input index...
Page 87
DLL_EXPORT TSYNC_ERROR TSYNC_HR_getValidity( TSYNC_BoardHandle hnd, unsigned int nInstance, *bTimeValid, *bPpsValid); * Function: TSYNC_HR_setValidity() * Description: Set the reference validity of the Host. * Parameters: - Board handle nInstance - The instance number bTimeValid - The time reference information bPpsValid - The pps reference information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_HR_setValidity(...
Page 88
* Description: Set the ASCII reference's local time zone and DST rule. Timezone and DST offsets are in seconds. * Parameters: - Board handle nInstance - The instance number TSYNC_LocalClockObj - The local clock information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_HR_setLocal( TSYNC_BoardHandle hnd,...
Page 89
unsigned int nInstance, TSYNC_RefIdObj *pObj); * Function: TSYNC_HR_getNumInst() * Description: Get number of Host reference instances present in the system. * Parameters: - Board handle OUT: nInstances - The number of instances result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_HR_getNumInst( TSYNC_BoardHandle hnd, unsigned int...
Page 90
OUT: edge - The edge result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PR_getEdge( TSYNC_BoardHandle hnd, unsigned int nInstance, EDGE *edge); * Function: TSYNC_PR_setEdge() * Description: Set the 1PPS reference's active edge setting. * Parameters: - Board handle nInstance - The instance number edge - The edge information * Returns: (TSYNC_SUCCESS) Success...
Page 91
* Description: Get reference identifier for a PPS reference instance. * Parameters: - Board handle * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PR_getRefId( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_RefIdObj *pObj); /* LED Control Component =================================================*/ * Function: TSYNC_EC_getMode() * Description: Get the LED usage mode state. * Parameters: - Board handle index...
Page 92
LE_INDEX index, EC_STATE *state); * Function: TSYNC_EC_setState() * Description: Set the LED display state. Settable only in manual LED mode. * Parameters: - Board handle index - The LED index state - The display state * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_EC_setState( TSYNC_BoardHandle hnd, LE_INDEX...
Page 93
- Board handle nInstance - The instance number OUT: bTimeValid - The time reference result bPpsValid - The pps reference result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_AR_getValidity( TSYNC_BoardHandle hnd, unsigned int nInstance, *bTimeValid, *bPpsValid); * Function: TSYNC_AR_getUartCfg() * Description: Get the ASCII reference UART configuration. * Parameters: - Board handle nInstance...
Page 94
unsigned int *bLeap); * Function: TSYNC_AR_getLocal() * Description: Get the ASCII reference's local time zone and DST rule. Timezone and DST offsets are in seconds. * Parameters: - Board handle nInstance - The instance number OUT: pObj - Pointer to the Local Clock result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_AR_getLocal(...
Page 95
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_AR_setTimeScale( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_TimeScaleObj *pObj); * Function: TSYNC_AR_getRefId() * Description: Get reference identifier for an ASCII reference instance. * Parameters: - Board handle * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_AR_getRefId( TSYNC_BoardHandle hnd, unsigned int nInstance,...
Page 96
* Parameters: - Board handle OUT: nInstances - The number of instances result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_AR_getNumInst( TSYNC_BoardHandle hnd, unsigned int *nInstances); * Function: TSYNC_AR_getPpsSrc() * Description: Get the ASCII PPS Source. * Parameters: - Board handle nInstance - The instance number OUT: AL_SRC...
Page 97
*bTimeValid, *bPpsValid); * Function: TSYNC_FR_getFreq() * Description: Get the frequency of a frequency reference. * Parameters: - Board handle nInstance - The instance number OUT: freq - The frequency result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_FR_getFreq( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int *freq);...
Page 98
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_FR_setMode( TSYNC_BoardHandle hnd, unsigned int nInstance, FR_MODE mode); * Function: TSYNC_FR_getNumInst() * Description: Get number of frequency reference instances present in the system. * Parameters: - Board handle OUT: nInstances - The number of instances result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_FR_getNumInst(...
Page 99
* Parameters: - Board handle nInstance - The instance number nOffset - The offset information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GR_setOffset( TSYNC_BoardHandle hnd, unsigned int nInstance, nOffset); * Function: TSYNC_GR_getValidity() * Description: Get the GPS validity structure. * Parameters: - Board handle nInstance - The instance number...
Page 100
DLL_EXPORT TSYNC_ERROR TSYNC_GR_setPosition( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_LLAObj *pObj); * Function: TSYNC_GR_getMode() * Description: Get the GPS receiver mode. * Parameters: - Board handle nInstance - The instance number OUT: mode - The receiver mode result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GR_getMode( TSYNC_BoardHandle...
Page 101
* Parameters: - Board handle nInstance - The instance number mode - The dynamics mode information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GR_setDynamics( TSYNC_BoardHandle hnd, unsigned int nInstance, GL_DYN mode); * Function: TSYNC_GR_getFixData() * Description: Get the GPS position fix data. * Parameters: - Board handle nInstance...
Page 102
unsigned int *nProgress); * Function: TSYNC_GR_getMfrMdl() * Description: Get the GPS receiver manufacturer and model. * Parameters: - Board handle nInstance - The instance number OUT: pObj - Pointer to the manufacturer and model result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GR_getMfrMdl( TSYNC_BoardHandle hnd,...
Page 103
DLL_EXPORT TSYNC_ERROR TSYNC_GR_setCustom( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_CustomMessageObj *pObj); * Function: TSYNC_GR_getNumInst() * Description: Get number of GPS references instances present in the system. * Parameters: - Board handle OUT: nInstances - The number of instances result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GR_getNumInst( TSYNC_BoardHandle...
Page 104
DLL_EXPORT TSYNC_ERROR TSYNC_GR_reset( TSYNC_BoardHandle hnd, unsigned int nInstance, GL_RESET reset); * Function: TSYNC_GR_getAntenna() * Description: Get the GPS receiver antenna status. * Parameters: - Board handle nInstance - The instance number status - Pointer to the status result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GR_getAntenna( TSYNC_BoardHandle hnd,...
Page 105
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GR_getParameter( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_ReceiverParmObj *pObj); * Function: TSYNC_GR_setParameter() * Description: Send a GPS Receiver specific parameter or control message. * Parameters: - Board handle nInstance - The instance number pObj - Pointer to the GPS specific message * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GR_setParameter(...
Page 106
* Parameters: - Board handle nInstance - The instance number OUT: pObj - Pointer to the almanac to be sent * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GR_setAlm( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_AlmObj *pObj); * Function: TSYNC_GR_getEphm() * Description: Get the ephemeris * Parameters: - Board handle nInstance...
Page 107
TSYNC_ERROR TSYNC_GR_setAgpsTime( TSYNC_BoardHandle hnd, unsigned int nInstance); * Function: TSYNC_GR_getAgpsServerState() * Description: Get whether the GPS component is collecting A-GPS data or not. * Parameters: - Board handle nInstance - The instance number OUT: pObj - Pointer to the returned A-GPS server state * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GR_getAgpsServerState(...
Page 108
* Parameters: - Board handle nInstance - The instance number nOffset - The offset information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IR_setOffset( TSYNC_BoardHandle hnd, unsigned int nInstance, nOffset); * Function: TSYNC_IR_getValidity() * Description: Get the IRIG validity structure. * Parameters: - Board handle nInstance - The instance number...
Page 109
TSYNC_BoardHandle hnd, unsigned int nInstance, IL_MODE mode); * Function: TSYNC_IR_getFormat() * Description: Get the IRIG format. * Parameters: - Board handle nInstance - The instance number OUT: format - The format result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IR_getFormat( TSYNC_BoardHandle hnd, unsigned int nInstance,...
Page 110
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IR_setMod( TSYNC_BoardHandle hnd, unsigned int nInstance, IL_MOD mod); * Function: TSYNC_IR_getFreq() * Description: Get the IRIG carrier frequency. * Parameters: - Board handle nInstance - The instance number OUT: freq - The frequency result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IR_getFreq(...
Page 111
* Description: Set the IRIG Coded Expression. * Parameters: - Board handle nInstance - The instance number - The Coded Expression information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IR_setCodedExpr( TSYNC_BoardHandle hnd, unsigned int nInstance, IL_CE ce); * Function: TSYNC_IR_getCtrlField() * Description: Get the IRIG Control Field. * Parameters: - Board handle nInstance...
Page 112
unsigned int nInstance, TSYNC_IRIGMessageObj *pObj); * Function: TSYNC_IR_setMessage() * Description: Set the latest IRIG input message. * Parameters: - Board handle nInstance - The instance number OUT: pObj - Pointer to the message information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IR_setMessage( TSYNC_BoardHandle hnd, unsigned int...
Page 113
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IR_getLocal( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_LocalClockObj *pObj); * Function: TSYNC_IR_setLocal() * Description: Set the IRIG reference's local time zone and DST rule. Timezone and DST offsets are in seconds. * Parameters: - Board handle nInstance - The instance number pObj...
Page 114
* Description: Get reference identifier for an IRIG reference instance. * Parameters: - Board handle * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IR_getRefId( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_RefIdObj *pObj); /* STANAG/HaveQuick Reference Component ==================================*/ * Function: TSYNC_QR_getOffset() * Description: Get the STANAG/HaveQuick reference's 1PPS input offset. Offset is in nanoseconds.
Page 115
DLL_EXPORT TSYNC_ERROR TSYNC_QR_getExtOffset( TSYNC_BoardHandle hnd, unsigned int nInstance, *nOffset); * Function: TSYNC_QR_setExtOffset() * Description: Set the STANAG/HaveQuick extended reference's 1PPS input offset. Offset is in nanoseconds from -500 msec to +500 msec. * Parameters: - Board handle nInstance - The instance number nOffset - The offset information * Returns: (TSYNC_SUCCESS) Success...
Page 116
* Parameters: - Board handle nInstance - The instance number format - The format information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QR_setFormat( TSYNC_BoardHandle hnd, unsigned int nInstance, QL_FMT format); * Function: TSYNC_QR_getExtFormat() * Description: Get the STANAG/HaveQuick format. * Parameters: - Board handle nInstance - The instance number...
Page 117
unsigned int nInstance, TSYNC_LocalClockObj *pObj); * Function: TSYNC_QR_setLocal() * Description: Set the STANAG/HaveQuick reference's local time zone and DST rule. Timezone and DST offsets are in seconds. * Parameters: - Board handle nInstance - The instance number pObj - Pointer to the Local Clock information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QR_setLocal(...
Page 118
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QR_getExtTimeScale( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_TimeScaleObj *pObj); * Function: TSYNC_QR_setExtTimeScale() * Description: Set the STANAG/HaveQuick Extended reference's time scale. * Parameters: - Board handle nInstance - The instance number pObj - Pointer to the time scale information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QR_setExtTimeScale(...
Page 119
- Board handle nInstance - The instance number OUT: tfd - The time fault discrete information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QR_getTfd( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int *tfd); * Function: TSYNC_QR_setTfd() * Description: Set the STANAG/HaveQuick reference's time fault discrete. * Parameters: - Board handle nInstance...
Page 120
* Function: TSYNC_QR_getBs() * Description: Set the STANAG/HaveQuick reference's Bit synchnonization. * Parameters: - Board handle nInstance - The instance number OUT: bs - The Bit synchnonization information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QR_getBs( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int *bs);...
Page 121
TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int *refsel); * Function: TSYNC_QR_setBs() * Description: Set the STANAG/HaveQuick reference's Bit synchnonization. * Parameters: - Board handle nInstance - The instance number - The Bit synchnonization result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QR_setBs( TSYNC_BoardHandle hnd, unsigned int nInstance,...
Page 122
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QR_getElecType( TSYNC_BoardHandle hnd, unsigned int nInstances, ELEC_TYPE *et); * Function: TSYNC_QR_setElecType() * Description: Set the reference's electrical type. * Parameters: - Board handle nInstances - The instance number - The electrical type information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QR_setElecType ( TSYNC_BoardHandle...
Page 123
* Parameters: - Board handle nInstances - The instance number OUT: et - The electrical type result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QR_getPpsElecType( TSYNC_BoardHandle hnd, unsigned int nInstances, ELEC_TYPE *et); * Function: TSYNC_QR_setPpsElecType() * Description: Set the 1PPS reference's electrical type. * Parameters: - Board handle nInstances...
Page 124
TSYNC_BoardHandle hnd, unsigned int nInstance, nOffset); * Function: TSYNC_QR_getPpsEdge() * Description: Get the 1PPS reference's active edge setting. * Parameters: - Board handle nInstance - The instance number OUT: edge - The edge result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QR_getPpsEdge( TSYNC_BoardHandle hnd, unsigned int...
Page 125
nInstance - The instance number - The signature control information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_AP_setSigCtrl( TSYNC_BoardHandle hnd, unsigned int nInstance, SIG_CTL sig); * Function: TSYNC_AP_getLocal() * Description: Get the ASCII output's local time zone and DST rule. Timezone and DST offsets are in seconds. * Parameters: - Board handle nInstance...
Page 126
TSYNC_TimeScaleObj *pObj); * Function: TSYNC_AP_setTimeScale() * Description: Set the ASCII output's time scale. * Parameters: - Board handle nInstance - The instance number pObj - Pointer to the time scale information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_AP_setTimeScale( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_TimeScaleObj *pObj);...
Page 127
DLL_EXPORT TSYNC_ERROR TSYNC_AP_getMode( TSYNC_BoardHandle hnd, unsigned int nInstance, AL_OUT_MODE *mode); * Function: TSYNC_AP_setMode() * Description: Set the ASCII output mode. * Parameters: - Board handle nInstance - The instance number mode - The mode information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_AP_setMode( TSYNC_BoardHandle hnd,...
Page 128
- Board handle nInstance - The instance number OUT: pCfg - The UART configuration * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_AP_getUartCfg( TSYNC_BoardHandle hnd, unsigned int nInstance, UD_CFG *pCfg); * Function: TSYNC_AP_setUartCfg() * Description: Set the ASCII output UART configuration. * Parameters: - Board handle nInstance - The instance number...
Page 129
* Function: TSYNC_IP_getSigCtrl() * Description: Get the IRIG output's signature control state. * Parameters: - Board handle nInstance - The instance number OUT: sig - The signature control result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IP_getSigCtrl( TSYNC_BoardHandle hnd, unsigned int nInstance, SIG_CTL *sig);...
Page 130
DLL_EXPORT TSYNC_ERROR TSYNC_IP_setOffset( TSYNC_BoardHandle hnd, unsigned int nInstance, nOffset); * Function: TSYNC_IP_getLocal() * Description: Get the IRIG output's local time zone and DST rule. Timezone and DST offsets are in seconds. * Parameters: - Board handle nInstance - The instance number OUT: pObj - Pointer to the Local Clock result * Returns: (TSYNC_SUCCESS) Success...
Page 131
* Parameters: - Board handle nInstance - The instance number format - The format information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IP_setFormat( TSYNC_BoardHandle hnd, unsigned int nInstance, IL_FMT format); * Function: TSYNC_IP_getAmplitude() * Description: Get the IRIG output amplitude. Amplitude is in range of 3 - 255. * Parameters: - Board handle nInstance...
Page 132
unsigned int nInstance, IL_MOD *mod); * Function: TSYNC_IP_setMod() * Description: Set the IRIG outputmodulation. * Parameters: - Board handle nInstance - The instance number - The modulation * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IP_setMod( TSYNC_BoardHandle hnd, unsigned int nInstance, IL_MOD mod);...
Page 133
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IP_getCodedExpr( TSYNC_BoardHandle hnd, unsigned int nInstance, IL_CE *ce); * Function: TSYNC_IP_setCodedExpr() * Description: Set the IRIG output Coded Expression. * Parameters: - Board handle nInstance - The instance number - The Coded Expression information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IP_setCodedExpr(...
Page 134
* Parameters: - Board handle nInstance - The instance number OUT: pObj - Pointer to the message information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IP_getMessage( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_IRIGMessageObj *pObj); * Function: TSYNC_IP_setMessage() * Description: Set the IRIG output message. * Parameters: - Board handle nInstance...
Page 135
*nInstances); * Function: TSYNC_IP_getPhase() * Description: Get the IRIG output's current phase adjustment. This feature is only available to Spectracom for testing. * Parameters: - Board handle nInstance - The instance number OUT: phase - The phase adjustment result...
Page 136
DLL_EXPORT TSYNC_ERROR TSYNC_IP_getPhaseErr( TSYNC_BoardHandle hnd, unsigned int nInstance, *phErr); * Function: TSYNC_IP_getTimeScale() * Description: Get the IRIG output's time scale. * Parameters: - Board handle nInstance - The instance number OUT: pObj - Pointer to the time scale result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_IP_getTimeScale( TSYNC_BoardHandle...
Page 137
* Parameters: - Board handle nInstance - The instance number OUT: pObj - The module's Ethernet interface settings * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_getEthernetItf( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_PTPEthernetItfObj *pObj); * Function: TSYNC_PTR_setEthernetItf() * Description: Sets Ethernet settings for the PTP module. * Parameters: - Board handle nInstance...
Page 138
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_setSyncEthItf( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_PTPSyncEStatusObj *pObj); //------------------------------------------------------------------------------------ ----- * Function: TSYNC_PTR_getClockSettings() * Description: Gets the module's clock settings. * Parameters: - Board handle nInstance - The instance number OUT: pObj - The module's new clock settings * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_getClockSettings(...
Page 139
TSYNC_ERROR TSYNC_PTR_getUnitSettings( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_PTPUnitSettingsObj *pObj); * Function: TSYNC_PTR_setUnitSettings() * Description: Sets general PTP settings for the module. * Parameters: - Board handle nInstance - The instance number pObj - The module's new general PTP settings * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_setUnitSettings( TSYNC_BoardHandle...
Page 140
* Parameters: - Board handle nInstance - The instance number OUT: pObj - Various settings of a port on the module * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_getPortSettings( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_PTPPortSettingsObj *pObj); * Function: TSYNC_PTR_setPortSettings() * Description: Sets various settings of a port on the module. * Parameters: - Board handle nInstance...
Page 141
DLL_EXPORT TSYNC_ERROR TSYNC_PTR_getVLAN( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_PTPVLANObj *pObj); * Function: TSYNC_PTR_setUnctMasterAdd() * Description: Sets the unicast parameters provided by the clock and adds a master cmocl to the list of master clocks. * Parameters: - Board handle nInstance - The instance number pObj - Various settings of a port on the module...
Page 142
* Description: Gets the unicast mode properties of a Master-Only unit * Parameters: - Board handle nInstance - The instance number OUT: pObj - The unicast mode properties of a Master-Only unit. * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_getUnctMasterProp( TSYNC_BoardHandle hnd, unsigned int nInstance,...
Page 144
* Function: TSYNC_PTR_getPPSEnabled() * Description: Gets whether the module outputs a PPS when it's a slave. * Parameters: - Board handle nInstance - The instance number OUT: bPpsEnabled - Whether the module outputs a PPS when it's a slave * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_getPPSEnabled( TSYNC_BoardHandle hnd,...
Page 145
DLL_EXPORT TSYNC_ERROR TSYNC_PTR_setPPSRisingEdge( TSYNC_BoardHandle hnd, unsigned int nInstance, bPpsRisingEdge); * Function: TSYNC_PTR_saveSettingsToROM() * Description: Saves any settings that have been changed in the PTP module to the module's ROM. * Parameters: - Board handle * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_saveSettingsToROM( TSYNC_BoardHandle hnd, unsigned int nInstance);...
Page 146
TSYNC_ERROR TSYNC_PTR_reinitModule( TSYNC_BoardHandle hnd, unsigned int nInstance); * Function: TSYNC_PTR_getValidity() * Description: Get the PTR validity structure. * Parameters: - Board handle nInstance - The instance number OUT: bTimeValid - The time reference result bPpsValid - The pps reference result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_getValidity(...
Page 147
- Board handle nInstance - The instance number pObj - MAC Address object * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_getMacAddr( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_PTPMacAddrObj *pObj); * Function: TSYNC_PTR_setMacAddr() * Description: Sets the module's current MAC Address. * Parameters: - Board handle nInstance - The instance number...
Page 148
* Function: TSYNC_PTR_getUserDesc() * Description: Gets the User Description strings * Parameters: - Board handle nInstance - The instance number pObj - User Description object * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_getUserDesc( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_PTPUserDescObj *pObj); * Function: TSYNC_PTR_setUserDesc() * Description: Sets the User Description strings * Parameters:...
Page 152
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_getClockProperties( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_PTPClockPropertiesObj *pObj); * Function: TSYNC_PTR_getState() * Description: Retreive the PTR update status. * Parameters: - Handle *obj - Pointer to the state result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_getState( TSYNC_BoardHandle hnd,...
Page 153
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_end( TSYNC_BoardHandle hnd, TSYNC_UpdateEndObj *obj); * Function: TSYNC_PTR_cancel() * Description: Cancel the update sequence. * Parameters: - Handle OUT: imageType - the type of update sequence being cancelled * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_cancel( TSYNC_BoardHandle hnd, FS_IMG imageType);...
Page 154
* Description: Get the HaveQuick output's signature control state. * Parameters: - Board handle nInstance - The instance number OUT: sig - The signature control result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_getSigCtrl( TSYNC_BoardHandle hnd, unsigned int nInstance, SIG_CTL *sig); * Function: TSYNC_QP_setSigCtrl() * Description: Set the HaveQuick output's signature control state.
Page 155
unsigned int nInstance, SIG_CTL sig); * Function: TSYNC_QP_getOffset() * Description: Get the HaveQuick output's offset. Offset is in nanoseconds. * Parameters: - Board handle nInstance - The instance number OUT: nOffset - The offset result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_getOffset( TSYNC_BoardHandle hnd,...
Page 156
nInstance - The instance number nOffset - The offset information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_setExtOffset( TSYNC_BoardHandle hnd, unsigned int nInstance, nOffset); * Function: TSYNC_QP_getLocal() * Description: Get the HaveQuick output's local time zone and DST rule. Timezone and DST offsets are in seconds. * Parameters: - Board handle nInstance...
Page 157
* Function: TSYNC_QP_setBs() * Description: Set the HaveQuick output Bit Synchronization. * Parameters: - Board handle nInstance - The instance number - The Bit Synchronization information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_setBs( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int bs);...
Page 158
DLL_EXPORT TSYNC_ERROR TSYNC_QP_getExtFormat( TSYNC_BoardHandle hnd, unsigned int nInstance, QL_FMT *format); * Function: TSYNC_QP_setExtFormat() * Description: Set the HaveQuick Extended output format. * Parameters: - Board handle nInstance - The instance number format - The format information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_setExtFormat( TSYNC_BoardHandle hnd,...
Page 159
- Board handle nInstance - The instance number OUT: pObj - Pointer to the time scale result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_getExtTimeScale( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_TimeScaleObj *pObj); * Function: TSYNC_QP_setExtTimeScale() * Description: Set the HaveQuick extended output's time scale. * Parameters: - Board handle nInstance...
Page 160
* Parameters: - Board handle nInstance - The instance number - The time fault discrete information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_setTfd( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int tfd); * Function: TSYNC_QP_getTfdState() * Description: Get the HaveQuick output's time fault discrete state. * Parameters: - Board handle nInstances...
Page 161
* Function: TSYNC_QP_getRequiredTfom() * Description: Get the HaveQuick output's required TFOM. * Parameters: - Board handle nInstances - The number of instances result - Pointer to the TFOM result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_getRequiredTfom( TSYNC_BoardHandle hnd, unsigned int nInstances, unsigned int *tfom);...
Page 162
DLL_EXPORT TSYNC_ERROR TSYNC_QP_getLevel( TSYNC_BoardHandle hnd, unsigned int nInstances, SIG_LEVEL *sl); * Function: TSYNC_QP_setLevel() * Description: Set the output's level. * Parameters: - Board handle nInstances - The instance number - The signal level information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_setLevel( TSYNC_BoardHandle hnd, unsigned int...
Page 163
nInstances - The instance number OUT: et - The electrical type result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_getExtElecType( TSYNC_BoardHandle hnd, unsigned int nInstances, ELEC_TYPE *et); * Function: TSYNC_QP_setExtElecType() * Description: Set the extended output's electrical type. * Parameters: - Board handle nInstances - The instance number - The electrical type result...
Page 164
* Function: TSYNC_QP_getPpsElecType() * Description: Get the PPS output's electrical type. * Parameters: - Board handle nInstances - The instance number OUT: et - The electrical type result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_getPpsElecType( TSYNC_BoardHandle hnd, unsigned int nInstances, ELEC_TYPE *et);...
Page 165
TSYNC_ERROR TSYNC_QP_setPpsOffset( TSYNC_BoardHandle hnd, unsigned int nInstance, nOffset); * Function: TSYNC_QP_getPpsEdge() * Description: Get the PPS output's edge. * Parameters: - Board handle nInstance - The instance number OUT: edge - The edge result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_getPpsEdge( TSYNC_BoardHandle hnd, unsigned int...
Page 166
- Board handle nInstance - The instance number - The pulse width information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_QP_setPpsPw( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int pw); /* SMPTE/EBU Output Component =====================================*/ * Function: TSYNC_EP_getSigCtrl() * Description: Get the SMPTE/EBU output's signature control state. * Parameters: - Board handle nInstance...
Page 167
unsigned int nInstance, *nOffset); * Function: TSYNC_EP_setOffset() * Description: Set the SMPTE/EBU output's offset. Offset is in nanoseconds from -500 msec to +500 msec. * Parameters: - Board handle nInstance - The instance number nOffset - The offset information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_EP_setOffset( TSYNC_BoardHandle hnd,...
Page 168
nInstance - The instance number OUT: format - The format result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_EP_getFormat( TSYNC_BoardHandle hnd, unsigned int nInstance, ESL_FMT *format); * Function: TSYNC_EP_setFormat() * Description: Set the SMPTE/EBU output format. * Parameters: - Board handle nInstance - The instance number format...
Page 169
* Function: TSYNC_EP_getAmplitude() * Description: Get the SMPTE/EBU output's amplitude. Amplitude is in range of 0 - 255. * Parameters: - Board handle nInstance - The instance number OUT: amp - The amplitude result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_EP_getAmplitude( TSYNC_BoardHandle hnd, unsigned int...
Page 170
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_DP_getLocal( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_LocalClockObj *pObj); * Function: TSYNC_DP_setLocal() * Description: Set the display output's local time zone and DST rule. Timezone and DST offsets are in seconds. * Parameters: - Board handle nInstance - The instance number pObj...
Page 171
* Parameters: - Board handle nInstance - The instance number OUT: pObj - Pointer to the time scale result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_DP_getTimeScale( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_TimeScaleObj *pObj); * Function: TSYNC_DP_setTimeScale() * Description: Set the display output's time scale. * Parameters: - Board handle nInstance...
Page 172
* Function: TSYNC_DP_setMode() * Description: Set the display mode. * Parameters: - Board handle nInstance - The instance number format - The format information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_DP_setMode( TSYNC_BoardHandle hnd, unsigned int nInstance, DP_MODE mode); /* 1PPS Output Component =================================================*/ * Function: TSYNC_PP_getSigCtrl() * Description: Get the PPS output's signature control state.
Page 173
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PP_getFreq( TSYNC_BoardHandle hnd, unsigned int nInstance, float *freq); * Function: TSYNC_PP_getOffset() * Description: Get the PPS output's offset. Offset is in nanoseconds. * Parameters: - Board handle nInstance - The instance number OUT: nOffset - The offset result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT...
Page 174
* Parameters: - Board handle nInstance - The instance number edge - The edge information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_PP_setEdge( TSYNC_BoardHandle hnd, unsigned int nInstance, EDGE edge); * Function: TSYNC_PP_getPulseWidth() * Description: Get the PPS output's pulse width. Pulse width is in nanoseconds.
Page 175
unsigned int *nInstances); /* Variable-Frequency Output Component ===================================*/ * Function: TSYNC_VP_getSigCtrl() * Description: Get the Variable-Frequency output's signature control state. * Parameters: - Board handle nInstance - The instance number OUT: sig - The signature control result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_VP_getSigCtrl( TSYNC_BoardHandle...
Page 176
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_VP_setFreq( TSYNC_BoardHandle hnd, unsigned int nInstance, float freq); * Function: TSYNC_VP_getPhase() * Description: Get the Variable-Phase output frequency. * Parameters: - Board handle nInstance - The instance number OUT: phase - The phase result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_VP_getPhase(...
Page 177
the system. * Parameters: - Board handle OUT: nInstances - The number of instances result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_VP_getNumInst( TSYNC_BoardHandle hnd, unsigned int *nInstances); * Function: TSYNC_VP_getLock() * Description: Get number of Variable-Frequency output instances present in the system.
Page 178
TSYNC_BoardHandle hnd, unsigned int nInstance, SIG_CTL sig); * Function: TSYNC_ETP_getCfg() * Description: Get the E1/T1 output configuration parameters. * Parameters: - Board handle nInstance - The instance number OUT: pCfg - Pointer to the configuration parameter structure * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_ETP_getCfg( TSYNC_BoardHandle...
Page 179
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_XO_getDiscState( TSYNC_BoardHandle hnd, *disc); * Function: TSYNC_XO_getMode() * Description: Get the external oscillator's mode used when disciplining or testing. * Parameters: - Board handle OUT: mode - The mode result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_XO_getMode( TSYNC_BoardHandle...
Page 180
DLL_EXPORT TSYNC_ERROR TSYNC_XO_setDac( TSYNC_BoardHandle hnd, unsigned short dac); * Function: TSYNC_XO_getAlarm() * Description: Get the external oscillator's alarm state. * Parameters: - Board handle OUT: alarm - The alarm result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_XO_getAlarm( TSYNC_BoardHandle hnd, unsigned int *alarm);...
Page 181
TSYNC_ERROR TSYNC_XO_setMessage( TSYNC_BoardHandle hnd, TSYNC_OscCustomMessageObj *pObj); * Function: TSYNC_XO_getCmd() * Description: Get a disciplining dataset from the external oscillator. * Parameters: - Board handle OUT: pObj - Pointer to the dataset result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_XO_getCmd( TSYNC_BoardHandle hnd, TSYNC_OscDiscObj *pObj);...
Page 182
float *error); * Function: TSYNC_XO_getCalVal() * Description: Get the calibration value of the external oscillator. * Parameters: - Board handle - calibration value * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_XO_getCalVal( TSYNC_BoardHandle hnd, float *cal); * Function: TSYNC_XO_getOscType() * Description: Get the system oscillator type. * Parameters: - Board handle - Oscillator type...
Page 183
DLL_EXPORT TSYNC_ERROR TSYNC_FP_setSigCtrl( TSYNC_BoardHandle hnd, unsigned int nInstance, SIG_CTL sig); * Function: TSYNC_FP_getFreq() * Description: Get the Fixed Frequency output's frequency. Frequency is in Hertz. * Parameters: - Board handle nInstance - The instance number OUT: freq - The frequency result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_FP_getFreq(...
Page 184
index - Index of the shared memory set OUT: pObj - Pointer to the shared memory dataset result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_MS_getData( TSYNC_BoardHandle hnd, MS_DI_INDEX index, TSYNC_SharedMemoryObj *pObj); * Function: TSYNC_MS_setData() * Description: Set a shared memory data set item. * Parameters: - Board handle index...
Page 185
* Function: TSYNC_GO_getEnable() * Description: Get the GPO's enable state. * Parameters: - Board handle - GPO index OUT: bEnable - The output enable result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GO_getEnable( TSYNC_BoardHandle hnd, OD_PIN gpo, *bEnable); * Function: TSYNC_GO_setEnable() * Description: Set the GPO's enable state.
Page 186
DLL_EXPORT TSYNC_ERROR TSYNC_GO_getMode( TSYNC_BoardHandle hnd, OD_PIN gpo, OD_MODE *mode); * Function: TSYNC_GO_setMode() * Description: Set the GPO's mode state. * Parameters: - Board handle - GPO index mode - The mode information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GO_setMode( TSYNC_BoardHandle hnd, OD_PIN gpo, OD_MODE...
Page 187
- GPO index - Low or High Match Time OUT: bEnable - Match enable * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GO_getMatchEnable( TSYNC_BoardHandle hnd, OD_PIN gpo, LEVEL lvl, *bEnable); * Function: TSYNC_GO_setMatchEnable() * Description: Set the GPO's match enable state. * Parameters: - Board handle - GPO index - Low or High Match Time...
Page 188
pObj - Pointer to the configuration information * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GO_setSquareWave( TSYNC_BoardHandle hnd, OD_PIN gpo, TSYNC_GPOSquareObj *pObj); * Function: TSYNC_GO_getSWOffset() * Description: Get the GPO's square wave offset. Offset is in nanoseconds. * Parameters: - Board handle - GPO index - Pointer to the square wave offset * Returns: (TSYNC_SUCCESS) Success...
Page 189
* Function: TSYNC_GO_setSWPeriod() * Description: Set the GPO's square wave period. Period is in nanoseconds or microseconds depending on scale bit (msb). Period is from 100 nsec to 20 sec in nanosecond scale, and from 100 usec to 20,000 sec in microsecond scale. * Parameters: - Board handle - GPO index...
Page 190
edge - Pointer to the square wave active edge * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GO_getSWEdge( TSYNC_BoardHandle hnd, OD_PIN gpo, EDGE *edge); * Function: TSYNC_GO_setSWEdge() * Description: Set the GPO's square wave active edge. * Parameters: - Board handle - GPO index edge - Square wave active edge * Returns: (TSYNC_SUCCESS) Success...
Page 191
DLL_EXPORT TSYNC_ERROR TSYNC_GO_setSWPerCorr( TSYNC_BoardHandle hnd, OD_PIN gpo, unsigned int num, unsigned int den); * Function: TSYNC_GO_getSWAlignCnt() * Description: Get the GPO's square wave alignment count. * Parameters: - Board handle - GPO index - Pointer to the square wave alignment count * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GO_getSWAlignCnt(...
Page 192
alignment enable changes the function of the alignment counter to align the square wave whenever the current time's seconds value is a multiple of the alignment count. * Parameters: - Board handle - GPO index bEnable - Square wave time alignment enable * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GO_setSWTmAlgnEn(...
Page 193
TSYNC_BoardHandle hnd, OD_PIN gpo, unsigned int *pw); * Function: TSYNC_GO_setSWOtpPW() * Description: Get the GPO's square wave OTP pulse width. Pulse width is in nanoseconds from 20 nsec to 900,000,000 nsec. * Parameters: - Board handle - GPO index - Square wave pulse width * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GO_setSWOtpPW(...
Page 194
DLL_EXPORT TSYNC_ERROR TSYNC_GPR_setClockIdentity( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_GplClockId *pObj); * Function: TSYNC_GPR_getPriority() * Description: Gets the Priority of the given module * Parameters: - Board handle OUT: pObj - pointer to the Priority structure * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getPriority( TSYNC_BoardHandle hnd, unsigned int...
Page 195
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_setDomain( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int *pVal); * Function: TSYNC_GPR_getClockMode() * Description: Gets the Clock Mode of the given module * Parameters: - Board handle OUT: pVal - pointer to the Clock Mode value * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getClockMode(...
Page 196
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_setClockSteps( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int *pVal); * Function: TSYNC_GPR_getClockPorts() * Description: Gets the number of clock Ports in the module. * Parameters: - Board handle OUT: pVal - pointer to the Clock Ports value * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getClockPorts(...
Page 197
OUT: pObj - pointer to the Parent Data structure * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getParentData( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_GplParentData *pObj); * Function: TSYNC_GPR_getTimeProp() * Description: Gets the Time Properties structure. * Parameters: - Board handle OUT: pObj - pointer to the Time Properties structure * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT...
Page 198
* Parameters: - Board handle OUT: pObj - pointer to the Unicast Master Add structure * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getUnctMasterAdd( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_GplUnctMasterAdd *pObj); * Function: TSYNC_GPR_setUnctMasterAdd() * Description: Sets the current Unicast Master. * Parameters: - Board handle OUT: pObj - pointer to the Unicast Master Add structure...
Page 199
* Function: TSYNC_GPR_getUnctMasterProp() * Description: Gets properties when acting as a Unicast Master. * Parameters: - Board handle OUT: pObj - pointer to the Unicast Master Prop structure * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getUnctMasterProp( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_GplUnctMasterProp *pObj);...
Page 200
unsigned int nInstance, unsigned int *pVal); * Function: TSYNC_GPR_getMsgRates() * Description: Gets message rates. * Parameters: - Board handle OUT: pObj - pointer to the Message Rates structure * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getMsgRates( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_GplMsgRates *pObj);...
Page 201
DLL_EXPORT TSYNC_ERROR TSYNC_GPR_setMsgTo( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_GplMsgTo *pObj); * Function: TSYNC_GPR_getDelayMech() * Description: Gets the Delay Mechanism. * Parameters: - Board handle OUT: pVal - pointer to the Delay Mechanism value * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getDelayMech( TSYNC_BoardHandle hnd, unsigned int...
Page 202
* Parameters: - Board handle OUT: pVal - pointer to the Port State value * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_setBcastMech( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_GplBcastMech *pObj); * Function: TSYNC_GPR_getStaticIPV4() * Description: Gets Static IP Configurations. * Parameters: - Board handle OUT: pObj - pointer to the IPV4 structure * Returns: (TSYNC_SUCCESS) Success...
Page 203
* Description: Gets the DHCP Enable value. * Parameters: - Board handle OUT: pVal - pointer to the DHCP Enable value * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getDHCPEn( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int *pVal); * Function: TSYNC_GPR_setDHCPEn() * Description: Sets the DHCP Enable value * Parameters: - Board handle OUT: pVal...
Page 204
* Function: TSYNC_GPR_getTTL() * Description: Gets the TTL value. * Parameters: - Board handle OUT: pVal - pointer to the TTL value * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getTTL( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int *pVal); * Function: TSYNC_GPR_setTTL() * Description: Sets the TTL value * Parameters: - Board handle...
Page 205
DLL_EXPORT TSYNC_ERROR TSYNC_GPR_setEthTrans( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int *pVal); * Function: TSYNC_GPR_getSyncEth() * Description: Gets the Sync-E Configuration. * Parameters: - Board handle OUT: pObj - pointer to the Sync-E structure * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getSyncEth( TSYNC_BoardHandle hnd, unsigned int...
Page 206
* Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_setVLAN( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_GplVlan *pObj); * Function: TSYNC_GPR_getClassCfg() * Description: Gets the Clock Class configuration. * Parameters: - Board handle OUT: pVal - pointer to the ClassCfg Value * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getClassCfg( TSYNC_BoardHandle hnd,...
Page 207
- Board handle OUT: pObj - pointer to the Control structure * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getControl( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_GplControl *pObj); * Function: TSYNC_GPR_setControl() * Description: Sets the Control information of the given module * Parameters: - Board handle pObj - pointer to the Control structure...
Page 208
* Parameters: - Board handle OUT: pObj - pointer to the Slave Stats structure * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_getSlaveStats( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_GplSlaveStats *pObj); * Function: TSYNC_GPR_setSlaveStats() * Description: Sets the Slave number to get Stats for. Must use GP_getSummary first.
Page 209
unsigned int *pVal); * Function: TSYNC_GPR_setDebug() * Description: Sets the Debug information of the given module * Parameters: - Board handle pVal - pointer to Debug value * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_GPR_setDebug( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int *pVal);...
Page 210
OUT: pObj - Pointer to the time result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_HW_getTime( TSYNC_BoardHandle handle, TSYNC_HWTimeObj *pObj); * Function: TSYNC_HW_getTimeSec() * Description: Get the current system time from the hardware in seconds format. * Parameters: - Board handle OUT: pObj - Pointer to the time result * Returns: (TSYNC_SUCCESS) Success...
Page 211
DLL_EXPORT TSYNC_ERROR TSYNC_HW_setTsReq( TSYNC_BoardHandle handle); * Function: TSYNC_HW_setTsClear() * Description: Clear all collected timestamps from the specified source. * Parameters: - Board handle source - Timestamp source * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_HW_setTsClear( TSYNC_BoardHandle handle, TMSTMP_SRC source); * Function: TSYNC_HW_getTsCount() * Description: Get the number of collected timestamps for the specified source.
Page 212
OUT: pObj - Pointer to the time result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_HW_getMatchTimeHi( TSYNC_BoardHandle handle, OD_PIN index, TSYNC_TimeObj *pObj); * Function: TSYNC_HW_setMatchTimeHi() * Description: Set the match time value when the specified general purpose output will transition to an active high state. * Parameters: - Board handle index...
Page 213
* Function: TSYNC_HW_getFpgaInfo() * Description: Get the the FPGA ID and version information. * Parameters: - Board handle OUT: id - The ID result - The version result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_HW_getFpgaInfo( TSYNC_BoardHandle handle, unsigned short *id, unsigned short *rev);...
Page 214
OUT: pObj - Pointer to the time result * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_HW_getTsSingle( TSYNC_BoardHandle handle, TMSTMP_SRC source, TSYNC_HWTimeObj *pObj); * Function: TSYNC_HW_getIntCnt() * Description: Get the interrupt counter * Parameters: - Board handle intType - The interrupt type information index - The interrupt index information OUT: nIntCount...
Page 215
Module: tsync_nonkts.h Date: 09/17/09 Purpose: This is the TSYNC/TSAT PCI Card interface file for haedware features that are not part of the KTS. This file should *only* be included from tsync.h. ** (C) Copyright 2009 Spectracom Corporation All rights reserved.
Page 216
* Parameters: handle - Board handle OUT: pTemp - Pointer to contents of temperature * Returns: (TSYNC_SUCCESS) Success DLL_EXPORT TSYNC_ERROR TSYNC_HW_getTemperature( TSYNC_BoardHandle handle, unsigned short *pTemp); /*** End of non-kts entry area [DO NOT MOVE OR ALTER THIS LINE] ***/ #endif /* _defined_TSYNC_NONKTS_H */ 4.1.3 Tsync_hw.h...
Page 217
HW_TMSTMP_CNT = 0x0203, HW_TMSTMP_DATA = 0x0204, HW_TMSTMP_SINGLE = 0x0205, HW_GPO_MTCH_HI = 0x0300, HW_GPO_MTCH_LO = 0x0301, HW_FPGA_ID = 0x0400, HW_INT_MASK = 0x0401, HW_INT_CNT = 0x0402, HW_INT_CNT_CLR = 0x0403, HW_INT_TS = 0x0404, HW_KTS_TEMPERATURE = 0x1100, } HW_ITEM; typedef union FW_ITEM fid; // cai/iid pair as described in // each HIDD defined transaction HW_ITEM hid;...
Page 219
4.2.1 TSYNC_open TSYNC_ERROR TSYNC_open( TSYNC_BoardHandle *hnd, char *deviceName); Description: Open the TSYNC device. Input Parameters: *hnd: Handle *deviceName: Name of the device. Returns: (TSYNC_SUCCESS) Success 4.2.2 TSYNC_close TSYNC_ERROR TSYNC_close( TSYNC_BoardHandle hnd); Description: Close the TSYNC device. Input Parameters: *hw: Handle...
Page 220
inPayload: transaction specific payload inLength: number of bytes in inPayload maxOutLength: number bytes allowed in outPayload Output Parameters: outPayload: passed back transaction specific data actualOutLength: the actual number of bytes passed back in outPayload Returns: (TSYNC_SUCCESS) Success 4.2.4 TSYNC_set TSYNC_ERROR TSYNC_set( TSYNC_BoardHandle handle, DEST_ID...
Page 221
4.2.7 API Calls Supported by TSync The TSync driver contains API calls for other Spectracom products. Table 4.1 documents the sections of the API that are supported in the TSync product. All other API calls are unsupported.
Page 222
GPS Reference Execute the GPS receiver’s protocol and determine Component 1PPS and time validity. Host Agent Obtain the capabilities of the TSync. Uses information from the host PC to determine Host Reference 4.2.15 1PPS and time validity. Provide access to the direct HW accessible Hardware control/status of the timing subsystem.
Page 223
Analyze frequency measurements and make Oscillator Component corrective adjustments to the timing system 4.2.27 oscillator. Measure and provide the accuracy and stability of Oscillator Monitor Service the timing system oscillator. Table 4-1: Available API Calls NOTE: All of the “typedef Enumerators” (variables used in the API calls to define parameters) can be found in the Header files located in sections 4.1.1 and 4.1.3 of this document.
Page 224
Returns: (TSYNC_SUCCESS) Success Note: Entered as: CS_setTime 0 1 <year> <DOY> <Hour> <Minutes> <Seconds> Time Scales: Note: Where <scale> 0= UTC 1= TAI 2= GPS 3= Local 4.2.8.3 TSYNC_CS_getTimeScale TSYNC_CS_getTimeScale( TSYNC_BoardHandle hnd, TSYNC_TimeScaleObj *pObj); Description: Get the board's current time scale. Input Parameters: hnd: Board handle Output Parameters:...
Page 225
Description: Get the specified time scale's offset from UTC. Offset is in seconds. Input Parameters: hnd: Board handle Output Parameters: pObj: Pointer to the time scale offset result Returns: (TSYNC_SUCCESS) Success 4.2.8.6 TSYNC_CS_setTimeScaleOff TSYNC_CS_setTimeScaleOff( TSYNC_BoardHandle hnd, TSYNC_TimeScaleOffsetObj *pObj); Description: Set the specified time scale’s offset from UTC. Offset is in seconds. Input Parameters: hnd: Board handle pObj: Pointer to the time scale offset information...
Page 226
4.2.8.9 TSYNC_CS_setTimeDiscont This API call has been deprecated. 4.2.8.10 TSYNC_CS_getLeapSec TSYNC_ERROR TSYNC_CS_getLeapSec( TSYNC_BoardHandle hnd, TSYNC_TimeLeapSecondObj *pObj); Description: Get the current leap second information. Offset is in seconds. Input Parameters: hnd: Board handle pObj: Pointer to the leap seconds result Returns: (TSYNC_SUCCESS) Success 4.2.8.11 TSYNC_CS_setLeapSec TSYNC_ERROR TSYNC_CS_setLeapSec(...
Page 227
4.2.8.13 TSYNC_CS_getTimeZoneOff TSYNC_ERROR TSYNC_CS_getTimeZoneOff( TSYNC_BoardHandle hnd, TSYNC_TimeZoneOffsetObj *pObj); Description: Get the current time zone offset from UTC. Offset is in seconds. Input Parameters: hnd: Board handle Output Parameters: pObj: Pointer to the time zone offset result Returns: (TSYNC_SUCCESS) Success 4.2.8.14 TSYNC_CS_setTimeZoneOff TSYNC_ERROR TSYNC_CS_setTimeZoneOff( TSYNC_BoardHandle hnd,...
Page 228
4.2.8.16 TSYNC_CS_setDstRule TSYNC_ERROR TSYNC_CS_setDstRule( TSYNC_BoardHandle hnd, TSYNC_TimeDSTRuleObj *pObj); Description: Set the DST rule. DST offset is in seconds. Input Parameters: hnd: Board handle pObj: Pointer to the time zone offset rule information Returns: (TSYNC_SUCCESS) Success 4.2.8.17 TSYNC_CS_getYear TSYNC_ERROR TSYNC_CS_getYear( TSYNC_BoardHandle hnd, TSYNC_TimeYearObj *pObj);...
Page 229
4.2.8.19 TSYNC_CS_getDstState TSYNC_ERROR TSYNC_CS_getDstState( TSYNC_BoardHandle hnd, TSYNC_TimeDSTStateObj *pObj); Description: Get the current DST state. Input Parameters: hnd: Board handle pObj: Pointer to the DST state information Returns: (TSYNC_SUCCESS) Success 4.2.8.20 TSYNC_CS_setDstState TSYNC_ERROR TSYNC_CS_setDstState( TSYNC_BoardHandle hnd, TSYNC_TimeDSTStateObj *pObj); Description: Set the DST state. Input Parameters: hnd: Board handle pObj: Pointer to the DST state information...
Page 230
4.2.8.22 TSYNC_CS_setTimeSec TSYNC_ERROR TSYNC_CS_setTimeSec( TSYNC_BoardHandle hnd, unsigned int nSeconds, unsigned int nNanos); Description: Set the time in seconds and nanoseconds format. Input Parameters: hnd: Board handle nSeconds: The seconds information nNanos: The nanoseconds information Returns: (TSYNC_SUCCESS) Success 4.2.8.23 TSYNC_CS_getTimeBcd TSYNC_ERROR TSYNC_CS_getTimeBcd( TSYNC_BoardHandle hnd, TSYNC_TimeBCDObj...
Page 231
3= LED blinks a code (2 Hz rate with a 2 second pause) Display Mode: 0= Display Sync Status 1= Display Holdover Status 2= Display Alarm Status 3= Blink on 1PPS 3= Manual Control TSync Defaults: Green LED: Sync Starus Yellow LED: Holdover Status Red LED: Alarm Status 4.2.8.26 TSYNC_EC_getMode TSYNC_ERROR TSYNC_EC_getMode(...
Page 232
Description: Set the LED usage mode state. Input Parameters: hnd: Board handle index: The LED index mode: The usage mode Returns: (TSYNC_SUCCESS) Success 4.2.8.28 TSYNC_EC_getState TSYNC_ERROR TSYNC_EC_getState( TSYNC_BoardHandle hnd, LE_INDEX index, EC_STATE *state); Description: Get the LED display state. Input Parameters: hnd: Board handle index: The LED index Output Parameters:...
Page 233
4.2.9 Frequency Output (FP) Calls FP calls configure the 10 MHz output. 4.2.9.1 TSYNC_FP_getSigCtrl TSYNC_ERROR TSYNC_FP_getSigCtrl( TSYNC_BoardHandle hnd, IO_PORT nInstance, SIG_CTL *sig); Description: Get the Fixed Frequency output’s signature control state. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: sig: The signature control result Returns:...
Page 234
Get the Fixed Frequency output’s frequency. Frequency is in Hertz. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: freq: The frequency result Returns: (TSYNC_SUCCESS) Success 4.2.9.4 TSYNC_FP_getNumInst TSYNC_ERROR TSYNC_FP_getNumInst( TSYNC_BoardHandle hnd, unsigned int *nInstances); Description: Get number of fixed-freq output instances present in the system. Input Parameters: hnd: Board handle Output Parameters:...
Page 235
4.2.10.2 TSYNC_FS_calcCrc TSYNC_ERROR TSYNC_FS_calcCrc( TSYNC_BoardHandle hnd, TSYNC_FSImageObj *pObj, TSYNC_FSCRCObj *pObj2); Description: Calculate the CRC for a particular flash image. Input Parameters: hnd: Board handle pObj: Pointer to the image information Output Parameters: pObj2: Pointer to the crc result Returns: (TSYNC_SUCCESS) Success 4.2.10.3 TSYNC_FS_getHeader TSYNC_ERROR TSYNC_FS_getHeader( TSYNC_BoardHandle...
Page 236
Output Parameters: pObj2: Pointer to the image version result Returns: (TSYNC_SUCCESS) Success 4.2.11 General Purpose Input (GI) Calls GI calls configure and monitor the general purpose input (GPI) pins. Note: Where <edge> 0= Falling edge 1= Rising edge 2= both (uncommon) Where <valid>...
Page 237
Description: Get the GPI’s trigger edge used when detecting input changes. Input Parameters: hnd: Board handle index: The input index Output Parameters: edge: The edge result Returns: (TSYNC_SUCCESS) Success 4.2.11.3 TSYNC_GI_setEdge TSYNC_ERROR TSYNC_GI_setEdge( TSYNC_BoardHandle hnd, ID_PIN index, EDGE edge); Description: Set the GPI’s trigger edge used when detecting input changes.
Page 238
ID_PIN index, bEnable); Description: Set the GPI’s timestamp enable state used when time stamping input changes. Input Parameters: hnd: Board handle index: The input index bEnable: The enabled information Returns: (TSYNC_SUCCESS) Success 4.2.11.6 TSYNC_GI_getNumInst TSYNC_ERROR TSYNC_GI_getNumInst( TSYNC_BoardHandle hnd, unsigned int *nInstances);...
Page 239
4.2.12.1 TSYNC_GO_setSigCtrl TSYNC_ERROR TSYNC_GO_getSigCtrl( TSYNC_BoardHandle hnd, OD_PIN gpo, SIG_CTL *sig); Description: Get the GPO’s signature control state. Input Parameters: hnd: Board handle gpo: GPO index Output Parameters: sig: The signature control result Returns: (TSYNC_SUCCESS) Success 4.2.12.2 TSYNC_GO_setSigCtrl TSYNC_ERROR TSYNC_GO_setSigCtrl( TSYNC_BoardHandle hnd, OD_PIN gpo, SIG_CTL...
Page 240
Returns: (TSYNC_SUCCESS) Success 4.2.12.4 TSYNC_GO_setEnable TSYNC_ERROR TSYNC_GO_setEnable( TSYNC_BoardHandle hnd, OD_PIN gpo, bEnable); Description: Set the GPO’s enable state. Input Parameters: hnd: Board handle gpo: GPO index bEnable: The output enable information Returns: (TSYNC_SUCCESS) Success 4.2.12.5 TSYNC_GO_getValue TSYNC_ERROR TSYNC_GO_getValue( TSYNC_BoardHandle hnd, OD_PIN gpo, *bValue);...
Page 241
hnd: Board handle gpo: GPO index Output Parameters: mode: The mode result Returns: (TSYNC_SUCCESS) Success 4.2.12.7 TSYNC_GO_setMode TSYNC_ERROR TSYNC_GO_setMode( TSYNC_BoardHandle hnd, OD_PIN gpo, OD_MODE mode); Description: Set the GPO’s mode state. Input Parameters: hnd: Board handle gpo: GPO index mode: The mode information Returns: (TSYNC_SUCCESS) Success 4.2.12.8 TSYNC_GO_getDvmValue...
Page 242
4.2.12.9 TSYNC_GO_setDvmValue TSYNC_ERROR TSYNC_GO_setDvmValue( TSYNC_BoardHandle hnd, OD_PIN gpo, bValue); Description: Set the GPO’s Direct Value Mode (DVM) value state. Input Parameters: hnd: Board handle gpo: GPO index bValue: The DVM information Returns: (TSYNC_SUCCESS) Success 4.2.12.10 TSYNC_GO_getMatchEnable TSYNC_ERROR TSYNC_GO_getMatchEnable( TSYNC_BoardHandle hnd, OD_PIN gpo, LEVEL...
Page 243
gpo: GPO index lvl: Low orHigh Match Time bEnable: Match enable Returns: (TSYNC_SUCCESS) Success 4.2.12.12 TSYNC_GO_getSquareWave TSYNC_ERROR TSYNC_GO_getSquareWave( TSYNC_BoardHandle hnd, OD_PIN gpo, TSYNC_GPOSquareObj *pObj); Description: Get the GPO’s square wave output configuration structure. Offset, period, and duty cycle are in nanoseconds. Input Parameters: hnd: Board handle gpo: GPO index...
Page 244
OD_PIN gpo, unsigned int *pw); Description: Get the GPO's square wave OTP pulse width. Pulse width is in nanoseconds. Input Parameters: hnd: Board handle gpo: GPO index pw: Pointer to the square wave pulse width Returns: (TSYNC_SUCCESS) Success 4.2.12.15 TSYNC_GO_setSWOtpPW TSYNC_ERROR TSYNC_GO_setSWOtpPW( TSYNC_BoardHandle hnd, OD_PIN...
Page 245
4.2.13 GPS Reference Component (GR) Calls GR calls execute the GPS receiver’s protocol and determine 1PPS and time validity. Note: Where <setmode> 0= Single satellite mode 1= Standard mode 2= Continuous mode 3= Averaging mode 4= Timing mode 5= Standby mode 6= Self mode Where <dyn>...
Page 246
Set the GPS reference’s 1PPS input offset. Offset is in nanoseconds from -500 msec to +500 msec. Input Parameters: hnd: Board handle nInstance: The instance number nOffset: The offset information Returns: (TSYNC_SUCCESS) Success 4.2.13.3 TSYNC_GR_getValidity TSYNC_ERROR TSYNC_GR_getValidity( TSYNC_BoardHandle hnd, unsigned int nInstance, *bTimeValid, *bPpsValid);...
Page 247
4.2.13.5 TSYNC_GR_setPosition TSYNC_ERROR TSYNC_GR_setPosition( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_LLAObj *pObj); Description: Set the GPS position. Latitude and longitude are in radians. Altitude is in meters. Input Parameters: hnd: Board handle nInstance: The instance number pObj: Pointer to the position information Returns: (TSYNC_SUCCESS) Success 4.2.13.6 TSYNC_GR_getMode...
Page 248
4.2.13.7 TSYNC_GR_setMode TSYNC_ERROR TSYNC_GR_setMode( TSYNC_BoardHandle hnd, unsigned int nInstance, GL_MODE mode GL_DYN *dyn); Description: Set the GPS receiver mode. Input Parameters: hnd: Board handle nInstance: The instance number mode: The receiver mode information dyn : The receiver dynamics information Returns: (TSYNC_SUCCESS) Success 4.2.13.8 TSYNC_GR_getDynamics This API call is deprecated (use...
Page 249
4.2.13.11 TSYNC_GR_getSatData TSYNC_ERROR TSYNC_GR_getSatData( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_SatDataObj *pObj); Description: Get the GPS satellite data. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: pObj: Pointer to the satellite data result Returns: (TSYNC_SUCCESS) Success 4.2.13.12 TSYNC_GR_getSurveyProg TSYNC_ERROR TSYNC_GR_getSurveyProg( TSYNC_BoardHandle hnd,...
Page 250
pObj: Pointer to the manufacturer and model result Returns: (TSYNC_SUCCESS) Success 4.2.13.14 TSYNC_GR_getRcvInfo TSYNC_ERROR TSYNC_GR_getRcvInfo( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_ReceiverInfoObj *pObj); Description: Get the GPS receiver info. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: pObj: Pointer to the receiver info result Returns: (TSYNC_SUCCESS) Success 4.2.13.15...
Page 251
4.2.13.16 TSYNC_GR_setCustom TSYNC_ERROR TSYNC_GR_setCustom( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_CustomMessageObj *pObj); Description: Send a custom message to the GPS. Input Parameters: hnd: Board handle nInstance: The instance number pObj: Pointer to the custom message result Returns: (TSYNC_SUCCESS) Success 4.2.13.17 TSYNC_GR_getNumInst TSYNC_ERROR TSYNC_GR_getNumInst( TSYNC_BoardHandle hnd,...
Page 252
4.2.13.19 TSYNC_GR_getRefId TSYNC_ERROR TSYNC_GR_getRefId( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_RefIdObj *pObj); Description: Get reference identifier for a GPS reference instance. Input Parameters: hnd: Board handle Output Parameters: pObj: pointer to the Reference ID Returns: (TSYNC_SUCCESS) Success 4.2.13.20 TSYNC_GR_Reset TSYNC_ERROR TSYNC_GR_delPos( TSYNC_BoardHandle hnd, GL_RESET reset);...
Page 253
4.2.13.22 TSYNC_GR_getConstSel TSYNC_ERROR TSYNC_GR_getConstSel( TSYNC_BoardHandle hnd, unsigned int nInstance, unsigned int *constellation); Description: Get the GPS Constellation selection. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: *constellation: Pointer to the Constellation selection information Returns: (TSYNC_SUCCESS) Success 4.2.13.23 TSYNC_GR_setConstSel TSYNC_ERROR TSYNC_GR_setConstSel( TSYNC_BoardHandle...
Page 254
4.2.14 Host Agent (HA) Calls HA calls are used to obtain the capabilities of TSync boards. 4.2.14.1 TSYNC_HA_GetCaps TSYNC_ERROR TSYNC_HA_getCaps( TSYNC_BoardHandle hnd, unsigned int pageNum, TSYNC_CapabilityPageObj *pObj); Description: Gets a single page of capability results. Input Parameters: hnd: Board handle...
Page 255
4.2.15.2 TSYNC_HR_setValidity TSYNC_ERROR TSYNC_HR_setValidity( TSYNC_BoardHandle hnd, unsigned int nInstance, bTimeValid); Description: Set the reference validity of the Host. Input Parameters: hnd: Board handle nInstance: the Instance Number bTimeValid: The time reference information Returns: (TSYNC_SUCCESS) Success 4.2.15.3 TSYNC_HR_setTime TSYNC_ERROR TSYNC_HR_setTime( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_TimeObj...
Page 256
Returns: (TSYNC_SUCCESS) Success 4.2.15.5 TSYNC_HR_setLocal TSYNC_ERROR TSYNC_HR_setLocal( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_LocalClockObj *pObj); Description: Set the Host reference's local time zone and DST rule. Timezone and DST offsets are in seconds. Input Parameters: hnd: Board handle nInstance: the Instance Number pObj: the Local Clock information Returns: (TSYNC_SUCCESS) Success...
Page 257
Get the Host reference's time scale. Input Parameters: hnd: Board handle nInstance: the Instance Number pObj: The Time Scale information Returns: (TSYNC_SUCCESS) Success 4.2.15.8 TSYNC_HR_getRefID TSYNC_ERROR TSYNC_HR_getValidity( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_RefIdObj *pObj); Description: Get reference identifier for a Host reference instance. Input Parameters: hnd: Board handle nInstance: the Instance Number...
Page 258
4.2.16 Hardware (HW) Calls HW calls provide access to the direct hardware accessible control/status of the timing subsystem (time stamping and time reads, controlling interrupts, match time, etc). Note: Where <en > 0=Not enabled 1=Enabled 4.2.16.1 TSYNC_HW_getTime TSYNC_ERROR TSYNC_HW_getTime( TSYNC_BoardHandle handle, TSYNC_HWTimeObj *pObj);...
Page 259
Get the current enable/disable state of timestamps. Input Parameters: hnd: Board handle Output Parameters: bEnable: The enable result Returns: (TSYNC_SUCCESS) Success 4.2.16.4 TSYNC_HW_setTsEnable TSYNC_ERROR TSYNC_HW_setTsEnable( TSYNC_BoardHandle handle, bEnable); Description: Set the current enable/disable state of timestamps. Input Parameters: hnd: Board handle bEnable: The enable information Returns: (TSYNC_SUCCESS) Success...
Page 260
(TSYNC_SUCCESS) Success 4.2.16.7 TSYNC_HW_getTsCount TSYNC_ERROR TSYNC_HW_getTsCount( TSYNC_BoardHandle handle, TMSTMP_SRC source, unsigned int *nCount); Description: Get the number of collected timestamps for the specified source. Input Parameters: hnd: Board handle source: The timestamp source information Output Parameters: nCount: The count result Returns: (TSYNC_SUCCESS) Success 4.2.16.8 TSYNC_HW_getTsData...
Page 261
4.2.16.9 TSYNC_HW_getMatchTimeHi TSYNC_ERROR TSYNC_HW_getMatchTimeHi( TSYNC_BoardHandle handle, OD_PIN index, TSYNC_TimeObj *pObj); Description: Get the match time value when the specified general purpose output will transition to an active high state. Input Parameters: hnd: Board handle index: GPO index information Output Parameters: pObj: Pointer to the time result Returns: (TSYNC_SUCCESS) Success...
Page 262
4.2.16.11 TSYNC_HW_getMatchTimeLo TSYNC_ERROR TSYNC_HW_getMatchTimeLo( TSYNC_BoardHandle handle, OD_PIN index, TSYNC_TimeObj *pObj); Description: Get the match time value when the specified general purpose output will transition to an active low state. Input Parameters: hnd: Board handle index: GPO index information Output Parameters: pObj: Pointer to the time result Returns: (TSYNC_SUCCESS) Success...
Page 263
id: The ID result rev: The version result Returns: (TSYNC_SUCCESS) Success 4.2.16.14 TSYNC_HW_getIntMask TSYNC_ERROR TSYNC_HW_getIntMask( TSYNC_BoardHandle handle, INT_TYPE intType, unsigned int index, *bEnable); Description: Get the hardware interrupt masking enabled state Input Parameters: hnd: Board handle intType: the interrupt type information (GPI/GPO are indexed) index: the index of the interrupt (0 for non-indexed interrupts) Output Parameters: bEnable: The enable result...
Page 264
TMSTMP_SRC source, TSYNC_HWTimeObj *pObj); Description: Get a single collected timestamp for a given source Input Parameters: hnd: Board handle source: The timestamp source information Output Parameters: pObj: Pointer to the time result Returns: (TSYNC_SUCCESS) Success 4.2.16.17 TSYNC_HW_getIntCnt TSYNC_ERROR TSYNC_HW_getIntCnt( TSYNC_BoardHandle handle, INT_TYPE intType,...
Page 265
Returns: (TSYNC_SUCCESS) Success 4.2.16.19 TSYNC_HW_getIntTs TSYNC_ERROR TSYNC_HW_getIntTs( TSYNC_BoardHandle handle, INT_TYPE intType, unsigned int index, TSYNC_TimeSecondsObj *pObj); Description: Get the interrupt timestamp Input Parameters: hnd: Board handle intType: The interrupt type information index: The interrupt index information Output Parameters: pObj: Pointer to the interrupt timestamp result Returns: (TSYNC_SUCCESS) Success 4.2.16.20...
Page 266
0= All bits of the Control Field section are ignored. 1= Control Field conforms to RCC 200-04 2= Control Field conforms to IEEEE C37.118-2005 3= Control Field conforms to Spectracom format (i.e. NetClock) 4= Control Field conforms to NASA formats...
Page 267
Where <mode> 0= IRIG DCLS only 1= IRIG AM only 2= IRIG Manchester coding 3= Unknown 4= Port supports both AM and DCLS Where <mod> 0= No carrier 1= 100 Hz 2= 1 kHz 3= 10 kHz 4= 100 kHz 5= 1 MHz 6= Unknown frequency 4.2.18.1 TSYNC_IP_getSigCtrl...
Page 268
4.2.18.2 TSYNC_IP_setSigCtrl TSYNC_ERROR TSYNC_IP_setSigCtrl( TSYNC_BoardHandle hnd, IO_PORT nInstance, SIG_CTL sig); Description: Set the IRIG output’s signature control state. Input Parameters: hnd: Board handle nInstance: The instance number sig: The signature control information Returns: (TSYNC_SUCCESS) Success 4.2.18.3 TSYNC_IP_getOffset TSYNC_ERROR TSYNC_IP_getOffset( TSYNC_BoardHandle hnd, IO_PORT nInstance,...
Page 269
Returns: (TSYNC_SUCCESS) Success 4.2.18.5 TSYNC_IP_getLocal TSYNC_ERROR TSYNC_IP_getLocal( TSYNC_BoardHandle hnd, IO_PORT nInstance, TSYNC_LocalClockObj *pObj); Description: Get the IRIG reference’s local time zone and DST rule. Timezone and DST offsets are in seconds. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: pObj: Pointer to the Local Clock result Returns:...
Page 270
Description: Get the IRIG format. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: format: The format result Returns: (TSYNC_SUCCESS) Success 4.2.18.8 TSYNC_IP_setFormat TSYNC_ERROR TSYNC_IP_setFormat( TSYNC_BoardHandle hnd, IO_PORT nInstance, IL_FMT format); Description: Set the IRIG format. Input Parameters: hnd: Board handle nInstance: The instance number format: The format information...
Page 271
4.2.18.10 TSYNC_IP_setAmplitude TSYNC_ERROR TSYNC_IP_setAmplitude( TSYNC_BoardHandle hnd, IO_PORT nInstance, unsigned int amp); Description: Set the IRIG amplitude. Amplitude is in range of 3 - 255. Input Parameters: hnd: Board handle nInstance: The instance number amp: The amplitude information Returns: (TSYNC_SUCCESS) Success 4.2.18.11 TSYNC_IP_getMod TSYNC_ERROR TSYNC_IP_getMod(...
Page 272
Returns: (TSYNC_SUCCESS) Success 4.2.18.13 TSYNC_IP_setFreq TSYNC_ERROR TSYNC_IP_setFreq( TSYNC_BoardHandle hnd, IO_PORT nInstance, IL_FRQ freq); Description: Set the IRIG frequency. Input Parameters: hnd: Board handle nInstance: The instance number freq: The frequency information Returns: (TSYNC_SUCCESS) Success 4.2.18.14 TSYNC_IP_getCodedExpr TSYNC_ERROR TSYNC_IP_getCodedExpr( TSYNC_BoardHandle hnd, IO_PORT nInstance, IL_CE...
Page 273
Input Parameters: hnd: Board handle nInstance: The instance number ce: The Coded Expression information Returns: (TSYNC_SUCCESS) Success 4.2.18.16 TSYNC_IP_getCtrlField TSYNC_ERROR TSYNC_IP_getCtrlField( TSYNC_BoardHandle hnd, IO_PORT nInstance, IL_CF *cf); Description: Get the IRIG Control Field. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: cf: The Control Field result Returns:...
Page 274
Description: Get the latest IRIG output message. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: pObj: Pointer to the message information Returns: (TSYNC_SUCCESS) Success 4.2.18.19 TSYNC_IP_setMessage TSYNC_ERROR TSYNC_IP_setMessage( TSYNC_BoardHandle hnd, IO_PORT nInstance, TSYNC_IRIGMessageObj *pObj); Description: Set the latest IRIG output message. Input Parameters: hnd: Board handle nInstance: The instance number...
Page 275
4.2.18.21 TSYNC_IP_setCfData TSYNC_ERROR TSYNC_IP_setCfData( TSYNC_BoardHandle hnd, IO_PORT nInstance, TSYNC_IRIGCfDataObj *pObj); Description: Set the IRIG control field data manually. Input Parameters: hnd: Board handle nInstance: The instance number pObj: Pointer to the control field information Returns: (TSYNC_SUCCESS) Success 4.2.18.22 TSYNC_IP_getNumInst TSYNC_ERROR TSYNC_IP_getNumInst( TSYNC_BoardHandle hnd, unsigned int...
Page 276
0= All bits of the Control Field section are ignored. 1= Control Field conforms to RCC 200-04 2= Control Field conforms to IEEEE C37.118-2005 3= Control Field conforms to Spectracom format (i.e. NetClock) 4= Control Field conforms to NASA formats Where <mod>...
Page 277
5= 1 MHz 6= Unknown frequency 4.2.19.1 TSYNC_IR_getOffset TSYNC_ERROR TSYNC_IR_getOffset( TSYNC_BoardHandle hnd, unsigned int nInstance, *nOffset); Description: Get the IRIG reference’s 1PPS input offset. Offset is in nanoseconds. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: nOffset: The offset information Returns: (TSYNC_SUCCESS) Success 4.2.19.2 TSYNC_IR_setOffset...
Page 278
Get the IRIG validity structure. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: bTimeValid: The time reference result bPpsValid: The pps reference result Returns: (TSYNC_SUCCESS) Success 4.2.19.4 TSYNC_IR_getMode TSYNC_ERROR TSYNC_IR_getMode( TSYNC_BoardHandle hnd, unsigned int nInstance, IL_MODE *mode); Description: Get the IRIG mode.
Page 279
4.2.19.6 TSYNC_IR_getFormat TSYNC_ERROR TSYNC_IR_getFormat( TSYNC_BoardHandle hnd, unsigned int nInstance, IL_FMT *format); Description: Get the IRIG format. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: format: The format result Returns: (TSYNC_SUCCESS) Success 4.2.19.7 TSYNC_IR_setFormat TSYNC_ERROR TSYNC_IR_setFormat( TSYNC_BoardHandle hnd, unsigned int nInstance, IL_FMT...
Page 280
Returns: (TSYNC_SUCCESS) Success 4.2.19.9 TSYNC_IR_getFreq TSYNC_ERROR TSYNC_IR_getFreq( TSYNC_BoardHandle hnd, unsigned int nInstance, IL_FRQ *freq); Description: Get the IRIG carrier frequency. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: freq: The frequency result Returns: (TSYNC_SUCCESS) Success 4.2.19.10 TSYNC_IR_setFreq TSYNC_ERROR TSYNC_IR_setFreq( TSYNC_BoardHandle hnd, unsigned int...
Page 281
Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: ce: The Coded Expression result Returns: (TSYNC_SUCCESS) Success 4.2.19.12 TSYNC_IR_setCodedExpr TSYNC_ERROR TSYNC_IR_setCodedExpr( TSYNC_BoardHandle hnd, unsigned int nInstance, IL_CE ce); Description: Set the IRIG Coded Expression. Input Parameters: hnd: Board handle nInstance: The instance number ce: The Coded Expression information Returns:...
Page 282
IL_CF cf); Description: Set the IRIG Control Field. Input Parameters: hnd: Board handle nInstance: The instance number cf: The Control Field information Returns: (TSYNC_SUCCESS) Success 4.2.19.15 TSYNC_IR_getMessage TSYNC_ERROR TSYNC_IR_getMessage( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_IRIGMessageObj *pObj); Description: Get the latest IRIG input message. Input Parameters: hnd: Board handle nInstance: The instance number...
Page 283
4.2.19.17 TSYNC_IR_getNumInst TSYNC_ERROR TSYNC_IR_getNumInst( TSYNC_BoardHandle hnd, unsigned int *nInstances); Description: Get number of IRIG references instances present in the system. Input Parameters: hnd: Board handle Output Parameters: nInstances: The number of instances result Returns: (TSYNC_SUCCESS) Success 4.2.19.18 TSYNC_IR_getCfData TSYNC_ERROR TSYNC_IR_getCfData( TSYNC_BoardHandle hnd, unsigned int...
Page 284
Returns: (TSYNC_SUCCESS) Success 4.2.19.20 TSYNC_IR_setLocal TSYNC_ERROR TSYNC_IR_setLocal( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_LocalClockObj *pObj); Description: Set the IRIG regerence’s local time zone and DST rule. Timezone and DST offsets are in seconds. Input Parameters: hnd: Board handle nInstance: The instance number pObj: Pointer to the Local Clock information Returns: (TSYNC_SUCCESS) Success...
Page 285
Input Parameters: hnd: Board handle nInstance: The instance number pObj: Pointer to the time scale information Returns: (TSYNC_SUCCESS) Success 4.2.19.23 TSYNC_IR_getRefId TSYNC_ERROR TSYNC_IR_getRefId( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_RefIdObj *pObj); Description: Get reference identifier for an IRIG reference instance. Input Parameters: hnd: Board handle nInstance: The instance number pObj: Pointer to the Reference ID...
Page 286
3= software alarm 4= software alarm 5= 1PPS not in sync 6= Reference change 4.2.20.2 TSYNC_LS_getAlarm TSYNC_ERROR TSYNC_LS_getAlarm( TSYNC_BoardHandle hnd, TSYNC_AlarmObj *pObj, TSYNC_FlagObj *pObj2); Description: Get the alarm state for the specified alarm. Input Parameters: hnd: Board handle pObj: Pointer to the alarm index information Output Parameters: pObj2: Pointer to the alarm flag result Returns:...
Page 287
hnd: Board handle Output Parameters: pObj: Pointer to the firmware version result Returns: (TSYNC_SUCCESS) Success 4.2.21 PPS Output Component (PP) Calls PP calls control a 1Hz output. Note: Where <edge> 0=Falling edge 1=Rising edge 2=both (uncommon) 4.2.21.1 TSYNC_PP_getSigCtrl TSYNC_ERROR TSYNC_PP_getSigCtrl( TSYNC_BoardHandle hnd, IO_PORT...
Page 288
4.2.21.3 TSYNC_PP_getFreq TSYNC_ERROR TSYNC_PP_getFreq( TSYNC_BoardHandle hnd, IO_PORT nInstance, unsigned int *freq); Description: Get the PPS output’s frequency. Frequency is 1 Hertz Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: freq: The frequency result Returns: (TSYNC_SUCCESS) Success 4.2.21.4 TSYNC_PP_getOffset TSYNC_ERROR TSYNC_PP_getOffset( TSYNC_BoardHandle hnd,...
Page 289
nInstance: The instance number nOffset: The offset information Returns: (TSYNC_SUCCESS) Success 4.2.21.6 TSYNC_PP_getEdge TSYNC_ERROR TSYNC_PP_getEdge( TSYNC_BoardHandle hnd, IO_PORT nInstance, EDGE *edge); Description: Get the PPS output’s edge. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: edge: The edge result Returns: (TSYNC_SUCCESS) Success 4.2.21.7 TSYNC_PP_setEdge...
Page 290
Description: Get the PPS output’s pulse width. Pulse width is in nanoseconds. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: pw: The pulse width result Returns: (TSYNC_SUCCESS) Success 4.2.21.9 TSYNC_PP_setPulseWidth TSYNC_ERROR TSYNC_PP_setPulseWidth( TSYNC_BoardHandle hnd, IO_PORT nInstance, unsigned int pw);...
Page 291
0= Falling edge 1= Rising edge 2= both (uncommon) Where <valid> 0= Not valid 1= Valid Where <pin> can be a value of “0” through “3” Where <index> should always be a value of “0” with only one board installed. 4.2.22.1 TSYNC_PR_getOffset TSYNC_ERROR TSYNC_PR_getOffset( TSYNC_BoardHandle...
Page 292
4.2.22.3 TSYNC_PR_getEdge TSYNC_ERROR TSYNC_PR_getEdge( TSYNC_BoardHandle hnd, unsigned int nInstance, EDGE *edge); Description: Get the 1PPS reference’s active edge setting. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: edge: The edge result Returns: (TSYNC_SUCCESS) Success 4.2.22.4 TSYNC_PR_setEdge TSYNC_ERROR TSYNC_PR_setEdge( TSYNC_BoardHandle hnd, unsigned int nInstance,...
Page 293
bTimeValid: The time reference result bPpsValid: The pps reference result Returns: (TSYNC_SUCCESS) Success 4.2.22.6 TSYNC_PR_getNumInst TSYNC_ERROR TSYNC_PR_getNumInst( TSYNC_BoardHandle hnd, unsigned int *nInstances); Description: Get number of PPS reference instances present in the system. Input Parameters: hnd: Board handle Output Parameters: nInstances: The number of instances result Returns: (TSYNC_SUCCESS) Success...
Page 294
(TSYNC_SUCCESS) Success NOTE: When enabling DHCP, the rest of the PTPEthernetItfObj structure still needs to be populated. This data will be retailed by the TSync-cPCI, but it will not be used as long as DHCP is enabled. After changing Ethernet Settings, please reset the module.
Page 295
4.2.23.4 TSYNC_PTR_getUnitSettings TSYNC_ERROR TSYNC_PTR_getUnitSettings( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_PTPUnitSettingsObj *pObj); Description: Gets general PTP settings for the PTP Module. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: pObj: Pointer to the Unit Settings object Returns: (TSYNC_SUCCESS) Success 4.2.23.5 TSYNC_PTR_setUnitSettings TSYNC_ERROR TSYNC_PTR_setUnitSettings( TSYNC_BoardHandle...
Page 296
4.2.23.7 TSYNC_PTR_getPortSettings TSYNC_ERROR TSYNC_PTR_getPortSettings( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_PTPPortSettingsObj *pObj); Description: Gets configuration information for the PTP port. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: pObj: Pointer to the Port Settings object Returns: (TSYNC_SUCCESS) Success 4.2.23.8 TSYNC_PTR_setPortSettings TSYNC_ERROR TSYNC_PTR_setPortSettings( TSYNC_BoardHandle...
Page 297
4.2.23.10 TSYNC_PTR_getTimeProperties TSYNC_ERROR TSYNC_PTR_getTimeProperties( TSYNC_BoardHandle hnd, unsigned int nInstance, TSYNC_PTPClkQualityObj *pObj); Description: Gets the module's reported time properties information. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: pObj: Pointer to the Time Properties object Returns: (TSYNC_SUCCESS) Success 4.2.23.11 TSYNC_PTR_getParentProperties TSYNC_ERROR TSYNC_PTR_getParentProperties(...
Page 298
4.2.23.13 TSYNC_PTR_saveSettingsToROM TSYNC_ERROR TSYNC_PTR_saveSettingsToROM( TSYNC_BoardHandle hnd, unsigned int nInstance Description: Saves any settings that have been changed in the PTP module to the module's ROM. Input Parameters: hnd: Board handle nInstance: The instance number Returns: (TSYNC_SUCCESS) Success 4.2.23.14 TSYNC_PTR_resetModule TSYNC_ERROR TSYNC_PTR_resetModule( TSYNC_BoardHandle hnd, unsigned int...
Page 299
4.2.23.16 TSYNC_PTR_reinitModule TSYNC_ERROR TSYNC_PTR_resetModule( TSYNC_BoardHandle hnd, unsigned int nInstance); Description: Reinitializes the PTP stack in the PTP module. Input Parameters: hnd: Board handle nInstance: The instance number Returns: (TSYNC_SUCCESS) Success 4.2.23.17 TSYNC_PTR_getValidity TSYNC_ERROR TSYNC_PTR_getValidity( TSYNC_BoardHandle hnd, unsigned int nInstance, *bTimeValid, *bPpsValid);...
Page 300
0 = PTP Slave Mode 1 = PTP Master Mode 4.2.23.19 TSYNC_PTR_setMode TSYNC_ERROR TSYNC_PTR_setMode( TSYNC_BoardHandle hnd, unsigned int nInstance, *bMode); Description: Sets the PTP module’s current operational mode Input Parameters: hnd: Board handle nInstance: The instance number bMode: pointer to Mode object Returns: (TSYNC_SUCCESS) Success 0 = PTP Slave Mode...
Page 301
*bModuleStatus); Description: Gets the PTP module’s status information. Input Parameters: hnd: Board handle nInstance: The instance number Output Parameters: bModuleStatus: ppinter to current Module Status Returns: (TSYNC_SUCCESS) Success Module Status reports the cause of the last reset operation. 4.2.23.22 TSYNC_PTR_getUserDesc TSYNC_ERROR TSYNC_PTR_getUserDesc( TSYNC_BoardHandle hnd,...
Page 302
4.2.24 Reference Monitor Service (RS) Calls RS calls determine the best available Time and 1PPS input references and maintain the reference priority table. Note: Where <Table type> 0= Factory table 1= User table 2= Working table Where <enable> 0= Input References not enabled 1= Input References enabled Where <index>...
Page 303
Output Parameters: pObj: Pointer to the table entry result Returns: (TSYNC_SUCCESS) Success 4.2.24.3 TSYNC_RS_getEntry TSYNC_ERROR TSYNC_RS_getEntry( TSYNC_BoardHandle hnd, index, TSYNC_TableEntryObj *pObj); Description: Get working priority table entry by index. Input Parameters: hnd: Board handle index: Table entry index Output Parameters: pObj: Pointer to the table entry result Returns: (TSYNC_SUCCESS) Success...
Page 304
(TSYNC_SUCCESS) Success 4.2.24.6 TSYNC_RS_setUserDef TSYNC_ERROR TSYNC_RS_setUserDef( TSYNC_BoardHandle hnd); Description: Reset the reference table to the user default settings, if saved user priority table exists. Input Parameters: hnd: Board handle Returns: (TSYNC_SUCCESS) Success 4.2.24.7 TSYNC_RS_saveUserDef TSYNC_ERROR TSYNC_RS_saveUserDef( TSYNC_BoardHandle hnd); Description: Save the working priority table to the user priority table. Input Parameters: hnd: Board handle Returns:...
Page 305
unsigned int index, unsigned int *priority); Description: Get specified working priority table entry’s priority. Input Parameters: hnd: Board handle index: Table entry index Output Parameters: priority: Pointer to the priority result Returns: (TSYNC_SUCCESS) Success 4.2.24.10 TSYNC_RS_setPriority TSYNC_ERROR TSYNC_RS_setPriority( TSYNC_BoardHandle hnd, unsigned int index, unsigned int...
Page 306
SS calls maintain the time source, 1PPS source, Sync and Holdover states of the system. TFOM (Time Figure of Merit) is a measure of how accurate the system’s PPS is relative to the reference 1PPS. Lower numbers are better. (The TSync is not capable of a TFOM value lower than 3.) 4.2.25.1 TSYNC_SS_reset...
Page 307
Description: Reset the TSYNC board. Input Parameters: hnd: Board handle pObj: Pointer to the reset type information Returns: (TSYNC_SUCCESS) Success Note: Only use “0” for the <reset type>. 4.2.25.2 TSYNC_SS_getRef TSYNC_ERROR TSYNC_SS_getRef( TSYNC_BoardHandle hnd, TSYNC_ReferenceObj *pObj); Description: Get currently selected time and 1PPS reference.
Page 308
Description: Set the maximum TFOM threshold to stay in sync. Input Parameters: hnd: Board handle tfom: Pointer to the maximum TFOM information Returns: (TSYNC_SUCCESS) Success Sets the user-configurable TFOM threshold. When the system TFOM is above this threshold, the system will leave the “sync” state end enter the “holdover” state. The default threshold is 15.
Page 309
TSYNC_ERROR TSYNC_SS_getHoldover( TSYNC_BoardHandle hnd, *bHoldover); Description: Get the current holdover state. Input Parameters: hnd: Board handle Output Parameters: bHoldover: Pointer to the current holdover state result Returns: (TSYNC_SUCCESS) Success Where 0 indicates not in Holdover (False) and 1 indictes in Holdover (True) 4.2.25.8 TSYNC_SS_getHoldoverTO TSYNC_ERROR TSYNC_SS_getHoldoverTO( TSYNC_BoardHandle...
Page 310
1= BCD time (BCD Year, Day of Year, Hour, Min, Sec,ms, us) 2= Seconds (Total number of seconds inepock, nsec) 4.2.25.10 TSYNC_SS_getTimestamp TSYNC_ERROR TSYNC_SS_getTimestamp( TSYNC_BoardHandle hnd, SS_TS_SRC src, TSYNC_TimeObj *pObj); Description: Get the specified state change timestamp. Input Parameters: hnd: Board handle src: The timestamp source Output Parameters: pObj: Pointer to the time result...
Page 311
SS_TS_SRC src, unsigned int *nSeconds, unsigned int *nNanos); Description: Get the specified state change timestamp in seconds format. Input Parameters: hnd: Board handle src: The timestamp source Output Parameters: nSeconds: Pointer to the seconds time result nNanos: Pointer to the nanoseconds time result Returns: (TSYNC_SUCCESS) Success 4.2.25.13...
Page 312
4.2.26 Upgrade Service (US) Calls US calls are used to upgrade the firmware and FPGA images in the external flash memories. 4.2.26.1 TSYNC_US_GetState TSYNC_ERROR TSYNC_US_getState( TSYNC_BoardHandle hnd, TSYNC_StateObj *obj); Description: Retreive the update status. Input Parameters: *hw: Handle *obj: Pointer to the state result Returns: (TSYNC_SUCCESS) Success 4.2.26.2 TSYNC_US_Start...
Page 313
(TSYNC_SUCCESS) Success 4.2.26.4 TSYNC_US_End TSYNC_ERROR TSYNC_US_end( TSYNC_BoardHandle hnd, TSYNC_UpdateEndObj *obj); Description: Finish the update sequence. Input Parameters: *hw: Handle Output Parameters: *obj: Pointer to the update end information Returns: (TSYNC_SUCCESS) Success 4.2.26.5 TSYNC_US_Cancel TSYNC_ERROR TSYNC_US_cancel( TSYNC_BoardHandle hnd, FS_IMG imageType); Description: Cancel the update sequence.
Page 314
Input Parameters: hnd: Board handle Output Parameters: disc: The disciplining state result Returns: (TSYNC_SUCCESS) Success 4.2.27.2 TSYNC_XO_getMode TSYNC_ERROR TSYNC_XO_getMode( TSYNC_BoardHandle hnd, XO_MODE *mode); Description: Get the external oscillator’s mode used when or testing. Input Parameters: hnd: Board handle Output Parameters: mode: The mode result Returns: (TSYNC_SUCCESS) Success...
Page 315
Output Parameters: dac: The DAC result Returns: (TSYNC_SUCCESS) Success 4.2.27.5 TSYNC_XO_setDac TSYNC_ERROR TSYNC_XO_setDac( TSYNC_BoardHandle hnd, unsigned short dac); Description: Set the external oscillator’s DAC setting for testing. Input Parameters: hnd: Board handle dac: The DAC information Returns: (TSYNC_SUCCESS) Success 4.2.27.6 TSYNC_XO_getAlarm TSYNC_ERROR TSYNC_XO_getAlarm( TSYNC_BoardHandle hnd,...
Page 316
(TSYNC_SUCCESS) Success 4.2.27.8 TSYNC_XO_getMfrMdl TSYNC_ERROR TSYNC_XO_getMfrMdl( TSYNC_BoardHandle hnd, TSYNC_ManModObj *pObj); Description: Get the external oscillator’s manufacturer and model. Input Parameters: hnd: Board handle Output Parameters: pObj: Pointer to the man/mod result Returns: (TSYNC_SUCCESS) Success 4.2.27.9 TSYNC_XO_getMessage TSYNC_ERROR TSYNC_XO_getMessage( TSYNC_BoardHandle hnd, TSYNC_CustomMessageObj *pObj);...
Page 317
4.2.27.11 TSYNC_XO_getCmd TSYNC_ERROR TSYNC_XO_getCmd( TSYNC_BoardHandle hnd, TSYNC_OscDiscObj *pObj); Description: Get a disciplining dataset from the external oscillator. Input Parameters: hnd: Board handle Output Parameters: pObj: Pointer to the dataset result Returns: (TSYNC_SUCCESS) Success 4.2.27.12 TSYNC_XO_setCmd TSYNC_ERROR TSYNC_XO_setCmd( TSYNC_BoardHandle hnd, TSYNC_OscDiscObj *pObj);...
Page 318
4.2.27.14 TSYNC_XO_getFreqErr TSYNC_ERROR TSYNC_XO_getFreqErr( TSYNC_BoardHandle hnd, float *err); Description: Gets the frequency error of the oscillator. Input Parameters: hnd: Board handle Output Parameters: err: pointer to Frequency error result Returns: (TSYNC_SUCCESS) Success 4.2.27.15 TSYNC_XO_getOscType TSYNC_ERROR TSYNC_XO_getOscType( TSYNC_BoardHandle hnd, *oscType); Description: Get the system oscillator type.
Page 319
4.2.28 Oscillator Monitor Service (XS) Calls XS calls measure and provide the accuracy and stability of the timing system oscillator. 4.2.28.1 TSYNC_XS_Register TSYNC_ERROR TSYNC_XS_register( TSYNC_BoardHandle hnd, TSYNC_MeterHandle *pObj); Description: Reserve a meter. Input Parameters: hnd: Board handle Output Parameters: pObj: Pointer to the meter handle result Returns: (TSYNC_SUCCESS) Success 4.2.28.2 TSYNC_XS_Unregister...
Page 320
(TSYNC_SUCCESS) Success 4.2.28.4 TSYNC_XS_SetWindowSize TSYNC_ERROR TSYNC_XS_setWindowSize( TSYNC_BoardHandle hnd, TSYNC_MeterWinSizeObj *pObj); Description: Set the specified meter's window size. Size is in seconds. Input Parameters: hnd: Board handle pObj: Pointer to the window size information Returns: (TSYNC_SUCCESS) Success 4.2.28.5 TSYNC_XS_GetMeterData TSYNC_ERROR TSYNC_XS_getMeterData( TSYNC_BoardHandle hnd, TSYNC_MeterDataObj *pObj);...
Page 321
(Match Time), etc. This section provides information on commonly used functionalility of the TSync boards. The TSync board can generate an interrupt when specified events occur. The TSync driver can differentiate between the different events that can cause interrupts. The TSync driver handles the interrupt and provides information on the type of event that caused the interrupt to the caller.
Page 322
OS keeps a running total of the interrupts generated by any interrupt line in /proc/interrupts. Just be aware that it is collecting all interrupts on that line, so if it is shared with other devices, those will be shown as well. Also, all interrupts from the TSync will be aggregated in the tally.
Page 323
The following are the Information/Reading timestamp commands: (Gets number of timestamps collected from GPIO input 0) HW_GetTsCount 0 1 NOTE: Index 0 is for Host generated time stamps. (Retrieves all collected time stamps from GPIO input 0) HW_GetTsData 0 1 NOTE: Index 0 is for Host generated time stamps.
Page 324
Otherwise, matches won't happen as expected. For example, if the default board timescale is UTC and the match times are entered as local time, the match times will be several hours off. Refer to 5.6 Changing the TSync Boards TimeScale to Local Time Instead of UTC below.
Page 325
A. All general purpose outputs default to low outputs at system startup. There are two ways to use the TSync board without a GPS or IRIG input: “self” mode and “Host” mode. This is configured in the reference priority table.
Page 326
Be advised that the default time scale for the TSync board is UTC. This differs from raw GPS by 15 seconds currently, due to periodic leap seconds added to UTC time scale. If the...
Page 327
Used to set up the Pulse Width of the 1PPS output (in nanoseconds). The default timescale for the TSync board is UTC time. The TSync board can be set to use a local timescale for the core clock instead of being configured for UTC. The local timescale needs to be set up and then the system needs to be set to utilize that timescale.
Page 328
<device> = which TSync card is in the system, starting at 0. <inst> = which PTP instance to use. TSync/PTP has only one PTP module, so use Instance 0 (this corresponds with the ptp0 entry in the State Table).
Page 329
PTR_ReinitModule <device> <inst> 0 5.7.2 Basic PTP Configuration 5.7.2.1 Configuration as Slave Device The TSync-cPCI-PTP is configured from the factory to function as a PTP Slave. It should synchronize to a PTP Master set up with the following parameters: ...
Page 330
NOTE: If DHCP is enabled and the TSync / PTP was not successful in obtaining an IP address, the Module will need to be Reset. Use the ”PTR_ResetModule“ command to reobtain an IP address: PTR_ResetModule <device> <inst> 0 The Reset command may take up to two minutes to complete.
Page 331
128 to lower numbers. When the PTP Module is set to Master Mode, the module will immediately attempt to become the master on the network. If it does, it will start to transmit PTP packets (even if the TSync is not yet synchronized).
Page 332
Jan 1, or the second before midnight, July 1). Even if a leap second is set at an earlier time in the TSync, it will not be broadcast in the PTP announce message until 12 hours prior to the event, in compliance with the PTPv2 specification.
Page 333
Port Enabled: For this product, will always be “Y.” Port State: Reports the current state of the PTP State Machine. The TSync/PTP uses the following states: o Initializing: Cable is unplugged / power-up state. o Listening: TSync/PTP is looking for a Master.
Page 334
5.7.3.3 Port Settings The “PTR_GetPortSettings <device> <inst> “command provides access to configuration information for the broadcast rate of PTP packets. The “PTR_SetPortSettings” command provides write access to configuration information for the broadcast rate of PTP packets. Port Number: For this product, will always be “1.” ...
Page 335
1.) Attach a Windows or Linux PC to the PTP network, and unpack the upgrade bundle on the PC. (This PC may be the same PC that is used as a host for a TSync-cPCI-PTP). Make sure your network mask and gateway are configured properly so that the TSync- cPCI-PTP cards are accessible to the machine containing the upgrade file.
Page 336
PTR_ResetModule <card id> 0 0 SS_Reset <card id> 0 Where <card id> is 0 for a system with one TSync-cPCI-PTP card in it. 10.) Confirm that the new PTP Firmware Version ID matches the version you are upgrading to (using the ”PTR_GetModuleInfo <card id> 0” example program).
Page 337
The TSync-cPCI supports existing Spectracom TPRO/TSAT timing board driver API calls as described herein. 6.1.1 Tpro.h /******************************************************************************* Module : tpro.h Date : 04/05/06 Purpose : This is the TPRO-PCI interface include file. Copyright(C) 2006 Spectracom Corporation. All Rights Reserved. *******************************************************************************/...
Page 341
6.1.2 Tpro_error_codes.h #ifndef __tpro_error_codes_h__ #define __tpro_error_codes_h__ 1 /* WARNING: X Macros! * X Macros will help us keep the list of error conditions tightly * coupled with meaningful text messages for users. #define TPRO_ERROR_CODES TPRO_X( TPRO_SUCCESS , "success") TPRO_X( TPRO_HANDLE_ERR , "error bad handle") \ TPRO_X( TPRO_OBJECT_ERR , "error creating obj") \...
Page 342
6.2.1 TPRO_setOscillator unsigned char TPRO_setOscillator( TPRO_BoardObj *hnd, unsigned char *freq); Description: This routine will select whether the Oscillator output is 10 MHz, 5 MHz, 1 MHz, 1 kHz, or Off. The power-on default state is “OFF”. Input Parameters: hnd: Board handle enbp: Pointer to frequency value Returns: (TPRO_COMM_ERR) error communicating with driver...
Page 343
6.2.3 TPRO_getLongitude unsigned char TPRO_getLongitude( TPRO_BoardObj *hnd, TPRO_LongObj *Longp); Description: This routine retrieves the longitude information. Input Parameters: hnd: Board handle Output Parameters: Longp: Pointer to TPRO_LongObj Returns: (TPRO_INVALID_BOARD_TYPE_ERR) invalid board type for function (TPRO_COMM_ERR) error communicating with driver (TPRO_SUCCESS) success 6.2.4 TPRO_getSatInfo unsigned char TPRO_getSatInfo( TPRO_BoardObj *hnd,...
Page 344
6.2.6 TPRO_resetFirmware unsigned char TPRO_resetFirmware( TPRO_BoardObj *hnd); Description: This routine resets the firmware. This function is for troubleshooting purposes only and should not be used in the main application. Input Parameters: hnd: Board handle Returns: (TPRO_COMM_ERR) error communicating with driver (TPRO_SUCCESS) success 6.2.7 TPRO_setHeartbeat unsigned char TPRO_setHeartbeat(...
6.2.9 TPRO_setPropDelayCorr unsigned char TPRO_setPropDelayCorr( TPRO_BoardObj *hnd, *us); Description: This routine sets the propagation delay correction factor. Input Parameters: hnd: Board handle us: Pointer to correction factor in microseconds. Returns: (TPRO_DELAY_PARM_ERR) invalid propagation delay factor (TPRO_COMM_ERR) error communicating with driver (TPRO_SUCCESS) success 6.2.10 TPRO_setTime unsigned char TPRO_setTime(...
Page 346
6.2.11 TPRO_setYear unsigned char TPRO_setYear( TPRO_BoardObj *hnd, unsigned short *yr); Description: This routine programs the desired year. If the board is synchronized to a GPS antenna this value will not be accepted. Input Parameters: hnd: Board handle yr: Pointer to the desired year. Returns: (TPRO_INVALID_BOARD_TYPE_ERR) invalid board type for function (TPRO_COMM_ERR) error communicating with driver...
6.2.14 TPRO_synchStatus unsigned char TPRO_synchStatus( TPRO_BoardObj *hnd, unsigned char *status); Description: This routine reports the synchronization status of the device. When status is equal to zero, the device is freewheeling. Otherwise the device is synchronized to its input. Input Parameters: hnd: Board handle Output Parameters: enbp: Pointer to the synch status variable...
6.2.16 TPRO_waitHeartbeat unsigned char TPRO_waitHeartbeat( TPRO_BoardObj *hnd, *jiffies); Description: This routine will report the status of the heartbeat interrupt. Given an amount of time in jiffies, the return code will report timeout or success determined by the heartbeat interrupt status. This routine is tied to general purpose output 0. Input Parameters: hnd: Board handle jiffies: Pointer ot the jiffies timeout value...
Page 349
Document Revision History Description Date 3316 First draft of Spectracom documentation for this product. December 2013...
Need help?
Do you have a question about the TSync and is the answer not in the manual?
Questions and answers