Lely core libraries
2.3.4
|
The base class for drivers for remote CANopen nodes. More...
#include <driver.hpp>
Public Member Functions | |
BasicDriver (ev_exec_t *exec, BasicMaster &master, uint8_t id) | |
Creates a new driver for a remote CANopen node and registers it with the master. More... | |
BasicDriver (BasicMaster &master, uint8_t id) | |
Creates a new driver for a remote CANopen node and registers it with the master. | |
ev::Executor | GetExecutor () const noexcept final |
Returns the executor used to execute event handlers for this driver, including SDO confirmation functions. | |
uint8_t | netid () const noexcept final |
Returns the network-ID. | |
uint8_t | id () const noexcept final |
Returns the node-ID. | |
void | ConfigHeartbeat (const ::std::chrono::milliseconds &ms, ::std::error_code &ec) |
Configures heartbeat consumption by updating CANopen object 1016 (Consumer heartbeat time). More... | |
void | ConfigHeartbeat (const ::std::chrono::milliseconds &ms) |
Configures heartbeat consumption by updating CANopen object 1016 (Consumer heartbeat time). More... | |
bool | Boot () |
Requests the NMT 'boot slave' process for the remote node. More... | |
bool | IsReady () const |
Returns true if the remote node is ready (i.e., the NMT boot slave process has successfully completed and no subsequent boot-up event has been received) and false if not. More... | |
void | Error () |
Indicates the occurrence of an error event on the remote node and triggers the error handling process. More... | |
template<class T > | |
void | DamMpdoEvent (int num, uint16_t idx, uint8_t subidx, T value) |
Triggers the transmission of a destination address mode multiplex PDO (DAM-MPDO). More... | |
template<class F > | |
void | SubmitWait (const time_point &t, F &&f) |
Submits a wait operation. More... | |
template<class F > | |
void | SubmitWait (const duration &d, F &&f) |
Submits a wait operation. More... | |
SdoFuture< void > | AsyncWait (const time_point &t) |
Submits an asynchronous wait operation and creates a future which becomes ready once the wait operation completes (or is canceled). More... | |
SdoFuture< void > | AsyncWait (const duration &d) |
Submits an asynchronous wait operation and creates a future which becomes ready once the wait operation completes (or is canceled). More... | |
template<class T , class F > | |
void | SubmitRead (uint16_t idx, uint8_t subidx, F &&con) |
Equivalent to SubmitRead(uint16_t idx, uint8_t subidx, F&& con, const ::std::chrono::milliseconds& timeout), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class T , class F > | |
void | SubmitRead (uint16_t idx, uint8_t subidx, F &&con, ::std::error_code &ec) |
Equivalent to SubmitRead(uint16_t idx, uint8_t subidx, F&& con, const ::std::chrono::milliseconds& timeout, ::std::error_code& ec), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class T , class F > | |
void | SubmitRead (uint16_t idx, uint8_t subidx, F &&con, const ::std::chrono::milliseconds &timeout) |
Equivalent to SubmitRead(uint16_t idx, uint8_t subidx, F&& con, const ::std::chrono::milliseconds& timeout, ::std::error_code& ec), except that it throws lely::canopen::SdoError on error. | |
template<class T , class F > | |
void | SubmitRead (uint16_t idx, uint8_t subidx, F &&con, const ::std::chrono::milliseconds &timeout, ::std::error_code &ec) |
Queues an asynchronous read (SDO upload) operation. More... | |
template<class T , class F > | |
void | SubmitBlockRead (uint16_t idx, uint8_t subidx, F &&con) |
Equivalent to SubmitBlockRead(uint16_t idx, uint8_t subidx, F&& con, const ::std::chrono::milliseconds& timeout), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class T , class F > | |
void | SubmitBlockRead (uint16_t idx, uint8_t subidx, F &&con, ::std::error_code &ec) |
Equivalent to SubmitBlockRead(uint16_t idx, uint8_t subidx, F&& con, const ::std::chrono::milliseconds& timeout, ::std::error_code& ec), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class T , class F > | |
void | SubmitBlockRead (uint16_t idx, uint8_t subidx, F &&con, const ::std::chrono::milliseconds &timeout) |
Equivalent to SubmitBlockRead(uint16_t idx, uint8_t subidx, F&& con, const ::std::chrono::milliseconds& timeout, ::std::error_code& ec), except that it throws lely::canopen::SdoError on error. | |
template<class T , class F > | |
void | SubmitBlockRead (uint16_t idx, uint8_t subidx, F &&con, const ::std::chrono::milliseconds &timeout, ::std::error_code &ec) |
Queues an asynchronous read (SDO block upload) operation. More... | |
template<class T , class F > | |
void | SubmitWrite (uint16_t idx, uint8_t subidx, T &&value, F &&con) |
Equivalent to SubmitWrite(uint16_t idx, uint8_t subidx, T&& value, F&& con, const ::std::chrono::milliseconds& timeout), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class T , class F > | |
void | SubmitWrite (uint16_t idx, uint8_t subidx, T &&value, F &&con, ::std::error_code &ec) |
Equivalent to SubmitWrite(uint16_t idx, uint8_t subidx, T&& value, F&& con, const ::std::chrono::milliseconds& timeout, ::std::error_code& ec), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class T , class F > | |
void | SubmitWrite (uint16_t idx, uint8_t subidx, T &&value, F &&con, const ::std::chrono::milliseconds &timeout) |
Equivalent to SubmitWrite(uint16_t idx, uint8_t subidx, T&& value, F&& con, const ::std::chrono::milliseconds& timeout, ::std::error_code& ec), except that it throws lely::canopen::SdoError on error. | |
template<class T , class F > | |
void | SubmitWrite (uint16_t idx, uint8_t subidx, T &&value, F &&con, const ::std::chrono::milliseconds &timeout, ::std::error_code &ec) |
Queues an asynchronous write (SDO download) operation. More... | |
template<class T , class F > | |
void | SubmitBlockWrite (uint16_t idx, uint8_t subidx, T &&value, F &&con) |
Equivalent to SubmitBlockWrite(uint16_t idx, uint8_t subidx, T&& value, F&& con, const ::std::chrono::milliseconds& timeout), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class T , class F > | |
void | SubmitBlockWrite (uint16_t idx, uint8_t subidx, T &&value, F &&con, ::std::error_code &ec) |
Equivalent to SubmitBlockWrite(uint16_t idx, uint8_t subidx, T&& value, F&& con, const ::std::chrono::milliseconds& timeout, ::std::error_code& ec), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class T , class F > | |
void | SubmitBlockWrite (uint16_t idx, uint8_t subidx, T &&value, F &&con, const ::std::chrono::milliseconds &timeout) |
Equivalent to SubmitBlockWrite(uint16_t idx, uint8_t subidx, T&& value, F&& con, const ::std::chrono::milliseconds& timeout, ::std::error_code& ec), except that it throws lely::canopen::SdoError on error. | |
template<class T , class F > | |
void | SubmitBlockWrite (uint16_t idx, uint8_t subidx, T &&value, F &&con, const ::std::chrono::milliseconds &timeout, ::std::error_code &ec) |
Queues an asynchronous write (SDO block download) operation. More... | |
template<class F > | |
void | SubmitWriteDcf (const uint8_t *begin, const uint8_t *end, F &&con) |
Equivalent to SubmitWriteDcf(const uint8_t* begin, const uint8_t* end, F&& con, const ::std::chrono::milliseconds& timeout), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class F > | |
void | SubmitWriteDcf (const uint8_t *begin, const uint8_t *end, F &&con, ::std::error_code &ec) |
Equivalent to SubmitWriteDcf(const uint8_t* begin, const uint8_t* end, F&& con, const ::std::chrono::milliseconds& timeout, ::std::error_code& ec), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class F > | |
void | SubmitWriteDcf (const uint8_t *begin, const uint8_t *end, F &&con, const ::std::chrono::milliseconds &timeout) |
Equivalent to SubmitWriteDcf(const uint8_t* begin, const uint8_t* end, F&& con, const ::std::chrono::milliseconds& timeout, ::std::error_code& ec), except that it throws lely::canopen::SdoError on error. | |
template<class F > | |
void | SubmitWriteDcf (const uint8_t *begin, const uint8_t *end, F &&con, const ::std::chrono::milliseconds &timeout, ::std::error_code &ec) |
Queues a series of asynchronous write (SDO download) operations. More... | |
template<class F > | |
void | SubmitWriteDcf (const char *path, F &&con) |
Equivalent to SubmitWriteDcf(const char* path, F&& con, const ::std::chrono::milliseconds& timeout), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class F > | |
void | SubmitWriteDcf (const char *path, F &&con, ::std::error_code &ec) |
Equivalent to SubmitWriteDcf(const char* path, F&& con, const ::std::chrono::milliseconds& timeout, ::std::error_code& ec), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class F > | |
void | SubmitWriteDcf (const char *path, F &&con, const ::std::chrono::milliseconds &timeout) |
Equivalent to SubmitWriteDcf(const char* path, F&& con, const ::std::chrono::milliseconds& timeout, ::std::error_code& ec), except that it throws lely::canopen::SdoError on error. | |
template<class F > | |
void | SubmitWriteDcf (const char *path, F &&con, const ::std::chrono::milliseconds &timeout, ::std::error_code &ec) |
Queues a series of asynchronous write (SDO download) operations. More... | |
template<class T > | |
SdoFuture< T > | AsyncRead (uint16_t idx, uint8_t subidx) |
Equivalent to AsyncRead(uint16_t idx, uint8_t subidx, const ::std::chrono::milliseconds& timeout), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class T > | |
SdoFuture< T > | AsyncRead (uint16_t idx, uint8_t subidx, const ::std::chrono::milliseconds &timeout) |
Queues an asynchronous read (SDO upload) operation and creates a future which becomes ready once the request completes (or is canceled). More... | |
template<class T > | |
SdoFuture< T > | AsyncBlockRead (uint16_t idx, uint8_t subidx) |
Equivalent to AsyncBlockRead(uint16_t idx, uint8_t subidx, const ::std::chrono::milliseconds& timeout), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class T > | |
SdoFuture< T > | AsyncBlockRead (uint16_t idx, uint8_t subidx, const ::std::chrono::milliseconds &timeout) |
Queues an asynchronous read (SDO block upload) operation and creates a future which becomes ready once the request completes (or is canceled). More... | |
template<class T > | |
SdoFuture< void > | AsyncWrite (uint16_t idx, uint8_t subidx, T &&value) |
Equivalent to AsyncWrite(uint16_t idx, uint8_t subidx, T&& value, const ::std::chrono::milliseconds& timeout), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class T > | |
SdoFuture< void > | AsyncWrite (uint16_t idx, uint8_t subidx, T &&value, const ::std::chrono::milliseconds &timeout) |
Queues an asynchronous write (SDO download) operation and creates a future which becomes ready once the request completes (or is canceled). More... | |
template<class T > | |
SdoFuture< void > | AsyncBlockWrite (uint16_t idx, uint8_t subidx, T &&value) |
Equivalent to AsyncBlockWrite(uint16_t idx, uint8_t subidx, T&& value, const ::std::chrono::milliseconds& timeout), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
template<class T > | |
SdoFuture< void > | AsyncBlockWrite (uint16_t idx, uint8_t subidx, T &&value, const ::std::chrono::milliseconds &timeout) |
Queues an asynchronous write (SDO block download) operation and creates a future which becomes ready once the request completes (or is canceled). More... | |
SdoFuture< void > | AsyncWriteDcf (const uint8_t *begin, const uint8_t *end) |
Equivalent to AsyncWriteDcf(const uint8_t* begin, const uint8_t* end, const ::std::chrono::milliseconds& timeout), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
SdoFuture< void > | AsyncWriteDcf (const uint8_t *begin, const uint8_t *end, const ::std::chrono::milliseconds &timeout) |
Queues a series of asynchronous write (SDO download) operations, corresponding to the entries in the specified concise DCF, and creates a future which becomes ready once all requests complete (or an error occurs). More... | |
SdoFuture< void > | AsyncWriteDcf (const char *path) |
Equivalent to AsyncWriteDcf(const char* path, const ::std::chrono::milliseconds& timeout), except that it uses the SDO timeout given by lely::canopen::BasicMaster::GetTimeout(). | |
SdoFuture< void > | AsyncWriteDcf (const char *path, const ::std::chrono::milliseconds &timeout) |
Queues a series of asynchronous write (SDO download) operations, corresponding to the entries in the specified concise DCF, and creates a future which becomes ready once all requests complete (or an error occurs). More... | |
void | Insert (LogicalDriverBase &driver) |
Registers a logical device driver for the remote node. More... | |
void | Erase (LogicalDriverBase &driver) |
Unregisters a logical device driver for the remote node. More... | |
template<class F , class... Args> | |
void | Post (F &&f, Args &&... args) |
Schedules the specified Callable object for execution by the executor for this driver. More... | |
Data Fields | |
BasicMaster & | master |
A reference to the master with which this driver is registered. | |
class BasicMaster::RpdoMapped | rpdo_mapped |
An accessor providing read-only access to RPDO-mapped objects in the remote object dictionary. More... | |
class BasicMaster::TpdoMapped | tpdo_mapped |
A mutator providing read/write access to TPDO-mapped objects in the remote object dictionary. More... | |
TpdoEventMutex & | tpdo_event_mutex |
Protected Member Functions | |
void | OnCanState (io::CanState new_state, io::CanState old_state) noexcept override |
The default implementation notifies all registered logical device drivers. More... | |
void | OnCanError (io::CanError error) noexcept override |
The default implementation notifies all registered logical device drivers. More... | |
void | OnRpdoWrite (uint16_t idx, uint8_t subidx) noexcept override |
The default implementation notifies all registered logical device drivers, unless the object index is part of the standardized profile area of a logical device (6000..9FFF). More... | |
void | OnCommand (NmtCommand cs) noexcept override |
The default implementation notifies all registered logical device drivers. More... | |
void | OnHeartbeat (bool occurred) noexcept override |
The default implementation notifies all registered logical device drivers. More... | |
void | OnState (NmtState st) noexcept override |
The default implementation notifies all registered logical device drivers. More... | |
void | OnSync (uint8_t cnt, const time_point &t) noexcept override |
The default implementation notifies all registered logical device drivers. More... | |
void | OnSyncError (uint16_t eec, uint8_t er) noexcept override |
The default implementation notifies all registered logical device drivers. More... | |
void | OnTime (const ::std::chrono::system_clock::time_point &abs_time) noexcept override |
The default implementation notifies all registered logical device drivers. More... | |
void | OnEmcy (uint16_t eec, uint8_t er, uint8_t msef[5]) noexcept override |
The default implementation notifies all registered logical device drivers. More... | |
void | OnNodeGuarding (bool occurred) noexcept override |
The default implementation notifies all registered logical device drivers. More... | |
void | OnBoot (NmtState st, char es, const ::std::string &what) noexcept override |
The default implementation notifies all registered logical device drivers. More... | |
void | OnConfig (::std::function< void(::std::error_code ec)> res) noexcept override |
The default implementation invokes AsyncConfig() to start the configuration process for all registered logical device drivers. More... | |
void | OnDeconfig (::std::function< void(::std::error_code ec)> res) noexcept override |
The default implementation invokes AsyncDeconfig() to start the deconfiguration process for all registered logical device drivers. More... | |
SdoFuture< void > | AsyncConfig (int num=0) |
Invokes LogicalDriverBase::AsyncConfig() for the specified logical device driver. More... | |
SdoFuture< void > | AsyncDeconfig (int num=0) |
Invokes LogicalDriverBase::AsyncDeconfig() for the specified logical device driver. More... | |
The base class for drivers for remote CANopen nodes.
Definition at line 278 of file driver.hpp.
|
explicit |
Creates a new driver for a remote CANopen node and registers it with the master.
exec | the executor used to execute event handlers for this driver, including SDO confirmation functions. If exec is a null pointer, the CANopen master executor is used. |
master | a reference to a CANopen master. |
id | the node-ID of the remote node (in the range [1..127]). |
std::out_of_range | if the node-ID is invalid or already registered. |
Definition at line 40 of file driver.cpp.
|
inline |
Configures heartbeat consumption by updating CANopen object 1016 (Consumer heartbeat time).
ms | the heartbeat timeout (in milliseconds). |
ec | if heartbeat consumption cannot be configured, the SDO abort code is stored in ec. |
Definition at line 334 of file driver.hpp.
|
inline |
Configures heartbeat consumption by updating CANopen object 1016 (Consumer heartbeat time).
ms | the heartbeat timeout (in milliseconds). |
lely::canopen::SdoError | if heartbeat consumption cannot be configured. |
Definition at line 349 of file driver.hpp.
|
inline |
Requests the NMT 'boot slave' process for the remote node.
OnBoot() is invoked once the boot-up process completes.
Definition at line 360 of file driver.hpp.
|
inline |
Returns true if the remote node is ready (i.e., the NMT boot slave
process has successfully completed and no subsequent boot-up event has been received) and false if not.
If this function returns true, the default client-SDO service is available.
Definition at line 374 of file driver.hpp.
|
inline |
Indicates the occurrence of an error event on the remote node and triggers the error handling process.
Definition at line 385 of file driver.hpp.
|
inline |
Triggers the transmission of a destination address mode multiplex PDO (DAM-MPDO).
num | the Transmit-PDO number (in the range [1..512]). |
idx | the remote object index. |
subidx | the remote object sub-index. |
value | the value to be transmitted. |
Definition at line 402 of file driver.hpp.
|
inline |
Submits a wait operation.
The completion task is submitted for execution once the specified absolute timeout expires.
t | the absolute expiration time of the wait operation. |
f | the function to be called on completion of the wait operation. |
Definition at line 415 of file driver.hpp.
|
inline |
Submits a wait operation.
The completion task is submitted for execution once the specified relative timeout expires.
d | the relative expiration time of the wait operation. |
f | the function to be called on completion of the wait operation. |
Definition at line 428 of file driver.hpp.
|
inline |
Submits an asynchronous wait operation and creates a future which becomes ready once the wait operation completes (or is canceled).
t | the absolute expiration time of the wait operation. |
Definition at line 441 of file driver.hpp.
|
inline |
Submits an asynchronous wait operation and creates a future which becomes ready once the wait operation completes (or is canceled).
d | the relative expiration time of the wait operation. |
Definition at line 454 of file driver.hpp.
|
inline |
Queues an asynchronous read (SDO upload) operation.
This function reads the value of a sub-object in a remote object dictionary.
idx | the object index. |
subidx | the object sub-index. |
con | the confirmation function to be called on completion of the SDO request. |
timeout | the SDO timeout. If, after the request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT. |
ec | the error code (0 on success). ec == SdoErrc::NO_SDO if no client-SDO is available. |
Definition at line 514 of file driver.hpp.
|
inline |
Queues an asynchronous read (SDO block upload) operation.
This function reads the value of a sub-object in a remote object dictionary using SDO block transfer. SDO block transfer is more effecient than segmented transfer for large values, but may not be supported by the remote server. If not, the operation will most likely fail with the SdoErrc::NO_CS abort code.
idx | the object index. |
subidx | the object sub-index. |
con | the confirmation function to be called on completion of the SDO request. |
timeout | the SDO timeout. If, after the request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT. |
ec | the error code (0 on success). ec == SdoErrc::NO_SDO if no client-SDO is available. |
Definition at line 582 of file driver.hpp.
|
inline |
Queues an asynchronous write (SDO download) operation.
This function writes a value to a sub-object in a remote object dictionary.
idx | the object index. |
subidx | the object sub-index. |
value | the value to be written. |
con | the confirmation function to be called on completion of the SDO request. |
timeout | the SDO timeout. If, after the request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT. |
ec | the error code (0 on success). ec == SdoErrc::NO_SDO if no client-SDO is available. |
Definition at line 648 of file driver.hpp.
|
inline |
Queues an asynchronous write (SDO block download) operation.
This function writes a value to a sub-object in a remote object dictionary using SDO block transfer. SDO block transfer is more effecient than segmented transfer for large values, but may not be supported by the remote server. If not, the operation will most likely fail with the SdoErrc::NO_CS abort code.
idx | the object index. |
subidx | the object sub-index. |
value | the value to be written. |
con | the confirmation function to be called on completion of the SDO request. |
timeout | the SDO timeout. If, after the request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT. |
ec | the error code (0 on success). ec == SdoErrc::NO_SDO if no client-SDO is available. |
Definition at line 720 of file driver.hpp.
|
inline |
Queues a series of asynchronous write (SDO download) operations.
This function writes each entry in the specified concise DCF to a sub-object in a remote object dictionary.
begin | a pointer the the first byte in a concise DCF (see object 1F22 in CiA 302-3 version 4.1.0). |
end | a pointer to one past the last byte in the concise DCF. At most end - begin bytes are read. |
con | the confirmation function to be called when all SDO download requests are successfully completed, or when an error occurs. |
timeout | the SDO timeout. If, after a single request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT. |
ec | the error code (0 on success). ec == SdoErrc::NO_SDO if no client-SDO is available. |
Definition at line 789 of file driver.hpp.
|
inline |
Queues a series of asynchronous write (SDO download) operations.
This function writes each entry in the specified concise DCF to a sub-object in a remote object dictionary.
path | the path to a concise DCF. |
con | the confirmation function to be called when all SDO download requests are successfully completed, or when an error occurs. |
timeout | the SDO timeout. If, after a single request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT. |
ec | the error code (0 on success). ec == SdoErrc::NO_SDO if no client-SDO is available. |
Definition at line 852 of file driver.hpp.
|
inline |
Queues an asynchronous read (SDO upload) operation and creates a future which becomes ready once the request completes (or is canceled).
idx | the object index. |
subidx | the object sub-index. |
timeout | the SDO timeout. If, after the request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT. |
Definition at line 887 of file driver.hpp.
|
inline |
Queues an asynchronous read (SDO block upload) operation and creates a future which becomes ready once the request completes (or is canceled).
This function uses SDO block transfer, which is more effecient than segmented transfer for large values, but may not be supported by the remote server. If not, the operation will most likely fail with the SdoErrc::NO_CS abort code.
idx | the object index. |
subidx | the object sub-index. |
timeout | the SDO timeout. If, after the request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT. |
Definition at line 924 of file driver.hpp.
|
inline |
Queues an asynchronous write (SDO download) operation and creates a future which becomes ready once the request completes (or is canceled).
idx | the object index. |
subidx | the object sub-index. |
value | the value to be written. |
timeout | the SDO timeout. If, after the request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT. |
Definition at line 958 of file driver.hpp.
|
inline |
Queues an asynchronous write (SDO block download) operation and creates a future which becomes ready once the request completes (or is canceled).
This function uses SDO block transfer, which is more effecient than segmented transfer for large values, but may not be supported by the remote server. If not, the operation will most likely fail with the SdoErrc::NO_CS abort code.
idx | the object index. |
subidx | the object sub-index. |
value | the value to be written. |
timeout | the SDO timeout. If, after the request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT. |
Definition at line 997 of file driver.hpp.
|
inline |
Queues a series of asynchronous write (SDO download) operations, corresponding to the entries in the specified concise DCF, and creates a future which becomes ready once all requests complete (or an error occurs).
begin | a pointer the the first byte in a concise DCF (see object 1F22 in CiA 302-3 version 4.1.0). |
end | a pointer to one past the last byte in the concise DCF. At most end - begin bytes are read. |
timeout | the SDO timeout. If, after a single request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT. |
Definition at line 1031 of file driver.hpp.
|
inline |
Queues a series of asynchronous write (SDO download) operations, corresponding to the entries in the specified concise DCF, and creates a future which becomes ready once all requests complete (or an error occurs).
path | the path to a concise DCF. |
timeout | the SDO timeout. If, after a single request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT. |
Definition at line 1061 of file driver.hpp.
void lely::canopen::BasicDriver::Insert | ( | LogicalDriverBase & | driver | ) |
Registers a logical device driver for the remote node.
If an event occurs for the node, or for the entire CANopen network, the corresponding method of the logical driver will be invoked.
std::out_of_range | if the logical device number is invalid or already registered. |
Definition at line 53 of file driver.cpp.
void lely::canopen::BasicDriver::Erase | ( | LogicalDriverBase & | driver | ) |
Unregisters a logical device driver for the remote node.
Definition at line 66 of file driver.cpp.
|
inline |
Schedules the specified Callable object for execution by the executor for this driver.
Definition at line 1092 of file driver.hpp.
|
overrideprotectedvirtualnoexcept |
The default implementation notifies all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 135 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation notifies all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 141 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation notifies all registered logical device drivers, unless the object index is part of the standardized profile area of a logical device (6000..9FFF).
In that case, the driver registered for the corresponding logical device is notified and the object index is adjusted to the standardized profile area of the first logical device (6000..67FF).
Implements lely::canopen::DriverBase.
Definition at line 146 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation notifies all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 157 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation notifies all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 162 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation notifies all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 167 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation notifies all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 172 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation notifies all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 177 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation notifies all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 182 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation notifies all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 188 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation notifies all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 193 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation notifies all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 198 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation invokes AsyncConfig() to start the configuration process for all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 203 of file driver.cpp.
|
overrideprotectedvirtualnoexcept |
The default implementation invokes AsyncDeconfig() to start the deconfiguration process for all registered logical device drivers.
Implements lely::canopen::DriverBase.
Definition at line 234 of file driver.cpp.
|
protected |
Invokes LogicalDriverBase::AsyncConfig() for the specified logical device driver.
If num is 0, invokes LogicalDriverBase::AsyncConfig() for all registered logical device drivers and returns a future which becomes ready once all configuration processes complete.
Definition at line 72 of file driver.cpp.
|
protected |
Invokes LogicalDriverBase::AsyncDeconfig() for the specified logical device driver.
If num is 0, invokes LogicalDriverBase::AsyncDeconfig() for all registered logical device drivers and returns a future which becomes ready once all deconfiguration processes complete.
Definition at line 103 of file driver.cpp.
class BasicMaster::RpdoMapped lely::canopen::BasicDriver::rpdo_mapped |
An accessor providing read-only access to RPDO-mapped objects in the remote object dictionary.
Definition at line 1097 of file driver.hpp.
class BasicMaster::TpdoMapped lely::canopen::BasicDriver::tpdo_mapped |
A mutator providing read/write access to TPDO-mapped objects in the remote object dictionary.
Definition at line 1097 of file driver.hpp.
TpdoEventMutex& lely::canopen::BasicDriver::tpdo_event_mutex |
Definition at line 1116 of file driver.hpp.