From 3acd900bdf3fc50bcd6dfea251c59cc5edeed9fa Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Tue, 31 Jul 2018 08:41:26 -0700 Subject: [PATCH] [message] update comment/documentation (#2903) --- src/core/common/message.hpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/core/common/message.hpp b/src/core/common/message.hpp index bf70bf590..35ee3875b 100644 --- a/src/core/common/message.hpp +++ b/src/core/common/message.hpp @@ -443,23 +443,28 @@ public: int CopyTo(uint16_t aSourceOffset, uint16_t aDestinationOffset, uint16_t aLength, Message &aMessage) const; /** - * This method creates a copy of the current Message. It allocates the new one - * from the same Message Poll as the original Message and copies @p aLength octets of a payload. + * This method creates a copy of the message. * - * The `Type`, `SubType`, `LinkSecurity` and `Priority` fields on the cloned message are also - * copied from the original one. + * It allocates the new message from the same message pool as the original one and copies @p aLength octets + * of the payload. The `Type`, `SubType`, `LinkSecurity`, `Offset`, `InterfaceId`, and `Priority` fields on the + * cloned message are also copied from the original one. * * @param[in] aLength Number of payload bytes to copy. * * @returns A pointer to the message or NULL if insufficient message buffers are available. + * */ Message *Clone(uint16_t aLength) const; /** - * This method creates a copy of the current Message. It allocates the new one - * from the same Message Poll as the original Message and copies a full payload. + * This method creates a copy of the message. + * + * It allocates the new message from the same message pool as the original one and copies the entire payload. The + * `Type`, `SubType`, `LinkSecurity`, `Offset`, `InterfaceId`, and `Priority` fields on the cloned message are also + * copied from the original one. * * @returns A pointer to the message or NULL if insufficient message buffers are available. + * */ Message *Clone(void) const { return Clone(GetLength()); };