All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.grzeslowski.jsupla.protocol.api.structs.cs.SuplaNewValue Maven / Gradle / Ivy

The newest version!
package pl.grzeslowski.jsupla.protocol.api.structs.cs;

import pl.grzeslowski.jsupla.protocol.api.structs.*;
import pl.grzeslowski.jsupla.protocol.api.types.ProtoWithSize;
import static pl.grzeslowski.jsupla.protocol.api.JavaConsts.*;
import static pl.grzeslowski.jsupla.protocol.api.Preconditions.*;
import static pl.grzeslowski.jsupla.protocol.api.consts.ProtoConsts.*;

/**
 * client -> server

Original code:

typedef struct {
  // client -> server
  _supla_int_t Id;
  char Target;  // SUPLA_TARGET_
  char value[SUPLA_CHANNELVALUE_SIZE];
} TCS_SuplaNewValue;
*/ @lombok.EqualsAndHashCode @lombok.ToString @javax.annotation.Generated(value="Struct original name: TCS_SuplaNewValue", date = "2024-09-06T08:44:38.014Z[Etc/UTC]") public class SuplaNewValue implements pl.grzeslowski.jsupla.protocol.api.structs.cs.ClientServer { public final int id; /** * SUPLA_TARGET_ */ public final byte target; public final byte[] value; public SuplaNewValue(int id, byte target, byte[] value) { this.id = id; this.target = target; this.value = checkArrayLength(value, (int) SUPLA_CHANNELVALUE_SIZE); } @Override public pl.grzeslowski.jsupla.protocol.api.calltypes.ClientServerCallType callType() { throw new UnsupportedOperationException("CallType for " +getClass().getSimpleName()+" is not set!"); } @Override public int size() { return INT_SIZE // id + BYTE_SIZE // target + (int) SUPLA_CHANNELVALUE_SIZE * BYTE_SIZE // value ; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy