/// <summary> /// Initializes a new instance of the <see cref="MessageReaderBase"/> class providing basic implementation of the <see cref="IMessageReader"/> interface. /// </summary> /// <param name="uaDecoder">The decoder that provides methods to be used to decode OPC UA Built-in types.</param> public MessageReaderBase(IUADecoder uaDecoder) { if (uaDecoder == null) throw new ArgumentNullException(nameof(uaDecoder)); m_UADecoder = uaDecoder; m_ReadValueDelegate = ReadValueVariant; }
/// <summary> /// Initializes a new instance of the <see cref="BinaryUDPPackageReader"/> class. /// </summary> /// <param name="port">The port.</param> /// <param name="trace">The trace.</param> public BinaryUDPPackageReader(IUADecoder uaDecoder, int port, Action <string> trace, IConsumerViewModel viewModel) : base(uaDecoder) { State = new MyState(this); m_Trace = trace; m_UDPPort = port; m_ViewModel = viewModel; }
public IMessageReader GetIMessageReader(string name, MessageChannelConfiguration configuration, IUADecoder uaDecoder) { Assert.AreEqual("UDP", name); Assert.IsNull(configuration); Assert.IsNotNull(uaDecoder); return MyMessageReader; }
/// <summary> /// Initializes a new instance of the <see cref="BinaryUDPPackageReader" /> class. /// </summary> /// <param name="uaDecoder">The ua decoder.</param> /// <param name="configuration">The configuration of the reader.</param> internal BinaryUDPPackageReader(IUADecoder uaDecoder, UDPReaderConfiguration configuration) : base(uaDecoder) { UDPMessageHandlerSemanticEventSource.Log.EnteringMethod(nameof(BinaryUDPPackageReader), $"{nameof(BinaryUDPPackageReader)}({configuration.ToString()})"); State = new MyState(this); m_UDPPort = configuration.UDPPortNumber; MulticastGroup = configuration.DefaultMulticastGroup; ReuseAddress = configuration.ReuseAddress; }
/// <summary> /// Initializes a new instance of the <see cref="BinaryUDPPackageReader"/> class. /// </summary> /// <param name="port">The port.</param> /// <param name="trace">The trace.</param> public BinaryUDPPackageReader(IUADecoder uaDecoder, int port, Action<string> trace, IConsumerViewModel viewModel) : base(uaDecoder) { State = new MyState(this); m_Trace = trace; m_UDPPort = port; m_ViewModel = viewModel; }
/// <summary> /// Gets the new instance of <see cref="IMessageReader"/>. /// </summary> /// <param name="name">The name of the reader.</param> /// <param name="configuration">The configuration of the reader.</param> /// <returns>An instance of <see cref="IMessageReader"/>.</returns> IMessageReader IMessageHandlerFactory.GetIMessageReader(string name, MessageChannelConfiguration configuration, IUADecoder uaDecoder) { BinaryUDPPackageReader _ret = new BinaryUDPPackageReader(uaDecoder, UDPPortNumber, m_Trace, m_ParentViewModel); m_ToDispose(_ret); if (Properties.Settings.Default.JoinMulticastGroup) _ret.MulticastGroup = IPAddress.Parse(Properties.Settings.Default.DefaultMulticastGroup); _ret.ReuseAddress = Properties.Settings.Default.ReuseAddress; return _ret; }
/// <summary> /// Initializes a new instance of the <see cref="MessageReaderBase"/> class providing basic implementation of the <see cref="IMessageReader"/> interface. /// </summary> /// <param name="uaDecoder">The decoder that provides methods to be used to decode OPC UA Built-in types.</param> public MessageReaderBase(IUADecoder uaDecoder) { if (uaDecoder == null) { throw new ArgumentNullException(nameof(uaDecoder)); } m_UADecoder = uaDecoder; m_ReadValueDelegate = ReadValueVariant; }
/// <summary> /// Gets the new instance of <see cref="IMessageReader"/>. /// </summary> /// <param name="name">The name of the reader.</param> /// <param name="configuration">The configuration of the reader.</param> /// <returns>An instance of <see cref="IMessageReader"/>.</returns> IMessageReader IMessageHandlerFactory.GetIMessageReader(string name, MessageChannelConfiguration configuration, IUADecoder uaDecoder) { BinaryUDPPackageReader _ret = new BinaryUDPPackageReader(uaDecoder, UDPPortNumber, m_Trace, m_ParentViewModel); m_ToDispose(_ret); if (Properties.Settings.Default.JoinMulticastGroup) { _ret.MulticastGroup = IPAddress.Parse(Properties.Settings.Default.DefaultMulticastGroup); } _ret.ReuseAddress = Properties.Settings.Default.ReuseAddress; return(_ret); }
/// <summary> /// Gets the new instance of <see cref="IMessageReader"/>. /// </summary> /// <param name="name">The name.</param> /// <param name="configuration">The configuration.</param> /// <remarks>It is intentionally not implemented</remarks> /// <returns>An instance of <see cref="IMessageReader"/>.</returns> /// <exception cref="System.NotImplementedException"></exception> IMessageReader IMessageHandlerFactory.GetIMessageReader(string name, MessageChannelConfiguration configuration, IUADecoder uaDecoder) { throw new NotImplementedException(); }
/// <summary> /// Initializes a new instance of the <see cref="BinaryPacketDecoder" /> class is to be used by the packet level decoding. /// </summary> /// <param name="uaDecoder">The UA decoder to be used fo decode UA Built-in data types.</param> public BinaryDecoder(IUADecoder uaDecoder) : base(uaDecoder) { }
/// <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); }
/// <summary> /// Initializes a new instance of the <see cref="BinaryMessageDecoder" /> class. /// </summary> /// <param name="uaDecoder">The decoder that provides methods to be used to decode OPC UA Built-in types.</param> public BinaryMessageDecoder(IUADecoder uaDecoder) : base(uaDecoder) { b_MessageHeader = MessageHeader.GetConsumerMessageHeader(this); }
public IMessageReader GetIMessageReader(string name, string configuration, IUADecoder uaDecoder) { Assert.AreEqual("UDP", name); Assert.IsNull(configuration); Assert.IsNotNull(uaDecoder); return(MyMessageReader); }
/// <summary> /// Initializes a new instance of the <see cref="BinaryPacketDecoder" /> class is to be used by the packet level decoding. /// </summary> /// <param name="uaDecoder">The UA decoder to be used fo decode UA Built-in data types.</param> public BinaryDecoder(IBinaryDataTransferGraphReceiver messageReader, IUADecoder uaDecoder) : base(uaDecoder) { m_DTGReceiver = messageReader ?? throw new ArgumentNullException(nameof(messageReader)); m_DTGReceiver.OnNewFrameArrived += OnNewFrameArrived; }
/// <summary> /// Initializes a new instance of the <see cref="BinaryPacketDecoder" /> class. /// </summary> /// <param name="uaDecoder">The UA decoder.</param> public BinaryPacketDecoder(IUADecoder uaDecoder) : base(uaDecoder) { }
public MessageHandling.IMessageReader GetIMessageReader(string name, MessageChannelConfiguration configuration, IUADecoder uaDecoder) { throw new NotImplementedException(); }
public IMessageReader GetIMessageReader(string name, string configuration, IUADecoder uaDecoder) { return(new MessageReader()); }
public IMessageReader GetIMessageReader(string name, MessageChannelConfiguration configuration, IUADecoder uaDecoder) { return(new MR()); }
/// <summary> /// Initializes a new instance of the <see cref="BinaryUDPPackageReader"/> class. /// </summary> /// <param name="port">The port.</param> /// <param name="trace">The trace.</param> public BinaryUDPPackageReader(IUADecoder uaDecoder, int port) : base(uaDecoder) { SemanticEventSource.Log.EnteringMethod(nameof(BinaryUDPPackageReader), nameof(BinaryUDPPackageReader)); State = new MyState(this); m_UDPPort = port; }
/// <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); }
public IMessageReader GetIMessageReader(string name, MessageChannelConfiguration configuration, IUADecoder uaDecoder) { return new MR(); }