You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The C++ Agent provides the a complete implementation of the HTTP
7
7
server required by the MTConnect standard. The agent provides the
@@ -11,19 +11,19 @@ the devices and the location of the adapter.
11
11
12
12
Pre-built binary releases for Windows are available from [Releases](https://github.com/mtconnect/cppagent/releases) for those who do not want to build the agent themselves. For *NIX users, you will need libxml2, cppunit, and cmake as well as build essentials.
13
13
14
-
Version 2.0.0.1 Rearchitecture of the agent with TLS, MQTT Adapter, Ruby Interpreter, Agent Adaptr, and much more
14
+
Version 2.0.0 Rearchitecture of the agent with TLS, MQTT Adapter, Ruby Interpreter, Agent Adaptr, and much more
15
15
16
-
Version 1.7.0.0 added kinematics, solid models, and new specifications types.
16
+
Version 1.7.0 added kinematics, solid models, and new specifications types.
17
17
18
-
Version 1.6.0.0 added coordinate systems, specifications, and tabular data.
18
+
Version 1.6.0 added coordinate systems, specifications, and tabular data.
19
19
20
-
Version 1.5.0.0 added Data Set capabilities and has been updated to use C++ 14.
20
+
Version 1.5.0 added Data Set capabilities and has been updated to use C++ 14.
21
21
22
-
Version 1.4.0.0 added time period filter constraint, compositions, initial values, and reset triggers.
22
+
Version 1.4.0 added time period filter constraint, compositions, initial values, and reset triggers.
23
23
24
-
Version 1.3.0.0 added the filter constraints, references, cutting tool archetypes, and formatting styles.
24
+
Version 1.3.0 added the filter constraints, references, cutting tool archetypes, and formatting styles.
25
25
26
-
Version 1.2.0.0 added the capability to support assets.
26
+
Version 1.2.0 added the capability to support assets.
27
27
28
28
Version 1.1.0.8 add the ability to run the C++ Agent as a Windows
29
29
service and support for a configuration file instead of command line
@@ -89,18 +89,7 @@ later.
89
89
Building
90
90
-------
91
91
92
-
Download cmake from [cmake](http://www.cmake.org/cmake/resources/software.html)
93
-
94
-
Make sure to initialize submodules:
95
-
96
-
git submodule init
97
-
git submodule update
98
-
99
-
Configure cmake using the `CMakeLists.txt` file in the agent
100
-
directory. This will generate a project file for the target
101
-
platform. See CMake documentation for more information.
102
-
103
-
92
+
Platform specific instructions are at the end of the README.
104
93
105
94
Configuration
106
95
------
@@ -139,7 +128,7 @@ Each set of files must be declared using a named file description, like schema o
139
128
styles and the local `Path` and the `Location` the files will be mapped to in the
140
129
HTTP server namespace. For example:
141
130
142
-
http://example.com:5000/schemas/MTConnectStreams_1.7.xsd will map to ../schemas/MTConnectStreams_1.7.xsd
131
+
http://example.com:5000/schemas/MTConnectStreams_2.0.xsd will map to ../schemas/MTConnectStreams_2.0.xsd
143
132
144
133
All files will be mapped and the directory names do not need to be the same. These files can be either served directly or can be used to extend the schema or add XSLT stylesheets for formatting the XML in browsers.
145
134
@@ -149,12 +138,12 @@ To specify the new schema for the documents, use the following declaration:
149
138
150
139
StreamsNamespaces {
151
140
e {
152
-
Urn = urn:example.com:ExampleStreams:1.7
153
-
Location = /schemas/ExampleStreams_1.7.xsd
141
+
Urn = urn:example.com:ExampleStreams:2.0
142
+
Location = /schemas/ExampleStreams_2.0.xsd
154
143
}
155
144
}
156
145
157
-
This will use the ExampleStreams_1.7.xsd schema in the document. The `e` is the alias that will be
146
+
This will use the ExampleStreams_2.0.xsd schema in the document. The `e` is the alias that will be
158
147
used to reference the extended schema. The `Location` is the location of the xsd file relative in
159
148
the agent namespace. The `Location` must be mapped in the `Files` section.
160
149
@@ -439,20 +428,20 @@ namespace -- you cannot change it.
439
428
440
429
StreamsNamespaces {
441
430
m {
442
-
Location = /schemas/MTConnectStreams_1.7.xsd
443
-
Path = ./MTConnectStreams_1.7.xsd
431
+
Location = /schemas/MTConnectStreams_2.0.xsd
432
+
Path = ./MTConnectStreams_2.0.xsd
444
433
}
445
434
}
446
435
447
436
DevicesNamespaces {
448
437
m {
449
-
Location = /schemas/MTConnectDevices_1.7.xsd
450
-
Path = ./MTConnectDevices_1.7.xsd
438
+
Location = /schemas/MTConnectDevices_2.0.xsd
439
+
Path = ./MTConnectDevices_2.0.xsd
451
440
}
452
441
}
453
442
454
443
The MTConnect agent will now serve the standard MTConnect schema files
455
-
from the local directory using the schema path /schemas/MTConnectDevices_1.7.xsd.
444
+
from the local directory using the schema path /schemas/MTConnectDevices_2.0.xsd.
456
445
457
446
458
447
### Example: 10 ###
@@ -464,40 +453,40 @@ Agent serve them up locally.
464
453
465
454
DevicesNamespaces {
466
455
x {
467
-
Urn = urn:example.com:ExampleDevices:1.7
468
-
Location = /schemas/ExampleDevices_1.7.xsd
469
-
Path = ./ExampleDevices_1.7.xsd
456
+
Urn = urn:example.com:ExampleDevices:2.0
457
+
Location = /schemas/ExampleDevices_2.0.xsd
458
+
Path = ./ExampleDevices_2.0.xsd
470
459
}
471
460
472
461
Files {
473
462
stream {
474
-
Location = /schemas/MTConnectStreams_1.7.xsd
475
-
Path = ./MTConnectStreams_1.7.xsd
463
+
Location = /schemas/MTConnectStreams_2.0.xsd
464
+
Path = ./MTConnectStreams_2.0.xsd
476
465
}
477
466
device {
478
-
Location = /schemas/MTConnectDevices_1.7.xsd
479
-
Path = ./MTConnectDevices_1.7.xsd
467
+
Location = /schemas/MTConnectDevices_2.0.xsd
468
+
Path = ./MTConnectDevices_2.0.xsd
480
469
}
481
470
}
482
471
483
472
Or use the short form for all files:
484
473
485
474
Files {
486
475
schemas {
487
-
Location = /schemas/MTConnectStreams_1.7.xsd
488
-
Path = ./MTConnectStreams_1.7.xsd
476
+
Location = /schemas/MTConnectStreams_2.0.xsd
477
+
Path = ./MTConnectStreams_2.0.xsd
489
478
}
490
479
}
491
480
492
481
If you have specified in your xs:include schemaLocation inside the
493
-
ExampleDevices_1.7.xsd file the location "/schemas/MTConnectStreams_1.7.xsd",
482
+
ExampleDevices_2.0.xsd file the location "/schemas/MTConnectStreams_2.0.xsd",
494
483
this will allow it to be served properly. This can also be done using the
495
484
Devices namespace:
496
485
497
486
DevicesNamespaces {
498
487
m {
499
-
Location = /schemas/MTConnectDevices_1.7.xsd
500
-
Path = ./MTConnectDevices_1.7.xsd
488
+
Location = /schemas/MTConnectDevices_2.0.xsd
489
+
Path = ./MTConnectDevices_2.0.xsd
501
490
}
502
491
}
503
492
@@ -651,7 +640,7 @@ Configuration Parameters
651
640
652
641
*`SchemaVersion` - Change the schema version to a different version number.
653
642
654
-
*Default*: 1.7
643
+
*Default*: 2.0
655
644
656
645
*`ConversionRequired` - Global default for data item units conversion in the agent.
657
646
Assumes the adapter has already done unit conversion.
@@ -678,7 +667,7 @@ Configuration Parameters
678
667
679
668
*Default*: 1
680
669
681
-
*`SuppressIPAddress` - Suppress the Adapter IP Address and port when creating the Agent Device ids and names for 1.7. This applies to all adapters.
670
+
*`SuppressIPAddress` - Suppress the Adapter IP Address and port when creating the Agent Device ids and names. This applies to all adapters.
682
671
683
672
*Default*: false
684
673
@@ -821,7 +810,7 @@ The following parameters must be present to enable https requests. If there is n
821
810
822
811
*Default*: 1
823
812
824
-
* `SuppressIPAddress` - Suppress the Adapter IP Address and port when creating the Agent Device ids and names for 1.7.
813
+
* `SuppressIPAddress` - Suppress the Adapter IP Address and port when creating the Agent Device ids and names.
The principle adapter data format is a simple plain text stream separated by the pipe character `|`. Every line except for commands starts with an optional timestamp in UTC. If the timestamp is not supplied the agent will supply a timestamp of its own taken at the arrival time of the data to the agent. The remainder of the line is a key followed by data – depending on the type of data item is being written to.
@@ -1221,25 +1210,42 @@ An example in ruby is as follows:
1221
1210
> r.body
1222
1211
=> "<success/>"
1223
1212
1224
-
# Building the agent on Windows and Ubuntu
1213
+
# Building the agent
1214
+
1215
+
## Overview
1216
+
1217
+
The agent build is dependent on the following utilities:
1218
+
1219
+
* C++ Compiler compliant with C++ 17
1220
+
* git is optional but suggested to download source and update when changes occur
1221
+
* cmake for build generator and testing
1222
+
* python 3 and pip to support conan for dependency and package management
1223
+
* ruby and rake for mruby to support building the embedded scripting engine [not required if -o with_ruby=False]
1225
1224
1226
1225
## Building on Windows
1227
1226
1228
1227
The MTConnect Agent uses the conan package manager to install dependencies:
[python 3](https://www.python.org/downloads/) and [Conan Package Manager Downloads](https://conan.io/downloads.html)
1231
1230
1232
1231
Download the Windows installer for your platform and run the installer.
1233
1232
1234
-
You also need CMake [CMake](https://cmake.org/download/) and git [git](https://git-scm.com/download/win)
1233
+
You also need [git](https://git-scm.com/download/win) and [ruby](https://rubyinstaller.org) if you want to embed mruby.
1234
+
1235
+
CMake is installed as part of Visual Studio. If you are using Visual Studio for the build, use the bundled version. Otherwise download from CMake [CMake](https://cmake.org/download/).
1235
1236
1236
1237
### Setting up build
1237
1238
1239
+
Install dependencies from the downloads above. Make sure python, ruby, and cmake are in your path.
0 commit comments