zsmartsystems / com.zsmartsystems.zigbee

ZigBee Cluster Library Java framework supporting multiple dongles
Eclipse Public License 1.0
142 stars 88 forks source link

Fix gpepIncomingMessageHandler definition #1303

Closed cdjackson closed 2 years ago

cdjackson commented 2 years ago

Silabs advise that the EmberGPAddress is a union, not a flat structure as defined in the documentation. The C file shows this -:

typedef struct {
  union {
    /** The IEEE address is used when the application identifier is
     *  ::EMBER_GP_APPLICATION_IEEE_ADDRESS.
     */
    EmberEUI64 gpdIeeeAddress;
    /** The 32-bit source identifier is used when the application identifier is
     *  ::EMBER_GP_APPLICATION_SOURCE_ID.
     *
     */
    EmberGpSourceId sourceId;
  } id;
  /** Application identifier of the GPD. */
  EmberGpApplicationId applicationId;
  uint8_t endpoint;
} EmberGpAddress;

This changes the address to an 8 byte array and the dongle handler will need to manage the address appropriately when GP processing is added.

This should fix #1301.

Signed-off-by: Chris Jackson chris@cd-jackson.com