Implements the NWK_addr_req command See Zigbee Specification r22.1.0, Section 2.4.3.1.1. More...
#include "zigbee-zdo-client-header.h"
Public Member Functions | |
| NwkAddrRequestCmd () | |
| ~NwkAddrRequestCmd () override | |
| uint32_t | Deserialize (Buffer::Iterator start) override |
| Mac64Address | GetIeeeAddress () |
| Get the IEEE address set for the network address request. | |
| TypeId | GetInstanceTypeId () const override |
| Get the most derived TypeId for this Object. | |
| uint8_t | GetRequestType () const |
| Get the request type previously set for the network address request. | |
| uint32_t | GetSerializedSize () const override |
| uint8_t | GetStartIndex () const |
| Get the start index. | |
| uint8_t | GetTsn () const |
| Get the transaction sequence number. | |
| void | Print (std::ostream &os) const override |
| void | Serialize (Buffer::Iterator start) const override |
| void | SetIeeeAddress (Mac64Address ieeeAddress) |
| Set the IEEE address used as base for the network address request. | |
| void | SetRequestType (uint8_t type) |
| Set the request type, either single device or extended response. | |
| void | SetStartIndex (uint8_t index) |
| Set the start index. | |
| void | SetTsn (uint8_t tsn) |
| Set the transaction sequence number. | |
| Public Member Functions inherited from ns3::Header | |
| ~Header () override | |
| virtual uint32_t | Deserialize (Buffer::Iterator start, Buffer::Iterator end) |
| Deserialize the object from a buffer iterator. | |
| Public Member Functions inherited from ns3::ObjectBase | |
| virtual | ~ObjectBase () |
| Virtual destructor. | |
| void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
| Get the value of an attribute, raising fatal errors if unsuccessful. | |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
| Get the value of an attribute without raising errors. | |
| void | SetAttribute (std::string name, const AttributeValue &value) |
| Set a single attribute, raising fatal errors if unsuccessful. | |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
| Set a single attribute without raising errors. | |
| bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
| Connect a TraceSource to a Callback with a context. | |
| bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
| Connect a TraceSource to a Callback without a context. | |
| bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
| Disconnect from a TraceSource a Callback previously connected with a context. | |
| bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
| Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
| Static Public Member Functions inherited from ns3::Header | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
| Static Public Member Functions inherited from ns3::Chunk | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
| Static Public Member Functions inherited from ns3::ObjectBase | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
Private Attributes | |
| Mac64Address | m_ieeeAddress |
| The IEEE address of the device to be queried. | |
| uint8_t | m_requestType {0} |
| Single device or extended response type. | |
| uint8_t | m_startIndex {0} |
| The starting index for the response, used for pagination. | |
| uint8_t | m_tsn {0} |
| The transaction sequence number for the request. | |
Additional Inherited Members | |
| Protected Member Functions inherited from ns3::ObjectBase | |
| void | ConstructSelf (const AttributeConstructionList &attributes) |
| Complete construction of ObjectBase; invoked by derived classes. | |
| virtual void | NotifyConstructionCompleted () |
| Notifier called once the ObjectBase is fully constructed. | |
| Related Symbols inherited from ns3::ObjectBase | |
| static TypeId | GetObjectIid () |
| Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
Implements the NWK_addr_req command See Zigbee Specification r22.1.0, Section 2.4.3.1.1.
Definition at line 64 of file zigbee-zdo-client-header.h.
| ns3::zigbee::NwkAddrRequestCmd::NwkAddrRequestCmd | ( | ) |
Definition at line 20 of file zigbee-zdo-client-header.cc.
References m_requestType, m_startIndex, and m_tsn.
Referenced by GetTypeId().
|
override |
Definition at line 27 of file zigbee-zdo-client-header.cc.
|
overridevirtual |
| start | an iterator which points to where the header should read from. |
This method is used by Packet::RemoveHeader to re-create a header from the byte buffer of a packet. The data read is expected to match bit-for-bit the representation of this header in real networks.
Note that data is not actually removed from the buffer to which the iterator points. Both Packet::RemoveHeader() and Packet::PeekHeader() call Deserialize(), but only the RemoveHeader() has additional statements to remove the header bytes from the underlying buffer and associated metadata.
Implements ns3::Header.
Definition at line 107 of file zigbee-zdo-client-header.cc.
References ns3::Buffer::Iterator::GetDistanceFrom(), m_ieeeAddress, m_requestType, m_startIndex, m_tsn, ns3::ReadFrom(), and ns3::Buffer::Iterator::ReadU8().
| Mac64Address ns3::zigbee::NwkAddrRequestCmd::GetIeeeAddress | ( | ) |
Get the IEEE address set for the network address request.
Definition at line 50 of file zigbee-zdo-client-header.cc.
References m_ieeeAddress.
Referenced by ns3::zigbee::ZigbeeZdo::HandleNwkAddrRequest().
|
overridevirtual |
Get the most derived TypeId for this Object.
This method is provided by ns3::Object::GetInstanceTypeId but classes which derive from ns3::ObjectBase directly have to implement it themselves. Typically, this method should simply return the output of GetTypeId().
Implements ns3::ObjectBase.
Definition at line 129 of file zigbee-zdo-client-header.cc.
References GetTypeId().
| uint8_t ns3::zigbee::NwkAddrRequestCmd::GetRequestType | ( | ) | const |
Get the request type previously set for the network address request.
Definition at line 62 of file zigbee-zdo-client-header.cc.
References m_requestType.
Referenced by ns3::zigbee::ZigbeeZdo::HandleNwkAddrRequest().
|
overridevirtual |
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. This method should return the number of bytes which are needed to store the full header data by Serialize.
Implements ns3::Header.
Definition at line 101 of file zigbee-zdo-client-header.cc.
| uint8_t ns3::zigbee::NwkAddrRequestCmd::GetStartIndex | ( | ) | const |
Get the start index.
Definition at line 74 of file zigbee-zdo-client-header.cc.
References m_startIndex.
| uint8_t ns3::zigbee::NwkAddrRequestCmd::GetTsn | ( | ) | const |
Get the transaction sequence number.
Definition at line 38 of file zigbee-zdo-client-header.cc.
References m_tsn.
Referenced by ns3::zigbee::ZigbeeZdo::HandleNwkAddrRequest().
|
static |
Get the type ID.
Definition at line 119 of file zigbee-zdo-client-header.cc.
References NwkAddrRequestCmd(), and ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
|
overridevirtual |
| os | output stream This method is used by Packet::Print to print the content of a header as ascii data to a c++ output stream. Although the header is free to format its output as it wishes, it is recommended to follow a few rules to integrate with the packet pretty printer: start with flags, small field values located between a pair of parens. Values should be separated by whitespace. Follow the parens with the important fields, separated by whitespace. i.e.: (field1 val1 field2 val2 field3 val3) field4 val4 field5 val5 |
Implements ns3::Header.
Definition at line 91 of file zigbee-zdo-client-header.cc.
References m_ieeeAddress, m_requestType, m_startIndex, and m_tsn.
|
overridevirtual |
| start | an iterator which points to where the header should be written. |
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. The data written is expected to match bit-for-bit the representation of this header in a real network.
Implements ns3::Header.
Definition at line 80 of file zigbee-zdo-client-header.cc.
References m_ieeeAddress, m_requestType, m_startIndex, m_tsn, ns3::WriteTo(), and ns3::Buffer::Iterator::WriteU8().
| void ns3::zigbee::NwkAddrRequestCmd::SetIeeeAddress | ( | Mac64Address | ieeeAddress | ) |
Set the IEEE address used as base for the network address request.
| ieeeAddress | The IEEE address. |
Definition at line 44 of file zigbee-zdo-client-header.cc.
References m_ieeeAddress.
Referenced by ns3::zigbee::ZigbeeZdo::NwkAddrRequest().
| void ns3::zigbee::NwkAddrRequestCmd::SetRequestType | ( | uint8_t | type | ) |
Set the request type, either single device or extended response.
Note:Extended response is not currently supported.
| type | The request type. |
Definition at line 56 of file zigbee-zdo-client-header.cc.
References m_requestType.
Referenced by ns3::zigbee::ZigbeeZdo::NwkAddrRequest().
| void ns3::zigbee::NwkAddrRequestCmd::SetStartIndex | ( | uint8_t | index | ) |
Set the start index.
Used only for the pagination of extended responses. Note: Extended response is not currently supported. Therefore this is only a placeholder for future use.
| index | The start index. |
Definition at line 68 of file zigbee-zdo-client-header.cc.
References m_startIndex.
Referenced by ns3::zigbee::ZigbeeZdo::NwkAddrRequest().
| void ns3::zigbee::NwkAddrRequestCmd::SetTsn | ( | uint8_t | tsn | ) |
Set the transaction sequence number.
| tsn | The transaction sequence number. |
Definition at line 32 of file zigbee-zdo-client-header.cc.
References m_tsn.
Referenced by ns3::zigbee::ZigbeeZdo::NwkAddrRequest().
|
private |
The IEEE address of the device to be queried.
Definition at line 144 of file zigbee-zdo-client-header.h.
Referenced by Deserialize(), GetIeeeAddress(), Print(), Serialize(), and SetIeeeAddress().
|
private |
Single device or extended response type.
Definition at line 145 of file zigbee-zdo-client-header.h.
Referenced by NwkAddrRequestCmd(), Deserialize(), GetRequestType(), Print(), Serialize(), and SetRequestType().
|
private |
The starting index for the response, used for pagination.
Definition at line 146 of file zigbee-zdo-client-header.h.
Referenced by NwkAddrRequestCmd(), Deserialize(), GetStartIndex(), Print(), Serialize(), and SetStartIndex().
|
private |
The transaction sequence number for the request.
Definition at line 143 of file zigbee-zdo-client-header.h.
Referenced by NwkAddrRequestCmd(), Deserialize(), GetTsn(), Print(), Serialize(), and SetTsn().