@@ -35,35 +35,29 @@ one is needed when the OPC UA Server answers to the mapping tool returning its h
35
35
## Step 3 - Preparing the Agent for start up
36
36
37
37
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.
39
40
40
41
Main sections are:
41
42
42
43
- ` config.iota ` : configure northbound (Context Broker), agent server, persistence (MongoDB), log level, etc.
43
44
- ` config.opcua ` : configure southbound (OPC UA endpoint)
44
45
- ` 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
46
46
47
- #### Auto Configuration (usage of Mapping Tool)
47
+ Three options are available to configure the Agent, described below.
48
48
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 )
52
50
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)
54
52
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.
58
56
59
- and enable the mapping tool:
57
+ #### Option 2: Static configuration (editing config.js file)
60
58
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
67
61
` contextSubscriptions ` .
68
62
69
63
To define active attributes:
@@ -90,11 +84,11 @@ To define poll commands:
90
84
91
85
An example can be found [ here] ( ../conf/config-v2.example.js ) .
92
86
93
- #### Dynamic configuration (REST API)
87
+ #### Option 3: Dynamic configuration (REST API)
94
88
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 ) .
98
92
99
93
## Step 4 - Run the Agent
100
94
0 commit comments