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

Go to the source code of this file.

Classes

struct  ServerConfig
 "server" block — the HTTP API and WebSocket listeners. More...
 
struct  FieldbusConfig
 "fieldbus" block — the driver to auto-init at startup. An empty driver means "do not auto-init"; the fieldbus then waits for POST /api/init. More...
 
struct  TlsConfig
 "tls" block — certificate paths and startup self-heal policy. More...
 
struct  GameLoopConfig
 "gameLoop" block — the real-time cyclic loop. More...
 
struct  RecorderConfig
 "recorder" block — the lossless process-data recorder ring. More...
 
struct  ParameterCacheConfig
 "parameterCache" block — the on-disk cache of CoE parameter definitions. More...
 
struct  UserCacheConfig
 "userCache" block — the user-writable file store served at /api/user-cache. More...
 
struct  ParametersConfig
 "parameters" block — CoE object-dictionary behaviour. More...
 
struct  AutoTuningConfig
 "autoTuning" block — the auto-tuning child process. More...
 
struct  FileLoggingConfig
 "logging.file" block — the rotating log file. More...
 
struct  LoggingConfig
 "logging" block — verbosity and the log file. More...
 
struct  Config
 The whole config file. Top-level keys map to these members. More...
 

Functions

 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (ServerConfig, bindAddress, httpPort, wsPort, corsOrigin) NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(ParameterCacheConfig
 
directory NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (ParametersConfig, readObjectDictionaryOnPreop, useCompleteAccess) NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(FileLoggingConfig
 

Variables

 enabled
 
 cacheAllVendors
 
directory level
 
directory directory
 
directory maxSizeMb
 

Detailed Description

The on-disk configuration, modelled as a struct tree that maps 1-1 to the JSONC file.

Each sub-struct mirrors one JSONC object; nlohmann's _WITH_DEFAULT (de)serialization fills any key the file omits from a default-constructed instance, so a partial config "overrides the defaults" with no per-field plumbing. parseConfig adds the enum/value checks nlohmann cannot express. This is deliberately separate from Options, which also carries CLI-only fields (actions and cert source URLs) that have no place in the file.

Function Documentation

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT() [1/2]

directory NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT ( ParametersConfig  ,
readObjectDictionaryOnPreop  ,
useCompleteAccess   
)

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT() [2/2]

NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT ( ServerConfig  ,
bindAddress  ,
httpPort  ,
wsPort  ,
corsOrigin   
)

Variable Documentation

◆ cacheAllVendors

cacheAllVendors

◆ directory

directory directory

◆ enabled

directory enabled

◆ level

directory level

◆ maxSizeMb

directory maxSizeMb