Reply
Highlighted
Posts: 37
Registered: ‎12-11-2016
Accepted Solution

Undocumented value in messageSentHandler

When I send a broadcast, I'm seeing an undocumented response in the messageSentHandler for the EmberOutgoingMessageType. The value I'm seeing is 06 (documentation only shows values 00 to 04).

 

The log below shows an outgoing broadcast and the responses. For the messageSentHandler I've also left in the raw ASH frame so we can see that the value of EmberOutgoingMessageType is 06.

 

I'm assuming this isn't something I'm doing wrong here, but is an undocumented response? Can someone confirm this please?

 

 

23:47:46.086  DEBUG  TX EZSP: EzspSendBroadcastRequest [destination=65532, apsFrame=EmberApsFrame [profileId=0, clusterId=54, sourceEndpoint=0, destinationEndpoint=0, options=[EMBER_APS_OPTION_ENABLE_ADDRESS_DISCOVERY, EMBER_APS_OPTION_RETRY, EMBER_APS_OPTION_ENABLE_ROUTE_DISCOVERY], groupId=0, sequence=5], radius=31, messageTag=5, messageContents=00 64 01]
23:47:46.092  DEBUG  RX EZSP: EzspSendBroadcastResponse [status=EMBER_SUCCESS, sequence=67]
23:47:46.096  DEBUG  RX EZSP: EzspIncomingMessageHandler [type=EMBER_INCOMING_BROADCAST_LOOPBACK, apsFrame=EmberApsFrame [profileId=0, clusterId=54, sourceEndpoint=0, destinationEndpoint=0, options=[EMBER_APS_OPTION_ENABLE_ROUTE_DISCOVERY], groupId=0, sequence=67], lastHopLqi=255, lastHopRssi=0, sender=0, bindingIndex=255, addressIndex=255, messageContents=00 64 01]

23:47:46.973  DEBUG  <-- RX ASH frame: AshFrameData [frmNum=7, ackNum=3, reTx=false, data=05 90 3F 06 FC FF 00 00 36 00 00 00 00 01 00 00 43 05 00 00]

23:47:46.973  DEBUG  RX EZSP: EzspMessageSentHandler [type=UNKNOWN, indexOrDestination=65532, apsFrame=EmberApsFrame [profileId=0, clusterId=54, sourceEndpoint=0, destinationEndpoint=0, options=[EMBER_APS_OPTION_ENABLE_ROUTE_DISCOVERY], groupId=0, sequence=67], messageTag=5, status=EMBER_SUCCESS, messageContents=]

  

Posts: 110
Registered: ‎11-16-2015

Re: Undocumented value in messageSentHandler

EmberOutgoingMessageType is enumerated within ember-types.h.  0x06 is an EMBER_OUTGOING_BROADCAST.  See line 636.

EmberOutgoingMessageType is enumerated within ember-types.h.  0x06 is an EMBER_OUTGOING_BROADCAST.  See line 636.

/**
 * @brief Defines the possible outgoing message types.
 */
#ifdef DOXYGEN_SHOULD_SKIP_THIS
enum EmberOutgoingMessageType
#else
typedef uint8_t EmberOutgoingMessageType;
enum
#endif
{
  /** Unicast sent directly to an EmberNodeId. */
  EMBER_OUTGOING_DIRECT,
  /** Unicast sent using an entry in the address table. */
  EMBER_OUTGOING_VIA_ADDRESS_TABLE,
  /** Unicast sent using an entry in the binding table. */
  EMBER_OUTGOING_VIA_BINDING,
  /** Multicast message.  This value is passed to emberMessageSentHandler() only.
   * It may not be passed to emberSendUnicast(). */
  EMBER_OUTGOING_MULTICAST,
  /** aliased multicast message.  This value is passed to emberMessageSentHandler() only.
   * It may not be passed to emberSendUnicast(). */
  EMBER_OUTGOING_MULTICAST_WITH_ALIAS,
  /** aliased Broadcast message.  This value is passed to emberMessageSentHandler() only.
   * It may not be passed to emberSendUnicast(). */
  EMBER_OUTGOING_BROADCAST_WITH_ALIAS,
  /** Broadcast message.  This value is passed to emberMessageSentHandler() only.
   * It may not be passed to emberSendUnicast(). */
  EMBER_OUTGOING_BROADCAST
};
Posts: 37
Registered: ‎12-11-2016

Re: Undocumented value in messageSentHandler

Thanks - it would be great if this could be added to the docs for those of use developing against the spec and not using the existing libraries and headers Robot Happy.