cornelluniversity::vetserial::mp3_stop_request Class Reference

Implements a request to to stop the playing of a track that is currently in playback on the remote device. More...

#include <vetprot.h>

Inheritance diagram for cornelluniversity::vetserial::mp3_stop_request:

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

Public Member Functions

 mp3_stop_request (void)
 Default constructor Zeroes out device, track.
 mp3_stop_request (const uint8_ dev, const uint8_ trk)
 Overloaded constructor Accepts values for initializing the device and track numbers.
 mp3_stop_request (const uint8_ *in_pkt, uint32_ nbytes)
 Overloaded constructor Accepts packet and packet size for deserialization purposes.
virtual ~mp3_stop_request (void)
const uint8_ track (void) const
 Track number private member accessor.
void track (const uint8_ track_number)
 Track number private member mutator.
const uint8_ device (void) const
 Device number private member accessor.
void device (const uint8_ device_number)
 Device number private member mutator.
virtual void serialize (void)
 Overridden virtual function. Builds a stop request packet by instantiating a header, adding the payload, and capping it off with a trailer. The full packet is left in buffer for you to access via this->packet().
Exceptions:
std::bad_alloc standard memory allocation failure.

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 request to to stop the playing of a track that is currently in playback on the remote device.

base_command


Constructor & Destructor Documentation

cornelluniversity::vetserial::mp3_stop_request::mp3_stop_request ( void   )  [inline]

Default constructor Zeroes out device, track.

See also:
mp3_stop_request(const uint8_ dev, const uint8_ trk)

cornelluniversity::vetserial::mp3_stop_request::mp3_stop_request ( const uint8_  dev,
const uint8_  trk 
) [inline]

Overloaded constructor Accepts values for initializing the device and track numbers.

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

Todo:
Determine the domain of device IDs (do they start at zero or one)?

Determine the range of acceptble track numbers (255, but starting at zero or one)?

See also:
mp3_stop_request(void)

cornelluniversity::vetserial::mp3_stop_request::mp3_stop_request ( const uint8_ in_pkt,
uint32_  nbytes 
) [inline]

Overloaded constructor Accepts packet and packet size for deserialization purposes.

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

See also:
mp3_play_request(void)

virtual cornelluniversity::vetserial::mp3_stop_request::~mp3_stop_request ( void   )  [inline, virtual]


Member Function Documentation

virtual void cornelluniversity::vetserial::mp3_stop_request::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.

void cornelluniversity::vetserial::mp3_stop_request::device ( const uint8_  device_number  )  [inline]

Device number private member mutator.

Parameters:
device_number - unsigned char based device number to be addressed
Todo:
Once we determine the valid range of device numbers, we should validate

const uint8_ cornelluniversity::vetserial::mp3_stop_request::device ( void   )  const [inline]

Device number private member accessor.

Returns:
unsigned char - device number currently set to be addressed

virtual void cornelluniversity::vetserial::mp3_stop_request::serialize ( void   )  [virtual]

Overridden virtual function. Builds a stop request packet by instantiating a header, adding the payload, and capping it off with a trailer. The full packet is left in buffer for you to access via this->packet().

Exceptions:
std::bad_alloc standard memory allocation failure.

Implements cornelluniversity::vetserial::base_command.

void cornelluniversity::vetserial::mp3_stop_request::track ( const uint8_  track_number  )  [inline]

Track number private member mutator.

Parameters:
track_number - unsigned char based track number to be stopped
Todo:
Once we determine the valid range of track numbers, we should validate

const uint8_ cornelluniversity::vetserial::mp3_stop_request::track ( void   )  const [inline]

Track number private member accessor.

Returns:
unsigned char - track number currently set to be stopped


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