Motion Master 6.0.0-alpha.111
Next-generation motion control software
Loading...
Searching...
No Matches
cia402_drive.cc File Reference
#include "node/cia402_drive.h"
#include <chrono>
#include <format>
#include <nlohmann/json.hpp>
#include <optional>
#include <string>
#include <string_view>
#include <thread>
Include dependency graph for cia402_drive.cc:

Namespaces

namespace  mm
 
namespace  mm::node
 

Functions

void mm::node::to_json (nlohmann::json &j, const Cia402Status &s)
 Serialises a Cia402Status. Emits state/modeName as human-readable strings alongside the numeric statusword, controlword, and modeOfOperation.
 
std::optional< Cia402Command > mm::node::parseCia402Command (std::string_view token)
 Parses a command token ("enable" / "disable" / "quickStop" / "faultReset").
 
std::optional< Cia402TargetKind > mm::node::parseCia402TargetKind (std::string_view token)
 Parses a target-kind token ("position" / "velocity" / "torque").
 
std::string_view mm::node::toString (Cia402TargetKind kind)
 The token parseCia402TargetKind reads, for a JSON answer.
 
std::optional< Cia402TargetKind > mm::node::targetKindForMode (cia402::OperationMode mode)
 The target kind an operation mode acts on: position for PP/CSP, velocity for PV/CSV, torque for PT/CST and CST with commutation angle. nullopt for a mode with no linear target: no mode, homing, vl (0x6042) and interpolated position (0x60C1).
 
void mm::node::to_json (nlohmann::json &j, const TargetFromActual &t)
 
std::expected< Cia402Drive, std::string > mm::node::createCia402Drive (Device &device)
 Validates that device implements the CiA402 profile, then binds a view to it.