4#include <nlohmann/json.hpp>
34void to_json(nlohmann::json& j,
const DeviceSummary& summary);
Owns the fieldbus driver and node collection, and drives PDO exchange.
Definition device_manager.h:183
Example application namespace — the starting point for a C++ HTTP-endpoint plug-in.
Definition example_logic.cc:11
std::vector< DeviceSummary > summarizeDevices(const mm::node::DeviceManager &deviceManager)
Builds a summary row for every device currently known to deviceManager.
Definition example_logic.cc:21
void 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::jso...
Definition example_logic.cc:13
Definition http_server.h:16
A trimmed, presentation-shaped view of one device — the kind of derived data an application-specific ...
Definition example_logic.h:24
std::string name
Device name as reported over the fieldbus.
Definition example_logic.h:26
uint16_t position
1-based slave position on the bus.
Definition example_logic.h:25
uint32_t serialNumber
Raw serial number.
Definition example_logic.h:29
std::string productCode
Product code, formatted as 0x.........
Definition example_logic.h:28
std::string vendorId
Vendor ID, formatted as 0x.........
Definition example_logic.h:27