From 6b0a9f4af7a0d5aca3595c570ed9c6b13e90ce51 Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Sat, 1 May 2021 04:36:19 +0200 Subject: [PATCH] sixlowpan: fix doxygen warnings --- src/sixlowpan/helper/sixlowpan-helper.h | 10 ++--- src/sixlowpan/model/sixlowpan-net-device.h | 7 ++-- .../test/sixlowpan-iphc-stateful-test.cc | 40 +++++++++++++++---- 3 files changed, 41 insertions(+), 16 deletions(-) diff --git a/src/sixlowpan/helper/sixlowpan-helper.h b/src/sixlowpan/helper/sixlowpan-helper.h index 87af498f7..d31f5ca26 100644 --- a/src/sixlowpan/helper/sixlowpan-helper.h +++ b/src/sixlowpan/helper/sixlowpan-helper.h @@ -87,8 +87,8 @@ public: * The context is used only in IPHC compression and decompression. * * \param [in] c The NetDevice container. - * \param [in] id The context id (must be less than 16). - * \param [in] prefix The context prefix. + * \param [in] contextId The context id (must be less than 16). + * \param [in] context The context prefix. * \param [in] validity the context validity time (relative to the actual time). */ void AddContext (NetDeviceContainer c, uint8_t contextId, Ipv6Prefix context, Time validity); @@ -99,7 +99,7 @@ public: * The context will have its lifetime extended and its validity for compression re-enabled. * * \param [in] c The NetDevice container. - * \param [in] id The context id (must be less than 16). + * \param [in] contextId The context id (must be less than 16). * \param [in] validity the context validity time (relative to the actual time). */ void RenewContext (NetDeviceContainer c, uint8_t contextId, Time validity); @@ -114,7 +114,7 @@ public: * can not be used for decompression whie packets are traveling the network. * * \param [in] c The NetDevice container. - * \param [in] id The context id (must be less than 16). + * \param [in] contextId The context id (must be less than 16). */ void InvalidateContext (NetDeviceContainer c, uint8_t contextId); @@ -124,7 +124,7 @@ public: * The context is removed immediately from the contexts in the devices. * * \param [in] c The NetDevice container. - * \param [in] id The context id (must be less than 16). + * \param [in] contextId The context id (must be less than 16). */ void RemoveContext (NetDeviceContainer c, uint8_t contextId); diff --git a/src/sixlowpan/model/sixlowpan-net-device.h b/src/sixlowpan/model/sixlowpan-net-device.h index dbd547e14..0946d55df 100644 --- a/src/sixlowpan/model/sixlowpan-net-device.h +++ b/src/sixlowpan/model/sixlowpan-net-device.h @@ -255,7 +255,6 @@ private: * \param [in] source The source address. * \param [in] destination The destination address. * \param [in] packetType The packet kind (e.g., HOST, BROADCAST, etc.). - * \return The IPv6 link-local address. */ void ReceiveFromDevice (Ptr device, Ptr packet, uint16_t protocol, Address const &source, Address const &destination, PacketType packetType); @@ -621,7 +620,7 @@ private: * \brief Finds if the given unicast address matches a context for compression * * \param[in] address the address to check - * \param[out] the context found + * \param[out] contextId the context found * \return true if a valid context has been found */ bool FindUnicastCompressionContext (Ipv6Address address, uint8_t& contextId); @@ -630,7 +629,7 @@ private: * \brief Finds if the given multicast address matches a context for compression * * \param[in] address the address to check - * \param[out] the context found + * \param[out] contextId the context found * \return true if a valid context has been found */ bool FindMulticastCompressionContext (Ipv6Address address, uint8_t& contextId); @@ -642,7 +641,7 @@ private: * Only the pefix length is used - the address prefix is assumed to be matching the prefix. * * \param address the address to be cleaned - * \param the prefix to remove + * \param prefix the prefix to remove * \return An address with the prefix zeroed. */ Ipv6Address CleanPrefix (Ipv6Address address, Ipv6Prefix prefix); diff --git a/src/sixlowpan/test/sixlowpan-iphc-stateful-test.cc b/src/sixlowpan/test/sixlowpan-iphc-stateful-test.cc index f303711fd..22b753d2d 100644 --- a/src/sixlowpan/test/sixlowpan-iphc-stateful-test.cc +++ b/src/sixlowpan/test/sixlowpan-iphc-stateful-test.cc @@ -70,13 +70,39 @@ class SixlowpanIphcStatefulImplTest : public TestCase std::vector m_txPackets; //!< Transmitted packets std::vector m_rxPackets; //!< Received packets + /** + * Receive from a MockDevice. + * \param device a pointer to the net device which is calling this function + * \param packet the packet received + * \param protocol the 16 bit protocol number associated with this packet. + * \param source the address of the sender + * \param destination the address of the receiver + * \param packetType type of packet received (broadcast/multicast/unicast/otherhost) + * \returns true. + */ bool ReceiveFromMockDevice (Ptr device, Ptr packet, uint16_t protocol, Address const &source, Address const &destination, NetDevice::PacketType packetType); + /** + * Promiscuous receive from a SixLowPanNetDevice. + * \param device a pointer to the net device which is calling this function + * \param packet the packet received + * \param protocol the 16 bit protocol number associated with this packet. + * \param source the address of the sender + * \param destination the address of the receiver + * \param packetType type of packet received (broadcast/multicast/unicast/otherhost) + * \returns true. + */ bool PromiscReceiveFromSixLowPanDevice (Ptr device, Ptr packet, uint16_t protocol, Address const &source, Address const &destination, NetDevice::PacketType packetType); - void SendOnePacket (NetDeviceContainer devices, Ipv6Address from, Ipv6Address to); + /** + * Send one packet. + * \param device the device to send from + * \param from sender address + * \param to destination address + */ + void SendOnePacket (Ptr device, Ipv6Address from, Ipv6Address to); NetDeviceContainer m_mockDevices; //!< MockNetDevice container NetDeviceContainer m_sixDevices; //!< SixLowPanNetDevice container @@ -124,7 +150,7 @@ SixlowpanIphcStatefulImplTest::PromiscReceiveFromSixLowPanDevice (Ptr } void -SixlowpanIphcStatefulImplTest::SendOnePacket (NetDeviceContainer devices, Ipv6Address from, Ipv6Address to) +SixlowpanIphcStatefulImplTest::SendOnePacket (Ptr device, Ipv6Address from, Ipv6Address to) { Ptr pkt = Create (10); Ipv6Header ipHdr; @@ -135,7 +161,7 @@ SixlowpanIphcStatefulImplTest::SendOnePacket (NetDeviceContainer devices, Ipv6Ad ipHdr.SetNextHeader (0xff); pkt->AddHeader (ipHdr); - devices.Get (0)->Send (pkt, Mac48Address ("00:00:00:00:00:02"), 0); + device->Send (pkt, Mac48Address ("00:00:00:00:00:02"), 0); } void @@ -196,19 +222,19 @@ SixlowpanIphcStatefulImplTest::DoRun (void) Ipv6Address srcElided = deviceInterfaces.GetAddress (0, 1); Ipv6Address dstElided = Ipv6Address::MakeAutoconfiguredAddress (Mac48Address ("00:00:00:00:00:02"), Ipv6Prefix ("2001:2::", 64)); - Simulator::Schedule (Seconds (1), &SixlowpanIphcStatefulImplTest::SendOnePacket, this, m_sixDevices, + Simulator::Schedule (Seconds (1), &SixlowpanIphcStatefulImplTest::SendOnePacket, this, m_sixDevices.Get (0), Ipv6Address::GetAny (), dstElided); - Simulator::Schedule (Seconds (2), &SixlowpanIphcStatefulImplTest::SendOnePacket, this, m_sixDevices, + Simulator::Schedule (Seconds (2), &SixlowpanIphcStatefulImplTest::SendOnePacket, this, m_sixDevices.Get (0), Ipv6Address ("2001:2::f00d:f00d:cafe:cafe"), Ipv6Address ("2001:1::0000:00ff:fe00:cafe")); - Simulator::Schedule (Seconds (3), &SixlowpanIphcStatefulImplTest::SendOnePacket, this, m_sixDevices, + Simulator::Schedule (Seconds (3), &SixlowpanIphcStatefulImplTest::SendOnePacket, this, m_sixDevices.Get (0), Ipv6Address ("2001:1::0000:00ff:fe00:cafe"), Ipv6Address ("2001:1::f00d:f00d:cafe:cafe")); - Simulator::Schedule (Seconds (4), &SixlowpanIphcStatefulImplTest::SendOnePacket, this, m_sixDevices, + Simulator::Schedule (Seconds (4), &SixlowpanIphcStatefulImplTest::SendOnePacket, this, m_sixDevices.Get (0), srcElided, Ipv6Address ("2001:1::f00d:f00d:cafe:cafe"));