A mutator providing read/write access to a CANopen sub-object in a local object dictionary.
More...
#include <slave.hpp>
|
| template<class T > |
| SubObject & | operator= (T &&value) |
| | Sets the value of the sub-object. More...
|
| |
| 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...
|
| |
| template<class T > |
| void | Set (T &&value) |
| | Writes a value to the sub-object. More...
|
| |
| template<class T > |
| void | Set (T &&value, ::std::error_code &ec) |
| | Writes a value to the sub-object. More...
|
| |
| void | Set (const void *p, ::std::size_t n) |
| | Writes an OCTET_STRING or DOMAIN value to the sub-object. More...
|
| |
| void | Set (const void *p, ::std::size_t n, ::std::error_code &ec) |
| | Writes an OCTET_STRING or DOMAIN value to the sub-object. More...
|
| |
A mutator providing read/write access to a CANopen sub-object in a local object dictionary.
Definition at line 63 of file slave.hpp.
◆ operator=()
template<class T >
| SubObject& lely::canopen::BasicSlave::SubObject::operator= |
( |
T && |
value | ) |
|
|
inline |
Sets the value of the sub-object.
- Parameters
-
| value | the value to be written. |
- Exceptions
-
- See also
- Set()
Definition at line 85 of file slave.hpp.
◆ operator T()
template<class T >
| lely::canopen::BasicSlave::SubObject::operator T |
( |
| ) |
const |
|
inline |
Returns a copy of the value of the sub-object.
- Exceptions
-
- See also
- Get()
Definition at line 99 of file slave.hpp.
◆ Type() [1/2]
| const ::std::type_info& lely::canopen::BasicSlave::SubObject::Type |
( |
| ) |
const |
|
inline |
◆ Type() [2/2]
| const ::std::type_info& lely::canopen::BasicSlave::SubObject::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 131 of file slave.hpp.
◆ Get() [1/2]
template<class T >
| T lely::canopen::BasicSlave::SubObject::Get |
( |
| ) |
const |
|
inline |
◆ Get() [2/2]
template<class T >
| T lely::canopen::BasicSlave::SubObject::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 165 of file slave.hpp.
◆ Set() [1/4]
template<class T >
| void lely::canopen::BasicSlave::SubObject::Set |
( |
T && |
value | ) |
|
|
inline |
Writes a value to the sub-object.
- Parameters
-
| value | the value to be written. |
- Exceptions
-
- See also
- Device::Set(uint16_t idx, uint8_t subidx, T&& value)
Definition at line 181 of file slave.hpp.
◆ Set() [2/4]
template<class T >
| void lely::canopen::BasicSlave::SubObject::Set |
( |
T && |
value, |
|
|
::std::error_code & |
ec |
|
) |
| |
|
inline |
Writes a value to the sub-object.
- Parameters
-
| value | the value to be written. |
| ec | if the sub-object does not exist or the type does not match, the SDO abort code is stored in ec. |
- See also
- Device::Set(uint16_t idx, uint8_t subidx, T value, ::std::error_code& ec), Device::Set(uint16_t idx, uint8_t subidx, const T& value, ::std::error_code& ec), Device::Set(uint16_t idx, uint8_t subidx, const char* value, ::std::error_code& ec), Device::Set(uint16_t idx, uint8_t subidx, const char16_t* value, ::std::error_code& ec)
Definition at line 200 of file slave.hpp.
◆ Set() [3/4]
| void lely::canopen::BasicSlave::SubObject::Set |
( |
const void * |
p, |
|
|
::std::size_t |
n |
|
) |
| |
|
inline |
Writes an OCTET_STRING or DOMAIN value to the sub-object.
- Parameters
-
| p | a pointer to the bytes to be written. |
| n | the number of bytes to write. |
- Exceptions
-
- See also
- Device::Set(uint16_t idx, uint8_t subidx, const void* p, ::std::size_t n)
Definition at line 217 of file slave.hpp.
◆ Set() [4/4]
| void lely::canopen::BasicSlave::SubObject::Set |
( |
const void * |
p, |
|
|
::std::size_t |
n, |
|
|
::std::error_code & |
ec |
|
) |
| |
|
inline |
Writes an OCTET_STRING or DOMAIN value to the sub-object.
- Parameters
-
| p | a pointer to the bytes to be written. |
| n | the number of bytes to write. |
| ec | if the sub-object does not exist or the type does not match, the SDO abort code is stored in ac. |
- See also
- Device::Set(uint16_t idx, uint8_t subidx, const void* p, ::std::size_t n, ::std::error_code& ec)
Definition at line 233 of file slave.hpp.
The documentation for this class was generated from the following file: