From 49f50118232ba326fa74181876053c59d5e8ad75 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 16 Jan 2025 09:24:49 +0100 Subject: [PATCH] Bytes -> Binary --- Participant.cs | 2 +- Sensors/TemperatureSensor.cs | 2 +- Thing.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Participant.cs b/Participant.cs index 384e3c8..8856bda 100644 --- a/Participant.cs +++ b/Participant.cs @@ -238,7 +238,7 @@ namespace Passer.Control.Core { protected virtual void Process(CustomMsg msg) { Thing thing = Thing.Get(msg.networkId, msg.thingId); - thing?.ProcessBytes(msg.bytes); + thing?.ProcessBinary(msg.bytes); } protected virtual void Process(TextMsg temsgxt) { } diff --git a/Sensors/TemperatureSensor.cs b/Sensors/TemperatureSensor.cs index fdc5215..22356fa 100644 --- a/Sensors/TemperatureSensor.cs +++ b/Sensors/TemperatureSensor.cs @@ -6,7 +6,7 @@ namespace Passer.Control.Core { public TemperatureSensor(byte networkId, byte thingId) : base(null, networkId, thingId, (byte)Type.TemperatureSensor) { } - public override void ProcessBytes(byte[] bytes) { + public override void ProcessBinary(byte[] bytes) { byte ix = 0; float temp = LowLevelMessages.ReceiveFloat16(bytes, ref ix); Console.WriteLine($"temperature {this.name} = {temp} C"); diff --git a/Thing.cs b/Thing.cs index 57fcea7..8f1439d 100644 --- a/Thing.cs +++ b/Thing.cs @@ -160,9 +160,9 @@ namespace Passer.Control.Core { // should recurse over children... } - public virtual byte[] GenerateBytes() { return new byte[0]; } + public virtual byte[] GenerateBinary() { return new byte[0]; } - public virtual void ProcessBytes(byte[] bytes) { + public virtual void ProcessBinary(byte[] bytes) { //if (sensor != null) // sensor.ProcessBytes(bytes); }