MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / Driver

Method Driver

cpp/src/Driver.cpp:145–264  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Constructor -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

143// Constructor
144//-----------------------------------------------------------------------------
145Driver::Driver
146(
147 string const& _controllerPath,
148 ControllerInterface const& _interface
149):
150m_driverThread( new Thread( "driver" ) ),
151m_dns ( new DNSThread(this) ),
152m_dnsThread ( new Thread( "dns" ) ),
153m_initMutex(new Mutex()),
154m_exit( false ),
155m_init( false ),
156m_awakeNodesQueried( false ),
157m_allNodesQueried( false ),
158m_notifytransactions( false ),
159m_timer ( new TimerThread( this ) ),
160m_timerThread ( new Thread( "timer" ) ),
161m_controllerInterfaceType( _interface ),
162m_controllerPath( _controllerPath ),
163m_controller( NULL ),
164m_homeId( 0 ),
165m_libraryVersion( "" ),
166m_libraryTypeName( "" ),
167m_libraryType( 0 ),
168m_manufacturerId( 0 ),
169m_productType( 0 ),
170m_productId ( 0 ),
171m_initVersion( 0 ),
172m_initCaps( 0 ),
173m_controllerCaps( 0 ),
174m_Controller_nodeId ( 0 ),
175m_nodeMutex( new Mutex() ),
176m_controllerReplication( NULL ),
177m_transmitOptions( TRANSMIT_OPTION_ACK | TRANSMIT_OPTION_AUTO_ROUTE | TRANSMIT_OPTION_EXPLORE ),
178m_waitingForAck( false ),
179m_expectedCallbackId( 0 ),
180m_expectedReply( 0 ),
181m_expectedCommandClassId( 0 ),
182m_expectedNodeId( 0 ),
183m_pollThread( new Thread( "poll" ) ),
184m_pollMutex( new Mutex() ),
185m_pollInterval( 0 ),
186m_bIntervalBetweenPolls( false ), // if set to true (via SetPollInterval), the pollInterval will be interspersed between each poll (so a much smaller m_pollInterval like 100, 500, or 1,000 may be appropriate)
187m_currentControllerCommand( NULL ),
188m_SUCNodeId( 0 ),
189m_controllerResetEvent( NULL ),
190m_sendMutex( new Mutex() ),
191m_currentMsg( NULL ),
192m_virtualNeighborsReceived( false ),
193m_notificationsEvent( new Event() ),
194m_SOFCnt( 0 ),
195m_ACKWaiting( 0 ),
196m_readAborts( 0 ),
197m_badChecksum( 0 ),
198m_readCnt( 0 ),
199m_writeCnt( 0 ),
200m_CANCnt( 0 ),
201m_NAKCnt( 0 ),
202m_ACKCnt( 0 ),

Callers

nothing calls this directly

Calls 4

SetSignalThresholdMethod · 0.80
GetOptionAsBoolMethod · 0.80
GetOptionAsIntMethod · 0.80
GetFunction · 0.70

Tested by

no test coverage detected