Semantic-Dataover the User Datagram Protocol (UDP) to be compliant with the specifications mentioned in the section Normative references.
Transportover UDP is provided by the project Networking.UDPMessageHandler. Because intentionally the SDK is designed to use any transport protocol, a custom external component implementing UDP connectivity can be seamlessly integrated with this SDK using dependency injection concept illustrated by the following domain model:
Messagedatagrams to other programs with a minimum of protocol mechanism. Using this protocol the messages delivery and duplicate protection are not guaranteed.
data octets(stream of bytes). The
Lengthfield in the protocol header contains the length in octets of the user datagram including the header and the
Source Port: - indicates the port of the sending process;
Destination Port: indicates the port of the ultimate destination process;
Destination Porthave a meaning only within the context of a particular internet address.
Publisher: pushes messages to an underlying transport` layer.
Subscriber: polls messages from the underlying transport layer.
Publisheris the actor that pushes
NetworkMessagestructures to an underlying transport layer. It represents a certain data source, for example, a control device, a manufacturing process, a weather station, or a stock exchange. It may be also OPC UA Clients, OPC UA Servers or in general any applications that understand the syntax and semantics of the
Subscriberactors are the consumers of
NetworkMessagestructure, which are polled from the underlying transport layer. They may be OPC UA Clients, OPC UA Servers or in general any applications that understand the syntax and semantics of the
Subscriberdon't have any subscriptions management functionality, namely, they follow a communication paradigm called unsolicited notification. When unsolicited notification occurs, a client receives a message that it has never requested. The
Subscribermust use a filtering mechanism to process only messages it is interested in.
NetworkMessagestructure serialized as the UDP
Destination Portand appropriate Internet address must be provided by the PubSub upper communication layer.
Publishershall support all variations it allows through configuration. The required set of features is defined through profiles defined in OPC UA Part 7: Profiles. A
Subscribershall be able to process all possible
NetworkMessagetypes and shall be able to skip information the
Subscriberis not interested in. The
Subscribermay not support all security policies.
NetworkMessageis sent as the UDP
data octets. It is expected that the
Subscriberprocess receiving the
NetworkMessagecan process it without needing to know that it was transported via UDP.
4840. This is the default and recommended port for broadcast, multicast, and unicast communication. Alternative ports may be defined.
Transportlayer for the UDP protocol is illustrated by the project UA Data Example Application. This library implements the
IMessageHandlerFactoryin the class
MessageHandlerFactoryused to create communication infrastructure for the
Producerrole as well.
JoinMulticastGroupmethod subscribes the
UdpClientto a multicast group using the specified
IPAddress. After calling the
JoinMulticastGroupmethod, the underlying
Socketsends an Internet Group Management Protocol (IGMP) packet to the router requesting membership to the multicast group. The multicast address range is
184.108.40.206. If you specify an address outside this range or if the router to which the request is made is not multicast enabled,
UdpClientwill throw a
SocketException. Once the
UdpClientis listed with the router as a member of the multicast group, it will be able to receive multicasted datagrams sent to the specified
Publisherdo not need to belong to a multicast group to send datagrams to a multicast IP address. To get more details visit the MSDN online documentation.