
Low-level driver for the BeoSub motors. More...
#include <BeoSub/BeoSubMotor.H>


Public Member Functions | |
| BeoSubMotor (OptionManager &mgr, const std::string &descrName="BeoSub Motor", const std::string &tagName="BeoSub Motor", const int def_parallel_port_addr=0x378) | |
| ~BeoSubMotor () | |
| Destructor. | |
| bool | setValue (const byte value, const int channel, const bool immed=true) |
| Set a value. | |
| byte | getValue (const int channel) const |
| Get the last set value on a given channel. | |
| bool | pulseValue (const int channel, const bool positive) |
| Pulse a channel on for a bit. | |
| bool | WritePort () |
| Write out our internal data to the parallel port. | |
Public Attributes | |
| unsigned char | chMin [9] |
| unsigned char | chMax [9] |
| unsigned char | chDefault [9] |
Protected Member Functions | |
| void | reset () |
| void | SendCh (const int value) |
Protected Attributes | |
| NModelParam< int > | itsPort |
| base address of parallel port | |
| unsigned char | strobelo |
| unsigned char | strobehi |
| unsigned char | ch [9] |
| channel values | |
Low-level driver for the BeoSub motors.
Definition at line 65 of file BeoSubMotor.H.
| BeoSubMotor::~BeoSubMotor | ( | ) |
Destructor.
Definition at line 90 of file BeoSubMotor.C.
| byte BeoSubMotor::getValue | ( | const int | channel | ) | const |
Get the last set value on a given channel.
Definition at line 187 of file BeoSubMotor.C.
| bool BeoSubMotor::pulseValue | ( | const int | channel, | |
| const bool | positive | |||
| ) |
Pulse a channel on for a bit.
| positive | use a pulse value higher than rest if true, lower then rest otherwise |
Definition at line 156 of file BeoSubMotor.C.
References ASSERT, and setValue().
| bool BeoSubMotor::setValue | ( | const byte | value, | |
| const int | channel, | |||
| const bool | immed = true | |||
| ) |
Set a value.
Set a value not less than a minimum and not larger than maximum to protect controller box from damage write the value to the parallel port
| value | the value to set | |
| channel | the channel to set the value to | |
| immed | if true, immediately send all values to the interface, otherwise just store the value internally and it will be sent at the next writePort() or setValue() with immed set to true. |
Definition at line 142 of file BeoSubMotor.C.
References ASSERT, ch, and WritePort().
Referenced by pulseValue().
| bool BeoSubMotor::WritePort | ( | ) |
Write out our internal data to the parallel port.
Definition at line 96 of file BeoSubMotor.C.
References ch, NModelParam< T >::getVal(), and itsPort.
Referenced by setValue().
unsigned char BeoSubMotor::ch[9] [protected] |
channel values
Definition at line 109 of file BeoSubMotor.H.
Referenced by getValue(), setValue(), and WritePort().
NModelParam<int> BeoSubMotor::itsPort [protected] |
base address of parallel port
Definition at line 106 of file BeoSubMotor.H.
Referenced by WritePort().
1.6.3