Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# SoundDataSender Class Reference

This class implements a sender for sound data. More...

`#include <SoundDataSender.h>`

Inheritance diagram for SoundDataSender:

[legend]
Collaboration diagram for SoundDataSender:

[legend]
List of all members.

## Public Member Functions
| SoundDataSender (PlatformProcess *process, bool blocking)
| The constructor.
| ~SoundDataSender ()
| Destructor.
## Protected Member Functions
virtual void | preparePackage ()
| The function prepares a package.
virtual void | setPackage (const ObserverID &receiver)
| The functions sets a package for a receiver.
virtual void | freePackage ()
| The function frees the package.
## Private Member Functions
void | prepare (int i)
| The function fills a package with data.
## Private Attributes
MemoryRegionID | memID [2]
| The memory regions of the two package instances.
OSoundVectorData * | soundVec [2]
| Pointers to the data in the packages.
RCRegion * | package [2]
| The two instances of the packages.
int | index
| The index of the next package.

## Detailed Description

This class implements a sender for sound data.

Definition at line 19 of file SoundDataSender.h.

## Constructor & Destructor Documentation

SoundDataSender::SoundDataSender | ( | PlatformProcess * | process,
|  | bool | blocking
| ) |

  | The constructor. Parameters:
  process | The process this sender is associated with.
  blocking | Decides whether this sender blocks the execution of the next frame until all connected receivers have requested a new package.
Definition at line 8 of file SoundDataSender.cpp. References SystemCall::getRobotDesign(), soundVec, and VERIFY.

Here is the call graph for this function:

SoundDataSender::~SoundDataSender | ( |  | ) |

| Destructor. Definition at line 31 of file SoundDataSender.cpp. References VERIFY.

## Member Function Documentation

void SoundDataSender::prepare | ( | int | i | ) | `[private]`

  | The function fills a package with data. Parameters:
  i | The index of the package (0 or 1).
Definition at line 37 of file SoundDataSender.cpp. References SoundData::pcmBuffer, and soundVec. Referenced by preparePackage().

void SoundDataSender::preparePackage | ( |  | ) | `[protected, virtual]`

| The function prepares a package. Reimplemented from SenderBase< SoundData >. Definition at line 47 of file SoundDataSender.cpp. References prepare(), soundVec, and VERIFY.

Here is the call graph for this function:

void SoundDataSender::setPackage | ( | const ObserverID & | receiver | ) | `[protected, virtual]`

  | The functions sets a package for a receiver. Parameters:
  receiver | The receive the package will be sent to.
Reimplemented from SenderBase< SoundData >. Definition at line 65 of file SoundDataSender.cpp. References VERIFY.

void SoundDataSender::freePackage | ( |  | ) | `[protected, virtual]`

| The function frees the package. Todo: packages are not freed Reimplemented from SenderBase< SoundData >. Definition at line 77 of file SoundDataSender.cpp.

## Member Data Documentation

MemoryRegionID SoundDataSender::memID[2]`[private]`

| The memory regions of the two package instances. Definition at line 22 of file SoundDataSender.h.

OSoundVectorData* SoundDataSender::soundVec[2]`[private]`

| Pointers to the data in the packages. Definition at line 23 of file SoundDataSender.h. Referenced by prepare(), preparePackage(), and SoundDataSender().

RCRegion* SoundDataSender::package[2]`[private]`

| The two instances of the packages. Definition at line 24 of file SoundDataSender.h.

int SoundDataSender::index`[private]`

| The index of the next package. Definition at line 25 of file SoundDataSender.h.

The documentation for this class was generated from the following files:

- Platform/Aperios1.3.2/SoundDataSender.h
- Platform/Aperios1.3.2/SoundDataSender.cpp