cornelluniversity::vetserial::status_response Class Reference

base_command Implements a control command responding to another machine's request for a status check. 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.
 status_response (const status_t s)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Overloaded constructor.
 status_response (const uint8_ *in_packet, uint32_ in_packet_sz)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Overloaded constructor.
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 execute (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.

Detailed Description

base_command 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.

Definition at line 370 of file vetprot.h.


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)

Definition at line 379 of file vetprot.h.

cornelluniversity::vetserial::status_response::status_response ( const status_t  s  ) 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Overloaded constructor.

Creates a new status response command structure. The internal private status member is set to STATUS_READY that you supply.

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 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Overloaded constructor.

Receives an incoming packet, parses it into its appropriate private members,

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


Member Function Documentation

virtual void cornelluniversity::vetserial::status_response::execute ( 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

Definition at line 413 of file vetprot.h.

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

Definition at line 407 of file vetprot.h.


The documentation for this class was generated from the following file:
Generated on Thu Sep 27 11:11:48 2012 for VetSim by  doxygen 1.4.7