OpenJAUS Software Development Kit  4.3.1
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
openjaus::model::fields::TimeStamp Class Reference

#include <TimeStamp.h>

Inherits openjaus::model::fields::Field, and openjaus::system::Transportable.

Public Member Functions

 TimeStamp ()
 
virtual ~TimeStamp ()
 
uint8_t getDay () const
 Accessor to get the value of day. More...
 
bool setDay (uint8_t day)
 Accessor to set value of day. More...
 
uint8_t getHour () const
 Accessor to get the value of hour. More...
 
bool setHour (uint8_t hour)
 Accessor to set value of hour. More...
 
uint8_t getMinutes () const
 Accessor to get the value of minutes. More...
 
bool setMinutes (uint8_t minutes)
 Accessor to set value of minutes. More...
 
uint8_t getSeconds () const
 Accessor to get the value of seconds. More...
 
bool setSeconds (uint8_t seconds)
 Accessor to set value of seconds. More...
 
uint16_t getMilliseconds () const
 Accessor to get the value of milliseconds. More...
 
bool setMilliseconds (uint16_t milliseconds)
 Accessor to set value of milliseconds. More...
 
std::string toXml (uint8_t level) const
 
void setCurrentTime ()
 Operation setCurrentTime. More...
 
std::string toString (std::string format) const
 
uint32_t toIntegerValue () const
 
void fromIntegerValue (uint32_t intValue)
 Operation fromIntegerValue. More...
 
void copy (TimeStamp &source)
 Operation copy. More...
 
TimeStamp addHours (int32_t hours) const
 
TimeStamp addDays (int32_t days) const
 
TimeStamp addMinutes (int32_t minutes) const
 
TimeStamp addSeconds (int32_t seconds) const
 
TimeStamp addMilliseconds (int32_t milliseconds) const
 
bool setTime (int8_t days, int8_t hours, int8_t minutes, int8_t seconds, int16_t milliseconds)
 Operation setTime. More...
 
virtual int to (system::Buffer *dst)
 Operation to. More...
 
virtual int from (system::Buffer *src)
 Operation from. More...
 
virtual int length ()
 Serializes object to internal transport buffer. More...
 
virtual std::string toString () const
 
struct tm convertToTm () const
 
TimeStamp till (TimeStamp &futureTime) const
 
- Public Member Functions inherited from openjaus::model::fields::Field
 Field ()
 
virtual ~Field ()
 
std::string getName () const
 Accessor to get the value of name. More...
 
bool setName (std::string name)
 Accessor to set value of name. More...
 
- Public Member Functions inherited from openjaus::system::Transportable
virtual ~Transportable ()
 
 Transportable ()
 

Static Public Member Functions

static TimeStamp currentTimeStamp ()
 

Protected Attributes

uint8_t day
 
uint8_t hour
 
uint8_t minutes
 
uint8_t seconds
 
uint16_t milliseconds
 
- Protected Attributes inherited from openjaus::model::fields::Field
std::string name
 

Static Protected Attributes

static const long MILLISECOND_START_BIT = 0
 
static const long MILLISECOND_BIT_MASK = 0x3FF
 
static const long SECOND_START_BIT = 10
 
static const long SECOND_BIT_MASK = 0x3F
 
static const long MINUTE_START_BIT = 16
 
static const long MINUTE_BIT_MASK = 0x3F
 
static const long HOUR_START_BIT = 22
 
static const long HOUR_BIT_MASK = 0x1F
 
static const long DAY_START_BIT = 27
 
static const long DAY_BIT_MASK = 0x1F
 
static const long MILLISECOND_MIN_VALUE = 0
 
static const long MILLISECOND_MAX_VALUE = 999
 
static const long SECOND_MIN_VALUE = 0
 
static const long SECOND_MAX_VALUE = 59
 
static const long MINUTE_MIN_VALUE = 0
 
static const long MINUTE_MAX_VALUE = 59
 
static const long HOUR_MIN_VALUE = 0
 
static const long HOUR_MAX_VALUE = 23
 
static const long DAY_MIN_VALUE = 1
 
static const long DAY_MAX_VALUE = 31
 

Friends

OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const TimeStamp &object)
 
OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const TimeStamp *object)
 

Constructor & Destructor Documentation

§ TimeStamp()

openjaus::model::fields::TimeStamp::TimeStamp ( )

§ ~TimeStamp()

openjaus::model::fields::TimeStamp::~TimeStamp ( )
virtual

Member Function Documentation

§ addDays()

TimeStamp openjaus::model::fields::TimeStamp::addDays ( int32_t  days) const
Parameters
days

§ addHours()

TimeStamp openjaus::model::fields::TimeStamp::addHours ( int32_t  hours) const
Parameters
hours

§ addMilliseconds()

TimeStamp openjaus::model::fields::TimeStamp::addMilliseconds ( int32_t  milliseconds) const
Parameters
milliseconds

§ addMinutes()

TimeStamp openjaus::model::fields::TimeStamp::addMinutes ( int32_t  minutes) const
Parameters
minutes

§ addSeconds()

TimeStamp openjaus::model::fields::TimeStamp::addSeconds ( int32_t  seconds) const
Parameters
seconds

§ convertToTm()

struct tm openjaus::model::fields::TimeStamp::convertToTm ( ) const

§ copy()

void openjaus::model::fields::TimeStamp::copy ( TimeStamp source)
Parameters
source

§ currentTimeStamp()

static TimeStamp openjaus::model::fields::TimeStamp::currentTimeStamp ( )
inlinestatic

§ from()

int openjaus::model::fields::TimeStamp::from ( system::Buffer src)
virtual
Parameters
src

Implements openjaus::system::Transportable.

§ fromIntegerValue()

void openjaus::model::fields::TimeStamp::fromIntegerValue ( uint32_t  intValue)
Parameters
intValue

§ getDay()

uint8_t openjaus::model::fields::TimeStamp::getDay ( ) const

§ getHour()

uint8_t openjaus::model::fields::TimeStamp::getHour ( ) const

§ getMilliseconds()

uint16_t openjaus::model::fields::TimeStamp::getMilliseconds ( ) const

§ getMinutes()

uint8_t openjaus::model::fields::TimeStamp::getMinutes ( ) const

§ getSeconds()

uint8_t openjaus::model::fields::TimeStamp::getSeconds ( ) const

§ length()

int openjaus::model::fields::TimeStamp::length ( )
virtual

§ setCurrentTime()

void openjaus::model::fields::TimeStamp::setCurrentTime ( )

§ setDay()

bool openjaus::model::fields::TimeStamp::setDay ( uint8_t  day)
Parameters
dayThe value of the new day.

§ setHour()

bool openjaus::model::fields::TimeStamp::setHour ( uint8_t  hour)
Parameters
hourThe value of the new hour.

§ setMilliseconds()

bool openjaus::model::fields::TimeStamp::setMilliseconds ( uint16_t  milliseconds)
Parameters
millisecondsThe value of the new milliseconds.

§ setMinutes()

bool openjaus::model::fields::TimeStamp::setMinutes ( uint8_t  minutes)
Parameters
minutesThe value of the new minutes.

§ setSeconds()

bool openjaus::model::fields::TimeStamp::setSeconds ( uint8_t  seconds)
Parameters
secondsThe value of the new seconds.

§ setTime()

bool openjaus::model::fields::TimeStamp::setTime ( int8_t  days,
int8_t  hours,
int8_t  minutes,
int8_t  seconds,
int16_t  milliseconds 
)
Parameters
days
hours
minutes
seconds
milliseconds

§ till()

TimeStamp openjaus::model::fields::TimeStamp::till ( TimeStamp futureTime) const

§ to()

int openjaus::model::fields::TimeStamp::to ( system::Buffer dst)
virtual
Parameters
dst

Implements openjaus::system::Transportable.

§ toIntegerValue()

uint32_t openjaus::model::fields::TimeStamp::toIntegerValue ( ) const

§ toString() [1/2]

std::string openjaus::model::fields::TimeStamp::toString ( std::string  format) const
Parameters
format

§ toString() [2/2]

std::string openjaus::model::fields::TimeStamp::toString ( ) const
virtual

Reimplemented from openjaus::model::fields::Field.

§ toXml()

std::string openjaus::model::fields::TimeStamp::toXml ( uint8_t  level) const
Parameters
level

Friends And Related Function Documentation

§ operator<< [1/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const TimeStamp object 
)
friend

§ operator<< [2/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const TimeStamp object 
)
friend

Member Data Documentation

§ day

uint8_t openjaus::model::fields::TimeStamp::day
protected

§ DAY_BIT_MASK

const long openjaus::model::fields::TimeStamp::DAY_BIT_MASK = 0x1F
staticprotected

§ DAY_MAX_VALUE

const long openjaus::model::fields::TimeStamp::DAY_MAX_VALUE = 31
staticprotected

§ DAY_MIN_VALUE

const long openjaus::model::fields::TimeStamp::DAY_MIN_VALUE = 1
staticprotected

§ DAY_START_BIT

const long openjaus::model::fields::TimeStamp::DAY_START_BIT = 27
staticprotected

§ hour

uint8_t openjaus::model::fields::TimeStamp::hour
protected

§ HOUR_BIT_MASK

const long openjaus::model::fields::TimeStamp::HOUR_BIT_MASK = 0x1F
staticprotected

§ HOUR_MAX_VALUE

const long openjaus::model::fields::TimeStamp::HOUR_MAX_VALUE = 23
staticprotected

§ HOUR_MIN_VALUE

const long openjaus::model::fields::TimeStamp::HOUR_MIN_VALUE = 0
staticprotected

§ HOUR_START_BIT

const long openjaus::model::fields::TimeStamp::HOUR_START_BIT = 22
staticprotected

§ MILLISECOND_BIT_MASK

const long openjaus::model::fields::TimeStamp::MILLISECOND_BIT_MASK = 0x3FF
staticprotected

§ MILLISECOND_MAX_VALUE

const long openjaus::model::fields::TimeStamp::MILLISECOND_MAX_VALUE = 999
staticprotected

§ MILLISECOND_MIN_VALUE

const long openjaus::model::fields::TimeStamp::MILLISECOND_MIN_VALUE = 0
staticprotected

§ MILLISECOND_START_BIT

const long openjaus::model::fields::TimeStamp::MILLISECOND_START_BIT = 0
staticprotected

§ milliseconds

uint16_t openjaus::model::fields::TimeStamp::milliseconds
protected

§ MINUTE_BIT_MASK

const long openjaus::model::fields::TimeStamp::MINUTE_BIT_MASK = 0x3F
staticprotected

§ MINUTE_MAX_VALUE

const long openjaus::model::fields::TimeStamp::MINUTE_MAX_VALUE = 59
staticprotected

§ MINUTE_MIN_VALUE

const long openjaus::model::fields::TimeStamp::MINUTE_MIN_VALUE = 0
staticprotected

§ MINUTE_START_BIT

const long openjaus::model::fields::TimeStamp::MINUTE_START_BIT = 16
staticprotected

§ minutes

uint8_t openjaus::model::fields::TimeStamp::minutes
protected

§ SECOND_BIT_MASK

const long openjaus::model::fields::TimeStamp::SECOND_BIT_MASK = 0x3F
staticprotected

§ SECOND_MAX_VALUE

const long openjaus::model::fields::TimeStamp::SECOND_MAX_VALUE = 59
staticprotected

§ SECOND_MIN_VALUE

const long openjaus::model::fields::TimeStamp::SECOND_MIN_VALUE = 0
staticprotected

§ SECOND_START_BIT

const long openjaus::model::fields::TimeStamp::SECOND_START_BIT = 10
staticprotected

§ seconds

uint8_t openjaus::model::fields::TimeStamp::seconds
protected

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