36 ASSERT( mLogFile.is_open() );
37 ASSERT( aPacket != NULL );
43 SYSTEMTIME currentSystemTime;
44 FILETIME currentFileTime, startFileTime;
45 ULARGE_INTEGER currentTimeUlarge, startTimeUlarge;
46 GetLocalTime( ¤tSystemTime );
47 SystemTimeToFileTime( ¤tSystemTime, ¤tFileTime );
50 currentTimeUlarge.HighPart = currentFileTime.dwHighDateTime;
51 currentTimeUlarge.LowPart = currentFileTime.dwLowDateTime;
52 startTimeUlarge.HighPart = startFileTime.dwHighDateTime;
53 startTimeUlarge.LowPart = startFileTime.dwLowDateTime;
58 elapsedMs = ( currentTimeUlarge.QuadPart - startTimeUlarge.QuadPart ) / 10000;
67 mLogFile << elapsedMs <<
'-' << std::hex;
68 for(
uint32 i = 0; i < frameSize; i++ )
70 mLogFile << std::setw( 2 ) << frame[i];
72 mLogFile << std::endl << std::dec;
static void clearLog()
Empties the packet log.
static const char * LOG_FILE
The log file that this Logger writes to.
static SYSTEMTIME mLogStartTime
Time when the packet log was started/cleared; used to compute offsets.
virtual const uint8 * getRawBytes()=0
Get pointer to the raw frame.
Abstract base class for a packet of data.
static std::wofstream mLogFile
File stream that the packet log is written to.
virtual uint32 getRawSize()=0
Get the size of the raw frame.
unsigned char uint8
8-bit unsigned integer
static void logRawData(Packet *aPacket, bool aIsTx=true)
Logs the raw data of the packet passed in to a file.
static void closeLog()
Close the log file.
static bool isLogOpen()
Returns true if the log file is open.
unsigned long int uint32
32-bit unsigned integer
#define max_uint_val(_t)
The maximum unsigned integer that can be stored in a type.
static void post(EventId aEventId, uint32 aEventData=0, void *aEventDataPtr=NULL, BOOL handleNow=FALSE)
Posts a message to all windows that have registered to get events.