Motion Master 6.0.0-alpha.50
Next-generation motion control software
Loading...
Searching...
No Matches
example_logic.h File Reference
#include <cstdint>
#include <nlohmann/json.hpp>
#include <string>
#include <vector>
Include dependency graph for example_logic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mm::example::DeviceSummary
 A trimmed, presentation-shaped view of one device — the kind of derived data an application-specific endpoint typically returns (vs. the full Device JSON the built-in /api/devices route serves). More...
 

Namespaces

namespace  mm
 
namespace  mm::node
 
namespace  mm::example
 Example application namespace — the starting point for a C++ HTTP-endpoint plug-in.
 

Functions

void mm::example::to_json (nlohmann::json &j, const DeviceSummary &summary)
 Serialises a DeviceSummary to JSON. Lives next to the type (ADL-found by nlohmann) so a nlohmann::json(summary) or nlohmann::json(vector<DeviceSummary>) just works.
 
std::vector< DeviceSummarymm::example::summarizeDevices (const mm::node::DeviceManager &deviceManager)
 Builds a summary row for every device currently known to deviceManager.