Commit 9ed16976 authored by Yann Garcia's avatar Yann Garcia
Browse files

AtsRSUsSimulator: Add GenerationLocation for DENM

parent 68adc9ba
......@@ -469,7 +469,14 @@ int security_services::sign_payload(const OCTETSTRING& p_unsecured_gn_payload, O
// Set secured field according to the payload!
header_info.psid() = converter::get_instance().string_to_int(p_params[params::its_aid]);
header_info.expiryTime().set_to_omit();
header_info.generationLocation().set_to_omit();
if (p_params[params::its_aid].compare("37") == 0) { // Only used by AtsRSUSimulator
// Mandatory for DENM payload
OPTIONAL<IEEE1609dot2BaseTypes::ThreeDLocation> location(IEEE1609dot2BaseTypes::ThreeDLocation(_latitude, _longitude, _elevation));
header_info.generationLocation() = location;
loggers::get_instance().log_msg("security_services::sign_payload: generationLocation: ", header_info.generationLocation());
} else {
header_info.generationLocation().set_to_omit();
}
header_info.p2pcdLearningRequest().set_to_omit();
header_info.missingCrlIdentifier().set_to_omit();
if (_params[params::encrypted_mode].compare("1") == 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment