Motion Master 6.0.0-alpha.50
Next-generation motion control software
Loading...
Searching...
No Matches
synapticon.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <string_view>
5
6namespace mm::node {
7
14inline constexpr uint32_t kSynapticonVendorId = 0x000022D2;
15
21enum class SomanetProduct : uint32_t {
22 kNode = 0x00000201,
23 kCirculo = 0x00000301,
24 kCirculoSmm = 0x00000302,
25 kIntegro = 0x00000401,
26};
27
33constexpr std::string_view toString(SomanetProduct product) {
34 switch (product) {
36 return "SOMANET Node";
38 return "SOMANET Circulo";
40 return "SOMANET Circulo SMM";
42 return "SOMANET Integro";
43 }
44 return "Unknown";
45}
46
54constexpr std::string_view somanetProductName(uint32_t productCode) {
55 switch (static_cast<SomanetProduct>(productCode)) {
60 return toString(static_cast<SomanetProduct>(productCode));
61 }
62 return {};
63}
64
65} // namespace mm::node
Definition http_server.h:16
constexpr uint32_t kSynapticonVendorId
Synapticon's EtherCAT Vendor ID (object 0x1018:01) — the discriminator for a SOMANET drive and the si...
Definition synapticon.h:14
constexpr std::string_view toString(SomanetProduct product)
Human-readable name of a known SOMANET product (for logging / JSON). Returns "Unknown" for a product ...
Definition synapticon.h:33
constexpr std::string_view somanetProductName(uint32_t productCode)
Product name for a raw product code (object 0x1018:02), or empty if the code is not a recognised SOMA...
Definition synapticon.h:54
SomanetProduct
Known SOMANET product codes (object 0x1018:02) under kSynapticonVendorId.
Definition synapticon.h:21
@ kCirculo
SOMANET Circulo.
@ kCirculoSmm
SOMANET Circulo SMM.
@ kIntegro
SOMANET Integro.