Skip to content

Commit 82db1d3

Browse files
authored
Merge pull request #596 from mtconnect/fix_cxx20_deprecation_warnings
Updates for v2.6 and 2.7 with demo device model fixes.
2 parents d9aedd7 + b8e38bf commit 82db1d3

32 files changed

+358788
-76
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ jobs:
119119
- name: Install dependencies
120120
shell: bash
121121
run: |
122+
sudo apt update
122123
sudo apt install -y build-essential cmake gcc-11 g++-11 python3 autoconf automake
123124
124125
- name: Checkout Agent

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set(AGENT_VERSION_MAJOR 2)
33
set(AGENT_VERSION_MINOR 7)
44
set(AGENT_VERSION_PATCH 0)
5-
set(AGENT_VERSION_BUILD 3)
5+
set(AGENT_VERSION_BUILD 4)
66
set(AGENT_VERSION_RC "")
77

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

agent_lib/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,13 @@ target_clangtidy_setup(agent_lib)
465465

466466
include(../cmake/document.cmake)
467467
if (AGENT_WITH_DOCS AND DOXYGEN_FOUND)
468+
message(WARNING ": Setting up to create documentation")
468469
file(GLOB _tests ${CMAKE_CURRENT_SOURCE_DIR}/../test_package/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/../test_package/*.cpp)
469470
doxygen_add_docs(docs README.md ${AGENT_SOURCES} ${_tests}
470471
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.." )
471-
install(DIRECTORY "${PROJECT_BINARY_DIR}/Documentation/" DESTINATION "Documentation")
472+
install(DIRECTORY "${PROJECT_BINARY_DIR}/Documentation/" DESTINATION "Documentation")
473+
else()
474+
message(WARNING ": Documentation will not be created")
472475
endif()
473476

474477
target_sources(agent_lib PUBLIC FILE_SET headers

conan/mruby/conanfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
class MRubyConan(ConanFile):
1616
name = "mruby"
17-
version = "3.2.0"
17+
version = "3.4.0"
1818
license = "https://github.com/mruby/mruby/blob/master/LICENSE"
1919
author = "Yukihiro “Matz” Matsumoto"
2020
homepage = "https://mruby.org/"
@@ -37,7 +37,7 @@ class MRubyConan(ConanFile):
3737
_ruby_version_dir = "ruby-{}.{}.0".format(_major, _minor)
3838

3939
def source(self):
40-
get(self, "https://github.com/mruby/mruby/archive/refs/tags/3.2.0.zip", strip_root=True, destination=self.source_folder)
40+
get(self, "https://github.com/mruby/mruby/archive/refs/tags/3.4.0.zip", strip_root=True, destination=self.source_folder)
4141
get(self, "https://github.com/mattn/mruby-onig-regexp/archive/refs/heads/master.zip",
4242
strip_root=True, destination=os.path.join(self.source_folder, 'mrbgems', 'mruby-onig-regexp'))
4343

conanfile.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class MTConnectAgentConan(ConanFile):
1111
name = "mtconnect_agent"
12-
version = "2.6"
12+
version = "2.7"
1313
url = "https://github.com/mtconnect/cppagent.git"
1414
license = "Apache License 2.0"
1515
settings = "os", "compiler", "arch", "build_type"
@@ -93,14 +93,13 @@ def tool_requires_version(self, package, version):
9393
buf = io.StringIO()
9494
command = f"{package} --version"
9595
res = self.run(command, shell=True, stdout=buf)
96+
self.output.info(f"Command: '{command}' returned {res}")
9697
ver = [0, 0, 0]
9798
if res == 0:
9899
text = buf.getvalue()
99100
self.output.debug(f"{command} returned:\n{text}")
100101
ver = [int(d) for d in re.search(r"\d+\.\d+\.\d+", text).group(0).split('.')]
101102
self.output.info(f"Version of {package} is {ver}")
102-
else:
103-
self.output.info(f"Command: '{command}' returned {res}")
104103

105104
if ver < version:
106105
ver_text = '.'.join([str(x) for x in version])
@@ -112,7 +111,7 @@ def tool_requires_version(self, package, version):
112111
def build_requirements(self):
113112
self.tool_requires_version("cmake", [3, 26, 4])
114113
if self.options.with_docs:
115-
self.tool_requires_version("doxygen", [1, 15, 0])
114+
self.tool_requires_version("doxygen", [1, 16, 0])
116115

117116
def requirements(self):
118117
self.requires("boost/1.88.0", headers=True, libs=True, transitive_headers=True, transitive_libs=True)
@@ -125,7 +124,7 @@ def requirements(self):
125124
self.requires("bzip2/1.0.8", headers=True, libs=True, transitive_headers=True, transitive_libs=True)
126125

127126
if self.options.with_ruby:
128-
self.requires("mruby/3.2.0", headers=True, libs=True, transitive_headers=True, transitive_libs=True)
127+
self.requires("mruby/3.4.0", headers=True, libs=True, transitive_headers=True, transitive_libs=True)
129128

130129
self.requires("gtest/1.17.0", headers=True, libs=True, transitive_headers=True, transitive_libs=True, test=True)
131130

demo/agent/Devices.xml

Lines changed: 21 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<MTConnectDevices xmlns:mt="urn:mtconnect.org:MTConnectDevices:2.0"
2+
<MTConnectDevices xmlns:mt="urn:mtconnect.org:MTConnectDevices:2.7"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xmlns="urn:mtconnect.org:MTConnectDevices:2.0"
5-
xsi:schemaLocation="urn:mtconnect.org:MTConnectDevices:2.0 https://schemas.mtconnect.org/schemas/MTConnectDevices_2.0.xsd">
4+
xmlns="urn:mtconnect.org:MTConnectDevices:2.7"
5+
xsi:schemaLocation="urn:mtconnect.org:MTConnectDevices:2.7 ./schemas/MTConnectDevices_2.7.xsd">
66
<Header deviceModelChangeTime="2022-06-17T16:33:21.188094Z" creationTime="2013-04-02T03:40:04Z"
77
assetBufferSize="1024" sender="localhost" assetCount="0" version="2.0" instanceId="1"
88
bufferSize="131072"/>
@@ -133,8 +133,8 @@
133133
<Motion actuation="DIRECT" coordinateSystemIdRef="machine" id="x1motion"
134134
type="PRISMATIC">
135135
<Transformation>
136-
<Rotation>0 0 0</Rotation>
137136
<Translation>0 0 0</Translation>
137+
<Rotation>0 0 0</Rotation>
138138
</Transformation>
139139
<Axis>0.5 0 0</Axis>
140140
</Motion>
@@ -182,8 +182,8 @@
182182
<Motion actuation="DIRECT" coordinateSystemIdRef="machine" id="yi1motion"
183183
type="PRISMATIC">
184184
<Transformation>
185-
<Rotation>0 0 0</Rotation>
186185
<Translation>0 0 0</Translation>
186+
<Rotation>0 0 0</Rotation>
187187
</Transformation>
188188
<Axis>0 1 0</Axis>
189189
</Motion>
@@ -231,8 +231,8 @@
231231
<Motion actuation="DIRECT" coordinateSystemIdRef="machine" id="z1motion"
232232
type="PRISMATIC">
233233
<Transformation>
234-
<Rotation>0 0 0</Rotation>
235234
<Translation>0 0 0</Translation>
235+
<Rotation>0 0 0</Rotation>
236236
</Transformation>
237237
<Axis>0 0 1</Axis>
238238
</Motion>
@@ -280,8 +280,8 @@
280280
<Motion actuation="DIRECT" coordinateSystemIdRef="machine" id="bmotion"
281281
type="REVOLUTE">
282282
<Transformation>
283-
<Rotation>0 0 0</Rotation>
284283
<Translation>-623.423 1027.32 -993.652</Translation>
284+
<Rotation>0 0 0</Rotation>
285285
</Transformation>
286286
<Axis>0 1 0</Axis>
287287
</Motion>
@@ -311,8 +311,8 @@
311311
<Motion actuation="DIRECT" coordinateSystemIdRef="machine" id="cmotion"
312312
type="CONTINUOUS">
313313
<Transformation>
314-
<Rotation>0 0 0</Rotation>
315314
<Translation>0 0 0</Translation>
315+
<Rotation>0 0 0</Rotation>
316316
</Transformation>
317317
<Axis>0 0 1</Axis>
318318
</Motion>
@@ -335,7 +335,7 @@
335335
</Constraints>
336336
</DataItem>
337337
<DataItem type="CHUCK_STATE" category="EVENT" id="LS1ChuckState" name="S1ChuckState"/>
338-
<DataItem type="e:SURFACE_SPEED" subType="x:PATH_1" category="SAMPLE"
338+
<DataItem type="CUTTING_SPEED" subType="x:PATH_1" category="SAMPLE"
339339
id="LS1SurfaceSpeedA" name="S1SurfaceSpeedA" units="MILLIMETER/SECOND"/>
340340
</DataItems>
341341
</Rotary>
@@ -348,8 +348,8 @@
348348
<Motion actuation="DIRECT" coordinateSystemIdRef="machine_r" id="z4motion"
349349
type="PRISMATIC">
350350
<Transformation>
351-
<Rotation>0 0 0</Rotation>
352351
<Translation>0 0 0</Translation>
352+
<Rotation>0 0 0</Rotation>
353353
</Transformation>
354354
<Axis>0 0 1</Axis>
355355
</Motion>
@@ -396,8 +396,8 @@
396396
<Motion actuation="DIRECT" coordinateSystemIdRef="machine_r" id="c2motion"
397397
type="REVOLUTE">
398398
<Transformation>
399-
<Rotation>0 0 0</Rotation>
400399
<Translation>0 0 0</Translation>
400+
<Rotation>0 0 0</Rotation>
401401
</Transformation>
402402
<Axis>0 0 1</Axis>
403403
</Motion>
@@ -419,7 +419,7 @@
419419
</Constraints>
420420
</DataItem>
421421
<DataItem type="CHUCK_STATE" category="EVENT" id="LS2ChuckState" name="S2ChuckState"/>
422-
<DataItem type="e:SURFACE_SPEED" subType="x:PATH_1" category="SAMPLE"
422+
<DataItem type="CUTTING_SPEED" subType="x:PATH_1" category="SAMPLE"
423423
id="LS2SurfaceSpeedA" name="S2SurfaceSpeedA" units="MILLIMETER/SECOND"/>
424424
</DataItems>
425425
</Rotary>
@@ -430,8 +430,8 @@
430430
<Motion actuation="DIRECT" coordinateSystemIdRef="machine" id="c3motion"
431431
type="REVOLUTE">
432432
<Transformation>
433-
<Rotation>0 0 0</Rotation>
434433
<Translation>0 0 0</Translation>
434+
<Rotation>0 0 0</Rotation>
435435
</Transformation>
436436
<Axis>0 0 1</Axis>
437437
</Motion>
@@ -513,38 +513,8 @@
513513
<!--(.*)|UNAVAILABLE-->
514514
<!-- Any combination of n:value and/or n:Infinity/n:INFINITY-->
515515
<!-- Sample: 1:-1.123 2:Infinity 3:INFINITY 4:3.123 5:+123 ....-->
516-
<DataItem type="e:VARIABLES" subType="x:COMMON" category="EVENT" id="Lp1CommonVariable"
517-
name="p1CommonVariable"/>
518-
<!--(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01]) [0-2][0-9]:[0-5][0-9]:[0-5][0-9] .*|UNAVAILABLE-->
519-
<!-- Sample: 2014/12/31 23:59:59 ONE-TOUCH WINDOW CLOSE:RUN DISP-->
520-
<DataItem type="e:MACMAN" subType="x:PANEL_HISTORY" category="EVENT"
521-
id="Lp1MacManPanelHistory" name="p1MacManPanelHistory"/>
522-
<DataItem type="e:OUTPUT_SIGNAL" subType="x:DRY_RUN" category="EVENT"
523-
id="Lp1MachineOperationPanelOutputDryRun" name="p1MachineOperationPanelOutputDryRun"/>
524-
<DataItem type="e:OUTPUT_SIGNAL" subType="x:MACHINE_LOCK" category="EVENT"
525-
id="Lp1MachineOperationPanelOutputMachineLock"
526-
name="p1MachineOperationPanelOutputMachineLock"/>
527-
<DataItem type="e:INPUT_OUTPUT_SIGNAL" subType="x:PLC_MONITOR_IO_1" category="EVENT"
528-
id="LPlcMonitorIO_1" name="PlcMonitorIO_1"/>
529-
<DataItem type="e:INPUT_OUTPUT_SIGNAL" subType="x:PLC_MONITOR_IO_2" category="EVENT"
530-
id="LPlcMonitorIO_2" name="PlcMonitorIO_2"/>
531-
<DataItem type="e:INPUT_OUTPUT_SIGNAL" subType="x:PLC_MONITOR_IO_3" category="EVENT"
532-
id="LPlcMonitorIO_3" name="PlcMonitorIO_3"/>
533-
<DataItem type="e:INPUT_OUTPUT_SIGNAL" subType="x:PLC_MONITOR_IO_4" category="EVENT"
534-
id="LPlcMonitorIO_4" name="PlcMonitorIO_4"/>
535-
<DataItem type="e:INPUT_OUTPUT_SIGNAL" subType="x:PLC_MONITOR_IO_5" category="EVENT"
536-
id="LPlcMonitorIO_5" name="PlcMonitorIO_5"/>
537-
<DataItem type="e:INPUT_OUTPUT_SIGNAL" subType="x:PLC_MONITOR_IO_6" category="EVENT"
538-
id="LPlcMonitorIO_6" name="PlcMonitorIO_6"/>
539-
<DataItem type="e:INPUT_OUTPUT_SIGNAL" subType="x:PLC_MONITOR_IO_7" category="EVENT"
540-
id="LPlcMonitorIO_7" name="PlcMonitorIO_7"/>
541-
<DataItem type="e:INPUT_OUTPUT_SIGNAL" subType="x:PLC_MONITOR_IO_8" category="EVENT"
542-
id="LPlcMonitorIO_8" name="PlcMonitorIO_8"/>
543-
<DataItem type="e:INPUT_OUTPUT_SIGNAL" subType="x:PLC_MONITOR_IO_9" category="EVENT"
544-
id="LPlcMonitorIO_9" name="PlcMonitorIO_9"/>
545-
<DataItem type="e:INPUT_OUTPUT_SIGNAL" subType="x:PLC_MONITOR_IO_10" category="EVENT"
546-
id="LPlcMonitorIO_10" name="PlcMonitorIO_10"/>
547-
<!-- OKUMA CUSTOM TAG - END-->
516+
<DataItem type="VARIABLE" subType="x:COMMON" category="EVENT" id="Lp1CommonVariable"
517+
name="p1CommonVariable" representation="DATA_SET"/>
548518
<DataItem type="PROGRAM_HEADER" name="p1ProgramHeader" category="EVENT"
549519
id="Lp1ProgramHeader"/>
550520
<DataItem type="PALLET_ID" name="p1PalletID" category="EVENT" id="Lp1PalletID"/>
@@ -579,11 +549,11 @@
579549
<DataItem type="TOOL_ASSET_ID" name="p1ToolAssetId" category="EVENT"
580550
id="Lp1ToolAssetId"/>
581551
<!-- OKUMA CUSTOM TAG - START-->
582-
<DataItem type="e:BLOCK_NUMBER" category="EVENT" id="Lp1BlockNumber"
552+
<DataItem type="LINE_NUMBER" category="EVENT" id="Lp1BlockNumber"
583553
name="p1BlockNumber"/>
584-
<DataItem type="e:PATH_FEEDRATE_PER_REV" subType="ACTUAL" name="p1Fract"
554+
<DataItem type="PATH_FEEDRATE_PER_REVOLUTION" subType="ACTUAL" name="p1Fract"
585555
category="SAMPLE" id="Lp1Fract"/>
586-
<DataItem type="e:PATH_FEEDRATE_PER_REV" subType="PROGRAMMED" name="p1Frcmd"
556+
<DataItem type="PATH_FEEDRATE_PER_REVOLUTION" subType="PROGRAMMED" name="p1Frcmd"
587557
category="SAMPLE" id="Lp1Frcmd"/>
588558
<!-- OKUMA CUSTOM TAG - END-->
589559
<DataItem type="CUTTING_SPEED" subType="ACTUAL" category="SAMPLE"
@@ -1102,13 +1072,11 @@
11021072
<DataItem category="EVENT" id="Sovr" type="ROTARY_VELOCITY_OVERRIDE"/>
11031073
<DataItem type="PROGRAM" id="program" category="EVENT" subType="MAIN"/>
11041074
<DataItem type="PROGRAM" subType="ACTIVE" id="activeprog" category="EVENT"/>
1105-
<DataItem type="x:UNIT" id="unitNum" category="EVENT"/>
1106-
<DataItem type="x:SEQUENCE_NUMBER" id="sequenceNum" category="EVENT"/>
11071075
<DataItem type="PART_COUNT" id="PartCountAct" category="EVENT"/>
11081076
<DataItem type="PATH_FEEDRATE" id="Fact" category="SAMPLE" units="MILLIMETER/SECOND" subType="ACTUAL" coordinateSystem="WORK"/>
11091077
<DataItem type="TOOL_NUMBER" id="Tool_number" category="EVENT"/>
11101078
<DataItem type="TOOL_GROUP" id="Tool_group" category="EVENT"/>
1111-
<DataItem type="x:TOOL_SUFFIX" id="Tool_suffix" category="EVENT"/>
1079+
<DataItem type="TOOL_NUMBER" id="Tool_suffix" subType="x:SUFFIX" category="EVENT"/>
11121080
<DataItem type="EXECUTION" id="execution" category="EVENT"/>
11131081
<DataItem id="waitstate" type="WAIT_STATE" category="EVENT"/>
11141082
<DataItem type="CONTROLLER_MODE" id="mode" category="EVENT"/>
@@ -1140,9 +1108,7 @@
11401108
<PartOccurrence id="partocc">
11411109
<DataItems>
11421110
<DataItem id="part_uuid" type="PART_UNIQUE_ID" category="EVENT" />
1143-
<DataItem id="part_geo" type="x:PART_GEOMETRY" category="EVENT" representation="DATA_SET"/>
1144-
<DataItem id="fixture_uuid" type="x:FIXTURE_UNIQUE_ID" category="EVENT" />
1145-
<DataItem id="fixture_geo" type="x:FIXTURE_GEOMETRY" category="EVENT" representation="DATA_SET"/>
1111+
<DataItem id="fixture_uuid" type="FIXTURE_ASSET_ID" category="EVENT" />
11461112
</DataItems>
11471113
</PartOccurrence>
11481114
</Components>
@@ -1178,7 +1144,7 @@
11781144
<Lubrication id="lubrication" name="lubrication">
11791145
<DataItems>
11801146
<DataItem type="SYSTEM" category="CONDITION" id="lubrication_cond"/>
1181-
<DataItem id="lubelevel" type="LEVEL" category="EVENT" units="PERCENT"/>
1147+
<DataItem id="lubelevel" type="FILL_LEVEL" category="SAMPLE" units="PERCENT"/>
11821148
</DataItems>
11831149
</Lubrication>
11841150
</Components>

demo/agent/agent.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Devices = Devices.xml
2-
SchemaVersion = 2.3
2+
SchemaVersion = 2.7
33
WorkerThreads = 3
44
MonitorConfigFiles = yes
55
Port = 5001

demo/compose/agent/agent.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Devices = Devices.xml
2-
SchemaVersion = 2.0
2+
SchemaVersion = 2.7
33
WorkerThreads = 3
44
MonitorConfigFiles = yes
55
Port = 5000

demo/compose/agent/agentmqtt.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Devices = Devices.xml
2-
SchemaVersion = 2.0
2+
SchemaVersion = 2.7
33
WorkerThreads = 3
44
MonitorConfigFiles = yes
55
Port = 5000

0 commit comments

Comments
 (0)