MOOS 0.2375
Public Member Functions | Protected Attributes
CMOOSVariable Class Reference

#include <MOOSVariable.h>

Collaboration diagram for CMOOSVariable:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CMOOSVariable ()
 CMOOSVariable (std::string sName, std::string sSubscribe, std::string sPublish, double dfCommsTime=DEFAULT_MOOS_VAR_COMMS_TIME)
virtual ~CMOOSVariable ()
std::string GetAsString (int nFieldWidth=12) const
std::string GetWriter () const
double GetAge (double dfTimeNow) const
bool Set (const std::string &sVal, double dfTime)
bool Set (double dfVal, double dfTime)
std::string GetName () const
std::string GetStringVal () const
double GetTime () const
double GetDoubleVal () const
bool IsDouble () const
std::string GetPublishName () const
bool IsFresh () const
bool SetFresh (bool bFresh)
std::string GetSubscribeName () const
bool Set (const CMOOSMsg &Msg)
double GetCommsTime () const

Protected Attributes

double m_dfVal
std::string m_sVal
bool m_bDouble
bool m_bFresh
double m_dfTimeWritten
double m_dfCommsTime
std::string m_sName
std::string m_sSrc
std::string m_sSubscribeName
std::string m_sPublishName

Detailed Description

Definition at line 42 of file MOOSVariable.h.


Constructor & Destructor Documentation

CMOOSVariable::CMOOSVariable ( )

construction destruction

Definition at line 44 of file MOOSVariable.cpp.

CMOOSVariable::CMOOSVariable ( std::string  sName,
std::string  sSubscribe,
std::string  sPublish,
double  dfCommsTime = DEFAULT_MOOS_VAR_COMMS_TIME 
)

Definition at line 54 of file MOOSVariable.cpp.

CMOOSVariable::~CMOOSVariable ( ) [virtual]

Definition at line 67 of file MOOSVariable.cpp.


Member Function Documentation

double CMOOSVariable::GetAge ( double  dfTimeNow) const

get time since write relative to supplied tie

Definition at line 196 of file MOOSVariable.cpp.

std::string CMOOSVariable::GetAsString ( int  nFieldWidth = 12) const

get data rendered as a string

Definition at line 168 of file MOOSVariable.cpp.

double CMOOSVariable::GetCommsTime ( ) const [inline]

get max frequency at which this MOOSvariable could refresh

Definition at line 97 of file MOOSVariable.h.

double CMOOSVariable::GetDoubleVal ( ) const

get numerical contents if applicable

Definition at line 153 of file MOOSVariable.cpp.

std::string CMOOSVariable::GetName ( ) const

get the name of the variable

Definition at line 138 of file MOOSVariable.cpp.

std::string CMOOSVariable::GetPublishName ( ) const

get nae this variable will use if data is published into MOOS community

Definition at line 143 of file MOOSVariable.cpp.

std::string CMOOSVariable::GetStringVal ( ) const

Get string contents if applicable

Definition at line 163 of file MOOSVariable.cpp.

std::string CMOOSVariable::GetSubscribeName ( ) const

get the name of a MOOS comms variable this CMOOSVariable will absorb

Definition at line 128 of file MOOSVariable.cpp.

double CMOOSVariable::GetTime ( ) const

Get Time corresponding to variable was written

Definition at line 158 of file MOOSVariable.cpp.

std::string CMOOSVariable::GetWriter ( ) const

get name of MOOSClient which wrote this data

Definition at line 201 of file MOOSVariable.cpp.

bool CMOOSVariable::IsDouble ( ) const

return true if type is double

Definition at line 148 of file MOOSVariable.cpp.

bool CMOOSVariable::IsFresh ( ) const

returns true if data has been updated (refreshed )

Definition at line 133 of file MOOSVariable.cpp.

bool CMOOSVariable::Set ( const CMOOSMsg Msg)

copy in data from a MOOSMsg

Definition at line 93 of file MOOSVariable.cpp.

bool CMOOSVariable::Set ( double  dfVal,
double  dfTime 
)

get name of MOOSClient which wrote this data

Definition at line 71 of file MOOSVariable.cpp.

bool CMOOSVariable::Set ( const std::string &  sVal,
double  dfTime 
)

get name of MOOSClient which wrote this data

Definition at line 82 of file MOOSVariable.cpp.

bool CMOOSVariable::SetFresh ( bool  bFresh)

set or clear the IsFresh flag

Definition at line 121 of file MOOSVariable.cpp.


Member Data Documentation

Definition at line 107 of file MOOSVariable.h.

Definition at line 108 of file MOOSVariable.h.

double CMOOSVariable::m_dfCommsTime [protected]

Definition at line 110 of file MOOSVariable.h.

double CMOOSVariable::m_dfTimeWritten [protected]

Definition at line 109 of file MOOSVariable.h.

double CMOOSVariable::m_dfVal [protected]

Definition at line 97 of file MOOSVariable.h.

std::string CMOOSVariable::m_sName [protected]

Definition at line 112 of file MOOSVariable.h.

std::string CMOOSVariable::m_sPublishName [protected]

Definition at line 115 of file MOOSVariable.h.

std::string CMOOSVariable::m_sSrc [protected]

Definition at line 113 of file MOOSVariable.h.

std::string CMOOSVariable::m_sSubscribeName [protected]

Definition at line 114 of file MOOSVariable.h.

std::string CMOOSVariable::m_sVal [protected]

Definition at line 106 of file MOOSVariable.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines