cornelluniversity::vetserial::status_response Class Reference

Implements a control command responding to another machine's request for a status check. This object can be used to create new responses or to receive responses. More...

#include <vetprot.h>

Inheritance diagram for cornelluniversity::vetserial::status_response:

cornelluniversity::vetserial::base_command List of all members.

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.
Exceptions:
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)


Detailed Description

Implements a control command responding to another machine's request for a status check. This object can be used to create new responses or to receive responses.

base_command


Constructor & Destructor Documentation

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.

See also:
STATUS_TYPE

status_response(const status_t s)

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.

Parameters:
s - STATUS_TYPE defined status flag, indicating the current status of the system.
See also:
STATUS_TYPE

status_response(void)

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.

Parameters:
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)
Exceptions:
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]


Member Function Documentation

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.

Exceptions:
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.

See also:
header(void)

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.

Parameters:
t - a STATUS_TYPE value
See also:
STATUS_TYPE

const status_t cornelluniversity::vetserial::status_response::status ( void   )  const [inline]

Accessor for the private status STATUS_TYPE private member.

Returns:
STATUS_TYPE - the currently configured status
See also:
STATUS_TYPE


The documentation for this class was generated from the following file:
Generated on Wed Nov 14 12:01:02 2012 for VetSim Applications by  doxygen 1.4.7