BeoSubMotor Class Reference

Low-level driver for the BeoSub motors. More...

#include <BeoSub/BeoSubMotor.H>

Inheritance diagram for BeoSubMotor:
Inheritance graph
[legend]
Collaboration diagram for BeoSubMotor:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

Low-level driver for the BeoSub motors.

Definition at line 65 of file BeoSubMotor.H.


Constructor & Destructor Documentation

BeoSubMotor::~BeoSubMotor (  ) 

Destructor.

Definition at line 90 of file BeoSubMotor.C.


Member Function Documentation

byte BeoSubMotor::getValue ( const int  channel  )  const

Get the last set value on a given channel.

Definition at line 187 of file BeoSubMotor.C.

References ASSERT, and ch.

bool BeoSubMotor::pulseValue ( const int  channel,
const bool  positive 
)

Pulse a channel on for a bit.

Parameters:
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

Parameters:
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.
Returns:
true on success

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.

Returns:
true on success

Definition at line 96 of file BeoSubMotor.C.

References ch, NModelParam< T >::getVal(), and itsPort.

Referenced by setValue().


Member Data Documentation

unsigned char BeoSubMotor::ch[9] [protected]

channel values

Definition at line 109 of file BeoSubMotor.H.

Referenced by getValue(), setValue(), and WritePort().

base address of parallel port

Definition at line 106 of file BeoSubMotor.H.

Referenced by WritePort().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:07 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3