Interface EnOceanChannelDescription

All Known Subinterfaces:
EnOceanDataChannelDescription, EnOceanEnumChannelDescription, EnOceanFlagChannelDescription

public interface EnOceanChannelDescription
Public and registered description interface for a channel. Encompasses all the possible subtypes for a channel.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The unique ID of this EnOceanChannelDescription object.
    static final String
    A DATA channel maps itself to a Double value representing a physical measure.
    static final String
    An ENUM channel maps itself to one between a list of discrete EnOceanChannelEnumValue "value objects".
    static final String
    A FLAG channel maps itself to a Boolean value.
    static final String
    A RAW channel is only made of bytes.
  • Method Summary

    Modifier and Type
    Method
    Description
    deserialize(byte[] bytes)
    Tries to deserialize a series of bytes into a documented value object (raw bytes, Double or EnOceanChannelEnumValue.
    Retrieves the type of the channel.
    byte[]
    Tries to serialize the channel into a series of bytes.
  • Field Details

  • Method Details

    • getType

      String getType()
      Retrieves the type of the channel.
      Returns:
      one of the above-described types.
    • serialize

      byte[] serialize(Object obj)
      Tries to serialize the channel into a series of bytes.
      Parameters:
      obj - the value of the channel.
      Returns:
      the right-aligned value, in raw bytes, of the channel.
      Throws:
      IllegalArgumentException
    • deserialize

      Object deserialize(byte[] bytes)
      Tries to deserialize a series of bytes into a documented value object (raw bytes, Double or EnOceanChannelEnumValue. Of course this method will be specialized for each EnOceanChannelDescription subinterface, depending on the type of this channel.
      Parameters:
      bytes - the right-aligned raw bytes.
      Returns:
      a value object.
      Throws:
      IllegalArgumentException