Robotics Library  0.7.0
Public Member Functions | Private Attributes | List of all members
rl::hal::Comedi Class Reference

#include <Comedi.h>

Inheritance diagram for rl::hal::Comedi:
Inheritance graph
[legend]

Public Member Functions

 Comedi (const ::std::string &filename="/dev/comedi0")
 
virtual ~Comedi ()
 
void close ()
 
unsigned int getAref () const
 
::std::string getBoardName () const
 
comedi_t * getDevice () const
 
::std::string getDriverName () const
 
int getFileno () const
 
lsampl_t getMax (const ::std::size_t &subdevice, const ::std::size_t &channel) const
 
::std::size_t getNumChannels (const ::std::size_t &subdevice) const
 
::std::size_t getNumRanges (const ::std::size_t &subdevice, const ::std::size_t &channel) const
 
::std::size_t getNumSubdevices () const
 
unsigned int getRange () const
 
::std::size_t getSubdeviceFlags (const ::std::size_t &subdevice) const
 
void open ()
 
void read (const ::std::size_t &subdevice, const ::std::size_t &channel, double &data)
 
void read (const ::std::size_t &subdevice, const ::std::size_t &channel, float &data)
 
void setAref (const unsigned int &aref)
 
void setRange (const unsigned int &range)
 
void write (const ::std::size_t &subdevice, const ::std::size_t &channel, const double &data)
 
void write (const ::std::size_t &subdevice, const ::std::size_t &channel, const float &data)
 
- Public Member Functions inherited from rl::hal::Com
 Com ()
 
virtual ~Com ()
 
bool isConnected () const
 

Private Attributes

unsigned int aref
 
comedi_t * device
 
::std::string filename
 
unsigned int range
 

Additional Inherited Members

- Protected Member Functions inherited from rl::hal::Com
void setConnected (const bool &connected)
 

Constructor & Destructor Documentation

◆ Comedi()

rl::hal::Comedi::Comedi ( const ::std::string &  filename = "/dev/comedi0")

◆ ~Comedi()

rl::hal::Comedi::~Comedi ( )
virtual

Member Function Documentation

◆ close()

void rl::hal::Comedi::close ( )
virtual

Implements rl::hal::Com.

◆ getAref()

unsigned int rl::hal::Comedi::getAref ( ) const

◆ getBoardName()

std::string rl::hal::Comedi::getBoardName ( ) const

◆ getDevice()

comedi_t * rl::hal::Comedi::getDevice ( ) const

◆ getDriverName()

std::string rl::hal::Comedi::getDriverName ( ) const

◆ getFileno()

int rl::hal::Comedi::getFileno ( ) const

◆ getMax()

lsampl_t rl::hal::Comedi::getMax ( const ::std::size_t &  subdevice,
const ::std::size_t &  channel 
) const

◆ getNumChannels()

std::size_t rl::hal::Comedi::getNumChannels ( const ::std::size_t &  subdevice) const

◆ getNumRanges()

std::size_t rl::hal::Comedi::getNumRanges ( const ::std::size_t &  subdevice,
const ::std::size_t &  channel 
) const

◆ getNumSubdevices()

std::size_t rl::hal::Comedi::getNumSubdevices ( ) const

◆ getRange()

unsigned int rl::hal::Comedi::getRange ( ) const

◆ getSubdeviceFlags()

std::size_t rl::hal::Comedi::getSubdeviceFlags ( const ::std::size_t &  subdevice) const

◆ open()

void rl::hal::Comedi::open ( )
virtual

Implements rl::hal::Com.

◆ read() [1/2]

void rl::hal::Comedi::read ( const ::std::size_t &  subdevice,
const ::std::size_t &  channel,
double &  data 
)

◆ read() [2/2]

void rl::hal::Comedi::read ( const ::std::size_t &  subdevice,
const ::std::size_t &  channel,
float &  data 
)

◆ setAref()

void rl::hal::Comedi::setAref ( const unsigned int &  aref)

◆ setRange()

void rl::hal::Comedi::setRange ( const unsigned int &  range)

◆ write() [1/2]

void rl::hal::Comedi::write ( const ::std::size_t &  subdevice,
const ::std::size_t &  channel,
const double &  data 
)

◆ write() [2/2]

void rl::hal::Comedi::write ( const ::std::size_t &  subdevice,
const ::std::size_t &  channel,
const float &  data 
)

Member Data Documentation

◆ aref

unsigned int rl::hal::Comedi::aref
private

◆ device

comedi_t* rl::hal::Comedi::device
private

◆ filename

::std::string rl::hal::Comedi::filename
private

◆ range

unsigned int rl::hal::Comedi::range
private

The documentation for this class was generated from the following files: