#include <c++/Lamp.H>
Public Types | |
| enum | Port { A, B, C } |
| The RCX output pad to which the Lamp is connected. More... | |
Public Member Functions | |
| Lamp (enum Port port) | |
| construct a lamp connected to {port} | |
| ~Lamp () | |
| destroy our lamp instance | |
| const void | on () const |
| Turn the Lamp on. | |
| const void | off () const |
| Turn the Lamp off. | |
| const void | brightness (const unsigned char level) const |
| Set the power to the lamp. | |
Private Member Functions | |
| const void | speed (const unsigned char speed) const |
| const void | direction (const MotorDirection dir) const |
Private Attributes | |
| void(* | ms )(unsigned char speed) |
| void(* | md )(const MotorDirection dir) |
Define a lamp connection to the RCX so we can turn the lamp on(), off() or set its brightness().
Definition at line 39 of file Lamp.H.
| enum Lamp::Port |
| Lamp::Lamp | ( | enum Port | port | ) | [inline] |
| Lamp::~Lamp | ( | ) | [inline] |
| const void Lamp::on | ( | ) | const [inline] |
Turn the Lamp on.
Definition at line 71 of file Lamp.H.
References direction(), and fwd.
| const void Lamp::off | ( | ) | const [inline] |
Turn the Lamp off.
Definition at line 76 of file Lamp.H.
References direction().
Referenced by ~Lamp().
| const void Lamp::brightness | ( | const unsigned char | level | ) | const [inline] |
| const void Lamp::speed | ( | const unsigned char | speed | ) | const [inline, private] |
| const void Lamp::direction | ( | const MotorDirection | dir | ) | const [inline, private] |
void(* Lamp::ms)(unsigned char speed) [private] |
void(* Lamp::md)(const MotorDirection dir) [private] |
|
brickOS is released under the
Mozilla Public License.
Original code copyright 1998-2005 by the authors. |
1.5.4