zigbee: Change callbacks typedef to using

This commit is contained in:
Alberto Gallegos Ramonet
2025-09-03 16:21:51 +09:00
committed by Tom Henderson
parent 324f5bd48c
commit 8b1d31b0d7
2 changed files with 95 additions and 137 deletions

View File

@@ -261,65 +261,6 @@ struct ApsmeRemoveAllGroupsConfirmParams
uint8_t m_endPoint{1}; //!< The endpoint from which all groups are being removed.
};
//////////////////////
// Callbacks //
//////////////////////
/**
* @ingroup zigbee
*
* This callback is called to confirm a successfully transmission of an ASDU.
*/
typedef Callback<void, ApsdeDataConfirmParams> ApsdeDataConfirmCallback;
/**
* @ingroup zigbee
*
* This callback is called after a ASDU has successfully received and
* APS push it to deliver it to the next higher layer (typically the application framework).
*/
typedef Callback<void, ApsdeDataIndicationParams, Ptr<Packet>> ApsdeDataIndicationCallback;
/**
* @ingroup zigbee
*
* This callback is called to confirm a successfully addition of a destination
* into the binding table.
*/
typedef Callback<void, ApsmeBindConfirmParams> ApsmeBindConfirmCallback;
/**
* @ingroup zigbee
*
* This callback is called to confirm a successfully unbind request performed
* into the binding table.
*/
typedef Callback<void, ApsmeBindConfirmParams> ApsmeUnbindConfirmCallback;
/**
* @ingroup zigbee
*
* This callback is called to confirm a successfully addition of a group address
* and or endPoint into the group table.
*/
typedef Callback<void, ApsmeGroupConfirmParams> ApsmeAddGroupConfirmCallback;
/**
* @ingroup zigbee
*
* This callback is called to confirm a successfully removal of a group address
* and or endPoint from the group table.
*/
typedef Callback<void, ApsmeGroupConfirmParams> ApsmeRemoveGroupConfirmCallback;
/**
* @ingroup zigbee
*
* This callback is called to confirm a successfully removal of an endpoint from
* all the the groups.
*/
typedef Callback<void, ApsmeRemoveAllGroupsConfirmParams> ApsmeRemoveAllGroupsConfirmCallback;
/**
* @ingroup zigbee
*
@@ -342,6 +283,47 @@ class ZigbeeAps : public Object
ZigbeeAps();
~ZigbeeAps() override;
/**
* This callback is called to confirm a successfully transmission of an ASDU.
*/
using ApsdeDataConfirmCallback = Callback<void, ApsdeDataConfirmParams>;
/**
* This callback is called after a ASDU has successfully received and
* APS push it to deliver it to the next higher layer (typically the application framework).
*/
using ApsdeDataIndicationCallback = Callback<void, ApsdeDataIndicationParams, Ptr<Packet>>;
/**
* This callback is called to confirm a successfully addition of a destination
* into the binding table.
*/
using ApsmeBindConfirmCallback = Callback<void, ApsmeBindConfirmParams>;
/**
* This callback is called to confirm a successfully unbind request performed
* into the binding table.
*/
using ApsmeUnbindConfirmCallback = Callback<void, ApsmeBindConfirmParams>;
/**
* This callback is called to confirm a successfully addition of a group address
* and or endPoint into the group table.
*/
using ApsmeAddGroupConfirmCallback = Callback<void, ApsmeGroupConfirmParams>;
/**
* This callback is called to confirm a successfully removal of a group address
* and or endPoint from the group table.
*/
using ApsmeRemoveGroupConfirmCallback = Callback<void, ApsmeGroupConfirmParams>;
/**
* This callback is called to confirm a successfully removal of an endpoint from
* all the the groups.
*/
using ApsmeRemoveAllGroupsConfirmCallback = Callback<void, ApsmeRemoveAllGroupsConfirmParams>;
/**
* Set the underlying NWK to use in this Zigbee APS
*

View File

@@ -605,84 +605,6 @@ struct NlmeStartRouterConfirmParams
//!< the corresponding request.
};
//////////////////////
// Callbacks //
//////////////////////
/**
* @ingroup Zigbee
*
* This callback is called after a NSDU has successfully received and
* NWK push it to deliver it to the next higher layer.
*
*/
typedef Callback<void, NldeDataIndicationParams, Ptr<Packet>> NldeDataIndicationCallback;
/**
* @ingroup Zigbee
*
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLDE-DATA.request.
*
*/
typedef Callback<void, NldeDataConfirmParams> NldeDataConfirmCallback;
/**
* @ingroup Zigbee
*
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLME-NETWORK-FORMATION.request.
*/
typedef Callback<void, NlmeNetworkFormationConfirmParams> NlmeNetworkFormationConfirmCallback;
/**
* @ingroup Zigbee
*
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLME-NETWORK-DISCOVERY.request.
*/
typedef Callback<void, NlmeNetworkDiscoveryConfirmParams> NlmeNetworkDiscoveryConfirmCallback;
/**
* @ingroup Zigbee
*
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLME-ROUTE-DISCOVERY.request.
*/
typedef Callback<void, NlmeRouteDiscoveryConfirmParams> NlmeRouteDiscoveryConfirmCallback;
/**
* @ingroup Zigbee
*
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLME-DIRECT-JOIN.request.
*/
typedef Callback<void, NlmeDirectJoinConfirmParams> NlmeDirectJoinConfirmCallback;
/**
* @ingroup Zigbee
*
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLME-JOIN.request.
*/
typedef Callback<void, NlmeJoinConfirmParams> NlmeJoinConfirmCallback;
/**
* @ingroup Zigbee
*
* This callback is used to notify the next higher layer with an indication that a new
* device has successfully joined its network by association or rejoining.
*/
typedef Callback<void, NlmeJoinIndicationParams> NlmeJoinIndicationCallback;
/**
* @ingroup Zigbee
*
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLME-START-ROUTER.request.
*/
typedef Callback<void, NlmeStartRouterConfirmParams> NlmeStartRouterConfirmCallback;
/**
* @ingroup Zigbee
*
@@ -704,6 +626,60 @@ class ZigbeeNwk : public Object
ZigbeeNwk();
~ZigbeeNwk() override;
/**
* This callback is called after a NSDU has successfully received and
* NWK push it to deliver it to the next higher layer.
*/
using NldeDataIndicationCallback = Callback<void, NldeDataIndicationParams, Ptr<Packet>>;
/**
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLDE-DATA.request.
*/
using NldeDataConfirmCallback = Callback<void, NldeDataConfirmParams>;
/**
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLME-NETWORK-FORMATION.request.
*/
using NlmeNetworkFormationConfirmCallback = Callback<void, NlmeNetworkFormationConfirmParams>;
/**
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLME-NETWORK-DISCOVERY.request.
*/
using NlmeNetworkDiscoveryConfirmCallback = Callback<void, NlmeNetworkDiscoveryConfirmParams>;
/**
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLME-ROUTE-DISCOVERY.request.
*/
using NlmeRouteDiscoveryConfirmCallback = Callback<void, NlmeRouteDiscoveryConfirmParams>;
/**
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLME-DIRECT-JOIN.request.
*/
using NlmeDirectJoinConfirmCallback = Callback<void, NlmeDirectJoinConfirmParams>;
/**
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLME-JOIN.request.
*/
using NlmeJoinConfirmCallback = Callback<void, NlmeJoinConfirmParams>;
/**
* This callback is used to notify the next higher layer with an indication that a new
* device has successfully joined its network by association or rejoining.
*/
using NlmeJoinIndicationCallback = Callback<void, NlmeJoinIndicationParams>;
/**
* This callback is used to notify the next higher layer with a confirmation in response to
* a previously issued NLME-START-ROUTER.request.
*/
using NlmeStartRouterConfirmCallback = Callback<void, NlmeStartRouterConfirmParams>;
/**
* Set the underlying MAC to use in this Zigbee NWK
*