Function etsi_its_cpm_ts_msgs::access::addContainerToCPM
Defined in File cpm_ts_setters.h
Function Documentation
-
inline void etsi_its_cpm_ts_msgs::access::addContainerToCPM(CollectivePerceptionMessage &cpm, const WrappedCpmContainer &container)
Adds a container to the Collective Perception Message (CPM).
This function adds a WrappedCpmContainer to the CPM’s payload. It first checks if the current number of containers is less than the maximum allowed. If so, it appends the container to the array. Otherwise, it throws an exception.
- Parameters:
cpm – The Collective Perception Message to which the container will be added.
container – The WrappedCpmContainer to be added to the CPM.
- Throws:
std::invalid_argument – if the maximum number of CPM-Containers is reached.