Skip to content

617 address create time resolution - #618

Merged
wsobel merged 10 commits into
mainfrom
617_address_create_time_resolution
Sep 2, 2026
Merged

617 address create time resolution#618
wsobel merged 10 commits into
mainfrom
617_address_create_time_resolution

Conversation

@wsobel

@wsobel wsobel commented Sep 2, 2026

Copy link
Copy Markdown
Member
  • Changed create time in the header to include microseconds
  • Added resource logging for memory and file descriptors
    • MonitorResources=yes in the configuration file.
  • Found a leak in FDs when a session closes in a specific way.
  • Fixed some build issues with VS 18 2026 with cmake

@wsobel
wsobel requested review from simonyg and a lite review from Copilot September 2, 2026 15:02
@wsobel
wsobel merged commit e54c17a into main Sep 2, 2026
8 checks passed
@wsobel
wsobel deleted the 617_address_create_time_resolution branch September 2, 2026 15:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are confirmed test-code memory leaks (unfreed new[]/new) and potentially brittle Conan CMake tool version gating that should be resolved before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR primarily performs a broad C++ formatting/const-correctness style pass (pointer/reference spacing and signature tweaks) across tests and core library headers/sources, alongside a few build/tooling updates (Conan CMake tool requirements and version bumps).

Changes:

  • Apply consistent pointer/reference spacing and signature normalization across test_package/ and src/mtconnect/.
  • Update Conan VS/macOS profiles to require newer CMake tool versions; bump agent version in CMakeLists.txt.
  • Add/adjust a few includes and small behavior tweaks (e.g., message_mapper.hpp dependency include; logging level change).
File summaries
File Description
test_package/xml_printer_test.cpp Formatting/signature spacing normalization in tests
test_package/utilities_test.cpp Formatting/signature spacing normalization in tests
test_package/url_parser_test.cpp Formatting/signature spacing normalization in tests
test_package/unit_conversion_test.cpp Formatting/signature spacing normalization in tests
test_package/timestamp_extractor_test.cpp Formatting/signature spacing normalization in tests
test_package/testsink_service.hpp Formatting/signature spacing normalization in test service
test_package/testadapter_service.hpp Formatting/signature spacing normalization in test service
test_package/task_test.cpp Formatting/signature spacing normalization in tests
test_package/target_test.cpp Formatting/signature spacing normalization in tests
test_package/specification_test.cpp Formatting/signature spacing normalization in tests
test_package/solid_model_test.cpp Formatting/signature spacing normalization in tests
test_package/shdr_tokenizer_test.cpp Formatting/signature spacing normalization in tests
test_package/sensor_configuration_test.cpp Formatting/signature spacing normalization in tests
test_package/routing_test.cpp Formatting/signature spacing normalization in tests
test_package/response_document_test.cpp Formatting + (introduced) RAII opportunity for file buffer
test_package/relationship_test.cpp Formatting/signature spacing normalization in tests
test_package/references_test.cpp Formatting/signature spacing normalization in tests
test_package/raw_material_test.cpp Formatting/signature spacing normalization in tests
test_package/qname_test.cpp Formatting/signature spacing normalization in tests
test_package/qif_document_test.cpp Formatting/signature spacing normalization in tests
test_package/pipeline_edit_test.cpp Formatting/signature spacing normalization in tests
test_package/pipeline_deliver_test.cpp Formatting/signature spacing normalization in tests
test_package/physical_asset_test.cpp Formatting/signature spacing normalization in tests
test_package/part_test.cpp Formatting/signature spacing normalization in tests
test_package/pallet_test.cpp Formatting/signature spacing normalization in tests
test_package/observation_test.cpp Formatting/signature spacing normalization in tests
test_package/mtconnect_xml_transform_test.cpp Formatting/signature spacing normalization in tests
test_package/mqtt_isolated_test.cpp Formatting + (introduced) heap allocations now visible for cleanup
test_package/mqtt_adapter_test.cpp Formatting/signature spacing normalization in tests
test_package/message_mapping_test.cpp Include ordering adjusted; comment now inconsistent with ordering
test_package/kinematics_test.cpp Formatting/signature spacing normalization in tests
test_package/json_printer_test.cpp Formatting/signature spacing normalization in tests
test_package/json_printer_stream_test.cpp Formatting/signature spacing normalization in tests
test_package/json_printer_probe_test.cpp Formatting/signature spacing normalization in tests
test_package/json_printer_error_test.cpp Formatting/signature spacing normalization in tests
test_package/json_printer_asset_test.cpp Formatting/signature spacing normalization in tests
test_package/json_parser_test.cpp Formatting/signature spacing normalization in tests
test_package/json_helper.hpp Formatting/signature spacing normalization in test helpers
test_package/json_device_parser_test.cpp Formatting/signature spacing normalization in tests
test_package/image_file_test.cpp Formatting/signature spacing normalization in tests
test_package/fixture_test.cpp Formatting/signature spacing normalization in tests
test_package/file_cache_test.cpp Formatting/signature spacing normalization in tests
test_package/file_asset_test.cpp Formatting/signature spacing normalization in tests
test_package/entity_test.cpp Formatting/signature spacing normalization in tests
test_package/entity_printer_test.cpp Formatting/signature spacing normalization in tests
test_package/entity_parser_test.cpp Formatting/signature spacing normalization in tests
test_package/duplicate_filter_test.cpp Formatting/signature spacing normalization in tests
test_package/device_test.cpp Formatting/signature spacing normalization in tests
test_package/data_set_test.cpp Formatting/signature spacing normalization in tests
test_package/data_item_test.cpp Formatting/signature spacing normalization in tests
test_package/cutting_tool_test.cpp Formatting/signature spacing normalization in tests
test_package/correct_timestamp_test.cpp Formatting/signature spacing normalization in tests
test_package/coordinate_system_test.cpp Formatting/signature spacing normalization in tests
test_package/connector_test.cpp Formatting/signature spacing normalization in tests
test_package/config_parser_test.cpp Formatting/signature spacing normalization in tests
test_package/composition_test.cpp Formatting/signature spacing normalization in tests
test_package/component_test.cpp Formatting/signature spacing normalization in tests
test_package/component_parameters_test.cpp Formatting/signature spacing normalization in tests
test_package/circular_buffer_test.cpp Formatting/signature spacing normalization in tests
test_package/checkpoint_test.cpp Formatting/signature spacing normalization in tests
test_package/change_observer_test.cpp Formatting/signature spacing normalization in tests
test_package/asset_test.cpp Formatting/signature spacing normalization in tests
test_package/asset_hash_test.cpp Formatting/signature spacing normalization in tests
test_package/asset_buffer_test.cpp Formatting/signature spacing normalization in tests
test_package/agent_device_test.cpp Formatting/signature spacing normalization in tests
test_package/adapter_test.cpp Formatting/signature spacing normalization in tests
src/mtconnect/validation/observations.hpp Comment/indentation spacing normalization
src/mtconnect/source/source.cpp Signature spacing normalization
src/mtconnect/source/loopback_source.hpp Signature spacing normalization
src/mtconnect/source/loopback_source.cpp Signature spacing normalization
src/mtconnect/source/error_code.hpp Signature spacing normalization
src/mtconnect/source/adapter/shdr/shdr_pipeline.hpp Signature spacing normalization
src/mtconnect/source/adapter/shdr/shdr_pipeline.cpp Signature spacing normalization
src/mtconnect/source/adapter/shdr/shdr_adapter.hpp Signature spacing normalization
src/mtconnect/source/adapter/shdr/shdr_adapter.cpp Signature spacing normalization
src/mtconnect/source/adapter/shdr/connector.hpp Signature spacing normalization
src/mtconnect/source/adapter/shdr/connector.cpp Signature spacing normalization
src/mtconnect/source/adapter/mqtt/mqtt_adapter.hpp Signature spacing normalization
src/mtconnect/source/adapter/mqtt/mqtt_adapter.cpp Signature spacing normalization
src/mtconnect/source/adapter/agent_adapter/session.hpp Signature spacing normalization
src/mtconnect/source/adapter/agent_adapter/https_session.hpp Signature spacing normalization
src/mtconnect/source/adapter/agent_adapter/http_session.hpp Signature spacing normalization
src/mtconnect/source/adapter/agent_adapter/agent_adapter.hpp Signature spacing normalization
src/mtconnect/source/adapter/agent_adapter/agent_adapter.cpp Signature spacing normalization
src/mtconnect/source/adapter/adapter.hpp Signature spacing normalization
src/mtconnect/source/adapter/adapter_pipeline.hpp Signature spacing normalization
src/mtconnect/source/adapter/adapter_pipeline.cpp Signature spacing normalization
src/mtconnect/sink/sink.cpp Signature spacing normalization
src/mtconnect/sink/rest_sink/tls_dector.hpp Signature spacing normalization
src/mtconnect/sink/rest_sink/session.hpp Signature spacing normalization
src/mtconnect/sink/rest_sink/response.hpp Signature spacing normalization
src/mtconnect/sink/rest_sink/request.hpp Signature spacing normalization
src/mtconnect/sink/rest_sink/parameter.hpp Signature spacing normalization
src/mtconnect/sink/rest_sink/cached_file.hpp Signature spacing normalization
src/mtconnect/sink/mqtt_sink/mqtt_service.hpp Signature spacing normalization + namespace comment alignment
src/mtconnect/sink/mqtt_entity_sink/mqtt_entity_sink.hpp Namespace comment alignment
src/mtconnect/sink/mqtt_entity_sink/mqtt_entity_sink.cpp Namespace comment alignment
src/mtconnect/ruby/ruby_vm.hpp Signature spacing normalization
src/mtconnect/ruby/ruby_type.hpp Signature spacing normalization
src/mtconnect/ruby/embedded.hpp Signature spacing normalization
src/mtconnect/ruby/embedded.cpp Signature spacing normalization
src/mtconnect/printer/printer.hpp Signature spacing normalization
src/mtconnect/printer/json_printer.hpp Signature spacing normalization
src/mtconnect/pipeline/validator.hpp Signature spacing normalization
src/mtconnect/pipeline/upcase_value.hpp Signature spacing normalization
src/mtconnect/pipeline/topic_mapper.hpp Signature spacing normalization
src/mtconnect/pipeline/timestamp_extractor.hpp Signature spacing normalization
src/mtconnect/pipeline/shdr_tokenizer.hpp Signature spacing normalization
src/mtconnect/pipeline/shdr_token_mapper.hpp Signature spacing normalization
src/mtconnect/pipeline/response_document.hpp Signature spacing normalization
src/mtconnect/pipeline/pipeline_contract.hpp Signature spacing normalization
src/mtconnect/pipeline/pipeline_context.hpp Signature spacing normalization
src/mtconnect/pipeline/period_filter.hpp Signature spacing normalization
src/mtconnect/pipeline/mtconnect_xml_transform.hpp Signature spacing normalization
src/mtconnect/pipeline/message_mapper.hpp Adds explicit include for adapter handler dependency
src/mtconnect/pipeline/json_mapper.hpp Signature spacing normalization
src/mtconnect/pipeline/duplicate_filter.hpp Signature spacing normalization
src/mtconnect/pipeline/delta_filter.hpp Signature spacing normalization
src/mtconnect/pipeline/deliver.cpp Lowers some log lines from info→debug
src/mtconnect/pipeline/correct_timestamp.hpp Signature spacing normalization
src/mtconnect/pipeline/convert_sample.hpp Signature spacing normalization
src/mtconnect/parser/xml_parser.hpp Signature spacing normalization
src/mtconnect/parser/json_parser.hpp Signature spacing normalization
src/mtconnect/parser/json_parser.cpp Signature spacing normalization
src/mtconnect/observation/change_observer.cpp Signature spacing normalization
src/mtconnect/mqtt/mqtt_server.hpp Signature spacing normalization
src/mtconnect/mqtt/mqtt_client.hpp Signature spacing normalization
src/mtconnect/entity/xml_printer.hpp Signature spacing normalization
src/mtconnect/entity/xml_parser.hpp Signature spacing normalization
src/mtconnect/entity/qname.hpp Signature spacing normalization
src/mtconnect/entity/json_parser.hpp Signature spacing normalization
src/mtconnect/device_model/reference.hpp Signature spacing normalization
src/mtconnect/device_model/reference.cpp Signature spacing normalization
src/mtconnect/device_model/device.cpp Signature spacing normalization
src/mtconnect/device_model/data_item/unit_conversion.hpp Signature spacing normalization
src/mtconnect/device_model/data_item/unit_conversion.cpp Signature spacing normalization
src/mtconnect/device_model/data_item/relationships.hpp Signature spacing normalization
src/mtconnect/device_model/data_item/definition.hpp Signature spacing normalization
src/mtconnect/device_model/configuration/specifications.cpp Namespace comment alignment
src/mtconnect/device_model/configuration/solid_model.cpp Namespace comment alignment
src/mtconnect/device_model/configuration/sensor_configuration.cpp Namespace comment alignment
src/mtconnect/device_model/configuration/relationships.cpp Namespace comment alignment
src/mtconnect/device_model/configuration/motion.cpp Namespace comment alignment
src/mtconnect/device_model/configuration/coordinate_systems.cpp Namespace comment alignment
src/mtconnect/device_model/configuration/configuration.cpp Namespace comment alignment
src/mtconnect/device_model/composition.hpp Minor pointer spacing normalization
src/mtconnect/device_model/composition.cpp Signature spacing normalization
src/mtconnect/device_model/component.cpp Signature spacing normalization
src/mtconnect/device_model/agent_device.hpp Signature spacing normalization
src/mtconnect/device_model/agent_device.cpp Signature spacing normalization
src/mtconnect/configuration/service.hpp Signature spacing normalization
src/mtconnect/configuration/parser.hpp Signature spacing normalization
src/mtconnect/configuration/hook_manager.hpp Signature spacing normalization
src/mtconnect/configuration/config_options.hpp Adds MonitorResources config key constant
src/mtconnect/buffer/circular_buffer.hpp Signature spacing normalization
src/mtconnect/asset/asset.cpp Signature spacing normalization
conan/profiles/vs64shared Adds tool requirements for newer CMake on VS shared profile
conan/profiles/vs64debug Adds tool requirements for newer CMake on VS debug profile
conan/profiles/vs64 Adds tool requirements for newer CMake on VS release profile
conan/profiles/vs32shared Adds tool requirements for newer CMake on Win32 shared profile
conan/profiles/vs32debug Adds tool requirements for newer CMake on Win32 debug profile
conan/profiles/vs32 Adds tool requirements for newer CMake on Win32 release profile
conan/profiles/macos Raises CMake tool requirement; removes pinned OS version setting
CMakeLists.txt Bumps agent version numbers; removes hardcoded macOS deployment target
Review details
  • Files reviewed: 25/250 changed files
  • Comments generated: 9
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread conan/profiles/macos
Comment on lines 7 to 9
[platform_tool_requires]
cmake/>3.26.0
cmake/>4.0

Comment thread conan/profiles/vs32
Comment on lines +11 to +15
[platform_tool_requires]
cmake/>4.3

[replace_tool_requires]
cmake/*: cmake/>4.3
Comment thread conan/profiles/vs32debug
Comment on lines +13 to +17
[platform_tool_requires]
cmake/>4.3

[replace_tool_requires]
cmake/*: cmake/>4.3
Comment thread conan/profiles/vs32shared
Comment on lines +11 to +15
[platform_tool_requires]
cmake/>4.3

[replace_tool_requires]
cmake/*: cmake/>4.3
Comment thread conan/profiles/vs64
Comment on lines +11 to +15
[platform_tool_requires]
cmake/>4.3

[replace_tool_requires]
cmake/*: cmake/>4.3
Comment thread conan/profiles/vs64debug
Comment on lines +11 to +15
[platform_tool_requires]
cmake/>4.3

[replace_tool_requires]
cmake/*: cmake/>4.3
Comment thread conan/profiles/vs64shared
Comment on lines +14 to +18
[platform_tool_requires]
cmake/>4.3

[replace_tool_requires]
cmake/*: cmake/>4.3
Comment on lines +428 to 430
MqttAuthorization* mqttAuct = new MqttAuthorization(options);
MqttTopicPermission permission = mqttAuct->getPermissionsForClient("mqtt_tcp_client_cpp/topic1");

Comment on lines 28 to +31
// adapter_pipeline.hpp defines source::adapter::Handler, and message_mapper.hpp
// references bare `string`/`Handler`, so both must be visible before it is parsed.
#include "mtconnect/source/adapter/adapter_pipeline.hpp"
#include "mtconnect/pipeline/message_mapper.hpp"
#include "mtconnect/source/adapter/adapter_pipeline.hpp"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

creationTime header is coarser than the other timestamps in the same document

2 participants