Robot Simulator of the Robotics Group for Self-Organization of Control: Speaker Class Reference

# Speaker Class Reference

This "motor" emulates a speaker or piezo element to produce sound. More...

`#include <speaker.h>`

Inherits lpzrobots::Motor.

Collaboration diagram for Speaker:
[legend]

List of all members.

## Public Member Functions
| Speaker (float frequency)
virtual | ~Speaker ()
virtual void | init (Primitive *own)
| initialises motor with body of robot
virtual int | getMotorNumber () const
| return the dimensionality of this motor
virtual bool | act (GlobalData &globaldata)
| performs the actions, This is usually called in doInternalStuff() from the robot
virtual int | set (const motor *values, int length)
| sends the action commands to the motor.

## Detailed Description

This "motor" emulates a speaker or piezo element to produce sound.

The sound can be detected by sound sensors (

See also:
  SoundSensor). Note that obstacles do not interact with the sound in any way.

## Constructor & Destructor Documentation

Speaker | ( | float | frequency | ) | `[inline]`

virtual ~Speaker | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

virtual bool act | ( | GlobalData & | globaldata | ) | `[inline, virtual]`

performs the actions, This is usually called in doInternalStuff() from the robot

Implements Motor.

virtual int getMotorNumber | ( |  | ) | const`[inline, virtual]`

return the dimensionality of this motor

Implements Motor.

virtual void init | ( | Primitive * | own | ) | `[inline, virtual]`

initialises motor with body of robot

Implements Motor.

virtual int set | ( | const motor * | values,
|  | int | length |
| ) |  |  | `[inline, virtual]`

sends the action commands to the motor.

It returns the number of used values. (should be equal to getMotorNumber)

Implements Motor.

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

- speaker.h