Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
sawyer::DataSystemStatus Class Reference

#include <Message_data.h>

Inheritance diagram for sawyer::DataSystemStatus:
Inheritance graph
[legend]

Public Member Functions

 DataSystemStatus (void *input, size_t msg_len)
 
 DataSystemStatus (const DataSystemStatus &other)
 
double getCurrent (uint8_t index)
 
uint8_t getCurrentsCount ()
 
double getTemperature (uint8_t index)
 
uint8_t getTemperaturesCount ()
 
uint32_t getUptime ()
 
double getVoltage (uint8_t index)
 
uint8_t getVoltagesCount ()
 
virtual std::ostream & printMessage (std::ostream &stream=std::cout)
 
- Public Member Functions inherited from sawyer::Message
uint16_t getChecksum ()
 
uint8_t getFlags ()
 
uint8_t getLength ()
 
uint8_t getLengthComp ()
 
size_t getPayload (void *buf, size_t max_size)
 
size_t getPayloadLength ()
 
size_t getTotalLength ()
 
uint16_t getType ()
 
size_t getType (void *buf, size_t max_size)
 
size_t getTypeLength ()
 
uint8_t getVersion ()
 
bool isCommand ()
 
bool isData ()
 
bool isRequest ()
 
bool isValid (char *whyNot=NULL, size_t strLen=0)
 
 Message ()
 
 Message (void *input, size_t msg_len)
 
 Message (const Message &other)
 
 Message (uint16_t type, uint8_t *payload, size_t payload_len, uint32_t timestamp=0, uint8_t flags=0, uint8_t version=0)
 
void printRaw (std::ostream &stream=std::cout)
 
void send ()
 
MessagesendRequest ()
 
size_t toBytes (void *buf, size_t buf_size)
 
virtual ~Message ()
 

Static Public Member Functions

static enum MessageTypes getTypeID ()
 
static DataSystemStatusgetUpdate (double timeout=0)
 
static DataSystemStatuspopNext ()
 
static void subscribe (uint16_t freq)
 
static DataSystemStatuswaitNext (double timeout=0)
 
- Static Public Member Functions inherited from sawyer::Message
static Messagefactory (void *input, size_t msg_len)
 
static MessagepopNext ()
 
static MessagewaitNext (double timeout=0.0)
 

Private Attributes

uint8_t currents_offset
 
uint8_t temperatures_offset
 
uint8_t voltages_offset
 

Additional Inherited Members

- Public Attributes inherited from sawyer::Message
uint8_t data [MAX_MSG_LENGTH]
 
size_t total_len
 
- Static Public Attributes inherited from sawyer::Message
static const size_t MAX_MSG_LENGTH = 256
 
static const size_t MIN_MSG_LENGTH = HEADER_LENGTH + CRC_LENGTH
 
static const uint8_t SOH = 0xAA
 
static const uint8_t STX = 0x55
 
- Protected Types inherited from sawyer::Message
enum  dataOffsets {
  SOH_OFST = 0, LENGTH_OFST, LENGTH_COMP_OFST, VERSION_OFST,
  FLAGS_OFST = 4, STX_OFST = 5, TYPE_OFST, PAYLOAD_OFST =8
}
 
- Protected Member Functions inherited from sawyer::Message
size_t crcOffset ()
 
uint8_t * getPayloadPointer (size_t offset=0)
 
void makeValid ()
 
void setFlags (uint8_t flags)
 
void setLength (uint8_t len)
 
void setPayload (void *buf, size_t buf_size)
 
void setPayloadLength (uint8_t len)
 
void setType (uint16_t type)
 
void setVersion (uint8_t version)
 
- Protected Attributes inherited from sawyer::Message
bool is_sent
 
- Static Protected Attributes inherited from sawyer::Message
static const uint16_t CRC_INIT_VAL = 0xFFFF
 
static const size_t CRC_LENGTH = 2
 
static const size_t HEADER_LENGTH = 8
 

Detailed Description

Definition at line 1085 of file Message_data.h.

Constructor & Destructor Documentation

sawyer::DataSystemStatus::DataSystemStatus ( void *  input,
size_t  msg_len 
)

Definition at line 1073 of file Message_data.cpp.

sawyer::DataSystemStatus::DataSystemStatus ( const DataSystemStatus other)

Definition at line 1089 of file Message_data.cpp.

Member Function Documentation

double sawyer::DataSystemStatus::getCurrent ( uint8_t  index)

Definition at line 1115 of file Message_data.cpp.

uint8_t sawyer::DataSystemStatus::getCurrentsCount ( )

Definition at line 1110 of file Message_data.cpp.

double sawyer::DataSystemStatus::getTemperature ( uint8_t  index)

Definition at line 1125 of file Message_data.cpp.

uint8_t sawyer::DataSystemStatus::getTemperaturesCount ( )

Definition at line 1120 of file Message_data.cpp.

static enum MessageTypes sawyer::DataSystemStatus::getTypeID ( )
static
static DataSystemStatus* sawyer::DataSystemStatus::getUpdate ( double  timeout = 0)
static
uint32_t sawyer::DataSystemStatus::getUptime ( )

Definition at line 1095 of file Message_data.cpp.

double sawyer::DataSystemStatus::getVoltage ( uint8_t  index)

Definition at line 1105 of file Message_data.cpp.

uint8_t sawyer::DataSystemStatus::getVoltagesCount ( )

Definition at line 1100 of file Message_data.cpp.

static DataSystemStatus* sawyer::DataSystemStatus::popNext ( )
static
ostream & sawyer::DataSystemStatus::printMessage ( std::ostream &  stream = std::cout)
virtual

Reimplemented from sawyer::Message.

Definition at line 1130 of file Message_data.cpp.

static void sawyer::DataSystemStatus::subscribe ( uint16_t  freq)
static
static DataSystemStatus* sawyer::DataSystemStatus::waitNext ( double  timeout = 0)
static

Member Data Documentation

uint8_t sawyer::DataSystemStatus::currents_offset
private

Definition at line 1089 of file Message_data.h.

uint8_t sawyer::DataSystemStatus::temperatures_offset
private

Definition at line 1090 of file Message_data.h.

uint8_t sawyer::DataSystemStatus::voltages_offset
private

Definition at line 1088 of file Message_data.h.


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


roch_base
Author(s): Mike Purvis , Paul Bovbel , Chen
autogenerated on Mon Jun 10 2019 14:41:14