Application
Configuration
The configuration of the smartCORE application consists of the following parts
- the (static) system configuration file
smartcore.json
- the (dynamic) measurement configuration file
smartcore_dynamic.json
The JSON format is used in both cases.
System configuration file
The system configuration file smartcore.json
contains the smartCORE application-related parameters as well as the configurations of all system modules (see section Configuration of the modules).
Application parameters
The following table lists all application parameters
section | parameter | required | data type | meaningful value range | default | description |
---|---|---|---|---|---|---|
log | loggingtype | No | STRING | "Both", "Console", "File" | "File" | Type of recording of error messages and warnings |
log | filepath | No | STRING | valid, writable directory path | "/sdi/log/" | directory for storing log files |
log | maxFileCount | No | INT | 1 - | 10 | max. number of existing log files |
log | maxFileSize | No | INT | 1 - | 1024000 (1000 kB) | max. size of a log file |
scpi | port | No | INT | 1 - | 5024 | TCP/IP port for built-in SCPI server |
- (top level) | namespaceSeparator | No | STRING | "." | Separator for representing channel hierarchies | |
- (top level) | timeout | No | INT | 1 - | 10000 (10 s) | Timeout for loading the system modules |
Typical system configuration
In general, the system configuration contains the configautoload
module,
which loads the measurement configuration and the SCPI
module, which realizes the provision of an SCPI interface.
{
"log":{
"loggingtype": "Both",
"filepath":"/sdi/log/"
"maxFileCount":10,
"maxFileSize":1024000
},
"scpi":{
"port":5024
},
"namespaceSeparator":".",
"timeout":10000,
"plugins":[
"configautoload",
"scpi"
],
"modules":[
{
"module": "configautoload",
"factory": "configautoload",
"config":{
"once":true,
"configfilename": "smartcore_dynamic.json"
}
}
]
}
Measurement configuration file
The measurement configuration file smartcore_dynamic.json
, or can be specified within the configautoload
module under configfilename
- see above,
In addition to the timeout
parameter known from the system configuration, it only contains the configuration of the measurement modules (see Configuration of the modules).
The measurement configuration file can therefore be seen as a kind of supplement to the system configuration file. However, it should be noted that first all modules of the system configuration are instantiated and only then those from the measurement configuration. In addition, the sequence of module instantiations within both configurations is not fixed.
Configuration of the modules
The modules are configured in two parameters for both system modules and measurement modules
- Listing of the moduleclasses (-factories), in the form of the JSON array
plugins
- Listing of the moduleinstances, in the form of the JSON array
modules
While the array of module classes only contains the names of all factories used in the form of strings, the entries in the array of module instances are JSON objects of the form
{
"module": "ModuleInstance",
"factory": "modulefactory",
"config":{
< Module Configuration Parameters >
}
}