18#include "ns3/event-id.h"
19#include "ns3/mac16-address.h"
20#include "ns3/mac64-address.h"
21#include "ns3/object.h"
22#include "ns3/random-variable-stream.h"
23#include "ns3/sequence-number.h"
24#include "ns3/traced-callback.h"
25#include "ns3/traced-value.h"
535 void SetBit(
int pos,
bool value);
543 bool GetBit(
int pos)
const;
This class can contain 16 bit addresses.
A base class which provides memory management and object aggregation.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
APS Binding Table See Zigbee specification r22.1.0, Table 2-134 Similar to the z-boss implementation,...
Zigbee Specification r22.1.0, Section 2.2.3 Class that implements the Zigbee Specification Applicatio...
void ApsmeBindRequest(ApsmeBindRequestParams params)
Zigbee Specification r22.1.0, Section 2.2.4.3.1 APSME-BIND.request Bind a source entry to one or more...
void NldeDataIndication(NldeDataIndicationParams params, Ptr< Packet > nsdu)
Zigbee Specification r22.1.0, Section 3.2.1.3 NLDE-DATA.indication Used to report to the APS the rece...
void SetApsmeUnbindConfirmCallback(ApsmeUnbindConfirmCallback c)
Set the callback as part of the interconnections between the APS and the next layer or service (typic...
SequenceNumber8 m_apsCounter
The sequence number used in packet Tx with APS headers.
void SetApsdeDataConfirmCallback(ApsdeDataConfirmCallback c)
Set the callback as part of the interconnections between the APS and the next layer or service (typic...
void SetApsmeBindConfirmCallback(ApsmeBindConfirmCallback c)
Set the callback as part of the interconnections between the APS and the next layer or service (typic...
ZigbeeAps()
Default constructor.
void DoInitialize() override
Initialize() implementation.
Ptr< ZigbeeNwk > m_nwk
Pointer to the underlying NWK connected to this Zigbee APS.
void SendDataWithBindingTable(ApsdeDataRequestParams params, Ptr< Packet > asdu)
Send a Groupcast or IEEE address destination from a list of destination in the binding table.
ApsdeDataConfirmCallback m_apsdeDataConfirmCallback
This callback is used to to notify the results of a data transmission request to the Application fram...
void SetApsdeDataIndicationCallback(ApsdeDataIndicationCallback c)
Set the callback as part of the interconnections between the APS and the next layer or service (typic...
static TypeId GetTypeId()
Get the type ID.
ApsdeDataIndicationCallback m_apsdeDataIndicationCallback
This callback is used to to notify the reception of data to the Application framework (AF).
void SendDataUcstBcst(ApsdeDataRequestParams params, Ptr< Packet > asdu)
Send a regular UCST or BCST data transmission to a known 16-bit address destination.
void DoDispose() override
Destructor implementation.
ApsmeBindConfirmCallback m_apsmeBindConfirmCallback
This callback is used to to notify the result of a binding request in the APS to the Application fram...
void ApsmeUnbindRequest(ApsmeBindRequestParams params)
Zigbee Specification r22.1.0, Section 2.2.4.3.3 APSME-BIND.request Unbind a destination entry from a ...
void NotifyConstructionCompleted() override
Notifier called once the ObjectBase is fully constructed.
Ptr< ZigbeeNwk > GetNwk() const
Get the underlying NWK used by the current Zigbee APS.
BindingTable m_apsBindingTable
The binding table associated to this APS layer.
void ApsdeDataRequest(ApsdeDataRequestParams params, Ptr< Packet > asdu)
Zigbee Specification r22.1.0, Section 2.2.4.1.1 APSDE-DATA.request Request the transmission of data t...
void SetNwk(Ptr< ZigbeeNwk > nwk)
Set the underlying NWK to use in this Zigbee APS.
ApsmeUnbindConfirmCallback m_apsmeUnbindConfirmCallback
This callback is used to to notify the result of a unbinding request in the APS to the Application fr...
void NldeDataConfirm(NldeDataConfirmParams params)
Zigbee Specification r22.1.0, Section 3.2.1.2 NLDE-DATA.confirm Used to report to the APS the transmi...
Helper class used to craft the transmission options bitmap used by the APSDE-DATA....
bool GetBit(int pos) const
Get the value of the bit at the position indicated.
bool IsSecurityEnabled() const
Show if the security enable bit of the Tx options is present.
void SetUseNwkKey(bool enable)
Set the use network key bit of the TX options.
bool IsIncludeExtendedNonce() const
Show if the include extended nonce bit of the Tx options is present.
uint8_t m_txOptions
the bitmap representing the Tx options
uint8_t GetTxOptions() const
Get the complete bitmap containing the Tx options.
void SetAckRequired(bool enable)
Set the Acknowledgement required bit of the Tx options.
void SetIncludeExtendedNonce(bool enable)
Set the include extended nonce bit of the Tx options.
void SetFragmentationPermitted(bool enable)
Set the fragmentation bit of the Tx options.
void SetSecurityEnabled(bool enable)
Set the security enable bit of the TX options.
ZigbeeApsTxOptions(uint8_t value=0)
The constructor of the Tx options class.
bool IsUseNwkKey() const
Show if the use network key bit of the Tx options is present.
void SetBit(int pos, bool value)
Set a bit value into a position in the uint8_t representint the Tx options.
bool IsAckRequired() const
Show if the ACK bit of the Tx options is present.
bool IsFragmentationPermitted() const
Show if the fragmentation permitted bit of the Tx options is present.
ApsStatus
APS Sub-layer Status Values See Zigbee Specification r22.1.0, Table 2-27.
ApsDstAddressMode
APS Destination Address Mode, Zigbee Specification r22.1.0 Table 2-2 APSDE-DATA.request Parameters Se...
Callback< void, ApsmeBindConfirmParams > ApsmeBindConfirmCallback
This callback is called to confirm a successfully addition of a destination into the binding table.
Callback< void, ApsdeDataConfirmParams > ApsdeDataConfirmCallback
This callback is called to confirm a successfully transmission of an ASDU.
ApsSrcAddressMode
APS Source Address Mode, Zigbee Specification r22.1.0 See Table 2-4 APSDE-DATA.indication Parameters.
Callback< void, ApsmeBindConfirmParams > ApsmeUnbindConfirmCallback
This callback is called to confirm a successfully unbind request performed into the binding table.
ApsSecurityStatus
APS Security status See Zigbee Specification r22.1.0, Table 2-4 APSDE-DATA.indication Parameters.
Callback< void, ApsdeDataIndicationParams, Ptr< Packet > > ApsdeDataIndicationCallback
This callback is called after a ASDU has successfully received and APS push it to deliver it to the n...
ApsDstAddressModeBind
APS Destination Address Mode for Binding Zigbee Specification r22.1.0, Table 2-6 APSME-BIND....
@ ILLEGAL_REQUEST
Illegal request.
@ UNSUPPORTED_ATTRIBUTE
Unsupported attribute.
@ INVALID_GROUP
Invalid group.
@ ASDU_TOO_LONG
A received fragmented frame could not be defragmented at the current time.
@ INVALID_BINDING
Invalid binding.
@ NOT_SUPPORTED
Not supported in APS.
@ DEFRAG_DEFERRED
Defragmentation deferred.
@ SECURITY_FAIL
Security failed.
@ NO_BOUND_DEVICE
No bound device.
@ DEFRAG_UNSUPPORTED
Defragmentation is not supported.
@ SUCCESS
A request has been executed successfully.
@ DST_ADDR16_DST_ENDPOINT_PRESENT
16-bit destination address and destination endpoint present.
@ DST_ADDR_AND_DST_ENDPOINT_NOT_PRESENT
Destination address and destination endpoint not present.
@ DST_ADDR64_DST_ENDPOINT_NOT_PRESENT
64-bit address present but destination endpoint not present.
@ SRC_ADDR64_SRC_ENDPOINT_PRESENT
64-bit source address and source endpoint present
@ SRC_ADDR16_SRC_ENDPOINT_PRESENT
16-bit source address and source endpoint present
@ SRC_ADDR64_SRC_ENDPOINT_NOT_PRESENT
64-bit source address present but source endpoint not present
@ SECURED_LINK_KEY
Use link secure key.
@ UNSECURED
Unsecured status.
@ SECURED_NWK_KEY
Use NWK secure key.
@ UNSUPPORTED_ATTRIBUTE
Unsupported attribute (Zigbee specification r22.1.0)
@ SUCCESS
The operation was completed successfully.
@ NO_SHORT_ADDRESS
Failure due to unallocated 16-bit short address.
@ INVALID_PARAMETER
Invalid Parameter (Zigbee specification r22.1.0)
@ NO_ACK
No acknowledgment was received after macMaxFrameRetries.
@ GROUP_ADDR_DST_ENDPOINT_NOT_PRESENT
@ DST_ADDR64_DST_ENDPOINT_PRESENT
@ TABLE_FULL
Either the routing or neighbor table are full.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Zigbee Specification r22.1.0, Section 2.2.4.1.2 APSDE-DATA.confirm params.
Mac16Address m_dstAddr16
The destination 16-bit address.
uint8_t m_srcEndPoint
The source endpoint.
ApsDstAddressMode m_dstAddrMode
Destination address mode.
uint8_t m_dstEndPoint
The destination endpoint.
Time m_txTime
The transmission timestamp.
Mac64Address m_dstAddr64
The destination IEEE address (64-bit address).
ApsStatus m_status
The confirmation status.
Zigbee Specification r22.1.0, Section 2.2.4.1.3 APSDE-DATA.indications params.
Mac64Address m_srcAddress64
The IEEE source address (64-bit address)
Time m_rxTime
The reception timestamp.
Mac64Address m_dstAddr64
The destination IEEE address (64-bit address)
Mac16Address m_dstAddr16
The destination 16-bit address.
uint8_t m_dstEndPoint
The destination endpoint.
uint8_t asduLength
The size of the the ASDU packet.
uint8_t m_srcEndpoint
The application source endpoint.
ApsSrcAddressMode m_srcAddrMode
The source address mode.
ApsDstAddressMode m_dstAddrMode
The destination address mode.
ApsStatus m_status
The data indication status.
uint8_t m_linkQuality
The link quality indication value.
Mac16Address m_srcAddress16
The 16-bit address.
uint16_t m_clusterId
The application cluster ID.
ApsSecurityStatus m_securityStatus
Security status.
uint16_t m_profileId
The application profile ID.
Zigbee Specification r22.1.0, Section 2.2.4.1.1 APSDE-DATA.request params.
uint16_t m_profileId
The application profile ID.
Mac16Address m_aliasSrcAddr
Alias source address.
uint16_t m_clusterId
The application cluster ID.
Mac16Address m_dstAddr16
The destination 16-bit address.
uint8_t m_txOptions
Transmission options.
uint8_t m_srcEndPoint
The source endpoint.
uint32_t m_asduLength
The ASDU length.
bool m_useAlias
Indicates if alias is used in this transmission.
uint8_t m_aliasSeqNumb
Alias sequence number.
ApsDstAddressMode m_dstAddrMode
Destination address mode.
uint8_t m_dstEndPoint
The destination endpoint.
uint8_t m_radius
Radius (Number of hops this message travels)
Mac64Address m_dstAddr64
The destination 64-bit address.
Zigbee Specification r22.1.0, Sections 2.2.4.3.2 and 2.2.4.3.4 APSME-BIND.confirm and APSME-UNBIND....
ApsDstAddressModeBind m_dstAddrMode
Destination address mode.
uint16_t m_clusterId
The application cluster ID.
ApsStatus m_status
The status of the bind request.
uint8_t m_srcEndPoint
The application source endpoint.
Mac64Address m_srcAddr
The application source address.
Mac16Address m_dstAddr16
The destination 16-bit address.
Mac64Address m_dstAddr64
The destination 64-bit address.
uint8_t m_dstEndPoint
The application destination endpoint.
Zigbee Specification r22.1.0, Sections 2.2.4.3.1 and 2.2.4.3.3 APSME-BIND.request and APSME-UNBIND....
Mac64Address m_srcAddr
The source IEEE address (64-bit address)
ApsDstAddressModeBind m_dstAddrMode
Destination address mode.
uint16_t m_clusterId
The application cluster ID.
uint8_t m_srcEndPoint
The application source endpoint.
uint8_t m_dstEndPoint
The application destination endpoint.
Mac64Address m_dstAddr64
The destination 64-bit address.
Mac16Address m_dstAddr16
The destination 16-bit address.
NLDE-DATA.confirm params.
NLDE-DATA.indication params.