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(); } } }
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.