MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
3 - Inspecting Logger State

Loggers send heartbeats periodically.

They send total state interactions by request. They contain the overall state of the Logger. This information is maintained in a list of remote connection records. Entries for these records can be inspected. The entries are updated when heartbeats are received or the Loggers can be polled using a request state interaction (DtRemoteControlSystemInterface::requestStateUpdate()). As mentioned in 2 - Connecting to Loggers, you can register callbacks for the interactions. Alternatively, the system interface receivedTotalState() method can be overridden to process the list of connections when all of them have been updated by a total state interaction. The following code is from the lgrControl application.

virtual void receivedTotalState()
{
DtEntityIdSet connectedLoggers;
myInterface->getConnectionIds( connectedLoggers );
if (connectedLoggers.size() == 0)
{
DtInfo << "No Loggers Connected.\n";
}
else
{
DtInfo << "Connected Loggers\n";
DtEntityIdSet::const_iterator idIter = connectedLoggers.begin();
DtEntityIdSet::const_iterator lgrEnd = connectedLoggers.end();
for ( ; idIter != lgrEnd; ++idIter)
{
DtRemoteLoggerConnection* connection =
myInterface->getConnection(*idIter);
if (connection)
{
connection->printDataToStream(DtInfo);
}
}
DtInfo << std::endl;
}
}

[<< Connecting to Loggers] [Home] [Top of Page] [Sending Commands Using the Remote Control Interface >>]


Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)