public VisualizerForm(Settings settings)
        {
            m_Settings = settings;
            InitializeComponent();
            InitBinding();
            InitTypeConverters();
            IClientService client = new Client(m_Settings);

            client.Options.LegacyFieldFlagEncoding = false;
            client.MessageReceived     += ClientOnMessageReceived;
            client.MetaMessageReceived += ClientOnMessageReceived;
            BlockingCollection <Publisher> publisherQueue = new BlockingCollection <Publisher>();

            m_PublisherBindings = new ConcurrentDictionary <string, ConcurrentDictionary <ushort, BindingSource> >();
            BlockingCollection <DataPointCollection> valueQueue = new BlockingCollection <DataPointCollection>();
            Parser parser = new Parser(publisherQueue, valueQueue, this, m_PublisherBindings);

            client.MessageReceived     += parser.OnMessageDecoded;
            client.MetaMessageReceived += parser.OnMessageDecoded;
            client.FileReceived        += parser.ClientOnFileReceived;
            m_UpdatePublisher           = new UpdatePublisher(publisherQueue, m_PublisherBindingSource, this);
            m_UpdateValues              = new UpdateValues(valueQueue, m_PublisherBindings, this);

            // there was a decoding standard violation in a part of the meta frame
            // which has been fixed and we enable it here to use this fix
            client.Options.LegacyFieldFlagEncoding = false;
            if (m_Settings.Client.UseTls)
            {
                // with TLS for use e.g. with MQTT-Broker as MDSP simulation

                // Broker CA certificate
                if (SettingManager.TryGetCertificateAsArray(m_Settings.Client.BrokerCACert, out byte[] brokerCaCert))
Beispiel #2
0
        private static void CreateClient()
        {
            s_Client = new Client(Settings, Settings.Simulation.PublisherID);

            // there was a decoding standard violation in a part of the meta frame
            // which has been fixed and we enable it here to use this fix
            s_Client.Options.LegacyFieldFlagEncoding = false;
        }