A mutator providing read/write access to a CANopen sub-object in a local object dictionary.
More...
#include <master.hpp>
|
| template<class T > |
| SubObject & | operator= (T &&value) |
| | Sets the value of the sub-object. More...
|
| |
| 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 > |
| 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 > |
| 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...
|
| |
| template<class T > |
| void | Write (T &&value) |
| | Writes a value to the sub-object by submitting an SDO download request to the local object dictionary. More...
|
| |
| template<class T > |
| void | Write (T &&value, ::std::error_code &ec) |
| | Writes a value to the sub-object by submitting an SDO download request to the local object dictionary. More...
|
| |
| void | Write (const void *p, ::std::size_t n) |
| | Writes an OCTET_STRING or DOMAIN value to the sub-object by submitting an SDO download request to the local object dictionary. More...
|
| |
| void | Write (const void *p, ::std::size_t n, ::std::error_code &ec) |
| | Writes an OCTET_STRING or DOMAIN value to the sub-object by submitting an SDO download request to the local object dictionary. More...
|
| |
A mutator providing read/write access to a CANopen sub-object in a local object dictionary.
Definition at line 55 of file master.hpp.
◆ operator=()
template<class T >
| SubObject& lely::canopen::BasicMaster::SubObject::operator= |
( |
T && |
value | ) |
|
|
inline |
Sets the value of the sub-object.
- Parameters
-
| value | the value to be written. |
- Exceptions
-
- See also
- Write()
Definition at line 77 of file master.hpp.
◆ operator T()
template<class T >
| lely::canopen::BasicMaster::SubObject::operator T |
( |
| ) |
const |
|
inline |
Returns the value of the sub-object by submitting an SDO upload request to the local object dictionary.
- Exceptions
-
- See also
- Read()
Definition at line 91 of file master.hpp.
◆ Read() [1/2]
template<class T >
| T lely::canopen::BasicMaster::SubObject::Read |
( |
| ) |
const |
|
inline |
◆ Read() [2/2]
template<class T >
| T lely::canopen::BasicMaster::SubObject::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
-
| ec | on 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
Definition at line 124 of file master.hpp.
◆ Write() [1/4]
template<class T >
| void lely::canopen::BasicMaster::SubObject::Write |
( |
T && |
value | ) |
|
|
inline |
Writes a value to the sub-object by submitting an SDO download request to the local object dictionary.
- Parameters
-
| value | the value to be written. |
- Exceptions
-
- See also
- Device::Write(uint16_t idx, uint8_t subidx, T&& value)
Definition at line 140 of file master.hpp.
◆ Write() [2/4]
template<class T >
| void lely::canopen::BasicMaster::SubObject::Write |
( |
T && |
value, |
|
|
::std::error_code & |
ec |
|
) |
| |
|
inline |
Writes a value to the sub-object by submitting an SDO download request to the local object dictionary.
- Parameters
-
| value | the value to be written. |
| ec | on error, the SDO abort code is stored in ec. |
- See also
- Device::Write(uint16_t idx, uint8_t subidx, T value, ::std::error_code& ec), Device::Write(uint16_t idx, uint8_t subidx, const T& value, ::std::error_code& ec), Device::Write(uint16_t idx, uint8_t subidx, const char* value, ::std::error_code& ec), Device::Write(uint16_t idx, uint8_t subidx, const char16_t* value, ::std::error_code& ec)
Definition at line 159 of file master.hpp.
◆ Write() [3/4]
| void lely::canopen::BasicMaster::SubObject::Write |
( |
const void * |
p, |
|
|
::std::size_t |
n |
|
) |
| |
|
inline |
Writes an OCTET_STRING or DOMAIN value to the sub-object by submitting an SDO download request to the local object dictionary.
- Parameters
-
| p | a pointer to the bytes to be written. |
| n | the number of bytes to write. |
- Exceptions
-
- See also
- Device::Write(uint16_t idx, uint8_t subidx, const void* p, ::std::size_t n)
Definition at line 176 of file master.hpp.
◆ Write() [4/4]
| void lely::canopen::BasicMaster::SubObject::Write |
( |
const void * |
p, |
|
|
::std::size_t |
n, |
|
|
::std::error_code & |
ec |
|
) |
| |
|
inline |
Writes an OCTET_STRING or DOMAIN value to the sub-object by submitting an SDO download request to the local object dictionary.
- Parameters
-
| p | a pointer to the bytes to be written. |
| n | the number of bytes to write. |
| ec | on error, the SDO abort code is stored in ec. |
- See also
- Device::Write(uint16_t idx, uint8_t subidx, const void* p, ::std::size_t n, ::std::error_code& ec)
Definition at line 192 of file master.hpp.
The documentation for this class was generated from the following file: