Interface EnOceanChannelDescription

    • Field Summary

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object deserialize​(byte[] bytes)
      Tries to deserialize a series of bytes into a documented value object (raw bytes, Double or EnOceanChannelEnumValue.
      java.lang.String getType()
      Retrieves the type of the channel.
      byte[] serialize​(java.lang.Object obj)
      Tries to serialize the channel into a series of bytes.
    • Field Detail

      • CHANNEL_ID

        static final java.lang.String CHANNEL_ID
        The unique ID of this EnOceanChannelDescription object.
        See Also:
        Constant Field Values
      • TYPE_RAW

        static final java.lang.String TYPE_RAW
        A RAW channel is only made of bytes.
        See Also:
        Constant Field Values
      • TYPE_DATA

        static final java.lang.String TYPE_DATA
        A DATA channel maps itself to a Double value representing a physical measure.
        See Also:
        Constant Field Values
      • TYPE_FLAG

        static final java.lang.String TYPE_FLAG
        A FLAG channel maps itself to a Boolean value.
        See Also:
        Constant Field Values
    • Method Detail

      • getType

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

        byte[] serialize​(java.lang.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:
        java.lang.IllegalArgumentException
      • deserialize

        java.lang.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:
        java.lang.IllegalArgumentException