An accessor providing read-only access to a CANopen sub-object in a local object dictionary.
More...
#include <slave.hpp>
|
| template<class T > |
| | operator T () const |
| | Returns a copy of the value of the sub-object. More...
|
| |
| const ::std::type_info & | Type () const |
| | Returns the type of the sub-object. More...
|
| |
| const ::std::type_info & | Type (::std::error_code &ec) const |
| | Returns the type of the sub-object. More...
|
| |
| template<class T > |
| T | Get () const |
| | Reads the value of the sub-object. More...
|
| |
| template<class T > |
| T | Get (::std::error_code &ec) const |
| | Reads the value of the sub-object. More...
|
| |
An accessor providing read-only access to a CANopen sub-object in a local object dictionary.
Definition at line 250 of file slave.hpp.
◆ operator T()
template<class T >
| lely::canopen::BasicSlave::ConstSubObject::operator T |
( |
| ) |
const |
|
inline |
Returns a copy of the value of the sub-object.
- Exceptions
-
- See also
- Get()
Definition at line 264 of file slave.hpp.
◆ Type() [1/2]
| const ::std::type_info& lely::canopen::BasicSlave::ConstSubObject::Type |
( |
| ) |
const |
|
inline |
◆ Type() [2/2]
| const ::std::type_info& lely::canopen::BasicSlave::ConstSubObject::Type |
( |
::std::error_code & |
ec | ) |
const |
|
inline |
Returns the type of the sub-object.
- Parameters
-
| ec | if the sub-object does not exist, the SDO abort code is stored in ec. |
- Returns
- a reference to an
std::type_info object representing the type, or typeid(void) if unknown.
- See also
- Device::Type(uint16_t idx, uint8_t subidx, ::std::error_code& ec) const
Definition at line 296 of file slave.hpp.
◆ Get() [1/2]
template<class T >
| T lely::canopen::BasicSlave::ConstSubObject::Get |
( |
| ) |
const |
|
inline |
◆ Get() [2/2]
template<class T >
| T lely::canopen::BasicSlave::ConstSubObject::Get |
( |
::std::error_code & |
ec | ) |
const |
|
inline |
Reads the value of the sub-object.
- Parameters
-
| ec | if the sub-object does not exist or the type does not match, the SDO abort code is stored in ec. |
- Returns
- a copy of the value of the sub-object, or an empty value on error.
- See also
- Device::Get(uint16_t idx, uint8_t subidx, ::std::error_code& ec) const
Definition at line 330 of file slave.hpp.
The documentation for this class was generated from the following file: