enum Errors {
ErrorOk, ErrorMisc, ErrorWarning, ErrorInit, ErrorConfig,
ErrorParam, ErrorNotImplemented,
ErrorComms, ErrorCommsTimeout, ErrorMC,
ErrorFpga, ErrorStateTable, ErrorCycleNumber,
ErrorDataNotAvailable, ErrorDataGone, ErrorDataFuture,
ErrorTimeout
}; /// The System Error List
enum CyclePeriod {
CyclePeriodAll, CyclePeriodCalibration,
CyclePeriodEvent0, CyclePeriodEvent1,
CyclePeriodEvent2, CyclePeriodEvent3,
CyclePeriodEvent4, CyclePeriodEvent5,
CyclePeriodEvent6, CyclePeriodEvent7,
CyclePeriodEvent8, CyclePeriodEvent9
}; /// The Cycle Period
enum DataType {
DataTypeRaw
};
enum DataFunction {
DataFunctionRaw, DataFunctionMean, DataFunctionMeanAll, DataFunctionMean0, DataFunctionMean1
};
enum TestOutput {
TestOutputFrefLocal, TestOutputPllL1, TestOutputPllL2
};
enum Priority {
PriorityLow, PriorityNormal, PriorityHigh
};
/// A simple Name/Value class. This class associates a name with a value.
class NameValue {
String name; ///< The Name of the value
String value; ///< The actual value in string form
};
//
/// This class stores a Physical Pick-Up channel id
class PuChannel {
UInt8 moduleNum; ///< The Module number
UInt8 pupeNum; ///< The PUPE number
UInt8 pupeChan; ///< The PUPE channel
};
//
/// This class stores the status of an individual Pick-Up
class PuStatus {
Bool running; ///< The Pick-Up is currently running.
Error error; ///< The Pick-Up's current error status.
};
//
/// This class describes the configuration of the TMS
class ConfigInfo {
Array<PuChannel> puReferences; ///< The logical to physical Pick-Up table. Each PuReference includes a Module Controller identifier, a Physical Pick-Up number and a Physical Channel.
};
//
/// This class defines the data to be acquired and/or fetched
class DataInfo {
UInt32 cycleNumber; ///< The PS Cycle number
UInt32 channel; ///< The pick-up channel number
UInt32 cyclePeriod; ///< The cycle period the data is from
UInt32 startTime; ///< The start time in milli-seconds in the cycle period (starting from 0)
UInt32 orbitNumber; ///< The starting orbit number (starting from 0)
UInt32 bunchNumber; ///< The Bunch number (starting from 1 (0 is all bunches))
UInt32 function; ///< The data processing function to perform or performed. (0 normal data)
UInt32 argument; ///< The Argument to the data processing function
UInt32 numValues; ///< The total number of data points to return
Bool beyondPeriod; ///< If set allows reads of data beyond the end of the period
};
//
/// This is the definition of a single data value
class DataValue {
Int16 sigma; ///< The Sigma value
Int16 deltaX; ///< The DeltaX value
Int16 deltaY; ///< The DeltaY value
Int16 time; ///< The Time in ms this sample was processed
};
//
/// This class stores the raw data
class Data {
UInt32 numValues; ///< The total number of data samples
UInt32 dataType; ///< The type of data in the data block
UInt32 numBunches; ///< The number of bunches
UInt32 numChannels; ///< The number of channels
Array<DataValue> dataValues; ///< The data
Array<Error> errors; ///< Individual errors for each channel within dataValues
};
//
/// This class defines the Pick-Up state table
class PuStateTable {
UInt32 period; ///< The Cycle period this state is used for
UInt32 state; ///< The State table entry
UInt32 harmonic; ///< The harmonic number for this state
UInt32 numBunches; ///< The number of bunches to capture
UInt32 bunchMask; ///< Bitmask defining which buckets the bunches are captured from. Bit 0 is bucket 1, bit 1 is bucket 2 etc
Array<UInt8> phaseTable; ///< The Phase table for this state
};
//
/// This class defines the parameters for a PS processing cycle
class CycleParam {
String cycleType; ///< The Cycle Type Name of this parameter set, normally the BEAM type the set of parameters is designed to measure