#include <vetprot.h>
Inheritance diagram for cornelluniversity::vetserial::status_response:
Public Member Functions | ||||||||||
status_response (void) | ||||||||||
Default constructor. Creates a new status response command structure. The internal private status member is set to STATUS_READY as a default value. | ||||||||||
status_response (const status_t s) | ||||||||||
Overloaded constructor. Creates a new status response command structure. The internal private status member is set to STATUS_READY that you supply. | ||||||||||
status_response (const uint8_ *in_packet, uint32_ in_packet_sz) | ||||||||||
Overloaded constructor. Receives an incoming packet, parses it into its appropriate private members,. | ||||||||||
virtual | ~status_response (void) | |||||||||
const status_t | status (void) const | |||||||||
Accessor for the private status STATUS_TYPE private member. | ||||||||||
void | status (const status_t t) | |||||||||
Mutator for the private status STATUS_TYPE private member. | ||||||||||
virtual void | serialize (void) | |||||||||
forces the setting of the packet status byte and then proceeds to generate the header, utilizing the currently values of the private members, and leaves it in the internal buffers waiting for you to grab it. | ||||||||||
virtual void | deserialize (void) | |||||||||
parses apart a received packet into the appropriate private members for use via the typical accessor process.
|
cornelluniversity::vetserial::status_response::status_response | ( | void | ) | [inline] |
Default constructor. Creates a new status response command structure. The internal private status member is set to STATUS_READY as a default value.
cornelluniversity::vetserial::status_response::status_response | ( | const status_t | s | ) |
Overloaded constructor. Creates a new status response command structure. The internal private status member is set to STATUS_READY that you supply.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
s | - STATUS_TYPE defined status flag, indicating the current status of the system. |
cornelluniversity::vetserial::status_response::status_response | ( | const uint8_ * | in_packet, | |
uint32_ | in_packet_sz | |||
) | [inline] |
Overloaded constructor. Receives an incoming packet, parses it into its appropriate private members,.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
in_packet | - pointer to an unsigned char array (the full incoming packet) | |
in_packet_sz | - int size of the char array (number of bytes in the packet) |
cornelluniversity::vetexcept_badchksum | failed checksum validation | |
cornelluniversity::vetexcept | data out-of-bounds | |
std::bad_alloc | standard memory allocation failure |
virtual cornelluniversity::vetserial::status_response::~status_response | ( | void | ) | [inline, virtual] |
virtual void cornelluniversity::vetserial::status_response::deserialize | ( | void | ) | [virtual] |
parses apart a received packet into the appropriate private members for use via the typical accessor process.
cornelluniversity::vetsim_badchksum | if the crc validation fails | |
cornelluniversity::vetsim_exception | if the header size is deemed irregular | |
cornelluniversity::vetsim_exception | if packet_ buffer is empty (null pointer) |
Implements cornelluniversity::vetserial::base_command.
virtual void cornelluniversity::vetserial::status_response::serialize | ( | void | ) | [virtual] |
forces the setting of the packet status byte and then proceeds to generate the header, utilizing the currently values of the private members, and leaves it in the internal buffers waiting for you to grab it.
Implements cornelluniversity::vetserial::base_command.
void cornelluniversity::vetserial::status_response::status | ( | const status_t | t | ) | [inline] |
Mutator for the private status STATUS_TYPE private member.
t | - a STATUS_TYPE value |
const status_t cornelluniversity::vetserial::status_response::status | ( | void | ) | const [inline] |
Accessor for the private status STATUS_TYPE private member.