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

pl.grzeslowski.jsupla.protocol.api.decoders.DeviceConfigHomeScreenContentDecoder Maven / Gradle / Ivy

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

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

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

    @Override
	public DeviceConfigHomeScreenContent decode(byte[] bytes, int offset) {
		val contentAvailable = PrimitiveDecoder.INSTANCE.parseUnsignedLong(bytes, offset);
		offset += LONG_SIZE;

		val homeScreenContent = PrimitiveDecoder.INSTANCE.parseUnsignedLong(bytes, offset);
		offset += LONG_SIZE;
		
	    return new DeviceConfigHomeScreenContent(contentAvailable, homeScreenContent);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy