Replaced use of Thing type with the values

This commit is contained in:
Pascal Serrarens 2024-12-05 14:11:58 +01:00
parent 6f12854d4f
commit 9919aa6578

View File

@ -144,16 +144,13 @@ namespace Passer.Control {
parentId = data[ix];
}
public static bool Send(Client client, Thing obj) {
if (obj == null)
return false;
public static bool Send(Client client, byte networkId, byte thingId, byte thingType) {
byte[] data = new byte[4];
data[0] = ThingMsg.Id;
data[1] = obj.networkId;
data[2] = obj.thingId;
data[3] = obj.objectType;
data[4] = 0x00; // not supported yet
data[1] = networkId;
data[2] = thingId;
data[3] = thingType;
data[4] = 0x00; // parent not supported yet
return SendMsg(client, data);
}
public static async Task<bool> Receive(Stream dataStream, Client client, byte packetSize) {