Motion Master
Loading...
Searching...
No Matches
mm::comm::soem::StationAddressReading Struct Reference

What a slave's station address register holds, read by the slave's position on the bus. More...

#include <soem.h>

Public Types

enum class  Kind { kNoAnswer , kCleared , kChanged , kIntact }

Public Member Functions

std::string describe () const
 One sentence for the log that says what the reading means.

Public Attributes

Kind kind = Kind::kNoAnswer
uint16_t value = 0
 The value read from the register. 0 when kind is kNoAnswer.
uint16_t expected = 0
 The station address ec_config_init() gave the slave.

Detailed Description

What a slave's station address register holds, read by the slave's position on the bus.

A read by position reaches the slave whatever its station address is, so it tells why a slave stopped answering at the address ec_config_init() gave it.

Member Enumeration Documentation

◆ Kind

Enumerator
kNoAnswer 

The slave does not answer by its position either. The link or the slave is gone.

kCleared 

The register holds 0x0000. The slave restarted, because the register is cleared at power-up, or another master cleared it. The IgH master clears every slave's station address when it scans the bus.

kChanged 

The register holds an address other than the configured one. Another master wrote its own address into the slave. The IgH master numbers the slaves from 0x0001.

kIntact 

The register holds the configured address. The address is intact.

Member Function Documentation

◆ describe()

std::string mm::comm::soem::StationAddressReading::describe ( ) const
nodiscard

One sentence for the log that says what the reading means.

Member Data Documentation

◆ expected

uint16_t mm::comm::soem::StationAddressReading::expected = 0

The station address ec_config_init() gave the slave.

◆ kind

Kind mm::comm::soem::StationAddressReading::kind = Kind::kNoAnswer

◆ value

uint16_t mm::comm::soem::StationAddressReading::value = 0

The value read from the register. 0 when kind is kNoAnswer.


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