#include <Robots/LoBot/control/LoSpeedArbiter.H>
Public Member Functions | |
Vote (float speed=0, int pwm=0) | |
float | speed () const |
Retrieving the specified speed. | |
int | pwm () const |
Retrieving the specified PWM. |
To control the robot's speed, each speed related behaviour must vote for the maximum acceptable speed. These votes are represented by this inner class. In order to vote, a behaviour must instantiate this class with the new operator, fill out the voting structure properly and then pass it to the arbiter's vote() method.
Definition at line 97 of file LoSpeedArbiter.H.
lobot::SpeedArbiter::Vote::Vote | ( | float | speed = 0 , |
|
int | pwm = 0 | |||
) |
Filling out a speed arbiter vote object simply involves passing the desired speed to the constructor.
Definition at line 93 of file LoSpeedArbiter.C.
int lobot::SpeedArbiter::Vote::pwm | ( | ) | const [inline] |
Retrieving the specified PWM.
Definition at line 119 of file LoSpeedArbiter.H.
float lobot::SpeedArbiter::Vote::speed | ( | ) | const [inline] |
Retrieving the specified speed.
Definition at line 116 of file LoSpeedArbiter.H.