Exemple #1
0
        public MockNetwork(IPAddress subnet, int deviceCount, MqttConfiguration configuration)
        {
            _subnet = subnet;

            MqttServer = new MockMqttServer(configuration);

            Devices      = CreateDevices(deviceCount);
            DevicesByIp  = Devices.ToDictionary(x => x.IpAddress);
            DevicesByMac = Devices.ToDictionary(x => x.MacAddress);
        }
Exemple #2
0
 public MockMqttClient(MockMqttServer server)
 {
     ConnectedEvent = new ManualResetEventSlim(false);
     _server        = server;
 }