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

What one encoder register access did — the result of both a read and a write, since the drive answers a write by echoing back the register's value. More...

#include <somanet_drive.h>

Public Member Functions

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

Public Attributes

somanet::EncoderOrdinal encoder {somanet::EncoderOrdinal::kEncoder1}
 Which encoder answered.
 
uint8_t registerAddress = 0
 The register accessed.
 
bool wrote = false
 Whether this was a write; false for a read.
 
std::optional< uint8_t > value
 What the register holds, when the drive reported it.
 

Detailed Description

What one encoder register access did — the result of both a read and a write, since the drive answers a write by echoing back the register's value.

value is optional because one access does not produce one: the iC-MU soft reset (writing 0x07 to register 0x75) restarts the chip, so it is acknowledged without a response. Reporting that as a value of 0 would be a reading nobody took.

Member Function Documentation

◆ describe()

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

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

Member Data Documentation

◆ encoder

somanet::EncoderOrdinal mm::node::EncoderRegisterResult::encoder {somanet::EncoderOrdinal::kEncoder1}

Which encoder answered.

◆ registerAddress

uint8_t mm::node::EncoderRegisterResult::registerAddress = 0

The register accessed.

◆ value

std::optional<uint8_t> mm::node::EncoderRegisterResult::value

What the register holds, when the drive reported it.

◆ wrote

bool mm::node::EncoderRegisterResult::wrote = false

Whether this was a write; false for a read.


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