#include <log_stream_manager.hpp>
| Public Types | |
| typedef LogStreamManager * | LogStreamManagerPtr | 
| Pointer that clients should use. | |
| Public Member Functions | |
| void | logPktSendItem (const NodeId &nodeId, const CommunicationLayer::Types &layer, const Packet &recvPkt) | 
| Log the packet being sent to the appropriate stream. | |
| void | logPktRecvItem (const NodeId &nodeId, const CommunicationLayer::Types &layer, const Packet &recvPkt) | 
| Log the packet being received to the appropriate stream. | |
| void | logStatsItem (const string &statsKeyString, const string &statsValueString) | 
| Log the user-specified string to the appropriate stream. | |
| void | logStatsItem (const NodeId &nodeId, const string &statsKeyString, const string &statsValueString) | 
| Log the user-specified string to the appropriate stream. | |
| void | logUserDefinedItem (const string &userString) | 
| Log the user-specified string to the appropriate stream. | |
| void | logDebugItem (const string &debugString) | 
| Log the debug string to the appropriate stream. | |
| void | setAllStreams (ostreamPtr newStream) | 
| Set all of the streams to point to the given ostream. | |
| void | setPktSendStream (ostreamPtr newStream) | 
| Set the packet send stream to point to the given ostream. | |
| void | setPktRecvStream (ostreamPtr newStream) | 
| Set the packet receive stream to point to the given ostream. | |
| void | setEnergyStream (ostreamPtr newStream) | 
| Set the energy stream to point to the given ostream. | |
| void | setNewSenseEventStream (ostreamPtr newStream) | 
| Set the new sense event stream to point to the given ostream. | |
| void | setSensedEventStream (ostreamPtr newStream) | 
| Set the sensed event stream to point to the given ostream. | |
| void | setStatsStream (ostreamPtr newStream) | 
| Set the stats stream to point to the given ostream. | |
| void | setUserDefinedStream (ostreamPtr newStream) | 
| Set the user defined stream to point to the given ostream. | |
| void | setDebugStream (ostreamPtr newStream) | 
| Set the debug stream to point to the given ostream. | |
| Static Public Member Functions | |
| static LogStreamManagerPtr | instance () | 
| The class uses the Singleton design pattern. | |
| Friends | |
| ostream & | operator<< (ostream &s, const LogEvents &logEvent) | 
Definition at line 25 of file log_stream_manager.hpp.
| LogStreamManagerPtr LogStreamManager::instance | ( | ) |  [inline, static] | 
The class uses the Singleton design pattern.
Definition at line 279 of file log_stream_manager.hpp.
Referenced by RfidReaderMac::beginSlotEvent(), PhysicalLayer::captureSignal(), SignalRecvEvent::execute(), WirelessChannel::getRecvdStrength(), TwoRay::getRecvdStrength(), RfidTagMac::handleRecvdUpperLayerPacket(), RfidReaderMac::handleRecvdUpperLayerPacket(), RfidTagMac::handleRequestPacket(), RfidReaderMac::isEnoughTimeForContentionCycle(), PhysicalLayer::recvFromLayer(), CommunicationLayer::recvFromLayer(), PhysicalLayer::recvPendingSignal(), CommunicationLayer::sendToLayer(), RfidReaderMac::simulationEndHandler(), RfidReaderApp::simulationEndHandler(), and RfidReaderMac::startNextContentionCycle().
| void LogStreamManager::logDebugItem | ( | const string & | debugString | ) | 
Log the debug string to the appropriate stream.
| debugString | the string that should be logged. | 
Definition at line 85 of file log_stream_manager.cpp.
Referenced by RfidReaderMac::beginSlotEvent(), PhysicalLayer::captureSignal(), WirelessChannel::getRecvdStrength(), TwoRay::getRecvdStrength(), RfidTagMac::handleRecvdUpperLayerPacket(), RfidReaderMac::handleRecvdUpperLayerPacket(), RfidTagMac::handleRequestPacket(), RfidReaderMac::isEnoughTimeForContentionCycle(), PhysicalLayer::recvFromLayer(), and RfidReaderMac::startNextContentionCycle().
| void LogStreamManager::logPktRecvItem | ( | const NodeId & | nodeId, | |
| const CommunicationLayer::Types & | layer, | |||
| const Packet & | recvPkt | |||
| ) | 
Log the packet being received to the appropriate stream.
| nodeId | the ID of the node logging the event. | |
| layer | the layer that should be logged. | |
| recvPkt | the packet that should be logged. | 
Definition at line 43 of file log_stream_manager.cpp.
Referenced by PhysicalLayer::recvPendingSignal().
| void LogStreamManager::logPktSendItem | ( | const NodeId & | nodeId, | |
| const CommunicationLayer::Types & | layer, | |||
| const Packet & | recvPkt | |||
| ) | 
Log the packet being sent to the appropriate stream.
| nodeId | the ID of the node logging the event. | |
| layer | the layer that should be logged. | |
| recvPkt | the packet that should be logged. | 
Definition at line 32 of file log_stream_manager.cpp.
Referenced by SignalRecvEvent::execute(), and CommunicationLayer::sendToLayer().
| void LogStreamManager::logStatsItem | ( | const NodeId & | nodeId, | |
| const string & | statsKeyString, | |||
| const string & | statsValueString | |||
| ) | 
Log the user-specified string to the appropriate stream.
Each stat will be logged in the stream as: -statsKeyString statsValueString
| nodeId | the ID of the node logging the event. | |
| statsKeyString | a string representing the key for the stat being logged. | |
| statsValueString | a string representing the value for the stat being logged. | 
Definition at line 65 of file log_stream_manager.cpp.
| void LogStreamManager::logStatsItem | ( | const string & | statsKeyString, | |
| const string & | statsValueString | |||
| ) | 
Log the user-specified string to the appropriate stream.
This function is for a global stat rather than a node-specifc stat. Each stat will be logged in the stream as: -statsKeyString statsValueString
| statsKeyString | a string representing the key for the stat being logged. | |
| statsValueString | a string representing the value for the stat being logged. | 
Definition at line 54 of file log_stream_manager.cpp.
Referenced by RfidReaderMac::simulationEndHandler(), and RfidReaderApp::simulationEndHandler().
| void LogStreamManager::logUserDefinedItem | ( | const string & | userString | ) | 
Log the user-specified string to the appropriate stream.
| userString | the string that should be logged. | 
Definition at line 76 of file log_stream_manager.cpp.
| void LogStreamManager::setAllStreams | ( | ostreamPtr | newStream | ) |  [inline] | 
Set all of the streams to point to the given ostream.
| newStream | the ostream to which all streams will point. | 
Definition at line 288 of file log_stream_manager.hpp.
References setDebugStream(), setEnergyStream(), setNewSenseEventStream(), setPktRecvStream(), setPktSendStream(), setSensedEventStream(), setStatsStream(), and setUserDefinedStream().
| void LogStreamManager::setDebugStream | ( | ostreamPtr | newStream | ) |  [inline] | 
Set the debug stream to point to the given ostream.
| newStream | the ostream to which the debug stream will point. | 
Definition at line 344 of file log_stream_manager.hpp.
Referenced by setAllStreams().
| void LogStreamManager::setEnergyStream | ( | ostreamPtr | newStream | ) |  [inline] | 
Set the energy stream to point to the given ostream.
| newStream | the ostream to which the energy stream will point. | 
Definition at line 314 of file log_stream_manager.hpp.
Referenced by setAllStreams().
| void LogStreamManager::setNewSenseEventStream | ( | ostreamPtr | newStream | ) |  [inline] | 
Set the new sense event stream to point to the given ostream.
| newStream | the ostream to which the new sense event stream will point. | 
Definition at line 320 of file log_stream_manager.hpp.
Referenced by setAllStreams().
| void LogStreamManager::setPktRecvStream | ( | ostreamPtr | newStream | ) |  [inline] | 
Set the packet receive stream to point to the given ostream.
| newStream | the ostream to which the packet receive stream will point. | 
Definition at line 308 of file log_stream_manager.hpp.
Referenced by setAllStreams().
| void LogStreamManager::setPktSendStream | ( | ostreamPtr | newStream | ) |  [inline] | 
Set the packet send stream to point to the given ostream.
| newStream | the ostream to which the packet send stream will point. | 
Definition at line 302 of file log_stream_manager.hpp.
Referenced by setAllStreams().
| void LogStreamManager::setSensedEventStream | ( | ostreamPtr | newStream | ) |  [inline] | 
Set the sensed event stream to point to the given ostream.
| newStream | the ostream to which the sensed event stream will point. | 
Definition at line 326 of file log_stream_manager.hpp.
Referenced by setAllStreams().
| void LogStreamManager::setStatsStream | ( | ostreamPtr | newStream | ) |  [inline] | 
Set the stats stream to point to the given ostream.
| newStream | the ostream to which the stats stream will point. | 
Definition at line 332 of file log_stream_manager.hpp.
Referenced by setAllStreams().
| void LogStreamManager::setUserDefinedStream | ( | ostreamPtr | newStream | ) |  [inline] | 
Set the user defined stream to point to the given ostream.
| newStream | the ostream to which the user defined stream will point. | 
Definition at line 338 of file log_stream_manager.hpp.
Referenced by setAllStreams().
 1.4.7
 1.4.7