#include <c++/Lamp.H>
Collaboration diagram for Lamp:
Public Types | |
enum | Port { A, B, C } |
The RCX output pad to which the Lamp is connected. More... | |
Public Methods | |
Lamp (enum Port port) | |
construct a lamp connected to {port}. More... | |
~Lamp () | |
destroy our lamp instance. More... | |
const void | on () const |
Turn the Lamp on. More... | |
const void | off () const |
Turn the Lamp off. More... | |
const void | brightness (const unsigned char level) const |
Set the power to the lamp. More... | |
Private Methods | |
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.
|
The RCX output pad to which the Lamp is connected.
Definition at line 44 of file Lamp.H. Referenced by Lamp(). |
|
construct a lamp connected to {port}.
Definition at line 54 of file Lamp.H. References A, B, md, motor_a_dir(), motor_a_speed(), motor_b_dir(), motor_b_speed(), motor_c_dir(), motor_c_speed(), ms, and Port. |
|
destroy our lamp instance.
Definition at line 66 of file Lamp.H. References off(). |
|
Set the power to the lamp.
Definition at line 83 of file Lamp.H. References speed(). |
|
Definition at line 86 of file Lamp.H. References MotorDirection. |
|
Turn the Lamp off.
Definition at line 76 of file Lamp.H. References direction(). Referenced by ~Lamp(). |
|
Turn the Lamp on.
|
|
Definition at line 85 of file Lamp.H. References speed(). Referenced by brightness(), and speed(). |
|
Referenced by Lamp(). |
|
Referenced by Lamp(). |
brickOS is released under the
Mozilla Public License.
Original code copyright 1998-2002 by the authors. |