Function etsi_its_cpm_ts_msgs::access::addSensorInformationContainerToCPM
Defined in File cpm_ts_setters.h
Function Documentation
-
inline void etsi_its_cpm_ts_msgs::access::addSensorInformationContainerToCPM(CollectivePerceptionMessage &cpm, const WrappedCpmContainer &container)
Adds a container to the Collective Perception Message (CPM).
This function adds a SensorInformationContainer / WrappedCpmContainer to the CPM’s payload. It first checks if the container is a SensorInformationContainer. If so, it checks if the number of entries is in the allowed range. If the number of entries is valid, 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 container is not a SensorInformationContainer.
std::invalid_argument – if the number of SensorInformation entries is out of range.