コード例 #1
0
        /// <summary>
        /// Gets the message reader.
        /// </summary>
        /// <param name="name">The name of the reader.</param>
        /// <param name="configuration">The configuration of the object implementing the <see cref="T:UAOOI.Networking.SemanticData.MessageHandling.IMessageReader" />.</param>
        /// <param name="uaDecoder">The decoder that provides methods to be used to decode OPC UA Built-in types.</param>
        /// <returns>An object implementing <see cref="T:UAOOI.Networking.SemanticData.MessageHandling.IMessageReader" /> that provides functionality supporting reading the messages from the wire.</returns>
        IMessageReader IMessageHandlerFactory.GetIMessageReader(string name, string configuration, IUADecoder uaDecoder)
        {
            UDPMessageHandlerSemanticEventSource.Log.GetIMessageHandler($"{nameof(IMessageHandlerFactory.GetIMessageReader)}{{ name = {name}, configuration= {configuration} }}");
            UDPReaderConfiguration _configuration = UDPReaderConfiguration.Parse(configuration);
            BinaryUDPPackageReader _ret           = new BinaryUDPPackageReader(uaDecoder, _configuration);

            return(_ret);
        }
コード例 #2
0
        /// <summary>
        /// Gets an instance implementing <see cref="IBinaryDataTransferGraphReceiver" /> interface.
        /// </summary>
        /// <param name="name">The name to be used for identification of the underlying TDG transport channel.</param>
        /// <param name="configuration">The configuration of the object implementing the <see cref="T:UAOOI.Networking.Core.IBinaryDataTransferGraphReceiver" />.</param>
        /// <returns>An object implementing <see cref="IBinaryDataTransferGraphReceiver" /> that provides functionality supporting reading the messages from the wire.</returns>
        IBinaryDataTransferGraphReceiver IMessageHandlerFactory.GetBinaryDTGReceiver(string name, string configuration)
        {
            UDPMessageHandlerSemanticEventSource.Log.GetIMessageHandler($"{nameof(IMessageHandlerFactory.GetBinaryDTGReceiver)}{{ name = {name}, configuration= {configuration} }}");
            UDPReaderConfiguration _configuration = UDPReaderConfiguration.Parse(configuration);
            BinaryUDPPackageReader _ret           = new BinaryUDPPackageReader(_configuration);

            return(_ret);
        }
コード例 #3
0
        /// <summary>
        /// Gets the message reader.
        /// </summary>
        /// <param name="name">The name of the reader.</param>
        /// <param name="configuration">The configuration of the object implementing the <see cref="T:UAOOI.Networking.SemanticData.MessageHandling.IMessageReader" />.</param>
        /// <param name="uaDecoder">The decoder that provides methods to be used to decode OPC UA Built-in types.</param>
        /// <returns>An object implementing <see cref="T:UAOOI.Networking.SemanticData.MessageHandling.IMessageReader" /> that provides functionality supporting reading the messages from the wire.</returns>
        IMessageReader IMessageHandlerFactory.GetIMessageReader(string name, string configuration, IUADecoder uaDecoder)
        {
            UDPReaderConfiguration _configuration = UDPReaderConfiguration.Parse(configuration);
            BinaryUDPPackageReader _ret           = new BinaryUDPPackageReader(uaDecoder, _configuration.UDPPortNumber);

            _ret.MulticastGroup = _configuration.DefaultMulticastGroup;
            _ret.ReuseAddress   = _configuration.ReuseAddress;
            return(_ret);
        }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MyState"/> class.
 /// </summary>
 public MyState(BinaryUDPPackageReader parent)
 {
     State    = HandlerState.Disabled;
     m_Parent = parent;
 }