示例#1
0
        private void OnReceiveMicroclimateData(object obj, MicroclimateData data)
        {
            SafeInvoke(microclimateHandlers, h => h(data.Channel, data.Temperature, data.Humidity, data.LowBattery), true);

            Context.Require <ScriptsPlugin>()
            .EmitScriptEvent("noolite:microclimate-data:received", data.Channel, data.Temperature, data.Humidity, data.LowBattery);
        }
示例#2
0
 private static void AdapterOnReceiveMicroclimateData(object o, MicroclimateData result)
 {
     Console.WriteLine(result);
 }
示例#3
0
        private void OnReceiveMicroclimateData(object obj, MicroclimateData data)
        {
            SafeInvokeAsync(microclimateHandlers, h => h(data.Channel, data.Temperature, data.Humidity, data.LowBattery));

            scripts.EmitScriptEvent("noolite:microclimate-data:received", data.Channel, data.Temperature, data.Humidity, data.LowBattery);
        }
示例#4
0
 private void OnReceiveMicroclimateData(object obj, MicroclimateData data)
 {
     SafeInvoke(microclimateHandlers, h => h(data.Channel, data.Temperature, data.Humidity, data.LowBattery), true);
 }