Comedi Relacs Plugins  0.9.8
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ComediRouting Class Reference

#include <comedirouting.h>

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

Public Member Functions

 ComediRouting (void)
 
 ComediRouting (const string &deviceclass)
 
 ComediRouting (const string &device, const Options &opts)
 
virtual ~ComediRouting (void)
 
virtual int open (const string &device) override
 
virtual bool isOpen (void) const
 
virtual void close (void)
 

Protected Member Functions

int open (const string &device, int subdev, int channel, int routing, const string &signal="")
 
virtual void initOptions (void) override
 

Protected Attributes

comedi_t * DeviceP
 

Detailed Description

[Device] Route a signal to a channel of a subdevice.

Author
Jan Benda The signal routing is routed to the channel channel on subdevice subdevice.

For routing signals to NI M-Series PFI lines, use the ComediNIPFI plugin (this plugin knows that the PFI channels are at subdevice 7 and provides meaningful names for the signals to be routed).

Options
  • subdevice
  • channel
  • routing

Constructor & Destructor Documentation

ComediRouting ( void  )

Create a new ComediRouting without opening a device.

ComediRouting ( const string &  deviceclass)

Create a new ComediRouting without opening a device.

References ComediRouting::DeviceP, and ComediRouting::initOptions().

ComediRouting ( const string &  device,
const Options opts 
)

Open comedi specified by its device file device.

References ComediRouting::open().

~ComediRouting ( void  )
virtual

Close the comedi driver.

References ComediRouting::close().

Member Function Documentation

int open ( const string &  device)
overridevirtual

Open the device specified by device and set the routing as specified by opts.

Returns
zero on success, or InvalidDevice (or any other negative number indicating the error).
See Also
isOpen(), close()

Reimplemented in ComediNIPFI.

Referenced by ComediRouting::ComediRouting(), and ComediNIPFI::open().

bool isOpen ( void  ) const
virtual
Returns
true if the device is open.
See Also
open(), close()

References ComediRouting::DeviceP.

Referenced by ComediRouting::close(), and ComediRouting::open().

void close ( void  )
virtual

Close the device.

See Also
open(), isOpen()

References ComediRouting::DeviceP, and ComediRouting::isOpen().

Referenced by ComediRouting::~ComediRouting().

int open ( const string &  device,
int  subdev,
int  channel,
int  routing,
const string &  signal = "" 
)
protected

Set routing of signal routing to channel channel on subdevice subdev and configure channel as output. signal is the optional name of the routing signal that is displayed in the devices informations.

References ComediRouting::DeviceP, and ComediRouting::isOpen().

void initOptions ( void  )
overrideprotectedvirtual

Reimplemented in ComediNIPFI.

Referenced by ComediRouting::ComediRouting().

Member Data Documentation

comedi_t* DeviceP
protected

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