Tms::TmsControl Class Reference

This interface provides functions to control, test and get statistics from the TMS as a whole. More...

#include <TmsC.h>

Inheritance diagram for Tms::TmsControl:

BoapClientObject BSocket BSocket List of all members.

Public Member Functions

 TmsControl (BString name="")
BError getVersion (BString &version)
 Gets the software version.
BError setProcessPriority (UInt32 priority)
 Sets the priority of the process servicing this service.
BError init ()
 Initialises the system including resetting all of the PUPE engines firmware. The call will return an error object indicating success or an error condition as appropriate.
BError configure (ConfigInfo configInfo)
 Configure the system for use. This includes mapping the individual physical PickUp channels to logical pickup channels.
BError getConfiguration (ConfigInfo &configInfo)
 Get the current configuration.
BError setControlInfo (CycleParam params)
 Sets the control information for the cycle type given. The parameters for the processing cycle are passed, this includes the Phase and State table information. The call will return an error object indicating success or an error.
BError getControlInfo (BString cycleType, UInt32 puChannel, CycleParam &params)
 Gets the control information for the cycle type and puChannel number given. The call will return an error object indicating success or an error.
BError delControlInfo (BString cycleType, UInt32 puChannel)
 Deletes the control information for the cycle type and puChannel number given. The call will return an error object indicating success or an error.
BError getControlList (BList< CycleParamItem > &itemList)
 Gets the list of Cycle Parameters present in the system.
BError setNextCycle (UInt32 cycleNumber, BString cycleType)
 Sets the cycle number and type for the next processing cycle. The call will return an error object indicating success or an error condition as appropriate. This should be called at least 10ms before the next CYCLE_START event.
BError test (BList< BError > &errors)
 Performs a basic test of the system returning a list of errors. The call will return an error object indicating success or an error condition as appropriate.
BError getStatus (BList< NameValue > &statusList)
 Returns the current status of the system. This information includes the number of Pick­Up present and their individual status.
BError getStatistics (BList< NameValue > &statsList)
 Returns a list of the statistic values as name/value pairs. The call will return an error object indicating success or an error condition as appropriate.
BError getPuChannel (UInt32 puChannel, PuChannel &puPhysChannel)
 Returns the physical module/Pupe/Channel number given a logical PickUp id. This can be used so that the individual PickUps test functions can be accessed etc.
BError setTestMode (PuChannel puPhysChannel, UInt32 testOutput, UInt32 timingDisableMask)
 The signal source for the digital test output connector. 0: None, 1: FrefLocal. The timingDisableMask bit mask defines which of the timing inputs should be disabled. If a timing input is disabled it can be still operated by software command.
BError setTimingSignals (PuChannel puPhysChannel, UInt32 timingSignals)
 This function sets the given timing signals to the values as defined in the timingSignals bit array.
BError captureTestData (PuChannel puPhysChannel, TestCaptureInfo captureInfo, BArray< UInt64 > &data)
 This function will capture test data.
BError setTestData (PuChannel puPhysChannel, Int32 on, BArray< UInt32 > data)
 This function will set a PU channel to sample data from memory rather than the ADC's.
BError setPupeConfig (PuChannel puPhysChannel, PupeConfig pupeConfig)
 Sets special PUPE configuration for test purposes.
BError getPupeConfig (PuChannel puPhysChannel, PupeConfig &pupeConfig)
 Gets special PUPE configuration for test purposes.
BError puServerStarted (UInt32 number)
 A TmsPuServer has started.

Detailed Description

This interface provides functions to control, test and get statistics from the TMS as a whole.


Constructor & Destructor Documentation

Tms::TmsControl::TmsControl ( BString  name = ""  ) 


Member Function Documentation

BError Tms::TmsControl::getVersion ( BString version  ) 

Gets the software version.

Parameters:
version A string variable filled in with the version number string.

BError Tms::TmsControl::setProcessPriority ( UInt32  priority  ) 

Sets the priority of the process servicing this service.

Parameters:
priority This is the priority of the process. It can be set to one of: PriorityLow, PriorityNormal, PriorityHigh.

BError Tms::TmsControl::init (  ) 

Initialises the system including resetting all of the PUPE engines firmware. The call will return an error object indicating success or an error condition as appropriate.

This function restarts the TMS system. It re-initialises each of the TmsPuServer processes running on the Module Controllers and reboots each of the PUPE boards from scratch loading the current FPGA firmware. All errors and statistics values are reset.

BError Tms::TmsControl::configure ( ConfigInfo  configInfo  ) 

Configure the system for use. This includes mapping the individual physical PickUp channels to logical pickup channels.

Parameters:
configInfo The channel mapping table.
This function configures the logical to physical channel mapping table.

BError Tms::TmsControl::getConfiguration ( ConfigInfo configInfo  ) 

Get the current configuration.

Parameters:
configInfo The channel mapping table that is filled in with the current curent channel mapping.
This function reads the current logical to physical channel mapping table.

BError Tms::TmsControl::setControlInfo ( CycleParam  params  ) 

Sets the control information for the cycle type given. The parameters for the processing cycle are passed, this includes the Phase and State table information. The call will return an error object indicating success or an error.

Parameters:
params Cycle information parameters (state/phase table information).
This function over-writes or adds an entry in the Cycle Parameter database. The Cycle Parameters define the setting for each processing cycle including the state and phase tables for the PUPE FPGA engines.

BError Tms::TmsControl::getControlInfo ( BString  cycleType,
UInt32  puChannel,
CycleParam params 
)

Gets the control information for the cycle type and puChannel number given. The call will return an error object indicating success or an error.

Parameters:
cycleType This string defines the cycle type for which to get the information.
puChannel This defines the channel to get the information for. 0 means all channels.
params The resuting cycle parameters are placed in this object.
This function reads back the set of Cycle parameters for the given cycle type and channel number. Normall the same cycle parameters are used for all PUPE engines. In this case setting the puChannel to 0 reads the Cycle Parameters that are being used on all channels. If a specific channel has other parameters the puChannel variable can be set to the appropriate channel number to get its particular settings.

BError Tms::TmsControl::delControlInfo ( BString  cycleType,
UInt32  puChannel 
)

Deletes the control information for the cycle type and puChannel number given. The call will return an error object indicating success or an error.

Parameters:
cycleType This string defines the cycle type to delete from the database.
puChannel This defines the specific channel to delete the information for. 0 means all channels.
This function will delete a set of Cycle parameters from the TMS's Cycle parameter database.

BError Tms::TmsControl::getControlList ( BList< CycleParamItem > &  itemList  ) 

Gets the list of Cycle Parameters present in the system.

Parameters:
itemList The list of CycleType information is returned.
This function will return a list of entries describing the Cycle Paramter sets present in the TMS database.

BError Tms::TmsControl::setNextCycle ( UInt32  cycleNumber,
BString  cycleType 
)

Sets the cycle number and type for the next processing cycle. The call will return an error object indicating success or an error condition as appropriate. This should be called at least 10ms before the next CYCLE_START event.

Parameters:
cycleNumber This is the next cycle number. This should be an incrementing 32bit unsigned value.
cycleType This is a string defining the cycle type for the next cycle.
This call configures the TMS system for the next processing cycle. It defines the cycle number that will be used to tag data captured during the cycle and it defines the type of machine cycle. The cycleType is used to lookup the appropriate state/phase table information to use in the FPGA's. The call should be made at least 10ms before the CYCLE_START event for the cycle it refers to. This gives time for the FPGA's to be loaded with the appropriate state/phase table information. As the function is time critical, the communications channel should be set to a high priority using the setPriority() call and the processing threads priority should be set to high using the setProcessPriority() call. The call will return the error: "ErrorCycleNumber", "The next cycle has already started" if the call has not completed before the CYCLE_START event. All client data reads, for this cycle, will also return this error message.

BError Tms::TmsControl::test ( BList< BError > &  errors  ) 

Performs a basic test of the system returning a list of errors. The call will return an error object indicating success or an error condition as appropriate.

Parameters:
errors The list of errors is placed in this list object.
This function will perform a test of the TMS system. It will report each test performed and the status of the test in the BError object. A status value of 0 indicates all was Ok, any other value is an error where the number indicates the error. A string gives the test name and the Ok or error condition as a string.

BError Tms::TmsControl::getStatus ( BList< NameValue > &  statusList  ) 

Returns the current status of the system. This information includes the number of Pick­Up present and their individual status.

Parameters:
statusList The list of status items is placed in this list object.
This function gets the status of the TMS system. It returns a list of name/value pairs.

BError Tms::TmsControl::getStatistics ( BList< NameValue > &  statsList  ) 

Returns a list of the statistic values as name/value pairs. The call will return an error object indicating success or an error condition as appropriate.

Parameters:
statsList The statistics list is placed in this list object.
This function gets the statistics values from the TMS system. It returns a list of name/value pairs.

BError Tms::TmsControl::getPuChannel ( UInt32  puChannel,
PuChannel puPhysChannel 
)

Returns the physical module/Pupe/Channel number given a logical PickUp id. This can be used so that the individual PickUps test functions can be accessed etc.

Parameters:
puChannel The logical channel number.
puPhysChannel The physical channel identifier is returned in this variable.
This function is given a logical pick-up channel number. It will return the physical module, pupe number and pupe channle that has been allocated to this channel.

BError Tms::TmsControl::setTestMode ( PuChannel  puPhysChannel,
UInt32  testOutput,
UInt32  timingDisableMask 
)

The signal source for the digital test output connector. 0: None, 1: FrefLocal. The timingDisableMask bit mask defines which of the timing inputs should be disabled. If a timing input is disabled it can be still operated by software command.

Parameters:
puPhysChannel The physical channel identifier.
testOutput The signal to output on the test output. 0 is FREF any other value is undefined at the moment.
timingDisableMask This 8 bit mask defines which of the timing input signals are disabled.
This function sets up a particular pick-up channel's digital test output source and allows the channels input timing signals to be set to a software driven mode rather than taken from the hardware timing inputs. The timing mask bits are: 7 - FREF, 6 - HCHANGE, 5 - INJECTION, 4 - CAL_STOP, 3 - CAL_START, 2 - CYCLE_STOP, 1 - CYCLE_START, 0 - SYSCLOCK

BError Tms::TmsControl::setTimingSignals ( PuChannel  puPhysChannel,
UInt32  timingSignals 
)

This function sets the given timing signals to the values as defined in the timingSignals bit array.

Parameters:
puPhysChannel The physical channel identifier.
timingSignals The 8 bit mask defining the state of the software driven timing signals.
If the setTestMode() function had been used to "enable" particular timing signals to be driven by software, then this function can be used to set/reset particular timing signals for the pick-up channel given. The timing signals bits are: 7 - FREF, 6 - HCHANGE, 5 - INJECTION, 4 - CAL_STOP, 3 - CAL_START, 2 - CYCLE_STOP, 1 - CYCLE_START, 0 - SYSCLOCK

BError Tms::TmsControl::captureTestData ( PuChannel  puPhysChannel,
TestCaptureInfo  captureInfo,
BArray< UInt64 > &  data 
)

This function will capture test data.

Parameters:
puPhysChannel The physical channel identifier.
captureInfo The specification of the diagnostics trigger and data to capture.
data The diagnostics 64bit data array is stored in this array.
This function is for diagnostics purposes. It is used to capture internal signals from the PUPE FPGA processing system. The captureInfo parameter defines the signals to be captured, the clock rate and the trigger to start capture as well as the start time before the trigger become active and the delay, in clock cycle, after trigger that the data capture starts. The call will block until the trigger condition is matched and the resulting data is returned. The call will timeout after 10seconds returning the error, "ErrorTimeout". In the current system 4096 data samples will be returned.

BError Tms::TmsControl::setTestData ( PuChannel  puPhysChannel,
Int32  on,
BArray< UInt32 data 
)

This function will set a PU channel to sample data from memory rather than the ADC's.

Parameters:
puPhysChannel The physical channel identifier.
on Boolean to enable the internal data source. 0 is off, 1 is on.
data The array of 32bit data values to use as the FREF,Sigma,DeltaX and DeltaY test signal.
This call loads the PUPE systems test data SDRAM with the data passed in the data array. It then sets up the individual channel to sources its FREF, Sigma, DeltaX and DelatY signals from the test SDRAM. The data source should have a multiple of 2 samples. The "on" parameter is used to enable or disable the individual channels inputs from this test data SDRAM.

BError Tms::TmsControl::setPupeConfig ( PuChannel  puPhysChannel,
PupeConfig  pupeConfig 
)

Sets special PUPE configuration for test purposes.

Parameters:
puPhysChannel The physical channel identifier.
pupeConfig The configuration parameters to use.
This functions sets up some special configuration parameters for the PUPE channel. It is used mainly for diagnostics and test purposes. The main settings it can affect are: The ADC Clock sources PLL synchronisation, internal timing for the digtital timing signals and the enabling/dissabling of the BLR algorithem.

BError Tms::TmsControl::getPupeConfig ( PuChannel  puPhysChannel,
PupeConfig pupeConfig 
)

Gets special PUPE configuration for test purposes.

Parameters:
puPhysChannel The physical channel identifier.
pupeConfig The returned configuration parameters.
This function returns the current configuration of the given channel.

BError Tms::TmsControl::puServerStarted ( UInt32  number  ) 

A TmsPuServer has started.

Parameters:
number The number of the PuServer started.
This is an internal function called by the TmsPuServer processes to indicate to the TmsServer that they have just started running and are present in the system. The TmsServer will initialise the appropriate tmsPuServer program and its individual PUPE engines on receipt of this call.


The documentation for this class was generated from the following files:
Generated on Tue Oct 9 16:16:02 2007 for LibTmsApi by  doxygen 1.5.1