Interface ZCLFrame


  • public interface ZCLFrame
    This interface models the ZigBee Cluster Library Frame.
    Author:
    $Id: c014dffdef6639d1adf255eed4b0a3bf99c41934 $
    • Method Detail

      • getHeader

        ZCLHeader getHeader()
        Returns the header of this frame.
        Returns:
        the header of this frame.
      • getBytes

        byte[] getBytes()
        Returns a byte array containing the raw ZCL frame, suitable to be sent on the wire. The returned byte array contains the whole ZCL Frame, including the ZCL Frame Header and the ZCL Frame payload.
        Returns:
        a byte array containing a raw ZCL frame, suitable to be sent on the wire. Any modifications issued on the returned array must not affect the internal representation of the ZCLFrame interface implementation.
      • getBytes

        int getBytes​(byte[] buffer)
        Copy in the passed array the internal raw ZCLFrame.
        Parameters:
        buffer - The buffer where to copy the raw ZCL frame.
        Returns:
        The actual number of bytes copied.
      • getSize

        int getSize()
        Retrieve the current size of the internal raw frame (that is the size of the byte[] that would be returned if calling the getBytes() method.
        Returns:
        The size of the raw ZCL frame.
      • getDataInput

        ZigBeeDataInput getDataInput()
        Returns ZigBeeDataInput for reading the ZCLFrame payload content. Every call to this method returns a different instance. The returned instances must not share the current position to the underlying ZCLFrame payload.
        Returns:
        a DataInput for the payload of the ZCLFrame. This method does not generate a copy of the payload.
        Throws:
        java.lang.IllegalStateException - if the InputStream is not available.