RSS Git Download  Clone
Raw Blame History
/**
\file TmsC.h
\brief	This file contains the TmsAPi class definitions.
	
\namespace Tms

\class Tms::PuControl

\fn BError Tms::PuControl::getVersion(BString& version)
\param version	A string variable filled in with the version number string.



\class Tms::TmsControl

\fn BError Tms::TmsControl::getVersion(BString& version)
\param version	A string variable filled in with the version number string.

\fn BError Tms::TmsControl::setProcessPriority(UInt32 priority)
\param priority	This is the priority of the process. It can be set to one of: PriorityLow, PriorityNormal, PriorityHigh.

\fn BError Tms::TmsControl::init()
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.

\fn BError Tms::TmsControl::configure(ConfigInfo configInfo)
\param configInfo	The channel mapping table.

This function configures the logical to physical channel mapping table.

\fn BError Tms::TmsControl::getConfiguration(ConfigInfo& configInfo)
\param 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.

\fn BError Tms::TmsControl::setControlInfo(CycleParam params)
\param params	Cycle information parameters (state/phase table information).

This function over-writes or adds an entry in the Cycle Information database.

\fn BError Tms::TmsControl::getControlInfo(BString cycleType, UInt32 puChannel, CycleParam& params)
\param cycleType	This string defines the cycle type for which to get the information.
\param puChannel	This defines the channel to get the information for. 0 means all channels.
\param params		The resuting cycle parameters are placed in this object.


\fn BError Tms::TmsControl::delControlInfo(BString cycleType, UInt32 puChannel)
\param cycleType	This string defines the cycle type to delete from the database.
\param puChannel	This defines the specific channel to delete the information for. 0 means all channels.


\fn BError Tms::TmsControl::getControlList(BList<CycleParamItem>& itemList)
\param itemList		The list of CycleType information is returned.


\fn BError Tms::TmsControl::setNextCycle(UInt32 cycleNumber, BString cycleType)
\param cycleNumber	This is the next cycle number. This should be an incrementing 32bit unsigned value.
\param 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 is 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.

\fn BError Tms::TmsControl::test(BList<BError>& errors)
\param errors	The list of errors is placed in this list object.


\fn BError Tms::TmsControl::getStatus(BList<NameValue>& statusList)
\param statusList	The list of status items is placed in this list object.

\fn BError Tms::TmsControl::getStatistics(BList<NameValue>& statsList)
\param statsList	The statistics list is placed in this list object.

\fn BError Tms::TmsControl::getPuChannel(UInt32 puChannel, PuChannel& puPhysChannel)
\param puChannel	The logical channel number.
\param puPhysChannel	The physical channel identifier is returned in this variable.

\fn BError Tms::TmsControl::setTestMode(PuChannel puPhysChannel, UInt32 testOutput, UInt32 timingDisableMask)
\param puPhysChannel	The physical channel identifier.
\param testOutput	The signal to output on the test output. 0 is FREF any other value is undefined at the moment.
\param timingDisableMask	This 8 bit mask defines which of the timing input signals are disabled.

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

\fn BError Tms::TmsControl::setTimingSignals(PuChannel puPhysChannel, UInt32 timingSignals)
\param puPhysChannel	The physical channel identifier.
\param timingSignals	The 8 bit mask defining the state of the software driven timing signals.

The setTestMode() function is used to "enable" particular timing signals to be driven by software.
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

\fn BError Tms::TmsControl::captureTestData(PuChannel puPhysChannel, TestCaptureInfo captureInfo, BArray<UInt64>& data)
\param puPhysChannel	The physical channel identifier.
\param captureInfo	The specification of the diagnostics trigger and data to capture.
\param data		The darw 64bit data array is stored in this array.

\fn BError Tms::TmsControl::setTestData(PuChannel puPhysChannel, Int32 on, BArray<UInt32> data)
\param puPhysChannel	The physical channel identifier.
\param on		Boolean to enable the internal data source. 0 is off, 1 is on.
\param data		The array of 32bit data values to use as the FREF,Sigma,DeltaX and DeltaY test signal.

\fn BError Tms::TmsControl::setPupeConfig(PuChannel puPhysChannel, PupeConfig pupeConfig)
\param puPhysChannel	The physical channel identifier.
\param 	pupeConfig	The configuration parameters to use.

\fn BError Tms::TmsControl::getPupeConfig(PuChannel puPhysChannel, PupeConfig& pupeConfig)
\param puPhysChannel	The physical channel identifier.
\param 	pupeConfig	The returned configuration parameters.

\fn BError Tms::TmsControl::puServerStarted(UInt32 number)
\param 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 and PUPE engines on receipt of this call.


\class Tms::TmsProcess

\fn Tms::TmsProcess::TmsProcess(BString name = "")
\param name	The name of the TmsProcess BOAP object to connect to.

The BOAP object name has the general form: "//HostName/ObjectName"

\fn BError Tms::TmsProcess::getVersion(BString& version)
\param version	A string variable filled in with the version number string.


\fn BError Tms::TmsProcess::getCycleInfo(UInt32& cycleNumber, BString& cycleType)
\param cycleNumber	The current cycle number is returned here	
\param cycleType	The current cycle type is returned here.


\fn BError Tms::TmsProcess::getData(DataInfo dataInfo, Data& data)
\param dataInfo	Information on the type of data required.
\param data	The raw data is returned in this object.


\fn BError Tms::TmsProcess::addEventServer(BString name)
\param name	The BOAP object name to add.

Adds an event server that gets called on certain TmsServer events such
as CYCLE_START, CYCLE_STOP and errors.


\fn BError Tms::TmsProcess::requestData(DataInfo dataInfo)
\param dataInfo	Information on the type of data required.


*/