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

A completed OS command's response — the decoded form of 0x1023:03. More...

#include <somanet_drive.h>

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

Public Member Functions

bool failed () const
 Whether the drive reported the command as failed (status 2 or 3). A failed command is still a response — the drive rendered a verdict — so it arrives as a value, not an error; consult errorCode for the reason.
 

Public Attributes

OsCommandStatus status {OsCommandStatus::kCompleted}
 Terminal status (response byte 0).
 
std::vector< uint8_t > data
 Service response payload, if any.
 
std::optional< uint8_t > errorCode
 
std::vector< uint8_t > fsBuffer
 

Detailed Description

A completed OS command's response — the decoded form of 0x1023:03.

status is the terminal status byte; data is the service response payload (bytes 2-7 when the command succeeded with data, bytes 3-7 when it failed with data, empty otherwise — byte 1 is unused by the protocol); errorCode is the OS error code, present only for kFailedWithData.

Member Function Documentation

◆ failed()

bool mm::node::OsCommandResponse::failed ( ) const
inline

Whether the drive reported the command as failed (status 2 or 3). A failed command is still a response — the drive rendered a verdict — so it arrives as a value, not an error; consult errorCode for the reason.

Member Data Documentation

◆ data

std::vector<uint8_t> mm::node::OsCommandResponse::data

Service response payload, if any.

◆ errorCode

std::optional<uint8_t> mm::node::OsCommandResponse::errorCode

OS error code, if the drive sent one.

◆ fsBuffer

std::vector<uint8_t> mm::node::OsCommandResponse::fsBuffer

What the fs-buffer transfer carried up, empty unless OsCommandFsBuffer::kRead was asked for.

◆ status

OsCommandStatus mm::node::OsCommandResponse::status {OsCommandStatus::kCompleted}

Terminal status (response byte 0).


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