#include <TmsC.h>
Public Member Functions | |
TmsProcess (BString name="") | |
BError | getVersion (BString &version) |
Gets the software version. | |
BError | getCycleInfo (UInt32 &cycleNumber, BString &cycleType) |
Gets the current cycle number and type. | |
BError | getCycleInformation (UInt32 cycleNumber, CycleInformation &cycleInformation) |
Gets information on given cycle number. | |
BError | getCycleTypeInformation (BString cycleType, CycleTypeInformation &cycleTypeInformation) |
Gets information on given cycle Type. | |
BError | getData (DataInfo dataInfo, Data &data) |
This function returns a set of data from the data present in the data cache or directly from the Pick-Up processing engines. The DataInfo object describes the data required. The call will return the required data along with an error object indicating success or an error condition as appropriate. The call will block until data is ready. | |
BError | addEventServer (BString name) |
This call adds an event server to call on events such as the "dataEvent" generated by the requestData(0 call as well as error events. The Client will use this to notify the TmsServer of its local TmsEvent object. | |
BError | requestData (DataInfo dataInfo) |
This adds a request for some data. The DataInfo object defines the data required. This request can be made at any time. If the data is present in cache the data will be available immediately, if not the system will await the data from a subsequent processing cycle. When the data is available a "data" event will be sent to the client. Not that it is not necessary to use requestData. The client can call getData() directly although this call will block until the data is actually ready. |
Tms::TmsProcess::TmsProcess | ( | BString | name = "" |
) |
name | The name of the TmsProcess BOAP object to connect to. |
Gets the software version.
version | A string variable filled in with the version number string. |
Gets the current cycle number and type.
cycleNumber | The current cycle number is returned here | |
cycleType | The current cycle type is returned here. |
BError Tms::TmsProcess::getCycleInformation | ( | UInt32 | cycleNumber, | |
CycleInformation & | cycleInformation | |||
) |
Gets information on given cycle number.
cycleNumber | The current cycle number to get information on | |
cycleInformation | The returned cycle information |
BError Tms::TmsProcess::getCycleTypeInformation | ( | BString | cycleType, | |
CycleTypeInformation & | cycleTypeInformation | |||
) |
Gets information on given cycle Type.
This function returns a set of data from the data present in the data cache or directly from the Pick-Up processing engines. The DataInfo object describes the data required. The call will return the required data along with an error object indicating success or an error condition as appropriate. The call will block until data is ready.
dataInfo | Information on the type of data required. | |
data | The raw data is returned in this object. |
The call will check to see if the data for the cycle number requested is still present in the PUPE memory. The PUPE memory has enough storage for about 3 seconds worth of data (3 processing cycles). If the data has gone the call will return the error "ErrorDataGone". If the system has not processed the requested cycle, but will do so within 256 seconds, the call will block awaiting the data.
If the channel number is given as 0 the call will interrogate each of the Pick-Up channels and return the combined data from all of them. Note that this could take significant time and may not be possible if the parameter numValues is large. Within the Data structure returned there is an array of error values, one per channel. If an error occurs on any set of the channels the call will return the first error that occurred and the complete list of errors in the errors array. The actual data will be returned for all channels that did not have an error. Those channels that had anb error will have data values of 0 returned.
If the bunch number is given as 0, then the system will return the data for all of the bunches.
The data will be returned in the following order, where B - Bunch, C - Channel:
[C1.B1, C1.B2, C1.B3, C1.B4], [C1.B1, C1.B2, C1.B3, C1.B4], ... [C2.B1, C2.B2, C2.B3, C2.B4], [C2.B1, C2.B2, C2.B3, C2.B4], ...
That is the data is ordered by bunch, then sample, then channel. See the TMS Software documentation manual for more details of this functions operation.
This call adds an event server to call on events such as the "dataEvent" generated by the requestData(0 call as well as error events. The Client will use this to notify the TmsServer of its local TmsEvent object.
name | The BOAP object name to add. |
This adds a request for some data. The DataInfo object defines the data required. This request can be made at any time. If the data is present in cache the data will be available immediately, if not the system will await the data from a subsequent processing cycle. When the data is available a "data" event will be sent to the client. Not that it is not necessary to use requestData. The client can call getData() directly although this call will block until the data is actually ready.
dataInfo | Information on the type of data required. |