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

Why reading or writing one parameter by its address failed. More...

#include <device_manager.h>

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

Public Types

enum class  Kind : uint8_t { kUnknownDevice , kUnknownParameter , kInvalidValue , kTransferFailed }
 

Public Member Functions

const std::string & what () const
 Exception-shaped accessor for the message, for call sites that prefer .what().
 

Public Attributes

Kind kind = Kind::kTransferFailed
 
std::string message
 

Detailed Description

Why reading or writing one parameter by its address failed.

Structured rather than a string because the HTTP layer answers each kind with a different status: an address that names nothing is 404, a value that does not fit the data type is 400, and a failed transfer is 500.

Member Enumeration Documentation

◆ Kind

enum class mm::node::ParameterError::Kind : uint8_t
strong
Enumerator
kUnknownDevice 

No device holds that bus position. → 404.

kUnknownParameter 

The device has no parameter at that index and subindex. → 404.

kInvalidValue 

The value cannot be encoded in the parameter's data type. → 400.

kTransferFailed 

The read or the write over the bus failed. → 500.

Member Function Documentation

◆ what()

const std::string & mm::node::ParameterError::what ( ) const
inline

Exception-shaped accessor for the message, for call sites that prefer .what().

Member Data Documentation

◆ kind

Kind mm::node::ParameterError::kind = Kind::kTransferFailed

◆ message

std::string mm::node::ParameterError::message

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