----------------------------------------------------------------------------- Run a series of messages to a single node or every node on the network. -----------------------------------------------------------------------------
| 5923 | // Run a series of messages to a single node or every node on the network. |
| 5924 | //----------------------------------------------------------------------------- |
| 5925 | void Driver::TestNetwork |
| 5926 | ( |
| 5927 | uint8 const _nodeId, |
| 5928 | uint32 const _count |
| 5929 | ) |
| 5930 | { |
| 5931 | LockGuard LG(m_nodeMutex); |
| 5932 | if( _nodeId == 0 ) // send _count messages to every node |
| 5933 | { |
| 5934 | for( int i=0; i<256; ++i ) |
| 5935 | { |
| 5936 | if( i == m_Controller_nodeId ) // ignore sending to ourself |
| 5937 | { |
| 5938 | continue; |
| 5939 | } |
| 5940 | if( m_nodes[i] != NULL ) |
| 5941 | { |
| 5942 | NoOperation *noop = static_cast<NoOperation*>( m_nodes[i]->GetCommandClass( NoOperation::StaticGetCommandClassId() ) ); |
| 5943 | for( int j=0; j < (int)_count; j++ ) |
| 5944 | { |
| 5945 | noop->Set( true ); |
| 5946 | } |
| 5947 | } |
| 5948 | } |
| 5949 | } |
| 5950 | else if( _nodeId != m_Controller_nodeId && m_nodes[_nodeId] != NULL ) |
| 5951 | { |
| 5952 | NoOperation *noop = static_cast<NoOperation*>( m_nodes[_nodeId]->GetCommandClass( NoOperation::StaticGetCommandClassId() ) ); |
| 5953 | for( int i=0; i < (int)_count; i++ ) |
| 5954 | { |
| 5955 | noop->Set( true ); |
| 5956 | } |
| 5957 | } |
| 5958 | } |
| 5959 | |
| 5960 | //----------------------------------------------------------------------------- |
| 5961 | // SwitchAll |
nothing calls this directly
no test coverage detected