Skip to content

Commit

Permalink
Variable length message fields allocation free (#1004)
Browse files Browse the repository at this point in the history
* Refs 7529 Port of PR 965

2fb801734 Ref. 5750 clear QoS instead of reconstruct

39cb3e5 apply review suggestions

50dbc8c Refs #7305. Revert test modifications to old API

ccec5bd Refs.7305 Restore API on QosPolicies

4c2b426 Refs #7305. Style on PKIDH.cpp

ece3c00 Refs #7305. Using ParameterList::read_guid_from_cdr_msg on PKIDH.

ad52820 Refs #7305. Style on ParameterList.cpp

582be58 Refs #7305. Added ParameterList::read_guid_from_cdr_msg.

e1ccfea Refs #7305. Styling on WriterProxyData.

b7fa7a8 Refs #7305. Styling on ReaderProxyData.

4471db2 Refs #7305. Styling on ParticipantProxyData.

3bc368a Refs #7305. Avoid duplicate code on ParameterList.cpp

419108b Refs #7305. Uncrustify QosPolicies.

d2ba714 Refs #7305. Uncrustify ParameterTypes

d9260b6 Ref. 5750 unused variable warning removal

9200aa3 Ref. 5750 ProxyDatas don't need data limits anymore

f2f22d4 Ref. 5750 Removing warnings

15359a7 Ref. 5750 Move comon code of reading messages to ParameterLists

e29cbbf Ref. 5750 ParameterType checks size when reading from message

3e47f99 correct string size alignment

4feb3b8 Remove unused method on ParameterList

90c4d76 Uncrustify CDRMessage

e4b18c3 Correct logic error on SerializedPayload::operator==

ed797ae Reduce code duplication in CDRMessage::add_string

6c738a6 Remove compilation warnings on Windows

0dbaa8f Correct valgrind errors

c5dc730 remove compilation warning

abb81b2 Correct security manager message reading routine

0d70e0b Correct compilation warnings

c18633d Ref. 5750 correct compilations on mocks

76ffe3d Ref. 5750 correct compilation with security option

12e6439 Ref. 5750 Remove unused ParameterList::readParameterListfromCDRMsg

0f7e175 Ref. 5750 remove obsolete code

0ae0848 Ref. 5750 testing dynamic data size limits

a7031bd Ref. 5750 Improve properties' modifications

6725e35 size limit on PartitionQosPolicy

3d75fb1 Ref. 5750 more initialize data limits on WriterProxyData and ReaderProxyData

ce38603 Ref. 5750 initialize data limits on WriterProxyData and ReaderProxyData

88363df Ref. 5750 group data limits in a new struct

5655564 Ref. 5750 max size-aware ParameterPropertyList_t

2b37372 Ref. 5750 Make UserData aware of it own size

2da140e Ref. 5750 avoid allocations on deserialize

ef268f2 Ref. 5750 Make WriterProxyData deserialize its messages

dd79e00 Ref. 5750 Make ReaderProxyData deserialize its messages

e7aa067 Ref. 5750 Make ParticipantProxyData deserialize its messages

df1ebae Ref. 5750 make data types deserialize themselves

2a6b2a6 Ref. 5750 XML schema for variable size parameters' max size

* uncrustify

* merge latest commits from #1003

Includes the following commits

* 752b865 reset 'hasChanged' to default value on clear

* de0f4e7 correct reading of TypeConsistencyEnforcement

Also includes some corrections to leave objects on default state when
QosPolicies::clear()

* Refs 7529 Correct missing override tag

* Store endpoint GUID from message

This is a port of the bugfix #1015

* Initialize dynamic types on new ProxyData ctor

* Refs 7529. Apply review suggestions
  • Loading branch information
IkerLuengo authored Mar 3, 2020
1 parent c27ed76 commit a999b3a
Show file tree
Hide file tree
Showing 38 changed files with 6,216 additions and 3,003 deletions.
32 changes: 16 additions & 16 deletions include/fastdds/dds/core/policy/ParameterList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,6 @@ class ParameterList
static bool writeEncapsulationToCDRMsg(
fastrtps::rtps::CDRMessage_t* msg);

/**
* Update the CDRMessage of a parameterList.
* @param msg Pointer to the message (the pos should be correct, otherwise the behaviour is undefined).
* @param plist Pointer to the parameterList.
* @param use_encapsulation Flag to apply encapsulation.
* @return True if correct.
*/
static bool writeParameterListToCDRMsg(
fastrtps::rtps::CDRMessage_t* msg,
ParameterList* plist,
bool use_encapsulation);

/**
* Update the information of a cache change parsing the inline qos from a CDRMessage
* @param[inout] change Reference to the cache change to be updated.
Expand All @@ -77,31 +65,43 @@ class ParameterList
* Read a parameterList from a CDRMessage
* @param[in] msg Reference to the message (the pos should be correct, otherwise the behaviour is undefined).
* @param[in] processor Function to process each of the parameters in the list.
* @param[in] use_encapsulation Wether encapsulation field should be read.
* @param[in] use_encapsulation Whether encapsulation field should be read.
* @param[out] qos_size Number of bytes processed.
* @return true if parsing was correct, false otherwise.
*/
static bool readParameterListfromCDRMsg(
fastrtps::rtps::CDRMessage_t& msg,
std::function<bool(const fastrtps::Parameter_t*)> processor,
std::function<bool(fastrtps::rtps::CDRMessage_t* msg, const ParameterId_t, uint16_t)> processor,
bool use_encapsulation,
uint32_t& qos_size);

/**
* Read guid from the KEY_HASH or another specific PID parameter of a CDRMessage
* @param[in,out] msg Reference to the message (pos should be correct, otherwise the behaviour is undefined).
* @param[in] search_pid Specific PID to search
* @param[out] guid Reference where the guid will be written.
* @return true if a guid is returned, false otherwise.
*/
static bool read_guid_from_cdr_msg(
fastrtps::rtps::CDRMessage_t& msg,
uint16_t search_pid,
fastrtps::rtps::GUID_t& guid);

/**
* Read change instanceHandle from the KEY_HASH or another specific PID parameter of a CDRMessage
* @param[in,out] change Pointer to the cache change.
* @param[in] pid Specific PID to search
* @param[in] search_pid Specific PID to search
* @return True when instanceHandle is updated.
*/
static bool readInstanceHandleFromCDRMsg(
fastrtps::rtps::CacheChange_t* change,
const uint16_t pid);
const uint16_t search_pid);
};

} // namespace dds
} // namespace fastdds
} // namespace eprosima

#endif

#endif // _FASTDDS_DDS_QOS_PARAMETERLIST_HPP_
Loading

0 comments on commit a999b3a

Please sign in to comment.