Motion Master 6.0.0-alpha.111
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
6#include "comm/vendor_ids.h"
7
8namespace mm::node {
9
15
22
28enum class SomanetProduct : uint32_t {
29 kNode = 0x00000201,
30 kCirculo = 0x00000301,
31 kCirculoSmm = 0x00000302,
32 kIntegro = 0x00000401,
33};
34
40constexpr std::string_view toString(SomanetProduct product) {
41 switch (product) {
43 return "SOMANET Node";
45 return "SOMANET Circulo";
47 return "SOMANET Circulo SMM";
49 return "SOMANET Integro";
50 }
51 return "Unknown";
52}
53
61constexpr std::string_view somanetProductName(uint32_t productCode) {
62 switch (static_cast<SomanetProduct>(productCode)) {
67 return toString(static_cast<SomanetProduct>(productCode));
68 }
69 return {};
70}
71
72} // namespace mm::node
constexpr bool isSomanetDevice(uint32_t vendorId)
Whether a device with this vendor ID is a SOMANET device.
Definition vendor_ids.h:23
constexpr uint32_t kSynapticonVendorId
Synapticon's EtherCAT Vendor ID (SII and object 0x1018:01).
Definition vendor_ids.h:11
Definition bus_health_source.h:7
std::string_view toString(Cia402TargetKind kind)
The token parseCia402TargetKind reads, for a JSON answer.
Definition cia402_drive.cc:59
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:61
SomanetProduct
Known SOMANET product codes (object 0x1018:02) under kSynapticonVendorId.
Definition synapticon.h:28
@ kCirculo
SOMANET Circulo.
@ kCirculoSmm
SOMANET Circulo SMM.
@ kIntegro
SOMANET Integro.