Interface ZCLFrame


public interface ZCLFrame
This interface models the ZigBee Cluster Library Frame.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Returns a byte array containing the raw ZCL frame, suitable to be sent on the wire.
    int
    getBytes(byte[] buffer)
    Copy in the passed array the internal raw ZCLFrame.
    Returns ZigBeeDataInput for reading the ZCLFrame payload content.
    Returns the header of this frame.
    int
    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.
  • Method Details

    • 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:
      IllegalStateException - if the InputStream is not available.