Motion Master 6.0.0-alpha.86
Next-generation motion control software
Loading...
Searching...
No Matches
mm::node::ObjectDictionaryValues Struct Reference

Every object dictionary value the drive holds, read in one transfer by OS command 21. More...

#include <somanet_drive.h>

Collaboration diagram for mm::node::ObjectDictionaryValues:
[legend]

Public Attributes

size_t byteCount {}
 Bytes the drive sent. Equals the widths of values added up.
 
std::vector< ObjectDictionaryValuevalues
 

Detailed Description

Every object dictionary value the drive holds, read in one transfer by OS command 21.

The drive sends the raw bytes of every entry, back to back, ordered by index and then by subindex, with nothing in between. There is no index, no subindex and no length on the wire: the only way to tell one value from the next is to know how wide each one is, in the same order. This master takes that order and those widths from its own record of the device's object dictionary, which it read over CoE when the device was enumerated.

So the two sides have to agree, and a single disagreement spoils every value after it. One entry read as four bytes where the drive sent two shifts the rest of the transfer. What catches that is the total: the widths must add up to exactly the number of bytes the drive sent, and SomanetDrive::readObjectDictionaryValues refuses the whole transfer when they do not.

values holds one entry per object the transfer carries, so it is shorter than the device's dictionary by whatever kObjectsOutsideOdValues left out.

Member Data Documentation

◆ byteCount

size_t mm::node::ObjectDictionaryValues::byteCount {}

Bytes the drive sent. Equals the widths of values added up.

◆ values

std::vector<ObjectDictionaryValue> mm::node::ObjectDictionaryValues::values

The documentation for this struct was generated from the following file: