Public Member Functions | Private Attributes

acsalarm::Timestamp Class Reference

#include <Timestamp.h>

List of all members.

Public Member Functions

 Timestamp ()
 Timestamp (const Timestamp &)
 Timestamp (long secs, long microSecs)
virtual ~Timestamp ()
Timestampoperator= (const Timestamp &rhs)
int operator== (const Timestamp &rhs) const
long getSeconds ()
void setSeconds (long newSecs)
long getMicroSeconds ()
void setMicroSeconds (long newMicroSecs)
std::string toXML (std::string elementName=USER_TIMESTAMP_ELEMENT_NAME, int amountToIndent=6)

Private Attributes

long seconds
long microSeconds

Constructor & Destructor Documentation

acsalarm::Timestamp::Timestamp (  ) 
acsalarm::Timestamp::Timestamp ( const Timestamp  ) 
acsalarm::Timestamp::Timestamp ( long  secs,
long  microSecs 
)
virtual acsalarm::Timestamp::~Timestamp (  )  [virtual]

Member Function Documentation

long acsalarm::Timestamp::getMicroSeconds (  )  [inline]

References microSeconds.

long acsalarm::Timestamp::getSeconds (  )  [inline]

References seconds.

Timestamp& acsalarm::Timestamp::operator= ( const Timestamp rhs  ) 
int acsalarm::Timestamp::operator== ( const Timestamp rhs  )  const
void acsalarm::Timestamp::setMicroSeconds ( long  newMicroSecs  )  [inline]

References microSeconds.

void acsalarm::Timestamp::setSeconds ( long  newSecs  )  [inline]

References seconds.

std::string acsalarm::Timestamp::toXML ( std::string  elementName = USER_TIMESTAMP_ELEMENT_NAME,
int  amountToIndent = 6 
)

Returns an XML fragment (NOT a complete document) representing the timestamp, for use in the message that is transported from alarm source to alarm server.

Parameters:
elementName the element name when generating the XML fragment, for instance in the example below the elementName is "source-timestamp"

For example:

<source-timestamp seconds="1129902763" microseconds="132000"/>

Parameters:
amountToIndent - used to specify a level of indentation (in spaces) for readability

Member Data Documentation

Referenced by getMicroSeconds(), and setMicroSeconds().

Referenced by getSeconds(), and setSeconds().


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