MAK Data Logger API Documentation for HLA
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
MAKLogger::DtLgrFileOutput Class Reference

Class responsible for message Output to a file. More...

+ Inheritance diagram for MAKLogger::DtLgrFileOutput:
+ Collaboration diagram for MAKLogger::DtLgrFileOutput:

Public Member Functions

virtual ~DtLgrFileOutput ()
 DTOR.
virtual void setDuration (const DtRelativeTime &relTime)=0
 Set the duration of the output.
virtual void setWriteBufferSize (size_t)=0
 Set the write buffer size suggestion.
virtual size_t getWriteBufferSize () const =0
 Get the write buffer size.
virtual bool outputPacket (const DtPacket &buffer)
 Output a packet.
virtual void filterMessage (DtPacket *packet)
 Filter the message, no-op.
virtual const DtStringfilename () const =0
 Get the current file name.
virtual DtFilePosition fileSize () const =0
 Get the current file size of the output.
virtual DtFilePosition currentPosition () const =0
 Get the current position in the file.
virtual int lastMessageType () const
 Get the type of the last message outputted.
virtual size_t lastMessageSize () const
 Get the size of the last message outputted.
virtual DtAbsoluteTime lastMessageTime () const
 Get the time of the last message outputted.
virtual DtAbsoluteTime firstMessageTime () const
 Get the time of the first message outputted.
- Public Member Functions inherited from MAKLogger::DtMessageOutput
 DtMessageOutput ()
 CTOR.
virtual ~DtMessageOutput ()
 DTOR.
virtual void activate (const DtMessageInput *fileInput)=0
 Activate the output.
virtual bool isActivated () const =0
 Get if the output has been activated.
virtual void deactivate ()=0
 Deactivate the output.
virtual bool sourceTimeInclusive () const
 Get the whether input time was inclusive.
virtual void outputMessages (const DtMessageBuffer &buffer)
 Apply filter flags to message buffer.
virtual void outputMessage (const DtPacket *packet)
 Output a single message.
virtual void filterMessages (DtMessageBuffer &buffer)
 Apply filter flags to message buffer.
virtual void filterMessageAllowingCheckpoints (DtPacket *packet)
 Apply filter to a packet, allowing checkpoints.
virtual const DtMessageIOInfoinfo () const =0
 Return the output's ioinfo.
virtual void flush ()=0
 Flush output, called after all outputs are finish for a time step.
virtual void setOutputScaling (double scaling, bool enableStatic)=0
 Set an output scaling value and static indicator.
virtual void setSendImmediate (bool enable)
 Turn on and off sending immediate messages.
virtual void setSendRetained (bool enable)
 Turn on and off sending retained messages.
void attachFilter (DtMessageFilter *)
 Attach a filter to the output.
void detachFilter (DtMessageFilter *)
 Detach a filter from the output.
void filters (DtCollector< DtMessageFilter * > filterCollection) const
 Return the filters associated with the output.
DtObserveEvent< DtPacket > * preOutputPacketEvent ()
 Get the event signaled before a packet is output.
DtObserveEvent< DtPacket > * postOutputPacketEvent ()
 Get the event signaled after a packet is output.
DtObserveEvent< DtPacket > * packetFilteredEvent ()
 Get the event signaled if a packet is filtered.
virtual void setSourceTime (const DtAbsoluteTime &sourceTime, bool inclusive)
 Set/Get the time boundary used to collect the the source to be processed for output.
virtual DtAbsoluteTime sourceTime () const
 Set/Get the time boundary used to collect the the source to be processed for output.

Protected Member Functions

 DtLgrFileOutput ()
 Intentionally protected constructor.
virtual bool writePacket (const DtPacket &packet)=0
 Write a packet to the output.

Protected Attributes

DtAbsoluteTime myFirstTime
DtAbsoluteTime myLastTime
int myLastPacketType
size_t myLastPacketSize
- Protected Attributes inherited from MAKLogger::DtMessageOutput
std::set< DtMessageFilter * > myFilters
DtObserveEvent< DtPacketmyPreOutputPacketEvent
 Event called before a packet is output.
DtObserveEvent< DtPacketmyPostOutputPacketEvent
 Event called after a packet is output.
DtObserveEvent< DtPacketmyFilteredPacketEvent
 Event called if a packet is filtered.
bool mySendImmediateFlag
 Whether to send immediate messages.
bool mySendRetainedFlag
 Whether to send retained messages.
DtAbsoluteTime mySourceTime
 The time used for collecting input.
bool mySourceTimeBoundary
 Whether the input time was inclusive or exclusive.

Detailed Description

Class responsible for message Output to a file.

Constructor & Destructor Documentation

MAKLogger::DtLgrFileOutput::DtLgrFileOutput ( )
protected

Intentionally protected constructor.

virtual MAKLogger::DtLgrFileOutput::~DtLgrFileOutput ( )
virtual

DTOR.

Member Function Documentation

virtual DtFilePosition MAKLogger::DtLgrFileOutput::currentPosition ( ) const
pure virtual

Get the current position in the file.

Implemented in MAKLogger::DtLoggerFileWriter.

virtual const DtString& MAKLogger::DtLgrFileOutput::filename ( ) const
pure virtual

Get the current file name.

Implemented in MAKLogger::DtLoggerFileWriter.

virtual DtFilePosition MAKLogger::DtLgrFileOutput::fileSize ( ) const
pure virtual

Get the current file size of the output.

Implemented in MAKLogger::DtLoggerFileWriter.

virtual void MAKLogger::DtLgrFileOutput::filterMessage ( DtPacket packet)
virtual

Filter the message, no-op.

Implements MAKLogger::DtMessageOutput.

virtual DtAbsoluteTime MAKLogger::DtLgrFileOutput::firstMessageTime ( ) const
virtual

Get the time of the first message outputted.

If no packets are outputted 0.0 is returned.

virtual size_t MAKLogger::DtLgrFileOutput::getWriteBufferSize ( ) const
pure virtual

Get the write buffer size.

Implemented in MAKLogger::DtLoggerFileWriter.

virtual size_t MAKLogger::DtLgrFileOutput::lastMessageSize ( ) const
virtual

Get the size of the last message outputted.

If no packets are outputted 0 is returned.

virtual DtAbsoluteTime MAKLogger::DtLgrFileOutput::lastMessageTime ( ) const
virtual

Get the time of the last message outputted.

If no packets are outputted 0.0 is returned.

virtual int MAKLogger::DtLgrFileOutput::lastMessageType ( ) const
virtual

Get the type of the last message outputted.

If no packets are outputted Type_None is returned.

virtual bool MAKLogger::DtLgrFileOutput::outputPacket ( const DtPacket buffer)
virtual

Output a packet.

Implements MAKLogger::DtMessageOutput.

virtual void MAKLogger::DtLgrFileOutput::setDuration ( const DtRelativeTime relTime)
pure virtual

Set the duration of the output.

Implemented in MAKLogger::DtLoggerFileWriter.

virtual void MAKLogger::DtLgrFileOutput::setWriteBufferSize ( size_t  )
pure virtual

Set the write buffer size suggestion.

Implemented in MAKLogger::DtLoggerFileWriter.

virtual bool MAKLogger::DtLgrFileOutput::writePacket ( const DtPacket packet)
protectedpure virtual

Write a packet to the output.

This is the method to implement the actual writing.

Implemented in MAKLogger::DtLoggerFileWriter.

Member Data Documentation

DtAbsoluteTime MAKLogger::DtLgrFileOutput::myFirstTime
protected
size_t MAKLogger::DtLgrFileOutput::myLastPacketSize
protected
int MAKLogger::DtLgrFileOutput::myLastPacketType
protected
DtAbsoluteTime MAKLogger::DtLgrFileOutput::myLastTime
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Sun Dec 15 18:04:30 EST 2013 from SVN revision 134418
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)