Commit 2d7f5be9 authored by Yann Garcia's avatar Yann Garcia
Browse files

Editorial changes; CV2x#4 validation for AtsCAM; Enhance .cfg files

parent 2fb05d79
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -7,7 +7,7 @@
extern "C" {
extern "C" {
static int asn1c_collect_encoded_data(const void *buffer, size_t size, void *application_specific_key) {
static int asn1c_collect_encoded_data(const void *buffer, size_t size, void *application_specific_key) {
  TTCN_Buffer *tb = (TTCN_Buffer *)application_specific_key;
  TTCN_Buffer *tb = (TTCN_Buffer *)application_specific_key;
  tb->put_s(size, (unsigned char *)buffer);
  tb->put_s(size, (uint8_t *)buffer);
  return 0;
  return 0;
}
}
}
}
+3 −3
Original line number Original line Diff line number Diff line
@@ -71,13 +71,13 @@ namespace LibItsCam__EncdecDeclarations {
             LibItsCam__TypesAndValues::CamInd_its__aid_raw_.fieldlength) /
             LibItsCam__TypesAndValues::CamInd_its__aid_raw_.fieldlength) /
            8;
            8;
    // Decode CA message
    // Decode CA message
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const unsigned char *>(is)), cam) == -1) {
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const uint8_t *>(is)), cam) == -1) {
      loggers::get_instance().warning("fx__dec__CamInd: -1 result code was returned");
      loggers::get_instance().warning("fx__dec__CamInd: -1 result code was returned");
      return -1;
      return -1;
    }
    }
    p_camInd.msgIn() = cam;
    p_camInd.msgIn() = cam;
    // Decode lower layer data
    // Decode lower layer data
    TTCN_Buffer decoding_buffer(OCTETSTRING(s, static_cast<const unsigned char *>(is) + is.lengthof() - s));
    TTCN_Buffer decoding_buffer(OCTETSTRING(s, static_cast<const uint8_t *>(is) + is.lengthof() - s));
    loggers::get_instance().log_to_hexa("fx__dec__CAM: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__CAM: ", decoding_buffer);
    // gnNextHeader
    // gnNextHeader
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsCam__TypesAndValues::CamInd_gnNextHeader_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsCam__TypesAndValues::CamInd_gnNextHeader_raw_.fieldlength / 8)) {
@@ -187,7 +187,7 @@ namespace LibItsCam__EncdecDeclarations {
    cam_codec   codec;
    cam_codec   codec;
    OCTETSTRING is = bit2oct(b);
    OCTETSTRING is = bit2oct(b);


    if (codec.decode(OCTETSTRING(is.lengthof(), static_cast<const unsigned char *>(is)), p) == -1) {
    if (codec.decode(OCTETSTRING(is.lengthof(), static_cast<const uint8_t *>(is)), p) == -1) {
      loggers::get_instance().warning("fx__dec__CAM: -1 result code was returned");
      loggers::get_instance().warning("fx__dec__CAM: -1 result code was returned");
      return -1;
      return -1;
    }
    }
+3 −3
Original line number Original line Diff line number Diff line
@@ -70,13 +70,13 @@ namespace LibItsDenm__EncdecDeclarations {
             LibItsDenm__TypesAndValues::DenmInd_its__aid_raw_.fieldlength) /
             LibItsDenm__TypesAndValues::DenmInd_its__aid_raw_.fieldlength) /
            8;
            8;
    // Decode DEN message
    // Decode DEN message
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const unsigned char *>(is)), denm) == -1) {
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const uint8_t *>(is)), denm) == -1) {
      loggers::get_instance().warning("fx__dec__DenmInd: -1 result code was returned");
      loggers::get_instance().warning("fx__dec__DenmInd: -1 result code was returned");
      return -1;
      return -1;
    }
    }
    p_denmInd.msgIn() = denm;
    p_denmInd.msgIn() = denm;
    // Decode lower layer data
    // Decode lower layer data
    TTCN_Buffer decoding_buffer(OCTETSTRING(s, static_cast<const unsigned char *>(is) + is.lengthof() - s));
    TTCN_Buffer decoding_buffer(OCTETSTRING(s, static_cast<const uint8_t *>(is) + is.lengthof() - s));
    loggers::get_instance().log_to_hexa("fx__dec__DENM: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__DENM: ", decoding_buffer);
    // gnNextHeader
    // gnNextHeader
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsDenm__TypesAndValues::DenmInd_gnNextHeader_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsDenm__TypesAndValues::DenmInd_gnNextHeader_raw_.fieldlength / 8)) {
@@ -186,7 +186,7 @@ namespace LibItsDenm__EncdecDeclarations {
    denm_codec  codec;
    denm_codec  codec;
    OCTETSTRING is = bit2oct(b);
    OCTETSTRING is = bit2oct(b);


    if (codec.decode(OCTETSTRING(is.lengthof(), static_cast<const unsigned char *>(is)), p) == -1) {
    if (codec.decode(OCTETSTRING(is.lengthof(), static_cast<const uint8_t *>(is)), p) == -1) {
      loggers::get_instance().warning("fx__dec__DENM: -1 result code was returned");
      loggers::get_instance().warning("fx__dec__DENM: -1 result code was returned");
      return -1;
      return -1;
    }
    }
+5 −5
Original line number Original line Diff line number Diff line
@@ -71,12 +71,12 @@ namespace LibItsGeoNetworking__EncdecDeclarations {
    unsigned int s = (LibItsGeoNetworking__TypesAndValues::GeoNetworkingInd_macDestinationAddress_raw_.fieldlength +
    unsigned int s = (LibItsGeoNetworking__TypesAndValues::GeoNetworkingInd_macDestinationAddress_raw_.fieldlength +
                      LibItsGeoNetworking__TypesAndValues::GeoNetworkingInd_its__aid_raw_.fieldlength) /
                      LibItsGeoNetworking__TypesAndValues::GeoNetworkingInd_its__aid_raw_.fieldlength) /
                     8;
                     8;
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const unsigned char *>(is)), pdu) == -1) {
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const uint8_t *>(is)), pdu) == -1) {
      loggers::get_instance().warning("fx__dec__GeoNetworkingReq: -1 result code was returned");
      loggers::get_instance().warning("fx__dec__GeoNetworkingReq: -1 result code was returned");
      return -1;
      return -1;
    }
    }
    p.msgOut() = pdu;
    p.msgOut() = pdu;
    TTCN_Buffer decoding_buffer(OCTETSTRING(s, static_cast<const unsigned char *>(is) + is.lengthof() - s));
    TTCN_Buffer decoding_buffer(OCTETSTRING(s, static_cast<const uint8_t *>(is) + is.lengthof() - s));
    loggers::get_instance().log_to_hexa("fx__dec__GeoNetworkingInd: Lower layer: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__GeoNetworkingInd: Lower layer: ", decoding_buffer);
    for (int i = 1; i < p.get_count(); i++) {
    for (int i = 1; i < p.get_count(); i++) {
      loggers::get_instance().log("fx__dec__GeoNetworkingReq: processing %s/%s/%s", p.fld_name(i), p.fld_descr(i)->name, p.get_at(i)->get_descriptor()->name);
      loggers::get_instance().log("fx__dec__GeoNetworkingReq: processing %s/%s/%s", p.fld_name(i), p.fld_descr(i)->name, p.get_at(i)->get_descriptor()->name);
@@ -142,12 +142,12 @@ namespace LibItsGeoNetworking__EncdecDeclarations {
      (LibItsGeoNetworking__TypesAndValues::GeoNetworkingInd_macDestinationAddress_raw_.fieldlength +
      (LibItsGeoNetworking__TypesAndValues::GeoNetworkingInd_macDestinationAddress_raw_.fieldlength +
       LibItsGeoNetworking__TypesAndValues::GeoNetworkingInd_ssp_raw_.fieldlength + LibItsGeoNetworking__TypesAndValues::GeoNetworkingInd_its__aid_raw_.fieldlength) /
       LibItsGeoNetworking__TypesAndValues::GeoNetworkingInd_ssp_raw_.fieldlength + LibItsGeoNetworking__TypesAndValues::GeoNetworkingInd_its__aid_raw_.fieldlength) /
      8;
      8;
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const unsigned char *>(is)), pdu) == -1) {
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const uint8_t *>(is)), pdu) == -1) {
      loggers::get_instance().warning("fx__dec__GeoNetworkingInd: -1 result code was returned");
      loggers::get_instance().warning("fx__dec__GeoNetworkingInd: -1 result code was returned");
      return -1;
      return -1;
    }
    }
    p_geoNetworkingInd.msgIn() = pdu;
    p_geoNetworkingInd.msgIn() = pdu;
    TTCN_Buffer decoding_buffer(OCTETSTRING(s, static_cast<const unsigned char *>(is) + is.lengthof() - s));
    TTCN_Buffer decoding_buffer(OCTETSTRING(s, static_cast<const uint8_t *>(is) + is.lengthof() - s));
    loggers::get_instance().log_to_hexa("fx__dec__GeoNetworkingInd: Lower layer: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__GeoNetworkingInd: Lower layer: ", decoding_buffer);
    for (int i = 1; i < p_geoNetworkingInd.get_count(); i++) {
    for (int i = 1; i < p_geoNetworkingInd.get_count(); i++) {
      loggers::get_instance().log("fx__dec__GeoNetworkingInd: processing %s/%s/%s - %d - %d", p_geoNetworkingInd.fld_name(i),
      loggers::get_instance().log("fx__dec__GeoNetworkingInd: processing %s/%s/%s - %d - %d", p_geoNetworkingInd.fld_name(i),
@@ -219,7 +219,7 @@ namespace LibItsGeoNetworking__EncdecDeclarations {
    geonetworking_codec codec;
    geonetworking_codec codec;
    OCTETSTRING         is = bit2oct(b);
    OCTETSTRING         is = bit2oct(b);


    if (codec.decode(OCTETSTRING(is.lengthof(), static_cast<const unsigned char *>(is)), p) == -1) {
    if (codec.decode(OCTETSTRING(is.lengthof(), static_cast<const uint8_t *>(is)), p) == -1) {
      loggers::get_instance().warning("fx__dec__GeoNetworkingPdu: -1 result code was returned");
      loggers::get_instance().warning("fx__dec__GeoNetworkingPdu: -1 result code was returned");
      return -1;
      return -1;
    }
    }
+3 −3
Original line number Original line Diff line number Diff line
@@ -61,13 +61,13 @@ namespace LibItsIvim__EncdecDeclarations {
             LibItsIvim__TypesAndValues::IvimInd_its__aid_raw_.fieldlength) /
             LibItsIvim__TypesAndValues::IvimInd_its__aid_raw_.fieldlength) /
            8;
            8;
    // Decode CA message
    // Decode CA message
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const unsigned char *>(is)), ivim) == -1) {
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const uint8_t *>(is)), ivim) == -1) {
      loggers::get_instance().warning("fx__dec__IvimInd: -1 result code was returned");
      loggers::get_instance().warning("fx__dec__IvimInd: -1 result code was returned");
      return -1;
      return -1;
    }
    }
    p_ivimInd.msgIn() = ivim;
    p_ivimInd.msgIn() = ivim;
    // Decode lower layer data
    // Decode lower layer data
    TTCN_Buffer decoding_buffer(OCTETSTRING(s, static_cast<const unsigned char *>(is) + is.lengthof() - s));
    TTCN_Buffer decoding_buffer(OCTETSTRING(s, static_cast<const uint8_t *>(is) + is.lengthof() - s));
    loggers::get_instance().log_to_hexa("fx__dec__IVIM: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__IVIM: ", decoding_buffer);
    // gnNextHeader
    // gnNextHeader
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsIvim__TypesAndValues::IvimInd_gnNextHeader_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsIvim__TypesAndValues::IvimInd_gnNextHeader_raw_.fieldlength / 8)) {
@@ -177,7 +177,7 @@ namespace LibItsIvim__EncdecDeclarations {
    ivim_codec  codec;
    ivim_codec  codec;
    OCTETSTRING is = bit2oct(b);
    OCTETSTRING is = bit2oct(b);


    if (codec.decode(OCTETSTRING(is.lengthof(), static_cast<const unsigned char *>(is)), p) == -1) {
    if (codec.decode(OCTETSTRING(is.lengthof(), static_cast<const uint8_t *>(is)), p) == -1) {
      loggers::get_instance().warning("fx__dec__IVIM: -1 result code was returned");
      loggers::get_instance().warning("fx__dec__IVIM: -1 result code was returned");
      return -1;
      return -1;
    }
    }
Loading