Skip to content

Commit e272297

Browse files
committed
align docs
1 parent fad6e41 commit e272297

File tree

6 files changed

+34
-65
lines changed

6 files changed

+34
-65
lines changed

docs/howto.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,6 @@ config.opcua = {
256256
};
257257

258258
config.mappingTool = {
259-
/**
260-
* Boolean property to assess whether enabling MappingTool or not
261-
*/
262-
enabled: false,
263259
/**
264260
* Boolean property to assess whether enabling polling in MappingTool or not
265261
*/
-20.9 KB
Loading

docs/installation_and_administration_guide.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ Open the `conf/config.js` and make your changes (see how to do this [here](howto
3030

3131
The downloaded repository comes with a `config.js` (conf/config.js) in which an empty Device is preloaded.
3232

33-
At this point, you have three options:
33+
At this point, you have three options for the configuration:
3434

35-
- Use the mapping tool to automatically generate a `config.js`
36-
- Define your own context mappings in fields `types`, `contexts`, `contextSubscriptions`, `events` in `config.js`
37-
- Dynamically provision the new Device (mapping between OPC UA Server and OPC UA Agent) via REST interface
35+
- `auto`: use the mapping tool to automatically generate a `config.js`
36+
- `static`: define your own context mappings in fields `types`, `contexts`, `contextSubscriptions`, `events` in
37+
`config.js`
38+
- `dynamic`: dynamically provision the new Device (mapping between OPC UA Server and OPC UA Agent) via REST interface
3839

3940
If you want to use the mapping tool simply set as empty the following properties in the config.js:
4041

docs/opc_ua_agent_tutorial.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,9 @@ configuration file (config.js) or through the REST API
141141

142142
Three different initialization modalities are available:
143143

144-
- Use a preloaded config.js
145-
- Invoke a mapping tool responsible of automatically building the mapping between OPC UA and NGSI (**NOTE:** **_Before
146-
using the MappingTool, erase the three objects: *types*, *contexts*, *contextSubscriptions* within the existing
147-
config.js_**)
148-
- Use the REST API
144+
- `auto`: invoke a mapping tool responsible of automatically building the mapping between OPC UA and NGSI
145+
- `static`: use a preloaded config.js
146+
- `dynamic`: use the REST API
149147

150148
Since in the following parts of this tutorial we are going to use the REST API you have not to worry about the
151149
initialization.

docs/quick_start_guide.md

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,17 @@ Main sections are:
1616
- `config.iota`: configure northbound (Context Broker), agent server, persistence (MongoDB), log level, etc.
1717
- `config.opcua`: configure southbound (OPC UA endpoint)
1818
- `config.mappingTool`: configure mapping tool properties to set auto configuration
19-
- `config.autoprovision`: flag indicating whether or not to provision the Service Group and Device automatically when
20-
measures arrive
2119

22-
##### Auto provisioning
20+
#### Option 1: Auto configuration (usage of Mapping Tool)
2321

24-
Setting property `autoprovision` in the config.js to `false`, a manual provisioning can be performed using
25-
iotagent-node-lib [API](https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/api.md) interfaces.
22+
When `config.configurationType` is `auto`, the Mapping Tool creates a mapping for all OPC UA objects (except those with
23+
namespace to ignore matching): all OPC UA variables will be configured as active attributes whereas all OPC UA methods
24+
will be configured as commands.
2625

27-
Setting property `autoprovision` in the config.js to `true`, the OPC UA Agent will perform autoprovisioning when
28-
measures arrive.
26+
#### Option 2: Static configuration (editing config.js file)
2927

30-
#### Auto Configuration (usage of Mapping Tool)
31-
32-
When `config.mappingTool.enabled` is `true` and `config.iota.types` is empty, the Mapping Tool creates a mapping for all
33-
OPC UA objects (except those with namespace to ignore matching): all OPC UA variables will be configured as active
34-
attributes whereas all OPC UA methods will be configured as commands.
35-
36-
To enable auto configuration, simply set as empty the following properties in the config.js:
37-
38-
- `types: {}`
39-
- `contexts: []`
40-
- `contextSubscriptions: []`
41-
42-
and enable the mapping tool:
43-
44-
- `mappingTool: { enabled: true, ... }`
45-
46-
#### Manual Configuration (editing config.js file)
47-
48-
Using Manual Configuration it is possible to specify the mapping between OPC UA objects and NGSI attributes and
49-
commands. The mapping can be specified in the config.js, editing the properties `types`, `contexts` and
28+
When `config.configurationType` is `static`, it is possible to specify the mapping between OPC UA objects and NGSI
29+
attributes and commands. The mapping can be specified in the config.js, editing the properties `types`, `contexts` and
5030
`contextSubscriptions`.
5131

5232
To define active attributes:
@@ -73,11 +53,11 @@ To define poll commands:
7353

7454
An example can be found [here](../conf/config-v2.example.js).
7555

76-
#### Dynamic configuration (REST API)
56+
#### Option 3: Dynamic configuration (REST API)
7757

78-
If you want to use the REST interface have a look at Step 4
79-
[here](https://iotagent-opcua.readthedocs.io/en/latest/opc_ua_agent_tutorial.html#step-by-step-tutorial) to see how to
80-
provision a new device.
58+
When `config.configurationType` is `dynamic`, you can use the REST interface to setup the Agent once it has started. To
59+
provision a new device have a look at Step 4
60+
[here](https://iotagent-opcua.readthedocs.io/en/latest/opc_ua_agent_tutorial.html#step-by-step-tutorial).
8161

8262
### Run
8363

docs/user_and_programmers_manual.md

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,29 @@ one is needed when the OPC UA Server answers to the mapping tool returning its h
3535
## Step 3 - Preparing the Agent for start up
3636

3737
OPC UA Agent is configurable through a single configuration file. All properties are explained in the
38-
[config.js](../conf/config.js) template.
38+
[config.js](../conf/config.js) template. If you are running the Agent using Docker, please use the environment variables
39+
defined in the docker-compose example provided.
3940

4041
Main sections are:
4142

4243
- `config.iota`: configure northbound (Context Broker), agent server, persistence (MongoDB), log level, etc.
4344
- `config.opcua`: configure southbound (OPC UA endpoint)
4445
- `config.mappingTool`: configure mapping tool properties to set auto configuration
45-
- `config.autoprovision`: flag indicating whether or not to provision the Service Group and Device automatically
4646

47-
#### Auto Configuration (usage of Mapping Tool)
47+
Three options are available to configure the Agent, described below.
4848

49-
When `config.mappingTool.enabled` is `true` and `config.iota.types` is empty, the Mapping Tool creates a mapping for all
50-
OPC UA objects (except those with namespace to ignore matching): all OPC UA variables will be configured as active
51-
attributes whereas all OPC UA methods will be configured as commands.
49+
![edit config.js](./images/OPC%20UA%20agent%20flow%20chart_2.png)
5250

53-
To enable auto configuration, simply set as empty the following properties in the config.js:
51+
#### Option 1: Auto configuration (usage of Mapping Tool)
5452

55-
- `types: {}`
56-
- `contexts: []`
57-
- `contextSubscriptions: []`
53+
When `config.configurationType` is `auto`, the Mapping Tool creates a mapping for all OPC UA objects (except those with
54+
namespace to ignore matching): all OPC UA variables will be configured as active attributes whereas all OPC UA methods
55+
will be configured as commands.
5856

59-
and enable the mapping tool:
57+
#### Option 2: Static configuration (editing config.js file)
6058

61-
- `mappingTool: { enabled: true, ... }`
62-
63-
#### Manual Configuration (editing config.js file)
64-
65-
Using Manual Configuration it is possible to specify the mapping between OPC UA objects and NGSI attributes and
66-
commands. The mapping can be specified in the config.js, editing the properties `types`, `contexts` and
59+
When `config.configurationType` is `static`, it is possible to specify the mapping between OPC UA objects and NGSI
60+
attributes and commands. The mapping can be specified in the config.js, editing the properties `types`, `contexts` and
6761
`contextSubscriptions`.
6862

6963
To define active attributes:
@@ -90,11 +84,11 @@ To define poll commands:
9084

9185
An example can be found [here](../conf/config-v2.example.js).
9286

93-
#### Dynamic configuration (REST API)
87+
#### Option 3: Dynamic configuration (REST API)
9488

95-
If you want to use the REST interface have a look at Step 4
96-
[here](https://iotagent-opcua.readthedocs.io/en/latest/opc_ua_agent_tutorial.html#step-by-step-tutorial) to see how to
97-
provision a new device.
89+
When `config.configurationType` is `dynamic`, you can use the REST interface to setup the Agent once it has started. To
90+
provision a new device have a look at Step 4
91+
[here](https://iotagent-opcua.readthedocs.io/en/latest/opc_ua_agent_tutorial.html#step-by-step-tutorial).
9892

9993
## Step 4 - Run the Agent
10094

0 commit comments

Comments
 (0)