RTXI  3.0.0
The Real-Time eXperiment Interface Reference Manual
Public Member Functions
RT::Device Class Referenceabstract

#include <rt.hpp>

Inheritance diagram for RT::Device:
Inheritance graph
Collaboration diagram for RT::Device:
Collaboration graph

Public Member Functions

 Device (std::string n, const std::vector< IO::channel_t > &c)
 
 Device (const Device &)=default
 
Deviceoperator= (const Device &)=default
 
 Device (Device &&)=delete
 
Deviceoperator= (Device &&)=delete
 
 ~Device () override=default
 
virtual void read ()=0
 
virtual void write ()=0
 
- Public Member Functions inherited from IO::Block
 Block (std::string blockname, const std::vector< channel_t > &channels, bool isdependent)
 
 Block (const Block &block)=default
 
Blockoperator= (const Block &block)=default
 
 Block (Block &&)=delete
 
Blockoperator= (Block &&)=delete
 
virtual ~Block ()=default
 
std::string getName () const
 
size_t getCount (flags_t type) const
 
std::string getChannelName (IO::flags_t type, size_t index) const
 
std::string getChannelDescription (IO::flags_t type, size_t index) const
 
void writeinput (size_t index, const double &data)
 
const double & readPort (IO::flags_t direction, size_t index)
 
bool dependent () const
 
bool getActive () const
 
void setActive (bool act)
 
void assignID (size_t block_id)
 
size_t getID () const
 

Additional Inherited Members

- Protected Member Functions inherited from IO::Block
double & readinput (size_t index)
 
void writeoutput (size_t index, const double &data)
 

Detailed Description

Base class for devices that are to interface with System.

Classes who inherit this base class are defined as blocks independent of other blocks, and define device interface methods read() and write().

See also
RT::System

Definition at line 112 of file rt.hpp.

Constructor & Destructor Documentation

◆ Device() [1/3]

RT::Device::Device(std::string n,
const std::vector< IO::channel_t > & c 
)
inline

Definition at line 115 of file rt.hpp.

◆ Device() [2/3]

RT::Device::Device(const Device)
default

◆ Device() [3/3]

RT::Device::Device(Device && )
delete

◆ ~Device()

RT::Device::~Device()
overridedefault

Member Function Documentation

◆ operator=() [1/2]

Device& RT::Device::operator=(const Device)
default

◆ operator=() [2/2]

Device& RT::Device::operator=(Device && )
delete

◆ read()

void Device::read(void )
pure virtual

Function called by the realtime task at the beginning of each period.

See also
RT::System

Implemented in AnalogyDevice, and Device.

◆ write()

void Device::write(void )
pure virtual

Function called by the realtime task at the end of each period.

See also
RT::System

Implemented in AnalogyDevice, and Device.


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