public SensorUpdateBuilder(RawDeviceEventArgs message) { Data = message.Data; Dictionary = message.Dictionary; }
public void RaiseRawDeviceEvent(RawDeviceEventArgs args) { TelldusCoreMock.Raise(m => m.RawDeviceEvent += null, args); }
private void OnRawDevice(RawDeviceEventArgs message) { Logger.SerlogInfo("OnRawDevice", "Data", message.Data); var builder = new SensorUpdateBuilder(message); if (builder.IsSensor) TellPluginPort(builder.BuildSensor()); else if (builder.IsCommand) TellPluginPort(builder.BuildCommand()); else Logger.Warning($"Got a raw event of unexpected type: {message.Data}"); }