22#ifndef LELY_COAPP_DEVICE_HPP_
23#define LELY_COAPP_DEVICE_HPP_
86 typename ::std::enable_if<is_canopen<T>::value, T>::type
Read(
101 typename ::std::enable_if<is_canopen<T>::value, T>::type
Read(
116 typename ::std::enable_if<is_canopen<T>::value>::type
Write(
uint16_t idx,
131 typename ::std::enable_if<is_canopen<T>::value>::type
Write(
158 ::std::error_code& ec);
186 ::std::error_code& ec);
214 ::std::error_code& ec);
244 ::std::error_code& ec);
313 typename ::std::enable_if<is_canopen_basic<T>::value, T>::type
RpdoRead(
333 typename ::std::enable_if<is_canopen_basic<T>::value, T>::type
RpdoRead(
355 typename ::std::enable_if<is_canopen_basic<T>::value, T>::type
TpdoRead(
376 typename ::std::enable_if<is_canopen_basic<T>::value, T>::type
TpdoRead(
396 typename ::std::enable_if<is_canopen_basic<T>::value>::type
TpdoWrite(
415 typename ::std::enable_if<is_canopen_basic<T>::value>::type
TpdoWrite(
449 ::std::error_code& ec)
noexcept;
502 ::std::error_code& ec)
const noexcept;
518 typename ::std::enable_if<is_canopen<T>::value, T>::type
Get(
534 typename ::std::enable_if<is_canopen<T>::value, T>::type
Get(
550 typename ::std::enable_if<is_canopen<T>::value>::type
Set(
uint16_t idx,
566 typename ::std::enable_if<is_canopen<T>::value>::type
Set(
568 ::std::error_code& ec)
noexcept;
596 ::std::error_code& ec)
noexcept;
626 ::std::error_code& ec)
noexcept;
656 ::std::error_code& ec)
noexcept;
687 ::std::error_code& ec)
const noexcept;
718 ::std::error_code& ec)
noexcept;
749 ::std::error_code& ec)
const noexcept;
780 ::std::error_code& ec)
noexcept;
828 typename ::std::enable_if<is_canopen_basic<T>::value, T>::type
RpdoGet(
850 typename ::std::enable_if<is_canopen_basic<T>::value, T>::type
RpdoGet(
852 ::std::error_code& ec)
const noexcept;
874 typename ::std::enable_if<is_canopen_basic<T>::value, T>::type
TpdoGet(
897 typename ::std::enable_if<is_canopen_basic<T>::value, T>::type
TpdoGet(
899 ::std::error_code& ec)
const noexcept;
919 typename ::std::enable_if<is_canopen_basic<T>::value>::type
TpdoSet(
939 typename ::std::enable_if<is_canopen_basic<T>::value>::type
TpdoSet(
941 ::std::error_code& ec)
noexcept;
975 ::std::error_code& ec)
noexcept;
1033 ::std::unique_ptr<Impl_> impl_;
The CANopen device description.
void RpdoWrite(uint8_t id, uint16_t idx, uint8_t subidx)
Invokes OnRpdoWrite() as if a value was written to an RPDO-mapped object in the local object dictiona...
uint8_t netid() const noexcept
Returns the network-ID.
void SetUploadFile(uint16_t idx, uint8_t subidx, const char *filename)
Sets the value of the UploadFile attribute of a sub-object, if present.
typename::std::enable_if< is_canopen_basic< T >::value, T >::type RpdoGet(uint8_t id, uint16_t idx, uint8_t subidx) const
Reads the value of a sub-object in a remote object dictionary by reading the corresponding PDO-mapped...
void TpdoWriteEvent(uint8_t id, uint16_t idx, uint8_t subidx)
Triggers the transmission of every event-driven, asynchronous Transmit-PDO which is mapped into the s...
void WriteDcf(const uint8_t *begin, const uint8_t *end)
Submits a series of SDO download requests to the local object dictionary.
void UpdateTpdoMapping()
Updates the mapping from remote RPDO-mapped sub-objects to local TPDO-mapped sub-objects.
typename::std::enable_if< is_canopen_basic< T >::value, T >::type TpdoGet(uint8_t id, uint16_t idx, uint8_t subidx) const
Reads the value of a TPDO-mapped sub-object in the local object dictionary that will be written to an...
typename::std::enable_if< is_canopen< T >::value, T >::type Read(uint16_t idx, uint8_t subidx) const
Submits an SDO upload request to the local object dictionary.
void SetDownloadFile(uint16_t idx, uint8_t subidx, const char *filename)
Sets the value of the DownloadFile attribute of a sub-object, if present.
typename::std::enable_if< is_canopen_basic< T >::value >::type TpdoWrite(uint8_t id, uint16_t idx, uint8_t subidx, T value)
Writes a value to a sub-object in a remote object dictionary by submitting an SDO download request to...
const ::std::type_info & Type(uint16_t idx, uint8_t subidx) const
Returns the type of a sub-object.
typename::std::enable_if< is_canopen< T >::value >::type Set(uint16_t idx, uint8_t subidx, const T &value)
Writes a CANopen value to a sub-object.
void UpdateRpdoMapping()
Updates the mapping from remote TPDO-mapped sub-objects to local RPDO-mapped sub-objects.
typename::std::enable_if< is_canopen< T >::value, T >::type Get(uint16_t idx, uint8_t subidx) const
Reads the value of a sub-object.
void SetEvent(uint16_t idx, uint8_t subidx)
Checks if the specified sub-object in the local object dictionary can be mapped into a PDO and,...
void WriteEvent(uint16_t idx, uint8_t subidx)
Checks if the specified sub-object in the local object dictionary can be mapped into a PDO and,...
typename::std::enable_if< is_canopen_basic< T >::value >::type TpdoSet(uint8_t id, uint16_t idx, uint8_t subidx, T value)
Writes a value to a sub-object in a remote object dictionary by writing to the corresponding PDO-mapp...
typename::std::enable_if< is_canopen< T >::value >::type Write(uint16_t idx, uint8_t subidx, const T &value)
Submits an SDO download request to the local object dictionary.
const char * GetDownloadFile(uint16_t idx, uint8_t subidx) const
Returns the value of the DownloadFile attribute of a sub-object, if present.
typename::std::enable_if< is_canopen_basic< T >::value, T >::type TpdoRead(uint8_t id, uint16_t idx, uint8_t subidx) const
Submits an SDO upload request to a TPDO-mapped sub-object in the local object dictionary,...
typename::std::enable_if< is_canopen_basic< T >::value, T >::type RpdoRead(uint8_t id, uint16_t idx, uint8_t subidx) const
Reads the value of a sub-object in a remote object dictionary by submitting an SDO upload request to ...
void TpdoSetEvent(uint8_t id, uint16_t idx, uint8_t subidx)
Triggers the transmission of every event-driven, asynchronous Transmit-PDO which is mapped into the s...
__co_dev * dev() const noexcept
Returns a pointer to the internal CANopen device from <lely/co/dev.hpp>.
uint8_t id() const noexcept
Returns the node-ID.
const char * GetUploadFile(uint16_t idx, uint8_t subidx) const
Returns the value of the UploadFile attribute of a sub-object, if present.
An abstract interface conforming to the BasicLockable concept.
This header file is part of the C++ CANopen application library; it contains the CANopen type traits.
This header file is part of the utilities library; it contains the C++ mutual exclusion helper classe...
This header file is part of the C++ CANopen application library; it contains the SDO error declaratio...
The internal implementation of the CANopen device description.