|
Motion Master 6.0.0-alpha.111
Next-generation motion control software
|
Classes | |
| struct | ConnectionError |
| struct | Frame |
| struct | FrameHeader |
| struct | ParameterEntry |
| One entry of the parameter list. More... | |
| class | SpoeConnection |
| class | SpoeFieldbusDriver |
| struct | SpoeFieldbusDriverConfig |
| class | SpoeFrameAssembler |
| class | SpoeInputQueue |
| class | SpoeOutputSlot |
Enumerations | |
| enum class | PdoMode : uint8_t { kNone = 0x00 , kMonitor = 0x01 , kControl = 0x02 } |
ETHERNET_PDO_MODE_* in the firmware. More... | |
| enum class | SpoeMode : uint8_t { kMonitor , kControl } |
| enum class | MessageType : uint8_t { kSdoRead = 0x01 , kSdoWrite = 0x02 , kPdoFrame = 0x03 , kPdoControl = 0x04 , kSdoBatchRead = 0x06 , kFirmwareUpdate = 0x0B , kFileRead = 0x0C , kFileWrite = 0x0D , kStateControl = 0x0E , kStateRead = 0x0F , kParamList = 0x10 , kParamDesc = 0x11 , kParamSubDesc = 0x12 , kParamFullDesc = 0x13 , kServerInfo = 0x20 , kDeviceLocate = 0x21 , kWatchdogTimeout = 0x22 } |
| The message types the firmware handles. A reply carries the type of its request. More... | |
Functions | |
| std::vector< ParameterEntry > | decodeParameterEntries (std::span< const uint8_t > bytes) |
| std::string | sdoStatusName (uint16_t status) |
Names an SPoE SDO status, which is one of the firmware's SDO_REQUEST_ERROR_* codes. | |
| std::expected< std::vector< uint8_t >, std::string > | encodeFrame (const Frame &frame) |
Encodes frame. Fails when the data part is larger than kMaxDataSize. | |
| std::optional< FrameHeader > | decodeHeader (std::span< const uint8_t > bytes) |
Variables | |
| constexpr std::size_t | kInputQueueLimit = 30 |
| constexpr uint16_t | kProtocolVersion100 = 0x0100 |
| constexpr uint16_t | kProtocolVersion102 = 0x0102 |
| constexpr std::size_t | kParameterEntrySize = 68 |
| constexpr std::size_t | kHeaderSize = 7 |
| Message type u8, sequence id u16, status u16, data length u16. | |
| constexpr std::size_t | kMaxDataSize = 512 |
MAX_FRAME_SIZE in the firmware: the size of its buffer for the data part. | |
| constexpr std::size_t | kInputPopLimit = 500 |
pop_from_pdo_fifo_buffer in the firmware returns at most this many bytes of inputs at once. | |
|
strong |
The message types the firmware handles. A reply carries the type of its request.
|
strong |
|
strong |
| std::optional< FrameHeader > mm::comm::spoe::decodeHeader | ( | std::span< const uint8_t > | bytes | ) |
Decodes the header at the start of bytes, or nullopt when fewer than kHeaderSize bytes are there.
| std::vector< ParameterEntry > mm::comm::spoe::decodeParameterEntries | ( | std::span< const uint8_t > | bytes | ) |
Decodes whole parameter-list entries and ignores a short tail. An entry whose index is zero is skipped, because the firmware clears a description before it fills it, and sends it whether the entry exists or not.
| std::expected< std::vector< uint8_t >, std::string > mm::comm::spoe::encodeFrame | ( | const Frame & | frame | ) |
Encodes frame. Fails when the data part is larger than kMaxDataSize.
| std::string mm::comm::spoe::sdoStatusName | ( | uint16_t | status | ) |
Names an SPoE SDO status, which is one of the firmware's SDO_REQUEST_ERROR_* codes.
|
constexpr |
Message type u8, sequence id u16, status u16, data length u16.
|
constexpr |
pop_from_pdo_fifo_buffer in the firmware returns at most this many bytes of inputs at once.
|
constexpr |
The most input frames one drive's queue holds for the RT thread. Older frames are dropped, so the inputs never lag the drive by more than this many RT cycles.
|
constexpr |
MAX_FRAME_SIZE in the firmware: the size of its buffer for the data part.
|
constexpr |
The size of one parameter-list entry, the firmware's struct _sdoinfo_entry_description as it lies in memory. The layout follows the natural alignment of its members, which is not confirmed on hardware.
|
constexpr |
The SPoE protocol versions this driver speaks. Version 1.0 reports no PDO mode in its server information and has no WATCHDOG_TIMEOUT message, so its Control-mode watchdog is fixed in the firmware.
|
constexpr |