#include "dds-opcua_services.idl" #ifndef USE_STANDARD_DDS_DCPS_IDL module DDS { // Forward declaration struct DomainParticipantQoS { octet participant_qos; }; struct DataWriterQos { octet datawriter_qos; }; #else #include "dds_dcps.idl" // http://www.omg.org/spec/DDS/20140501/dds_dcps.idl #endif }; // DDS module OMG { module DDSOPCUA { module OPCUA2DDS { /******************************************************************** * Common data type definitions ********************************************************************/ /* * Array types */ typedef sequence BooleanArray; typedef sequence SByteArray; typedef sequence ByteArray; typedef sequence Int16Array; typedef sequence UInt16Array; typedef sequence Int32Array; typedef sequence UInt32Array; typedef sequence Int64Array; typedef sequence UInt64Array; typedef sequence FloatArray; typedef sequence DoubleArray; typedef sequence StringArray; typedef sequence DateTimeArray; typedef sequence GuidArray; typedef sequence ByteStringArray; typedef sequence XmlElementArray; typedef sequence NodeIdArray; typedef sequence ExpandedNodeIdArray; typedef sequence StatusCodeArray; typedef sequence QualifiedNameArray; typedef sequence LocalizedTextArray; typedef sequence ExtensionObjectArray; /* * Multi-dimensional array types */ @nested struct BooleanMatrix { BooleanArray array; sequence array_dimensions; }; @nested struct SByteMatrix { SByteArray array; sequence array_dimensions; }; @nested struct ByteMatrix { ByteArray array; sequence array_dimensions; }; @nested struct Int16Matrix { Int16Array array; sequence array_dimensions; }; @nested struct UInt16Matrix { UInt16Array array; sequence array_dimensions; }; @nested struct Int32Matrix { Int32Array array; sequence array_dimensions; }; @nested struct UInt32Matrix { UInt32Array array; sequence array_dimensions; }; @nested struct Int64Matrix { Int64Array array; sequence array_dimensions; }; @nested struct UInt64Matrix { UInt64Array array; sequence array_dimensions; }; @nested struct FloatMatrix { FloatArray array; sequence array_dimensions; }; @nested struct DoubleMatrix { DoubleArray array; sequence array_dimensions; }; @nested struct StringMatrix { StringArray array; sequence array_dimensions; }; @nested struct DateTimeMatrix { DateTimeArray array; sequence array_dimensions; }; @nested struct GuidMatrix { GuidArray array; sequence array_dimensions; }; @nested struct ByteStringMatrix { ByteStringArray array; sequence array_dimensions; }; @nested struct XmlElementMatrix { XmlElementArray array; sequence array_dimensions; }; @nested struct NodeIdMatrix { NodeIdArray array; sequence array_dimensions; }; @nested struct ExpandedNodeIdMatrix { ExpandedNodeIdArray array; sequence array_dimensions; }; @nested struct StatusCodeMatrix { StatusCodeArray array; sequence array_dimensions; }; @nested struct QualifiedNameMatrix { QualifiedNameArray array; sequence array_dimensions; }; @nested struct LocalizedTextMatrix { LocalizedTextArray array; sequence array_dimensions; }; @nested struct ExtensionObjectMatrix { ExtensionObjectArray array; sequence array_dimensions; }; /******************************************************************** * OPC UA Subscription Mapping ********************************************************************/ /* * OPC UA Inputs */ @nested struct DataItem { NodeId node_id; uint32 attribute_id; double sampling_interval; uint32 queue_size; boolean discard_oldest; // Only one (or none) of the following filter kinds // can be applied at a time @optional DataChangeFilter data_change_filter; @optional AggregateFilter aggregate_filter; }; @nested struct EventItem { NodeId node_id; double sampling_interval; uint32 queue_size; boolean discard_oldest; @optional EventFilter event_filter; }; enum MonitoredItemKind { DATA_MONITORED_ITEM, EVENT_MONITORED_ITEM }; @nested union MonitoredItem switch (MonitoredItemKind) { case DATA_MONITORED_ITEM: DataItem data_item; case EVENT_MONITORED_ITEM: EventItem event_item; }; @nested struct SubscriptionProtocol { double requested_publishing_interval; uint32 requested_lifetime_count; uint32 requested_max_keepalive_count; uint32 max_notifications_per_publish; boolean publishing_enabled; octet priority; }; @nested struct OpcUaConectionConfig { uint32 protocol_version; uint32 send_buffer_size; uint32 recv_buffer_size; uint32 max_message_size; uint32 max_chunk_count; }; @nested struct OpcUaConnection { string endpoint_url; uint32 timeout; uint32 secure_channel_lifetime; OpcUaConectionConfig local_connection; }; @nested struct OpcUaInput { string name; OpcUaConnection opcua_connection; SubscriptionProtocol subscription_protocol; sequence monitored_items; }; /* * DDS Outputs */ @nested struct DdsRegisterType { string type_name; string type_ref; }; @nested struct DdsDomainParticipant { int32 domain_id; sequence register_types; DDS::DomainParticipantQoS participant_qos; }; @nested struct DdsOutput { string name; @external DdsDomainParticipant domain_participant_ref; string topic_name; string registered_type_name; @optional DDS::DataWriterQos datawriter_qos; }; /* * Mapping */ enum AssignmentKind { DATA_ITEM_ASSIGNMENT, EVENT_FIELD_ASSIGNMENT, CONSTANT_VALUE_ASSIGNMENT }; @nested struct DataItemRef { string data_item_name; }; @nested struct EventFieldRef { string event_name; uint32 event_field_index; }; @nested union AssignmentInput switch (AssignmentKind) { case DATA_ITEM_ASSIGNMENT: DataItemRef data_item; case EVENT_FIELD_ASSIGNMENT: EventFieldRef event_field; case CONSTANT_VALUE_ASSIGNMENT: Variant constant_value; }; @nested struct FieldAssignment { string dds_output_field_ref; // name of output field @optional @external OpcUaInput opcua_input_ref; AssignmentInput assignment_input; }; @nested struct Assignment { @external DdsOutput dds_output_ref; @external OpcUaInput opcua_input_ref; sequence field_assignments; }; @nested struct InputOutputMapping { sequence assignments; }; /* * SubscriptionMapping */ struct SubscriptionMapping { sequence opcua_inputs; sequence dds_outputs; InputOutputMapping mapping; }; };};}; // OMG::DDSOPCUA::OPCUA2DDS