JLab Pipeline TI Library  1.0
 All Data Structures Files Functions Variables Macros Groups
TI Slave specific

Functions

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...
 
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...
 

Detailed Description

Function Documentation

int tiGetCrateID ( int  port)

Get the crate ID of the selected port.

Parameters
port
  • 0 - Self
  • 1-8 - Fiber port 1-8 (If Master)
Returns
port Crate ID if successful, ERROR otherwise

References TI_A24RegStruct::hfbr_tiID, TI_A24RegStruct::master_tiID, TI_ID_CRATEID_MASK, TILOCK, and TIUNLOCK.

int tiGetPortTrigSrcEnabled ( int  port)

Get the trigger sources enabled bits of the selected port.

Parameters
port
  • 0 - Self
  • 1-8 - Fiber port 1-8 (If Master)
Returns
bitmask of rigger sources enabled if successful, otherwise ERROR bitmask
  • 0 - P0
  • 1 - Fiber 1
  • 2 - Loopback
  • 3 - TRG (FP)
  • 4 - VME
  • 5 - TS Inputs (FP)
  • 6 - TS (rev 2)
  • 7 - Internal Pulser

References TI_A24RegStruct::hfbr_tiID, TI_A24RegStruct::master_tiID, TI_ID_TRIGSRC_ENABLE_MASK, TILOCK, and TIUNLOCK.

int tiGetSlavePort ( )

Returns the port of which the TI Slave has been configured (or will be)

Returns
  • 1 - Port 1
  • 5 - Port 5
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.

Parameters
port
  • 1 - Port 1
  • 5 - Port 5
Returns
OK if successful, ERROR otherwise

References TI_A24RegStruct::reset, TI_RESET_AUTOALIGN_HFBR1_SYNC, TI_RESET_AUTOALIGN_HFBR5_SYNC, TI_RESET_FIBER_AUTO_ALIGN, TI_RESET_IODELAY, TI_RESET_MEASURE_LATENCY, TI_SYNC_HFBR1, TI_SYNC_HFBR5, TI_TRIGGER_HFBR1, TI_TRIGGER_HFBR5, tiEnableFiber(), TILOCK, tiMaster, tiSetClockSource(), tiSetSyncSource(), tiSetTriggerSource(), and TIUNLOCK.