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

#include <comedinipfi.h>

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

Public Member Functions

 ComediNIPFI (void)
 
 ComediNIPFI (const string &device, const Options &opts)
 
virtual ~ComediNIPFI (void)
 
virtual int open (const string &device) override
 
- Public Member Functions inherited from ComediRouting
 ComediRouting (void)
 
 ComediRouting (const string &deviceclass)
 
 ComediRouting (const string &device, const Options &opts)
 
virtual ~ComediRouting (void)
 
virtual bool isOpen (void) const
 
virtual void close (void)
 

Protected Member Functions

virtual void initOptions (void) override
 
- Protected Member Functions inherited from ComediRouting
int open (const string &device, int subdev, int channel, int routing, const string &signal="")
 

Static Protected Attributes

static const int PFISignalsMax = 31
 
static const string PFISignals [PFISignalsMax]
 

Additional Inherited Members

- Protected Attributes inherited from ComediRouting
comedi_t * DeviceP
 

Detailed Description

[Device] Controlls the PFI pins of a NI M-series daq-board via comedi.

Author
Jan Benda The signal routing is routed to the channel channel on the PFI subdevice (subdevice no. 7) of a national instruments M-series board.

Use for routing either the following integer values or the names without the "NI_PFI_OUTPUT_" part (from comedi.h):

enum ni_pfi_routing {
NI_PFI_OUTPUT_PFI_DEFAULT = 0,
NI_PFI_OUTPUT_AI_START1 = 1,
NI_PFI_OUTPUT_AI_START2 = 2,
NI_PFI_OUTPUT_AI_CONVERT = 3,
NI_PFI_OUTPUT_G_SRC1 = 4,
NI_PFI_OUTPUT_G_GATE1 = 5,
NI_PFI_OUTPUT_AO_UPDATE_N = 6,
NI_PFI_OUTPUT_AO_START1 = 7,
NI_PFI_OUTPUT_AI_START_PULSE = 8,
NI_PFI_OUTPUT_G_SRC0 = 9,
NI_PFI_OUTPUT_G_GATE0 = 10,
NI_PFI_OUTPUT_EXT_STROBE = 11,
NI_PFI_OUTPUT_AI_EXT_MUX_CLK = 12,
NI_PFI_OUTPUT_GOUT0 = 13,
NI_PFI_OUTPUT_GOUT1 = 14,
NI_PFI_OUTPUT_FREQ_OUT = 15,
NI_PFI_OUTPUT_PFI_DO = 16,
NI_PFI_OUTPUT_I_ATRIG = 17,
NI_PFI_OUTPUT_RTSI0 = 18,
NI_PFI_OUTPUT_PXI_STAR_TRIGGER_IN = 26,
NI_PFI_OUTPUT_SCXI_TRIG1 = 27,
NI_PFI_OUTPUT_DIO_CHANGE_DETECT_RTSI = 28,
NI_PFI_OUTPUT_CDI_SAMPLE = 29,
NI_PFI_OUTPUT_CDO_UPDATE = 30
};
Options
  • channel
  • routing

Constructor & Destructor Documentation

ComediNIPFI ( void  )

Create a new ComediNIPFI without opening a device.

References ComediNIPFI::initOptions().

ComediNIPFI ( const string &  device,
const Options opts 
)

Open comedi specified by its device file device.

References ComediNIPFI::open().

~ComediNIPFI ( void  )
virtual

Close the comedi driver.

Member Function Documentation

int open ( const string &  device)
overridevirtual

Open the PFI device specified by device.

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

Reimplemented from ComediRouting.

References ComediRouting::open(), ComediNIPFI::PFISignals, and ComediNIPFI::PFISignalsMax.

Referenced by ComediNIPFI::ComediNIPFI().

void initOptions ( void  )
overrideprotectedvirtual

Member Data Documentation

const int PFISignalsMax = 31
staticprotected
const string PFISignals
staticprotected
Initial value:
= {
"PFI_DEFAULT", "AI_START1", "AI_START2", "AI_CONVERT", "G_SRC1", "G_GATE1", "AO_UPDATE_N", "AO_START1",
"AI_START_PULSE", "G_SRC0", "G_GATE0", "EXT_STROBE", "AI_EXT_MUX_CLK", "GOUT0", "GOUT1", "FREQ_OUT",
"PFI_DO", "I_ATRIG", "RTSI0", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID",
"INVALID", "PXI_STAR_TRIGGER_IN", "SCXI_TRIG1", "DIO_CHANGE_DETECT_RTSI", "CDI_SAMPLE", "CDO_UPDATE" }

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


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