Account
LibTmsApi 2.3.0 |
This interface provides functions to capture data from the TMS as a whole. More...
#include <TmsC.h>
Public Member Functions | |
TmsProcess (BString name="") | |
BError | getVersion (BString &version) |
Gets the software version. | |
BError | getCycleInfo (BUInt32 &cycleNumber, BString &cycleType) |
Gets the current cycle number and type. | |
BError | getCycleInformation (BUInt32 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. | |
Public Member Functions inherited from BoapClientObject | |
BoapClientObject (BString name="") | |
virtual | ~BoapClientObject () |
BError | connectService (BString name) |
Connects to the named service. | |
BError | disconnectService () |
Disconnects from the named service. | |
BString | getServiceName () |
Get the name of the service. | |
BError | ping (BUInt32 &apiVersion) |
Pings the connection and finds the remotes version number. | |
BError | setConnectionPriority (BoapPriority priority) |
Sets the connection priority. | |
void | setMaxLength (BUInt32 maxLength) |
Sets the maximum packet length. | |
void | setTimeout (int timeout) |
Sets the timeout in micro seconds. -1 is wait indefinitely. | |
BoapClientObject (BString name) | |
BError | connectService (BString name) |
Public Member Functions inherited from BSocket | |
BSocket () | |
BSocket (int fd) | |
BSocket (NType type) | |
BSocket (int domain, int type, int protocol) | |
~BSocket () | |
BError | init (int domain, int type, int protocol) |
BError | init (NType type) |
void | setFd (int fd) |
int | getFd () |
BError | bind (const BSocketAddress &add) |
BError | connect (const BSocketAddress &add) |
BError | shutdown (int how) |
BError | close () |
BError | listen (int backlog=5) |
BError | accept (int &fd) |
BError | accept (int &fd, BSocketAddress &address) |
BError | send (const void *buf, BSize nbytes, BSize &nbytesSent, int flags=0) |
BError | sendTo (const BSocketAddress &address, const void *buf, BSize nbytes, BSize &nbytesSent, int flags=0) |
BError | recv (void *buf, BSize maxbytes, BSize &nbytesRecv, int flags=0) |
BError | recvFrom (BSocketAddress &address, void *buf, BSize maxbytes, BSize &nbytesRecv, int flags=0) |
BError | recvWithTimeout (void *buf, BSize maxbytes, BSize &nbytesRecv, int timeout, int flags=0) |
BError | recvFromWithTimeout (BSocketAddress &address, void *buf, BSize maxbytes, BSize &nbytesRecv, int timeout, int flags=0) |
BError | setSockOpt (int level, int optname, void *optval, unsigned int optlen) |
BError | getSockOpt (int level, int optname, void *optval, unsigned int *optlen) |
BError | setReuseAddress (int on) |
BError | setBroadCast (int on) |
BError | setPriority (Priority priority) |
BError | getMTU (uint32_t &mtu) |
BError | getAddress (BSocketAddress &address) |
Detailed Description
This interface provides functions to capture data from the TMS as a whole.
Constructor & Destructor Documentation
◆ TmsProcess()
Tms::TmsProcess::TmsProcess | ( | BString | name = "" | ) |
- Parameters
-
name The name of the TmsProcess BOAP object to connect to.
The BOAP object name has the general form: "//HostName/ObjectName"
Member Function Documentation
◆ addEventServer()
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.
- Parameters
-
name The BOAP object name to add.
Adds an event server that gets called on certain TmsServer events such as data ready, CYCLE_START, CYCLE_STOP and errors.
◆ getCycleInfo()
Gets the current cycle number and type.
- Parameters
-
cycleNumber The current cycle number is returned here
cycleType The current cycle type is returned here.
This function returns the current TMS cycle number being processed and the type of the cycle.
◆ getCycleInformation()
BError Tms::TmsProcess::getCycleInformation | ( | BUInt32 | cycleNumber, |
CycleInformation & | cycleInformation | ||
) |
Gets information on given cycle number.
- Parameters
-
cycleNumber The current cycle number to get information on cycleInformation The returned cycle information
This function provides information on the given cycle. It interrogates the first PUPE channel and returns the Cycle information based on the internal state of that channel. The main information returned includes the cycle type and a list of all of the Cycle Periods captured and the times and ammount of data in each.
◆ getCycleTypeInformation()
BError Tms::TmsProcess::getCycleTypeInformation | ( | BString | cycleType, |
CycleTypeInformation & | cycleTypeInformation | ||
) |
Gets information on given cycle Type.
◆ getData()
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.
- Parameters
-
dataInfo Information on the type of data required. data The raw data is returned in this object.
This is the main user function used by clients of the TMS system. It is used to return portions of the acquired data. The fields of the dataInfo parameter define which data is required and are defined in the DataInfo class documentation.
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.
◆ getVersion()
Gets the software version.
- Parameters
-
version A string variable filled in with the version number string.
◆ requestData()
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.
- Parameters
-
dataInfo Information on the type of data required.
This calls sets up a request for data. The dataInfo parameter works in the same manner as the "getData" call, defining the portion of data required. This call will return immediatly. Assuming the client has informed the TMS system of an event server object using the "addEventServer" call, then the client will receive the "dataEvent" event when the data become available. The client can then fetch the data using the conventional "getData" call. In the current version of the software the "requestData" call simply sends a message when the data for the requested cycle is ready. In future implementations the TMS system could actually fetch the data automatically from the PUPE boards and store it in memory ready for later retrieval by the getData call.
The documentation for this class was generated from the following files:
Generated by 1.9.7