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::DateStamp Class Reference

#include <DateStamp.h>

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

Public Member Functions

 DateStamp ()
 
virtual ~DateStamp ()
 
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 getMonth () const
 Accessor to get the value of month. More...
 
bool setMonth (uint8_t month)
 Accessor to set value of month. More...
 
uint16_t getYear () const
 Accessor to get the value of year. More...
 
bool setYear (uint16_t year)
 Accessor to set value of year. More...
 
std::string toXml (uint8_t level) const
 
void setCurrentDate ()
 Operation setCurrentDate. More...
 
std::string toString (std::string format) const
 
uint16_t toIntegerValue () const
 
void fromIntegerValue (uint16_t intValue)
 Operation fromIntegerValue. More...
 
void copy (DateStamp &source)
 Operation copy. More...
 
bool setDate (int16_t year, int8_t month, int8_t day)
 Operation setDate. More...
 
DateStamp addYears (int32_t years) const
 
DateStamp addMonths (int32_t months) const
 
DateStamp addDays (int32_t days) const
 
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
 
- 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 DateStamp currentDateStamp ()
 

Protected Attributes

uint8_t day
 
uint8_t month
 
uint16_t year
 
- Protected Attributes inherited from openjaus::model::fields::Field
std::string name
 

Static Protected Attributes

static const long DAY_START_BIT = 0
 
static const long DAY_BIT_MASK = 0x1F
 
static const long MONTH_START_BIT = 5
 
static const long MONTH_BIT_MASK = 0xF
 
static const long YEAR_START_BIT = 9
 
static const long YEAR_BIT_MASK = 0x7F
 
static const long DAY_MIN_VALUE = 1
 
static const long DAY_MAX_VALUE = 31
 
static const long MONTH_MIN_VALUE = 1
 
static const long MONTH_MAX_VALUE = 12
 
static const long YEAR_MIN_VALUE = 2000
 
static const long YEAR_MAX_VALUE = 2127
 

Friends

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

Constructor & Destructor Documentation

§ DateStamp()

openjaus::model::fields::DateStamp::DateStamp ( )

§ ~DateStamp()

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

Member Function Documentation

§ addDays()

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

§ addMonths()

DateStamp openjaus::model::fields::DateStamp::addMonths ( int32_t  months) const
Parameters
months

§ addYears()

DateStamp openjaus::model::fields::DateStamp::addYears ( int32_t  years) const
Parameters
years

§ convertToTm()

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

§ copy()

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

§ currentDateStamp()

static DateStamp openjaus::model::fields::DateStamp::currentDateStamp ( )
inlinestatic

§ from()

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

Implements openjaus::system::Transportable.

§ fromIntegerValue()

void openjaus::model::fields::DateStamp::fromIntegerValue ( uint16_t  intValue)
Parameters
intValue

§ getDay()

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

§ getMonth()

uint8_t openjaus::model::fields::DateStamp::getMonth ( ) const

§ getYear()

uint16_t openjaus::model::fields::DateStamp::getYear ( ) const

§ length()

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

§ setCurrentDate()

void openjaus::model::fields::DateStamp::setCurrentDate ( )

§ setDate()

bool openjaus::model::fields::DateStamp::setDate ( int16_t  year,
int8_t  month,
int8_t  day 
)
Parameters
year
month
day

§ setDay()

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

§ setMonth()

bool openjaus::model::fields::DateStamp::setMonth ( uint8_t  month)
Parameters
monthThe value of the new month.

§ setYear()

bool openjaus::model::fields::DateStamp::setYear ( uint16_t  year)
Parameters
yearThe value of the new year.

§ to()

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

Implements openjaus::system::Transportable.

§ toIntegerValue()

uint16_t openjaus::model::fields::DateStamp::toIntegerValue ( ) const

§ toString() [1/2]

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

§ toString() [2/2]

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

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

§ toXml()

std::string openjaus::model::fields::DateStamp::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 DateStamp object 
)
friend

§ operator<< [2/2]

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

Member Data Documentation

§ day

uint8_t openjaus::model::fields::DateStamp::day
protected

§ DAY_BIT_MASK

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

§ DAY_MAX_VALUE

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

§ DAY_MIN_VALUE

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

§ DAY_START_BIT

const long openjaus::model::fields::DateStamp::DAY_START_BIT = 0
staticprotected

§ month

uint8_t openjaus::model::fields::DateStamp::month
protected

§ MONTH_BIT_MASK

const long openjaus::model::fields::DateStamp::MONTH_BIT_MASK = 0xF
staticprotected

§ MONTH_MAX_VALUE

const long openjaus::model::fields::DateStamp::MONTH_MAX_VALUE = 12
staticprotected

§ MONTH_MIN_VALUE

const long openjaus::model::fields::DateStamp::MONTH_MIN_VALUE = 1
staticprotected

§ MONTH_START_BIT

const long openjaus::model::fields::DateStamp::MONTH_START_BIT = 5
staticprotected

§ year

uint16_t openjaus::model::fields::DateStamp::year
protected

§ YEAR_BIT_MASK

const long openjaus::model::fields::DateStamp::YEAR_BIT_MASK = 0x7F
staticprotected

§ YEAR_MAX_VALUE

const long openjaus::model::fields::DateStamp::YEAR_MAX_VALUE = 2127
staticprotected

§ YEAR_MIN_VALUE

const long openjaus::model::fields::DateStamp::YEAR_MIN_VALUE = 2000
staticprotected

§ YEAR_START_BIT

const long openjaus::model::fields::DateStamp::YEAR_START_BIT = 9
staticprotected

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