Lely core libraries  2.2.5
lely::canopen::BasicMaster::ConstSubObject Class Reference

An accessor providing read-only access to a CANopen sub-object in a local object dictionary. More...

#include <master.hpp>

Public Member Functions

template<class T >
 operator T () const
 Returns the value of the sub-object by submitting an SDO upload request to the local object dictionary. More...
 
template<class T >
Read () const
 Reads the value of the sub-object by submitting an SDO upload request to the local object dictionary. More...
 
template<class T >
Read (::std::error_code &ec) const
 Reads the value of the sub-object by submitting an SDO upload request to the local object dictionary. More...
 

Detailed Description

An accessor providing read-only access to a CANopen sub-object in a local object dictionary.

Definition at line 262 of file master.hpp.

Member Function Documentation

◆ operator T()

template<class T >
lely::canopen::BasicMaster::ConstSubObject::operator T ( ) const
inline

Returns the value of the sub-object by submitting an SDO upload request to the local object dictionary.

Exceptions
lely::canopen::SdoErroron error.
See also
Read()

Definition at line 276 of file master.hpp.

◆ Read() [1/2]

template<class T >
T lely::canopen::BasicMaster::ConstSubObject::Read ( ) const
inline

Reads the value of the sub-object by submitting an SDO upload request to the local object dictionary.

Returns
the result of the SDO request.
Exceptions
lely::canopen::SdoErroron error.
See also
Device::Read(uint16_t idx, uint8_t subidx) const
Device::RpdoRead(uint8_t id, uint16_t idx, uint8_t subidx) const
Device::TpdoRead(uint8_t id, uint16_t idx, uint8_t subidx) const

Definition at line 294 of file master.hpp.

◆ Read() [2/2]

template<class T >
T lely::canopen::BasicMaster::ConstSubObject::Read ( ::std::error_code &  ec) const
inline

Reads the value of the sub-object by submitting an SDO upload request to the local object dictionary.

Parameters
econ error, the SDO abort code is stored in ec.
Returns
the result of the SDO request, or an empty value on error.
See also
Device::Read(uint16_t idx, uint8_t subidx, ::std::error_code& ec) const
Device::RpdoRead(uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code& ec) const
Device::TpdoRead(uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code& ec) const

Definition at line 314 of file master.hpp.


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