示例#1
0
        public async Task SetClientInfo(SensorInfo sensorInfo)
        {
            this.SensorInfo = sensorInfo;
            this.SensorInfo.SensorId = this.PersistentId;

            await this.SendReady();

            //Write instantly to storage since arduino boards and socket does not detect disconnect well, and we do not have a heartbeat...
            await Composable.GetExport<IPersistentPropertyStorage>().WriteToPropertyStorage(this);
        }
示例#2
0
 public async Task SendReady(SensorInfo si)
 {
     await this.InvokeTo<Monitor>(p => p.ClientType == ClientType.Monitor, this.SensorInfo, "ci");
 }