Esempio n. 1
0
        public Task <TConfig> ConfigGet <TConfig>(string deviceId, string key)
        {
            var args = new
            {
                key
            };

            return(_rpcClient.SendAsync <TConfig>(deviceId, "Config.Get", args));
        }
Esempio n. 2
0
        public async Task <UpdateFirmwareResponse> UpdateFirmwareAsync(string deviceId, string firmwareUrl)
        {
            var args = new
            {
                Url = firmwareUrl
            };

            var success = await _rpcClient.SendAsync <bool>(deviceId, "OTA.Update", _timeout, args);

            return(new UpdateFirmwareResponse
            {
                Success = success
            });
        }
Esempio n. 3
0
        public Task UpdateFirmwareAsync(string deviceId, string firmwareUrl)
        {
            var args = new
            {
                Url = firmwareUrl
            };

            return(_rpcClient.SendAsync(deviceId, "OTA.Update", _timeout, args));
        }
Esempio n. 4
0
 public Task <PingResponse> PingAsync(string deviceId)
 {
     return(_rpcClient.SendAsync <PingResponse>(deviceId, "RPC.Ping"));
 }
Esempio n. 5
0
 public Task <SysInfoResponse> GetInfoAsync(string deviceId)
 {
     return(_rpcClient.SendAsync <SysInfoResponse>(deviceId, "Sys.GetInfo"));
 }