activeHeartbeatTimers
activeHeartbeatTimers — determines if both heartbeat timers are active.
bool activeHeartbeatTimers( | ); |
void;boolean activeHeartbeatTimers( | ); |
void;TRUE if both heartbeat timers are active,
FALSE otherwise.
This method is used to determine if both heartbeat timers were successfully
started. The heartbeat timers are normally started when a connection has been
established (see
startHeartbeatTimers). You may wish to check
that the heartbeat mechanism is active before registering a domain or
points.
void DataGenerator::onConnectionSuccess (LPCTSTR host, int port)
{
_super::onConnectionSuccess (host, port); // starts the
// heartbeat timers
// proceed to start heartbeat and specify domain
int domain_flags = DHC_FLAG_REG_FUTURE|
DHC_FLAG_REG_QUALIFY|
DHC_FLAG_REG_ONCEONLY;
if (activeHeartbeatTimers()) // started the heartbeat timers
{
if (registerDomain (m_DomainName,
(DHC_tRegFlags)domain_flags) == ST_OK)
{
RegisterPoints();
}
}
}