CANOPEN_CLIENT Driver 0.1.0
API reference
Loading...
Searching...
No Matches
canopen_client.hpp
Go to the documentation of this file.
1
13#ifndef CANOPEN_CLIENT_HPP
14#define CANOPEN_CLIENT_HPP
15
16#include <algorithm>
17#include <array>
18#include <cstddef>
19#include <cstdint>
20#include <span>
21
26#include "canopen_client_version.h"
27
28namespace canopen_client {
29
30namespace detail {
31
32// Optional hook: a `Declares*` concept only tests the name, the `Has*` concept the exact signature,
33// `noexcept` and the result type; the driver rejects a hook that is declared but does not match
34// (handbook KB-CPP20-007).
35
37template <typename Port>
38concept DeclaresLog = requires(Port& port) { port.Log(LogLevel::Info, ""); };
39
41template <typename Port>
42concept HasLog =
43 requires { ExactHook<Port, void(LogLevel, const char*) noexcept>::Take(&Port::Log); };
44
46template <typename Port>
47concept DeclaresReceive = requires(Port& port, CanFrame& frame) { port.Receive(frame, 0_u32); };
48
50template <typename Port>
51concept DeclaresNowUs = requires(Port& port) { port.NowUs(); };
52
54template <typename Port>
55void Log(Port& port, [[maybe_unused]] LogLevel level,
56 [[maybe_unused]] const char* message) noexcept {
57 if constexpr (HasLog<Port>) {
58 port.Log(level, message);
59 } else {
60 static_cast<void>(port);
61 }
62}
63
65struct MonitorSlot {
66 bool used{false};
67 bool toggle{false};
68 uint8_t node{0};
69 uint32_t timeout_us{0};
70 NodeStatus status{};
71};
72
74struct PdoSlot {
75 bool used{false};
76 uint8_t dlc{0};
77 PdoSample sample{};
78};
79
81enum class PendingKind : uint8_t {
82 None = 0,
83 Sdo,
84 Guard,
85 RawSdo,
86};
87
89struct Pending {
90 PendingKind kind{PendingKind::None};
91 uint8_t node{0};
92 uint16_t index{0};
93 uint8_t sub{0};
95 bool toggle{false};
96 bool done{false};
97 Error error{Error::Ok};
98 uint32_t abort_code{0};
99 SdoReply reply{};
101};
102
103} // namespace detail
104
131template <CanPort Port>
132class Client {
133 static_assert(!detail::DeclaresLog<Port> || detail::HasLog<Port>,
134 "canopen_client: the optional Log hook must be `void Log(LogLevel, const char* "
135 "message) noexcept`");
136 static_assert(detail::DeclaresReceive<Port> == detail::DeclaresNowUs<Port>,
137 "canopen_client: a port implements both `Receive` and `NowUs`, or neither");
138 static_assert(!detail::DeclaresReceive<Port> || CanRxPort<Port>,
139 "canopen_client: the hooks must be `RxStatus Receive(CanFrame&, uint32_t "
140 "timeout_us) noexcept` and `uint32_t NowUs() noexcept`");
141
142public:
148 explicit Client(Port& port, const Config& config = {}) noexcept : port_(port), config_(config) {}
149
151 Client(const Client&) = delete;
153 Client& operator=(const Client&) = delete;
154
166
168 [[nodiscard]] bool IsInitialized() const noexcept {
169 return initialized_;
170 }
171
178
184 Result<void> SetConfig(const Config& config) noexcept;
185
187 [[nodiscard]] const Config& GetConfig() const& noexcept {
188 return config_;
189 }
191 void GetConfig() const&& = delete;
192
193 // --- NMT master ---------------------------------------------------------------------------
194
204 Result<void> SendNmt(NmtCommand command, uint8_t node) noexcept;
205
206 // --- SYNC producer, RPDO and unconfirmed SDO (all ports)
207 // ------------------------------------------
208
214 Result<void> SendSync(uint8_t counter = 0) noexcept;
215
222 Result<void> SendRpdo(uint16_t cob_id, std::span<const uint8_t> data) noexcept;
223
234 Result<void> SdoDownloadUnconfirmed(uint8_t node, uint16_t index, uint8_t sub,
235 std::span<const uint8_t> data) noexcept;
236
237 // --- Raw access (diagnostics) -----------------------------------------------------------------
238
249 Result<void> SendRawFrame(const CanFrame& frame) noexcept;
250
258 Result<CanFrame> ReadRawFrame(uint32_t timeout_us) noexcept
259 requires CanRxPort<Port>;
260
274 Result<CanFrame> ReadRawSdo(uint8_t node, uint16_t index, uint8_t sub) noexcept
275 requires CanRxPort<Port>;
276
287 Result<CanFrame> WriteRawSdo(uint8_t node, uint16_t index, uint8_t sub,
288 std::span<const uint8_t> data) noexcept
289 requires CanRxPort<Port>;
290
293 [[nodiscard]] const CanFrame& GetLastRawFrame() const& noexcept {
294 return last_raw_;
295 }
297 void GetLastRawFrame() const&& = delete;
298
299 // --- Receive path -----------------------------------------------------------------------------
300
308 Result<FrameClass> Poll(uint32_t timeout_us) noexcept
309 requires CanRxPort<Port>;
310
319 Result<void> MonitorNode(uint8_t node, uint32_t timeout_us) noexcept
320 requires CanRxPort<Port>;
321
327 Result<void> UnmonitorNode(uint8_t node) noexcept
328 requires CanRxPort<Port>;
329
337 Result<NodeStatus> GetNodeStatus(uint8_t node) noexcept
338 requires CanRxPort<Port>;
339
347 Result<void> ClearBootUp(uint8_t node) noexcept
348 requires CanRxPort<Port>;
349
358 Result<NmtState> GuardNode(uint8_t node) noexcept
359 requires CanRxPort<Port>;
360
366 bool PopEmcy(EmcyEvent& event) noexcept
367 requires CanRxPort<Port>;
368
370 [[nodiscard]] const Stats& GetStats() const& noexcept {
371 return stats_;
372 }
374 void GetStats() const&& = delete;
375
383 Result<void> SubscribeTpdo(uint16_t cob_id, uint8_t dlc) noexcept
384 requires CanRxPort<Port>;
385
391 Result<void> UnsubscribeTpdo(uint16_t cob_id) noexcept
392 requires CanRxPort<Port>;
393
399 Result<PdoSample> ReadTpdo(uint16_t cob_id) const noexcept
400 requires CanRxPort<Port>;
401
402 // --- SDO client -----------------------------------------------------------------------------
403
420 Result<std::size_t> SdoUpload(uint8_t node, uint16_t index, uint8_t sub,
421 std::span<uint8_t> out) noexcept
422 requires CanRxPort<Port>;
423
432 Result<void> SdoDownload(uint8_t node, uint16_t index, uint8_t sub,
433 std::span<const uint8_t> data) noexcept
434 requires CanRxPort<Port>;
435
444 Result<uint8_t> SdoReadU8(uint8_t node, uint16_t index, uint8_t sub) noexcept
445 requires CanRxPort<Port>;
454 Result<uint16_t> SdoReadU16(uint8_t node, uint16_t index, uint8_t sub) noexcept
455 requires CanRxPort<Port>;
464 Result<uint32_t> SdoReadU32(uint8_t node, uint16_t index, uint8_t sub) noexcept
465 requires CanRxPort<Port>;
474 Result<void> SdoWriteU8(uint8_t node, uint16_t index, uint8_t sub, uint8_t value) noexcept
475 requires CanRxPort<Port>;
484 Result<void> SdoWriteU16(uint8_t node, uint16_t index, uint8_t sub, uint16_t value) noexcept
485 requires CanRxPort<Port>;
494 Result<void> SdoWriteU32(uint8_t node, uint16_t index, uint8_t sub, uint32_t value) noexcept
495 requires CanRxPort<Port>;
496
501 [[nodiscard]] const SdoAbortInfo& GetLastAbort() const& noexcept {
502 return last_abort_;
503 }
505 void GetLastAbort() const&& = delete;
506
507 // --- Communication objects of a node
508 // ------------------------------------------------------------
509
515 Result<uint32_t> ReadDeviceType(uint8_t node) noexcept
516 requires CanRxPort<Port>;
517
523 Result<uint8_t> ReadErrorRegister(uint8_t node) noexcept
524 requires CanRxPort<Port>;
525
532 Result<void> WriteHeartbeatProducerTime(uint8_t node, uint16_t period_ms) noexcept
533 requires CanRxPort<Port>;
534
541 Result<void> StoreParameters(uint8_t node, uint8_t group) noexcept
542 requires CanRxPort<Port>;
543
551 Result<void> RestoreDefaults(uint8_t node, uint8_t group) noexcept
552 requires CanRxPort<Port>;
553
554 // --- SYNC producer with a period -------------------------------------------------------------
555
563 Result<void> ConfigureSync(uint32_t period_us, uint8_t counter_overflow) noexcept
564 requires CanRxPort<Port>;
565
573 Result<bool> ServiceSync() noexcept
574 requires CanRxPort<Port>;
575
576 // --- PDO configuration ------------------------------------------------------------------------
577
589 Result<void> ConfigurePdo(uint8_t node, PdoKind kind, uint16_t number,
590 const PdoConfig& config) noexcept
591 requires CanRxPort<Port>;
592
600 Result<void> DisablePdo(uint8_t node, PdoKind kind, uint16_t number) noexcept
601 requires CanRxPort<Port>;
602
612 Result<PdoConfig> ReadPdoConfig(uint8_t node, PdoKind kind, uint16_t number) noexcept
613 requires CanRxPort<Port>;
614
615 // --- CiA 402 drive
616 // -------------------------------------------------------------------------------
617
624 Result<uint16_t> ReadStatusword(uint8_t node, const DriveObjects& objects = {}) noexcept
625 requires CanRxPort<Port>;
626
633 Result<DriveState> ReadDriveState(uint8_t node, const DriveObjects& objects = {}) noexcept
634 requires CanRxPort<Port>;
635
648 Result<void> DriveEnable(uint8_t node, const DriveObjects& objects = {}) noexcept
649 requires CanRxPort<Port>;
650
662 Result<void> DriveDisable(uint8_t node, const DriveObjects& objects = {}) noexcept
663 requires CanRxPort<Port>;
664
671 Result<void> DriveQuickStop(uint8_t node, const DriveObjects& objects = {}) noexcept
672 requires CanRxPort<Port>;
673
683 Result<void> DriveResetFault(uint8_t node, const DriveObjects& objects = {}) noexcept
684 requires CanRxPort<Port>;
685
695 Result<void> SetDriveMode(uint8_t node, OperationMode mode, const DriveObjects& objects = {},
696 Verify verify = Verify::None) noexcept
697 requires CanRxPort<Port>;
698
705 Result<OperationMode> ReadDriveMode(uint8_t node, const DriveObjects& objects = {}) noexcept
706 requires CanRxPort<Port>;
707
708private:
709 // Common
710 Result<void> sendFrame(const CanFrame& frame) noexcept;
711 void resetState() noexcept;
712 void noteNmt(NmtCommand command, uint8_t node) noexcept;
713 // Routing of received frames
714 FrameClass route(const CanFrame& frame) noexcept
715 requires CanRxPort<Port>;
716 FrameClass routeHeartbeat(const CanFrame& frame) noexcept
717 requires CanRxPort<Port>;
718 FrameClass routeEmcy(const CanFrame& frame) noexcept
719 requires CanRxPort<Port>;
720 FrameClass routePdo(const CanFrame& frame) noexcept
721 requires CanRxPort<Port>;
722 void onSdoReply(const CanFrame& frame) noexcept
723 requires CanRxPort<Port>;
724 void onGuardReply(const CanFrame& frame) noexcept
725 requires CanRxPort<Port>;
726 void finish(Error error, uint32_t abort_code) noexcept;
727 void clearPending() noexcept;
728 Result<void> awaitPending(uint32_t timeout_us) noexcept
729 requires CanRxPort<Port>;
730 Result<void> drainRx() noexcept
731 requires CanRxPort<Port>;
732 Result<void> idleFor(uint32_t us) noexcept
733 requires CanRxPort<Port>;
734 [[nodiscard]] detail::MonitorSlot* findSlot(uint8_t node) noexcept;
735 // SDO engine
736 Result<void> sdoBegin(uint8_t node, uint16_t index, uint8_t sub, bool gated) noexcept
737 requires CanRxPort<Port>;
738 Result<void> sdoExchange(const CanFrame& request, SdoReplyKind expect, bool toggle) noexcept
739 requires CanRxPort<Port>;
740 void abortLocal(uint32_t code) noexcept;
741 Result<std::size_t> uploadSegments(std::span<uint8_t> out) noexcept
742 requires CanRxPort<Port>;
743 Result<bool> uploadSegment(std::span<uint8_t> out, std::size_t& got, bool toggle) noexcept
744 requires CanRxPort<Port>;
745 Result<void> downloadSegments(std::span<const uint8_t> data) noexcept
746 requires CanRxPort<Port>;
747 Result<uint32_t> readUnsigned(uint8_t node, uint16_t index, uint8_t sub,
748 std::size_t size) noexcept
749 requires CanRxPort<Port>;
750 Result<void> writeUnsigned(uint8_t node, uint16_t index, uint8_t sub, uint32_t value,
751 std::size_t size, bool gated) noexcept
752 requires CanRxPort<Port>;
753 Result<void> storeOrRestore(uint8_t node, uint16_t index, uint8_t group,
754 uint32_t signature) noexcept
755 requires CanRxPort<Port>;
756 // PDO and drive
757 Result<void> writePdoMapping(uint8_t node, uint16_t map_index, const PdoConfig& config) noexcept
758 requires CanRxPort<Port>;
759 Result<void> writePdoCommunication(uint8_t node, PdoKind kind, uint16_t comm_index,
760 const PdoConfig& config) noexcept
761 requires CanRxPort<Port>;
762 Result<void> safetyWriteControlword(uint8_t node, const DriveObjects& objects,
763 uint16_t word) noexcept
764 requires CanRxPort<Port>;
765 Result<void> waitFaultCleared(uint8_t node, const DriveObjects& objects, uint32_t start) noexcept
766 requires CanRxPort<Port>;
767 [[nodiscard]] bool driveTimedOut(uint32_t start_us) noexcept
768 requires CanRxPort<Port>;
769 [[nodiscard]] uint32_t driveStepLimit() const noexcept;
770 Result<CanFrame> rawExchange(uint8_t node, const CanFrame& request) noexcept
771 requires CanRxPort<Port>;
772
773 Port& port_;
774 Config config_{};
775 bool initialized_{false};
776 // Transfer state lives in the object, not on the stack: a port may keep the pointer it is given
777 // until the frame has left the controller, so `Send()` always gets `tx_`, never a local.
778 CanFrame tx_{};
779 CanFrame last_raw_{};
780 CanFrame rx_{};
781 detail::Pending pending_{};
782 SdoAbortInfo last_abort_{};
783 Stats stats_{};
784 std::array<detail::MonitorSlot, kMonitorCapacity> monitors_{};
785 std::array<detail::PdoSlot, kPdoSubscriptionCapacity> pdos_{};
786 std::array<EmcyEvent, kEmcyQueueCapacity> emcy_{};
787 std::size_t emcy_head_{0};
788 std::size_t emcy_count_{0};
789 uint32_t sync_period_us_{0};
790 uint8_t sync_overflow_{0};
791 uint8_t sync_counter_{0};
792 bool sync_started_{false};
793 uint32_t sync_last_us_{0};
794};
795
798} // namespace canopen_client
799
800// codeql::misra_deviation_next_line(MD-CPP-009)
801#include "../src/canopen_client.ipp" // IWYU pragma: export
802
803#endif // CANOPEN_CLIENT_HPP
The CAN port of the CANopen client driver: the CRTP base and the CanPort and CanRxPort concepts.
Compile-time helpers of the CANOPEN_CLIENT driver: typed integer literals, exact hook matching,...
The CANopen frame codecs: pure functions that build and decode NMT, SYNC, SDO, heartbeat,...
Public types of the CANopen client driver: errors, Result<T>, the CAN frame, the protocol vocabulary ...
A CANopen client on one CAN bus.
Definition canopen_client.hpp:132
void GetConfig() const &&=delete
Not on a temporary driver: the reference would dangle (handbook KB-CPP20-044).
Result< CanFrame > ReadRawFrame(uint32_t timeout_us) noexcept
Diagnostic: take the next frame from the port as it is. One Receive(): no retry, no routing,...
Result< NmtState > GuardNode(uint8_t node) noexcept
One node-guarding exchange: a remote frame on 0x700 + node, then the reply, whose toggle bit must alt...
Result< uint32_t > ReadDeviceType(uint8_t node) noexcept
Read the device type (object 0x1000).
Result< void > SetDriveMode(uint8_t node, OperationMode mode, const DriveObjects &objects={}, Verify verify=Verify::None) noexcept
Select the mode of operation.
Result< void > SetConfig(const Config &config) noexcept
Replace the configuration.
const CanFrame & GetLastRawFrame() const &noexcept
Definition canopen_client.hpp:293
Result< void > DriveDisable(uint8_t node, const DriveObjects &objects={}) noexcept
Disable voltage (controlword 0x0000), from any state. Never refused: it ignores the node's heartbeat ...
Result< void > DriveEnable(uint8_t node, const DriveObjects &objects={}) noexcept
Walk the drive to Operation enabled: shutdown, switch on, enable operation, reading the statusword af...
Result< void > SubscribeTpdo(uint16_t cob_id, uint8_t dlc) noexcept
Hold the latest frame of a TPDO identifier for ReadTpdo().
Result< void > DisablePdo(uint8_t node, PdoKind kind, uint16_t number) noexcept
Invalidate a PDO (set bit 31 of its COB-ID, keeping the identifier).
Result< DriveState > ReadDriveState(uint8_t node, const DriveObjects &objects={}) noexcept
Read the statusword and decode the drive state.
Result< void > SdoWriteU32(uint8_t node, uint16_t index, uint8_t sub, uint32_t value) noexcept
Write an unsigned 32-bit object (expedited, four bytes).
void GetLastAbort() const &&=delete
Not on a temporary driver: the reference would dangle (handbook KB-CPP20-044).
Result< void > UnmonitorNode(uint8_t node) noexcept
Stop watching a node.
bool PopEmcy(EmcyEvent &event) noexcept
Take the oldest queued emergency message.
Result< NodeStatus > GetNodeStatus(uint8_t node) noexcept
What the consumer knows about a watched node; alive is judged now. The age is a 32-bit microsecond di...
Result< OperationMode > ReadDriveMode(uint8_t node, const DriveObjects &objects={}) noexcept
Read the mode of operation display.
Result< void > SendRawFrame(const CanFrame &frame) noexcept
Diagnostic: send one frame exactly as given. A single Send(): no retry, no routing,...
Client(Port &port, const Config &config={}) noexcept
Bind the driver to a port and store the configuration. No I/O, cannot fail.
Definition canopen_client.hpp:148
Result< void > UnsubscribeTpdo(uint16_t cob_id) noexcept
Stop holding a TPDO identifier.
Result< void > SdoDownload(uint8_t node, uint16_t index, uint8_t sub, std::span< const uint8_t > data) noexcept
Write an object: expedited for 1 to 4 bytes, segmented for more.
Result< void > ClearBootUp(uint8_t node) noexcept
Forget that a boot-up message was seen from a node (NodeStatus::bootup_seen), so the next one (the no...
const Config & GetConfig() const &noexcept
Definition canopen_client.hpp:187
Result< PdoSample > ReadTpdo(uint16_t cob_id) const noexcept
The latest frame received on a subscribed identifier.
Result< void > Deinitialize() noexcept
Mark the driver uninitialised and forget what it received. No bus traffic: nodes are left in the stat...
Result< bool > ServiceSync() noexcept
Send a SYNC when the period has elapsed since the last one (the first call after ConfigureSync() send...
Result< uint16_t > SdoReadU16(uint8_t node, uint16_t index, uint8_t sub) noexcept
Read an unsigned 16-bit object.
const SdoAbortInfo & GetLastAbort() const &noexcept
The last SDO abort, sent by a node or by this driver. No I/O.
Definition canopen_client.hpp:501
Result< void > ConfigureSync(uint32_t period_us, uint8_t counter_overflow) noexcept
Set the SYNC period ServiceSync() keeps.
Result< void > DriveResetFault(uint8_t node, const DriveObjects &objects={}) noexcept
Reset a fault: wait out Fault reaction active, then give controlword bit 7 a rising edge and wait for...
Result< uint32_t > SdoReadU32(uint8_t node, uint16_t index, uint8_t sub) noexcept
Read an unsigned 32-bit object.
const Stats & GetStats() const &noexcept
Definition canopen_client.hpp:370
Result< uint8_t > SdoReadU8(uint8_t node, uint16_t index, uint8_t sub) noexcept
Read an unsigned 8-bit object.
Client(const Client &)=delete
One driver object per bus.
Result< void > SdoDownloadUnconfirmed(uint8_t node, uint16_t index, uint8_t sub, std::span< const uint8_t > data) noexcept
Write 1 to 4 bytes to an object with an expedited SDO download and do not wait for the reply: the tra...
Result< uint16_t > ReadStatusword(uint8_t node, const DriveObjects &objects={}) noexcept
Read the statusword.
Result< std::size_t > SdoUpload(uint8_t node, uint16_t index, uint8_t sub, std::span< uint8_t > out) noexcept
Read an object: expedited when the node answers so, otherwise segmented. A reply that is not the answ...
Result< void > RestoreDefaults(uint8_t node, uint8_t group) noexcept
Restore default parameters (object 0x1011, signature "load"); they apply after the next reset of the ...
Result< FrameClass > Poll(uint32_t timeout_us) noexcept
Wait up to timeout_us for one frame and route it: heartbeat to the node table, EMCY to the queue,...
Result< uint8_t > ReadErrorRegister(uint8_t node) noexcept
Read the error register (object 0x1001).
void GetStats() const &&=delete
Not on a temporary driver: the reference would dangle (handbook KB-CPP20-044).
Result< void > MonitorNode(uint8_t node, uint32_t timeout_us) noexcept
Watch a node's heartbeat. Registering again changes the timeout and keeps what was received.
bool IsInitialized() const noexcept
Definition canopen_client.hpp:168
void GetLastRawFrame() const &&=delete
Not on a temporary driver: the reference would dangle (handbook KB-CPP20-044).
Result< void > StoreParameters(uint8_t node, uint8_t group) noexcept
Store parameters to non-volatile memory (object 0x1010, signature "save").
Client & operator=(const Client &)=delete
One driver object per bus.
Result< void > WriteHeartbeatProducerTime(uint8_t node, uint16_t period_ms) noexcept
Set the node's heartbeat producer time (object 0x1017).
Result< void > SendSync(uint8_t counter=0) noexcept
Send one SYNC frame, with a counter byte when counter is not 0.
Result< void > EnsureInitialized() noexcept
Start the client, once: the only way to initialise the driver.
Result< CanFrame > ReadRawSdo(uint8_t node, uint16_t index, uint8_t sub) noexcept
Diagnostic: one SDO initiate-upload request and the first frame the node's SDO server (identifier 0x5...
Result< CanFrame > WriteRawSdo(uint8_t node, uint16_t index, uint8_t sub, std::span< const uint8_t > data) noexcept
Diagnostic: one expedited SDO download request of 1 to 4 bytes and the first frame the node's SDO ser...
Result< PdoConfig > ReadPdoConfig(uint8_t node, PdoKind kind, uint16_t number) noexcept
Read a PDO's identifier, validity, transmission type and mapping back.
Result< void > SdoWriteU16(uint8_t node, uint16_t index, uint8_t sub, uint16_t value) noexcept
Write an unsigned 16-bit object (expedited, two bytes).
Result< void > SdoWriteU8(uint8_t node, uint16_t index, uint8_t sub, uint8_t value) noexcept
Write an unsigned 8-bit object (expedited, one byte).
Result< void > SendRpdo(uint16_t cob_id, std::span< const uint8_t > data) noexcept
Send a PDO the node consumes (an RPDO from the node's side).
Result< void > SendNmt(NmtCommand command, uint8_t node) noexcept
Send an NMT command. Never refused for a state reason: Stop and every other command go out whatever t...
Result< void > ConfigurePdo(uint8_t node, PdoKind kind, uint16_t number, const PdoConfig &config) noexcept
Configure a PDO of a node over SDO, in the order the profile prescribes: invalidate the COB-ID,...
Result< void > DriveQuickStop(uint8_t node, const DriveObjects &objects={}) noexcept
Quick stop (controlword 0x0002). Never refused, retried like DriveDisable().
Satisfied by a CanPort that also receives frames and keeps time: the full client port.
Definition canopen_client_can_interface.hpp:83
OperationMode
Modes of operation (object 0x6060), as the profile numbers them.
Definition canopen_client_types.hpp:542
NmtCommand
NMT master command (the first data byte of the frame on identifier 0x000).
Definition canopen_client_types.hpp:263
FrameClass
What Poll() did with the frame it received.
Definition canopen_client_types.hpp:451
NmtState
NMT state a node reports in its heartbeat or guarding reply (bit 7 masked off).
Definition canopen_client_types.hpp:272
Verify
Whether a setter or a transfer reads back what it wrote (extra bus traffic).
Definition canopen_client_types.hpp:172
SdoReplyKind
The kind of an SDO server reply.
Definition canopen_client_types.hpp:390
LogLevel
Severity passed to the optional Log() hook.
Definition canopen_client_types.hpp:164
PdoKind
Whether a PDO is a receive PDO (client to node) or a transmit PDO (node to client).
Definition canopen_client_types.hpp:471
Error
Why a call failed. Values 0 to 9 are the shared base set; client-specific values start at 16.
Definition canopen_client_types.hpp:36
@ BootUp
The boot-up message; the node continues to Pre-operational.
@ None
No read-back: the node's acknowledgement is the only check.
@ InitiateUpload
Response to an initiate upload request (scs 2).
@ Info
Lifecycle events.
@ Ok
The call succeeded.
The CANopen client driver: everything it declares lives here; internals in detail.
Definition canopen_client.hpp:28
One classic CAN frame with an 11-bit identifier.
Definition canopen_client_types.hpp:190
Everything the client uses; the defaults suit a node on a 500 kbit/s bus.
Definition canopen_client_types.hpp:580
The object indices of a drive; the defaults are the profile's, a remapped drive overrides them.
Definition canopen_client_types.hpp:557
One emergency message (EMCY).
Definition canopen_client_types.hpp:433
What the heartbeat consumer knows about one node.
Definition canopen_client_types.hpp:423
The communication and mapping parameters of one PDO.
Definition canopen_client_types.hpp:484
The latest frame received on a subscribed TPDO identifier.
Definition canopen_client_types.hpp:442
The value of a call, or why there is none.
Definition canopen_client_types.hpp:106
The last SDO abort, from the node or from this driver.
Definition canopen_client_types.hpp:381
A decoded SDO server reply.
Definition canopen_client_types.hpp:399
Counters of the receive path, for diagnostics.
Definition canopen_client_types.hpp:462