Motion Master 6.0.0-alpha.50
Next-generation motion control software
Loading...
Searching...
No Matches
base.cc File Reference
#include "comm/base.h"
#include <spdlog/spdlog.h>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <nlohmann/json.hpp>
#include <regex>
#include <string>
#include <vector>
#include <linux/if.h>
#include <netinet/in.h>
#include <soem/soem.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <unistd.h>
#include <cstring>
Include dependency graph for base.cc:

Namespaces

namespace  mm
 
namespace  mm::comm
 

Functions

void mm::comm::to_json (nlohmann::json &j, const NetworkAdapter &a)
 Serialises a NetworkAdapter to JSON.
 
bool mm::comm::isMacAddress (const std::string &s)
 Returns true if s is a MAC address in either Linux (:) or Windows (-) separator format.
 
std::string mm::comm::normalizeMac (const std::string &raw, char sep)
 Normalises a MAC address string to uppercase with the given separator.
 
std::vector< NetworkAdaptermm::comm::enumerateNetworkAdapters ()
 Enumerates all network adapters visible to the OS.
 
std::expected< NetworkAdapter, std::string > mm::comm::resolveNetworkAdapter (const std::string &input)
 Resolves a network adapter specifier to a fully populated NetworkAdapter.