mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[lifx] Set tagged flag accordingly for unicast and broadcast messages (#13744)
* Set tagged flag accordingly * Update packets Also-by: Wouter Born <github@maindrain.net> Signed-off-by: Pauli Anttila <pauli.anttila@gmail.com>
This commit is contained in:
parent
8f972362c3
commit
590b2cb4f7
@ -33,7 +33,6 @@ public class GetColorZonesRequest extends Packet {
|
||||
private int endIndex = MAX_ZONE_INDEX;
|
||||
|
||||
public GetColorZonesRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ public class GetEchoRequest extends Packet {
|
||||
private ByteBuffer payload;
|
||||
|
||||
public GetEchoRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetGroupRequest extends Packet {
|
||||
public static final int TYPE = 0x33;
|
||||
|
||||
public GetGroupRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ public class GetHevCycleConfigurationRequest extends Packet {
|
||||
public static final int TYPE = 0x91;
|
||||
|
||||
public GetHevCycleConfigurationRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ public class GetHevCycleRequest extends Packet {
|
||||
public static final int TYPE = 0x8E;
|
||||
|
||||
public GetHevCycleRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetHostFirmwareRequest extends Packet {
|
||||
public static final int TYPE = 0x0E;
|
||||
|
||||
public GetHostFirmwareRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetHostInfoRequest extends Packet {
|
||||
public static final int TYPE = 0x0C;
|
||||
|
||||
public GetHostInfoRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetInfoRequest extends Packet {
|
||||
public static final int TYPE = 0x22;
|
||||
|
||||
public GetInfoRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetLabelRequest extends Packet {
|
||||
public static final int TYPE = 0x17;
|
||||
|
||||
public GetLabelRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ public class GetLastHevCycleResultRequest extends Packet {
|
||||
public static final int TYPE = 0x94;
|
||||
|
||||
public GetLastHevCycleResultRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ public class GetLightInfraredRequest extends Packet {
|
||||
public static final int TYPE = 0x78;
|
||||
|
||||
public GetLightInfraredRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetLightPowerRequest extends Packet {
|
||||
public static final int TYPE = 0x74;
|
||||
|
||||
public GetLightPowerRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetLocationRequest extends Packet {
|
||||
public static final int TYPE = 0x30;
|
||||
|
||||
public GetLocationRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetPowerRequest extends Packet {
|
||||
public static final int TYPE = 0x14;
|
||||
|
||||
public GetPowerRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetRequest extends Packet {
|
||||
public static final int TYPE = 0x65;
|
||||
|
||||
public GetRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetServiceRequest extends Packet {
|
||||
public static final int TYPE = 0x02;
|
||||
|
||||
public GetServiceRequest() {
|
||||
setTagged(true);
|
||||
setAddressable(true);
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,6 @@ public class GetTileEffectRequest extends Packet {
|
||||
public static final int TYPE = 0x2CE;
|
||||
|
||||
public GetTileEffectRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetVersionRequest extends Packet {
|
||||
public static final int TYPE = 0x20;
|
||||
|
||||
public GetVersionRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetWifiFirmwareRequest extends Packet {
|
||||
public static final int TYPE = 0x12;
|
||||
|
||||
public GetWifiFirmwareRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ public class GetWifiInfoRequest extends Packet {
|
||||
public static final int TYPE = 0x10;
|
||||
|
||||
public GetWifiInfoRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ public class SetColorRequest extends Packet {
|
||||
|
||||
public SetColorRequest() {
|
||||
stream = ByteBuffer.allocate(1);
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -70,7 +70,6 @@ public class SetColorZonesRequest extends Packet {
|
||||
}
|
||||
|
||||
public SetColorZonesRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ public class SetHevCycleConfigurationRequest extends Packet {
|
||||
}
|
||||
|
||||
public SetHevCycleConfigurationRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ public class SetHevCycleRequest extends Packet {
|
||||
}
|
||||
|
||||
public SetHevCycleRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ public class SetLabelRequest extends Packet {
|
||||
private String label;
|
||||
|
||||
public SetLabelRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setAckRequired(true);
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ public class SetLightInfraredRequest extends Packet {
|
||||
}
|
||||
|
||||
public SetLightInfraredRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -47,7 +47,6 @@ public class SetLightPowerRequest extends Packet {
|
||||
public SetLightPowerRequest() {
|
||||
state = PowerState.OFF;
|
||||
this.duration = 0;
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
@ -55,7 +54,6 @@ public class SetLightPowerRequest extends Packet {
|
||||
public SetLightPowerRequest(PowerState state) {
|
||||
this.state = state;
|
||||
this.duration = 0;
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -35,14 +35,12 @@ public class SetPowerRequest extends Packet {
|
||||
|
||||
public SetPowerRequest() {
|
||||
state = PowerState.OFF;
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
||||
public SetPowerRequest(PowerState state) {
|
||||
this.state = state;
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
@ -66,7 +66,6 @@ public class SetTileEffectRequest extends Packet {
|
||||
private Effect effect;
|
||||
|
||||
public SetTileEffectRequest() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setAckRequired(true);
|
||||
}
|
||||
|
@ -51,12 +51,6 @@ public class StateHostFirmwareResponse extends Packet {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public StateHostFirmwareResponse() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int packetType() {
|
||||
return TYPE;
|
||||
|
@ -48,12 +48,6 @@ public class StateHostInfoResponse extends Packet {
|
||||
return rx;
|
||||
}
|
||||
|
||||
public StateHostInfoResponse() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int packetType() {
|
||||
return TYPE;
|
||||
|
@ -57,12 +57,6 @@ public class StateInfoResponse extends Packet {
|
||||
this.downtime = downtime;
|
||||
}
|
||||
|
||||
public StateInfoResponse() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int packetType() {
|
||||
return TYPE;
|
||||
|
@ -57,12 +57,6 @@ public class StateVersionResponse extends Packet {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public StateVersionResponse() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int packetType() {
|
||||
return TYPE;
|
||||
|
@ -51,12 +51,6 @@ public class StateWifiFirmwareResponse extends Packet {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public StateWifiFirmwareResponse() {
|
||||
setTagged(false);
|
||||
setAddressable(true);
|
||||
setResponseRequired(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int packetType() {
|
||||
return TYPE;
|
||||
|
@ -276,8 +276,10 @@ public class LifxSelectorUtil {
|
||||
|
||||
try {
|
||||
if (castType == UNICAST) {
|
||||
packet.setTagged(false);
|
||||
LifxThrottlingUtil.lock(packet.getTarget());
|
||||
} else {
|
||||
packet.setTagged(true);
|
||||
LifxThrottlingUtil.lock();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user