|
Motion Master 6.0.0-alpha.86
Next-generation motion control software
|
Generic CANopen (CiA301) procedure bodies — the non-volatile storage commands every CoE device carries, whatever profile it implements. More...
#include <expected>#include <nlohmann/json_fwd.hpp>#include <stop_token>#include <string>#include <string_view>#include <vector>#include "node/device.h"#include "node/procedure.h"#include "node/profile_device.h"Go to the source code of this file.
Classes | |
| struct | mm::node::RestoreDefaultParametersRequest |
| What one restore was asked to do. More... | |
Namespaces | |
| namespace | mm |
| namespace | mm::node |
Functions | |
| std::vector< ProgressStep > | mm::node::storeParametersSteps () |
| Store parameters' step template — one step, idle. | |
| std::expected< void, std::string > | mm::node::runStoreParametersProcedure (Device &device, ProgressReporter &reporter, std::stop_token stop, StoreParametersConfig config={}) |
| Runs a parameter store (0x1010) as a procedure body. | |
| std::expected< RestoreDefaultParametersRequest, std::string > | mm::node::parseRestoreDefaultParametersRequest (const nlohmann::json &body) |
| Parses and validates a client's restore request body. | |
| std::vector< ProcedureParameter > | mm::node::restoreDefaultParametersParameters () |
| What restoring default parameters accepts, as its descriptor advertises it. | |
| std::vector< ProgressStep > | mm::node::restoreDefaultParametersSteps () |
| Restore default parameters' step template — one step, idle. | |
| std::expected< void, std::string > | mm::node::runRestoreDefaultParametersProcedure (Device &device, ProgressReporter &reporter, std::stop_token stop, const RestoreDefaultParametersRequest &request, RestoreDefaultParametersConfig config={}) |
| Runs a restore of default parameters (0x1011) as a procedure body. | |
Variables | |
| constexpr std::string_view | mm::node::kStoreParametersProcedure = "store-parameters" |
| Procedure name for storing parameters, as it appears in its URL and its snapshot key. | |
| constexpr std::string_view | mm::node::kStoreParametersStep = "store" |
| The single step storing parameters reports against. | |
| constexpr std::string_view | mm::node::kRestoreDefaultParametersProcedure = "restore-default-parameters" |
| Procedure name for restoring default parameters, as it appears in its URL and its snapshot key. | |
| constexpr std::string_view | mm::node::kRestoreDefaultParametersStep = "restore" |
| The single step restoring default parameters reports against. | |
Generic CANopen (CiA301) procedure bodies — the non-volatile storage commands every CoE device carries, whatever profile it implements.
The ProfileDevice counterpart of somanet_procedures.h, and the reason the catalogue is not a vendor's list: these apply to any device with a CoE mailbox, so a third-party slave offers them too.
Both are command-and-wait walks — write a signature, then poll the same sub-entry until the device reports the command complete — which is what makes them procedures rather than requests. A store takes about a second while the device writes to flash, and a poll during that window can fail outright; each body runs on its own thread, reports one step, and retains its result.