00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef ORO_PARALLELPORT_HPP
00031 #define ORO_PARALLELPORT_HPP
00032
00033 #include "TemplateDigitalOut.hpp"
00034 #include "rtt/dev/DigitalOutInterface.hpp"
00035
00036 namespace RTT
00037 {
00038
00047 class ParallelPort
00048 : public DigitalOutInterface
00049 {
00050 static TemplateDigitalOut Base;
00051
00055 void update() const;
00056
00060 void refresh();
00061
00062 unsigned short int address_;
00063 public:
00072 ParallelPort( unsigned short int address = 0x378);
00073
00083 ParallelPort( const std::string& name, unsigned short int address = 0x378);
00084
00085 ~ParallelPort();
00086
00087 void switchOn( unsigned int bit);
00088 void switchOff( unsigned int bit);
00089 void setBit( unsigned int bit, bool value);
00090 void setSequence(unsigned int start_bit, unsigned int stop_bit, unsigned int value);
00091 bool checkBit( unsigned int bit) const;
00092 unsigned int checkSequence (unsigned int start_bit, unsigned int stop_bit) const;
00093 unsigned int nbOfOutputs() const;
00094 };
00095
00096 };
00097
00098 #endif