Server: add HistoryRead service first implementation

Description

The purpose of this new feature is to add in S2OPC a first implementation of HistoryRead service (see https://reference.opcfoundation.org/Core/Part4/v104/docs/5.10.3).

Detailed description

The objective is to develop a first basic and limited implementation of HistoryRead which directly triggers an applicative callback.

Code version identification

Current master (commit bba957c2d4f2b3222ec47dbe8829704e4d908a97).

Security impact

No cybersecurity impact has been identified.

Implementation / Known limitations

In S2OPC:

  • verification of global parameter historyreaddetails: only RAW is supported for now. | Bad_HistoryOperationUnsupported otherwise
  • verification of global parameter timestamptoreturn: NEITHER is not valid
  • call an applicative callback (verification of existence) for each HistoryReadValueId. ** input: historyReadDetails, releaseContinuationPoints, boolean for source timestamp and HistoryReadValueId ** Wait for an HistoryReadResult in response statuscode, continuationpoint, and array of datavalue

Timestamps:

  • keep sourcetimestamp stored in the server
  • use S2OPC time as servertimestamp

See https://reference.opcfoundation.org/Core/Part11/v105/docs/6.5.3

The following modules need to be modified:

  • Modification of service_mgr_i.imp to complete the list of supported services and especially treat_session_nano_extended_service_req
  • Add a specific B module. It can be directly done under services_mgr as it does not have any impact on the address space content and only triggers a callback
  • Add a callback in libs2opc_server.h which is triggered each time an history_read request is received
Edited Oct 30, 2025 by Vincent Monfort
Assignee Loading
Time tracking Loading