|
virtual ev::Executor | GetExecutor () const noexcept=0 |
| Returns the executor used to execute event handlers for this driver, including SDO confirmation functions.
|
|
virtual uint8_t | netid () const noexcept=0 |
| Returns the network-ID.
|
|
virtual uint8_t | id () const noexcept=0 |
| Returns the node-ID.
|
|
virtual void | OnCanState (io::CanState new_state, io::CanState old_state) noexcept=0 |
| The function invoked when a CAN bus state change is detected. More...
|
|
virtual void | OnCanError (io::CanError error) noexcept=0 |
| The function invoked when an error is detected on the CAN bus. More...
|
|
virtual void | OnCommand (NmtCommand cs) noexcept=0 |
| The function invoked when an NMT state change occurs on the master. More...
|
|
virtual void | OnNodeGuarding (bool occurred) noexcept=0 |
| The function invoked when a node guarding timeout event occurs or is resolved for the remote node. More...
|
|
virtual void | OnHeartbeat (bool occurred) noexcept=0 |
| The function invoked when a heartbeat timeout event occurs or is resolved for the remote node. More...
|
|
virtual void | OnState (NmtState st) noexcept=0 |
| The function invoked when an NMT state change or boot-up event is detected for the remote node by the heartbeat protocol. More...
|
|
virtual void | OnBoot (NmtState st, char es, const ::std::string &what) noexcept=0 |
| The function invoked when the NMT 'boot slave' process completes for the remote node. More...
|
|
virtual void | OnConfig (::std::function< void(::std::error_code ec)> res) noexcept=0 |
| The function invoked when the 'update configuration' step is reached during the NMT 'boot slave' process of the remote node. More...
|
|
virtual void | OnDeconfig (::std::function< void(::std::error_code ec)> res) noexcept=0 |
| The function invoked by BasicMaster::AsyncDeconfig() to start the deconfiguration process. More...
|
|
virtual void | OnSync (uint8_t cnt, const time_point &t) noexcept=0 |
| The function invoked when a SYNC message is sent/received by the master. More...
|
|
virtual void | OnSyncError (uint16_t eec, uint8_t er) noexcept=0 |
| The function invoked when the data length of a received SYNC message does not match. More...
|
|
virtual void | OnTime (const ::std::chrono::system_clock::time_point &abs_time) noexcept=0 |
| The function invoked when a TIME message is received by the master. More...
|
|
virtual void | OnEmcy (uint16_t eec, uint8_t er, uint8_t msef[5]) noexcept=0 |
| The function invoked when an EMCY message is received from the remote node. More...
|
|
The abstract driver interface for a remote CANopen node.
Definition at line 36 of file driver.hpp.
virtual void lely::canopen::DriverBase::OnNodeGuarding |
( |
bool |
occurred | ) |
|
|
pure virtualnoexcept |
The function invoked when a node guarding timeout event occurs or is resolved for the remote node.
Note that depending on the value of object 1029:01 (Error behavior object) in the object dictionary of the master, the occurrence of a node guarding event MAY trigger an NMT state transition on the master. If so, this function is called after the state change completes.
- Parameters
-
occurred | true if the node guarding event occurred, false if it was resolved. |
- See also
- BasicMaster::OnNodeGuarding()
Implemented in lely::canopen::BasicDriver, and lely::canopen::BasicLogicalDriver< BasicDriver >.
virtual void lely::canopen::DriverBase::OnHeartbeat |
( |
bool |
occurred | ) |
|
|
pure virtualnoexcept |
The function invoked when a heartbeat timeout event occurs or is resolved for the remote node.
Note that depending on the value of object 1029:01 (Error behavior object) in the object dictionary of the master, the occurrence of a heartbeat timeout event MAY trigger an NMT state transition on the master. If so, this function is called after the state change completes.
- Parameters
-
occurred | true if the heartbeat timeout event occurred, false if it was resolved. |
- See also
- BasicMaster::OnHeartbeat()
Implemented in lely::canopen::BasicDriver, and lely::canopen::BasicLogicalDriver< BasicDriver >.
virtual void lely::canopen::DriverBase::OnConfig |
( |
::std::function< void(::std::error_code ec)> |
res | ) |
|
|
pure virtualnoexcept |
The function invoked when the 'update configuration' step is reached during the NMT 'boot slave' process of the remote node.
The 'boot slave' process is halted until the result of the 'update configuration' step is communicated to the master.
Note that OnConfig()
MUST be a non-blocking function; the configuration update MUST be executed asynchronously or run in a different thread.
- Parameters
-
res | the function to invoke on completion of the 'update configuration' step. The argument to res is the result: 0 on success, or an SDO abort code on error. |
- See also
- BasicMaster::OnConfig()
Implemented in lely::canopen::BasicDriver, and lely::canopen::BasicLogicalDriver< BasicDriver >.