Example #1
0
        private Messaging.MessageHandler CreateIoTEdgeMessageHandler(string controllerName)
        {
            // TODO: Create controller based on controller name
            var m          = new MqttNetMessageHandler(loggerFactory.CreateLogger <MqttNetMessageHandler>());
            var controller = new DeviceIotEdgeController(loggerFactory.CreateLogger <DeviceIotEdgeController>());
            var edge       = new IoTEdgeMessageHandler(controller, loggerFactory.CreateLogger <IoTEdgeMessageHandler>());

            m.SetNext(edge);
            return(m);
        }
Example #2
0
        private Messaging.MessageHandler CreateMqttMessageHandler(string controllerName)
        {
            // TODO: Create controller based on controller name
            var m          = new MqttNetMessageHandler(loggerFactory.CreateLogger <MqttNetMessageHandler>());
            var controller = new DeviceMqttController(loggerFactory.CreateLogger <DeviceMqttController>());
            var mqtt       = new MqttDeviceMessageHandler(controller, loggerFactory.CreateLogger <MqttDeviceMessageHandler>());

            m.SetNext(mqtt);
            return(m);
        }