Skip to content

Commit fa2c063

Browse files
authored
Merge pull request #527 from mtconnect/main-dev
2 parents 8c5b6ad + dc1b8f0 commit fa2c063

File tree

294 files changed

+161801
-2167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+161801
-2167
lines changed

.github/workflows/build-docker-image.yml

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ on:
3232
jobs:
3333
# this workflow contains a single job called "build"
3434
build:
35+
# Do not build if it is an RC build
36+
if: ${{ ! contains(github.ref_name, "RC") }}
37+
3538
# the type of runner that the job will run on
3639
runs-on: ubuntu-latest
3740
strategy:

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# The version number.
22
set(AGENT_VERSION_MAJOR 2)
3-
set(AGENT_VERSION_MINOR 4)
3+
set(AGENT_VERSION_MINOR 5)
44
set(AGENT_VERSION_PATCH 0)
5-
set(AGENT_VERSION_BUILD 9)
5+
set(AGENT_VERSION_BUILD 1)
66
set(AGENT_VERSION_RC "")
77

88
# This minimum version is to support Visual Studio 2019 and C++ feature checking and FetchContent

README.md

+18-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
MTConnect C++ Agent Version 2.3
2+
MTConnect C++ Agent Version 2.5
33
--------
44
[![Build MTConnect C++ Agent](https://github.com/mtconnect/cppagent/actions/workflows/build.yml/badge.svg)](https://github.com/mtconnect/cppagent/actions/workflows/build.yml)
55

@@ -13,6 +13,10 @@ the devices and the location of the adapter.
1313

1414
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.
1515

16+
Version 2.5.0 Support for version 2.5. Added validation of observations in the stream and WebSockets support.
17+
18+
Version 2.4.0 Added support for version 2.4
19+
1620
Version 2.3.0 Support for all Version 2.3 standard changes and JSON ingress to MQTT adapter.
1721

1822
Version 2.2.0 Support for all Version 2.2 standard changes and dynamic configuration from adapters. Upgrade to conan 2.
@@ -667,6 +671,10 @@ Configuration Parameters
667671
* `VersionDeviceXml` - Create a new versioned file every time the Device.xml file changes from an external source.
668672

669673
*Default*: `false`
674+
675+
* `Validation` - Turns on validation of model components and observations
676+
677+
*Default*: `false`
670678

671679
* `WorkerThreads` - The number of operating system threads dedicated to the Agent
672680

@@ -741,14 +749,12 @@ These can be overridden on a per-adapter basis
741749

742750
* `HttpHeaders` - Additional headers to add to the HTTP Response for CORS Security
743751

744-
Example:
745-
```
746-
HttpHeaders {
747-
Access-Control-Allow-Origin = *
748-
Access-Control-Allow-Methods = GET
749-
Access-Control-Allow-Headers = Content-Type
750-
}
751-
```
752+
> Example: ```
753+
> HttpHeaders {
754+
> Access-Control-Allow-Origin = *
755+
> Access-Control-Allow-Methods = GET
756+
> Access-Control-Allow-Headers = Content-Type
757+
> }```
752758
753759
* `Port` - The port number the agent binds to for requests.
754760

@@ -1036,6 +1042,9 @@ Sinks {
10361042

10371043
*Default*: Auto-generated
10381044

1045+
> **⚠️Note:** Mqtt Sinks and Mqtt Adapters create separate connections to their respective brokers, but currently use the same client ID by default. Because of this, when using a single broker for source and sink, best practice is to explicitly specify their respective `MqttClientId`
1046+
>
1047+
10391048
Example mqtt adapter block:
10401049
```json
10411050
mydevice {

agent/cppagent.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright Copyright 2009-2022, AMT – The Association For Manufacturing Technology (“AMT”)
2+
// Copyright Copyright 2009-2024, AMT – The Association For Manufacturing Technology (“AMT”)
33
// All rights reserved.
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License");

agent_lib/CMakeLists.txt

+17-5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ set(AGENT_SOURCES
2525
"${SOURCE_DIR}/asset/raw_material.hpp"
2626
"${SOURCE_DIR}/asset/qif_document.hpp"
2727
"${SOURCE_DIR}/asset/component_configuration_parameters.hpp"
28+
"${SOURCE_DIR}/asset/physical_asset.hpp"
29+
"${SOURCE_DIR}/asset/fixture.hpp"
30+
"${SOURCE_DIR}/asset/pallet.hpp"
2831

2932
# src/asset SOURCE_FILES_ONLY
3033

@@ -34,6 +37,9 @@ set(AGENT_SOURCES
3437
"${SOURCE_DIR}/asset/raw_material.cpp"
3538
"${SOURCE_DIR}/asset/qif_document.cpp"
3639
"${SOURCE_DIR}/asset/component_configuration_parameters.cpp"
40+
"${SOURCE_DIR}/asset/physical_asset.cpp"
41+
"${SOURCE_DIR}/asset/fixture.cpp"
42+
"${SOURCE_DIR}/asset/pallet.cpp"
3743

3844
# src/buffer HEADER_FILES_ONLY
3945

@@ -183,6 +189,7 @@ set(AGENT_SOURCES
183189
"${SOURCE_DIR}/pipeline/topic_mapper.hpp"
184190
"${SOURCE_DIR}/pipeline/transform.hpp"
185191
"${SOURCE_DIR}/pipeline/upcase_value.hpp"
192+
"${SOURCE_DIR}/pipeline/validator.hpp"
186193

187194
# src/pipeline SOURCE_FILES_ONLY
188195

@@ -243,13 +250,11 @@ set(AGENT_SOURCES
243250

244251
# src/sink/mqtt_sink HEADER_FILE_ONLY
245252

246-
"${SOURCE_DIR}/sink/mqtt_sink/mqtt_service.hpp"
247-
"${SOURCE_DIR}/sink/mqtt_sink/mqtt2_service.hpp"
253+
"${SOURCE_DIR}/sink/mqtt_sink/mqtt_service.hpp"
248254

249255
#src/sink/mqtt_sink SOURCE_FILES_ONLY
250256

251-
"${SOURCE_DIR}/sink/mqtt_sink/mqtt_service.cpp"
252-
"${SOURCE_DIR}/sink/mqtt_sink/mqtt2_service.cpp"
257+
"${SOURCE_DIR}/sink/mqtt_sink/mqtt_service.cpp"
253258

254259
# src/sink/rest_sink HEADER_FILE_ONLY
255260

@@ -264,13 +269,21 @@ set(AGENT_SOURCES
264269
"${SOURCE_DIR}/sink/rest_sink/session.hpp"
265270
"${SOURCE_DIR}/sink/rest_sink/session_impl.hpp"
266271
"${SOURCE_DIR}/sink/rest_sink/tls_dector.hpp"
272+
"${SOURCE_DIR}/sink/rest_sink/websocket_session.hpp"
267273

268274
# src/sink/rest_sink SOURCE_FILES_ONLY
269275

270276
"${SOURCE_DIR}/sink/rest_sink/file_cache.cpp"
271277
"${SOURCE_DIR}/sink/rest_sink/rest_service.cpp"
272278
"${SOURCE_DIR}/sink/rest_sink/server.cpp"
273279
"${SOURCE_DIR}/sink/rest_sink/session_impl.cpp"
280+
281+
# validation HEADER_FILES_ONLY
282+
"${SOURCE_DIR}/validation/observations.hpp"
283+
"${SOURCE_DIR}/validation/observation_validations.hpp"
284+
285+
# validation SOURCE_FILES_ONLY
286+
"${SOURCE_DIR}/validation/observations.cpp"
274287
)
275288

276289
if(WITH_RUBY)
@@ -325,7 +338,6 @@ if(MSVC)
325338
# The modules including Beast required the /bigobj option in Windows
326339
set_property(SOURCE
327340
"${SOURCE_DIR}/sink/mqtt_sink/mqtt_service.cpp"
328-
"${SOURCE_DIR}/sink/mqtt_sink/mqtt2_service.cpp"
329341
"${SOURCE_DIR}/sink/rest_sink/session_impl.cpp"
330342
"${SOURCE_DIR}/source/adapter/mqtt/mqtt_adapter.cpp"
331343
"${SOURCE_DIR}/source/adapter/agent_adapter/agent_adapter.cpp"

conan/profiles/vs32

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ compiler.runtime=static
88
compiler.runtime_type=Release
99
build_type=Release
1010

11-
11+
[options]
12+
winver=0x0600

conan/profiles/vs32debug

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ compiler.runtime=static
88
compiler.runtime_type=Debug
99
build_type=Debug
1010

11+
[options]
12+
winver=0x0600

conan/profiles/vs32shared

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ build_type=Release
1111

1212
[options]
1313
shared=True
14+
winver=0x0600

conanfile.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class MTConnectAgentConan(ConanFile):
1111
name = "mtconnect_agent"
12-
version = "2.4"
12+
version = "2.5"
1313
url = "https://github.com/mtconnect/cppagent.git"
1414
license = "Apache License 2.0"
1515
settings = "os", "compiler", "arch", "build_type"
@@ -143,6 +143,9 @@ def configure(self):
143143
if is_msvc(self):
144144
self.options["boost/*"].extra_b2_flags = ("define=BOOST_USE_WINAPI_VERSION=" + str(self.options.winver))
145145

146+
if is_msvc(self):
147+
self.options["boost/*"].extra_b2_flags = ("define=BOOST_USE_WINAPI_VERSION=" + str(self.options.winver))
148+
146149
# Make sure shared builds use shared boost
147150
if is_msvc(self) and self.options.shared:
148151
print("**** Making boost, libxml2, gtest, and openssl shared")

docker/ubuntu/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN apt-get update \
6363
rake \
6464
ruby \
6565
&& rm -rf /var/lib/apt/lists/* \
66-
&& pip install conan
66+
&& pip install conan
6767

6868
# make an agent directory and cd into it
6969
WORKDIR /root/agent

0 commit comments

Comments
 (0)