コード例 #1
0
 public DeviceClient(ClientConf clientConf, AbstractDevice device)
 {
     this.CheckClientConf(clientConf);
     this.clientConf            = clientConf;
     this.deviceId              = clientConf.DeviceId;
     this.connection            = new MqttConnection(clientConf, this, this);
     this.device                = device;
     this.rawMessageListenerDic = new Dictionary <string, RawMessageListener>();
 }
コード例 #2
0
        private void CheckClientConf(ClientConf clientConf)
        {
            if (clientConf == null)
            {
                throw new Exception("clientConf is null");
            }

            if (clientConf.DeviceId == null)
            {
                throw new Exception("clientConf.deviceId is null");
            }

            if (clientConf.ServerUri == null)
            {
                throw new Exception("clientConf.getSecret() is null");
            }
        }