influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.61k stars 5.57k forks source link

OPC-UA Client: Support for ExtensionObjects #9911

Open Jayclifford345 opened 3 years ago

Jayclifford345 commented 3 years ago

Feature Request

In more complex OPC-UA server architectures there is heavy use of extension objects. An ExtensionObject is a container for any Structured DataTypes which cannot be encoded as one of the other built-in data types. A prime example for this would be an alert:

struct custom_alert {
    bool    door_open;
    int32_t current_operating_mode;
    float   temperature;
};

Proposal:

We should provide functionality within the OPC-UA client for deserializing Extention Objects. This could be done by pre-declaring Extention Objects to the client. I believe gopcua does support an Extention Object repository though I do not know if these objects need to be declared before the binary is built.

vdkost commented 3 years ago

thank you for opening the request. I search for a possibility to handle more complex ExtensionObjects with customized dataTypes, like BooleanCollection example_extensionObjectType_of_BooleanCollection_of_Boolean or FloatCollection example_extensionObjectType_of_FloatCollection_of_Single

quenorha commented 3 years ago

I would also add the array object support as feature request, since using arrays can really lower the CPU load of the server for same number of data.

magiconair commented 2 years ago

https://github.com/gopcua/opcua does support extension objects but they have to be declared and registered at compile time. See https://github.com/gopcua/opcua/blob/main/examples/udt/udt.go

I'm open for a dynamic definition of extension objects at runtime and then discovery through the type dictionary. PRs are welcome.

Daniel-Deimann commented 1 year ago

What is the expected date that this will be implemented ? Or is there a work-around for the time being?