Public Types | Public Member Functions | Protected Attributes

JAUS::ReportAudio Class Reference

This message allows a component to publish audio data. More...

#include <reportaudio.h>

Inheritance diagram for JAUS::ReportAudio:
JAUS::Message

List of all members.

Public Types

enum  Format { Mono8 = 0, Mono16, Stereo8, Stereo16 }
 

Audio data format.

More...

Public Member Functions

 ReportAudio (const Address &dest=Address(), const Address &src=Address())
 Constructor, initializes default values.
 ReportAudio (const ReportAudio &message)
 Copy constructor.
 ~ReportAudio ()
 Destructor.
void SetDeviceID (const Byte id)
void SetFormat (const Format format)
void SetFrequency (const int freq)
void SetTimeStamp (const Time &tstamp)
void SetAudio (const Packet &buffer)
Byte GetDeviceID () const
Format GetFormat () const
int GetFrequency () const
Time GetTimeStamp () const
PacketGetAudio ()
const PacketGetAudio () const
virtual bool IsCommand () const
virtual int WriteMessageBody (Packet &packet) const
 Writes message payload to the packet.
virtual int ReadMessageBody (const Packet &packet)
 Reads message payload from the packet.
virtual MessageClone () const
virtual UInt GetPresenceVector () const
virtual UInt GetPresenceVectorSize () const
virtual UInt GetPresenceVectorMask () const
virtual UShort GetMessageCodeOfResponse () const
virtual std::string GetMessageName () const
virtual void ClearMessageBody ()
 Clears message payload data.
virtual bool IsLargeDataSet (const unsigned int maxPayloadSize) const
 Method to check if data will fit into a standard JAUS message packet or not.
ReportAudiooperator= (const ReportAudio &message)
 Sets equal to.

Protected Attributes

Byte mDeviceID
 Audio ID (number).
Format mFormat
 Audio format.
int mFrequency
 Audio frequency.
Packet mAudio
 Audio data.
Time mTimeStamp
 Time stamp.

Detailed Description

This message allows a component to publish audio data.

Definition at line 54 of file reportaudio.h.


Member Enumeration Documentation

Audio data format.

Enumerator:
Mono8 
Mono16 
Stereo8 
Stereo16 

Definition at line 63 of file reportaudio.h.


Constructor & Destructor Documentation

ReportAudio::ReportAudio ( const Address dest = Address(),
const Address src = Address() 
)

Constructor, initializes default values.

Parameters:
[in]srcSource ID of message sender.
[in]destDestination ID of message.

Definition at line 53 of file reportaudio.cpp.

ReportAudio::ReportAudio ( const ReportAudio message )

Copy constructor.

Definition at line 67 of file reportaudio.cpp.

ReportAudio::~ReportAudio (  )

Destructor.

Definition at line 78 of file reportaudio.cpp.


Member Function Documentation

void ReportAudio::ClearMessageBody (  ) [virtual]

Clears message payload data.

Implements JAUS::Message.

Definition at line 154 of file reportaudio.cpp.

virtual Message* JAUS::ReportAudio::Clone (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 87 of file reportaudio.h.

const Packet* JAUS::ReportAudio::GetAudio (  ) const [inline]

Definition at line 83 of file reportaudio.h.

Packet* JAUS::ReportAudio::GetAudio (  ) [inline]

Definition at line 82 of file reportaudio.h.

Byte JAUS::ReportAudio::GetDeviceID (  ) const [inline]

Definition at line 78 of file reportaudio.h.

Format JAUS::ReportAudio::GetFormat (  ) const [inline]

Definition at line 79 of file reportaudio.h.

int JAUS::ReportAudio::GetFrequency (  ) const [inline]

Definition at line 80 of file reportaudio.h.

virtual UShort JAUS::ReportAudio::GetMessageCodeOfResponse (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 91 of file reportaudio.h.

virtual std::string JAUS::ReportAudio::GetMessageName (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 92 of file reportaudio.h.

virtual UInt JAUS::ReportAudio::GetPresenceVector (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 88 of file reportaudio.h.

virtual UInt JAUS::ReportAudio::GetPresenceVectorMask (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 90 of file reportaudio.h.

virtual UInt JAUS::ReportAudio::GetPresenceVectorSize (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 89 of file reportaudio.h.

Time JAUS::ReportAudio::GetTimeStamp (  ) const [inline]

Definition at line 81 of file reportaudio.h.

virtual bool JAUS::ReportAudio::IsCommand (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 84 of file reportaudio.h.

bool ReportAudio::IsLargeDataSet ( const unsigned int  maxPayloadSize ) const [virtual]

Method to check if data will fit into a standard JAUS message packet or not.

Returns:
True if large data set, false otherwise.

Implements JAUS::Message.

Definition at line 172 of file reportaudio.cpp.

ReportAudio & ReportAudio::operator= ( const ReportAudio message )

Sets equal to.

Definition at line 187 of file reportaudio.cpp.

int ReportAudio::ReadMessageBody ( const Packet packet ) [virtual]

Reads message payload from the packet.

Message contents are read from the packet following the JAUS standard.

Parameters:
[in]packetPacket containing message payload data to read.
Returns:
-1 on error, otherwise number of bytes written.

Implements JAUS::Message.

Definition at line 124 of file reportaudio.cpp.

void JAUS::ReportAudio::SetAudio ( const Packet buffer ) [inline]

Definition at line 77 of file reportaudio.h.

void JAUS::ReportAudio::SetDeviceID ( const Byte  id ) [inline]

Definition at line 73 of file reportaudio.h.

void JAUS::ReportAudio::SetFormat ( const Format  format ) [inline]

Definition at line 74 of file reportaudio.h.

void JAUS::ReportAudio::SetFrequency ( const int  freq ) [inline]

Definition at line 75 of file reportaudio.h.

void JAUS::ReportAudio::SetTimeStamp ( const Time tstamp ) [inline]

Definition at line 76 of file reportaudio.h.

int ReportAudio::WriteMessageBody ( Packet packet ) const [virtual]

Writes message payload to the packet.

Message contents are written to the packet following the JAUS standard.

Parameters:
[out]packetPacket to write payload to.
Returns:
-1 on error, otherwise number of bytes written.

Implements JAUS::Message.

Definition at line 95 of file reportaudio.cpp.


Member Data Documentation

Audio data.

Definition at line 100 of file reportaudio.h.

Audio ID (number).

Definition at line 97 of file reportaudio.h.

Audio format.

Definition at line 98 of file reportaudio.h.

Audio frequency.

Definition at line 99 of file reportaudio.h.

Time stamp.

Definition at line 101 of file reportaudio.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines