Choreonoid  1.8
Public Member Functions | Protected Member Functions | List of all members
cnoid::DigitalIoDevice Class Reference

#include <DigitalIoDevice.h>

Inheritance diagram for cnoid::DigitalIoDevice:
cnoid::Device cnoid::DeviceState cnoid::ClonableReferenced cnoid::Referenced

Public Member Functions

 DigitalIoDevice ()
 
virtual ~DigitalIoDevice ()
 
virtual const char * typeName () const override
 
void copyDigitalIoDeviceStateFrom (const DigitalIoDevice &other)
 
virtual void copyStateFrom (const DeviceState &other) override
 
virtual DeviceStatecloneState () const override
 
virtual void forEachActualType (std::function< bool(const std::type_info &type)> func) override
 
virtual int stateSize () const override
 
virtual const double * readState (const double *buf) override
 
virtual double * writeState (double *out_buf) const override
 
virtual bool on () const override
 
virtual void on (bool on) override
 
int numSignalLines () const
 
void setNumSignalLines (int n)
 
bool out (int index) const
 
void setOut (int index, bool on, bool doNotify=true)
 
bool in (int index) const
 
void setIn (int index, bool on, bool doNotify=true)
 
const std::string & outLabel (int index) const
 
void setOutLabel (int index, const std::string &label)
 
std::vector< std::pair< int, std::string & > > getOutLabels () const
 
const std::string & inLabel (int index) const
 
void setInLabel (int index, const std::string &label)
 
std::vector< std::pair< int, std::string & > > getInLabels () const
 
SignalProxy< void(bool on)> sigOutput (int index)
 
SignalProxy< void(bool on)> sigInput (int index)
 
bool readDescription (const Mapping *info)
 
bool readSpecifications (const Mapping *info)
 
bool readConfiguration (const Mapping *info)
 
bool writeDescription (Mapping *info) const
 
bool writeSpecifications (Mapping *info) const
 
bool writeConfiguration (Mapping *info) const
 
void setInputToDeviceSwitchConnection (int inputIndex, const std::string &deviceName)
 
std::vector< std::pair< int, std::string & > > getInputToDeviceSwitchConnections () const
 
void removeInputToDeviceSwitchConnection (int inputIndex)
 
void clearInputToDeviceSwitchConnections ()
 
bool readInputToDeviceSwitchConnections (const Mapping &archive)
 
- Public Member Functions inherited from cnoid::Device
virtual ~Device ()
 
Deviceclone () const
 
Deviceclone (CloneMap &cloneMap) const
 
virtual bool copyFrom (const Device *other)
 
void setIndex (int index)
 
void setId (int id)
 
void setName (const std::string &name)
 
void setLink (Link *link)
 
bool hasStateOnly () const
 
int index () const
 
int id () const
 
const std::string & name () const
 
const Linklink () const
 
Linklink ()
 
const Bodybody () const
 
Bodybody ()
 
Isometry3T_local ()
 
const Isometry3T_local () const
 
const Isometry3localPosition () const
 
template<class Scalar , int Mode, int Options>
void setLocalPosition (const Eigen::Transform< Scalar, 3, Mode, Options > &T)
 
Isometry3::ConstLinearPart R_local () const
 
Isometry3::LinearPart R_local ()
 
Isometry3::ConstLinearPart localRotation () const
 
template<typename Derived >
void setLocalRotation (const Eigen::MatrixBase< Derived > &R)
 
Isometry3::ConstTranslationPart p_local () const
 
Isometry3::TranslationPart p_local ()
 
Isometry3::ConstTranslationPart localTranslation () const
 
template<typename Derived >
void setLocalTranslation (const Eigen::MatrixBase< Derived > &p)
 
virtual void clearState ()
 
SignalProxy< void()> sigStateChanged ()
 
void notifyStateChange ()
 
SignalProxy< void(double time)> sigTimeChanged ()
 
void notifyTimeChange (double time)
 
const Isometry3T_local_org () const
 
void setLocalAttitude (const Isometry3 &Ta)
 
double cycle () const
 
void setCycle (double msec)
 
- Public Member Functions inherited from cnoid::DeviceState
virtual ~DeviceState ()
 
- Public Member Functions inherited from cnoid::Referenced
virtual ~Referenced ()
 

Protected Member Functions

 DigitalIoDevice (const DigitalIoDevice &org, bool copyStateOnly, CloneMap *cloneMap)
 
virtual ReferenceddoClone (CloneMap *cloneMap) const override
 
- Protected Member Functions inherited from cnoid::Device
 Device ()
 
 Device (const Device &org, bool copyStateOnly=false)
 
void copySpecFrom (const Device *other)
 
- Protected Member Functions inherited from cnoid::DeviceState
 DeviceState ()
 
 DeviceState (const DeviceState &)
 
- Protected Member Functions inherited from cnoid::Referenced
 Referenced ()
 
 Referenced (const Referenced &)
 
int refCount () const
 

Constructor & Destructor Documentation

◆ DigitalIoDevice() [1/2]

DigitalIoDevice::DigitalIoDevice ( )

◆ ~DigitalIoDevice()

DigitalIoDevice::~DigitalIoDevice ( )
virtual

◆ DigitalIoDevice() [2/2]

DigitalIoDevice::DigitalIoDevice ( const DigitalIoDevice org,
bool  copyStateOnly,
CloneMap cloneMap 
)
protected

Member Function Documentation

◆ clearInputToDeviceSwitchConnections()

void DigitalIoDevice::clearInputToDeviceSwitchConnections ( )

◆ cloneState()

DeviceState * DigitalIoDevice::cloneState ( ) const
overridevirtual

Implements cnoid::DeviceState.

◆ copyDigitalIoDeviceStateFrom()

void DigitalIoDevice::copyDigitalIoDeviceStateFrom ( const DigitalIoDevice other)

◆ copyStateFrom()

void DigitalIoDevice::copyStateFrom ( const DeviceState other)
overridevirtual

Implements cnoid::DeviceState.

◆ doClone()

Referenced * DigitalIoDevice::doClone ( CloneMap cloneMap) const
overrideprotectedvirtual

◆ forEachActualType()

void DigitalIoDevice::forEachActualType ( std::function< bool(const std::type_info &type)>  func)
overridevirtual

Reimplemented from cnoid::Device.

◆ getInLabels()

std::vector< std::pair< int, std::string & > > DigitalIoDevice::getInLabels ( ) const

◆ getInputToDeviceSwitchConnections()

std::vector< std::pair< int, std::string & > > DigitalIoDevice::getInputToDeviceSwitchConnections ( ) const

◆ getOutLabels()

std::vector< std::pair< int, std::string & > > DigitalIoDevice::getOutLabels ( ) const

◆ in()

bool cnoid::DigitalIoDevice::in ( int  index) const
inline

◆ inLabel()

const std::string & DigitalIoDevice::inLabel ( int  index) const

◆ numSignalLines()

int cnoid::DigitalIoDevice::numSignalLines ( ) const
inline

◆ on() [1/2]

bool DigitalIoDevice::on ( ) const
overridevirtual

Reimplemented from cnoid::Device.

◆ on() [2/2]

void DigitalIoDevice::on ( bool  on)
overridevirtual

Reimplemented from cnoid::Device.

◆ out()

bool cnoid::DigitalIoDevice::out ( int  index) const
inline

◆ outLabel()

const std::string & DigitalIoDevice::outLabel ( int  index) const

◆ readConfiguration()

bool DigitalIoDevice::readConfiguration ( const Mapping info)

◆ readDescription()

bool DigitalIoDevice::readDescription ( const Mapping info)

◆ readInputToDeviceSwitchConnections()

bool cnoid::DigitalIoDevice::readInputToDeviceSwitchConnections ( const Mapping archive)

◆ readSpecifications()

bool DigitalIoDevice::readSpecifications ( const Mapping info)

◆ readState()

const double * DigitalIoDevice::readState ( const double *  buf)
overridevirtual
Returns
The position in the buf after reading. The value is used when the super class's readState is called by the inherited class.

Implements cnoid::DeviceState.

◆ removeInputToDeviceSwitchConnection()

void DigitalIoDevice::removeInputToDeviceSwitchConnection ( int  inputIndex)

◆ setIn()

void DigitalIoDevice::setIn ( int  index,
bool  on,
bool  doNotify = true 
)

◆ setInLabel()

void DigitalIoDevice::setInLabel ( int  index,
const std::string &  label 
)

◆ setInputToDeviceSwitchConnection()

void DigitalIoDevice::setInputToDeviceSwitchConnection ( int  inputIndex,
const std::string &  deviceName 
)

◆ setNumSignalLines()

void DigitalIoDevice::setNumSignalLines ( int  n)

◆ setOut()

void DigitalIoDevice::setOut ( int  index,
bool  on,
bool  doNotify = true 
)

◆ setOutLabel()

void DigitalIoDevice::setOutLabel ( int  index,
const std::string &  label 
)

◆ sigInput()

SignalProxy< void(bool on)> DigitalIoDevice::sigInput ( int  index)

◆ sigOutput()

SignalProxy< void(bool on)> DigitalIoDevice::sigOutput ( int  index)

◆ stateSize()

int DigitalIoDevice::stateSize ( ) const
overridevirtual

Size of the double-precision floating numbers for representing the state.

Implements cnoid::DeviceState.

◆ typeName()

const char * DigitalIoDevice::typeName ( ) const
overridevirtual

Implements cnoid::DeviceState.

◆ writeConfiguration()

bool DigitalIoDevice::writeConfiguration ( Mapping info) const

◆ writeDescription()

bool DigitalIoDevice::writeDescription ( Mapping info) const

◆ writeSpecifications()

bool DigitalIoDevice::writeSpecifications ( Mapping info) const

◆ writeState()

double * DigitalIoDevice::writeState ( double *  out_buf) const
overridevirtual
Returns
The position in the buf after reading. The value is used when the super class's readState is called by the inherited class.

Implements cnoid::DeviceState.


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