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

pl.grzeslowski.jsupla.protocol.api.decoders.sds.SetDeviceConfigResultDecoder Maven / Gradle / Ivy

package pl.grzeslowski.jsupla.protocol.api.decoders.sds;

import lombok.val;
import pl.grzeslowski.jsupla.protocol.api.decoders.PrimitiveDecoder;
import pl.grzeslowski.jsupla.protocol.api.structs.sds.SetDeviceConfigResult;
import static pl.grzeslowski.jsupla.protocol.api.JavaConsts.*;
import static pl.grzeslowski.jsupla.protocol.api.consts.ProtoConsts.*;

@javax.annotation.Generated(value="Struct original name: TSDS_SetDeviceConfigResult", date = "2024-08-03T11:49:41.973Z[Etc/UTC]")
@lombok.NoArgsConstructor(access = lombok.AccessLevel.PRIVATE)
public class SetDeviceConfigResultDecoder implements pl.grzeslowski.jsupla.protocol.api.decoders.sds.ServerDeviceServerDecoder {
	public static final SetDeviceConfigResultDecoder INSTANCE = new SetDeviceConfigResultDecoder();

    @Override
	public SetDeviceConfigResult decode(byte[] bytes, int offset) {
		val result = PrimitiveDecoder.INSTANCE.parseUnsignedByte(bytes, offset);
		offset += BYTE_SIZE;

		val zero = PrimitiveDecoder.INSTANCE.copyOfRangeByteUnsigned(bytes, offset, offset + (int) 9);
		offset += 9 * BYTE_SIZE;
		
	    return new SetDeviceConfigResult(result, zero);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy