Skip to content

Commit c400db1

Browse files
Remove tips & tricks from configuration documentation
Env substitution and includes are now deprecated and will be removed in a future version. Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
1 parent 3990651 commit c400db1

1 file changed

Lines changed: 0 additions & 80 deletions

File tree

docs/node/config/index.md

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -77,83 +77,3 @@ paths = (
7777
}
7878
)
7979
```
80-
81-
## Tips & Tricks
82-
83-
### Use environment variables in your configuration {#node-config-envvars}
84-
85-
VILLASnode substitutes any environment variables in you JSON and libconfig configuration files.
86-
87-
To replace environment variables you must use the following syntax within any string value of your config: `${MYENV_VAR}`.
88-
89-
**Note:** Non-string values can currently not be substituted by environment variables!
90-
91-
#### Example
92-
93-
<!-- convert to JSON -->
94-
```
95-
nodes = {
96-
file_node = {
97-
uri = "${FILE_PATH}"
98-
}
99-
}
100-
```
101-
102-
### Include other files into your configuration {#node-config-include}
103-
104-
VILLASnode can include other files into you configuration.
105-
This allows you to better structure and reuse parts of your configuration (e.g. the node definitions).
106-
107-
File inclusion is handled via a special key in JSON objects named `@include`.
108-
The value of this key must point to an existing file on your file system.
109-
110-
**Note:** libconfig supports inclusion of other files [out of the box via @include directives](http://hyperrealm.github.io/libconfig/libconfig_manual.html#Include-Directives). So this tip is mostly useful for JSON configuration files.
111-
112-
#### Example
113-
114-
```json title="params.json"
115-
{
116-
"gain": 1.45,
117-
"t_dt": 50e-6
118-
}
119-
```
120-
121-
```json title="nodes.json"
122-
{
123-
"test_node": {
124-
"type": "file",
125-
"in": {
126-
"signals": {
127-
"count": 12,
128-
"type": "float"
129-
}
130-
}
131-
},
132-
"signal_node": {
133-
"signal": "random",
134-
"in": {
135-
"hooks": [
136-
{
137-
"type": "lua",
138-
"script": "myscript.lua",
139-
"@include": "params.json"
140-
}
141-
]
142-
}
143-
}
144-
}
145-
```
146-
147-
```json title="experiment1.json"
148-
{
149-
"nodes":{
150-
"@include": "nodes.json"
151-
},
152-
"paths": [
153-
{
154-
"in": "signal_node",
155-
"out": "test_node"
156-
}
157-
]
158-
}
159-
```

0 commit comments

Comments
 (0)