JLab Pipeline TI Library  3v6.1
tiLib.c File Reference

Macros

#define _GNU_SOURCE
 
#define TILOCK   if(pthread_mutex_lock(&tiMutex)<0) perror("pthread_mutex_lock");
 
#define TIUNLOCK   if(pthread_mutex_unlock(&tiMutex)<0) perror("pthread_mutex_unlock");
 
#define MAX_VME_SLOTS   21 /* This is either 20 or 21 */
 

Functions

int tiSetFiberLatencyOffset_preInit (int flo)
 Set the Fiber Latency Offset to be used during initialization. More...
 
int tiSetCrateID_preInit (int cid)
 Set the CrateID to be used during initialization. More...
 
int tiSetFiberIn_preInit (int port)
 Set the Fiber In port to be used during initialization of TI Slave. More...
 
int tiInit (unsigned int tAddr, unsigned int mode, int iFlag)
 Initialize the TIp register space into local memory, and setup registers given user input. More...
 
unsigned int tiFind ()
 Find the TI within the prescribed "GEO Slot to A24 VME Address" range from slot 3 to 21. More...
 
int tiCheckAddresses ()
 
void tiStatus (int pflag)
 Print some status information of the TI to standard out. More...
 
int tiSetSlavePort (int port)
 This routine provides the ability to switch the port that the TI Slave receives its Clock, SyncReset, and Trigger. If the TI has already been configured to use this port, nothing is done. More...
 
int tiGetSlavePort ()
 Returns the port of which the TI Slave has been configured (or will be) More...
 
void tiSlaveStatus (int pflag)
 Print a summary of all fiber port connections to potential TI Slaves. More...
 
int tiGetFirmwareVersion ()
 Get the Firmware Version. More...
 
int tiReload ()
 Reload the firmware on the FPGA. More...
 
unsigned int tiGetSerialNumber (char **rSN)
 Get the Module Serial Number. More...
 
int tiClockResync ()
 Resync the 250 MHz Clock. More...
 
int tiReset ()
 Perform a soft reset of the TI. More...
 
int tiSetCrateID (unsigned int crateID)
 Set the crate ID. More...
 
int tiGetCrateID (int port)
 Get the crate ID of the selected port. More...
 
int tiGetPortTrigSrcEnabled (int port)
 Get the trigger sources enabled bits of the selected port. More...
 
int tiGetSlaveBlocklevel (int port)
 Get the blocklevel of the TI-Slave on the selected port. More...
 
int tiSetBlockLevel (int blockLevel)
 Set the number of events per block. More...
 
int tiBroadcastNextBlockLevel (int blockLevel)
 Broadcast the next block level (to be changed at the end of the next sync event, or during a call to tiSyncReset(1). More...
 
int tiGetNextBlockLevel ()
 Get the block level that will be updated on the end of the block readout. More...
 
int tiGetCurrentBlockLevel ()
 Get the current block level. More...
 
int tiSetInstantBlockLevelChange (int enable)
 Set TS to instantly change blocklevel when broadcast is received. More...
 
int tiGetInstantBlockLevelChange ()
 Get Status of instant blocklevel change when broadcast is received. More...
 
int tiSetTriggerSource (int trig)
 Set the trigger source This routine will set a library variable to be set in the TI registers at a call to tiIntEnable. More...
 
int tiSetTriggerSourceMask (int trigmask)
 Set trigger sources with specified trigmask This routine is for special use when tiSetTriggerSource(...) does not set all of the trigger sources that is required by the user. More...
 
int tiEnableTriggerSource ()
 Enable trigger sources Enable trigger sources set by tiSetTriggerSource(...) or tiSetTriggerSourceMask(...) More...
 
int tiDisableTriggerSource (int fflag)
 Disable trigger sources. More...
 
int tiSetSyncSource (unsigned int sync)
 Set the Sync source mask. More...
 
int tiSetEventFormat (int format)
 Set the event format. More...
 
int tiSetFPInputReadout (int enable)
 Set whether or not the latched pattern of FP Inputs in block readout. More...
 
int tiSoftTrig (int trigger, unsigned int nevents, unsigned int period_inc, int range)
 Set and enable the "software" trigger. More...
 
int tiSetRandomTrigger (int trigger, int setting)
 Set the parameters of the random internal trigger. More...
 
int tiDisableRandomTrigger ()
 Disable random trigger generation. More...
 
int tiReadBlock (volatile unsigned int *data, int nwrds, int rflag)
 Read a block of events from the TI. More...
 
int tiReadTriggerBlock (volatile unsigned int *data)
 Read a block from the TI and form it into a CODA Trigger Bank. More...
 
int tiCheckTriggerBlock (volatile unsigned int *data)
 
int tiDecodeTriggerType (volatile unsigned int *data, int data_len, int event)
 
int tiEnableFiber (unsigned int fiber)
 Enable Fiber transceiver. More...
 
int tiDisableFiber (unsigned int fiber)
 Disnable Fiber transceiver. More...
 
int tiSetBusySource (unsigned int sourcemask, int rFlag)
 Set the busy source with a given sourcemask sourcemask bits: More...
 
int tiSetTriggerLock (int enable)
 Set the the trigger lock mode. More...
 
int tiGetTriggerLock ()
 Get the current setting of the trigger lock mode. More...
 
void tiEnableBusError ()
 Enable Bus Errors to terminate Block Reads. More...
 
void tiDisableBusError ()
 Disable Bus Errors to terminate Block Reads. More...
 
int tiPayloadPort2VMESlot (int payloadport)
 Routine to return the VME slot, provided the VXS payload port. More...
 
unsigned int tiPayloadPortMask2VMESlotMask (unsigned int ppmask)
 Routine to return the VME slot Mask, provided the VXS payload port Mask. More...
 
int tiVMESlot2PayloadPort (int vmeslot)
 Routine to return the VXS payload port, provided the VME Slot. More...
 
unsigned int tiVMESlotMask2PayloadPortMask (unsigned int vmemask)
 Routine to return the VXS Payload Port Mask, provided the VME Slot Mask. More...
 
int tiSetPrescale (int prescale)
 Set the prescale factor for the external trigger. More...
 
int tiGetPrescale ()
 Get the current prescale factor. More...
 
int tiSetInputPrescale (int input, int prescale)
 Set the prescale factor for the selected input. More...
 
int tiGetInputPrescale (int input)
 Get the current prescale factor for the selected input. More...
 
int tiSetTriggerPulse (int trigger, int delay, int width, int delay_step)
 Set the characteristics of a specified trigger. More...
 
int tiSetPromptTriggerWidth (int width)
 Set the width of the prompt trigger from OT#2. More...
 
int tiGetPromptTriggerWidth ()
 Get the width of the prompt trigger from OT#2. More...
 
void tiSetSyncDelayWidth (unsigned int delay, unsigned int width, int widthstep)
 Set the delay time and width of the Sync signal. More...
 
void tiTrigLinkReset ()
 Reset the trigger link. More...
 
int tiSetSyncResetType (int type)
 Set type of SyncReset to send to TI Slaves. More...
 
void tiSyncReset (int blflag)
 Generate a Sync Reset signal. This signal is sent to the loopback and all configured TI Slaves. More...
 
void tiSyncResetResync ()
 Generate a Sync Reset Resync signal. This signal is sent to the loopback and all configured TI Slaves. This type of Sync Reset will NOT reset event numbers. More...
 
void tiClockReset ()
 Generate a Clock Reset signal. This signal is sent to the loopback and all configured TI Slaves. More...
 
int tiSetAdr32 (unsigned int a32base)
 Routine to set the A32 Base. More...
 
unsigned int tiGetAdr32 ()
 
int tiDisableA32 ()
 Disable A32. More...
 
int tiResetEventCounter ()
 Reset the L1A counter, as incremented by the TI. More...
 
unsigned long long int tiGetEventCounter ()
 Returns the event counter (48 bit) More...
 
int tiSetBlockLimit (unsigned int limit)
 Set the block number at which triggers will be disabled automatically. More...
 
unsigned int tiGetBlockLimit ()
 Returns the value that is currently programmed as the block limit. More...
 
int tiGetBlockLimitStatus ()
 Get the current status of the block limit. More...
 
unsigned int tiBReady ()
 Returns the number of Blocks available for readout. More...
 
int tiGetSyncEventFlag ()
 Return the value of the Synchronization flag, obtained from tiBReady. i.e. Return the value of the SyncFlag for the current readout block. More...
 
int tiGetSyncEventReceived ()
 Return the value of whether or not the sync event has been received. More...
 
int tiGetReadoutEvents ()
 Return the value of the number of readout events accepted. More...
 
int tiEnableVXSSignals ()
 Enable trigger and sync signals sent through the VXS to the Signal Distribution (SD) module. More...
 
int tiDisableVXSSignals ()
 Disable trigger and sync signals sent through the VXS to the Signal Distribution (SD) module. More...
 
int tiSetBlockBufferLevel (unsigned int level)
 Set the block buffer level for the number of blocks in the system that need to be read out. More...
 
int tiEnableTSInput (unsigned int inpMask)
 Enable/Disable trigger inputs labelled TS#1-6 on the Front Panel. More...
 
int tiDisableTSInput (unsigned int inpMask)
 Disable trigger inputs labelled TS#1-6 on the Front Panel. More...
 
int tiSetOutputPort (unsigned int set1, unsigned int set2, unsigned int set3, unsigned int set4)
 Set (or unset) high level for the output ports on the front panel labelled as O#1-4. More...
 
int tiSetClockSource (unsigned int source)
 Set the clock to the specified source. More...
 
int tiGetClockSource ()
 Get the current clock source. More...
 
void tiSetFiberDelay (unsigned int delay, unsigned int offset)
 Set the fiber delay required to align the sync and triggers for all crates. More...
 
int tiAddSlave (unsigned int fiber)
 Add and configurate a TI Slave for the TI Master. More...
 
int tiAddSlaveMask (unsigned int fibermask)
 Add and configure TI Slaves by using a mask for the TI-Master. More...
 
int tiSetTriggerHoldoff (int rule, unsigned int value, int timestep)
 Set the value for a specified trigger rule. More...
 
int tiGetTriggerHoldoff (int rule)
 Get the value for a specified trigger rule. More...
 
int tiPrintTriggerHoldoff (int dflag)
 
int tiSetTriggerHoldoffMin (int rule, unsigned int value)
 Set the value for the minimum time of specified trigger rule. More...
 
int tiGetTriggerHoldoffMin (int rule, int pflag)
 Get the value for a specified trigger rule minimum busy. More...
 
int tiDisableDataReadout ()
 Disable the necessity to readout the TI for every block. More...
 
int tiEnableDataReadout ()
 Enable readout the TI for every block. More...
 
void tiResetBlockReadout ()
 Decrement the hardware counter for blocks available, effectively simulating a readout from the data fifo. More...
 
int tiTriggerTableConfig (unsigned int *itable)
 Configure trigger table to be loaded with a user provided array. More...
 
int tiGetTriggerTable (unsigned int *otable)
 Get the current trigger table stored in local memory (not necessarily on TI). More...
 
int tiTriggerTablePredefinedConfig (int mode)
 Configure trigger tabled to be loaded with a predefined trigger table (mapping TS inputs to trigger types). More...
 
int tiDefineEventType (int trigMask, int hwTrig, int evType)
 Define a specific trigger pattern as a hardware trigger (trig1/trig2/syncevent) and Event Type. More...
 
int tiDefinePulserEventType (int fixed_type, int random_type)
 Define the event type for the TI Master's fixed and random internal trigger. More...
 
int tiLoadTriggerTable (int mode)
 Load a predefined trigger table (mapping TS inputs to trigger types). More...
 
void tiPrintTriggerTable (int showbits)
 Print trigger table to standard out. More...
 
int tiSetTriggerWindow (int window_width)
 Set the window of the input trigger coincidence window. More...
 
int tiGetTriggerWindow ()
 Get the window of the input trigger coincidence window. More...
 
int tiSetTriggerInhibitWindow (int window_width)
 Set the width of the input trigger inhibit window. More...
 
int tiGetTriggerInhibitWindow ()
 Get the width of the input trigger inhibit window. More...
 
int tiSetTrig21Delay (int delay)
 Set the delay of Trig1 relative to Trig2 when trigger source is 11. More...
 
int tiGetTrig21Delay ()
 Get the delay of Trig1 relative to Trig2 when trigger source is 11. More...
 
int tiSetTriggerLatchOnLevel (int enable)
 Set the trigger latch pattern readout in the data stream to include the Level of the input trigger OR the transition to Hi. More...
 
int tiGetTriggerLatchOnLevel ()
 Get the trigger latch pattern readout in the data stream to include the Level of the input trigger OR the transition to Hi. More...
 
int tiLatchTimers ()
 Latch the Busy and Live Timers. More...
 
unsigned int tiGetLiveTime ()
 Return the current "live" time of the module. More...
 
unsigned int tiGetBusyTime ()
 Return the current "busy" time of the module. More...
 
int tiLive (int sflag)
 Calculate the live time (percentage) from the live and busy time scalers. More...
 
unsigned int tiGetTSscaler (int input, int latch)
 Get the current counter for the specified TS Input. More...
 
unsigned int tiBlockStatus (int fiber, int pflag)
 Show block Status of specified fiber. More...
 
int tiGetFiberLatencyMeasurement ()
 Return measured fiber length. More...
 
int tiSetUserSyncResetReceive (int enable)
 Enable/Disable operation of User SyncReset. More...
 
int tiGetLastSyncCodes (int pflag)
 Return last SyncCommand received. More...
 
int tiGetSyncHistoryBufferStatus (int pflag)
 Get the status of the SyncCommand History Buffer. More...
 
void tiResetSyncHistory ()
 Reset the SyncCommand history buffer. More...
 
void tiUserSyncReset (int enable, int pflag)
 Control level of the SyncReset signal. More...
 
void tiPrintSyncHistory ()
 Print to standard out the history buffer of Sync Commands received. More...
 
int tiSetSyncEventInterval (int blk_interval)
 Set the value of the syncronization event interval. More...
 
int tiGetSyncEventInterval ()
 Get the SyncEvent Block interval. More...
 
int tiForceSyncEvent ()
 Force a sync event (type = 0). More...
 
int tiSyncResetRequest ()
 Sync Reset Request is sent to TI-Master or TS. More...
 
int tiGetSyncResetRequest ()
 Determine if a TI has requested a Sync Reset. More...
 
int tiEnableSyncResetRequest (unsigned int portMask, int self)
 Configure which ports (and self) to enable response of a SyncReset request. More...
 
int tiSyncResetRequestStatus (int pflag)
 Status of SyncReset Request received bits. More...
 
void tiTriggerReadyReset ()
 Reset the registers that record the triggers enabled status of TI Slaves. More...
 
int tiFillToEndBlock ()
 Generate non-physics triggers until the current block is filled. This feature is useful for "end of run" situations. More...
 
int tiResetMGT ()
 Reset the MGT. More...
 
int tiResetMGTRx ()
 Reset the MGT Rx CDR. More...
 
int tiSetTSInputDelay (int chan, int delay)
 Set the input delay for the specified front panel TSinput (1-6) More...
 
int tiGetTSInputDelay (int chan)
 Get the input delay for the specified front panel TSinput (1-6) More...
 
int tiPrintTSInputDelay ()
 Print Front Panel TSinput Delays to Standard Out. More...
 
unsigned int tiGetGTPBufferLength (int pflag)
 Return value of buffer length from GTP. More...
 
int tiGetConnectedFiberMask ()
 Returns the mask of fiber channels that report a "connected" status from a TI. More...
 
int tiGetTrigSrcEnabledFiberMask ()
 Returns the mask of fiber channels that report a "connected" status from a TI has it's trigger source enabled. More...
 
unsigned int tiGetSWAStatus (int reg)
 Return the value from the SWa fast link register. More...
 
unsigned int tiGetSWBStatus (int reg)
 Return the value from the SWB fast link register. More...
 
int tiGetGeoAddress ()
 Return geographic address as provided from a VME-64X crate. More...
 
int tiIntConnect (unsigned int vector, VOIDFUNCPTR routine, unsigned int arg)
 Connect a user routine to the TI Interrupt or latched trigger, if polling. More...
 
int tiIntDisconnect ()
 Disable interrupts or kill the polling service thread. More...
 
int tiAckConnect (VOIDFUNCPTR routine, unsigned int arg)
 Connect a user routine to be executed instead of the default TI interrupt/trigger latching acknowledge prescription. More...
 
void tiIntAck ()
 Acknowledge an interrupt or latched trigger. This "should" effectively release the "Busy" state of the TI. More...
 
int tiIntEnable (int iflag)
 Enable interrupts or latching triggers (depending on set TI mode) More...
 
void tiIntDisable ()
 Disable interrupts or latching triggers. More...
 
unsigned int tiGetIntCount ()
 Return current readout count. More...
 
unsigned int tiGetAckCount ()
 Return current acknowledge count. More...
 
int tiGetSWBBusy (int pflag)
 Return status of Busy from SWB. More...
 
unsigned int tiGetBusyCounter (int busysrc)
 Return BUSY counter for specified Busy Source. More...
 
int tiPrintBusyCounters ()
 Print the BUSY counters for all busy sources. More...
 
int tiSetTokenTestMode (int mode)
 Turn on Token out test mode. More...
 
int tiSetTokenOutTest (int level)
 Set the level of the token out signal. More...
 
int tiRocEnable (int roc)
 
int tiRocEnableMask (int rocmask)
 
int tiGetRocEnableMask ()
 

Variables

pthread_mutex_t tiMutex = PTHREAD_MUTEX_INITIALIZER
 
volatile struct TI_A24RegStructTIp =NULL
 
volatile unsigned int * TIpd =NULL
 
unsigned long tiA24Offset =0
 
unsigned int tiA32Base =0x08000000
 
unsigned long tiA32Offset =0
 
int tiMaster =1
 
int tiCrateID =0x59
 
int tiBlockLevel =0
 
int tiNextBlockLevel =0
 
unsigned int tiIntCount = 0
 
unsigned int tiAckCount = 0
 
unsigned int tiDaqCount = 0
 
unsigned int tiReadoutMode = 0
 
unsigned int tiTriggerSource = 0
 
unsigned int tiSlaveMask = 0
 
int tiDoAck = 0
 
int tiNeedAck = 0
 
int tiFiberLatencyOffset = 0xbf
 
pthread_attr_t tipollthread_attr
 
pthread_t tipollthread
 
unsigned short PayloadPort [MAX_VME_SLOTS+1]
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

◆ MAX_VME_SLOTS

#define MAX_VME_SLOTS   21 /* This is either 20 or 21 */

◆ TILOCK

#define TILOCK   if(pthread_mutex_lock(&tiMutex)<0) perror("pthread_mutex_lock");

Referenced by tiBReady(), tiBroadcastNextBlockLevel(), tiClockReset(), tiClockResync(), tiDefinePulserEventType(), tiDisableA32(), tiDisableBusError(), tiDisableFiber(), tiDisableRandomTrigger(), tiDisableTriggerSource(), tiDisableTSInput(), tiDisableVXSSignals(), tiEnableBusError(), tiEnableFiber(), tiEnableSyncResetRequest(), tiEnableTriggerSource(), tiEnableTSInput(), tiEnableVXSSignals(), tiFillToEndBlock(), tiForceSyncEvent(), tiGetAckCount(), tiGetAdr32(), tiGetBlockLimit(), tiGetBlockLimitStatus(), tiGetBusyCounter(), tiGetBusyTime(), tiGetClockSource(), tiGetConnectedFiberMask(), tiGetCrateID(), tiGetCurrentBlockLevel(), tiGetEventCounter(), tiGetFirmwareVersion(), tiGetGeoAddress(), tiGetGTPBufferLength(), tiGetInputPrescale(), tiGetInstantBlockLevelChange(), tiGetIntCount(), tiGetLastSyncCodes(), tiGetLiveTime(), tiGetNextBlockLevel(), tiGetPortTrigSrcEnabled(), tiGetPrescale(), tiGetPromptTriggerWidth(), tiGetReadoutEvents(), tiGetRocEnableMask(), tiGetSerialNumber(), tiGetSlaveBlocklevel(), tiGetSWAStatus(), tiGetSWBBusy(), tiGetSWBStatus(), tiGetSyncEventFlag(), tiGetSyncEventInterval(), tiGetSyncEventReceived(), tiGetSyncHistoryBufferStatus(), tiGetSyncResetRequest(), tiGetTrig21Delay(), tiGetTriggerHoldoff(), tiGetTriggerHoldoffMin(), tiGetTriggerInhibitWindow(), tiGetTriggerLatchOnLevel(), tiGetTriggerLock(), tiGetTriggerWindow(), tiGetTrigSrcEnabledFiberMask(), tiGetTSInputDelay(), tiGetTSscaler(), tiIntDisable(), tiIntEnable(), tiLatchTimers(), tiLive(), tiLoadTriggerTable(), tiPrintBusyCounters(), tiPrintSyncHistory(), tiPrintTriggerHoldoff(), tiPrintTSInputDelay(), tiReadBlock(), tiReload(), tiReset(), tiResetBlockReadout(), tiResetEventCounter(), tiResetMGT(), tiResetMGTRx(), tiResetSyncHistory(), tiRocEnable(), tiRocEnableMask(), tiSetAdr32(), tiSetBlockBufferLevel(), tiSetBlockLimit(), tiSetBusySource(), tiSetClockSource(), tiSetCrateID(), tiSetEventFormat(), tiSetFiberDelay(), tiSetFPInputReadout(), tiSetInputPrescale(), tiSetInstantBlockLevelChange(), tiSetOutputPort(), tiSetPrescale(), tiSetPromptTriggerWidth(), tiSetRandomTrigger(), tiSetSyncDelayWidth(), tiSetSyncEventInterval(), tiSetSyncSource(), tiSetTokenOutTest(), tiSetTokenTestMode(), tiSetTrig21Delay(), tiSetTriggerHoldoff(), tiSetTriggerHoldoffMin(), tiSetTriggerInhibitWindow(), tiSetTriggerLatchOnLevel(), tiSetTriggerLock(), tiSetTriggerPulse(), tiSetTriggerWindow(), tiSetTSInputDelay(), tiSetUserSyncResetReceive(), tiSlaveStatus(), tiSoftTrig(), tiStatus(), tiSyncReset(), tiSyncResetRequest(), tiSyncResetRequestStatus(), tiSyncResetResync(), tiTriggerReadyReset(), tiTrigLinkReset(), and tiUserSyncReset().

◆ TIUNLOCK

#define TIUNLOCK   if(pthread_mutex_unlock(&tiMutex)<0) perror("pthread_mutex_unlock");

Referenced by tiBroadcastNextBlockLevel(), tiClockReset(), tiClockResync(), tiDefinePulserEventType(), tiDisableA32(), tiDisableFiber(), tiDisableRandomTrigger(), tiDisableTriggerSource(), tiDisableTSInput(), tiDisableVXSSignals(), tiEnableFiber(), tiEnableSyncResetRequest(), tiEnableTriggerSource(), tiEnableTSInput(), tiEnableVXSSignals(), tiFillToEndBlock(), tiForceSyncEvent(), tiGetAckCount(), tiGetAdr32(), tiGetBlockLimit(), tiGetBlockLimitStatus(), tiGetBusyCounter(), tiGetBusyTime(), tiGetClockSource(), tiGetConnectedFiberMask(), tiGetCrateID(), tiGetCurrentBlockLevel(), tiGetEventCounter(), tiGetFirmwareVersion(), tiGetGeoAddress(), tiGetGTPBufferLength(), tiGetInputPrescale(), tiGetInstantBlockLevelChange(), tiGetIntCount(), tiGetLastSyncCodes(), tiGetLiveTime(), tiGetNextBlockLevel(), tiGetPortTrigSrcEnabled(), tiGetPrescale(), tiGetPromptTriggerWidth(), tiGetRocEnableMask(), tiGetSerialNumber(), tiGetSlaveBlocklevel(), tiGetSWAStatus(), tiGetSWBBusy(), tiGetSWBStatus(), tiGetSyncEventInterval(), tiGetSyncHistoryBufferStatus(), tiGetSyncResetRequest(), tiGetTrig21Delay(), tiGetTriggerHoldoff(), tiGetTriggerHoldoffMin(), tiGetTriggerInhibitWindow(), tiGetTriggerLatchOnLevel(), tiGetTriggerLock(), tiGetTriggerWindow(), tiGetTrigSrcEnabledFiberMask(), tiGetTSInputDelay(), tiGetTSscaler(), tiLatchTimers(), tiLive(), tiPrintBusyCounters(), tiPrintSyncHistory(), tiPrintTriggerHoldoff(), tiPrintTSInputDelay(), tiReload(), tiReset(), tiResetBlockReadout(), tiResetEventCounter(), tiResetMGT(), tiResetMGTRx(), tiResetSyncHistory(), tiRocEnable(), tiRocEnableMask(), tiSetAdr32(), tiSetBlockBufferLevel(), tiSetBlockLimit(), tiSetBusySource(), tiSetClockSource(), tiSetCrateID(), tiSetEventFormat(), tiSetFiberDelay(), tiSetFPInputReadout(), tiSetInputPrescale(), tiSetInstantBlockLevelChange(), tiSetOutputPort(), tiSetPrescale(), tiSetPromptTriggerWidth(), tiSetRandomTrigger(), tiSetSyncDelayWidth(), tiSetSyncEventInterval(), tiSetSyncSource(), tiSetTokenOutTest(), tiSetTokenTestMode(), tiSetTrig21Delay(), tiSetTriggerHoldoff(), tiSetTriggerHoldoffMin(), tiSetTriggerInhibitWindow(), tiSetTriggerLatchOnLevel(), tiSetTriggerLock(), tiSetTriggerPulse(), tiSetTriggerWindow(), tiSetTSInputDelay(), tiSetUserSyncResetReceive(), tiSlaveStatus(), tiSoftTrig(), tiStatus(), tiSyncResetRequestStatus(), tiTriggerReadyReset(), tiTrigLinkReset(), and tiUserSyncReset().

Function Documentation

◆ tiCheckAddresses()

◆ tiCheckTriggerBlock()

int tiCheckTriggerBlock ( volatile unsigned int *  data)

◆ tiDecodeTriggerType()

int tiDecodeTriggerType ( volatile unsigned int *  data,
int  data_len,
int  event 
)

◆ tiGetAdr32()

unsigned int tiGetAdr32 ( )

◆ tiGetRocEnableMask()

int tiGetRocEnableMask ( )

◆ tiPrintTriggerHoldoff()

◆ tiRocEnable()

int tiRocEnable ( int  roc)

◆ tiRocEnableMask()

int tiRocEnableMask ( int  rocmask)

Variable Documentation

◆ PayloadPort

unsigned short PayloadPort[MAX_VME_SLOTS+1]
Initial value:
=
{
0,
0,
17, 15, 13, 11, 9, 7, 5, 3, 1,
0,
0,
2, 4, 6, 8, 10, 12, 14, 16,
18
}

Referenced by tiPayloadPort2VMESlot(), and tiVMESlot2PayloadPort().

◆ tiA24Offset

unsigned long tiA24Offset =0

Referenced by tiSlaveStatus(), and tiStatus().

◆ tiA32Base

unsigned int tiA32Base =0x08000000

Referenced by tiSetAdr32().

◆ tiA32Offset

unsigned long tiA32Offset =0

Referenced by tiSetAdr32(), and tiStatus().

◆ tiAckCount

unsigned int tiAckCount = 0

◆ tiBlockLevel

◆ tiCrateID

int tiCrateID =0x59

◆ tiDaqCount

unsigned int tiDaqCount = 0

◆ tiDoAck

int tiDoAck = 0

◆ tiFiberLatencyOffset

int tiFiberLatencyOffset = 0xbf

◆ tiIntCount

unsigned int tiIntCount = 0

◆ tiMaster

◆ tiMutex

pthread_mutex_t tiMutex = PTHREAD_MUTEX_INITIALIZER

◆ tiNeedAck

int tiNeedAck = 0

◆ tiNextBlockLevel

int tiNextBlockLevel =0

◆ TIp

volatile struct TI_A24RegStruct* TIp =NULL

◆ TIpd

volatile unsigned int* TIpd =NULL

Referenced by tiReadBlock(), tiSetAdr32(), and tiStatus().

◆ tipollthread

pthread_t tipollthread

◆ tipollthread_attr

pthread_attr_t tipollthread_attr

◆ tiReadoutMode

unsigned int tiReadoutMode = 0

◆ tiSlaveMask

unsigned int tiSlaveMask = 0

Referenced by tiAddSlave(), tiSlaveStatus(), and tiStatus().

◆ tiTriggerSource

unsigned int tiTriggerSource = 0