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

What one Kübler register access produced (command 19). More...

#include <somanet_drive.h>

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

Public Member Functions

std::string describe () const
 One line describing the access, ready to put in front of a user.
 

Public Attributes

uint8_t address = 0
 The register accessed.
 
uint8_t length = 0
 Bytes transferred, 1 to 4.
 
bool wrote = false
 Whether this was a write; the drive echoes the value either way.
 
std::vector< uint8_t > bytes
 
uint32_t value = 0
 

Detailed Description

What one Kübler register access produced (command 19).

Member Function Documentation

◆ describe()

std::string mm::node::KueblerRegisterResult::describe ( ) const

One line describing the access, ready to put in front of a user.

Member Data Documentation

◆ address

uint8_t mm::node::KueblerRegisterResult::address = 0

The register accessed.

◆ bytes

std::vector<uint8_t> mm::node::KueblerRegisterResult::bytes

The value's bytes as they came off the wire, least significant first.

Little-endian, which in this family only this command and command 22 are — every measurement reply puts the most significant byte first. Kept alongside the assembled number because a bit field's bytes are what a reader wants, and because a caller checking this against the specification's worked example needs the raw order.

◆ length

uint8_t mm::node::KueblerRegisterResult::length = 0

Bytes transferred, 1 to 4.

◆ value

uint32_t mm::node::KueblerRegisterResult::value = 0

The bytes assembled little-endian into one unsigned number. How to read it depends on the register — see somanet::KueblerFormat, which this deliberately does not apply: sign extension and half-splitting are presentation, and the raw number plus the register's format is the honest pair to hand over.

◆ wrote

bool mm::node::KueblerRegisterResult::wrote = false

Whether this was a write; the drive echoes the value either way.


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