Home

TSync - PCIe Factory Driver Guide, Rev G.

image

Contents

1. TSYNC REFERENCE ID OBJECT x typedef struct char refid 5 TSYNC RefIdObj TSYNC SUPERVISOR RESET OBJECT EA typedef struct SS RESET type TSYNC ResetObj V d TSYNC REFERENCE MONITOR TABLE TYPE OBJECT typedef struct RS TABLE TYPE type TSYNC_TableTypeObj V d TSYNC REFERENCE MONITOR TABLE ENTRY OBJECT typedef struct int enab unsigned int prio char time 5 char pps 5 TSYNC TableEntryObj J TSYNC REFERENCE MONITOR TABLE OBJECT x7 typedef struct TSYNC TableEntryObj rows TSYNC_TABLE ENTRY NUM TSYNC_ReferenceTableObj TSYNC REFERENCE MONITOR TABLE ENTRY STATE OBJECT Af typedef struct char source 5 int timeValid int ppsValid TSYNC_TableEntryStateObj PR TSYNC REFERENCE MONITOR STATE TABLE OBJECT xf Synchronizable Timecode Generator Supplemental Information 4 23 TSync PCle Factory Driver Guide Spectracom Corporation typedef struct T TSYNC TableEntryStateObj rows TSYNC_STAT TSYNC ReferenceStateTableoObj TABLE ENTRY NUM V d TSYNC INITIALIZER MODULE RESULT OBJECT x typedef struct char module 33 TSYNC_ERROR result TSYNC_InitModuleResult ZF TSYNC INITIALIZER STATUS OBJECT x typedef struct unsigned int pageNum int more TSYNC_InitModuleResult results TSYNC_INIT RESULT NUM TSYN
2. GL RESET SAASM ZCLR 17 GL RESET SAASM ZEMG 18 GL RESET SAASM RST 19 GL RESET SAASM URST 20 GL RESET NONE OxFF GL RESET GPS Antenna States typedef enum G G G G L ANT L ANT SHORT L ANT OPI L ANT OK EN UNK UNRO GL_ANT STATUS GPS Set Get Parameter Type typedef enum SGPS Zeroize Clear SGPS Emergency Zeroize Reset SGPS GSSIP interface Reset SGPS ALL GSSIP interfaces No Reset required for Web UI Display GSSIP Receivers Upper 16 bits 0x0000 Lower 16 bits are used for parameter types GL PARM GSSIP KEY STATE 0x00000000 GL PARM GSSIP COM1 USE 0x00000001 COM1 Usage configuration Reserved for future use GL PARM GSSIP COM1 CFG 0x00000002 Serial Port Configuration GL PARM GSSIP HQ OUT 0x00000003 HaveQuick Output GL PARM GSSIP PPS OUT 0x00000004 PPS Output Configuration Add more here for GSSIP TBD Receiver Upper 16 bits 0x0001 Lower 16 bits are used for parameter types GL PARM TBD PARMO 0x00010000 Add more here for other receivers GL_PARM NUM GL_PARM GSSIP COM1 typedef enum Usage Type Mutualy exclusive uses for COM1 kk Initiate a HotStart Output on COM1 GL COM1 IDLE 0 COM1 is NOT used GL_COM1_HS OUT 1 GL
3. double secsDouble seconds floating pt unsigned char seconds seconds whole num unsigned char minutes unsigned char hours unsigned short days unsigned short year unsigned short flags bit 15 flagsInvalid 1 bit 2 SYNC bit 1 TCODE all others 0 TPRO TimeObj TPRO WAIT OBJECT E typedef struct TPRO WaitObj int jiffies jiffies to wait double seconds unsigned char minutes unsigned char hours unsigned short days TPRO WaitObj TPRO MEM OBJECT FOR PEEK POKE E typedef struct TPRO MemObj unsigned short of set unsigned short value unsigned long 1 value TPRO MemObj include tpro error codes h KKK KKK RR RR RR KA AXA AXA KA KA KA KA KA RR RR RR RR RR kok kok kok kok kok kok kok kok kok kok kok kok kok PUBLIC ROUTINE PROTOTYPES EK KI kk kk k kk k kk kk kk kk k k kk kk kk kk kk unsigned char TPRO open TPRO BoardObj hnd char deviceName unsigned char TPRO close TPRO BoardObj hnd unsigned char TPRO getAltitude TPRO BoardObj hnd TPRO AltoObj Altp unsigned char TPRO getDate TPRO BoardObj hnd TPRO DateObj Datep unsigned char TPRO getDriver TPRO BoardObj hnd char driver unsigned char TPRO getFirmware TPRO BoardObj hnd char firmware unsigned char TPRO getFPGA TPRO BoardObj hnd char fpga unsigned char TPRO getLatitude TPRO BoardObj hnd TPRO LatObj Latp unsigned char TPRO getLongi
4. Function TSYNC_QP_getNumInst Description Get number of HaveQuick output instances present in the system Parameters E IN hnd Board handle OUT nInstances The number of instances result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC OP getNumInst TSYNC BoardHandle hnd unsigned int nInstances SMPTE EBU Output Component A Function TSYNC EP getSigCtrl Description Get the SMPTE EBU output s signature control state Parameters IN hnd Board handle i nInstance The instance number ta OUT sig The signature control result Synchronizable Timecode Generator Supplemental Information 4 105 TSync PCle Factory Driver Guide Spectracom Corporation Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC EP getSigCtrl TSYNC BoardHandle hnd unsigned int nInstance SIG CTL sig f Function TSYNC EP setSigCtrl Description Set the SMPTE EBU output s signature control state Parameters X IN hnd Board handle nInstance The instance number sig The signature control information Returns TSYNC SUCCESS Success ava DLL EXPORT TSYNC ERROR TSYNC_EP_setSigCtrl TSYNC BoardHandle hnd unsigned int nInstance SIG CTL sig Function TSYNC EP getOffset Description Get the SMPTE EBU output s offset Offset is in nanoseconds Parameters IN h
5. Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC PTR getGrandmasterProperties TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPGrandmasterPropobj poObj Function TSYNC PTR getTODEnabled Description Gets whether the module outputs a TOD Parameters IN hnd Board handle x ninstance The instance number OUT bTodEnabled Whether the module outputs a TOD Returns TSYNC SUCCESS Success x m DLL EXPORT TSYNC ERROR TSYNC_PTR_getTODSettings TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPTODSettingsObj pObj Function TSYNC PTR setTODEnabled Description Sets whether the module outputs a TOD Parameters IN hnd Board handle E ninstance The instance number x bTodEnabled Whether the module outputs a TOD Returns TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC_PTR_setTODSettings TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPTODSettingsObj pObj Function TSYNC_PTR_getPPSEnabled Description Gets whether the module outputs a PPS when it s a slave Synchronizable Timecode Generator Supplemental Information 4 97 TSync PCle Factory Driver Guide Spectracom Corporation Parameters IN hnd Board handle nInstance The instance number i OUT bPpsEnabled Whether the module outputs a PPS when it s a slave
6. unsigned int nInstance IL CE ce Function TSYNC IR getCtrlField Description Get the IRIG Control Field Parameters IN hnd Board handle nInstance The instance number 5 OUT cf The Control Field result Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC IR getCtrlField TSYNC BoardHandle hnd unsigned int nInstance IL CF cf Function TSYNC_IR_setCtrlField Description Set the IRIG Control Field Parameters E IN hnd Board handle nInstance The instance number g CE The Control Field information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IR setCtrlField TSYNC BoardHandle hnd unsigned int nInstance IL CF cf Function TSYNC IR getMessage Description Get the latest IRIG input message Parameters IN hnd Board handle ninstance The instance number a OUT pObj Pointer to the message result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IR getMessage Synchronizable Timecode Generator Supplemental Information TSync PCle Factory Driver Guide 4 75 TSync PCle Factory Driver Guide Spectracom Corporation TSYNC_BoardHandle hnd unsigned int nInstance TSYNC IRIGMessageObj poObj JE Function TSYNC IR setMessage Description Set the latest IRIG input message Parameters IN hnd Board handle x ninst
7. Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC PTR getPPSEnabled TSYNC BoardHandle hnd unsigned int nInstance int bPpsEnabled Function TSYNC PTR setPPSEnabled Description Sets whether the module outputs a PPS when it s a slave Parameters x IN hnd Board handle nInstance The instance number K bPpsEnabled Whether the module outputs a PPS when it s a slave A Returns TSYNC SUCCESS Success aA DLL EXPORT TSYNC ERROR TSYNC PTR setPPSEnabled TSYNC BoardHandle hnd unsigned int nInstance int bPpsEnabled Function TSYNC_PTR_getPPSRisingEdge Description Gets if the module s output PPS is rising edge or not Parameters E IN hnd Board handle g nInstance The instance number OUT bPpsRisingEdge Whether the module s PPS is risin edge or not Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC PTR getPPSRisingEdge TSYNC BoardHandle hnd unsigned int nInstance int bPpsRisingEdge Function TSYNC_PTR_setPPSRisingEdge Description Sets if the module s output PPS is rising edge or not Parameters IN hnd Board handle nInstance The instance number bPpsRisingEdge Whether the module s PPS is risin edge or not Returns TSYNC SUCCESS Success x m DLL EXPORT TSYNC ERROR TSYNC PTR setPPSRisingEdge 4 98 Synchronizable Timecode Genera
8. Returns x DLL EXPORT TSYNC ERROR TSYNC FP getSigCtrl TSYNC SUCCESS Success TSYNC BoardHandle hnd unsigned int nInstance SIG CTL sig Function TSYNC FP setSigCtrl Description Set the Fixed Frequency output s signature control state A Parameters IN hnd Board handle nInstance The instance number sig The signature control information Returns xf DLL EXPORT TSYNC_ERROR TSYNC FP setSigCtrl TSYNC BoardHandle hnd TSYNC SUCCESS Success unsigned int nInstance SIG CTL sig Function TSYNC_FP_getFreq Description Get the Fixed Frequency output s frequency Hertz Parameters IN hnd Board handle nInstance The instance number Synchronizable Timecode Generator Supplemental Information Frequency is in 4 121 TSync PCle Factory Driver Guide Spectracom Corporation G OUT freq The frequency result Returns TSYNC SUCCESS Success 47 DLL EXPORT TSYNC ERROR TSYNC FP getFreg TSYNC BoardHandle hnd unsigned int nInstance float freq PX Function TSYNC FP getNumInst Description Get number of fixed freg output instances present in the system Parameters E IN hnd Board handle g OUT nInstances The number of instances result Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC FP getNumInst TSYNC BoardHandle hnd unsigned int nInstances Shared Memory S
9. unsigned int nInstances IRIG Output Component Function TSYNC_IP_getSigCtrl Description Get the IRIG output s signature control state Parameters IN hnd Board handle gi nInstance The instance number x OUT sig The signature control result A Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP getSigCtrl TSYNC BoardHandle hnd unsigned int nInstance SIG CTL sig Function TSYNC_IP_setSigCtrl Description Set the IRIG output s signature control state Parameters IN hnd Board handle ninstance The instance number sig The signature control information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP setSigCtrl TSYNC BoardHandle hnd unsigned int nInstance SIG CTL sig PX Function TSYNC IP getOffset Description Get the IRIG output s offset Offset is in nanoseconds Synchronizable Timecode Generator Supplemental Information 4 85 TSync PCle Factory Driver Guide Parameters IN hnd nInstance OUT nOffset Spectracom Corporation Board handle The instance number The offset result Returns TSYNC SUCCESS Success X DLL EXPORT TSYNC ERROR TSYNC IP getOffset TSYNC BoardHandle hnd nInstance unsigned int int nOffset x Function TSYNC IP setOffset Description Set the IRIG output s offset Offset is in n
10. DLL EXPORT TSYNC ERROR TSYNC XO setCmd TSYNC BoardHandle hnd TSYNC OscDiscObj pObj Function TSYNC_XO_getPhaseErr Description Get the estimated phase error of the external oscillator Parameters 4 IN hnd Board handle k err Phase error result Returns TSYNC SUCCESS Success 7 DLL EXPORT TSYNC ERROR TSYNC_XO_getPhaseErr TSYNC BoardHandle hnd int err Function TSYNC XO getFregErr Description Get the freguency phase error of the external oscillator Parameters IN hnd Board handle x err Frequency error result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC_ERROR TSYNC XO getFregErr 4 120 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSYNC BoardHandle hnd float err Function TSYNC_XO_getOscType Description Get the system oscillator type Parameters IN hnd Board handle z err Oscillator type Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC_ERROR TSYNC XO getOscType TSYNC BoardHandle hnd OSC oscType TSync PCle Factory Driver Guide Fixed Frequency Output Component A Function TSYNC FP getSigCtrl Description Get the Fixed Frequency output s signature control state Parameters k IN hnd Board handle x ninstance The instance number E OUT sig The signature control result
11. OUT pOutObj Feature ID and instance result Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC DCS getFeatureByIdx TSYNC BoardHandle hnd TSYNC OptCardSlotIdxObj pInObj TSYNC OptCardFeatInstObj pOutObj Function TSYNC_DCS_getInstance Description Gets the system instance of a specified local instance of a specified feature id on an option card in a specified slot Parameters IN hnd Board handle E pInObj Slot id and local instance of feature OUT nInstance System instance result Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC DCS getInstance TSYNC BoardHandle hnd TSYNC OptCardSlotFeatInstObj pObj int nInstance Function TSYNC_DCS_getSlot Description Gets the slot number of the option card that contains the id specified system instance of a specified feature id Parameters x IN hnd Board handle pObj Id and system instance of feature OUT nSlot Option card slot result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC DCS getSlot TSYNC BoardHandle hnd TSYNC OptCardFeatInstObj pObj int nSlot Upgrade Servic Function TSYNC_US_getState Description Retreive the update status Parameters IN hw Handle i obj Pointer to the state result Returns TSYNC SUCCESS Success DLL EXPORT T
12. Function TSYNC GR setCustom Description Send a custom message to the GPS Parameters ia IN hnd Board handle k nInstance The instance number pobj Pointer to the custom message result Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC GR setCustom TSYNC BoardHandle hnd unsigned int nInstance TSYNC CustomMessageObj poObj Function TSYNC_GR_getNumInst Description Get number of GPS references instances present in the system Parameters IN hnd Board handle OUT nInstances The number of instances result Returns TSYNC SUCCESS Success EL Synchronizable Timecode Generator Supplemental Information 4 69 TSync PCle Factory Driver Guide DLL EXPORT Spectracom Corporation TSYNC ERROR TSYNC_GR_getNumInst TSYNC_BoardHandle unsigned int Function Description Parameters IN hnd 4 A Returns DLL EXPORT hnd nInstances TSYNC GR delPos Clear any position information that is stored in persistent memory inside the GPS receiver Board handle TSYNC SUCCESS Success TSYNC ERROR TSYNC GR delPos TSYNC BoardHandle hnd unsigned int x Function Description Parameters IN hnd ACA N Returns a DLL EXPORT nInstance TSYNC GR getRefId Get reference identifier for a GPS reference instance Board handle TSYNC SU
13. Returns TSYNC SUCCESS Success af DLL EXPORT TSYNC_ERROR TSYNC_PTR_getModuleStatus TSYNC BoardHandle hnd unsigned int nInstance int bModuleStatus Synchronizable Timecode Generator Supplemental Information 4 101 TSync PCle Factory Driver Guide Spectracom Corporation Function TSYNC_PTR_getUserDesc Description Gets the User Description strings Parameters IN hnd Board handle Y ninstance The instance number pobj User Description object Returns TSYNC SUCCESS Success xy 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 IN hnd Board handle nInstance The instance number i pobj User Description object A Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC_PTR_setUserDesc TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPUserDescObj poObj x Function TSYNC PTR getRefId Description Get reference identifier for a PTP reference instance Parameters IN hnd Board handle AA ACA N Returns TSYNC_SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC PTR getRefId TSYNC BoardHandle hnd unsigned int nInstance TSYNC RefIdObj poObj STANAG HaveQuick Output Component de Function TSYN
14. 5 7 3 3 PTP Port Settings The PTR GetPortSettings lt device gt lt inst gt 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 5 248 Port Number For this product will always be 1 Announce Reception Timeout In order for a slave to synchronize to a Master it must see at least one announce message coming in during an interval defined as the slave s Announce Interval times the slave s Announce Reception Timeout Example if a slave s Announce Reception Timeout is 3 and its Log Announce Interval is 1 it must see an Announce message within 3 2 6 seconds Log base 2 of Announce Interval A slave uses this value combined with the Announce Reception Timeout to determine its announce timeout A Master uses this value to determine the rate at which it sends out Announce messages Log base 2 of Sync Interval A Master uses this value to determine the rate at which Sync messages are transmitted Log base 2 of Delay Request interval A Master will broadcast this value to Slaves to determine the rate at which Delay Request messages are transmitted when the End to End Delay Mechanism is chosen Log base 2 of Peer Delay Request interval A Master will broadcast this value to Slaves to determine the rate at which Peer Delay Request messages are t
15. Parameters x IN hnd Board handle nInstance The instance number OUT TSYNC LocalClockObj The local clock result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC_ERROR TSYNC_HR_getLocal TSYNC_BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj poObj Function TSYNC_HR_setLocal Description Set the ASCII reference s local time zone and DST rule x Timezone and DST offsets are in seconds Parameters dl IN hnd Board handle ninstance The instance number TSYNC LocalClockObj The local clock information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC HR setLocal Synchronizable Timecode Generator Supplemental Information 4 55 TSync PCle Factory Driver Guide Spectracom Corporation TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pobj JE Function TSYNC HR getTimeScale Description Get the Host reference s time scale Parameters i IN hnd Board handle g nInstance The instance number OUT TSYNC LocalClockObj The time scale result Returns TSYNC SUCCESS Success s DLL EXPORT TSYNC ERROR TSYNC HR getTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Function TSYNC HR setTimeScale Description Set the Host reference s time scale Parameters IN hnd Board handle nins
16. TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pobj f Function TSYNC_AR_setLocal Description Set the ASCII reference s local time zone and DST rule Timezone and DST offsets are in seconds Parameters IN hnd Board handle ninstance The instance number pobj Pointer to the Local Clock information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC AR setlLocal TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pobj PYR Function TSYNC AR getTimeScale Description Get the ASCII reference s time scal Parameters IN hnd Board handle x nInstance The instance number i OUT pObj Pointer to the time scale result Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC AR getTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Function TSYNC_AR_setTimeScale Description Set the ASCII reference s time scal Parameters E IN hnd Board handle A nInstance The instance number pobj Pointer to the time scale information Returns TSYNC SUCCESS Success s DLL EXPORT TSYNC ERROR TSYNC AR setTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Function TSYNC AR getRefId Description Get reference identifier for an ASCII reference inst
17. TSYNC SUCCESS Success 4 2 13 11 TSYNC GR getSatData TSYNC ERROR TSYNC GR getSatData TSYNC BoardHandle hnd unsigned int nInstance TSYNC SatDataObj poObj 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 unsigned int nInstance unsigned int nProgress Description Get the GPS survey progress Input Parameters hnd Board handle ninstance The instance number Output Parameters nProgress The survey progress result Returns TSYNC SUCCESS Success 4 2 13 13 TSYNC GR getMfrMdl TSYNC ERROR TSYNC GR getMfrMal Synchronizable Timecode Generator Supplemental Information 4 167 TSync PCle Factory Driver Guide Spectracom Corporation TSYNC BoardHandle hnd unsigned int nInstance TSYNC ManModoObj poObj Description Get the GPS receiver manufacturer and model Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the manufacturer and model result Returns TSYNC SUCCESS Success 4 2 13 14 TSYNC GR getReviInfo TSYNC ERROR TSYNC GR getRovInfo TSYNC BoardHandle hnd unsigned int nInstance TSYNC ReceiverInfoObj pObj Description Get the GPS receiver info Input Parameters
18. lt lt NF Oo lt lt e r IME SCALES TIME SCALE _ TIME SCALE TIME SCALE TIME SCALE UTC TAI GPS OCAL L NUM TIM E SCALES TIME SCALE ML TIME SCAL typedef enum MAX TFOM 15 lt lt lt UNROO 15 ZZ LE LE TSync PCle Factory Driver Guide 100 msec lt ETE lt 1 sec 1 sec lt ETE lt 10 sec 10 sec lt ETE lt 100 sec 100 sec lt ETE lt 1000 sec 1000 sec lt ETE lt 10000 sec ETE gt 10000 sec Number of TFOM values Unknown oscillator type Lowest quality TCXO Highest quality TCXO Lowest quality OCXO Highest quality OCXO Lowest quality Rubidium Highest quality Rubidium First time scale in list Universal Coordinated Time International Atomic Time Global Positioning System UTC w local rules for time zone DST Number of time scales Maximum number of timescales Synchronizable Timecode Generator Supplemental Information 4 3 TSync PCle Factory Driver Guide TIME START TYPES TIME DOYTIME TIME BCDTIME TIME SECONDS TIME NUM_TYPES ML TIME TYPE typedef enum ML DST REF LCL ML DST REF UTC I o lt I F
19. z DLL EXPORT TSYNC ERROR TSYNC EC getMode TSYNC BoardHandle hnd E INDEX index EC MODE mode Function TSYNC_EC_setMode Description Set the LED usage mode state Parameters 4 IN hnd Board handle index The LED index mode The usage mode Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC EC setMode TSYNC BoardHandle hnd E INDEX index EC MODE mode Function TSYNC EC getState Description Get the LED display state Parameters IN hnd Board handle index The LED index a OUT state The display state Returns TSYNC SUCCESS Success EZ DLL EXPORT TSYNC_ERROR TSYNC EC _getState TSYNC BoardHandle hnd E INDEX index EC STATE state Function TSYNC_EC_setState Description Set the LED display state Settable only in manual LED mode Parameters IN hnd Board handle index The LED index E state The display state Synchronizable Timecode Generator Supplemental Information 4 59 TSync PCle Factory Driver Guide Spectracom Corporation Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC EC setState TSYNC BoardHandle hnd E INDEX index BC STATE state ASCII Reference Component Jf Function TSYNC AR getOffset Description Get the ASCII referen
20. IN hnd Board handle E ninstance The instance number mode The dynamics mode information Returns TSYNC SUCCESS Success k 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 Synchronizable Timecode Generator Supplemental Information 4 67 TSync PCle Factory Driver Guide Spectracom Corporation Parameters a IN hnd Board handle nInstance The instance number OUT pObj Pointer to the position fix data result Returns TSYNC SUCCESS Success f DLL EXPORT TSYNC ERROR TSYNC GR getFixData TSYNC BoardHandle hnd unsigned int nInstance TSYNC FixDataObj pObj Function TSYNC_GR_getSatData Description Get the GPS satellite data Parameters E IN hnd Board handle jj nInstance The instance number x OUT pObj Pointer to the satellite data result Returns TSYNC SUCCESS Success a DLL EXPORT TSYNC_ERROR TSYNC_GR_getSatData TSYNC BoardHandle hnd unsigned int nInstance TSYNC SatDataObj pObj Function TSYNC_GR_getSurveyProg Description Get the GPS survey progress Parameters x IN hnd Board handle i ninstance The instance number OUT nProgress The survey progress result Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC
21. REF OFF L NUM Li enum TFOM MIN TFOM UNDEFIN O O0 UIO U e W N a Oo o LE No Signature Control always ON Signature Control based on SYNC status Signature Control based on Referenc status Ultimate Signature Control always OFF TFOM based on Estimated Time Error ETE Minimum TFOM value TFOM is not defined ETE is unknown ll 10 100 1 10 100 1 10 nsec nsec nsec usec usec usec msec msec NKR KA KR AANA A ETE ETE ETE ETE ETE ETE ETE ETE ETE lt lt lt lt lt lt lt lt lt 1 10 100 El 10 100 1 10 100 nsec nsec nsec usec usec usec msec msec msec Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TFOM 10 TFOM 11 TFOM 12 TFOM 13 TFOM 14 TFOM_15 TFOM_NUM TFOM_MAX TFOM typedef enum EDGE MIN EDGE BOTH EDGE NUM EDGE typedef enum T EVEL LOW LEVEL typedef enum EVEL HIGH EDGE FALLING EDGE RISING 1 HO OSC UNKNOWN OSC TCXO 1 OSC_TCXO 2 OSC _OCXO 1 OSC ocxo 2 osc_ocxo_3 OSC_OCXO 4 OSC_RBXO_1 OSC RBXO 2 OSC RBXO 3 OSC NUM OSC typedef enum L START T 0 1 L UTB wn lt tout oa 10 11 12 13 14 15
22. Returns TSYNC SUCCESS Success xf DLL EXPORT TSYNC ERROR TSYNC US end TSYNC BoardHandle hnd Synchronizable Timecode Generator Supplemental Information 4 35 TSync PCle Factory Driver Guide Spectracom Corporation 4 36 TSYNC_Update EndObj obj V d Function TSYNC US cancel Description Cancel the update seguenc Parameters x IN hw Handle OUT imageType the type of update sequence being cancelled Returns TSYNC SUCCESS Success aL DLL EXPORT TSYNC_ERROR TSYNC_US cancel TSYNC BoardHandle hnd FS IMG imageType Clock Service x V d Function TSYNC CS getTime Description Get the DOY time from the firmware TSYNC HW getTime is recommended for faster time reads Parameters 5 IN hw Handle OUT Timep Pointer to the time result Returns TSYNC SUCCESS Success gt DLL EXPORT TSYNC ERROR TSYNC CS getTime TSYNC BoardHandle hnd TSYNC TimeObj Timep Function TSYNC CS setTime Description Set the DOY time Parameters IN hw Handle ms Timep Pointer to the time information Returns TSYNC SUCCESS Success m DLL EXPORT TSYNC ERROR TSYNC CS setTime TSYNC BoardHandle hnd TSYNC TimeObj Timep Function TSYNC_CS_getTimeScale Description Get the board s current time scal Parameters IN hnd Board handle i OUT pObj Pointer to the time scale resul
23. TSync PCle Factory Driver Guide AX Y define TSYNC_DRV_V not including termination ERSION LENGTH tinclude tsync error codes h Handle to the TSync board obj available to the user xf typedef void TSYNC BoardHandle typedef uint8 t CI CAI typedef uint8 t CI IID define define define define define define define define define define define define define define define define define TSYNC TSYNC TSYNC TSYNC CAPABI DATA B LT IE SP R PAGE LOCK TABLE ENT TRY NU SIZE STATE TABLE ENTRY NU TSYNC TSYNC_ TSYNC_ TSYNC_ TSYNC_IP_CFDATA_ OSC_MAN MO INIT R TSYNC SAT INFO N IR SUBFRAMI TSYNC IR CFDATA IP SUBFRAMI TA ESU TA iT NU ti c z NU D U NU STRING TSYNC OSC DISC C D SIZE TSYNC OSC DISC DATA SIZE TSYNC OSC SER NU STRING TSYNC TSYNC PTP DATE PTP VER STR LEN STR LEN TSYNC DEFAU GPS INSTANCE SIZE SIZI El o Ev Er TBD TBD JARA k k RARA RARA RARA RARA RARA RARA RARA RARA AAA AAA AX Define Enumerations EA General typedef enum SIG CT SIG CT SIC er SIG CTI SIG CT SIG_CTL typedef 4 2 3 El ty Q 10 O JOU AUONVNHE NONE L SYNC
24. The index of TSync s hwSetIntMask call is used for interrupt types that have more than one source like GPIO The index is then used to indicate which instance of that interrupt type to mask unmask If you wanted to unmask the GPI input 1 for example then your interrupt type would be GPI and your index would be 1 to indicate general purpose input 1 Interrupt FAQs Q Is there a way to determine how many interrupts we have missed from one call to wait _for_interrupt to the next A Not through the driver itself You may be able to determine it through the OS In Linux the 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 5 2 External Event Input Time Stamping The GPI pins allow an external signal to be received as a trigger to generate time stamps When the selected active edge is received time stamps are generated and stored in a buffer where they can be read out when desired The GPIO Input and Output pins are not enabled by default Which GPIO input pins that can be used are dependent upon which break out cable is used with this board the available enhanced break out cable allows for connectivity to all of the GPIO pins With the standard break out cable you can connect to on
25. unsigned int nInstances Oscillator Component EA Function TSYNC_XO_getDiscState Description Get the external oscillator s disciplining state Parameters a IN hnd Board handle OUT disc The disciplining state result Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC XO getDiscState TSYNC BoardHandle hnd int disc x Function TSYNC XO getMode Description Get the external oscillator s mode used when disciplining or testing X X N Parameters Synchronizable Timecode Generator Supplemental Information 4 117 TSync PCle Factory Driver Guide Spectracom Corporation IN hnd Board handle OUT mode The mode result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC XO getMode TSYNC BoardHandle hnd XO MODE mode Function TSYNC_XO_setMode Description Set the external oscillator s mode used when disciplining or testing Parameters is IN hnd Board handle g mode The mode information Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC_ERROR TSYNC XO setMode TSYNC BoardHandle hnd XO_MODE mode PYR Function TSYNC XO getDac Description Get the external oscillator s DAC setting for testing Parameters G IN hnd Board handle X OUT dac The DAC result Returns TSYNC_SUCCESS Success af DLL EXPORT TSYNC ERROR TSYNC XO getDac TSYNC Bo
26. unsigned int nInstance IL FRO freg Description Set the IRIG carrier freguency Settable only when in manual mode Input Parameters hnd Board handle ninstance The instance number freg The freguency information Returns TSYNC SUCCESS Success 4 2 19 11 TSYNC IR getCodedExpr TSYNC ERROR TSYNC IR getCodedExpr TSYNC BoardHandle hnd unsigned int nInstance IL CE CE 7 Synchronizable Timecode Generator Supplemental Information 4 195 TSync PCle Factory Driver Guide Spectracom Corporation Description Get the IRIG Coded Expression 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 TR setCodedExpr TSYNC BoardHandle hnd unsigned int nInstance IL CE e Description Set the IRIG Coded Expression Input Parameters hnd Board handle ninstance The instance number ce The Coded Expression information Returns TSYNC SUCCESS Success 4 2 19 13 TSYNC IR getCtriField TSYNC ERROR TSYNC IR getCtriField TSYNC BoardHandle hnd unsigned int nInstance IL CF raf Description Get the IRIG Control Field Input Parameters hnd Board handle ninstance The instance number Output Parameters cf The Control Field result Returns TSYNC_SUCCESS Success 4 2 19 14 TSYNC_IR_setCtriField 4 196 Synchronizable Timecode Gener
27. 2010 09 29 01 Device Name Default is tsyncpci This should never be changed Board Index Controls which board will be queried if there are multiple boards installed in the system Default is 0 if there is only one board Index Default is 0 This should never be changed 2 10 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation 10 PTP Module Information 0 0 GrandMaster Properties Information Identity ERR Clock Class ERR Clock Accuracy ERR Offset Scaled Log Variance ERR Priority 1 ERR Priority 2 ERR Parent Properties Information Identity ERR Port Number ERR Stats Calculated ERR Observed OSLY ERR Observed CPCR ERR Clock Quality Clock Class ERR Clock Accuracy ERR Offset Scaled Log Variance ERR Save Settings to ROM Reset PTP Hot Reinit PTP Module Unit Information Identity ERR One Step Mode Slave Only Unicast Domain Number Priority 1 Priority 2 Modify Unit Information Ethernet Interface DHCP Enabled MAC Address 1P Address NetMask Address ERR ERR ERR ERR ERR ERR Default Gateway Modify Current IP Current NetMask Reset PTP Factory Send PTP Port State Ack Current Gateway TSync PCle Factory Driver Guide r Port Settings information Ann Rept Timout Log Ann Interval Log Sync Interval Log Delay Request Interval Log Peer Delay Request Interv
28. Format 1 variant Unknown auto Broadcast On Time Immediate Streaming unsupported Unknown Synchronizable Timecode Generator Supplemental Information 4 5 TSync PCle Factory Driver Guide 4 6 IL FMT AUTO IL FMT typedef enum IL MOD DCLS 0 IL MOD AM 1 LR IL MOD MAN 2 IL_MOD_UNKNOWN 3 IL MOD AM AND DCLS 4 IL MOD AM OR_DCLS 5 IL MOD typedef enum IL_FRQ NONE 0 IL FRO 100HZ 1 IL FRO 1KHZ 2 IL FRO 10KHZ 3 IL FRO 100KHZ 4 IL FRO 1MHZ 5 IL FRO UNKNOWN 6 IL FRO typedef enum IL CE BCDT CF SBS 0 IL CE BCDT CF 1 IL CE BCDT 2 IL CE BCDT SBS 3 IL CE BCDT BCDY CF SBS 4 IL CE BCDT BCDY CF 5 IL CE BCDT BCDY 6 IL CE BCDT BCDY SBS 7 IL CE UNKNOWN 8 IL_CE typedef enum L_CF MIN L_CF_UNKNOWN L CF 200 04 L CF 1344 HHHH H CF_SPEC H CF_SPEC_FAA H L CF NASA HE L CF NUM ATL ACES The QL FMT type typedef enum 0 0 1 2 3 4 5 Spectracom Corporation Auto detection IRIG DCLS only IRIG AM only IRIG Manchester coding Unknown Port generates both AM and DCLS Port generate AM or DCLS No Carrier Index count interval Unknown BCD TOY Ctrl Func Binary Seconds BCD TOY Ctrl Func BCD TO
29. NOTE Index 0 is for Host generated time stamps e HW GetTsData 0 1 Retrieves all collected time stamps from GPIO input 0 NOTE Index 0 is for Host generated time stamps e HW GetTsSingle 0 1 Retrieves one collected time stamp from GPIO input 0 NOTE Index 0 is for Host generated time stamps Note The TSYNC HW GetTsSingle command will only grab the oldest time stamp out of the FIFO buffer one at a time Refer to Section 4 2 16 16 The TSYNC_HW_getTSdata command Refer to Section 4 2 16 8 will allow the retrieval of all time stamps in the buffer instead of just retrieving one The current state of GPIO Input O can be read at any time with the following command e GI GetValue 0 0 Retrieves the current state of GIPO Input 0 The Host Driver contains a 512 deep FIFO for each individual timestamp input If the Application Software allows a timestamp FIFO to overflow older timestamps will be discarded as new ones come in The timestamp interrupt only triggers when a new timestamp occurs It will not keep triggering if the data is not read out Because of this using the Tsdata command instead of the TsSingle command is recommended Tsdata will grab all timestamps that may be contained in the buffer by the time they are able to be retrieved instead of just the oldest timestamp Note Please refer to the TMSTMP_SRC enumeration when using driver calls or example programs that deal with timestamps Host timestamps are read using
30. Save the working priority table to the user priority table Input Parameters hnd Board handle Returns TSYNC SUCCESS Success 4 2 24 8 TSYNC RS deleteEntry TSYNC ERROR TSYNC RS deleteEntry TSYNC BoardHandle hnd unsigned int index Description Delete a working priority table entry by index Input Parameters Synchronizable Timecode Generator Supplemental Information 4 219 TSync PCle Factory Driver Guide Spectracom Corporation hnd Board handle index Index of table entry to delete Returns TSYNC_SUCCESS Success 4 2 24 9 TSYNC_RS_getPriority TSYNC_ ERROR TSYNC RS getPriority TSYNC BoardHandle hnd 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 priority Description Set specified working priority table entry s priority Input Parameters hnd Board handle index Table entry index priority Pointer to the priority information Returns TSYNC SUCCESS Success 4 2 24 11 TSYNC RS getEnable TSYNC ERROR TSYNC RS ge tEnable TSYNC BoardHandle hnd unsigned int index unsigned int enabled Description 4 220 Synchronizable Tim
31. TSYNC ERROR TSYNC GO setSWEdge TSYNC BoardHandle hnd OD PIN gpo EDGE edge Function TSYNC_GO_getSWPerCorr Description Get the GPO s square wave period correction Parameters IN hnd Board handle i gpo GPO index num Pointer to the square wave period correction numerator x den Pointer to the sguare wave period correction denominator Returns TSYNC SUCCESS Success aA DLL EXPORT TSYNC ERROR TSYNC GO _getSWPerCorr TSYNC BoardHandle hnd OD PIN gpo unsigned int num unsigned int den Function TSYNC_GO_setSWPerCorr Description Set the GPO s square wave period correction The numerator and denominator are in the range of 0 to 255 where the numerator must be less than the denominator anda 4 numerator of 0 indicating no period correction Parameters i IN hnd Board handle g gpo GPO index F num Square wave period correction numerator k den Sguare wave period correction denominator Returns TSYNC SUCCESS Success 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 IN hnd Board handle E gpo GPO index Synchronizable Timecode Generator Supplemental Information 4 129 TSync PCle Factory Driver Guide Spectracom C
32. Where lt pin gt can be a value of 0 through 3 Where lt index gt 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 hnd unsigned int nInstance int noffset Description Get the 1PPS reference s input offset Offset is in nanoseconds Input Parameters hnd Board handle ninstance The instance number Output Parameters nOffset The offset result Returns TSYNC_SUCCESS Success 4 2 22 2 TSYNC_PR_setOffset TSYNC_ERROR TS INC PR setOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Description Set the 1PPS reference s input offset Offset is in nanoseconds from 500 msec to 500 msec Input Parameters hnd Board handle ninstance The instance number nOffset The offset Returns TSYNC SUCCESS Success 4 206 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 4 2 22 3 TSYNC PR getEdge TSYNC ERROR TSYNC PR ge tEdge 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 EDGE edge
33. li NFO lt UD STOP typedef enum UD_PAR_NONE UD PAR ODD UD PAR EVEN NFO lt UD PAR typedef struct UD_BR br UD DATA numbits UD STOP stopbits D PAR parity UD CFG Display services typedef enum DP MODE NORMAL 0 DP MODE PHOTO 1 DP MODE TEST 2 DP MODE Hardware services include tsync_hw h TSync PCle Factory Driver Guide Data bits Data bits Data bits Data bits X X A aN 1 Stop bit 1 5 Stop bits Stop bits N Parity none Odd parity Even parity Normal operational mode Photo mode Display test mode TSYNC MATCH OBJECT ES typedef struct TSYNC MatchObj unsigned char matchType double seconds unsigned char minutes start stop time seconds minutes Synchronizable Timecode Generator Supplemental Information 4 15 TSync PCle Factory Driver Guide unsigned char hours unsigned short days TSYNC_MatchObj Spectracom Corporation hours days TSYNC SATINFO OBJECT eb typedef struct TSYNC SatObj unsigned char satsTracked count of satellites tracked unsigned char satsView count satellites in view TSYNC_SatObj TSYNC HEARTBEAT OBJECT Af typedef struct TSYNC HeartObj unsigned char signalType square or pu
34. Description Sets the module s current MAC Address Parameters a IN hnd Board handle i nInstance The instance number Spectracom Corporation Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 2 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 E IN hnd Board handle x nInstance The instance number id pobj MAC Address object Returns TSYNC SUCCESS Success DLL_EXPORT TSYNC_ERROR TSYNC_PTR_setMacAddr TSYNC_BoardHandle hnd unsigned int nInstance TSYNC PTPMacAddrPwObj pobj Function TSYNC_PTR_getMasterActive Description Gets the Master Active state Parameters IN hnd Board handle a nInstance The instance number x pobj MAC Address object Returns TSYNC SUCCESS Success xf DLL_EXPORT TSYNC_ERROR TSYNC_PTR_getMasterActive TSYNC BoardHandle hnd unsigned int nInstance int bMasterActive Function TSYNC PTR getModuleStatus Description Gets the Module Status Parameters IN hnd Board handle x nInstance The instance number bModuleStatus Module Status Reset Cause
35. Input Parameters hnd Board handle 4 178 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide index GPO index information pObj Pointer to the time information Returns TSYNC_SUCCESS Success 4 2 16 13 TSYNC_HW_getFpgalnfo TSYNC_ERROR TSYNC HW getFpga Info TSYNC BoardHandle handle unsigned short xid unsigned short rev Description Get the the FPGA ID and version information Input Parameters hnd Board handle Output Parameters id The ID result rev The version result Returns TSYNC SUCCESS Success 4 2 16 14 TSYNC HW getlntMask TSYNC ERROR TSYNC HW get IntMask TSYNC BoardHandle handle INT TYPE intType unsigned int index int 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 Returns TSYNC_SUCCESS Success 4 2 16 15 TSYNC_HW_setintMask TSYNC_ERROR TSYNC HW s etIntMask TSYNC BoardHandle handle INT TYPE intType Synchronizable Timecode Generator Supplemental Information 4 179 TSync PCle Factory Driver Guide Spectracom Corporation unsigned int index int bEnable Description Set the hardware interrupt masking enabled state Input Parameters hnd Board handle intType the inte
36. Output Parameters pObj Pointer to the time scale result Returns TSYNC_SUCCESS Success 4 2 8 4 TSYNC_CS_setTimeScale TSYNC_CS_setTimeScale TSYNC BoardHandle hnd TSYNC TimeScaleObj poObj Description Set the board s time scale Input Parameters hnd Board handle pObj Pointer to the time scale information Returns TSYNC SUCCESS Success 4 2 8 5 TSYNC CS getTimeScaleOff TSYNC CS Getlimescaleore TSYNC BoardHandle nady TSYNC TimeScaleOffsetObj pObj 4 144 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 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 setTimeScale0ff TSYNC BoardHandle hnd TSYNC_TimeScaleOffsetObj poObj 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 Returns TSYNC SUCCESS Success 4 2 8 7 TSYNC CS subsecAdj TSYNC ERROR TSYNC CS subsecAd TSYNC BoardHandle hnd TSYNC TimeSubsecAdjObj pObj Description Make a one time adjustment to the 1PPS on time point Adjustment is in nanoseconds Input Parameters hnd Board handle pObj Pointer t
37. Returns TSYNC SUCCESS Success A DLL EXPORT TSYNC ERROR TSYNC AP setFormat TSYNC BoardHandle hnd unsigned int nInstance AL FMT format Function TSYNC_AP_getMode Description Get the ASCII output mode Parameters IN hnd Board handle ninstance The instance number OUT mode The mode Returns TSYNC SUCCESS Success a 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 IN hnd Board handle nInstance The instance number j mode The mode information Returns TSYNC SUCCESS Success xf DLL EXPORT TSYNC ERROR TSYNC AP setMode TSYNC BoardHandle hnd Synchronizable Timecode Generator Supplemental Information 4 83 TSync PCle Factory Driver Guide Spectracom Corporation unsigned int nInstance AL OUT MODE mode Function TSYNC_AP_getReqChar Description Get the ASCII output request character Parameters IN hnd Board handle G nInstance The instance number req The request character result Returns TSYNC SUCCESS Success z DLL EXPORT TSYNC ERROR TSYNC AP getRegChar TSYNC BoardHandle hnd unsigned int nInstance char reg JR Function TSYNC AP setRegChar Description Set the ASCII output request character Param
38. 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 Synchronizable Timecode Generator Supplemental Information 4 149 TSync PCle Factory Driver Guide Spectracom Corporation 4 2 8 22 TSYNC_CS_getTimeBcd TSYNC_ERROR TSYNC CS getTimeBcd TSYNC BoardHandle hnd TSYNC TimeBCDObj pobj Description Get the time in BCD format Input Parameters hnd Board handle Output Parameters pObj Pointer to the time result Returns TSYNC SUCCESS Success 4 2 8 23 TSYNC CS setTimeBcd TSYNC ERROR TSYNC CS setTimeBcd TSYNC BoardHandle hnd TSYNC TimeBCDObj poObj Description Set the time in BCD format Input Parameters hnd Board handle pObj Pointer to the time information Returns TSYNC SUCCESS Success 4 2 8 24 LED Components EC Calls EC calls drive the LED indicators Note Where Display State 0 LED off solid 1 LED on solid 2 LED Blinks on off at a 2 Hz rate 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 4 150 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync Defaults Green LED Sync Starus Yellow LED Holdover Status Red LED Alarm Status 4 2 8 25 TSYNC_EC_getMode TSYNC ERR
39. The signature control information Returns TSYNC SUCCESS Success EZ DLL EXPORT TSYNC_ ERROR TSYNC_ETP_setSigCtrl TSYNC BoardHandle hnd unsigned int nInstance SIG CTL sig Function TSYNC ETP getCfg Description Get the E1 T1 output configuration parameters Parameters IN hnd Board handle A nInstance The instance number OUT pCfg Pointer to the configuration parameter structure ES 4 116 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC ETP getCfg TSYNC BoardHandle hnd unsigned int nInstance ETO CFG oCfg f Function TSYNC_ETP_setMode Description Set the E1 T1 output configuration parameters Parameters IN hnd Board handle ninstance The instance number id OUT pCfg Pointer to the configuration parameter structure Returns TSYNC SUCCESS Success ava DLL EXPORT TSYNC ERROR TSYNC ETP setCfg TSYNC BoardHandle hnd unsigned int nInstance ETO CFG ocfg Function TSYNC ETP getNumInst Description Get number of El T1 output set instances in the system Parameters IN hnd Board handle OUT nInstances The number of instances result Returns TSYNC SUCCESS Success xf DLL EXPORT TSYNC_ ERROR TSYNC_ETP_getNumInst TSYNC BoardHandle hnd
40. amp HW clrintCnt Added November 2010 QuickPTP info Added 32 64 bit Lib DLL comments Added Windows 7 support comment Added 32 64 bit a so comments Other minor corrections G 2570 Added 8 removed API calls updated header file additional January 2011 minor maintenance Spectracom Corporation 95 Methodist Hill Drive Rochester NY 14623 www spectracomcorp com Phone US 1 585 321 5800 Fax US 1 585 321 5219
41. gpo GPO index OUT sig The signature control result Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC GO getSigCtrl TSYNC BoardHandle hnd OD PIN gpo SIG CTL sig Function TSYNC GO setSigCtrl Description Set the GPO s signature control state Parameters IN hnd Board handle gpo GPO index gt sig The signature control information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GO setSigCtrl TSYNC BoardHandle hnd OD PIN gpo SIG CTL sig Function TSYNC_GO_getEnable Description Get the GPO s enable state Parameters IN hnd Board handle gpo GPO index OUT bEnable The output enable result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GO getEnable Synchronizable Timecode Generator Supplemental Information 4 123 4 124 TSync PCle Factory Driver Guide TSYNC BoardHandle hnd OD_PIN gpo int bEnable Function TSYNC GO setEnable Description Set the GPO s enable state Parameters IN hnd Board handle gpo GPO index bEnable The output enable information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GO setEnable TSYNC BoardHandle hnd OD PIN gpo int bEnable Function TSYNC GO getValue Description Get the GPO s current output value Parameters al I
42. hnd Board handle index Table entry index Synchronizable Timecode Generator Supplemental Information 4 49 TSync PCle Factory Driver Guide Spectracom Corporation 2 OUT pObj Pointer to the table entry result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC_ERROR TSYNC RS getEntry TSYNC_BoardHandle hnd int index TSYNC_TableEntryObj pObj PR Function TSYNC RS addEntry Description Add an entry to the working priority table Parameters IN hnd Board handle pobj Pointer to the table entry information Returns TSYNC_SUCCESS Success xf DLL EXPORT TSYNC ERROR TSYNC RS addEntry TSYNC BoardHandle hnd TSYNC TableEntryObj pObj Function TSYNC_RS_setFactDef Description Reset the working priority table to the factory priority table Parameters i IN hnd Board handle Returns TSYNC SUCCESS Success xP DLL EXPORT TSYNC ERROR TSYNC RS setFactDef TSYNC BoardHandle hnd f Function TSYNC_RS_setUserDef Description Reset the reference table to the user default settings if saved user priority table exists Parameters T IN hnd Board handle Returns TSYNC_SUCCESS Success xf DLL EXPORT TSYNC ERROR TSYNC RS setUserDef TSYNC BoardHandle hnd Function TSYNC_RS_saveUserDef Description Save the working priority table to the user priority
43. hnd Board handle k OUT bSync Pointer to the current sync state result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC SS getSync TSYNC BoardHandle hnd int bSync Function TSYNC_SS_getHoldover Description Get the current holdover state Parameters IN hnd Board handle OUT bHoldover Pointer to the current holdover state result Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC SS getHoldover TSYNC BoardHandle hnd int bHoldover Function TSYNC SS getHoldoverTO Description Get the current holdover timeout Parameters g IN hnd Board handle 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 IN hnd Board handle i nHoldoverTimeout Pointer to the current timeout state information Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC SS setHoldoverTo TSYNC BoardHandle hnd Synchronizable Timecode Generator Supplemental Information 4 47 TSync PCle Factory Driver Guide Spectracom Corporation unsigned int nHoldoverTimeout Function TSYNC_SS_getTimestamp Descriptio
44. jiffies Pointer ot the jiffies timeout value Returns TPRO COMM ERR error communicating with driver TPRO TIMEOUT ERR timeout waiting on heartbeat interrupt TPRO SUCCESS success 6 2 16 TPRO waitMatch unsigned char TPRO waitMatch TPRO BoardObj hnd int jiffies Description This routine will report the status of the match time interrupt Given an amount of time in jiffies the return code will report timeout or success determined by the match time interrupt status This routine is tied to general purpose output 1 Input Parameters 6 10 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide hnd Board handle jiffies Pointer to the jiffies timeout value Returns TPRO_COMM_ERR error communicating with driver TPRO_TIMEOUT_ERR timeout waiting on heartbeat interrupt TPRO_SUCCESS success Synchronizable Timecode Generator Supplemental Information 6 11 Document Revision History Rev ECN Description Date A 2271 First draft of Spectracom documentation for this product B 2310 Added Windows driver C 2299 Revisions concurrent to addition of external GPS receiver board D 2341 Changes to bring manual current to software revision 1 4 0 Changed header file section 4 1 1 E 2498 Reorganized API driver calls updated header files additional September 2010 maintenance F 2551 Added new API calls HW_getIntCnt
45. 0 Disciplining XO MODE TEST 1 Testing XO MODE Shared Memory services typedef enum DI NMEA GGA DI NMEA GLL DI NMEA GSA DI NMEA GSV DI N E DI N DIN NMEA messages N lt y H Q 1 1 OU BUN HFO lt lt HE BE D DD DA S DI NUM Total number of data items H H zal lt 0 lt S DI ALL 1 Refers to all data items MS DI INDEX TRIG Output services typedef enum IO PORT 0 IO PORT MIN IO PORT 1 IO PORT 2 IO PORT 3 IO PORT 4 5 6 al i lt lt lt lt IO PORT IO PORT IO PORT Ii YOORWNHEOO Add more IRIG Outputs here Synchronizable Timecode Generator Supplemental Information 4 13 TSync PCle Factory Driver Guide 4 14 IO_PORT NUM IO PORT 8 El T1 Output services typedef enum ETO OUT OPT DIFF 0 ETO OUT OPT SINGLE 1 ETO OUT OPT typedef enum ETO MODE T1 0 ETO MODE El 1 77 ETO MODE DISABLE 2 ETO MODE typedef enum ETO T1 ENC typedef enum 3 TO T1 FRM ETO T1 ENC B8ZS ETO T1 ENC AMI 3 TO T1 FRM ESF 3 TO Tl FRM D4SF ESF NO CRC6 I lt I y SS CRC6 N RS ba 3 ET
46. 0 followed by the desired time and date Once the time has been manually set the last step to use the hst0 as the time reference is to declare the host as having valid time using the hr setvalidity command Refer to Section 4 2 15 2 The command structure for this command is Hr setvalidity 0 1 After this command has been issued the TSync board will use the host as its time reference As long as the host is synchronized to the external GPS receiver the host s time date will be synced to GPS and the board will be synced to the host s time If the host is not externally synced to the GPS receiver the host PC and the board will have the same time but they won t match the time of the GPS receiver 5 240 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Once changes have been made to the Reference Table this table can be saved in the card and persist across reboots by using this command RS setUserDef 0 The other two steps of initially setting the time and setting the validity of the time input will need to be performed manually or via the driver each time the host PC is powered down if it isn t left up and running all of the time Be advised that the default time scale for the TSync board is UTC not the same as raw GPS which is currently 15 seconds different than UTC due to periodic leap seconds added to UTC time scale If the computer is synchronized with raw G
47. 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 oba 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 TSYNC ERROR TSYNC US start TSYNC BoardHandle hnd TSYNC FSImageHeaderObj obj Description Begin an image update seguence Input Parameters hw Handle Output Parameters obj Pointer to the update header information Returns TSYNC SUCCESS Success 4 2 26 3 TSYNC US Data TSYNC ERROR TSYNC US data Synchronizable Timecode Generator Supplemental Information 4 227 TSync PCle Factory Driver Guide Spectracom Corporation TSYNC BoardHandle hnd TSYNC UpdateDataObj obj Description Send a single data block in the update seguence Input Parameters hw Handle Output Parameters obj Pointer to the update data information Returns TSYNC SUCCESS Success 4 2 26 4 TSYNC US End TSYNC ERROR TSYNC US end TSYNC BoardHandle hnd TSYNC UpdateEndoObj obj Description Finish the update seguence 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
48. Clock result Returns TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC OR getlLocal TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pobj Function TSYNC_QR_setLocal Description Set the STANAG HaveQuick reference s local time zone and DST 4 79 Synchronizable Timecode Generator Supplemental Information TSync PCle Factory Driver Guide Spectracom Corporation id rule Timezone and DST offsets are in seconds Parameters IN hnd Board handle x ninstance The instance number id pobj Pointer to the Local Clock information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC OR setLocal TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pObj Function TSYNC OR getTimeScale Description Get the STANAG HaveQuick reference s time scale Parameters x IN hnd Board handle x ninstance The instance number x OUT pObj Pointer to the time scale result Returns TSYNC_SUCCESS Success EL DLL EXPORT TSYNC_ERROR TSYNC_QR_getTimeScale TSYNC_BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj JK Function TSYNC OR setTimeScale Description Set the STANAG HaveQuick reference s time scale Parameters E IN hnd Board handle A nInstance The instance number id pobj Pointer to the time scale information Re
49. ClockDaemonService exe will set the computers system clock like the Clock Daemon exe but will run as a Windows service As a service it can be set to run automatically on Windows startup This program can be installed as a service 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 Service program 2 8 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide This program can be removed as a service by running ClockDaemonService ex r from a command line The controls for device name and update interval are setup 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 Synchronizable Timecode Generator Supplemental Information 2 9 TSync PCle Factory Driver Guide Spectracom Corporation 2 3 6 QuickPTP Utility The QuickPTP utility provides a graphical interface to a TSync board with the PTP option The utility is run as follows 1 From the Windows Start menu select the Programs folder 2 Select the Spectracom Corp TSync PTP folder 3 Select the QuickPTP program TSync Choice TSyne Support Device Name W itsyncpci Board Index 0 For Evaluation Only Index 0 Release
50. Description Set the 1PPS reference s active edge setting Input Parameters hnd Board handle ninstance The instance number edge The edge information Returns TSYNC SUCCESS Success 4 2 22 5 TSYNC PR getValidity TSYNC ERROR TSYNC PR ge tValidity TSYNC BoardHandle hnd unsigned int nInstance int bTimeValid int bPpsValid Description Get the 1PPS validity structure Input Parameters hnd Board handle Synchronizable Timecode Generator Supplemental Information 4 207 TSync PCle Factory Driver Guide Spectracom Corporation ninstance The instance number Output Parameters 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 4 2 22 7 TSYNC PR getRefid TSYNC ERROR TSYNC_PR _ getRefId TSYNC BoardHandle hnd unsigned int nInstance TSYNC RefIdObj poObj Description Get reference identifier for a PPS reference instance Input Parameters hnd Board handle ninstance The instance number pObj Pointer to the Reference ID Returns TSYNC SUCCESS Success 4 2 23 PTP Reference Component PTR Calls PTR call
51. Description Set the time from the Host Input Parameters hnd Board handle ninstance the Instance Number pObj the Time to set Returns TSYNC_SUCCESS Success 4 2 15 4 TSYNC_HR_getLocal TSYNC ERROR TSYNC HR getLocal TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pObj Description Get the Host reference s local time zone and DST rule Timezone and DST offsets are in seconds Input Parameters hnd Board handle nlnstance the Instance Number Output Parameters 4 172 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Returns TSYNC_SUCCESS Success 4 2 15 5 TSYNC_HR_setLocal TSYNC ERROR TSYNC HR sethocal TSYNC_BoardHandle hnd unsigned int nInstance TSYNC LocalClockobj poObj 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 4 2 15 6 TSYNC HR getTimeScale TSYNC ERROR TSYNC HR g tTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleob pObj Description Get the Host reference s time scale Input Parameters hnd Board handle ninstance the Instance Number Output Parameters pObj The Time Scale information Returns TSYNC_SUCCESS Success 4 2 15 7 TSYNC_HR_setTimeScale TSYNC ERRO
52. Description Manually generate a hardware timestamp Input Parameters hnd Board handle Returns TSYNC SUCCESS Success 4 2 16 6 TSYNC HW setTsClear TSYNC ERROR TSYNC HW setTsClear TSYNC BoardHandle handle TMSTMP SRC source Description Clear all collected timestamps from the specified source Input Parameters hnd Board handle source Timestamp source Returns TSYNC SUCCESS Success 4 2 16 7 TSYNC HW getTsCount TSYNC ERROR TSYNC HW getTsCount TSYNC BoardHandle handle TMSTMP SRC source 4 176 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 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 TSYNC ERROR TSYNC HW getTsData TSYNC BoardHandle handle TMSTMP SRC source TSYNC HWTimeDataObj pObj Description Get all collected timestamps for the specified source Input Parameters hnd Board handle source The timestamp source information Output Parameters pObj Pointer to the timestamp data result Returns TSYNC SUCCESS Success 4 2 16 9 TSYNC HW getMatchTimeHi TSYNC ERROR TSYNC HW ge tMatchTimeHi TSYNC BoardHandle handle OD PIN index TSYNC TimeObj poObj Description Get t
53. EC STATE ON EC STATE BLINK EC STATE CODE LED off solid LED on solid LED blinks on off 2Hz rate LED blinks a code 2Hz rate 28sec pause ou WNFO lt lt lt EC STATE NUM EC STATE typedef enum E ALL 1 anda CH UO BUWNFEO li U BUWNFHEO lt T E EDS_NUM LE_INDEX GPS Reference services typedef enum GL_DYN_LAND GL DYN SEA GL DYN AIR GL DYN STAT ll WNrRo Sos GL DYN typedef enum GL_MODE_1SAT 0 GL MODE STND 1 GL MODE CONT 2 GL MODE AVRG 3 GL MODE TIME 4 GL MODE STBY 5 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 GL RESET FACT 4 Cold reset restore factory settings GL RESET SAVE 5 Reset GPS save settings GL RESET SAASM ZKEY 16 SGPS Zeroize Keys Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide
54. ERROR TSYNC GR getSurveyProg TSYNC BoardHandle hnd unsigned int nInstance unsigned int nProgress Function TSYNC GR _getMfrMadl Description Get the GPS receiver manufacturer and model Parameters IN hnd Board handle x nInstance The instance number OUT pObj Pointer to the manufacturer and model result Returns TSYNC_SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC GR getMfrMdl TSYNC BoardHandle hnd unsigned int nInstance 4 68 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC_ManModObj pObj V d Function TSYNC GR getRcvInfo Description Get the GPS receiver info Parameters IN hnd Board handle 2 nInstance The instance number lt OUT pObj Pointer to the receiver info result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GR getRovInfo TSYNC BoardHandle hnd unsigned int nInstance TSYNC ReceiverInfoObj pObj Function TSYNC GR getCustom Description Get the last unhandled GPS message Parameters IN hnd Board handle y ninstance The instance number a OUT pObj Pointer to the custom message result Returns TSYNC SUCCESS Success gt DLL EXPORT TSYNC ERROR TSYNC GR getCustom TSYNC BoardHandle hnd unsigned int nInstance TSYNC CustomMessageObj poObj
55. Factory Driver Guide Spectracom Corporation TSYNC GSSIP Key State Data Structure type OBJECT typedef struct unsigned int valid Current Key s are valid unsigned int warn Key s will expire soon TSYNC ReceiverKeyState J TSYNC GSSIP COM1 Usage Structure type OBJECT typedef struct GL_PARM type GL COM1 USE use TSYNC ReceiverParmUseObj PTP MODULE INFO OBJECT x 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 unsigned char netMask 4 unsigned char defaultGateway 4 unsigned char ipAddress 4 TSYNC_PTPEthernetItfObj PTP CLOCK SETTINGS OBJECT typedef struct int ptpClockRunning int usingExternalClock TSYNC_PTPC1kSettingsObj 4 26 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide PTP UNIT SETTINGS OBJECT Ef typedef struct unsigned char clockIdentity 8 int oneStepMode int slaveOnly int unicast unsigned int domainNumber unsigned int priorityl unsigned int priority2 TSYNC PTPUnitSetti
56. Factory Driver Guide Spectracom Corporation TSYNC ERROR TSYNC_XO getDac TSYNC BoardHandle hnd unsigned short dac Description Get the external oscillator s DAC setting for testing Input Parameters hnd Board handle 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 ge tAlarm TSYNC BoardHandle hnd unsigned int alarm Description Get the external oscillator s alarm state Input Parameters hnd Board handle Output Parameters alarm The alarm result Returns TSYNC SUCCESS Success 4 2 27 7 TSYNC XO getSerNum TSYNC ERROR TSYNC XO getSerNun TSYNC BoardHandle hnd unsigned int sernum 4 230 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Description Get the external oscillator s serial number Input Parameters hnd Board handle Output Parameters sernum The serial number result Returns TSYNC_SUCCESS Success 4 2 27 8 TSYNC_XO_getMfrMdl TSYNC_ERROR TSYNC XO getMfrMdl TSYNC BoardHandle hnd TSYNC_ManModObj poObj Description Get the external oscillator s manufacturer and m
57. 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 TSYNC ERROR TSYNC XS unregister TSYNC BoardHandle hnd TSYNC MeterHandle poObj Description Free the specified meter Input Parameters hnd Board handle pObj Pointer to the meter handle information Returns TSYNC_SUCCESS Success 4 2 28 3 TSYNC_XS_GetWindowSize TSYNC_ERROR TSYNC XS getWindowSize TSYNC BoardHandle hnd TSYNC MeterWinSizeObj pObj Description Get the specified meter s window size Size is in seconds Input Parameters hnd Board handle Output Parameters pObj Pointer to the window size result Returns TSYNC_SUCCESS Success 4 2 28 4 TSYNC_XS_SetWindowSize TSYNC_ERROR TSYNC XS setWindowSize TSYNC BoardHandle hnd 4 234 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 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 Description Get the specified meter s error data Error data is in nanoseconds Input Parameters hnd Board handle Output Parameters pObj Po
58. ML DST REF typedef El Ze E E mG mw eae Mn 224 Dm D K ul z 3 vy u O JOUGURBUN FO lt lt E El U Q Il Z 3 4 I i WO lt 3 J 1 m o z El z 3 UZonrac HOOnMaGCacCCrPrUPTHPOA Ii as 1 C 0 00 000 OOO OOOO I El ML MONTE typedef enum L WOM NONE L WOM FIRST WOM SECOND L WOM THIRD L WOM FOURTH WOM LAST 1 lt lt lt lt lt c Ii UO BUWNFHEO ML WOM typedef enum ML DOW SUN 0 ML DOW MON 1 ML DOW TUE 2 ML DOW WED 3 ML DOW THU 4 ML DOW FRI 5 ML DOW SAT 6 ML_DOW typedef enum ML HOUR START TYPES Spectracom Corporation First time type in the list Year Day of Year Hour Min Sec nsec BCD Year Day of Year Hour Min Sec ms us Total number of seconds in epoch nsec Number of time types Li Reference is local time Reference is UTC First hour type in the list Synchronizable Timecode Generator Supplemental Information Spectracom Corporation ML HOUR 12 ML HOUR 24 ML HOUR NUM TYPES ou HO sos ML HOUR TSync PCle Factory Driver Guide 12 hour format 24 hour format Number of hour types Number of different message formats that can be sent each second define AL FMT MAX 3
59. 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 int 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 4 2 24 4 TSYNC_RS_addEntry TSYNC_ERROR TSYNC RS addEntry TSYNC_BoardHandle hnd TSYNC_TableEntryObj pObj Description Add an entry to the working priority table Input Parameters hnd Board handle pObj Pointer to the table entry information Returns TSYNC_SUCCESS Success 4 218 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 4 2 24 5 TSYNC_RS_setFactDef TSYNC_ERROR TSINC RS _setFactDef TSYNC BoardHandle hnd Description Reset the working priority table to the factory priority table Input Parameters hnd Board handle Returns TSYNC SUCCESS Success 4 2 24 6 TSYNC RS setUserDef TSYNC ERROR TSYNC RS setUserDetf 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
60. Source 0 timestamps for GPI pins 0 through 1 use Sources 1 through 4 5 3 Match Time The General I O is configurable as a Match Time Event pin GPO1 which will activate at a preset time and become inactive at another preset time The Match Time Event provides two user settable times to make the General I O pin active and inactive The Match Time Event configured General I O pin has a programmable edge allowing the selection of Low to High or High to Low The following are commands utilized for match time GO SetEnable General enable of a general purpose output GO SetMode Set the general purpose output to match time mode mode 1 GO SetMatchEnable Enable disable the time match of a general purpose output Each output must be enabled for matching high level times and low level times 5 238 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide HW SetMatchTimeHi Set the time at which the specified general purpose output should go high Time can be set up to 100 days ahead and as close as 50 msec HW SetMatchTimeLo Set the time at which the specified general purpose output should go low Time can be set up to 100 days ahead and as close as 50 msec The three Go commands GO SetEnable GO SetMode and GO SetMatchEnable are one time commands that only need to be entered after the board is powered up to enable the match time functionalit
61. Success x DLL EXPORT TSYNC ERROR TSYNC_PR_getOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset PYR Function TSYNC PR setOffset Description Get the 1PPS reference s 1PPS input offset Offset is in nanoseconds Parameters x IN hnd Board handle id nInstance The instance number a noffset The offset Returns TSYNC SUCCESS Success af DLL EXPORT TSYNC ERROR TSYNC_PR_setOffset TSYNC BoardHandle hnd unsigned int nInstance int nOffset Function TSYNC_PR_getEdge Description Get the 1PPS reference s active edge setting Parameters i IN hnd Board handle x nInstance The instance number 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 Synchronizable Timecode Generator Supplemental Information 4 57 Spectracom Corporation TSync PCle Factory Driver Guide Description Parameters IN hnd ninstance edge Returns AL DLL EXPORT TSYNC_ERROR TSYNC_PR_setEdge TSYNC BoardHandle hnd Set the 1PPS reference s active edge setting Board handle The instance number The edge information TSYNC_SUCCESS Success unsigned int nInstance EDGE edge V d Function TSYNC PR getValidity
62. TSync PCle user manual The intType value of the wait for call configures which interrupt to wait for before proceeding Refer to the table below for the intType values and their corresponding interrupt types intType value Interrupt type 0 1PPS Received 1 Timing System Service Request 2 Local uC Bus FIFO Empty 3 Local uC Bus FIFO Overflow 4 uC Local Bus FIFO Data Ready 5 uC Lcoal Bus FIFO Overflow 6 GPIO Input Event 7 Timestamp Data Ready 8 GPIO Output Event Interrupt usage is setup by unmasking the interrupt using the TSYNC HW setIntMask API call Refer to Section 4 2 16 15 The user s application software would then wait on an interrupt utilizing the TSYNC_waitfor API call Refer to Section 4 2 5 Assuming the user would use the General Purpose Outputs GPO in square wave mode to generate periodic interrupts you would need to set the output mode using the TSYNC_GO_setMode API Refer to Section 4 2 12 7 Then you would need to set the square wave configuration using the TSYNC_GO_setSquareWave API Section 4 2 12 13 Finally you would enable the GPO using the TSYNC GO setEnable API Section 4 2 12 4 After perfoming these calls you would receive an interrupt based on the period that the GPO is set to TSYNC_hwSetintMask 5 236 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide
63. TSync PCle Factory Driver Guide af DLL EXPORT TSYNC_ERROR TSYNC_DP_setTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Function TSYNC_DP_getNumInst Description Get number of display output instances present in the system Parameters E IN hnd Board handle OUT nInstances The number of instances result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC DP getNumInst TSYNC BoardHandle hnd unsigned int nInstances PE Function TSYNC DP getMode Description Get the display mode Parameters x IN hnd Board handle ninstance The instance number OUT mode The mode result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC_ERROR TSYNC_DP_getMode TSYNC BoardHandle hnd unsigned int nInstance DP MODE mode Function TSYNC_DP_setMode Description Set the display mode Parameters IN hnd Board handle ninstance The instance number k format The format information Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC_ERROR TSYNC_DP_setMode TSYNC BoardHandle hnd unsigned int nInstance DP MODE mode 1PPS Output Component x PX Function TSYNC PP getSigCtrl Description Get the PPS output s signature control state ES Synchronizable Timecode Generator Supplemental Information 4 111 TSync PC
64. Timecode Generator Supplemental Information Spectracom Corporation TSYNC_SUCCESS Success 4 2 18 7 TSYNC_IP_getFormat TSYNC ERROR TSYNC_IP getFormat TSYNC BoardHandle hnd IO PORT 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 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 Returns TSYNC SUCCESS Success 4 2 18 9 TSYNC IP getAmplitude TSYNC ERROR TSYNC IP getAmplitude TSYNC BoardHandle hnd IO PORT nInstance unsigned int amp Description Get the IRIG amplitude Amplitude is in range of 3 255 Input Parameters hnd Board handle Synchronizable Timecode Generator Supplemental Information TSync PCle Factory Driver Guide 4 185 TSync PCle Factory Driver Guide Spectracom Corporation ninstance The instance number Output Parameters amp The amplitude result Returns TSYNC_SUCCESS Success 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 Pa
65. by the Host Use the CS SetTimeScaleOff lt device gt 1 lt offset gt command to set the offset 3 If there are multiple masters on the network the TSync PTP uses the Best Master Clock algorithm specified in the PTP Specification to decide whether or not to become a master If after applying the BMC algorithm the TSync PTP determines that there is a better master the device will transition into the Passive port state A full discussion of the Best Master Clock algorithm is beyond the scope of this document but the first thing the algorithm considers is the priority1 parameter with lower values having higher priority If more than one master is broadcasting on a network the Master who is broadcasting the lowest number in the priority1 field will become the Active Master and all other masters will become passive Other points of note when operating a TSync PTP card as a Master The Ethernet packets generated by the TSync PTP card have a TTL Time To Live value of 1 They will not propagate through standard routers If using a time source such as standard IRIG which does not provide the Current Year this can be provided to the TSync by using the the CS SetYear Example Program When first setting up a TSync PTP Master please use CS_GetTime to ensure that the proper year is used The PTP standard supports the transmission of Leap Second information The only available reference on the TSync that provides Leap Second informat
66. 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 lt edge gt O 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 nInstance SIG CTL sig Description Get the PPS output s signature control state Input Parameters hnd Board handle ninstance The instance number Output Parameters sig The signature control result Returns TSYNC_SUCCESS Success 4 2 21 2 TSYNC_PP_setSigCtrl TSYNC_ERROR TSYNC PP setSigCtrl TSYNC BoardHandle hnd IO PORT nInstance SIG CTL sig Description Set the PPS output s signature control state Input Parameters hnd Board handle ninstance The instance number sig The signature control information 4 202 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Returns TSYNC_SUCCESS Success 4 2 21 3 TSYNC_PP_getFreq TSYNC_ERROR TSYNC PP getFreg TSYNC BoardHandle hnd IO PORT nInstance unsigned int freg Description Get the PPS output s frequency Frequency is 1 Hertz Input Parameters hnd Board handle ninstance The instance number Output Parameters freg The freguency result Returns TSYNC SUCCESS Success 4 2 21 4 TSYNC PP getOffset TSYNC ERROR TSY
67. 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 TSYNC_ERROR TSYNC_GO getDvmValue TSYNC BoardHandle hnd OD_PIN gpo 4 160 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide int bValue Description Get the GPO s Direct Value Mode DVM value state Input Parameters hnd Board handle gpo GPO index Output Parameters bValue The DVM result Returns TSYNC SUCCESS Success 4 2 12 9 TSYNC GO setDvmValue TSYNC ERROR TSYNC GO setDvmValue TSYNC BoardHandle hnd OD PIN gpo int 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 ivl int bEnable Description Get the GPO s match enable state and level Input Parameters hnd Board handle gpo GPO index lvl Low or High Match Time Output Parameters bEnable Match enable Returns TSYNC_SUCCESS Success Synchronizable Timecode Generator Supplemental Information 4 161 TSync PCle Factory Driver Guide Spectracom Corporation 4 2 12 11 TSYNC_GO_setM
68. hnd unsigned int nInstances Description Get number of GPIO Outputs present in the system Input Parameters hnd Board handle Output Parameters ninstances The number of instances result Returns TSYNC SUCCESS Success 4 2 13 GPS Reference Component GR Calls GR calls execute the GPS receiver s protocol and determine 1PPS and time validity Note Where lt setmode gt 0 Single satellite mode 1 Standard mode 2 Continuous mode 3 Averaging mode 4 Timing mode 5 Standby mode 6 Self mode Where lt dyn gt 0 Land 1 Sea 2 Air 3 Stationary Where lt index gt should always be a value of 0 with only one board installed 4 2 13 1 TSYNC_GR_getOffset TSYNC_ERROR TSYNC GR getOffset TSYNC BoardHandle hnd Synchronizable Timecode Generator Supplemental Information 4 163 TSync PCle Factory Driver Guide Spectracom Corporation unsigned int ninstance int nOffset Description Get the GPS reference s 1PPS input offset Offset is in nanoseconds Input Parameters hnd Board handle ninstance The instance number Output Parameters nOffset The offset result Returns TSYNC SUCCESS Success 4 2 13 2 TSYNC GR setOffset TSYNC ERROR TOYNG GR setOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Description 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 in
69. hnd Board handle ninstance The instance number pObj Pointer to the User Description object Returns TSYNC SUCCESS Success 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 lt Table type gt 0 Factory table 1 User table 2 Working table Where lt enable gt 0 Input References not enabled 1 Input References enabled Where lt index gt can be a value of 0 through 7 Where the index is the row of the table Where lt priority gt can be a value of 1 through 8 With 1 being the highest priority reference and 8 being the lowest priority reference 4 2 24 1 TSYNC RS getTable TSYNC ERROR TSYNC RS getTable TSYNC BoardHandle hnd TSYNC TableTypeObj pobj TSYNC ReferenceTableObj pObj2 Description Get specified reference priority table Input Parameters hnd Board handle pObj Pointer to the table type information Output Parameters pObj2 Pointer to the reference result Returns TSYNC_SUCCESS Success Synchronizable Timecode Generator Supplemental Information 4 217 TSync PCle Factory Driver Guide Spectracom Corporation 4 2 24 2 TSYNC_RS_getBestRef TSYNC_ERROR TSYNC RS_getBestRef TSYNC BoardHandle hnd TSYNC_TableEntryObj pObj Description Get current best working priority table entry Input Parameters hnd Board handle Output Parameters pObj
70. indexed index the index of the interrupt 0 for non indexed interrupts Output Parameters None Returns TSYNC SUCCESS Success 4 2 17 Initializer Service IN Calls IN calls perform initial configuration and setup of each software module 4 2 17 1 TSYNC IN getStatus TSYNC ERROR TSYNC IN getStatus TSYNC BoardHandle hnd unsigned int pageNum TSYNC InitStatusResult pobj Description Get the board s initialization results Input Parameters hnd Board handle pageNum Table entry index Output Parameters pObj Pointer to the initialization status result Returns TSYNC SUCCESS Success 4 2 18 IRIG Output Component IP Calls Synchronizable Timecode Generator Supplemental Information 4 181 TSync PCle Factory Driver Guide Spectracom Corporation IP calls configure the output IRIG data streams including the IRIG format contents of the control field section if included in the IRIG signal Signature Control which determines when the IRIG modulation will be present Offsets to account for cable delays and other latencies amplitude adjustment etc Note Where lt ce gt 0 BCD TOY Control Functions Binary Seconds SBS 1 BCD TOY Control Functions 2 BCD TOY 3 BCD TOY Binary Seconds SBS 4 BCD TOY Year Control Functions Binary Seconds SBS 5 BCD TOY Year Binary Seconds SBS 6 BCD TOY Year 7 BCD TOY Year Binary Seconds SBS 8 Unknown no fields Where lt cf gt 0 All bits of the Cont
71. information Returns TSYNC_SUCCESS Success 4 2 27 13 TSYNC_XO_getPhaseErr TSYNC_ERROR TSYNC_XO getPhaseErr TSYNC BoardHandle hnd int potes al 4 232 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Description Gets the estimated phase error of the oscillator Input Parameters hnd Board handle Output Parameters err pointer to phase error result Returns TSYNC_SUCCESS Success 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 OSC oscType Description Get the system oscillator type Input Parameters hnd Board handle Output Parameters oscType pointer to the Oscillator Type Returns TSYNC SUCCESS Success 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 Synchronizable Timecode Generator Supplemental Information 4 233 TSync PCle Factory Driver Guide Spectracom Corporation TSYNC_ERROR TSYNC XS register TSYNC BoardHandle hnd TSYNC MeterHandle poObj Description Reserve a meter
72. kok kok kok kok kok kok kok kok PUBLIC ROUTINE AVAILABILITY FE KK k AKA AKA AZ AA AX AXA AXA KA AXA KA KA KA KA KA KA I kk kok kok kok kok kok kok k k kok k k kk kk kk fE Available only to Available when Available to all users first user when Routine users 1 when users gt 1 tusers gt 1 TPRO_open Y y TPRO close Y Y TPRO_getAltitude Y Y TPRO_getDate Y Y TPRO getDriver Y Y TPRO getFirmware Y Y TPRO getFPGA Y Y TPRO getLatitude Y Y TPRO getLongitude Y X TPRO getSatInfo Y Y TPRO getTime x Y TPRO resetFirmware Y Y TPRO setHeartbeat Y Y TPRO setMatchTime Y Y TPRO setOscillator Y Y TPRO setPropDelayCorr Y Y TPRO_setTime Y Y TPRO_setYear Y Y TPRO_simEvent Y Y TPRO_synchControl Y Y TPRO_synchStatus Y Y TPRO waitEvent Y Y TPRO waitHeartbeat Y Y TPRO waitMatch Y Y TPRO peek Y lt TPRO poke Y Y 7 endif _defined_TPRO_ 6 1 2 Tpro error codes h ifndef tpro error codes h define tpro error codes h 1 WARNING X Macros 6 4 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide X Macros will help us keep the list of error conditions tightly coupled with meaningful text messages for users Ef define TPRO_ERROR_CODES TPRO X TPRO SUCCESS 7 10 success TPRO X TPRO HANDLE ERR PRSY error bad handle X TPRO
73. 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 unsigned int step Synchronizable Timecode Generator Supplemental Information 4 17 TSync PCle Factory Driver Guide unsigned int complete TSYNC StateObj Spectracom Corporation TSYNC IMAGE ID OBJECT x typedef struct FS IMG type Image type unsigned int slot Image slot TSYNC FSImagelIdObj TSYNC IMAGE HEADER OBJECT typedef struct unsigned int mark Image marker FS IMG type Image type unsigned int len Image length TSYNC_FSImageHeaderObj TSYNC DATA UPDATE OBJECT typedef struct FS_IMG type Image type unsigned char data TSYNC DATA BLOCK SIZE data block TSYNC_UpdateDataObj TSYNC END UPDATE OBJECT x typedef struct FS IMG type Image type unsigned char ver 4 version unsigned int crc crc TSYNC_UpdateEndObj TSYNC Capability OBJECT x typedef struct TSYNC CapabilityObj CI_CAI cai CI_IID iid CI_ACCESS access TSYNC CapabilityObj TSYNC Capability Page OBJECT typedef struct TSYNC_CapabilityPageObj 4 18 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide unsigned i
74. on Here are the following API calls to use to setup a 1PPS signal using a GPO Each API call has a corresponding example program showing usage 1 TSYNC GO setMode Used to set the specified GPO to sguare wave mode OD MODE SOUARE WAVE 2 2 TSYNC GO setSguareWave Used to set up the square wave parameters The output square wave is aligned to the internal 1PPS once after this call is made Offset Offset from the 1PPS Period Period of the Square Wave in ns 1000000000ns for 1PPS Pulse Width Pulse Width of the Square Wave in nanoseconds Synchronizable Timecode Generator Supplemental Information 5 241 TSync PCle Factory Driver Guide Spectracom Corporation Active Edge Whether square wave is rising or falling edge 3 TSYNC GO setEnable Used to enabled disable a given GPO 4 TSYNC PP setPulseWidth Used to set up the Pulse Width of the 1PPS output in nanoseconds 5 6 Changing the TSync Boar s TimeScale fo Local Time Instead of UTC The default timescale for the TSync board is UTC time The TSync PCle 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 setup and then the system needs to be set to utilize that timescale First you need to set the local Time Zone Offset from UTC using the TSYNC CS _setTimeZone0ff call The offset should be provided in seconds offset from UTC If you want to provide DST information use the TSYNC CS setDst
75. s square wave pulse width Pulse width is in nanoseconds Parameters y IN hnd Board handle E gpo GPO index cd pw Pointer to the sguare wave pulse width Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GO getSWPW TSYNC BoardHandle hnd OD PIN gpo unsigned int pw Function TSYNC GO setSWPW Description Get the GPO s square wave pulse width Pulse width is in J nanoseconds from 10 nsec to 999 999 990 nsec Parameters IN hnd Board handle 2 gpo GPO index pw Sguare wave pulse width Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GO setSWPW TSYNC BoardHandle hnd OD PIN gpo unsigned int pw Function TSYNC_GO_getSWEdge Description Get the GPO s square wave active edge Parameters A IN hnd Board handle gpo GPO index A edge Pointer to the square wave active edge Returns TSYNC SUCCESS Success E DLL EXPORT TSYNC ERROR TSYNC GO getSWEdge TSYNC BoardHandle hnd OD PIN gpo EDGE edge PE Function TSYNC GO _setSWEdge Description Set the GPO s square wave active edge a 4 128 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Parameters IN hnd Board handle id gpo GPO index edge Square wave active edge Returns TSYNC SUCCESS Success DLL EXPORT
76. setSigCtrl Description Set the ASCII output s signature control state Parameters IN hnd Board handle ninstance The instance number i sig The signature control information Returns TSYNC SUCCESS Success EZ 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 x Timezone and DST offsets are in seconds Parameters il IN hnd Board handle nInstance The instance number OUT pObj Pointer to the Local Clock result Synchronizable Timecode Generator Supplemental Information 4 81 TSync PCle Factory Driver Guide Spectracom Corporation Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC AP getLocal TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj poObj Function TSYNC_AP_setLocal Description Set the ASCII output s local time zone and DST rule y Timezone and DST offsets are in seconds Parameters ee IN hnd Board handle nInstance The instance number x pobj Pointer to the Local Clock information Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC AP setLocal TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pObj PX Function TSYNC AP getTimeScale Descripti
77. system time from the hardware in seconds format A Parameters IN hnd Board handle OUT pObj Pointer to the time result Returns TSYNC SUCCESS Success Synchronizable Timecode Generator Supplemental Information 4 131 TSync PCle Factory Driver Guide Spectracom Corporation DLL EXPORT TSYNC ERROR TSYNC HW getTimeSec TSYNC BoardHandle handle TSYNC HWTimeSecondsObj poObj Function TSYNC HW getTsEnable Description Get the current enable disable state of timestamps Parameters k IN hnd Board handle OUT bEnable The enable result A Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC HW getTsEnable TSYNC BoardHandle handle int bEnable JR Function TSYNC HW setTsEnable Description Set the current enable disable state of timestamps Parameters IN hnd Board handle k bEnable The enable information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC HW setTsEnable TSYNC BoardHandle handle int bEnable Function TSYNC HW setTsReg Description Manually generate a hardware timestamp Parameters IN hnd Board handle Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC HW setTsReg TSYNC BoardHandle handle x Function TSYNC HW setTsClear Description Clear all collected timestamps from the specified source Parame
78. table Parameters IN hnd Board handle Returns TSYNC SUCCESS Success DLL EXPORT 4 50 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC_ERROR TSYNC RS saveUserDef TSYNC_BoardHandle hnd Function TSYNC RS deleteEntry Description Delete a working priority table entry by index Parameters i IN hnd Board handle index Index of table entry to delete Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC RS deleteEntry TSYNC BoardHandle hnd unsigned int index Function TSYNC RS getPriority Description Get specified working priority table entry s priority Parameters IN hnd Board handle a index Table entry index s OUT priority Pointer to the priority result Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC RS getPriority TSYNC BoardHandle hnd unsigned int index unsigned int priority Function TSYNC RS setPriority Description Set specified working priority table entry s priority Parameters IN hnd Board handle a index Table entry index x priority Pointer to the priority information Returns TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC RS setPriority TSYNC BoardHandle hnd unsigned int index unsigned int priority Function TSYN
79. time adjustment to the 1PPS on time point a Adjustment is in nanoseconds Parameters a IN hnd Board handle pobj Pointer to the subsecond adjustment information Returns TSYNC SUCCESS Success 4 DLL EXPORT TSYNC ERROR TSYNC CS _subsecAd TSYNC BoardHandle hnd Synchronizable Timecode Generator Supplemental Information 4 37 TSync PCle Factory Driver Guide Spectracom Corporation TSYNC_TimeSubsecAdjObj poObj V d Function TSYNC CS getTimeDiscont Description Get the user time discontinuity Parameters IN hnd Board handle OUT pObj Pointer to the time discontinuity result Returns TSYNC SUCCESS Success are DLL EXPORT TSYNC ERROR TSYNC CS getTimeDiscont TSYNC BoardHandle hnd TSYNC TimeDiscontObj poObj Function TSYNC_CS_setTimeDiscont Description Set the user time discontinuity Parameters IN hnd Board handle a pobj Pointer to the time discontinuity information Returns TSYNC SUCCESS Success af DLL EXPORT TSYNC ERROR TSYNC CS setTimeDiscont TSYNC BoardHandle hnd TSYNC TimeDiscontObj poObj Function TSYNC_CS_getLeapSec Description Get the current leap second information Offset is in seconds Parameters IN hnd Board handle pobj Pointer to the leap seconds result Returns TSYNC_SUCCESS Success a DLL EXPORT TSYNC ERROR TSYN
80. to convert a TSync card from Slave with default values to Master the following commands must be issued 5 244 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide PTR_SetMode lt device gt lt inst gt 1 Sets mode to Master PTR_GetUnitSettings lt device gt lt inst gt Record Clock Identity PTR SetUnitSettings lt device gt lt inst gt lt clock ID gt 0 0 0 1 1 Provide Clock ident bere Sets priority low PTR SetEthernetITF lt device gt lt inst gt lt dhcp gt lt static IP gt lt netmask gt lt gw gt If not already a configured PTR_SaveSettingsToROM lt device gt lt inst gt Makes changes persist PTR_ResetModule lt device gt lt inst gt 0 Cold Reset of Module In order to operate in Master Mode the TSync card must be synchronized to a non PTP reference Available references include e IRIG DCLS or AM e External PPS with time set from the Host e Time set in the card running in Self mode non traceable After the module is reset the following commands may need to be issued to fully configure the Master CS SetYear lt device gt lt year gt Sets current year CS SetTimeScaleOff lt device gt 1 lt offset gt Sets current TAI offset 5 7 2 3 Advanced Configuration as Master Device In order to configure the TSync PTP card to be a Master the PTP Mode must be set to Master Mode using PTR_Get
81. unsigned int nSeconds unsigned int nNanos Function TSYNC CS getTimeBcd Description Get the time in BCD format Parameters E IN hnd Board handle OUT pObj Pointer to the time result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC CS getTimeBca TSYNC BoardHandle hnd TSYNC TimeBCDObj pObj Function TSYNC CS setTimeBcd Description Set the time in BCD format Parameters IN hnd Board handle K pobj Pointer to the time information Returns TSYNC_SUCCESS Success wa DLL_EXPORT TSYNC ERROR TSYNC_CS_setTimeBcd TSYNC BoardHandle hnd TSYNC TimeBCDObj pObj Flash Manager Servic Synchronizable Timecode Generator Supplemental Information Af 4 41 TSync PCle Factory Driver Guide Spectracom Corporation f Function TSYNC_FS_getCrc Description Get the CRC for a particular flash image Parameters IN hnd Board handle pobj Pointer to the image information OUT pObj2 Pointer to the cre result Returns TSYNC_SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC FS getCrc TSYNC BoardHandle hnd TSYNC FSImageObj pObj TSYNC FSCRCObj pobj2 Function TSYNC FS calcCrc Description Calculate the CRC for a particular flash image Parameters a IN hnd Board handle gj pobj Pointer to the image information OUT pObj2 Pointer to the
82. unsigned int priorityl unsigned int priority2 TSYNC_PTPGrandmasterPropObj PTP TOD ENABLE OBJECT typedef struct int todEnabled unsigned int timeScale TSYNC_PTPTODSettingsObj PTP MAC ADDR OBJECT x typedef struct unsigned char macAddress 8 TSYNC_PTPMacAddrObj PTP MAC ADDR w PASSWORD OBJECT Af typedef struct unsigned char macAddress 8 unsigned char pw 12 TSYNC PTPMacAddrPwObj PTP USER DESCRIPTION OBJECT A 4 28 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide typedef struct unsigned char deviceName 16 unsigned char deviceLocation 16 TSYNC_PTPUserDescObj TSYNC IRIG MESSAGE OBJECT xy typedef struct unsigned short subframes TSYNC_IR_SUBFRAME NUM TSYNC_IRIGMessageObj TSYNC IRIG CONTROL FIELD OBJECT xf typedef struct unsigned short cfData TSYNC IR CFDATA NUM TSYNC_IRIGC DataObj TSYNC VARIABLE FREQUENCY OUTPUT CONFIGURATION OBJECT typedef struct float min float max float step TSYNC_VPC gObj TSYNC TIME LOCAL CLOCK OBJECT el typedef struct TSYNC TimeDSTRuleObj rule int tz TSYNC_LocalClockObj TSYNC ASCII OUTPUT SUBSECOND OBJECT x typedef struct int bEnabled unsigned int pos unsigned int
83. value state Parameters IN hnd Board handle ij gpo GPO index bValue The DVM information Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC GO setDvmValue TSYNC BoardHandle hnd OD PIN gpo int bValue Function TSYNC_GO_getMatchEnable Description Get the GPO s match enable state A Parameters lt IN hnd Board handle E gpo GPO index lvl Low or High Match Time OUT bEnable Match enable Returns TSYNC SUCCESS Success x A DLL EXPORT TSYNC ERROR TSYNC GO getMatchEnable TSYNC BoardHandle hnd OD PIN gpo EVEL lvl int bEnable Synchronizable Timecode Generator Supplemental Information 4 125 TSync PCle Factory Driver Guide Spectracom Corporation Function TSYNC GO setMatchEnable Description Set the GPO s match enable state Parameters IN hnd Board handle x gpo GPO index x lvl Low or High Match Time bEnable Match enable Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GO setMatchEnable TSYNC BoardHandle hnd OD PIN gpo EVEL lvl int bEnable Function TSYNC_GO_getSquareWave Description Get the GPO s square wave output configuration structure Offset period and pulse width are in nanoseconds Parameters IN hnd Board handle x gpo GPO index 2 OUT pObj Pointer to the configuration r
84. 2 PTL CLK ACC WITHIN 1000 NS 0x23 PTL CLK ACC WITHIN 2 5 US 0x24 PTL CLK ACC WITHIN 10 US 0x25 PTL CLK ACC WITHIN 25 US 0x26 PTL CLK ACC WITHIN 100 US 0x27 PTL CLK ACC WITHIN 250 US 0x28 PTL CLK ACC WITHIN 1 MS 0x29 PTL CLK ACC WITHIN 2 5 MS Ox2A PTL CLK ACC WITHIN 10 MS Ox2B PTL CLK ACC WITHIN 25 MS 0x2C PTL CLK ACC WITHIN 100 MS 0x2D PTL CLK ACC WITHIN 250 MS Ox2E PTL CLK ACC WITHIN S 0x2F PTL CLK ACC WITHIN 10 S 0x30 PTL CLK ACC BEYOND 10 S 0x31 PTL CLK ACC MAX 0x31 PTL CLK ACC UNKNOWN OxFE PTL CLK ACC typedef enum PTL TIME SRC ATOMIC CLOCK 0x10 PTL TIME SRC GPS 0x20 PTL TIME SRC TERR RADIO 0x30 PTL TIME SRC PTP 0x40 PTL TIME SRC NTP 0x50 4 12 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide PTL TIME SRC HAND SET 0x60 PTL TIME SRC_OTHER 0x90 PTL TIME SRC INTERNAL OSCILLATOR 0xA0 PTL TIME SRC typedef enum PTL RESET CAUSE LOSS LOCK 0x00 PTL RESET CAUSE LOSS CLOCK 0x01 PTL RESET CAUSE EXTERNAL 0x02 PTL RESET CAUSE POWER 0x03 PTL RESET CAUSE WATCHDOG 0x04 PTL RESET CAUSE REQUEST 0x05 PTL RESET CAUSE IRIG Reference services Oscillator services typedef enum XO MODE DISC
85. 4 143 Frequency Q tput FP alada 4 152 Flash Manager FS GAS ccc ciccctcsceccens secs ttt ao ask zsh nepod aa e kose nade de nieces tae 4 154 General Purpose Input GI Calls zz a zu adalin toda oku cadets 4 155 General Purpose Output GO Galliani a dali 4 158 GPS Reference Component GR Calls usais irte oidos 4 163 Host AGEN CIS eee tdt a oui daut 4 171 Host Reference HR Calls a e a ooo 4 171 Hardware FW GAS coda reena das batolat n teats E RE 4 174 initializer Service IN Call oi AA 4 181 IRIG Output Component IP Calla dearest heat uaa ages ds eri tal boa done soy 4 181 IRIG Reference Component IR Calls ceci ar elote ld ici 4 191 A 4 200 Synchronizable Timecode Generator Supplemental Information iii TSync PCle Factory Driver Guide Spectracom Corporation 4 2 21 4 2 22 4 2 23 4 2 24 4 2 25 4 2 26 4 2 27 4 2 28 6 2 8 6 2 9 6 2 10 6 2 11 6 2 12 6 2 13 6 2 14 6 2 15 6 2 16 PPS Output Component PP Calls LS 4 202 PPS Reference Component PR Calls ss sesessessesssssssessrssrrssressensrerrssresrennrnrrsnrennennrnnrenrent 4 205 PTP Reference Component PTR Calls curia a avy nudou do dubu 4 208 Reference Monitor Service RS CallS ioimooimmicmsccr teens 4 217 Supervisor Service SS Calls cia tte qeria 4 221 Upgrade Service US Calls lt td ta 4 227 Oscillator Component XO Calls usa sos 4 228 Oscillator Monitor Service XS Calls cad cecrstetatvsnta drets tia 4 233 EXAMPL
86. 8 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation 4 2 TSync PCle API Routine Descriptions 4 2 1 4 2 2 4 2 3 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 TSYNC_close TSYNC_ERROR TSYNC cl ose TSYNC BoardHandle hnd Description Close the TSYNC device Input Parameters hw Handle Returns TSYNC SUCCESS Success TSYNC get TSYNC ERROR TSYNC get TSync PCle Factory Driver Guide TSYNC BoardHandle handle DEST ID dest ITEM ID iid void xinPayload uint32 t inLength void xoutPayload vintoz t maxOutLength Binet actualOutLength Description Generic get accessor Input Parameters hnd Board handle dest destination of the call iid item id Synchronizable Timecode Generator Supplemental Information 4 139 TSync PCle Factory Driver Guide Spectracom Corporation 4 2 4 4 2 5 4 140 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 TSYNC_set TSYNC_ERROR TSYNC set TSYNC BoardHa
87. AC Address Synchronizable Timecode Generator Supplemental Information 4 215 TSync PCle Factory Driver Guide Spectracom Corporation Input Parameters hnd Board handle ninstance The instance number Output Parameters bMode pointer to MAC Address object Returns TSYNC_SUCCESS Success 4 2 23 21 TSYNC_PTR_getModuleStatus TSYNC ERROR TSYNC_PTR_getModuleStatus TSYNC BoardHandle hnd unsigned int nInstance int 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 unsigned int nInstance TSYNC PTPUserDescobj pobj Description Gets the PTP User Description strings Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the User Description object Returns TSYNC SUCCESS Success 4 2 23 23 TSYNC PTR setUserDesc TSYNC ERROR TSYNC PTR setUserDesc TSYNC BoardHandle hnd unsigned int nInstance 4 216 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC PTPUserDescObj pobj Description Gets the PTP User Description strings Input Parameters
88. ALID BOARD TYPE ERR invalid board type for function TPRO COMM ERR error communicating with driver TPRO SUCCESS success Synchronizable Timecode Generator Supplemental Information 6 5 TSync PCle Factory Driver Guide Spectracom Corporation 6 2 2 6 2 3 6 2 4 6 6 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 TPRO getSatlnfo unsigned char TPRO getSatInfo TPRO BoardObj hnd TPRO SatObj Satp Description This routine retrieves the number of satellites tracked Input Parameters hnd Board handle Output Parameters Satp Pointer to TPRO_SatObj Returns TPRO INVALID BOARD TYPE ERR invalid board type for function TPRO COMM ERR error communicating with driver TPRO SUCCESS success TPRO getTime unsigned char TPRO getTime TPRO BoardObj hnd TPRO TimeObj Timep Description This routine retrieves the current time The seconds value is received as type double Input Parameters hnd Board handle Output Parameters Timep Pointer to TPRO_TimeObj Returns TPRO_COMM_ERR error communicating with driver TPRO_SUCCESS success Synchronizable Timecode G
89. C TIME DST RULE OBJECT xf typedef struct TSYNC TimeDSTRuleObj ML DST REF ref TSYNC TimeDSTPointObj in TSYNC TimeDSTPointObj out uint32 t offset TSYNC_TimeDSTRuleObj TSYNC TIME YEAR OBJECT x typedef struct TSYNC TimeYearObj int year TSYNC TimeYearObj TSYNC TIME DST STATE OBJECT typedef struct TSYNC TimeDSTStateObj int state TSYNC_TimeDSTStateObj TSYNC FS IMAGE OBJECT s typedef struct TSYNC FSImageObj FS_IMG image TSYNC_FSImageObj 4 20 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC FS CRC OBJECT A typedef struct TSYNC FSCRCObj unsigned int Cre TSYNC_FSCRCObj TSYNC FS VERSION OBJECT xf typedef struct char version 4 TSYNC_FSVersionObj TSYNC ERROR LOG OBJECT A typedef struct char message 120 TSYNC_ErrorLogObj TSYNC ALARM OBJECT typedef struct LS ALARM index TSYNC AlarmObj TSYNC FLAG OBJECT x typedef struct uint32 t flag TSYNC_FlagObj TSYNC LS VERSION OBJECT typedef struct char version 7 TSYNC FirmwareVersionObj TSYNC LS SERIAL NO OBJECT s typedef struct char serno 33 Synchronizable Timec
90. CCESS Success TSYNC ERROR TSYNC GR getRefId Function TSYNC BoardHandle hnd unsigned int nInstance TSYNC RefIdObj poObj TSYNC GR _ Reset Description Reset the GPS receiver Returns k DLL EXPORT Parameters IN hnd nInstance reset Board handle The instance number The reset type TSYNC_SUCCESS Success TSYNC_ERROR TSYNC_GR_reset TSYNC BoardHandle hnd unsigned int GL RESET Function Description Parameters IN hnd status ACA CA ZX A Returns L 4 70 nInstance reset TSYNC GR getAntenna Get the GPS receiver antenna status Board handle nInstance The instance number Pointer to the status result TSYNC SUCCESS Success Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide DLL EXPORT TSYNC ERROR TSYNC GR _getAntenna TSYNC BoardHandle hnd unsigned int nInstance GL ANT STATUS status Function TSYNC GR getParameter Description Get a GPS Receiver specific parameter or control response Parameters IN hnd Board handle E nInstance The instance number OUT pObj Pointer to the GPS specific message Returns TSYNC SUCCESS Success EZ DLL EXPORT TSYNC_ERROR TSYNC_GR_getParameter TSYNC_BoardHandle hnd unsigned int nInstance TSYNC ReceiverParmObj p
91. CESS Success Synchronizable Timecode Generator Supplemental Information 4 153 TSync PCle Factory Driver Guide Spectracom Corporation 4 2 10 Flash Manager FS Calls FS calls provide access to the images stored in all flash memory devices 4 2 10 1 TSYNC_FS_getCrc TSYNC ERROR TSYNC FS getCre TSYNC BoardHandle hnd TSYNC_FSImageObj pObj TSYNC FSCRCObj pOb 42 Description Get 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 2 TSYNC FS calcCrc TSYNC ERROR TSYNC_FS_calcCrce TSYNC BoardHandle hnd TSYNC FSImageoObj pObj TSYNC FSCRCObj pOb 42 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 hnd TSYNC_FSImageObj pobj TSYNC FSImageHeaderoObj p0b32 4 154 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Description Get the image header for a particular flash image Input Parameters hnd Board handle pObj Pointer to the image information Output Parameters pObj2 Pointer to the image header result Returns TSYNC_
92. CMD FINISH 3 XS CMD RESTART 4 XS CMD typedef enum XS_STATE STOPPED 0 XS_STATE RUNNING 1 XS_STATE ENDING 2 XS_STATE typedef uint32 t TSYNC METER HANDLE Supervisor service typedef enum SS EVT SYNC SS EVT REF I o lt 1 SS_EVENT typedef enum SS_RESET_BRD 1 o lt Spectracom Corporation Not in Sync In Holdover Frequency Error Self Reference only Software Error 1PPS is not in specification Reference Chang Hardware Error Number of alarm types Automatically start a new window of measurement when a window completes Begin a single window of measurement Stop measuring immediately Stop after current window completes Restart window measurement Does not change meter state Not measuring Measuring Measuring until end of window In sync Out of sync Valid ref s No valid ref s Reset the entir board except Synchronizable Timecode Generator Supplemental Information Spectracom Corporation SS RESET MIC 1 SS RESET FPGA 2 SS RESET NUM SS RESET typedef enum SS TS MIN gt 0 SS TS TIME REF 0 SS TS 1PPS REF 1 SS TS TFOM 2 SS TS SYNC Sy SS TS HOLDOVER 4 SS TS LOST REF 5 SS TS NUM SS TS SRC Reference service type
93. COM1 HS IN 2 Reserved for future use GL_COM1_NMEA OUT 3 Configure NMEA Output on COM1 GL COM1_ TIME OUT 4 Enable Disable GL COM1 NONE GL COM1 USE PTP Referenc OxFF services typedef enum PTL RESET COLD 0 PTL RESET HOT 1 PTL RESET FACT 2 Wait for HotStart Input on COM1 Time Transfer Output on COM1 4 11 Synchronizable Timecode Generator Supplemental Information TSync PCle Factory Driver Guide Spectracom Corporation PTL RESET typedef enum PTL PTP STATE INITIALIZING 0 PTL PTP STATE FAULTY 1 PTL PTP STATE DISABLED 2 PTL PTP STATE LISTENING 3 PTL PTP STATE PRE MASTER 4 PTL PTP STATE MASTER 25 PTL PTP STATE PASSIVE 6 PTL PTP STATE UNCALIBRATED 7 PTL PTP STATE SLAVE 8 PTL PTP STATE COUNT 9 PTL PTP STATE typedef enum PTL DELAY MECH E2E 0x01 PTL DELAY MECH P2P 0x02 PTL DELAY MECH DISABLED OxFE PTL DELAY MECH typedef enum PTL CLK ACC MIN 0x20 PTL CLK ACC WITHIN 25 NS 0x20 PTL CLK ACC WITHIN 100 NS 0x21 PTL CLK ACC WITHIN 250 NS 0x2
94. C_CS_getLeapSec TSYNC_BoardHandle hnd TSYNC_TimeLeapSecondObj pObj Function TSYNC_CS_setLeapSec Description Set a new leap second Offset is in seconds Parameters IN hnd Board handle a pobj Pointer to the leap seconds information Returns TSYNC_SUCCESS Success ud DLL EXPORT TSYNC ERROR TSYNC CS setLeapSec TSYNC BoardHandle hnd TSYNC_TimeLeapSecondObj poObj 4 38 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide x Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC CS _getTimeZone0ff TSYNC BoardHandle hnd TSYNC_TimeZoneOffsetObj pObj Returns TSYNC SUCCESS Success aA DLL EXPORT TSYNC ERROR TSYNC CS setTimeZoneoOff TSYNC BoardHandle hnd TSYNC_TimeZoneOffsetObj pObj PYR Function TSYNC CS getTimeZone0ff Description Get the current time zone offset from UTC Offset is in seconds g Parameters IN hnd Board handle OUT pObj Pointer to the time zone offset result Function TSYNC_CS_setTimeZoneOff Description Set the current time zone offset from UTC Offset is in seconds Parameters IN hnd Board handle a pobj Pointer to the time zone offset information JK Function TSYNC CS getDstRule Description Get the current DST rule DST Offset is in seconds Paramete
95. C_IP_setPhase Description Set the IRIG output s phase adjustment This feature is only available to Spectracom for testing Synchronizable Timecode Generator Supplemental Information 4 91 TSync PCle Factory Driver Guide Parameters a IN hnd Board handle nInstance The instance number sig The signature control information Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC_ERROR TSYNC IP setPhase TSYNC BoardHandle hnd Spectracom Corporation unsigned int nInstance unsigned int phase Function TSYNC_IP_getPhaseErr Description Get the IRIG output s current phase error This feature is x only available to Spectracom for testing Parameters IN hnd Board handle a nInstance The instance number lt OUT phErr The phase error result Returns TSYNC SUCCESS Success A DLL EXPORT TSYNC ERROR TSYNC IP getPhaseErr TSYNC BoardHandle hnd unsigned int nInstance int phErr Function TSYNC_IP_getTimeScale Description Get the IRIG output s time scale Parameters IN hnd Board handle i ninstance The instance number OUT pObj Pointer to the time scale result Returns TSYNC_SUCCESS Success EZ DLL EXPORT TSYNC ERROR TSYNC IP getTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Function TSYNC_IP_setTimeScale Description Set the IRIG o
96. C_InitStatusResult TSYNC SUPERVISOR TFOM OBJECT xf typedef struct TFOM tfom TSYNC TFOMObj TSYNC GPS LLA OBJECT x typedef struct double lat double lon double alt TSYNC_LLAObj PA TSYNC GPS FIX DATA OBJECT f typedef struct int nSats float pdop float hdop float vdop float tdop int fom int tfom int herr int verr TSYNC_FixDataObj 4 24 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC GPS SAT INFO OBJECT typedef struct unsigned int chnum unsigned int svid unsigned int str int bTraim int bInfix unsigned int flags TSYNC SatInfoObj TSYNC GPS SAT DATA OBJECT x typedef struct TSYNC SatInfoObj info TSYNC SAT INFO NUM TSYNC SatDataObj TSYNC MANUFACTURER MODEL OBJECT x typedef struct char mfr 17 char mdl 17 TSYNC ManModobj TSYNC GPS RECEIVER INFO OBJECT x typedef struct unsigned int len char info 257 TSYNC ReceiverInfoObj TSYNC GPS CUSTOM MESSAGE OBJECT typedef struct unsigned int len char msg 257 TSYNC_CustomMessageObj TSYNC GPS RECEIVER PARM OBJECT k typedef struct unsigned int len char parm 257 TSYNC_ReceiverParmObj Synchronizable Timecode Generator Supplemental Information 4 25 TSync PCle
97. C_QP_getSigCtrl Description Get the HaveQuick output s signature control state Parameters sof IN hnd Board handle nInstance The instance number OUT sig The signature control result Returns TSYNC_SUCCESS Success FL 4 102 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide DLL EXPORT TSYNC ERROR TSYNC OP getSigCtrl TSYNC BoardHandle hnd unsigned int nInstance SIG CTL sig JK Function TSYNC OP setSigCtrl Description Set the HaveQuick output s signature control state Parameters IN hnd Board handle ES nInstance The instance number Sig The signature control information A Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC OP setSigCtrl TSYNC BoardHandle hnd unsigned int nInstance SIG CTL sig PE Function TSYNC OP getOffset Description Get the HaveQuick output s offset Offset is in nanoseconds Parameters 3 IN hnd Board handle X nInstance The instance number OUT nOffset The offset result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC OP getOffset TSYNC BoardHandle hnd unsigned int nInstance int nOffset Function TSYNC OP _ setOffset Description Set the HaveQuick output s offset Offset is in nanoseconds from 500 msec to 500 msec Parameters Ei IN Ana Board ha
98. C_RS_getEnable Description Get specified working priority table entry s enable state Parameters sof IN hnd Board handle index Table entry index OUT enabled Pointer to the enabled result Returns TSYNC_SUCCESS Success EL Synchronizable Timecode Generator Supplemental Information 4 51 TSync PCle Factory Driver Guide Spectracom Corporation DLL EXPORT TSYNC ERROR TSYNC RS getEnable TSYNC BoardHandle hnd unsigned int index unsigned int enabled Function TSYNC RS setEnable Description Set specified working priority table entry s enable state Parameters IN hnd Board handle x index Table entry index enabled Pointer to the enabled information Returns TSYNC SUCCESS Success EZ DLL EXPORT TSYNC ERROR TSYNC RS setEnable TSYNC BoardHandle hnd unsigned int index unsigned int enabled PE Function TSYNC RS getStateTable Description Get the reference validity state table Parameters x IN hnd Board handle OUT pObj Pointer to the reference state table result A Returns TSYNC SUCCESS Success xf DLL EXPORT TSYNC ERROR TSYNC RS getStateTable TSYNC BoardHandle hnd TSYNC ReferenceStateTableObj pObj Initializer Service x Function TSYNC IN getStatus Description Get the board s initialization results Parameters IN hnd Board handle pageNum Ta
99. Description Get the 1PPS validity structure Parameters A IN hnd Board handle k nInstance The instance number E OUT bTimeValid The time reference result bPpsValid The pps reference result Returns aA DLL EXPORT TSYNC SUCCESS Success TSYNC_ERROR TSYNC_PR_getValidity TSYNC BoardHandle hnd unsigned int nInstance int bTimeValid int bPpsValid Function TSYNC_PR_getNumInst Description Get number of PPS reference instances present in the system Parameters k IN hnd Board handle OUT nInstances The number of instances result Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC_PR_getNumInst TSYNC BoardHandle hnd unsigned int nInstances Function TSYNC PR getRefId Description Get reference identifier for a PPS reference instance Parameters i IN hnd Board handle Returns TSYNC SUCCESS Success af DLL EXPORT TSYNC ERROR TSYNC PR getRefId 4 58 TSYNC BoardHandle hnd unsigned int nInstance TSYNC RefIdObj poObj Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide LED Control Component Function TSYNC_EC_getMode Description Get the LED usage mode state Parameters IN hnd Board handle index The LED index E OUT mode The usage mode Returns TSYNC SUCCESS Success
100. E ROUTINES je eA Ae ee ete ete 5 236 AA ncaa cavatanastins acsscatusiakentaeicatavakcacneinas dente 5 236 External Event Input Time Stamping idea Ria 5 237 Match TIME ics P PRO O O O O O E e 5 238 Using the Host PC as an External Time Reference for the TSync Board 5 240 Converting the GPO Outputs to 1PPS Output Signals u eee eee 5 241 Changing the TSync Board s TimeScale to Local Time Instead of UTC 5 242 Operation of the TSyn PCle PU Pucci anida a sdeasek ika nb ad Grial 5 242 Basic COMMANA S ua Aids 5 242 Basic PTP COMU soni 5 244 Advanced PTP Configuration dani 5 247 TPRO TSAT TIMING BOARD DRIVER API SUPPORT cscccccsseesseeeeeseeeeeeees 6 1 Header lesa aiii 6 1 A A EE S O O E OTO P ET TON 6 1 Tprozerror codes id kone ban A AE AS 6 4 TPRO TSAT Driver API Support Routine Descriptions ccececececeseseseeeeeseseeeeteteteteteeeeeees 6 5 MER OTA IIS caia dt italia 6 5 MPR CUE ORI Gg tree Sea cect aaa on eg tascam A A geet ad 6 6 WIPRO OS al onak 6 6 A a etapa des teeta alana Blohm easy 6 6 PERO SIA o 6 7 TER O Set CAG aaa A 6 7 PROSE ATER TIMO ani rada 6 7 TPROS SAPO Delay GOP ari SA o r A on dd 6 8 TOROS RAMO ao 6 8 PRO SEP Siurana adi tao 6 8 TEROSSIMEV A A A AAA Ad 6 9 TERO SMOC vacisndsa nation And oka dalo ola akad 6 9 VERO synehStatuS radial 6 9 PRO WaitEVent ad A A R E 6 10 PRO Walt AFS alias ka aaodn d oa k c ak t cesa 6 10 TFRO WalMal n oralidad 6 10 Synchronizable Timecode Gener
101. Events Sync Propagation Satellite Help TSync Control Utility SPECTRACOM SYNCHRONIZING CRITICAL OPERATIONS 2 3 5 Clock Daemon Two clock daemon utilities are provided that can be used to set the computers system clock Clock Daemon exe and ClockDaemonService exe Both will query the board and set the system clock on a periodic basis Only one should be running at a time NOTE If the board is not synchronized to an external reference the system clock will not be set Clock Daemon exe Synchronizable Timecode Generator Supplemental Information 2 7 TSync PCle Factory Driver Guide Spectracom Corporation 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 is TSync Clock Daemon Version 1 000 E O Set Host Time Interval Device Name tsynepcill Update Interval 300 Seconds V Enable On Startup ea Device Name Will select which board you want to use as a time source Default is tsyncpcio Update Interval Controls how often the board time will be queried The default is 300 seconds Enable On Startup Checking this box will automatically start system clock synchronization by the clock daemon whenever the program itself starts Alternatively the synchronization can be started or stopped manually ClockDaemonService exe
102. Handle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Function TSYNC EP setTimeScale Description Set the SMPTE EBU output s time scale Parameters IN hnd Board handle ninstance The instance number x pobj Pointer to the time scale information Returns TSYNC_SUCCESS Success A DLL EXPORT TSYNC ERROR TSYNC EP setTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Function TSYNC_EP_getAmplitude Description Get the SMPTE EBU output s amplitude x Amplitude is in range of 0 255 Parameters il IN hnd Board handle nInstance The instance number x OUT amp The amplitude result Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC_ ERROR TSYNC_EP_getAmplitude TSYNC BoardHandle hnd unsigned int nInstance unsigned int amp Function TSYNC EP setAmplitude Description Set the SMPTE EBU output s amplitude Amplitude is in range of 0 255 Parameters x IN hnd Board handle 4 108 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide a ninstance The instance number amp The amplitude information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC EP setAmplitude TSYNC BoardHandle hnd unsigned int nInstance unsigned int amp Function TSYNC_EP_ge
103. I call was valid but a value in the entered call was not valid 4 2 7 API Calls Supported by TSync PCle The TSync PCle driver contains API calls for other Spectracom products Table 4 1 documents the sections of the API that are supported in the TSync PCle product All other API calls are unsupported Synchronizable Timecode Generator Supplemental Information 4 141 TSync PCle Factory Driver Guide Spectracom Corporation Area of the board Refer to API Hardware supervisory Description Section software etc CS Clock Service Provides an abstract interface to the timing 428 subsystem EC LED Component Drive the LED indicators 1 1 1 FP Frequency Output Configures the output frequency 4 2 9 FS Flash Manager Service Provides access to the images stored in all flash 4 2 10 memory devices GI General Purpose Input Configure and monitor the general purpose input 4211 Component pins g General Purpose Output Configure and monitor the general purpose output GO 4 2 12 Component pins GR GPS Reference Execute the GPS receiver s protocol and determine 4213 Component 1PPS and time validity T HA Host Agent Obtain the capabilities of the TSync 4 2 14 Uses information from the host PC to determine HR Host Reference 1PPS and time validity 4 2 15 HW Hardware Provide access to the direct HW accessible 4216 control status of the timing
104. IR getTimeProperties TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPCIlkOualityObj poObj 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 TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPParentPropobj pobj Description Gets the module s parent properties dataset Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the Parent Properties object Returns TSYNC SUCCESS Success 4 2 23 12 TSYNC PTR getGrandmasterProperties TSYNC ERROR TSYNC PTR getGrandmasterProperties TSYNC BoardHandle hnd unsigned int nInstance 4 212 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC_PTPGrandmasterPropObj poObj Description Gets the module s Grandmaster Properties dataset Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the Grandmaster Properties object Returns TSYNC_SUCCESS Success 4 2 23 13 TSYNC PTR saveSettingsToROM TSYNC ERROR TSYNC PTR saveSettingsToROM TSYNC BoardHandle hnd unsigned int nInstance Description Saves any sett
105. LAR PURPOSE Spectracom shall have no liability or responsibility to the original customer or any other party with respect to any liability loss or damage caused directly or indirectly by any Spectracom product material or software sold or provided by Spectracom replacement parts or units or services provided including but not limited to any interruption of service excess charges resulting from malfunctions of hardware or software loss of business or anticipatory profits resulting from the use or operation of the Spectracom product or software whatsoever or howsoever caused In no event shall Spectracom be liable for any direct indirect special or consequential damages whether the claims are grounded in contract tort including negligence or strict liability EXTENDED WARRANTY COVERAGE Extended warranties can be purchased for additional periods beyond the standard fiveyear warranty Contact Spectracom no later than the last year of the standard fiveyear warranty for extended coverage SPECTRACOM 95 Methodist Hill Drive Rochester NY 14623 1 585 321 5800 FAX 1 585 321 5218 www spectracomcorp com sales spectracomcorp com Spectracom Corporation TSync PCle Factory Driver Guide 4 2 19 4 2 20 Table of Contents OVERVIEV a a 1 1 INSTALLING AND UNINSTALLING THE DRIVER cccccceeeeeeeeeeeeeeeeeeeeeeeeees 2 1 A A V A OA 2 1 Hive eal a Get ee sa SR K SE a A aes 2 1 Uninstalling the Diver cani rs
106. Mode In addition the priority1 and priority2 fields in the Unit Settings command must be chaned from their default values of 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 There are several reasons why the TSync PTP card may not become the active master or may not be broadcasting the correct time even if Master Mode is enabled 1 If using any reference other than self for 1PPS the TSync PTP will not become an active Master until the TFOM value of the system is less than 15 After first going into sync after power up it may take a minute or two for the TFOM value to fall to an acceptable level Use the SS GetTFOM lt device gt call to determine the current TFOM value 2 PTP uses the TAI timescale to transfer time The available non PTP references on the TSync PTP card all communicate time in the UTC timescale UTC is offset from TAI by a small amount which changes every time a leap second occurs The UTC TAI Offset is Synchronizable Timecode Generator Supplemental Information 5 245 TSync PCle Factory Driver Guide Spectracom Corporation part of the PTP Specification and must be provided to a Master but none of the available non PTP references provide that offset Therefore in order for the device to become a Master the offset must be provided
107. N hnd Board handle gpo GPO index x OUT bValue The value result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GO getValue TSYNC BoardHandle hnd OD PIN gpo int bValue Function TSYNC_GO_getMode Description Get the GPO s mode state Parameters IN hnd Board handle gpo GPO index ij OUT mode The mode result Returns TSYNC SUCCESS Success 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 a IN hnd Board handle k gpo GPO index x mode The mode information Spectracom Corporation Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GO setMode TSYNC BoardHandle hnd OD PIN gpo OD MODE mode Function TSYNC_GO_getDvmValue Description Get the GPO s Direct Value Mode DVM value state a Parameters IN hnd Board handle gpo GPO index is OUT bValue The DVM result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GO getDvmValue TSYNC BoardHandle hnd OD PIN gpo int bValue PYR Function TSYNC_GO_setDvmValue Description Set the GPO s Direct Value Mode DVM
108. NC HA getCaps TSYNC BoardHandle hnd unsigned int pageNum TSYNC CapabilityPageObj pObj Description Gets a single page of capability results Input Parameters hnd Board handle pageNum Capability result page Output Parameters pCap Pointer to the page of capability results Returns TSYNC SUCCESS Success 4 2 15 Host Reference HR Calls HR calls provide the ability to get and set the validity of the host input reference 4 2 15 1 TSYNC HR getValidity TSYNC ERROR TSYNC HR ge tValidity TSYNC BoardHandle hnd unsigned int nInstance int bTimeValid int bPpsValid Description Get the reference validity from the Host 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 Synchronizable Timecode Generator Supplemental Information 4 171 TSync PCle Factory Driver Guide Spectracom Corporation 4 2 15 2 TSYNC_HR_setValidity TSYNC_ERROR TSYNC_ HR setVal idity TSYNC BoardHandle hnd unsigned int nInstance int 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 poObj
109. NC PP getOffset TSYNC BoardHandle hnd IO PORT nInstance int nOffset Description Get the PPS output s offset Offset is in nanoseconds Input Parameters hnd Board handle ninstance The instance number Output Parameters nOffset The offset result Returns TSYNC_SUCCESS Success 4 2 21 5 TSYNC_PP_setOffset TSYNC_ERROR TSINC PP setOffset TSYNC BoardHandle hnd IO PORT nInstance int noffset Description Set the PPS output s offset Offset is in nanoseconds from 500 msec to 500 msec Synchronizable Timecode Generator Supplemental Information 4 203 TSync PCle Factory Driver Guide Spectracom Corporation Input Parameters hnd Board handle 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 outpu 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 TSYNC ERROR TSYNC PP setEdge TSYNC BoardHandle hnd IO PORT ninstance EDGE edge Description Set the PPS output s edge Input Parameters hnd Board handle ninstance The instance number edge The edge information Returns TSYNC SUCCESS Success 4 2 21 8 TSYNC PP getPulseWidth TSYNC ERROR TSYNC PP getPulseWidth T
110. OR TSYNC EC ge tMode TSYNC BoardHandle hnd LE INDEX index EC_ MODE mode Description Get the LED usage mode state Input Parameters hnd Board handle index The LED index Output Parameters mode The usage mode Returns TSYNC_SUCCESS Success 4 2 8 26 TSYNC_EC_setMode TSYNC_ERROR TSYNC EC setMode TSYNC BoardHandle hnd LE INDEX index EC MODE mode 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 27 TSYNC EC getState TSYNC ERROR TSYNC EC getState TSYNC BoardHandle hnd LE INDEX index EC STATE state Description Synchronizable Timecode Generator Supplemental Information TSync PCle Factory Driver Guide 4 151 TSync PCle Factory Driver Guide Spectracom Corporation Get the LED display state Input Parameters hnd Board handle index The LED index Output Parameters state The display state Returns TSYNC_SUCCESS Success 4 2 8 28 TSYNC EC setState TSYNC ERROR TSYNC EC setState TSYNC BoardHandle hnd LE INDEX index EC STATE state Description Set the LED display state Settable only in manual LED mode Input Parameters hnd Board handle index The LED index state The display state Returns TSYNC SUCCESS Success 4 2 9 Frequency Output FP Calls FP calls configure the 10 MHz output 4 2 9 1 TSYNC_FP_getSigCtrl TSYNC ERRO
111. O_T1_FRM typedef enum ETO _El_FRM typedef struct TO T1 FRM AIS ETO El FRM CRC4 ETO El FRM NO CRC4 ETO El FRM AIS ETO El FRM SYNC li WNRrRo N N oN PS S gt li WNRo N N ETO_OUT_OPT outOpt ETO MODE mode ETO Tl ENC tlEncode A ETO Tl FRM tlFrame ETO El FRM elFrame ETO CFG UART configuration typedef enum UD_BR_1200 UD BR 2400 UD BR 4800 UD BR 9600 1200 2400 4800 9600 Spectracom Corporation 8 Maximum range of unsigned int Differential output option Single ended output option T1 El output mode output mode Disable output B8ZS T1 encoding AMI T1 encoding T1 T1 T1 T1 El El El super frame xtended super frame w CRC6 extended super frame w o CRC6 alarm Indication Signal framing w CRC4 framing w o CRC4 alarm indication signal For future use Output option board type Operational mode T1 T1 El encoding type framing type framing type Synchronizable Timecode Generator Supplemental Information Spectracom Corporation UD BR 19200 UD BR 38400 UD BR 57600 UD BR 76800 UD BR 115200 19200 38400 57600 76800 115200 UD BR typedef enum UD_DATA 8 UD_DATA 7 UD DATA 6 UD DATA 5 lt lt lt Il WNFO UD DATA typedef enum UD STOP 1 UD STOP 15 UD STOP 2
112. Obj PE Function TSYNC GR _setParameter Description Send a GPS Receiver specific parameter or control message Parameters ie IN hnd Board handle ninstance The instance number pObj Pointer to the GPS specific message Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GR _setParameter TSYNC BoardHandle hnd unsigned int nInstance TSYNC ReceiverParmObj pObj IRIG Reference Component Function TSYNC_IR_getOffset Description Get the IRIG reference s 1PPS input offset nanoseconds Parameters E IN hnd Board handle j nInstance The instance number x OUT nOffset The offset information Returns TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC IR getOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Function TSYNC_IR_setOffset Description Set the IRIG reference s 1PPS input offset Synchronizable Timecode Generator Supplemental Information Offset is in Offset is in EL 4 71 TSync PCle Factory Driver Guide 4 72 nanoseconds from 500 msec to 500 msec Parameters IN hnd Board handle ninstance The instance number a nOf set The offset information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IR setOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset F
113. PS time you will likely want to change the time scale of the board to GPS as well so all devices are on the same time scale refer to cs setTimeScale Also note that newer TSync boards with software version 2 0 0 or greater come with a new entry in the default reference table self for time and eppO for 1PPS With this new entry in the reference table the board will consider itself in sync if only a 1PPS signal is connected the card will use itself as its time reference When operating in this mode CS GetTime can be used to set the current time If this entry is undesirable for your application remove the entry and save the resulting reference table 5 5 Converting the GPO Outputs to IPPS Output Signals Using the GPOs as 1PPS outputs is possible in square wave mode Simply set up the square wave to output a 1PPS with the pulse width active edge and offset you want There are some considerations to take into account when using it however The sguare wave output as currently designed is only aligned to the 1PPS once when configured That means that during initial alignment of the board s internal 1PPS to an input using HW smoothing before the SW takes over with disciplining the sguare wave outputs lose their alignment Once SW takes over which can be determined by looking at the disciplining state or waiting for the SS_TFOM value to fall below 15 if a square wave is setup as a 1PPS it will always be aligned from that point
114. R TSYNC FP gets TOGELLA 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 TSYNC_SUCCESS Success 4 152 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 4 2 9 2 TSYNC_FP_setSigCtrl TSYNC_ERROR TSYNC FP setSigCtrl TSYNC BoardHandle hnd IO PORT nInstance SIG CTL sig Description Set the Fixed Freguency outpu s signature control state Input Parameters hnd Board handle ninstance The instance number sig The signature control information Returns TSYNC SUCCESS Success 4 2 9 3 TSYNC FP getFreg TSYNC ERROR TSYNG FP getFreq TSYNC BoardHandle hnd IO PORT nInstance unsigned int freg Description 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 freg output instances present in the system Input Parameters hnd Board handle Output Parameters ninstances The number of instances result Returns TSYNC SUC
115. R TSYNC HR s tTimeScale TSYNC_BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj pObj Description Synchronizable Timecode Generator Supplemental Information 4 173 TSync PCle Factory Driver Guide Spectracom Corporation 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 getReflD TSYNC ERROR TSYNC HR ge tValidity TSYNC BoardHandle hnd unsigned int nInstance TSYNC RefIdObj poObj Description Get reference identifier for a Host reference instance Input Parameters hnd Board handle ninstance the Instance Number Output Parameters pObj The Reference Identifier result Returns TSYNC_SUCCESS Success 4 2 15 9 TSYNC_HR_getNuminst TSYNC ERROR TSYNC HR getNuminst TSYNC BoardHandle hnd unsigned int nInstances Description Get number of Host reference instances present in the system Input Parameters hnd Board handle Output Parameters ninstances pointer to the number of instances Returns TSYNC SUCCESS Success 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 lt en gt O Not enabled 4 174 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSyn
116. RROR TSYNC IP setAmplitude TSYNC BoardHandle hnd unsigned int nInstance unsigned int amp Function TSYNC IP getMod Description Get the IRIG outputmodulation Parameters is IN hnd Board handle a nInstance The instance number i OUT mod The modulation result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP getMod TSYNC BoardHandle hnd unsigned int nInstance IL MOD mod Function TSYNC IP setMod Description Set the IRIG outputmodulation Parameters IN hnd Board handle nInstance The instance number x mod The modulation Returns TSYNC SUCCESS Success xf DLL_EXPORT TSYNC_ERROR TSYNC_IP_setMod TSYNC BoardHandle hnd unsigned int nInstance IL MOD mod Function TSYNC_IP_getFreq Description Get the IRIG outputfrequency Parameters IN hnd Board handle x ninstance The instance number a OUT freq The frequency result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP getFreg TSYNC BoardHandle hnd unsigned int nInstance IL FRO freg Spectracom Corporation Synchronizable Timecode Generator Supplemental Information Spectracom Corporation Function TSYNC IP setFreq Description Set the IRIG outputfrequency Parameters IN hnd Board handle Y ninstance The instance number X freg The frequency information Retur
117. Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC HW setIntMask TSYNC BoardHandle handle INT TYPE intType unsigned int index int bEnable Function TSYNC HW getTsSingle Description Get a single collected timestamp for a given source Parameters j IN hnd Board handle k source The timestamp source information OUT pObj Pointer to the time result Returns TSYNC_SUCCESS Success AZ 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 x IN hnd Board handle intType The interrupt type information index The interrupt index information OUT nIntCount The interrupt counter result Synchronizable Timecode Generator Supplemental Information 4 135 TSync PCle Factory Driver Guide Returns y DLL EXPORT TSYNC_ERROR TSYNC_HW_getIntCnt TSYNC SUCCESS Success TSYNC_BoardHandle handle INT_TYPE intType unsigned int index unsigned int nIntCount Function TSYNC HW clrIntCnt Description Clear the interrupt counter ak Parameters si IN hnd Board handle intType The interrupt type information ze index The interrupt index information Returns xf DLL EXPORT TSYNC_ERROR TSYNC_HW_clrIntCnt TSYNC SUCCESS Success T
118. Rule library call For example the DST rule for the Eastern Time Zone is Reference 0 Local time reference In Week 2 Day 0 Sunday Month 3 March Hour 2 Out Week 1 Day 0 Sunday Month 11 November Hour 2 Offset 3600 1 hour The final step is to tell the clock to utilize the local timescale with the TSYNC CS setTimescale library call Once you change the board s time scale to local you can enter the match times in local time as well as they will then correlate to the same time base 5 7 Operation of the TSync PCle PTP This document makes use of the Example Programs that are included as part of the TSync driver installation lt device gt which TSync card in the system starting at 0 lt inst gt which PTP instance to use TSync PTP has only one PTP module so use Instance 0 this corresponds with the ptpO entry in the State Table 5 7 1 Basic Commands 5 242 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 5 7 1 1 Resetting the PTP Interface To reset the PTP operation PTR ResetModule lt device gt lt inst gt lt reset type gt Reset Type 0 Cold Reset Reset Type 1 Hot Reset Reset Type 2 Reset to Factory Defaults 5 7 1 2 Operational Mode To put the TSync PTP into PTP Slave Mode PTR SetMode lt device gt lt inst gt 0 To put the TSync PTP into Master Mode PTR SetMode lt device gt lt inst gt 1 Af
119. SUCCESS Success 4 2 10 4 TSYNC FS getVersion TSYNC ERROR TSYNC FS getVers ion TSYNC BoardHandle hnd TSYNC_FSImageObj pobj TSYNC FSVersionObj pObj2 Description Get the image version for a particular flash image Input Parameters hnd Board handle pObj Pointer to the image information 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 lt edge gt 0 Falling edge 1 Rising edge 2 both uncommon Where lt valid gt 0 Not valid 1 Valid Where lt pin gt can be a value of 0 through 3 Pin correlates to the GPI Pin number on the board Where lt index gt should always be a value of 0 with only one board installed 4 2 11 1 TSYNC GI getValue Synchronizable Timecode Generator Supplemental Information 4 155 TSync PCle Factory Driver Guide Spectracom Corporation TSYNC ERROR TSYNC GI ge tValue TSYNC BoardHandle hnd ID PIN index int bEnabled Description Get the specified GPI s current input value Input Parameters hnd Board handle index The input index Output Parameters bEnabled The value result Returns TSYNC_SUCCESS Success 4 2 11 2 TSYNC_GI_getEdge TSYNC ERROR TSYNC GI ge tEdge TSYNC BoardHandle hnd ID PIN index EDGE edge Description Get the GPI s trigger edg
120. SYNC BoardHandle hnd IO PORT nInstance 4 204 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide unsigned int pw 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 TSYNG PP setPul seWidth TSYNC BoardHandle hnd IO PORT nInstance unsigned int pw Description Set the PPS output s pulse width Pulse width is in nanoseconds from 10 nsec to 999 999 990 nsec Input Parameters hnd Board handle ninstance The instance number pw The pulse width information Returns TSYNC SUCCESS Success 4 2 21 10 TSYNC PP getNumlnst TSYNC ERROR TSYNC PP getNuminst TSYNC BoardHandle hnd unsigned int nInstances Description Get number of PPS output instances present in the system Input Parameters hnd Board handle Output Parameters ninstances The number of instances result Returns TSYNC_SUCCESS Success 4 2 22 PPS Reference Component PR Calls PR calls monitor the 1PPS input reference Synchronizable Timecode Generator Supplemental Information 4 205 TSync PCle Factory Driver Guide Spectracom Corporation Note Where lt edge gt 0 Falling edge 1 Rising edge 2 both uncommon Where lt valid gt 0 Not valid 1 Valid
121. SYNC ERROR TSYNC US getState Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC BoardHandle hnd TSYNC_StateObj obj Function TSYNC_US_start Description Begin an image update sequence Parameters i IN hw Handle E obj Pointer to the update header information Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC US start TSYNC BoardHandle hnd TSYNC FSImageHeaderObj obj PR Function TSYNC_US_startOC Description Begin an option card image update sequenc Parameters k IN hw Handle objl Pointer to the update image information obj2 Pointer to the update header information Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC US startoc TSYNC BoardHandle hnd TSYNC FSImagelIdoObj objl TSYNC FSImageHeaderObj obj2 Function TSYNC US data Description Send a single data block in the update seguence Parameters IN hw Handle x OUT obj Pointer to the update data information Returns TSYNC SUCCESS Success A DLL EXPORT TSYNC ERROR TSYNC US data TSYNC BoardHandle hnd TSYNC UpdateDataObj obj Function TSYNC US data Description Finish the update seguence Parameters IN hw Handle A OUT obj Pointer to the update end information
122. SYNC_BoardHandle handle INT TYPE intType unsigned int index Include prototypes for non KTS functionality include tsync nonkts h ifdef cplusplus tendif tendif defined TSYNC H 4 1 2 Tsync_hw h ifndef TSYNC_HW define TSYNC HW 1 include tsync nonkts hw h define TSYNC TIMESTAMP DATA NUM 512 typedef enum INT_1PPS 0 1PPS Received INT SVC REO 1 Timing System Service Request INT_LCL_UC_FIFO_EMPTY 2 Local uC Bus FIFO Empty INT LCL UC FIFO OVER 3 Local uC Bus FIFO Overflow INT_UC_LCL_FIFO_DATA 4 uC Local Bus FIFO Data Ready INT UC LCL FIFO OVER 5 uC Local Bus FIFO Overflow INT GPIO IN 6 GPIO Input Event INT TMSTMP 7 Timestamp Data Ready INT GPIO OUT 8 GPIO Output Event INT TYPE typedef enum DEST_ID FW 0x1 Access to the firmware using HIDD defined transactions 4 136 Spectracom Corporation Synchronizable Timecode Generator Supplemental Information Spectracom Corporation DEST ID HW 0x2 DEST ID HW NONKTS DEST ID 0x3 typedef uintl16 t FW ITEM typedef enum HW SYS TIME 0x0100 HW SEC TIME 0x0101 HW TMSTMP EN 0x0200 HW TMSTMP REO 0x0201 HW TMSTMP CLR 0x0202 HW TMSTMP CNT 0x0203 HW TMSTMP DATA 0x0204 HW TMSTMP SINGLE 0x0205 HW GPO MTCH HI 0
123. SYNC_SS_reset TSYNC ERROR TSYNC SS reset TSYNC BoardHandle hnd TSYNC ResetObj poObj 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 lt reset type gt 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 Input Parameters hnd Board handle Output Parameters pObj Pointer to the reference result Returns TSYNC_SUCCESS Success 4 2 25 3 TSYNC_SS_getMaxTfom 4 222 TSYNC_ERROR TSYNC SS getMaxTfom TSYNC BoardHandle hnd TFOM tfom Description Get the maximum TFOM threshold to stay in sync Input Parameters hnd Board handle Output Parameters tfom Pointer to the maximum TFOM result Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Returns TSYNC_SUCCESS Success Returns the user configurable TFOM threshold 4 2 25 4 TSYNC_SS_setMaxTfom TSYNC ERROR TSYNC S S setMaxTfom TSYNC BoardHandle hnd TFOM tfom 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 t
124. SYNC_SUCCESS Success 4 2 12 3 TSYNC_GO_getEnable TSYNC_ERROR TSYNC_GO getEnable TSYNC BoardHandle hnd OD_PIN gpo int bEnable Description Get the GPO s enable state Input Parameters hnd Board handle gpo GPO index Output Parameters bEnable The output enable result Returns TSYNC_SUCCESS Success 4 2 12 4 TSYNC_GO_setEnable TSYNC_ERROR TSYNC GO setEnable TSYNC BoardHandle hnd OD PIN gpo int 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 getvaluel TSYNC BoardHandle hnd OD_PIN gpo int bValue Description Get the GPO s current output value Synchronizable Timecode Generator Supplemental Information TSync PCle Factory Driver Guide 4 159 TSync PCle Factory Driver Guide Spectracom Corporation Input Parameters hnd Board handle gpo GPO index Output Parameters bValue The value result Returns TSYNC_SUCCESS Success 4 2 12 6 TSYNC_GO_getMode TSYNC ERROR TSYNC GO getMode TSYNC BoardHandle hnd OD PIN gpo OD MODE mode Description Get the GPO s mode state Input Parameters 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
125. Set the specified meter s window size Size is in seconds Parameters ij IN hnd Board handle 3 pobj Pointer to the window size information Returns TSYNC_SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC XS setWindowSize TSYNC BoardHandle hnd TSYNC MeterWinSizeObj pObj PE Function TSYNC XS getMeterData Description Get the meter data Parameters X IN hnd Board handle i OUT pObj Pointer to the meter data result A Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC XS getMeterData TSYNC BoardHandle hnd TSYNC MeterDataObj poObj Function TSYNC_XS_meterCmd Description Send a command to a meter Parameters IN hnd Board handle e pobj Pointer to the meter command information Returns TSYNC SUCCESS Success a7 DLL EXPORT TSYNC_ERROR TSYNC_XS_meterCmd TSYNC BoardHandle hnd TSYNC MeterCommandoObj poObj Superviser Service AL Function TSYNC_SS_reset Description Reset the TSYNC board Parameters s IN hnd Board handle pobj Pointer to the reset type information Synchronizable Timecode Generator Supplemental Information 4 45 TSync PCle Factory Driver Guide Spectracom Corporation 4 46 Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC SS reset TSYNC BoardHandle hnd TSYNC ResetObij pObj Fun
126. TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC VP getSigCtrl TSYNC BoardHandle hnd unsigned int nInstance SIG CTL sig Function TSYNC VP setSigCtrl Description Set the Variable Freguency output s signature control state 4 114 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Parameters a IN hnd Board handle nInstance The instance number sig The signature control information Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC_ ERROR TSYNC_VP_setSigCtrl TSYNC BoardHandle hnd unsigned int nInstance SIG CTL sig Function TSYNC VP getFreg Description Get the Variable Freguency output freguency Parameters IN hnd Board handle E nInstance The instance number x OUT freq The frequency result A Returns TSYNC SUCCESS Success AL DLL EXPORT TSYNC ERROR TSYNC VP getFreg TSYNC BoardHandle hnd unsigned int nInstance unsigned int freq Function TSYNC VP setFreg Description Set the Variable Freguency output freguency Parameters E IN hnd Board handle nInstance The instance number freg The frequency information Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC VP setFreg TSYNC BoardHandle hnd unsigned int nInstance unsigned int freg Function TSYNC VP getCfg D
127. TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC_GR_setOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Function TSYNC GR getValidity Description Get the GPS validity structure Synchronizable Timecode Generator Supplemental Information 4 65 TSync PCle Factory Driver Guide 4 66 Spectracom Corporation Parameters g IN hnd Board handle X nInstance The instance number E OUT bTimeValid The time reference result bPpsValid The pps reference result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GR getValidity TSYNC BoardHandle hnd unsigned int nInstance int bTimeValid int bPpsValid Function TSYNC GR getPosition Desc Parameters ription Get the GPS position Latitude and longitude are in radians Altitude is in meters IN hnd Board handle ninstance The instance number OUT pObj Pointer to the position result Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GR getPosition TSYNC BoardHandle hnd unsigned int nInstance TSYNC LLAObj pobj Function TSYNC GR setPosition Description Set the GPS position Latitude and longitude are in radians Altitude is in meters gt Parameters ia IN hnd Board handle k nInstance The instance number pobj Pointer to the position information Returns TSYNC SUCCESS Success
128. TSync PCle PCI EXPRESS TIME CODE PROCESSOR with OPTIONAL GPS Factory Driver Guide 95 Methodist Hill Drive Rochester NY 14623 Phone US 1 585 321 5800 Fax US 1 585 321 5219 www spectracomcorp com Part Number 1191 5001 0050 Manual Revision G January 201 1 Copyright O 2011 Spectracom Corporation The contents of this publication may not be reproduced in any form without the written permission of Spectracom Corporation Printed in USA Specifications subject to change or improvement without notice Spectracom NetClock Ageless TimeGuard TimeBurst TimeTap LineTap MultiTap VersaTap and legally Traceable Time are Spectracom registered trademarks All other products are identified by trademarks of their respective companies or organizations All rights reserved SPECTRACOM LIMITED WARRANTY LIMITED WARRANTY Spectracom warrants each new product manufactured and sold by it to be free from defects in software material workmanship and construction except for batteries fuses or other material normally consumed in operation that may be contained therein AND AS NOTED BELOW for five years after shipment to the original purchaser which period is referred to as the warranty period This warranty shall not apply if the product is used contrary to the instructions in its manual or is otherwise subjected to misuse abnormal operations accident lightning or transient surge repairs or modifications not performed by Sp
129. TSync PTP Slave is actively synchronizing to a Master on the network For more information on Port State definitions please refer to Section 9 2 4 of the PTPv2 Spec e Link Connected reports Y if the Ethernet Link is connected N if not 5 7 3 2 PTP Unit Settings The PTR_GetUnitSettings lt device gt lt inst gt command provides access to configuration information for the module The PTR_SetUnitSettings command is used to set this configuration information for proper operation of the PTP Network Synchronizable Timecode Generator Supplemental Information 5 247 TSync PCle Factory Driver Guide Spectracom Corporation Clock Identity A unique identifier for every PTP device Consists of eight 8 bit octet fields By default fields 1 2 and 3 match the first three octets of the six octet MAC address fields 4 and 5 are FF and FE respectively and fields 6 7 and 8 match the last three octets of the MAC address One Step Mode o N operates in two step mode default value o Y operates in one step mode this will reduce accuracy Unicast Set to N by default operating in Multicast mode o Unicast mode is not currently supported Domain Number Reports the PTP Domain defaults to 0 See PTPv2 Sec 7 1 Priority1 Reports the PTP Priority1 value defaults to 128 See PTPv2 Sec 7 6 2 2 Priority2 Reports the PTP Priority2 value defaults to 128 See PTPv2 Sec 7 6 2 3
130. UT pCfg The UART configuration Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC AR getUartCfg TSYNC BoardHandle hnd unsigned int nInstance UD CFG pCfg Function TSYNC AR setUartCfg Description Set the ASCII reference UART configuration Parameters a IN hnd Board handle nInstance The instance number Y pCtg The UART configuration Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC AR setUartCfg TSYNC BoardHandle hnd unsigned int nInstance UD CFG pCfg Function TSYNC AR getLeapFlag Description Get the ASCII reference leap pending flag Parameters 4 IN hnd Board handle k nInstance The instance number k OUT bLeap The leap pending flag Returns TSYNC SUCCESS Success DLL EXPORT TSYNC_ERROR TSYNC_AR_getLeapFlag TSYNC BoardHandle hnd unsigned int nInstance 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 IN hnd Board handle nInstance The instance number ta OUT pObj Pointer to the Local Clock result Synchronizable Timecode Generator Supplemental Information 4 61 TSync PCle Factory Driver Guide Spectracom Corporation Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC AR getlocal
131. Y BCD TOY Binary Seconds BCD TOY Year Ctrl Func Binary Seconds BCD TOY Year Ctrl Func BCD TOY Year BCD TOY Year Binary Seconds Unknown No fields Minimum value of CF Unknown All bits ignored Fields conform to RCC 200 04 Fields conform to IEEE C37 118 2005 Fields conform to Spectracom format Fields conform to Spectracom FAA format Fields conform to NASA formats Number of CF types defines the HaveQuick formats Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide OL FMT HO I 0 STANAG 4246 HaveQuick I QL FMT HQ II STANAG 4246 HaveQuick II OL FMT HQ IIA 2 STANAG 4372 HaveQuick ITA QL FMT 4430 STM 3 STANAG 4430 Standard Time Message QL FMT 4430 XHO 4 STANAG 4430 Extended HaveQuick OL FMT GPS BCD 5 ICD GPS 060A Binary Coded Decimal QL FMT GPS HO 6 ICD GPS 060A HaveQuick OL FMI NUM Number of formats QL FMT START 0 Start of format list OL FMT UNKNOWN 1 Unknown format OL FMT The ESL FMT type defines the SMPTE EBU formats typedef enum ESL FMT LTC 0 SMPTE EBU Format LTC ESL FMT VITC 1 SMPTE EBU Format VITC ESL FMT NUM Number of formats ESL FMT START 0 Start of format list ESL FMT UNKNOWN 1 Unknown format ESL FMT Flash services typedef enum FS IMG RT FW 0 Run time firmwa
132. YNC ERROR TSYNC IR g tTimeScale TSYNC_BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Description Get the IRIG regerence s time scale Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the time scale result Returns TSYNC_SUCCESS Success 4 2 19 22 TSYNC_IR_setTimeScale TSYNC ERROR TSYNC IR s tTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Synchronizable Timecode Generator Supplemental Information 4 199 TSync PCle Factory Driver Guide Spectracom Corporation Description Set the IRIG regerence s time scale 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_getRefld TSYNC_ERROR TSYNC IR getRefId TSYNC BoardHandle hnd unsigned int nInstance TSYNC RefIdObj poObj Description Get reference identifier for an IRIG reference instance Input Parameters hnd Board handle ninstance The instance number pObj Pointer to the Reference ID Returns TSYNC SUCCESS Success 4 2 20 Log Service LS Calls LS calls provide a gueue for errors and maintain system alarms 4 2 20 1 TSYNC LS getErrorLog TSYNC ERROR TSYNC LS getErrorlog TSYNC BoardHandle hnd TSYNC ErrorLogObj pObj Description Get the error log Input Parameters hnd Board handle Output Paramet
133. _X TPRO OBJECT ERR ED error creating obj TPRO X TPRO CLOSE HANDLE ERR m3 err closing device TPRO X TPRO DEVICE NOT OPEN ERR 4 device not opened X TPRO X TPRO INVALID BOARD TYPE ERR 5 invalid device TPRO X TPRO FREQ ERR 6 invalid frequency TPRO X TPRO YEAR PARM ERR eee invalid year TPRO X TPRO DAY PARM ERR 8 invalid day PRO X TPRO HOUR PARM ERR 9 invalid hour TPRO X TPRO MIN PARM ERR 10 invalid minutes X TPRO_X TPRO SEC PARM ERR 11 invalid seconds TPRO X TPRO DELAY PARM ERR 12 invalid delay TPRO X TPRO TIMEOUT ERR 13 device timed out TPRO X TPRO COMM ERR 14 communication error TPRO X TPRO DEV BUSY 15 device busy TPRO X TPRO MATCH PARM ERR 16 invalid match type TPRO X TPRO NULL POINTER je acc NULL pointer enum tpro error code define TPRO _X name value string name value TPRO_ERROR_CODES tundef TPRO X TPRO INVALID ERROR CODE l const char tpro strerror enum tpro error code endif 6 2 TPRO TSAT Driver API Support Routine Descriptions 6 2 1 TPRO getLatitude unsigned char TPRO getLattitude TPRO BoardObj hnd TPRO LatObj Latp Description This routine retrieves the latitude information Input Parameters Hnd Board handle Output Parameters Latp Pointer to TPRO LatObj Returns TPRO INV
134. al Delay Mechanism Modify Port Settings ERR ERR PTP Property Port Number Identity Clock Class Clock Accuracy Offset Scaled Priority 1 Priority 2 Identity 3 Port Number ERR Time Property UTC Offset UTC Offset Valid Forward Leap Module Information PTP Version Backward Leap Time Traceable Software Version Hardware Version Freq Traceable PTP TimeScale Software Date Software Time Port State Reset Cause ERR Name ERR Location ERR Modify Module Information Number Enable State PTP TimeSource Link ERR ERR ERR ERR ERR ERR ERR ERR 1 Clock Properties ERR ERR ERR ERR Steps Removed ERR Offset From Master ERR Mean Path Delay ERR Stats Calculat Observed OS Observed CP Clock Quality Clock Class Clock Accuracy Offset Scale Unit Information Identity One Step Mode Slave Only Unicast Domain Num Priority 1 Priority 2 PTP Version Software Vers Modify Port State Main screen TSync Viewer 0 0 Reference Time gpsO PPS gps Ref Settings r TSync State Synchronized Yes No No Holdover FreeRun PTP ERR m TSync Time 2010 333 15 45 01 973 061 UTC Year Day of Year Time Milisecond Microsecond TimeScale Firmware Version 2 10 FPGA Version 2 10 Update TSync Reset TSync Save Log Sync
135. ameters id IN hnd Board handle OUT nInstances The number of PTP modules present in the system Synchronizable Timecode Generator Supplemental Information 4 99 4 100 TSync PCle Factory Driver Guide unsigned int nInstance Function TSYNC PTR getValidity Description Get the PTR validity structure Parameters IN hnd Board handle nInstance The instance number X OUT bTimeValid The time reference result bPpsValid The pps reference result A Returns TSYNC SUCCESS Success z DLL EXPORT TSYNC ERROR TSYNC PTR getValidity TSYNC BoardHandle hnd unsigned int nInstance int bTimeValid int bPpsValid Function TSYNC_PTR_getMode Description Gets the module s current operational mode Parameters IN hnd Board handle nInstance The instance number OUT bMode Current Operational Mode Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC_PTR_getMode TSYNC BoardHandle hnd unsigned int nInstance int bMode Function TSYNC_PTR_setMode Description Sets the module s current operational mode k Parameters IN hnd Board handle nInstance The instance number bMode New Operational Mode Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC_PTR_setMode TSYNC BoardHandle hnd unsigned int nInstance int bMode Function TSYNC_PTR_getMacAddr
136. ance 4 62 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Parameters IN hnd Board handle x Returns TSYNC SUCCESS Success a DLL_EXPORT TSYNC_ERROR TSYNC_AR_getRefId TSYNC BoardHandle hnd unsigned int nInstance TSYNC RefIdObj pobj Function TSYNC_AR_getFormat Description Get the ASCII time code format Parameters is IN hnd Board handle i nInstance The instance number E OUT format The format result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC_ERROR TSYNC_AR getFormat TSYNC BoardHandle hnd unsigned int nInstance AL FMT format Function TSYNC_AR_setFormat Description Set the ASCII time code format Parameters a IN hnd Board handle i nInstance The instance number format The format information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC AR setFormat TSYNC BoardHandle hnd unsigned int nInstance AL FMT format Function TSYNC_AR_getNumInst Description Get number of ASCII reference instances present in the A system Parameters IN hnd Board handle a OUT nInstances The number of instances result Returns TSYNC SUCCESS Success v DLL EXPORT TSYNC ERROR TSYNC AR getNumInst TSYNC BoardHandle hnd unsigned int nInstances Freguency R
137. ance 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 nInstance TSYNC IRIGMessageObj pObj Function TSYNC_IR_getNumInst Description Get number of IRIG references instances present in the a system Parameters sl IN hnd Board handle x OUT nInstances The number of instances result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IR getNumInst TSYNC BoardHandle hnd unsigned int nInstances Function TSYNC_IR_getCfData Description Get the latest IRIG Control Field data received Parameters IN hnd Board handle nInstance The instance number a OUT pObj Pointer to the control field information Returns TSYNC SUCCESS Success EZ DLL EXPORT TSYNC ERROR TSYNC_IR getCfData TSYNC_BoardHandle hnd unsigned int nInstance TSYNC IRIGCfDataObj poObj Function TSYNC_IR_getLocal Description Get the IRIG reference s local time zone and DST rule x Timezone and DST offsets are in seconds Parameters il IN hnd Board handle ninstance The instance number OUT pObj Pointer to the Local Clock result 4 76 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide R
138. anoseconds from k 500 msec to 500 msec Parameters IN hnd Board handle E ninstance The instance number noffset The offset information Returns TSYNC SUCCESS Success ay DLL_EXPORT TSYNC ERROR TSYNC_IP_setOffset TSYNC BoardHandle hnd n nInstance int noffset unsigned int x Function Parameters IN hnd nInstance OUT pObj ACA CACA N TSYNC_IP_getLocal Description Get the IRIG output s local time zone and DST rule Timezone and DST offsets are in seconds Board handle The instance number Pointer to the Local Clock result Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP getLocal TSYNC BoardHandle unsigned int nInstance TSYNC_LocalClockObj poObj Function TSYNC_IP_setLocal Description Set the IRIG output s local time zone and DST rule Timezone and DST offsets are in seconds Parameters dl IN hnd Board handle cl ninstance The instance number x pobj Pointer to the Local Clock information Returns TSYNC_SUCCESS Success 7 DLL_EXPORT TSYNC ERROR TSYNC IP setLocal 4 86 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pobj JE Function TSYNC_IP_getFormat Description Get the IRIG output forma
139. arameters IN hnd Board handle nInstance The instance number x OUT freq The frequency result Returns TSYNC SUCCESS Success A DLL_EXPORT TSYNC ERROR TSYNC_IR_getFreq TSYNC BoardHandle hnd unsigned int nInstance IL FRO freq J Function TSYNC IR setFreg Description Set the IRIG carrier frequency Settable only when in manual mode A Parameters IN hnd Board handle nInstance The instance number E freg The frequency information Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC IR setFreg TSYNC BoardHandle hnd unsigned int nInstance IL FRO freg Function TSYNC_IR_getCodedExpr Description Get the IRIG Coded Expression Parameters IN hna Board handle ninstance The instance number a OUT ce The Coded Expression result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IR _getCodedExpr TSYNC BoardHandle hnd unsigned int IL CE ce 4 74 nInstance Synchronizable Timecode Generator Supplemental Information Spectracom Corporation Function TSYNC IR setCodedExpr Description Set the IRIG Coded Expression Parameters IN hnd Board handle Y ninstance The instance number ce The Coded Expression information Returns TSYNC SUCCESS Success xy DLL EXPORT TSYNC ERROR TSYNC IR setCodedExpr TSYNC BoardHandle hnd
140. ardHandle hnd unsigned short dac Function TSYNC_XO_setDac Description Set the external oscillator s DACsetting for testing Parameters g IN hnd Board handle dac The DAC information Returns TSYNC SUCCESS Success Z 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 IN hnd Board handle hi OUT alarm The alarm result 4 118 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC XO getAlarm TSYNC BoardHandle hnd unsigned int alarm f Function TSYNC XO getSerNum Description Get the external oscillator s serial number Parameters E IN hnd Board handle J OUT sernum The serial number result Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC_ERROR TSYNC XO getSerNum TSYNC BoardHandle hnd TSYNC SerialNoObj sernum PE Function TSYNC_XO getMfrMdl Description Get the external oscillator s manufacturer and model Parameters X IN hnd Board handle i OUT pObj Pointer to the man mod result Returns TSYNC_SUCCESS Success ES DLL EXPORT TSYNC ERROR TSYNC XO getMfrMdl TSYNC BoardHandle hnd TSYNC ManModObj poO
141. atchEnable TSYNC_ERROR TSYNC GO setMatchEnable TSYNC BoardHandle hnd OD_PIN gpo LEVEL ID int bEnable Description Set the GPO s match enable state and level Input Parameters hnd Board handle gpo GPO index Ivl 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 Output Parameters pObj Pointer to the configuration result Returns TSYNC_SUCCESS Success 4 2 12 13 TSYNC_GO_setSquareWave TSYNC ERROR TSYNC GO setSquareWave 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 Offset is from 500 msec to 500 msec Period is from 100 nsec to 1 sec Pulse width is from 10 nsec to 999 999 990 nsec 4 162 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Input Parameters hnd Board handle gpo GPO index pObj Pointer to the configuration information Returns TSYNC_SUCCESS Success 4 2 12 14 TSYNC_GO_getNuminst TSYNC ERROR TSYNC GO getNuminst TSYNC BoardHandle
142. atically when the driver CD is loaded if autorun is enabled Otherwise run setup manually by running the following program lt CD Drive gt windows setup exe 2 Follow the on screen prompts The setup utility will copy application files When this process is finished driver installation is complete 2 3 2 Uninstalling the Driver 1 GotoControl Panel gt Add Remove Programs 2 Select and remove the TSYNC PCI program 3 Follow the on screen prompts When this process is finished driver uninstallation is complete 2 3 3 Example Programs The driver package includes folders with example programs to interface to the board The source code and make files for the example programs are included All of the example programs were compiled using Visual Studio 2005 All example programs are 32 bit applications To see usage help for any example program execute the program with no parameters gt HW GetTime exe 2 6 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 2 3 4 Control Utility 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 TSync Control Utility E EEJ Fie Time Info Heartbeat Match Date
143. ation that is stored in persistent inside the GPS receiver Input Parameters hnd Board handle Returns TSYNC_SUCCESS Success Synchronizable Timecode Generator Supplemental Information 4 169 TSync PCle Factory Driver Guide Spectracom Corporation 4 2 13 19 TSYNC_GR_getRefld TSYNC ERROR TSYNC_GR_getRefId TSYNC BoardHandle hnd unsigned int nInstance TSYNC RefIdObj poObj 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 de 1Pos TSYNC BoardHandle hnd GL RESET reset Description Reset the GPS receiver Input Parameters hnd Board handle ninstance The instance number reset The Reset Type Returns TSYNC SUCCESS Success 4 2 13 21 TSYNC GR getAntenna TSYNC ERROR TSYNC GR getAntenna TSYNC BoardHandle hnd unsigned int nInstance GL ANT STATUS status Description Get the GPS receiver antenna status Input Parameters hnd Board handle ninstance The instance number status pointer to the Antenna Status Returns TSYNC_SUCCESS Success 4 170 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 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 TSY
144. ative leap second skipping second 59 use 1 as the offset The current scheduled leap second can be obtained using CS GetLeapSec lt device gt 5 7 3 Advanced PTP Configuration This section provides additional information about how to monitor the state of the PTP interface and how to properly configure it Only a subset of the available commands are discussed here please refer to the PTR section of the Driver Guide for more information on available commands This section assumes the reader has some knowledge of the PTPv2 Specification For more information please refer to the Specification itself IEEE 1588 2008 Another good source of PTP information is NIST s IEEE 1588 website http ieee1588 nist gov 5 7 3 1 PTP Port State The PTR GetPortState lt device gt lt inst gt command provides information on the state of the PTP connection e Port Number For this product will always be 1 e Port Enabled For this product will always be Y e 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 Listening TSync PTP is looking for a Master O o Master TSync PTP Master has become the active master on the network o Passive TSync PTP Master has become a passive master There is another Master on the network with higher priority Uncalibrated TSync PTP Slave has detected a Master on the network o Slave
145. ator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 1 Overview The factory driver for the Spectracom TSync PCle boards provides the interface for multiple users to access the board using the user API library documented herein The TSync PCle with optional GPS is a complete synchronized timecode reader generator package that supports multiple prioritized timing inputs When an input is lost the unit automatically switches to the next input in order of priority The disciplined onboard oscillator is phase locked to an external timing input providing 5ns resolution time This 10 MHz oscillator central to the TSync PCle timing functions uses the last known reference to increment freewheel in the absence of a timing input The TSync PCle generates an IRIG AM and DCLS output pair as well as 10 MHz sine wave and 1PPS outputs The board s four programmable inputs may be used as event capture inputs dedicated to your time tagging applications Four user programmable alarm and frequency outputs are also provided Programmable output functions include a periodic pulse or heartbeat square wave and programmable start stop time alarm output Key to the TSync functionality is the ability to generate interrupts Using one of the many available Spectracom driver packages you may configure your card using interrupt driven algorithms to support your unique applications Synchronizable Timecod
146. ator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC_ERROR SYNC TR setCtrlField TSYNC BoardHandle hnd unsigned int nInstance IL CF sel 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 Output Parameters pObj Pointer to the message result Returns TSYNC_SUCCESS Success 4 2 19 16 TSYNC_IR_setMessage TSYNC ERROR TSYNC IR setMessage TSYNC BoardHandle hnd unsigned int nInstance TSYNC IRIGMessageObj pObj Description Set the latest IRIG input message Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the message information Returns TSYNC SUCCESS Success Synchronizable Timecode Generator Supplemental Information 4 197 TSync PCle Factory Driver Guide Spectracom Corporation 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 Paramet
147. bj Function TSYNC_XO_getMessage Description Get a custom message response from the external oscillator Parameters IN hnd Board handle i OUT pObj Pointer to the message result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC XO getMessage TSYNC BoardHandle hnd TSYNC CustomMessageObj poObj Function TSYNC_XO_setMessage Description Send a Custom Message to the external oscillator Parameters x IN hnd Board handle pobj Pointer to the message information Returns TSYNC_SUCCESS Success EL Synchronizable Timecode Generator Supplemental Information 4 119 TSync PCle Factory Driver Guide Spectracom Corporation DLL EXPORT TSYNC ERROR TSYNC XO setMessage TSYNC BoardHandle hnd TSYNC CustomMessageObj poObj Function TSYNC_XO_getCmd Description Get a disciplining dataset from the external oscillator Parameters dl IN hnd Board handle OUT pObj Pointer to the dataset result A Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC XO getCmd TSYNC BoardHandle hnd TSYNC OscDiscObj pObj Function TSYNC_XO_setCmd Description Send a disciplining command and dataset to the ms external oscillator Parameters dl IN hnd Board handle pobj Pointer to the command information Returns TSYNC SUCCESS Success
148. ble entry index id 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 poObj General Purpose Input Component PX Function TSYNC GI getValue Description Get the specified GPI s current input value 4 52 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Parameters x IN hnd Board handle index The input index OUT bEnabled The value result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GI getValue TSYNC BoardHandle hnd ID PIN index int bEnabled Function TSYNC_GI_getEdge Description Get the GPI s trigger edge used when detecting k input changes Parameters IN hnd Board handle E index The input index x OUT edge The edge result A Returns TSYNC SUCCESS Success AL DLL EXPORT TSYNC ERROR TSYNC GI getEdge TSYNC BoardHandle hnd ID PIN index EDGE edge Function TSYNC GI setEdge Description Set the GPI s trigger edge used when detecting input changes Parameters x IN hnd Board handle index The input index E edge The edge information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GI se
149. c PCle Factory Driver Guide 1 Enabled 4 2 16 1 TSYNC_HW_getTime TSYNC_ERROR TSYNC HW getTime TSYNC BoardHandle handle TSYNC HWTimeObj poObj Description Get the current system time from the hardware Input Parameters hnd Board handle Output Parameters pObj Pointer to the time result Returns TSYNC SUCCESS Success 4 2 16 2 TSYNC HW getTimeSec TSYNC ERROR TSYNC HW getTimeSec TSYNC BoardHandle handle TSYNC HWTimeSecondObj poObj Description Get the current system time from the hardware in seconds format Input Parameters hnd Board handle Output Parameters pObj Pointer to the time result Returns TSYNC SUCCESS Success 4 2 16 3 TSYNC HW getTsEnable TSYNC ERROR TSYNC HW getTsEnable TSYNC BoardHandle handle PAE bEnable Description Get the current enable disable state of timestamps Input Parameters hnd Board handle Output Parameters bEnable The enable result Returns TSYNC SUCCESS Success Synchronizable Timecode Generator Supplemental Information 4 175 TSync PCle Factory Driver Guide Spectracom Corporation 4 2 16 4 TSYNC_HW_setTsEnable TSYNC_ERROR TSYNC HW setTsEnable TSYNC BoardHandle handle int bEnable Description Set the current enable disable state of timestamps Input Parameters hnd Board handle bEnable The enable information Returns TSYNC_SUCCESS Success 4 2 16 5 TSYNC_HW_setTsReq TSYNC_ERROR TSYNC HW setTsReg TSYNC BoardHandle handle
150. ce s input offset Offset is in nanoseconds Parameters is IN hnd Board handle a nInstance The instance number i OUT nOffset The offset result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC AR getOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Function TSYNC_AR_setOffset Description Get the ASCII reference s 1PPS input offset Offset is in i nanoseconds Parameters IN hnd Board handle E nInstance The instance number 5 noffset The offset Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC AR setOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Function TSYNC AR getValidity Description Get the ASCIT reference validity structure Parameters IN hnd Board handle A nInstance The instance number OUT bTimeValid The time reference result bPpsValid The pps reference result Returns TSYNC SUCCESS Success af DLL EXPORT TSYNC ERROR TSYNC AR getValidity TSYNC BoardHandle hnd unsigned int nInstance int bTimeValid 4 60 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide int bPpsValid Function TSYNC AR getUartCfg Description Get the ASCII reference UART configuration Parameters IN hnd Board handle nInstance The instance number O
151. cre result Returns TSYNC_SUCCESS Success xf DLL EXPORT TSYNC ERROR TSYNC FS calcCrc TSYNC BoardHandle hnd TSYNC FSImageObj pObj TSYNC FSCRCObj pobj2 Function TSYNC_FS_getHeader Description Get the image header for a particular flash image Parameters k IN hnd Board handle pobj Pointer to the image information x OUT pObj2 Pointer to the image header result Returns TSYNC SUCCESS Success e DLL EXPORT TSYNC ERROR TSYNC FS getHeader TSYNC BoardHandle hnd TSYNC FSImageObj poObj TSYNC FSImageHeaderObj pObj2 Function TSYNC_FS_getVersion Description Get the image version for a particular flash image Parameters IN hnd Board handle x pobj Pointer to the image information OUT pObj2 Pointer to the image version result Returns TSYNC SUCCESS Success DLL EXPORT 4 42 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC ERROR TSYNC FS getVersion TSYNC BoardHandle hnd TSYNC FSImageObj poObj TSYNC FSVersionObj poObj2 Log Service Function TSYNC_LS_getErrorLog Description Get the error log Parameters E IN hnd Board handle OUT pObj Pointer to the error log result Returns TSYNC SUCCESS Success EZ DLL EXPORT TSYNC ERROR TSYNC LS getErrorLog TSYNC BoardHan
152. ction TSYNC SS getRef Description Get currently selected time and 1PPS reference Parameters E IN hnd Board handle OUT pObj Pointer to the reference result Returns TSYNC_SUCCESS Success EZ DLL EXPORT TSYNC_ERROR TSYNC_SS_getRef TSYNC BoardHandle hnd TSYNC ReferenceObj poObj Function TSYNC SS getMaxTfom Description Get the maximum TFOM Parameters sl IN hnd Board handle id OUT tfom Pointer to the maximum TFOM result Returns TSYNC_SUCCESS Success xy DLL EXPORT TSYNC ERROR TSYNC SS getMaxTfom TSYNC BoardHandle hnd TFOM tfom Function TSYNC SS setMaxTfom Description Set the maximum TFOM Parameters IN hnd 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 IN hnd Board handle OUT tfom Pointer to the current TFOM result Returns TSYNC_SUCCESS Success DLL EXPORT Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC_ERROR TSYNC_SS_getTfom TSYNC BoardHandle hnd TFOM tfom Function TSYNC SS getSync Description Get the current sync state Parameters IN
153. ction as a PTP Slave It should synchronize to a PTP Master set up with the following parameters e Announce Rate once every 4 seconds or faster e Delay Mechanism End to End e Multicast operation active Unicast disabled e Two Step operation When first connected to a network that contains an active PTP Master it may take up to a minute for the Port State to change to the slave state After that it will take up to two minutes for the PTP connection to be accepted as a valid reference by the TSync PTP If the TSync PCle PTP device is not entering the Slave Port state as reported by PTR GetPortState check the following configuration parameters e Make sure the Operation Mode is set to Slave e Make sure a valid IP address is currently being used 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 lt device gt lt inst gt 0 The Reset command may take up to two minutes to complete e If the card was previously used as a PTP Master and has been changed to a Slave make sure that the Priority1 and Priority2 values are both set to 128 e Check to make sure that the Master s Announce Rate is within the slave s Announce Reception Timeout interval refer to the Port Settings section for more information 5 7 2 2 Quick Configuration as Master Device In order
154. d unsigned int nInstances Description Get number of IRIG output instances present in the system Input Parameters hnd Board handle Output Parameters ninstances The number of instances result Returns TSYNC SUCCESS Success 4 2 18 23 TSYNC IP getTimeScale TSYNC ERROR TSYNC IP g tTimeScale TSYNC BoardHandle hnd IO PORT nInstance TSYNC TimeScaleObj poObj Description Get the IRIG output s time scale Input Parameters hnd Board handle ninstance The instance number 4 190 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Output Parameters pObj Pointer to the time scale result Returns TSYNC_SUCCESS Success 4 2 18 24 TSYNC_IP_setTimeScale TSYNC ERROR TSYNC IP s tTimeScale TSYNC BoardHandle hnd IO PORT nInstance TSYNC TimeScaleObj poObj Description Set the IRIG output s time scale Input Parameters hnd Board handle ninstance The instance number pObj Pointer to the time scale information Returns TSYNC SUCCESS Success 4 2 19 IRIG Reference Component IR Calls IR calls control and process decoded IRIG input streams to determine 1PPS and time validity These settings include configuring the IRIG format contents of the control field section if included in the IRIG signal Signature Control which determines when the IRIG modulation will be present Offsets to account for cable delays and other latenci
155. dHandle hnd TSYNC_TimeYearObj poObj Description Set the year Input Parameters hnd Board handle pObj Pointer to the year information Returns TSYNC_SUCCESS Success 4 2 8 18 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 19 TSYNC CS setDstState TSYNC ERROR TSYNC CS setDstState 4 148 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC BoardHandle hnd TSYNC TimeDSTStateObj poObj Description Set the DST state Input Parameters hnd Board handle pObj Pointer to the DST state information Returns TSYNC SUCCESS Success 4 2 8 20 TSYNC CS getTimeSec TSYNC ERROR TSYNC CS getTimeSec TSYNC BoardHandle hnd unsigned int nSeconds unsigned int nNanos Description Get the time in seconds and nanoseconds format Note API call TSYNC_getHWSecondsTime is recommended for faster time reads Input Parameters hnd Board handle Output Parameters nSeconds The seconds result nNanos The nanoseconds result Returns TSYNC SUCCESS Success 4 2 8 21 TSYNC CS setTimeSec TSYNC ERROR TSYNC CS setTimesec TSYNC BoardHandle hnd unsigned int nSeconds unsigned int nNanos Description
156. de TSYNC BoardHandle hnd unsigned int nInstance GL MODE mode GL DYN dyn Description Synchronizable Timecode Generator Supplemental Information 4 165 TSync PCle Factory Driver Guide Spectracom Corporation Get the GPS receiver mode Input Parameters hnd Board handle ninstance The instance number Output Parameters mode The receiver mode result dyn The receiver dynamics result Returns TSYNC_SUCCESS Success 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 TSYNC GR getMode instead 4 2 13 9 TSYNC GR setDynamics This API call is deprecated use TSYNC GR setMode instead 4 2 13 10 TSYNC GR getFixData TSYNC ERROR TSYNC GR getFixData TSYNC BoardHandle hnd unsigned int nInstance TSYNC FixDataObj poObj Description 4 166 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Get the GPS position fix data Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the position fix data result Returns
157. def enum RS TT START TYPES 0 0 RS TT FACT RS TT USER A RS_TT CURRENT 2 RS TT NUM TYPES RS TABLE TYPE General Purpose services typedef enum OD MODE DIRECT OD MODE MATCH TIME 1 OD MODE SOUARE WAVE 2 OD MODE RESERVED 23 OD_MODE LED services typedef enum EC MODE SYNC o Dy EC MODE HOLDOVER 1 EC MODE ALARM 2 EC MODE 1PPS oe EC MODE MANUAL 4 EC MODE NU TSync PCle Factory Driver Guide for FPGA Reset the microprocessor amp peripherals Reset the FPGA only Minimum Timestamp index Timestamp on Time Reference change Timestamp on 1PPS Reference change Timestamp on TFOM value change Timestamp on Sync state change Timestamp on Holdover state change Timestamp on entering Holdover Number of Timestamps Factory default table built at runtime User default table stored in eeprom Current working table Direct Output Value Match Time Output Square Wave LED indicates sync status LED indicates holdover status LED indicates alarm status LED goes on briefly when 1PPS occurs LED manually controlled Synchronizable Timecode Generator Supplemental Information 4 9 TSync PCle Factory Driver Guide Spectracom Corporation 4 10 EC MODE typedef enum EC STATE OFF
158. dexed E interrupts Returns TSYNC SUCCESS Success z DLL EXPORT TSYNC ERROR TSYNC_waitFor TSYNC BoardHandle handle INT TYPE intType uint32 t index Host Agent xy Function TSYNC HA getCaps Description Gets a single page of capability results Parameters IN hnd Board handle x pageNum Component Agent Identifier ca OUT pObj Pointer to the page of capability results Returns TSYNC SUCCESS Success xf DLL EXPORT TSYNC ERROR TSYNC HA getCaps TSYNC BoardHandle hnd unsigned int pageNum TSYNC CapabilityPageObj pObj Discovery and Configuration Service K Function TSYNC_DCS_getCardInfo Description Gets information about an option card in a specified slot Parameters g IN hnd 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 x Function TSYNC DCS getFeatureByIdx Description Gets the feature ID and instance for a specified feature index on an option card in a specified slot IS Synchronizable Timecode Generator Supplemental Information 4 33 TSync PCle Factory Driver Guide Spectracom Corporation 4 34 Parameters IN hnd Board handle il pInObj Slot and index of feature
159. dle i nInstance The instance number OUT pw The pulse width result Synchronizable Timecode Generator Supplemental Information 4 113 TSync PCle Factory Driver Guide Spectracom Corporation Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC PP getPulseWidth TSYNC BoardHandle hnd unsigned int nInstance unsigned int pw PX Function TSYNC PP setPulseWidth Description Set the PPS output s pulse width Pulse width is in nanoseconds from 10 nsec to 999 999 990 nsec Parameters A IN hnd Board handle nInstance The instance number X pw The pulse width information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC PP setPulseWidth TSYNC BoardHandle hnd unsigned int nInstance unsigned int pw PYR Function TSYNC PP getNumInst Description Get number of PPS output instances present in the system Parameters G IN hnd Board handle ij OUT nInstances The number of instances result Returns TSYNC_SUCCESS Success X DLL EXPORT TSYNC ERROR TSYNC PP getNumInst TSYNC BoardHandle hnd unsigned int nInstances Variable Freguency Output Component a7 Function TSYNC VP getSigCtrl Description Get the Variable Freguency output s signature control state Parameters E IN hnd Board handle j nInstance The instance number x OUT sig The signature control result Returns
160. dle hnd TSYNC_ErrorLogObj poObj Function TSYNC LS getAlarm Description Get the alarm state for the specified alarm Parameters cal IN hnd Board handle x pobj Pointer to the alarm index information OUT pObj2 Pointer to the alarm flag result Returns TSYNC SUCCESS Success xf DLL EXPORT TSYNC_ ERROR TSYNC LS getAlarm TSYNC BoardHandle hnd TSYNC AlarmoObij pObj TSYNC FlagObj poObj2 f Function TSYNC LS setAlarm Description Clear the specified alarm Set 0 to clear Parameters he IN hnd Board handle k pobj Pointer to the alarm index information pobj2 Pointer to the alarm flag result Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC LS setAlarm TSYNC BoardHandle hnd TSYNC AlarmoObij pObj TSYNC FlagObj poObj2 Function TSYNC LS getVersion Description Get the firmware version string Parameters IN hnd Board handle OUT pObj Pointer to the firmware version result Synchronizable Timecode Generator Supplemental Information 4 43 TSync PCle Factory Driver Guide Spectracom Corporation Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC LS getVersion TSYNC BoardHandle hnd TSYNC FirmwareVersionObj poObj f Function TSYNC LS getSerialNo Description Get the serial number string Parameters E IN hnd Board ha
161. e Parameters Ei IN Ana Board handle ig ninstance The instance number pobj The module s new Ethernet interface settings Returns TSYNC SUCCESS Success DLL EXPORT TSYNC_ ERROR TSYNC_PTR_setEthernetItf TSYNC_BoardHandle hnd unsigned int nInstance TSYNC PTPEthernetItfObj poObj x Function TSYNC PTR getClockSettings Description Gets the module s clock settings X X Nh Synchronizable Timecode Generator Supplemental Information 4 93 TSync PCle Factory Driver Guide Parameters x IN hnd Board handle a ninstance The instance number OUT pObj The module s new clock settings Returns TSYNC SUCCESS Success a DLL EXPORT TSYNC ERROR TSYNC PTR _getClockSettings TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPCIkSettingsObj pObj Function TSYNC_PTR_setClockSettings Description Sets the module s clock settings Parameters IN hnd Board handle i nInstance The instance number X pObj The module s clock settings Returns TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC PTR _setClockSettings TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPCIkSettingsObj poObj Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC_PTR_getUnitSettings TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPUnitSettingsObj pOb
162. e unsigned int int nOffset 4 112 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Function TSYNC_PP_setOffset Description Get the PPS output s offset Offset is in nanoseconds from E 500 msec to 500 msec Parameters Es IN hnd Board handle nInstance The instance number Es noffset The offset information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC PP setOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Function TSYNC_PP_getEdge Description Get the PPS output s edge Parameters IN hnd Board handle y ninstance The instance number K OUT edge The edge result Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC PP getEdge TSYNC BoardHandle hnd unsigned int nInstance EDGE edge Function TSYNC_PP_setEdge Description Set the PPS output s edge Parameters 4 IN hnd Board handle i nInstance The instance number a 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 Parameters IN hnd Board han
163. e GPIO pin GPI Input 0 With the input signal attached the GPIO pin still needs to be enabled The Windows control utility included with the Windows driver can handle some of the functionality of the External Event input but not everything The Windows driver needs to be used to enable a true event input the utility by itself can only show a simulated input it cannot handle a true applied input to the board In order for the event input to be enabled Time Stamping needs to be enabled This is the TSYNC HW SetTSEnable command This command only needs to be run once Also the GPIO pin that is being used needs to be enabled for use It is not enabled by default so the signal will not be noticed until the specific pin is enabled Once the input is enabled there are also commands available to define whether the board should trigger on the rising edge or the trailing edge if desired To enable GPIO Input 0 for timestamps on rising edge the example program commands would be the following 1 HW SetTsEnable 0 1 Enables time stamping system 2 GI SetTsEnable 0 0 1 Enables GPIO Input 0 time stamping 3 GI SetEdge 0 0 1 Enables GPIO Input 0 rising active edge Information Reading timestamp commands are below Synchronizable Timecode Generator Supplemental Information 5 237 TSync PCle Factory Driver Guide Spectracom Corporation e HW GetTsCount 0 1 Gets number of timestamps collected from GPIO input 0
164. e Generator Supplemental Information 1 1 Page 2 Spectracom Ageless Master Oscillator Manual Spectracom Corporation TSync PCle Factory Driver Guide 2 Installing and Uninstalling the Driver 2 1 Linux The driver is designed to operate with 32bit or 64bit Linux kernel version 2 6 x running on a PC system with x86 compatible processor s NOTE Due to kernel version differences the driver will need to be built before it is used You will need GCC and Make utilities You will also need the GNU C Library Included with the driver are example programs with source utilizing the API library 2 1 1 Installing the Driver NOTE lf the system contains a previously installed version of the driver that version must first be uninstalled This driver is delivered via the archive file tsync lt rev gt tar gz e where lt rev gt is the current driver revision 1 Open a terminal window 2 Make sure you are logged in as a root user 3 Copy the driver file to a convenient directory location 4 Change to the directory in which the driver files were copied 5 Extract the driver using the following command gt gunzip c tsync lt rev gt tar gz tar xvf 6 Build the driver by issuing the commands below cd tsync cd linux make clean make make install VVVV NV NOTE Due to the differences between the many Linux distributions some build errors may occur The most likely cause is an incorrectly installed kernel source Refe
165. e 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 Input Parameters hnd Board handle index The input index edge The edge information Returns TSYNC SUCCESS Success 4 156 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 4 2 11 4 TSYNC_GI_getTsEnable TSYNC_ERROR TSYNC_ET getTsEnable TSYNC BoardHandle hnd ID PIN index int bEnable Description Get the GPI s timestamp enable state when time stamping input changes Input Parameters hnd Board handle index The input index Output Parameters bEnable The enabled result Returns TSYNC_SUCCESS Success 4 2 11 5 TSYNC GI setTsEnable TSYNC ERROR TSYNC GI _ setTsEnable TSYNC BoardHandle hnd ID PIN index int 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 getNumlnst TSYNC ERROR TSYNC GI getNuminst TSYNC BoardHandle hnd unsigned int nInstances D
166. e validity from the Host Parameters me IN hnd Board handle k nInstance The instance number a OUT bTimeValid The time reference result A bPpsValid The pps reference result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC HR getValidity TSYNC BoardHandle hnd unsigned int nInstance int bTimeValid int bPpsValid Z Function TSYNC HR setValidity Description Set the reference validity of the Host Parameters Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide IN hnd Board handle ninstance The instance number a bTimeValid The time reference information bPpsValid The pps reference information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC HR setValidity TSYNC BoardHandle hnd unsigned int nInstance int bTimeValid int bPpsValid Function TSYNC HR setTime Description Set the time from the Host Parameters E IN hnd Board handle E nInstance The instance number TSYNC TimeObj The time information Returns TSYNC SUCCESS Success 2 DLL EXPORT TSYNC_ERROR TSYNC_HR_setTime TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeObj pobj Function TSYNC_HR_getLocal Description Get the ASCII reference s local time zone and DST rule x Timezone and DST offsets are in seconds
167. ecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Get specified working priority table entry s enable state Input Parameters hnd Board handle index Table entry index Output Parameters enabled Pointer to the enabled result Returns TSYNC_SUCCESS Success 4 2 24 12 TSYNC_RS_setEnable TSYNC_ERROR TSYNC RS Ser Enable TSYNC BoardHandle hnd unsigned int index unsigned int enabled Description Set specified working priority table entry s enable state Input Parameters hnd Board handle index Table entry index enabled Pointer to the enabled information Returns TSYNC_SUCCESS Success 4 2 24 13 TSYNC_RS_getStateTable TSYNC_ERROR TSYNC RS getStateTable TSYNC_BoardHandle hnd TSYNC_ReferenceStateTableObj pObj Description Get the reference validity state table Input Parameters hnd Board handle Output Parameters pObj Pointer to the reference state table result Returns TSYNC_SUCCESS Success 4 2 25 Supervisor Service SS Calls SS calls maintain the time source 1PPS source Sync and Holdover states of the system Synchronizable Timecode Generator Supplemental Information 4 221 TSync PCle Factory Driver Guide Spectracom Corporation 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 T
168. econds Input Parameters hnd Board handle ninstance The instance number Output Parameters nOffset The offset result Returns TSYNC_SUCCESS Success 4 2 18 4 TSYNC_IP_setOffset TSYNC ERROR TSYNG IP setOffset TSYNC BoardHandle hnd Synchronizable Timecode Generator Supplemental Information 4 183 TSync PCle Factory Driver Guide Spectracom Corporation IO PORT ninstance int noffset Description Set the IRIG output s 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 18 5 TSYNC IP getLocal TSYNC ERROR TOYNG IP getLocal TSYNC BoardHandle hnd IO PORT nInstance TSYNC LocalClockoObj poObj 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 TSYNC SUCCESS Success 4 2 18 6 TSYNC IP setLocal TSYNC ERROR TSYNC IP setLocal TSYNC_BoardHandle hnd IO PORT nInstance TSYNC LocalClockoObj poObj Description Set 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 information Returns 4 184 Synchronizable
169. ectracom The GPS receiver is warranted for one year from date of shipment and subject to the exceptions listed above The power adaptor if supplied is warranted for one year from date of shipment and subject to the exceptions listed above THE ANALOG CLOCKS ARE WARRANTED FOR ONE YEAR FROM DATE OF SHIPMENT AND SUBJECT TO THE EXCEPTIONS LISTED ABOVE THE TIMECODE READER GENERATORS ARE VWWARRANTED FOR ONE YEAR FROM DATE OF SHIPMENT AND SUBJECT TO THE EXCEPTIONS LISTED ABOVE The Rubidium oscillator if supplied is warranted for two years from date of shipment and subject to the exceptions listed above All other items and pieces of equipment not specified above including the antenna unit antenna surge suppressor and antenna preamplifier are warranted for 5 years subject to the exceptions listed above WARRANTY CLAIMS Spectracom s obligation under this warranty is limited to infactory service and repair at Spectracom s option of the product or the component thereof which is found to be defective If in Spectracom s judgment the defective condition in a Spectracom product is for a cause listed above for which Spectracom is not responsible Spectracom will make the repairs or replacement of components and charge its then current price which buyer agrees to pay Spectracom shall not have any warranty obligations if the procedure for warranty claims is not followed Users must notify Spectracom of the claim with full i
170. eference Component sy Synchronizable Timecode Generator Supplemental Information 4 63 TSync PCle Factory Driver Guide Returns EL DLL EXPORT Function Description Parameters IN hnd a E nInstance s OUT bTimeValid E bPpsValid Spectracom Corporation TSYNC FR getValidity Get the freguency validity structure Board handle The instance number The time reference result The pps reference result TSYNC SUCCESS Success TSYNC ERROR TSYNC_FR_getValidity TSYNC BoardHandle hnd unsigned int nInstance int bTimeValid int bPpsValid JR Function TSYNC FR getFreg Description Get the freguency of a freguency reference Parameters 5 IN hnd Board handle nInstance The instance number OUT freq The frequency result Returns TSYNC SUCCESS Success ty DLL EXPORT TSYNC ERROR TSYNC FR getFreg TSYNC BoardHandle hnd unsigned int nInstance unsigned int freq Function TSYNC_FR_setFreq Description Set the frequency of a frequency reference Parameters IN hnd Board handle nInstance The instance number freq The frequency information Returns af DLL EXPORT TSYNC_SUCCESS Success TSYNC_ERROR TSYNC_FR_setFreq TSYNC BoardHandle hnd unsigned int unsigned int Function Description 4 64 cof system Parameters k IN hnd ki OUT nInstances nIn
171. enerator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 6 2 5 6 2 6 6 2 7 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 TPRO_setHeartbeat unsigned char TPRO setHeartbeat TPRO BoardObj hnd TPRO HeartObj Heartp Description This routine controls the hearbeat output The heartbeat output may be a square wave or pulse at various frequencies This routine is tied to control general purpose output 0 Input Parameters hnd Board handle Heartp Pointer to TPRO HeartObj Returns TPRO_FREQ_ERR invalid frequency value TPRO_COMM_ERR error communicating with driver TPRO_SUCCESS success TPRO_setMatchTime unsigned char TPRO setMatchTime TPRO BoardObj hnd TPRO MatchObj Matchp Description This routine drives the match output line high start time or low stop time when the desired time is met This routine is tied to control general purpose output 1 Input Parameters hnd Board handle Matchp Pointer to TPRO MatchObj Returns TPRO DAY PARM ERR invalid days parameter must be 0 366 TPRO HOUR PARM ERR invalid hours parameter must be 0 23 TPRO MIN PARM ERR i
172. er Guide Spectracom Corporation int file descriptor unsigned short devid unsigned short options TPRO BoardObj TPRO ALTITUDE OBJECT typedef struct TPRO AltObj float meters TPRO AltoObj TPRO DATE OBJECT x typedef struct TPRO DateObj unsigned short year unsigned char month unsigned char day TPRO DateObj TPRO LONGITUDE LATTITUDE OBJECT typedef struct TPRO LongLat unsigned short degrees float minutes TPRO_LongObj TPRO_LatObj TPRO MATCH OBJECT E typedef struct TPRO MatchObj unsigned char matchType start stop time double seconds unsigned char minutes unsigned char hours unsigned short days TPRO _MatchOb 3 TPRO SATINFO OBJECT Kf typedef struct TPRO SatObj unsigned char satsTracked num sats tracked unsigned char satsView num sats in view TPRO SatObj TPRO HEARTBEAT OBJECT ay 6 2 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide typedef struct TPRO HeartObj unsigned char signalType unsigned char outputType square or pulse jamming option double TPRO HeartObj frequency TPRO TIME OBJ ECT 7 typedef struct T PRO TimeObj heartbeat freg
173. er to the time result Returns TSYNC SUCCESS Success x 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 z output will transition to an active high state Parameters IN hnd Board handle index GPO index information k pobj Pointer to the time information Synchronizable Timecode Generator Supplemental Information 4 133 TSync PCle Factory Driver Guide Spectracom Corporation Returns TSYNC SUCCESS Success x m DLL EXPORT TSYNC ERROR TSYNC HW setMatchTimeHi TSYNC BoardHandle handle OD PIN index TSYNC TimeObj poObj f Function TSYNC_HW_getMatchTimeLo Description Get the match time value when the specified general purpose output will transition to an active low state Parameters IN hnd Board handle index GPO index information x OUT pObj Pointer to the time result Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC HW getMatchTimeLo TSYNC BoardHandle handle OD PIN index TSYNC TimeObj pObj f Function TSYNC_HW_setMatchTimeLo Description Set the match time value when the specified general purpose output will transition to an active low state Parameters IN hnd Board handle index GPO i
174. ers ce The Coded Expression result Returns TSYNC SUCCESS Success 4 2 18 15 TSYNC IP setCodedExpr TSYNC ERROR TSYNC IP setCodedExpr Synchronizable Timecode Generator Supplemental Information 4 187 TSync PCle Factory Driver Guide Spectracom Corporation TSYNC BoardHandle hnd IO PORT 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 TSYNC_SUCCESS Success 4 2 18 16 TSYNC IP getCtriField TSYNE ERROR TSYNC IP getCtrlField TSYNC BoardHandle hnd IO PORT nInstance IL CF xef Description Get the IRIG Control Field Input Parameters hnd Board handle ninstance The instance number Output Parameters cf The Control Field result Returns TSYNC_SUCCESS Success 4 2 18 17 TSYNC_IP_setCtrlField TSYNC ERROR TSYNC IP setCtrlField TSYNC BoardHandle hnd IO PORT nInstance IL CF oby 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 188 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 4 2 18 18 TSYNC_IP_getMessage TSYNC_ERROR TSYNC IP getMessage TSYNC BoardHandle hnd IO PORT nInstance TSYNC IRIGMessageObj pObj Description Get the
175. ers 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 nInstance TSYNC IRIGCfDataObj pobj Description Get the latest IRIG Control Field data received Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the control field information Returns TSYNC_SUCCESS Success 4 2 19 19 TSYNC_IR_getLocal TSYNC ERROR TSYNC IR getLocal TSYNC_BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj poObj Description Get 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 4 198 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Output Parameters pObj Pointer to the Local Clock result Returns TSYNC_SUCCESS Success 4 2 19 20 TSYNC_IR_setLocal TSYNC ERROR TSYNC IR setLocal TSYNC_BoardHandle hnd unsigned int nInstance TSYNC LocalClockOb poObj 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 4 2 19 21 TSYNC_IR_getTimeScale TS
176. ers pObj Pointer to the error log result Returns TSYNC SUCCESS Success Alarms Note Where lt alarm type gt 0 Not in Sync or Holdover mode 4 200 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 1 In Holdover mode 2 Frequency error 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 ge tAlarm TSYNC BoardHandle hnd TSYNC_AlarmObj pObj TSYNC FlagObj poObj2 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 TSYNC_SUCCESS Success 4 2 20 3 TSYNC LS setAlarm TSYNC ERROR TSYNC LB setAl arm TSYNC BoardHandle hnd TSYNC_AlarmObj pObj TSYNC FlagObj poObj2 Description Clear the specified alarm Set 0 to clear Input Parameters hnd Board handle pObj Pointer to the alarm index information pObj2 Pointer to the alarm flag result Returns TSYNC SUCCESS Success 4 2 20 4 TSYNC LS getVersion TSYNC ERROR TSYNC LS getVersion TSYNC BoardHandle hnd TSYNC FirmwareVersionObj pObj Description Synchronizable Timecode Generator Supplemental Information 4 201 TSync PCle Factory Driver Guide Spectracom Corporation Get the firmware version string Input Parameters hnd Board
177. ervic sb Function TSYNC MS reset Description Reset a shared memory data set item Parameters IN hnd Board handle index Index of the shared memory set 4 FH HF AX Returns TSYNC SUCCESS Success DLL EXPORT TSYNC_ERROR TSYNC MS reset TSYNC BoardHandle hnd S DI INDEX index Function TSYNC_MS_getData Description Get a shared memory data set item A Parameters E IN hnd Board handle a index Index of the shared memory set x OUT pObj Pointer to the shared memory dataset result Returns TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC MS getData TSYNC BoardHandle hnd S DI INDEX index TSYNC SharedMemoryObj pObj Function TSYNC_MS_setData Description Set a shared memory data set item 4 122 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Parameters IN hnd Board handle index Index of the shared memory set pobj Pointer to the shared memory dataset information Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC_ERROR TSYNC MS setData TSYNC BoardHandle hnd S DI INDEX index TSYNC SharedMemoryObj poObj General Purpose Output Component V d Function TSYNC GO getSigCtrl Description Get the GPO s signature control state Parameters IN hnd Board handle lt
178. es etc Note Where lt frg gt 0 BCD TOY Control Functions Binary Seconds SBS 1 BCD TOY Control Functions 2 BCD TOY 3 BCD TOY Binary Seconds SBS 4 BCD TOY Year Control Functions Binary Seconds SBS 5 BCD TOY Year Binary Seconds SBS 6 BCD TOY Year 7 BCD TOY Year Binary Seconds SBS 8 Unknown no fields Where lt cf gt 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 Synchronizable Timecode Generator Supplemental Information 4 191 TSync PCle Factory Driver Guide Spectracom Corporation Where lt mod gt 0 No carrier 1 100 Hz 2 1 kHz 3 10 kHz 4 100 kHz 5 1 MHz 6 Unknown frequency 4 2 19 1 TSYNC_IR_getOffset TSYNC ERROR TSYNC DR getOffset TSYNC BoardHandle hnd unsigned int nInstance int 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 TSYNC ERROR TSYNC_IR setOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Description Set the IRIG reference s 1PPS input offset Offset is in nanoseconds from 500 msec to 500 msec Input Para
179. es used in the API calls to define parameters can be found in the Header files located in sections 4 1 1 and 4 1 2 of this document 4 2 8 Clock Service CS Calls CS calls provide an abstract interface to the timing subsystem 4 2 8 1 TSYNC CS getTime TSYNC ERROR TSYNC CS Get Time TSYNC BoardHandle hnd TSYNC TimeObj Timep Description Get the DOY time from the firmware TSYNC getHWSystemTime is recommended for faster time reads Input Parameters hw Handle Output Parameters Timep Pointer to the time result Returns TSYNC SUCCESS Success NOTE Instance value of 1 returns BCD time year DOY time information Instance value of 2 returns the time in seconds and nanoseconds 4 2 8 2 TSYNC CS setTime TSYNC ERROR TSYNC CS setTime TSYNC BoardHandle hnd TSYNC TimeObj Timep Description Set the DOY time Input Parameters hw Handle Timep Pointer to the time information Synchronizable Timecode Generator Supplemental Information 4 143 TSync PCle Factory Driver Guide Spectracom Corporation Returns TSYNC_SUCCESS Success Note Entered as CS setTime 0 1 lt year gt lt DOY gt lt Hour gt lt Minutes gt lt Seconds gt Time Scales Note Where lt scale gt 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
180. escription Get number of GPIO Inputs present in the system Input Parameters hnd Board handle Output Parameters ninstances The number of instances result Returns TSYNC SUCCESS Success Synchronizable Timecode Generator Supplemental Information 4 157 TSync PCle Factory Driver Guide Spectracom Corporation 4 2 12 General Purpose Output GO Calls GO calls configure and monitor the general purpose output GPO pins Note Where lt edge gt 0 Falling edge 1 Rising edge 2 both uncommon Where lt valid gt O Not valid 1 Valid Where lt pin gt can be a value of 0 through 3 Pin correlates to the GPI Pin number on the board Where lt index gt should always be a value of 0 with only one board installed 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 sig Description Set the GPO s signature control state Input Parameters hnd Board handle gpo GPO index 4 158 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation sig The signature control information Returns T
181. escription Get the Variable Freguency output configuration Parameters x IN hnd Board handle sof ninstance The instance number OUT cfg The configuration result Returns TSYNC_SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC VP getCfg TSYNC BoardHandle hnd unsigned int nInstance Synchronizable Timecode Generator Supplemental Information 4 115 TSync PCle Factory Driver Guide Spectracom Corporation TSYNC _VPCfgObj pobj V d Function TSYNC VP getNumInst Description Get number of Variable Freguency output instances present in A the system Parameters 2 IN hnd 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 El T1 Output Component k JR Function TSYNC ETP getSigCtrl Description Get the E1 T1 output s signature control state Parameters 4 IN hnd Board handle G nInstance The instance number J OUT sig The signature control result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC ETP getSigCtrl TSYNC BoardHandle hnd unsigned int nInstance SIG CTL sig Function TSYNC ETP setSigCtrl Description Set the E1 T1 output s signature control state Parameters E IN hnd Board handle g nInstance The instance number k sig
182. esult Returns TSYNC_SUCCESS Success 7 DLL EXPORT TSYNC ERROR TSYNC GO getSguareWave TSYNC BoardHandle hnd OD PIN gpo TSYNC GPOSguareObj pObj Function TSYNC_GO_setSquareWave Description Get the GPO s square wave output configuration structure k Offset and pulse width are in nanoseconds Period is in nanoseconds or microseconds depending on scale bit msb x Offset is from 500 msec to 500 msec Period is from 100 nsec to 20 sec in nanosecond scale and from 100 usec to 20 000 sec in microsecond scale Pulse width is from 10 nsec to 999 999 990 nsec Parameters e IN hnd Board handle x gpo GPO index pobj Pointer to the configuration information Returns TSYNC_SUCCESS Success xf DLL EXPORT TSYNC ERROR TSYNC GO setSguareWave TSYNC BoardHandle hnd OD PIN gpo TSYNC GPOSguareObj pObj Function TSYNC_GO_getSWOffset Description Get the GPO s square wave offset Offset is in nanoseconds 4 126 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Parameters IN hnd Board handle k gpo GPO index off Pointer to the sguare wave offset Returns x DLL EXPORT TSYNC SUCCESS Success TSYNC ERROR TSYNC GO getSWOffset TSYNC BoardHandle hnd OD PIN gpo int off Function TSYNC_GO_setSWOffset Description Se
183. eters IN hnd Board handle ninstance The instance number req The request character information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC_AP_setReqChar TSYNC BoardHandle hnd unsigned int nInstance char reg Function TSYNC AP getUartCfg Description Get the ASCII output UART configuration Parameters E IN hnd Board handle g nInstance The instance number A OUT pCfg The UART configuration Returns TSYNC SUCCESS Success EZ 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 IN hnd Board handle mi nInstance The instance number z pl g The UART configuration 4 84 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC AP setUartCfg TSYNC BoardHandle hnd unsigned int nInstance UD CFG pCfg Function TSYNC AP getNumInst Description Get number of ASCIT output instances present in the system Parameters E IN hnd Board handle J OUT nInstances The number of instances result Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC AP getNumInst TSYNC BoardHandle hnd
184. eturns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IR getLocal TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj poObj Function TSYNC_IR_setLocal Description Set the IRIG reference s local time zone and DST rule y Timezone and DST offsets are in seconds Parameters ee IN hnd Board handle nInstance The instance number x pobj Pointer to the Local Clock information Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC IR setLocal TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pobj PX Function TSYNC IR getTimeScale Description Get the IRIG reference s time scale Parameters IN hnd Board handle nInstance The instance number id OUT pObj Pointer to the time scale result Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IR getTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Function TSYNC_IR_setTimeScale Description Set the IRIG reference s time scale Parameters x IN hnd Board handle x nInstance The instance number id pobj Pointer to the time scale information Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC IR setTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Synchronizable Ti
185. ever the output should be based on the currently selected output mode will appear on the general purpose outputs Q The meaning of TSYNC_GO_setEnable is unclear does it enable the pulse capability or turn the pulse on A This call enables turns on the general purpose output signal to the pin All of the modes are still operating within the hardware and can be configured without being enabled by this call but the outputs won t be reflected on the pins until enabled by this call Q GO_SetMatchEnable has a level argument which seems strange given the names of the two functions after it Since want a high level pulse am assuming that should use LEVEL_HIGH is this correct A The two functions TSYNC HW setMatchTimeHi and TSYNC HW setMatchTimeLo are calls that go explicitly to the hardware The TSYNC GO setMatchEnable is a call to the SW Synchronizable Timecode Generator Supplemental Information 5 239 TSync PCle Factory Driver Guide Spectracom Corporation component and provides a single call to enable the high and low time matching LEVEL_HIGH or LEVEL_LOW is passed to specify whether to enable matching against the low match time or the high match time Q What is the default state of the General Purpose Outputs on power up before any calls are made A All general purpose outputs default to low outputs at system startup 5 4 Using the Host PC as an External Time Reference for the TSync Board To begin there are t
186. following command gt gunzip c tsync lt rev gt lt arch gt pkg tar gz tar xvf 6 Install the driver package by issuing the following command gt pkgadd d tsync pkg 2 2 2 Uninstalling the Driver 1 Open a terminal window 2 Make sure you are logged in as a root user 3 Uninstall the driver by issuing the following command gt pkgrm tsync 2 2 3 File Locations The following table illustrates where package contents ultimately reside in relation to the support of either API classification 2 4 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide x86 Architecture File Destination 64 bit API 32 bit API tsync driver usr kernel drv No Yes tsync conf usr kernel drv No Yes tsync driver usr kernel drv amd64 Yes No tsync conf usr kernel drv amd64 Yes No libtpro 32 a usr lib Yes Yes libtsync32 a usr lib Yes Yes libtpro a usr lib amd64 Yes No libtsync64 a usr lib amd64 Yes No tpro h usr include Yes Yes tpro error codes h usr include Yes Yes tsync h usr include Yes Yes tsync error codes h usr include Yes Yes tsync hw h usr include Yes Yes tsync platform mapping h usr include Yes Yes tsync example h usr include Yes Yes 2 2 4 Example Programs The driver package also includes folders with example programs to in
187. he 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 Synchronizable Timecode Generator Supplemental Information 4 177 TSync PCle Factory Driver Guide Spectracom Corporation 4 2 16 10 TSYNC_HW_setMatchTimeHi TSYNC_ERROR TS NC AW setMatchT imeHi TSYNC BoardHandle handle OD PIN index TSYNC TimeObj pOb3 Description Set 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 pObj Pointer to the time information Returns TSYNC_SUCCESS Success 4 2 16 11 TSYNC_HW_getMatchTimeLo TSYNC_ERROR TSYNC_HW ge tMatchTimeLo TSYNC BoardHandle handle OD PIN index TSYNC TimeObj p0b3 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 4 2 16 12 TSYNC_HW_setMatchTimeLo TSYNC_ERROR TSYNC HW setMatchT imeLo TSYNC BoardHandle handle OD PIN index TSYNC TimeObj pOb3 Description Set the match time value when the specified general purpose output will transition to an active low state
188. he module Returns TSYNC SUCCESS Success xP DLL EXPORT TSYNC ERROR TSYNC PTR setPortState TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPPortStateObj poObj Function TSYNC PTR getPortSettings Description Gets various settings of a port on the module Parameters lt IN hnd Board handle a nInstance The instance number x OUT pObj Various settings of a port on the module Returns TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC PTR getPortSettings TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPPortSettingsObj poObj Function TSYNC_PTR_setPortSettings Description Sets various settings of a port on the module Synchronizable Timecode Generator Supplemental Information 4 95 TSync PCle Factory Driver Guide Spectracom Corporation Parameters IN hnd Board handle ninstance The instance number id pobj Various settings of a port on the module Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC PTR setPortSettings TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPPortSettingsObj poObj V d Function TSYNC PTR getClkOuality Description Gets the module s reported clock guality information Parameters x IN hnd Board handle nInstance The instance number OUT pObj The module s reported clock quality informatio
189. he system will leave the sync state end enter the holdover state The default threshold is 15 Since 15 is the highest TFOM value this means that the threshold will never be triggered 4 2 25 5 TSYNC SS getTfom TSYNC ERROR TSYNC SS getTfom TSYNC BoardHandle hnd TFOM tfom Description Get the current system TFOM Input Parameters hnd Board handle Output Parameters tfom Pointer to the current system TFOM result Returns TSYNC SUCCESS Success 4 2 25 6 TSYNC SS getSync TSYNC ERROR TSYNC SS getSync TSYNC BoardHandle hnd int bSync Description Synchronizable Timecode Generator Supplemental Information 4 223 TSync PCle Factory Driver Guide Spectracom Corporation Get the current sync state Input Parameters hnd Board handle Output Parameters bSync Pointer to the current sync state result Returns TSYNC_SUCCESS Success 4 2 25 7 TSYNC_SS_getHoldover TSYNC ERROR TSYNC SS getHo ldover TSYNC BoardHandle hnd int 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 hnd unsigned int nHoldoverTimeout Description Get the current holdover timeout Input Pa
190. hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the receiver info result Returns TSYNC SUCCESS Success 4 2 13 15 TSYNC GR getCustom TSYNC ERROR TSYNC GR getCustom TSYNC BoardHandle hnd unsigned int nInstance TSYNC CustomMessageObj pObj Description Get the last unhandled GPS message Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the custom message result Returns 4 168 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC_SUCCESS Success 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 getNumlnst TSYNC ERROR TSYNC GR getNumInst TSYNC BoardHandle hnd unsigned int nInstances Description Get number of GPS 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 13 18 TSYNC GR delPos TSYNC ERROR TSYNC GR delPos TSYNC BoardHandle hnd unsigned int ninstance Description Clear any position inform
191. hronizable Timecode Generator Supplemental Information Hardware Ver Software Date Cafhuara Tima PTP Value ERR ERR ERR ERR Parent Information ERR ERR Module Information ERR El GrandMaster Information ERR ERR 2 11 Spectracom Corporation TSync PCle Factory Driver Guide 3 Upgrading Using the Driver Provided with the driver is an upgrade tool to support field upgrades of the configuration and firmware FPGA loads of the board The board can be upgraded with the following steps 1 Open a terminal or command prompt 2 Change to the directory in which the driver was installed Note On Windows systems open a command prompt and navigate to C Program Files Spectracom TSYNC PCI Upgrade 3 Change to the upgrade directory gt cd upgrade 4 Copy the upgrade image files to the upgrade directory The upgrade image files will consist of a configuration image patch_img bin and or firmware FPGA images rt fw bin and rt fpga bin 5 Run the Upgrade Tool gt TSyncUpgrade 0 Where 0 is the board instance of the TSync PCle to be upgraded 6 When the tool completes a reset of the board is reguired for the upgrade to take effect This can be done without resetting the host computer by using the reset example program Zed di gt cd examples gt SS Reset 0 0 Where the first 0 is the board instance of the TSync PCle to be reset Synchronizable Timecode Generator Supplemental Informatio
192. imageType Description Cancel the update seguence Input Parameters hw Handle Output Parameters imageType the type of update seguence being cancelled Returns TSYNC SUCCESS Success 4 2 27 Oscillator Component XO Calls XO calls analyze freguency measurements and make corrective adjustments to the timing system oscillator disciplining 4 228 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 4 2 27 1 TSYNC_XO_getDiscState TSYNC ERROR TSYNC XO getDiscState TSYNC BoardHandle hnd at disc Description Get the external oscillator s disciplining state 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 ge tMode 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 4 2 27 3 TSYNC XO setMode TSYNC ERROR TSYNC XO setMode TSYNC BoardHandle hnd XO MODE mode Description Set the external oscillator s mode used when disciplining or testing Input Parameters hnd Board handle mode The mode information Returns TSYNC SUCCESS Success 4 2 27 4 TSYNC XO getDac Synchronizable Timecode Generator Supplemental Information 4 229 TSync PCle
193. ings 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 resetWModule TSYNC ERROR TSYNC PTR resetModule TSYNC BoardHandle hnd unsigned int nInstance PTL RESET resetType Description Resets the PTP Module Input Parameters hnd Board handle ninstance The instance number Output Parameters resetType the type of reset requested Returns TSYNC_SUCCESS Success 0 Cold reset 1 Warm reset 2 Restore Factory Defaults and Reset Synchronizable Timecode Generator Supplemental Information 4 213 TSync PCle Factory Driver Guide Spectracom Corporation 4 2 23 15 TSYNC_PTR_getNuminst TSYNC ERROR TSYNC PTR _getNumIinst TSYNC BoardHandle hnd unsigned int nInstances Description Gets the number pf PTP instances in the system Input Parameters hnd Board handle Output Parameters ninstances pointer to number of PTP instances Returns TSYNC SUCCESS Success 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 4 214 TSYNC ERROR TSYNC_PTR_getValidity TSYNC BoardHandle hnd unsigned in
194. inter to the meter data result Returns TSYNC SUCCESS Success 4 2 28 6 TSYNC XS MeterCmd TSYNC ERROR TSYNC XS meterCmad TSYNC BoardHandle hnd TSYNC MeterCommandObj pObj Description Send a command to a meter Input Parameters hnd Board handle pObj Pointer to the meter command information Returns TSYNC_SUCCESS Success Synchronizable Timecode Generator Supplemental Information 4 235 TSync PCle Factory Driver Guide Spectracom Corporation 5 Example Routines The available API calls can be used individually or grouped together to perform various functions such as to generate and process interrupts at specified moments generate time stamps each time an event occurs or at a specified time Match Time etc This section provides information on commonly used functionalility of the TSync PCle boards 5 1 Interrupt Generation 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 s driver handles the interrupt and provides information on the type of event that caused the interrupt to the caller Applications can wait on a certain type of interrupt using the TSYNC_waitFor call For instance one application can wait for an event to occur on the GPOO pin and another application can wait for a timestamp event to occur The events that generate interrupts are listed and described in Section 5 9 of the
195. ion is IRIG with IEEE extensions and that is only if the IRIG source supports them If the IRIG source can provide IEEE extension information the TSync must be configured to process it by using a Coded Expression setting that includes Control Fields and setting the Control Fields to use the IEEE extensions If leap second information is not provided by the source it must be provided to the TSync through the Host system There is no limit in the TSync regarding how far in advance they can be set and they can be set to any arbitrary time However the PTPv2 standard only recognizes leap seconds at the second before midnight as of this writing Leap Seconds have only occurred on the second before midnight 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 After the leap second event the leap second value will not be cleared from the TSync until overwritten by a new Leap Second event Leap Second information does not persist across power cycles Leap Seconds are scheduled using CS SetLeapSec To set a positive Leap Second adding second 60 at midnight January 1 2009 on TSync card 0 5 246 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide CS SetLeapSec 0 1 0 00 1 2009 To set a neg
196. is 2 2 Generating the Example Prograims s s ssscesecesesssessueceesecbeceeesenessecenseseesetenneseshesnsesventacesintsee 2 2 Generating the Upgrade LOOK sets vs wort A ae ato gts 2 2 Solari O Sed sh aaa Se ae ea V a et Ne E Ae a atone aNd 2 4 Installing the riveree ce ee ee Neos S oo o aces o alae 2 4 Uninstalling the Diva aida cts 2 4 File Locations ni O SR lected VO O Sean baat atin O Nerisay 2 4 Example Podrazu ada see a ii 2 5 WINS 5 nd kod ea tea A Din aa o Maa o op ooo ooo 2 6 Installing the DAG 553 ca otonso poseta at ck aoe ues fear a crt boot teat oo ooo 2 6 Uniistaling Me Diversas il iii 2 6 Example Programs A tds 2 6 A aa oa o da z oa ea cua eo 2 7 Glock DeM A A E OU E eater eared gl ae 2 7 QuickP TR ls o 2 10 UPGRADING USING THE DRIVER oooooccccccccccccccccccccccccccccnnnnnnnnnnnnnnnnnnnnnnnnnnnnns 3 1 INTERFACE TO THE DRIVER APL oio nicocicioicaciciniannicininncinininnnicininnniciadaniizasa 4 1 PICA SR FSS sascha aes cia cea sal eee A endl taal aaa 4 4 TSG Marandino 4 1 A O O 4 136 TSync PCle API Routine Descriptions acc tio ad a 4 139 E TO 4 139 Es Cocoa essed hse il ethic ear bnab ete EA bd bo oo doo ooo 4 139 MESSING o E R dd o od 4 139 RSS dy EE AA E a can cutis tole eee em ecanen teens 4 140 PEA A pot oo ob ooo oo 4 140 API Error Message MO le bo 4 141 API Calls Supported by TSync PCle ccocooconiioacoeicimrecn centre nek aa ah nene 4 141 Clock Service CS Gal eran cae ed oad E SOA en
197. j Returns TSYNC SUCCESS Success DLL EXPORT Function TSYNC PTR getUnitSettings Description Gets general PTP settings for the module Parameters E IN hnd Board handle nInstance The instance number OUT pObj The module s general PTP settings Function TSYNC PTR setUnitSettings Description Sets general PTP settings for the module Parameters IN hnd Board handle x nInstance The instance number pobj The module s new general PTP settings Spectracom Corporation 4 94 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC ERROR TSYNC PTR _setUnitSettings TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPUnitSettingsObj pObj Function TSYNC_PTR_getPortState Description Gets the state of a port on the module Parameters IN hnd Board handle E ninstance The instance number OUT pObj The state of a port on the module Returns TSYNC SUCCESS Success EZ DLL EXPORT TSYNC_ERROR TSYNC_PTR_getPortState TSYNC_BoardHandle hnd unsigned int nInstance TSYNC PTPPortStateObj poObj PE Function TSYNC_PTR_setPortState Description Gets the state of a port on the module Parameters A IN hnd Board handle nInstance The instance number OUT pObj The state of a port on t
198. 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 pObj Pointer to the message information Returns TSYNC_SUCCESS Success 4 2 18 20 TSYNC_IP_getCfData TSYNC_ERROR TSYNC IP getCfData TSYNC BoardHandle hnd IO PORT nInstance TSYNC IRIGCfDataObj pObj Description Get the latest IRIG control field data Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the control field information Synchronizable Timecode Generator Supplemental Information 4 189 TSync PCle Factory Driver Guide Spectracom Corporation Returns TSYNC_SUCCESS Success 4 2 18 21 TSYNC_IP_setCfData TSYNC ERROR TSYNC IP setCfData TSYNC BoardHandle hnd IO PORT nInstance TSYNC IRIGCfDataoObj poObj 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 hn
199. le nInstance The instance number ms pobj Pointer to the Local Clock information A Returns TSYNC_SUCCESS Success aA DLL EXPORT TSYNC ERROR TSYNC EP setLocal TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pObj Function TSYNC EP getFormat Description Get the SMPTE EBU output format Parameters x IN hnd Board handle E 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 dl IN hnd Board handle cl ninstance The instance number x format The format information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC EP setFormat Synchronizable Timecode Generator Supplemental Information 4 107 TSync PCle Factory Driver Guide Spectracom Corporation TSYNC BoardHandle hnd unsigned int nInstance ESL FMT format Function TSYNC EP getTimeScale Description Get the SMPTE EBU output s time scale Parameters i IN hnd Board handle g nInstance The instance number OUT pObj Pointer to the time scale result Returns TSYNC SUCCESS Success s DLL EXPORT TSYNC ERROR TSYNC EP getTimeScale TSYNC Board
200. le Factory Driver Guide Parameters IN hnd nInstance OUT sig Spectracom Corporation Board handle The instance number The signature control result Returns TSYNC SUCCESS Success X DLL EXPORT TSYNC ERROR TSYNC PP getSigCtrl TSYNC BoardHandle hnd nInstance SIG CTL sig unsigned int x A Function TSYNC PP setSigCtrl Description Set the PPS output s signature control state Parameters IN hnd Board handle nInstance The instance number x sig The signature control information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC PP setSigCtrl TSYNC BoardHandle hnd nInstance SIG CTL sig unsigned int x Function Parameters IN hnd nInstance OUT freg ACA 8 Nh TSYNC PP getFreg Description Get the PPS output s freguency Board handle The instance number The freguency result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC PP getFreg TSYNC BoardHandle hnd unsigned int nInstance float freg Function TSYNC_PP_getOffset Description Get the PPS output s offset Offset is in nanoseconds Parameters IN hnd Board handle a nInstance The instance number OUT nOffset The offset result Returns TSYNC SUCCESS Success 4 DLL EXPORT TSYNC ERROR TSYNC PP getOffset TSYNC BoardHandle hnd ninstanc
201. lemental Information Spectracom Corporation TSync PCle Factory Driver Guide Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC SS getUptime TSYNC BoardHandle hnd unsigned int nUptime Function TSYNC_SS_getFreeRun Description Get the current freerun state Parameters ES IN hnd Board handle OUT bFreerun The freerun result Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC_ERROR TSYNC SS getFreeRun TSYNC BoardHandle hnd int bFreerun Reference Monitor Servic Af Function TSYNC RS getTable Description Get specified reference priority table Parameters A IN hnd Board handle pobj Pointer to the table type information i OUT pObj2 Pointer to the reference result Returns TSYNC SUCCESS Success xP DLL EXPORT TSYNC ERROR TSYNC RS getTable TSYNC BoardHandle hnd TSYNC TableTypeoObj poObj TSYNC ReferenceTableObj poObj2 Function TSYNC RS getBestRef Description Get current best working priority table entry Parameters x IN hnd Board handle k OUT pObj Pointer to the table entry result Returns TSYNC SUCCESS Success k 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 Parameters E IN
202. lse unsigned char outputType jamming option double frequency heartbeat freq TSYNC HeartObj V d TSYNC TIME OBJECT x typedef struct TSYNC TimeObj unsigned int years unsigned int doy unsigned int hours unsigned int minutes unsigned int seconds unsigned int ns TSYNC TimeObj TSYNC TIME BCD OBJECT typedef struct TSYNC TimeBCDObj unsigned int years unsigned int doy unsigned int hours unsigned int minutes unsigned int seconds unsigned int ms unsigned int us TSYNC_TimeBCDObj TSYNC TIME SECONDS OBJECT xy 4 16 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide typedef struct TSYNC TimeSecondsObj unsigned int seconds unsigned int ns TSYNC_TimeSecondsObj TSYNC HW TIME OBJECT typedef struct TSYNC HWTimeObj TSYNC TimeObj time unsigned int bSync TSYNC HWTimeObj TSYNC HW TIME SECONDS OBJECT s typedef struct TSYNC HWTimeSecondsObj TSYNC_TimeSecondsObj time unsigned int bSync TSYNC HWTimeSecondsObj TSYNC WAIT OBJECT typedef struct TSYNC WaitObj unsigned int ticks num of clock ticks to wait double seconds unsigned char minutes unsigned char hours unsigned short days TSYNC WaitObj TSYNC MEM OBJECT FOR PEEK POKE typedef struct TSYNC MemObj unsigned short offset
203. mecode Generator Supplemental Information 4 77 TSync PCle Factory Driver Guide Spectracom Corporation Function TSYNC IR getRefId Description Get reference identifier for an IRIG reference instance Parameters a IN hnd Board handle Returns TSYNC SUCCESS Success Z DLL EXPORT TSYNC ERROR TSYNC IR getRefId TSYNC BoardHandle hnd unsigned int nInstance TSYNC RefIdObj poObj STANAG HaveQuick Reference Component Function TSYNC OR getOffset Description Get the STANAG HaveQuick reference s 1PPS input offset Offset is in nanoseconds Parameters IN hnd Board handle sl ninstance The instance number OUT nOffset The offset information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC OR getOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Function TSYNC_QR_setOffset Description Set the STANAG HaveQuick reference s 1PPS input offset Offset is in nanoseconds from 500 msec to 500 msec Parameters IN hnd Board handle j nInstance The instance number ij nOffset The offset information Returns TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC OR setOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset PRE Function TSYNC OR getValidity Description Get the STANAG HaveQuick validity structure Parameter
204. meters hnd Board handle ninstance The instance number nOffset The offset information Returns TSYNC SUCCESS Success 4 2 19 3 TSYNC IR getValidity TSYNC ERROR TSYNC_IR getval idity 4 192 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC BoardHandle hnd unsigned int ninstance int bTimeValid PAE bPpsValid Description 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 ge tMode TSYNC BoardHandle hnd unsigned int nInstance IL MODE mode Description Get the IRIG mode Input Parameters hnd Board handle ninstance The instance number Output Parameters mode The receiver mode result Returns TSYNC SUCCESS Success 4 2 19 5 TSYNC IR setMode TSYNC ERROR TSYNC I R setMode TSYNC BoardHandle hnd unsigned int nInstance IL MODE mode Description Set the IRIG mode Input Parameters hnd Board handle ninstance The instance number mode The receiver mode information Returns Synchronizable Timecode Generator Supplemental Information 4 193 TSync PCle Factory Driver Guide Spectracom Corporation TSYNC_SUCCESS Success 4 2 19 6 TSYNC_IR_getFormat TSYNC ERROR TSYNC IR ge
205. n Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC PTR getClkOuality TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPCIkOualityObj poObj Function TSYNC PTR getTimeProperties Description Gets the module s reported time properties s Parameters IN hnd Board handle a nInstance The instance number s OUT pObj The module s reported time properties Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC_PTR_getTimeProperties TSYNC BoardHandle hnd unsigned int nInstance TSYNC_PTPTimePropObj poObj Function TSYNC_PTR_getParentProperties Description Gets the module s parent properties dataset Parameters d IN hnd Board handle x nInstance The instance number 4 OUT pObj The module s parent properties dataset Returns TSYNC SUCCESS Success x 4 96 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide DLL EXPORT TSYNC ERROR TSYNC_PTR_getParentProperties TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPParentPropobj poObj Function TSYNC_PTR_getGrandmasterProperties Description Gets the module s grandmaster properties dataset Parameters a IN hnd Board handle ninstance The instance number OUT pObj The module s grandmaster properties dataset
206. n Get the specified state change timestamp Parameters IN hnd Board handle 2 src The timestamp source lt OUT pObj Pointer to the time result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC SS getTimestamp TSYNC BoardHandle hnd SS TS SRC src TSYNC_TimeObj poObj Function TSYNC_SS_getTimestampBcd Description Get the specified state change timestamp in BCD format Parameters a IN hnd Board handle 5 src The timestamp source OUT pObj Pointer to the time result Returns TSYNC_SUCCESS Success 7 DLL EXPORT TSYNC ERROR TSYNC SS getTimestampBcd TSYNC BoardHandle hnd SS TS SRC src TSYNC TimeBCDObj pobj Function TSYNC_SS_getTimestampSec Description Get the specified state change timestamp in seconds format Parameters IN hnd Board handle SLC The timestamp source i OUT nSeconds Pointer to the seconds time result dd nNanos Pointer to the nanoseconds time result Returns TSYNC SUCCESS Success EZ DLL EXPORT TSYNC ERROR TSYNC SS getTimestampSec TSYNC BoardHandle hnd SS TS SRC src unsigned int nSeconds unsigned int nNanos Function TSYNC_SS_getUptime Description Get the board s total uptime in minutes Parameters g IN hnd Board handle OUT nUptime Pointer to the uptime result 4 48 Synchronizable Timecode Generator Supp
207. n 3 1 TSync PCle Factory Driver Guide Spectracom Corporation Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 4 Interface to the Driver API 4 1 Header Files 4 1 1 Tsync h tifndef defined TSYNC_H define defined TSYNC H OOo kk k o o OO 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 P E D k o o o o o o o o o o o o AA ifdef cplusplus extern C endif include tsync platform mapping h ifndef DLL EXPORT ifndef WIN32 define DLL EXPORT else define DLL EXPORT declspec dllexport endif endif SUPPORT CONSTANTS x Propagation delay min s and max s for CPCI and PCI boards x define PMC CPCI SYNCP DE define PMC CPCI SYNCP DE define PCI SYNCP DELAY MIN define PCI SYNCP DELAY MAX AY MIN JAY MAX 999 999 1000 8999 Position conversion constants ky define PI 3 1415926535898 define RAD TO DEG 180 0 PI define DEG TO RAD PI 180 0 Length of firmware rev string define TSYNC_FIRMWARE H ENGTH 4 Length of driver version string XX YY Synchronizable Timecode Generator Supplemental Information 4 1 Spectracom Corporation
208. n BCD format Input Parameters hnd Board handle Synchronizable Timecode Generator Supplemental Information 4 225 TSync PCle Factory Driver Guide Spectracom Corporation src The timestamp source Output Parameters pObj Pointer to the time result Returns TSYNC_SUCCESS Success 4 2 25 12 TSYNC_SS_getTimestampSec TSYNC_ERROR TSYNC SS getTimestampSec TSYNC BoardHandle hnd SS TS SRC src unsigned int nSeconds unsigned ini 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 TSYNC_SS_getUptime TSYNC ERROR TSYNC SS getUpt ime TSYNC BoardHandle hnd unsigned int nUptime Description Get the board s total uptime in minutes Input Parameters hnd Board handle Output Parameters nUptime Pointer to the uptime result Returns TSYNC_SUCCESS Success 4 2 25 14 TSYNC_SS_getFreeRun TSYNC_ERROR TSYNC_S S_getFreeRun TSYNC BoardHandle hnd int bFreerun 4 226 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Description Get the current freerun state Input Parameters hnd Board handle Output Parameters bFreerun The freerun result Returns TSYNC_SUCCESS Success 4 2
209. nc PCle Factory Driver Guide Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP getCfData TSYNC BoardHandle hnd unsigned int nInstance TSYNC IRIGCfDataObj poObj Function TSYNC IP setCfData Description Set the IRIG output control field data manually ak Parameters IN hnd Board handle ninstance The instance number pobj Pointer to the control field information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP setCfData TSYNC BoardHandle hnd unsigned int nInstance TSYNC IRIGCfDataObj poObj PYR Function TSYNC IP getNumInst Description Get number of IRIG output instances present in the system Parameters G IN hnd Board handle ij OUT nInstances The number of instances result Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP getNumInst TSYNC BoardHandle hnd unsigned int nInstances Function TSYNC_IP_getPhase Description Get the IRIG output s current phase adjustment This id feature is only available to Spectracom for testing Parameters e IN hnd Board handle nInstance The instance number OUT phase The phase adjustment result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP getPhase TSYNC BoardHandle hnd unsigned int nInstance unsigned int phase PX Function TSYN
210. nce number Output Parameters pObj Pointer to the Port Settings object Returns TSYNC_SUCCESS Success 4 2 23 7 TSYNC_PTR_getPortSettings TSYNC_ERROR TSYNC PTR getPortSettings TSYNC BoardHandle hnd unsigned int nInstance TSYNC_PTPPortSettingsO0bj 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 hnd unsigned int nInstance TSYNC PTPPortSettingsObj poObj Description Sets configuration information for the PTP port Input Parameters hnd Board handle ninstance The instance number pObj Pointer to the Port Settings object Returns TSYNC_SUCCESS Success 4 2 23 9 TSYNC_PTR_getCIkQuality TSYNC_ERROR TSYNC PTR getClkOuality TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPClkOualityObj poObj Synchronizable Timecode Generator Supplemental Information 4 211 TSync PCle Factory Driver Guide Spectracom Corporation Description Gets the module s reported clock quality information Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the Clock Quality object Returns TSYNC_SUCCESS Success 4 2 23 10 TSYNC_PTR_getTimeProperties TSYNC_ ERROR TSYNC P
211. nd Board handle nInstance The instance number z OUT nOffset The offset result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC_EP_getOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Function TSYNC_EP_setOffset Description Set the SMPTE EBU output s offset Offset is in nanoseconds from 500 msec to 500 msec Parameters E IN hnd Board handle A nInstance The instance number a noffset The offset information Returns TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC EP setOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Function TSYNC_EP_getLocal Description Get the SMPTE EBU output s local time zone and DST rule 4 106 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide g Timezone and DST offsets are in seconds Parameters IN hnd Board handle x ninstance The instance number i OUT pObj Pointer to the Local Clock result Returns TSYNC SUCCESS Success s DLL EXPORT TSYNC ERROR TSYNC EP getlLocal TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pobj V d Function TSYNC EP setlLocal Description Set the SMPTE EBU output s local time zone and DST rule i Timezone and DST offsets are in seconds Parameters IN hnd Board hand
212. ndex information pobj Pointer to the time information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC HW setMatchTimeLo TSYNC BoardHandle handle OD PIN index TSYNC TimeObj poObj Function TSYNC HW getFpgaInfo Description Get the the FPGA ID and version information Parameters IN hnd Board handle OUT id The ID result x rev The version result Returns TSYNC SUCCESS Success A DLL EXPORT TSYNC ERROR TSYNC HW getFpgaInfo TSYNC BoardHandle handle unsigned short xid unsigned short rev Function TSYNC_HW_getIntMask 4 134 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Description Get the hardware interrupt masking enabled state Parameters IN hnd Board handle intType The interrupt type information index The interrupt index information OUT bEnable The enable result Returns TSYNC SUCCESS Success xy DLL EXPORT TSYNC ERROR TSYNC HW getIntMask TSYNC BoardHandle handle INT TYPE intType unsigned int index int bEnable Function TSYNC_HW_setIntMask Description Set the hardware interrupt masking enabled state Parameters a IN hnd Board handle intType The interrupt type information index The interrupt index information 5 bEnable The enable information
213. ndle OUT pObj Pointer to the serial number result Returns TSYNC SUCCESS Success AZ DLL_EXPORT TSYNC_ERROR TSYNC_LS getSerialNo TSYNC BoardHandle hnd TSYNC SerialNoObj poObj Oscillator Monitor Service x Function TSYNC XS register Description Reserve a meter Parameters IN hnd Board handle OUT pObj Pointer to the meter handle result Returns TSYNC SUCCESS Success xf DLL EXPORT TSYNC_ERROR TSYNC_XS register TSYNC BoardHandle hnd TSYNC MeterHandle poObj Function TSYNC_XS_unregister Description Free the specified meter Parameters IN hnd Board handle pobj Pointer to the meter handle information Returns TSYNC_SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC XS unregister TSYNC BoardHandle hnd TSYNC MeterHandle poObj Function TSYNC_XS_getWindowSize Description Get the specified meter s error data Error data is in nanoseconds Parameters IN hnd Board handle x OUT pObj Pointer to the window size result 4 44 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC XS getWindowSize TSYNC BoardHandle hnd TSYNC MeterWinSizeObj pObj f Function TSYNC XS setWindowSize Description
214. ndle ig ninstance The instance number noffset The offset information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC OP setOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Function TSYNC OP getLocal Timezone and DST offsets are in seconds XX Nh Synchronizable Timecode Generator Supplemental Information Description Get the HaveQuick output s local time zone and DST rule 4 103 TSync PCle Factory Driver Guide Spectracom Corporation Parameters IN hnd Board handle i nInstance The instance number i OUT pObj Pointer to the Local Clock result Returns TSYNC SUCCESS Success m DLL EXPORT TSYNC ERROR TSYNC OP getlLocal TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj poObj Function TSYNC OP setLocal Description Set the HaveQuick output s local time zone and DST rule k Timezone and DST offsets are in seconds Parameters IN hnd Board handle E ninstance The instance number pobj Pointer to the Local Clock information Returns TSYNC SUCCESS Success a DLL EXPORT TSYNC_ERROR TSYNC_QP_setLocal TSYNC_BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pobj Function TSYNC OP getFormat Description Get the HaveQuick output format Parameters E IN hnd Board handle nInstance The instance number x OUT format The format
215. ndle handle DEST ID dest ITEM ID iid void xinPayload uint32 t inLength void xoutPayload uint32 t maxOutLength uint32 t actualOutLength Description Generic set accessor Input Parameters hnd Board handle dest destination of the call iid item id 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 TSYNC_waitFor TSYNC ERROR TSYNC waitFor TSYNC BoardHandle handle INT TYPE intType uint32 t index Description Blocking call to wait for specified interrupt Input Parameters Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide hnd Board handle intType the interrupt type to wait for GPI GPO are indexed index the index of the interrupt 0 for non indexed interrupts Returns TSYNC_SUCCESS Success 4 2 6 API Error Message Returns There are two error messages that may be returned from the driver when issuing API calls The two error messages are as follows A Usage Not a recognized call This response indicates an invalid command or a syntax error occurred in the command that was sent B Error Invalid parameter This response indicates the AP
216. neOff TSYNC_ERROR TSYNC CS setTimeZoneoff TSYNC BoardHandle hnd TSYNC TimeZoneOffsetObj pObj Description Set the current time zone offset from UTC Offset is in seconds Input Parameters hnd Board handle pObj Pointer to the time zone offset information Returns TSYNC_SUCCESS Success 4 2 8 14 TSYNC_CS_getDstRule TSYNC ERROR TSYNC CS getDstRule TSYNC_BoardHandle hnd TSYNC_TimeDSTRuleObj pObj Description Get the current DST rule DST Offset is in seconds Input Parameters hnd Board handle Output Parameters pObj Pointer to the time zone offset rule result Returns TSYNC_SUCCESS Success Where 1 In DST or O Standard Time 4 2 8 15 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 Synchronizable Timecode Generator Supplemental Information 4 147 TSync PCle Factory Driver Guide Spectracom Corporation 4 2 8 16 TSYNC_CS_getYear TSYNC_ERROR TSYNC CS getYear TSYNC BoardHandle hnd TSYNC TimeYearObj pObj Description Get the current year Input Parameters hnd Board handle Output Parameters pObj Pointer to the year result Returns TSYNC SUCCESS Success 4 2 8 17 TSYNC CS setYear TSYNC ERROR TSYNC CS setYear TSYNC Boar
217. nformation as to the claimed defect Spectracom products shall not be returned unless a return authorization number is issued by Spectracom Spectracom products must be returned with the description of the claimed defect and identification of the individual to be contacted it additional information is needed Spectracom products must be returned properly packed with transportation charges prepaid Shipping expense Expenses incurred for shipping Spectracom products to and from Spectracom including international customs fees shall be paid for by the customer with the following exception For customers located within the United States any product repaired by Spectracom under a warranty repair will be shipped back to the customer at Spectracom s expense unless special faster delivery is requested by customer Spectracom highly recommends that prior to returning equipment for service work our technical support department be contacted to provide trouble shooting assistance while the equipment is still installed If equipment is returned without first contacting the support department and no problems are found during the repair work an evaluation fee may be charged EXCEPT FOR THE LIMITED WARRANTY STATED ABOVE SPECTRACOM DISCLAIMS ALL WARRANTIES OF ANY KIND WITH REGARD TO SPECTRACOM PRODUCTS OR OTHER MATERIALS PROVIDED BY SPECTRACOM INCLUDING WITHOUT UMTATON ANY IMPLIED WARRANTY OR MERCHANTABILITY OR FITNESS FOR A PARTICU
218. ng Board Driver API Support The TSync PCle supports existing Spectracom TPRO TSAT timing board driver API calls as described herein 6 1 Header Files 6 1 1 Tpro h KK KA KA RR KR RR RR KA KA KA KA RR KA RR RR kk k RR RR kok kok kok kok k k kok kok kok kok kok kok kok I OK kk Module tpro h Date 04 05 06 Purpose This is the TPRO PCI interface include file kk Copyright C 2006 Spectracom Corporation All Rights Reserved kk ARK A IA A IA I k kok kok kok kok kok kok kok kok kk kk kok ifndef defined TPRO define defined TPRO_ AAA DEFINES AAA ifndef DLL define D endif EXPORT EXPORT eR 8 Kk aye define SIG PULSE define SIG SOUAR Heartbeat constants heartbeat is a pulse heartbeat is a squarewave o x m e YU Ba o x define SIG NO JA define SIG JAM start next cycle start immediately Kk El define MATCH TIME define MATCH TIME Match constants start time stop time k k El Oscillator frequencies for Compact PCI Card Only define define define define define TPRO Ej typedef Synchronizable Timecode Generator Supplemental Information osc_0U7 OSC_OUT OSC 0U1 OSC 0U1 OSC 0U1 OFF T 1KHZ I 1MHZ T 5MHZ OMHZ T o A BOARD OBJECT 0 1 2 3 4 struct TPRO BoardObj 6 1 TSync PCle Factory Driv
219. ngsObj PTP PORT STATE OBJECT typedef struct unsigned int portNumber int portEnabled PTL PTP STATE portState int linkConnected TSYNC PTPPortStateObj PTP PORT SETTINGS OBJECT 7 typedef struct unsigned int portNumber unsigned int annRcptTimeout int logAnnInterval int logSyncInterval int logDelayReqInterval int logPeerDelayReqInterval PTL DELAY MECH delayMechanism TSYNC_PTPPortSettingsObj PTP CLOCK OUALITY OBJECT A typedef struct unsigned int clockClass PTL CLK ACC clockAccuracy unsigned int offsetScaledLogVariance TSYNC_PTPC1lkQualityObj PTP TIME PROPERTIES OBJECT typedef struct int utcOffset int utcOffsetValid int forwardLeap int backwardLeap int timeTraceable Synchronizable Timecode Generator Supplemental Information 4 27 TSync PCle Factory Driver Guide Spectracom Corporation int freqTraceable int ptpTimescale PTL TIME SRC timeSource TSYNC_PTPTimePropObj PTP PARENT PROPERTIES OBJECT typedef struct unsigned char clockIdentity 8 unsigned int portNumber int statsCalculated unsigned int observedOSLV unsigned int observedCPCR TSYNC_PTPParentPropObj PTP GRANDMASTER PROPERTIES OBJECT typedef struct unsigned char clockIdentity 8 TSYNC PTPC1kQualityObj clockQuality
220. ns TSYNC SUCCESS Success xy DLL EXPORT TSYNC ERROR TSYNC IP setFreg TSYNC BoardHandle hnd unsigned int nInstance IL FRO freq Function TSYNC_IP_getCodedExpr Description Get the IRIG output Coded Expression Parameters x IN hnd Board handle ninstance The instance number OUT ce The Coded Expression result Returns TSYNC SUCCESS Success x 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 IN hnd Board handle k ninstance The instance number a ce The Coded Expression information A Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP setCodedExpr TSYNC BoardHandle hnd unsigned int nInstance IL CE ce Function TSYNC IP getCtrlField Description Get the IRIG output Control Field Parameters IN hnd Board handle ol nInstance The instance number j OUT cf The Control Field result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP getCtrlField Synchronizable Timecode Generator Supplemental Information TSync PCle Factory Driver Guide 4 89 TSync PCle Factory Driver Guide 4 90 TSYNC BoardHandle hnd unsigned int nInstance IL CF xof Function TSYNC IP _setCtriField Descri
221. nt pageNum int more TSYNC CapabilityObj caps TSYNC CAPABILITIES PER PAGE TSYNC_CapabilityPageObj TSYNC TIME SCALE OBJECT AL typedef struct TSYNC TimeScaleObj ML TIME SCALE scale TSYNC_TimeScaleObj TSYNC TIME SCALE OFFSET OBJECT A typedef struct TSYNC_TimeScaleOffsetObj ML TIME SCALE scale int offset TSYNC_TimeScaleOffsetObj TSYNC TIME SUBSECOND ADJUSTMENT OBJECT x typedef struct TSYNC_TimeSubsecAdj Obj int adjust TSYNC TimeSubsecAdjObj TSYNC TIME SUBSECOND ADJUSTMENT OBJECT Rie typedef struct TSYNC TimeDiscontObj TSYNC TimeObj newTime TSYNC TimeObj ffectiveTime int bActive TSYNC_TimeDiscontObj TSYNC TIME SUBSECOND ADJUSTMENT OBJECT typedef struct TSYNC TimeLeapSecondObj int offset TSYNC_TimeObj utcDate TSYNC_TimeLeapSecondObj TSYNC TIME ZONE OFFSET OBJECT Synchronizable Timecode Generator Supplemental Information 4 19 TSync PCle Factory Driver Guide Spectracom Corporation typedef struct TSYNC TimeZoneOffsetObj int tzOffset TSYNC_TimeZoneOffsetObj TSYNC TIME DST POINT OBJECT Ey typedef struct TSYNC TimeDSTPointObj ML MONTH month ML WOM wom ML DOW dow int hour TSYNC TimeDSTPointObj TSYN
222. num TSYNC_SubSecondObj TSYNC OSCILLATOR DISCIPLINING OBJECT x typedef struct Synchronizable Timecode Generator Supplemental Information 4 29 TSync PCle Factory Driver Guide Spectracom Corporation unsigned char cmd TSYNC OSC DISC CMD SIZE unsigned char data TSYNC OSC DISC DATA SIZE TSYNC_OscDiscObj TSYNC SHARED MEMORY OBJECT eb typedef struct unsigned int segNum char data 256 TSYNC_SharedMemoryObj TSYNC GENERAL PURPOSE SQUARE OBJECT A typedef struct int off unsigned int per unsigned int pw EDGE ae TSYNC_GPOSquareObj TSYNC TIME DATA OBJECT typedef struct TSYNC HWTimeObj data TSYNC TIMESTAMP DATA NUM TSYNC_HWTimeDataObj TSYNC OPTION CARD CIS HEADER OBJECT x typedef struct TSYNC CardInfoStructHdrObj unsigned int pldld unsigned int pldVer unsigned int rsvl unsigned int rsv2 unsigned int num TSYNC_CardInfoStructHdrob TSYNC OPTION CARD HEADER OBJECT s typedef struct TSYNC OptCardHdroObj unsigned int id unsigned int ver TSYNC_CardInfoStructHdrObj cish 4 30 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC_OptCardHdrObj TSYNC OPTION CARD SLOT INDEX OBJECT x typedef struct TSYNC OptCardSlotIdxObj int slot
223. nvalid minutes parameter must be 0 59 TPRO SEC PARM ERR invalid seconds paramter must be 0 60 TPRO COMM ERR error communicating with driver TPRO SUCCESS success Synchronizable Timecode Generator Supplemental Information 6 7 TSync PCle Factory Driver Guide Spectracom Corporation 6 2 8 TPRO_setPropDelayCorr unsigned char TPRO setPropDelayCorr TPRO BoardObj hnd int 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 9 TPRO setTime unsigned char TPRO setTime TPRO BoardObj hnd TPRO TimeObj Timep 5 Description This routine sets the time on the on board clock If the board is synchronized to a GPS antenna this value will not be accepted Input Parameters hnd Board handle Timep Pointer to TPRO_TimeObj Returns TPRO_DAY_PARM_ERR invalid days parameter must be 0 366 TPRO_HOUR_PARM_ERR invalid hours parameter must be 0 23 TPRO_MIN_PARM_ERR invalid minutes parameter must be 0 59 TPRO_SEC_PARM_ERR invalid seconds paramter must be 0 60 TPRO_COMM_ERR error communicating with driver TPRO_SUCCESS success 6 2 10 TPRO_setYear unsigned char TPRO setYear TPRO BoardObj hnd unsigned short yr Description This routine prog
224. o the subsecond adjustment information Returns TSYNC_SUCCESS Success 4 2 8 8 TSYNC CS getTimeDiscont This API call has been deprecated 4 2 8 9 TSYNC CS setTimeDiscont Synchronizable Timecode Generator Supplemental Information 4 145 TSync PCle Factory Driver Guide Spectracom Corporation 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 TSYNC_BoardHandle hnd TSYNC TimeLeapSecondObj pObj Description Set a new leap second Offset is in seconds Input Parameters hnd Board handle pObj Pointer to the leap seconds information Returns TSYNC_SUCCESS Success 4 2 8 12 TSYNC_CS_getTimeZoneOff TSYNC_ERROR TSYNC CS getTimeZoneo0ff 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 146 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 4 2 8 13 TSYNC_CS_setTimeZo
225. ode Generator Supplemental Information 4 21 TSync PCle Factory Driver Guide TSYNC_SerialNoObj Spectracom Corporation TSYNC METER HANDLE OBJECT xy typedef struct TSYNC METER HANDLE hnd TSYNC MeterHandle TSYNC METER WIN SIZE OBJECT xf typedef struct TSYNC METER HANDLE hnd unsigned int size TSYNC MeterWinSizeObj TSYNC METER DATA OBJECT typedef struct TSYNC METER HANDLE hnd XS_STATE state Meter state unsigned int size Window size unsigned int elapsed Elapsed duration through the window int frAccum Accumulated frequency error of current window int frPrev Total frequency error of previous window int phStart Starting phase error of current window int phAccum Accumulated phase error of current window int phPrev Total phase error of previous window TSYNC MeterDataObj x TSYNC METER COMMAND OBJECT typedef struct TSYNC METER HANDLE hnd XS_CMD command TSYNC_MeterCommandObj TSYNC SUPERVISOR REFERENCE OBJECT s typedef struct char time 5 char pps 5 TSYNC_ReferenceObj 4 22 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide
226. odel 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 Description Get a custom message response from the external oscillator Input Parameters hnd Board handle Output Parameters pObj Pointer to the message result Returns TSYNC_SUCCESS Success 4 2 27 10 TSYNC_XO_setMessage TSYNC ERROR TSYNC XO setMessage TSYNC BoardHandle hnd TSYNC CustomMessageObj pObj Synchronizable Timecode Generator Supplemental Information 4 231 TSync PCle Factory Driver Guide Spectracom Corporation Description Send a Custom Message to the external oscillator Input Parameters hnd Board handle pObj Pointer to the message information Returns TSYNC_SUCCESS Success 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 Description Send a disciplining command and dataset to the external oscillator Input Parameters hnd Board handle pObj Pointer to the command
227. on Get the ASCIT output s time scale Parameters A IN hnd Board handle a nInstance The instance number OUT pObj Pointer to the time scale result Returns TSYNC_SUCCESS Success AL DLL EXPORT TSYNC_ERROR TSYNC_AP getTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Function TSYNC AP setTimeScale Description Set the ASCIT output s time scale Parameters ES IN hnd Board handle ninstance The instance number x 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 poObj Function TSYNC AP getFormat 4 82 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Description Get the ASCIT output time code format Parameters IN hnd Board handle ninstance The instance number i OUT format The format result Returns TSYNC SUCCESS Success ns DLL EXPORT TSYNC ERROR TSYNC AP getFormat TSYNC BoardHandle hnd unsigned int nInstance AL FMT format Function TSYNC_AP_setFormat Description Set the ASCII output time code format Parameters IN hnd Board handle x ninstance The instance number x format The format information
228. ool 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 VVVV To see usage help for the upgrade tool execute the program with no parameters 2 2 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation gt TSyncUpgrade Synchronizable Timecode Generator Supplemental Information TSync PCle Factory Driver Guide 2 3 TSync PCle Factory Driver Guide Spectracom Corporation 2 2 Solaris The driver is designed to operate with 32bit or 64bit Solaris running on a PC system with x86 compatible processor s Included with the driver are example programs with source utilizing the API library 2 2 1 Installing the Driver NOTE f the system contains a previously installed version of the driver that version must first be uninstalled The driver and API library lib files and header are contained in the package tsync pkg This package is delivered via the archive file tsync lt rev gt lt arch gt pkg tar gz e where lt rev gt is the current driver revision e where lt arch gt is either i86pc64 or i86pc32 1 Open a terminal window 2 Make sure you are logged in as a root user 3 Copy the package file to a convenient directory location 4 Change to the directory in which the driver package file was copied 5 Extract the driver using the
229. ormat OA E CAE EOS Spectracom Corporation TSYNC_DP_getFormat Description Get the display output format Board handle The instance number The format result Returns TSYNC SUCCESS Success El DLL EXPORT TSYNC ERROR TSYNC_DP_getFormat TSYNC BoardHandle hnd unsigned int nInstance ML HOUR format Function TSYNC_DP_setFormat Description Set the display output format Parameters IN hnd Board handle X nInstance The instance number k format The format information Returns TSYNC_SUCCESS Success DLL_EXPORT TSYNC_ERROR TSYNC_DP_setFormat TSYNC BoardHandle hnd unsigned int nInstance L HOUR format Function TSYNC_DP_getTimeScale Description Get the display output s time scale Parameters h IN hnd Board handle nInstance The instance number i OUT pObj Pointer to the time scale result Returns TSYNC SUCCESS Success tz DLL EXPORT TSYNC ERROR TSYNC DP getTimeScale TSYNC BoardHandle unsigned int nInstance TSYNC TimeScaleObj poObj Z Function TSYNC DP setTimeScale Description Set the display output s time scale Parameters IN hnd Board handle ninstance The instance number id pobj Pointer to the time scale information Returns TSYNC SUCCESS Success 4 110 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation
230. orporation CHT Pointer to the square wave alignment count Returns TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC GO getSWAlignCnt TSYNC BoardHandle hnd OD PIN gpo unsigned int cnt Jf Function TSYNC_GO_setSWAlignCnt Description Set the GPO s square wave alignment count The alginment count is in seconds from 0 secs to 1 minute where 0 disables PPS alignment beyond the initial alignment Parameters IN hnd Board handle gpo GPO index ent Square wave alignment count Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GO setSWAlignCnt TSYNC BoardHandle hnd OD PIN gpo unsigned int cnt V d Function TSYNC GO getSWTmAlgnEn Description Get the GPO s square wave time alignment enable Parameters IN hnd Board handle gpo GPO index bEnable Pointer to the square wave time alignment enable Returns TSYNC SUCCESS Success DLL_EXPORT TSYNC ERROR TSYNC_GO_getSWTmAlgnEn TSYNC BoardHandle hnd OD PIN gpo int bEnable Function TSYNC_GO_setSWTmAlgnEn Description Set the GPO s square wave time alignment enable The tim E alignment enable changes the function of the alignment x counter to align the sguare wave whenever the current time s seconds value is a multiple of the alignment count kud Parameters 5 IN hnd Board handle 2 gpo GPO index bEnable Sq
231. ption Set the IRIG output Control Field Parameters IN hnd Board handle nInstance The instance number Cr The Control Field information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP setCtrlField TSYNC BoardHandle hnd unsigned int nInstance IL CF ct Function TSYNC_IP_getMessage Description Get the latest IRIG output message Parameters IN hnd Board handle ninstance The instance number x 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 poObj Function TSYNC_IP_setMessage Description Set the IRIG output message k Parameters IN hnd Board handle e ninstance The instance number pobj Pointer to the message information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP setMessage TSYNC BoardHandle hnd unsigned int nInstance TSYNC IRIGMessageObj poObj Spectracom Corporation Function TSYNC IP getCfData Description Get the latest IRIG output control field data Parameters IN hnd Board handle nInstance The instance number OUT pObj Pointer to the control field information Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSy
232. r to the documentation for your Linux release for instructions on installing the kernel source 7 Load the driver by issuing the command gt modprobe tsyncpci 8 To verify that the driver has been installed type at the prompt Synchronizable Timecode Generator Supplemental Information 21 TSync PCle Factory Driver Guide Spectracom Corporation gt lsmod 9 Verify that the driver tsyncpci is present 2 1 2 Uninstalling the Driver 1 Open a terminal window 2 Make sure you are logged in as a root user 3 Unload the driver by issuing the following command gt rmmod tsyncpci 4 Change to the directory in which the driver files were copied 5 Unload the driver by issuing the following commands gt cd linux gt 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 example programs by issuing the commands below cd tsync cd examples make clean make VVVV To see usage help for any example program execute the program with no parameters gt HW_GetTime 2 1 4 Generating the Upgrade T
233. rameters 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 TSYNC BoardHandle hnd IO PORT nInstance IL MOD mod Description Get the IRIG modulation Input Parameters hnd Board handle ninstance The instance number Output Parameters mod The modulation result Returns TSYNC SUCCESS Success 4 2 18 12 TSYNC IP getFreg TSYNC ERROR TSYNC IP getFreg TSYNC BoardHandle hnd IO PORT nInstance IL FRQ freq 4 186 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Description Get the IRIG frequency Input Parameters hnd Board handle ninstance The instance number Output Parameters freq The frequency result Returns TSYNC_SUCCESS Success 4 2 18 13 TSYNC_IP_setFreq TSYNC ERROR TSYNC IP setFreq TSYNC BoardHandle hnd IO PORT nInstance IL FRO 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 ce Description Get the IRIG Coded Expression Input Parameters hnd Board handle ninstance The instance number Output Paramet
234. rameters hnd Board handle Output Parameters nHoldover Timeout Pointer to the current timeout state result Returns TSYNC SUCCESS Success 4 2 25 9 TSYNC SS setHoldoverTO TSYNC ERROR TSYNC SS setHoldoverTO TSYNC BoardHandle hnd unsigned int nHoldoverTimeout 4 224 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Description Set the current holdover timeout Input Parameters hnd Board handle nHoldover Timeout Pointer to the current timeout state information Returns TSYNC_SUCCESS Success Time reads Where lt time type gt 0 DOY time Year Day of Year Hour Min Sec nsec 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 Returns TSYNC SUCCESS Success Where lt time type gt O DOY Day of Year 1 BCD Binary Coded Decimal 2 Sec Straight number of seconds since midnight 4 2 25 11 TSYNC SS getTimestampBcd TSYNC ERROR TSYNC SS getTimestampBcd TSYNC BoardHandle hnd SS TS SRC src TSYNC TimeBCDObj pObj Description Get the specified state change timestamp i
235. rams 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 6 8 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TPRO_COMM_ERR error communicating with driver TPRO_SUCCESS success 6 2 11 TPRO_simEvent unsigned char TPRO simEvent TPRO BoardObj hnd Description This routine simulates an external time tag event Input Parameters hnd Board handle Returns TPRO COMM ERR error communicating with driver TPRO SUCCESS success 6 2 12 TPRO synchControl unsigned char TPRO synchControl TPRO BoardObj hnd unsigned char enbp Description This routine commands the device to synchronize to input or freewheel This distinction is made using the enable argument If the enable argument is 0 the clock will freewheel otherwise it will synchronize to input When disabling synchronization freewheeling the device will continue to synchronize until the time is set Input Parameters hnd Board handle enbp Pointer to the synch enable Returns TPRO COMM ERR error communicating with driver TPRO SUCCESS success 6 2 13 TPRO synchStatus unsigned char TPRO synchStatus TPRO BoardObj hnd unsigned char status Description This routine reports the synchronization sta
236. ransmitted when the Peer to Peer Delay Mechanism is chosen Delay Mechanism o 0x01 End to End Delay Mechanism o 0x02 Peer to Peer Delay Mechanism o OxFE Delay Mechanism disabled Several parameters are represented as the logarithm to base 2 of the number of seconds between packets For example Value 0 2 1 second between packets Value 1 2 2 seconds between packets Value 0 2 16 seconds between packets Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Value 2 2 1 4 25 seconds between packets 5 7 3 4 PTP Grandmaster Properties The PTR GetGMProp lt device gt lt inst gt command provides access to information about the current GrandMaster if the TSync PTP is operating in Master mode this information will describe the TSync PTP board itself Clock Identity the GrandMaster s Clock Identity see description in Unit Settings Clock Class a number describing the state of the clock see PTPv2 Table 5 of Section 7 6 2 4 Clock Accuracy a number describing the accuracy of the oscillator in the Grandmaster see PTPv2 Spec Section 7 6 2 5 Offset Scaled log variance of the Master see PTPv2 Spec Section 7 6 3 Priority1 setting of the Grandmaster Priority2 setting of the Grandmaster Synchronizable Timecode Generator Supplemental Information 5 249 Spectracom Corporation TSync PCle Factory Driver Guide 6 TPRO TSAT Timi
237. rd handle x pobj Pointer to the DST state information Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC CS getDstState TSYNC BoardHandle hnd TSYNC TimeDSTStateObj poObj Function TSYNC CS setDstState Description Set the DST state Parameters IN hnd 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 poObj Function TSYNC_CS_getTimeSec Description Get the time in seconds and nanoseconds format ii TSYNC_HW_getTimeSec is recommended for faster time reads 4 40 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation Parameters IN hnd Board handle OUT nSeconds The seconds result nNanos The nanoseconds result X OA O OA Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC CS getTimeSec TSYNC BoardHandle hnd TSync PCle Factory Driver Guide unsigned int nSeconds unsigned int nNanos Function TSYNC_CS_setTimeSec Description Set the time in seconds and nanoseconds format Parameters IN hnd Board handle i nSeconds The seconds information nNanos The nanoseconds information Returns TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC CS setTimeSec TSYNC BoardHandle hnd
238. re image upgradeable FS IMG RT FPGA 1 Run time FPGA image upgradeable FS IMG DEF FW 2 Default firmware image read only FS IMG DEF FPGA 3 Default FPGA image read only FS IMG BL 4 Boot Loader read only FS IMG CFPGA 5 Compressed FPGA image read only EEPROM Patch image upgradeable Serial flash default addr iamge upgradeable Run time serial flash FPGA image upgradeable Default serial flash FPGA image upgradeable FS_IMG T E PATCH Ii o N N FS IMG SER DEF ADDR Il 3 N SN FS IMG SER RT FPGA li co e Sy FS IMG SER DEF FPGA li o X N FS IMG NUM ITEMS FS IMG RSVD BL OxFF Reserved for bootloader use FS IMG typedef enum CI_ACC_NONE 0 CI_ACC_GET CI ACC SET 2 1 Fr lt Synchronizable Timecode Generator Supplemental Information 4 7 TSync PCle Factory Driver Guide 4 8 CI ACC BOTH 3 CI ACCESS Clock services Log service typedef enum S ALARM SYNC 0 S ALARM HOLDOVER 1 S ALARM FREQ ERR 2 S ALARM SELF REF 3 S ALARM SW ERR 4 S ALARM 1PPS 5 S ALARM REF CHG 6 S ALARM HW ERR 7 S ALARM NUM LS ALARM Oscillator Monitor service typedef enum XS CMD AUTO XS CMD START 1 XS CMD STOP XS
239. result Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC OP getFormat TSYNC BoardHandle hnd unsigned int nInstance OL FMT format Function TSYNC_QP_setFormat Description Set the HaveQuick output format Parameters IN hnd Board handle nInstance The instance number k format The format information Returns TSYNC SUCCESS Success DLL EX TSYNC PORT ERROR TSYNC OP setFormat TSYNC BoardHandle hnd unsigned int nInstance 4 104 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide OL FMT format Function TSYNC OP getTimeScale Description Get the HaveOuick output s time scale Parameters IN hnd Board handle nInstance The instance number E OUT pObj Pointer to the time scale result Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC OP getTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Function TSYNC OP setTimeScale Description Set the HaveOuick output s time scale Parameters IN hnd Board handle X ninstance The instance number 2 pobj Pointer to the time scale information Returns TSYNC_SUCCESS Success 7 DLL EXPORT TSYNC ERROR TSYNC OP setTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj pObj
240. result Returns TSYNC SUCCESS Success m DLL EXPORT TSYNC ERROR TSYNC IR getFormat TSYNC BoardHandle hnd unsigned int nInstance IL FMT format Function TSYNC_IR_setFormat Description Set the IRIG format Settable only when in manual mode Parameters cal IN hnd Board handle E nInstance The instance number format The format information Returns TSYNC SUCCESS Success xf DLL EXPORT TSYNC ERROR TSYNC IR setFormat TSYNC BoardHandle hnd unsigned int nInstance IL FMT format f Function TSYNC IR getMod Description Get the IRIG modulation Parameters a IN hnd Board handle T nInstance The instance number A OUT mod The modulation result Returns TSYNC SUCCESS Success A DLL EXPORT TSYNC ERROR TSYNC_IR_getMod TSYNC BoardHandle hnd unsigned int nInstance IL MOD mod Function TSYNC IR setMod Description Set the IRIG modulation Parameters IN hnd Board handle nInstance The instance number Synchronizable Timecode Generator Supplemental Information 4 73 TSync PCle Factory Driver Guide a mod Spectracom Corporation The modulation Returns TSYNC_SUCCESS Success DLL_EXPORT TSYNC ERROR TSYNC IR setMod TSYNC BoardHandle hnd unsigned int nInstance IL MOD mod Jf Function TSYNC_IR_getFreq Description Get the IRIG carrier frequency P
241. rol 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 lt mode gt 0 IRIG DCLS only 1 IRIG AM only 2 IRIG Manchester coding 3 Unknown 4 Port supports both AM and DCLS Where lt mod gt 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 TSYNC ERROR TSYNC IP gets igCtrl TSYNC BoardHandle hnd IO PORT nInstance SIG CTL sig Description 4 182 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Get the IRIG output s signature control state Input Parameters hnd Board handle ninstance The instance number Output Parameters sig The signature control result Returns TSYNC_SUCCESS Success 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 ISYNC IP GStObtSseti TSYNC BoardHandle hnd IO PORT nInstance int nOffset Description Get the IRIG output s offset Offset is in nanos
242. rrupt type information GPI GPO are indexed index the index of the interrupt 0 for non indexed interrupts bEnable The enable information Returns TSYNC SUCCESS Success 4 2 16 16 TSYNC HW getTsSingle TSYNC ERROR TSYNC HW getTsSingle TSYNC BoardHandle handle 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 getlntCnt TSYNC ERROR TSYNC HW getIntCnt TSYNC BoardHandle handle INT TYPE intType unsigned int index unsigned ini nIntCount ct ct Description Get a interrupt count for a given interrupt source 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 nIntCount Pointer to the interrupt count result Returns 4 180 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC_SUCCESS Success 4 2 16 18 TSYNC HW cirintCnt TSYNC ERROR TSYNC HW clrintent TSYNC BoardHandle handle INT TYPE intType unsigned int index Description Reset a interrupt count for a given interrupt source Input Parameters hnd Board handle intType the interrupt type information GPI GPO are
243. rs E IN hnd Board handle OUT pObj Pointer to the DST rule result Returns TSYNC_SUCCESS Success x 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 dl IN hnd Board handle pobj Pointer to the time zone offset rul Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC CS setDstRule TSYNC BoardHandle hnd TSYNC TimeDSTRuleObj poObj V d information Synchronizable Timecode Generator Supplemental Information 4 39 TSync PCle Factory Driver Guide Spectracom Corporation Function TSYNC CS getYear Description Get the current year Parameters a IN hnd Board handle OUT pObj Pointer to the year result Returns TSYNC SUCCESS Success AL DLL EXPORT TSYNC ERROR TSYNC CS getYear TSYNC BoardHandle hnd TSYNC TimeYearObj poObj Function TSYNC CS setYear Description Set the year Parameters E IN hnd Board handle E pobj Pointer to the year information Returns TSYNC_SUCCESS Success wa DLL EXPORT TSYNC_ERROR TSYNC CS setYear TSYNC BoardHandle hnd TSYNC TimeYearObj poObj Function TSYNC CS getDstState Description Get the current DST state Parameters IN hnd Boa
244. s sof IN hnd Board handle nInstance The instance number OUT bTimeValid The time reference result il bPpsValid The pps reference result a Returns TSYNC SUCCESS Success 4 78 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide x DLL EXPORT TSYNC ERROR TSYNC OR getValidity TSYNC BoardHandle hnd unsigned int nInstance int bTimeValid int bPpsValid f Function TSYNC_QR_getFormat Description Get the STANAG HaveQuick format Parameters IN hnd Board handle ai nInstance The instance number dl OUT format The format result Returns TSYNC SUCCESS Success ava DLL EXPORT TSYNC_ERROR TSYNC OR getFormat TSYNC BoardHandle hnd unsigned int nInstance OL FMT format Function TSYNC_QR_setFormat Description Set the STANAG HaveQuick format Parameters cl IN hnd Board handle id nInstance The instance number format The format information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC OR setFormat TSYNC BoardHandle hnd unsigned int nInstance OL FMT format Function TSYNC OR getLocal Description Get the STANAG HaveQuick reference s local time zone and DST k rule Timezone and DST offsets are in seconds Parameters IN hnd Board handle nInstance The instance number OUT pObj Pointer to the Local
245. s allowed in outPayload actualOutLength the actual number of bytes passe back in outPayload Returns TSYNC SUCCESS Success s DLL EXPORT TSYNC ERROR TSYNC_get OUT outPayload passed back transaction specific data TSYNC BoardHandle handle DEST ID dest ITEM ID iid void inPayload uint32 t inLength void outPayload uint32 t maxOutLength uint32 t actualOutLength Function TSYNC set Description Generic set accessor Parameters ist IN hnd Board handle dest destination of the call i iid item id 2 inPayload transaction specific payload k inLength number of bytes in inPayload maxOutLength number bytes allowed in outPayload actualOutLength the actual number of bytes passe back in outPayload Returns TSYNC_SUCCESS Success s DLL EXPORT TSYNC ERROR TSYNC_set TSYNC BoardHandle DEST ID ITEM ID void uint32 t void uint32 t uint32 t handle dest iid inPayload inLength outPayload maxOutLength actualOutLength Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Function TSYNC waitFor Description Blocking call to wait for specified interrupt Parameters E IN hnd Board handle intType the interrupt type to wait for GPI GPO are indexed index the index of the interrupt 0 for non in
246. s control and process decoded PTP network packets either as an input reference or a time output 4 2 23 1 TSYNC PTR getModulelnfo 4 208 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC ERROR TSYNC PTR getModulelInfo TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPModuleInfoObj poObj Description Gets the PTP module s version and build date Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the Module Information object Returns TSYNC_SUCCESS Success 4 2 23 2 TSYNC_PTR_getEthernetitf TSYNC ERROR TSYNC PTR getEthernetItf TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPEthernetItfObj poObj Description Gets Ethernet settings for the PTP Module Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the Ethernet Settings object Returns TSYNC_SUCCESS Success 4 2 23 3 TSYNC_PTR_setEthernetltf TSYNC ERROR TSYNC PTR setEthernetTtf TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPEthernetItfObj poObj Description Sets Ethernet settings for the PTP Module Input Parameters hnd Board handle ninstance The instance number pObj Pointer to the Ethernet Settings object Returns TSYNC_SUCCESS Success Synchronizable Timecode Generator Supplemental Information 4 209 TSync PCle Fac
247. stance freq TSYNC_FR_getNumInst Get number of frequency reference instances present in the Board handle The number of instances result Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC FR getNumInst TSYNC BoardHandle hnd unsigned int nInstances Function TSYNC FR getRefId Description Get reference identifier for a freguency reference instance Parameters E IN hnd Board handle Returns TSYNC SUCCESS Success EA DLL EXPORT TSYNC_ERROR TSYNC FR getRefId TSYNC BoardHandle hnd unsigned int nInstance TSYNC RefIdobj pObj GPS Reference Component ES Function TSYNC_GR_getOffset Description Get the GPS reference s 1PPS input offset Offset is in nanoseconds Parameters x IN hnd Board handle oe ninstance The instance number OUT nOffset The offset result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC_GR_getOffset TSYNC BoardHandle hnd unsigned int nInstance int noffset Function TSYNC_GR_setOffset Description Set the GPS reference s 1PPS input offset Offset is in k nanoseconds from 500 msec to 500 msec Parameters E IN hnd Board handle A nInstance The instance number a noffset The offset information Returns
248. stance number nOffset The offset information Returns TSYNC SUCCESS Success 4 2 13 3 TSYNC GR getValidity TSYNC ERROR TSYNC GR ge tValidity TSYNC BoardHandle hnd unsigned int nInstance int bTimeValid int bPpsValid Description Get the GPS validity structure Input Parameters hnd Board handle ninstance The instance number Output Parameters bTimeValid The time reference result bPpsValid The pps reference result Returns 4 164 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC_SUCCESS Success 4 2 13 4 TSYNC_GR_getPosition TSYNC ERROR TSYNC GR getPos ition TSYNC BoardHandle hnd unsigned int ninstance TSYNC LLAObj poObj Description Get the GPS position Latitude and longitude are in radians Altitude is in meters Input Parameters hnd Board handle ninstance The instance number Output Parameters pObj Pointer to the position result Returns TSYNC SUCCESS Success 4 2 13 5 TSYNC GR setPosition TSYNC ERROR TSYNC GR setPosition TSYNC BoardHandle hnd unsigned int nInstance TSYNC LLAObj poObj 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 TSYNC ERROR TSYNC GR getMo
249. subsystem IN initializer Service Perform initial configuration and setup of each 4 2 17 software module IP IRIG Output Component Generate and output IRIG streams 4 2 18 IR IRIG Reference Control and process decoded IRIG input streams to 4 2 19 Component determine 1PPS and time validity ar LS Log Service Provides a queue for errors and maintains system 4220 alarms PP PPS Output Component Control a 1Hz output 4 2 21 PR PPS Reference Monitor the 1PPS input reference 4 2 22 Component PTP Reference Control and process decoded PTP network packets PTR 4 2 23 Component either as an input reference or a time output Reference Monitor Determine the best available input reference and RS are a 4 2 24 Service maintain the reference priority table ss Supervisor Service Maintain the time source 1PPS source Sync and 4 2 25 Holdover states of the system US Upgrade Service Upgrade the firmware and FPGA images in the 4 2 26 external flash memories 4 142 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide Analyze frequency measurements and make XO Oscillator Component corrective adjustments to the timing system 4 2 27 oscillator Measure and provide the accuracy and stability of XS Oscillator Monitor Service the timing system oscillator 4 2 28 Table 4 1 Available API Calls NOTE All of the typedef Enumerators variabl
250. t Parameters ai IN hnd Board handle k nInstance The instance number OUT format The format result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC IP getFormat TSYNC BoardHandle hnd unsigned int nInstance IL FMT format Function TSYNC_IP_setFormat Description Set the IRIG output format Parameters dl IN hnd Board handle nInstance The instance number x 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 a IN hnd Board handle T nInstance The instance number A OUT amp The amplitude result Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC_ ERROR TSYNC_IP_getAmplitude TSYNC BoardHandle hnd unsigned int nInstance unsigned int amp Function TSYNC_IP_setAmplitude Description Set the IRIG output amplitude Amplitude is in range of 3 255 Parameters x IN hnd Board handle Synchronizable Timecode Generator Supplemental Information 4 87 TSync PCle Factory Driver Guide 4 88 a ninstance The instance number amp The amplitude information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC E
251. t Returns TSYNC SUCCESS Success 47 DLL_EXPORT TSYNC_ERROR TSYNC_CS_getTimeScale TSYNC_BoardHandle hnd Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC_TimeScaleObj pObj V d Function TSYNC CS setTimeScale Description Set the board s time scale Parameters IN hnd Board handle pobj Pointer to the time scale information Returns TSYNC SUCCESS Success AL DLL EXPORT TSYNC_ERROR TSYNC CS _setTimeScale TSYNC BoardHandle hnd TSYNC TimeScaleObj poObj Function TSYNC_CS_getTimeScaleOff Description Get the specified time scale s offset from UTC Offset is in seconds Parameters IN hnd Board handle OUT pObj Pointer to the time scale offset result Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC_ERROR TSYNC CS _getTimeScale0ff TSYNC_BoardHandle hnd TSYNC_TimeScaleOffsetObj poObj Function TSYNC_CS_setTimeScaleOff Description Set the specified time scale s offset from UTC Offset is in x seconds Parameters IN hnd Board handle 2 pobj Pointer to the time scale offset information Returns TSYNC SUCCESS Success DLL EXPORT TSYNC_ERROR TSYNC CS _setTimeScale0ff TSYNC_BoardHandle hnd TSYNC_TimeScaleOffsetObj poObj Function TSYNC_CS_subsecAdj Description Make a one
252. t nInstance int bTimeValid int bPpsValid Description Get the PTP validity structure when used as a PTP Slave 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 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide 4 2 23 18 TSYNC_PTR_getMode TSYNC ERROR TSYNC_PTR_getMode TSYNC BoardHandle hnd unsigned int ninstance int bMode Description Gets the PTP module s current operational mode Input Parameters hnd Board handle ninstance The instance number Output Parameters bMode pointer to Mode object Returns TSYNC SUCCESS Success 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 int 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 1 PTP Master Mode After changing the operational mode please reset the module 4 2 23 20 TSYNC PTR getMacAddr TSYNC ERROR TSYNC_PTR_getMacAddr TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPMacAddrObj poObj Description Gets the PTP module s current M
253. t the GPO s square wave offset Offset is in nanoseconds k from 500 msec to 500 msec Parameters IN hnd Board handle E gpo GPO index off Square wave offset Returns x DLL EXPORT TSYNC SUCCESS Success TSYNC ERROR TSYNC GO setSWOffset TSYNC BoardHandle hnd OD PIN gpo int off Function TSYNC GO getSWPeriod Description Get the GPO s square wave period Period is in nanoseconds id or microseconds depending on scale bit msb Parameters x IN hnd Board handle gpo GPO index Y OUT per Pointer to the square wave period Returns a DLL EXPORT TSYNC_SUCCESS Success TSYNC ERROR TSYNC GO getSWPeriod TSYNC BoardHandle hnd OD PIN gpo unsigned int per Function TSYNC GO setSWPeriod Description Set the GPO s square wave period Period is in nanoseconds m or microseconds depending on scale bit msb Period is from 100 nsec to 20 sec in nanosecond scale and from 100 j usec to 20 000 sec in microsecond scale Parameters of IN hnd Board handle gpo GPO index OUT per Sguare wave period Returns TSYNC SUCCESS Success EL Synchronizable Timecode Generator Supplemental Information 4 127 TSync PCle Factory Driver Guide Spectracom Corporation DLL EXPORT TSYNC ERROR TSYNC GO setSWPeriod TSYNC BoardHandle hnd OD PIN gpo unsigned int per Function TSYNC GO getSWPW Description Get the GPO
254. tEdge TSYNC BoardHandle hnd T ID PIN index EDGE edge Function TSYNC GI getTsEnable Description Get the GPI s timestamp enable state ia used when time stamping input changes Parameters IN hnd Board handle index The input index ia OUT bEnable The enabled result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GI getTsEnable Synchronizable Timecode Generator Supplemental Information 4 53 TSync PCle Factory Driver Guide Spectracom Corporation 4 54 TSYNC BoardHandle hnd ID PIN index int bEnable Function TSYNC GI setTsEnable Description Set the GPI s timestamp enable state used when time stamping input changes Parameters k IN hnd Board handle index The input index x bEnable The enabled information Returns TSYNC SUCCESS Success i DLL EXPORT TSYNC ERROR TSYNC GI setTsEnable TSYNC BoardHandle hnd ID PIN index int bEnable Function TSYNC_GI_getNumInst Description Get number of GPIO Inputs present in the system Parameters 4 IN hnd Board handle A OUT nInstances The number of instances result Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GI getNumInst TSYNC BoardHandle hnd unsigned int nInstances Host Reference Component PX Function TSYNC HR getValidity Description Get the referenc
255. tFormat TSYNC BoardHandle hnd unsigned int nInstance TL EMT 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 format Description Set the IRIG format Settable only when in manual mode Input Parameters hnd Board handle ninstance The instance number format The format information Returns TSYNC SUCCESS Success 4 2 19 8 TSYNC IR getMod TSYNC ERROR TSYNC IR ge tMod TSYNC BoardHandle hnd unsigned int nInstance IL MOD mod Description Get the IRIG modulation Input Parameters hnd Board handle 4 194 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide ninstance The instance number Output Parameters mod The modulation result Returns TSYNC_SUCCESS Success 4 2 19 9 TSYNC_IR_getFreq TSYNC ERROR TSYNC IR getFreg TSYNC BoardHandle hnd unsigned int nInstance IL FRO freg 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 setFreg TSYNC BoardHandle hnd
256. tNumInst Description Get number of SMPTE EBU output instances present in the system Parameters is IN hnd Board handle OUT nInstances The number of instances result Returns TSYNC_SUCCESS Success 4 DLL EXPORT TSYNC_ERROR TSYNC_EP_getNumInst TSYNC BoardHandle hnd unsigned int nInstances Display Output Component h Function TSYNC_DP_getLocal Description Get the display output s local time zone and DST rule Timezone and DST offsets are in seconds Parameters IN hnd Board handle nInstance The instance number OUT pObj Pointer to the Local Clock result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC DP getlocal TSYNC BoardHandle hnd unsigned int nInstance TSYNC_LocalClockObj pobj V d Function TSYNC DP setlLocal Description Set the display output s local time zone and DST rule a Timezone and DST offsets are in seconds Parameters IN hnd Board handle A nInstance The instance number 2 pobj Pointer to the Local Clock information Returns TSYNC_SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC DP setLocal TSYNC BoardHandle hnd unsigned int nInstance Synchronizable Timecode Generator Supplemental Information 4 109 TSync PCle Factory Driver Guide TSYNC_LocalClockObj pObj x Function Parameters IN hnd nInstance OUT f
257. tance The instance number TSYNC LocalClockObj The time scale information Returns TSYNC_SUCCESS Success A DLL EXPORT TSYNC ERROR TSYNC HR setTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj pObj Function TSYNC HR getRefId Description Get reference identifier for a Host reference instance Parameters IN hnd Board handle i OUT TSYNC_RefIdObj The reference identifier result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC HR getRefId TSYNC BoardHandle hnd unsigned int nInstance TSYNC RefIdobj pobj Function TSYNC_HR_getNumInst Description Get number of Host reference instances present in the system Parameters IN hnd Board handle i OUT nInstances The number of instances result Returns TSYNC_SUCCESS Success 4 56 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide DLL TSYNC E EXP ORT RROR TSYNC HR getNumInst TSYNC BoardHandle hnd uns igned int nInstances 1PPS Reference Component Function TSYNC PR getOffset X CA CACA IN Description Get the 1PPS reference s input offset Offset is in nanoseconds Parameters hnd Board handle nInstance The instance number OUT nOffset The offset result Returns TSYNC SUCCESS
258. ter setting the Operational Mode issuing the following commands will make that change persist across reboots and reset the module to recognize the new settings PTR SaveSettingstoROM lt device gt lt inst gt PTR ResetModule lt device gt lt inst gt 0 5 7 1 3 Ethernet Configuration DHCP Static IP To read the current IP information PTR GetEthernetITF lt device gt lt inst gt To use a Static IP PTR SetEthernetITF lt device gt lt inst gt lt 0 gt lt Static IP gt lt Netmask gt lt Gateway gt To use DHCP PTR SetEthernetITF lt device gt lt inst gt lt 1 gt lt Static IP gt lt Netmask gt lt Gateway gt Note The PTP module will only attempt to find a DHCP address once when the module is first powered up or after a reset If the module cannot find an IP address it will use the Static IP address given in this PTR_SetEthernetITF command To re acquire an IP address reset the module Synchronizable Timecode Generator Supplemental Information 5 243 TSync PCle Factory Driver Guide Spectracom Corporation After changing the Ethernet settings either static or DHCP issue the following commands to persist the settings and reset the module PTR SaveSettingstoROM lt device gt lt inst gt PTR ReinitModule lt device gt lt inst gt 0 5 7 2 Basic PTP Configuration 5 7 2 1 Configuration as Slave Device The TSync PCle PTP is configured from the factory to fun
259. terface to the board The source code and make files for the example programs are included All of the example programs were compiled using Sun Studio 12 TSyncExamples i86pc tar gz 32 bit programs for x86 based machines To see usage help for any example program execute the program with no parameters gt HW_GetTime Synchronizable Timecode Generator Supplemental Information 2 5 TSync PCle Factory Driver Guide Spectracom Corporation 2 3 Windows The driver is designed to operate with the following 32 bit or 64 bit Windows operating systems running on a PC system with x86 compatible processor s Windows 2000 Windows XP Windows Server 2003 Windows Vista Windows Server 2008 R2 Windows 7 The 32 bit library file and DLL Tsync lib Tsync dll can be found in the Spectracom TSYNC PCI Dev directory under Program Files Similarly the 64 bit versions of the same files are located in the Spectracom TSYNC PCINDev64 directory under Program Files x86 on 64 bit operating systems Included with the driver are example programs with source utilizing the API library a control utility exercising legacy API functionality and a clock daemon tray utility and service that is used to set the host computer s system time 2 3 1 Installing the Driver NOTE f the system contains a previously installed version of the driver that version must first be uninstalled 1 Driver setup should start autom
260. ters IN hnd Board handle source Timestamp source ACA CACA N Returns TSYNC_SUCCESS Success 47 DLL EXPORT TSYNC ERROR TSYNC HW setTsClear TSYNC BoardHandle handle TMSTMP SRC source 4 132 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide P d Function TSYNC HW getTsCount Description Get the number of collected timestamps for the specified source g Parameters E IN hnd Board handle E source The timestamp source information OUT nCount The count result Returns TSYNC SUCCESS Success Ei DLL EXPORT TSYNC ERROR TSYNC HW getTsCount TSYNC BoardHandle handle TMSTMP SRC source unsigned int nCount Function TSYNC HW getTsData Description Get all collected timestamps for the specified source Parameters a IN hnd Board handle source The timestamp source information a OUT pObj Pointer to the timestamp data result Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC HW getTsData TSYNC BoardHandle handle TMSTMP SRC source TSYNC HWTimeDataObj poObj Function TSYNC_HW_getMatchTimeHi Description Get the match time value when the specified general purpose x output will transition to an active high state gt Parameters h IN hnd Board handle index GPO index information i OUT pObj Point
261. tor Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC BoardHandle hnd unsigned int nInstance int bPpsRisingEdge Function TSYNC PTR saveSettingsToROM Description Saves any settings that have been changed in the PTP module to the module s ROM Parameters IN hnd Board handle 4 Returns TSYNC SUCCESS Success z DLL EXPORT TSYNC ERROR TSYNC PTR saveSettingsToROM TSYNC BoardHandle hnd unsigned int nInstance Function TSYNC_PTR_resetModule Description Resets the PTP module based on the typ Parameters IN hnd Board handle X ninstance PTP instance requested resetType The type of reset reguested Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC_PTR_resetModule TSYNC BoardHandle hnd Returns TSYNC SUCCESS Success k DLL EXPORT TSYNC ERROR TSYNC_PTR_getNumInst TSYNC BoardHandle hnd unsigned int nInstances Function TSYNC PTR reinitModule Description Reinitializes PTP Module Parameters a IN hnd Board handle Returns TSYNC SUCCESS Success xf DLL EXPORT TSYNC ERROR TSYNC_PTR_reinitModule TSYNC BoardHandle hnd of reset reguested unsigned int nInstance PTL RESET resetType Function TSYNC_PTR_getNumInst Description Gets the number of PTP modules present in the system Par
262. tory Driver Guide Spectracom Corporation Note When enabling DHCP the rest of the PTPEthernetltfObj structure still needs to be populated This data will be retailed by the TSync PCle but it will not be used as long as DHCP is enabled After changing Ethernet Settings please reset the module 4 2 23 4 TSYNC_PTR_getUnitSettings TSYNC_ERROR TS NC PER 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 hnd unsigned int nInstance TSYNC PTPUnitSettingsObj pObj Description Sets general PTP settings for the PTP Module Input Parameters hnd Board handle ninstance The instance number pObj Pointer to the Unit Settings object Returns TSYNC SUCCESS Success 4 2 23 6 TSYNC_PTR_getPortState 4 210 TSYNC ERROR TSYNC PTR getPortState TSYNC BoardHandle hnd unsigned int nInstance TSYNC_PTPPortState0bj pObj Description Gets the current state of the PTP port Input Parameters Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide hnd Board handle ninstance The insta
263. tude TPRO BoardObj hnd TPRO LongObj Longp unsigned char TPRO getSatInfo TPRO BoardObj hnd TPRO SatObj Satp Synchronizable Timecode Generator Supplemental Information 6 3 TSync PCle Factory Driver Guide Spectracom Corporation unsigned char TPRO getTime TPRO BoardObj hnd TPRO TimeObj Timep unsigned char TPRO resetFirmware TPRO BoardObj hnd unsigned char TPRO setHeartbeat TPRO BoardObj hnd TPRO HeartObj Heartp unsigned char TPRO setMatchTime TPRO BoardObj hnd TPRO MatchObj Matchp unsigned char TPRO setOscillator TPRO BoardObj hnd unsigned char freg unsigned char TPRO setPropDelayCorr TPRO BoardObj hnd int us unsigned char TPRO setTime TPRO BoardObj hnd TPRO TimeObj Timep unsigned char TPRO setYear TPRO BoardObj hnd unsigned short yr unsigned char TPRO simEvent TPRO BoardObj hnd unsigned char TPRO synchControl TPRO BoardObj hnd unsigned char enbp unsigned char TPRO synchStatus TPRO BoardObj hnd unsigned char status unsigned char TPRO waitEvent TPRO BoardObj hnd TPRO WaitObj waitp unsigned char TPRO waitHeartbeat TPRO BoardObj hnd int jiffies unsigned char TPRO waitMatch TPRO BoardObj hnd int jiffies unsigned char TPRO peek TPRO BoardObj hnd TPRO MemObj pMem unsigned char TPRO poke TPRO BoardObj hnd TPRO MemObj pMem KKK KA KA KK AKA AKA KA KA KA KA KA KA KA KA KA K k K k kk k kok kok kok kok kok kok
264. turns TSYNC_SUCCESS Success a DLL EXPORT TSYNC ERROR TSYNC OR setTimeScale TSYNC BoardHandle hnd unsigned int nInstance TSYNC TimeScaleObj poObj Function TSYNC OR getRefId Description Get reference identifier for a STANAG HaveOuick reference instance Parameters IN hnd Board handle Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC OR getRefId TSYNC BoardHandle hnd unsigned int nInstance 4 80 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC RefIdObj pobj V d Function TSYNC OR getNumInst Description Get number of STANAG HaveOuick reference instances present in the system Parameters IN hnd Board handle OUT nInstances The number of instances result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC OR getNumInst TSYNC BoardHandle hnd unsigned int nInstances ASCII Output Component k JR Function TSYNC AP getSigCtrl Description Get the ASCIT output s signature control state Parameters 4 IN hnd Board handle G nInstance The instance number J OUT sig The signature control result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC AP getSigCtrl TSYNC BoardHandle hnd unsigned int nInstance SIG CTL sig Function TSYNC AP
265. tus 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 Returns TPRO_COMM_ERR error communicating with driver Synchronizable Timecode Generator Supplemental Information 6 9 TSync PCle Factory Driver Guide Spectracom Corporation TPRO_SUCCESS success 6 2 14 TPRO_waitEvent unsigned char TPRO waitEvent TPRO BoardObj hnd TPRO WaitObj waitp Description This routine reports the time of an external time tagged event from the on board FIFO Events are stored in the FIFO and this routine will read the FIFO for events If the FIFO is empty the routine will wait for an interrupt and report the event for the timeout specified in the TPRO WaitObj object This routine is tied to general purpose input 0 Input Parameters hnd Board handle Output Parameters waitp Pointer to the WaitObj Returns TPRO COMM ERR error communicating with driver TPRO SUCCESS success 6 2 15 TPRO waitHeartbeat unsigned char TPRO waitHeartbeat TPRO BoardObj hnd int 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
266. typedef enum lt AL FMT SPEC 0 0x00000000 AL FMT SPEC 1 0x00000001 AL FMT SPEC 2 0x00000002 AL FMT SPEC 3 0x00000003 AL FMT SPEC 4 0x00000004 AL FMT SPEC 5 0x00000005 AL FMT SPEC 6 0x00000006 AL FMT SPEC 7 0x00000007 AL FMT SPEC 8 0x00000008 AL FMT SPEC 9 0x00000009 AL FMT NMEA GGA 0x0000000A AL FMT NMEA RMC 0x0000000B AL FMT NMEA ZDA 0x0000000C AL FMT BBC 01 0x0000000D AL FMT BBC 02 0x0000000E AL FMT BBC 03 0x0000000F AL FMT BBC 04 0x00000010 AL FMT 153C BB 0x00000011 AL FMT 153C TT 0x00000012 AL FMT 153C CS 0x00000013 AL FMT SPEC 1S 0x00000101 AL FMT UNKNOWN 0x0000FFFF AL FMT typedef enum AL OMODE BC AL OMODE OT AL OMODE IM AL OMODE ST AL OUT MODE typedef enum IL MODE AUTO 0 IL MODE MANUAL 1 IL MODE typedef enum IL FMT IRIG A 0 IL FMT IRIG B 1 IL FMT IRIG G 2 IL FMT NASA 36 3 IL FMT IRIG E 100 4 IL FMT IRIG E 1K 5 IL FMT UNKNOWN 7 Spectracom format Spectracom format Spectracom format Spectracom format Spectracom format Spectracom format Spectracom format Spectracom format Spectracom format Spectracom format NMEA GGA message NMEA RMC message NMEA ZDA message BBC format 1 BBC format 2 BBC format 3 PSTN BBC format 4 ICD 153C 253 Buffer Box ICD 153C 5101 Time Transfer ICD 153C 5040 Current Status OANA AA WHE O
267. uare wave time alignment enable Returns TSYNC SUCCESS Success xf DLL EXPORT TSYNC ERROR TSYNC GO setSWTmAlgnEn TSYNC BoardHandle hnd 4 130 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide OD_PIN gpo int bEnable Function TSYNC_GO_setSWInit Description Set the GPO s square wave initialization This will x initialize align and restart the square wave on the next PPS Parameters IN hnd Board handle gpo GPO index Returns TSYNC SUCCESS Success DLL EXPORT TSYNC ERROR TSYNC GO setSWInit TSYNC BoardHandle hnd OD PIN gpo JR Function TSYNC GO _getNumlnst Description Get number of GPIO Outputs present in the system Parameters IN hnd Board handle OUT nInstances The number of instances result Returns TSYNC SUCCESS Success DLL EXPORT TSYNC_ERROR TSYNC GO getNumInst TSYNC BoardHandle hnd unsigned int nInstances Hardware Interface x Function TSYNC HW getTime Description Get the current system time from the hardware Parameters E IN hnd Board handle g 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
268. unction TSYNC IR getValidity Description Get the IRIG validity structure Parameters x IN hnd Board handle x nInstance The instance number OUT bTimeValid The time reference result bPpsValid The pps reference result Returns TSYNC SUCCESS Success aA DLL EXPORT TSYNC ERROR TSYNC IR getValidity TSYNC BoardHandle hnd unsigned int nInstance int bTimeValid int bPpsValid Function TSYNC_IR_getMode Description Get the IRIG mode Parameters k IN hnd Board handle x nInstance The instance number E OUT mode The receiver mode result Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC_IR_getMode TSYNC BoardHandle hnd unsigned int nInstance IL MODE mode Function TSYNC_IR_setMode Description Set the IRIG mode Parameters IN hnd Board handle nInstance The instance number ad mode The receiver mode information Returns TSYNC SUCCESS Success DLL EXPORT Spectracom Corporation Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide TSYNC_ERROR TSYNC_IR_setMode TSYNC BoardHandle hnd unsigned int nInstance IL MODE mode Function TSYNC IR getFormat Description Get the IRIG format Parameters k IN hnd Board handle nInstance The instance number OUT format The format
269. unsigned int idx TSYNC OptCardSlotIdxObj TSYNC OPTION CARD SLOT FEATURE LOCAL INSTANCE OBJECT x typedef struct TSYNC OptCardSlotFeatInstObj int slot unsigned int featId unsigned int inst TSYNC OptCardSlotFeatInstObj TSYNC OPTION CARD HEADER OBJECT 7 typedef struct TSYNC OptCardFeatInstObj unsigned int featId unsigned int inst TSYNC OptCardFeatInstObj PUBLIC ROUTINE PROTOTYPES aie General Function TSYNC_open Description Open the TSYNC device Parameters IN hw Handle deviceName Name of the device X Returns TSYNC_SUCCESS Success s DLL EXPORT TSYNC ERROR TSYNC_open TSYNC BoardHandle hnd char deviceName P s Function TSYNC close Description Close the TSYNC device ES Synchronizable Timecode Generator Supplemental Information 4 31 TSync PCle Factory Driver Guide Spectracom Corporation 4 32 Parameters IN hw DLL EXPORT Handle Returns TSYNC SUCCESS Success TSYNC ERROR TSYNC_close OUT outPayload passed back transaction specific data TSYNC BoardHandle hnd Function TSYNC get Description Generic get accessor Parameters IN hnd Board handle dest destination of the call i iid item id inPayload transaction specific payload inLength number of bytes in inPayload maxOutLength number byte
270. utput s time scale Parameters IN hnd Board handle k ninstance The instance number z pobj Pointer to the time scale information Returns TSYNC SUCCESS Success xf DLL EXPORT TSYNC ERROR TSYNC IP setTimeScale TSYNC BoardHandle hnd 4 92 Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide unsigned int nInstance TSYNC TimeScaleObj poObj PTP Reference Component y Function TSYNC PTR getModuleInfo Description Gets the PTP module s version and build date Parameters k IN hnd Board handle ninstance The instance number E OUT pObj The module s version and build date Returns TSYNC SUCCESS Success x DLL EXPORT TSYNC ERROR TSYNC PTR getModuleInfo TSYNC BoardHandle hnd unsigned int nInstance TSYNC PTPModuleInfoObj poObj Function TSYNC PTR getEthernetItf Description Gets Ethernet settings for the PTP module Parameters x IN hnd Board handle nInstance The instance number x 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 poObj Function TSYNC_PTR_setEthernetItf Description Sets Ethernet settings for the PTP modul
271. wo ways to use the TSync board without a GPS or IRIG input One is called the Host mode and the other is called self mode When using self as a reference as configured in the reference priority table manually entered time is automatically considered valid data In contrast Host mode is not automatically considered valid data so it must be commanded via driver calls to be considered valid data before the manually set time will be used On older TSync boards with software version 1 x x the external 1PPS input is paired with the Host Time reference So unless the time on the board through the Host Reference and the Host Reference is set Valid the TSync board won t synchronize to the external 1PPS An alternative is to add a reference table entry for self epp0 which pairs the external 1PPS with the self reference instead The self reference as a time reference just assumes that whatever the TSync has for time is valid whether it was set by a host or not The first step is to enable an entry into the working priority table to allow the PC to be the time reference for the board nst0 and to establish it as the highest priority Refer to the RS_addentry command The full command structure for this is as follows rs addentry 0 1 1 hst0 eppo The second step is to set the time using the cs settime command Refer to Section 4 2 8 2 The command structure for this command is cs settime 0
272. x 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 x IN hnd Board handle nInstance The instance number OUT mode The receiver mode result x Returns TSYNC SUCCESS Success Synchronizable Timecode Generator Supplemental Information Spectracom Corporation TSync PCle Factory Driver Guide x DLL EXPORT TSYNC ERROR TSYNC GR getMode TSYNC BoardHandle hnd unsigned int nInstance GL MODE mode GL DYN dyn Function TSYNC_GR_setMode Description Set the GPS receiver mode Parameters X IN hnd Board handle nInstance The instance number mode The receiver mode information Returns TSYNC SUCCESS Success ava DLL EXPORT TSYNC_ERROR TSYNC_GR_setMode TSYNC BoardHandle hnd unsigned int nInstance GL MODE mode GL DYN dyn f Function TSYNC_GR_getDynamics Description Get the GPS dynamics mode Parameters IN hnd Board handle x nInstance The instance number a OUT mode The dynamics mode result Returns TSYNC SUCCESS Success EL DLL EXPORT TSYNC ERROR TSYNC GR _getDynamics TSYNC BoardHandle hnd unsigned int nInstance GL DYN mode Function TSYNC_GR_setDynamics Description Set the GPS dynamics mode Parameters
273. x0300 HW GPO MTCH LO 0x0301 HW FPGA ID 0x0400 HW INT MASK 0x0401 HW ITEM typedef union FW_ITEM fid HW ITEM hid ITEM ID typedef enum TMSTMP SRC HOST TMSTMP SRC GPI 0 TMSTMP SRC GPI 1 TMSTMP SRC GPI 3 TMSTMP SRC GPI 2 HW NONKTS ITEM hnkid 0x0 0x1 0x2 0x3 0x4 TMSTMP SRC HOST AND GPI TMSTMP SRC COUNT TMSTMP SRC typedef enum PIN ALL PIN MIN PIN 0 PIN 1 PIN 2 PIN 3 PIN 4 5 6 7 m ll JOU BUN FOO I lt lt lt lt lt lt lt PIN PIN PIN HHHHHHHHHH 00 KE KI D N ID PIN NUM 4 ID PIN FUTUR 0 TSync PCle Factory Driver Guide utilizing the HIP defined protocol Access to hardware in directly addressable memory space Access to non KTS hardware in directly addressable memory space cai iid pair as described in each HIDD defined transaction HW transaction item Non KTS HW transaction item 0x5 Number of GPI pins Synchronizable Timecode Generator Supplemental Information 4 137 TSync PCle Factory Driver Guide Spectracom Corporation typedef enum PIN ALL PIN MIN PINO PI 1 PI 2 PI 3 PI 4 5 6 7 Hi BY O G KUN FO O lt lt lt lt PI PI PI PIN NUM 00000000000 UVUUUUUUUUUUOUO Number of GPO FUTURE 8 endif 4 13
274. y Once these commands have been run once the board is then available to start performing match times and provide outputs either a low or a high when the match times occur until the board is reset power cycled Once the match time mode and the match output pin have been enabled with the three above commands the state of the Match time output pin a high or a low is then controlled by the HW SetMatchTimeHi and HW SetMatchTimeLo commands These two commands can be run in a pair if you wish to change states and then reset back to the original state changing it to one state at a specified time and then changing it back to the original state at a different specified time or you can run just one or the other to change the state and then leave it in that state occurring at one specified time Note Make sure the board s timescale is configured as the same timescale that the match times are being entered Otherwise the matches won t happen when expected For example the default board timescale is UTC If the match times are entered as local time they will be several hours off Refer to changing the board s timescale below Match Time FAQs Q Should these calls be made in any particular order A The calling order for the three TSYNC GO XXX commands are not necessarily order sensitive but are required to setup the output to function with the TSYNC_HW_setMatchTimeXX calls Note that if the output is enabled with TSYNC GO setEnable what

Download Pdf Manuals

image

Related Search

Related Contents

Marathon Shredder Paper Shredder User Manual  MODEL 1703E - DER CHAMBERLAIN ARM™  REACH Media Master  Manual Compressor Cristófoli Port.Rev.3  Appendix I - AutomationDirect      Western Digital WDBAAY0010HNC-ERSN hard disk drive  Videocon VU223LD 21.6" HD-Ready Black LCD TV  AP 電動インパクトレンチ 取扱説明書  

Copyright © All rights reserved.
Failed to retrieve file