From 07b25ebb06e0afa0e517b7b063783ce9a5ace11f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 4 Mar 2018 02:04:27 +0100 Subject: [PATCH] Apply clang-format to the whole source tree --- .../galileo_pcps_8ms_acquisition_cc.cc | 7 +- .../gps_pcps_acquisition_fpga_sc.cc | 4 +- .../gnuradio_blocks/pcps_acquisition.cc | 7 +- .../pcps_cccwsr_acquisition_cc.cc | 7 +- .../pcps_quicksync_acquisition_cc.cc | 7 +- .../pcps_tong_acquisition_cc.cc | 7 +- src/algorithms/libs/opencl/clFFT.h | 117 +- src/algorithms/libs/opencl/fft_base_kernels.h | 424 ++-- src/algorithms/libs/opencl/fft_execute.cc | 652 +++-- src/algorithms/libs/opencl/fft_internal.h | 188 +- .../libs/opencl/fft_kernelstring.cc | 2124 +++++++++-------- src/algorithms/libs/opencl/fft_setup.cc | 586 ++--- src/algorithms/libs/rtklib/rtklib_rtkcmn.cc | 11 +- .../volk_gnsssdr/cmake/msvc/config.h | 32 +- .../volk_gnsssdr/tmpl/volk_gnsssdr.tmpl.c | 122 +- .../volk_gnsssdr/tmpl/volk_gnsssdr.tmpl.h | 4 +- .../tmpl/volk_gnsssdr_config_fixed.tmpl.h | 3 +- .../volk_gnsssdr/tmpl/volk_gnsssdr_cpu.tmpl.c | 98 +- .../volk_gnsssdr/tmpl/volk_gnsssdr_cpu.tmpl.h | 6 +- .../tmpl/volk_gnsssdr_machine_xxx.tmpl.c | 4 + .../tmpl/volk_gnsssdr_machines.tmpl.c | 5 +- .../tmpl/volk_gnsssdr_machines.tmpl.h | 4 +- .../tmpl/volk_gnsssdr_typedefs.tmpl.h | 2 + .../gps_l2c_telemetry_decoder_cc.h | 3 +- .../gps_l5_telemetry_decoder_cc.h | 3 +- .../tracking/libs/cuda_multicorrelator.h | 6 +- src/core/libs/gnss_sdr_supl_client.h | 3 +- src/core/libs/supl/asn-rrlp/Accuracy.h | 29 +- src/core/libs/supl/asn-rrlp/AccuracyOpt.h | 21 +- src/core/libs/supl/asn-rrlp/AcquisAssist.h | 23 +- src/core/libs/supl/asn-rrlp/AcquisElement.h | 41 +- .../libs/supl/asn-rrlp/AddionalAngleFields.h | 23 +- .../supl/asn-rrlp/AddionalDopplerFields.h | 23 +- .../supl/asn-rrlp/AdditionalAssistanceData.h | 27 +- .../supl/asn-rrlp/AdditionalDopplerFields.h | 23 +- src/core/libs/supl/asn-rrlp/AlertFlag.h | 29 +- .../libs/supl/asn-rrlp/Almanac-KeplerianSet.h | 39 +- src/core/libs/supl/asn-rrlp/Almanac.h | 23 +- src/core/libs/supl/asn-rrlp/AlmanacElement.h | 43 +- src/core/libs/supl/asn-rrlp/AntiSpoofFlag.h | 29 +- .../supl/asn-rrlp/AssistBTSData-R98-ExpOTD.h | 23 +- src/core/libs/supl/asn-rrlp/AssistBTSData.h | 33 +- src/core/libs/supl/asn-rrlp/AssistanceData.h | 51 +- src/core/libs/supl/asn-rrlp/BCCHCarrier.h | 29 +- src/core/libs/supl/asn-rrlp/BIT_STRING.h | 25 +- src/core/libs/supl/asn-rrlp/BOOLEAN.h | 25 +- src/core/libs/supl/asn-rrlp/BSIC.h | 29 +- src/core/libs/supl/asn-rrlp/BSICAndCarrier.h | 23 +- src/core/libs/supl/asn-rrlp/BTSPosition.h | 29 +- .../libs/supl/asn-rrlp/BadSignalElement.h | 23 +- src/core/libs/supl/asn-rrlp/BitNumber.h | 29 +- .../libs/supl/asn-rrlp/CalcAssistanceBTS.h | 23 +- src/core/libs/supl/asn-rrlp/CellID.h | 29 +- src/core/libs/supl/asn-rrlp/CellIDAndLAC.h | 23 +- src/core/libs/supl/asn-rrlp/ControlHeader.h | 57 +- .../libs/supl/asn-rrlp/DGANSSSgnElement.h | 29 +- src/core/libs/supl/asn-rrlp/DGPSCorrections.h | 25 +- src/core/libs/supl/asn-rrlp/ENUMERATED.h | 11 +- src/core/libs/supl/asn-rrlp/EOTDQuality.h | 23 +- .../libs/supl/asn-rrlp/EnvironmentCharacter.h | 44 +- .../asn-rrlp/EphemerisSubframe1Reserved.h | 27 +- src/core/libs/supl/asn-rrlp/ErrorCodes.h | 50 +- .../libs/supl/asn-rrlp/ExpOTDUncertainty.h | 29 +- src/core/libs/supl/asn-rrlp/ExpectedOTD.h | 29 +- .../asn-rrlp/Ext-GeographicalInformation.h | 29 +- .../libs/supl/asn-rrlp/Extended-reference.h | 23 +- .../libs/supl/asn-rrlp/ExtensionContainer.h | 29 +- src/core/libs/supl/asn-rrlp/FineRTD.h | 29 +- src/core/libs/supl/asn-rrlp/FixType.h | 40 +- src/core/libs/supl/asn-rrlp/FrameDrift.h | 29 +- src/core/libs/supl/asn-rrlp/FrameNumber.h | 29 +- .../libs/supl/asn-rrlp/GANSS-AssistData.h | 21 +- .../libs/supl/asn-rrlp/GANSS-ControlHeader.h | 29 +- .../libs/supl/asn-rrlp/GANSS-MsrSetElement.h | 33 +- .../libs/supl/asn-rrlp/GANSS-SgnElement.h | 37 +- .../libs/supl/asn-rrlp/GANSS-SgnTypeElement.h | 23 +- .../libs/supl/asn-rrlp/GANSSAlmanacElement.h | 46 +- .../libs/supl/asn-rrlp/GANSSAlmanacModel.h | 29 +- .../libs/supl/asn-rrlp/GANSSAssistanceData.h | 29 +- src/core/libs/supl/asn-rrlp/GANSSClockModel.h | 46 +- .../supl/asn-rrlp/GANSSCommonAssistData.h | 35 +- src/core/libs/supl/asn-rrlp/GANSSDataBit.h | 29 +- .../libs/supl/asn-rrlp/GANSSDataBitAssist.h | 27 +- .../libs/supl/asn-rrlp/GANSSDiffCorrections.h | 23 +- .../asn-rrlp/GANSSGenericAssistDataElement.h | 57 +- .../libs/supl/asn-rrlp/GANSSIonoStormFlags.h | 29 +- .../libs/supl/asn-rrlp/GANSSIonosphereModel.h | 25 +- .../supl/asn-rrlp/GANSSIonosphericModel.h | 29 +- .../libs/supl/asn-rrlp/GANSSLocationInfo.h | 43 +- .../libs/supl/asn-rrlp/GANSSMeasureInfo.h | 21 +- src/core/libs/supl/asn-rrlp/GANSSNavModel.h | 29 +- src/core/libs/supl/asn-rrlp/GANSSOrbitModel.h | 46 +- .../supl/asn-rrlp/GANSSPositioningMethod.h | 40 +- .../supl/asn-rrlp/GANSSRealTimeIntegrity.h | 21 +- .../libs/supl/asn-rrlp/GANSSRefLocation.h | 21 +- .../supl/asn-rrlp/GANSSRefMeasurementAssist.h | 23 +- .../asn-rrlp/GANSSRefMeasurementElement.h | 41 +- .../libs/supl/asn-rrlp/GANSSRefTimeInfo.h | 27 +- .../libs/supl/asn-rrlp/GANSSReferenceTime.h | 27 +- .../supl/asn-rrlp/GANSSSatelliteElement.h | 31 +- src/core/libs/supl/asn-rrlp/GANSSSignalID.h | 29 +- .../asn-rrlp/GANSSTOD-GSMTimeAssociation.h | 31 +- src/core/libs/supl/asn-rrlp/GANSSTOD.h | 29 +- .../libs/supl/asn-rrlp/GANSSTODUncertainty.h | 29 +- src/core/libs/supl/asn-rrlp/GANSSTODm.h | 29 +- .../supl/asn-rrlp/GANSSTimeModelElement.h | 31 +- src/core/libs/supl/asn-rrlp/GANSSUTCModel.h | 35 +- src/core/libs/supl/asn-rrlp/GPS-AssistData.h | 21 +- src/core/libs/supl/asn-rrlp/GPS-MeasureInfo.h | 21 +- src/core/libs/supl/asn-rrlp/GPS-MsrElement.h | 33 +- .../libs/supl/asn-rrlp/GPS-MsrSetElement.h | 25 +- .../libs/supl/asn-rrlp/GPSAssistanceData.h | 29 +- .../asn-rrlp/GPSReferenceTimeUncertainty.h | 29 +- src/core/libs/supl/asn-rrlp/GPSTOW23b.h | 29 +- src/core/libs/supl/asn-rrlp/GPSTOW24b.h | 29 +- src/core/libs/supl/asn-rrlp/GPSTOWAssist.h | 27 +- .../libs/supl/asn-rrlp/GPSTOWAssistElement.h | 29 +- src/core/libs/supl/asn-rrlp/GPSTime.h | 23 +- .../asn-rrlp/GPSTimeAssistanceMeasurements.h | 27 +- src/core/libs/supl/asn-rrlp/GPSWeek.h | 29 +- src/core/libs/supl/asn-rrlp/GSMTime.h | 29 +- src/core/libs/supl/asn-rrlp/INTEGER.h | 73 +- .../libs/supl/asn-rrlp/IonosphericModel.h | 35 +- src/core/libs/supl/asn-rrlp/LAC.h | 29 +- src/core/libs/supl/asn-rrlp/LocErrorReason.h | 66 +- src/core/libs/supl/asn-rrlp/LocationError.h | 29 +- src/core/libs/supl/asn-rrlp/LocationInfo.h | 27 +- .../libs/supl/asn-rrlp/MeasureResponseTime.h | 29 +- src/core/libs/supl/asn-rrlp/MethodType.h | 52 +- src/core/libs/supl/asn-rrlp/ModuloTimeSlot.h | 29 +- .../libs/supl/asn-rrlp/MoreAssDataToBeSent.h | 40 +- src/core/libs/supl/asn-rrlp/MpathIndic.h | 44 +- .../supl/asn-rrlp/MsrAssistBTS-R98-ExpOTD.h | 23 +- src/core/libs/supl/asn-rrlp/MsrAssistBTS.h | 35 +- .../supl/asn-rrlp/MsrAssistData-R98-ExpOTD.h | 21 +- src/core/libs/supl/asn-rrlp/MsrAssistData.h | 21 +- src/core/libs/supl/asn-rrlp/MsrPosition-Req.h | 51 +- src/core/libs/supl/asn-rrlp/MsrPosition-Rsp.h | 57 +- .../libs/supl/asn-rrlp/MultiFrameCarrier.h | 23 +- .../libs/supl/asn-rrlp/MultiFrameOffset.h | 29 +- src/core/libs/supl/asn-rrlp/MultipleSets.h | 25 +- src/core/libs/supl/asn-rrlp/NULL.h | 21 +- .../libs/supl/asn-rrlp/NativeEnumerated.h | 11 +- src/core/libs/supl/asn-rrlp/NativeInteger.h | 21 +- .../supl/asn-rrlp/NavModel-KeplerianSet.h | 51 +- src/core/libs/supl/asn-rrlp/NavModelElement.h | 23 +- src/core/libs/supl/asn-rrlp/NavigationModel.h | 21 +- .../libs/supl/asn-rrlp/NeighborIdentity.h | 60 +- .../libs/supl/asn-rrlp/NumOfMeasurements.h | 29 +- src/core/libs/supl/asn-rrlp/OCTET_STRING.h | 83 +- .../libs/supl/asn-rrlp/OTD-FirstSetMsrs.h | 29 +- .../supl/asn-rrlp/OTD-MeasureInfo-5-Ext.h | 29 +- .../supl/asn-rrlp/OTD-MeasureInfo-R98-Ext.h | 21 +- src/core/libs/supl/asn-rrlp/OTD-MeasureInfo.h | 27 +- src/core/libs/supl/asn-rrlp/OTD-Measurement.h | 25 +- .../supl/asn-rrlp/OTD-MeasurementWithID.h | 27 +- .../asn-rrlp/OTD-MsrElementFirst-R98-Ext.h | 25 +- .../libs/supl/asn-rrlp/OTD-MsrElementFirst.h | 37 +- .../libs/supl/asn-rrlp/OTD-MsrElementRest.h | 37 +- .../libs/supl/asn-rrlp/OTD-MsrsOfOtherSets.h | 44 +- src/core/libs/supl/asn-rrlp/OTDValue.h | 29 +- src/core/libs/supl/asn-rrlp/PDU.h | 23 +- src/core/libs/supl/asn-rrlp/PositionData.h | 42 +- .../libs/supl/asn-rrlp/PositionInstruct.h | 29 +- src/core/libs/supl/asn-rrlp/PositionMethod.h | 42 +- src/core/libs/supl/asn-rrlp/ProtocolError.h | 31 +- src/core/libs/supl/asn-rrlp/RRLP-Component.h | 62 +- src/core/libs/supl/asn-rrlp/RefLocation.h | 21 +- src/core/libs/supl/asn-rrlp/RefQuality.h | 29 +- .../libs/supl/asn-rrlp/ReferenceAssistData.h | 27 +- src/core/libs/supl/asn-rrlp/ReferenceFrame.h | 23 +- .../libs/supl/asn-rrlp/ReferenceIdentity.h | 21 +- .../supl/asn-rrlp/ReferenceIdentityType.h | 56 +- .../libs/supl/asn-rrlp/ReferenceRelation.h | 42 +- src/core/libs/supl/asn-rrlp/ReferenceTime.h | 31 +- src/core/libs/supl/asn-rrlp/ReferenceWGS84.h | 25 +- .../Rel-5-MsrPosition-Rsp-Extension.h | 33 +- .../asn-rrlp/Rel-5-ProtocolError-Extension.h | 27 +- .../Rel-7-MsrPosition-Rsp-Extension.h | 33 +- .../Rel-98-MsrPosition-Rsp-Extension.h | 39 +- .../asn-rrlp/Rel5-AssistanceData-Extension.h | 23 +- .../asn-rrlp/Rel5-MsrPosition-Req-Extension.h | 23 +- .../asn-rrlp/Rel7-AssistanceData-Extension.h | 31 +- .../asn-rrlp/Rel7-MsrPosition-Req-Extension.h | 37 +- .../asn-rrlp/Rel98-AssistanceData-Extension.h | 31 +- .../libs/supl/asn-rrlp/Rel98-Ext-ExpOTD.h | 29 +- .../Rel98-MsrPosition-Req-Extension.h | 31 +- src/core/libs/supl/asn-rrlp/RelDistance.h | 29 +- src/core/libs/supl/asn-rrlp/RelativeAlt.h | 29 +- src/core/libs/supl/asn-rrlp/RequestIndex.h | 29 +- .../libs/supl/asn-rrlp/RequiredResponseTime.h | 29 +- src/core/libs/supl/asn-rrlp/RoughRTD.h | 29 +- src/core/libs/supl/asn-rrlp/SVID.h | 29 +- src/core/libs/supl/asn-rrlp/SVIDMASK.h | 29 +- src/core/libs/supl/asn-rrlp/SatElement.h | 37 +- src/core/libs/supl/asn-rrlp/SatStatus.h | 54 +- src/core/libs/supl/asn-rrlp/SatelliteID.h | 29 +- .../supl/asn-rrlp/SeqOf-BadSatelliteSet.h | 23 +- .../libs/supl/asn-rrlp/SeqOf-GANSSDataBits.h | 23 +- .../libs/supl/asn-rrlp/SeqOfAcquisElement.h | 27 +- .../libs/supl/asn-rrlp/SeqOfAlmanacElement.h | 27 +- .../supl/asn-rrlp/SeqOfBadSignalElement.h | 27 +- .../supl/asn-rrlp/SeqOfDGANSSSgnElement.h | 27 +- .../supl/asn-rrlp/SeqOfGANSS-MsrSetElement.h | 27 +- .../supl/asn-rrlp/SeqOfGANSS-SgnElement.h | 27 +- .../supl/asn-rrlp/SeqOfGANSS-SgnTypeElement.h | 27 +- .../supl/asn-rrlp/SeqOfGANSSAlmanacElement.h | 27 +- .../SeqOfGANSSGenericAssistDataElement.h | 27 +- .../SeqOfGANSSRefMeasurementElement.h | 27 +- .../asn-rrlp/SeqOfGANSSSatelliteElement.h | 27 +- .../libs/supl/asn-rrlp/SeqOfGANSSTimeModel.h | 27 +- .../libs/supl/asn-rrlp/SeqOfGPS-MsrElement.h | 27 +- .../supl/asn-rrlp/SeqOfGPS-MsrSetElement.h | 27 +- .../asn-rrlp/SeqOfMsrAssistBTS-R98-ExpOTD.h | 27 +- .../libs/supl/asn-rrlp/SeqOfMsrAssistBTS.h | 27 +- .../libs/supl/asn-rrlp/SeqOfNavModelElement.h | 27 +- .../asn-rrlp/SeqOfOTD-FirstSetMsrs-R98-Ext.h | 27 +- .../supl/asn-rrlp/SeqOfOTD-FirstSetMsrs.h | 27 +- .../supl/asn-rrlp/SeqOfOTD-MsrElementRest.h | 27 +- .../supl/asn-rrlp/SeqOfOTD-MsrsOfOtherSets.h | 27 +- .../asn-rrlp/SeqOfReferenceIdentityType.h | 27 +- src/core/libs/supl/asn-rrlp/SeqOfSatElement.h | 27 +- .../libs/supl/asn-rrlp/SeqOfSgnTypeElement.h | 27 +- .../asn-rrlp/SeqOfStandardClockModelElement.h | 27 +- .../SeqOfSystemInfoAssistBTS-R98-ExpOTD.h | 27 +- .../supl/asn-rrlp/SeqOfSystemInfoAssistBTS.h | 27 +- src/core/libs/supl/asn-rrlp/SgnTypeElement.h | 25 +- .../supl/asn-rrlp/StandardClockModelElement.h | 33 +- src/core/libs/supl/asn-rrlp/StdResolution.h | 29 +- .../asn-rrlp/SystemInfoAssistBTS-R98-ExpOTD.h | 44 +- .../libs/supl/asn-rrlp/SystemInfoAssistBTS.h | 44 +- .../SystemInfoAssistData-R98-ExpOTD.h | 21 +- .../libs/supl/asn-rrlp/SystemInfoAssistData.h | 21 +- src/core/libs/supl/asn-rrlp/SystemInfoIndex.h | 29 +- src/core/libs/supl/asn-rrlp/TA0.h | 29 +- src/core/libs/supl/asn-rrlp/TA1.h | 29 +- src/core/libs/supl/asn-rrlp/TA2.h | 29 +- src/core/libs/supl/asn-rrlp/TLMReservedBits.h | 29 +- src/core/libs/supl/asn-rrlp/TLMWord.h | 29 +- .../supl/asn-rrlp/TOA-MeasurementsOfRef.h | 23 +- src/core/libs/supl/asn-rrlp/TimeRelation.h | 27 +- src/core/libs/supl/asn-rrlp/TimeSlot.h | 29 +- src/core/libs/supl/asn-rrlp/TimeSlotScheme.h | 40 +- src/core/libs/supl/asn-rrlp/UTCModel.h | 35 +- src/core/libs/supl/asn-rrlp/UlPseudoSegInd.h | 40 +- .../supl/asn-rrlp/UncompressedEphemeris.h | 81 +- src/core/libs/supl/asn-rrlp/UseMultipleSets.h | 40 +- .../libs/supl/asn-rrlp/VelocityEstimate.h | 29 +- src/core/libs/supl/asn-rrlp/asn_SEQUENCE_OF.h | 13 +- src/core/libs/supl/asn-rrlp/asn_SET_OF.h | 21 +- src/core/libs/supl/asn-rrlp/asn_application.h | 19 +- src/core/libs/supl/asn-rrlp/asn_codecs.h | 63 +- src/core/libs/supl/asn-rrlp/asn_codecs_prim.h | 55 +- src/core/libs/supl/asn-rrlp/asn_internal.h | 55 +- src/core/libs/supl/asn-rrlp/ber_decoder.h | 57 +- src/core/libs/supl/asn-rrlp/ber_tlv_length.h | 23 +- src/core/libs/supl/asn-rrlp/ber_tlv_tag.h | 35 +- src/core/libs/supl/asn-rrlp/constr_CHOICE.h | 55 +- src/core/libs/supl/asn-rrlp/constr_SEQUENCE.h | 55 +- .../libs/supl/asn-rrlp/constr_SEQUENCE_OF.h | 9 +- src/core/libs/supl/asn-rrlp/constr_SET_OF.h | 39 +- src/core/libs/supl/asn-rrlp/constr_TYPE.h | 183 +- src/core/libs/supl/asn-rrlp/constraints.h | 37 +- src/core/libs/supl/asn-rrlp/der_encoder.h | 69 +- src/core/libs/supl/asn-rrlp/per_decoder.h | 49 +- src/core/libs/supl/asn-rrlp/per_encoder.h | 57 +- src/core/libs/supl/asn-rrlp/per_opentype.h | 9 +- src/core/libs/supl/asn-rrlp/per_support.h | 155 +- src/core/libs/supl/asn-rrlp/xer_decoder.h | 103 +- src/core/libs/supl/asn-rrlp/xer_encoder.h | 55 +- src/core/libs/supl/asn-rrlp/xer_support.h | 34 +- src/core/libs/supl/asn-supl/AltitudeInfo.h | 40 +- src/core/libs/supl/asn-supl/BIT_STRING.h | 25 +- src/core/libs/supl/asn-supl/BOOLEAN.h | 25 +- src/core/libs/supl/asn-supl/CPICH-Ec-N0.h | 29 +- src/core/libs/supl/asn-supl/CPICH-RSCP.h | 29 +- .../libs/supl/asn-supl/CdmaCellInformation.h | 37 +- src/core/libs/supl/asn-supl/CellInfo.h | 54 +- .../libs/supl/asn-supl/CellMeasuredResults.h | 90 +- .../supl/asn-supl/CellMeasuredResultsList.h | 27 +- .../libs/supl/asn-supl/CellParametersID.h | 29 +- src/core/libs/supl/asn-supl/DUMMY.h | 29 +- src/core/libs/supl/asn-supl/ENUMERATED.h | 11 +- src/core/libs/supl/asn-supl/EncodingType.h | 44 +- src/core/libs/supl/asn-supl/FQDN.h | 29 +- src/core/libs/supl/asn-supl/FormatIndicator.h | 54 +- src/core/libs/supl/asn-supl/FrequencyInfo.h | 60 +- .../libs/supl/asn-supl/FrequencyInfoFDD.h | 25 +- .../libs/supl/asn-supl/FrequencyInfoTDD.h | 23 +- src/core/libs/supl/asn-supl/GeneralizedTime.h | 51 +- .../libs/supl/asn-supl/GsmCellInformation.h | 37 +- src/core/libs/supl/asn-supl/Horandveruncert.h | 33 +- src/core/libs/supl/asn-supl/Horandvervel.h | 29 +- src/core/libs/supl/asn-supl/Horvel.h | 25 +- src/core/libs/supl/asn-supl/Horveluncert.h | 27 +- src/core/libs/supl/asn-supl/IA5String.h | 11 +- src/core/libs/supl/asn-supl/INTEGER.h | 73 +- src/core/libs/supl/asn-supl/IPAddress.h | 44 +- src/core/libs/supl/asn-supl/KeyIdentity.h | 29 +- src/core/libs/supl/asn-supl/KeyIdentity4.h | 29 +- src/core/libs/supl/asn-supl/LocationId.h | 25 +- src/core/libs/supl/asn-supl/MAC.h | 29 +- src/core/libs/supl/asn-supl/MeasuredResults.h | 31 +- .../libs/supl/asn-supl/MeasuredResultsList.h | 27 +- src/core/libs/supl/asn-supl/NMR.h | 27 +- src/core/libs/supl/asn-supl/NMRelement.h | 27 +- .../libs/supl/asn-supl/NativeEnumerated.h | 11 +- src/core/libs/supl/asn-supl/NativeInteger.h | 21 +- src/core/libs/supl/asn-supl/Notification.h | 33 +- .../libs/supl/asn-supl/NotificationType.h | 48 +- src/core/libs/supl/asn-supl/OCTET_STRING.h | 83 +- src/core/libs/supl/asn-supl/Pathloss.h | 29 +- src/core/libs/supl/asn-supl/PosMethod.h | 58 +- src/core/libs/supl/asn-supl/PosPayLoad.h | 54 +- src/core/libs/supl/asn-supl/PosProtocol.h | 27 +- src/core/libs/supl/asn-supl/PosTechnology.h | 35 +- src/core/libs/supl/asn-supl/Position.h | 31 +- .../libs/supl/asn-supl/PositionEstimate.h | 66 +- src/core/libs/supl/asn-supl/PrefMethod.h | 42 +- .../libs/supl/asn-supl/PrimaryCCPCH-RSCP.h | 29 +- .../libs/supl/asn-supl/PrimaryCPICH-Info.h | 21 +- src/core/libs/supl/asn-supl/QoP.h | 29 +- .../libs/supl/asn-supl/RequestedAssistData.h | 45 +- src/core/libs/supl/asn-supl/SETAuthKey.h | 50 +- src/core/libs/supl/asn-supl/SETCapabilities.h | 27 +- src/core/libs/supl/asn-supl/SETId.h | 66 +- src/core/libs/supl/asn-supl/SLPAddress.h | 50 +- src/core/libs/supl/asn-supl/SLPMode.h | 40 +- src/core/libs/supl/asn-supl/SUPLEND.h | 31 +- src/core/libs/supl/asn-supl/SUPLINIT.h | 43 +- src/core/libs/supl/asn-supl/SUPLPOS.h | 29 +- src/core/libs/supl/asn-supl/SUPLPOSINIT.h | 41 +- src/core/libs/supl/asn-supl/SUPLRESPONSE.h | 35 +- src/core/libs/supl/asn-supl/SUPLSTART.h | 31 +- src/core/libs/supl/asn-supl/SatelliteInfo.h | 27 +- .../libs/supl/asn-supl/SatelliteInfoElement.h | 25 +- src/core/libs/supl/asn-supl/SessionID.h | 29 +- src/core/libs/supl/asn-supl/SetSessionID.h | 23 +- src/core/libs/supl/asn-supl/SlpSessionID.h | 23 +- src/core/libs/supl/asn-supl/Status.h | 44 +- src/core/libs/supl/asn-supl/StatusCode.h | 78 +- src/core/libs/supl/asn-supl/TGSN.h | 29 +- .../libs/supl/asn-supl/TimeslotISCP-List.h | 23 +- src/core/libs/supl/asn-supl/TimeslotISCP.h | 29 +- src/core/libs/supl/asn-supl/UARFCN.h | 29 +- src/core/libs/supl/asn-supl/ULP-PDU.h | 27 +- src/core/libs/supl/asn-supl/UTCTime.h | 25 +- .../libs/supl/asn-supl/UTRA-CarrierRSSI.h | 29 +- src/core/libs/supl/asn-supl/UlpMessage.h | 74 +- src/core/libs/supl/asn-supl/Velocity.h | 58 +- src/core/libs/supl/asn-supl/Ver.h | 29 +- src/core/libs/supl/asn-supl/Version.h | 25 +- src/core/libs/supl/asn-supl/VisibleString.h | 9 +- .../libs/supl/asn-supl/WcdmaCellInformation.h | 39 +- .../libs/supl/asn-supl/XNavigationModel.h | 35 +- src/core/libs/supl/asn-supl/asn_SEQUENCE_OF.h | 13 +- src/core/libs/supl/asn-supl/asn_SET_OF.h | 21 +- src/core/libs/supl/asn-supl/asn_application.h | 19 +- src/core/libs/supl/asn-supl/asn_codecs.h | 63 +- src/core/libs/supl/asn-supl/asn_codecs_prim.h | 55 +- src/core/libs/supl/asn-supl/asn_internal.h | 55 +- src/core/libs/supl/asn-supl/ber_decoder.h | 57 +- src/core/libs/supl/asn-supl/ber_tlv_length.h | 23 +- src/core/libs/supl/asn-supl/ber_tlv_tag.h | 35 +- src/core/libs/supl/asn-supl/constr_CHOICE.h | 55 +- src/core/libs/supl/asn-supl/constr_SEQUENCE.h | 55 +- .../libs/supl/asn-supl/constr_SEQUENCE_OF.h | 9 +- src/core/libs/supl/asn-supl/constr_SET_OF.h | 39 +- src/core/libs/supl/asn-supl/constr_TYPE.h | 183 +- src/core/libs/supl/asn-supl/constraints.h | 37 +- src/core/libs/supl/asn-supl/der_encoder.h | 69 +- src/core/libs/supl/asn-supl/per_decoder.h | 49 +- src/core/libs/supl/asn-supl/per_encoder.h | 57 +- src/core/libs/supl/asn-supl/per_opentype.h | 9 +- src/core/libs/supl/asn-supl/per_support.h | 155 +- src/core/libs/supl/asn-supl/xer_decoder.h | 103 +- src/core/libs/supl/asn-supl/xer_encoder.h | 55 +- src/core/libs/supl/asn-supl/xer_support.h | 34 +- src/core/system_parameters/rtcm.cc | 49 +- src/tests/common-files/gnuplot_i.h | 44 +- .../gps_l1_ca_pcps_acquisition_test.cc | 1 - .../observables/hybrid_observables_test.cc | 1 - .../gpstk/gnsspvt/src/kml_printer_gpstk.h | 3 +- 383 files changed, 8704 insertions(+), 8229 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc index cec527a72..c1c6c21dc 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc @@ -54,9 +54,10 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc( unsigned int sampled_ms, unsigned int max_dwells, unsigned int doppler_max, long freq, long fs_in, int samples_per_ms, int samples_per_code, - bool dump, std::string dump_filename) : gr::block("galileo_pcps_8ms_acquisition_cc", - gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), - gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) + bool dump, + std::string dump_filename) : gr::block("galileo_pcps_8ms_acquisition_cc", + gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), + gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) { this->message_port_register_out(pmt::mp("events")); d_sample_counter = 0; // SAMPLE COUNTER diff --git a/src/algorithms/acquisition/gnuradio_blocks/gps_pcps_acquisition_fpga_sc.cc b/src/algorithms/acquisition/gnuradio_blocks/gps_pcps_acquisition_fpga_sc.cc index 117532a90..d0f2baaf1 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/gps_pcps_acquisition_fpga_sc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/gps_pcps_acquisition_fpga_sc.cc @@ -71,9 +71,7 @@ gps_pcps_acquisition_fpga_sc::gps_pcps_acquisition_fpga_sc( int samples_per_code, int vector_length, unsigned int nsamples_total, bool bit_transition_flag, bool use_CFAR_algorithm_flag, unsigned int select_queue_Fpga, std::string device_name, bool dump, - std::string dump_filename) : - - gr::block("pcps_acquisition_fpga_sc", + std::string dump_filename) : gr::block("pcps_acquisition_fpga_sc", gr::io_signature::make(0, 0, sizeof(lv_16sc_t)), gr::io_signature::make(0, 0, 0)) { diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index 3ba6006be..11c0754cd 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -65,9 +65,10 @@ pcps_acquisition::pcps_acquisition( int samples_per_ms, int samples_per_code, bool bit_transition_flag, bool use_CFAR_algorithm_flag, bool dump, bool blocking, - std::string dump_filename, size_t it_size) : gr::block("pcps_acquisition", - gr::io_signature::make(1, 1, it_size * sampled_ms * samples_per_ms * (bit_transition_flag ? 2 : 1)), - gr::io_signature::make(0, 0, it_size * sampled_ms * samples_per_ms * (bit_transition_flag ? 2 : 1))) + std::string dump_filename, + size_t it_size) : gr::block("pcps_acquisition", + gr::io_signature::make(1, 1, it_size * sampled_ms * samples_per_ms * (bit_transition_flag ? 2 : 1)), + gr::io_signature::make(0, 0, it_size * sampled_ms * samples_per_ms * (bit_transition_flag ? 2 : 1))) { this->message_port_register_out(pmt::mp("events")); diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc index 147d56a96..9fb67a398 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc @@ -61,9 +61,10 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc( unsigned int sampled_ms, unsigned int max_dwells, unsigned int doppler_max, long freq, long fs_in, int samples_per_ms, int samples_per_code, - bool dump, std::string dump_filename) : gr::block("pcps_cccwsr_acquisition_cc", - gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), - gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) + bool dump, + std::string dump_filename) : gr::block("pcps_cccwsr_acquisition_cc", + gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), + gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) { this->message_port_register_out(pmt::mp("events")); d_sample_counter = 0; // SAMPLE COUNTER diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc index 910ef751e..80e823156 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc @@ -67,9 +67,10 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc( unsigned int doppler_max, long freq, long fs_in, int samples_per_ms, int samples_per_code, bool bit_transition_flag, - bool dump, std::string dump_filename) : gr::block("pcps_quicksync_acquisition_cc", - gr::io_signature::make(1, 1, (sizeof(gr_complex) * sampled_ms * samples_per_ms)), - gr::io_signature::make(0, 0, (sizeof(gr_complex) * sampled_ms * samples_per_ms))) + bool dump, + std::string dump_filename) : gr::block("pcps_quicksync_acquisition_cc", + gr::io_signature::make(1, 1, (sizeof(gr_complex) * sampled_ms * samples_per_ms)), + gr::io_signature::make(0, 0, (sizeof(gr_complex) * sampled_ms * samples_per_ms))) { this->message_port_register_out(pmt::mp("events")); d_sample_counter = 0; // SAMPLE COUNTER diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc index ba7f898ff..26d3b67f2 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc @@ -76,9 +76,10 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc( long freq, long fs_in, int samples_per_ms, int samples_per_code, unsigned int tong_init_val, unsigned int tong_max_val, unsigned int tong_max_dwells, - bool dump, std::string dump_filename) : gr::block("pcps_tong_acquisition_cc", - gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), - gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) + bool dump, + std::string dump_filename) : gr::block("pcps_tong_acquisition_cc", + gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), + gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) { this->message_port_register_out(pmt::mp("events")); d_sample_counter = 0; // SAMPLE COUNTER diff --git a/src/algorithms/libs/opencl/clFFT.h b/src/algorithms/libs/opencl/clFFT.h index d1e3a8fc4..9f9c8c1d3 100644 --- a/src/algorithms/libs/opencl/clFFT.h +++ b/src/algorithms/libs/opencl/clFFT.h @@ -50,85 +50,86 @@ #define __CLFFT_H #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif #include #ifdef __APPLE__ - #include +#include #else - #include +#include #endif -// XForm type -typedef enum -{ - clFFT_Forward = -1, - clFFT_Inverse = 1 - -}clFFT_Direction; + // XForm type + typedef enum + { + clFFT_Forward = -1, + clFFT_Inverse = 1 -// XForm dimension -typedef enum -{ - clFFT_1D = 0, - clFFT_2D = 1, - clFFT_3D = 3 - -}clFFT_Dimension; + } clFFT_Direction; -// XForm Data type -typedef enum -{ - clFFT_SplitComplexFormat = 0, - clFFT_InterleavedComplexFormat = 1 -}clFFT_DataFormat; + // XForm dimension + typedef enum + { + clFFT_1D = 0, + clFFT_2D = 1, + clFFT_3D = 3 -typedef struct -{ - unsigned int x; - unsigned int y; - unsigned int z; -}clFFT_Dim3; - -typedef struct -{ - float *real; - float *imag; -} clFFT_SplitComplex; + } clFFT_Dimension; -typedef struct -{ - float real; - float imag; -}clFFT_Complex; + // XForm Data type + typedef enum + { + clFFT_SplitComplexFormat = 0, + clFFT_InterleavedComplexFormat = 1 + } clFFT_DataFormat; -typedef void* clFFT_Plan; + typedef struct + { + unsigned int x; + unsigned int y; + unsigned int z; + } clFFT_Dim3; -clFFT_Plan clFFT_CreatePlan( cl_context context, clFFT_Dim3 n, clFFT_Dimension dim, clFFT_DataFormat dataFormat, cl_int *error_code ); + typedef struct + { + float *real; + float *imag; + } clFFT_SplitComplex; -void clFFT_DestroyPlan( clFFT_Plan plan ); + typedef struct + { + float real; + float imag; + } clFFT_Complex; -cl_int clFFT_ExecuteInterleaved( cl_command_queue queue, clFFT_Plan plan, cl_int batchSize, clFFT_Direction dir, - cl_mem data_in, cl_mem data_out, - cl_int num_events, cl_event *event_list, cl_event *event ); + typedef void *clFFT_Plan; -cl_int clFFT_ExecutePlannar( cl_command_queue queue, clFFT_Plan plan, cl_int batchSize, clFFT_Direction dir, - cl_mem data_in_real, cl_mem data_in_imag, cl_mem data_out_real, cl_mem data_out_imag, - cl_int num_events, cl_event *event_list, cl_event *event ); + clFFT_Plan clFFT_CreatePlan(cl_context context, clFFT_Dim3 n, clFFT_Dimension dim, clFFT_DataFormat dataFormat, cl_int *error_code); -cl_int clFFT_1DTwistInterleaved(clFFT_Plan Plan, cl_command_queue queue, cl_mem array, - size_t numRows, size_t numCols, size_t startRow, size_t rowsToProcess, clFFT_Direction dir); - + void clFFT_DestroyPlan(clFFT_Plan plan); -cl_int clFFT_1DTwistPlannar(clFFT_Plan Plan, cl_command_queue queue, cl_mem array_real, cl_mem array_imag, - size_t numRows, size_t numCols, size_t startRow, size_t rowsToProcess, clFFT_Direction dir); - -void clFFT_DumpPlan( clFFT_Plan plan, FILE *file); + cl_int clFFT_ExecuteInterleaved(cl_command_queue queue, clFFT_Plan plan, cl_int batchSize, clFFT_Direction dir, + cl_mem data_in, cl_mem data_out, + cl_int num_events, cl_event *event_list, cl_event *event); + + cl_int clFFT_ExecutePlannar(cl_command_queue queue, clFFT_Plan plan, cl_int batchSize, clFFT_Direction dir, + cl_mem data_in_real, cl_mem data_in_imag, cl_mem data_out_real, cl_mem data_out_imag, + cl_int num_events, cl_event *event_list, cl_event *event); + + cl_int clFFT_1DTwistInterleaved(clFFT_Plan Plan, cl_command_queue queue, cl_mem array, + size_t numRows, size_t numCols, size_t startRow, size_t rowsToProcess, clFFT_Direction dir); + + + cl_int clFFT_1DTwistPlannar(clFFT_Plan Plan, cl_command_queue queue, cl_mem array_real, cl_mem array_imag, + size_t numRows, size_t numCols, size_t startRow, size_t rowsToProcess, clFFT_Direction dir); + + void clFFT_DumpPlan(clFFT_Plan plan, FILE *file); #ifdef __cplusplus } #endif -#endif +#endif diff --git a/src/algorithms/libs/opencl/fft_base_kernels.h b/src/algorithms/libs/opencl/fft_base_kernels.h index 101795697..42c7d5816 100644 --- a/src/algorithms/libs/opencl/fft_base_kernels.h +++ b/src/algorithms/libs/opencl/fft_base_kernels.h @@ -54,224 +54,220 @@ using namespace std; static string baseKernels = string( - "#ifndef M_PI\n" - "#define M_PI 0x1.921fb54442d18p+1\n" - "#endif\n" - "#define complexMul(a,b) ((float2)(mad(-(a).y, (b).y, (a).x * (b).x), mad((a).y, (b).x, (a).x * (b).y)))\n" - "#define conj(a) ((float2)((a).x, -(a).y))\n" - "#define conjTransp(a) ((float2)(-(a).y, (a).x))\n" - "\n" - "#define fftKernel2(a,dir) \\\n" - "{ \\\n" - " float2 c = (a)[0]; \\\n" - " (a)[0] = c + (a)[1]; \\\n" - " (a)[1] = c - (a)[1]; \\\n" - "}\n" - "\n" - "#define fftKernel2S(d1,d2,dir) \\\n" - "{ \\\n" - " float2 c = (d1); \\\n" - " (d1) = c + (d2); \\\n" - " (d2) = c - (d2); \\\n" - "}\n" - "\n" - "#define fftKernel4(a,dir) \\\n" - "{ \\\n" - " fftKernel2S((a)[0], (a)[2], dir); \\\n" - " fftKernel2S((a)[1], (a)[3], dir); \\\n" - " fftKernel2S((a)[0], (a)[1], dir); \\\n" - " (a)[3] = (float2)(dir)*(conjTransp((a)[3])); \\\n" - " fftKernel2S((a)[2], (a)[3], dir); \\\n" - " float2 c = (a)[1]; \\\n" - " (a)[1] = (a)[2]; \\\n" - " (a)[2] = c; \\\n" - "}\n" - "\n" - "#define fftKernel4s(a0,a1,a2,a3,dir) \\\n" - "{ \\\n" - " fftKernel2S((a0), (a2), dir); \\\n" - " fftKernel2S((a1), (a3), dir); \\\n" - " fftKernel2S((a0), (a1), dir); \\\n" - " (a3) = (float2)(dir)*(conjTransp((a3))); \\\n" - " fftKernel2S((a2), (a3), dir); \\\n" - " float2 c = (a1); \\\n" - " (a1) = (a2); \\\n" - " (a2) = c; \\\n" - "}\n" - "\n" - "#define bitreverse8(a) \\\n" - "{ \\\n" - " float2 c; \\\n" - " c = (a)[1]; \\\n" - " (a)[1] = (a)[4]; \\\n" - " (a)[4] = c; \\\n" - " c = (a)[3]; \\\n" - " (a)[3] = (a)[6]; \\\n" - " (a)[6] = c; \\\n" - "}\n" - "\n" - "#define fftKernel8(a,dir) \\\n" - "{ \\\n" - " const float2 w1 = (float2)(0x1.6a09e6p-1f, dir*0x1.6a09e6p-1f); \\\n" - " const float2 w3 = (float2)(-0x1.6a09e6p-1f, dir*0x1.6a09e6p-1f); \\\n" - " float2 c; \\\n" - " fftKernel2S((a)[0], (a)[4], dir); \\\n" - " fftKernel2S((a)[1], (a)[5], dir); \\\n" - " fftKernel2S((a)[2], (a)[6], dir); \\\n" - " fftKernel2S((a)[3], (a)[7], dir); \\\n" - " (a)[5] = complexMul(w1, (a)[5]); \\\n" - " (a)[6] = (float2)(dir)*(conjTransp((a)[6])); \\\n" - " (a)[7] = complexMul(w3, (a)[7]); \\\n" - " fftKernel2S((a)[0], (a)[2], dir); \\\n" - " fftKernel2S((a)[1], (a)[3], dir); \\\n" - " fftKernel2S((a)[4], (a)[6], dir); \\\n" - " fftKernel2S((a)[5], (a)[7], dir); \\\n" - " (a)[3] = (float2)(dir)*(conjTransp((a)[3])); \\\n" - " (a)[7] = (float2)(dir)*(conjTransp((a)[7])); \\\n" - " fftKernel2S((a)[0], (a)[1], dir); \\\n" - " fftKernel2S((a)[2], (a)[3], dir); \\\n" - " fftKernel2S((a)[4], (a)[5], dir); \\\n" - " fftKernel2S((a)[6], (a)[7], dir); \\\n" - " bitreverse8((a)); \\\n" - "}\n" - "\n" - "#define bitreverse4x4(a) \\\n" - "{ \\\n" - " float2 c; \\\n" - " c = (a)[1]; (a)[1] = (a)[4]; (a)[4] = c; \\\n" - " c = (a)[2]; (a)[2] = (a)[8]; (a)[8] = c; \\\n" - " c = (a)[3]; (a)[3] = (a)[12]; (a)[12] = c; \\\n" - " c = (a)[6]; (a)[6] = (a)[9]; (a)[9] = c; \\\n" - " c = (a)[7]; (a)[7] = (a)[13]; (a)[13] = c; \\\n" - " c = (a)[11]; (a)[11] = (a)[14]; (a)[14] = c; \\\n" - "}\n" - "\n" - "#define fftKernel16(a,dir) \\\n" - "{ \\\n" - " const float w0 = 0x1.d906bcp-1f; \\\n" - " const float w1 = 0x1.87de2ap-2f; \\\n" - " const float w2 = 0x1.6a09e6p-1f; \\\n" - " fftKernel4s((a)[0], (a)[4], (a)[8], (a)[12], dir); \\\n" - " fftKernel4s((a)[1], (a)[5], (a)[9], (a)[13], dir); \\\n" - " fftKernel4s((a)[2], (a)[6], (a)[10], (a)[14], dir); \\\n" - " fftKernel4s((a)[3], (a)[7], (a)[11], (a)[15], dir); \\\n" - " (a)[5] = complexMul((a)[5], (float2)(w0, dir*w1)); \\\n" - " (a)[6] = complexMul((a)[6], (float2)(w2, dir*w2)); \\\n" - " (a)[7] = complexMul((a)[7], (float2)(w1, dir*w0)); \\\n" - " (a)[9] = complexMul((a)[9], (float2)(w2, dir*w2)); \\\n" - " (a)[10] = (float2)(dir)*(conjTransp((a)[10])); \\\n" - " (a)[11] = complexMul((a)[11], (float2)(-w2, dir*w2)); \\\n" - " (a)[13] = complexMul((a)[13], (float2)(w1, dir*w0)); \\\n" - " (a)[14] = complexMul((a)[14], (float2)(-w2, dir*w2)); \\\n" - " (a)[15] = complexMul((a)[15], (float2)(-w0, dir*-w1)); \\\n" - " fftKernel4((a), dir); \\\n" - " fftKernel4((a) + 4, dir); \\\n" - " fftKernel4((a) + 8, dir); \\\n" - " fftKernel4((a) + 12, dir); \\\n" - " bitreverse4x4((a)); \\\n" - "}\n" - "\n" - "#define bitreverse32(a) \\\n" - "{ \\\n" - " float2 c1, c2; \\\n" - " c1 = (a)[2]; (a)[2] = (a)[1]; c2 = (a)[4]; (a)[4] = c1; c1 = (a)[8]; (a)[8] = c2; c2 = (a)[16]; (a)[16] = c1; (a)[1] = c2; \\\n" - " c1 = (a)[6]; (a)[6] = (a)[3]; c2 = (a)[12]; (a)[12] = c1; c1 = (a)[24]; (a)[24] = c2; c2 = (a)[17]; (a)[17] = c1; (a)[3] = c2; \\\n" - " c1 = (a)[10]; (a)[10] = (a)[5]; c2 = (a)[20]; (a)[20] = c1; c1 = (a)[9]; (a)[9] = c2; c2 = (a)[18]; (a)[18] = c1; (a)[5] = c2; \\\n" - " c1 = (a)[14]; (a)[14] = (a)[7]; c2 = (a)[28]; (a)[28] = c1; c1 = (a)[25]; (a)[25] = c2; c2 = (a)[19]; (a)[19] = c1; (a)[7] = c2; \\\n" - " c1 = (a)[22]; (a)[22] = (a)[11]; c2 = (a)[13]; (a)[13] = c1; c1 = (a)[26]; (a)[26] = c2; c2 = (a)[21]; (a)[21] = c1; (a)[11] = c2; \\\n" - " c1 = (a)[30]; (a)[30] = (a)[15]; c2 = (a)[29]; (a)[29] = c1; c1 = (a)[27]; (a)[27] = c2; c2 = (a)[23]; (a)[23] = c1; (a)[15] = c2; \\\n" - "}\n" - "\n" - "#define fftKernel32(a,dir) \\\n" - "{ \\\n" - " fftKernel2S((a)[0], (a)[16], dir); \\\n" - " fftKernel2S((a)[1], (a)[17], dir); \\\n" - " fftKernel2S((a)[2], (a)[18], dir); \\\n" - " fftKernel2S((a)[3], (a)[19], dir); \\\n" - " fftKernel2S((a)[4], (a)[20], dir); \\\n" - " fftKernel2S((a)[5], (a)[21], dir); \\\n" - " fftKernel2S((a)[6], (a)[22], dir); \\\n" - " fftKernel2S((a)[7], (a)[23], dir); \\\n" - " fftKernel2S((a)[8], (a)[24], dir); \\\n" - " fftKernel2S((a)[9], (a)[25], dir); \\\n" - " fftKernel2S((a)[10], (a)[26], dir); \\\n" - " fftKernel2S((a)[11], (a)[27], dir); \\\n" - " fftKernel2S((a)[12], (a)[28], dir); \\\n" - " fftKernel2S((a)[13], (a)[29], dir); \\\n" - " fftKernel2S((a)[14], (a)[30], dir); \\\n" - " fftKernel2S((a)[15], (a)[31], dir); \\\n" - " (a)[17] = complexMul((a)[17], (float2)(0x1.f6297cp-1f, dir*0x1.8f8b84p-3f)); \\\n" - " (a)[18] = complexMul((a)[18], (float2)(0x1.d906bcp-1f, dir*0x1.87de2ap-2f)); \\\n" - " (a)[19] = complexMul((a)[19], (float2)(0x1.a9b662p-1f, dir*0x1.1c73b4p-1f)); \\\n" - " (a)[20] = complexMul((a)[20], (float2)(0x1.6a09e6p-1f, dir*0x1.6a09e6p-1f)); \\\n" - " (a)[21] = complexMul((a)[21], (float2)(0x1.1c73b4p-1f, dir*0x1.a9b662p-1f)); \\\n" - " (a)[22] = complexMul((a)[22], (float2)(0x1.87de2ap-2f, dir*0x1.d906bcp-1f)); \\\n" - " (a)[23] = complexMul((a)[23], (float2)(0x1.8f8b84p-3f, dir*0x1.f6297cp-1f)); \\\n" - " (a)[24] = complexMul((a)[24], (float2)(0x0p+0f, dir*0x1p+0f)); \\\n" - " (a)[25] = complexMul((a)[25], (float2)(-0x1.8f8b84p-3f, dir*0x1.f6297cp-1f)); \\\n" - " (a)[26] = complexMul((a)[26], (float2)(-0x1.87de2ap-2f, dir*0x1.d906bcp-1f)); \\\n" - " (a)[27] = complexMul((a)[27], (float2)(-0x1.1c73b4p-1f, dir*0x1.a9b662p-1f)); \\\n" - " (a)[28] = complexMul((a)[28], (float2)(-0x1.6a09e6p-1f, dir*0x1.6a09e6p-1f)); \\\n" - " (a)[29] = complexMul((a)[29], (float2)(-0x1.a9b662p-1f, dir*0x1.1c73b4p-1f)); \\\n" - " (a)[30] = complexMul((a)[30], (float2)(-0x1.d906bcp-1f, dir*0x1.87de2ap-2f)); \\\n" - " (a)[31] = complexMul((a)[31], (float2)(-0x1.f6297cp-1f, dir*0x1.8f8b84p-3f)); \\\n" - " fftKernel16((a), dir); \\\n" - " fftKernel16((a) + 16, dir); \\\n" - " bitreverse32((a)); \\\n" - "}\n\n" - ); + "#ifndef M_PI\n" + "#define M_PI 0x1.921fb54442d18p+1\n" + "#endif\n" + "#define complexMul(a,b) ((float2)(mad(-(a).y, (b).y, (a).x * (b).x), mad((a).y, (b).x, (a).x * (b).y)))\n" + "#define conj(a) ((float2)((a).x, -(a).y))\n" + "#define conjTransp(a) ((float2)(-(a).y, (a).x))\n" + "\n" + "#define fftKernel2(a,dir) \\\n" + "{ \\\n" + " float2 c = (a)[0]; \\\n" + " (a)[0] = c + (a)[1]; \\\n" + " (a)[1] = c - (a)[1]; \\\n" + "}\n" + "\n" + "#define fftKernel2S(d1,d2,dir) \\\n" + "{ \\\n" + " float2 c = (d1); \\\n" + " (d1) = c + (d2); \\\n" + " (d2) = c - (d2); \\\n" + "}\n" + "\n" + "#define fftKernel4(a,dir) \\\n" + "{ \\\n" + " fftKernel2S((a)[0], (a)[2], dir); \\\n" + " fftKernel2S((a)[1], (a)[3], dir); \\\n" + " fftKernel2S((a)[0], (a)[1], dir); \\\n" + " (a)[3] = (float2)(dir)*(conjTransp((a)[3])); \\\n" + " fftKernel2S((a)[2], (a)[3], dir); \\\n" + " float2 c = (a)[1]; \\\n" + " (a)[1] = (a)[2]; \\\n" + " (a)[2] = c; \\\n" + "}\n" + "\n" + "#define fftKernel4s(a0,a1,a2,a3,dir) \\\n" + "{ \\\n" + " fftKernel2S((a0), (a2), dir); \\\n" + " fftKernel2S((a1), (a3), dir); \\\n" + " fftKernel2S((a0), (a1), dir); \\\n" + " (a3) = (float2)(dir)*(conjTransp((a3))); \\\n" + " fftKernel2S((a2), (a3), dir); \\\n" + " float2 c = (a1); \\\n" + " (a1) = (a2); \\\n" + " (a2) = c; \\\n" + "}\n" + "\n" + "#define bitreverse8(a) \\\n" + "{ \\\n" + " float2 c; \\\n" + " c = (a)[1]; \\\n" + " (a)[1] = (a)[4]; \\\n" + " (a)[4] = c; \\\n" + " c = (a)[3]; \\\n" + " (a)[3] = (a)[6]; \\\n" + " (a)[6] = c; \\\n" + "}\n" + "\n" + "#define fftKernel8(a,dir) \\\n" + "{ \\\n" + " const float2 w1 = (float2)(0x1.6a09e6p-1f, dir*0x1.6a09e6p-1f); \\\n" + " const float2 w3 = (float2)(-0x1.6a09e6p-1f, dir*0x1.6a09e6p-1f); \\\n" + " float2 c; \\\n" + " fftKernel2S((a)[0], (a)[4], dir); \\\n" + " fftKernel2S((a)[1], (a)[5], dir); \\\n" + " fftKernel2S((a)[2], (a)[6], dir); \\\n" + " fftKernel2S((a)[3], (a)[7], dir); \\\n" + " (a)[5] = complexMul(w1, (a)[5]); \\\n" + " (a)[6] = (float2)(dir)*(conjTransp((a)[6])); \\\n" + " (a)[7] = complexMul(w3, (a)[7]); \\\n" + " fftKernel2S((a)[0], (a)[2], dir); \\\n" + " fftKernel2S((a)[1], (a)[3], dir); \\\n" + " fftKernel2S((a)[4], (a)[6], dir); \\\n" + " fftKernel2S((a)[5], (a)[7], dir); \\\n" + " (a)[3] = (float2)(dir)*(conjTransp((a)[3])); \\\n" + " (a)[7] = (float2)(dir)*(conjTransp((a)[7])); \\\n" + " fftKernel2S((a)[0], (a)[1], dir); \\\n" + " fftKernel2S((a)[2], (a)[3], dir); \\\n" + " fftKernel2S((a)[4], (a)[5], dir); \\\n" + " fftKernel2S((a)[6], (a)[7], dir); \\\n" + " bitreverse8((a)); \\\n" + "}\n" + "\n" + "#define bitreverse4x4(a) \\\n" + "{ \\\n" + " float2 c; \\\n" + " c = (a)[1]; (a)[1] = (a)[4]; (a)[4] = c; \\\n" + " c = (a)[2]; (a)[2] = (a)[8]; (a)[8] = c; \\\n" + " c = (a)[3]; (a)[3] = (a)[12]; (a)[12] = c; \\\n" + " c = (a)[6]; (a)[6] = (a)[9]; (a)[9] = c; \\\n" + " c = (a)[7]; (a)[7] = (a)[13]; (a)[13] = c; \\\n" + " c = (a)[11]; (a)[11] = (a)[14]; (a)[14] = c; \\\n" + "}\n" + "\n" + "#define fftKernel16(a,dir) \\\n" + "{ \\\n" + " const float w0 = 0x1.d906bcp-1f; \\\n" + " const float w1 = 0x1.87de2ap-2f; \\\n" + " const float w2 = 0x1.6a09e6p-1f; \\\n" + " fftKernel4s((a)[0], (a)[4], (a)[8], (a)[12], dir); \\\n" + " fftKernel4s((a)[1], (a)[5], (a)[9], (a)[13], dir); \\\n" + " fftKernel4s((a)[2], (a)[6], (a)[10], (a)[14], dir); \\\n" + " fftKernel4s((a)[3], (a)[7], (a)[11], (a)[15], dir); \\\n" + " (a)[5] = complexMul((a)[5], (float2)(w0, dir*w1)); \\\n" + " (a)[6] = complexMul((a)[6], (float2)(w2, dir*w2)); \\\n" + " (a)[7] = complexMul((a)[7], (float2)(w1, dir*w0)); \\\n" + " (a)[9] = complexMul((a)[9], (float2)(w2, dir*w2)); \\\n" + " (a)[10] = (float2)(dir)*(conjTransp((a)[10])); \\\n" + " (a)[11] = complexMul((a)[11], (float2)(-w2, dir*w2)); \\\n" + " (a)[13] = complexMul((a)[13], (float2)(w1, dir*w0)); \\\n" + " (a)[14] = complexMul((a)[14], (float2)(-w2, dir*w2)); \\\n" + " (a)[15] = complexMul((a)[15], (float2)(-w0, dir*-w1)); \\\n" + " fftKernel4((a), dir); \\\n" + " fftKernel4((a) + 4, dir); \\\n" + " fftKernel4((a) + 8, dir); \\\n" + " fftKernel4((a) + 12, dir); \\\n" + " bitreverse4x4((a)); \\\n" + "}\n" + "\n" + "#define bitreverse32(a) \\\n" + "{ \\\n" + " float2 c1, c2; \\\n" + " c1 = (a)[2]; (a)[2] = (a)[1]; c2 = (a)[4]; (a)[4] = c1; c1 = (a)[8]; (a)[8] = c2; c2 = (a)[16]; (a)[16] = c1; (a)[1] = c2; \\\n" + " c1 = (a)[6]; (a)[6] = (a)[3]; c2 = (a)[12]; (a)[12] = c1; c1 = (a)[24]; (a)[24] = c2; c2 = (a)[17]; (a)[17] = c1; (a)[3] = c2; \\\n" + " c1 = (a)[10]; (a)[10] = (a)[5]; c2 = (a)[20]; (a)[20] = c1; c1 = (a)[9]; (a)[9] = c2; c2 = (a)[18]; (a)[18] = c1; (a)[5] = c2; \\\n" + " c1 = (a)[14]; (a)[14] = (a)[7]; c2 = (a)[28]; (a)[28] = c1; c1 = (a)[25]; (a)[25] = c2; c2 = (a)[19]; (a)[19] = c1; (a)[7] = c2; \\\n" + " c1 = (a)[22]; (a)[22] = (a)[11]; c2 = (a)[13]; (a)[13] = c1; c1 = (a)[26]; (a)[26] = c2; c2 = (a)[21]; (a)[21] = c1; (a)[11] = c2; \\\n" + " c1 = (a)[30]; (a)[30] = (a)[15]; c2 = (a)[29]; (a)[29] = c1; c1 = (a)[27]; (a)[27] = c2; c2 = (a)[23]; (a)[23] = c1; (a)[15] = c2; \\\n" + "}\n" + "\n" + "#define fftKernel32(a,dir) \\\n" + "{ \\\n" + " fftKernel2S((a)[0], (a)[16], dir); \\\n" + " fftKernel2S((a)[1], (a)[17], dir); \\\n" + " fftKernel2S((a)[2], (a)[18], dir); \\\n" + " fftKernel2S((a)[3], (a)[19], dir); \\\n" + " fftKernel2S((a)[4], (a)[20], dir); \\\n" + " fftKernel2S((a)[5], (a)[21], dir); \\\n" + " fftKernel2S((a)[6], (a)[22], dir); \\\n" + " fftKernel2S((a)[7], (a)[23], dir); \\\n" + " fftKernel2S((a)[8], (a)[24], dir); \\\n" + " fftKernel2S((a)[9], (a)[25], dir); \\\n" + " fftKernel2S((a)[10], (a)[26], dir); \\\n" + " fftKernel2S((a)[11], (a)[27], dir); \\\n" + " fftKernel2S((a)[12], (a)[28], dir); \\\n" + " fftKernel2S((a)[13], (a)[29], dir); \\\n" + " fftKernel2S((a)[14], (a)[30], dir); \\\n" + " fftKernel2S((a)[15], (a)[31], dir); \\\n" + " (a)[17] = complexMul((a)[17], (float2)(0x1.f6297cp-1f, dir*0x1.8f8b84p-3f)); \\\n" + " (a)[18] = complexMul((a)[18], (float2)(0x1.d906bcp-1f, dir*0x1.87de2ap-2f)); \\\n" + " (a)[19] = complexMul((a)[19], (float2)(0x1.a9b662p-1f, dir*0x1.1c73b4p-1f)); \\\n" + " (a)[20] = complexMul((a)[20], (float2)(0x1.6a09e6p-1f, dir*0x1.6a09e6p-1f)); \\\n" + " (a)[21] = complexMul((a)[21], (float2)(0x1.1c73b4p-1f, dir*0x1.a9b662p-1f)); \\\n" + " (a)[22] = complexMul((a)[22], (float2)(0x1.87de2ap-2f, dir*0x1.d906bcp-1f)); \\\n" + " (a)[23] = complexMul((a)[23], (float2)(0x1.8f8b84p-3f, dir*0x1.f6297cp-1f)); \\\n" + " (a)[24] = complexMul((a)[24], (float2)(0x0p+0f, dir*0x1p+0f)); \\\n" + " (a)[25] = complexMul((a)[25], (float2)(-0x1.8f8b84p-3f, dir*0x1.f6297cp-1f)); \\\n" + " (a)[26] = complexMul((a)[26], (float2)(-0x1.87de2ap-2f, dir*0x1.d906bcp-1f)); \\\n" + " (a)[27] = complexMul((a)[27], (float2)(-0x1.1c73b4p-1f, dir*0x1.a9b662p-1f)); \\\n" + " (a)[28] = complexMul((a)[28], (float2)(-0x1.6a09e6p-1f, dir*0x1.6a09e6p-1f)); \\\n" + " (a)[29] = complexMul((a)[29], (float2)(-0x1.a9b662p-1f, dir*0x1.1c73b4p-1f)); \\\n" + " (a)[30] = complexMul((a)[30], (float2)(-0x1.d906bcp-1f, dir*0x1.87de2ap-2f)); \\\n" + " (a)[31] = complexMul((a)[31], (float2)(-0x1.f6297cp-1f, dir*0x1.8f8b84p-3f)); \\\n" + " fftKernel16((a), dir); \\\n" + " fftKernel16((a) + 16, dir); \\\n" + " bitreverse32((a)); \\\n" + "}\n\n"); static string twistKernelInterleaved = string( - "__kernel void \\\n" - "clFFT_1DTwistInterleaved(__global float2 *in, unsigned int startRow, unsigned int numCols, unsigned int N, unsigned int numRowsToProcess, int dir) \\\n" - "{ \\\n" - " float2 a, w; \\\n" - " float ang; \\\n" - " unsigned int j; \\\n" - " unsigned int i = get_global_id(0); \\\n" - " unsigned int startIndex = i; \\\n" - " \\\n" - " if(i < numCols) \\\n" - " { \\\n" - " for(j = 0; j < numRowsToProcess; j++) \\\n" - " { \\\n" - " a = in[startIndex]; \\\n" - " ang = 2.0f * M_PI * dir * i * (startRow + j) / N; \\\n" - " w = (float2)(native_cos(ang), native_sin(ang)); \\\n" - " a = complexMul(a, w); \\\n" - " in[startIndex] = a; \\\n" - " startIndex += numCols; \\\n" - " } \\\n" - " } \\\n" - "} \\\n" - ); + "__kernel void \\\n" + "clFFT_1DTwistInterleaved(__global float2 *in, unsigned int startRow, unsigned int numCols, unsigned int N, unsigned int numRowsToProcess, int dir) \\\n" + "{ \\\n" + " float2 a, w; \\\n" + " float ang; \\\n" + " unsigned int j; \\\n" + " unsigned int i = get_global_id(0); \\\n" + " unsigned int startIndex = i; \\\n" + " \\\n" + " if(i < numCols) \\\n" + " { \\\n" + " for(j = 0; j < numRowsToProcess; j++) \\\n" + " { \\\n" + " a = in[startIndex]; \\\n" + " ang = 2.0f * M_PI * dir * i * (startRow + j) / N; \\\n" + " w = (float2)(native_cos(ang), native_sin(ang)); \\\n" + " a = complexMul(a, w); \\\n" + " in[startIndex] = a; \\\n" + " startIndex += numCols; \\\n" + " } \\\n" + " } \\\n" + "} \\\n"); static string twistKernelPlannar = string( - "__kernel void \\\n" - "clFFT_1DTwistSplit(__global float *in_real, __global float *in_imag , unsigned int startRow, unsigned int numCols, unsigned int N, unsigned int numRowsToProcess, int dir) \\\n" - "{ \\\n" - " float2 a, w; \\\n" - " float ang; \\\n" - " unsigned int j; \\\n" - " unsigned int i = get_global_id(0); \\\n" - " unsigned int startIndex = i; \\\n" - " \\\n" - " if(i < numCols) \\\n" - " { \\\n" - " for(j = 0; j < numRowsToProcess; j++) \\\n" - " { \\\n" - " a = (float2)(in_real[startIndex], in_imag[startIndex]); \\\n" - " ang = 2.0f * M_PI * dir * i * (startRow + j) / N; \\\n" - " w = (float2)(native_cos(ang), native_sin(ang)); \\\n" - " a = complexMul(a, w); \\\n" - " in_real[startIndex] = a.x; \\\n" - " in_imag[startIndex] = a.y; \\\n" - " startIndex += numCols; \\\n" - " } \\\n" - " } \\\n" - "} \\\n" - ); - + "__kernel void \\\n" + "clFFT_1DTwistSplit(__global float *in_real, __global float *in_imag , unsigned int startRow, unsigned int numCols, unsigned int N, unsigned int numRowsToProcess, int dir) \\\n" + "{ \\\n" + " float2 a, w; \\\n" + " float ang; \\\n" + " unsigned int j; \\\n" + " unsigned int i = get_global_id(0); \\\n" + " unsigned int startIndex = i; \\\n" + " \\\n" + " if(i < numCols) \\\n" + " { \\\n" + " for(j = 0; j < numRowsToProcess; j++) \\\n" + " { \\\n" + " a = (float2)(in_real[startIndex], in_imag[startIndex]); \\\n" + " ang = 2.0f * M_PI * dir * i * (startRow + j) / N; \\\n" + " w = (float2)(native_cos(ang), native_sin(ang)); \\\n" + " a = complexMul(a, w); \\\n" + " in_real[startIndex] = a.x; \\\n" + " in_imag[startIndex] = a.y; \\\n" + " startIndex += numCols; \\\n" + " } \\\n" + " } \\\n" + "} \\\n"); #endif diff --git a/src/algorithms/libs/opencl/fft_execute.cc b/src/algorithms/libs/opencl/fft_execute.cc index 6416e163e..baf3873be 100644 --- a/src/algorithms/libs/opencl/fft_execute.cc +++ b/src/algorithms/libs/opencl/fft_execute.cc @@ -52,354 +52,352 @@ #include #include -#define max(a,b) (((a)>(b)) ? (a) : (b)) -#define min(a,b) (((a)<(b)) ? (a) : (b)) +#define max(a, b) (((a) > (b)) ? (a) : (b)) +#define min(a, b) (((a) < (b)) ? (a) : (b)) static cl_int allocateTemporaryBufferInterleaved(cl_fft_plan *plan, cl_uint batchSize) { - cl_int err = CL_SUCCESS; - if(plan->temp_buffer_needed && plan->last_batch_size != batchSize) - { - plan->last_batch_size = batchSize; - size_t tmpLength = plan->n.x * plan->n.y * plan->n.z * batchSize * 2 * sizeof(cl_float); - - if(plan->tempmemobj) - clReleaseMemObject(plan->tempmemobj); - - plan->tempmemobj = clCreateBuffer(plan->context, CL_MEM_READ_WRITE, tmpLength, NULL, &err); - } - return err; + cl_int err = CL_SUCCESS; + if (plan->temp_buffer_needed && plan->last_batch_size != batchSize) + { + plan->last_batch_size = batchSize; + size_t tmpLength = plan->n.x * plan->n.y * plan->n.z * batchSize * 2 * sizeof(cl_float); + + if (plan->tempmemobj) + clReleaseMemObject(plan->tempmemobj); + + plan->tempmemobj = clCreateBuffer(plan->context, CL_MEM_READ_WRITE, tmpLength, NULL, &err); + } + return err; } static cl_int allocateTemporaryBufferPlannar(cl_fft_plan *plan, cl_uint batchSize) { - cl_int err = CL_SUCCESS; - cl_int terr; - if(plan->temp_buffer_needed && plan->last_batch_size != batchSize) - { - plan->last_batch_size = batchSize; - size_t tmpLength = plan->n.x * plan->n.y * plan->n.z * batchSize * sizeof(cl_float); - - if(plan->tempmemobj_real) - clReleaseMemObject(plan->tempmemobj_real); + cl_int err = CL_SUCCESS; + cl_int terr; + if (plan->temp_buffer_needed && plan->last_batch_size != batchSize) + { + plan->last_batch_size = batchSize; + size_t tmpLength = plan->n.x * plan->n.y * plan->n.z * batchSize * sizeof(cl_float); - if(plan->tempmemobj_imag) - clReleaseMemObject(plan->tempmemobj_imag); - - plan->tempmemobj_real = clCreateBuffer(plan->context, CL_MEM_READ_WRITE, tmpLength, NULL, &err); - plan->tempmemobj_imag = clCreateBuffer(plan->context, CL_MEM_READ_WRITE, tmpLength, NULL, &terr); - err |= terr; - } - return err; + if (plan->tempmemobj_real) + clReleaseMemObject(plan->tempmemobj_real); + + if (plan->tempmemobj_imag) + clReleaseMemObject(plan->tempmemobj_imag); + + plan->tempmemobj_real = clCreateBuffer(plan->context, CL_MEM_READ_WRITE, tmpLength, NULL, &err); + plan->tempmemobj_imag = clCreateBuffer(plan->context, CL_MEM_READ_WRITE, tmpLength, NULL, &terr); + err |= terr; + } + return err; } -void -getKernelWorkDimensions(cl_fft_plan *plan, cl_fft_kernel_info *kernelInfo, cl_int *batchSize, size_t *gWorkItems, size_t *lWorkItems) +void getKernelWorkDimensions(cl_fft_plan *plan, cl_fft_kernel_info *kernelInfo, cl_int *batchSize, size_t *gWorkItems, size_t *lWorkItems) { - *lWorkItems = kernelInfo->num_workitems_per_workgroup; - int numWorkGroups = kernelInfo->num_workgroups; + *lWorkItems = kernelInfo->num_workitems_per_workgroup; + int numWorkGroups = kernelInfo->num_workgroups; int numXFormsPerWG = kernelInfo->num_xforms_per_workgroup; - - switch(kernelInfo->dir) - { - case cl_fft_kernel_x: + + switch (kernelInfo->dir) + { + case cl_fft_kernel_x: *batchSize *= (plan->n.y * plan->n.z); - numWorkGroups = (*batchSize % numXFormsPerWG) ? (*batchSize/numXFormsPerWG + 1) : (*batchSize/numXFormsPerWG); + numWorkGroups = (*batchSize % numXFormsPerWG) ? (*batchSize / numXFormsPerWG + 1) : (*batchSize / numXFormsPerWG); numWorkGroups *= kernelInfo->num_workgroups; - break; - case cl_fft_kernel_y: - *batchSize *= plan->n.z; - numWorkGroups *= *batchSize; - break; - case cl_fft_kernel_z: - numWorkGroups *= *batchSize; - break; - } - - *gWorkItems = numWorkGroups * *lWorkItems; + break; + case cl_fft_kernel_y: + *batchSize *= plan->n.z; + numWorkGroups *= *batchSize; + break; + case cl_fft_kernel_z: + numWorkGroups *= *batchSize; + break; + } + + *gWorkItems = numWorkGroups * *lWorkItems; } -cl_int -clFFT_ExecuteInterleaved( cl_command_queue queue, clFFT_Plan Plan, cl_int batchSize, clFFT_Direction dir, - cl_mem data_in, cl_mem data_out, - cl_int num_events, cl_event *event_list, cl_event *event ) -{ - int s; - cl_fft_plan *plan = (cl_fft_plan *) Plan; - if(plan->format != clFFT_InterleavedComplexFormat) - return CL_INVALID_VALUE; - - cl_int err; - size_t gWorkItems, lWorkItems; - int inPlaceDone; - - cl_int isInPlace = data_in == data_out ? 1 : 0; - - if((err = allocateTemporaryBufferInterleaved(plan, batchSize)) != CL_SUCCESS) - return err; - - cl_mem memObj[3]; - memObj[0] = data_in; - memObj[1] = data_out; - memObj[2] = plan->tempmemobj; - cl_fft_kernel_info *kernelInfo = plan->kernel_info; - int numKernels = plan->num_kernels; - - int numKernelsOdd = numKernels & 1; - int currRead = 0; - int currWrite = 1; - - // at least one external dram shuffle (transpose) required - if(plan->temp_buffer_needed) - { - // in-place transform - if(isInPlace) - { - inPlaceDone = 0; - currRead = 1; - currWrite = 2; - } - else - { - currWrite = (numKernels & 1) ? 1 : 2; - } - - while(kernelInfo) - { - if( isInPlace && numKernelsOdd && !inPlaceDone && kernelInfo->in_place_possible) - { - currWrite = currRead; - inPlaceDone = 1; - } - - s = batchSize; - getKernelWorkDimensions(plan, kernelInfo, &s, &gWorkItems, &lWorkItems); - err |= clSetKernelArg(kernelInfo->kernel, 0, sizeof(cl_mem), &memObj[currRead]); - err |= clSetKernelArg(kernelInfo->kernel, 1, sizeof(cl_mem), &memObj[currWrite]); - err |= clSetKernelArg(kernelInfo->kernel, 2, sizeof(cl_int), &dir); - err |= clSetKernelArg(kernelInfo->kernel, 3, sizeof(cl_int), &s); - - err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL); - if(err) - return err; - - currRead = (currWrite == 1) ? 1 : 2; - currWrite = (currWrite == 1) ? 2 : 1; - - kernelInfo = kernelInfo->next; - } - } - // no dram shuffle (transpose required) transform - // all kernels can execute in-place. - else { - - while(kernelInfo) - { - s = batchSize; - getKernelWorkDimensions(plan, kernelInfo, &s, &gWorkItems, &lWorkItems); - err |= clSetKernelArg(kernelInfo->kernel, 0, sizeof(cl_mem), &memObj[currRead]); - err |= clSetKernelArg(kernelInfo->kernel, 1, sizeof(cl_mem), &memObj[currWrite]); - err |= clSetKernelArg(kernelInfo->kernel, 2, sizeof(cl_int), &dir); - err |= clSetKernelArg(kernelInfo->kernel, 3, sizeof(cl_int), &s); - - err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL); - if(err) - return err; - - currRead = 1; - currWrite = 1; - - kernelInfo = kernelInfo->next; - } - } - - return err; -} - -cl_int -clFFT_ExecutePlannar( cl_command_queue queue, clFFT_Plan Plan, cl_int batchSize, clFFT_Direction dir, - cl_mem data_in_real, cl_mem data_in_imag, cl_mem data_out_real, cl_mem data_out_imag, - cl_int num_events, cl_event *event_list, cl_event *event) -{ - int s; - cl_fft_plan *plan = (cl_fft_plan *) Plan; - - if(plan->format != clFFT_SplitComplexFormat) - return CL_INVALID_VALUE; - - cl_int err; - size_t gWorkItems, lWorkItems; - int inPlaceDone; - - cl_int isInPlace = ((data_in_real == data_out_real) && (data_in_imag == data_out_imag)) ? 1 : 0; - - if((err = allocateTemporaryBufferPlannar(plan, batchSize)) != CL_SUCCESS) - return err; - - cl_mem memObj_real[3]; - cl_mem memObj_imag[3]; - memObj_real[0] = data_in_real; - memObj_real[1] = data_out_real; - memObj_real[2] = plan->tempmemobj_real; - memObj_imag[0] = data_in_imag; - memObj_imag[1] = data_out_imag; - memObj_imag[2] = plan->tempmemobj_imag; - - cl_fft_kernel_info *kernelInfo = plan->kernel_info; - int numKernels = plan->num_kernels; - - int numKernelsOdd = numKernels & 1; - int currRead = 0; - int currWrite = 1; - - // at least one external dram shuffle (transpose) required - if(plan->temp_buffer_needed) - { - // in-place transform - if(isInPlace) - { - inPlaceDone = 0; - currRead = 1; - currWrite = 2; - } - else - { - currWrite = (numKernels & 1) ? 1 : 2; - } - - while(kernelInfo) - { - if( isInPlace && numKernelsOdd && !inPlaceDone && kernelInfo->in_place_possible) - { - currWrite = currRead; - inPlaceDone = 1; - } - - s = batchSize; - getKernelWorkDimensions(plan, kernelInfo, &s, &gWorkItems, &lWorkItems); - err |= clSetKernelArg(kernelInfo->kernel, 0, sizeof(cl_mem), &memObj_real[currRead]); - err |= clSetKernelArg(kernelInfo->kernel, 1, sizeof(cl_mem), &memObj_imag[currRead]); - err |= clSetKernelArg(kernelInfo->kernel, 2, sizeof(cl_mem), &memObj_real[currWrite]); - err |= clSetKernelArg(kernelInfo->kernel, 3, sizeof(cl_mem), &memObj_imag[currWrite]); - err |= clSetKernelArg(kernelInfo->kernel, 4, sizeof(cl_int), &dir); - err |= clSetKernelArg(kernelInfo->kernel, 5, sizeof(cl_int), &s); - - err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL); - if(err) - return err; - - currRead = (currWrite == 1) ? 1 : 2; - currWrite = (currWrite == 1) ? 2 : 1; - - kernelInfo = kernelInfo->next; - } - } - // no dram shuffle (transpose required) transform - else { - - while(kernelInfo) - { - s = batchSize; - getKernelWorkDimensions(plan, kernelInfo, &s, &gWorkItems, &lWorkItems); - err |= clSetKernelArg(kernelInfo->kernel, 0, sizeof(cl_mem), &memObj_real[currRead]); - err |= clSetKernelArg(kernelInfo->kernel, 1, sizeof(cl_mem), &memObj_imag[currRead]); - err |= clSetKernelArg(kernelInfo->kernel, 2, sizeof(cl_mem), &memObj_real[currWrite]); - err |= clSetKernelArg(kernelInfo->kernel, 3, sizeof(cl_mem), &memObj_imag[currWrite]); - err |= clSetKernelArg(kernelInfo->kernel, 4, sizeof(cl_int), &dir); - err |= clSetKernelArg(kernelInfo->kernel, 5, sizeof(cl_int), &s); - - err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL); - if(err) - return err; - - currRead = 1; - currWrite = 1; - - kernelInfo = kernelInfo->next; - } - } - - return err; -} - -cl_int -clFFT_1DTwistInterleaved(clFFT_Plan Plan, cl_command_queue queue, cl_mem array, - unsigned numRows, unsigned numCols, unsigned startRow, unsigned rowsToProcess, clFFT_Direction dir) +cl_int +clFFT_ExecuteInterleaved(cl_command_queue queue, clFFT_Plan Plan, cl_int batchSize, clFFT_Direction dir, + cl_mem data_in, cl_mem data_out, + cl_int num_events, cl_event *event_list, cl_event *event) { - cl_fft_plan *plan = (cl_fft_plan *) Plan; - - unsigned int N = numRows*numCols; - unsigned int nCols = numCols; - unsigned int sRow = startRow; - unsigned int rToProcess = rowsToProcess; - int d = dir; - int err = 0; - - cl_device_id device_id; - err = clGetCommandQueueInfo(queue, CL_QUEUE_DEVICE, sizeof(cl_device_id), &device_id, NULL); - if(err) - return err; - - size_t gSize; - err = clGetKernelWorkGroupInfo(plan->twist_kernel, device_id, CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &gSize, NULL); - if(err) - return err; - - gSize = min(128, gSize); - size_t numGlobalThreads[1] = { max(numCols / gSize, 1)*gSize }; - size_t numLocalThreads[1] = { gSize }; - - err |= clSetKernelArg(plan->twist_kernel, 0, sizeof(cl_mem), &array); - err |= clSetKernelArg(plan->twist_kernel, 1, sizeof(unsigned int), &sRow); - err |= clSetKernelArg(plan->twist_kernel, 2, sizeof(unsigned int), &nCols); - err |= clSetKernelArg(plan->twist_kernel, 3, sizeof(unsigned int), &N); - err |= clSetKernelArg(plan->twist_kernel, 4, sizeof(unsigned int), &rToProcess); - err |= clSetKernelArg(plan->twist_kernel, 5, sizeof(int), &d); - - err |= clEnqueueNDRangeKernel(queue, plan->twist_kernel, 1, NULL, numGlobalThreads, numLocalThreads, 0, NULL, NULL); - - return err; + int s; + cl_fft_plan *plan = (cl_fft_plan *)Plan; + if (plan->format != clFFT_InterleavedComplexFormat) + return CL_INVALID_VALUE; + + cl_int err; + size_t gWorkItems, lWorkItems; + int inPlaceDone; + + cl_int isInPlace = data_in == data_out ? 1 : 0; + + if ((err = allocateTemporaryBufferInterleaved(plan, batchSize)) != CL_SUCCESS) + return err; + + cl_mem memObj[3]; + memObj[0] = data_in; + memObj[1] = data_out; + memObj[2] = plan->tempmemobj; + cl_fft_kernel_info *kernelInfo = plan->kernel_info; + int numKernels = plan->num_kernels; + + int numKernelsOdd = numKernels & 1; + int currRead = 0; + int currWrite = 1; + + // at least one external dram shuffle (transpose) required + if (plan->temp_buffer_needed) + { + // in-place transform + if (isInPlace) + { + inPlaceDone = 0; + currRead = 1; + currWrite = 2; + } + else + { + currWrite = (numKernels & 1) ? 1 : 2; + } + + while (kernelInfo) + { + if (isInPlace && numKernelsOdd && !inPlaceDone && kernelInfo->in_place_possible) + { + currWrite = currRead; + inPlaceDone = 1; + } + + s = batchSize; + getKernelWorkDimensions(plan, kernelInfo, &s, &gWorkItems, &lWorkItems); + err |= clSetKernelArg(kernelInfo->kernel, 0, sizeof(cl_mem), &memObj[currRead]); + err |= clSetKernelArg(kernelInfo->kernel, 1, sizeof(cl_mem), &memObj[currWrite]); + err |= clSetKernelArg(kernelInfo->kernel, 2, sizeof(cl_int), &dir); + err |= clSetKernelArg(kernelInfo->kernel, 3, sizeof(cl_int), &s); + + err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL); + if (err) + return err; + + currRead = (currWrite == 1) ? 1 : 2; + currWrite = (currWrite == 1) ? 2 : 1; + + kernelInfo = kernelInfo->next; + } + } + // no dram shuffle (transpose required) transform + // all kernels can execute in-place. + else + { + while (kernelInfo) + { + s = batchSize; + getKernelWorkDimensions(plan, kernelInfo, &s, &gWorkItems, &lWorkItems); + err |= clSetKernelArg(kernelInfo->kernel, 0, sizeof(cl_mem), &memObj[currRead]); + err |= clSetKernelArg(kernelInfo->kernel, 1, sizeof(cl_mem), &memObj[currWrite]); + err |= clSetKernelArg(kernelInfo->kernel, 2, sizeof(cl_int), &dir); + err |= clSetKernelArg(kernelInfo->kernel, 3, sizeof(cl_int), &s); + + err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL); + if (err) + return err; + + currRead = 1; + currWrite = 1; + + kernelInfo = kernelInfo->next; + } + } + + return err; } -cl_int -clFFT_1DTwistPlannar(clFFT_Plan Plan, cl_command_queue queue, cl_mem array_real, cl_mem array_imag, - unsigned numRows, unsigned numCols, unsigned startRow, unsigned rowsToProcess, clFFT_Direction dir) +cl_int +clFFT_ExecutePlannar(cl_command_queue queue, clFFT_Plan Plan, cl_int batchSize, clFFT_Direction dir, + cl_mem data_in_real, cl_mem data_in_imag, cl_mem data_out_real, cl_mem data_out_imag, + cl_int num_events, cl_event *event_list, cl_event *event) { - cl_fft_plan *plan = (cl_fft_plan *) Plan; - - unsigned int N = numRows*numCols; - unsigned int nCols = numCols; - unsigned int sRow = startRow; - unsigned int rToProcess = rowsToProcess; - int d = dir; - int err = 0; - - cl_device_id device_id; - err = clGetCommandQueueInfo(queue, CL_QUEUE_DEVICE, sizeof(cl_device_id), &device_id, NULL); - if(err) - return err; - - size_t gSize; - err = clGetKernelWorkGroupInfo(plan->twist_kernel, device_id, CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &gSize, NULL); - if(err) - return err; - - gSize = min(128, gSize); - size_t numGlobalThreads[1] = { max(numCols / gSize, 1)*gSize }; - size_t numLocalThreads[1] = { gSize }; - - err |= clSetKernelArg(plan->twist_kernel, 0, sizeof(cl_mem), &array_real); - err |= clSetKernelArg(plan->twist_kernel, 1, sizeof(cl_mem), &array_imag); - err |= clSetKernelArg(plan->twist_kernel, 2, sizeof(unsigned int), &sRow); - err |= clSetKernelArg(plan->twist_kernel, 3, sizeof(unsigned int), &nCols); - err |= clSetKernelArg(plan->twist_kernel, 4, sizeof(unsigned int), &N); - err |= clSetKernelArg(plan->twist_kernel, 5, sizeof(unsigned int), &rToProcess); - err |= clSetKernelArg(plan->twist_kernel, 6, sizeof(int), &d); - - err |= clEnqueueNDRangeKernel(queue, plan->twist_kernel, 1, NULL, numGlobalThreads, numLocalThreads, 0, NULL, NULL); - - return err; + int s; + cl_fft_plan *plan = (cl_fft_plan *)Plan; + + if (plan->format != clFFT_SplitComplexFormat) + return CL_INVALID_VALUE; + + cl_int err; + size_t gWorkItems, lWorkItems; + int inPlaceDone; + + cl_int isInPlace = ((data_in_real == data_out_real) && (data_in_imag == data_out_imag)) ? 1 : 0; + + if ((err = allocateTemporaryBufferPlannar(plan, batchSize)) != CL_SUCCESS) + return err; + + cl_mem memObj_real[3]; + cl_mem memObj_imag[3]; + memObj_real[0] = data_in_real; + memObj_real[1] = data_out_real; + memObj_real[2] = plan->tempmemobj_real; + memObj_imag[0] = data_in_imag; + memObj_imag[1] = data_out_imag; + memObj_imag[2] = plan->tempmemobj_imag; + + cl_fft_kernel_info *kernelInfo = plan->kernel_info; + int numKernels = plan->num_kernels; + + int numKernelsOdd = numKernels & 1; + int currRead = 0; + int currWrite = 1; + + // at least one external dram shuffle (transpose) required + if (plan->temp_buffer_needed) + { + // in-place transform + if (isInPlace) + { + inPlaceDone = 0; + currRead = 1; + currWrite = 2; + } + else + { + currWrite = (numKernels & 1) ? 1 : 2; + } + + while (kernelInfo) + { + if (isInPlace && numKernelsOdd && !inPlaceDone && kernelInfo->in_place_possible) + { + currWrite = currRead; + inPlaceDone = 1; + } + + s = batchSize; + getKernelWorkDimensions(plan, kernelInfo, &s, &gWorkItems, &lWorkItems); + err |= clSetKernelArg(kernelInfo->kernel, 0, sizeof(cl_mem), &memObj_real[currRead]); + err |= clSetKernelArg(kernelInfo->kernel, 1, sizeof(cl_mem), &memObj_imag[currRead]); + err |= clSetKernelArg(kernelInfo->kernel, 2, sizeof(cl_mem), &memObj_real[currWrite]); + err |= clSetKernelArg(kernelInfo->kernel, 3, sizeof(cl_mem), &memObj_imag[currWrite]); + err |= clSetKernelArg(kernelInfo->kernel, 4, sizeof(cl_int), &dir); + err |= clSetKernelArg(kernelInfo->kernel, 5, sizeof(cl_int), &s); + + err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL); + if (err) + return err; + + currRead = (currWrite == 1) ? 1 : 2; + currWrite = (currWrite == 1) ? 2 : 1; + + kernelInfo = kernelInfo->next; + } + } + // no dram shuffle (transpose required) transform + else + { + while (kernelInfo) + { + s = batchSize; + getKernelWorkDimensions(plan, kernelInfo, &s, &gWorkItems, &lWorkItems); + err |= clSetKernelArg(kernelInfo->kernel, 0, sizeof(cl_mem), &memObj_real[currRead]); + err |= clSetKernelArg(kernelInfo->kernel, 1, sizeof(cl_mem), &memObj_imag[currRead]); + err |= clSetKernelArg(kernelInfo->kernel, 2, sizeof(cl_mem), &memObj_real[currWrite]); + err |= clSetKernelArg(kernelInfo->kernel, 3, sizeof(cl_mem), &memObj_imag[currWrite]); + err |= clSetKernelArg(kernelInfo->kernel, 4, sizeof(cl_int), &dir); + err |= clSetKernelArg(kernelInfo->kernel, 5, sizeof(cl_int), &s); + + err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL); + if (err) + return err; + + currRead = 1; + currWrite = 1; + + kernelInfo = kernelInfo->next; + } + } + + return err; } +cl_int +clFFT_1DTwistInterleaved(clFFT_Plan Plan, cl_command_queue queue, cl_mem array, + unsigned numRows, unsigned numCols, unsigned startRow, unsigned rowsToProcess, clFFT_Direction dir) +{ + cl_fft_plan *plan = (cl_fft_plan *)Plan; + + unsigned int N = numRows * numCols; + unsigned int nCols = numCols; + unsigned int sRow = startRow; + unsigned int rToProcess = rowsToProcess; + int d = dir; + int err = 0; + + cl_device_id device_id; + err = clGetCommandQueueInfo(queue, CL_QUEUE_DEVICE, sizeof(cl_device_id), &device_id, NULL); + if (err) + return err; + + size_t gSize; + err = clGetKernelWorkGroupInfo(plan->twist_kernel, device_id, CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &gSize, NULL); + if (err) + return err; + + gSize = min(128, gSize); + size_t numGlobalThreads[1] = {max(numCols / gSize, 1) * gSize}; + size_t numLocalThreads[1] = {gSize}; + + err |= clSetKernelArg(plan->twist_kernel, 0, sizeof(cl_mem), &array); + err |= clSetKernelArg(plan->twist_kernel, 1, sizeof(unsigned int), &sRow); + err |= clSetKernelArg(plan->twist_kernel, 2, sizeof(unsigned int), &nCols); + err |= clSetKernelArg(plan->twist_kernel, 3, sizeof(unsigned int), &N); + err |= clSetKernelArg(plan->twist_kernel, 4, sizeof(unsigned int), &rToProcess); + err |= clSetKernelArg(plan->twist_kernel, 5, sizeof(int), &d); + + err |= clEnqueueNDRangeKernel(queue, plan->twist_kernel, 1, NULL, numGlobalThreads, numLocalThreads, 0, NULL, NULL); + + return err; +} + +cl_int +clFFT_1DTwistPlannar(clFFT_Plan Plan, cl_command_queue queue, cl_mem array_real, cl_mem array_imag, + unsigned numRows, unsigned numCols, unsigned startRow, unsigned rowsToProcess, clFFT_Direction dir) +{ + cl_fft_plan *plan = (cl_fft_plan *)Plan; + + unsigned int N = numRows * numCols; + unsigned int nCols = numCols; + unsigned int sRow = startRow; + unsigned int rToProcess = rowsToProcess; + int d = dir; + int err = 0; + + cl_device_id device_id; + err = clGetCommandQueueInfo(queue, CL_QUEUE_DEVICE, sizeof(cl_device_id), &device_id, NULL); + if (err) + return err; + + size_t gSize; + err = clGetKernelWorkGroupInfo(plan->twist_kernel, device_id, CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &gSize, NULL); + if (err) + return err; + + gSize = min(128, gSize); + size_t numGlobalThreads[1] = {max(numCols / gSize, 1) * gSize}; + size_t numLocalThreads[1] = {gSize}; + + err |= clSetKernelArg(plan->twist_kernel, 0, sizeof(cl_mem), &array_real); + err |= clSetKernelArg(plan->twist_kernel, 1, sizeof(cl_mem), &array_imag); + err |= clSetKernelArg(plan->twist_kernel, 2, sizeof(unsigned int), &sRow); + err |= clSetKernelArg(plan->twist_kernel, 3, sizeof(unsigned int), &nCols); + err |= clSetKernelArg(plan->twist_kernel, 4, sizeof(unsigned int), &N); + err |= clSetKernelArg(plan->twist_kernel, 5, sizeof(unsigned int), &rToProcess); + err |= clSetKernelArg(plan->twist_kernel, 6, sizeof(int), &d); + + err |= clEnqueueNDRangeKernel(queue, plan->twist_kernel, 1, NULL, numGlobalThreads, numLocalThreads, 0, NULL, NULL); + + return err; +} diff --git a/src/algorithms/libs/opencl/fft_internal.h b/src/algorithms/libs/opencl/fft_internal.h index 5b797a3a0..5e462f455 100644 --- a/src/algorithms/libs/opencl/fft_internal.h +++ b/src/algorithms/libs/opencl/fft_internal.h @@ -58,106 +58,106 @@ using namespace std; typedef enum kernel_dir_t { - cl_fft_kernel_x, - cl_fft_kernel_y, - cl_fft_kernel_z -}cl_fft_kernel_dir; + cl_fft_kernel_x, + cl_fft_kernel_y, + cl_fft_kernel_z +} cl_fft_kernel_dir; typedef struct kernel_info_t { - cl_kernel kernel; - char *kernel_name; - unsigned lmem_size; - unsigned num_workgroups; + cl_kernel kernel; + char *kernel_name; + unsigned lmem_size; + unsigned num_workgroups; unsigned num_xforms_per_workgroup; - unsigned num_workitems_per_workgroup; - cl_fft_kernel_dir dir; - int in_place_possible; - kernel_info_t *next; -}cl_fft_kernel_info; + unsigned num_workitems_per_workgroup; + cl_fft_kernel_dir dir; + int in_place_possible; + kernel_info_t *next; +} cl_fft_kernel_info; -typedef struct +typedef struct { - // context in which fft resources are created and kernels are executed - cl_context context; - - // size of signal - clFFT_Dim3 n; - - // dimension of transform ... must be either 1D, 2D or 3D - clFFT_Dimension dim; - - // data format ... must be either interleaved or plannar - clFFT_DataFormat format; - - // string containing kernel source. Generated at runtime based on - // n, dim, format and other parameters - string *kernel_string; - - // CL program containing source and kernel this particular - // n, dim, data format - cl_program program; - - // linked list of kernels which needs to be executed for this fft - cl_fft_kernel_info *kernel_info; - - // number of kernels - int num_kernels; - - // twist kernel for virtualizing fft of very large sizes that do not - // fit in GPU global memory - cl_kernel twist_kernel; - - // flag indicating if temporary intermediate buffer is needed or not. - // this depends on fft kernels being executed and if transform is - // in-place or out-of-place. e.g. Local memory fft (say 1D 1024 ... - // one that does not require global transpose do not need temporary buffer) - // 2D 1024x1024 out-of-place fft however do require intermediate buffer. - // If temp buffer is needed, its allocation is lazy i.e. its not allocated - // until its needed - cl_int temp_buffer_needed; - - // Batch size is runtime parameter and size of temporary buffer (if needed) - // depends on batch size. Allocation of temporary buffer is lazy i.e. its - // only created when needed. Once its created at first call of clFFT_Executexxx - // it is not allocated next time if next time clFFT_Executexxx is called with - // batch size different than the first call. last_batch_size caches the last - // batch size with which this plan is used so that we dont keep allocating/deallocating - // temp buffer if same batch size is used again and again. - unsigned last_batch_size; - - // temporary buffer for interleaved plan - cl_mem tempmemobj; - - // temporary buffer for planner plan. Only one of tempmemobj or - // (tempmemobj_real, tempmemobj_imag) pair is valid (allocated) depending - // data format of plan (plannar or interleaved) - cl_mem tempmemobj_real, tempmemobj_imag; - - // Maximum size of signal for which local memory transposed based - // fft is sufficient i.e. no global mem transpose (communication) - // is needed - unsigned max_localmem_fft_size; - - // Maximum work items per work group allowed. This, along with max_radix below controls - // maximum local memory being used by fft kernels of this plan. Set to 256 by default - unsigned max_work_item_per_workgroup; - - // Maximum base radix for local memory fft ... this controls the maximum register - // space used by work items. Currently defaults to 16 - unsigned max_radix; - - // Device depended parameter that tells how many work-items need to be read consecutive - // values to make sure global memory access by work-items of a work-group result in - // coalesced memory access to utilize full bandwidth e.g. on NVidia tesla, this is 16 - unsigned min_mem_coalesce_width; - - // Number of local memory banks. This is used to geneate kernel with local memory - // transposes with appropriate padding to avoid bank conflicts to local memory - // e.g. on NVidia it is 16. - unsigned num_local_mem_banks; -}cl_fft_plan; + // context in which fft resources are created and kernels are executed + cl_context context; + + // size of signal + clFFT_Dim3 n; + + // dimension of transform ... must be either 1D, 2D or 3D + clFFT_Dimension dim; + + // data format ... must be either interleaved or plannar + clFFT_DataFormat format; + + // string containing kernel source. Generated at runtime based on + // n, dim, format and other parameters + string *kernel_string; + + // CL program containing source and kernel this particular + // n, dim, data format + cl_program program; + + // linked list of kernels which needs to be executed for this fft + cl_fft_kernel_info *kernel_info; + + // number of kernels + int num_kernels; + + // twist kernel for virtualizing fft of very large sizes that do not + // fit in GPU global memory + cl_kernel twist_kernel; + + // flag indicating if temporary intermediate buffer is needed or not. + // this depends on fft kernels being executed and if transform is + // in-place or out-of-place. e.g. Local memory fft (say 1D 1024 ... + // one that does not require global transpose do not need temporary buffer) + // 2D 1024x1024 out-of-place fft however do require intermediate buffer. + // If temp buffer is needed, its allocation is lazy i.e. its not allocated + // until its needed + cl_int temp_buffer_needed; + + // Batch size is runtime parameter and size of temporary buffer (if needed) + // depends on batch size. Allocation of temporary buffer is lazy i.e. its + // only created when needed. Once its created at first call of clFFT_Executexxx + // it is not allocated next time if next time clFFT_Executexxx is called with + // batch size different than the first call. last_batch_size caches the last + // batch size with which this plan is used so that we dont keep allocating/deallocating + // temp buffer if same batch size is used again and again. + unsigned last_batch_size; + + // temporary buffer for interleaved plan + cl_mem tempmemobj; + + // temporary buffer for planner plan. Only one of tempmemobj or + // (tempmemobj_real, tempmemobj_imag) pair is valid (allocated) depending + // data format of plan (plannar or interleaved) + cl_mem tempmemobj_real, tempmemobj_imag; + + // Maximum size of signal for which local memory transposed based + // fft is sufficient i.e. no global mem transpose (communication) + // is needed + unsigned max_localmem_fft_size; + + // Maximum work items per work group allowed. This, along with max_radix below controls + // maximum local memory being used by fft kernels of this plan. Set to 256 by default + unsigned max_work_item_per_workgroup; + + // Maximum base radix for local memory fft ... this controls the maximum register + // space used by work items. Currently defaults to 16 + unsigned max_radix; + + // Device depended parameter that tells how many work-items need to be read consecutive + // values to make sure global memory access by work-items of a work-group result in + // coalesced memory access to utilize full bandwidth e.g. on NVidia tesla, this is 16 + unsigned min_mem_coalesce_width; + + // Number of local memory banks. This is used to geneate kernel with local memory + // transposes with appropriate padding to avoid bank conflicts to local memory + // e.g. on NVidia it is 16. + unsigned num_local_mem_banks; +} cl_fft_plan; void FFT1D(cl_fft_plan *plan, cl_fft_kernel_dir dir); -#endif +#endif diff --git a/src/algorithms/libs/opencl/fft_kernelstring.cc b/src/algorithms/libs/opencl/fft_kernelstring.cc index 7847ce959..733b60f42 100644 --- a/src/algorithms/libs/opencl/fft_kernelstring.cc +++ b/src/algorithms/libs/opencl/fft_kernelstring.cc @@ -59,142 +59,157 @@ using namespace std; -#define max(A,B) ((A) > (B) ? (A) : (B)) -#define min(A,B) ((A) < (B) ? (A) : (B)) +#define max(A, B) ((A) > (B) ? (A) : (B)) +#define min(A, B) ((A) < (B) ? (A) : (B)) -static string +static string num2str(int num) { - char temp[200]; - sprintf(temp, "%d", num); - return string(temp); + char temp[200]; + sprintf(temp, "%d", num); + return string(temp); } -// For any n, this function decomposes n into factors for loacal memory tranpose +// For any n, this function decomposes n into factors for loacal memory tranpose // based fft. Factors (radices) are sorted such that the first one (radixArray[0]) // is the largest. This base radix determines the number of registers used by each // work item and product of remaining radices determine the size of work group needed. // To make things concrete with and example, suppose n = 1024. It is decomposed into -// 1024 = 16 x 16 x 4. Hence kernel uses float2 a[16], for local in-register fft and +// 1024 = 16 x 16 x 4. Hence kernel uses float2 a[16], for local in-register fft and // needs 16 x 4 = 64 work items per work group. So kernel first performance 64 length -// 16 ffts (64 work items working in parallel) following by transpose using local +// 16 ffts (64 work items working in parallel) following by transpose using local // memory followed by again 64 length 16 ffts followed by transpose using local memory -// followed by 256 length 4 ffts. For the last step since with size of work group is +// followed by 256 length 4 ffts. For the last step since with size of work group is // 64 and each work item can array for 16 values, 64 work items can compute 256 length -// 4 ffts by each work item computing 4 length 4 ffts. +// 4 ffts by each work item computing 4 length 4 ffts. // Similarly for n = 2048 = 8 x 8 x 8 x 4, each work group has 8 x 8 x 4 = 256 work // iterms which each computes 256 (in-parallel) length 8 ffts in-register, followed // by transpose using local memory, followed by 256 length 8 in-register ffts, followed // by transpose using local memory, followed by 256 length 8 in-register ffts, followed // by transpose using local memory, followed by 512 length 4 in-register ffts. Again, // for the last step, each work item computes two length 4 in-register ffts and thus -// 256 work items are needed to compute all 512 ffts. -// For n = 32 = 8 x 4, 4 work items first compute 4 in-register +// 256 work items are needed to compute all 512 ffts. +// For n = 32 = 8 x 4, 4 work items first compute 4 in-register // lenth 8 ffts, followed by transpose using local memory followed by 8 in-register // length 4 ffts, where each work item computes two length 4 ffts thus 4 work items -// can compute 8 length 4 ffts. However if work group size of say 64 is choosen, -// each work group can compute 64/ 4 = 16 size 32 ffts (batched transform). +// can compute 8 length 4 ffts. However if work group size of say 64 is choosen, +// each work group can compute 64/ 4 = 16 size 32 ffts (batched transform). // Users can play with these parameters to figure what gives best performance on // their particular device i.e. some device have less register space thus using -// smaller base radix can avoid spilling ... some has small local memory thus +// smaller base radix can avoid spilling ... some has small local memory thus // using smaller work group size may be required etc -static void +static void getRadixArray(unsigned int n, unsigned int *radixArray, unsigned int *numRadices, unsigned int maxRadix) { - if(maxRadix > 1) - { - maxRadix = min(n, maxRadix); - unsigned int cnt = 0; - while(n > maxRadix) + if (maxRadix > 1) { - radixArray[cnt++] = maxRadix; - n /= maxRadix; + maxRadix = min(n, maxRadix); + unsigned int cnt = 0; + while (n > maxRadix) + { + radixArray[cnt++] = maxRadix; + n /= maxRadix; + } + radixArray[cnt++] = n; + *numRadices = cnt; + return; } - radixArray[cnt++] = n; - *numRadices = cnt; - return; - } - switch(n) - { - case 2: - *numRadices = 1; - radixArray[0] = 2; - break; - - case 4: - *numRadices = 1; - radixArray[0] = 4; - break; - - case 8: - *numRadices = 1; - radixArray[0] = 8; - break; - - case 16: - *numRadices = 2; - radixArray[0] = 8; radixArray[1] = 2; - break; - - case 32: - *numRadices = 2; - radixArray[0] = 8; radixArray[1] = 4; - break; - - case 64: - *numRadices = 2; - radixArray[0] = 8; radixArray[1] = 8; - break; - - case 128: - *numRadices = 3; - radixArray[0] = 8; radixArray[1] = 4; radixArray[2] = 4; - break; - - case 256: - *numRadices = 4; - radixArray[0] = 4; radixArray[1] = 4; radixArray[2] = 4; radixArray[3] = 4; - break; - - case 512: - *numRadices = 3; - radixArray[0] = 8; radixArray[1] = 8; radixArray[2] = 8; - break; - - case 1024: - *numRadices = 3; - radixArray[0] = 16; radixArray[1] = 16; radixArray[2] = 4; - break; - case 2048: - *numRadices = 4; - radixArray[0] = 8; radixArray[1] = 8; radixArray[2] = 8; radixArray[3] = 4; - break; - default: - *numRadices = 0; - return; - } + switch (n) + { + case 2: + *numRadices = 1; + radixArray[0] = 2; + break; + + case 4: + *numRadices = 1; + radixArray[0] = 4; + break; + + case 8: + *numRadices = 1; + radixArray[0] = 8; + break; + + case 16: + *numRadices = 2; + radixArray[0] = 8; + radixArray[1] = 2; + break; + + case 32: + *numRadices = 2; + radixArray[0] = 8; + radixArray[1] = 4; + break; + + case 64: + *numRadices = 2; + radixArray[0] = 8; + radixArray[1] = 8; + break; + + case 128: + *numRadices = 3; + radixArray[0] = 8; + radixArray[1] = 4; + radixArray[2] = 4; + break; + + case 256: + *numRadices = 4; + radixArray[0] = 4; + radixArray[1] = 4; + radixArray[2] = 4; + radixArray[3] = 4; + break; + + case 512: + *numRadices = 3; + radixArray[0] = 8; + radixArray[1] = 8; + radixArray[2] = 8; + break; + + case 1024: + *numRadices = 3; + radixArray[0] = 16; + radixArray[1] = 16; + radixArray[2] = 4; + break; + case 2048: + *numRadices = 4; + radixArray[0] = 8; + radixArray[1] = 8; + radixArray[2] = 8; + radixArray[3] = 4; + break; + default: + *numRadices = 0; + return; + } } static void insertHeader(string &kernelString, string &kernelName, clFFT_DataFormat dataFormat) { - if(dataFormat == clFFT_SplitComplexFormat) - kernelString += string("__kernel void ") + kernelName + string("(__global float *in_real, __global float *in_imag, __global float *out_real, __global float *out_imag, int dir, int S)\n"); - else - kernelString += string("__kernel void ") + kernelName + string("(__global float2 *in, __global float2 *out, int dir, int S)\n"); + if (dataFormat == clFFT_SplitComplexFormat) + kernelString += string("__kernel void ") + kernelName + string("(__global float *in_real, __global float *in_imag, __global float *out_real, __global float *out_imag, int dir, int S)\n"); + else + kernelString += string("__kernel void ") + kernelName + string("(__global float2 *in, __global float2 *out, int dir, int S)\n"); } -static void +static void insertVariables(string &kStream, int maxRadix) { - kStream += string(" int i, j, r, indexIn, indexOut, index, tid, bNum, xNum, k, l;\n"); + kStream += string(" int i, j, r, indexIn, indexOut, index, tid, bNum, xNum, k, l;\n"); kStream += string(" int s, ii, jj, offset;\n"); - kStream += string(" float2 w;\n"); - kStream += string(" float ang, angf, ang1;\n"); + kStream += string(" float2 w;\n"); + kStream += string(" float ang, angf, ang1;\n"); kStream += string(" __local float *lMemStore, *lMemLoad;\n"); - kStream += string(" float2 a[") + num2str(maxRadix) + string("];\n"); + kStream += string(" float2 a[") + num2str(maxRadix) + string("];\n"); kStream += string(" int lId = get_local_id( 0 );\n"); kStream += string(" int groupId = get_group_id( 0 );\n"); } @@ -202,1056 +217,1065 @@ insertVariables(string &kStream, int maxRadix) static void formattedLoad(string &kernelString, int aIndex, int gIndex, clFFT_DataFormat dataFormat) { - if(dataFormat == clFFT_InterleavedComplexFormat) - kernelString += string(" a[") + num2str(aIndex) + string("] = in[") + num2str(gIndex) + string("];\n"); - else - { - kernelString += string(" a[") + num2str(aIndex) + string("].x = in_real[") + num2str(gIndex) + string("];\n"); - kernelString += string(" a[") + num2str(aIndex) + string("].y = in_imag[") + num2str(gIndex) + string("];\n"); - } + if (dataFormat == clFFT_InterleavedComplexFormat) + kernelString += string(" a[") + num2str(aIndex) + string("] = in[") + num2str(gIndex) + string("];\n"); + else + { + kernelString += string(" a[") + num2str(aIndex) + string("].x = in_real[") + num2str(gIndex) + string("];\n"); + kernelString += string(" a[") + num2str(aIndex) + string("].y = in_imag[") + num2str(gIndex) + string("];\n"); + } } static void formattedStore(string &kernelString, int aIndex, int gIndex, clFFT_DataFormat dataFormat) { - if(dataFormat == clFFT_InterleavedComplexFormat) - kernelString += string(" out[") + num2str(gIndex) + string("] = a[") + num2str(aIndex) + string("];\n"); - else - { - kernelString += string(" out_real[") + num2str(gIndex) + string("] = a[") + num2str(aIndex) + string("].x;\n"); - kernelString += string(" out_imag[") + num2str(gIndex) + string("] = a[") + num2str(aIndex) + string("].y;\n"); - } + if (dataFormat == clFFT_InterleavedComplexFormat) + kernelString += string(" out[") + num2str(gIndex) + string("] = a[") + num2str(aIndex) + string("];\n"); + else + { + kernelString += string(" out_real[") + num2str(gIndex) + string("] = a[") + num2str(aIndex) + string("].x;\n"); + kernelString += string(" out_imag[") + num2str(gIndex) + string("] = a[") + num2str(aIndex) + string("].y;\n"); + } } static int insertGlobalLoadsAndTranspose(string &kernelString, int N, int numWorkItemsPerXForm, int numXFormsPerWG, int R0, int mem_coalesce_width, clFFT_DataFormat dataFormat) { - int log2NumWorkItemsPerXForm = (int) log2(numWorkItemsPerXForm); - int groupSize = numWorkItemsPerXForm * numXFormsPerWG; - int i, j; - int lMemSize = 0; - - if(numXFormsPerWG > 1) - kernelString += string(" s = S & ") + num2str(numXFormsPerWG - 1) + string(";\n"); - - if(numWorkItemsPerXForm >= mem_coalesce_width) - { - if(numXFormsPerWG > 1) - { - kernelString += string(" ii = lId & ") + num2str(numWorkItemsPerXForm-1) + string(";\n"); - kernelString += string(" jj = lId >> ") + num2str(log2NumWorkItemsPerXForm) + string(";\n"); - kernelString += string(" if( !s || (groupId < get_num_groups(0)-1) || (jj < s) ) {\n"); - kernelString += string(" offset = mad24( mad24(groupId, ") + num2str(numXFormsPerWG) + string(", jj), ") + num2str(N) + string(", ii );\n"); - if(dataFormat == clFFT_InterleavedComplexFormat) - { - kernelString += string(" in += offset;\n"); - kernelString += string(" out += offset;\n"); - } - else - { - kernelString += string(" in_real += offset;\n"); - kernelString += string(" in_imag += offset;\n"); - kernelString += string(" out_real += offset;\n"); - kernelString += string(" out_imag += offset;\n"); - } - for(i = 0; i < R0; i++) - formattedLoad(kernelString, i, i*numWorkItemsPerXForm, dataFormat); - kernelString += string(" }\n"); - } - else - { - kernelString += string(" ii = lId;\n"); - kernelString += string(" jj = 0;\n"); - kernelString += string(" offset = mad24(groupId, ") + num2str(N) + string(", ii);\n"); - if(dataFormat == clFFT_InterleavedComplexFormat) - { - kernelString += string(" in += offset;\n"); - kernelString += string(" out += offset;\n"); - } - else - { - kernelString += string(" in_real += offset;\n"); - kernelString += string(" in_imag += offset;\n"); - kernelString += string(" out_real += offset;\n"); - kernelString += string(" out_imag += offset;\n"); - } - for(i = 0; i < R0; i++) - formattedLoad(kernelString, i, i*numWorkItemsPerXForm, dataFormat); - } - } - else if( N >= mem_coalesce_width ) - { - int numInnerIter = N / mem_coalesce_width; - int numOuterIter = numXFormsPerWG / ( groupSize / mem_coalesce_width ); - - kernelString += string(" ii = lId & ") + num2str(mem_coalesce_width - 1) + string(";\n"); - kernelString += string(" jj = lId >> ") + num2str((int)log2(mem_coalesce_width)) + string(";\n"); - kernelString += string(" lMemStore = sMem + mad24( jj, ") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); - kernelString += string(" offset = mad24( groupId, ") + num2str(numXFormsPerWG) + string(", jj);\n"); - kernelString += string(" offset = mad24( offset, ") + num2str(N) + string(", ii );\n"); - if(dataFormat == clFFT_InterleavedComplexFormat) - { - kernelString += string(" in += offset;\n"); - kernelString += string(" out += offset;\n"); - } - else - { - kernelString += string(" in_real += offset;\n"); - kernelString += string(" in_imag += offset;\n"); - kernelString += string(" out_real += offset;\n"); - kernelString += string(" out_imag += offset;\n"); - } - - kernelString += string("if((groupId == get_num_groups(0)-1) && s) {\n"); - for(i = 0; i < numOuterIter; i++ ) - { - kernelString += string(" if( jj < s ) {\n"); - for(j = 0; j < numInnerIter; j++ ) - formattedLoad(kernelString, i * numInnerIter + j, j * mem_coalesce_width + i * ( groupSize / mem_coalesce_width ) * N, dataFormat); - kernelString += string(" }\n"); - if(i != numOuterIter - 1) - kernelString += string(" jj += ") + num2str(groupSize / mem_coalesce_width) + string(";\n"); - } - kernelString += string("}\n "); - kernelString += string("else {\n"); - for(i = 0; i < numOuterIter; i++ ) - { - for(j = 0; j < numInnerIter; j++ ) - formattedLoad(kernelString, i * numInnerIter + j, j * mem_coalesce_width + i * ( groupSize / mem_coalesce_width ) * N, dataFormat); - } - kernelString += string("}\n"); - - kernelString += string(" ii = lId & ") + num2str(numWorkItemsPerXForm - 1) + string(";\n"); - kernelString += string(" jj = lId >> ") + num2str(log2NumWorkItemsPerXForm) + string(";\n"); - kernelString += string(" lMemLoad = sMem + mad24( jj, ") + num2str(N + numWorkItemsPerXForm) + string(", ii);\n"); - - for( i = 0; i < numOuterIter; i++ ) - { - for( j = 0; j < numInnerIter; j++ ) - { - kernelString += string(" lMemStore[") + num2str(j * mem_coalesce_width + i * ( groupSize / mem_coalesce_width ) * (N + numWorkItemsPerXForm )) + string("] = a[") + - num2str(i * numInnerIter + j) + string("].x;\n"); - } - } - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - for( i = 0; i < R0; i++ ) - kernelString += string(" a[") + num2str(i) + string("].x = lMemLoad[") + num2str(i * numWorkItemsPerXForm) + string("];\n"); - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + int log2NumWorkItemsPerXForm = (int)log2(numWorkItemsPerXForm); + int groupSize = numWorkItemsPerXForm * numXFormsPerWG; + int i, j; + int lMemSize = 0; - for( i = 0; i < numOuterIter; i++ ) - { - for( j = 0; j < numInnerIter; j++ ) - { - kernelString += string(" lMemStore[") + num2str(j * mem_coalesce_width + i * ( groupSize / mem_coalesce_width ) * (N + numWorkItemsPerXForm )) + string("] = a[") + - num2str(i * numInnerIter + j) + string("].y;\n"); - } - } - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - for( i = 0; i < R0; i++ ) - kernelString += string(" a[") + num2str(i) + string("].y = lMemLoad[") + num2str(i * numWorkItemsPerXForm) + string("];\n"); - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - lMemSize = (N + numWorkItemsPerXForm) * numXFormsPerWG; - } - else - { - kernelString += string(" offset = mad24( groupId, ") + num2str(N * numXFormsPerWG) + string(", lId );\n"); - if(dataFormat == clFFT_InterleavedComplexFormat) - { - kernelString += string(" in += offset;\n"); - kernelString += string(" out += offset;\n"); - } - else - { - kernelString += string(" in_real += offset;\n"); - kernelString += string(" in_imag += offset;\n"); - kernelString += string(" out_real += offset;\n"); - kernelString += string(" out_imag += offset;\n"); - } - - kernelString += string(" ii = lId & ") + num2str(N-1) + string(";\n"); - kernelString += string(" jj = lId >> ") + num2str((int)log2(N)) + string(";\n"); - kernelString += string(" lMemStore = sMem + mad24( jj, ") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); - - kernelString += string("if((groupId == get_num_groups(0)-1) && s) {\n"); - for( i = 0; i < R0; i++ ) + if (numXFormsPerWG > 1) + kernelString += string(" s = S & ") + num2str(numXFormsPerWG - 1) + string(";\n"); + + if (numWorkItemsPerXForm >= mem_coalesce_width) { - kernelString += string(" if(jj < s )\n"); - formattedLoad(kernelString, i, i*groupSize, dataFormat); - if(i != R0 - 1) - kernelString += string(" jj += ") + num2str(groupSize / N) + string(";\n"); + if (numXFormsPerWG > 1) + { + kernelString += string(" ii = lId & ") + num2str(numWorkItemsPerXForm - 1) + string(";\n"); + kernelString += string(" jj = lId >> ") + num2str(log2NumWorkItemsPerXForm) + string(";\n"); + kernelString += string(" if( !s || (groupId < get_num_groups(0)-1) || (jj < s) ) {\n"); + kernelString += string(" offset = mad24( mad24(groupId, ") + num2str(numXFormsPerWG) + string(", jj), ") + num2str(N) + string(", ii );\n"); + if (dataFormat == clFFT_InterleavedComplexFormat) + { + kernelString += string(" in += offset;\n"); + kernelString += string(" out += offset;\n"); + } + else + { + kernelString += string(" in_real += offset;\n"); + kernelString += string(" in_imag += offset;\n"); + kernelString += string(" out_real += offset;\n"); + kernelString += string(" out_imag += offset;\n"); + } + for (i = 0; i < R0; i++) + formattedLoad(kernelString, i, i * numWorkItemsPerXForm, dataFormat); + kernelString += string(" }\n"); + } + else + { + kernelString += string(" ii = lId;\n"); + kernelString += string(" jj = 0;\n"); + kernelString += string(" offset = mad24(groupId, ") + num2str(N) + string(", ii);\n"); + if (dataFormat == clFFT_InterleavedComplexFormat) + { + kernelString += string(" in += offset;\n"); + kernelString += string(" out += offset;\n"); + } + else + { + kernelString += string(" in_real += offset;\n"); + kernelString += string(" in_imag += offset;\n"); + kernelString += string(" out_real += offset;\n"); + kernelString += string(" out_imag += offset;\n"); + } + for (i = 0; i < R0; i++) + formattedLoad(kernelString, i, i * numWorkItemsPerXForm, dataFormat); + } } - kernelString += string("}\n"); - kernelString += string("else {\n"); - for( i = 0; i < R0; i++ ) + else if (N >= mem_coalesce_width) { - formattedLoad(kernelString, i, i*groupSize, dataFormat); - } - kernelString += string("}\n"); - - if(numWorkItemsPerXForm > 1) - { + int numInnerIter = N / mem_coalesce_width; + int numOuterIter = numXFormsPerWG / (groupSize / mem_coalesce_width); + + kernelString += string(" ii = lId & ") + num2str(mem_coalesce_width - 1) + string(";\n"); + kernelString += string(" jj = lId >> ") + num2str((int)log2(mem_coalesce_width)) + string(";\n"); + kernelString += string(" lMemStore = sMem + mad24( jj, ") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); + kernelString += string(" offset = mad24( groupId, ") + num2str(numXFormsPerWG) + string(", jj);\n"); + kernelString += string(" offset = mad24( offset, ") + num2str(N) + string(", ii );\n"); + if (dataFormat == clFFT_InterleavedComplexFormat) + { + kernelString += string(" in += offset;\n"); + kernelString += string(" out += offset;\n"); + } + else + { + kernelString += string(" in_real += offset;\n"); + kernelString += string(" in_imag += offset;\n"); + kernelString += string(" out_real += offset;\n"); + kernelString += string(" out_imag += offset;\n"); + } + + kernelString += string("if((groupId == get_num_groups(0)-1) && s) {\n"); + for (i = 0; i < numOuterIter; i++) + { + kernelString += string(" if( jj < s ) {\n"); + for (j = 0; j < numInnerIter; j++) + formattedLoad(kernelString, i * numInnerIter + j, j * mem_coalesce_width + i * (groupSize / mem_coalesce_width) * N, dataFormat); + kernelString += string(" }\n"); + if (i != numOuterIter - 1) + kernelString += string(" jj += ") + num2str(groupSize / mem_coalesce_width) + string(";\n"); + } + kernelString += string("}\n "); + kernelString += string("else {\n"); + for (i = 0; i < numOuterIter; i++) + { + for (j = 0; j < numInnerIter; j++) + formattedLoad(kernelString, i * numInnerIter + j, j * mem_coalesce_width + i * (groupSize / mem_coalesce_width) * N, dataFormat); + } + kernelString += string("}\n"); + kernelString += string(" ii = lId & ") + num2str(numWorkItemsPerXForm - 1) + string(";\n"); kernelString += string(" jj = lId >> ") + num2str(log2NumWorkItemsPerXForm) + string(";\n"); - kernelString += string(" lMemLoad = sMem + mad24( jj, ") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); - } - else - { - kernelString += string(" ii = 0;\n"); - kernelString += string(" jj = lId;\n"); - kernelString += string(" lMemLoad = sMem + mul24( jj, ") + num2str(N + numWorkItemsPerXForm) + string(");\n"); - } + kernelString += string(" lMemLoad = sMem + mad24( jj, ") + num2str(N + numWorkItemsPerXForm) + string(", ii);\n"); - - for( i = 0; i < R0; i++ ) - kernelString += string(" lMemStore[") + num2str(i * ( groupSize / N ) * ( N + numWorkItemsPerXForm )) + string("] = a[") + num2str(i) + string("].x;\n"); - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - for( i = 0; i < R0; i++ ) - kernelString += string(" a[") + num2str(i) + string("].x = lMemLoad[") + num2str(i * numWorkItemsPerXForm) + string("];\n"); - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - for( i = 0; i < R0; i++ ) - kernelString += string(" lMemStore[") + num2str(i * ( groupSize / N ) * ( N + numWorkItemsPerXForm )) + string("] = a[") + num2str(i) + string("].y;\n"); - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - for( i = 0; i < R0; i++ ) - kernelString += string(" a[") + num2str(i) + string("].y = lMemLoad[") + num2str(i * numWorkItemsPerXForm) + string("];\n"); - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - lMemSize = (N + numWorkItemsPerXForm) * numXFormsPerWG; - } - - return lMemSize; + for (i = 0; i < numOuterIter; i++) + { + for (j = 0; j < numInnerIter; j++) + { + kernelString += string(" lMemStore[") + num2str(j * mem_coalesce_width + i * (groupSize / mem_coalesce_width) * (N + numWorkItemsPerXForm)) + string("] = a[") + + num2str(i * numInnerIter + j) + string("].x;\n"); + } + } + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + for (i = 0; i < R0; i++) + kernelString += string(" a[") + num2str(i) + string("].x = lMemLoad[") + num2str(i * numWorkItemsPerXForm) + string("];\n"); + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + for (i = 0; i < numOuterIter; i++) + { + for (j = 0; j < numInnerIter; j++) + { + kernelString += string(" lMemStore[") + num2str(j * mem_coalesce_width + i * (groupSize / mem_coalesce_width) * (N + numWorkItemsPerXForm)) + string("] = a[") + + num2str(i * numInnerIter + j) + string("].y;\n"); + } + } + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + for (i = 0; i < R0; i++) + kernelString += string(" a[") + num2str(i) + string("].y = lMemLoad[") + num2str(i * numWorkItemsPerXForm) + string("];\n"); + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + lMemSize = (N + numWorkItemsPerXForm) * numXFormsPerWG; + } + else + { + kernelString += string(" offset = mad24( groupId, ") + num2str(N * numXFormsPerWG) + string(", lId );\n"); + if (dataFormat == clFFT_InterleavedComplexFormat) + { + kernelString += string(" in += offset;\n"); + kernelString += string(" out += offset;\n"); + } + else + { + kernelString += string(" in_real += offset;\n"); + kernelString += string(" in_imag += offset;\n"); + kernelString += string(" out_real += offset;\n"); + kernelString += string(" out_imag += offset;\n"); + } + + kernelString += string(" ii = lId & ") + num2str(N - 1) + string(";\n"); + kernelString += string(" jj = lId >> ") + num2str((int)log2(N)) + string(";\n"); + kernelString += string(" lMemStore = sMem + mad24( jj, ") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); + + kernelString += string("if((groupId == get_num_groups(0)-1) && s) {\n"); + for (i = 0; i < R0; i++) + { + kernelString += string(" if(jj < s )\n"); + formattedLoad(kernelString, i, i * groupSize, dataFormat); + if (i != R0 - 1) + kernelString += string(" jj += ") + num2str(groupSize / N) + string(";\n"); + } + kernelString += string("}\n"); + kernelString += string("else {\n"); + for (i = 0; i < R0; i++) + { + formattedLoad(kernelString, i, i * groupSize, dataFormat); + } + kernelString += string("}\n"); + + if (numWorkItemsPerXForm > 1) + { + kernelString += string(" ii = lId & ") + num2str(numWorkItemsPerXForm - 1) + string(";\n"); + kernelString += string(" jj = lId >> ") + num2str(log2NumWorkItemsPerXForm) + string(";\n"); + kernelString += string(" lMemLoad = sMem + mad24( jj, ") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); + } + else + { + kernelString += string(" ii = 0;\n"); + kernelString += string(" jj = lId;\n"); + kernelString += string(" lMemLoad = sMem + mul24( jj, ") + num2str(N + numWorkItemsPerXForm) + string(");\n"); + } + + + for (i = 0; i < R0; i++) + kernelString += string(" lMemStore[") + num2str(i * (groupSize / N) * (N + numWorkItemsPerXForm)) + string("] = a[") + num2str(i) + string("].x;\n"); + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + for (i = 0; i < R0; i++) + kernelString += string(" a[") + num2str(i) + string("].x = lMemLoad[") + num2str(i * numWorkItemsPerXForm) + string("];\n"); + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + for (i = 0; i < R0; i++) + kernelString += string(" lMemStore[") + num2str(i * (groupSize / N) * (N + numWorkItemsPerXForm)) + string("] = a[") + num2str(i) + string("].y;\n"); + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + for (i = 0; i < R0; i++) + kernelString += string(" a[") + num2str(i) + string("].y = lMemLoad[") + num2str(i * numWorkItemsPerXForm) + string("];\n"); + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + lMemSize = (N + numWorkItemsPerXForm) * numXFormsPerWG; + } + + return lMemSize; } static int insertGlobalStoresAndTranspose(string &kernelString, int N, int maxRadix, int Nr, int numWorkItemsPerXForm, int numXFormsPerWG, int mem_coalesce_width, clFFT_DataFormat dataFormat) { - int groupSize = numWorkItemsPerXForm * numXFormsPerWG; - int i, j, k, ind; - int lMemSize = 0; - int numIter = maxRadix / Nr; - string indent = string(""); - - if( numWorkItemsPerXForm >= mem_coalesce_width ) - { - if(numXFormsPerWG > 1) - { - kernelString += string(" if( !s || (groupId < get_num_groups(0)-1) || (jj < s) ) {\n"); - indent = string(" "); - } - for(i = 0; i < maxRadix; i++) - { - j = i % numIter; - k = i / numIter; - ind = j * Nr + k; - formattedStore(kernelString, ind, i*numWorkItemsPerXForm, dataFormat); - } - if(numXFormsPerWG > 1) - kernelString += string(" }\n"); - } - else if( N >= mem_coalesce_width ) - { - int numInnerIter = N / mem_coalesce_width; - int numOuterIter = numXFormsPerWG / ( groupSize / mem_coalesce_width ); - - kernelString += string(" lMemLoad = sMem + mad24( jj, ") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); - kernelString += string(" ii = lId & ") + num2str(mem_coalesce_width - 1) + string(";\n"); - kernelString += string(" jj = lId >> ") + num2str((int)log2(mem_coalesce_width)) + string(";\n"); - kernelString += string(" lMemStore = sMem + mad24( jj,") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); - - for( i = 0; i < maxRadix; i++ ) - { - j = i % numIter; - k = i / numIter; - ind = j * Nr + k; - kernelString += string(" lMemLoad[") + num2str(i*numWorkItemsPerXForm) + string("] = a[") + num2str(ind) + string("].x;\n"); - } - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - for( i = 0; i < numOuterIter; i++ ) - for( j = 0; j < numInnerIter; j++ ) - kernelString += string(" a[") + num2str(i*numInnerIter + j) + string("].x = lMemStore[") + num2str(j*mem_coalesce_width + i*( groupSize / mem_coalesce_width )*(N + numWorkItemsPerXForm)) + string("];\n"); - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - for( i = 0; i < maxRadix; i++ ) - { - j = i % numIter; - k = i / numIter; - ind = j * Nr + k; - kernelString += string(" lMemLoad[") + num2str(i*numWorkItemsPerXForm) + string("] = a[") + num2str(ind) + string("].y;\n"); - } - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - for( i = 0; i < numOuterIter; i++ ) - for( j = 0; j < numInnerIter; j++ ) - kernelString += string(" a[") + num2str(i*numInnerIter + j) + string("].y = lMemStore[") + num2str(j*mem_coalesce_width + i*( groupSize / mem_coalesce_width )*(N + numWorkItemsPerXForm)) + string("];\n"); - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - kernelString += string("if((groupId == get_num_groups(0)-1) && s) {\n"); - for(i = 0; i < numOuterIter; i++ ) + int groupSize = numWorkItemsPerXForm * numXFormsPerWG; + int i, j, k, ind; + int lMemSize = 0; + int numIter = maxRadix / Nr; + string indent = string(""); + + if (numWorkItemsPerXForm >= mem_coalesce_width) { - kernelString += string(" if( jj < s ) {\n"); - for(j = 0; j < numInnerIter; j++ ) - formattedStore(kernelString, i*numInnerIter + j, j*mem_coalesce_width + i*(groupSize/mem_coalesce_width)*N, dataFormat); - kernelString += string(" }\n"); - if(i != numOuterIter - 1) - kernelString += string(" jj += ") + num2str(groupSize / mem_coalesce_width) + string(";\n"); + if (numXFormsPerWG > 1) + { + kernelString += string(" if( !s || (groupId < get_num_groups(0)-1) || (jj < s) ) {\n"); + indent = string(" "); + } + for (i = 0; i < maxRadix; i++) + { + j = i % numIter; + k = i / numIter; + ind = j * Nr + k; + formattedStore(kernelString, ind, i * numWorkItemsPerXForm, dataFormat); + } + if (numXFormsPerWG > 1) + kernelString += string(" }\n"); } - kernelString += string("}\n"); - kernelString += string("else {\n"); - for(i = 0; i < numOuterIter; i++ ) + else if (N >= mem_coalesce_width) { - for(j = 0; j < numInnerIter; j++ ) - formattedStore(kernelString, i*numInnerIter + j, j*mem_coalesce_width + i*(groupSize/mem_coalesce_width)*N, dataFormat); - } - kernelString += string("}\n"); - - lMemSize = (N + numWorkItemsPerXForm) * numXFormsPerWG; - } + int numInnerIter = N / mem_coalesce_width; + int numOuterIter = numXFormsPerWG / (groupSize / mem_coalesce_width); + + kernelString += string(" lMemLoad = sMem + mad24( jj, ") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); + kernelString += string(" ii = lId & ") + num2str(mem_coalesce_width - 1) + string(";\n"); + kernelString += string(" jj = lId >> ") + num2str((int)log2(mem_coalesce_width)) + string(";\n"); + kernelString += string(" lMemStore = sMem + mad24( jj,") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); + + for (i = 0; i < maxRadix; i++) + { + j = i % numIter; + k = i / numIter; + ind = j * Nr + k; + kernelString += string(" lMemLoad[") + num2str(i * numWorkItemsPerXForm) + string("] = a[") + num2str(ind) + string("].x;\n"); + } + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + for (i = 0; i < numOuterIter; i++) + for (j = 0; j < numInnerIter; j++) + kernelString += string(" a[") + num2str(i * numInnerIter + j) + string("].x = lMemStore[") + num2str(j * mem_coalesce_width + i * (groupSize / mem_coalesce_width) * (N + numWorkItemsPerXForm)) + string("];\n"); + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + for (i = 0; i < maxRadix; i++) + { + j = i % numIter; + k = i / numIter; + ind = j * Nr + k; + kernelString += string(" lMemLoad[") + num2str(i * numWorkItemsPerXForm) + string("] = a[") + num2str(ind) + string("].y;\n"); + } + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + for (i = 0; i < numOuterIter; i++) + for (j = 0; j < numInnerIter; j++) + kernelString += string(" a[") + num2str(i * numInnerIter + j) + string("].y = lMemStore[") + num2str(j * mem_coalesce_width + i * (groupSize / mem_coalesce_width) * (N + numWorkItemsPerXForm)) + string("];\n"); + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + kernelString += string("if((groupId == get_num_groups(0)-1) && s) {\n"); + for (i = 0; i < numOuterIter; i++) + { + kernelString += string(" if( jj < s ) {\n"); + for (j = 0; j < numInnerIter; j++) + formattedStore(kernelString, i * numInnerIter + j, j * mem_coalesce_width + i * (groupSize / mem_coalesce_width) * N, dataFormat); + kernelString += string(" }\n"); + if (i != numOuterIter - 1) + kernelString += string(" jj += ") + num2str(groupSize / mem_coalesce_width) + string(";\n"); + } + kernelString += string("}\n"); + kernelString += string("else {\n"); + for (i = 0; i < numOuterIter; i++) + { + for (j = 0; j < numInnerIter; j++) + formattedStore(kernelString, i * numInnerIter + j, j * mem_coalesce_width + i * (groupSize / mem_coalesce_width) * N, dataFormat); + } + kernelString += string("}\n"); + + lMemSize = (N + numWorkItemsPerXForm) * numXFormsPerWG; + } else - { - kernelString += string(" lMemLoad = sMem + mad24( jj,") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); - - kernelString += string(" ii = lId & ") + num2str(N - 1) + string(";\n"); - kernelString += string(" jj = lId >> ") + num2str((int) log2(N)) + string(";\n"); - kernelString += string(" lMemStore = sMem + mad24( jj,") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); - - for( i = 0; i < maxRadix; i++ ) - { - j = i % numIter; - k = i / numIter; - ind = j * Nr + k; - kernelString += string(" lMemLoad[") + num2str(i*numWorkItemsPerXForm) + string("] = a[") + num2str(ind) + string("].x;\n"); - } - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - for( i = 0; i < maxRadix; i++ ) - kernelString += string(" a[") + num2str(i) + string("].x = lMemStore[") + num2str(i*( groupSize / N )*( N + numWorkItemsPerXForm )) + string("];\n"); - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - for( i = 0; i < maxRadix; i++ ) - { - j = i % numIter; - k = i / numIter; - ind = j * Nr + k; - kernelString += string(" lMemLoad[") + num2str(i*numWorkItemsPerXForm) + string("] = a[") + num2str(ind) + string("].y;\n"); - } - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - for( i = 0; i < maxRadix; i++ ) - kernelString += string(" a[") + num2str(i) + string("].y = lMemStore[") + num2str(i*( groupSize / N )*( N + numWorkItemsPerXForm )) + string("];\n"); - kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); - - kernelString += string("if((groupId == get_num_groups(0)-1) && s) {\n"); - for( i = 0; i < maxRadix; i++ ) { - kernelString += string(" if(jj < s ) {\n"); - formattedStore(kernelString, i, i*groupSize, dataFormat); - kernelString += string(" }\n"); - if( i != maxRadix - 1) - kernelString += string(" jj +=") + num2str(groupSize / N) + string(";\n"); - } - kernelString += string("}\n"); - kernelString += string("else {\n"); - for( i = 0; i < maxRadix; i++ ) - { - formattedStore(kernelString, i, i*groupSize, dataFormat); - } - kernelString += string("}\n"); - - lMemSize = (N + numWorkItemsPerXForm) * numXFormsPerWG; - } - - return lMemSize; + kernelString += string(" lMemLoad = sMem + mad24( jj,") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); + + kernelString += string(" ii = lId & ") + num2str(N - 1) + string(";\n"); + kernelString += string(" jj = lId >> ") + num2str((int)log2(N)) + string(";\n"); + kernelString += string(" lMemStore = sMem + mad24( jj,") + num2str(N + numWorkItemsPerXForm) + string(", ii );\n"); + + for (i = 0; i < maxRadix; i++) + { + j = i % numIter; + k = i / numIter; + ind = j * Nr + k; + kernelString += string(" lMemLoad[") + num2str(i * numWorkItemsPerXForm) + string("] = a[") + num2str(ind) + string("].x;\n"); + } + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + for (i = 0; i < maxRadix; i++) + kernelString += string(" a[") + num2str(i) + string("].x = lMemStore[") + num2str(i * (groupSize / N) * (N + numWorkItemsPerXForm)) + string("];\n"); + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + for (i = 0; i < maxRadix; i++) + { + j = i % numIter; + k = i / numIter; + ind = j * Nr + k; + kernelString += string(" lMemLoad[") + num2str(i * numWorkItemsPerXForm) + string("] = a[") + num2str(ind) + string("].y;\n"); + } + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + for (i = 0; i < maxRadix; i++) + kernelString += string(" a[") + num2str(i) + string("].y = lMemStore[") + num2str(i * (groupSize / N) * (N + numWorkItemsPerXForm)) + string("];\n"); + kernelString += string(" barrier( CLK_LOCAL_MEM_FENCE );\n"); + + kernelString += string("if((groupId == get_num_groups(0)-1) && s) {\n"); + for (i = 0; i < maxRadix; i++) + { + kernelString += string(" if(jj < s ) {\n"); + formattedStore(kernelString, i, i * groupSize, dataFormat); + kernelString += string(" }\n"); + if (i != maxRadix - 1) + kernelString += string(" jj +=") + num2str(groupSize / N) + string(";\n"); + } + kernelString += string("}\n"); + kernelString += string("else {\n"); + for (i = 0; i < maxRadix; i++) + { + formattedStore(kernelString, i, i * groupSize, dataFormat); + } + kernelString += string("}\n"); + + lMemSize = (N + numWorkItemsPerXForm) * numXFormsPerWG; + } + + return lMemSize; } -static void +static void insertfftKernel(string &kernelString, int Nr, int numIter) { - int i; - for(i = 0; i < numIter; i++) - { - kernelString += string(" fftKernel") + num2str(Nr) + string("(a+") + num2str(i*Nr) + string(", dir);\n"); - } + int i; + for (i = 0; i < numIter; i++) + { + kernelString += string(" fftKernel") + num2str(Nr) + string("(a+") + num2str(i * Nr) + string(", dir);\n"); + } } static void insertTwiddleKernel(string &kernelString, int Nr, int numIter, int Nprev, int len, int numWorkItemsPerXForm) { - int z, k; - int logNPrev = (int)log2(Nprev); - - for(z = 0; z < numIter; z++) - { - if(z == 0) - { - if(Nprev > 1) - kernelString += string(" angf = (float) (ii >> ") + num2str(logNPrev) + string(");\n"); - else - kernelString += string(" angf = (float) ii;\n"); - } - else - { - if(Nprev > 1) - kernelString += string(" angf = (float) ((") + num2str(z*numWorkItemsPerXForm) + string(" + ii) >>") + num2str(logNPrev) + string(");\n"); - else - kernelString += string(" angf = (float) (") + num2str(z*numWorkItemsPerXForm) + string(" + ii);\n"); - } - - for(k = 1; k < Nr; k++) { - int ind = z*Nr + k; - //float fac = (float) (2.0 * M_PI * (double) k / (double) len); - kernelString += string(" ang = dir * ( 2.0f * M_PI * ") + num2str(k) + string(".0f / ") + num2str(len) + string(".0f )") + string(" * angf;\n"); - kernelString += string(" w = (float2)(native_cos(ang), native_sin(ang));\n"); - kernelString += string(" a[") + num2str(ind) + string("] = complexMul(a[") + num2str(ind) + string("], w);\n"); - } - } + int z, k; + int logNPrev = (int)log2(Nprev); + + for (z = 0; z < numIter; z++) + { + if (z == 0) + { + if (Nprev > 1) + kernelString += string(" angf = (float) (ii >> ") + num2str(logNPrev) + string(");\n"); + else + kernelString += string(" angf = (float) ii;\n"); + } + else + { + if (Nprev > 1) + kernelString += string(" angf = (float) ((") + num2str(z * numWorkItemsPerXForm) + string(" + ii) >>") + num2str(logNPrev) + string(");\n"); + else + kernelString += string(" angf = (float) (") + num2str(z * numWorkItemsPerXForm) + string(" + ii);\n"); + } + + for (k = 1; k < Nr; k++) + { + int ind = z * Nr + k; + //float fac = (float) (2.0 * M_PI * (double) k / (double) len); + kernelString += string(" ang = dir * ( 2.0f * M_PI * ") + num2str(k) + string(".0f / ") + num2str(len) + string(".0f )") + string(" * angf;\n"); + kernelString += string(" w = (float2)(native_cos(ang), native_sin(ang));\n"); + kernelString += string(" a[") + num2str(ind) + string("] = complexMul(a[") + num2str(ind) + string("], w);\n"); + } + } } static int getPadding(int numWorkItemsPerXForm, int Nprev, int numWorkItemsReq, int numXFormsPerWG, int Nr, int numBanks, int *offset, int *midPad) { - if((numWorkItemsPerXForm <= Nprev) || (Nprev >= numBanks)) - *offset = 0; - else { - int numRowsReq = ((numWorkItemsPerXForm < numBanks) ? numWorkItemsPerXForm : numBanks) / Nprev; - int numColsReq = 1; - if(numRowsReq > Nr) - numColsReq = numRowsReq / Nr; - numColsReq = Nprev * numColsReq; - *offset = numColsReq; - } - - if(numWorkItemsPerXForm >= numBanks || numXFormsPerWG == 1) - *midPad = 0; - else { - int bankNum = ( (numWorkItemsReq + *offset) * Nr ) & (numBanks - 1); - if( bankNum >= numWorkItemsPerXForm ) - *midPad = 0; - else - *midPad = numWorkItemsPerXForm - bankNum; - } - - int lMemSize = ( numWorkItemsReq + *offset) * Nr * numXFormsPerWG + *midPad * (numXFormsPerWG - 1); - return lMemSize; + if ((numWorkItemsPerXForm <= Nprev) || (Nprev >= numBanks)) + *offset = 0; + else + { + int numRowsReq = ((numWorkItemsPerXForm < numBanks) ? numWorkItemsPerXForm : numBanks) / Nprev; + int numColsReq = 1; + if (numRowsReq > Nr) + numColsReq = numRowsReq / Nr; + numColsReq = Nprev * numColsReq; + *offset = numColsReq; + } + + if (numWorkItemsPerXForm >= numBanks || numXFormsPerWG == 1) + *midPad = 0; + else + { + int bankNum = ((numWorkItemsReq + *offset) * Nr) & (numBanks - 1); + if (bankNum >= numWorkItemsPerXForm) + *midPad = 0; + else + *midPad = numWorkItemsPerXForm - bankNum; + } + + int lMemSize = (numWorkItemsReq + *offset) * Nr * numXFormsPerWG + *midPad * (numXFormsPerWG - 1); + return lMemSize; } -static void +static void insertLocalStores(string &kernelString, int numIter, int Nr, int numWorkItemsPerXForm, int numWorkItemsReq, int offset, string &comp) { - int z, k; + int z, k; - for(z = 0; z < numIter; z++) { - for(k = 0; k < Nr; k++) { - int index = k*(numWorkItemsReq + offset) + z*numWorkItemsPerXForm; - kernelString += string(" lMemStore[") + num2str(index) + string("] = a[") + num2str(z*Nr + k) + string("].") + comp + string(";\n"); - } - } - kernelString += string(" barrier(CLK_LOCAL_MEM_FENCE);\n"); + for (z = 0; z < numIter; z++) + { + for (k = 0; k < Nr; k++) + { + int index = k * (numWorkItemsReq + offset) + z * numWorkItemsPerXForm; + kernelString += string(" lMemStore[") + num2str(index) + string("] = a[") + num2str(z * Nr + k) + string("].") + comp + string(";\n"); + } + } + kernelString += string(" barrier(CLK_LOCAL_MEM_FENCE);\n"); } -static void +static void insertLocalLoads(string &kernelString, int n, int Nr, int Nrn, int Nprev, int Ncurr, int numWorkItemsPerXForm, int numWorkItemsReq, int offset, string &comp) { - int numWorkItemsReqN = n / Nrn; - int interBlockHNum = max( Nprev / numWorkItemsPerXForm, 1 ); - int interBlockHStride = numWorkItemsPerXForm; - int vertWidth = max(numWorkItemsPerXForm / Nprev, 1); - vertWidth = min( vertWidth, Nr); - int vertNum = Nr / vertWidth; - int vertStride = ( n / Nr + offset ) * vertWidth; - int iter = max( numWorkItemsReqN / numWorkItemsPerXForm, 1); - int intraBlockHStride = (numWorkItemsPerXForm / (Nprev*Nr)) > 1 ? (numWorkItemsPerXForm / (Nprev*Nr)) : 1; - intraBlockHStride *= Nprev; - - int stride = numWorkItemsReq / Nrn; - int i; - for(i = 0; i < iter; i++) { - int ii = i / (interBlockHNum * vertNum); - int zz = i % (interBlockHNum * vertNum); - int jj = zz % interBlockHNum; - int kk = zz / interBlockHNum; - int z; - for(z = 0; z < Nrn; z++) { - int st = kk * vertStride + jj * interBlockHStride + ii * intraBlockHStride + z * stride; - kernelString += string(" a[") + num2str(i*Nrn + z) + string("].") + comp + string(" = lMemLoad[") + num2str(st) + string("];\n"); - } - } - kernelString += string(" barrier(CLK_LOCAL_MEM_FENCE);\n"); + int numWorkItemsReqN = n / Nrn; + int interBlockHNum = max(Nprev / numWorkItemsPerXForm, 1); + int interBlockHStride = numWorkItemsPerXForm; + int vertWidth = max(numWorkItemsPerXForm / Nprev, 1); + vertWidth = min(vertWidth, Nr); + int vertNum = Nr / vertWidth; + int vertStride = (n / Nr + offset) * vertWidth; + int iter = max(numWorkItemsReqN / numWorkItemsPerXForm, 1); + int intraBlockHStride = (numWorkItemsPerXForm / (Nprev * Nr)) > 1 ? (numWorkItemsPerXForm / (Nprev * Nr)) : 1; + intraBlockHStride *= Nprev; + + int stride = numWorkItemsReq / Nrn; + int i; + for (i = 0; i < iter; i++) + { + int ii = i / (interBlockHNum * vertNum); + int zz = i % (interBlockHNum * vertNum); + int jj = zz % interBlockHNum; + int kk = zz / interBlockHNum; + int z; + for (z = 0; z < Nrn; z++) + { + int st = kk * vertStride + jj * interBlockHStride + ii * intraBlockHStride + z * stride; + kernelString += string(" a[") + num2str(i * Nrn + z) + string("].") + comp + string(" = lMemLoad[") + num2str(st) + string("];\n"); + } + } + kernelString += string(" barrier(CLK_LOCAL_MEM_FENCE);\n"); } static void insertLocalLoadIndexArithmatic(string &kernelString, int Nprev, int Nr, int numWorkItemsReq, int numWorkItemsPerXForm, int numXFormsPerWG, int offset, int midPad) -{ - int Ncurr = Nprev * Nr; - int logNcurr = (int)log2(Ncurr); - int logNprev = (int)log2(Nprev); - int incr = (numWorkItemsReq + offset) * Nr + midPad; - - if(Ncurr < numWorkItemsPerXForm) - { - if(Nprev == 1) - kernelString += string(" j = ii & ") + num2str(Ncurr - 1) + string(";\n"); - else - kernelString += string(" j = (ii & ") + num2str(Ncurr - 1) + string(") >> ") + num2str(logNprev) + string(";\n"); - - if(Nprev == 1) - kernelString += string(" i = ii >> ") + num2str(logNcurr) + string(";\n"); - else - kernelString += string(" i = mad24(ii >> ") + num2str(logNcurr) + string(", ") + num2str(Nprev) + string(", ii & ") + num2str(Nprev - 1) + string(");\n"); - } - else - { - if(Nprev == 1) - kernelString += string(" j = ii;\n"); - else - kernelString += string(" j = ii >> ") + num2str(logNprev) + string(";\n"); - if(Nprev == 1) - kernelString += string(" i = 0;\n"); - else - kernelString += string(" i = ii & ") + num2str(Nprev - 1) + string(";\n"); - } +{ + int Ncurr = Nprev * Nr; + int logNcurr = (int)log2(Ncurr); + int logNprev = (int)log2(Nprev); + int incr = (numWorkItemsReq + offset) * Nr + midPad; - if(numXFormsPerWG > 1) - kernelString += string(" i = mad24(jj, ") + num2str(incr) + string(", i);\n"); + if (Ncurr < numWorkItemsPerXForm) + { + if (Nprev == 1) + kernelString += string(" j = ii & ") + num2str(Ncurr - 1) + string(";\n"); + else + kernelString += string(" j = (ii & ") + num2str(Ncurr - 1) + string(") >> ") + num2str(logNprev) + string(";\n"); - kernelString += string(" lMemLoad = sMem + mad24(j, ") + num2str(numWorkItemsReq + offset) + string(", i);\n"); + if (Nprev == 1) + kernelString += string(" i = ii >> ") + num2str(logNcurr) + string(";\n"); + else + kernelString += string(" i = mad24(ii >> ") + num2str(logNcurr) + string(", ") + num2str(Nprev) + string(", ii & ") + num2str(Nprev - 1) + string(");\n"); + } + else + { + if (Nprev == 1) + kernelString += string(" j = ii;\n"); + else + kernelString += string(" j = ii >> ") + num2str(logNprev) + string(";\n"); + if (Nprev == 1) + kernelString += string(" i = 0;\n"); + else + kernelString += string(" i = ii & ") + num2str(Nprev - 1) + string(";\n"); + } + + if (numXFormsPerWG > 1) + kernelString += string(" i = mad24(jj, ") + num2str(incr) + string(", i);\n"); + + kernelString += string(" lMemLoad = sMem + mad24(j, ") + num2str(numWorkItemsReq + offset) + string(", i);\n"); } static void insertLocalStoreIndexArithmatic(string &kernelString, int numWorkItemsReq, int numXFormsPerWG, int Nr, int offset, int midPad) { - if(numXFormsPerWG == 1) { - kernelString += string(" lMemStore = sMem + ii;\n"); - } - else { - kernelString += string(" lMemStore = sMem + mad24(jj, ") + num2str((numWorkItemsReq + offset)*Nr + midPad) + string(", ii);\n"); - } + if (numXFormsPerWG == 1) + { + kernelString += string(" lMemStore = sMem + ii;\n"); + } + else + { + kernelString += string(" lMemStore = sMem + mad24(jj, ") + num2str((numWorkItemsReq + offset) * Nr + midPad) + string(", ii);\n"); + } } static void createLocalMemfftKernelString(cl_fft_plan *plan) { - unsigned int radixArray[10]; - unsigned int numRadix; - - unsigned int n = plan->n.x; - - assert(n <= plan->max_work_item_per_workgroup * plan->max_radix && "signal lenght too big for local mem fft\n"); - - getRadixArray(n, radixArray, &numRadix, 0); - assert(numRadix > 0 && "no radix array supplied\n"); - - if(n/radixArray[0] > plan->max_work_item_per_workgroup) - getRadixArray(n, radixArray, &numRadix, plan->max_radix); + unsigned int radixArray[10]; + unsigned int numRadix; - assert(radixArray[0] <= plan->max_radix && "max radix choosen is greater than allowed\n"); - assert(n/radixArray[0] <= plan->max_work_item_per_workgroup && "required work items per xform greater than maximum work items allowed per work group for local mem fft\n"); - - unsigned int tmpLen = 1; - unsigned int i; - for(i = 0; i < numRadix; i++) - { - assert( radixArray[i] && !( (radixArray[i] - 1) & radixArray[i] ) ); - tmpLen *= radixArray[i]; - } + unsigned int n = plan->n.x; + + assert(n <= plan->max_work_item_per_workgroup * plan->max_radix && "signal lenght too big for local mem fft\n"); + + getRadixArray(n, radixArray, &numRadix, 0); + assert(numRadix > 0 && "no radix array supplied\n"); + + if (n / radixArray[0] > plan->max_work_item_per_workgroup) + getRadixArray(n, radixArray, &numRadix, plan->max_radix); + + assert(radixArray[0] <= plan->max_radix && "max radix choosen is greater than allowed\n"); + assert(n / radixArray[0] <= plan->max_work_item_per_workgroup && "required work items per xform greater than maximum work items allowed per work group for local mem fft\n"); + + unsigned int tmpLen = 1; + unsigned int i; + for (i = 0; i < numRadix; i++) + { + assert(radixArray[i] && !((radixArray[i] - 1) & radixArray[i])); + tmpLen *= radixArray[i]; + } assert(tmpLen == n && "product of radices choosen doesnt match the length of signal\n"); - - int offset, midPad; - string localString(""), kernelName(""); - - clFFT_DataFormat dataFormat = plan->format; - string *kernelString = plan->kernel_string; - - - cl_fft_kernel_info **kInfo = &plan->kernel_info; - int kCount = 0; - - while(*kInfo) - { - kInfo = &(*kInfo)->next; - kCount++; - } - - kernelName = string("fft") + num2str(kCount); - - *kInfo = (cl_fft_kernel_info *) malloc(sizeof(cl_fft_kernel_info)); - (*kInfo)->kernel = 0; - (*kInfo)->lmem_size = 0; - (*kInfo)->num_workgroups = 0; - (*kInfo)->num_workitems_per_workgroup = 0; - (*kInfo)->dir = cl_fft_kernel_x; - (*kInfo)->in_place_possible = 1; - (*kInfo)->next = NULL; - (*kInfo)->kernel_name = (char *) malloc(sizeof(char)*(kernelName.size()+1)); - strcpy((*kInfo)->kernel_name, kernelName.c_str()); - - unsigned int numWorkItemsPerXForm = n / radixArray[0]; - unsigned int numWorkItemsPerWG = numWorkItemsPerXForm <= 64 ? 64 : numWorkItemsPerXForm; - assert(numWorkItemsPerWG <= plan->max_work_item_per_workgroup); - int numXFormsPerWG = numWorkItemsPerWG / numWorkItemsPerXForm; - (*kInfo)->num_workgroups = 1; + + int offset, midPad; + string localString(""), kernelName(""); + + clFFT_DataFormat dataFormat = plan->format; + string *kernelString = plan->kernel_string; + + + cl_fft_kernel_info **kInfo = &plan->kernel_info; + int kCount = 0; + + while (*kInfo) + { + kInfo = &(*kInfo)->next; + kCount++; + } + + kernelName = string("fft") + num2str(kCount); + + *kInfo = (cl_fft_kernel_info *)malloc(sizeof(cl_fft_kernel_info)); + (*kInfo)->kernel = 0; + (*kInfo)->lmem_size = 0; + (*kInfo)->num_workgroups = 0; + (*kInfo)->num_workitems_per_workgroup = 0; + (*kInfo)->dir = cl_fft_kernel_x; + (*kInfo)->in_place_possible = 1; + (*kInfo)->next = NULL; + (*kInfo)->kernel_name = (char *)malloc(sizeof(char) * (kernelName.size() + 1)); + strcpy((*kInfo)->kernel_name, kernelName.c_str()); + + unsigned int numWorkItemsPerXForm = n / radixArray[0]; + unsigned int numWorkItemsPerWG = numWorkItemsPerXForm <= 64 ? 64 : numWorkItemsPerXForm; + assert(numWorkItemsPerWG <= plan->max_work_item_per_workgroup); + int numXFormsPerWG = numWorkItemsPerWG / numWorkItemsPerXForm; + (*kInfo)->num_workgroups = 1; (*kInfo)->num_xforms_per_workgroup = numXFormsPerWG; - (*kInfo)->num_workitems_per_workgroup = numWorkItemsPerWG; - - unsigned int *N = radixArray; - unsigned int maxRadix = N[0]; - unsigned int lMemSize = 0; - - insertVariables(localString, maxRadix); - - lMemSize = insertGlobalLoadsAndTranspose(localString, n, numWorkItemsPerXForm, numXFormsPerWG, maxRadix, plan->min_mem_coalesce_width, dataFormat); - (*kInfo)->lmem_size = (lMemSize > (*kInfo)->lmem_size) ? lMemSize : (*kInfo)->lmem_size; - - string xcomp = string("x"); - string ycomp = string("y"); - - unsigned int Nprev = 1; - unsigned int len = n; - unsigned int r; - for(r = 0; r < numRadix; r++) - { - int numIter = N[0] / N[r]; - int numWorkItemsReq = n / N[r]; - int Ncurr = Nprev * N[r]; - insertfftKernel(localString, N[r], numIter); - - if(r < (numRadix - 1)) { - insertTwiddleKernel(localString, N[r], numIter, Nprev, len, numWorkItemsPerXForm); - lMemSize = getPadding(numWorkItemsPerXForm, Nprev, numWorkItemsReq, numXFormsPerWG, N[r], plan->num_local_mem_banks, &offset, &midPad); - (*kInfo)->lmem_size = (lMemSize > (*kInfo)->lmem_size) ? lMemSize : (*kInfo)->lmem_size; - insertLocalStoreIndexArithmatic(localString, numWorkItemsReq, numXFormsPerWG, N[r], offset, midPad); - insertLocalLoadIndexArithmatic(localString, Nprev, N[r], numWorkItemsReq, numWorkItemsPerXForm, numXFormsPerWG, offset, midPad); - insertLocalStores(localString, numIter, N[r], numWorkItemsPerXForm, numWorkItemsReq, offset, xcomp); - insertLocalLoads(localString, n, N[r], N[r+1], Nprev, Ncurr, numWorkItemsPerXForm, numWorkItemsReq, offset, xcomp); - insertLocalStores(localString, numIter, N[r], numWorkItemsPerXForm, numWorkItemsReq, offset, ycomp); - insertLocalLoads(localString, n, N[r], N[r+1], Nprev, Ncurr, numWorkItemsPerXForm, numWorkItemsReq, offset, ycomp); - Nprev = Ncurr; - len = len / N[r]; - } - } - - lMemSize = insertGlobalStoresAndTranspose(localString, n, maxRadix, N[numRadix - 1], numWorkItemsPerXForm, numXFormsPerWG, plan->min_mem_coalesce_width, dataFormat); - (*kInfo)->lmem_size = (lMemSize > (*kInfo)->lmem_size) ? lMemSize : (*kInfo)->lmem_size; - - insertHeader(*kernelString, kernelName, dataFormat); - *kernelString += string("{\n"); - if((*kInfo)->lmem_size) + (*kInfo)->num_workitems_per_workgroup = numWorkItemsPerWG; + + unsigned int *N = radixArray; + unsigned int maxRadix = N[0]; + unsigned int lMemSize = 0; + + insertVariables(localString, maxRadix); + + lMemSize = insertGlobalLoadsAndTranspose(localString, n, numWorkItemsPerXForm, numXFormsPerWG, maxRadix, plan->min_mem_coalesce_width, dataFormat); + (*kInfo)->lmem_size = (lMemSize > (*kInfo)->lmem_size) ? lMemSize : (*kInfo)->lmem_size; + + string xcomp = string("x"); + string ycomp = string("y"); + + unsigned int Nprev = 1; + unsigned int len = n; + unsigned int r; + for (r = 0; r < numRadix; r++) + { + int numIter = N[0] / N[r]; + int numWorkItemsReq = n / N[r]; + int Ncurr = Nprev * N[r]; + insertfftKernel(localString, N[r], numIter); + + if (r < (numRadix - 1)) + { + insertTwiddleKernel(localString, N[r], numIter, Nprev, len, numWorkItemsPerXForm); + lMemSize = getPadding(numWorkItemsPerXForm, Nprev, numWorkItemsReq, numXFormsPerWG, N[r], plan->num_local_mem_banks, &offset, &midPad); + (*kInfo)->lmem_size = (lMemSize > (*kInfo)->lmem_size) ? lMemSize : (*kInfo)->lmem_size; + insertLocalStoreIndexArithmatic(localString, numWorkItemsReq, numXFormsPerWG, N[r], offset, midPad); + insertLocalLoadIndexArithmatic(localString, Nprev, N[r], numWorkItemsReq, numWorkItemsPerXForm, numXFormsPerWG, offset, midPad); + insertLocalStores(localString, numIter, N[r], numWorkItemsPerXForm, numWorkItemsReq, offset, xcomp); + insertLocalLoads(localString, n, N[r], N[r + 1], Nprev, Ncurr, numWorkItemsPerXForm, numWorkItemsReq, offset, xcomp); + insertLocalStores(localString, numIter, N[r], numWorkItemsPerXForm, numWorkItemsReq, offset, ycomp); + insertLocalLoads(localString, n, N[r], N[r + 1], Nprev, Ncurr, numWorkItemsPerXForm, numWorkItemsReq, offset, ycomp); + Nprev = Ncurr; + len = len / N[r]; + } + } + + lMemSize = insertGlobalStoresAndTranspose(localString, n, maxRadix, N[numRadix - 1], numWorkItemsPerXForm, numXFormsPerWG, plan->min_mem_coalesce_width, dataFormat); + (*kInfo)->lmem_size = (lMemSize > (*kInfo)->lmem_size) ? lMemSize : (*kInfo)->lmem_size; + + insertHeader(*kernelString, kernelName, dataFormat); + *kernelString += string("{\n"); + if ((*kInfo)->lmem_size) *kernelString += string(" __local float sMem[") + num2str((*kInfo)->lmem_size) + string("];\n"); - *kernelString += localString; - *kernelString += string("}\n"); + *kernelString += localString; + *kernelString += string("}\n"); } // For n larger than what can be computed using local memory fft, global transposes // multiple kernel launces is needed. For these sizes, n can be decomposed using // much larger base radices i.e. say n = 262144 = 128 x 64 x 32. Thus three kernel // launches will be needed, first computing 64 x 32, length 128 ffts, second computing -// 128 x 32 length 64 ffts, and finally a kernel computing 128 x 64 length 32 ffts. -// Each of these base radices can futher be divided into factors so that each of these -// base ffts can be computed within one kernel launch using in-register ffts and local -// memory transposes i.e for the first kernel above which computes 64 x 32 ffts on length -// 128, 128 can be decomposed into 128 = 16 x 8 i.e. 8 work items can compute 8 length -// 16 ffts followed by transpose using local memory followed by each of these eight -// work items computing 2 length 8 ffts thus computing 16 length 8 ffts in total. This +// 128 x 32 length 64 ffts, and finally a kernel computing 128 x 64 length 32 ffts. +// Each of these base radices can futher be divided into factors so that each of these +// base ffts can be computed within one kernel launch using in-register ffts and local +// memory transposes i.e for the first kernel above which computes 64 x 32 ffts on length +// 128, 128 can be decomposed into 128 = 16 x 8 i.e. 8 work items can compute 8 length +// 16 ffts followed by transpose using local memory followed by each of these eight +// work items computing 2 length 8 ffts thus computing 16 length 8 ffts in total. This // means only 8 work items are needed for computing one length 128 fft. If we choose // work group size of say 64, we can compute 64/8 = 8 length 128 ffts within one -// work group. Since we need to compute 64 x 32 length 128 ffts in first kernel, this -// means we need to launch 64 x 32 / 8 = 256 work groups with 64 work items in each +// work group. Since we need to compute 64 x 32 length 128 ffts in first kernel, this +// means we need to launch 64 x 32 / 8 = 256 work groups with 64 work items in each // work group where each work group is computing 8 length 128 ffts where each length // 128 fft is computed by 8 work items. Same logic can be applied to other two kernels -// in this example. Users can play with difference base radices and difference +// in this example. Users can play with difference base radices and difference // decompositions of base radices to generates different kernels and see which gives // best performance. Following function is just fixed to use 128 as base radix -void -getGlobalRadixInfo(int n, int *radix, int *R1, int *R2, int *numRadices) +void getGlobalRadixInfo(int n, int *radix, int *R1, int *R2, int *numRadices) { - int baseRadix = min(n, 128); - - int numR = 0; - int N = n; - while(N > baseRadix) - { - N /= baseRadix; - numR++; - } - - for(int i = 0; i < numR; i++) - radix[i] = baseRadix; - - radix[numR] = N; - numR++; - *numRadices = numR; - - for(int i = 0; i < numR; i++) - { - int B = radix[i]; - if(B <= 8) - { - R1[i] = B; - R2[i] = 1; - continue; - } - - int r1 = 2; - int r2 = B / r1; - while(r2 > r1) - { - r1 *=2; - r2 = B / r1; - } - R1[i] = r1; - R2[i] = r2; - } + int baseRadix = min(n, 128); + + int numR = 0; + int N = n; + while (N > baseRadix) + { + N /= baseRadix; + numR++; + } + + for (int i = 0; i < numR; i++) + radix[i] = baseRadix; + + radix[numR] = N; + numR++; + *numRadices = numR; + + for (int i = 0; i < numR; i++) + { + int B = radix[i]; + if (B <= 8) + { + R1[i] = B; + R2[i] = 1; + continue; + } + + int r1 = 2; + int r2 = B / r1; + while (r2 > r1) + { + r1 *= 2; + r2 = B / r1; + } + R1[i] = r1; + R2[i] = r2; + } } static void createGlobalFFTKernelString(cl_fft_plan *plan, int n, int BS, cl_fft_kernel_dir dir, int vertBS) -{ - int i, j, k, t; - int radixArr[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - int R1Arr[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - int R2Arr[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - int radix, R1, R2; - int numRadices; - - int maxThreadsPerBlock = plan->max_work_item_per_workgroup; - int maxArrayLen = plan->max_radix; - int batchSize = plan->min_mem_coalesce_width; - clFFT_DataFormat dataFormat = plan->format; - int vertical = (dir == cl_fft_kernel_x) ? 0 : 1; - - getGlobalRadixInfo(n, radixArr, R1Arr, R2Arr, &numRadices); - - int numPasses = numRadices; - - string localString(""), kernelName(""); - string *kernelString = plan->kernel_string; - cl_fft_kernel_info **kInfo = &plan->kernel_info; - int kCount = 0; - - while(*kInfo) - { - kInfo = &(*kInfo)->next; - kCount++; - } - - int N = n; - int m = (int)log2(n); - int Rinit = vertical ? BS : 1; - batchSize = vertical ? min(BS, batchSize) : batchSize; - int passNum; - - for(passNum = 0; passNum < numPasses; passNum++) - { - - localString.clear(); - kernelName.clear(); - - radix = radixArr[passNum]; - R1 = R1Arr[passNum]; - R2 = R2Arr[passNum]; - - int strideI = Rinit; - for(i = 0; i < numPasses; i++) - if(i != passNum) - strideI *= radixArr[i]; - - int strideO = Rinit; - for(i = 0; i < passNum; i++) - strideO *= radixArr[i]; - - int threadsPerXForm = R2; - batchSize = R2 == 1 ? plan->max_work_item_per_workgroup : batchSize; - batchSize = min(batchSize, strideI); - int threadsPerBlock = batchSize * threadsPerXForm; - threadsPerBlock = min(threadsPerBlock, maxThreadsPerBlock); - batchSize = threadsPerBlock / threadsPerXForm; - assert(R2 <= R1); - assert(R1*R2 == radix); - assert(R1 <= maxArrayLen); - assert(threadsPerBlock <= maxThreadsPerBlock); - - int numIter = R1 / R2; - int gInInc = threadsPerBlock / batchSize; - - - int lgStrideO = (int)log2(strideO); - int numBlocksPerXForm = strideI / batchSize; - int numBlocks = numBlocksPerXForm; - if(!vertical) - numBlocks *= BS; - else - numBlocks *= vertBS; - - kernelName = string("fft") + num2str(kCount); - *kInfo = (cl_fft_kernel_info *) malloc(sizeof(cl_fft_kernel_info)); - (*kInfo)->kernel = 0; - if(R2 == 1) - (*kInfo)->lmem_size = 0; - else - { - if(strideO == 1) - (*kInfo)->lmem_size = (radix + 1)*batchSize; - else - (*kInfo)->lmem_size = threadsPerBlock*R1; - } - (*kInfo)->num_workgroups = numBlocks; - (*kInfo)->num_xforms_per_workgroup = 1; - (*kInfo)->num_workitems_per_workgroup = threadsPerBlock; - (*kInfo)->dir = dir; - if( (passNum == (numPasses - 1)) && (numPasses & 1) ) - (*kInfo)->in_place_possible = 1; - else - (*kInfo)->in_place_possible = 0; - (*kInfo)->next = NULL; - (*kInfo)->kernel_name = (char *) malloc(sizeof(char)*(kernelName.size()+1)); - strcpy((*kInfo)->kernel_name, kernelName.c_str()); - - insertVariables(localString, R1); - - if(vertical) - { - localString += string("xNum = groupId >> ") + num2str((int)log2(numBlocksPerXForm)) + string(";\n"); - localString += string("groupId = groupId & ") + num2str(numBlocksPerXForm - 1) + string(";\n"); - localString += string("indexIn = mad24(groupId, ") + num2str(batchSize) + string(", xNum << ") + num2str((int)log2(n*BS)) + string(");\n"); - localString += string("tid = mul24(groupId, ") + num2str(batchSize) + string(");\n"); - localString += string("i = tid >> ") + num2str(lgStrideO) + string(";\n"); - localString += string("j = tid & ") + num2str(strideO - 1) + string(";\n"); - int stride = radix*Rinit; - for(i = 0; i < passNum; i++) - stride *= radixArr[i]; - localString += string("indexOut = mad24(i, ") + num2str(stride) + string(", j + ") + string("(xNum << ") + num2str((int) log2(n*BS)) + string("));\n"); - localString += string("bNum = groupId;\n"); - } - else - { - int lgNumBlocksPerXForm = (int)log2(numBlocksPerXForm); - localString += string("bNum = groupId & ") + num2str(numBlocksPerXForm - 1) + string(";\n"); - localString += string("xNum = groupId >> ") + num2str(lgNumBlocksPerXForm) + string(";\n"); - localString += string("indexIn = mul24(bNum, ") + num2str(batchSize) + string(");\n"); - localString += string("tid = indexIn;\n"); - localString += string("i = tid >> ") + num2str(lgStrideO) + string(";\n"); - localString += string("j = tid & ") + num2str(strideO - 1) + string(";\n"); - int stride = radix*Rinit; - for(i = 0; i < passNum; i++) - stride *= radixArr[i]; - localString += string("indexOut = mad24(i, ") + num2str(stride) + string(", j);\n"); - localString += string("indexIn += (xNum << ") + num2str(m) + string(");\n"); - localString += string("indexOut += (xNum << ") + num2str(m) + string(");\n"); - } - - // Load Data - int lgBatchSize = (int)log2(batchSize); - localString += string("tid = lId;\n"); - localString += string("i = tid & ") + num2str(batchSize - 1) + string(";\n"); - localString += string("j = tid >> ") + num2str(lgBatchSize) + string(";\n"); - localString += string("indexIn += mad24(j, ") + num2str(strideI) + string(", i);\n"); +{ + int i, j, k, t; + int radixArr[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + int R1Arr[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + int R2Arr[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + int radix, R1, R2; + int numRadices; - if(dataFormat == clFFT_SplitComplexFormat) - { - localString += string("in_real += indexIn;\n"); - localString += string("in_imag += indexIn;\n"); - for(j = 0; j < R1; j++) - localString += string("a[") + num2str(j) + string("].x = in_real[") + num2str(j*gInInc*strideI) + string("];\n"); - for(j = 0; j < R1; j++) - localString += string("a[") + num2str(j) + string("].y = in_imag[") + num2str(j*gInInc*strideI) + string("];\n"); - } - else - { - localString += string("in += indexIn;\n"); - for(j = 0; j < R1; j++) - localString += string("a[") + num2str(j) + string("] = in[") + num2str(j*gInInc*strideI) + string("];\n"); - } - - localString += string("fftKernel") + num2str(R1) + string("(a, dir);\n"); - - if(R2 > 1) - { - // twiddle - for(k = 1; k < R1; k++) - { - localString += string("ang = dir*(2.0f*M_PI*") + num2str(k) + string("/") + num2str(radix) + string(")*j;\n"); - localString += string("w = (float2)(native_cos(ang), native_sin(ang));\n"); - localString += string("a[") + num2str(k) + string("] = complexMul(a[") + num2str(k) + string("], w);\n"); - } - - // shuffle - numIter = R1 / R2; - localString += string("indexIn = mad24(j, ") + num2str(threadsPerBlock*numIter) + string(", i);\n"); - localString += string("lMemStore = sMem + tid;\n"); - localString += string("lMemLoad = sMem + indexIn;\n"); - for(k = 0; k < R1; k++) - localString += string("lMemStore[") + num2str(k*threadsPerBlock) + string("] = a[") + num2str(k) + string("].x;\n"); - localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); - for(k = 0; k < numIter; k++) - for(t = 0; t < R2; t++) - localString += string("a[") + num2str(k*R2+t) + string("].x = lMemLoad[") + num2str(t*batchSize + k*threadsPerBlock) + string("];\n"); - localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); - for(k = 0; k < R1; k++) - localString += string("lMemStore[") + num2str(k*threadsPerBlock) + string("] = a[") + num2str(k) + string("].y;\n"); - localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); - for(k = 0; k < numIter; k++) - for(t = 0; t < R2; t++) - localString += string("a[") + num2str(k*R2+t) + string("].y = lMemLoad[") + num2str(t*batchSize + k*threadsPerBlock) + string("];\n"); - localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); - - for(j = 0; j < numIter; j++) - localString += string("fftKernel") + num2str(R2) + string("(a + ") + num2str(j*R2) + string(", dir);\n"); - } - - // twiddle - if(passNum < (numPasses - 1)) - { - localString += string("l = ((bNum << ") + num2str(lgBatchSize) + string(") + i) >> ") + num2str(lgStrideO) + string(";\n"); - localString += string("k = j << ") + num2str((int)log2(R1/R2)) + string(";\n"); - localString += string("ang1 = dir*(2.0f*M_PI/") + num2str(N) + string(")*l;\n"); - for(t = 0; t < R1; t++) - { - localString += string("ang = ang1*(k + ") + num2str((t%R2)*R1 + (t/R2)) + string(");\n"); - localString += string("w = (float2)(native_cos(ang), native_sin(ang));\n"); - localString += string("a[") + num2str(t) + string("] = complexMul(a[") + num2str(t) + string("], w);\n"); - } - } - - // Store Data - if(strideO == 1) - { - - localString += string("lMemStore = sMem + mad24(i, ") + num2str(radix + 1) + string(", j << ") + num2str((int)log2(R1/R2)) + string(");\n"); - localString += string("lMemLoad = sMem + mad24(tid >> ") + num2str((int)log2(radix)) + string(", ") + num2str(radix+1) + string(", tid & ") + num2str(radix-1) + string(");\n"); - - for(i = 0; i < R1/R2; i++) - for(j = 0; j < R2; j++) - localString += string("lMemStore[ ") + num2str(i + j*R1) + string("] = a[") + num2str(i*R2+j) + string("].x;\n"); - localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); - if(threadsPerBlock >= radix) - { - for(i = 0; i < R1; i++) - localString += string("a[") + num2str(i) + string("].x = lMemLoad[") + num2str(i*(radix+1)*(threadsPerBlock/radix)) + string("];\n"); - } + int maxThreadsPerBlock = plan->max_work_item_per_workgroup; + int maxArrayLen = plan->max_radix; + int batchSize = plan->min_mem_coalesce_width; + clFFT_DataFormat dataFormat = plan->format; + int vertical = (dir == cl_fft_kernel_x) ? 0 : 1; + + getGlobalRadixInfo(n, radixArr, R1Arr, R2Arr, &numRadices); + + int numPasses = numRadices; + + string localString(""), kernelName(""); + string *kernelString = plan->kernel_string; + cl_fft_kernel_info **kInfo = &plan->kernel_info; + int kCount = 0; + + while (*kInfo) + { + kInfo = &(*kInfo)->next; + kCount++; + } + + int N = n; + int m = (int)log2(n); + int Rinit = vertical ? BS : 1; + batchSize = vertical ? min(BS, batchSize) : batchSize; + int passNum; + + for (passNum = 0; passNum < numPasses; passNum++) + { + localString.clear(); + kernelName.clear(); + + radix = radixArr[passNum]; + R1 = R1Arr[passNum]; + R2 = R2Arr[passNum]; + + int strideI = Rinit; + for (i = 0; i < numPasses; i++) + if (i != passNum) + strideI *= radixArr[i]; + + int strideO = Rinit; + for (i = 0; i < passNum; i++) + strideO *= radixArr[i]; + + int threadsPerXForm = R2; + batchSize = R2 == 1 ? plan->max_work_item_per_workgroup : batchSize; + batchSize = min(batchSize, strideI); + int threadsPerBlock = batchSize * threadsPerXForm; + threadsPerBlock = min(threadsPerBlock, maxThreadsPerBlock); + batchSize = threadsPerBlock / threadsPerXForm; + assert(R2 <= R1); + assert(R1 * R2 == radix); + assert(R1 <= maxArrayLen); + assert(threadsPerBlock <= maxThreadsPerBlock); + + int numIter = R1 / R2; + int gInInc = threadsPerBlock / batchSize; + + + int lgStrideO = (int)log2(strideO); + int numBlocksPerXForm = strideI / batchSize; + int numBlocks = numBlocksPerXForm; + if (!vertical) + numBlocks *= BS; else - { - int innerIter = radix/threadsPerBlock; - int outerIter = R1/innerIter; - for(i = 0; i < outerIter; i++) - for(j = 0; j < innerIter; j++) - localString += string("a[") + num2str(i*innerIter+j) + string("].x = lMemLoad[") + num2str(j*threadsPerBlock + i*(radix+1)) + string("];\n"); - } - localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); - - for(i = 0; i < R1/R2; i++) - for(j = 0; j < R2; j++) - localString += string("lMemStore[ ") + num2str(i + j*R1) + string("] = a[") + num2str(i*R2+j) + string("].y;\n"); - localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); - if(threadsPerBlock >= radix) - { - for(i = 0; i < R1; i++) - localString += string("a[") + num2str(i) + string("].y = lMemLoad[") + num2str(i*(radix+1)*(threadsPerBlock/radix)) + string("];\n"); - } + numBlocks *= vertBS; + + kernelName = string("fft") + num2str(kCount); + *kInfo = (cl_fft_kernel_info *)malloc(sizeof(cl_fft_kernel_info)); + (*kInfo)->kernel = 0; + if (R2 == 1) + (*kInfo)->lmem_size = 0; else - { - int innerIter = radix/threadsPerBlock; - int outerIter = R1/innerIter; - for(i = 0; i < outerIter; i++) - for(j = 0; j < innerIter; j++) - localString += string("a[") + num2str(i*innerIter+j) + string("].y = lMemLoad[") + num2str(j*threadsPerBlock + i*(radix+1)) + string("];\n"); - } - localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); - - localString += string("indexOut += tid;\n"); - if(dataFormat == clFFT_SplitComplexFormat) { - localString += string("out_real += indexOut;\n"); - localString += string("out_imag += indexOut;\n"); - for(k = 0; k < R1; k++) - localString += string("out_real[") + num2str(k*threadsPerBlock) + string("] = a[") + num2str(k) + string("].x;\n"); - for(k = 0; k < R1; k++) - localString += string("out_imag[") + num2str(k*threadsPerBlock) + string("] = a[") + num2str(k) + string("].y;\n"); - } - else { - localString += string("out += indexOut;\n"); - for(k = 0; k < R1; k++) - localString += string("out[") + num2str(k*threadsPerBlock) + string("] = a[") + num2str(k) + string("];\n"); - } - - } - else - { - localString += string("indexOut += mad24(j, ") + num2str(numIter*strideO) + string(", i);\n"); - if(dataFormat == clFFT_SplitComplexFormat) { - localString += string("out_real += indexOut;\n"); - localString += string("out_imag += indexOut;\n"); - for(k = 0; k < R1; k++) - localString += string("out_real[") + num2str(((k%R2)*R1 + (k/R2))*strideO) + string("] = a[") + num2str(k) + string("].x;\n"); - for(k = 0; k < R1; k++) - localString += string("out_imag[") + num2str(((k%R2)*R1 + (k/R2))*strideO) + string("] = a[") + num2str(k) + string("].y;\n"); - } - else { - localString += string("out += indexOut;\n"); - for(k = 0; k < R1; k++) - localString += string("out[") + num2str(((k%R2)*R1 + (k/R2))*strideO) + string("] = a[") + num2str(k) + string("];\n"); - } - } - - insertHeader(*kernelString, kernelName, dataFormat); - *kernelString += string("{\n"); - if((*kInfo)->lmem_size) - *kernelString += string(" __local float sMem[") + num2str((*kInfo)->lmem_size) + string("];\n"); - *kernelString += localString; - *kernelString += string("}\n"); - - N /= radix; - kInfo = &(*kInfo)->next; - kCount++; - } + { + if (strideO == 1) + (*kInfo)->lmem_size = (radix + 1) * batchSize; + else + (*kInfo)->lmem_size = threadsPerBlock * R1; + } + (*kInfo)->num_workgroups = numBlocks; + (*kInfo)->num_xforms_per_workgroup = 1; + (*kInfo)->num_workitems_per_workgroup = threadsPerBlock; + (*kInfo)->dir = dir; + if ((passNum == (numPasses - 1)) && (numPasses & 1)) + (*kInfo)->in_place_possible = 1; + else + (*kInfo)->in_place_possible = 0; + (*kInfo)->next = NULL; + (*kInfo)->kernel_name = (char *)malloc(sizeof(char) * (kernelName.size() + 1)); + strcpy((*kInfo)->kernel_name, kernelName.c_str()); + + insertVariables(localString, R1); + + if (vertical) + { + localString += string("xNum = groupId >> ") + num2str((int)log2(numBlocksPerXForm)) + string(";\n"); + localString += string("groupId = groupId & ") + num2str(numBlocksPerXForm - 1) + string(";\n"); + localString += string("indexIn = mad24(groupId, ") + num2str(batchSize) + string(", xNum << ") + num2str((int)log2(n * BS)) + string(");\n"); + localString += string("tid = mul24(groupId, ") + num2str(batchSize) + string(");\n"); + localString += string("i = tid >> ") + num2str(lgStrideO) + string(";\n"); + localString += string("j = tid & ") + num2str(strideO - 1) + string(";\n"); + int stride = radix * Rinit; + for (i = 0; i < passNum; i++) + stride *= radixArr[i]; + localString += string("indexOut = mad24(i, ") + num2str(stride) + string(", j + ") + string("(xNum << ") + num2str((int)log2(n * BS)) + string("));\n"); + localString += string("bNum = groupId;\n"); + } + else + { + int lgNumBlocksPerXForm = (int)log2(numBlocksPerXForm); + localString += string("bNum = groupId & ") + num2str(numBlocksPerXForm - 1) + string(";\n"); + localString += string("xNum = groupId >> ") + num2str(lgNumBlocksPerXForm) + string(";\n"); + localString += string("indexIn = mul24(bNum, ") + num2str(batchSize) + string(");\n"); + localString += string("tid = indexIn;\n"); + localString += string("i = tid >> ") + num2str(lgStrideO) + string(";\n"); + localString += string("j = tid & ") + num2str(strideO - 1) + string(";\n"); + int stride = radix * Rinit; + for (i = 0; i < passNum; i++) + stride *= radixArr[i]; + localString += string("indexOut = mad24(i, ") + num2str(stride) + string(", j);\n"); + localString += string("indexIn += (xNum << ") + num2str(m) + string(");\n"); + localString += string("indexOut += (xNum << ") + num2str(m) + string(");\n"); + } + + // Load Data + int lgBatchSize = (int)log2(batchSize); + localString += string("tid = lId;\n"); + localString += string("i = tid & ") + num2str(batchSize - 1) + string(";\n"); + localString += string("j = tid >> ") + num2str(lgBatchSize) + string(";\n"); + localString += string("indexIn += mad24(j, ") + num2str(strideI) + string(", i);\n"); + + if (dataFormat == clFFT_SplitComplexFormat) + { + localString += string("in_real += indexIn;\n"); + localString += string("in_imag += indexIn;\n"); + for (j = 0; j < R1; j++) + localString += string("a[") + num2str(j) + string("].x = in_real[") + num2str(j * gInInc * strideI) + string("];\n"); + for (j = 0; j < R1; j++) + localString += string("a[") + num2str(j) + string("].y = in_imag[") + num2str(j * gInInc * strideI) + string("];\n"); + } + else + { + localString += string("in += indexIn;\n"); + for (j = 0; j < R1; j++) + localString += string("a[") + num2str(j) + string("] = in[") + num2str(j * gInInc * strideI) + string("];\n"); + } + + localString += string("fftKernel") + num2str(R1) + string("(a, dir);\n"); + + if (R2 > 1) + { + // twiddle + for (k = 1; k < R1; k++) + { + localString += string("ang = dir*(2.0f*M_PI*") + num2str(k) + string("/") + num2str(radix) + string(")*j;\n"); + localString += string("w = (float2)(native_cos(ang), native_sin(ang));\n"); + localString += string("a[") + num2str(k) + string("] = complexMul(a[") + num2str(k) + string("], w);\n"); + } + + // shuffle + numIter = R1 / R2; + localString += string("indexIn = mad24(j, ") + num2str(threadsPerBlock * numIter) + string(", i);\n"); + localString += string("lMemStore = sMem + tid;\n"); + localString += string("lMemLoad = sMem + indexIn;\n"); + for (k = 0; k < R1; k++) + localString += string("lMemStore[") + num2str(k * threadsPerBlock) + string("] = a[") + num2str(k) + string("].x;\n"); + localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); + for (k = 0; k < numIter; k++) + for (t = 0; t < R2; t++) + localString += string("a[") + num2str(k * R2 + t) + string("].x = lMemLoad[") + num2str(t * batchSize + k * threadsPerBlock) + string("];\n"); + localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); + for (k = 0; k < R1; k++) + localString += string("lMemStore[") + num2str(k * threadsPerBlock) + string("] = a[") + num2str(k) + string("].y;\n"); + localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); + for (k = 0; k < numIter; k++) + for (t = 0; t < R2; t++) + localString += string("a[") + num2str(k * R2 + t) + string("].y = lMemLoad[") + num2str(t * batchSize + k * threadsPerBlock) + string("];\n"); + localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); + + for (j = 0; j < numIter; j++) + localString += string("fftKernel") + num2str(R2) + string("(a + ") + num2str(j * R2) + string(", dir);\n"); + } + + // twiddle + if (passNum < (numPasses - 1)) + { + localString += string("l = ((bNum << ") + num2str(lgBatchSize) + string(") + i) >> ") + num2str(lgStrideO) + string(";\n"); + localString += string("k = j << ") + num2str((int)log2(R1 / R2)) + string(";\n"); + localString += string("ang1 = dir*(2.0f*M_PI/") + num2str(N) + string(")*l;\n"); + for (t = 0; t < R1; t++) + { + localString += string("ang = ang1*(k + ") + num2str((t % R2) * R1 + (t / R2)) + string(");\n"); + localString += string("w = (float2)(native_cos(ang), native_sin(ang));\n"); + localString += string("a[") + num2str(t) + string("] = complexMul(a[") + num2str(t) + string("], w);\n"); + } + } + + // Store Data + if (strideO == 1) + { + localString += string("lMemStore = sMem + mad24(i, ") + num2str(radix + 1) + string(", j << ") + num2str((int)log2(R1 / R2)) + string(");\n"); + localString += string("lMemLoad = sMem + mad24(tid >> ") + num2str((int)log2(radix)) + string(", ") + num2str(radix + 1) + string(", tid & ") + num2str(radix - 1) + string(");\n"); + + for (i = 0; i < R1 / R2; i++) + for (j = 0; j < R2; j++) + localString += string("lMemStore[ ") + num2str(i + j * R1) + string("] = a[") + num2str(i * R2 + j) + string("].x;\n"); + localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); + if (threadsPerBlock >= radix) + { + for (i = 0; i < R1; i++) + localString += string("a[") + num2str(i) + string("].x = lMemLoad[") + num2str(i * (radix + 1) * (threadsPerBlock / radix)) + string("];\n"); + } + else + { + int innerIter = radix / threadsPerBlock; + int outerIter = R1 / innerIter; + for (i = 0; i < outerIter; i++) + for (j = 0; j < innerIter; j++) + localString += string("a[") + num2str(i * innerIter + j) + string("].x = lMemLoad[") + num2str(j * threadsPerBlock + i * (radix + 1)) + string("];\n"); + } + localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); + + for (i = 0; i < R1 / R2; i++) + for (j = 0; j < R2; j++) + localString += string("lMemStore[ ") + num2str(i + j * R1) + string("] = a[") + num2str(i * R2 + j) + string("].y;\n"); + localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); + if (threadsPerBlock >= radix) + { + for (i = 0; i < R1; i++) + localString += string("a[") + num2str(i) + string("].y = lMemLoad[") + num2str(i * (radix + 1) * (threadsPerBlock / radix)) + string("];\n"); + } + else + { + int innerIter = radix / threadsPerBlock; + int outerIter = R1 / innerIter; + for (i = 0; i < outerIter; i++) + for (j = 0; j < innerIter; j++) + localString += string("a[") + num2str(i * innerIter + j) + string("].y = lMemLoad[") + num2str(j * threadsPerBlock + i * (radix + 1)) + string("];\n"); + } + localString += string("barrier(CLK_LOCAL_MEM_FENCE);\n"); + + localString += string("indexOut += tid;\n"); + if (dataFormat == clFFT_SplitComplexFormat) + { + localString += string("out_real += indexOut;\n"); + localString += string("out_imag += indexOut;\n"); + for (k = 0; k < R1; k++) + localString += string("out_real[") + num2str(k * threadsPerBlock) + string("] = a[") + num2str(k) + string("].x;\n"); + for (k = 0; k < R1; k++) + localString += string("out_imag[") + num2str(k * threadsPerBlock) + string("] = a[") + num2str(k) + string("].y;\n"); + } + else + { + localString += string("out += indexOut;\n"); + for (k = 0; k < R1; k++) + localString += string("out[") + num2str(k * threadsPerBlock) + string("] = a[") + num2str(k) + string("];\n"); + } + } + else + { + localString += string("indexOut += mad24(j, ") + num2str(numIter * strideO) + string(", i);\n"); + if (dataFormat == clFFT_SplitComplexFormat) + { + localString += string("out_real += indexOut;\n"); + localString += string("out_imag += indexOut;\n"); + for (k = 0; k < R1; k++) + localString += string("out_real[") + num2str(((k % R2) * R1 + (k / R2)) * strideO) + string("] = a[") + num2str(k) + string("].x;\n"); + for (k = 0; k < R1; k++) + localString += string("out_imag[") + num2str(((k % R2) * R1 + (k / R2)) * strideO) + string("] = a[") + num2str(k) + string("].y;\n"); + } + else + { + localString += string("out += indexOut;\n"); + for (k = 0; k < R1; k++) + localString += string("out[") + num2str(((k % R2) * R1 + (k / R2)) * strideO) + string("] = a[") + num2str(k) + string("];\n"); + } + } + + insertHeader(*kernelString, kernelName, dataFormat); + *kernelString += string("{\n"); + if ((*kInfo)->lmem_size) + *kernelString += string(" __local float sMem[") + num2str((*kInfo)->lmem_size) + string("];\n"); + *kernelString += localString; + *kernelString += string("}\n"); + + N /= radix; + kInfo = &(*kInfo)->next; + kCount++; + } } void FFT1D(cl_fft_plan *plan, cl_fft_kernel_dir dir) -{ +{ unsigned int radixArray[10]; unsigned int numRadix; - - switch(dir) - { - case cl_fft_kernel_x: - if(plan->n.x > plan->max_localmem_fft_size) - { - createGlobalFFTKernelString(plan, plan->n.x, 1, cl_fft_kernel_x, 1); - } - else if(plan->n.x > 1) - { - getRadixArray(plan->n.x, radixArray, &numRadix, 0); - if(plan->n.x / radixArray[0] <= plan->max_work_item_per_workgroup) - { - createLocalMemfftKernelString(plan); - } - else - { - getRadixArray(plan->n.x, radixArray, &numRadix, plan->max_radix); - if(plan->n.x / radixArray[0] <= plan->max_work_item_per_workgroup) - createLocalMemfftKernelString(plan); - else - createGlobalFFTKernelString(plan, plan->n.x, 1, cl_fft_kernel_x, 1); - } - } - break; - - case cl_fft_kernel_y: - if(plan->n.y > 1) - createGlobalFFTKernelString(plan, plan->n.y, plan->n.x, cl_fft_kernel_y, 1); - break; - - case cl_fft_kernel_z: - if(plan->n.z > 1) - createGlobalFFTKernelString(plan, plan->n.z, plan->n.x*plan->n.y, cl_fft_kernel_z, 1); - default: - return; - } -} + switch (dir) + { + case cl_fft_kernel_x: + if (plan->n.x > plan->max_localmem_fft_size) + { + createGlobalFFTKernelString(plan, plan->n.x, 1, cl_fft_kernel_x, 1); + } + else if (plan->n.x > 1) + { + getRadixArray(plan->n.x, radixArray, &numRadix, 0); + if (plan->n.x / radixArray[0] <= plan->max_work_item_per_workgroup) + { + createLocalMemfftKernelString(plan); + } + else + { + getRadixArray(plan->n.x, radixArray, &numRadix, plan->max_radix); + if (plan->n.x / radixArray[0] <= plan->max_work_item_per_workgroup) + createLocalMemfftKernelString(plan); + else + createGlobalFFTKernelString(plan, plan->n.x, 1, cl_fft_kernel_x, 1); + } + } + break; + + case cl_fft_kernel_y: + if (plan->n.y > 1) + createGlobalFFTKernelString(plan, plan->n.y, plan->n.x, cl_fft_kernel_y, 1); + break; + + case cl_fft_kernel_z: + if (plan->n.z > 1) + createGlobalFFTKernelString(plan, plan->n.z, plan->n.x * plan->n.y, cl_fft_kernel_z, 1); + default: + return; + } +} diff --git a/src/algorithms/libs/opencl/fft_setup.cc b/src/algorithms/libs/opencl/fft_setup.cc index 6d2025d66..1349d65f7 100644 --- a/src/algorithms/libs/opencl/fft_setup.cc +++ b/src/algorithms/libs/opencl/fft_setup.cc @@ -61,59 +61,59 @@ using namespace std; extern void getKernelWorkDimensions(cl_fft_plan *plan, cl_fft_kernel_info *kernelInfo, cl_int *batchSize, size_t *gWorkItems, size_t *lWorkItems); -static void +static void getBlockConfigAndKernelString(cl_fft_plan *plan) { - plan->temp_buffer_needed = 0; - *plan->kernel_string += baseKernels; - - if(plan->format == clFFT_SplitComplexFormat) - *plan->kernel_string += twistKernelPlannar; - else - *plan->kernel_string += twistKernelInterleaved; - - switch(plan->dim) - { - case clFFT_1D: - FFT1D(plan, cl_fft_kernel_x); - break; - - case clFFT_2D: - FFT1D(plan, cl_fft_kernel_x); - FFT1D(plan, cl_fft_kernel_y); - break; - - case clFFT_3D: - FFT1D(plan, cl_fft_kernel_x); - FFT1D(plan, cl_fft_kernel_y); - FFT1D(plan, cl_fft_kernel_z); - break; - - default: - return; - } - - plan->temp_buffer_needed = 0; - cl_fft_kernel_info *kInfo = plan->kernel_info; - while(kInfo) - { - plan->temp_buffer_needed |= !kInfo->in_place_possible; - kInfo = kInfo->next; - } + plan->temp_buffer_needed = 0; + *plan->kernel_string += baseKernels; + + if (plan->format == clFFT_SplitComplexFormat) + *plan->kernel_string += twistKernelPlannar; + else + *plan->kernel_string += twistKernelInterleaved; + + switch (plan->dim) + { + case clFFT_1D: + FFT1D(plan, cl_fft_kernel_x); + break; + + case clFFT_2D: + FFT1D(plan, cl_fft_kernel_x); + FFT1D(plan, cl_fft_kernel_y); + break; + + case clFFT_3D: + FFT1D(plan, cl_fft_kernel_x); + FFT1D(plan, cl_fft_kernel_y); + FFT1D(plan, cl_fft_kernel_z); + break; + + default: + return; + } + + plan->temp_buffer_needed = 0; + cl_fft_kernel_info *kInfo = plan->kernel_info; + while (kInfo) + { + plan->temp_buffer_needed |= !kInfo->in_place_possible; + kInfo = kInfo->next; + } } - + static void deleteKernelInfo(cl_fft_kernel_info *kInfo) { - if(kInfo) - { - if(kInfo->kernel_name) - free(kInfo->kernel_name); - if(kInfo->kernel) - clReleaseKernel(kInfo->kernel); - free(kInfo); - } + if (kInfo) + { + if (kInfo->kernel_name) + free(kInfo->kernel_name); + if (kInfo->kernel) + clReleaseKernel(kInfo->kernel); + free(kInfo); + } } static void @@ -121,282 +121,282 @@ destroy_plan(cl_fft_plan *Plan) { cl_fft_kernel_info *kernel_info = Plan->kernel_info; - while(kernel_info) - { - cl_fft_kernel_info *tmp = kernel_info->next; - deleteKernelInfo(kernel_info); - kernel_info = tmp; - } - - Plan->kernel_info = NULL; - - if(Plan->kernel_string) - { - delete Plan->kernel_string; - Plan->kernel_string = NULL; - } - if(Plan->twist_kernel) - { - clReleaseKernel(Plan->twist_kernel); - Plan->twist_kernel = NULL; - } - if(Plan->program) - { - clReleaseProgram(Plan->program); - Plan->program = NULL; - } - if(Plan->tempmemobj) - { - clReleaseMemObject(Plan->tempmemobj); - Plan->tempmemobj = NULL; - } - if(Plan->tempmemobj_real) - { - clReleaseMemObject(Plan->tempmemobj_real); - Plan->tempmemobj_real = NULL; - } - if(Plan->tempmemobj_imag) - { - clReleaseMemObject(Plan->tempmemobj_imag); - Plan->tempmemobj_imag = NULL; - } + while (kernel_info) + { + cl_fft_kernel_info *tmp = kernel_info->next; + deleteKernelInfo(kernel_info); + kernel_info = tmp; + } + + Plan->kernel_info = NULL; + + if (Plan->kernel_string) + { + delete Plan->kernel_string; + Plan->kernel_string = NULL; + } + if (Plan->twist_kernel) + { + clReleaseKernel(Plan->twist_kernel); + Plan->twist_kernel = NULL; + } + if (Plan->program) + { + clReleaseProgram(Plan->program); + Plan->program = NULL; + } + if (Plan->tempmemobj) + { + clReleaseMemObject(Plan->tempmemobj); + Plan->tempmemobj = NULL; + } + if (Plan->tempmemobj_real) + { + clReleaseMemObject(Plan->tempmemobj_real); + Plan->tempmemobj_real = NULL; + } + if (Plan->tempmemobj_imag) + { + clReleaseMemObject(Plan->tempmemobj_imag); + Plan->tempmemobj_imag = NULL; + } } static int -createKernelList(cl_fft_plan *plan) +createKernelList(cl_fft_plan *plan) { - cl_program program = plan->program; - cl_fft_kernel_info *kernel_info = plan->kernel_info; - - cl_int err; - while(kernel_info) - { - kernel_info->kernel = clCreateKernel(program, kernel_info->kernel_name, &err); - if(!kernel_info->kernel || err != CL_SUCCESS) - return err; - kernel_info = kernel_info->next; - } - - if(plan->format == clFFT_SplitComplexFormat) - plan->twist_kernel = clCreateKernel(program, "clFFT_1DTwistSplit", &err); - else - plan->twist_kernel = clCreateKernel(program, "clFFT_1DTwistInterleaved", &err); - - if(!plan->twist_kernel || err) - return err; + cl_program program = plan->program; + cl_fft_kernel_info *kernel_info = plan->kernel_info; - return CL_SUCCESS; + cl_int err; + while (kernel_info) + { + kernel_info->kernel = clCreateKernel(program, kernel_info->kernel_name, &err); + if (!kernel_info->kernel || err != CL_SUCCESS) + return err; + kernel_info = kernel_info->next; + } + + if (plan->format == clFFT_SplitComplexFormat) + plan->twist_kernel = clCreateKernel(program, "clFFT_1DTwistSplit", &err); + else + plan->twist_kernel = clCreateKernel(program, "clFFT_1DTwistInterleaved", &err); + + if (!plan->twist_kernel || err) + return err; + + return CL_SUCCESS; } int getMaxKernelWorkGroupSize(cl_fft_plan *plan, unsigned int *max_wg_size, unsigned int num_devices, cl_device_id *devices) -{ +{ int reg_needed = 0; *max_wg_size = std::numeric_limits::max(); int err; unsigned wg_size; - - unsigned int i; - for(i = 0; i < num_devices; i++) - { - cl_fft_kernel_info *kInfo = plan->kernel_info; - while(kInfo) - { - err = clGetKernelWorkGroupInfo(kInfo->kernel, devices[i], CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &wg_size, NULL); - if(err != CL_SUCCESS) - return -1; - - if(wg_size < kInfo->num_workitems_per_workgroup) - reg_needed |= 1; - - if(*max_wg_size > wg_size) - *max_wg_size = wg_size; - - kInfo = kInfo->next; - } - } - - return reg_needed; -} -#define ERR_MACRO(err) { \ - if( err != CL_SUCCESS) \ - { \ - if(error_code) \ - *error_code = err; \ - clFFT_DestroyPlan((clFFT_Plan) plan); \ - return (clFFT_Plan) NULL; \ - } \ - } + unsigned int i; + for (i = 0; i < num_devices; i++) + { + cl_fft_kernel_info *kInfo = plan->kernel_info; + while (kInfo) + { + err = clGetKernelWorkGroupInfo(kInfo->kernel, devices[i], CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &wg_size, NULL); + if (err != CL_SUCCESS) + return -1; + + if (wg_size < kInfo->num_workitems_per_workgroup) + reg_needed |= 1; + + if (*max_wg_size > wg_size) + *max_wg_size = wg_size; + + kInfo = kInfo->next; + } + } + + return reg_needed; +} + +#define ERR_MACRO(err) \ + { \ + if (err != CL_SUCCESS) \ + { \ + if (error_code) \ + *error_code = err; \ + clFFT_DestroyPlan((clFFT_Plan)plan); \ + return (clFFT_Plan)NULL; \ + } \ + } clFFT_Plan -clFFT_CreatePlan(cl_context context, clFFT_Dim3 n, clFFT_Dimension dim, clFFT_DataFormat dataFormat, cl_int *error_code ) +clFFT_CreatePlan(cl_context context, clFFT_Dim3 n, clFFT_Dimension dim, clFFT_DataFormat dataFormat, cl_int *error_code) { - int i; - cl_int err; - int isPow2 = 1; - cl_fft_plan *plan = NULL; - ostringstream kString; - int num_devices; - int gpu_found = 0; - cl_device_id devices[16]; - size_t ret_size; - cl_device_type device_type; - - if(!context) - ERR_MACRO(CL_INVALID_VALUE); - - isPow2 |= n.x && !( (n.x - 1) & n.x ); - isPow2 |= n.y && !( (n.y - 1) & n.y ); - isPow2 |= n.z && !( (n.z - 1) & n.z ); + int i; + cl_int err; + int isPow2 = 1; + cl_fft_plan *plan = NULL; + ostringstream kString; + int num_devices; + int gpu_found = 0; + cl_device_id devices[16]; + size_t ret_size; + cl_device_type device_type; - if(!isPow2) - ERR_MACRO(CL_INVALID_VALUE); - - if( (dim == clFFT_1D && (n.y != 1 || n.z != 1)) || (dim == clFFT_2D && n.z != 1) ) - ERR_MACRO(CL_INVALID_VALUE); + if (!context) + ERR_MACRO(CL_INVALID_VALUE); - plan = (cl_fft_plan *) malloc(sizeof(cl_fft_plan)); - if(!plan) - ERR_MACRO(CL_OUT_OF_RESOURCES); - - plan->context = context; - clRetainContext(context); - plan->n = n; - plan->dim = dim; - plan->format = dataFormat; - plan->kernel_info = 0; - plan->num_kernels = 0; - plan->twist_kernel = 0; - plan->program = 0; - plan->temp_buffer_needed = 0; - plan->last_batch_size = 0; - plan->tempmemobj = 0; - plan->tempmemobj_real = 0; - plan->tempmemobj_imag = 0; - plan->max_localmem_fft_size = 2048; - plan->max_work_item_per_workgroup = 256; - plan->max_radix = 16; - plan->min_mem_coalesce_width = 16; - plan->num_local_mem_banks = 16; - -patch_kernel_source: + isPow2 |= n.x && !((n.x - 1) & n.x); + isPow2 |= n.y && !((n.y - 1) & n.y); + isPow2 |= n.z && !((n.z - 1) & n.z); - plan->kernel_string = new string(""); - if(!plan->kernel_string) + if (!isPow2) + ERR_MACRO(CL_INVALID_VALUE); + + if ((dim == clFFT_1D && (n.y != 1 || n.z != 1)) || (dim == clFFT_2D && n.z != 1)) + ERR_MACRO(CL_INVALID_VALUE); + + plan = (cl_fft_plan *)malloc(sizeof(cl_fft_plan)); + if (!plan) ERR_MACRO(CL_OUT_OF_RESOURCES); - getBlockConfigAndKernelString(plan); - - const char *source_str = plan->kernel_string->c_str(); - plan->program = clCreateProgramWithSource(context, 1, (const char**) &source_str, NULL, &err); + plan->context = context; + clRetainContext(context); + plan->n = n; + plan->dim = dim; + plan->format = dataFormat; + plan->kernel_info = 0; + plan->num_kernels = 0; + plan->twist_kernel = 0; + plan->program = 0; + plan->temp_buffer_needed = 0; + plan->last_batch_size = 0; + plan->tempmemobj = 0; + plan->tempmemobj_real = 0; + plan->tempmemobj_imag = 0; + plan->max_localmem_fft_size = 2048; + plan->max_work_item_per_workgroup = 256; + plan->max_radix = 16; + plan->min_mem_coalesce_width = 16; + plan->num_local_mem_banks = 16; + +patch_kernel_source: + + plan->kernel_string = new string(""); + if (!plan->kernel_string) + ERR_MACRO(CL_OUT_OF_RESOURCES); + + getBlockConfigAndKernelString(plan); + + const char *source_str = plan->kernel_string->c_str(); + plan->program = clCreateProgramWithSource(context, 1, (const char **)&source_str, NULL, &err); ERR_MACRO(err); - err = clGetContextInfo(context, CL_CONTEXT_DEVICES, sizeof(devices), devices, &ret_size); - ERR_MACRO(err); - - num_devices = (int)(ret_size / sizeof(cl_device_id)); - - for(i = 0; i < num_devices; i++) - { - err = clGetDeviceInfo(devices[i], CL_DEVICE_TYPE, sizeof(device_type), &device_type, NULL); - ERR_MACRO(err); - - if(device_type == CL_DEVICE_TYPE_GPU) - { - gpu_found = 1; - err = clBuildProgram(plan->program, 1, &devices[i], "-cl-mad-enable", NULL, NULL); - if (err != CL_SUCCESS) - { - char *build_log; - char devicename[200]; - size_t log_size; - - err = clGetProgramBuildInfo(plan->program, devices[i], CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size); - ERR_MACRO(err); - - build_log = (char *) malloc(log_size + 1); - - err = clGetProgramBuildInfo(plan->program, devices[i], CL_PROGRAM_BUILD_LOG, log_size, build_log, NULL); - ERR_MACRO(err); - - err = clGetDeviceInfo(devices[i], CL_DEVICE_NAME, sizeof(devicename), devicename, NULL); - ERR_MACRO(err); - - fprintf(stdout, "FFT program build log on device %s\n", devicename); - fprintf(stdout, "%s\n", build_log); - free(build_log); - - ERR_MACRO(err); - } - } - } - - if(!gpu_found) - ERR_MACRO(CL_INVALID_CONTEXT); - - err = createKernelList(plan); + err = clGetContextInfo(context, CL_CONTEXT_DEVICES, sizeof(devices), devices, &ret_size); ERR_MACRO(err); - + + num_devices = (int)(ret_size / sizeof(cl_device_id)); + + for (i = 0; i < num_devices; i++) + { + err = clGetDeviceInfo(devices[i], CL_DEVICE_TYPE, sizeof(device_type), &device_type, NULL); + ERR_MACRO(err); + + if (device_type == CL_DEVICE_TYPE_GPU) + { + gpu_found = 1; + err = clBuildProgram(plan->program, 1, &devices[i], "-cl-mad-enable", NULL, NULL); + if (err != CL_SUCCESS) + { + char *build_log; + char devicename[200]; + size_t log_size; + + err = clGetProgramBuildInfo(plan->program, devices[i], CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size); + ERR_MACRO(err); + + build_log = (char *)malloc(log_size + 1); + + err = clGetProgramBuildInfo(plan->program, devices[i], CL_PROGRAM_BUILD_LOG, log_size, build_log, NULL); + ERR_MACRO(err); + + err = clGetDeviceInfo(devices[i], CL_DEVICE_NAME, sizeof(devicename), devicename, NULL); + ERR_MACRO(err); + + fprintf(stdout, "FFT program build log on device %s\n", devicename); + fprintf(stdout, "%s\n", build_log); + free(build_log); + + ERR_MACRO(err); + } + } + } + + if (!gpu_found) + ERR_MACRO(CL_INVALID_CONTEXT); + + err = createKernelList(plan); + ERR_MACRO(err); + // we created program and kernels based on "some max work group size (default 256)" ... this work group size - // may be larger than what kernel may execute with ... if thats the case we need to regenerate the kernel source - // setting this as limit i.e max group size and rebuild. - unsigned int max_kernel_wg_size; - int patching_req = getMaxKernelWorkGroupSize(plan, &max_kernel_wg_size, num_devices, devices); - if(patching_req == -1) - { - ERR_MACRO(err); - } - - if(patching_req) - { - destroy_plan(plan); - plan->max_work_item_per_workgroup = max_kernel_wg_size; - goto patch_kernel_source; - } - - cl_fft_kernel_info *kInfo = plan->kernel_info; - while(kInfo) - { - plan->num_kernels++; - kInfo = kInfo->next; - } - - if(error_code) - *error_code = CL_SUCCESS; - - return (clFFT_Plan) plan; + // may be larger than what kernel may execute with ... if thats the case we need to regenerate the kernel source + // setting this as limit i.e max group size and rebuild. + unsigned int max_kernel_wg_size; + int patching_req = getMaxKernelWorkGroupSize(plan, &max_kernel_wg_size, num_devices, devices); + if (patching_req == -1) + { + ERR_MACRO(err); + } + + if (patching_req) + { + destroy_plan(plan); + plan->max_work_item_per_workgroup = max_kernel_wg_size; + goto patch_kernel_source; + } + + cl_fft_kernel_info *kInfo = plan->kernel_info; + while (kInfo) + { + plan->num_kernels++; + kInfo = kInfo->next; + } + + if (error_code) + *error_code = CL_SUCCESS; + + return (clFFT_Plan)plan; } -void -clFFT_DestroyPlan(clFFT_Plan plan) +void clFFT_DestroyPlan(clFFT_Plan plan) { - cl_fft_plan *Plan = (cl_fft_plan *) plan; - if(Plan) - { - destroy_plan(Plan); - clReleaseContext(Plan->context); - free(Plan); - } + cl_fft_plan *Plan = (cl_fft_plan *)plan; + if (Plan) + { + destroy_plan(Plan); + clReleaseContext(Plan->context); + free(Plan); + } } -void clFFT_DumpPlan( clFFT_Plan Plan, FILE *file) +void clFFT_DumpPlan(clFFT_Plan Plan, FILE *file) { - size_t gDim, lDim; - FILE *out; - if(!file) - out = stdout; - else - out = file; - - cl_fft_plan *plan = (cl_fft_plan *) Plan; - cl_fft_kernel_info *kInfo = plan->kernel_info; - - while(kInfo) - { - cl_int s = 1; - getKernelWorkDimensions(plan, kInfo, &s, &gDim, &lDim); - fprintf(out, "Run kernel %s with global dim = {%zd*BatchSize}, local dim={%zd}\n", kInfo->kernel_name, gDim, lDim); - kInfo = kInfo->next; - } - fprintf(out, "%s\n", plan->kernel_string->c_str()); + size_t gDim, lDim; + FILE *out; + if (!file) + out = stdout; + else + out = file; + + cl_fft_plan *plan = (cl_fft_plan *)Plan; + cl_fft_kernel_info *kInfo = plan->kernel_info; + + while (kInfo) + { + cl_int s = 1; + getKernelWorkDimensions(plan, kInfo, &s, &gDim, &lDim); + fprintf(out, "Run kernel %s with global dim = {%zd*BatchSize}, local dim={%zd}\n", kInfo->kernel_name, gDim, lDim); + kInfo = kInfo->next; + } + fprintf(out, "%s\n", plan->kernel_string->c_str()); } diff --git a/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc b/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc index 03ae15500..cf6f22508 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc @@ -253,11 +253,12 @@ const unsigned int tbl_CRC24Q[] = { 0x42FA2F, 0xC4B6D4, 0xC82F22, 0x4E63D9, 0xD11CCE, 0x575035, 0x5BC9C3, 0xDD8538}; -extern "C" { -void dgemm_(char *, char *, int *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); -extern void dgetrf_(int *, int *, double *, int *, int *, int *); -extern void dgetri_(int *, double *, int *, int *, double *, int *, int *); -extern void dgetrs_(char *, int *, int *, double *, int *, int *, double *, int *, int *); +extern "C" +{ + void dgemm_(char *, char *, int *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *); + extern void dgetrf_(int *, int *, double *, int *, int *, int *); + extern void dgetri_(int *, double *, int *, int *, double *, int *, int *); + extern void dgetrs_(char *, int *, int *, double *, int *, int *, double *, int *, int *); } diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/msvc/config.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/msvc/config.h index 8b12c2a47..5da8f1bff 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/msvc/config.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/msvc/config.h @@ -1,15 +1,15 @@ -#ifndef _MSC_VER // [ +#ifndef _MSC_VER // [ #error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] +#endif // _MSC_VER ] -#ifndef _MSC_CONFIG_H_ // [ +#ifndef _MSC_CONFIG_H_ // [ #define _MSC_CONFIG_H_ //////////////////////////////////////////////////////////////////////// // enable inline functions for C code //////////////////////////////////////////////////////////////////////// #ifndef __cplusplus -# define inline __inline +#define inline __inline #endif //////////////////////////////////////////////////////////////////////// @@ -23,12 +23,15 @@ typedef ptrdiff_t ssize_t; //////////////////////////////////////////////////////////////////////// #if _MSC_VER < 1800 #include -static inline long lrint(double x){return (long)(x > 0.0 ? x + 0.5 : x - 0.5);} -static inline long lrintf(float x){return (long)(x > 0.0f ? x + 0.5f : x - 0.5f);} -static inline long long llrint(double x){return (long long)(x > 0.0 ? x + 0.5 : x - 0.5);} -static inline long long llrintf(float x){return (long long)(x > 0.0f ? x + 0.5f : x - 0.5f);} -static inline double rint(double x){return (x > 0.0)? floor(x + 0.5) : ceil(x - 0.5);} -static inline float rintf(float x){return (x > 0.0f)? floorf(x + 0.5f) : ceilf(x - 0.5f);} +static inline long lrint(double x) +{ + return (long)(x > 0.0 ? x + 0.5 : x - 0.5); +} +static inline long lrintf(float x) { return (long)(x > 0.0f ? x + 0.5f : x - 0.5f); } +static inline long long llrint(double x) { return (long long)(x > 0.0 ? x + 0.5 : x - 0.5); } +static inline long long llrintf(float x) { return (long long)(x > 0.0f ? x + 0.5f : x - 0.5f); } +static inline double rint(double x) { return (x > 0.0) ? floor(x + 0.5) : ceil(x - 0.5); } +static inline float rintf(float x) { return (x > 0.0f) ? floorf(x + 0.5f) : ceilf(x - 0.5f); } #endif //////////////////////////////////////////////////////////////////////// @@ -43,7 +46,10 @@ static inline float rintf(float x){return (x > 0.0f)? floorf(x + 0.5f) : ceilf(x // random and srandom //////////////////////////////////////////////////////////////////////// #include -static inline long int random (void) { return rand(); } -static inline void srandom (unsigned int seed) { srand(seed); } +static inline long int random(void) +{ + return rand(); +} +static inline void srandom(unsigned int seed) { srand(seed); } -#endif // _MSC_CONFIG_H_ ] +#endif // _MSC_CONFIG_H_ ] diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr.tmpl.c b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr.tmpl.c index 95f5f057c..bee754747 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr.tmpl.c +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr.tmpl.c @@ -31,85 +31,97 @@ static intptr_t __alignment_mask = 0; struct volk_gnsssdr_machine *get_machine(void) { - extern struct volk_gnsssdr_machine *volk_gnsssdr_machines[]; - extern unsigned int n_volk_gnsssdr_machines; - static struct volk_gnsssdr_machine *machine = NULL; + extern struct volk_gnsssdr_machine *volk_gnsssdr_machines[]; + extern unsigned int n_volk_gnsssdr_machines; + static struct volk_gnsssdr_machine *machine = NULL; - if(machine != NULL) - return machine; - else { - unsigned int max_score = 0; - unsigned int i; - struct volk_gnsssdr_machine *max_machine = NULL; - for(i=0; icaps & (~volk_gnsssdr_get_lvarch()))) { - if(volk_gnsssdr_machines[i]->caps > max_score) { - max_score = volk_gnsssdr_machines[i]->caps; - max_machine = volk_gnsssdr_machines[i]; + if (machine != NULL) + return machine; + else + { + unsigned int max_score = 0; + unsigned int i; + struct volk_gnsssdr_machine *max_machine = NULL; + for (i = 0; i < n_volk_gnsssdr_machines; i++) + { + if (!(volk_gnsssdr_machines[i]->caps & (~volk_gnsssdr_get_lvarch()))) + { + if (volk_gnsssdr_machines[i]->caps > max_score) + { + max_score = volk_gnsssdr_machines[i]->caps; + max_machine = volk_gnsssdr_machines[i]; + } + } + } + machine = max_machine; + //printf("Using Volk machine: %s\n", machine->name); + __alignment = machine->alignment; + __alignment_mask = (intptr_t)(__alignment - 1); + return machine; } - } - } - machine = max_machine; - //printf("Using Volk machine: %s\n", machine->name); - __alignment = machine->alignment; - __alignment_mask = (intptr_t)(__alignment-1); - return machine; - } } void volk_gnsssdr_list_machines(void) { - extern struct volk_gnsssdr_machine *volk_gnsssdr_machines[]; - extern unsigned int n_volk_gnsssdr_machines; + extern struct volk_gnsssdr_machine *volk_gnsssdr_machines[]; + extern unsigned int n_volk_gnsssdr_machines; - unsigned int i; - for(i=0; icaps & (~volk_gnsssdr_get_lvarch()))) { - printf("%s;", volk_gnsssdr_machines[i]->name); - } - } - printf("\n"); + unsigned int i; + for (i = 0; i < n_volk_gnsssdr_machines; i++) + { + if (!(volk_gnsssdr_machines[i]->caps & (~volk_gnsssdr_get_lvarch()))) + { + printf("%s;", volk_gnsssdr_machines[i]->name); + } + } + printf("\n"); } -const char* volk_gnsssdr_get_machine(void) +const char *volk_gnsssdr_get_machine(void) { - extern struct volk_gnsssdr_machine *volk_gnsssdr_machines[]; - extern unsigned int n_volk_gnsssdr_machines; - static struct volk_gnsssdr_machine *machine = NULL; + extern struct volk_gnsssdr_machine *volk_gnsssdr_machines[]; + extern unsigned int n_volk_gnsssdr_machines; + static struct volk_gnsssdr_machine *machine = NULL; - if(machine != NULL) - return machine->name; - else { - unsigned int max_score = 0; - unsigned int i; - struct volk_gnsssdr_machine *max_machine = NULL; - for(i=0; icaps & (~volk_gnsssdr_get_lvarch()))) { - if(volk_gnsssdr_machines[i]->caps > max_score) { - max_score = volk_gnsssdr_machines[i]->caps; - max_machine = volk_gnsssdr_machines[i]; + if (machine != NULL) + return machine->name; + else + { + unsigned int max_score = 0; + unsigned int i; + struct volk_gnsssdr_machine *max_machine = NULL; + for (i = 0; i < n_volk_gnsssdr_machines; i++) + { + if (!(volk_gnsssdr_machines[i]->caps & (~volk_gnsssdr_get_lvarch()))) + { + if (volk_gnsssdr_machines[i]->caps > max_score) + { + max_score = volk_gnsssdr_machines[i]->caps; + max_machine = volk_gnsssdr_machines[i]; + } + } + } + machine = max_machine; + return machine->name; } - } - } - machine = max_machine; - return machine->name; - } } size_t volk_gnsssdr_get_alignment(void) { - get_machine(); //ensures alignment is set + get_machine(); //ensures alignment is set return __alignment; } bool volk_gnsssdr_is_aligned(const void *ptr) { - return ((intptr_t)(ptr) & __alignment_mask) == 0; + return ((intptr_t)(ptr)&__alignment_mask) == 0; } #define LV_HAVE_GENERIC #define LV_HAVE_DISPATCHER +// clang-format off + %for kern in kernels: %if kern.has_dispatcher: @@ -190,6 +202,8 @@ void ${kern.name}_manual(${kern.arglist_full}, const char* impl_name) ); } + + volk_gnsssdr_func_desc_t ${kern.name}_get_func_desc(void) { const char **impl_names = get_machine()->${kern.name}_impl_names; const int *impl_deps = get_machine()->${kern.name}_impl_deps; @@ -205,3 +219,5 @@ volk_gnsssdr_func_desc_t ${kern.name}_get_func_desc(void) { } %endfor + + // clang-format on diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr.tmpl.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr.tmpl.h index 556d67f8e..4164a29dd 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr.tmpl.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr.tmpl.h @@ -42,7 +42,7 @@ typedef struct volk_gnsssdr_func_desc VOLK_API void volk_gnsssdr_list_machines(void); //! Returns the name of the machine this instance will use -VOLK_API const char* volk_gnsssdr_get_machine(void); +VOLK_API const char *volk_gnsssdr_get_machine(void); //! Get the machine alignment in bytes VOLK_API size_t volk_gnsssdr_get_alignment(void); @@ -73,6 +73,7 @@ VOLK_API bool volk_gnsssdr_is_aligned(const void *ptr); //! A function pointer to the dispatcher implementation extern VOLK_API ${kern.pname} ${kern.name}; +// clang-format off //! A function pointer to the fastest aligned implementation extern VOLK_API ${kern.pname} ${kern.name}_a; @@ -85,6 +86,7 @@ extern VOLK_API void ${kern.name}_manual(${kern.arglist_full}, const char* impl_ //! Get description parameters for this kernel extern VOLK_API volk_gnsssdr_func_desc_t ${kern.name}_get_func_desc(void); %endfor +// clang-format off __VOLK_DECL_END diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_config_fixed.tmpl.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_config_fixed.tmpl.h index ed55d0b58..4159bdef7 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_config_fixed.tmpl.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_config_fixed.tmpl.h @@ -19,10 +19,11 @@ #ifndef INCLUDED_VOLK_GNSSSDR_CONFIG_FIXED_H #define INCLUDED_VOLK_GNSSSDR_CONFIG_FIXED_H +// clang-format off %for i, arch in enumerate(archs): //#ifndef LV_${arch.name.upper()} #define LV_${arch.name.upper()} ${i} //#endif %endfor - +// clang-format on #endif /*INCLUDED_VOLK_GNSSSDR_CONFIG_FIXED*/ diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_cpu.tmpl.c b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_cpu.tmpl.c index 1d094a87a..f04f2d9ff 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_cpu.tmpl.c +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_cpu.tmpl.c @@ -24,50 +24,54 @@ struct VOLK_CPU volk_gnsssdr_cpu; #if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64) - #define VOLK_CPU_x86 +#define VOLK_CPU_x86 #endif #if defined(VOLK_CPU_x86) //implement get cpuid for gcc compilers using a system or local copy of cpuid.h #if defined(__GNUC__) - #include - #define cpuid_x86(op, r) __get_cpuid(op, (unsigned int *)r+0, (unsigned int *)r+1, (unsigned int *)r+2, (unsigned int *)r+3) - #define cpuid_x86_count(op, count, regs) __cpuid_count(op, count, *((unsigned int*)regs), *((unsigned int*)regs+1), *((unsigned int*)regs+2), *((unsigned int*)regs+3)) +#include +#define cpuid_x86(op, r) __get_cpuid(op, (unsigned int *)r + 0, (unsigned int *)r + 1, (unsigned int *)r + 2, (unsigned int *)r + 3) +#define cpuid_x86_count(op, count, regs) __cpuid_count(op, count, *((unsigned int *)regs), *((unsigned int *)regs + 1), *((unsigned int *)regs + 2), *((unsigned int *)regs + 3)) - /* Return Intel AVX extended CPU capabilities register. +/* Return Intel AVX extended CPU capabilities register. * This function will bomb on non-AVX-capable machines, so * check for AVX capability before executing. */ - #if ((__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__clang_major__ >= 3)) && defined(HAVE_XGETBV) - static inline unsigned long long _xgetbv(unsigned int index){ - unsigned int eax, edx; - __VOLK_ASM __VOLK_VOLATILE ("xgetbv" : "=a"(eax), "=d"(edx) : "c"(index)); - return ((unsigned long long)edx << 32) | eax; - } - #define __xgetbv() _xgetbv(0) - #else - #define __xgetbv() 0 - #endif +#if ((__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__clang_major__ >= 3)) && defined(HAVE_XGETBV) +static inline unsigned long long _xgetbv(unsigned int index) +{ + unsigned int eax, edx; + __VOLK_ASM __VOLK_VOLATILE("xgetbv" + : "=a"(eax), "=d"(edx) + : "c"(index)); + return ((unsigned long long)edx << 32) | eax; +} +#define __xgetbv() _xgetbv(0) +#else +#define __xgetbv() 0 +#endif //implement get cpuid for MSVC compilers using __cpuid intrinsic #elif defined(_MSC_VER) && defined(HAVE_INTRIN_H) - #include - #define cpuid_x86(op, r) __cpuid(((int*)r), op) +#include +#define cpuid_x86(op, r) __cpuid(((int *)r), op) - #if defined(_XCR_XFEATURE_ENABLED_MASK) - #define __xgetbv() _xgetbv(_XCR_XFEATURE_ENABLED_MASK) - #else - #define __xgetbv() 0 - #endif +#if defined(_XCR_XFEATURE_ENABLED_MASK) +#define __xgetbv() _xgetbv(_XCR_XFEATURE_ENABLED_MASK) +#else +#define __xgetbv() 0 +#endif #else - #error "A get cpuid for volk_gnsssdr is not available on this compiler..." -#endif //defined(__GNUC__) +#error "A get cpuid for volk_gnsssdr is not available on this compiler..." +#endif //defined(__GNUC__) -#endif //defined(VOLK_CPU_x86) +#endif //defined(VOLK_CPU_x86) -static inline unsigned int cpuid_count_x86_bit(unsigned int level, unsigned int count, unsigned int reg, unsigned int bit) { +static inline unsigned int cpuid_count_x86_bit(unsigned int level, unsigned int count, unsigned int reg, unsigned int bit) +{ #if defined(VOLK_CPU_x86) unsigned int regs[4] = {0}; cpuid_x86_count(level, count, regs); @@ -77,10 +81,11 @@ static inline unsigned int cpuid_count_x86_bit(unsigned int level, unsigned int #endif } -static inline unsigned int cpuid_x86_bit(unsigned int reg, unsigned int op, unsigned int bit) { +static inline unsigned int cpuid_x86_bit(unsigned int reg, unsigned int op, unsigned int bit) +{ #if defined(VOLK_CPU_x86) unsigned int regs[4]; - memset(regs, 0, sizeof(unsigned int)*4); + memset(regs, 0, sizeof(unsigned int) * 4); cpuid_x86(op, regs); return regs[reg] >> bit & 0x01; #else @@ -88,10 +93,11 @@ static inline unsigned int cpuid_x86_bit(unsigned int reg, unsigned int op, unsi #endif } -static inline unsigned int check_extended_cpuid(unsigned int val) { +static inline unsigned int check_extended_cpuid(unsigned int val) +{ #if defined(VOLK_CPU_x86) unsigned int regs[4]; - memset(regs, 0, sizeof(unsigned int)*4); + memset(regs, 0, sizeof(unsigned int) * 4); cpuid_x86(0x80000000, regs); return regs[0] >= val; #else @@ -99,7 +105,8 @@ static inline unsigned int check_extended_cpuid(unsigned int val) { #endif } -static inline unsigned int get_avx_enabled(void) { +static inline unsigned int get_avx_enabled(void) +{ #if defined(VOLK_CPU_x86) return __xgetbv() & 0x6; #else @@ -107,7 +114,8 @@ static inline unsigned int get_avx_enabled(void) { #endif } -static inline unsigned int get_avx2_enabled(void) { +static inline unsigned int get_avx2_enabled(void) +{ #if defined(VOLK_CPU_x86) return __xgetbv() & 0x6; #else @@ -117,28 +125,30 @@ static inline unsigned int get_avx2_enabled(void) { //neon detection is linux specific #if defined(__arm__) && defined(__linux__) - #include - #include - #include - #define VOLK_CPU_ARM +#include +#include +#include +#define VOLK_CPU_ARM #endif -static int has_neon(void){ +static int has_neon(void) +{ #if defined(VOLK_CPU_ARM) FILE *auxvec_f; unsigned long auxvec[2]; unsigned int found_neon = 0; auxvec_f = fopen("/proc/self/auxv", "rb"); - if(!auxvec_f) return 0; + if (!auxvec_f) return 0; size_t r = 1; //so auxv is basically 32b of ID and 32b of value //so it goes like this - while(!found_neon && r) { - r = fread(auxvec, sizeof(unsigned long), 2, auxvec_f); - if((auxvec[0] == AT_HWCAP) && (auxvec[1] & HWCAP_NEON)) - found_neon = 1; - } + while (!found_neon && r) + { + r = fread(auxvec, sizeof(unsigned long), 2, auxvec_f); + if ((auxvec[0] == AT_HWCAP) && (auxvec[1] & HWCAP_NEON)) + found_neon = 1; + } fclose(auxvec_f); return found_neon; @@ -146,6 +156,7 @@ static int has_neon(void){ return 0; #endif } +// clang-format off %for arch in archs: static int i_can_has_${arch.name} (void) { @@ -195,3 +206,4 @@ unsigned int volk_gnsssdr_get_lvarch() { %endfor return retval; } +// clang-format on diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_cpu.tmpl.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_cpu.tmpl.h index 20dbac2cc..2122944fc 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_cpu.tmpl.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_cpu.tmpl.h @@ -23,16 +23,18 @@ __VOLK_DECL_BEGIN +// clang-format off struct VOLK_CPU { %for arch in archs: int (*has_${arch.name}) (); %endfor }; +// clang-format on extern struct VOLK_CPU volk_gnsssdr_cpu; -void volk_gnsssdr_cpu_init (); -unsigned int volk_gnsssdr_get_lvarch (); +void volk_gnsssdr_cpu_init(); +unsigned int volk_gnsssdr_get_lvarch(); __VOLK_DECL_END diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_machine_xxx.tmpl.c b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_machine_xxx.tmpl.c index c6182cb50..8492adb4d 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_machine_xxx.tmpl.c +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_machine_xxx.tmpl.c @@ -16,6 +16,8 @@ * along with GNSS-SDR. If not, see . */ +// clang-format off + <% this_machine = machine_dict[args[0]] %> <% arch_names = this_machine.arch_names %> @@ -31,6 +33,7 @@ #include "config.h" #endif + %for kern in kernels: #include %endfor @@ -56,3 +59,4 @@ struct volk_gnsssdr_machine volk_gnsssdr_machine_${this_machine.name} = { <% len_impls = len(impls) %> ${len_impls}, %endfor }; +// clang-format on diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_machines.tmpl.c b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_machines.tmpl.c index 1485a34e0..c89eb251c 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_machines.tmpl.c +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_machines.tmpl.c @@ -20,6 +20,7 @@ #include #include "volk_gnsssdr_machines.h" +// clang-format off struct volk_gnsssdr_machine *volk_gnsssdr_machines[] = { %for machine in machines: #ifdef LV_MACHINE_${machine.name.upper()} @@ -27,5 +28,5 @@ struct volk_gnsssdr_machine *volk_gnsssdr_machines[] = { #endif %endfor }; - -unsigned int n_volk_gnsssdr_machines = sizeof(volk_gnsssdr_machines)/sizeof(*volk_gnsssdr_machines); +// clang-format on +unsigned int n_volk_gnsssdr_machines = sizeof(volk_gnsssdr_machines) / sizeof(*volk_gnsssdr_machines); diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_machines.tmpl.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_machines.tmpl.h index 10e955e25..9a7e78cef 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_machines.tmpl.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_machines.tmpl.h @@ -27,6 +27,7 @@ __VOLK_DECL_BEGIN +// clang-format off struct volk_gnsssdr_machine { const unsigned int caps; //capabilities (i.e., archs compiled into this machine, in the volk_gnsssdr_get_lvarch format) const char *name; @@ -48,5 +49,6 @@ extern struct volk_gnsssdr_machine volk_gnsssdr_machine_${machine.name}; %endfor __VOLK_DECL_END +// clang-format on -#endif //INCLUDED_LIBVOLK_GNSSSDR_MACHINES_H +#endif //INCLUDED_LIBVOLK_GNSSSDR_MACHINES_H diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_typedefs.tmpl.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_typedefs.tmpl.h index def7e24c3..80fc36436 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_typedefs.tmpl.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/tmpl/volk_gnsssdr_typedefs.tmpl.h @@ -22,8 +22,10 @@ #include #include +// clang-format off %for kern in kernels: typedef void (*${kern.pname})(${kern.arglist_types}); %endfor +// clang-format on #endif /*INCLUDED_VOLK_GNSSSDR_TYPEDEFS*/ diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.h index a4b39e0ed..b9c050539 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.h @@ -45,7 +45,8 @@ #include -extern "C" { +extern "C" +{ #include "cnav_msg.h" #include "edc.h" #include "bits.h" diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_cc.h index ac2a85061..c13c2832b 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_cc.h @@ -42,7 +42,8 @@ #include #include -extern "C" { +extern "C" +{ #include "cnav_msg.h" #include "edc.h" #include "bits.h" diff --git a/src/algorithms/tracking/libs/cuda_multicorrelator.h b/src/algorithms/tracking/libs/cuda_multicorrelator.h index 82e3296f6..d3410f609 100644 --- a/src/algorithms/tracking/libs/cuda_multicorrelator.h +++ b/src/algorithms/tracking/libs/cuda_multicorrelator.h @@ -76,9 +76,9 @@ struct GPU_Complex } CUDA_CALLABLE_MEMBER_DEVICE void multiply_acc(const GPU_Complex& a, const GPU_Complex& b) { - //c=a*b+c - //real part - //c.r=(a.r*b.r - a.i*b.i)+c.r + //c=a*b+c + //real part + //c.r=(a.r*b.r - a.i*b.i)+c.r #ifdef __CUDACC__ r = __fmaf_rn(a.r, b.r, r); r = __fmaf_rn(-a.i, b.i, r); diff --git a/src/core/libs/gnss_sdr_supl_client.h b/src/core/libs/gnss_sdr_supl_client.h index 53c2f1e9a..6584d535b 100644 --- a/src/core/libs/gnss_sdr_supl_client.h +++ b/src/core/libs/gnss_sdr_supl_client.h @@ -34,7 +34,8 @@ #ifndef GNSS_SDR_SUPL_CLIENT_H_ #define GNSS_SDR_SUPL_CLIENT_H_ -extern "C" { +extern "C" +{ #include "supl.h" } #include "GPS_L1_CA.h" diff --git a/src/core/libs/supl/asn-rrlp/Accuracy.h b/src/core/libs/supl/asn-rrlp/Accuracy.h index 749b820bb..4555aee85 100644 --- a/src/core/libs/supl/asn-rrlp/Accuracy.h +++ b/src/core/libs/supl/asn-rrlp/Accuracy.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Accuracy */ -typedef long Accuracy_t; + /* Accuracy */ + typedef long Accuracy_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Accuracy; -asn_struct_free_f Accuracy_free; -asn_struct_print_f Accuracy_print; -asn_constr_check_f Accuracy_constraint; -ber_type_decoder_f Accuracy_decode_ber; -der_type_encoder_f Accuracy_encode_der; -xer_type_decoder_f Accuracy_decode_xer; -xer_type_encoder_f Accuracy_encode_xer; -per_type_decoder_f Accuracy_decode_uper; -per_type_encoder_f Accuracy_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Accuracy; + asn_struct_free_f Accuracy_free; + asn_struct_print_f Accuracy_print; + asn_constr_check_f Accuracy_constraint; + ber_type_decoder_f Accuracy_decode_ber; + der_type_encoder_f Accuracy_encode_der; + xer_type_decoder_f Accuracy_decode_xer; + xer_type_encoder_f Accuracy_encode_xer; + per_type_decoder_f Accuracy_decode_uper; + per_type_encoder_f Accuracy_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AccuracyOpt.h b/src/core/libs/supl/asn-rrlp/AccuracyOpt.h index 23e1e2474..0641d6bbe 100644 --- a/src/core/libs/supl/asn-rrlp/AccuracyOpt.h +++ b/src/core/libs/supl/asn-rrlp/AccuracyOpt.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* AccuracyOpt */ -typedef struct AccuracyOpt -{ - Accuracy_t *accuracy /* OPTIONAL */; + /* AccuracyOpt */ + typedef struct AccuracyOpt + { + Accuracy_t *accuracy /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} AccuracyOpt_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } AccuracyOpt_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AccuracyOpt; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AccuracyOpt; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AcquisAssist.h b/src/core/libs/supl/asn-rrlp/AcquisAssist.h index e5d195b25..158ba8a97 100644 --- a/src/core/libs/supl/asn-rrlp/AcquisAssist.h +++ b/src/core/libs/supl/asn-rrlp/AcquisAssist.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* AcquisAssist */ -typedef struct AcquisAssist -{ - TimeRelation_t timeRelation; - SeqOfAcquisElement_t acquisList; + /* AcquisAssist */ + typedef struct AcquisAssist + { + TimeRelation_t timeRelation; + SeqOfAcquisElement_t acquisList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} AcquisAssist_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } AcquisAssist_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AcquisAssist; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AcquisAssist; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AcquisElement.h b/src/core/libs/supl/asn-rrlp/AcquisElement.h index 0312ac2eb..365cfab2a 100644 --- a/src/core/libs/supl/asn-rrlp/AcquisElement.h +++ b/src/core/libs/supl/asn-rrlp/AcquisElement.h @@ -16,31 +16,32 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct AddionalDopplerFields; -struct AddionalAngleFields; + /* Forward declarations */ + struct AddionalDopplerFields; + struct AddionalAngleFields; -/* AcquisElement */ -typedef struct AcquisElement -{ - SatelliteID_t svid; - long doppler0; - struct AddionalDopplerFields *addionalDoppler /* OPTIONAL */; - long codePhase; - long intCodePhase; - long gpsBitNumber; - long codePhaseSearchWindow; - struct AddionalAngleFields *addionalAngle /* OPTIONAL */; + /* AcquisElement */ + typedef struct AcquisElement + { + SatelliteID_t svid; + long doppler0; + struct AddionalDopplerFields *addionalDoppler /* OPTIONAL */; + long codePhase; + long intCodePhase; + long gpsBitNumber; + long codePhaseSearchWindow; + struct AddionalAngleFields *addionalAngle /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} AcquisElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } AcquisElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AcquisElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AcquisElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AddionalAngleFields.h b/src/core/libs/supl/asn-rrlp/AddionalAngleFields.h index 8a83007a4..27b6ee4ab 100644 --- a/src/core/libs/supl/asn-rrlp/AddionalAngleFields.h +++ b/src/core/libs/supl/asn-rrlp/AddionalAngleFields.h @@ -15,21 +15,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* AddionalAngleFields */ -typedef struct AddionalAngleFields -{ - long azimuth; - long elevation; + /* AddionalAngleFields */ + typedef struct AddionalAngleFields + { + long azimuth; + long elevation; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} AddionalAngleFields_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } AddionalAngleFields_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AddionalAngleFields; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AddionalAngleFields; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AddionalDopplerFields.h b/src/core/libs/supl/asn-rrlp/AddionalDopplerFields.h index e57c347f5..48686e842 100644 --- a/src/core/libs/supl/asn-rrlp/AddionalDopplerFields.h +++ b/src/core/libs/supl/asn-rrlp/AddionalDopplerFields.h @@ -15,21 +15,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* AddionalDopplerFields */ -typedef struct AddionalDopplerFields -{ - long doppler1; - long dopplerUncertainty; + /* AddionalDopplerFields */ + typedef struct AddionalDopplerFields + { + long doppler1; + long dopplerUncertainty; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} AddionalDopplerFields_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } AddionalDopplerFields_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AddionalDopplerFields; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AddionalDopplerFields; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AdditionalAssistanceData.h b/src/core/libs/supl/asn-rrlp/AdditionalAssistanceData.h index b23f88a0f..683693809 100644 --- a/src/core/libs/supl/asn-rrlp/AdditionalAssistanceData.h +++ b/src/core/libs/supl/asn-rrlp/AdditionalAssistanceData.h @@ -17,26 +17,27 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* AdditionalAssistanceData */ -typedef struct AdditionalAssistanceData -{ - GPSAssistanceData_t *gpsAssistanceData /* OPTIONAL */; - ExtensionContainer_t *extensionContainer /* OPTIONAL */; - /* + /* AdditionalAssistanceData */ + typedef struct AdditionalAssistanceData + { + GPSAssistanceData_t *gpsAssistanceData /* OPTIONAL */; + ExtensionContainer_t *extensionContainer /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - GANSSAssistanceData_t *ganssAssistanceData /* OPTIONAL */; + GANSSAssistanceData_t *ganssAssistanceData /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} AdditionalAssistanceData_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } AdditionalAssistanceData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AdditionalAssistanceData; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AdditionalAssistanceData; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AdditionalDopplerFields.h b/src/core/libs/supl/asn-rrlp/AdditionalDopplerFields.h index 54f50ba67..a949c1d22 100644 --- a/src/core/libs/supl/asn-rrlp/AdditionalDopplerFields.h +++ b/src/core/libs/supl/asn-rrlp/AdditionalDopplerFields.h @@ -15,21 +15,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* AdditionalDopplerFields */ -typedef struct AdditionalDopplerFields -{ - long doppler1; - long dopplerUncertainty; + /* AdditionalDopplerFields */ + typedef struct AdditionalDopplerFields + { + long doppler1; + long dopplerUncertainty; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} AdditionalDopplerFields_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } AdditionalDopplerFields_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AdditionalDopplerFields; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AdditionalDopplerFields; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AlertFlag.h b/src/core/libs/supl/asn-rrlp/AlertFlag.h index 939ed9ce8..1aa1e13f4 100644 --- a/src/core/libs/supl/asn-rrlp/AlertFlag.h +++ b/src/core/libs/supl/asn-rrlp/AlertFlag.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* AlertFlag */ -typedef long AlertFlag_t; + /* AlertFlag */ + typedef long AlertFlag_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AlertFlag; -asn_struct_free_f AlertFlag_free; -asn_struct_print_f AlertFlag_print; -asn_constr_check_f AlertFlag_constraint; -ber_type_decoder_f AlertFlag_decode_ber; -der_type_encoder_f AlertFlag_encode_der; -xer_type_decoder_f AlertFlag_decode_xer; -xer_type_encoder_f AlertFlag_encode_xer; -per_type_decoder_f AlertFlag_decode_uper; -per_type_encoder_f AlertFlag_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AlertFlag; + asn_struct_free_f AlertFlag_free; + asn_struct_print_f AlertFlag_print; + asn_constr_check_f AlertFlag_constraint; + ber_type_decoder_f AlertFlag_decode_ber; + der_type_encoder_f AlertFlag_encode_der; + xer_type_decoder_f AlertFlag_decode_xer; + xer_type_encoder_f AlertFlag_encode_xer; + per_type_decoder_f AlertFlag_decode_uper; + per_type_encoder_f AlertFlag_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Almanac-KeplerianSet.h b/src/core/libs/supl/asn-rrlp/Almanac-KeplerianSet.h index 7eb65f6f0..8c8c0294c 100644 --- a/src/core/libs/supl/asn-rrlp/Almanac-KeplerianSet.h +++ b/src/core/libs/supl/asn-rrlp/Almanac-KeplerianSet.h @@ -15,29 +15,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Almanac-KeplerianSet */ -typedef struct Almanac_KeplerianSet -{ - long kepAlmanacE; - long kepAlmanacDeltaI; - long kepAlmanacOmegaDot; - long kepSVHealth; - long kepAlmanacAPowerHalf; - long kepAlmanacOmega0; - long kepAlmanacW; - long kepAlmanacM0; - long kepAlmanacAF0; - long kepAlmanacAF1; + /* Almanac-KeplerianSet */ + typedef struct Almanac_KeplerianSet + { + long kepAlmanacE; + long kepAlmanacDeltaI; + long kepAlmanacOmegaDot; + long kepSVHealth; + long kepAlmanacAPowerHalf; + long kepAlmanacOmega0; + long kepAlmanacW; + long kepAlmanacM0; + long kepAlmanacAF0; + long kepAlmanacAF1; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Almanac_KeplerianSet_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Almanac_KeplerianSet_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Almanac_KeplerianSet; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Almanac_KeplerianSet; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Almanac.h b/src/core/libs/supl/asn-rrlp/Almanac.h index 3aed79587..835f0c81d 100644 --- a/src/core/libs/supl/asn-rrlp/Almanac.h +++ b/src/core/libs/supl/asn-rrlp/Almanac.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Almanac */ -typedef struct Almanac -{ - long alamanacWNa; - SeqOfAlmanacElement_t almanacList; + /* Almanac */ + typedef struct Almanac + { + long alamanacWNa; + SeqOfAlmanacElement_t almanacList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Almanac_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Almanac_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Almanac; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Almanac; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AlmanacElement.h b/src/core/libs/supl/asn-rrlp/AlmanacElement.h index 5ebd285ff..aebbe0587 100644 --- a/src/core/libs/supl/asn-rrlp/AlmanacElement.h +++ b/src/core/libs/supl/asn-rrlp/AlmanacElement.h @@ -16,31 +16,32 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* AlmanacElement */ -typedef struct AlmanacElement -{ - SatelliteID_t satelliteID; - long almanacE; - long alamanacToa; - long almanacKsii; - long almanacOmegaDot; - long almanacSVhealth; - long almanacAPowerHalf; - long almanacOmega0; - long almanacW; - long almanacM0; - long almanacAF0; - long almanacAF1; + /* AlmanacElement */ + typedef struct AlmanacElement + { + SatelliteID_t satelliteID; + long almanacE; + long alamanacToa; + long almanacKsii; + long almanacOmegaDot; + long almanacSVhealth; + long almanacAPowerHalf; + long almanacOmega0; + long almanacW; + long almanacM0; + long almanacAF0; + long almanacAF1; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} AlmanacElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } AlmanacElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AlmanacElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AlmanacElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AntiSpoofFlag.h b/src/core/libs/supl/asn-rrlp/AntiSpoofFlag.h index fbdaae85b..6c1b9588a 100644 --- a/src/core/libs/supl/asn-rrlp/AntiSpoofFlag.h +++ b/src/core/libs/supl/asn-rrlp/AntiSpoofFlag.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* AntiSpoofFlag */ -typedef long AntiSpoofFlag_t; + /* AntiSpoofFlag */ + typedef long AntiSpoofFlag_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AntiSpoofFlag; -asn_struct_free_f AntiSpoofFlag_free; -asn_struct_print_f AntiSpoofFlag_print; -asn_constr_check_f AntiSpoofFlag_constraint; -ber_type_decoder_f AntiSpoofFlag_decode_ber; -der_type_encoder_f AntiSpoofFlag_encode_der; -xer_type_decoder_f AntiSpoofFlag_decode_xer; -xer_type_encoder_f AntiSpoofFlag_encode_xer; -per_type_decoder_f AntiSpoofFlag_decode_uper; -per_type_encoder_f AntiSpoofFlag_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AntiSpoofFlag; + asn_struct_free_f AntiSpoofFlag_free; + asn_struct_print_f AntiSpoofFlag_print; + asn_constr_check_f AntiSpoofFlag_constraint; + ber_type_decoder_f AntiSpoofFlag_decode_ber; + der_type_encoder_f AntiSpoofFlag_encode_der; + xer_type_decoder_f AntiSpoofFlag_decode_xer; + xer_type_encoder_f AntiSpoofFlag_encode_xer; + per_type_decoder_f AntiSpoofFlag_decode_uper; + per_type_encoder_f AntiSpoofFlag_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AssistBTSData-R98-ExpOTD.h b/src/core/libs/supl/asn-rrlp/AssistBTSData-R98-ExpOTD.h index 8c49ada51..72f328826 100644 --- a/src/core/libs/supl/asn-rrlp/AssistBTSData-R98-ExpOTD.h +++ b/src/core/libs/supl/asn-rrlp/AssistBTSData-R98-ExpOTD.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* AssistBTSData-R98-ExpOTD */ -typedef struct AssistBTSData_R98_ExpOTD -{ - ExpectedOTD_t expectedOTD; - ExpOTDUncertainty_t expOTDuncertainty; + /* AssistBTSData-R98-ExpOTD */ + typedef struct AssistBTSData_R98_ExpOTD + { + ExpectedOTD_t expectedOTD; + ExpOTDUncertainty_t expOTDuncertainty; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} AssistBTSData_R98_ExpOTD_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } AssistBTSData_R98_ExpOTD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AssistBTSData_R98_ExpOTD; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AssistBTSData_R98_ExpOTD; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AssistBTSData.h b/src/core/libs/supl/asn-rrlp/AssistBTSData.h index 6779437dd..61d38bc20 100644 --- a/src/core/libs/supl/asn-rrlp/AssistBTSData.h +++ b/src/core/libs/supl/asn-rrlp/AssistBTSData.h @@ -18,27 +18,28 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct CalcAssistanceBTS; + /* Forward declarations */ + struct CalcAssistanceBTS; -/* AssistBTSData */ -typedef struct AssistBTSData -{ - BSIC_t bsic; - MultiFrameOffset_t multiFrameOffset; - TimeSlotScheme_t timeSlotScheme; - RoughRTD_t roughRTD; - struct CalcAssistanceBTS *calcAssistanceBTS /* OPTIONAL */; + /* AssistBTSData */ + typedef struct AssistBTSData + { + BSIC_t bsic; + MultiFrameOffset_t multiFrameOffset; + TimeSlotScheme_t timeSlotScheme; + RoughRTD_t roughRTD; + struct CalcAssistanceBTS *calcAssistanceBTS /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} AssistBTSData_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } AssistBTSData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AssistBTSData; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AssistBTSData; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/AssistanceData.h b/src/core/libs/supl/asn-rrlp/AssistanceData.h index 5c67311c8..e0dcab542 100644 --- a/src/core/libs/supl/asn-rrlp/AssistanceData.h +++ b/src/core/libs/supl/asn-rrlp/AssistanceData.h @@ -16,39 +16,40 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct ReferenceAssistData; -struct MsrAssistData; -struct SystemInfoAssistData; -struct GPS_AssistData; -struct Rel98_AssistanceData_Extension; -struct Rel5_AssistanceData_Extension; + /* Forward declarations */ + struct ReferenceAssistData; + struct MsrAssistData; + struct SystemInfoAssistData; + struct GPS_AssistData; + struct Rel98_AssistanceData_Extension; + struct Rel5_AssistanceData_Extension; -/* AssistanceData */ -typedef struct AssistanceData -{ - struct ReferenceAssistData *referenceAssistData /* OPTIONAL */; - struct MsrAssistData *msrAssistData /* OPTIONAL */; - struct SystemInfoAssistData *systemInfoAssistData /* OPTIONAL */; - struct GPS_AssistData *gps_AssistData /* OPTIONAL */; - MoreAssDataToBeSent_t *moreAssDataToBeSent /* OPTIONAL */; - ExtensionContainer_t *extensionContainer /* OPTIONAL */; - /* + /* AssistanceData */ + typedef struct AssistanceData + { + struct ReferenceAssistData *referenceAssistData /* OPTIONAL */; + struct MsrAssistData *msrAssistData /* OPTIONAL */; + struct SystemInfoAssistData *systemInfoAssistData /* OPTIONAL */; + struct GPS_AssistData *gps_AssistData /* OPTIONAL */; + MoreAssDataToBeSent_t *moreAssDataToBeSent /* OPTIONAL */; + ExtensionContainer_t *extensionContainer /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - struct Rel98_AssistanceData_Extension *rel98_AssistanceData_Extension /* OPTIONAL */; - struct Rel5_AssistanceData_Extension *rel5_AssistanceData_Extension /* OPTIONAL */; + struct Rel98_AssistanceData_Extension *rel98_AssistanceData_Extension /* OPTIONAL */; + struct Rel5_AssistanceData_Extension *rel5_AssistanceData_Extension /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} AssistanceData_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } AssistanceData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AssistanceData; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_AssistanceData; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/BCCHCarrier.h b/src/core/libs/supl/asn-rrlp/BCCHCarrier.h index 695f40b3e..cbee290a1 100644 --- a/src/core/libs/supl/asn-rrlp/BCCHCarrier.h +++ b/src/core/libs/supl/asn-rrlp/BCCHCarrier.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* BCCHCarrier */ -typedef long BCCHCarrier_t; + /* BCCHCarrier */ + typedef long BCCHCarrier_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_BCCHCarrier; -asn_struct_free_f BCCHCarrier_free; -asn_struct_print_f BCCHCarrier_print; -asn_constr_check_f BCCHCarrier_constraint; -ber_type_decoder_f BCCHCarrier_decode_ber; -der_type_encoder_f BCCHCarrier_encode_der; -xer_type_decoder_f BCCHCarrier_decode_xer; -xer_type_encoder_f BCCHCarrier_encode_xer; -per_type_decoder_f BCCHCarrier_decode_uper; -per_type_encoder_f BCCHCarrier_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_BCCHCarrier; + asn_struct_free_f BCCHCarrier_free; + asn_struct_print_f BCCHCarrier_print; + asn_constr_check_f BCCHCarrier_constraint; + ber_type_decoder_f BCCHCarrier_decode_ber; + der_type_encoder_f BCCHCarrier_encode_der; + xer_type_decoder_f BCCHCarrier_decode_xer; + xer_type_encoder_f BCCHCarrier_encode_xer; + per_type_decoder_f BCCHCarrier_decode_uper; + per_type_encoder_f BCCHCarrier_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/BIT_STRING.h b/src/core/libs/supl/asn-rrlp/BIT_STRING.h index f1dc0718d..0008e0d82 100644 --- a/src/core/libs/supl/asn-rrlp/BIT_STRING.h +++ b/src/core/libs/supl/asn-rrlp/BIT_STRING.h @@ -8,24 +8,25 @@ #include /* Some help from OCTET STRING */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef struct BIT_STRING_s -{ - uint8_t *buf; /* BIT STRING body */ - int size; /* Size of the above buffer */ + typedef struct BIT_STRING_s + { + uint8_t *buf; /* BIT STRING body */ + int size; /* Size of the above buffer */ - int bits_unused; /* Unused trailing bits in the last octet (0..7) */ + int bits_unused; /* Unused trailing bits in the last octet (0..7) */ - asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ -} BIT_STRING_t; + asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ + } BIT_STRING_t; -extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING; + extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING; -asn_struct_print_f BIT_STRING_print; /* Human-readable output */ -asn_constr_check_f BIT_STRING_constraint; -xer_type_encoder_f BIT_STRING_encode_xer; + asn_struct_print_f BIT_STRING_print; /* Human-readable output */ + asn_constr_check_f BIT_STRING_constraint; + xer_type_encoder_f BIT_STRING_encode_xer; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/BOOLEAN.h b/src/core/libs/supl/asn-rrlp/BOOLEAN.h index e6ce5cbf2..b74f2b430 100644 --- a/src/core/libs/supl/asn-rrlp/BOOLEAN.h +++ b/src/core/libs/supl/asn-rrlp/BOOLEAN.h @@ -8,26 +8,27 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* + /* * The underlying integer may contain various values, but everything * non-zero is capped to 0xff by the DER encoder. The BER decoder may * yield non-zero values different from 1, beware. */ -typedef int BOOLEAN_t; + typedef int BOOLEAN_t; -extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN; + extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN; -asn_struct_free_f BOOLEAN_free; -asn_struct_print_f BOOLEAN_print; -ber_type_decoder_f BOOLEAN_decode_ber; -der_type_encoder_f BOOLEAN_encode_der; -xer_type_decoder_f BOOLEAN_decode_xer; -xer_type_encoder_f BOOLEAN_encode_xer; -per_type_decoder_f BOOLEAN_decode_uper; -per_type_encoder_f BOOLEAN_encode_uper; + asn_struct_free_f BOOLEAN_free; + asn_struct_print_f BOOLEAN_print; + ber_type_decoder_f BOOLEAN_decode_ber; + der_type_encoder_f BOOLEAN_encode_der; + xer_type_decoder_f BOOLEAN_decode_xer; + xer_type_encoder_f BOOLEAN_encode_xer; + per_type_decoder_f BOOLEAN_decode_uper; + per_type_encoder_f BOOLEAN_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/BSIC.h b/src/core/libs/supl/asn-rrlp/BSIC.h index bcf832bfc..d98c3a243 100644 --- a/src/core/libs/supl/asn-rrlp/BSIC.h +++ b/src/core/libs/supl/asn-rrlp/BSIC.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* BSIC */ -typedef long BSIC_t; + /* BSIC */ + typedef long BSIC_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_BSIC; -asn_struct_free_f BSIC_free; -asn_struct_print_f BSIC_print; -asn_constr_check_f BSIC_constraint; -ber_type_decoder_f BSIC_decode_ber; -der_type_encoder_f BSIC_encode_der; -xer_type_decoder_f BSIC_decode_xer; -xer_type_encoder_f BSIC_encode_xer; -per_type_decoder_f BSIC_decode_uper; -per_type_encoder_f BSIC_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_BSIC; + asn_struct_free_f BSIC_free; + asn_struct_print_f BSIC_print; + asn_constr_check_f BSIC_constraint; + ber_type_decoder_f BSIC_decode_ber; + der_type_encoder_f BSIC_encode_der; + xer_type_decoder_f BSIC_decode_xer; + xer_type_encoder_f BSIC_encode_xer; + per_type_decoder_f BSIC_decode_uper; + per_type_encoder_f BSIC_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/BSICAndCarrier.h b/src/core/libs/supl/asn-rrlp/BSICAndCarrier.h index 202c7ea3b..2af53b890 100644 --- a/src/core/libs/supl/asn-rrlp/BSICAndCarrier.h +++ b/src/core/libs/supl/asn-rrlp/BSICAndCarrier.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* BSICAndCarrier */ -typedef struct BSICAndCarrier -{ - BCCHCarrier_t carrier; - BSIC_t bsic; + /* BSICAndCarrier */ + typedef struct BSICAndCarrier + { + BCCHCarrier_t carrier; + BSIC_t bsic; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} BSICAndCarrier_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } BSICAndCarrier_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_BSICAndCarrier; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_BSICAndCarrier; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/BTSPosition.h b/src/core/libs/supl/asn-rrlp/BTSPosition.h index 044b7b5ad..70fde1aad 100644 --- a/src/core/libs/supl/asn-rrlp/BTSPosition.h +++ b/src/core/libs/supl/asn-rrlp/BTSPosition.h @@ -14,23 +14,24 @@ #include "Ext-GeographicalInformation.h" #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* BTSPosition */ -typedef Ext_GeographicalInformation_t BTSPosition_t; + /* BTSPosition */ + typedef Ext_GeographicalInformation_t BTSPosition_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_BTSPosition; -asn_struct_free_f BTSPosition_free; -asn_struct_print_f BTSPosition_print; -asn_constr_check_f BTSPosition_constraint; -ber_type_decoder_f BTSPosition_decode_ber; -der_type_encoder_f BTSPosition_encode_der; -xer_type_decoder_f BTSPosition_decode_xer; -xer_type_encoder_f BTSPosition_encode_xer; -per_type_decoder_f BTSPosition_decode_uper; -per_type_encoder_f BTSPosition_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_BTSPosition; + asn_struct_free_f BTSPosition_free; + asn_struct_print_f BTSPosition_print; + asn_constr_check_f BTSPosition_constraint; + ber_type_decoder_f BTSPosition_decode_ber; + der_type_encoder_f BTSPosition_encode_der; + xer_type_decoder_f BTSPosition_decode_xer; + xer_type_encoder_f BTSPosition_encode_xer; + per_type_decoder_f BTSPosition_decode_uper; + per_type_encoder_f BTSPosition_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/BadSignalElement.h b/src/core/libs/supl/asn-rrlp/BadSignalElement.h index 55e18c884..e13f5fc73 100644 --- a/src/core/libs/supl/asn-rrlp/BadSignalElement.h +++ b/src/core/libs/supl/asn-rrlp/BadSignalElement.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* BadSignalElement */ -typedef struct BadSignalElement -{ - SVID_t badSVID; - long *badSignalID /* OPTIONAL */; + /* BadSignalElement */ + typedef struct BadSignalElement + { + SVID_t badSVID; + long *badSignalID /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} BadSignalElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } BadSignalElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_BadSignalElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_BadSignalElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/BitNumber.h b/src/core/libs/supl/asn-rrlp/BitNumber.h index cc8b3df44..7cad41929 100644 --- a/src/core/libs/supl/asn-rrlp/BitNumber.h +++ b/src/core/libs/supl/asn-rrlp/BitNumber.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* BitNumber */ -typedef long BitNumber_t; + /* BitNumber */ + typedef long BitNumber_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_BitNumber; -asn_struct_free_f BitNumber_free; -asn_struct_print_f BitNumber_print; -asn_constr_check_f BitNumber_constraint; -ber_type_decoder_f BitNumber_decode_ber; -der_type_encoder_f BitNumber_encode_der; -xer_type_decoder_f BitNumber_decode_xer; -xer_type_encoder_f BitNumber_encode_xer; -per_type_decoder_f BitNumber_decode_uper; -per_type_encoder_f BitNumber_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_BitNumber; + asn_struct_free_f BitNumber_free; + asn_struct_print_f BitNumber_print; + asn_constr_check_f BitNumber_constraint; + ber_type_decoder_f BitNumber_decode_ber; + der_type_encoder_f BitNumber_encode_der; + xer_type_decoder_f BitNumber_decode_xer; + xer_type_encoder_f BitNumber_encode_xer; + per_type_decoder_f BitNumber_decode_uper; + per_type_encoder_f BitNumber_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/CalcAssistanceBTS.h b/src/core/libs/supl/asn-rrlp/CalcAssistanceBTS.h index 3a21ddf7d..912b6c2c5 100644 --- a/src/core/libs/supl/asn-rrlp/CalcAssistanceBTS.h +++ b/src/core/libs/supl/asn-rrlp/CalcAssistanceBTS.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* CalcAssistanceBTS */ -typedef struct CalcAssistanceBTS -{ - FineRTD_t fineRTD; - ReferenceWGS84_t referenceWGS84; + /* CalcAssistanceBTS */ + typedef struct CalcAssistanceBTS + { + FineRTD_t fineRTD; + ReferenceWGS84_t referenceWGS84; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} CalcAssistanceBTS_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } CalcAssistanceBTS_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CalcAssistanceBTS; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_CalcAssistanceBTS; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/CellID.h b/src/core/libs/supl/asn-rrlp/CellID.h index 5f516c26a..0e83f9b49 100644 --- a/src/core/libs/supl/asn-rrlp/CellID.h +++ b/src/core/libs/supl/asn-rrlp/CellID.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* CellID */ -typedef long CellID_t; + /* CellID */ + typedef long CellID_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CellID; -asn_struct_free_f CellID_free; -asn_struct_print_f CellID_print; -asn_constr_check_f CellID_constraint; -ber_type_decoder_f CellID_decode_ber; -der_type_encoder_f CellID_encode_der; -xer_type_decoder_f CellID_decode_xer; -xer_type_encoder_f CellID_encode_xer; -per_type_decoder_f CellID_decode_uper; -per_type_encoder_f CellID_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_CellID; + asn_struct_free_f CellID_free; + asn_struct_print_f CellID_print; + asn_constr_check_f CellID_constraint; + ber_type_decoder_f CellID_decode_ber; + der_type_encoder_f CellID_encode_der; + xer_type_decoder_f CellID_decode_xer; + xer_type_encoder_f CellID_encode_xer; + per_type_decoder_f CellID_decode_uper; + per_type_encoder_f CellID_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/CellIDAndLAC.h b/src/core/libs/supl/asn-rrlp/CellIDAndLAC.h index 1c4958c7b..6b74bb15a 100644 --- a/src/core/libs/supl/asn-rrlp/CellIDAndLAC.h +++ b/src/core/libs/supl/asn-rrlp/CellIDAndLAC.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* CellIDAndLAC */ -typedef struct CellIDAndLAC -{ - LAC_t referenceLAC; - CellID_t referenceCI; + /* CellIDAndLAC */ + typedef struct CellIDAndLAC + { + LAC_t referenceLAC; + CellID_t referenceCI; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} CellIDAndLAC_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } CellIDAndLAC_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CellIDAndLAC; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_CellIDAndLAC; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ControlHeader.h b/src/core/libs/supl/asn-rrlp/ControlHeader.h index cd2c9b559..c2be329ca 100644 --- a/src/core/libs/supl/asn-rrlp/ControlHeader.h +++ b/src/core/libs/supl/asn-rrlp/ControlHeader.h @@ -14,39 +14,40 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct ReferenceTime; -struct RefLocation; -struct DGPSCorrections; -struct NavigationModel; -struct IonosphericModel; -struct UTCModel; -struct Almanac; -struct AcquisAssist; -struct SeqOf_BadSatelliteSet; + /* Forward declarations */ + struct ReferenceTime; + struct RefLocation; + struct DGPSCorrections; + struct NavigationModel; + struct IonosphericModel; + struct UTCModel; + struct Almanac; + struct AcquisAssist; + struct SeqOf_BadSatelliteSet; -/* ControlHeader */ -typedef struct ControlHeader -{ - struct ReferenceTime *referenceTime /* OPTIONAL */; - struct RefLocation *refLocation /* OPTIONAL */; - struct DGPSCorrections *dgpsCorrections /* OPTIONAL */; - struct NavigationModel *navigationModel /* OPTIONAL */; - struct IonosphericModel *ionosphericModel /* OPTIONAL */; - struct UTCModel *utcModel /* OPTIONAL */; - struct Almanac *almanac /* OPTIONAL */; - struct AcquisAssist *acquisAssist /* OPTIONAL */; - struct SeqOf_BadSatelliteSet *realTimeIntegrity /* OPTIONAL */; + /* ControlHeader */ + typedef struct ControlHeader + { + struct ReferenceTime *referenceTime /* OPTIONAL */; + struct RefLocation *refLocation /* OPTIONAL */; + struct DGPSCorrections *dgpsCorrections /* OPTIONAL */; + struct NavigationModel *navigationModel /* OPTIONAL */; + struct IonosphericModel *ionosphericModel /* OPTIONAL */; + struct UTCModel *utcModel /* OPTIONAL */; + struct Almanac *almanac /* OPTIONAL */; + struct AcquisAssist *acquisAssist /* OPTIONAL */; + struct SeqOf_BadSatelliteSet *realTimeIntegrity /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ControlHeader_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ControlHeader_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ControlHeader; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ControlHeader; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/DGANSSSgnElement.h b/src/core/libs/supl/asn-rrlp/DGANSSSgnElement.h index a96e932db..6cb7be67c 100644 --- a/src/core/libs/supl/asn-rrlp/DGANSSSgnElement.h +++ b/src/core/libs/supl/asn-rrlp/DGANSSSgnElement.h @@ -16,24 +16,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* DGANSSSgnElement */ -typedef struct DGANSSSgnElement -{ - SVID_t svID; - long iod; - long udre; - long pseudoRangeCor; - long rangeRateCor; + /* DGANSSSgnElement */ + typedef struct DGANSSSgnElement + { + SVID_t svID; + long iod; + long udre; + long pseudoRangeCor; + long rangeRateCor; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} DGANSSSgnElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } DGANSSSgnElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_DGANSSSgnElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_DGANSSSgnElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/DGPSCorrections.h b/src/core/libs/supl/asn-rrlp/DGPSCorrections.h index 1edae68fb..52913f488 100644 --- a/src/core/libs/supl/asn-rrlp/DGPSCorrections.h +++ b/src/core/libs/supl/asn-rrlp/DGPSCorrections.h @@ -16,22 +16,23 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* DGPSCorrections */ -typedef struct DGPSCorrections -{ - long gpsTOW; - long status; - SeqOfSatElement_t satList; + /* DGPSCorrections */ + typedef struct DGPSCorrections + { + long gpsTOW; + long status; + SeqOfSatElement_t satList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} DGPSCorrections_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } DGPSCorrections_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_DGPSCorrections; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_DGPSCorrections; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ENUMERATED.h b/src/core/libs/supl/asn-rrlp/ENUMERATED.h index ca5eac176..86c1cf643 100644 --- a/src/core/libs/supl/asn-rrlp/ENUMERATED.h +++ b/src/core/libs/supl/asn-rrlp/ENUMERATED.h @@ -8,15 +8,16 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef INTEGER_t ENUMERATED_t; /* Implemented via INTEGER */ + typedef INTEGER_t ENUMERATED_t; /* Implemented via INTEGER */ -extern asn_TYPE_descriptor_t asn_DEF_ENUMERATED; + extern asn_TYPE_descriptor_t asn_DEF_ENUMERATED; -per_type_decoder_f ENUMERATED_decode_uper; -per_type_encoder_f ENUMERATED_encode_uper; + per_type_decoder_f ENUMERATED_decode_uper; + per_type_encoder_f ENUMERATED_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/EOTDQuality.h b/src/core/libs/supl/asn-rrlp/EOTDQuality.h index 6c2bfec8a..522cf0a6e 100644 --- a/src/core/libs/supl/asn-rrlp/EOTDQuality.h +++ b/src/core/libs/supl/asn-rrlp/EOTDQuality.h @@ -15,21 +15,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* EOTDQuality */ -typedef struct EOTDQuality -{ - long nbrOfMeasurements; - long stdOfEOTD; + /* EOTDQuality */ + typedef struct EOTDQuality + { + long nbrOfMeasurements; + long stdOfEOTD; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} EOTDQuality_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } EOTDQuality_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_EOTDQuality; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_EOTDQuality; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/EnvironmentCharacter.h b/src/core/libs/supl/asn-rrlp/EnvironmentCharacter.h index e168b7f91..12a7c0ccd 100644 --- a/src/core/libs/supl/asn-rrlp/EnvironmentCharacter.h +++ b/src/core/libs/supl/asn-rrlp/EnvironmentCharacter.h @@ -14,33 +14,35 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum EnvironmentCharacter { - EnvironmentCharacter_badArea = 0, - EnvironmentCharacter_notBadArea = 1, - EnvironmentCharacter_mixedArea = 2 - /* + /* Dependencies */ + typedef enum EnvironmentCharacter + { + EnvironmentCharacter_badArea = 0, + EnvironmentCharacter_notBadArea = 1, + EnvironmentCharacter_mixedArea = 2 + /* * Enumeration is extensible */ -} e_EnvironmentCharacter; + } e_EnvironmentCharacter; -/* EnvironmentCharacter */ -typedef ENUMERATED_t EnvironmentCharacter_t; + /* EnvironmentCharacter */ + typedef ENUMERATED_t EnvironmentCharacter_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_EnvironmentCharacter; -asn_struct_free_f EnvironmentCharacter_free; -asn_struct_print_f EnvironmentCharacter_print; -asn_constr_check_f EnvironmentCharacter_constraint; -ber_type_decoder_f EnvironmentCharacter_decode_ber; -der_type_encoder_f EnvironmentCharacter_encode_der; -xer_type_decoder_f EnvironmentCharacter_decode_xer; -xer_type_encoder_f EnvironmentCharacter_encode_xer; -per_type_decoder_f EnvironmentCharacter_decode_uper; -per_type_encoder_f EnvironmentCharacter_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_EnvironmentCharacter; + asn_struct_free_f EnvironmentCharacter_free; + asn_struct_print_f EnvironmentCharacter_print; + asn_constr_check_f EnvironmentCharacter_constraint; + ber_type_decoder_f EnvironmentCharacter_decode_ber; + der_type_encoder_f EnvironmentCharacter_encode_der; + xer_type_decoder_f EnvironmentCharacter_decode_xer; + xer_type_encoder_f EnvironmentCharacter_encode_xer; + per_type_decoder_f EnvironmentCharacter_decode_uper; + per_type_encoder_f EnvironmentCharacter_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/EphemerisSubframe1Reserved.h b/src/core/libs/supl/asn-rrlp/EphemerisSubframe1Reserved.h index 74ee7bd23..f62b57afa 100644 --- a/src/core/libs/supl/asn-rrlp/EphemerisSubframe1Reserved.h +++ b/src/core/libs/supl/asn-rrlp/EphemerisSubframe1Reserved.h @@ -15,23 +15,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* EphemerisSubframe1Reserved */ -typedef struct EphemerisSubframe1Reserved -{ - long reserved1; - long reserved2; - long reserved3; - long reserved4; + /* EphemerisSubframe1Reserved */ + typedef struct EphemerisSubframe1Reserved + { + long reserved1; + long reserved2; + long reserved3; + long reserved4; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} EphemerisSubframe1Reserved_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } EphemerisSubframe1Reserved_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_EphemerisSubframe1Reserved; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_EphemerisSubframe1Reserved; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ErrorCodes.h b/src/core/libs/supl/asn-rrlp/ErrorCodes.h index c91d2cb27..c87de55d5 100644 --- a/src/core/libs/supl/asn-rrlp/ErrorCodes.h +++ b/src/core/libs/supl/asn-rrlp/ErrorCodes.h @@ -14,36 +14,38 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum ErrorCodes { - ErrorCodes_unDefined = 0, - ErrorCodes_missingComponet = 1, - ErrorCodes_incorrectData = 2, - ErrorCodes_missingIEorComponentElement = 3, - ErrorCodes_messageTooShort = 4, - ErrorCodes_unknowReferenceNumber = 5 - /* + /* Dependencies */ + typedef enum ErrorCodes + { + ErrorCodes_unDefined = 0, + ErrorCodes_missingComponet = 1, + ErrorCodes_incorrectData = 2, + ErrorCodes_missingIEorComponentElement = 3, + ErrorCodes_messageTooShort = 4, + ErrorCodes_unknowReferenceNumber = 5 + /* * Enumeration is extensible */ -} e_ErrorCodes; + } e_ErrorCodes; -/* ErrorCodes */ -typedef ENUMERATED_t ErrorCodes_t; + /* ErrorCodes */ + typedef ENUMERATED_t ErrorCodes_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ErrorCodes; -asn_struct_free_f ErrorCodes_free; -asn_struct_print_f ErrorCodes_print; -asn_constr_check_f ErrorCodes_constraint; -ber_type_decoder_f ErrorCodes_decode_ber; -der_type_encoder_f ErrorCodes_encode_der; -xer_type_decoder_f ErrorCodes_decode_xer; -xer_type_encoder_f ErrorCodes_encode_xer; -per_type_decoder_f ErrorCodes_decode_uper; -per_type_encoder_f ErrorCodes_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ErrorCodes; + asn_struct_free_f ErrorCodes_free; + asn_struct_print_f ErrorCodes_print; + asn_constr_check_f ErrorCodes_constraint; + ber_type_decoder_f ErrorCodes_decode_ber; + der_type_encoder_f ErrorCodes_encode_der; + xer_type_decoder_f ErrorCodes_decode_xer; + xer_type_encoder_f ErrorCodes_encode_xer; + per_type_decoder_f ErrorCodes_decode_uper; + per_type_encoder_f ErrorCodes_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ExpOTDUncertainty.h b/src/core/libs/supl/asn-rrlp/ExpOTDUncertainty.h index 5c9188e70..44ea118db 100644 --- a/src/core/libs/supl/asn-rrlp/ExpOTDUncertainty.h +++ b/src/core/libs/supl/asn-rrlp/ExpOTDUncertainty.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* ExpOTDUncertainty */ -typedef long ExpOTDUncertainty_t; + /* ExpOTDUncertainty */ + typedef long ExpOTDUncertainty_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ExpOTDUncertainty; -asn_struct_free_f ExpOTDUncertainty_free; -asn_struct_print_f ExpOTDUncertainty_print; -asn_constr_check_f ExpOTDUncertainty_constraint; -ber_type_decoder_f ExpOTDUncertainty_decode_ber; -der_type_encoder_f ExpOTDUncertainty_encode_der; -xer_type_decoder_f ExpOTDUncertainty_decode_xer; -xer_type_encoder_f ExpOTDUncertainty_encode_xer; -per_type_decoder_f ExpOTDUncertainty_decode_uper; -per_type_encoder_f ExpOTDUncertainty_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ExpOTDUncertainty; + asn_struct_free_f ExpOTDUncertainty_free; + asn_struct_print_f ExpOTDUncertainty_print; + asn_constr_check_f ExpOTDUncertainty_constraint; + ber_type_decoder_f ExpOTDUncertainty_decode_ber; + der_type_encoder_f ExpOTDUncertainty_encode_der; + xer_type_decoder_f ExpOTDUncertainty_decode_xer; + xer_type_encoder_f ExpOTDUncertainty_encode_xer; + per_type_decoder_f ExpOTDUncertainty_decode_uper; + per_type_encoder_f ExpOTDUncertainty_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ExpectedOTD.h b/src/core/libs/supl/asn-rrlp/ExpectedOTD.h index 1ec0b8c85..bb25b6eac 100644 --- a/src/core/libs/supl/asn-rrlp/ExpectedOTD.h +++ b/src/core/libs/supl/asn-rrlp/ExpectedOTD.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* ExpectedOTD */ -typedef long ExpectedOTD_t; + /* ExpectedOTD */ + typedef long ExpectedOTD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ExpectedOTD; -asn_struct_free_f ExpectedOTD_free; -asn_struct_print_f ExpectedOTD_print; -asn_constr_check_f ExpectedOTD_constraint; -ber_type_decoder_f ExpectedOTD_decode_ber; -der_type_encoder_f ExpectedOTD_encode_der; -xer_type_decoder_f ExpectedOTD_decode_xer; -xer_type_encoder_f ExpectedOTD_encode_xer; -per_type_decoder_f ExpectedOTD_decode_uper; -per_type_encoder_f ExpectedOTD_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ExpectedOTD; + asn_struct_free_f ExpectedOTD_free; + asn_struct_print_f ExpectedOTD_print; + asn_constr_check_f ExpectedOTD_constraint; + ber_type_decoder_f ExpectedOTD_decode_ber; + der_type_encoder_f ExpectedOTD_encode_der; + xer_type_decoder_f ExpectedOTD_decode_xer; + xer_type_encoder_f ExpectedOTD_encode_xer; + per_type_decoder_f ExpectedOTD_decode_uper; + per_type_encoder_f ExpectedOTD_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Ext-GeographicalInformation.h b/src/core/libs/supl/asn-rrlp/Ext-GeographicalInformation.h index ead6925e4..cc9330d3a 100644 --- a/src/core/libs/supl/asn-rrlp/Ext-GeographicalInformation.h +++ b/src/core/libs/supl/asn-rrlp/Ext-GeographicalInformation.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Ext-GeographicalInformation */ -typedef OCTET_STRING_t Ext_GeographicalInformation_t; + /* Ext-GeographicalInformation */ + typedef OCTET_STRING_t Ext_GeographicalInformation_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Ext_GeographicalInformation; -asn_struct_free_f Ext_GeographicalInformation_free; -asn_struct_print_f Ext_GeographicalInformation_print; -asn_constr_check_f Ext_GeographicalInformation_constraint; -ber_type_decoder_f Ext_GeographicalInformation_decode_ber; -der_type_encoder_f Ext_GeographicalInformation_encode_der; -xer_type_decoder_f Ext_GeographicalInformation_decode_xer; -xer_type_encoder_f Ext_GeographicalInformation_encode_xer; -per_type_decoder_f Ext_GeographicalInformation_decode_uper; -per_type_encoder_f Ext_GeographicalInformation_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Ext_GeographicalInformation; + asn_struct_free_f Ext_GeographicalInformation_free; + asn_struct_print_f Ext_GeographicalInformation_print; + asn_constr_check_f Ext_GeographicalInformation_constraint; + ber_type_decoder_f Ext_GeographicalInformation_decode_ber; + der_type_encoder_f Ext_GeographicalInformation_encode_der; + xer_type_decoder_f Ext_GeographicalInformation_decode_xer; + xer_type_encoder_f Ext_GeographicalInformation_encode_xer; + per_type_decoder_f Ext_GeographicalInformation_decode_uper; + per_type_encoder_f Ext_GeographicalInformation_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Extended-reference.h b/src/core/libs/supl/asn-rrlp/Extended-reference.h index 502228dec..c21d79d93 100644 --- a/src/core/libs/supl/asn-rrlp/Extended-reference.h +++ b/src/core/libs/supl/asn-rrlp/Extended-reference.h @@ -15,21 +15,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Extended-reference */ -typedef struct Extended_reference -{ - long smlc_code; - long transaction_ID; + /* Extended-reference */ + typedef struct Extended_reference + { + long smlc_code; + long transaction_ID; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Extended_reference_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Extended_reference_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Extended_reference; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Extended_reference; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ExtensionContainer.h b/src/core/libs/supl/asn-rrlp/ExtensionContainer.h index de7052268..f464ba754 100644 --- a/src/core/libs/supl/asn-rrlp/ExtensionContainer.h +++ b/src/core/libs/supl/asn-rrlp/ExtensionContainer.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* ExtensionContainer */ -typedef INTEGER_t ExtensionContainer_t; + /* ExtensionContainer */ + typedef INTEGER_t ExtensionContainer_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ExtensionContainer; -asn_struct_free_f ExtensionContainer_free; -asn_struct_print_f ExtensionContainer_print; -asn_constr_check_f ExtensionContainer_constraint; -ber_type_decoder_f ExtensionContainer_decode_ber; -der_type_encoder_f ExtensionContainer_encode_der; -xer_type_decoder_f ExtensionContainer_decode_xer; -xer_type_encoder_f ExtensionContainer_encode_xer; -per_type_decoder_f ExtensionContainer_decode_uper; -per_type_encoder_f ExtensionContainer_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ExtensionContainer; + asn_struct_free_f ExtensionContainer_free; + asn_struct_print_f ExtensionContainer_print; + asn_constr_check_f ExtensionContainer_constraint; + ber_type_decoder_f ExtensionContainer_decode_ber; + der_type_encoder_f ExtensionContainer_encode_der; + xer_type_decoder_f ExtensionContainer_decode_xer; + xer_type_encoder_f ExtensionContainer_encode_xer; + per_type_decoder_f ExtensionContainer_decode_uper; + per_type_encoder_f ExtensionContainer_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/FineRTD.h b/src/core/libs/supl/asn-rrlp/FineRTD.h index dc5f30973..6e0ea3f0f 100644 --- a/src/core/libs/supl/asn-rrlp/FineRTD.h +++ b/src/core/libs/supl/asn-rrlp/FineRTD.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* FineRTD */ -typedef long FineRTD_t; + /* FineRTD */ + typedef long FineRTD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_FineRTD; -asn_struct_free_f FineRTD_free; -asn_struct_print_f FineRTD_print; -asn_constr_check_f FineRTD_constraint; -ber_type_decoder_f FineRTD_decode_ber; -der_type_encoder_f FineRTD_encode_der; -xer_type_decoder_f FineRTD_decode_xer; -xer_type_encoder_f FineRTD_encode_xer; -per_type_decoder_f FineRTD_decode_uper; -per_type_encoder_f FineRTD_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_FineRTD; + asn_struct_free_f FineRTD_free; + asn_struct_print_f FineRTD_print; + asn_constr_check_f FineRTD_constraint; + ber_type_decoder_f FineRTD_decode_ber; + der_type_encoder_f FineRTD_encode_der; + xer_type_decoder_f FineRTD_decode_xer; + xer_type_encoder_f FineRTD_encode_xer; + per_type_decoder_f FineRTD_decode_uper; + per_type_encoder_f FineRTD_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/FixType.h b/src/core/libs/supl/asn-rrlp/FixType.h index 284d480ed..37773ea9d 100644 --- a/src/core/libs/supl/asn-rrlp/FixType.h +++ b/src/core/libs/supl/asn-rrlp/FixType.h @@ -14,29 +14,31 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum FixType { - FixType_twoDFix = 0, - FixType_threeDFix = 1 -} e_FixType; + /* Dependencies */ + typedef enum FixType + { + FixType_twoDFix = 0, + FixType_threeDFix = 1 + } e_FixType; -/* FixType */ -typedef long FixType_t; + /* FixType */ + typedef long FixType_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_FixType; -asn_struct_free_f FixType_free; -asn_struct_print_f FixType_print; -asn_constr_check_f FixType_constraint; -ber_type_decoder_f FixType_decode_ber; -der_type_encoder_f FixType_encode_der; -xer_type_decoder_f FixType_decode_xer; -xer_type_encoder_f FixType_encode_xer; -per_type_decoder_f FixType_decode_uper; -per_type_encoder_f FixType_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_FixType; + asn_struct_free_f FixType_free; + asn_struct_print_f FixType_print; + asn_constr_check_f FixType_constraint; + ber_type_decoder_f FixType_decode_ber; + der_type_encoder_f FixType_encode_der; + xer_type_decoder_f FixType_decode_xer; + xer_type_encoder_f FixType_encode_xer; + per_type_decoder_f FixType_decode_uper; + per_type_encoder_f FixType_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/FrameDrift.h b/src/core/libs/supl/asn-rrlp/FrameDrift.h index 817de6ab7..7769e4369 100644 --- a/src/core/libs/supl/asn-rrlp/FrameDrift.h +++ b/src/core/libs/supl/asn-rrlp/FrameDrift.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* FrameDrift */ -typedef long FrameDrift_t; + /* FrameDrift */ + typedef long FrameDrift_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_FrameDrift; -asn_struct_free_f FrameDrift_free; -asn_struct_print_f FrameDrift_print; -asn_constr_check_f FrameDrift_constraint; -ber_type_decoder_f FrameDrift_decode_ber; -der_type_encoder_f FrameDrift_encode_der; -xer_type_decoder_f FrameDrift_decode_xer; -xer_type_encoder_f FrameDrift_encode_xer; -per_type_decoder_f FrameDrift_decode_uper; -per_type_encoder_f FrameDrift_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_FrameDrift; + asn_struct_free_f FrameDrift_free; + asn_struct_print_f FrameDrift_print; + asn_constr_check_f FrameDrift_constraint; + ber_type_decoder_f FrameDrift_decode_ber; + der_type_encoder_f FrameDrift_encode_der; + xer_type_decoder_f FrameDrift_decode_xer; + xer_type_encoder_f FrameDrift_encode_xer; + per_type_decoder_f FrameDrift_decode_uper; + per_type_encoder_f FrameDrift_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/FrameNumber.h b/src/core/libs/supl/asn-rrlp/FrameNumber.h index c43038036..2cea180ba 100644 --- a/src/core/libs/supl/asn-rrlp/FrameNumber.h +++ b/src/core/libs/supl/asn-rrlp/FrameNumber.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* FrameNumber */ -typedef long FrameNumber_t; + /* FrameNumber */ + typedef long FrameNumber_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_FrameNumber; -asn_struct_free_f FrameNumber_free; -asn_struct_print_f FrameNumber_print; -asn_constr_check_f FrameNumber_constraint; -ber_type_decoder_f FrameNumber_decode_ber; -der_type_encoder_f FrameNumber_encode_der; -xer_type_decoder_f FrameNumber_decode_xer; -xer_type_encoder_f FrameNumber_encode_xer; -per_type_decoder_f FrameNumber_decode_uper; -per_type_encoder_f FrameNumber_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_FrameNumber; + asn_struct_free_f FrameNumber_free; + asn_struct_print_f FrameNumber_print; + asn_constr_check_f FrameNumber_constraint; + ber_type_decoder_f FrameNumber_decode_ber; + der_type_encoder_f FrameNumber_encode_der; + xer_type_decoder_f FrameNumber_decode_xer; + xer_type_encoder_f FrameNumber_encode_xer; + per_type_decoder_f FrameNumber_decode_uper; + per_type_encoder_f FrameNumber_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSS-AssistData.h b/src/core/libs/supl/asn-rrlp/GANSS-AssistData.h index 57e93bc4a..b5f0b285e 100644 --- a/src/core/libs/supl/asn-rrlp/GANSS-AssistData.h +++ b/src/core/libs/supl/asn-rrlp/GANSS-AssistData.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSS-AssistData */ -typedef struct GANSS_AssistData -{ - GANSS_ControlHeader_t ganss_controlHeader; + /* GANSS-AssistData */ + typedef struct GANSS_AssistData + { + GANSS_ControlHeader_t ganss_controlHeader; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSS_AssistData_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSS_AssistData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSS_AssistData; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSS_AssistData; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSS-ControlHeader.h b/src/core/libs/supl/asn-rrlp/GANSS-ControlHeader.h index aad3e9f16..36edc96f2 100644 --- a/src/core/libs/supl/asn-rrlp/GANSS-ControlHeader.h +++ b/src/core/libs/supl/asn-rrlp/GANSS-ControlHeader.h @@ -14,25 +14,26 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSSCommonAssistData; -struct SeqOfGANSSGenericAssistDataElement; + /* Forward declarations */ + struct GANSSCommonAssistData; + struct SeqOfGANSSGenericAssistDataElement; -/* GANSS-ControlHeader */ -typedef struct GANSS_ControlHeader -{ - struct GANSSCommonAssistData *ganssCommonAssistData /* OPTIONAL */; - struct SeqOfGANSSGenericAssistDataElement *ganssGenericAssistDataList /* OPTIONAL */; + /* GANSS-ControlHeader */ + typedef struct GANSS_ControlHeader + { + struct GANSSCommonAssistData *ganssCommonAssistData /* OPTIONAL */; + struct SeqOfGANSSGenericAssistDataElement *ganssGenericAssistDataList /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSS_ControlHeader_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSS_ControlHeader_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSS_ControlHeader; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSS_ControlHeader; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSS-MsrSetElement.h b/src/core/libs/supl/asn-rrlp/GANSS-MsrSetElement.h index 210bd1e63..4786b7e07 100644 --- a/src/core/libs/supl/asn-rrlp/GANSS-MsrSetElement.h +++ b/src/core/libs/supl/asn-rrlp/GANSS-MsrSetElement.h @@ -18,27 +18,28 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct ReferenceFrame; + /* Forward declarations */ + struct ReferenceFrame; -/* GANSS-MsrSetElement */ -typedef struct GANSS_MsrSetElement -{ - struct ReferenceFrame *referenceFrame /* OPTIONAL */; - GANSSTODm_t *ganssTODm /* OPTIONAL */; - long *deltaGNASSTOD /* OPTIONAL */; - GANSSTODUncertainty_t *ganssTODUncertainty /* OPTIONAL */; - SeqOfGANSS_SgnTypeElement_t ganss_SgnTypeList; + /* GANSS-MsrSetElement */ + typedef struct GANSS_MsrSetElement + { + struct ReferenceFrame *referenceFrame /* OPTIONAL */; + GANSSTODm_t *ganssTODm /* OPTIONAL */; + long *deltaGNASSTOD /* OPTIONAL */; + GANSSTODUncertainty_t *ganssTODUncertainty /* OPTIONAL */; + SeqOfGANSS_SgnTypeElement_t ganss_SgnTypeList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSS_MsrSetElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSS_MsrSetElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSS_MsrSetElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSS_MsrSetElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSS-SgnElement.h b/src/core/libs/supl/asn-rrlp/GANSS-SgnElement.h index 17b44af4a..2e7a15c4a 100644 --- a/src/core/libs/supl/asn-rrlp/GANSS-SgnElement.h +++ b/src/core/libs/supl/asn-rrlp/GANSS-SgnElement.h @@ -17,28 +17,29 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSS-SgnElement */ -typedef struct GANSS_SgnElement -{ - SVID_t svID; - long cNo; - MpathIndic_t mpathDet; - long *carrierQualityInd /* OPTIONAL */; - long codePhase; - long *integerCodePhase /* OPTIONAL */; - long codePhaseRMSError; - long *doppler /* OPTIONAL */; - long *adr /* OPTIONAL */; + /* GANSS-SgnElement */ + typedef struct GANSS_SgnElement + { + SVID_t svID; + long cNo; + MpathIndic_t mpathDet; + long *carrierQualityInd /* OPTIONAL */; + long codePhase; + long *integerCodePhase /* OPTIONAL */; + long codePhaseRMSError; + long *doppler /* OPTIONAL */; + long *adr /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSS_SgnElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSS_SgnElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSS_SgnElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSS_SgnElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSS-SgnTypeElement.h b/src/core/libs/supl/asn-rrlp/GANSS-SgnTypeElement.h index 570ae81c2..f591c0e86 100644 --- a/src/core/libs/supl/asn-rrlp/GANSS-SgnTypeElement.h +++ b/src/core/libs/supl/asn-rrlp/GANSS-SgnTypeElement.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSS-SgnTypeElement */ -typedef struct GANSS_SgnTypeElement -{ - long ganssSignalID; - SeqOfGANSS_SgnElement_t ganss_SgnList; + /* GANSS-SgnTypeElement */ + typedef struct GANSS_SgnTypeElement + { + long ganssSignalID; + SeqOfGANSS_SgnElement_t ganss_SgnList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSS_SgnTypeElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSS_SgnTypeElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSS_SgnTypeElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSS_SgnTypeElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSAlmanacElement.h b/src/core/libs/supl/asn-rrlp/GANSSAlmanacElement.h index 59c21f081..3391b4885 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSAlmanacElement.h +++ b/src/core/libs/supl/asn-rrlp/GANSSAlmanacElement.h @@ -15,36 +15,38 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum GANSSAlmanacElement_PR { - GANSSAlmanacElement_PR_NOTHING, /* No components present */ - GANSSAlmanacElement_PR_keplerianAlmanacSet, - /* Extensions may appear below */ - -} GANSSAlmanacElement_PR; - -/* GANSSAlmanacElement */ -typedef struct GANSSAlmanacElement -{ - GANSSAlmanacElement_PR present; - union GANSSAlmanacElement_u + /* Dependencies */ + typedef enum GANSSAlmanacElement_PR { - Almanac_KeplerianSet_t keplerianAlmanacSet; - /* + GANSSAlmanacElement_PR_NOTHING, /* No components present */ + GANSSAlmanacElement_PR_keplerianAlmanacSet, + /* Extensions may appear below */ + + } GANSSAlmanacElement_PR; + + /* GANSSAlmanacElement */ + typedef struct GANSSAlmanacElement + { + GANSSAlmanacElement_PR present; + union GANSSAlmanacElement_u + { + Almanac_KeplerianSet_t keplerianAlmanacSet; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSAlmanacElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSAlmanacElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSAlmanacElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSAlmanacElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSAlmanacModel.h b/src/core/libs/supl/asn-rrlp/GANSSAlmanacModel.h index 168efc50a..06253e12f 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSAlmanacModel.h +++ b/src/core/libs/supl/asn-rrlp/GANSSAlmanacModel.h @@ -17,24 +17,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSAlmanacModel */ -typedef struct GANSSAlmanacModel -{ - long weekNumber; - SVIDMASK_t svIDMask; - long *toa /* OPTIONAL */; - long *ioda /* OPTIONAL */; - SeqOfGANSSAlmanacElement_t ganssAlmanacList; + /* GANSSAlmanacModel */ + typedef struct GANSSAlmanacModel + { + long weekNumber; + SVIDMASK_t svIDMask; + long *toa /* OPTIONAL */; + long *ioda /* OPTIONAL */; + SeqOfGANSSAlmanacElement_t ganssAlmanacList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSAlmanacModel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSAlmanacModel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSAlmanacModel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSAlmanacModel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSAssistanceData.h b/src/core/libs/supl/asn-rrlp/GANSSAssistanceData.h index 1efc2f4d3..751d01df2 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSAssistanceData.h +++ b/src/core/libs/supl/asn-rrlp/GANSSAssistanceData.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSAssistanceData */ -typedef OCTET_STRING_t GANSSAssistanceData_t; + /* GANSSAssistanceData */ + typedef OCTET_STRING_t GANSSAssistanceData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSAssistanceData; -asn_struct_free_f GANSSAssistanceData_free; -asn_struct_print_f GANSSAssistanceData_print; -asn_constr_check_f GANSSAssistanceData_constraint; -ber_type_decoder_f GANSSAssistanceData_decode_ber; -der_type_encoder_f GANSSAssistanceData_encode_der; -xer_type_decoder_f GANSSAssistanceData_decode_xer; -xer_type_encoder_f GANSSAssistanceData_encode_xer; -per_type_decoder_f GANSSAssistanceData_decode_uper; -per_type_encoder_f GANSSAssistanceData_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSAssistanceData; + asn_struct_free_f GANSSAssistanceData_free; + asn_struct_print_f GANSSAssistanceData_print; + asn_constr_check_f GANSSAssistanceData_constraint; + ber_type_decoder_f GANSSAssistanceData_decode_ber; + der_type_encoder_f GANSSAssistanceData_encode_der; + xer_type_decoder_f GANSSAssistanceData_decode_xer; + xer_type_encoder_f GANSSAssistanceData_encode_xer; + per_type_decoder_f GANSSAssistanceData_decode_uper; + per_type_encoder_f GANSSAssistanceData_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSClockModel.h b/src/core/libs/supl/asn-rrlp/GANSSClockModel.h index 59e6014fd..05d019a1e 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSClockModel.h +++ b/src/core/libs/supl/asn-rrlp/GANSSClockModel.h @@ -15,36 +15,38 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum GANSSClockModel_PR { - GANSSClockModel_PR_NOTHING, /* No components present */ - GANSSClockModel_PR_standardClockModelList, - /* Extensions may appear below */ - -} GANSSClockModel_PR; - -/* GANSSClockModel */ -typedef struct GANSSClockModel -{ - GANSSClockModel_PR present; - union GANSSClockModel_u + /* Dependencies */ + typedef enum GANSSClockModel_PR { - SeqOfStandardClockModelElement_t standardClockModelList; - /* + GANSSClockModel_PR_NOTHING, /* No components present */ + GANSSClockModel_PR_standardClockModelList, + /* Extensions may appear below */ + + } GANSSClockModel_PR; + + /* GANSSClockModel */ + typedef struct GANSSClockModel + { + GANSSClockModel_PR present; + union GANSSClockModel_u + { + SeqOfStandardClockModelElement_t standardClockModelList; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSClockModel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSClockModel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSClockModel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSClockModel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSCommonAssistData.h b/src/core/libs/supl/asn-rrlp/GANSSCommonAssistData.h index b245b8766..4173cfac4 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSCommonAssistData.h +++ b/src/core/libs/supl/asn-rrlp/GANSSCommonAssistData.h @@ -14,31 +14,32 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSSReferenceTime; -struct GANSSRefLocation; -struct GANSSIonosphericModel; + /* Forward declarations */ + struct GANSSReferenceTime; + struct GANSSRefLocation; + struct GANSSIonosphericModel; -/* GANSSCommonAssistData */ -typedef struct GANSSCommonAssistData -{ - struct GANSSReferenceTime *ganssReferenceTime /* OPTIONAL */; - struct GANSSRefLocation *ganssRefLocation /* OPTIONAL */; - struct GANSSIonosphericModel *ganssIonosphericModel /* OPTIONAL */; - /* + /* GANSSCommonAssistData */ + typedef struct GANSSCommonAssistData + { + struct GANSSReferenceTime *ganssReferenceTime /* OPTIONAL */; + struct GANSSRefLocation *ganssRefLocation /* OPTIONAL */; + struct GANSSIonosphericModel *ganssIonosphericModel /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSCommonAssistData_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSCommonAssistData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSCommonAssistData; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSCommonAssistData; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSDataBit.h b/src/core/libs/supl/asn-rrlp/GANSSDataBit.h index 4b3fad982..9ac0b3dfe 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSDataBit.h +++ b/src/core/libs/supl/asn-rrlp/GANSSDataBit.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSDataBit */ -typedef long GANSSDataBit_t; + /* GANSSDataBit */ + typedef long GANSSDataBit_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSDataBit; -asn_struct_free_f GANSSDataBit_free; -asn_struct_print_f GANSSDataBit_print; -asn_constr_check_f GANSSDataBit_constraint; -ber_type_decoder_f GANSSDataBit_decode_ber; -der_type_encoder_f GANSSDataBit_encode_der; -xer_type_decoder_f GANSSDataBit_decode_xer; -xer_type_encoder_f GANSSDataBit_encode_xer; -per_type_decoder_f GANSSDataBit_decode_uper; -per_type_encoder_f GANSSDataBit_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSDataBit; + asn_struct_free_f GANSSDataBit_free; + asn_struct_print_f GANSSDataBit_print; + asn_constr_check_f GANSSDataBit_constraint; + ber_type_decoder_f GANSSDataBit_decode_ber; + der_type_encoder_f GANSSDataBit_encode_der; + xer_type_decoder_f GANSSDataBit_decode_xer; + xer_type_encoder_f GANSSDataBit_encode_xer; + per_type_decoder_f GANSSDataBit_decode_uper; + per_type_encoder_f GANSSDataBit_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSDataBitAssist.h b/src/core/libs/supl/asn-rrlp/GANSSDataBitAssist.h index cfc0cb35d..defe153bd 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSDataBitAssist.h +++ b/src/core/libs/supl/asn-rrlp/GANSSDataBitAssist.h @@ -17,23 +17,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSDataBitAssist */ -typedef struct GANSSDataBitAssist -{ - long ganssTOD; - SVID_t svID; - long ganssDataTypeID; - SeqOf_GANSSDataBits_t ganssDataBits; + /* GANSSDataBitAssist */ + typedef struct GANSSDataBitAssist + { + long ganssTOD; + SVID_t svID; + long ganssDataTypeID; + SeqOf_GANSSDataBits_t ganssDataBits; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSDataBitAssist_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSDataBitAssist_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSDataBitAssist; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSDataBitAssist; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSDiffCorrections.h b/src/core/libs/supl/asn-rrlp/GANSSDiffCorrections.h index ab73d4ae2..5289c74a8 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSDiffCorrections.h +++ b/src/core/libs/supl/asn-rrlp/GANSSDiffCorrections.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSDiffCorrections */ -typedef struct GANSSDiffCorrections -{ - long dganssRefTime; - SeqOfSgnTypeElement_t sgnTypeList; + /* GANSSDiffCorrections */ + typedef struct GANSSDiffCorrections + { + long dganssRefTime; + SeqOfSgnTypeElement_t sgnTypeList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSDiffCorrections_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSDiffCorrections_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSDiffCorrections; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSDiffCorrections; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSGenericAssistDataElement.h b/src/core/libs/supl/asn-rrlp/GANSSGenericAssistDataElement.h index b83e73928..84573317f 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSGenericAssistDataElement.h +++ b/src/core/libs/supl/asn-rrlp/GANSSGenericAssistDataElement.h @@ -15,42 +15,43 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct SeqOfGANSSTimeModel; -struct GANSSDiffCorrections; -struct GANSSNavModel; -struct GANSSRealTimeIntegrity; -struct GANSSDataBitAssist; -struct GANSSRefMeasurementAssist; -struct GANSSAlmanacModel; -struct GANSSUTCModel; + /* Forward declarations */ + struct SeqOfGANSSTimeModel; + struct GANSSDiffCorrections; + struct GANSSNavModel; + struct GANSSRealTimeIntegrity; + struct GANSSDataBitAssist; + struct GANSSRefMeasurementAssist; + struct GANSSAlmanacModel; + struct GANSSUTCModel; -/* GANSSGenericAssistDataElement */ -typedef struct GANSSGenericAssistDataElement -{ - long *ganssID /* OPTIONAL */; - struct SeqOfGANSSTimeModel *ganssTimeModel /* OPTIONAL */; - struct GANSSDiffCorrections *ganssDiffCorrections /* OPTIONAL */; - struct GANSSNavModel *ganssNavigationModel /* OPTIONAL */; - struct GANSSRealTimeIntegrity *ganssRealTimeIntegrity /* OPTIONAL */; - struct GANSSDataBitAssist *ganssDataBitAssist /* OPTIONAL */; - struct GANSSRefMeasurementAssist *ganssRefMeasurementAssist /* OPTIONAL */; - struct GANSSAlmanacModel *ganssAlmanacModel /* OPTIONAL */; - struct GANSSUTCModel *ganssUTCModel /* OPTIONAL */; - /* + /* GANSSGenericAssistDataElement */ + typedef struct GANSSGenericAssistDataElement + { + long *ganssID /* OPTIONAL */; + struct SeqOfGANSSTimeModel *ganssTimeModel /* OPTIONAL */; + struct GANSSDiffCorrections *ganssDiffCorrections /* OPTIONAL */; + struct GANSSNavModel *ganssNavigationModel /* OPTIONAL */; + struct GANSSRealTimeIntegrity *ganssRealTimeIntegrity /* OPTIONAL */; + struct GANSSDataBitAssist *ganssDataBitAssist /* OPTIONAL */; + struct GANSSRefMeasurementAssist *ganssRefMeasurementAssist /* OPTIONAL */; + struct GANSSAlmanacModel *ganssAlmanacModel /* OPTIONAL */; + struct GANSSUTCModel *ganssUTCModel /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSGenericAssistDataElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSGenericAssistDataElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSGenericAssistDataElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSGenericAssistDataElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSIonoStormFlags.h b/src/core/libs/supl/asn-rrlp/GANSSIonoStormFlags.h index 49f1f6a94..c99ab79c6 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSIonoStormFlags.h +++ b/src/core/libs/supl/asn-rrlp/GANSSIonoStormFlags.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSIonoStormFlags */ -typedef struct GANSSIonoStormFlags -{ - long ionoStormFlag1; - long ionoStormFlag2; - long ionoStormFlag3; - long ionoStormFlag4; - long ionoStormFlag5; + /* GANSSIonoStormFlags */ + typedef struct GANSSIonoStormFlags + { + long ionoStormFlag1; + long ionoStormFlag2; + long ionoStormFlag3; + long ionoStormFlag4; + long ionoStormFlag5; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSIonoStormFlags_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSIonoStormFlags_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSIonoStormFlags; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSIonoStormFlags; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSIonosphereModel.h b/src/core/libs/supl/asn-rrlp/GANSSIonosphereModel.h index 2af13e2e9..969fd8da0 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSIonosphereModel.h +++ b/src/core/libs/supl/asn-rrlp/GANSSIonosphereModel.h @@ -15,22 +15,23 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSIonosphereModel */ -typedef struct GANSSIonosphereModel -{ - long ai0; - long ai1; - long ai2; + /* GANSSIonosphereModel */ + typedef struct GANSSIonosphereModel + { + long ai0; + long ai1; + long ai2; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSIonosphereModel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSIonosphereModel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSIonosphereModel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSIonosphereModel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSIonosphericModel.h b/src/core/libs/supl/asn-rrlp/GANSSIonosphericModel.h index 3eead3eaa..30a219e0d 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSIonosphericModel.h +++ b/src/core/libs/supl/asn-rrlp/GANSSIonosphericModel.h @@ -15,28 +15,29 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSSIonoStormFlags; + /* Forward declarations */ + struct GANSSIonoStormFlags; -/* GANSSIonosphericModel */ -typedef struct GANSSIonosphericModel -{ - GANSSIonosphereModel_t ganssIonoModel; - struct GANSSIonoStormFlags *ganssIonoStormFlags /* OPTIONAL */; - /* + /* GANSSIonosphericModel */ + typedef struct GANSSIonosphericModel + { + GANSSIonosphereModel_t ganssIonoModel; + struct GANSSIonoStormFlags *ganssIonoStormFlags /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSIonosphericModel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSIonosphericModel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSIonosphericModel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSIonosphericModel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSLocationInfo.h b/src/core/libs/supl/asn-rrlp/GANSSLocationInfo.h index 140b60b94..ab7b0dcea 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSLocationInfo.h +++ b/src/core/libs/supl/asn-rrlp/GANSSLocationInfo.h @@ -20,35 +20,36 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct ReferenceFrame; + /* Forward declarations */ + struct ReferenceFrame; -/* GANSSLocationInfo */ -typedef struct GANSSLocationInfo -{ - struct ReferenceFrame *referenceFrame /* OPTIONAL */; - GANSSTODm_t *ganssTODm /* OPTIONAL */; - long *ganssTODFrac /* OPTIONAL */; - GANSSTODUncertainty_t *ganssTODUncertainty /* OPTIONAL */; - long *ganssTimeID /* OPTIONAL */; - FixType_t fixType; - PositionData_t posData; - long *stationaryIndication /* OPTIONAL */; - Ext_GeographicalInformation_t posEstimate; - /* + /* GANSSLocationInfo */ + typedef struct GANSSLocationInfo + { + struct ReferenceFrame *referenceFrame /* OPTIONAL */; + GANSSTODm_t *ganssTODm /* OPTIONAL */; + long *ganssTODFrac /* OPTIONAL */; + GANSSTODUncertainty_t *ganssTODUncertainty /* OPTIONAL */; + long *ganssTimeID /* OPTIONAL */; + FixType_t fixType; + PositionData_t posData; + long *stationaryIndication /* OPTIONAL */; + Ext_GeographicalInformation_t posEstimate; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSLocationInfo_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSLocationInfo_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSLocationInfo; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSLocationInfo; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSMeasureInfo.h b/src/core/libs/supl/asn-rrlp/GANSSMeasureInfo.h index f495de0f2..e5e87bd86 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSMeasureInfo.h +++ b/src/core/libs/supl/asn-rrlp/GANSSMeasureInfo.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSMeasureInfo */ -typedef struct GANSSMeasureInfo -{ - SeqOfGANSS_MsrSetElement_t ganssMsrSetList; + /* GANSSMeasureInfo */ + typedef struct GANSSMeasureInfo + { + SeqOfGANSS_MsrSetElement_t ganssMsrSetList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSMeasureInfo_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSMeasureInfo_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSMeasureInfo; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSMeasureInfo; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSNavModel.h b/src/core/libs/supl/asn-rrlp/GANSSNavModel.h index 1f61e2211..3891a44d7 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSNavModel.h +++ b/src/core/libs/supl/asn-rrlp/GANSSNavModel.h @@ -16,24 +16,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSNavModel */ -typedef struct GANSSNavModel -{ - long nonBroadcastIndFlag; - long *toeMSB /* OPTIONAL */; - long *eMSB /* OPTIONAL */; - long *sqrtAMBS /* OPTIONAL */; - SeqOfGANSSSatelliteElement_t ganssSatelliteList; + /* GANSSNavModel */ + typedef struct GANSSNavModel + { + long nonBroadcastIndFlag; + long *toeMSB /* OPTIONAL */; + long *eMSB /* OPTIONAL */; + long *sqrtAMBS /* OPTIONAL */; + SeqOfGANSSSatelliteElement_t ganssSatelliteList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSNavModel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSNavModel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSNavModel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSNavModel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSOrbitModel.h b/src/core/libs/supl/asn-rrlp/GANSSOrbitModel.h index 1b8fbdf99..23a907d01 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSOrbitModel.h +++ b/src/core/libs/supl/asn-rrlp/GANSSOrbitModel.h @@ -15,36 +15,38 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum GANSSOrbitModel_PR { - GANSSOrbitModel_PR_NOTHING, /* No components present */ - GANSSOrbitModel_PR_keplerianSet, - /* Extensions may appear below */ - -} GANSSOrbitModel_PR; - -/* GANSSOrbitModel */ -typedef struct GANSSOrbitModel -{ - GANSSOrbitModel_PR present; - union GANSSOrbitModel_u + /* Dependencies */ + typedef enum GANSSOrbitModel_PR { - NavModel_KeplerianSet_t keplerianSet; - /* + GANSSOrbitModel_PR_NOTHING, /* No components present */ + GANSSOrbitModel_PR_keplerianSet, + /* Extensions may appear below */ + + } GANSSOrbitModel_PR; + + /* GANSSOrbitModel */ + typedef struct GANSSOrbitModel + { + GANSSOrbitModel_PR present; + union GANSSOrbitModel_u + { + NavModel_KeplerianSet_t keplerianSet; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSOrbitModel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSOrbitModel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSOrbitModel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSOrbitModel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSPositioningMethod.h b/src/core/libs/supl/asn-rrlp/GANSSPositioningMethod.h index b585b6e4c..2719933a3 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSPositioningMethod.h +++ b/src/core/libs/supl/asn-rrlp/GANSSPositioningMethod.h @@ -14,29 +14,31 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum GANSSPositioningMethod { - GANSSPositioningMethod_gps = 0, - GANSSPositioningMethod_galileo = 1 -} e_GANSSPositioningMethod; + /* Dependencies */ + typedef enum GANSSPositioningMethod + { + GANSSPositioningMethod_gps = 0, + GANSSPositioningMethod_galileo = 1 + } e_GANSSPositioningMethod; -/* GANSSPositioningMethod */ -typedef BIT_STRING_t GANSSPositioningMethod_t; + /* GANSSPositioningMethod */ + typedef BIT_STRING_t GANSSPositioningMethod_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSPositioningMethod; -asn_struct_free_f GANSSPositioningMethod_free; -asn_struct_print_f GANSSPositioningMethod_print; -asn_constr_check_f GANSSPositioningMethod_constraint; -ber_type_decoder_f GANSSPositioningMethod_decode_ber; -der_type_encoder_f GANSSPositioningMethod_encode_der; -xer_type_decoder_f GANSSPositioningMethod_decode_xer; -xer_type_encoder_f GANSSPositioningMethod_encode_xer; -per_type_decoder_f GANSSPositioningMethod_decode_uper; -per_type_encoder_f GANSSPositioningMethod_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSPositioningMethod; + asn_struct_free_f GANSSPositioningMethod_free; + asn_struct_print_f GANSSPositioningMethod_print; + asn_constr_check_f GANSSPositioningMethod_constraint; + ber_type_decoder_f GANSSPositioningMethod_decode_ber; + der_type_encoder_f GANSSPositioningMethod_encode_der; + xer_type_decoder_f GANSSPositioningMethod_decode_xer; + xer_type_encoder_f GANSSPositioningMethod_encode_xer; + per_type_decoder_f GANSSPositioningMethod_decode_uper; + per_type_encoder_f GANSSPositioningMethod_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSRealTimeIntegrity.h b/src/core/libs/supl/asn-rrlp/GANSSRealTimeIntegrity.h index 916e10526..389994464 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSRealTimeIntegrity.h +++ b/src/core/libs/supl/asn-rrlp/GANSSRealTimeIntegrity.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSRealTimeIntegrity */ -typedef struct GANSSRealTimeIntegrity -{ - SeqOfBadSignalElement_t ganssBadSignalList; + /* GANSSRealTimeIntegrity */ + typedef struct GANSSRealTimeIntegrity + { + SeqOfBadSignalElement_t ganssBadSignalList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSRealTimeIntegrity_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSRealTimeIntegrity_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSRealTimeIntegrity; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSRealTimeIntegrity; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSRefLocation.h b/src/core/libs/supl/asn-rrlp/GANSSRefLocation.h index 1cf1a9568..70b9d79fe 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSRefLocation.h +++ b/src/core/libs/supl/asn-rrlp/GANSSRefLocation.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSRefLocation */ -typedef struct GANSSRefLocation -{ - Ext_GeographicalInformation_t threeDLocation; + /* GANSSRefLocation */ + typedef struct GANSSRefLocation + { + Ext_GeographicalInformation_t threeDLocation; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSRefLocation_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSRefLocation_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSRefLocation; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSRefLocation; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSRefMeasurementAssist.h b/src/core/libs/supl/asn-rrlp/GANSSRefMeasurementAssist.h index 88498e8ec..e6af89db3 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSRefMeasurementAssist.h +++ b/src/core/libs/supl/asn-rrlp/GANSSRefMeasurementAssist.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSRefMeasurementAssist */ -typedef struct GANSSRefMeasurementAssist -{ - long *ganssSignalID /* OPTIONAL */; - SeqOfGANSSRefMeasurementElement_t ganssRefMeasAssitList; + /* GANSSRefMeasurementAssist */ + typedef struct GANSSRefMeasurementAssist + { + long *ganssSignalID /* OPTIONAL */; + SeqOfGANSSRefMeasurementElement_t ganssRefMeasAssitList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSRefMeasurementAssist_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSRefMeasurementAssist_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSRefMeasurementAssist; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSRefMeasurementAssist; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSRefMeasurementElement.h b/src/core/libs/supl/asn-rrlp/GANSSRefMeasurementElement.h index d32caf146..42869c0dd 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSRefMeasurementElement.h +++ b/src/core/libs/supl/asn-rrlp/GANSSRefMeasurementElement.h @@ -16,34 +16,35 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct AdditionalDopplerFields; -struct AddionalAngleFields; + /* Forward declarations */ + struct AdditionalDopplerFields; + struct AddionalAngleFields; -/* GANSSRefMeasurementElement */ -typedef struct GANSSRefMeasurementElement -{ - SVID_t svID; - long doppler0; - struct AdditionalDopplerFields *additionalDoppler /* OPTIONAL */; - long codePhase; - long intCodePhase; - long codePhaseSearchWindow; - struct AddionalAngleFields *additionalAngle /* OPTIONAL */; - /* + /* GANSSRefMeasurementElement */ + typedef struct GANSSRefMeasurementElement + { + SVID_t svID; + long doppler0; + struct AdditionalDopplerFields *additionalDoppler /* OPTIONAL */; + long codePhase; + long intCodePhase; + long codePhaseSearchWindow; + struct AddionalAngleFields *additionalAngle /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSRefMeasurementElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSRefMeasurementElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSRefMeasurementElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSRefMeasurementElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSRefTimeInfo.h b/src/core/libs/supl/asn-rrlp/GANSSRefTimeInfo.h index 0ed417822..508883f89 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSRefTimeInfo.h +++ b/src/core/libs/supl/asn-rrlp/GANSSRefTimeInfo.h @@ -17,23 +17,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSRefTimeInfo */ -typedef struct GANSSRefTimeInfo -{ - long *ganssDay /* OPTIONAL */; - GANSSTOD_t ganssTOD; - GANSSTODUncertainty_t *ganssTODUncertainty /* OPTIONAL */; - long *ganssTimeID /* OPTIONAL */; + /* GANSSRefTimeInfo */ + typedef struct GANSSRefTimeInfo + { + long *ganssDay /* OPTIONAL */; + GANSSTOD_t ganssTOD; + GANSSTODUncertainty_t *ganssTODUncertainty /* OPTIONAL */; + long *ganssTimeID /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSRefTimeInfo_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSRefTimeInfo_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSRefTimeInfo; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSRefTimeInfo; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSReferenceTime.h b/src/core/libs/supl/asn-rrlp/GANSSReferenceTime.h index 3b4d51a1e..adf0a749e 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSReferenceTime.h +++ b/src/core/libs/supl/asn-rrlp/GANSSReferenceTime.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSSTOD_GSMTimeAssociation; + /* Forward declarations */ + struct GANSSTOD_GSMTimeAssociation; -/* GANSSReferenceTime */ -typedef struct GANSSReferenceTime -{ - GANSSRefTimeInfo_t ganssRefTimeInfo; - struct GANSSTOD_GSMTimeAssociation *ganssTOD_GSMTimeAssociation /* OPTIONAL */; + /* GANSSReferenceTime */ + typedef struct GANSSReferenceTime + { + GANSSRefTimeInfo_t ganssRefTimeInfo; + struct GANSSTOD_GSMTimeAssociation *ganssTOD_GSMTimeAssociation /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSReferenceTime_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSReferenceTime_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSReferenceTime; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSReferenceTime; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSSatelliteElement.h b/src/core/libs/supl/asn-rrlp/GANSSSatelliteElement.h index 442c339b9..5af0f54de 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSSatelliteElement.h +++ b/src/core/libs/supl/asn-rrlp/GANSSSatelliteElement.h @@ -18,28 +18,29 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSSatelliteElement */ -typedef struct GANSSSatelliteElement -{ - SVID_t svID; - long svHealth; - long iod; - GANSSClockModel_t ganssClockModel; - GANSSOrbitModel_t ganssOrbitModel; - /* + /* GANSSSatelliteElement */ + typedef struct GANSSSatelliteElement + { + SVID_t svID; + long svHealth; + long iod; + GANSSClockModel_t ganssClockModel; + GANSSOrbitModel_t ganssOrbitModel; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSSatelliteElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSSatelliteElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSSatelliteElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSSatelliteElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSSignalID.h b/src/core/libs/supl/asn-rrlp/GANSSSignalID.h index d37ca976e..e89105ba3 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSSignalID.h +++ b/src/core/libs/supl/asn-rrlp/GANSSSignalID.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSSignalID */ -typedef long GANSSSignalID_t; + /* GANSSSignalID */ + typedef long GANSSSignalID_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSSignalID; -asn_struct_free_f GANSSSignalID_free; -asn_struct_print_f GANSSSignalID_print; -asn_constr_check_f GANSSSignalID_constraint; -ber_type_decoder_f GANSSSignalID_decode_ber; -der_type_encoder_f GANSSSignalID_encode_der; -xer_type_decoder_f GANSSSignalID_decode_xer; -xer_type_encoder_f GANSSSignalID_encode_xer; -per_type_decoder_f GANSSSignalID_decode_uper; -per_type_encoder_f GANSSSignalID_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSSignalID; + asn_struct_free_f GANSSSignalID_free; + asn_struct_print_f GANSSSignalID_print; + asn_constr_check_f GANSSSignalID_constraint; + ber_type_decoder_f GANSSSignalID_decode_ber; + der_type_encoder_f GANSSSignalID_encode_der; + xer_type_decoder_f GANSSSignalID_decode_xer; + xer_type_encoder_f GANSSSignalID_encode_xer; + per_type_decoder_f GANSSSignalID_decode_uper; + per_type_encoder_f GANSSSignalID_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSTOD-GSMTimeAssociation.h b/src/core/libs/supl/asn-rrlp/GANSSTOD-GSMTimeAssociation.h index 9ad65f37d..b6016268f 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSTOD-GSMTimeAssociation.h +++ b/src/core/libs/supl/asn-rrlp/GANSSTOD-GSMTimeAssociation.h @@ -20,25 +20,26 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSTOD-GSMTimeAssociation */ -typedef struct GANSSTOD_GSMTimeAssociation -{ - BCCHCarrier_t bcchCarrier; - BSIC_t bsic; - FrameNumber_t frameNumber; - TimeSlot_t timeSlot; - BitNumber_t bitNumber; - FrameDrift_t *frameDrift /* OPTIONAL */; + /* GANSSTOD-GSMTimeAssociation */ + typedef struct GANSSTOD_GSMTimeAssociation + { + BCCHCarrier_t bcchCarrier; + BSIC_t bsic; + FrameNumber_t frameNumber; + TimeSlot_t timeSlot; + BitNumber_t bitNumber; + FrameDrift_t *frameDrift /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSTOD_GSMTimeAssociation_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSTOD_GSMTimeAssociation_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSTOD_GSMTimeAssociation; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSTOD_GSMTimeAssociation; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSTOD.h b/src/core/libs/supl/asn-rrlp/GANSSTOD.h index 89df8cd43..e8b62ef2c 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSTOD.h +++ b/src/core/libs/supl/asn-rrlp/GANSSTOD.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSTOD */ -typedef long GANSSTOD_t; + /* GANSSTOD */ + typedef long GANSSTOD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSTOD; -asn_struct_free_f GANSSTOD_free; -asn_struct_print_f GANSSTOD_print; -asn_constr_check_f GANSSTOD_constraint; -ber_type_decoder_f GANSSTOD_decode_ber; -der_type_encoder_f GANSSTOD_encode_der; -xer_type_decoder_f GANSSTOD_decode_xer; -xer_type_encoder_f GANSSTOD_encode_xer; -per_type_decoder_f GANSSTOD_decode_uper; -per_type_encoder_f GANSSTOD_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSTOD; + asn_struct_free_f GANSSTOD_free; + asn_struct_print_f GANSSTOD_print; + asn_constr_check_f GANSSTOD_constraint; + ber_type_decoder_f GANSSTOD_decode_ber; + der_type_encoder_f GANSSTOD_encode_der; + xer_type_decoder_f GANSSTOD_decode_xer; + xer_type_encoder_f GANSSTOD_encode_xer; + per_type_decoder_f GANSSTOD_decode_uper; + per_type_encoder_f GANSSTOD_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSTODUncertainty.h b/src/core/libs/supl/asn-rrlp/GANSSTODUncertainty.h index ee39e3452..8997e77e4 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSTODUncertainty.h +++ b/src/core/libs/supl/asn-rrlp/GANSSTODUncertainty.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSTODUncertainty */ -typedef long GANSSTODUncertainty_t; + /* GANSSTODUncertainty */ + typedef long GANSSTODUncertainty_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSTODUncertainty; -asn_struct_free_f GANSSTODUncertainty_free; -asn_struct_print_f GANSSTODUncertainty_print; -asn_constr_check_f GANSSTODUncertainty_constraint; -ber_type_decoder_f GANSSTODUncertainty_decode_ber; -der_type_encoder_f GANSSTODUncertainty_encode_der; -xer_type_decoder_f GANSSTODUncertainty_decode_xer; -xer_type_encoder_f GANSSTODUncertainty_encode_xer; -per_type_decoder_f GANSSTODUncertainty_decode_uper; -per_type_encoder_f GANSSTODUncertainty_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSTODUncertainty; + asn_struct_free_f GANSSTODUncertainty_free; + asn_struct_print_f GANSSTODUncertainty_print; + asn_constr_check_f GANSSTODUncertainty_constraint; + ber_type_decoder_f GANSSTODUncertainty_decode_ber; + der_type_encoder_f GANSSTODUncertainty_encode_der; + xer_type_decoder_f GANSSTODUncertainty_decode_xer; + xer_type_encoder_f GANSSTODUncertainty_encode_xer; + per_type_decoder_f GANSSTODUncertainty_decode_uper; + per_type_encoder_f GANSSTODUncertainty_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSTODm.h b/src/core/libs/supl/asn-rrlp/GANSSTODm.h index 4d1974553..008482f2c 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSTODm.h +++ b/src/core/libs/supl/asn-rrlp/GANSSTODm.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSTODm */ -typedef long GANSSTODm_t; + /* GANSSTODm */ + typedef long GANSSTODm_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSTODm; -asn_struct_free_f GANSSTODm_free; -asn_struct_print_f GANSSTODm_print; -asn_constr_check_f GANSSTODm_constraint; -ber_type_decoder_f GANSSTODm_decode_ber; -der_type_encoder_f GANSSTODm_encode_der; -xer_type_decoder_f GANSSTODm_decode_xer; -xer_type_encoder_f GANSSTODm_encode_xer; -per_type_decoder_f GANSSTODm_decode_uper; -per_type_encoder_f GANSSTODm_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSTODm; + asn_struct_free_f GANSSTODm_free; + asn_struct_print_f GANSSTODm_print; + asn_constr_check_f GANSSTODm_constraint; + ber_type_decoder_f GANSSTODm_decode_ber; + der_type_encoder_f GANSSTODm_encode_der; + xer_type_decoder_f GANSSTODm_decode_xer; + xer_type_encoder_f GANSSTODm_encode_xer; + per_type_decoder_f GANSSTODm_decode_uper; + per_type_encoder_f GANSSTODm_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSTimeModelElement.h b/src/core/libs/supl/asn-rrlp/GANSSTimeModelElement.h index f57ff0729..2ffc74388 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSTimeModelElement.h +++ b/src/core/libs/supl/asn-rrlp/GANSSTimeModelElement.h @@ -18,25 +18,26 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSTimeModelElement */ -typedef struct GANSSTimeModelElement -{ - long ganssTimeModelRefTime; - TA0_t tA0; - TA1_t *tA1 /* OPTIONAL */; - TA2_t *tA2 /* OPTIONAL */; - long gnssTOID; - long *weekNumber /* OPTIONAL */; + /* GANSSTimeModelElement */ + typedef struct GANSSTimeModelElement + { + long ganssTimeModelRefTime; + TA0_t tA0; + TA1_t *tA1 /* OPTIONAL */; + TA2_t *tA2 /* OPTIONAL */; + long gnssTOID; + long *weekNumber /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSTimeModelElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSTimeModelElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSTimeModelElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSTimeModelElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GANSSUTCModel.h b/src/core/libs/supl/asn-rrlp/GANSSUTCModel.h index 73af0218e..4f0c74735 100644 --- a/src/core/libs/supl/asn-rrlp/GANSSUTCModel.h +++ b/src/core/libs/supl/asn-rrlp/GANSSUTCModel.h @@ -15,27 +15,28 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GANSSUTCModel */ -typedef struct GANSSUTCModel -{ - long ganssUtcA1; - long ganssUtcA0; - long ganssUtcTot; - long ganssUtcWNt; - long ganssUtcDeltaTls; - long ganssUtcWNlsf; - long ganssUtcDN; - long ganssUtcDeltaTlsf; + /* GANSSUTCModel */ + typedef struct GANSSUTCModel + { + long ganssUtcA1; + long ganssUtcA0; + long ganssUtcTot; + long ganssUtcWNt; + long ganssUtcDeltaTls; + long ganssUtcWNlsf; + long ganssUtcDN; + long ganssUtcDeltaTlsf; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GANSSUTCModel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GANSSUTCModel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GANSSUTCModel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GANSSUTCModel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPS-AssistData.h b/src/core/libs/supl/asn-rrlp/GPS-AssistData.h index 1f21ce670..0eb180068 100644 --- a/src/core/libs/supl/asn-rrlp/GPS-AssistData.h +++ b/src/core/libs/supl/asn-rrlp/GPS-AssistData.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GPS-AssistData */ -typedef struct GPS_AssistData -{ - ControlHeader_t controlHeader; + /* GPS-AssistData */ + typedef struct GPS_AssistData + { + ControlHeader_t controlHeader; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GPS_AssistData_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GPS_AssistData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPS_AssistData; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPS_AssistData; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPS-MeasureInfo.h b/src/core/libs/supl/asn-rrlp/GPS-MeasureInfo.h index 835f60463..94049297c 100644 --- a/src/core/libs/supl/asn-rrlp/GPS-MeasureInfo.h +++ b/src/core/libs/supl/asn-rrlp/GPS-MeasureInfo.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GPS-MeasureInfo */ -typedef struct GPS_MeasureInfo -{ - SeqOfGPS_MsrSetElement_t gpsMsrSetList; + /* GPS-MeasureInfo */ + typedef struct GPS_MeasureInfo + { + SeqOfGPS_MsrSetElement_t gpsMsrSetList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GPS_MeasureInfo_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GPS_MeasureInfo_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPS_MeasureInfo; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPS_MeasureInfo; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPS-MsrElement.h b/src/core/libs/supl/asn-rrlp/GPS-MsrElement.h index 2581b3e5c..20fc55f7b 100644 --- a/src/core/libs/supl/asn-rrlp/GPS-MsrElement.h +++ b/src/core/libs/supl/asn-rrlp/GPS-MsrElement.h @@ -17,26 +17,27 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GPS-MsrElement */ -typedef struct GPS_MsrElement -{ - SatelliteID_t satelliteID; - long cNo; - long doppler; - long wholeChips; - long fracChips; - MpathIndic_t mpathIndic; - long pseuRangeRMSErr; + /* GPS-MsrElement */ + typedef struct GPS_MsrElement + { + SatelliteID_t satelliteID; + long cNo; + long doppler; + long wholeChips; + long fracChips; + MpathIndic_t mpathIndic; + long pseuRangeRMSErr; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GPS_MsrElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GPS_MsrElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPS_MsrElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPS_MsrElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPS-MsrSetElement.h b/src/core/libs/supl/asn-rrlp/GPS-MsrSetElement.h index 49a33e583..9f73ac026 100644 --- a/src/core/libs/supl/asn-rrlp/GPS-MsrSetElement.h +++ b/src/core/libs/supl/asn-rrlp/GPS-MsrSetElement.h @@ -17,22 +17,23 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GPS-MsrSetElement */ -typedef struct GPS_MsrSetElement -{ - long *refFrame /* OPTIONAL */; - GPSTOW24b_t gpsTOW; - SeqOfGPS_MsrElement_t gps_msrList; + /* GPS-MsrSetElement */ + typedef struct GPS_MsrSetElement + { + long *refFrame /* OPTIONAL */; + GPSTOW24b_t gpsTOW; + SeqOfGPS_MsrElement_t gps_msrList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GPS_MsrSetElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GPS_MsrSetElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPS_MsrSetElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPS_MsrSetElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPSAssistanceData.h b/src/core/libs/supl/asn-rrlp/GPSAssistanceData.h index 47ec8d4ef..4716111b7 100644 --- a/src/core/libs/supl/asn-rrlp/GPSAssistanceData.h +++ b/src/core/libs/supl/asn-rrlp/GPSAssistanceData.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GPSAssistanceData */ -typedef OCTET_STRING_t GPSAssistanceData_t; + /* GPSAssistanceData */ + typedef OCTET_STRING_t GPSAssistanceData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPSAssistanceData; -asn_struct_free_f GPSAssistanceData_free; -asn_struct_print_f GPSAssistanceData_print; -asn_constr_check_f GPSAssistanceData_constraint; -ber_type_decoder_f GPSAssistanceData_decode_ber; -der_type_encoder_f GPSAssistanceData_encode_der; -xer_type_decoder_f GPSAssistanceData_decode_xer; -xer_type_encoder_f GPSAssistanceData_encode_xer; -per_type_decoder_f GPSAssistanceData_decode_uper; -per_type_encoder_f GPSAssistanceData_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPSAssistanceData; + asn_struct_free_f GPSAssistanceData_free; + asn_struct_print_f GPSAssistanceData_print; + asn_constr_check_f GPSAssistanceData_constraint; + ber_type_decoder_f GPSAssistanceData_decode_ber; + der_type_encoder_f GPSAssistanceData_encode_der; + xer_type_decoder_f GPSAssistanceData_decode_xer; + xer_type_encoder_f GPSAssistanceData_encode_xer; + per_type_decoder_f GPSAssistanceData_decode_uper; + per_type_encoder_f GPSAssistanceData_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPSReferenceTimeUncertainty.h b/src/core/libs/supl/asn-rrlp/GPSReferenceTimeUncertainty.h index abd14e3ff..2fe9b91af 100644 --- a/src/core/libs/supl/asn-rrlp/GPSReferenceTimeUncertainty.h +++ b/src/core/libs/supl/asn-rrlp/GPSReferenceTimeUncertainty.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GPSReferenceTimeUncertainty */ -typedef long GPSReferenceTimeUncertainty_t; + /* GPSReferenceTimeUncertainty */ + typedef long GPSReferenceTimeUncertainty_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPSReferenceTimeUncertainty; -asn_struct_free_f GPSReferenceTimeUncertainty_free; -asn_struct_print_f GPSReferenceTimeUncertainty_print; -asn_constr_check_f GPSReferenceTimeUncertainty_constraint; -ber_type_decoder_f GPSReferenceTimeUncertainty_decode_ber; -der_type_encoder_f GPSReferenceTimeUncertainty_encode_der; -xer_type_decoder_f GPSReferenceTimeUncertainty_decode_xer; -xer_type_encoder_f GPSReferenceTimeUncertainty_encode_xer; -per_type_decoder_f GPSReferenceTimeUncertainty_decode_uper; -per_type_encoder_f GPSReferenceTimeUncertainty_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPSReferenceTimeUncertainty; + asn_struct_free_f GPSReferenceTimeUncertainty_free; + asn_struct_print_f GPSReferenceTimeUncertainty_print; + asn_constr_check_f GPSReferenceTimeUncertainty_constraint; + ber_type_decoder_f GPSReferenceTimeUncertainty_decode_ber; + der_type_encoder_f GPSReferenceTimeUncertainty_encode_der; + xer_type_decoder_f GPSReferenceTimeUncertainty_decode_xer; + xer_type_encoder_f GPSReferenceTimeUncertainty_encode_xer; + per_type_decoder_f GPSReferenceTimeUncertainty_decode_uper; + per_type_encoder_f GPSReferenceTimeUncertainty_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPSTOW23b.h b/src/core/libs/supl/asn-rrlp/GPSTOW23b.h index 69385ebd2..f280e9419 100644 --- a/src/core/libs/supl/asn-rrlp/GPSTOW23b.h +++ b/src/core/libs/supl/asn-rrlp/GPSTOW23b.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GPSTOW23b */ -typedef long GPSTOW23b_t; + /* GPSTOW23b */ + typedef long GPSTOW23b_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPSTOW23b; -asn_struct_free_f GPSTOW23b_free; -asn_struct_print_f GPSTOW23b_print; -asn_constr_check_f GPSTOW23b_constraint; -ber_type_decoder_f GPSTOW23b_decode_ber; -der_type_encoder_f GPSTOW23b_encode_der; -xer_type_decoder_f GPSTOW23b_decode_xer; -xer_type_encoder_f GPSTOW23b_encode_xer; -per_type_decoder_f GPSTOW23b_decode_uper; -per_type_encoder_f GPSTOW23b_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPSTOW23b; + asn_struct_free_f GPSTOW23b_free; + asn_struct_print_f GPSTOW23b_print; + asn_constr_check_f GPSTOW23b_constraint; + ber_type_decoder_f GPSTOW23b_decode_ber; + der_type_encoder_f GPSTOW23b_encode_der; + xer_type_decoder_f GPSTOW23b_decode_xer; + xer_type_encoder_f GPSTOW23b_encode_xer; + per_type_decoder_f GPSTOW23b_decode_uper; + per_type_encoder_f GPSTOW23b_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPSTOW24b.h b/src/core/libs/supl/asn-rrlp/GPSTOW24b.h index 63845a106..a2e7831fd 100644 --- a/src/core/libs/supl/asn-rrlp/GPSTOW24b.h +++ b/src/core/libs/supl/asn-rrlp/GPSTOW24b.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GPSTOW24b */ -typedef long GPSTOW24b_t; + /* GPSTOW24b */ + typedef long GPSTOW24b_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPSTOW24b; -asn_struct_free_f GPSTOW24b_free; -asn_struct_print_f GPSTOW24b_print; -asn_constr_check_f GPSTOW24b_constraint; -ber_type_decoder_f GPSTOW24b_decode_ber; -der_type_encoder_f GPSTOW24b_encode_der; -xer_type_decoder_f GPSTOW24b_decode_xer; -xer_type_encoder_f GPSTOW24b_encode_xer; -per_type_decoder_f GPSTOW24b_decode_uper; -per_type_encoder_f GPSTOW24b_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPSTOW24b; + asn_struct_free_f GPSTOW24b_free; + asn_struct_print_f GPSTOW24b_print; + asn_constr_check_f GPSTOW24b_constraint; + ber_type_decoder_f GPSTOW24b_decode_ber; + der_type_encoder_f GPSTOW24b_encode_der; + xer_type_decoder_f GPSTOW24b_decode_xer; + xer_type_encoder_f GPSTOW24b_encode_xer; + per_type_decoder_f GPSTOW24b_decode_uper; + per_type_encoder_f GPSTOW24b_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPSTOWAssist.h b/src/core/libs/supl/asn-rrlp/GPSTOWAssist.h index cb5f4b4a5..e7ea606d2 100644 --- a/src/core/libs/supl/asn-rrlp/GPSTOWAssist.h +++ b/src/core/libs/supl/asn-rrlp/GPSTOWAssist.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GPSTOWAssistElement; + /* Forward declarations */ + struct GPSTOWAssistElement; -/* GPSTOWAssist */ -typedef struct GPSTOWAssist -{ - A_SEQUENCE_OF(struct GPSTOWAssistElement) - list; + /* GPSTOWAssist */ + typedef struct GPSTOWAssist + { + A_SEQUENCE_OF(struct GPSTOWAssistElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GPSTOWAssist_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GPSTOWAssist_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPSTOWAssist; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPSTOWAssist; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPSTOWAssistElement.h b/src/core/libs/supl/asn-rrlp/GPSTOWAssistElement.h index 7f23fd5ca..939b7b3e5 100644 --- a/src/core/libs/supl/asn-rrlp/GPSTOWAssistElement.h +++ b/src/core/libs/supl/asn-rrlp/GPSTOWAssistElement.h @@ -19,24 +19,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GPSTOWAssistElement */ -typedef struct GPSTOWAssistElement -{ - SatelliteID_t satelliteID; - TLMWord_t tlmWord; - AntiSpoofFlag_t antiSpoof; - AlertFlag_t alert; - TLMReservedBits_t tlmRsvdBits; + /* GPSTOWAssistElement */ + typedef struct GPSTOWAssistElement + { + SatelliteID_t satelliteID; + TLMWord_t tlmWord; + AntiSpoofFlag_t antiSpoof; + AlertFlag_t alert; + TLMReservedBits_t tlmRsvdBits; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GPSTOWAssistElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GPSTOWAssistElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPSTOWAssistElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPSTOWAssistElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPSTime.h b/src/core/libs/supl/asn-rrlp/GPSTime.h index 387df3e0d..b25b5af57 100644 --- a/src/core/libs/supl/asn-rrlp/GPSTime.h +++ b/src/core/libs/supl/asn-rrlp/GPSTime.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GPSTime */ -typedef struct GPSTime -{ - GPSTOW23b_t gpsTOW23b; - GPSWeek_t gpsWeek; + /* GPSTime */ + typedef struct GPSTime + { + GPSTOW23b_t gpsTOW23b; + GPSWeek_t gpsWeek; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GPSTime_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GPSTime_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPSTime; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPSTime; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPSTimeAssistanceMeasurements.h b/src/core/libs/supl/asn-rrlp/GPSTimeAssistanceMeasurements.h index eeedf4f0f..8bc8dfce0 100644 --- a/src/core/libs/supl/asn-rrlp/GPSTimeAssistanceMeasurements.h +++ b/src/core/libs/supl/asn-rrlp/GPSTimeAssistanceMeasurements.h @@ -16,23 +16,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GPSTimeAssistanceMeasurements */ -typedef struct GPSTimeAssistanceMeasurements -{ - long referenceFrameMSB; - long *gpsTowSubms /* OPTIONAL */; - long *deltaTow /* OPTIONAL */; - GPSReferenceTimeUncertainty_t *gpsReferenceTimeUncertainty /* OPTIONAL */; + /* GPSTimeAssistanceMeasurements */ + typedef struct GPSTimeAssistanceMeasurements + { + long referenceFrameMSB; + long *gpsTowSubms /* OPTIONAL */; + long *deltaTow /* OPTIONAL */; + GPSReferenceTimeUncertainty_t *gpsReferenceTimeUncertainty /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GPSTimeAssistanceMeasurements_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GPSTimeAssistanceMeasurements_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPSTimeAssistanceMeasurements; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPSTimeAssistanceMeasurements; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GPSWeek.h b/src/core/libs/supl/asn-rrlp/GPSWeek.h index c38d17547..bcfe49b70 100644 --- a/src/core/libs/supl/asn-rrlp/GPSWeek.h +++ b/src/core/libs/supl/asn-rrlp/GPSWeek.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GPSWeek */ -typedef long GPSWeek_t; + /* GPSWeek */ + typedef long GPSWeek_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GPSWeek; -asn_struct_free_f GPSWeek_free; -asn_struct_print_f GPSWeek_print; -asn_constr_check_f GPSWeek_constraint; -ber_type_decoder_f GPSWeek_decode_ber; -der_type_encoder_f GPSWeek_encode_der; -xer_type_decoder_f GPSWeek_decode_xer; -xer_type_encoder_f GPSWeek_encode_xer; -per_type_decoder_f GPSWeek_decode_uper; -per_type_encoder_f GPSWeek_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GPSWeek; + asn_struct_free_f GPSWeek_free; + asn_struct_print_f GPSWeek_print; + asn_constr_check_f GPSWeek_constraint; + ber_type_decoder_f GPSWeek_decode_ber; + der_type_encoder_f GPSWeek_encode_der; + xer_type_decoder_f GPSWeek_decode_xer; + xer_type_encoder_f GPSWeek_encode_xer; + per_type_decoder_f GPSWeek_decode_uper; + per_type_encoder_f GPSWeek_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/GSMTime.h b/src/core/libs/supl/asn-rrlp/GSMTime.h index 7d0332d96..9f360bb13 100644 --- a/src/core/libs/supl/asn-rrlp/GSMTime.h +++ b/src/core/libs/supl/asn-rrlp/GSMTime.h @@ -19,24 +19,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* GSMTime */ -typedef struct GSMTime -{ - BCCHCarrier_t bcchCarrier; - BSIC_t bsic; - FrameNumber_t frameNumber; - TimeSlot_t timeSlot; - BitNumber_t bitNumber; + /* GSMTime */ + typedef struct GSMTime + { + BCCHCarrier_t bcchCarrier; + BSIC_t bsic; + FrameNumber_t frameNumber; + TimeSlot_t timeSlot; + BitNumber_t bitNumber; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GSMTime_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GSMTime_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GSMTime; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GSMTime; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/INTEGER.h b/src/core/libs/supl/asn-rrlp/INTEGER.h index 5720bdbed..2acd13ab9 100644 --- a/src/core/libs/supl/asn-rrlp/INTEGER.h +++ b/src/core/libs/supl/asn-rrlp/INTEGER.h @@ -9,60 +9,61 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef ASN__PRIMITIVE_TYPE_t INTEGER_t; + typedef ASN__PRIMITIVE_TYPE_t INTEGER_t; -extern asn_TYPE_descriptor_t asn_DEF_INTEGER; + extern asn_TYPE_descriptor_t asn_DEF_INTEGER; -/* Map with to integer value association */ -typedef struct asn_INTEGER_enum_map_s -{ - long nat_value; /* associated native integer value */ - size_t enum_len; /* strlen("tag") */ - const char *enum_name; /* "tag" */ -} asn_INTEGER_enum_map_t; + /* Map with to integer value association */ + typedef struct asn_INTEGER_enum_map_s + { + long nat_value; /* associated native integer value */ + size_t enum_len; /* strlen("tag") */ + const char *enum_name; /* "tag" */ + } asn_INTEGER_enum_map_t; -/* This type describes an enumeration for INTEGER and ENUMERATED types */ -typedef struct asn_INTEGER_specifics_s -{ - asn_INTEGER_enum_map_t *value2enum; /* N -> "tag"; sorted by N */ - unsigned int *enum2value; /* "tag" => N; sorted by tag */ - int map_count; /* Elements in either map */ - int extension; /* This map is extensible */ - int strict_enumeration; /* Enumeration set is fixed */ - int field_width; /* Size of native integer */ - int field_unsigned; /* Signed=0, unsigned=1 */ -} asn_INTEGER_specifics_t; + /* This type describes an enumeration for INTEGER and ENUMERATED types */ + typedef struct asn_INTEGER_specifics_s + { + asn_INTEGER_enum_map_t *value2enum; /* N -> "tag"; sorted by N */ + unsigned int *enum2value; /* "tag" => N; sorted by tag */ + int map_count; /* Elements in either map */ + int extension; /* This map is extensible */ + int strict_enumeration; /* Enumeration set is fixed */ + int field_width; /* Size of native integer */ + int field_unsigned; /* Signed=0, unsigned=1 */ + } asn_INTEGER_specifics_t; -asn_struct_print_f INTEGER_print; -ber_type_decoder_f INTEGER_decode_ber; -der_type_encoder_f INTEGER_encode_der; -xer_type_decoder_f INTEGER_decode_xer; -xer_type_encoder_f INTEGER_encode_xer; -per_type_decoder_f INTEGER_decode_uper; -per_type_encoder_f INTEGER_encode_uper; + asn_struct_print_f INTEGER_print; + ber_type_decoder_f INTEGER_decode_ber; + der_type_encoder_f INTEGER_encode_der; + xer_type_decoder_f INTEGER_decode_xer; + xer_type_encoder_f INTEGER_encode_xer; + per_type_decoder_f INTEGER_decode_uper; + per_type_encoder_f INTEGER_encode_uper; -/*********************************** + /*********************************** * Some handy conversion routines. * ***********************************/ -/* + /* * Returns 0 if it was possible to convert, -1 otherwise. * -1/EINVAL: Mandatory argument missing * -1/ERANGE: Value encoded is out of range for long representation * -1/ENOMEM: Memory allocation failed (in asn_long2INTEGER()). */ -int asn_INTEGER2long(const INTEGER_t *i, long *l); -int asn_INTEGER2ulong(const INTEGER_t *i, unsigned long *l); -int asn_long2INTEGER(INTEGER_t *i, long l); -int asn_ulong2INTEGER(INTEGER_t *i, unsigned long l); + int asn_INTEGER2long(const INTEGER_t *i, long *l); + int asn_INTEGER2ulong(const INTEGER_t *i, unsigned long *l); + int asn_long2INTEGER(INTEGER_t *i, long l); + int asn_ulong2INTEGER(INTEGER_t *i, unsigned long l); -/* + /* * Convert the integer value into the corresponding enumeration map entry. */ -const asn_INTEGER_enum_map_t *INTEGER_map_value2enum(asn_INTEGER_specifics_t *specs, long value); + const asn_INTEGER_enum_map_t *INTEGER_map_value2enum(asn_INTEGER_specifics_t *specs, long value); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/IonosphericModel.h b/src/core/libs/supl/asn-rrlp/IonosphericModel.h index ad1d98841..1174aeef8 100644 --- a/src/core/libs/supl/asn-rrlp/IonosphericModel.h +++ b/src/core/libs/supl/asn-rrlp/IonosphericModel.h @@ -15,27 +15,28 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* IonosphericModel */ -typedef struct IonosphericModel -{ - long alfa0; - long alfa1; - long alfa2; - long alfa3; - long beta0; - long beta1; - long beta2; - long beta3; + /* IonosphericModel */ + typedef struct IonosphericModel + { + long alfa0; + long alfa1; + long alfa2; + long alfa3; + long beta0; + long beta1; + long beta2; + long beta3; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} IonosphericModel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } IonosphericModel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_IonosphericModel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_IonosphericModel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/LAC.h b/src/core/libs/supl/asn-rrlp/LAC.h index 0e0c3a235..69ccdb662 100644 --- a/src/core/libs/supl/asn-rrlp/LAC.h +++ b/src/core/libs/supl/asn-rrlp/LAC.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* LAC */ -typedef long LAC_t; + /* LAC */ + typedef long LAC_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_LAC; -asn_struct_free_f LAC_free; -asn_struct_print_f LAC_print; -asn_constr_check_f LAC_constraint; -ber_type_decoder_f LAC_decode_ber; -der_type_encoder_f LAC_encode_der; -xer_type_decoder_f LAC_decode_xer; -xer_type_encoder_f LAC_encode_xer; -per_type_decoder_f LAC_decode_uper; -per_type_encoder_f LAC_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_LAC; + asn_struct_free_f LAC_free; + asn_struct_print_f LAC_print; + asn_constr_check_f LAC_constraint; + ber_type_decoder_f LAC_decode_ber; + der_type_encoder_f LAC_encode_der; + xer_type_decoder_f LAC_decode_xer; + xer_type_encoder_f LAC_encode_xer; + per_type_decoder_f LAC_decode_uper; + per_type_encoder_f LAC_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/LocErrorReason.h b/src/core/libs/supl/asn-rrlp/LocErrorReason.h index a05c9e1b9..e8d074804 100644 --- a/src/core/libs/supl/asn-rrlp/LocErrorReason.h +++ b/src/core/libs/supl/asn-rrlp/LocErrorReason.h @@ -14,44 +14,46 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum LocErrorReason { - LocErrorReason_unDefined = 0, - LocErrorReason_notEnoughBTSs = 1, - LocErrorReason_notEnoughSats = 2, - LocErrorReason_eotdLocCalAssDataMissing = 3, - LocErrorReason_eotdAssDataMissing = 4, - LocErrorReason_gpsLocCalAssDataMissing = 5, - LocErrorReason_gpsAssDataMissing = 6, - LocErrorReason_methodNotSupported = 7, - LocErrorReason_notProcessed = 8, - LocErrorReason_refBTSForGPSNotServingBTS = 9, - LocErrorReason_refBTSForEOTDNotServingBTS = 10, - /* + /* Dependencies */ + typedef enum LocErrorReason + { + LocErrorReason_unDefined = 0, + LocErrorReason_notEnoughBTSs = 1, + LocErrorReason_notEnoughSats = 2, + LocErrorReason_eotdLocCalAssDataMissing = 3, + LocErrorReason_eotdAssDataMissing = 4, + LocErrorReason_gpsLocCalAssDataMissing = 5, + LocErrorReason_gpsAssDataMissing = 6, + LocErrorReason_methodNotSupported = 7, + LocErrorReason_notProcessed = 8, + LocErrorReason_refBTSForGPSNotServingBTS = 9, + LocErrorReason_refBTSForEOTDNotServingBTS = 10, + /* * Enumeration is extensible */ - LocErrorReason_notEnoughGANSSSats = 11, - LocErrorReason_ganssAssDataMissing = 12, - LocErrorReason_refBTSForGANSSNotServingBTS = 13 -} e_LocErrorReason; + LocErrorReason_notEnoughGANSSSats = 11, + LocErrorReason_ganssAssDataMissing = 12, + LocErrorReason_refBTSForGANSSNotServingBTS = 13 + } e_LocErrorReason; -/* LocErrorReason */ -typedef ENUMERATED_t LocErrorReason_t; + /* LocErrorReason */ + typedef ENUMERATED_t LocErrorReason_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_LocErrorReason; -asn_struct_free_f LocErrorReason_free; -asn_struct_print_f LocErrorReason_print; -asn_constr_check_f LocErrorReason_constraint; -ber_type_decoder_f LocErrorReason_decode_ber; -der_type_encoder_f LocErrorReason_encode_der; -xer_type_decoder_f LocErrorReason_decode_xer; -xer_type_encoder_f LocErrorReason_encode_xer; -per_type_decoder_f LocErrorReason_decode_uper; -per_type_encoder_f LocErrorReason_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_LocErrorReason; + asn_struct_free_f LocErrorReason_free; + asn_struct_print_f LocErrorReason_print; + asn_constr_check_f LocErrorReason_constraint; + ber_type_decoder_f LocErrorReason_decode_ber; + der_type_encoder_f LocErrorReason_encode_der; + xer_type_decoder_f LocErrorReason_decode_xer; + xer_type_encoder_f LocErrorReason_encode_xer; + per_type_decoder_f LocErrorReason_decode_uper; + per_type_encoder_f LocErrorReason_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/LocationError.h b/src/core/libs/supl/asn-rrlp/LocationError.h index ade392330..1ab241eba 100644 --- a/src/core/libs/supl/asn-rrlp/LocationError.h +++ b/src/core/libs/supl/asn-rrlp/LocationError.h @@ -15,28 +15,29 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct AdditionalAssistanceData; + /* Forward declarations */ + struct AdditionalAssistanceData; -/* LocationError */ -typedef struct LocationError -{ - LocErrorReason_t locErrorReason; - struct AdditionalAssistanceData *additionalAssistanceData /* OPTIONAL */; - /* + /* LocationError */ + typedef struct LocationError + { + LocErrorReason_t locErrorReason; + struct AdditionalAssistanceData *additionalAssistanceData /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} LocationError_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } LocationError_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_LocationError; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_LocationError; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/LocationInfo.h b/src/core/libs/supl/asn-rrlp/LocationInfo.h index 4a27aecfe..d31af60d5 100644 --- a/src/core/libs/supl/asn-rrlp/LocationInfo.h +++ b/src/core/libs/supl/asn-rrlp/LocationInfo.h @@ -17,23 +17,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* LocationInfo */ -typedef struct LocationInfo -{ - long refFrame; - long *gpsTOW /* OPTIONAL */; - FixType_t fixType; - Ext_GeographicalInformation_t posEstimate; + /* LocationInfo */ + typedef struct LocationInfo + { + long refFrame; + long *gpsTOW /* OPTIONAL */; + FixType_t fixType; + Ext_GeographicalInformation_t posEstimate; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} LocationInfo_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } LocationInfo_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_LocationInfo; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_LocationInfo; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MeasureResponseTime.h b/src/core/libs/supl/asn-rrlp/MeasureResponseTime.h index b6c526a26..2607e7ff4 100644 --- a/src/core/libs/supl/asn-rrlp/MeasureResponseTime.h +++ b/src/core/libs/supl/asn-rrlp/MeasureResponseTime.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* MeasureResponseTime */ -typedef long MeasureResponseTime_t; + /* MeasureResponseTime */ + typedef long MeasureResponseTime_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MeasureResponseTime; -asn_struct_free_f MeasureResponseTime_free; -asn_struct_print_f MeasureResponseTime_print; -asn_constr_check_f MeasureResponseTime_constraint; -ber_type_decoder_f MeasureResponseTime_decode_ber; -der_type_encoder_f MeasureResponseTime_encode_der; -xer_type_decoder_f MeasureResponseTime_decode_xer; -xer_type_encoder_f MeasureResponseTime_encode_xer; -per_type_decoder_f MeasureResponseTime_decode_uper; -per_type_encoder_f MeasureResponseTime_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MeasureResponseTime; + asn_struct_free_f MeasureResponseTime_free; + asn_struct_print_f MeasureResponseTime_print; + asn_constr_check_f MeasureResponseTime_constraint; + ber_type_decoder_f MeasureResponseTime_decode_ber; + der_type_encoder_f MeasureResponseTime_encode_der; + xer_type_decoder_f MeasureResponseTime_decode_xer; + xer_type_encoder_f MeasureResponseTime_encode_xer; + per_type_decoder_f MeasureResponseTime_decode_uper; + per_type_encoder_f MeasureResponseTime_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MethodType.h b/src/core/libs/supl/asn-rrlp/MethodType.h index e1b33f646..5529e2527 100644 --- a/src/core/libs/supl/asn-rrlp/MethodType.h +++ b/src/core/libs/supl/asn-rrlp/MethodType.h @@ -16,36 +16,38 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum MethodType_PR { - MethodType_PR_NOTHING, /* No components present */ - MethodType_PR_msAssisted, - MethodType_PR_msBased, - MethodType_PR_msBasedPref, - MethodType_PR_msAssistedPref -} MethodType_PR; - -/* MethodType */ -typedef struct MethodType -{ - MethodType_PR present; - union MethodType_u + /* Dependencies */ + typedef enum MethodType_PR { - AccuracyOpt_t msAssisted; - Accuracy_t msBased; - Accuracy_t msBasedPref; - Accuracy_t msAssistedPref; - } choice; + MethodType_PR_NOTHING, /* No components present */ + MethodType_PR_msAssisted, + MethodType_PR_msBased, + MethodType_PR_msBasedPref, + MethodType_PR_msAssistedPref + } MethodType_PR; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} MethodType_t; + /* MethodType */ + typedef struct MethodType + { + MethodType_PR present; + union MethodType_u + { + AccuracyOpt_t msAssisted; + Accuracy_t msBased; + Accuracy_t msBasedPref; + Accuracy_t msAssistedPref; + } choice; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MethodType; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } MethodType_t; + + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MethodType; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ModuloTimeSlot.h b/src/core/libs/supl/asn-rrlp/ModuloTimeSlot.h index 3a259d764..186607231 100644 --- a/src/core/libs/supl/asn-rrlp/ModuloTimeSlot.h +++ b/src/core/libs/supl/asn-rrlp/ModuloTimeSlot.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* ModuloTimeSlot */ -typedef long ModuloTimeSlot_t; + /* ModuloTimeSlot */ + typedef long ModuloTimeSlot_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ModuloTimeSlot; -asn_struct_free_f ModuloTimeSlot_free; -asn_struct_print_f ModuloTimeSlot_print; -asn_constr_check_f ModuloTimeSlot_constraint; -ber_type_decoder_f ModuloTimeSlot_decode_ber; -der_type_encoder_f ModuloTimeSlot_encode_der; -xer_type_decoder_f ModuloTimeSlot_decode_xer; -xer_type_encoder_f ModuloTimeSlot_encode_xer; -per_type_decoder_f ModuloTimeSlot_decode_uper; -per_type_encoder_f ModuloTimeSlot_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ModuloTimeSlot; + asn_struct_free_f ModuloTimeSlot_free; + asn_struct_print_f ModuloTimeSlot_print; + asn_constr_check_f ModuloTimeSlot_constraint; + ber_type_decoder_f ModuloTimeSlot_decode_ber; + der_type_encoder_f ModuloTimeSlot_encode_der; + xer_type_decoder_f ModuloTimeSlot_decode_xer; + xer_type_encoder_f ModuloTimeSlot_encode_xer; + per_type_decoder_f ModuloTimeSlot_decode_uper; + per_type_encoder_f ModuloTimeSlot_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MoreAssDataToBeSent.h b/src/core/libs/supl/asn-rrlp/MoreAssDataToBeSent.h index b9613746b..d1ad95faf 100644 --- a/src/core/libs/supl/asn-rrlp/MoreAssDataToBeSent.h +++ b/src/core/libs/supl/asn-rrlp/MoreAssDataToBeSent.h @@ -14,29 +14,31 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum MoreAssDataToBeSent { - MoreAssDataToBeSent_noMoreMessages = 0, - MoreAssDataToBeSent_moreMessagesOnTheWay = 1 -} e_MoreAssDataToBeSent; + /* Dependencies */ + typedef enum MoreAssDataToBeSent + { + MoreAssDataToBeSent_noMoreMessages = 0, + MoreAssDataToBeSent_moreMessagesOnTheWay = 1 + } e_MoreAssDataToBeSent; -/* MoreAssDataToBeSent */ -typedef ENUMERATED_t MoreAssDataToBeSent_t; + /* MoreAssDataToBeSent */ + typedef ENUMERATED_t MoreAssDataToBeSent_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MoreAssDataToBeSent; -asn_struct_free_f MoreAssDataToBeSent_free; -asn_struct_print_f MoreAssDataToBeSent_print; -asn_constr_check_f MoreAssDataToBeSent_constraint; -ber_type_decoder_f MoreAssDataToBeSent_decode_ber; -der_type_encoder_f MoreAssDataToBeSent_encode_der; -xer_type_decoder_f MoreAssDataToBeSent_decode_xer; -xer_type_encoder_f MoreAssDataToBeSent_encode_xer; -per_type_decoder_f MoreAssDataToBeSent_decode_uper; -per_type_encoder_f MoreAssDataToBeSent_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MoreAssDataToBeSent; + asn_struct_free_f MoreAssDataToBeSent_free; + asn_struct_print_f MoreAssDataToBeSent_print; + asn_constr_check_f MoreAssDataToBeSent_constraint; + ber_type_decoder_f MoreAssDataToBeSent_decode_ber; + der_type_encoder_f MoreAssDataToBeSent_encode_der; + xer_type_decoder_f MoreAssDataToBeSent_decode_xer; + xer_type_encoder_f MoreAssDataToBeSent_encode_xer; + per_type_decoder_f MoreAssDataToBeSent_decode_uper; + per_type_encoder_f MoreAssDataToBeSent_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MpathIndic.h b/src/core/libs/supl/asn-rrlp/MpathIndic.h index 85800e74c..89907b6de 100644 --- a/src/core/libs/supl/asn-rrlp/MpathIndic.h +++ b/src/core/libs/supl/asn-rrlp/MpathIndic.h @@ -14,31 +14,33 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum MpathIndic { - MpathIndic_notMeasured = 0, - MpathIndic_low = 1, - MpathIndic_medium = 2, - MpathIndic_high = 3 -} e_MpathIndic; + /* Dependencies */ + typedef enum MpathIndic + { + MpathIndic_notMeasured = 0, + MpathIndic_low = 1, + MpathIndic_medium = 2, + MpathIndic_high = 3 + } e_MpathIndic; -/* MpathIndic */ -typedef ENUMERATED_t MpathIndic_t; + /* MpathIndic */ + typedef ENUMERATED_t MpathIndic_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MpathIndic; -asn_struct_free_f MpathIndic_free; -asn_struct_print_f MpathIndic_print; -asn_constr_check_f MpathIndic_constraint; -ber_type_decoder_f MpathIndic_decode_ber; -der_type_encoder_f MpathIndic_encode_der; -xer_type_decoder_f MpathIndic_decode_xer; -xer_type_encoder_f MpathIndic_encode_xer; -per_type_decoder_f MpathIndic_decode_uper; -per_type_encoder_f MpathIndic_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MpathIndic; + asn_struct_free_f MpathIndic_free; + asn_struct_print_f MpathIndic_print; + asn_constr_check_f MpathIndic_constraint; + ber_type_decoder_f MpathIndic_decode_ber; + der_type_encoder_f MpathIndic_encode_der; + xer_type_decoder_f MpathIndic_decode_xer; + xer_type_encoder_f MpathIndic_encode_xer; + per_type_decoder_f MpathIndic_decode_uper; + per_type_encoder_f MpathIndic_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MsrAssistBTS-R98-ExpOTD.h b/src/core/libs/supl/asn-rrlp/MsrAssistBTS-R98-ExpOTD.h index 82d8510e2..0efafd0bb 100644 --- a/src/core/libs/supl/asn-rrlp/MsrAssistBTS-R98-ExpOTD.h +++ b/src/core/libs/supl/asn-rrlp/MsrAssistBTS-R98-ExpOTD.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* MsrAssistBTS-R98-ExpOTD */ -typedef struct MsrAssistBTS_R98_ExpOTD -{ - ExpectedOTD_t expectedOTD; - ExpOTDUncertainty_t expOTDUncertainty; + /* MsrAssistBTS-R98-ExpOTD */ + typedef struct MsrAssistBTS_R98_ExpOTD + { + ExpectedOTD_t expectedOTD; + ExpOTDUncertainty_t expOTDUncertainty; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} MsrAssistBTS_R98_ExpOTD_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } MsrAssistBTS_R98_ExpOTD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MsrAssistBTS_R98_ExpOTD; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MsrAssistBTS_R98_ExpOTD; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MsrAssistBTS.h b/src/core/libs/supl/asn-rrlp/MsrAssistBTS.h index f02ea3e03..7d2eac4d4 100644 --- a/src/core/libs/supl/asn-rrlp/MsrAssistBTS.h +++ b/src/core/libs/supl/asn-rrlp/MsrAssistBTS.h @@ -19,28 +19,29 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct CalcAssistanceBTS; + /* Forward declarations */ + struct CalcAssistanceBTS; -/* MsrAssistBTS */ -typedef struct MsrAssistBTS -{ - BCCHCarrier_t bcchCarrier; - BSIC_t bsic; - MultiFrameOffset_t multiFrameOffset; - TimeSlotScheme_t timeSlotScheme; - RoughRTD_t roughRTD; - struct CalcAssistanceBTS *calcAssistanceBTS /* OPTIONAL */; + /* MsrAssistBTS */ + typedef struct MsrAssistBTS + { + BCCHCarrier_t bcchCarrier; + BSIC_t bsic; + MultiFrameOffset_t multiFrameOffset; + TimeSlotScheme_t timeSlotScheme; + RoughRTD_t roughRTD; + struct CalcAssistanceBTS *calcAssistanceBTS /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} MsrAssistBTS_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } MsrAssistBTS_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MsrAssistBTS; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MsrAssistBTS; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MsrAssistData-R98-ExpOTD.h b/src/core/libs/supl/asn-rrlp/MsrAssistData-R98-ExpOTD.h index 1abc1ba52..a94887363 100644 --- a/src/core/libs/supl/asn-rrlp/MsrAssistData-R98-ExpOTD.h +++ b/src/core/libs/supl/asn-rrlp/MsrAssistData-R98-ExpOTD.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* MsrAssistData-R98-ExpOTD */ -typedef struct MsrAssistData_R98_ExpOTD -{ - SeqOfMsrAssistBTS_R98_ExpOTD_t msrAssistList_R98_ExpOTD; + /* MsrAssistData-R98-ExpOTD */ + typedef struct MsrAssistData_R98_ExpOTD + { + SeqOfMsrAssistBTS_R98_ExpOTD_t msrAssistList_R98_ExpOTD; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} MsrAssistData_R98_ExpOTD_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } MsrAssistData_R98_ExpOTD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MsrAssistData_R98_ExpOTD; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MsrAssistData_R98_ExpOTD; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MsrAssistData.h b/src/core/libs/supl/asn-rrlp/MsrAssistData.h index df1f24ea5..f0cf06491 100644 --- a/src/core/libs/supl/asn-rrlp/MsrAssistData.h +++ b/src/core/libs/supl/asn-rrlp/MsrAssistData.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* MsrAssistData */ -typedef struct MsrAssistData -{ - SeqOfMsrAssistBTS_t msrAssistList; + /* MsrAssistData */ + typedef struct MsrAssistData + { + SeqOfMsrAssistBTS_t msrAssistList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} MsrAssistData_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } MsrAssistData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MsrAssistData; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MsrAssistData; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MsrPosition-Req.h b/src/core/libs/supl/asn-rrlp/MsrPosition-Req.h index 78d751375..3f0be38f5 100644 --- a/src/core/libs/supl/asn-rrlp/MsrPosition-Req.h +++ b/src/core/libs/supl/asn-rrlp/MsrPosition-Req.h @@ -16,39 +16,40 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct ReferenceAssistData; -struct MsrAssistData; -struct SystemInfoAssistData; -struct GPS_AssistData; -struct Rel98_MsrPosition_Req_Extension; -struct Rel5_MsrPosition_Req_Extension; + /* Forward declarations */ + struct ReferenceAssistData; + struct MsrAssistData; + struct SystemInfoAssistData; + struct GPS_AssistData; + struct Rel98_MsrPosition_Req_Extension; + struct Rel5_MsrPosition_Req_Extension; -/* MsrPosition-Req */ -typedef struct MsrPosition_Req -{ - PositionInstruct_t positionInstruct; - struct ReferenceAssistData *referenceAssistData /* OPTIONAL */; - struct MsrAssistData *msrAssistData /* OPTIONAL */; - struct SystemInfoAssistData *systemInfoAssistData /* OPTIONAL */; - struct GPS_AssistData *gps_AssistData /* OPTIONAL */; - ExtensionContainer_t *extensionContainer /* OPTIONAL */; - /* + /* MsrPosition-Req */ + typedef struct MsrPosition_Req + { + PositionInstruct_t positionInstruct; + struct ReferenceAssistData *referenceAssistData /* OPTIONAL */; + struct MsrAssistData *msrAssistData /* OPTIONAL */; + struct SystemInfoAssistData *systemInfoAssistData /* OPTIONAL */; + struct GPS_AssistData *gps_AssistData /* OPTIONAL */; + ExtensionContainer_t *extensionContainer /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - struct Rel98_MsrPosition_Req_Extension *rel98_MsrPosition_Req_extension /* OPTIONAL */; - struct Rel5_MsrPosition_Req_Extension *rel5_MsrPosition_Req_extension /* OPTIONAL */; + struct Rel98_MsrPosition_Req_Extension *rel98_MsrPosition_Req_extension /* OPTIONAL */; + struct Rel5_MsrPosition_Req_Extension *rel5_MsrPosition_Req_extension /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} MsrPosition_Req_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } MsrPosition_Req_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MsrPosition_Req; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MsrPosition_Req; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MsrPosition-Rsp.h b/src/core/libs/supl/asn-rrlp/MsrPosition-Rsp.h index 357356af5..09dc9dcbc 100644 --- a/src/core/libs/supl/asn-rrlp/MsrPosition-Rsp.h +++ b/src/core/libs/supl/asn-rrlp/MsrPosition-Rsp.h @@ -15,42 +15,43 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct MultipleSets; -struct ReferenceIdentity; -struct OTD_MeasureInfo; -struct LocationInfo; -struct GPS_MeasureInfo; -struct LocationError; -struct Rel_98_MsrPosition_Rsp_Extension; -struct Rel_5_MsrPosition_Rsp_Extension; + /* Forward declarations */ + struct MultipleSets; + struct ReferenceIdentity; + struct OTD_MeasureInfo; + struct LocationInfo; + struct GPS_MeasureInfo; + struct LocationError; + struct Rel_98_MsrPosition_Rsp_Extension; + struct Rel_5_MsrPosition_Rsp_Extension; -/* MsrPosition-Rsp */ -typedef struct MsrPosition_Rsp -{ - struct MultipleSets *multipleSets /* OPTIONAL */; - struct ReferenceIdentity *referenceIdentity /* OPTIONAL */; - struct OTD_MeasureInfo *otd_MeasureInfo /* OPTIONAL */; - struct LocationInfo *locationInfo /* OPTIONAL */; - struct GPS_MeasureInfo *gps_MeasureInfo /* OPTIONAL */; - struct LocationError *locationError /* OPTIONAL */; - ExtensionContainer_t *extensionContainer /* OPTIONAL */; - /* + /* MsrPosition-Rsp */ + typedef struct MsrPosition_Rsp + { + struct MultipleSets *multipleSets /* OPTIONAL */; + struct ReferenceIdentity *referenceIdentity /* OPTIONAL */; + struct OTD_MeasureInfo *otd_MeasureInfo /* OPTIONAL */; + struct LocationInfo *locationInfo /* OPTIONAL */; + struct GPS_MeasureInfo *gps_MeasureInfo /* OPTIONAL */; + struct LocationError *locationError /* OPTIONAL */; + ExtensionContainer_t *extensionContainer /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - struct Rel_98_MsrPosition_Rsp_Extension *rel_98_MsrPosition_Rsp_Extension /* OPTIONAL */; - struct Rel_5_MsrPosition_Rsp_Extension *rel_5_MsrPosition_Rsp_Extension /* OPTIONAL */; + struct Rel_98_MsrPosition_Rsp_Extension *rel_98_MsrPosition_Rsp_Extension /* OPTIONAL */; + struct Rel_5_MsrPosition_Rsp_Extension *rel_5_MsrPosition_Rsp_Extension /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} MsrPosition_Rsp_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } MsrPosition_Rsp_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MsrPosition_Rsp; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MsrPosition_Rsp; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MultiFrameCarrier.h b/src/core/libs/supl/asn-rrlp/MultiFrameCarrier.h index afdd5051e..4a22a67fc 100644 --- a/src/core/libs/supl/asn-rrlp/MultiFrameCarrier.h +++ b/src/core/libs/supl/asn-rrlp/MultiFrameCarrier.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* MultiFrameCarrier */ -typedef struct MultiFrameCarrier -{ - BCCHCarrier_t bcchCarrier; - MultiFrameOffset_t multiFrameOffset; + /* MultiFrameCarrier */ + typedef struct MultiFrameCarrier + { + BCCHCarrier_t bcchCarrier; + MultiFrameOffset_t multiFrameOffset; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} MultiFrameCarrier_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } MultiFrameCarrier_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MultiFrameCarrier; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MultiFrameCarrier; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MultiFrameOffset.h b/src/core/libs/supl/asn-rrlp/MultiFrameOffset.h index b608d90a3..ee06666df 100644 --- a/src/core/libs/supl/asn-rrlp/MultiFrameOffset.h +++ b/src/core/libs/supl/asn-rrlp/MultiFrameOffset.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* MultiFrameOffset */ -typedef long MultiFrameOffset_t; + /* MultiFrameOffset */ + typedef long MultiFrameOffset_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MultiFrameOffset; -asn_struct_free_f MultiFrameOffset_free; -asn_struct_print_f MultiFrameOffset_print; -asn_constr_check_f MultiFrameOffset_constraint; -ber_type_decoder_f MultiFrameOffset_decode_ber; -der_type_encoder_f MultiFrameOffset_encode_der; -xer_type_decoder_f MultiFrameOffset_decode_xer; -xer_type_encoder_f MultiFrameOffset_encode_xer; -per_type_decoder_f MultiFrameOffset_decode_uper; -per_type_encoder_f MultiFrameOffset_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MultiFrameOffset; + asn_struct_free_f MultiFrameOffset_free; + asn_struct_print_f MultiFrameOffset_print; + asn_constr_check_f MultiFrameOffset_constraint; + ber_type_decoder_f MultiFrameOffset_decode_ber; + der_type_encoder_f MultiFrameOffset_encode_der; + xer_type_decoder_f MultiFrameOffset_decode_xer; + xer_type_encoder_f MultiFrameOffset_encode_xer; + per_type_decoder_f MultiFrameOffset_decode_uper; + per_type_encoder_f MultiFrameOffset_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/MultipleSets.h b/src/core/libs/supl/asn-rrlp/MultipleSets.h index 998d503c2..9f8f4a87d 100644 --- a/src/core/libs/supl/asn-rrlp/MultipleSets.h +++ b/src/core/libs/supl/asn-rrlp/MultipleSets.h @@ -16,22 +16,23 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* MultipleSets */ -typedef struct MultipleSets -{ - long nbrOfSets; - long nbrOfReferenceBTSs; - ReferenceRelation_t *referenceRelation /* OPTIONAL */; + /* MultipleSets */ + typedef struct MultipleSets + { + long nbrOfSets; + long nbrOfReferenceBTSs; + ReferenceRelation_t *referenceRelation /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} MultipleSets_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } MultipleSets_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MultipleSets; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MultipleSets; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/NULL.h b/src/core/libs/supl/asn-rrlp/NULL.h index ec5cb1bdb..5720faf3b 100644 --- a/src/core/libs/supl/asn-rrlp/NULL.h +++ b/src/core/libs/supl/asn-rrlp/NULL.h @@ -8,23 +8,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* + /* * The value of the NULL type is meaningless: see BOOLEAN if you want to * carry true/false semantics. */ -typedef int NULL_t; + typedef int NULL_t; -extern asn_TYPE_descriptor_t asn_DEF_NULL; + extern asn_TYPE_descriptor_t asn_DEF_NULL; -asn_struct_print_f NULL_print; -der_type_encoder_f NULL_encode_der; -xer_type_decoder_f NULL_decode_xer; -xer_type_encoder_f NULL_encode_xer; -per_type_decoder_f NULL_decode_uper; -per_type_encoder_f NULL_encode_uper; + asn_struct_print_f NULL_print; + der_type_encoder_f NULL_encode_der; + xer_type_decoder_f NULL_decode_xer; + xer_type_encoder_f NULL_encode_xer; + per_type_decoder_f NULL_decode_uper; + per_type_encoder_f NULL_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/NativeEnumerated.h b/src/core/libs/supl/asn-rrlp/NativeEnumerated.h index 9c37887c1..3b3d4b074 100644 --- a/src/core/libs/supl/asn-rrlp/NativeEnumerated.h +++ b/src/core/libs/supl/asn-rrlp/NativeEnumerated.h @@ -16,14 +16,15 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated; + extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated; -xer_type_encoder_f NativeEnumerated_encode_xer; -per_type_decoder_f NativeEnumerated_decode_uper; -per_type_encoder_f NativeEnumerated_encode_uper; + xer_type_encoder_f NativeEnumerated_encode_xer; + per_type_decoder_f NativeEnumerated_decode_uper; + per_type_encoder_f NativeEnumerated_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/NativeInteger.h b/src/core/libs/supl/asn-rrlp/NativeInteger.h index 5f770861b..14311ae57 100644 --- a/src/core/libs/supl/asn-rrlp/NativeInteger.h +++ b/src/core/libs/supl/asn-rrlp/NativeInteger.h @@ -16,19 +16,20 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -extern asn_TYPE_descriptor_t asn_DEF_NativeInteger; + extern asn_TYPE_descriptor_t asn_DEF_NativeInteger; -asn_struct_free_f NativeInteger_free; -asn_struct_print_f NativeInteger_print; -ber_type_decoder_f NativeInteger_decode_ber; -der_type_encoder_f NativeInteger_encode_der; -xer_type_decoder_f NativeInteger_decode_xer; -xer_type_encoder_f NativeInteger_encode_xer; -per_type_decoder_f NativeInteger_decode_uper; -per_type_encoder_f NativeInteger_encode_uper; + asn_struct_free_f NativeInteger_free; + asn_struct_print_f NativeInteger_print; + ber_type_decoder_f NativeInteger_decode_ber; + der_type_encoder_f NativeInteger_encode_der; + xer_type_decoder_f NativeInteger_decode_xer; + xer_type_encoder_f NativeInteger_encode_xer; + per_type_decoder_f NativeInteger_decode_uper; + per_type_encoder_f NativeInteger_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/NavModel-KeplerianSet.h b/src/core/libs/supl/asn-rrlp/NavModel-KeplerianSet.h index b8b90af52..7d9f906ed 100644 --- a/src/core/libs/supl/asn-rrlp/NavModel-KeplerianSet.h +++ b/src/core/libs/supl/asn-rrlp/NavModel-KeplerianSet.h @@ -15,35 +15,36 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* NavModel-KeplerianSet */ -typedef struct NavModel_KeplerianSet -{ - long keplerToeLSB; - long keplerW; - long keplerDeltaN; - long keplerM0; - long keplerOmegaDot; - long keplerELSB; - long keplerIDot; - long keplerAPowerHalfLSB; - long keplerI0; - long keplerOmega0; - long keplerCrs; - long keplerCis; - long keplerCus; - long keplerCrc; - long keplerCic; - long keplerCuc; + /* NavModel-KeplerianSet */ + typedef struct NavModel_KeplerianSet + { + long keplerToeLSB; + long keplerW; + long keplerDeltaN; + long keplerM0; + long keplerOmegaDot; + long keplerELSB; + long keplerIDot; + long keplerAPowerHalfLSB; + long keplerI0; + long keplerOmega0; + long keplerCrs; + long keplerCis; + long keplerCus; + long keplerCrc; + long keplerCic; + long keplerCuc; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} NavModel_KeplerianSet_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } NavModel_KeplerianSet_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_NavModel_KeplerianSet; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_NavModel_KeplerianSet; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/NavModelElement.h b/src/core/libs/supl/asn-rrlp/NavModelElement.h index 39c5cb341..d8d642c05 100644 --- a/src/core/libs/supl/asn-rrlp/NavModelElement.h +++ b/src/core/libs/supl/asn-rrlp/NavModelElement.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* NavModelElement */ -typedef struct NavModelElement -{ - SatelliteID_t satelliteID; - SatStatus_t satStatus; + /* NavModelElement */ + typedef struct NavModelElement + { + SatelliteID_t satelliteID; + SatStatus_t satStatus; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} NavModelElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } NavModelElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_NavModelElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_NavModelElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/NavigationModel.h b/src/core/libs/supl/asn-rrlp/NavigationModel.h index 93549c7fd..565f1f636 100644 --- a/src/core/libs/supl/asn-rrlp/NavigationModel.h +++ b/src/core/libs/supl/asn-rrlp/NavigationModel.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* NavigationModel */ -typedef struct NavigationModel -{ - SeqOfNavModelElement_t navModelList; + /* NavigationModel */ + typedef struct NavigationModel + { + SeqOfNavModelElement_t navModelList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} NavigationModel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } NavigationModel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_NavigationModel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_NavigationModel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/NeighborIdentity.h b/src/core/libs/supl/asn-rrlp/NeighborIdentity.h index 8e91bd870..b87849d76 100644 --- a/src/core/libs/supl/asn-rrlp/NeighborIdentity.h +++ b/src/core/libs/supl/asn-rrlp/NeighborIdentity.h @@ -20,40 +20,42 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum NeighborIdentity_PR { - NeighborIdentity_PR_NOTHING, /* No components present */ - NeighborIdentity_PR_bsicAndCarrier, - NeighborIdentity_PR_ci, - NeighborIdentity_PR_multiFrameCarrier, - NeighborIdentity_PR_requestIndex, - NeighborIdentity_PR_systemInfoIndex, - NeighborIdentity_PR_ciAndLAC -} NeighborIdentity_PR; - -/* NeighborIdentity */ -typedef struct NeighborIdentity -{ - NeighborIdentity_PR present; - union NeighborIdentity_u + /* Dependencies */ + typedef enum NeighborIdentity_PR { - BSICAndCarrier_t bsicAndCarrier; - CellID_t ci; - MultiFrameCarrier_t multiFrameCarrier; - RequestIndex_t requestIndex; - SystemInfoIndex_t systemInfoIndex; - CellIDAndLAC_t ciAndLAC; - } choice; + NeighborIdentity_PR_NOTHING, /* No components present */ + NeighborIdentity_PR_bsicAndCarrier, + NeighborIdentity_PR_ci, + NeighborIdentity_PR_multiFrameCarrier, + NeighborIdentity_PR_requestIndex, + NeighborIdentity_PR_systemInfoIndex, + NeighborIdentity_PR_ciAndLAC + } NeighborIdentity_PR; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} NeighborIdentity_t; + /* NeighborIdentity */ + typedef struct NeighborIdentity + { + NeighborIdentity_PR present; + union NeighborIdentity_u + { + BSICAndCarrier_t bsicAndCarrier; + CellID_t ci; + MultiFrameCarrier_t multiFrameCarrier; + RequestIndex_t requestIndex; + SystemInfoIndex_t systemInfoIndex; + CellIDAndLAC_t ciAndLAC; + } choice; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_NeighborIdentity; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } NeighborIdentity_t; + + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_NeighborIdentity; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/NumOfMeasurements.h b/src/core/libs/supl/asn-rrlp/NumOfMeasurements.h index d1602b585..0b897c0f2 100644 --- a/src/core/libs/supl/asn-rrlp/NumOfMeasurements.h +++ b/src/core/libs/supl/asn-rrlp/NumOfMeasurements.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* NumOfMeasurements */ -typedef long NumOfMeasurements_t; + /* NumOfMeasurements */ + typedef long NumOfMeasurements_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_NumOfMeasurements; -asn_struct_free_f NumOfMeasurements_free; -asn_struct_print_f NumOfMeasurements_print; -asn_constr_check_f NumOfMeasurements_constraint; -ber_type_decoder_f NumOfMeasurements_decode_ber; -der_type_encoder_f NumOfMeasurements_encode_der; -xer_type_decoder_f NumOfMeasurements_decode_xer; -xer_type_encoder_f NumOfMeasurements_encode_xer; -per_type_decoder_f NumOfMeasurements_decode_uper; -per_type_encoder_f NumOfMeasurements_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_NumOfMeasurements; + asn_struct_free_f NumOfMeasurements_free; + asn_struct_print_f NumOfMeasurements_print; + asn_constr_check_f NumOfMeasurements_constraint; + ber_type_decoder_f NumOfMeasurements_decode_ber; + der_type_encoder_f NumOfMeasurements_encode_der; + xer_type_decoder_f NumOfMeasurements_decode_xer; + xer_type_encoder_f NumOfMeasurements_encode_xer; + per_type_decoder_f NumOfMeasurements_decode_uper; + per_type_encoder_f NumOfMeasurements_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/OCTET_STRING.h b/src/core/libs/supl/asn-rrlp/OCTET_STRING.h index 2f933ab64..124fde559 100644 --- a/src/core/libs/supl/asn-rrlp/OCTET_STRING.h +++ b/src/core/libs/supl/asn-rrlp/OCTET_STRING.h @@ -8,37 +8,38 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef struct OCTET_STRING -{ - uint8_t *buf; /* Buffer with consecutive OCTET_STRING bits */ - int size; /* Size of the buffer */ + typedef struct OCTET_STRING + { + uint8_t *buf; /* Buffer with consecutive OCTET_STRING bits */ + int size; /* Size of the buffer */ - asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ -} OCTET_STRING_t; + asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ + } OCTET_STRING_t; -extern asn_TYPE_descriptor_t asn_DEF_OCTET_STRING; + extern asn_TYPE_descriptor_t asn_DEF_OCTET_STRING; -asn_struct_free_f OCTET_STRING_free; -asn_struct_print_f OCTET_STRING_print; -asn_struct_print_f OCTET_STRING_print_utf8; -ber_type_decoder_f OCTET_STRING_decode_ber; -der_type_encoder_f OCTET_STRING_encode_der; -xer_type_decoder_f OCTET_STRING_decode_xer_hex; /* Hexadecimal */ -xer_type_decoder_f OCTET_STRING_decode_xer_binary; /* 01010111010 */ -xer_type_decoder_f OCTET_STRING_decode_xer_utf8; /* ASCII/UTF-8 */ -xer_type_encoder_f OCTET_STRING_encode_xer; -xer_type_encoder_f OCTET_STRING_encode_xer_utf8; -per_type_decoder_f OCTET_STRING_decode_uper; -per_type_encoder_f OCTET_STRING_encode_uper; + asn_struct_free_f OCTET_STRING_free; + asn_struct_print_f OCTET_STRING_print; + asn_struct_print_f OCTET_STRING_print_utf8; + ber_type_decoder_f OCTET_STRING_decode_ber; + der_type_encoder_f OCTET_STRING_encode_der; + xer_type_decoder_f OCTET_STRING_decode_xer_hex; /* Hexadecimal */ + xer_type_decoder_f OCTET_STRING_decode_xer_binary; /* 01010111010 */ + xer_type_decoder_f OCTET_STRING_decode_xer_utf8; /* ASCII/UTF-8 */ + xer_type_encoder_f OCTET_STRING_encode_xer; + xer_type_encoder_f OCTET_STRING_encode_xer_utf8; + per_type_decoder_f OCTET_STRING_decode_uper; + per_type_encoder_f OCTET_STRING_encode_uper; -/****************************** + /****************************** * Handy conversion routines. * ******************************/ -/* + /* * This function clears the previous value of the OCTET STRING (if any) * and then allocates a new memory with the specified content (str/size). * If size = -1, the size of the original string will be determined @@ -47,40 +48,40 @@ per_type_encoder_f OCTET_STRING_encode_uper; * current contents of the OCTET STRING. * Returns 0 if it was possible to perform operation, -1 otherwise. */ -int OCTET_STRING_fromBuf(OCTET_STRING_t *s, const char *str, int size); + int OCTET_STRING_fromBuf(OCTET_STRING_t *s, const char *str, int size); /* Handy conversion from the C string into the OCTET STRING. */ #define OCTET_STRING_fromString(s, str) OCTET_STRING_fromBuf(s, str, -1) -/* + /* * Allocate and fill the new OCTET STRING and return a pointer to the newly * allocated object. NULL is permitted in str: the function will just allocate * empty OCTET STRING. */ -OCTET_STRING_t *OCTET_STRING_new_fromBuf(asn_TYPE_descriptor_t *td, - const char *str, int size); + OCTET_STRING_t *OCTET_STRING_new_fromBuf(asn_TYPE_descriptor_t *td, + const char *str, int size); -/**************************** + /**************************** * Internally useful stuff. * ****************************/ -typedef struct asn_OCTET_STRING_specifics_s -{ - /* + typedef struct asn_OCTET_STRING_specifics_s + { + /* * Target structure description. */ - int struct_size; /* Size of the structure */ - int ctx_offset; /* Offset of the asn_struct_ctx_t member */ + int struct_size; /* Size of the structure */ + int ctx_offset; /* Offset of the asn_struct_ctx_t member */ - enum asn_OS_Subvariant - { - ASN_OSUBV_ANY, /* The open type (ANY) */ - ASN_OSUBV_BIT, /* BIT STRING */ - ASN_OSUBV_STR, /* String types, not {BMP,Universal}String */ - ASN_OSUBV_U16, /* 16-bit character (BMPString) */ - ASN_OSUBV_U32 /* 32-bit character (UniversalString) */ - } subvariant; -} asn_OCTET_STRING_specifics_t; + enum asn_OS_Subvariant + { + ASN_OSUBV_ANY, /* The open type (ANY) */ + ASN_OSUBV_BIT, /* BIT STRING */ + ASN_OSUBV_STR, /* String types, not {BMP,Universal}String */ + ASN_OSUBV_U16, /* 16-bit character (BMPString) */ + ASN_OSUBV_U32 /* 32-bit character (UniversalString) */ + } subvariant; + } asn_OCTET_STRING_specifics_t; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/OTD-FirstSetMsrs.h b/src/core/libs/supl/asn-rrlp/OTD-FirstSetMsrs.h index 43a6aa49f..04d3624e7 100644 --- a/src/core/libs/supl/asn-rrlp/OTD-FirstSetMsrs.h +++ b/src/core/libs/supl/asn-rrlp/OTD-FirstSetMsrs.h @@ -14,23 +14,24 @@ #include "OTD-MeasurementWithID.h" #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* OTD-FirstSetMsrs */ -typedef OTD_MeasurementWithID_t OTD_FirstSetMsrs_t; + /* OTD-FirstSetMsrs */ + typedef OTD_MeasurementWithID_t OTD_FirstSetMsrs_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_OTD_FirstSetMsrs; -asn_struct_free_f OTD_FirstSetMsrs_free; -asn_struct_print_f OTD_FirstSetMsrs_print; -asn_constr_check_f OTD_FirstSetMsrs_constraint; -ber_type_decoder_f OTD_FirstSetMsrs_decode_ber; -der_type_encoder_f OTD_FirstSetMsrs_encode_der; -xer_type_decoder_f OTD_FirstSetMsrs_decode_xer; -xer_type_encoder_f OTD_FirstSetMsrs_encode_xer; -per_type_decoder_f OTD_FirstSetMsrs_decode_uper; -per_type_encoder_f OTD_FirstSetMsrs_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_OTD_FirstSetMsrs; + asn_struct_free_f OTD_FirstSetMsrs_free; + asn_struct_print_f OTD_FirstSetMsrs_print; + asn_constr_check_f OTD_FirstSetMsrs_constraint; + ber_type_decoder_f OTD_FirstSetMsrs_decode_ber; + der_type_encoder_f OTD_FirstSetMsrs_encode_der; + xer_type_decoder_f OTD_FirstSetMsrs_decode_xer; + xer_type_encoder_f OTD_FirstSetMsrs_encode_xer; + per_type_decoder_f OTD_FirstSetMsrs_decode_uper; + per_type_encoder_f OTD_FirstSetMsrs_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/OTD-MeasureInfo-5-Ext.h b/src/core/libs/supl/asn-rrlp/OTD-MeasureInfo-5-Ext.h index f38bb2c20..8cdd331bc 100644 --- a/src/core/libs/supl/asn-rrlp/OTD-MeasureInfo-5-Ext.h +++ b/src/core/libs/supl/asn-rrlp/OTD-MeasureInfo-5-Ext.h @@ -14,23 +14,24 @@ #include "SeqOfOTD-MsrElementRest.h" #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* OTD-MeasureInfo-5-Ext */ -typedef SeqOfOTD_MsrElementRest_t OTD_MeasureInfo_5_Ext_t; + /* OTD-MeasureInfo-5-Ext */ + typedef SeqOfOTD_MsrElementRest_t OTD_MeasureInfo_5_Ext_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_OTD_MeasureInfo_5_Ext; -asn_struct_free_f OTD_MeasureInfo_5_Ext_free; -asn_struct_print_f OTD_MeasureInfo_5_Ext_print; -asn_constr_check_f OTD_MeasureInfo_5_Ext_constraint; -ber_type_decoder_f OTD_MeasureInfo_5_Ext_decode_ber; -der_type_encoder_f OTD_MeasureInfo_5_Ext_encode_der; -xer_type_decoder_f OTD_MeasureInfo_5_Ext_decode_xer; -xer_type_encoder_f OTD_MeasureInfo_5_Ext_encode_xer; -per_type_decoder_f OTD_MeasureInfo_5_Ext_decode_uper; -per_type_encoder_f OTD_MeasureInfo_5_Ext_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_OTD_MeasureInfo_5_Ext; + asn_struct_free_f OTD_MeasureInfo_5_Ext_free; + asn_struct_print_f OTD_MeasureInfo_5_Ext_print; + asn_constr_check_f OTD_MeasureInfo_5_Ext_constraint; + ber_type_decoder_f OTD_MeasureInfo_5_Ext_decode_ber; + der_type_encoder_f OTD_MeasureInfo_5_Ext_encode_der; + xer_type_decoder_f OTD_MeasureInfo_5_Ext_decode_xer; + xer_type_encoder_f OTD_MeasureInfo_5_Ext_encode_xer; + per_type_decoder_f OTD_MeasureInfo_5_Ext_decode_uper; + per_type_encoder_f OTD_MeasureInfo_5_Ext_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/OTD-MeasureInfo-R98-Ext.h b/src/core/libs/supl/asn-rrlp/OTD-MeasureInfo-R98-Ext.h index 1aa161055..5a2bcc22c 100644 --- a/src/core/libs/supl/asn-rrlp/OTD-MeasureInfo-R98-Ext.h +++ b/src/core/libs/supl/asn-rrlp/OTD-MeasureInfo-R98-Ext.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* OTD-MeasureInfo-R98-Ext */ -typedef struct OTD_MeasureInfo_R98_Ext -{ - OTD_MsrElementFirst_R98_Ext_t otdMsrFirstSets_R98_Ext; + /* OTD-MeasureInfo-R98-Ext */ + typedef struct OTD_MeasureInfo_R98_Ext + { + OTD_MsrElementFirst_R98_Ext_t otdMsrFirstSets_R98_Ext; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} OTD_MeasureInfo_R98_Ext_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } OTD_MeasureInfo_R98_Ext_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_OTD_MeasureInfo_R98_Ext; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_OTD_MeasureInfo_R98_Ext; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/OTD-MeasureInfo.h b/src/core/libs/supl/asn-rrlp/OTD-MeasureInfo.h index 0f9d469a8..3c57b4f9c 100644 --- a/src/core/libs/supl/asn-rrlp/OTD-MeasureInfo.h +++ b/src/core/libs/supl/asn-rrlp/OTD-MeasureInfo.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct SeqOfOTD_MsrElementRest; + /* Forward declarations */ + struct SeqOfOTD_MsrElementRest; -/* OTD-MeasureInfo */ -typedef struct OTD_MeasureInfo -{ - OTD_MsrElementFirst_t otdMsrFirstSets; - struct SeqOfOTD_MsrElementRest *otdMsrRestSets /* OPTIONAL */; + /* OTD-MeasureInfo */ + typedef struct OTD_MeasureInfo + { + OTD_MsrElementFirst_t otdMsrFirstSets; + struct SeqOfOTD_MsrElementRest *otdMsrRestSets /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} OTD_MeasureInfo_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } OTD_MeasureInfo_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_OTD_MeasureInfo; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_OTD_MeasureInfo; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/OTD-Measurement.h b/src/core/libs/supl/asn-rrlp/OTD-Measurement.h index dd08a5d2f..7fa183b7c 100644 --- a/src/core/libs/supl/asn-rrlp/OTD-Measurement.h +++ b/src/core/libs/supl/asn-rrlp/OTD-Measurement.h @@ -17,22 +17,23 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* OTD-Measurement */ -typedef struct OTD_Measurement -{ - ModuloTimeSlot_t nborTimeSlot; - EOTDQuality_t eotdQuality; - OTDValue_t otdValue; + /* OTD-Measurement */ + typedef struct OTD_Measurement + { + ModuloTimeSlot_t nborTimeSlot; + EOTDQuality_t eotdQuality; + OTDValue_t otdValue; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} OTD_Measurement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } OTD_Measurement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_OTD_Measurement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_OTD_Measurement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/OTD-MeasurementWithID.h b/src/core/libs/supl/asn-rrlp/OTD-MeasurementWithID.h index 40e18526f..6431c7a89 100644 --- a/src/core/libs/supl/asn-rrlp/OTD-MeasurementWithID.h +++ b/src/core/libs/supl/asn-rrlp/OTD-MeasurementWithID.h @@ -18,23 +18,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* OTD-MeasurementWithID */ -typedef struct OTD_MeasurementWithID -{ - NeighborIdentity_t neighborIdentity; - ModuloTimeSlot_t nborTimeSlot; - EOTDQuality_t eotdQuality; - OTDValue_t otdValue; + /* OTD-MeasurementWithID */ + typedef struct OTD_MeasurementWithID + { + NeighborIdentity_t neighborIdentity; + ModuloTimeSlot_t nborTimeSlot; + EOTDQuality_t eotdQuality; + OTDValue_t otdValue; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} OTD_MeasurementWithID_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } OTD_MeasurementWithID_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_OTD_MeasurementWithID; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_OTD_MeasurementWithID; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/OTD-MsrElementFirst-R98-Ext.h b/src/core/libs/supl/asn-rrlp/OTD-MsrElementFirst-R98-Ext.h index ae5935ad7..e99001016 100644 --- a/src/core/libs/supl/asn-rrlp/OTD-MsrElementFirst-R98-Ext.h +++ b/src/core/libs/supl/asn-rrlp/OTD-MsrElementFirst-R98-Ext.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct SeqOfOTD_FirstSetMsrs_R98_Ext; + /* Forward declarations */ + struct SeqOfOTD_FirstSetMsrs_R98_Ext; -/* OTD-MsrElementFirst-R98-Ext */ -typedef struct OTD_MsrElementFirst_R98_Ext -{ - struct SeqOfOTD_FirstSetMsrs_R98_Ext *otd_FirstSetMsrs_R98_Ext /* OPTIONAL */; + /* OTD-MsrElementFirst-R98-Ext */ + typedef struct OTD_MsrElementFirst_R98_Ext + { + struct SeqOfOTD_FirstSetMsrs_R98_Ext *otd_FirstSetMsrs_R98_Ext /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} OTD_MsrElementFirst_R98_Ext_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } OTD_MsrElementFirst_R98_Ext_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_OTD_MsrElementFirst_R98_Ext; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_OTD_MsrElementFirst_R98_Ext; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/OTD-MsrElementFirst.h b/src/core/libs/supl/asn-rrlp/OTD-MsrElementFirst.h index 19526651e..322e104c1 100644 --- a/src/core/libs/supl/asn-rrlp/OTD-MsrElementFirst.h +++ b/src/core/libs/supl/asn-rrlp/OTD-MsrElementFirst.h @@ -17,29 +17,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct TOA_MeasurementsOfRef; -struct SeqOfOTD_FirstSetMsrs; + /* Forward declarations */ + struct TOA_MeasurementsOfRef; + struct SeqOfOTD_FirstSetMsrs; -/* OTD-MsrElementFirst */ -typedef struct OTD_MsrElementFirst -{ - long refFrameNumber; - ModuloTimeSlot_t referenceTimeSlot; - struct TOA_MeasurementsOfRef *toaMeasurementsOfRef /* OPTIONAL */; - StdResolution_t stdResolution; - long *taCorrection /* OPTIONAL */; - struct SeqOfOTD_FirstSetMsrs *otd_FirstSetMsrs /* OPTIONAL */; + /* OTD-MsrElementFirst */ + typedef struct OTD_MsrElementFirst + { + long refFrameNumber; + ModuloTimeSlot_t referenceTimeSlot; + struct TOA_MeasurementsOfRef *toaMeasurementsOfRef /* OPTIONAL */; + StdResolution_t stdResolution; + long *taCorrection /* OPTIONAL */; + struct SeqOfOTD_FirstSetMsrs *otd_FirstSetMsrs /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} OTD_MsrElementFirst_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } OTD_MsrElementFirst_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_OTD_MsrElementFirst; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_OTD_MsrElementFirst; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/OTD-MsrElementRest.h b/src/core/libs/supl/asn-rrlp/OTD-MsrElementRest.h index 6f48acd9c..fd1955652 100644 --- a/src/core/libs/supl/asn-rrlp/OTD-MsrElementRest.h +++ b/src/core/libs/supl/asn-rrlp/OTD-MsrElementRest.h @@ -17,29 +17,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct TOA_MeasurementsOfRef; -struct SeqOfOTD_MsrsOfOtherSets; + /* Forward declarations */ + struct TOA_MeasurementsOfRef; + struct SeqOfOTD_MsrsOfOtherSets; -/* OTD-MsrElementRest */ -typedef struct OTD_MsrElementRest -{ - long refFrameNumber; - ModuloTimeSlot_t referenceTimeSlot; - struct TOA_MeasurementsOfRef *toaMeasurementsOfRef /* OPTIONAL */; - StdResolution_t stdResolution; - long *taCorrection /* OPTIONAL */; - struct SeqOfOTD_MsrsOfOtherSets *otd_MsrsOfOtherSets /* OPTIONAL */; + /* OTD-MsrElementRest */ + typedef struct OTD_MsrElementRest + { + long refFrameNumber; + ModuloTimeSlot_t referenceTimeSlot; + struct TOA_MeasurementsOfRef *toaMeasurementsOfRef /* OPTIONAL */; + StdResolution_t stdResolution; + long *taCorrection /* OPTIONAL */; + struct SeqOfOTD_MsrsOfOtherSets *otd_MsrsOfOtherSets /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} OTD_MsrElementRest_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } OTD_MsrElementRest_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_OTD_MsrElementRest; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_OTD_MsrElementRest; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/OTD-MsrsOfOtherSets.h b/src/core/libs/supl/asn-rrlp/OTD-MsrsOfOtherSets.h index 04a44e22b..7df79d03a 100644 --- a/src/core/libs/supl/asn-rrlp/OTD-MsrsOfOtherSets.h +++ b/src/core/libs/supl/asn-rrlp/OTD-MsrsOfOtherSets.h @@ -16,32 +16,34 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum OTD_MsrsOfOtherSets_PR { - OTD_MsrsOfOtherSets_PR_NOTHING, /* No components present */ - OTD_MsrsOfOtherSets_PR_identityNotPresent, - OTD_MsrsOfOtherSets_PR_identityPresent -} OTD_MsrsOfOtherSets_PR; - -/* OTD-MsrsOfOtherSets */ -typedef struct OTD_MsrsOfOtherSets -{ - OTD_MsrsOfOtherSets_PR present; - union OTD_MsrsOfOtherSets_u + /* Dependencies */ + typedef enum OTD_MsrsOfOtherSets_PR { - OTD_Measurement_t identityNotPresent; - OTD_MeasurementWithID_t identityPresent; - } choice; + OTD_MsrsOfOtherSets_PR_NOTHING, /* No components present */ + OTD_MsrsOfOtherSets_PR_identityNotPresent, + OTD_MsrsOfOtherSets_PR_identityPresent + } OTD_MsrsOfOtherSets_PR; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} OTD_MsrsOfOtherSets_t; + /* OTD-MsrsOfOtherSets */ + typedef struct OTD_MsrsOfOtherSets + { + OTD_MsrsOfOtherSets_PR present; + union OTD_MsrsOfOtherSets_u + { + OTD_Measurement_t identityNotPresent; + OTD_MeasurementWithID_t identityPresent; + } choice; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_OTD_MsrsOfOtherSets; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } OTD_MsrsOfOtherSets_t; + + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_OTD_MsrsOfOtherSets; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/OTDValue.h b/src/core/libs/supl/asn-rrlp/OTDValue.h index dc40c312a..42ea5a9e4 100644 --- a/src/core/libs/supl/asn-rrlp/OTDValue.h +++ b/src/core/libs/supl/asn-rrlp/OTDValue.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* OTDValue */ -typedef long OTDValue_t; + /* OTDValue */ + typedef long OTDValue_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_OTDValue; -asn_struct_free_f OTDValue_free; -asn_struct_print_f OTDValue_print; -asn_constr_check_f OTDValue_constraint; -ber_type_decoder_f OTDValue_decode_ber; -der_type_encoder_f OTDValue_encode_der; -xer_type_decoder_f OTDValue_decode_xer; -xer_type_encoder_f OTDValue_encode_xer; -per_type_decoder_f OTDValue_decode_uper; -per_type_encoder_f OTDValue_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_OTDValue; + asn_struct_free_f OTDValue_free; + asn_struct_print_f OTDValue_print; + asn_constr_check_f OTDValue_constraint; + ber_type_decoder_f OTDValue_decode_ber; + der_type_encoder_f OTDValue_encode_der; + xer_type_decoder_f OTDValue_decode_xer; + xer_type_encoder_f OTDValue_encode_xer; + per_type_decoder_f OTDValue_decode_uper; + per_type_encoder_f OTDValue_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/PDU.h b/src/core/libs/supl/asn-rrlp/PDU.h index dd18501a2..5a815aaf5 100644 --- a/src/core/libs/supl/asn-rrlp/PDU.h +++ b/src/core/libs/supl/asn-rrlp/PDU.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* PDU */ -typedef struct PDU -{ - long referenceNumber; - RRLP_Component_t component; + /* PDU */ + typedef struct PDU + { + long referenceNumber; + RRLP_Component_t component; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} PDU_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } PDU_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_PDU; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_PDU; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/PositionData.h b/src/core/libs/supl/asn-rrlp/PositionData.h index 52a358a50..7545873ef 100644 --- a/src/core/libs/supl/asn-rrlp/PositionData.h +++ b/src/core/libs/supl/asn-rrlp/PositionData.h @@ -14,30 +14,32 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum PositionData { - PositionData_e_otd = 0, - PositionData_gps = 1, - PositionData_galileo = 2 -} e_PositionData; + /* Dependencies */ + typedef enum PositionData + { + PositionData_e_otd = 0, + PositionData_gps = 1, + PositionData_galileo = 2 + } e_PositionData; -/* PositionData */ -typedef BIT_STRING_t PositionData_t; + /* PositionData */ + typedef BIT_STRING_t PositionData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_PositionData; -asn_struct_free_f PositionData_free; -asn_struct_print_f PositionData_print; -asn_constr_check_f PositionData_constraint; -ber_type_decoder_f PositionData_decode_ber; -der_type_encoder_f PositionData_encode_der; -xer_type_decoder_f PositionData_decode_xer; -xer_type_encoder_f PositionData_encode_xer; -per_type_decoder_f PositionData_decode_uper; -per_type_encoder_f PositionData_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_PositionData; + asn_struct_free_f PositionData_free; + asn_struct_print_f PositionData_print; + asn_constr_check_f PositionData_constraint; + ber_type_decoder_f PositionData_decode_ber; + der_type_encoder_f PositionData_encode_der; + xer_type_decoder_f PositionData_decode_xer; + xer_type_encoder_f PositionData_encode_xer; + per_type_decoder_f PositionData_decode_uper; + per_type_encoder_f PositionData_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/PositionInstruct.h b/src/core/libs/supl/asn-rrlp/PositionInstruct.h index 22c1822c4..e0e49f72f 100644 --- a/src/core/libs/supl/asn-rrlp/PositionInstruct.h +++ b/src/core/libs/supl/asn-rrlp/PositionInstruct.h @@ -19,24 +19,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* PositionInstruct */ -typedef struct PositionInstruct -{ - MethodType_t methodType; - PositionMethod_t positionMethod; - MeasureResponseTime_t measureResponseTime; - UseMultipleSets_t useMultipleSets; - EnvironmentCharacter_t *environmentCharacter /* OPTIONAL */; + /* PositionInstruct */ + typedef struct PositionInstruct + { + MethodType_t methodType; + PositionMethod_t positionMethod; + MeasureResponseTime_t measureResponseTime; + UseMultipleSets_t useMultipleSets; + EnvironmentCharacter_t *environmentCharacter /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} PositionInstruct_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } PositionInstruct_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_PositionInstruct; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_PositionInstruct; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/PositionMethod.h b/src/core/libs/supl/asn-rrlp/PositionMethod.h index e80175c7b..64db54e6c 100644 --- a/src/core/libs/supl/asn-rrlp/PositionMethod.h +++ b/src/core/libs/supl/asn-rrlp/PositionMethod.h @@ -14,30 +14,32 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum PositionMethod { - PositionMethod_eotd = 0, - PositionMethod_gps = 1, - PositionMethod_gpsOrEOTD = 2 -} e_PositionMethod; + /* Dependencies */ + typedef enum PositionMethod + { + PositionMethod_eotd = 0, + PositionMethod_gps = 1, + PositionMethod_gpsOrEOTD = 2 + } e_PositionMethod; -/* PositionMethod */ -typedef ENUMERATED_t PositionMethod_t; + /* PositionMethod */ + typedef ENUMERATED_t PositionMethod_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_PositionMethod; -asn_struct_free_f PositionMethod_free; -asn_struct_print_f PositionMethod_print; -asn_constr_check_f PositionMethod_constraint; -ber_type_decoder_f PositionMethod_decode_ber; -der_type_encoder_f PositionMethod_encode_der; -xer_type_decoder_f PositionMethod_decode_xer; -xer_type_encoder_f PositionMethod_encode_xer; -per_type_decoder_f PositionMethod_decode_uper; -per_type_encoder_f PositionMethod_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_PositionMethod; + asn_struct_free_f PositionMethod_free; + asn_struct_print_f PositionMethod_print; + asn_constr_check_f PositionMethod_constraint; + ber_type_decoder_f PositionMethod_decode_ber; + der_type_encoder_f PositionMethod_encode_der; + xer_type_decoder_f PositionMethod_decode_xer; + xer_type_encoder_f PositionMethod_encode_xer; + per_type_decoder_f PositionMethod_decode_uper; + per_type_encoder_f PositionMethod_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ProtocolError.h b/src/core/libs/supl/asn-rrlp/ProtocolError.h index 4657b9233..8dd1b0fdc 100644 --- a/src/core/libs/supl/asn-rrlp/ProtocolError.h +++ b/src/core/libs/supl/asn-rrlp/ProtocolError.h @@ -16,29 +16,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct Rel_5_ProtocolError_Extension; + /* Forward declarations */ + struct Rel_5_ProtocolError_Extension; -/* ProtocolError */ -typedef struct ProtocolError -{ - ErrorCodes_t errorCause; - ExtensionContainer_t *extensionContainer /* OPTIONAL */; - /* + /* ProtocolError */ + typedef struct ProtocolError + { + ErrorCodes_t errorCause; + ExtensionContainer_t *extensionContainer /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - struct Rel_5_ProtocolError_Extension *rel_5_ProtocolError_Extension /* OPTIONAL */; + struct Rel_5_ProtocolError_Extension *rel_5_ProtocolError_Extension /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ProtocolError_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ProtocolError_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ProtocolError; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ProtocolError; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/RRLP-Component.h b/src/core/libs/supl/asn-rrlp/RRLP-Component.h index 14a4dc4a4..02208b69d 100644 --- a/src/core/libs/supl/asn-rrlp/RRLP-Component.h +++ b/src/core/libs/supl/asn-rrlp/RRLP-Component.h @@ -19,44 +19,46 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum RRLP_Component_PR { - RRLP_Component_PR_NOTHING, /* No components present */ - RRLP_Component_PR_msrPositionReq, - RRLP_Component_PR_msrPositionRsp, - RRLP_Component_PR_assistanceData, - RRLP_Component_PR_assistanceDataAck, - RRLP_Component_PR_protocolError, - /* Extensions may appear below */ - -} RRLP_Component_PR; - -/* RRLP-Component */ -typedef struct RRLP_Component -{ - RRLP_Component_PR present; - union RRLP_Component_u + /* Dependencies */ + typedef enum RRLP_Component_PR { - MsrPosition_Req_t msrPositionReq; - MsrPosition_Rsp_t msrPositionRsp; - AssistanceData_t assistanceData; - NULL_t assistanceDataAck; - ProtocolError_t protocolError; - /* + RRLP_Component_PR_NOTHING, /* No components present */ + RRLP_Component_PR_msrPositionReq, + RRLP_Component_PR_msrPositionRsp, + RRLP_Component_PR_assistanceData, + RRLP_Component_PR_assistanceDataAck, + RRLP_Component_PR_protocolError, + /* Extensions may appear below */ + + } RRLP_Component_PR; + + /* RRLP-Component */ + typedef struct RRLP_Component + { + RRLP_Component_PR present; + union RRLP_Component_u + { + MsrPosition_Req_t msrPositionReq; + MsrPosition_Rsp_t msrPositionRsp; + AssistanceData_t assistanceData; + NULL_t assistanceDataAck; + ProtocolError_t protocolError; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RRLP_Component_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } RRLP_Component_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RRLP_Component; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_RRLP_Component; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/RefLocation.h b/src/core/libs/supl/asn-rrlp/RefLocation.h index fc6820a48..d95632425 100644 --- a/src/core/libs/supl/asn-rrlp/RefLocation.h +++ b/src/core/libs/supl/asn-rrlp/RefLocation.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* RefLocation */ -typedef struct RefLocation -{ - Ext_GeographicalInformation_t threeDLocation; + /* RefLocation */ + typedef struct RefLocation + { + Ext_GeographicalInformation_t threeDLocation; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RefLocation_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } RefLocation_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RefLocation; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_RefLocation; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/RefQuality.h b/src/core/libs/supl/asn-rrlp/RefQuality.h index 50d2a5f77..d8e0f451d 100644 --- a/src/core/libs/supl/asn-rrlp/RefQuality.h +++ b/src/core/libs/supl/asn-rrlp/RefQuality.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* RefQuality */ -typedef long RefQuality_t; + /* RefQuality */ + typedef long RefQuality_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RefQuality; -asn_struct_free_f RefQuality_free; -asn_struct_print_f RefQuality_print; -asn_constr_check_f RefQuality_constraint; -ber_type_decoder_f RefQuality_decode_ber; -der_type_encoder_f RefQuality_encode_der; -xer_type_decoder_f RefQuality_decode_xer; -xer_type_encoder_f RefQuality_encode_xer; -per_type_decoder_f RefQuality_decode_uper; -per_type_encoder_f RefQuality_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_RefQuality; + asn_struct_free_f RefQuality_free; + asn_struct_print_f RefQuality_print; + asn_constr_check_f RefQuality_constraint; + ber_type_decoder_f RefQuality_decode_ber; + der_type_encoder_f RefQuality_encode_der; + xer_type_decoder_f RefQuality_decode_xer; + xer_type_encoder_f RefQuality_encode_xer; + per_type_decoder_f RefQuality_decode_uper; + per_type_encoder_f RefQuality_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ReferenceAssistData.h b/src/core/libs/supl/asn-rrlp/ReferenceAssistData.h index b2db5857a..b1e6d924a 100644 --- a/src/core/libs/supl/asn-rrlp/ReferenceAssistData.h +++ b/src/core/libs/supl/asn-rrlp/ReferenceAssistData.h @@ -18,23 +18,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* ReferenceAssistData */ -typedef struct ReferenceAssistData -{ - BCCHCarrier_t bcchCarrier; - BSIC_t bsic; - TimeSlotScheme_t timeSlotScheme; - BTSPosition_t *btsPosition /* OPTIONAL */; + /* ReferenceAssistData */ + typedef struct ReferenceAssistData + { + BCCHCarrier_t bcchCarrier; + BSIC_t bsic; + TimeSlotScheme_t timeSlotScheme; + BTSPosition_t *btsPosition /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ReferenceAssistData_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ReferenceAssistData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ReferenceAssistData; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ReferenceAssistData; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ReferenceFrame.h b/src/core/libs/supl/asn-rrlp/ReferenceFrame.h index 2bc2a1cdb..6f34f557a 100644 --- a/src/core/libs/supl/asn-rrlp/ReferenceFrame.h +++ b/src/core/libs/supl/asn-rrlp/ReferenceFrame.h @@ -15,21 +15,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* ReferenceFrame */ -typedef struct ReferenceFrame -{ - long referenceFN; - long *referenceFNMSB /* OPTIONAL */; + /* ReferenceFrame */ + typedef struct ReferenceFrame + { + long referenceFN; + long *referenceFNMSB /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ReferenceFrame_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ReferenceFrame_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ReferenceFrame; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ReferenceFrame; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ReferenceIdentity.h b/src/core/libs/supl/asn-rrlp/ReferenceIdentity.h index 15125d50e..444681d8f 100644 --- a/src/core/libs/supl/asn-rrlp/ReferenceIdentity.h +++ b/src/core/libs/supl/asn-rrlp/ReferenceIdentity.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* ReferenceIdentity */ -typedef struct ReferenceIdentity -{ - SeqOfReferenceIdentityType_t refBTSList; + /* ReferenceIdentity */ + typedef struct ReferenceIdentity + { + SeqOfReferenceIdentityType_t refBTSList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ReferenceIdentity_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ReferenceIdentity_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ReferenceIdentity; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ReferenceIdentity; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ReferenceIdentityType.h b/src/core/libs/supl/asn-rrlp/ReferenceIdentityType.h index 3544e8bb8..6b5b8afc0 100644 --- a/src/core/libs/supl/asn-rrlp/ReferenceIdentityType.h +++ b/src/core/libs/supl/asn-rrlp/ReferenceIdentityType.h @@ -19,38 +19,40 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum ReferenceIdentityType_PR { - ReferenceIdentityType_PR_NOTHING, /* No components present */ - ReferenceIdentityType_PR_bsicAndCarrier, - ReferenceIdentityType_PR_ci, - ReferenceIdentityType_PR_requestIndex, - ReferenceIdentityType_PR_systemInfoIndex, - ReferenceIdentityType_PR_ciAndLAC -} ReferenceIdentityType_PR; - -/* ReferenceIdentityType */ -typedef struct ReferenceIdentityType -{ - ReferenceIdentityType_PR present; - union ReferenceIdentityType_u + /* Dependencies */ + typedef enum ReferenceIdentityType_PR { - BSICAndCarrier_t bsicAndCarrier; - CellID_t ci; - RequestIndex_t requestIndex; - SystemInfoIndex_t systemInfoIndex; - CellIDAndLAC_t ciAndLAC; - } choice; + ReferenceIdentityType_PR_NOTHING, /* No components present */ + ReferenceIdentityType_PR_bsicAndCarrier, + ReferenceIdentityType_PR_ci, + ReferenceIdentityType_PR_requestIndex, + ReferenceIdentityType_PR_systemInfoIndex, + ReferenceIdentityType_PR_ciAndLAC + } ReferenceIdentityType_PR; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ReferenceIdentityType_t; + /* ReferenceIdentityType */ + typedef struct ReferenceIdentityType + { + ReferenceIdentityType_PR present; + union ReferenceIdentityType_u + { + BSICAndCarrier_t bsicAndCarrier; + CellID_t ci; + RequestIndex_t requestIndex; + SystemInfoIndex_t systemInfoIndex; + CellIDAndLAC_t ciAndLAC; + } choice; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ReferenceIdentityType; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ReferenceIdentityType_t; + + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ReferenceIdentityType; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ReferenceRelation.h b/src/core/libs/supl/asn-rrlp/ReferenceRelation.h index 8a9e43929..544d32483 100644 --- a/src/core/libs/supl/asn-rrlp/ReferenceRelation.h +++ b/src/core/libs/supl/asn-rrlp/ReferenceRelation.h @@ -14,30 +14,32 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum ReferenceRelation { - ReferenceRelation_secondBTSThirdSet = 0, - ReferenceRelation_secondBTSSecondSet = 1, - ReferenceRelation_firstBTSFirstSet = 2 -} e_ReferenceRelation; + /* Dependencies */ + typedef enum ReferenceRelation + { + ReferenceRelation_secondBTSThirdSet = 0, + ReferenceRelation_secondBTSSecondSet = 1, + ReferenceRelation_firstBTSFirstSet = 2 + } e_ReferenceRelation; -/* ReferenceRelation */ -typedef ENUMERATED_t ReferenceRelation_t; + /* ReferenceRelation */ + typedef ENUMERATED_t ReferenceRelation_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ReferenceRelation; -asn_struct_free_f ReferenceRelation_free; -asn_struct_print_f ReferenceRelation_print; -asn_constr_check_f ReferenceRelation_constraint; -ber_type_decoder_f ReferenceRelation_decode_ber; -der_type_encoder_f ReferenceRelation_encode_der; -xer_type_decoder_f ReferenceRelation_decode_xer; -xer_type_encoder_f ReferenceRelation_encode_xer; -per_type_decoder_f ReferenceRelation_decode_uper; -per_type_encoder_f ReferenceRelation_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ReferenceRelation; + asn_struct_free_f ReferenceRelation_free; + asn_struct_print_f ReferenceRelation_print; + asn_constr_check_f ReferenceRelation_constraint; + ber_type_decoder_f ReferenceRelation_decode_ber; + der_type_encoder_f ReferenceRelation_encode_der; + xer_type_decoder_f ReferenceRelation_decode_xer; + xer_type_encoder_f ReferenceRelation_encode_xer; + per_type_decoder_f ReferenceRelation_decode_uper; + per_type_encoder_f ReferenceRelation_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ReferenceTime.h b/src/core/libs/supl/asn-rrlp/ReferenceTime.h index 9b9b52107..cf1ade693 100644 --- a/src/core/libs/supl/asn-rrlp/ReferenceTime.h +++ b/src/core/libs/supl/asn-rrlp/ReferenceTime.h @@ -15,26 +15,27 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GSMTime; -struct GPSTOWAssist; + /* Forward declarations */ + struct GSMTime; + struct GPSTOWAssist; -/* ReferenceTime */ -typedef struct ReferenceTime -{ - GPSTime_t gpsTime; - struct GSMTime *gsmTime /* OPTIONAL */; - struct GPSTOWAssist *gpsTowAssist /* OPTIONAL */; + /* ReferenceTime */ + typedef struct ReferenceTime + { + GPSTime_t gpsTime; + struct GSMTime *gsmTime /* OPTIONAL */; + struct GPSTOWAssist *gpsTowAssist /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ReferenceTime_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ReferenceTime_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ReferenceTime; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ReferenceTime; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ReferenceWGS84.h b/src/core/libs/supl/asn-rrlp/ReferenceWGS84.h index 63e6a1459..544127c70 100644 --- a/src/core/libs/supl/asn-rrlp/ReferenceWGS84.h +++ b/src/core/libs/supl/asn-rrlp/ReferenceWGS84.h @@ -16,22 +16,23 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* ReferenceWGS84 */ -typedef struct ReferenceWGS84 -{ - RelDistance_t relativeNorth; - RelDistance_t relativeEast; - RelativeAlt_t *relativeAlt /* OPTIONAL */; + /* ReferenceWGS84 */ + typedef struct ReferenceWGS84 + { + RelDistance_t relativeNorth; + RelDistance_t relativeEast; + RelativeAlt_t *relativeAlt /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ReferenceWGS84_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ReferenceWGS84_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ReferenceWGS84; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ReferenceWGS84; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Rel-5-MsrPosition-Rsp-Extension.h b/src/core/libs/supl/asn-rrlp/Rel-5-MsrPosition-Rsp-Extension.h index 1451af1e9..3a0f2ef4e 100644 --- a/src/core/libs/supl/asn-rrlp/Rel-5-MsrPosition-Rsp-Extension.h +++ b/src/core/libs/supl/asn-rrlp/Rel-5-MsrPosition-Rsp-Extension.h @@ -15,30 +15,31 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct Extended_reference; -struct SeqOfOTD_MsrElementRest; + /* Forward declarations */ + struct Extended_reference; + struct SeqOfOTD_MsrElementRest; -/* Rel-5-MsrPosition-Rsp-Extension */ -typedef struct Rel_5_MsrPosition_Rsp_Extension -{ - struct Extended_reference *extended_reference /* OPTIONAL */; - struct SeqOfOTD_MsrElementRest *otd_MeasureInfo_5_Ext /* OPTIONAL */; - UlPseudoSegInd_t *ulPseudoSegInd /* OPTIONAL */; - /* + /* Rel-5-MsrPosition-Rsp-Extension */ + typedef struct Rel_5_MsrPosition_Rsp_Extension + { + struct Extended_reference *extended_reference /* OPTIONAL */; + struct SeqOfOTD_MsrElementRest *otd_MeasureInfo_5_Ext /* OPTIONAL */; + UlPseudoSegInd_t *ulPseudoSegInd /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Rel_5_MsrPosition_Rsp_Extension_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Rel_5_MsrPosition_Rsp_Extension_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Rel_5_MsrPosition_Rsp_Extension; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Rel_5_MsrPosition_Rsp_Extension; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Rel-5-ProtocolError-Extension.h b/src/core/libs/supl/asn-rrlp/Rel-5-ProtocolError-Extension.h index 7fbe207de..00762b59c 100644 --- a/src/core/libs/supl/asn-rrlp/Rel-5-ProtocolError-Extension.h +++ b/src/core/libs/supl/asn-rrlp/Rel-5-ProtocolError-Extension.h @@ -14,27 +14,28 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct Extended_reference; + /* Forward declarations */ + struct Extended_reference; -/* Rel-5-ProtocolError-Extension */ -typedef struct Rel_5_ProtocolError_Extension -{ - struct Extended_reference *extended_reference /* OPTIONAL */; - /* + /* Rel-5-ProtocolError-Extension */ + typedef struct Rel_5_ProtocolError_Extension + { + struct Extended_reference *extended_reference /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Rel_5_ProtocolError_Extension_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Rel_5_ProtocolError_Extension_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Rel_5_ProtocolError_Extension; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Rel_5_ProtocolError_Extension; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Rel-7-MsrPosition-Rsp-Extension.h b/src/core/libs/supl/asn-rrlp/Rel-7-MsrPosition-Rsp-Extension.h index b7dffe832..d030be0bf 100644 --- a/src/core/libs/supl/asn-rrlp/Rel-7-MsrPosition-Rsp-Extension.h +++ b/src/core/libs/supl/asn-rrlp/Rel-7-MsrPosition-Rsp-Extension.h @@ -15,30 +15,31 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSSLocationInfo; -struct GANSSMeasureInfo; + /* Forward declarations */ + struct GANSSLocationInfo; + struct GANSSMeasureInfo; -/* Rel-7-MsrPosition-Rsp-Extension */ -typedef struct Rel_7_MsrPosition_Rsp_Extension -{ - VelocityEstimate_t *velEstimate /* OPTIONAL */; - struct GANSSLocationInfo *ganssLocationInfo /* OPTIONAL */; - struct GANSSMeasureInfo *ganssMeasureInfo /* OPTIONAL */; - /* + /* Rel-7-MsrPosition-Rsp-Extension */ + typedef struct Rel_7_MsrPosition_Rsp_Extension + { + VelocityEstimate_t *velEstimate /* OPTIONAL */; + struct GANSSLocationInfo *ganssLocationInfo /* OPTIONAL */; + struct GANSSMeasureInfo *ganssMeasureInfo /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Rel_7_MsrPosition_Rsp_Extension_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Rel_7_MsrPosition_Rsp_Extension_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Rel_7_MsrPosition_Rsp_Extension; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Rel_7_MsrPosition_Rsp_Extension; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Rel-98-MsrPosition-Rsp-Extension.h b/src/core/libs/supl/asn-rrlp/Rel-98-MsrPosition-Rsp-Extension.h index 7104a32c7..0d3425c17 100644 --- a/src/core/libs/supl/asn-rrlp/Rel-98-MsrPosition-Rsp-Extension.h +++ b/src/core/libs/supl/asn-rrlp/Rel-98-MsrPosition-Rsp-Extension.h @@ -14,35 +14,36 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GPSTimeAssistanceMeasurements; -struct OTD_MeasureInfo_R98_Ext; + /* Forward declarations */ + struct GPSTimeAssistanceMeasurements; + struct OTD_MeasureInfo_R98_Ext; -/* Rel-98-MsrPosition-Rsp-Extension */ -typedef struct Rel_98_MsrPosition_Rsp_Extension -{ - struct rel_98_Ext_MeasureInfo + /* Rel-98-MsrPosition-Rsp-Extension */ + typedef struct Rel_98_MsrPosition_Rsp_Extension { - struct OTD_MeasureInfo_R98_Ext *otd_MeasureInfo_R98_Ext /* OPTIONAL */; + struct rel_98_Ext_MeasureInfo + { + struct OTD_MeasureInfo_R98_Ext *otd_MeasureInfo_R98_Ext /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } rel_98_Ext_MeasureInfo; - /* + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } rel_98_Ext_MeasureInfo; + /* * This type is extensible, * possible extensions are below. */ - struct GPSTimeAssistanceMeasurements *timeAssistanceMeasurements /* OPTIONAL */; + struct GPSTimeAssistanceMeasurements *timeAssistanceMeasurements /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Rel_98_MsrPosition_Rsp_Extension_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Rel_98_MsrPosition_Rsp_Extension_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Rel_98_MsrPosition_Rsp_Extension; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Rel_98_MsrPosition_Rsp_Extension; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Rel5-AssistanceData-Extension.h b/src/core/libs/supl/asn-rrlp/Rel5-AssistanceData-Extension.h index 905c60b25..77ad994dd 100644 --- a/src/core/libs/supl/asn-rrlp/Rel5-AssistanceData-Extension.h +++ b/src/core/libs/supl/asn-rrlp/Rel5-AssistanceData-Extension.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Rel5-AssistanceData-Extension */ -typedef struct Rel5_AssistanceData_Extension -{ - Extended_reference_t extended_reference; - /* + /* Rel5-AssistanceData-Extension */ + typedef struct Rel5_AssistanceData_Extension + { + Extended_reference_t extended_reference; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Rel5_AssistanceData_Extension_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Rel5_AssistanceData_Extension_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Rel5_AssistanceData_Extension; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Rel5_AssistanceData_Extension; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Rel5-MsrPosition-Req-Extension.h b/src/core/libs/supl/asn-rrlp/Rel5-MsrPosition-Req-Extension.h index 23da2b88b..d566be25f 100644 --- a/src/core/libs/supl/asn-rrlp/Rel5-MsrPosition-Req-Extension.h +++ b/src/core/libs/supl/asn-rrlp/Rel5-MsrPosition-Req-Extension.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Rel5-MsrPosition-Req-Extension */ -typedef struct Rel5_MsrPosition_Req_Extension -{ - Extended_reference_t extended_reference; - /* + /* Rel5-MsrPosition-Req-Extension */ + typedef struct Rel5_MsrPosition_Req_Extension + { + Extended_reference_t extended_reference; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Rel5_MsrPosition_Req_Extension_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Rel5_MsrPosition_Req_Extension_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Rel5_MsrPosition_Req_Extension; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Rel5_MsrPosition_Req_Extension; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Rel7-AssistanceData-Extension.h b/src/core/libs/supl/asn-rrlp/Rel7-AssistanceData-Extension.h index d5fa70595..4ecb0ffc5 100644 --- a/src/core/libs/supl/asn-rrlp/Rel7-AssistanceData-Extension.h +++ b/src/core/libs/supl/asn-rrlp/Rel7-AssistanceData-Extension.h @@ -15,29 +15,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSS_AssistData; + /* Forward declarations */ + struct GANSS_AssistData; -/* Rel7-AssistanceData-Extension */ -typedef struct Rel7_AssistanceData_Extension -{ - struct GANSS_AssistData *ganss_AssistData /* OPTIONAL */; - NULL_t *ganssCarrierPhaseMeasurementRequest /* OPTIONAL */; - NULL_t *ganssTODGSMTimeAssociationMeasurementRequest /* OPTIONAL */; - /* + /* Rel7-AssistanceData-Extension */ + typedef struct Rel7_AssistanceData_Extension + { + struct GANSS_AssistData *ganss_AssistData /* OPTIONAL */; + NULL_t *ganssCarrierPhaseMeasurementRequest /* OPTIONAL */; + NULL_t *ganssTODGSMTimeAssociationMeasurementRequest /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Rel7_AssistanceData_Extension_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Rel7_AssistanceData_Extension_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Rel7_AssistanceData_Extension; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Rel7_AssistanceData_Extension; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Rel7-MsrPosition-Req-Extension.h b/src/core/libs/supl/asn-rrlp/Rel7-MsrPosition-Req-Extension.h index a719dafca..690b05fa5 100644 --- a/src/core/libs/supl/asn-rrlp/Rel7-MsrPosition-Req-Extension.h +++ b/src/core/libs/supl/asn-rrlp/Rel7-MsrPosition-Req-Extension.h @@ -17,32 +17,33 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSS_AssistData; + /* Forward declarations */ + struct GANSS_AssistData; -/* Rel7-MsrPosition-Req-Extension */ -typedef struct Rel7_MsrPosition_Req_Extension -{ - NULL_t *velocityRequested /* OPTIONAL */; - GANSSPositioningMethod_t *ganssPositionMethod /* OPTIONAL */; - struct GANSS_AssistData *ganss_AssistData /* OPTIONAL */; - NULL_t *ganssCarrierPhaseMeasurementRequest /* OPTIONAL */; - NULL_t *ganssTODGSMTimeAssociationMeasurementRequest /* OPTIONAL */; - RequiredResponseTime_t *requiredResponseTime /* OPTIONAL */; - /* + /* Rel7-MsrPosition-Req-Extension */ + typedef struct Rel7_MsrPosition_Req_Extension + { + NULL_t *velocityRequested /* OPTIONAL */; + GANSSPositioningMethod_t *ganssPositionMethod /* OPTIONAL */; + struct GANSS_AssistData *ganss_AssistData /* OPTIONAL */; + NULL_t *ganssCarrierPhaseMeasurementRequest /* OPTIONAL */; + NULL_t *ganssTODGSMTimeAssociationMeasurementRequest /* OPTIONAL */; + RequiredResponseTime_t *requiredResponseTime /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Rel7_MsrPosition_Req_Extension_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Rel7_MsrPosition_Req_Extension_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Rel7_MsrPosition_Req_Extension; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Rel7_MsrPosition_Req_Extension; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Rel98-AssistanceData-Extension.h b/src/core/libs/supl/asn-rrlp/Rel98-AssistanceData-Extension.h index 563f34d4d..f8e314e77 100644 --- a/src/core/libs/supl/asn-rrlp/Rel98-AssistanceData-Extension.h +++ b/src/core/libs/supl/asn-rrlp/Rel98-AssistanceData-Extension.h @@ -16,29 +16,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct Rel98_Ext_ExpOTD; + /* Forward declarations */ + struct Rel98_Ext_ExpOTD; -/* Rel98-AssistanceData-Extension */ -typedef struct Rel98_AssistanceData_Extension -{ - struct Rel98_Ext_ExpOTD *rel98_Ext_ExpOTD /* OPTIONAL */; - /* + /* Rel98-AssistanceData-Extension */ + typedef struct Rel98_AssistanceData_Extension + { + struct Rel98_Ext_ExpOTD *rel98_Ext_ExpOTD /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - NULL_t *gpsTimeAssistanceMeasurementRequest /* OPTIONAL */; - GPSReferenceTimeUncertainty_t *gpsReferenceTimeUncertainty /* OPTIONAL */; + NULL_t *gpsTimeAssistanceMeasurementRequest /* OPTIONAL */; + GPSReferenceTimeUncertainty_t *gpsReferenceTimeUncertainty /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Rel98_AssistanceData_Extension_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Rel98_AssistanceData_Extension_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Rel98_AssistanceData_Extension; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Rel98_AssistanceData_Extension; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Rel98-Ext-ExpOTD.h b/src/core/libs/supl/asn-rrlp/Rel98-Ext-ExpOTD.h index 451c13e82..75903c13f 100644 --- a/src/core/libs/supl/asn-rrlp/Rel98-Ext-ExpOTD.h +++ b/src/core/libs/supl/asn-rrlp/Rel98-Ext-ExpOTD.h @@ -14,25 +14,26 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct MsrAssistData_R98_ExpOTD; -struct SystemInfoAssistData_R98_ExpOTD; + /* Forward declarations */ + struct MsrAssistData_R98_ExpOTD; + struct SystemInfoAssistData_R98_ExpOTD; -/* Rel98-Ext-ExpOTD */ -typedef struct Rel98_Ext_ExpOTD -{ - struct MsrAssistData_R98_ExpOTD *msrAssistData_R98_ExpOTD /* OPTIONAL */; - struct SystemInfoAssistData_R98_ExpOTD *systemInfoAssistData_R98_ExpOTD /* OPTIONAL */; + /* Rel98-Ext-ExpOTD */ + typedef struct Rel98_Ext_ExpOTD + { + struct MsrAssistData_R98_ExpOTD *msrAssistData_R98_ExpOTD /* OPTIONAL */; + struct SystemInfoAssistData_R98_ExpOTD *systemInfoAssistData_R98_ExpOTD /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Rel98_Ext_ExpOTD_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Rel98_Ext_ExpOTD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Rel98_Ext_ExpOTD; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Rel98_Ext_ExpOTD; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/Rel98-MsrPosition-Req-Extension.h b/src/core/libs/supl/asn-rrlp/Rel98-MsrPosition-Req-Extension.h index 52855302d..3922335b3 100644 --- a/src/core/libs/supl/asn-rrlp/Rel98-MsrPosition-Req-Extension.h +++ b/src/core/libs/supl/asn-rrlp/Rel98-MsrPosition-Req-Extension.h @@ -16,29 +16,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct Rel98_Ext_ExpOTD; + /* Forward declarations */ + struct Rel98_Ext_ExpOTD; -/* Rel98-MsrPosition-Req-Extension */ -typedef struct Rel98_MsrPosition_Req_Extension -{ - struct Rel98_Ext_ExpOTD *rel98_Ext_ExpOTD /* OPTIONAL */; - /* + /* Rel98-MsrPosition-Req-Extension */ + typedef struct Rel98_MsrPosition_Req_Extension + { + struct Rel98_Ext_ExpOTD *rel98_Ext_ExpOTD /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - NULL_t *gpsTimeAssistanceMeasurementRequest /* OPTIONAL */; - GPSReferenceTimeUncertainty_t *gpsReferenceTimeUncertainty /* OPTIONAL */; + NULL_t *gpsTimeAssistanceMeasurementRequest /* OPTIONAL */; + GPSReferenceTimeUncertainty_t *gpsReferenceTimeUncertainty /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Rel98_MsrPosition_Req_Extension_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Rel98_MsrPosition_Req_Extension_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Rel98_MsrPosition_Req_Extension; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Rel98_MsrPosition_Req_Extension; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/RelDistance.h b/src/core/libs/supl/asn-rrlp/RelDistance.h index 6b190eb94..a9437f579 100644 --- a/src/core/libs/supl/asn-rrlp/RelDistance.h +++ b/src/core/libs/supl/asn-rrlp/RelDistance.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* RelDistance */ -typedef long RelDistance_t; + /* RelDistance */ + typedef long RelDistance_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RelDistance; -asn_struct_free_f RelDistance_free; -asn_struct_print_f RelDistance_print; -asn_constr_check_f RelDistance_constraint; -ber_type_decoder_f RelDistance_decode_ber; -der_type_encoder_f RelDistance_encode_der; -xer_type_decoder_f RelDistance_decode_xer; -xer_type_encoder_f RelDistance_encode_xer; -per_type_decoder_f RelDistance_decode_uper; -per_type_encoder_f RelDistance_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_RelDistance; + asn_struct_free_f RelDistance_free; + asn_struct_print_f RelDistance_print; + asn_constr_check_f RelDistance_constraint; + ber_type_decoder_f RelDistance_decode_ber; + der_type_encoder_f RelDistance_encode_der; + xer_type_decoder_f RelDistance_decode_xer; + xer_type_encoder_f RelDistance_encode_xer; + per_type_decoder_f RelDistance_decode_uper; + per_type_encoder_f RelDistance_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/RelativeAlt.h b/src/core/libs/supl/asn-rrlp/RelativeAlt.h index da64f5011..22861f7f5 100644 --- a/src/core/libs/supl/asn-rrlp/RelativeAlt.h +++ b/src/core/libs/supl/asn-rrlp/RelativeAlt.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* RelativeAlt */ -typedef long RelativeAlt_t; + /* RelativeAlt */ + typedef long RelativeAlt_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RelativeAlt; -asn_struct_free_f RelativeAlt_free; -asn_struct_print_f RelativeAlt_print; -asn_constr_check_f RelativeAlt_constraint; -ber_type_decoder_f RelativeAlt_decode_ber; -der_type_encoder_f RelativeAlt_encode_der; -xer_type_decoder_f RelativeAlt_decode_xer; -xer_type_encoder_f RelativeAlt_encode_xer; -per_type_decoder_f RelativeAlt_decode_uper; -per_type_encoder_f RelativeAlt_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_RelativeAlt; + asn_struct_free_f RelativeAlt_free; + asn_struct_print_f RelativeAlt_print; + asn_constr_check_f RelativeAlt_constraint; + ber_type_decoder_f RelativeAlt_decode_ber; + der_type_encoder_f RelativeAlt_encode_der; + xer_type_decoder_f RelativeAlt_decode_xer; + xer_type_encoder_f RelativeAlt_encode_xer; + per_type_decoder_f RelativeAlt_decode_uper; + per_type_encoder_f RelativeAlt_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/RequestIndex.h b/src/core/libs/supl/asn-rrlp/RequestIndex.h index 3e5f83aed..177415736 100644 --- a/src/core/libs/supl/asn-rrlp/RequestIndex.h +++ b/src/core/libs/supl/asn-rrlp/RequestIndex.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* RequestIndex */ -typedef long RequestIndex_t; + /* RequestIndex */ + typedef long RequestIndex_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RequestIndex; -asn_struct_free_f RequestIndex_free; -asn_struct_print_f RequestIndex_print; -asn_constr_check_f RequestIndex_constraint; -ber_type_decoder_f RequestIndex_decode_ber; -der_type_encoder_f RequestIndex_encode_der; -xer_type_decoder_f RequestIndex_decode_xer; -xer_type_encoder_f RequestIndex_encode_xer; -per_type_decoder_f RequestIndex_decode_uper; -per_type_encoder_f RequestIndex_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_RequestIndex; + asn_struct_free_f RequestIndex_free; + asn_struct_print_f RequestIndex_print; + asn_constr_check_f RequestIndex_constraint; + ber_type_decoder_f RequestIndex_decode_ber; + der_type_encoder_f RequestIndex_encode_der; + xer_type_decoder_f RequestIndex_decode_xer; + xer_type_encoder_f RequestIndex_encode_xer; + per_type_decoder_f RequestIndex_decode_uper; + per_type_encoder_f RequestIndex_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/RequiredResponseTime.h b/src/core/libs/supl/asn-rrlp/RequiredResponseTime.h index bfa81ffda..f55669f23 100644 --- a/src/core/libs/supl/asn-rrlp/RequiredResponseTime.h +++ b/src/core/libs/supl/asn-rrlp/RequiredResponseTime.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* RequiredResponseTime */ -typedef long RequiredResponseTime_t; + /* RequiredResponseTime */ + typedef long RequiredResponseTime_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RequiredResponseTime; -asn_struct_free_f RequiredResponseTime_free; -asn_struct_print_f RequiredResponseTime_print; -asn_constr_check_f RequiredResponseTime_constraint; -ber_type_decoder_f RequiredResponseTime_decode_ber; -der_type_encoder_f RequiredResponseTime_encode_der; -xer_type_decoder_f RequiredResponseTime_decode_xer; -xer_type_encoder_f RequiredResponseTime_encode_xer; -per_type_decoder_f RequiredResponseTime_decode_uper; -per_type_encoder_f RequiredResponseTime_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_RequiredResponseTime; + asn_struct_free_f RequiredResponseTime_free; + asn_struct_print_f RequiredResponseTime_print; + asn_constr_check_f RequiredResponseTime_constraint; + ber_type_decoder_f RequiredResponseTime_decode_ber; + der_type_encoder_f RequiredResponseTime_encode_der; + xer_type_decoder_f RequiredResponseTime_decode_xer; + xer_type_encoder_f RequiredResponseTime_encode_xer; + per_type_decoder_f RequiredResponseTime_decode_uper; + per_type_encoder_f RequiredResponseTime_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/RoughRTD.h b/src/core/libs/supl/asn-rrlp/RoughRTD.h index 7919d7d6f..59e72aff4 100644 --- a/src/core/libs/supl/asn-rrlp/RoughRTD.h +++ b/src/core/libs/supl/asn-rrlp/RoughRTD.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* RoughRTD */ -typedef long RoughRTD_t; + /* RoughRTD */ + typedef long RoughRTD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RoughRTD; -asn_struct_free_f RoughRTD_free; -asn_struct_print_f RoughRTD_print; -asn_constr_check_f RoughRTD_constraint; -ber_type_decoder_f RoughRTD_decode_ber; -der_type_encoder_f RoughRTD_encode_der; -xer_type_decoder_f RoughRTD_decode_xer; -xer_type_encoder_f RoughRTD_encode_xer; -per_type_decoder_f RoughRTD_decode_uper; -per_type_encoder_f RoughRTD_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_RoughRTD; + asn_struct_free_f RoughRTD_free; + asn_struct_print_f RoughRTD_print; + asn_constr_check_f RoughRTD_constraint; + ber_type_decoder_f RoughRTD_decode_ber; + der_type_encoder_f RoughRTD_encode_der; + xer_type_decoder_f RoughRTD_decode_xer; + xer_type_encoder_f RoughRTD_encode_xer; + per_type_decoder_f RoughRTD_decode_uper; + per_type_encoder_f RoughRTD_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SVID.h b/src/core/libs/supl/asn-rrlp/SVID.h index 51c9dfe94..288162594 100644 --- a/src/core/libs/supl/asn-rrlp/SVID.h +++ b/src/core/libs/supl/asn-rrlp/SVID.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SVID */ -typedef long SVID_t; + /* SVID */ + typedef long SVID_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SVID; -asn_struct_free_f SVID_free; -asn_struct_print_f SVID_print; -asn_constr_check_f SVID_constraint; -ber_type_decoder_f SVID_decode_ber; -der_type_encoder_f SVID_encode_der; -xer_type_decoder_f SVID_decode_xer; -xer_type_encoder_f SVID_encode_xer; -per_type_decoder_f SVID_decode_uper; -per_type_encoder_f SVID_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SVID; + asn_struct_free_f SVID_free; + asn_struct_print_f SVID_print; + asn_constr_check_f SVID_constraint; + ber_type_decoder_f SVID_decode_ber; + der_type_encoder_f SVID_encode_der; + xer_type_decoder_f SVID_decode_xer; + xer_type_encoder_f SVID_encode_xer; + per_type_decoder_f SVID_decode_uper; + per_type_encoder_f SVID_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SVIDMASK.h b/src/core/libs/supl/asn-rrlp/SVIDMASK.h index 936fe8758..0e0e6414b 100644 --- a/src/core/libs/supl/asn-rrlp/SVIDMASK.h +++ b/src/core/libs/supl/asn-rrlp/SVIDMASK.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SVIDMASK */ -typedef BIT_STRING_t SVIDMASK_t; + /* SVIDMASK */ + typedef BIT_STRING_t SVIDMASK_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SVIDMASK; -asn_struct_free_f SVIDMASK_free; -asn_struct_print_f SVIDMASK_print; -asn_constr_check_f SVIDMASK_constraint; -ber_type_decoder_f SVIDMASK_decode_ber; -der_type_encoder_f SVIDMASK_encode_der; -xer_type_decoder_f SVIDMASK_decode_xer; -xer_type_encoder_f SVIDMASK_encode_xer; -per_type_decoder_f SVIDMASK_decode_uper; -per_type_encoder_f SVIDMASK_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SVIDMASK; + asn_struct_free_f SVIDMASK_free; + asn_struct_print_f SVIDMASK_print; + asn_constr_check_f SVIDMASK_constraint; + ber_type_decoder_f SVIDMASK_decode_ber; + der_type_encoder_f SVIDMASK_encode_der; + xer_type_decoder_f SVIDMASK_decode_xer; + xer_type_encoder_f SVIDMASK_encode_xer; + per_type_decoder_f SVIDMASK_decode_uper; + per_type_encoder_f SVIDMASK_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SatElement.h b/src/core/libs/supl/asn-rrlp/SatElement.h index dd9283194..59bcd8888 100644 --- a/src/core/libs/supl/asn-rrlp/SatElement.h +++ b/src/core/libs/supl/asn-rrlp/SatElement.h @@ -16,28 +16,29 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SatElement */ -typedef struct SatElement -{ - SatelliteID_t satelliteID; - long iode; - long udre; - long pseudoRangeCor; - long rangeRateCor; - long deltaPseudoRangeCor2; - long deltaRangeRateCor2; - long deltaPseudoRangeCor3; - long deltaRangeRateCor3; + /* SatElement */ + typedef struct SatElement + { + SatelliteID_t satelliteID; + long iode; + long udre; + long pseudoRangeCor; + long rangeRateCor; + long deltaPseudoRangeCor2; + long deltaRangeRateCor2; + long deltaPseudoRangeCor3; + long deltaRangeRateCor3; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SatElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SatElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SatElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SatElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SatStatus.h b/src/core/libs/supl/asn-rrlp/SatStatus.h index 67e7ebe2c..0673b5cd6 100644 --- a/src/core/libs/supl/asn-rrlp/SatStatus.h +++ b/src/core/libs/supl/asn-rrlp/SatStatus.h @@ -16,40 +16,42 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum SatStatus_PR { - SatStatus_PR_NOTHING, /* No components present */ - SatStatus_PR_newSatelliteAndModelUC, - SatStatus_PR_oldSatelliteAndModel, - SatStatus_PR_newNaviModelUC, - /* Extensions may appear below */ - -} SatStatus_PR; - -/* SatStatus */ -typedef struct SatStatus -{ - SatStatus_PR present; - union SatStatus_u + /* Dependencies */ + typedef enum SatStatus_PR { - UncompressedEphemeris_t newSatelliteAndModelUC; - NULL_t oldSatelliteAndModel; - UncompressedEphemeris_t newNaviModelUC; - /* + SatStatus_PR_NOTHING, /* No components present */ + SatStatus_PR_newSatelliteAndModelUC, + SatStatus_PR_oldSatelliteAndModel, + SatStatus_PR_newNaviModelUC, + /* Extensions may appear below */ + + } SatStatus_PR; + + /* SatStatus */ + typedef struct SatStatus + { + SatStatus_PR present; + union SatStatus_u + { + UncompressedEphemeris_t newSatelliteAndModelUC; + NULL_t oldSatelliteAndModel; + UncompressedEphemeris_t newNaviModelUC; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SatStatus_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SatStatus_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SatStatus; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SatStatus; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SatelliteID.h b/src/core/libs/supl/asn-rrlp/SatelliteID.h index 29907cddb..df5d83a7f 100644 --- a/src/core/libs/supl/asn-rrlp/SatelliteID.h +++ b/src/core/libs/supl/asn-rrlp/SatelliteID.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SatelliteID */ -typedef long SatelliteID_t; + /* SatelliteID */ + typedef long SatelliteID_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SatelliteID; -asn_struct_free_f SatelliteID_free; -asn_struct_print_f SatelliteID_print; -asn_constr_check_f SatelliteID_constraint; -ber_type_decoder_f SatelliteID_decode_ber; -der_type_encoder_f SatelliteID_encode_der; -xer_type_decoder_f SatelliteID_decode_xer; -xer_type_encoder_f SatelliteID_encode_xer; -per_type_decoder_f SatelliteID_decode_uper; -per_type_encoder_f SatelliteID_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SatelliteID; + asn_struct_free_f SatelliteID_free; + asn_struct_print_f SatelliteID_print; + asn_constr_check_f SatelliteID_constraint; + ber_type_decoder_f SatelliteID_decode_ber; + der_type_encoder_f SatelliteID_encode_der; + xer_type_decoder_f SatelliteID_decode_xer; + xer_type_encoder_f SatelliteID_encode_xer; + per_type_decoder_f SatelliteID_decode_uper; + per_type_encoder_f SatelliteID_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOf-BadSatelliteSet.h b/src/core/libs/supl/asn-rrlp/SeqOf-BadSatelliteSet.h index 168b86e76..97c19943f 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOf-BadSatelliteSet.h +++ b/src/core/libs/supl/asn-rrlp/SeqOf-BadSatelliteSet.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SeqOf-BadSatelliteSet */ -typedef struct SeqOf_BadSatelliteSet -{ - A_SEQUENCE_OF(SatelliteID_t) - list; + /* SeqOf-BadSatelliteSet */ + typedef struct SeqOf_BadSatelliteSet + { + A_SEQUENCE_OF(SatelliteID_t) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOf_BadSatelliteSet_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOf_BadSatelliteSet_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOf_BadSatelliteSet; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOf_BadSatelliteSet; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOf-GANSSDataBits.h b/src/core/libs/supl/asn-rrlp/SeqOf-GANSSDataBits.h index 5cce76d3e..87b7a5e48 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOf-GANSSDataBits.h +++ b/src/core/libs/supl/asn-rrlp/SeqOf-GANSSDataBits.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SeqOf-GANSSDataBits */ -typedef struct SeqOf_GANSSDataBits -{ - A_SEQUENCE_OF(GANSSDataBit_t) - list; + /* SeqOf-GANSSDataBits */ + typedef struct SeqOf_GANSSDataBits + { + A_SEQUENCE_OF(GANSSDataBit_t) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOf_GANSSDataBits_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOf_GANSSDataBits_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOf_GANSSDataBits; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOf_GANSSDataBits; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfAcquisElement.h b/src/core/libs/supl/asn-rrlp/SeqOfAcquisElement.h index 880276333..4af9824af 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfAcquisElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfAcquisElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct AcquisElement; + /* Forward declarations */ + struct AcquisElement; -/* SeqOfAcquisElement */ -typedef struct SeqOfAcquisElement -{ - A_SEQUENCE_OF(struct AcquisElement) - list; + /* SeqOfAcquisElement */ + typedef struct SeqOfAcquisElement + { + A_SEQUENCE_OF(struct AcquisElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfAcquisElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfAcquisElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfAcquisElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfAcquisElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfAlmanacElement.h b/src/core/libs/supl/asn-rrlp/SeqOfAlmanacElement.h index 39724b9c2..91ada0e38 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfAlmanacElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfAlmanacElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct AlmanacElement; + /* Forward declarations */ + struct AlmanacElement; -/* SeqOfAlmanacElement */ -typedef struct SeqOfAlmanacElement -{ - A_SEQUENCE_OF(struct AlmanacElement) - list; + /* SeqOfAlmanacElement */ + typedef struct SeqOfAlmanacElement + { + A_SEQUENCE_OF(struct AlmanacElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfAlmanacElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfAlmanacElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfAlmanacElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfAlmanacElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfBadSignalElement.h b/src/core/libs/supl/asn-rrlp/SeqOfBadSignalElement.h index 284ef09c8..a6dda3091 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfBadSignalElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfBadSignalElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct BadSignalElement; + /* Forward declarations */ + struct BadSignalElement; -/* SeqOfBadSignalElement */ -typedef struct SeqOfBadSignalElement -{ - A_SEQUENCE_OF(struct BadSignalElement) - list; + /* SeqOfBadSignalElement */ + typedef struct SeqOfBadSignalElement + { + A_SEQUENCE_OF(struct BadSignalElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfBadSignalElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfBadSignalElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfBadSignalElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfBadSignalElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfDGANSSSgnElement.h b/src/core/libs/supl/asn-rrlp/SeqOfDGANSSSgnElement.h index bd2cce8f0..662a98a7d 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfDGANSSSgnElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfDGANSSSgnElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct DGANSSSgnElement; + /* Forward declarations */ + struct DGANSSSgnElement; -/* SeqOfDGANSSSgnElement */ -typedef struct SeqOfDGANSSSgnElement -{ - A_SEQUENCE_OF(struct DGANSSSgnElement) - list; + /* SeqOfDGANSSSgnElement */ + typedef struct SeqOfDGANSSSgnElement + { + A_SEQUENCE_OF(struct DGANSSSgnElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfDGANSSSgnElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfDGANSSSgnElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfDGANSSSgnElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfDGANSSSgnElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfGANSS-MsrSetElement.h b/src/core/libs/supl/asn-rrlp/SeqOfGANSS-MsrSetElement.h index 87fd6ce92..dadd90007 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfGANSS-MsrSetElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfGANSS-MsrSetElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSS_MsrSetElement; + /* Forward declarations */ + struct GANSS_MsrSetElement; -/* SeqOfGANSS-MsrSetElement */ -typedef struct SeqOfGANSS_MsrSetElement -{ - A_SEQUENCE_OF(struct GANSS_MsrSetElement) - list; + /* SeqOfGANSS-MsrSetElement */ + typedef struct SeqOfGANSS_MsrSetElement + { + A_SEQUENCE_OF(struct GANSS_MsrSetElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfGANSS_MsrSetElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfGANSS_MsrSetElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSS_MsrSetElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSS_MsrSetElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfGANSS-SgnElement.h b/src/core/libs/supl/asn-rrlp/SeqOfGANSS-SgnElement.h index d93b22bd4..b2bbcea2e 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfGANSS-SgnElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfGANSS-SgnElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSS_SgnElement; + /* Forward declarations */ + struct GANSS_SgnElement; -/* SeqOfGANSS-SgnElement */ -typedef struct SeqOfGANSS_SgnElement -{ - A_SEQUENCE_OF(struct GANSS_SgnElement) - list; + /* SeqOfGANSS-SgnElement */ + typedef struct SeqOfGANSS_SgnElement + { + A_SEQUENCE_OF(struct GANSS_SgnElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfGANSS_SgnElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfGANSS_SgnElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSS_SgnElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSS_SgnElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfGANSS-SgnTypeElement.h b/src/core/libs/supl/asn-rrlp/SeqOfGANSS-SgnTypeElement.h index 172a55a3c..1bc77858e 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfGANSS-SgnTypeElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfGANSS-SgnTypeElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSS_SgnTypeElement; + /* Forward declarations */ + struct GANSS_SgnTypeElement; -/* SeqOfGANSS-SgnTypeElement */ -typedef struct SeqOfGANSS_SgnTypeElement -{ - A_SEQUENCE_OF(struct GANSS_SgnTypeElement) - list; + /* SeqOfGANSS-SgnTypeElement */ + typedef struct SeqOfGANSS_SgnTypeElement + { + A_SEQUENCE_OF(struct GANSS_SgnTypeElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfGANSS_SgnTypeElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfGANSS_SgnTypeElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSS_SgnTypeElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSS_SgnTypeElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfGANSSAlmanacElement.h b/src/core/libs/supl/asn-rrlp/SeqOfGANSSAlmanacElement.h index e68203b20..84bcb452b 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfGANSSAlmanacElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfGANSSAlmanacElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSSAlmanacElement; + /* Forward declarations */ + struct GANSSAlmanacElement; -/* SeqOfGANSSAlmanacElement */ -typedef struct SeqOfGANSSAlmanacElement -{ - A_SEQUENCE_OF(struct GANSSAlmanacElement) - list; + /* SeqOfGANSSAlmanacElement */ + typedef struct SeqOfGANSSAlmanacElement + { + A_SEQUENCE_OF(struct GANSSAlmanacElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfGANSSAlmanacElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfGANSSAlmanacElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSSAlmanacElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSSAlmanacElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfGANSSGenericAssistDataElement.h b/src/core/libs/supl/asn-rrlp/SeqOfGANSSGenericAssistDataElement.h index 446e4203c..e9a88f2df 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfGANSSGenericAssistDataElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfGANSSGenericAssistDataElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSSGenericAssistDataElement; + /* Forward declarations */ + struct GANSSGenericAssistDataElement; -/* SeqOfGANSSGenericAssistDataElement */ -typedef struct SeqOfGANSSGenericAssistDataElement -{ - A_SEQUENCE_OF(struct GANSSGenericAssistDataElement) - list; + /* SeqOfGANSSGenericAssistDataElement */ + typedef struct SeqOfGANSSGenericAssistDataElement + { + A_SEQUENCE_OF(struct GANSSGenericAssistDataElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfGANSSGenericAssistDataElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfGANSSGenericAssistDataElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSSGenericAssistDataElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSSGenericAssistDataElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfGANSSRefMeasurementElement.h b/src/core/libs/supl/asn-rrlp/SeqOfGANSSRefMeasurementElement.h index 9f8a74529..71ea6d8ac 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfGANSSRefMeasurementElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfGANSSRefMeasurementElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSSRefMeasurementElement; + /* Forward declarations */ + struct GANSSRefMeasurementElement; -/* SeqOfGANSSRefMeasurementElement */ -typedef struct SeqOfGANSSRefMeasurementElement -{ - A_SEQUENCE_OF(struct GANSSRefMeasurementElement) - list; + /* SeqOfGANSSRefMeasurementElement */ + typedef struct SeqOfGANSSRefMeasurementElement + { + A_SEQUENCE_OF(struct GANSSRefMeasurementElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfGANSSRefMeasurementElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfGANSSRefMeasurementElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSSRefMeasurementElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSSRefMeasurementElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfGANSSSatelliteElement.h b/src/core/libs/supl/asn-rrlp/SeqOfGANSSSatelliteElement.h index 3caae97d3..6f1ad918f 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfGANSSSatelliteElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfGANSSSatelliteElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSSSatelliteElement; + /* Forward declarations */ + struct GANSSSatelliteElement; -/* SeqOfGANSSSatelliteElement */ -typedef struct SeqOfGANSSSatelliteElement -{ - A_SEQUENCE_OF(struct GANSSSatelliteElement) - list; + /* SeqOfGANSSSatelliteElement */ + typedef struct SeqOfGANSSSatelliteElement + { + A_SEQUENCE_OF(struct GANSSSatelliteElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfGANSSSatelliteElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfGANSSSatelliteElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSSSatelliteElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSSSatelliteElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfGANSSTimeModel.h b/src/core/libs/supl/asn-rrlp/SeqOfGANSSTimeModel.h index 973dcfc3a..69294282d 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfGANSSTimeModel.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfGANSSTimeModel.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GANSSTimeModelElement; + /* Forward declarations */ + struct GANSSTimeModelElement; -/* SeqOfGANSSTimeModel */ -typedef struct SeqOfGANSSTimeModel -{ - A_SEQUENCE_OF(struct GANSSTimeModelElement) - list; + /* SeqOfGANSSTimeModel */ + typedef struct SeqOfGANSSTimeModel + { + A_SEQUENCE_OF(struct GANSSTimeModelElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfGANSSTimeModel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfGANSSTimeModel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSSTimeModel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfGANSSTimeModel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfGPS-MsrElement.h b/src/core/libs/supl/asn-rrlp/SeqOfGPS-MsrElement.h index 2f30601ee..6d8816f40 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfGPS-MsrElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfGPS-MsrElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GPS_MsrElement; + /* Forward declarations */ + struct GPS_MsrElement; -/* SeqOfGPS-MsrElement */ -typedef struct SeqOfGPS_MsrElement -{ - A_SEQUENCE_OF(struct GPS_MsrElement) - list; + /* SeqOfGPS-MsrElement */ + typedef struct SeqOfGPS_MsrElement + { + A_SEQUENCE_OF(struct GPS_MsrElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfGPS_MsrElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfGPS_MsrElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfGPS_MsrElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfGPS_MsrElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfGPS-MsrSetElement.h b/src/core/libs/supl/asn-rrlp/SeqOfGPS-MsrSetElement.h index 9c2360142..6a7cf5cb1 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfGPS-MsrSetElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfGPS-MsrSetElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GPS_MsrSetElement; + /* Forward declarations */ + struct GPS_MsrSetElement; -/* SeqOfGPS-MsrSetElement */ -typedef struct SeqOfGPS_MsrSetElement -{ - A_SEQUENCE_OF(struct GPS_MsrSetElement) - list; + /* SeqOfGPS-MsrSetElement */ + typedef struct SeqOfGPS_MsrSetElement + { + A_SEQUENCE_OF(struct GPS_MsrSetElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfGPS_MsrSetElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfGPS_MsrSetElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfGPS_MsrSetElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfGPS_MsrSetElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfMsrAssistBTS-R98-ExpOTD.h b/src/core/libs/supl/asn-rrlp/SeqOfMsrAssistBTS-R98-ExpOTD.h index 238449e80..eda30a58d 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfMsrAssistBTS-R98-ExpOTD.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfMsrAssistBTS-R98-ExpOTD.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct MsrAssistBTS_R98_ExpOTD; + /* Forward declarations */ + struct MsrAssistBTS_R98_ExpOTD; -/* SeqOfMsrAssistBTS-R98-ExpOTD */ -typedef struct SeqOfMsrAssistBTS_R98_ExpOTD -{ - A_SEQUENCE_OF(struct MsrAssistBTS_R98_ExpOTD) - list; + /* SeqOfMsrAssistBTS-R98-ExpOTD */ + typedef struct SeqOfMsrAssistBTS_R98_ExpOTD + { + A_SEQUENCE_OF(struct MsrAssistBTS_R98_ExpOTD) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfMsrAssistBTS_R98_ExpOTD_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfMsrAssistBTS_R98_ExpOTD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfMsrAssistBTS_R98_ExpOTD; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfMsrAssistBTS_R98_ExpOTD; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfMsrAssistBTS.h b/src/core/libs/supl/asn-rrlp/SeqOfMsrAssistBTS.h index eae43b247..6a335b660 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfMsrAssistBTS.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfMsrAssistBTS.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct MsrAssistBTS; + /* Forward declarations */ + struct MsrAssistBTS; -/* SeqOfMsrAssistBTS */ -typedef struct SeqOfMsrAssistBTS -{ - A_SEQUENCE_OF(struct MsrAssistBTS) - list; + /* SeqOfMsrAssistBTS */ + typedef struct SeqOfMsrAssistBTS + { + A_SEQUENCE_OF(struct MsrAssistBTS) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfMsrAssistBTS_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfMsrAssistBTS_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfMsrAssistBTS; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfMsrAssistBTS; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfNavModelElement.h b/src/core/libs/supl/asn-rrlp/SeqOfNavModelElement.h index afa4c5850..65c7c1707 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfNavModelElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfNavModelElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct NavModelElement; + /* Forward declarations */ + struct NavModelElement; -/* SeqOfNavModelElement */ -typedef struct SeqOfNavModelElement -{ - A_SEQUENCE_OF(struct NavModelElement) - list; + /* SeqOfNavModelElement */ + typedef struct SeqOfNavModelElement + { + A_SEQUENCE_OF(struct NavModelElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfNavModelElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfNavModelElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfNavModelElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfNavModelElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfOTD-FirstSetMsrs-R98-Ext.h b/src/core/libs/supl/asn-rrlp/SeqOfOTD-FirstSetMsrs-R98-Ext.h index f17f76fde..5b22e1e2a 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfOTD-FirstSetMsrs-R98-Ext.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfOTD-FirstSetMsrs-R98-Ext.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct OTD_MeasurementWithID; + /* Forward declarations */ + struct OTD_MeasurementWithID; -/* SeqOfOTD-FirstSetMsrs-R98-Ext */ -typedef struct SeqOfOTD_FirstSetMsrs_R98_Ext -{ - A_SEQUENCE_OF(struct OTD_MeasurementWithID) - list; + /* SeqOfOTD-FirstSetMsrs-R98-Ext */ + typedef struct SeqOfOTD_FirstSetMsrs_R98_Ext + { + A_SEQUENCE_OF(struct OTD_MeasurementWithID) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfOTD_FirstSetMsrs_R98_Ext_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfOTD_FirstSetMsrs_R98_Ext_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfOTD_FirstSetMsrs_R98_Ext; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfOTD_FirstSetMsrs_R98_Ext; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfOTD-FirstSetMsrs.h b/src/core/libs/supl/asn-rrlp/SeqOfOTD-FirstSetMsrs.h index 060506790..064613c99 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfOTD-FirstSetMsrs.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfOTD-FirstSetMsrs.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct OTD_MeasurementWithID; + /* Forward declarations */ + struct OTD_MeasurementWithID; -/* SeqOfOTD-FirstSetMsrs */ -typedef struct SeqOfOTD_FirstSetMsrs -{ - A_SEQUENCE_OF(struct OTD_MeasurementWithID) - list; + /* SeqOfOTD-FirstSetMsrs */ + typedef struct SeqOfOTD_FirstSetMsrs + { + A_SEQUENCE_OF(struct OTD_MeasurementWithID) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfOTD_FirstSetMsrs_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfOTD_FirstSetMsrs_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfOTD_FirstSetMsrs; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfOTD_FirstSetMsrs; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfOTD-MsrElementRest.h b/src/core/libs/supl/asn-rrlp/SeqOfOTD-MsrElementRest.h index 7ecd269c7..1fcd622d9 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfOTD-MsrElementRest.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfOTD-MsrElementRest.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct OTD_MsrElementRest; + /* Forward declarations */ + struct OTD_MsrElementRest; -/* SeqOfOTD-MsrElementRest */ -typedef struct SeqOfOTD_MsrElementRest -{ - A_SEQUENCE_OF(struct OTD_MsrElementRest) - list; + /* SeqOfOTD-MsrElementRest */ + typedef struct SeqOfOTD_MsrElementRest + { + A_SEQUENCE_OF(struct OTD_MsrElementRest) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfOTD_MsrElementRest_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfOTD_MsrElementRest_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfOTD_MsrElementRest; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfOTD_MsrElementRest; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfOTD-MsrsOfOtherSets.h b/src/core/libs/supl/asn-rrlp/SeqOfOTD-MsrsOfOtherSets.h index af726f7bb..d07504607 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfOTD-MsrsOfOtherSets.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfOTD-MsrsOfOtherSets.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct OTD_MsrsOfOtherSets; + /* Forward declarations */ + struct OTD_MsrsOfOtherSets; -/* SeqOfOTD-MsrsOfOtherSets */ -typedef struct SeqOfOTD_MsrsOfOtherSets -{ - A_SEQUENCE_OF(struct OTD_MsrsOfOtherSets) - list; + /* SeqOfOTD-MsrsOfOtherSets */ + typedef struct SeqOfOTD_MsrsOfOtherSets + { + A_SEQUENCE_OF(struct OTD_MsrsOfOtherSets) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfOTD_MsrsOfOtherSets_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfOTD_MsrsOfOtherSets_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfOTD_MsrsOfOtherSets; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfOTD_MsrsOfOtherSets; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfReferenceIdentityType.h b/src/core/libs/supl/asn-rrlp/SeqOfReferenceIdentityType.h index 0c82d0216..f5a3c0403 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfReferenceIdentityType.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfReferenceIdentityType.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct ReferenceIdentityType; + /* Forward declarations */ + struct ReferenceIdentityType; -/* SeqOfReferenceIdentityType */ -typedef struct SeqOfReferenceIdentityType -{ - A_SEQUENCE_OF(struct ReferenceIdentityType) - list; + /* SeqOfReferenceIdentityType */ + typedef struct SeqOfReferenceIdentityType + { + A_SEQUENCE_OF(struct ReferenceIdentityType) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfReferenceIdentityType_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfReferenceIdentityType_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfReferenceIdentityType; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfReferenceIdentityType; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfSatElement.h b/src/core/libs/supl/asn-rrlp/SeqOfSatElement.h index 33a816799..096382c3e 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfSatElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfSatElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct SatElement; + /* Forward declarations */ + struct SatElement; -/* SeqOfSatElement */ -typedef struct SeqOfSatElement -{ - A_SEQUENCE_OF(struct SatElement) - list; + /* SeqOfSatElement */ + typedef struct SeqOfSatElement + { + A_SEQUENCE_OF(struct SatElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfSatElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfSatElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfSatElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfSatElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfSgnTypeElement.h b/src/core/libs/supl/asn-rrlp/SeqOfSgnTypeElement.h index 2bbbb4ebe..d106c9c18 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfSgnTypeElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfSgnTypeElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct SgnTypeElement; + /* Forward declarations */ + struct SgnTypeElement; -/* SeqOfSgnTypeElement */ -typedef struct SeqOfSgnTypeElement -{ - A_SEQUENCE_OF(struct SgnTypeElement) - list; + /* SeqOfSgnTypeElement */ + typedef struct SeqOfSgnTypeElement + { + A_SEQUENCE_OF(struct SgnTypeElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfSgnTypeElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfSgnTypeElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfSgnTypeElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfSgnTypeElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfStandardClockModelElement.h b/src/core/libs/supl/asn-rrlp/SeqOfStandardClockModelElement.h index e93466ce7..13b193f5f 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfStandardClockModelElement.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfStandardClockModelElement.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct StandardClockModelElement; + /* Forward declarations */ + struct StandardClockModelElement; -/* SeqOfStandardClockModelElement */ -typedef struct SeqOfStandardClockModelElement -{ - A_SEQUENCE_OF(struct StandardClockModelElement) - list; + /* SeqOfStandardClockModelElement */ + typedef struct SeqOfStandardClockModelElement + { + A_SEQUENCE_OF(struct StandardClockModelElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfStandardClockModelElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfStandardClockModelElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfStandardClockModelElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfStandardClockModelElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfSystemInfoAssistBTS-R98-ExpOTD.h b/src/core/libs/supl/asn-rrlp/SeqOfSystemInfoAssistBTS-R98-ExpOTD.h index ed45e52ac..20aca403e 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfSystemInfoAssistBTS-R98-ExpOTD.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfSystemInfoAssistBTS-R98-ExpOTD.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct SystemInfoAssistBTS_R98_ExpOTD; + /* Forward declarations */ + struct SystemInfoAssistBTS_R98_ExpOTD; -/* SeqOfSystemInfoAssistBTS-R98-ExpOTD */ -typedef struct SeqOfSystemInfoAssistBTS_R98_ExpOTD -{ - A_SEQUENCE_OF(struct SystemInfoAssistBTS_R98_ExpOTD) - list; + /* SeqOfSystemInfoAssistBTS-R98-ExpOTD */ + typedef struct SeqOfSystemInfoAssistBTS_R98_ExpOTD + { + A_SEQUENCE_OF(struct SystemInfoAssistBTS_R98_ExpOTD) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfSystemInfoAssistBTS_R98_ExpOTD_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfSystemInfoAssistBTS_R98_ExpOTD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfSystemInfoAssistBTS_R98_ExpOTD; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfSystemInfoAssistBTS_R98_ExpOTD; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SeqOfSystemInfoAssistBTS.h b/src/core/libs/supl/asn-rrlp/SeqOfSystemInfoAssistBTS.h index f866e35f9..8ab68ffb6 100644 --- a/src/core/libs/supl/asn-rrlp/SeqOfSystemInfoAssistBTS.h +++ b/src/core/libs/supl/asn-rrlp/SeqOfSystemInfoAssistBTS.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct SystemInfoAssistBTS; + /* Forward declarations */ + struct SystemInfoAssistBTS; -/* SeqOfSystemInfoAssistBTS */ -typedef struct SeqOfSystemInfoAssistBTS -{ - A_SEQUENCE_OF(struct SystemInfoAssistBTS) - list; + /* SeqOfSystemInfoAssistBTS */ + typedef struct SeqOfSystemInfoAssistBTS + { + A_SEQUENCE_OF(struct SystemInfoAssistBTS) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SeqOfSystemInfoAssistBTS_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SeqOfSystemInfoAssistBTS_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SeqOfSystemInfoAssistBTS; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SeqOfSystemInfoAssistBTS; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SgnTypeElement.h b/src/core/libs/supl/asn-rrlp/SgnTypeElement.h index 199cad37d..968ee88ef 100644 --- a/src/core/libs/supl/asn-rrlp/SgnTypeElement.h +++ b/src/core/libs/supl/asn-rrlp/SgnTypeElement.h @@ -17,22 +17,23 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SgnTypeElement */ -typedef struct SgnTypeElement -{ - GANSSSignalID_t *ganssSignalID /* OPTIONAL */; - long ganssStatusHealth; - SeqOfDGANSSSgnElement_t dganssSgnList; + /* SgnTypeElement */ + typedef struct SgnTypeElement + { + GANSSSignalID_t *ganssSignalID /* OPTIONAL */; + long ganssStatusHealth; + SeqOfDGANSSSgnElement_t dganssSgnList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SgnTypeElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SgnTypeElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SgnTypeElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SgnTypeElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/StandardClockModelElement.h b/src/core/libs/supl/asn-rrlp/StandardClockModelElement.h index f855d591c..72651dcbd 100644 --- a/src/core/libs/supl/asn-rrlp/StandardClockModelElement.h +++ b/src/core/libs/supl/asn-rrlp/StandardClockModelElement.h @@ -15,29 +15,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* StandardClockModelElement */ -typedef struct StandardClockModelElement -{ - long stanClockTocLSB; - long stanClockAF2; - long stanClockAF1; - long stanClockAF0; - long *stanClockTgd /* OPTIONAL */; - long *stanModelID /* OPTIONAL */; - /* + /* StandardClockModelElement */ + typedef struct StandardClockModelElement + { + long stanClockTocLSB; + long stanClockAF2; + long stanClockAF1; + long stanClockAF0; + long *stanClockTgd /* OPTIONAL */; + long *stanModelID /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} StandardClockModelElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } StandardClockModelElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_StandardClockModelElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_StandardClockModelElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/StdResolution.h b/src/core/libs/supl/asn-rrlp/StdResolution.h index 3364f0bb9..f93fd309d 100644 --- a/src/core/libs/supl/asn-rrlp/StdResolution.h +++ b/src/core/libs/supl/asn-rrlp/StdResolution.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* StdResolution */ -typedef long StdResolution_t; + /* StdResolution */ + typedef long StdResolution_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_StdResolution; -asn_struct_free_f StdResolution_free; -asn_struct_print_f StdResolution_print; -asn_constr_check_f StdResolution_constraint; -ber_type_decoder_f StdResolution_decode_ber; -der_type_encoder_f StdResolution_encode_der; -xer_type_decoder_f StdResolution_decode_xer; -xer_type_encoder_f StdResolution_encode_xer; -per_type_decoder_f StdResolution_decode_uper; -per_type_encoder_f StdResolution_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_StdResolution; + asn_struct_free_f StdResolution_free; + asn_struct_print_f StdResolution_print; + asn_constr_check_f StdResolution_constraint; + ber_type_decoder_f StdResolution_decode_ber; + der_type_encoder_f StdResolution_encode_der; + xer_type_decoder_f StdResolution_decode_xer; + xer_type_encoder_f StdResolution_encode_xer; + per_type_decoder_f StdResolution_decode_uper; + per_type_encoder_f StdResolution_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SystemInfoAssistBTS-R98-ExpOTD.h b/src/core/libs/supl/asn-rrlp/SystemInfoAssistBTS-R98-ExpOTD.h index f5f7e8e5a..99d17a4e1 100644 --- a/src/core/libs/supl/asn-rrlp/SystemInfoAssistBTS-R98-ExpOTD.h +++ b/src/core/libs/supl/asn-rrlp/SystemInfoAssistBTS-R98-ExpOTD.h @@ -16,32 +16,34 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum SystemInfoAssistBTS_R98_ExpOTD_PR { - SystemInfoAssistBTS_R98_ExpOTD_PR_NOTHING, /* No components present */ - SystemInfoAssistBTS_R98_ExpOTD_PR_notPresent, - SystemInfoAssistBTS_R98_ExpOTD_PR_present -} SystemInfoAssistBTS_R98_ExpOTD_PR; - -/* SystemInfoAssistBTS-R98-ExpOTD */ -typedef struct SystemInfoAssistBTS_R98_ExpOTD -{ - SystemInfoAssistBTS_R98_ExpOTD_PR present; - union SystemInfoAssistBTS_R98_ExpOTD_u + /* Dependencies */ + typedef enum SystemInfoAssistBTS_R98_ExpOTD_PR { - NULL_t notPresent; - AssistBTSData_R98_ExpOTD_t present; - } choice; + SystemInfoAssistBTS_R98_ExpOTD_PR_NOTHING, /* No components present */ + SystemInfoAssistBTS_R98_ExpOTD_PR_notPresent, + SystemInfoAssistBTS_R98_ExpOTD_PR_present + } SystemInfoAssistBTS_R98_ExpOTD_PR; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SystemInfoAssistBTS_R98_ExpOTD_t; + /* SystemInfoAssistBTS-R98-ExpOTD */ + typedef struct SystemInfoAssistBTS_R98_ExpOTD + { + SystemInfoAssistBTS_R98_ExpOTD_PR present; + union SystemInfoAssistBTS_R98_ExpOTD_u + { + NULL_t notPresent; + AssistBTSData_R98_ExpOTD_t present; + } choice; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SystemInfoAssistBTS_R98_ExpOTD; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SystemInfoAssistBTS_R98_ExpOTD_t; + + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SystemInfoAssistBTS_R98_ExpOTD; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SystemInfoAssistBTS.h b/src/core/libs/supl/asn-rrlp/SystemInfoAssistBTS.h index 8235b4f6f..1c3012b02 100644 --- a/src/core/libs/supl/asn-rrlp/SystemInfoAssistBTS.h +++ b/src/core/libs/supl/asn-rrlp/SystemInfoAssistBTS.h @@ -16,32 +16,34 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum SystemInfoAssistBTS_PR { - SystemInfoAssistBTS_PR_NOTHING, /* No components present */ - SystemInfoAssistBTS_PR_notPresent, - SystemInfoAssistBTS_PR_present -} SystemInfoAssistBTS_PR; - -/* SystemInfoAssistBTS */ -typedef struct SystemInfoAssistBTS -{ - SystemInfoAssistBTS_PR present; - union SystemInfoAssistBTS_u + /* Dependencies */ + typedef enum SystemInfoAssistBTS_PR { - NULL_t notPresent; - AssistBTSData_t present; - } choice; + SystemInfoAssistBTS_PR_NOTHING, /* No components present */ + SystemInfoAssistBTS_PR_notPresent, + SystemInfoAssistBTS_PR_present + } SystemInfoAssistBTS_PR; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SystemInfoAssistBTS_t; + /* SystemInfoAssistBTS */ + typedef struct SystemInfoAssistBTS + { + SystemInfoAssistBTS_PR present; + union SystemInfoAssistBTS_u + { + NULL_t notPresent; + AssistBTSData_t present; + } choice; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SystemInfoAssistBTS; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SystemInfoAssistBTS_t; + + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SystemInfoAssistBTS; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SystemInfoAssistData-R98-ExpOTD.h b/src/core/libs/supl/asn-rrlp/SystemInfoAssistData-R98-ExpOTD.h index 5d8a63adc..8cf3628a4 100644 --- a/src/core/libs/supl/asn-rrlp/SystemInfoAssistData-R98-ExpOTD.h +++ b/src/core/libs/supl/asn-rrlp/SystemInfoAssistData-R98-ExpOTD.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SystemInfoAssistData-R98-ExpOTD */ -typedef struct SystemInfoAssistData_R98_ExpOTD -{ - SeqOfSystemInfoAssistBTS_R98_ExpOTD_t systemInfoAssistListR98_ExpOTD; + /* SystemInfoAssistData-R98-ExpOTD */ + typedef struct SystemInfoAssistData_R98_ExpOTD + { + SeqOfSystemInfoAssistBTS_R98_ExpOTD_t systemInfoAssistListR98_ExpOTD; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SystemInfoAssistData_R98_ExpOTD_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SystemInfoAssistData_R98_ExpOTD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SystemInfoAssistData_R98_ExpOTD; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SystemInfoAssistData_R98_ExpOTD; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SystemInfoAssistData.h b/src/core/libs/supl/asn-rrlp/SystemInfoAssistData.h index c973ca8e3..ef8051bb8 100644 --- a/src/core/libs/supl/asn-rrlp/SystemInfoAssistData.h +++ b/src/core/libs/supl/asn-rrlp/SystemInfoAssistData.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SystemInfoAssistData */ -typedef struct SystemInfoAssistData -{ - SeqOfSystemInfoAssistBTS_t systemInfoAssistList; + /* SystemInfoAssistData */ + typedef struct SystemInfoAssistData + { + SeqOfSystemInfoAssistBTS_t systemInfoAssistList; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SystemInfoAssistData_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SystemInfoAssistData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SystemInfoAssistData; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SystemInfoAssistData; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/SystemInfoIndex.h b/src/core/libs/supl/asn-rrlp/SystemInfoIndex.h index 1ff1e46c8..3be83da8e 100644 --- a/src/core/libs/supl/asn-rrlp/SystemInfoIndex.h +++ b/src/core/libs/supl/asn-rrlp/SystemInfoIndex.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SystemInfoIndex */ -typedef long SystemInfoIndex_t; + /* SystemInfoIndex */ + typedef long SystemInfoIndex_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SystemInfoIndex; -asn_struct_free_f SystemInfoIndex_free; -asn_struct_print_f SystemInfoIndex_print; -asn_constr_check_f SystemInfoIndex_constraint; -ber_type_decoder_f SystemInfoIndex_decode_ber; -der_type_encoder_f SystemInfoIndex_encode_der; -xer_type_decoder_f SystemInfoIndex_decode_xer; -xer_type_encoder_f SystemInfoIndex_encode_xer; -per_type_decoder_f SystemInfoIndex_decode_uper; -per_type_encoder_f SystemInfoIndex_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SystemInfoIndex; + asn_struct_free_f SystemInfoIndex_free; + asn_struct_print_f SystemInfoIndex_print; + asn_constr_check_f SystemInfoIndex_constraint; + ber_type_decoder_f SystemInfoIndex_decode_ber; + der_type_encoder_f SystemInfoIndex_encode_der; + xer_type_decoder_f SystemInfoIndex_decode_xer; + xer_type_encoder_f SystemInfoIndex_encode_xer; + per_type_decoder_f SystemInfoIndex_decode_uper; + per_type_encoder_f SystemInfoIndex_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/TA0.h b/src/core/libs/supl/asn-rrlp/TA0.h index 2d4fe6fb4..69c7a4e3e 100644 --- a/src/core/libs/supl/asn-rrlp/TA0.h +++ b/src/core/libs/supl/asn-rrlp/TA0.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* TA0 */ -typedef long TA0_t; + /* TA0 */ + typedef long TA0_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TA0; -asn_struct_free_f TA0_free; -asn_struct_print_f TA0_print; -asn_constr_check_f TA0_constraint; -ber_type_decoder_f TA0_decode_ber; -der_type_encoder_f TA0_encode_der; -xer_type_decoder_f TA0_decode_xer; -xer_type_encoder_f TA0_encode_xer; -per_type_decoder_f TA0_decode_uper; -per_type_encoder_f TA0_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_TA0; + asn_struct_free_f TA0_free; + asn_struct_print_f TA0_print; + asn_constr_check_f TA0_constraint; + ber_type_decoder_f TA0_decode_ber; + der_type_encoder_f TA0_encode_der; + xer_type_decoder_f TA0_decode_xer; + xer_type_encoder_f TA0_encode_xer; + per_type_decoder_f TA0_decode_uper; + per_type_encoder_f TA0_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/TA1.h b/src/core/libs/supl/asn-rrlp/TA1.h index 9e22cd61d..7ea57155e 100644 --- a/src/core/libs/supl/asn-rrlp/TA1.h +++ b/src/core/libs/supl/asn-rrlp/TA1.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* TA1 */ -typedef long TA1_t; + /* TA1 */ + typedef long TA1_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TA1; -asn_struct_free_f TA1_free; -asn_struct_print_f TA1_print; -asn_constr_check_f TA1_constraint; -ber_type_decoder_f TA1_decode_ber; -der_type_encoder_f TA1_encode_der; -xer_type_decoder_f TA1_decode_xer; -xer_type_encoder_f TA1_encode_xer; -per_type_decoder_f TA1_decode_uper; -per_type_encoder_f TA1_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_TA1; + asn_struct_free_f TA1_free; + asn_struct_print_f TA1_print; + asn_constr_check_f TA1_constraint; + ber_type_decoder_f TA1_decode_ber; + der_type_encoder_f TA1_encode_der; + xer_type_decoder_f TA1_decode_xer; + xer_type_encoder_f TA1_encode_xer; + per_type_decoder_f TA1_decode_uper; + per_type_encoder_f TA1_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/TA2.h b/src/core/libs/supl/asn-rrlp/TA2.h index 4e2b07ea3..78ec5b528 100644 --- a/src/core/libs/supl/asn-rrlp/TA2.h +++ b/src/core/libs/supl/asn-rrlp/TA2.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* TA2 */ -typedef long TA2_t; + /* TA2 */ + typedef long TA2_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TA2; -asn_struct_free_f TA2_free; -asn_struct_print_f TA2_print; -asn_constr_check_f TA2_constraint; -ber_type_decoder_f TA2_decode_ber; -der_type_encoder_f TA2_encode_der; -xer_type_decoder_f TA2_decode_xer; -xer_type_encoder_f TA2_encode_xer; -per_type_decoder_f TA2_decode_uper; -per_type_encoder_f TA2_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_TA2; + asn_struct_free_f TA2_free; + asn_struct_print_f TA2_print; + asn_constr_check_f TA2_constraint; + ber_type_decoder_f TA2_decode_ber; + der_type_encoder_f TA2_encode_der; + xer_type_decoder_f TA2_decode_xer; + xer_type_encoder_f TA2_encode_xer; + per_type_decoder_f TA2_decode_uper; + per_type_encoder_f TA2_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/TLMReservedBits.h b/src/core/libs/supl/asn-rrlp/TLMReservedBits.h index da77abfd5..ee52c807b 100644 --- a/src/core/libs/supl/asn-rrlp/TLMReservedBits.h +++ b/src/core/libs/supl/asn-rrlp/TLMReservedBits.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* TLMReservedBits */ -typedef long TLMReservedBits_t; + /* TLMReservedBits */ + typedef long TLMReservedBits_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TLMReservedBits; -asn_struct_free_f TLMReservedBits_free; -asn_struct_print_f TLMReservedBits_print; -asn_constr_check_f TLMReservedBits_constraint; -ber_type_decoder_f TLMReservedBits_decode_ber; -der_type_encoder_f TLMReservedBits_encode_der; -xer_type_decoder_f TLMReservedBits_decode_xer; -xer_type_encoder_f TLMReservedBits_encode_xer; -per_type_decoder_f TLMReservedBits_decode_uper; -per_type_encoder_f TLMReservedBits_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_TLMReservedBits; + asn_struct_free_f TLMReservedBits_free; + asn_struct_print_f TLMReservedBits_print; + asn_constr_check_f TLMReservedBits_constraint; + ber_type_decoder_f TLMReservedBits_decode_ber; + der_type_encoder_f TLMReservedBits_encode_der; + xer_type_decoder_f TLMReservedBits_decode_xer; + xer_type_encoder_f TLMReservedBits_encode_xer; + per_type_decoder_f TLMReservedBits_decode_uper; + per_type_encoder_f TLMReservedBits_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/TLMWord.h b/src/core/libs/supl/asn-rrlp/TLMWord.h index cc4a2b957..9b3ad8438 100644 --- a/src/core/libs/supl/asn-rrlp/TLMWord.h +++ b/src/core/libs/supl/asn-rrlp/TLMWord.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* TLMWord */ -typedef long TLMWord_t; + /* TLMWord */ + typedef long TLMWord_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TLMWord; -asn_struct_free_f TLMWord_free; -asn_struct_print_f TLMWord_print; -asn_constr_check_f TLMWord_constraint; -ber_type_decoder_f TLMWord_decode_ber; -der_type_encoder_f TLMWord_encode_der; -xer_type_decoder_f TLMWord_decode_xer; -xer_type_encoder_f TLMWord_encode_xer; -per_type_decoder_f TLMWord_decode_uper; -per_type_encoder_f TLMWord_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_TLMWord; + asn_struct_free_f TLMWord_free; + asn_struct_print_f TLMWord_print; + asn_constr_check_f TLMWord_constraint; + ber_type_decoder_f TLMWord_decode_ber; + der_type_encoder_f TLMWord_encode_der; + xer_type_decoder_f TLMWord_decode_xer; + xer_type_encoder_f TLMWord_encode_xer; + per_type_decoder_f TLMWord_decode_uper; + per_type_encoder_f TLMWord_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/TOA-MeasurementsOfRef.h b/src/core/libs/supl/asn-rrlp/TOA-MeasurementsOfRef.h index d64ccc146..0df538d54 100644 --- a/src/core/libs/supl/asn-rrlp/TOA-MeasurementsOfRef.h +++ b/src/core/libs/supl/asn-rrlp/TOA-MeasurementsOfRef.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* TOA-MeasurementsOfRef */ -typedef struct TOA_MeasurementsOfRef -{ - RefQuality_t refQuality; - NumOfMeasurements_t numOfMeasurements; + /* TOA-MeasurementsOfRef */ + typedef struct TOA_MeasurementsOfRef + { + RefQuality_t refQuality; + NumOfMeasurements_t numOfMeasurements; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} TOA_MeasurementsOfRef_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } TOA_MeasurementsOfRef_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TOA_MeasurementsOfRef; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_TOA_MeasurementsOfRef; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/TimeRelation.h b/src/core/libs/supl/asn-rrlp/TimeRelation.h index bae44470e..d6cbb5302 100644 --- a/src/core/libs/supl/asn-rrlp/TimeRelation.h +++ b/src/core/libs/supl/asn-rrlp/TimeRelation.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct GSMTime; + /* Forward declarations */ + struct GSMTime; -/* TimeRelation */ -typedef struct TimeRelation -{ - GPSTOW23b_t gpsTOW; - struct GSMTime *gsmTime /* OPTIONAL */; + /* TimeRelation */ + typedef struct TimeRelation + { + GPSTOW23b_t gpsTOW; + struct GSMTime *gsmTime /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} TimeRelation_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } TimeRelation_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TimeRelation; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_TimeRelation; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/TimeSlot.h b/src/core/libs/supl/asn-rrlp/TimeSlot.h index b65748fdd..2d91de034 100644 --- a/src/core/libs/supl/asn-rrlp/TimeSlot.h +++ b/src/core/libs/supl/asn-rrlp/TimeSlot.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* TimeSlot */ -typedef long TimeSlot_t; + /* TimeSlot */ + typedef long TimeSlot_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TimeSlot; -asn_struct_free_f TimeSlot_free; -asn_struct_print_f TimeSlot_print; -asn_constr_check_f TimeSlot_constraint; -ber_type_decoder_f TimeSlot_decode_ber; -der_type_encoder_f TimeSlot_encode_der; -xer_type_decoder_f TimeSlot_decode_xer; -xer_type_encoder_f TimeSlot_encode_xer; -per_type_decoder_f TimeSlot_decode_uper; -per_type_encoder_f TimeSlot_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_TimeSlot; + asn_struct_free_f TimeSlot_free; + asn_struct_print_f TimeSlot_print; + asn_constr_check_f TimeSlot_constraint; + ber_type_decoder_f TimeSlot_decode_ber; + der_type_encoder_f TimeSlot_encode_der; + xer_type_decoder_f TimeSlot_decode_xer; + xer_type_encoder_f TimeSlot_encode_xer; + per_type_decoder_f TimeSlot_decode_uper; + per_type_encoder_f TimeSlot_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/TimeSlotScheme.h b/src/core/libs/supl/asn-rrlp/TimeSlotScheme.h index 2b8bfce4b..23e060a13 100644 --- a/src/core/libs/supl/asn-rrlp/TimeSlotScheme.h +++ b/src/core/libs/supl/asn-rrlp/TimeSlotScheme.h @@ -14,29 +14,31 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum TimeSlotScheme { - TimeSlotScheme_equalLength = 0, - TimeSlotScheme_variousLength = 1 -} e_TimeSlotScheme; + /* Dependencies */ + typedef enum TimeSlotScheme + { + TimeSlotScheme_equalLength = 0, + TimeSlotScheme_variousLength = 1 + } e_TimeSlotScheme; -/* TimeSlotScheme */ -typedef ENUMERATED_t TimeSlotScheme_t; + /* TimeSlotScheme */ + typedef ENUMERATED_t TimeSlotScheme_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TimeSlotScheme; -asn_struct_free_f TimeSlotScheme_free; -asn_struct_print_f TimeSlotScheme_print; -asn_constr_check_f TimeSlotScheme_constraint; -ber_type_decoder_f TimeSlotScheme_decode_ber; -der_type_encoder_f TimeSlotScheme_encode_der; -xer_type_decoder_f TimeSlotScheme_decode_xer; -xer_type_encoder_f TimeSlotScheme_encode_xer; -per_type_decoder_f TimeSlotScheme_decode_uper; -per_type_encoder_f TimeSlotScheme_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_TimeSlotScheme; + asn_struct_free_f TimeSlotScheme_free; + asn_struct_print_f TimeSlotScheme_print; + asn_constr_check_f TimeSlotScheme_constraint; + ber_type_decoder_f TimeSlotScheme_decode_ber; + der_type_encoder_f TimeSlotScheme_encode_der; + xer_type_decoder_f TimeSlotScheme_decode_xer; + xer_type_encoder_f TimeSlotScheme_encode_xer; + per_type_decoder_f TimeSlotScheme_decode_uper; + per_type_encoder_f TimeSlotScheme_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/UTCModel.h b/src/core/libs/supl/asn-rrlp/UTCModel.h index f8cf4e2f7..cd96de255 100644 --- a/src/core/libs/supl/asn-rrlp/UTCModel.h +++ b/src/core/libs/supl/asn-rrlp/UTCModel.h @@ -15,27 +15,28 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* UTCModel */ -typedef struct UTCModel -{ - long utcA1; - long utcA0; - long utcTot; - long utcWNt; - long utcDeltaTls; - long utcWNlsf; - long utcDN; - long utcDeltaTlsf; + /* UTCModel */ + typedef struct UTCModel + { + long utcA1; + long utcA0; + long utcTot; + long utcWNt; + long utcDeltaTls; + long utcWNlsf; + long utcDN; + long utcDeltaTlsf; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} UTCModel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } UTCModel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_UTCModel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_UTCModel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/UlPseudoSegInd.h b/src/core/libs/supl/asn-rrlp/UlPseudoSegInd.h index 74ecc0bbe..2f7bc4547 100644 --- a/src/core/libs/supl/asn-rrlp/UlPseudoSegInd.h +++ b/src/core/libs/supl/asn-rrlp/UlPseudoSegInd.h @@ -14,29 +14,31 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum UlPseudoSegInd { - UlPseudoSegInd_firstOfMany = 0, - UlPseudoSegInd_secondOfMany = 1 -} e_UlPseudoSegInd; + /* Dependencies */ + typedef enum UlPseudoSegInd + { + UlPseudoSegInd_firstOfMany = 0, + UlPseudoSegInd_secondOfMany = 1 + } e_UlPseudoSegInd; -/* UlPseudoSegInd */ -typedef ENUMERATED_t UlPseudoSegInd_t; + /* UlPseudoSegInd */ + typedef ENUMERATED_t UlPseudoSegInd_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_UlPseudoSegInd; -asn_struct_free_f UlPseudoSegInd_free; -asn_struct_print_f UlPseudoSegInd_print; -asn_constr_check_f UlPseudoSegInd_constraint; -ber_type_decoder_f UlPseudoSegInd_decode_ber; -der_type_encoder_f UlPseudoSegInd_encode_der; -xer_type_decoder_f UlPseudoSegInd_decode_xer; -xer_type_encoder_f UlPseudoSegInd_encode_xer; -per_type_decoder_f UlPseudoSegInd_decode_uper; -per_type_encoder_f UlPseudoSegInd_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_UlPseudoSegInd; + asn_struct_free_f UlPseudoSegInd_free; + asn_struct_print_f UlPseudoSegInd_print; + asn_constr_check_f UlPseudoSegInd_constraint; + ber_type_decoder_f UlPseudoSegInd_decode_ber; + der_type_encoder_f UlPseudoSegInd_encode_der; + xer_type_decoder_f UlPseudoSegInd_decode_xer; + xer_type_encoder_f UlPseudoSegInd_encode_xer; + per_type_decoder_f UlPseudoSegInd_decode_uper; + per_type_encoder_f UlPseudoSegInd_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/UncompressedEphemeris.h b/src/core/libs/supl/asn-rrlp/UncompressedEphemeris.h index 78038335d..d994f4805 100644 --- a/src/core/libs/supl/asn-rrlp/UncompressedEphemeris.h +++ b/src/core/libs/supl/asn-rrlp/UncompressedEphemeris.h @@ -16,50 +16,51 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* UncompressedEphemeris */ -typedef struct UncompressedEphemeris -{ - long ephemCodeOnL2; - long ephemURA; - long ephemSVhealth; - long ephemIODC; - long ephemL2Pflag; - EphemerisSubframe1Reserved_t ephemSF1Rsvd; - long ephemTgd; - long ephemToc; - long ephemAF2; - long ephemAF1; - long ephemAF0; - long ephemCrs; - long ephemDeltaN; - long ephemM0; - long ephemCuc; - unsigned long ephemE; - long ephemCus; - unsigned long ephemAPowerHalf; - long ephemToe; - long ephemFitFlag; - long ephemAODA; - long ephemCic; - long ephemOmegaA0; - long ephemCis; - long ephemI0; - long ephemCrc; - long ephemW; - long ephemOmegaADot; - long ephemIDot; + /* UncompressedEphemeris */ + typedef struct UncompressedEphemeris + { + long ephemCodeOnL2; + long ephemURA; + long ephemSVhealth; + long ephemIODC; + long ephemL2Pflag; + EphemerisSubframe1Reserved_t ephemSF1Rsvd; + long ephemTgd; + long ephemToc; + long ephemAF2; + long ephemAF1; + long ephemAF0; + long ephemCrs; + long ephemDeltaN; + long ephemM0; + long ephemCuc; + unsigned long ephemE; + long ephemCus; + unsigned long ephemAPowerHalf; + long ephemToe; + long ephemFitFlag; + long ephemAODA; + long ephemCic; + long ephemOmegaA0; + long ephemCis; + long ephemI0; + long ephemCrc; + long ephemW; + long ephemOmegaADot; + long ephemIDot; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} UncompressedEphemeris_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } UncompressedEphemeris_t; -/* Implementation */ -/* extern asn_TYPE_descriptor_t asn_DEF_ephemE_17; // (Use -fall-defs-global to expose) */ -/* extern asn_TYPE_descriptor_t asn_DEF_ephemAPowerHalf_19; // (Use -fall-defs-global to expose) */ -extern asn_TYPE_descriptor_t asn_DEF_UncompressedEphemeris; + /* Implementation */ + /* extern asn_TYPE_descriptor_t asn_DEF_ephemE_17; // (Use -fall-defs-global to expose) */ + /* extern asn_TYPE_descriptor_t asn_DEF_ephemAPowerHalf_19; // (Use -fall-defs-global to expose) */ + extern asn_TYPE_descriptor_t asn_DEF_UncompressedEphemeris; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/UseMultipleSets.h b/src/core/libs/supl/asn-rrlp/UseMultipleSets.h index 5027fd7d9..45136278c 100644 --- a/src/core/libs/supl/asn-rrlp/UseMultipleSets.h +++ b/src/core/libs/supl/asn-rrlp/UseMultipleSets.h @@ -14,29 +14,31 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum UseMultipleSets { - UseMultipleSets_multipleSets = 0, - UseMultipleSets_oneSet = 1 -} e_UseMultipleSets; + /* Dependencies */ + typedef enum UseMultipleSets + { + UseMultipleSets_multipleSets = 0, + UseMultipleSets_oneSet = 1 + } e_UseMultipleSets; -/* UseMultipleSets */ -typedef ENUMERATED_t UseMultipleSets_t; + /* UseMultipleSets */ + typedef ENUMERATED_t UseMultipleSets_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_UseMultipleSets; -asn_struct_free_f UseMultipleSets_free; -asn_struct_print_f UseMultipleSets_print; -asn_constr_check_f UseMultipleSets_constraint; -ber_type_decoder_f UseMultipleSets_decode_ber; -der_type_encoder_f UseMultipleSets_encode_der; -xer_type_decoder_f UseMultipleSets_decode_xer; -xer_type_encoder_f UseMultipleSets_encode_xer; -per_type_decoder_f UseMultipleSets_decode_uper; -per_type_encoder_f UseMultipleSets_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_UseMultipleSets; + asn_struct_free_f UseMultipleSets_free; + asn_struct_print_f UseMultipleSets_print; + asn_constr_check_f UseMultipleSets_constraint; + ber_type_decoder_f UseMultipleSets_decode_ber; + der_type_encoder_f UseMultipleSets_encode_der; + xer_type_decoder_f UseMultipleSets_decode_xer; + xer_type_encoder_f UseMultipleSets_encode_xer; + per_type_decoder_f UseMultipleSets_decode_uper; + per_type_encoder_f UseMultipleSets_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/VelocityEstimate.h b/src/core/libs/supl/asn-rrlp/VelocityEstimate.h index 4b5e941b1..0ef92f9a5 100644 --- a/src/core/libs/supl/asn-rrlp/VelocityEstimate.h +++ b/src/core/libs/supl/asn-rrlp/VelocityEstimate.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* VelocityEstimate */ -typedef INTEGER_t VelocityEstimate_t; + /* VelocityEstimate */ + typedef INTEGER_t VelocityEstimate_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_VelocityEstimate; -asn_struct_free_f VelocityEstimate_free; -asn_struct_print_f VelocityEstimate_print; -asn_constr_check_f VelocityEstimate_constraint; -ber_type_decoder_f VelocityEstimate_decode_ber; -der_type_encoder_f VelocityEstimate_encode_der; -xer_type_decoder_f VelocityEstimate_decode_xer; -xer_type_encoder_f VelocityEstimate_encode_xer; -per_type_decoder_f VelocityEstimate_decode_uper; -per_type_encoder_f VelocityEstimate_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_VelocityEstimate; + asn_struct_free_f VelocityEstimate_free; + asn_struct_print_f VelocityEstimate_print; + asn_constr_check_f VelocityEstimate_constraint; + ber_type_decoder_f VelocityEstimate_decode_ber; + der_type_encoder_f VelocityEstimate_encode_der; + xer_type_decoder_f VelocityEstimate_decode_xer; + xer_type_encoder_f VelocityEstimate_encode_xer; + per_type_decoder_f VelocityEstimate_decode_uper; + per_type_encoder_f VelocityEstimate_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/asn_SEQUENCE_OF.h b/src/core/libs/supl/asn-rrlp/asn_SEQUENCE_OF.h index 51d1b44dd..2ad8287a0 100644 --- a/src/core/libs/supl/asn-rrlp/asn_SEQUENCE_OF.h +++ b/src/core/libs/supl/asn-rrlp/asn_SEQUENCE_OF.h @@ -8,7 +8,8 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif /* @@ -21,27 +22,27 @@ extern "C" { #define ASN_SEQUENCE_ADD(headptr, ptr) \ asn_sequence_add((headptr), (ptr)) -/*********************************************** + /*********************************************** * Implementation of the SEQUENCE OF structure. */ #define asn_sequence_add asn_set_add #define asn_sequence_empty asn_set_empty -/* + /* * Delete the element from the set by its number (base 0). * This is NOT a constant-time operation. * The order of elements is preserved. * If _do_free is given AND the (*free) is initialized, the element * will be freed using the custom (*free) function as well. */ -void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free); + void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free); -/* + /* * Cope with different conversions requirements to/from void in C and C++. * This is mostly useful for support library. */ -typedef A_SEQUENCE_OF(void) asn_anonymous_sequence_; + typedef A_SEQUENCE_OF(void) asn_anonymous_sequence_; #define _A_SEQUENCE_FROM_VOID(ptr) ((asn_anonymous_sequence_ *)(ptr)) #define _A_CSEQUENCE_FROM_VOID(ptr) ((const asn_anonymous_sequence_ *)(ptr)) diff --git a/src/core/libs/supl/asn-rrlp/asn_SET_OF.h b/src/core/libs/supl/asn-rrlp/asn_SET_OF.h index 5b443872b..0edc0abc4 100644 --- a/src/core/libs/supl/asn-rrlp/asn_SET_OF.h +++ b/src/core/libs/supl/asn-rrlp/asn_SET_OF.h @@ -6,7 +6,8 @@ #define ASN_SET_OF_H #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif #define A_SET_OF(type) \ @@ -21,18 +22,18 @@ extern "C" { #define ASN_SET_ADD(headptr, ptr) \ asn_set_add((headptr), (ptr)) -/******************************************* + /******************************************* * Implementation of the SET OF structure. */ -/* + /* * Add another structure into the set by its pointer. * RETURN VALUES: * 0 for success and -1/errno for failure. */ -int asn_set_add(void *asn_set_of_x, void *ptr); + int asn_set_add(void *asn_set_of_x, void *ptr); -/* + /* * Delete the element from the set by its number (base 0). * This is a constant-time operation. The order of elements before the * deleted ones is guaranteed, the order of elements after the deleted @@ -40,19 +41,19 @@ int asn_set_add(void *asn_set_of_x, void *ptr); * If _do_free is given AND the (*free) is initialized, the element * will be freed using the custom (*free) function as well. */ -void asn_set_del(void *asn_set_of_x, int number, int _do_free); + void asn_set_del(void *asn_set_of_x, int number, int _do_free); -/* + /* * Empty the contents of the set. Will free the elements, if (*free) is given. * Will NOT free the set itself. */ -void asn_set_empty(void *asn_set_of_x); + void asn_set_empty(void *asn_set_of_x); -/* + /* * Cope with different conversions requirements to/from void in C and C++. * This is mostly useful for support library. */ -typedef A_SET_OF(void) asn_anonymous_set_; + typedef A_SET_OF(void) asn_anonymous_set_; #define _A_SET_FROM_VOID(ptr) ((asn_anonymous_set_ *)(ptr)) #define _A_CSET_FROM_VOID(ptr) ((const asn_anonymous_set_ *)(ptr)) diff --git a/src/core/libs/supl/asn-rrlp/asn_application.h b/src/core/libs/supl/asn-rrlp/asn_application.h index b226de7a9..43904afb0 100644 --- a/src/core/libs/supl/asn-rrlp/asn_application.h +++ b/src/core/libs/supl/asn-rrlp/asn_application.h @@ -12,20 +12,21 @@ #include "asn_codecs.h" /* for ASN.1 codecs specifics */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* + /* * Generic type of an application-defined callback to return various * types of data to the application. * EXPECTED RETURN VALUES: * -1: Failed to consume bytes. Abort the mission. * Non-negative return values indicate success, and ignored. */ -typedef int(asn_app_consume_bytes_f)(const void *buffer, size_t size, - void *application_specific_key); + typedef int(asn_app_consume_bytes_f)(const void *buffer, size_t size, + void *application_specific_key); -/* + /* * A callback of this type is called whenever constraint validation fails * on some ASN.1 type. See "constraints.h" for more details on constraint * validation. @@ -33,10 +34,10 @@ typedef int(asn_app_consume_bytes_f)(const void *buffer, size_t size, * the constraint check, as well as human readable message on what * particular constraint has failed. */ -typedef void(asn_app_constraint_failed_f)(void *application_specific_key, - struct asn_TYPE_descriptor_s *type_descriptor_which_failed, - const void *structure_which_failed_ptr, - const char *error_message_format, ...) GCC_PRINTFLIKE(4, 5); + typedef void(asn_app_constraint_failed_f)(void *application_specific_key, + struct asn_TYPE_descriptor_s *type_descriptor_which_failed, + const void *structure_which_failed_ptr, + const char *error_message_format, ...) GCC_PRINTFLIKE(4, 5); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/asn_codecs.h b/src/core/libs/supl/asn-rrlp/asn_codecs.h index 3a43d2d9f..717336ed5 100644 --- a/src/core/libs/supl/asn-rrlp/asn_codecs.h +++ b/src/core/libs/supl/asn-rrlp/asn_codecs.h @@ -7,12 +7,13 @@ #define _ASN_CODECS_H_ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* + /* * This structure defines a set of parameters that may be passed * to every ASN.1 encoder or decoder function. * WARNING: if max_stack_size member is set, and you are calling the @@ -21,9 +22,9 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */ * If you can't always satisfy this requirement, use ber_decode(), * xer_decode() and uper_decode() functions instead. */ -typedef struct asn_codec_ctx_s -{ - /* + typedef struct asn_codec_ctx_s + { + /* * Limit the decoder routines to use no (much) more stack than a given * number of bytes. Most of decoders are stack-based, and this * would protect against stack overflows if the number of nested @@ -34,31 +35,31 @@ typedef struct asn_codec_ctx_s * this variable. Be careful in multithreaded environments, as the * stack size is rather limited. */ - size_t max_stack_size; /* 0 disables stack bounds checking */ -} asn_codec_ctx_t; + size_t max_stack_size; /* 0 disables stack bounds checking */ + } asn_codec_ctx_t; -/* + /* * Type of the return value of the encoding functions (der_encode, xer_encode). */ -typedef struct asn_enc_rval_s -{ - /* + typedef struct asn_enc_rval_s + { + /* * Number of bytes encoded. * -1 indicates failure to encode the structure. * In this case, the members below this one are meaningful. */ - ssize_t encoded; + ssize_t encoded; - /* + /* * Members meaningful when (encoded == -1), for post mortem analysis. */ - /* Type which cannot be encoded */ - struct asn_TYPE_descriptor_s *failed_type; + /* Type which cannot be encoded */ + struct asn_TYPE_descriptor_s *failed_type; - /* Pointer to the structure of that type */ - void *structure_ptr; -} asn_enc_rval_t; + /* Pointer to the structure of that type */ + void *structure_ptr; + } asn_enc_rval_t; #define _ASN_ENCODE_FAILED \ do \ { \ @@ -79,7 +80,7 @@ typedef struct asn_enc_rval_s } \ while (0) -/* + /* * Type of the return value of the decoding functions (ber_decode, xer_decode) * * Please note that the number of consumed bytes is ALWAYS meaningful, @@ -87,17 +88,17 @@ typedef struct asn_enc_rval_s * decoded bytes, hence providing a possibility to fail with more diagnostics * (i.e., print the offending remainder of the buffer). */ -enum asn_dec_rval_code_e -{ - RC_OK, /* Decoded successfully */ - RC_WMORE, /* More data expected, call again */ - RC_FAIL /* Failure to decode data */ -}; -typedef struct asn_dec_rval_s -{ - enum asn_dec_rval_code_e code; /* Result code */ - size_t consumed; /* Number of bytes consumed */ -} asn_dec_rval_t; + enum asn_dec_rval_code_e + { + RC_OK, /* Decoded successfully */ + RC_WMORE, /* More data expected, call again */ + RC_FAIL /* Failure to decode data */ + }; + typedef struct asn_dec_rval_s + { + enum asn_dec_rval_code_e code; /* Result code */ + size_t consumed; /* Number of bytes consumed */ + } asn_dec_rval_t; #define _ASN_DECODE_FAILED \ do \ { \ diff --git a/src/core/libs/supl/asn-rrlp/asn_codecs_prim.h b/src/core/libs/supl/asn-rrlp/asn_codecs_prim.h index 8036f6457..cb8c37937 100644 --- a/src/core/libs/supl/asn-rrlp/asn_codecs_prim.h +++ b/src/core/libs/supl/asn-rrlp/asn_codecs_prim.h @@ -8,43 +8,44 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef struct ASN__PRIMITIVE_TYPE_s -{ - uint8_t *buf; /* Buffer with consecutive primitive encoding bytes */ - int size; /* Size of the buffer */ -} ASN__PRIMITIVE_TYPE_t; /* Do not use this type directly! */ + typedef struct ASN__PRIMITIVE_TYPE_s + { + uint8_t *buf; /* Buffer with consecutive primitive encoding bytes */ + int size; /* Size of the buffer */ + } ASN__PRIMITIVE_TYPE_t; /* Do not use this type directly! */ -asn_struct_free_f ASN__PRIMITIVE_TYPE_free; -ber_type_decoder_f ber_decode_primitive; -der_type_encoder_f der_encode_primitive; + asn_struct_free_f ASN__PRIMITIVE_TYPE_free; + ber_type_decoder_f ber_decode_primitive; + der_type_encoder_f der_encode_primitive; -/* + /* * A callback specification for the xer_decode_primitive() function below. */ -enum xer_pbd_rval -{ - XPBD_SYSTEM_FAILURE, /* System failure (memory shortage, etc) */ - XPBD_DECODER_LIMIT, /* Hit some decoder limitation or deficiency */ - XPBD_BROKEN_ENCODING, /* Encoding of a primitive body is broken */ - XPBD_NOT_BODY_IGNORE, /* Not a body format, but safe to ignore */ - XPBD_BODY_CONSUMED /* Body is recognized and consumed */ -}; -typedef enum xer_pbd_rval(xer_primitive_body_decoder_f)(asn_TYPE_descriptor_t *td, void *struct_ptr, - const void *chunk_buf, size_t chunk_size); + enum xer_pbd_rval + { + XPBD_SYSTEM_FAILURE, /* System failure (memory shortage, etc) */ + XPBD_DECODER_LIMIT, /* Hit some decoder limitation or deficiency */ + XPBD_BROKEN_ENCODING, /* Encoding of a primitive body is broken */ + XPBD_NOT_BODY_IGNORE, /* Not a body format, but safe to ignore */ + XPBD_BODY_CONSUMED /* Body is recognized and consumed */ + }; + typedef enum xer_pbd_rval(xer_primitive_body_decoder_f)(asn_TYPE_descriptor_t *td, void *struct_ptr, + const void *chunk_buf, size_t chunk_size); -/* + /* * Specific function to decode simple primitive types. * Also see xer_decode_general() in xer_decoder.h */ -asn_dec_rval_t xer_decode_primitive(asn_codec_ctx_t *opt_codec_ctx, - asn_TYPE_descriptor_t *type_descriptor, - void **struct_ptr, size_t struct_size, - const char *opt_mname, - const void *buf_ptr, size_t size, - xer_primitive_body_decoder_f *prim_body_decoder); + asn_dec_rval_t xer_decode_primitive(asn_codec_ctx_t *opt_codec_ctx, + asn_TYPE_descriptor_t *type_descriptor, + void **struct_ptr, size_t struct_size, + const char *opt_mname, + const void *buf_ptr, size_t size, + xer_primitive_body_decoder_f *prim_body_decoder); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/asn_internal.h b/src/core/libs/supl/asn-rrlp/asn_internal.h index 89e89033a..299c4e0e7 100644 --- a/src/core/libs/supl/asn-rrlp/asn_internal.h +++ b/src/core/libs/supl/asn-rrlp/asn_internal.h @@ -16,12 +16,13 @@ #endif #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif /* Environment version might be used to avoid running with the old library */ -#define ASN1C_ENVIRONMENT_VERSION 922 /* Compile-time version */ -int get_asn1c_environment_version(void); /* Run-time version */ +#define ASN1C_ENVIRONMENT_VERSION 922 /* Compile-time version */ + int get_asn1c_environment_version(void); /* Run-time version */ #define CALLOC(nmemb, size) calloc(nmemb, size) #define MALLOC(size) malloc(size) @@ -38,7 +39,7 @@ int get_asn1c_environment_version(void); /* Run-time version */ #ifdef ASN_THREAD_SAFE #define asn_debug_indent 0 #else /* !ASN_THREAD_SAFE */ -int asn_debug_indent; + int asn_debug_indent; #endif /* ASN_THREAD_SAFE */ #define ASN_DEBUG(fmt, args...) \ do \ @@ -51,14 +52,14 @@ int asn_debug_indent; } \ while (0) #else /* !__GNUC__ */ -void ASN_DEBUG_f(const char *fmt, ...); + void ASN_DEBUG_f(const char *fmt, ...); #define ASN_DEBUG ASN_DEBUG_f #endif /* __GNUC__ */ #else /* EMIT_ASN_DEBUG != 1 */ -static inline void ASN_DEBUG(const char *fmt, ...) -{ - (void)fmt; -} + static inline void ASN_DEBUG(const char *fmt, ...) + { + (void)fmt; + } #endif /* EMIT_ASN_DEBUG */ #endif /* ASN_DEBUG */ @@ -107,25 +108,25 @@ static inline void ASN_DEBUG(const char *fmt, ...) * Check stack against overflow, if limit is set. */ #define _ASN_DEFAULT_STACK_MAX (30000) -static inline int -_ASN_STACK_OVERFLOW_CHECK(asn_codec_ctx_t *ctx) -{ - if (ctx && ctx->max_stack_size) - { - /* ctx MUST be allocated on the stack */ - ptrdiff_t usedstack = ((char *)ctx - (char *)&ctx); - if (usedstack > 0) usedstack = -usedstack; /* grows up! */ + static inline int + _ASN_STACK_OVERFLOW_CHECK(asn_codec_ctx_t *ctx) + { + if (ctx && ctx->max_stack_size) + { + /* ctx MUST be allocated on the stack */ + ptrdiff_t usedstack = ((char *)ctx - (char *)&ctx); + if (usedstack > 0) usedstack = -usedstack; /* grows up! */ - /* double negative required to avoid int wrap-around */ - if (usedstack < -(ptrdiff_t)ctx->max_stack_size) - { - ASN_DEBUG("Stack limit %ld reached", - (long)ctx->max_stack_size); - return -1; - } - } - return 0; -} + /* double negative required to avoid int wrap-around */ + if (usedstack < -(ptrdiff_t)ctx->max_stack_size) + { + ASN_DEBUG("Stack limit %ld reached", + (long)ctx->max_stack_size); + return -1; + } + } + return 0; + } #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ber_decoder.h b/src/core/libs/supl/asn-rrlp/ber_decoder.h index 58249df22..6a87fc23f 100644 --- a/src/core/libs/supl/asn-rrlp/ber_decoder.h +++ b/src/core/libs/supl/asn-rrlp/ber_decoder.h @@ -8,54 +8,55 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ -struct asn_codec_ctx_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_codec_ctx_s; /* Forward declaration */ -/* + /* * The BER decoder of any type. * This function may be invoked directly from the application. * The der_encode() function (der_encoder.h) is an opposite to ber_decode(). */ -asn_dec_rval_t ber_decode(struct asn_codec_ctx_s *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, - void **struct_ptr, /* Pointer to a target structure's pointer */ - const void *buffer, /* Data to be decoded */ - size_t size /* Size of that buffer */ -); + asn_dec_rval_t ber_decode(struct asn_codec_ctx_s *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of that buffer */ + ); -/* + /* * Type of generic function which decodes the byte stream into the structure. */ -typedef asn_dec_rval_t(ber_type_decoder_f)( - struct asn_codec_ctx_s *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, - void **struct_ptr, const void *buf_ptr, size_t size, - int tag_mode); + typedef asn_dec_rval_t(ber_type_decoder_f)( + struct asn_codec_ctx_s *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, const void *buf_ptr, size_t size, + int tag_mode); -/******************************* + /******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************/ -/* + /* * Check that all tags correspond to the type definition (as given in head). * On return, last_length would contain either a non-negative length of the * value part of the last TLV, or the negative number of expected * "end of content" sequences. The number may only be negative if the * head->last_tag_form is non-zero. */ -asn_dec_rval_t ber_check_tags( - struct asn_codec_ctx_s *opt_codec_ctx, /* codec options */ - struct asn_TYPE_descriptor_s *type_descriptor, - asn_struct_ctx_t *opt_ctx, /* saved decoding context */ - const void *ptr, size_t size, - int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ - int last_tag_form, /* {-1,0:1}: any, primitive, constr */ - ber_tlv_len_t *last_length, - int *opt_tlv_form /* optional tag form */ -); + asn_dec_rval_t ber_check_tags( + struct asn_codec_ctx_s *opt_codec_ctx, /* codec options */ + struct asn_TYPE_descriptor_s *type_descriptor, + asn_struct_ctx_t *opt_ctx, /* saved decoding context */ + const void *ptr, size_t size, + int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ + int last_tag_form, /* {-1,0:1}: any, primitive, constr */ + ber_tlv_len_t *last_length, + int *opt_tlv_form /* optional tag form */ + ); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ber_tlv_length.h b/src/core/libs/supl/asn-rrlp/ber_tlv_length.h index b30d5d27f..7245624cd 100644 --- a/src/core/libs/supl/asn-rrlp/ber_tlv_length.h +++ b/src/core/libs/supl/asn-rrlp/ber_tlv_length.h @@ -6,12 +6,13 @@ #define _BER_TLV_LENGTH_H_ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef ssize_t ber_tlv_len_t; + typedef ssize_t ber_tlv_len_t; -/* + /* * This function tries to fetch the length of the BER TLV value and place it * in *len_r. * RETURN VALUES: @@ -21,27 +22,27 @@ typedef ssize_t ber_tlv_len_t; * On return with >0, len_r is constrained as -1..MAX, where -1 mean * that the value is of indefinite length. */ -ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, - ber_tlv_len_t *len_r); + ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, + ber_tlv_len_t *len_r); -/* + /* * This function expects bufptr to be positioned over L in TLV. * It returns number of bytes occupied by L and V together, suitable * for skipping. The function properly handles indefinite length. * RETURN VALUES: * Standard {-1,0,>0} convention. */ -ssize_t ber_skip_length( - struct asn_codec_ctx_s *opt_codec_ctx, /* optional context */ - int _is_constructed, const void *bufptr, size_t size); + ssize_t ber_skip_length( + struct asn_codec_ctx_s *opt_codec_ctx, /* optional context */ + int _is_constructed, const void *bufptr, size_t size); -/* + /* * This function serializes the length (L from TLV) in DER format. * It always returns number of bytes necessary to represent the length, * it is a caller's responsibility to check the return value * against the supplied buffer's size. */ -size_t der_tlv_length_serialize(ber_tlv_len_t len, void *bufptr, size_t size); + size_t der_tlv_length_serialize(ber_tlv_len_t len, void *bufptr, size_t size); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/ber_tlv_tag.h b/src/core/libs/supl/asn-rrlp/ber_tlv_tag.h index d9fb80005..31b634345 100644 --- a/src/core/libs/supl/asn-rrlp/ber_tlv_tag.h +++ b/src/core/libs/supl/asn-rrlp/ber_tlv_tag.h @@ -6,17 +6,18 @@ #define _BER_TLV_TAG_H_ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -enum asn_tag_class -{ - ASN_TAG_CLASS_UNIVERSAL = 0, /* 0b00 */ - ASN_TAG_CLASS_APPLICATION = 1, /* 0b01 */ - ASN_TAG_CLASS_CONTEXT = 2, /* 0b10 */ - ASN_TAG_CLASS_PRIVATE = 3 /* 0b11 */ -}; -typedef unsigned ber_tlv_tag_t; /* BER TAG from Tag-Length-Value */ + enum asn_tag_class + { + ASN_TAG_CLASS_UNIVERSAL = 0, /* 0b00 */ + ASN_TAG_CLASS_APPLICATION = 1, /* 0b01 */ + ASN_TAG_CLASS_CONTEXT = 2, /* 0b10 */ + ASN_TAG_CLASS_PRIVATE = 3 /* 0b11 */ + }; + typedef unsigned ber_tlv_tag_t; /* BER TAG from Tag-Length-Value */ /* * Tag class is encoded together with tag value for optimization purposes. @@ -27,32 +28,32 @@ typedef unsigned ber_tlv_tag_t; /* BER TAG from Tag-Length-Value */ #define BER_TAGS_EQUAL(tag1, tag2) ((tag1) == (tag2)) -/* + /* * Several functions for printing the TAG in the canonical form * (i.e. "[PRIVATE 0]"). * Return values correspond to their libc counterparts (if any). */ -ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t buflen); -ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *); -char *ber_tlv_tag_string(ber_tlv_tag_t tag); + ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t buflen); + ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *); + char *ber_tlv_tag_string(ber_tlv_tag_t tag); -/* + /* * This function tries to fetch the tag from the input stream. * RETURN VALUES: * 0: More data expected than bufptr contains. * -1: Fatal error deciphering tag. * >0: Number of bytes used from bufptr. tag_r will contain the tag. */ -ssize_t ber_fetch_tag(const void *bufptr, size_t size, ber_tlv_tag_t *tag_r); + ssize_t ber_fetch_tag(const void *bufptr, size_t size, ber_tlv_tag_t *tag_r); -/* + /* * This function serializes the tag (T from TLV) in BER format. * It always returns number of bytes necessary to represent the tag, * it is a caller's responsibility to check the return value * against the supplied buffer's size. */ -size_t ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufptr, size_t size); + size_t ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufptr, size_t size); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/constr_CHOICE.h b/src/core/libs/supl/asn-rrlp/constr_CHOICE.h index b9d7e84b9..264018481 100644 --- a/src/core/libs/supl/asn-rrlp/constr_CHOICE.h +++ b/src/core/libs/supl/asn-rrlp/constr_CHOICE.h @@ -9,47 +9,48 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef struct asn_CHOICE_specifics_s -{ - /* + typedef struct asn_CHOICE_specifics_s + { + /* * Target structure description. */ - int struct_size; /* Size of the target structure. */ - int ctx_offset; /* Offset of the asn_codec_ctx_t member */ - int pres_offset; /* Identifier of the present member */ - int pres_size; /* Size of the identifier (enum) */ + int struct_size; /* Size of the target structure. */ + int ctx_offset; /* Offset of the asn_codec_ctx_t member */ + int pres_offset; /* Identifier of the present member */ + int pres_size; /* Size of the identifier (enum) */ - /* + /* * Tags to members mapping table. */ - asn_TYPE_tag2member_t *tag2el; - int tag2el_count; + asn_TYPE_tag2member_t *tag2el; + int tag2el_count; - /* Canonical ordering of CHOICE elements, for PER */ - int *canonical_order; + /* Canonical ordering of CHOICE elements, for PER */ + int *canonical_order; - /* + /* * Extensions-related stuff. */ - int ext_start; /* First member of extensions, or -1 */ -} asn_CHOICE_specifics_t; + int ext_start; /* First member of extensions, or -1 */ + } asn_CHOICE_specifics_t; -/* + /* * A set specialized functions dealing with the CHOICE type. */ -asn_struct_free_f CHOICE_free; -asn_struct_print_f CHOICE_print; -asn_constr_check_f CHOICE_constraint; -ber_type_decoder_f CHOICE_decode_ber; -der_type_encoder_f CHOICE_encode_der; -xer_type_decoder_f CHOICE_decode_xer; -xer_type_encoder_f CHOICE_encode_xer; -per_type_decoder_f CHOICE_decode_uper; -per_type_encoder_f CHOICE_encode_uper; -asn_outmost_tag_f CHOICE_outmost_tag; + asn_struct_free_f CHOICE_free; + asn_struct_print_f CHOICE_print; + asn_constr_check_f CHOICE_constraint; + ber_type_decoder_f CHOICE_decode_ber; + der_type_encoder_f CHOICE_encode_der; + xer_type_decoder_f CHOICE_decode_xer; + xer_type_encoder_f CHOICE_encode_xer; + per_type_decoder_f CHOICE_decode_uper; + per_type_encoder_f CHOICE_encode_uper; + asn_outmost_tag_f CHOICE_outmost_tag; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/constr_SEQUENCE.h b/src/core/libs/supl/asn-rrlp/constr_SEQUENCE.h index 9f000ecff..e2664a123 100644 --- a/src/core/libs/supl/asn-rrlp/constr_SEQUENCE.h +++ b/src/core/libs/supl/asn-rrlp/constr_SEQUENCE.h @@ -8,51 +8,52 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef struct asn_SEQUENCE_specifics_s -{ - /* + typedef struct asn_SEQUENCE_specifics_s + { + /* * Target structure description. */ - int struct_size; /* Size of the target structure. */ - int ctx_offset; /* Offset of the asn_struct_ctx_t member */ + int struct_size; /* Size of the target structure. */ + int ctx_offset; /* Offset of the asn_struct_ctx_t member */ - /* + /* * Tags to members mapping table (sorted). */ - asn_TYPE_tag2member_t *tag2el; - int tag2el_count; + asn_TYPE_tag2member_t *tag2el; + int tag2el_count; - /* + /* * Optional members of the extensions root (roms) or additions (aoms). * Meaningful for PER. */ - int *oms; /* Optional MemberS */ - int roms_count; /* Root optional members count */ - int aoms_count; /* Additions optional members count */ + int *oms; /* Optional MemberS */ + int roms_count; /* Root optional members count */ + int aoms_count; /* Additions optional members count */ - /* + /* * Description of an extensions group. */ - int ext_after; /* Extensions start after this member */ - int ext_before; /* Extensions stop before this member */ -} asn_SEQUENCE_specifics_t; + int ext_after; /* Extensions start after this member */ + int ext_before; /* Extensions stop before this member */ + } asn_SEQUENCE_specifics_t; -/* + /* * A set specialized functions dealing with the SEQUENCE type. */ -asn_struct_free_f SEQUENCE_free; -asn_struct_print_f SEQUENCE_print; -asn_constr_check_f SEQUENCE_constraint; -ber_type_decoder_f SEQUENCE_decode_ber; -der_type_encoder_f SEQUENCE_encode_der; -xer_type_decoder_f SEQUENCE_decode_xer; -xer_type_encoder_f SEQUENCE_encode_xer; -per_type_decoder_f SEQUENCE_decode_uper; -per_type_encoder_f SEQUENCE_encode_uper; + asn_struct_free_f SEQUENCE_free; + asn_struct_print_f SEQUENCE_print; + asn_constr_check_f SEQUENCE_constraint; + ber_type_decoder_f SEQUENCE_decode_ber; + der_type_encoder_f SEQUENCE_encode_der; + xer_type_decoder_f SEQUENCE_decode_xer; + xer_type_encoder_f SEQUENCE_encode_xer; + per_type_decoder_f SEQUENCE_decode_uper; + per_type_encoder_f SEQUENCE_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/constr_SEQUENCE_OF.h b/src/core/libs/supl/asn-rrlp/constr_SEQUENCE_OF.h index 97c81b017..927ed5163 100644 --- a/src/core/libs/supl/asn-rrlp/constr_SEQUENCE_OF.h +++ b/src/core/libs/supl/asn-rrlp/constr_SEQUENCE_OF.h @@ -9,7 +9,8 @@ #include /* Implemented using SET OF */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif /* @@ -22,9 +23,9 @@ extern "C" { #define SEQUENCE_OF_decode_ber SET_OF_decode_ber #define SEQUENCE_OF_decode_xer SET_OF_decode_xer #define SEQUENCE_OF_decode_uper SET_OF_decode_uper -der_type_encoder_f SEQUENCE_OF_encode_der; -xer_type_encoder_f SEQUENCE_OF_encode_xer; -per_type_encoder_f SEQUENCE_OF_encode_uper; + der_type_encoder_f SEQUENCE_OF_encode_der; + xer_type_encoder_f SEQUENCE_OF_encode_xer; + per_type_encoder_f SEQUENCE_OF_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/constr_SET_OF.h b/src/core/libs/supl/asn-rrlp/constr_SET_OF.h index 0fb2131a1..52b446281 100644 --- a/src/core/libs/supl/asn-rrlp/constr_SET_OF.h +++ b/src/core/libs/supl/asn-rrlp/constr_SET_OF.h @@ -8,33 +8,34 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef struct asn_SET_OF_specifics_s -{ - /* + typedef struct asn_SET_OF_specifics_s + { + /* * Target structure description. */ - int struct_size; /* Size of the target structure. */ - int ctx_offset; /* Offset of the asn_struct_ctx_t member */ + int struct_size; /* Size of the target structure. */ + int ctx_offset; /* Offset of the asn_struct_ctx_t member */ - /* XER-specific stuff */ - int as_XMLValueList; /* The member type must be encoded like this */ -} asn_SET_OF_specifics_t; + /* XER-specific stuff */ + int as_XMLValueList; /* The member type must be encoded like this */ + } asn_SET_OF_specifics_t; -/* + /* * A set specialized functions dealing with the SET OF type. */ -asn_struct_free_f SET_OF_free; -asn_struct_print_f SET_OF_print; -asn_constr_check_f SET_OF_constraint; -ber_type_decoder_f SET_OF_decode_ber; -der_type_encoder_f SET_OF_encode_der; -xer_type_decoder_f SET_OF_decode_xer; -xer_type_encoder_f SET_OF_encode_xer; -per_type_decoder_f SET_OF_decode_uper; -per_type_encoder_f SET_OF_encode_uper; + asn_struct_free_f SET_OF_free; + asn_struct_print_f SET_OF_print; + asn_constr_check_f SET_OF_constraint; + ber_type_decoder_f SET_OF_decode_ber; + der_type_encoder_f SET_OF_encode_der; + xer_type_decoder_f SET_OF_decode_xer; + xer_type_encoder_f SET_OF_encode_xer; + per_type_decoder_f SET_OF_decode_uper; + per_type_encoder_f SET_OF_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/constr_TYPE.h b/src/core/libs/supl/asn-rrlp/constr_TYPE.h index 5703fe89b..0641f003c 100644 --- a/src/core/libs/supl/asn-rrlp/constr_TYPE.h +++ b/src/core/libs/supl/asn-rrlp/constr_TYPE.h @@ -16,25 +16,26 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ -struct asn_TYPE_member_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_member_s; /* Forward declaration */ -/* + /* * This type provides the context information for various ASN.1 routines, * primarily ones doing decoding. A member _asn_ctx of this type must be * included into certain target language's structures, such as compound types. */ -typedef struct asn_struct_ctx_s -{ - short phase; /* Decoding phase */ - short step; /* Elementary step of a phase */ - int context; /* Other context information */ - void *ptr; /* Decoder-specific stuff (stack elements) */ - ber_tlv_len_t left; /* Number of bytes left, -1 for indefinite */ -} asn_struct_ctx_t; + typedef struct asn_struct_ctx_s + { + short phase; /* Decoding phase */ + short step; /* Elementary step of a phase */ + int context; /* Other context information */ + void *ptr; /* Decoder-specific stuff (stack elements) */ + ber_tlv_len_t left; /* Number of bytes left, -1 for indefinite */ + } asn_struct_ctx_t; #include /* Basic Encoding Rules decoder */ #include /* Distinguished Encoding Rules encoder */ @@ -44,128 +45,128 @@ typedef struct asn_struct_ctx_s #include /* Packet Encoding Rules encoder */ #include /* Subtype constraints support */ -/* + /* * Free the structure according to its specification. * If (free_contents_only) is set, the wrapper structure itself (struct_ptr) * will not be freed. (It may be useful in case the structure is allocated * statically or arranged on the stack, yet its elements are allocated * dynamically.) */ -typedef void(asn_struct_free_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, int free_contents_only); + typedef void(asn_struct_free_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, int free_contents_only); #define ASN_STRUCT_FREE(asn_DEF, ptr) (asn_DEF).free_struct(&(asn_DEF), ptr, 0) #define ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF, ptr) \ (asn_DEF).free_struct(&(asn_DEF), ptr, 1) -/* + /* * Print the structure according to its specification. */ -typedef int(asn_struct_print_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - const void *struct_ptr, - int level, /* Indentation level */ - asn_app_consume_bytes_f *callback, void *app_key); + typedef int(asn_struct_print_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, + int level, /* Indentation level */ + asn_app_consume_bytes_f *callback, void *app_key); -/* + /* * Return the outmost tag of the type. * If the type is untagged CHOICE, the dynamic operation is performed. * NOTE: This function pointer type is only useful internally. * Do not use it in your application. */ -typedef ber_tlv_tag_t(asn_outmost_tag_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - const void *struct_ptr, int tag_mode, ber_tlv_tag_t tag); -/* The instance of the above function type; used internally. */ -asn_outmost_tag_f asn_TYPE_outmost_tag; + typedef ber_tlv_tag_t(asn_outmost_tag_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, int tag_mode, ber_tlv_tag_t tag); + /* The instance of the above function type; used internally. */ + asn_outmost_tag_f asn_TYPE_outmost_tag; -/* - * The definitive description of the destination language's structure. - */ -typedef struct asn_TYPE_descriptor_s -{ - char *name; /* A name of the ASN.1 type. "" in some cases. */ - char *xml_tag; /* Name used in XML tag */ - /* + * The definitive description of the destination language's structure. + */ + typedef struct asn_TYPE_descriptor_s + { + char *name; /* A name of the ASN.1 type. "" in some cases. */ + char *xml_tag; /* Name used in XML tag */ + + /* * Generalized functions for dealing with the specific type. * May be directly invoked by applications. */ - asn_struct_free_f *free_struct; /* Free the structure */ - asn_struct_print_f *print_struct; /* Human readable output */ - asn_constr_check_f *check_constraints; /* Constraints validator */ - ber_type_decoder_f *ber_decoder; /* Generic BER decoder */ - der_type_encoder_f *der_encoder; /* Canonical DER encoder */ - xer_type_decoder_f *xer_decoder; /* Generic XER decoder */ - xer_type_encoder_f *xer_encoder; /* [Canonical] XER encoder */ - per_type_decoder_f *uper_decoder; /* Unaligned PER decoder */ - per_type_encoder_f *uper_encoder; /* Unaligned PER encoder */ + asn_struct_free_f *free_struct; /* Free the structure */ + asn_struct_print_f *print_struct; /* Human readable output */ + asn_constr_check_f *check_constraints; /* Constraints validator */ + ber_type_decoder_f *ber_decoder; /* Generic BER decoder */ + der_type_encoder_f *der_encoder; /* Canonical DER encoder */ + xer_type_decoder_f *xer_decoder; /* Generic XER decoder */ + xer_type_encoder_f *xer_encoder; /* [Canonical] XER encoder */ + per_type_decoder_f *uper_decoder; /* Unaligned PER decoder */ + per_type_encoder_f *uper_encoder; /* Unaligned PER encoder */ - /*********************************************************************** + /*********************************************************************** * Internally useful members. Not to be used by applications directly. * **********************************************************************/ - /* + /* * Tags that are expected to occur. */ - asn_outmost_tag_f *outmost_tag; /* */ - ber_tlv_tag_t *tags; /* Effective tags sequence for this type */ - int tags_count; /* Number of tags which are expected */ - ber_tlv_tag_t *all_tags; /* Every tag for BER/containment */ - int all_tags_count; /* Number of tags */ + asn_outmost_tag_f *outmost_tag; /* */ + ber_tlv_tag_t *tags; /* Effective tags sequence for this type */ + int tags_count; /* Number of tags which are expected */ + ber_tlv_tag_t *all_tags; /* Every tag for BER/containment */ + int all_tags_count; /* Number of tags */ - asn_per_constraints_t *per_constraints; /* PER compiled constraints */ + asn_per_constraints_t *per_constraints; /* PER compiled constraints */ - /* + /* * An ASN.1 production type members (members of SEQUENCE, SET, CHOICE). */ - struct asn_TYPE_member_s *elements; - int elements_count; + struct asn_TYPE_member_s *elements; + int elements_count; - /* + /* * Additional information describing the type, used by appropriate * functions above. */ - void *specifics; -} asn_TYPE_descriptor_t; + void *specifics; + } asn_TYPE_descriptor_t; -/* + /* * This type describes an element of the constructed type, * i.e. SEQUENCE, SET, CHOICE, etc. */ -enum asn_TYPE_flags_e -{ - ATF_NOFLAGS, - ATF_POINTER = 0x01, /* Represented by the pointer */ - ATF_OPEN_TYPE = 0x02 /* ANY type, without meaningful tag */ -}; -typedef struct asn_TYPE_member_s -{ - enum asn_TYPE_flags_e flags; /* Element's presentation flags */ - int optional; /* Following optional members, including current */ - int memb_offset; /* Offset of the element */ - ber_tlv_tag_t tag; /* Outmost (most immediate) tag */ - int tag_mode; /* IMPLICIT/no/EXPLICIT tag at current level */ - asn_TYPE_descriptor_t *type; /* Member type descriptor */ - asn_constr_check_f *memb_constraints; /* Constraints validator */ - asn_per_constraints_t *per_constraints; /* PER compiled constraints */ - int (*default_value)(int setval, void **sptr); /* DEFAULT */ - char *name; /* ASN.1 identifier of the element */ -} asn_TYPE_member_t; + enum asn_TYPE_flags_e + { + ATF_NOFLAGS, + ATF_POINTER = 0x01, /* Represented by the pointer */ + ATF_OPEN_TYPE = 0x02 /* ANY type, without meaningful tag */ + }; + typedef struct asn_TYPE_member_s + { + enum asn_TYPE_flags_e flags; /* Element's presentation flags */ + int optional; /* Following optional members, including current */ + int memb_offset; /* Offset of the element */ + ber_tlv_tag_t tag; /* Outmost (most immediate) tag */ + int tag_mode; /* IMPLICIT/no/EXPLICIT tag at current level */ + asn_TYPE_descriptor_t *type; /* Member type descriptor */ + asn_constr_check_f *memb_constraints; /* Constraints validator */ + asn_per_constraints_t *per_constraints; /* PER compiled constraints */ + int (*default_value)(int setval, void **sptr); /* DEFAULT */ + char *name; /* ASN.1 identifier of the element */ + } asn_TYPE_member_t; -/* + /* * BER tag to element number mapping. */ -typedef struct asn_TYPE_tag2member_s -{ - ber_tlv_tag_t el_tag; /* Outmost tag of the member */ - int el_no; /* Index of the associated member, base 0 */ - int toff_first; /* First occurence of the el_tag, relative */ - int toff_last; /* Last occurence of the el_tag, relatvie */ -} asn_TYPE_tag2member_t; + typedef struct asn_TYPE_tag2member_s + { + ber_tlv_tag_t el_tag; /* Outmost tag of the member */ + int el_no; /* Index of the associated member, base 0 */ + int toff_first; /* First occurence of the el_tag, relative */ + int toff_last; /* Last occurence of the el_tag, relatvie */ + } asn_TYPE_tag2member_t; -/* + /* * This function is a wrapper around (td)->print_struct, which prints out * the contents of the target language's structure (struct_ptr) into the * file pointer (stream) in human readable form. @@ -174,9 +175,9 @@ typedef struct asn_TYPE_tag2member_s * -1: Problem dumping the structure. * (See also xer_fprint() in xer_encoder.h) */ -int asn_fprint(FILE *stream, /* Destination stream descriptor */ - asn_TYPE_descriptor_t *td, /* ASN.1 type descriptor */ - const void *struct_ptr); /* Structure to be printed */ + int asn_fprint(FILE *stream, /* Destination stream descriptor */ + asn_TYPE_descriptor_t *td, /* ASN.1 type descriptor */ + const void *struct_ptr); /* Structure to be printed */ #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/constraints.h b/src/core/libs/supl/asn-rrlp/constraints.h index 78a43d613..bc4fdb938 100644 --- a/src/core/libs/supl/asn-rrlp/constraints.h +++ b/src/core/libs/supl/asn-rrlp/constraints.h @@ -8,12 +8,13 @@ #include /* Platform-dependent types */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* + /* * Validate the structure according to the ASN.1 constraints. * If errbuf and errlen are given, they shall be pointing to the appropriate * buffer space and its length before calling this function. Alternatively, @@ -25,30 +26,30 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */ * This function returns 0 in case all ASN.1 constraints are met * and -1 if one or more constraints were failed. */ -int asn_check_constraints(struct asn_TYPE_descriptor_s *type_descriptor, - const void *struct_ptr, /* Target language's structure */ - char *errbuf, /* Returned error description */ - size_t *errlen /* Length of the error description */ -); + int asn_check_constraints(struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Target language's structure */ + char *errbuf, /* Returned error description */ + size_t *errlen /* Length of the error description */ + ); -/* + /* * Generic type for constraint checking callback, * associated with every type descriptor. */ -typedef int(asn_constr_check_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - const void *struct_ptr, - asn_app_constraint_failed_f *optional_callback, /* Log the error */ - void *optional_app_key /* Opaque key passed to a callback */ -); + typedef int(asn_constr_check_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, + asn_app_constraint_failed_f *optional_callback, /* Log the error */ + void *optional_app_key /* Opaque key passed to a callback */ + ); -/******************************* + /******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************/ -asn_constr_check_f asn_generic_no_constraint; /* No constraint whatsoever */ -asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */ + asn_constr_check_f asn_generic_no_constraint; /* No constraint whatsoever */ + asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */ /* * Invoke the callback with a complete error message. diff --git a/src/core/libs/supl/asn-rrlp/der_encoder.h b/src/core/libs/supl/asn-rrlp/der_encoder.h index 63416b633..3eafbc281 100644 --- a/src/core/libs/supl/asn-rrlp/der_encoder.h +++ b/src/core/libs/supl/asn-rrlp/der_encoder.h @@ -8,57 +8,58 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* + /* * The DER encoder of any type. May be invoked by the application. * The ber_decode() function (ber_decoder.h) is an opposite of der_encode(). */ -asn_enc_rval_t der_encode(struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - asn_app_consume_bytes_f *consume_bytes_cb, - void *app_key /* Arbitrary callback argument */ -); + asn_enc_rval_t der_encode(struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key /* Arbitrary callback argument */ + ); -/* A variant of der_encode() which encodes data into the pre-allocated buffer */ -asn_enc_rval_t der_encode_to_buffer( - struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - void *buffer, /* Pre-allocated buffer */ - size_t buffer_size /* Initial buffer size (maximum) */ -); + /* A variant of der_encode() which encodes data into the pre-allocated buffer */ + asn_enc_rval_t der_encode_to_buffer( + struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (maximum) */ + ); -/* + /* * Type of the generic DER encoder. */ -typedef asn_enc_rval_t(der_type_encoder_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ - ber_tlv_tag_t tag, - asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ - void *app_key /* Arbitrary callback argument */ -); + typedef asn_enc_rval_t(der_type_encoder_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ + ber_tlv_tag_t tag, + asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ + ); -/******************************* + /******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************/ -/* + /* * Write out leading TL[v] sequence according to the type definition. */ -ssize_t der_write_tags( - struct asn_TYPE_descriptor_s *type_descriptor, - size_t struct_length, - int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ - int last_tag_form, /* {0,!0}: prim, constructed */ - ber_tlv_tag_t tag, - asn_app_consume_bytes_f *consume_bytes_cb, - void *app_key); + ssize_t der_write_tags( + struct asn_TYPE_descriptor_s *type_descriptor, + size_t struct_length, + int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ + int last_tag_form, /* {0,!0}: prim, constructed */ + ber_tlv_tag_t tag, + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/per_decoder.h b/src/core/libs/supl/asn-rrlp/per_decoder.h index 46e045742..a28509464 100644 --- a/src/core/libs/supl/asn-rrlp/per_decoder.h +++ b/src/core/libs/supl/asn-rrlp/per_decoder.h @@ -9,44 +9,45 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* + /* * Unaligned PER decoder of a "complete encoding" as per X.691#10.1. * On success, this call always returns (.consumed >= 1), as per X.691#10.1.3. */ -asn_dec_rval_t uper_decode_complete(struct asn_codec_ctx_s *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ - void **struct_ptr, /* Pointer to a target structure's pointer */ - const void *buffer, /* Data to be decoded */ - size_t size /* Size of data buffer */ -); + asn_dec_rval_t uper_decode_complete(struct asn_codec_ctx_s *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of data buffer */ + ); -/* + /* * Unaligned PER decoder of any ASN.1 type. May be invoked by the application. * WARNING: This call returns the number of BITS read from the stream. Beware. */ -asn_dec_rval_t uper_decode(struct asn_codec_ctx_s *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ - void **struct_ptr, /* Pointer to a target structure's pointer */ - const void *buffer, /* Data to be decoded */ - size_t size, /* Size of data buffer */ - int skip_bits, /* Number of unused leading bits, 0..7 */ - int unused_bits /* Number of unused tailing bits, 0..7 */ -); + asn_dec_rval_t uper_decode(struct asn_codec_ctx_s *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size, /* Size of data buffer */ + int skip_bits, /* Number of unused leading bits, 0..7 */ + int unused_bits /* Number of unused tailing bits, 0..7 */ + ); -/* + /* * Type of the type-specific PER decoder function. */ -typedef asn_dec_rval_t(per_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, - asn_per_constraints_t *constraints, - void **struct_ptr, - asn_per_data_t *per_data); + typedef asn_dec_rval_t(per_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, + asn_per_constraints_t *constraints, + void **struct_ptr, + asn_per_data_t *per_data); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/per_encoder.h b/src/core/libs/supl/asn-rrlp/per_encoder.h index a1fe4a7bc..896013095 100644 --- a/src/core/libs/supl/asn-rrlp/per_encoder.h +++ b/src/core/libs/supl/asn-rrlp/per_encoder.h @@ -9,57 +9,58 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* + /* * Unaligned PER encoder of any ASN.1 type. May be invoked by the application. * WARNING: This function returns the number of encoded bits in the .encoded * field of the return value. Use the following formula to convert to bytes: * bytes = ((.encoded + 7) / 8) */ -asn_enc_rval_t uper_encode(struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - asn_app_consume_bytes_f *consume_bytes_cb, /* Data collector */ - void *app_key /* Arbitrary callback argument */ -); + asn_enc_rval_t uper_encode(struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, /* Data collector */ + void *app_key /* Arbitrary callback argument */ + ); -/* + /* * A variant of uper_encode() which encodes data into the existing buffer * WARNING: This function returns the number of encoded bits in the .encoded * field of the return value. */ -asn_enc_rval_t uper_encode_to_buffer( - struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - void *buffer, /* Pre-allocated buffer */ - size_t buffer_size /* Initial buffer size (max) */ -); + asn_enc_rval_t uper_encode_to_buffer( + struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (max) */ + ); -/* + /* * A variant of uper_encode_to_buffer() which allocates buffer itself. * Returns the number of bytes in the buffer or -1 in case of failure. * WARNING: This function produces a "Production of the complete encoding", * with length of at least one octet. Contrast this to precise bit-packing * encoding of uper_encode() and uper_encode_to_buffer(). */ -ssize_t uper_encode_to_new_buffer( - struct asn_TYPE_descriptor_s *type_descriptor, - asn_per_constraints_t *constraints, - void *struct_ptr, /* Structure to be encoded */ - void **buffer_r /* Buffer allocated and returned */ -); + ssize_t uper_encode_to_new_buffer( + struct asn_TYPE_descriptor_s *type_descriptor, + asn_per_constraints_t *constraints, + void *struct_ptr, /* Structure to be encoded */ + void **buffer_r /* Buffer allocated and returned */ + ); -/* + /* * Type of the generic PER encoder function. */ -typedef asn_enc_rval_t(per_type_encoder_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - asn_per_constraints_t *constraints, - void *struct_ptr, - asn_per_outp_t *per_output); + typedef asn_enc_rval_t(per_type_encoder_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + asn_per_constraints_t *constraints, + void *struct_ptr, + asn_per_outp_t *per_output); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/per_opentype.h b/src/core/libs/supl/asn-rrlp/per_opentype.h index 6fc5130a7..2110a794a 100644 --- a/src/core/libs/supl/asn-rrlp/per_opentype.h +++ b/src/core/libs/supl/asn-rrlp/per_opentype.h @@ -6,14 +6,15 @@ #define _PER_OPENTYPE_H_ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -asn_dec_rval_t uper_open_type_get(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd); + asn_dec_rval_t uper_open_type_get(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd); -int uper_open_type_skip(asn_codec_ctx_t *opt_codec_ctx, asn_per_data_t *pd); + int uper_open_type_skip(asn_codec_ctx_t *opt_codec_ctx, asn_per_data_t *pd); -int uper_open_type_put(asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void *sptr, asn_per_outp_t *po); + int uper_open_type_put(asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void *sptr, asn_per_outp_t *po); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/per_support.h b/src/core/libs/supl/asn-rrlp/per_support.h index fff2fc133..c99f12291 100644 --- a/src/core/libs/supl/asn-rrlp/per_support.h +++ b/src/core/libs/supl/asn-rrlp/per_support.h @@ -9,136 +9,137 @@ #include /* Platform-specific types */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* + /* * Pre-computed PER constraints. */ -typedef const struct asn_per_constraint_s -{ - enum asn_per_constraint_flags + typedef const struct asn_per_constraint_s { - APC_UNCONSTRAINED = 0x0, /* No PER visible constraints */ - APC_SEMI_CONSTRAINED = 0x1, /* Constrained at "lb" */ - APC_CONSTRAINED = 0x2, /* Fully constrained */ - APC_EXTENSIBLE = 0x4 /* May have extension */ - } flags; - int range_bits; /* Full number of bits in the range */ - int effective_bits; /* Effective bits */ - long lower_bound; /* "lb" value */ - long upper_bound; /* "ub" value */ -} asn_per_constraint_t; -typedef const struct asn_per_constraints_s -{ - struct asn_per_constraint_s value; - struct asn_per_constraint_s size; - int (*value2code)(unsigned int value); - int (*code2value)(unsigned int code); -} asn_per_constraints_t; + enum asn_per_constraint_flags + { + APC_UNCONSTRAINED = 0x0, /* No PER visible constraints */ + APC_SEMI_CONSTRAINED = 0x1, /* Constrained at "lb" */ + APC_CONSTRAINED = 0x2, /* Fully constrained */ + APC_EXTENSIBLE = 0x4 /* May have extension */ + } flags; + int range_bits; /* Full number of bits in the range */ + int effective_bits; /* Effective bits */ + long lower_bound; /* "lb" value */ + long upper_bound; /* "ub" value */ + } asn_per_constraint_t; + typedef const struct asn_per_constraints_s + { + struct asn_per_constraint_s value; + struct asn_per_constraint_s size; + int (*value2code)(unsigned int value); + int (*code2value)(unsigned int code); + } asn_per_constraints_t; -/* + /* * This structure describes a position inside an incoming PER bit stream. */ -typedef struct asn_per_data_s -{ - const uint8_t *buffer; /* Pointer to the octet stream */ - size_t nboff; /* Bit offset to the meaningful bit */ - size_t nbits; /* Number of bits in the stream */ - size_t moved; /* Number of bits moved through this bit stream */ - int (*refill)(struct asn_per_data_s *); - void *refill_key; -} asn_per_data_t; + typedef struct asn_per_data_s + { + const uint8_t *buffer; /* Pointer to the octet stream */ + size_t nboff; /* Bit offset to the meaningful bit */ + size_t nbits; /* Number of bits in the stream */ + size_t moved; /* Number of bits moved through this bit stream */ + int (*refill)(struct asn_per_data_s *); + void *refill_key; + } asn_per_data_t; -/* + /* * Extract a small number of bits (<= 31) from the specified PER data pointer. * This function returns -1 if the specified number of bits could not be * extracted due to EOD or other conditions. */ -int32_t per_get_few_bits(asn_per_data_t *per_data, int get_nbits); + int32_t per_get_few_bits(asn_per_data_t *per_data, int get_nbits); -/* Undo the immediately preceeding "get_few_bits" operation */ -void per_get_undo(asn_per_data_t *per_data, int get_nbits); + /* Undo the immediately preceeding "get_few_bits" operation */ + void per_get_undo(asn_per_data_t *per_data, int get_nbits); -/* + /* * Extract a large number of bits from the specified PER data pointer. * This function returns -1 if the specified number of bits could not be * extracted due to EOD or other conditions. */ -int per_get_many_bits(asn_per_data_t *pd, uint8_t *dst, int right_align, - int get_nbits); + int per_get_many_bits(asn_per_data_t *pd, uint8_t *dst, int right_align, + int get_nbits); -/* + /* * Get the length "n" from the Unaligned PER stream. */ -ssize_t uper_get_length(asn_per_data_t *pd, - int effective_bound_bits, - int *repeat); + ssize_t uper_get_length(asn_per_data_t *pd, + int effective_bound_bits, + int *repeat); -/* + /* * Get the normally small length "n". */ -ssize_t uper_get_nslength(asn_per_data_t *pd); + ssize_t uper_get_nslength(asn_per_data_t *pd); -/* + /* * Get the normally small non-negative whole number. */ -ssize_t uper_get_nsnnwn(asn_per_data_t *pd); + ssize_t uper_get_nsnnwn(asn_per_data_t *pd); -/* X.691-2008/11, #11.5.6 */ -int uper_get_constrained_whole_number(asn_per_data_t *pd, unsigned long *v, int nbits); + /* X.691-2008/11, #11.5.6 */ + int uper_get_constrained_whole_number(asn_per_data_t *pd, unsigned long *v, int nbits); -/* Non-thread-safe debugging function, don't use it */ -char *per_data_string(asn_per_data_t *pd); + /* Non-thread-safe debugging function, don't use it */ + char *per_data_string(asn_per_data_t *pd); -/* + /* * This structure supports forming PER output. */ -typedef struct asn_per_outp_s -{ - uint8_t *buffer; /* Pointer into the (tmpspace) */ - size_t nboff; /* Bit offset to the meaningful bit */ - size_t nbits; /* Number of bits left in (tmpspace) */ - uint8_t tmpspace[32]; /* Preliminary storage to hold data */ - int (*outper)(const void *data, size_t size, void *op_key); - void *op_key; /* Key for (outper) data callback */ - size_t flushed_bytes; /* Bytes already flushed through (outper) */ -} asn_per_outp_t; + typedef struct asn_per_outp_s + { + uint8_t *buffer; /* Pointer into the (tmpspace) */ + size_t nboff; /* Bit offset to the meaningful bit */ + size_t nbits; /* Number of bits left in (tmpspace) */ + uint8_t tmpspace[32]; /* Preliminary storage to hold data */ + int (*outper)(const void *data, size_t size, void *op_key); + void *op_key; /* Key for (outper) data callback */ + size_t flushed_bytes; /* Bytes already flushed through (outper) */ + } asn_per_outp_t; -/* Output a small number of bits (<= 31) */ -int per_put_few_bits(asn_per_outp_t *per_data, uint32_t bits, int obits); + /* Output a small number of bits (<= 31) */ + int per_put_few_bits(asn_per_outp_t *per_data, uint32_t bits, int obits); -/* Output a large number of bits */ -int per_put_many_bits(asn_per_outp_t *po, const uint8_t *src, int put_nbits); + /* Output a large number of bits */ + int per_put_many_bits(asn_per_outp_t *po, const uint8_t *src, int put_nbits); -/* + /* * Flush whole bytes (0 or more) through (outper) member. * The least significant bits which are not used are guaranteed to be set to 0. * Returns -1 if callback returns -1. Otherwise, 0. */ -int per_put_aligned_flush(asn_per_outp_t *po); + int per_put_aligned_flush(asn_per_outp_t *po); -/* X.691-2008/11, #11.5 */ -int uper_put_constrained_whole_number_s(asn_per_outp_t *po, long v, int nbits); -int uper_put_constrained_whole_number_u(asn_per_outp_t *po, unsigned long v, int nbits); + /* X.691-2008/11, #11.5 */ + int uper_put_constrained_whole_number_s(asn_per_outp_t *po, long v, int nbits); + int uper_put_constrained_whole_number_u(asn_per_outp_t *po, unsigned long v, int nbits); -/* + /* * Put the length "n" to the Unaligned PER stream. * This function returns the number of units which may be flushed * in the next units saving iteration. */ -ssize_t uper_put_length(asn_per_outp_t *po, size_t whole_length); + ssize_t uper_put_length(asn_per_outp_t *po, size_t whole_length); -/* + /* * Put the normally small length "n" to the Unaligned PER stream. * Returns 0 or -1. */ -int uper_put_nslength(asn_per_outp_t *po, size_t length); + int uper_put_nslength(asn_per_outp_t *po, size_t length); -/* + /* * Put the normally small non-negative whole number. */ -int uper_put_nsnnwn(asn_per_outp_t *po, int n); + int uper_put_nsnnwn(asn_per_outp_t *po, int n); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/xer_decoder.h b/src/core/libs/supl/asn-rrlp/xer_decoder.h index 4cf5b2017..52444af51 100644 --- a/src/core/libs/supl/asn-rrlp/xer_decoder.h +++ b/src/core/libs/supl/asn-rrlp/xer_decoder.h @@ -8,92 +8,95 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* + /* * The XER decoder of any ASN.1 type. May be invoked by the application. */ -asn_dec_rval_t xer_decode(struct asn_codec_ctx_s *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, - void **struct_ptr, /* Pointer to a target structure's pointer */ - const void *buffer, /* Data to be decoded */ - size_t size /* Size of data buffer */ -); + asn_dec_rval_t xer_decode(struct asn_codec_ctx_s *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of data buffer */ + ); -/* + /* * Type of the type-specific XER decoder function. */ -typedef asn_dec_rval_t(xer_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, - void **struct_ptr, - const char *opt_mname, /* Member name */ - const void *buf_ptr, size_t size); + typedef asn_dec_rval_t(xer_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, + const char *opt_mname, /* Member name */ + const void *buf_ptr, size_t size); -/******************************* + /******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************/ -/* + /* * Generalized function for decoding the primitive values. * Used by more specialized functions, such as OCTET_STRING_decode_xer_utf8 * and others. This function should not be used by applications, as its API * is subject to changes. */ -asn_dec_rval_t xer_decode_general(asn_codec_ctx_t *opt_codec_ctx, - asn_struct_ctx_t *ctx, /* Type decoder context */ - void *struct_key, /* Treated as opaque pointer */ - const char *xml_tag, /* Expected XML tag name */ - const void *buf_ptr, size_t size, - int (*opt_unexpected_tag_decoder)(void *struct_key, const void *chunk_buf, size_t chunk_size), - ssize_t (*body_receiver)(void *struct_key, const void *chunk_buf, size_t chunk_size, - int have_more)); + asn_dec_rval_t xer_decode_general(asn_codec_ctx_t *opt_codec_ctx, + asn_struct_ctx_t *ctx, /* Type decoder context */ + void *struct_key, /* Treated as opaque pointer */ + const char *xml_tag, /* Expected XML tag name */ + const void *buf_ptr, size_t size, + int (*opt_unexpected_tag_decoder)(void *struct_key, const void *chunk_buf, size_t chunk_size), + ssize_t (*body_receiver)(void *struct_key, const void *chunk_buf, size_t chunk_size, + int have_more)); -/* + /* * Fetch the next XER (XML) token from the stream. * The function returns the number of bytes occupied by the chunk type, * returned in the _ch_type. The _ch_type is only set (and valid) when * the return value is greater than 0. */ -typedef enum pxer_chunk_type { - PXER_TAG, /* Complete XER tag */ - PXER_TEXT, /* Plain text between XER tags */ - PXER_COMMENT /* A comment, may be part of */ -} pxer_chunk_type_e; -ssize_t xer_next_token(int *stateContext, - const void *buffer, size_t size, pxer_chunk_type_e *_ch_type); + typedef enum pxer_chunk_type + { + PXER_TAG, /* Complete XER tag */ + PXER_TEXT, /* Plain text between XER tags */ + PXER_COMMENT /* A comment, may be part of */ + } pxer_chunk_type_e; + ssize_t xer_next_token(int *stateContext, + const void *buffer, size_t size, pxer_chunk_type_e *_ch_type); -/* + /* * This function checks the buffer against the tag name is expected to occur. */ -typedef enum xer_check_tag { - XCT_BROKEN = 0, /* The tag is broken */ - XCT_OPENING = 1, /* This is the tag */ - XCT_CLOSING = 2, /* This is the tag */ - XCT_BOTH = 3, /* This is the tag */ - XCT__UNK__MASK = 4, /* Mask of everything unexpected */ - XCT_UNKNOWN_OP = 5, /* Unexpected tag */ - XCT_UNKNOWN_CL = 6, /* Unexpected tag */ - XCT_UNKNOWN_BO = 7 /* Unexpected tag */ -} xer_check_tag_e; -xer_check_tag_e xer_check_tag(const void *buf_ptr, int size, - const char *need_tag); + typedef enum xer_check_tag + { + XCT_BROKEN = 0, /* The tag is broken */ + XCT_OPENING = 1, /* This is the tag */ + XCT_CLOSING = 2, /* This is the tag */ + XCT_BOTH = 3, /* This is the tag */ + XCT__UNK__MASK = 4, /* Mask of everything unexpected */ + XCT_UNKNOWN_OP = 5, /* Unexpected tag */ + XCT_UNKNOWN_CL = 6, /* Unexpected tag */ + XCT_UNKNOWN_BO = 7 /* Unexpected tag */ + } xer_check_tag_e; + xer_check_tag_e xer_check_tag(const void *buf_ptr, int size, + const char *need_tag); -/* + /* * Check whether this buffer consists of entirely XER whitespace characters. * RETURN VALUES: * 1: Whitespace or empty string * 0: Non-whitespace */ -int xer_is_whitespace(const void *chunk_buf, size_t chunk_size); + int xer_is_whitespace(const void *chunk_buf, size_t chunk_size); -/* + /* * Skip the series of anticipated extensions. */ -int xer_skip_unknown(xer_check_tag_e tcv, ber_tlv_len_t *depth); + int xer_skip_unknown(xer_check_tag_e tcv, ber_tlv_len_t *depth); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/xer_encoder.h b/src/core/libs/supl/asn-rrlp/xer_encoder.h index e140bafff..5b640d425 100644 --- a/src/core/libs/supl/asn-rrlp/xer_encoder.h +++ b/src/core/libs/supl/asn-rrlp/xer_encoder.h @@ -8,30 +8,31 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* Flags used by the xer_encode() and (*xer_type_encoder_f), defined below */ -enum xer_encoder_flags_e -{ - /* Mode of encoding */ - XER_F_BASIC = 0x01, /* BASIC-XER (pretty-printing) */ - XER_F_CANONICAL = 0x02 /* Canonical XER (strict rules) */ -}; + /* Flags used by the xer_encode() and (*xer_type_encoder_f), defined below */ + enum xer_encoder_flags_e + { + /* Mode of encoding */ + XER_F_BASIC = 0x01, /* BASIC-XER (pretty-printing) */ + XER_F_CANONICAL = 0x02 /* Canonical XER (strict rules) */ + }; -/* + /* * The XER encoder of any type. May be invoked by the application. */ -asn_enc_rval_t xer_encode(struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - enum xer_encoder_flags_e xer_flags, - asn_app_consume_bytes_f *consume_bytes_cb, - void *app_key /* Arbitrary callback argument */ -); + asn_enc_rval_t xer_encode(struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + enum xer_encoder_flags_e xer_flags, + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key /* Arbitrary callback argument */ + ); -/* + /* * The variant of the above function which dumps the BASIC-XER (XER_F_BASIC) * output into the chosen file pointer. * RETURN VALUES: @@ -39,19 +40,19 @@ asn_enc_rval_t xer_encode(struct asn_TYPE_descriptor_s *type_descriptor, * -1: Problem printing the structure. * WARNING: No sensible errno value is returned. */ -int xer_fprint(FILE *stream, struct asn_TYPE_descriptor_s *td, void *sptr); + int xer_fprint(FILE *stream, struct asn_TYPE_descriptor_s *td, void *sptr); -/* + /* * Type of the generic XER encoder. */ -typedef asn_enc_rval_t(xer_type_encoder_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - int ilevel, /* Level of indentation */ - enum xer_encoder_flags_e xer_flags, - asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ - void *app_key /* Arbitrary callback argument */ -); + typedef asn_enc_rval_t(xer_type_encoder_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + int ilevel, /* Level of indentation */ + enum xer_encoder_flags_e xer_flags, + asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ + ); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-rrlp/xer_support.h b/src/core/libs/supl/asn-rrlp/xer_support.h index dee9bb1fd..13d8bbd06 100644 --- a/src/core/libs/supl/asn-rrlp/xer_support.h +++ b/src/core/libs/supl/asn-rrlp/xer_support.h @@ -9,25 +9,27 @@ #include /* Platform-specific types */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* + /* * Types of data transferred to the application. */ -typedef enum { - PXML_TEXT, /* Plain text between XML tags. */ - PXML_TAG, /* A tag, starting with '<'. */ - PXML_COMMENT, /* An XML comment, including "". */ - /* + typedef enum + { + PXML_TEXT, /* Plain text between XML tags. */ + PXML_TAG, /* A tag, starting with '<'. */ + PXML_COMMENT, /* An XML comment, including "". */ + /* * The following chunk types are reported if the chunk * terminates the specified XML element. */ - PXML_TAG_END, /* Tag ended */ - PXML_COMMENT_END /* Comment ended */ -} pxml_chunk_type_e; + PXML_TAG_END, /* Tag ended */ + PXML_COMMENT_END /* Comment ended */ + } pxml_chunk_type_e; -/* + /* * Callback function that is called by the parser when parsed data is * available. The _opaque is the pointer to a field containing opaque user * data specified in pxml_create() call. The chunk type is _type and the text @@ -35,18 +37,18 @@ typedef enum { * pxml_feed() call) starting at offset _offset and of _size bytes size. * The chunk is NOT '\0'-terminated. */ -typedef int(pxml_callback_f)(pxml_chunk_type_e _type, - const void *_chunk_data, size_t _chunk_size, void *_key); + typedef int(pxml_callback_f)(pxml_chunk_type_e _type, + const void *_chunk_data, size_t _chunk_size, void *_key); -/* + /* * Parse the given buffer as it were a chunk of XML data. * Invoke the specified callback each time the meaninful data is found. * This function returns number of bytes consumed from the bufer. * It will always be lesser than or equal to the specified _size. * The next invocation of this function must account the difference. */ -ssize_t pxml_parse(int *_stateContext, const void *_buf, size_t _size, - pxml_callback_f *cb, void *_key); + ssize_t pxml_parse(int *_stateContext, const void *_buf, size_t _size, + pxml_callback_f *cb, void *_key); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/AltitudeInfo.h b/src/core/libs/supl/asn-supl/AltitudeInfo.h index 63fc08bdf..117da26e2 100644 --- a/src/core/libs/supl/asn-supl/AltitudeInfo.h +++ b/src/core/libs/supl/asn-supl/AltitudeInfo.h @@ -16,33 +16,35 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum altitudeDirection { - altitudeDirection_height = 0, - altitudeDirection_depth = 1 -} e_altitudeDirection; + /* Dependencies */ + typedef enum altitudeDirection + { + altitudeDirection_height = 0, + altitudeDirection_depth = 1 + } e_altitudeDirection; -/* AltitudeInfo */ -typedef struct AltitudeInfo -{ - ENUMERATED_t altitudeDirection; - long altitude; - long altUncertainty; - /* + /* AltitudeInfo */ + typedef struct AltitudeInfo + { + ENUMERATED_t altitudeDirection; + long altitude; + long altUncertainty; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} AltitudeInfo_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } AltitudeInfo_t; -/* Implementation */ -/* extern asn_TYPE_descriptor_t asn_DEF_altitudeDirection_2; // (Use -fall-defs-global to expose) */ -extern asn_TYPE_descriptor_t asn_DEF_AltitudeInfo; + /* Implementation */ + /* extern asn_TYPE_descriptor_t asn_DEF_altitudeDirection_2; // (Use -fall-defs-global to expose) */ + extern asn_TYPE_descriptor_t asn_DEF_AltitudeInfo; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/BIT_STRING.h b/src/core/libs/supl/asn-supl/BIT_STRING.h index f1dc0718d..0008e0d82 100644 --- a/src/core/libs/supl/asn-supl/BIT_STRING.h +++ b/src/core/libs/supl/asn-supl/BIT_STRING.h @@ -8,24 +8,25 @@ #include /* Some help from OCTET STRING */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef struct BIT_STRING_s -{ - uint8_t *buf; /* BIT STRING body */ - int size; /* Size of the above buffer */ + typedef struct BIT_STRING_s + { + uint8_t *buf; /* BIT STRING body */ + int size; /* Size of the above buffer */ - int bits_unused; /* Unused trailing bits in the last octet (0..7) */ + int bits_unused; /* Unused trailing bits in the last octet (0..7) */ - asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ -} BIT_STRING_t; + asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ + } BIT_STRING_t; -extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING; + extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING; -asn_struct_print_f BIT_STRING_print; /* Human-readable output */ -asn_constr_check_f BIT_STRING_constraint; -xer_type_encoder_f BIT_STRING_encode_xer; + asn_struct_print_f BIT_STRING_print; /* Human-readable output */ + asn_constr_check_f BIT_STRING_constraint; + xer_type_encoder_f BIT_STRING_encode_xer; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/BOOLEAN.h b/src/core/libs/supl/asn-supl/BOOLEAN.h index e6ce5cbf2..b74f2b430 100644 --- a/src/core/libs/supl/asn-supl/BOOLEAN.h +++ b/src/core/libs/supl/asn-supl/BOOLEAN.h @@ -8,26 +8,27 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* + /* * The underlying integer may contain various values, but everything * non-zero is capped to 0xff by the DER encoder. The BER decoder may * yield non-zero values different from 1, beware. */ -typedef int BOOLEAN_t; + typedef int BOOLEAN_t; -extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN; + extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN; -asn_struct_free_f BOOLEAN_free; -asn_struct_print_f BOOLEAN_print; -ber_type_decoder_f BOOLEAN_decode_ber; -der_type_encoder_f BOOLEAN_encode_der; -xer_type_decoder_f BOOLEAN_decode_xer; -xer_type_encoder_f BOOLEAN_encode_xer; -per_type_decoder_f BOOLEAN_decode_uper; -per_type_encoder_f BOOLEAN_encode_uper; + asn_struct_free_f BOOLEAN_free; + asn_struct_print_f BOOLEAN_print; + ber_type_decoder_f BOOLEAN_decode_ber; + der_type_encoder_f BOOLEAN_encode_der; + xer_type_decoder_f BOOLEAN_decode_xer; + xer_type_encoder_f BOOLEAN_encode_xer; + per_type_decoder_f BOOLEAN_decode_uper; + per_type_encoder_f BOOLEAN_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/CPICH-Ec-N0.h b/src/core/libs/supl/asn-supl/CPICH-Ec-N0.h index dbfcae0e0..de9c51754 100644 --- a/src/core/libs/supl/asn-supl/CPICH-Ec-N0.h +++ b/src/core/libs/supl/asn-supl/CPICH-Ec-N0.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* CPICH-Ec-N0 */ -typedef long CPICH_Ec_N0_t; + /* CPICH-Ec-N0 */ + typedef long CPICH_Ec_N0_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CPICH_Ec_N0; -asn_struct_free_f CPICH_Ec_N0_free; -asn_struct_print_f CPICH_Ec_N0_print; -asn_constr_check_f CPICH_Ec_N0_constraint; -ber_type_decoder_f CPICH_Ec_N0_decode_ber; -der_type_encoder_f CPICH_Ec_N0_encode_der; -xer_type_decoder_f CPICH_Ec_N0_decode_xer; -xer_type_encoder_f CPICH_Ec_N0_encode_xer; -per_type_decoder_f CPICH_Ec_N0_decode_uper; -per_type_encoder_f CPICH_Ec_N0_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_CPICH_Ec_N0; + asn_struct_free_f CPICH_Ec_N0_free; + asn_struct_print_f CPICH_Ec_N0_print; + asn_constr_check_f CPICH_Ec_N0_constraint; + ber_type_decoder_f CPICH_Ec_N0_decode_ber; + der_type_encoder_f CPICH_Ec_N0_encode_der; + xer_type_decoder_f CPICH_Ec_N0_decode_xer; + xer_type_encoder_f CPICH_Ec_N0_encode_xer; + per_type_decoder_f CPICH_Ec_N0_decode_uper; + per_type_encoder_f CPICH_Ec_N0_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/CPICH-RSCP.h b/src/core/libs/supl/asn-supl/CPICH-RSCP.h index 87a5b630e..6b82eac15 100644 --- a/src/core/libs/supl/asn-supl/CPICH-RSCP.h +++ b/src/core/libs/supl/asn-supl/CPICH-RSCP.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* CPICH-RSCP */ -typedef long CPICH_RSCP_t; + /* CPICH-RSCP */ + typedef long CPICH_RSCP_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CPICH_RSCP; -asn_struct_free_f CPICH_RSCP_free; -asn_struct_print_f CPICH_RSCP_print; -asn_constr_check_f CPICH_RSCP_constraint; -ber_type_decoder_f CPICH_RSCP_decode_ber; -der_type_encoder_f CPICH_RSCP_encode_der; -xer_type_decoder_f CPICH_RSCP_decode_xer; -xer_type_encoder_f CPICH_RSCP_encode_xer; -per_type_decoder_f CPICH_RSCP_decode_uper; -per_type_encoder_f CPICH_RSCP_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_CPICH_RSCP; + asn_struct_free_f CPICH_RSCP_free; + asn_struct_print_f CPICH_RSCP_print; + asn_constr_check_f CPICH_RSCP_constraint; + ber_type_decoder_f CPICH_RSCP_decode_ber; + der_type_encoder_f CPICH_RSCP_encode_der; + xer_type_decoder_f CPICH_RSCP_decode_xer; + xer_type_encoder_f CPICH_RSCP_encode_xer; + per_type_decoder_f CPICH_RSCP_decode_uper; + per_type_encoder_f CPICH_RSCP_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/CdmaCellInformation.h b/src/core/libs/supl/asn-supl/CdmaCellInformation.h index 295772c74..fff07339d 100644 --- a/src/core/libs/supl/asn-supl/CdmaCellInformation.h +++ b/src/core/libs/supl/asn-supl/CdmaCellInformation.h @@ -15,31 +15,32 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* CdmaCellInformation */ -typedef struct CdmaCellInformation -{ - long refNID; - long refSID; - long refBASEID; - long refBASELAT; - long reBASELONG; - long refREFPN; - long refWeekNumber; - long refSeconds; - /* + /* CdmaCellInformation */ + typedef struct CdmaCellInformation + { + long refNID; + long refSID; + long refBASEID; + long refBASELAT; + long reBASELONG; + long refREFPN; + long refWeekNumber; + long refSeconds; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} CdmaCellInformation_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } CdmaCellInformation_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CdmaCellInformation; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_CdmaCellInformation; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/CellInfo.h b/src/core/libs/supl/asn-supl/CellInfo.h index 1e088d3bd..945d867c6 100644 --- a/src/core/libs/supl/asn-supl/CellInfo.h +++ b/src/core/libs/supl/asn-supl/CellInfo.h @@ -17,40 +17,42 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum CellInfo_PR { - CellInfo_PR_NOTHING, /* No components present */ - CellInfo_PR_gsmCell, - CellInfo_PR_wcdmaCell, - CellInfo_PR_cdmaCell, - /* Extensions may appear below */ - -} CellInfo_PR; - -/* CellInfo */ -typedef struct CellInfo -{ - CellInfo_PR present; - union CellInfo_u + /* Dependencies */ + typedef enum CellInfo_PR { - GsmCellInformation_t gsmCell; - WcdmaCellInformation_t wcdmaCell; - CdmaCellInformation_t cdmaCell; - /* + CellInfo_PR_NOTHING, /* No components present */ + CellInfo_PR_gsmCell, + CellInfo_PR_wcdmaCell, + CellInfo_PR_cdmaCell, + /* Extensions may appear below */ + + } CellInfo_PR; + + /* CellInfo */ + typedef struct CellInfo + { + CellInfo_PR present; + union CellInfo_u + { + GsmCellInformation_t gsmCell; + WcdmaCellInformation_t wcdmaCell; + CdmaCellInformation_t cdmaCell; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} CellInfo_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } CellInfo_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CellInfo; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_CellInfo; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/CellMeasuredResults.h b/src/core/libs/supl/asn-supl/CellMeasuredResults.h index 09d1e1a32..ce08a12dc 100644 --- a/src/core/libs/supl/asn-supl/CellMeasuredResults.h +++ b/src/core/libs/supl/asn-supl/CellMeasuredResults.h @@ -23,61 +23,63 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum modeSpecificInfo_PR { - modeSpecificInfo_PR_NOTHING, /* No components present */ - modeSpecificInfo_PR_fdd, - modeSpecificInfo_PR_tdd -} modeSpecificInfo_PR; - -/* Forward declarations */ -struct TimeslotISCP_List; - -/* CellMeasuredResults */ -typedef struct CellMeasuredResults -{ - long *cellIdentity /* OPTIONAL */; - struct modeSpecificInfo + /* Dependencies */ + typedef enum modeSpecificInfo_PR { - modeSpecificInfo_PR present; - union CellMeasuredResults__modeSpecificInfo_u + modeSpecificInfo_PR_NOTHING, /* No components present */ + modeSpecificInfo_PR_fdd, + modeSpecificInfo_PR_tdd + } modeSpecificInfo_PR; + + /* Forward declarations */ + struct TimeslotISCP_List; + + /* CellMeasuredResults */ + typedef struct CellMeasuredResults + { + long *cellIdentity /* OPTIONAL */; + struct modeSpecificInfo { - struct fdd + modeSpecificInfo_PR present; + union CellMeasuredResults__modeSpecificInfo_u { - PrimaryCPICH_Info_t primaryCPICH_Info; - CPICH_Ec_N0_t *cpich_Ec_N0 /* OPTIONAL */; - CPICH_RSCP_t *cpich_RSCP /* OPTIONAL */; - Pathloss_t *pathloss /* OPTIONAL */; + struct fdd + { + PrimaryCPICH_Info_t primaryCPICH_Info; + CPICH_Ec_N0_t *cpich_Ec_N0 /* OPTIONAL */; + CPICH_RSCP_t *cpich_RSCP /* OPTIONAL */; + Pathloss_t *pathloss /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } fdd; - struct tdd - { - CellParametersID_t cellParametersID; - TGSN_t *proposedTGSN /* OPTIONAL */; - PrimaryCCPCH_RSCP_t *primaryCCPCH_RSCP /* OPTIONAL */; - Pathloss_t *pathloss /* OPTIONAL */; - struct TimeslotISCP_List *timeslotISCP_List /* OPTIONAL */; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } fdd; + struct tdd + { + CellParametersID_t cellParametersID; + TGSN_t *proposedTGSN /* OPTIONAL */; + PrimaryCCPCH_RSCP_t *primaryCCPCH_RSCP /* OPTIONAL */; + Pathloss_t *pathloss /* OPTIONAL */; + struct TimeslotISCP_List *timeslotISCP_List /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } tdd; - } choice; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } tdd; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } modeSpecificInfo; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; - } modeSpecificInfo; + } CellMeasuredResults_t; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} CellMeasuredResults_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CellMeasuredResults; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_CellMeasuredResults; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/CellMeasuredResultsList.h b/src/core/libs/supl/asn-supl/CellMeasuredResultsList.h index 470d15028..8e1b3785d 100644 --- a/src/core/libs/supl/asn-supl/CellMeasuredResultsList.h +++ b/src/core/libs/supl/asn-supl/CellMeasuredResultsList.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct CellMeasuredResults; + /* Forward declarations */ + struct CellMeasuredResults; -/* CellMeasuredResultsList */ -typedef struct CellMeasuredResultsList -{ - A_SEQUENCE_OF(struct CellMeasuredResults) - list; + /* CellMeasuredResultsList */ + typedef struct CellMeasuredResultsList + { + A_SEQUENCE_OF(struct CellMeasuredResults) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} CellMeasuredResultsList_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } CellMeasuredResultsList_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CellMeasuredResultsList; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_CellMeasuredResultsList; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/CellParametersID.h b/src/core/libs/supl/asn-supl/CellParametersID.h index b0a65bdde..bf693916e 100644 --- a/src/core/libs/supl/asn-supl/CellParametersID.h +++ b/src/core/libs/supl/asn-supl/CellParametersID.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* CellParametersID */ -typedef long CellParametersID_t; + /* CellParametersID */ + typedef long CellParametersID_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_CellParametersID; -asn_struct_free_f CellParametersID_free; -asn_struct_print_f CellParametersID_print; -asn_constr_check_f CellParametersID_constraint; -ber_type_decoder_f CellParametersID_decode_ber; -der_type_encoder_f CellParametersID_encode_der; -xer_type_decoder_f CellParametersID_decode_xer; -xer_type_encoder_f CellParametersID_encode_xer; -per_type_decoder_f CellParametersID_decode_uper; -per_type_encoder_f CellParametersID_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_CellParametersID; + asn_struct_free_f CellParametersID_free; + asn_struct_print_f CellParametersID_print; + asn_constr_check_f CellParametersID_constraint; + ber_type_decoder_f CellParametersID_decode_ber; + der_type_encoder_f CellParametersID_encode_der; + xer_type_decoder_f CellParametersID_decode_xer; + xer_type_encoder_f CellParametersID_encode_xer; + per_type_decoder_f CellParametersID_decode_uper; + per_type_encoder_f CellParametersID_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/DUMMY.h b/src/core/libs/supl/asn-supl/DUMMY.h index b697fe0c2..3d884fc68 100644 --- a/src/core/libs/supl/asn-supl/DUMMY.h +++ b/src/core/libs/supl/asn-supl/DUMMY.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* DUMMY */ -typedef INTEGER_t DUMMY_t; + /* DUMMY */ + typedef INTEGER_t DUMMY_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_DUMMY; -asn_struct_free_f DUMMY_free; -asn_struct_print_f DUMMY_print; -asn_constr_check_f DUMMY_constraint; -ber_type_decoder_f DUMMY_decode_ber; -der_type_encoder_f DUMMY_encode_der; -xer_type_decoder_f DUMMY_decode_xer; -xer_type_encoder_f DUMMY_encode_xer; -per_type_decoder_f DUMMY_decode_uper; -per_type_encoder_f DUMMY_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_DUMMY; + asn_struct_free_f DUMMY_free; + asn_struct_print_f DUMMY_print; + asn_constr_check_f DUMMY_constraint; + ber_type_decoder_f DUMMY_decode_ber; + der_type_encoder_f DUMMY_encode_der; + xer_type_decoder_f DUMMY_decode_xer; + xer_type_encoder_f DUMMY_encode_xer; + per_type_decoder_f DUMMY_decode_uper; + per_type_encoder_f DUMMY_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/ENUMERATED.h b/src/core/libs/supl/asn-supl/ENUMERATED.h index ca5eac176..86c1cf643 100644 --- a/src/core/libs/supl/asn-supl/ENUMERATED.h +++ b/src/core/libs/supl/asn-supl/ENUMERATED.h @@ -8,15 +8,16 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef INTEGER_t ENUMERATED_t; /* Implemented via INTEGER */ + typedef INTEGER_t ENUMERATED_t; /* Implemented via INTEGER */ -extern asn_TYPE_descriptor_t asn_DEF_ENUMERATED; + extern asn_TYPE_descriptor_t asn_DEF_ENUMERATED; -per_type_decoder_f ENUMERATED_decode_uper; -per_type_encoder_f ENUMERATED_encode_uper; + per_type_decoder_f ENUMERATED_decode_uper; + per_type_encoder_f ENUMERATED_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/EncodingType.h b/src/core/libs/supl/asn-supl/EncodingType.h index e36ac853b..40deead4e 100644 --- a/src/core/libs/supl/asn-supl/EncodingType.h +++ b/src/core/libs/supl/asn-supl/EncodingType.h @@ -14,33 +14,35 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum EncodingType { - EncodingType_ucs2 = 0, - EncodingType_gsmDefault = 1, - EncodingType_utf8 = 2 - /* + /* Dependencies */ + typedef enum EncodingType + { + EncodingType_ucs2 = 0, + EncodingType_gsmDefault = 1, + EncodingType_utf8 = 2 + /* * Enumeration is extensible */ -} e_EncodingType; + } e_EncodingType; -/* EncodingType */ -typedef ENUMERATED_t EncodingType_t; + /* EncodingType */ + typedef ENUMERATED_t EncodingType_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_EncodingType; -asn_struct_free_f EncodingType_free; -asn_struct_print_f EncodingType_print; -asn_constr_check_f EncodingType_constraint; -ber_type_decoder_f EncodingType_decode_ber; -der_type_encoder_f EncodingType_encode_der; -xer_type_decoder_f EncodingType_decode_xer; -xer_type_encoder_f EncodingType_encode_xer; -per_type_decoder_f EncodingType_decode_uper; -per_type_encoder_f EncodingType_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_EncodingType; + asn_struct_free_f EncodingType_free; + asn_struct_print_f EncodingType_print; + asn_constr_check_f EncodingType_constraint; + ber_type_decoder_f EncodingType_decode_ber; + der_type_encoder_f EncodingType_encode_der; + xer_type_decoder_f EncodingType_decode_xer; + xer_type_encoder_f EncodingType_encode_xer; + per_type_decoder_f EncodingType_decode_uper; + per_type_encoder_f EncodingType_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/FQDN.h b/src/core/libs/supl/asn-supl/FQDN.h index d202e03fb..0aaf7a1ff 100644 --- a/src/core/libs/supl/asn-supl/FQDN.h +++ b/src/core/libs/supl/asn-supl/FQDN.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* FQDN */ -typedef VisibleString_t FQDN_t; + /* FQDN */ + typedef VisibleString_t FQDN_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_FQDN; -asn_struct_free_f FQDN_free; -asn_struct_print_f FQDN_print; -asn_constr_check_f FQDN_constraint; -ber_type_decoder_f FQDN_decode_ber; -der_type_encoder_f FQDN_encode_der; -xer_type_decoder_f FQDN_decode_xer; -xer_type_encoder_f FQDN_encode_xer; -per_type_decoder_f FQDN_decode_uper; -per_type_encoder_f FQDN_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_FQDN; + asn_struct_free_f FQDN_free; + asn_struct_print_f FQDN_print; + asn_constr_check_f FQDN_constraint; + ber_type_decoder_f FQDN_decode_ber; + der_type_encoder_f FQDN_encode_der; + xer_type_decoder_f FQDN_decode_xer; + xer_type_encoder_f FQDN_encode_xer; + per_type_decoder_f FQDN_decode_uper; + per_type_encoder_f FQDN_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/FormatIndicator.h b/src/core/libs/supl/asn-supl/FormatIndicator.h index 435bada35..b52a8b4e3 100644 --- a/src/core/libs/supl/asn-supl/FormatIndicator.h +++ b/src/core/libs/supl/asn-supl/FormatIndicator.h @@ -14,38 +14,40 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum FormatIndicator { - FormatIndicator_logicalName = 0, - FormatIndicator_e_mailAddress = 1, - FormatIndicator_msisdn = 2, - FormatIndicator_url = 3, - FormatIndicator_sipUrl = 4, - FormatIndicator_min = 5, - FormatIndicator_mdn = 6, - FormatIndicator_imsPublicIdentity = 7 - /* + /* Dependencies */ + typedef enum FormatIndicator + { + FormatIndicator_logicalName = 0, + FormatIndicator_e_mailAddress = 1, + FormatIndicator_msisdn = 2, + FormatIndicator_url = 3, + FormatIndicator_sipUrl = 4, + FormatIndicator_min = 5, + FormatIndicator_mdn = 6, + FormatIndicator_imsPublicIdentity = 7 + /* * Enumeration is extensible */ -} e_FormatIndicator; + } e_FormatIndicator; -/* FormatIndicator */ -typedef ENUMERATED_t FormatIndicator_t; + /* FormatIndicator */ + typedef ENUMERATED_t FormatIndicator_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_FormatIndicator; -asn_struct_free_f FormatIndicator_free; -asn_struct_print_f FormatIndicator_print; -asn_constr_check_f FormatIndicator_constraint; -ber_type_decoder_f FormatIndicator_decode_ber; -der_type_encoder_f FormatIndicator_encode_der; -xer_type_decoder_f FormatIndicator_decode_xer; -xer_type_encoder_f FormatIndicator_encode_xer; -per_type_decoder_f FormatIndicator_decode_uper; -per_type_encoder_f FormatIndicator_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_FormatIndicator; + asn_struct_free_f FormatIndicator_free; + asn_struct_print_f FormatIndicator_print; + asn_constr_check_f FormatIndicator_constraint; + ber_type_decoder_f FormatIndicator_decode_ber; + der_type_encoder_f FormatIndicator_encode_der; + xer_type_decoder_f FormatIndicator_decode_xer; + xer_type_encoder_f FormatIndicator_encode_xer; + per_type_decoder_f FormatIndicator_decode_uper; + per_type_encoder_f FormatIndicator_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/FrequencyInfo.h b/src/core/libs/supl/asn-supl/FrequencyInfo.h index 328256933..48ed6c07e 100644 --- a/src/core/libs/supl/asn-supl/FrequencyInfo.h +++ b/src/core/libs/supl/asn-supl/FrequencyInfo.h @@ -17,48 +17,50 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum fmodeSpecificInfo_PR { - fmodeSpecificInfo_PR_NOTHING, /* No components present */ - fmodeSpecificInfo_PR_fdd, - fmodeSpecificInfo_PR_tdd, - /* Extensions may appear below */ - -} fmodeSpecificInfo_PR; - -/* FrequencyInfo */ -typedef struct FrequencyInfo -{ - struct fmodeSpecificInfo + /* Dependencies */ + typedef enum fmodeSpecificInfo_PR { - fmodeSpecificInfo_PR present; - union FrequencyInfo__fmodeSpecificInfo_u + fmodeSpecificInfo_PR_NOTHING, /* No components present */ + fmodeSpecificInfo_PR_fdd, + fmodeSpecificInfo_PR_tdd, + /* Extensions may appear below */ + + } fmodeSpecificInfo_PR; + + /* FrequencyInfo */ + typedef struct FrequencyInfo + { + struct fmodeSpecificInfo { - FrequencyInfoFDD_t fdd; - FrequencyInfoTDD_t tdd; - /* + fmodeSpecificInfo_PR present; + union FrequencyInfo__fmodeSpecificInfo_u + { + FrequencyInfoFDD_t fdd; + FrequencyInfoTDD_t tdd; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } fmodeSpecificInfo; - /* + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } fmodeSpecificInfo; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} FrequencyInfo_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } FrequencyInfo_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_FrequencyInfo; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_FrequencyInfo; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/FrequencyInfoFDD.h b/src/core/libs/supl/asn-supl/FrequencyInfoFDD.h index a4c37df28..2e9ac7f55 100644 --- a/src/core/libs/supl/asn-supl/FrequencyInfoFDD.h +++ b/src/core/libs/supl/asn-supl/FrequencyInfoFDD.h @@ -15,25 +15,26 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* FrequencyInfoFDD */ -typedef struct FrequencyInfoFDD -{ - UARFCN_t *uarfcn_UL /* OPTIONAL */; - UARFCN_t uarfcn_DL; - /* + /* FrequencyInfoFDD */ + typedef struct FrequencyInfoFDD + { + UARFCN_t *uarfcn_UL /* OPTIONAL */; + UARFCN_t uarfcn_DL; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} FrequencyInfoFDD_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } FrequencyInfoFDD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_FrequencyInfoFDD; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_FrequencyInfoFDD; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/FrequencyInfoTDD.h b/src/core/libs/supl/asn-supl/FrequencyInfoTDD.h index 07b8499f1..1ccedb199 100644 --- a/src/core/libs/supl/asn-supl/FrequencyInfoTDD.h +++ b/src/core/libs/supl/asn-supl/FrequencyInfoTDD.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* FrequencyInfoTDD */ -typedef struct FrequencyInfoTDD -{ - UARFCN_t uarfcn_Nt; - /* + /* FrequencyInfoTDD */ + typedef struct FrequencyInfoTDD + { + UARFCN_t uarfcn_Nt; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} FrequencyInfoTDD_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } FrequencyInfoTDD_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_FrequencyInfoTDD; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_FrequencyInfoTDD; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/GeneralizedTime.h b/src/core/libs/supl/asn-supl/GeneralizedTime.h index 706f9697c..9e9583c7a 100644 --- a/src/core/libs/supl/asn-supl/GeneralizedTime.h +++ b/src/core/libs/supl/asn-supl/GeneralizedTime.h @@ -8,59 +8,60 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef OCTET_STRING_t GeneralizedTime_t; /* Implemented via OCTET STRING */ + typedef OCTET_STRING_t GeneralizedTime_t; /* Implemented via OCTET STRING */ -extern asn_TYPE_descriptor_t asn_DEF_GeneralizedTime; + extern asn_TYPE_descriptor_t asn_DEF_GeneralizedTime; -asn_struct_print_f GeneralizedTime_print; -asn_constr_check_f GeneralizedTime_constraint; -der_type_encoder_f GeneralizedTime_encode_der; -xer_type_encoder_f GeneralizedTime_encode_xer; + asn_struct_print_f GeneralizedTime_print; + asn_constr_check_f GeneralizedTime_constraint; + der_type_encoder_f GeneralizedTime_encode_der; + xer_type_encoder_f GeneralizedTime_encode_xer; -/*********************** + /*********************** * Some handy helpers. * ***********************/ -struct tm; /* */ + struct tm; /* */ -/* + /* * Convert a GeneralizedTime structure into time_t * and optionally into struct tm. * If as_gmt is given, the resulting _optional_tm4fill will have a GMT zone, * instead of default local one. * On error returns -1 and errno set to EINVAL */ -time_t asn_GT2time(const GeneralizedTime_t *, struct tm *_optional_tm4fill, - int as_gmt); + time_t asn_GT2time(const GeneralizedTime_t *, struct tm *_optional_tm4fill, + int as_gmt); -/* A version of the above function also returning the fractions of seconds */ -time_t asn_GT2time_frac(const GeneralizedTime_t *, - int *frac_value, int *frac_digits, /* (value / (10 ^ digits)) */ - struct tm *_optional_tm4fill, int as_gmt); + /* A version of the above function also returning the fractions of seconds */ + time_t asn_GT2time_frac(const GeneralizedTime_t *, + int *frac_value, int *frac_digits, /* (value / (10 ^ digits)) */ + struct tm *_optional_tm4fill, int as_gmt); -/* + /* * Another version returning fractions with defined precision * For example, parsing of the time ending with ".1" seconds * with frac_digits=3 (msec) would yield frac_value = 100. */ -time_t asn_GT2time_prec(const GeneralizedTime_t *, - int *frac_value, int frac_digits, - struct tm *_optional_tm4fill, int as_gmt); + time_t asn_GT2time_prec(const GeneralizedTime_t *, + int *frac_value, int frac_digits, + struct tm *_optional_tm4fill, int as_gmt); -/* + /* * Convert a struct tm into GeneralizedTime. * If _optional_gt is not given, this function will try to allocate one. * If force_gmt is given, the resulting GeneralizedTime will be forced * into a GMT time zone (encoding ends with a "Z"). * On error, this function returns 0 and sets errno. */ -GeneralizedTime_t *asn_time2GT(GeneralizedTime_t *_optional_gt, - const struct tm *, int force_gmt); -GeneralizedTime_t *asn_time2GT_frac(GeneralizedTime_t *_optional_gt, - const struct tm *, int frac_value, int frac_digits, int force_gmt); + GeneralizedTime_t *asn_time2GT(GeneralizedTime_t *_optional_gt, + const struct tm *, int force_gmt); + GeneralizedTime_t *asn_time2GT_frac(GeneralizedTime_t *_optional_gt, + const struct tm *, int frac_value, int frac_digits, int force_gmt); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/GsmCellInformation.h b/src/core/libs/supl/asn-supl/GsmCellInformation.h index 7fcfe18f6..f5f2d4c96 100644 --- a/src/core/libs/supl/asn-supl/GsmCellInformation.h +++ b/src/core/libs/supl/asn-supl/GsmCellInformation.h @@ -15,32 +15,33 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct NMR; + /* Forward declarations */ + struct NMR; -/* GsmCellInformation */ -typedef struct GsmCellInformation -{ - long refMCC; - long refMNC; - long refLAC; - long refCI; - struct NMR *nMR /* OPTIONAL */; - long *tA /* OPTIONAL */; - /* + /* GsmCellInformation */ + typedef struct GsmCellInformation + { + long refMCC; + long refMNC; + long refLAC; + long refCI; + struct NMR *nMR /* OPTIONAL */; + long *tA /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} GsmCellInformation_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } GsmCellInformation_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GsmCellInformation; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_GsmCellInformation; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/Horandveruncert.h b/src/core/libs/supl/asn-supl/Horandveruncert.h index 855fa0316..0c84e5baa 100644 --- a/src/core/libs/supl/asn-supl/Horandveruncert.h +++ b/src/core/libs/supl/asn-supl/Horandveruncert.h @@ -15,29 +15,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Horandveruncert */ -typedef struct Horandveruncert -{ - BIT_STRING_t verdirect; - BIT_STRING_t bearing; - BIT_STRING_t horspeed; - BIT_STRING_t verspeed; - BIT_STRING_t horuncertspeed; - BIT_STRING_t veruncertspeed; - /* + /* Horandveruncert */ + typedef struct Horandveruncert + { + BIT_STRING_t verdirect; + BIT_STRING_t bearing; + BIT_STRING_t horspeed; + BIT_STRING_t verspeed; + BIT_STRING_t horuncertspeed; + BIT_STRING_t veruncertspeed; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Horandveruncert_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Horandveruncert_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Horandveruncert; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Horandveruncert; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/Horandvervel.h b/src/core/libs/supl/asn-supl/Horandvervel.h index b0660289d..06e39bf1f 100644 --- a/src/core/libs/supl/asn-supl/Horandvervel.h +++ b/src/core/libs/supl/asn-supl/Horandvervel.h @@ -15,27 +15,28 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Horandvervel */ -typedef struct Horandvervel -{ - BIT_STRING_t verdirect; - BIT_STRING_t bearing; - BIT_STRING_t horspeed; - BIT_STRING_t verspeed; - /* + /* Horandvervel */ + typedef struct Horandvervel + { + BIT_STRING_t verdirect; + BIT_STRING_t bearing; + BIT_STRING_t horspeed; + BIT_STRING_t verspeed; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Horandvervel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Horandvervel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Horandvervel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Horandvervel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/Horvel.h b/src/core/libs/supl/asn-supl/Horvel.h index 5f8ab2d3a..b702cb503 100644 --- a/src/core/libs/supl/asn-supl/Horvel.h +++ b/src/core/libs/supl/asn-supl/Horvel.h @@ -15,25 +15,26 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Horvel */ -typedef struct Horvel -{ - BIT_STRING_t bearing; - BIT_STRING_t horspeed; - /* + /* Horvel */ + typedef struct Horvel + { + BIT_STRING_t bearing; + BIT_STRING_t horspeed; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Horvel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Horvel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Horvel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Horvel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/Horveluncert.h b/src/core/libs/supl/asn-supl/Horveluncert.h index 8997372b9..08037dc98 100644 --- a/src/core/libs/supl/asn-supl/Horveluncert.h +++ b/src/core/libs/supl/asn-supl/Horveluncert.h @@ -15,26 +15,27 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Horveluncert */ -typedef struct Horveluncert -{ - BIT_STRING_t bearing; - BIT_STRING_t horspeed; - BIT_STRING_t uncertspeed; - /* + /* Horveluncert */ + typedef struct Horveluncert + { + BIT_STRING_t bearing; + BIT_STRING_t horspeed; + BIT_STRING_t uncertspeed; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Horveluncert_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Horveluncert_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Horveluncert; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Horveluncert; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/IA5String.h b/src/core/libs/supl/asn-supl/IA5String.h index 0ce5a4b02..74ccf6a75 100644 --- a/src/core/libs/supl/asn-supl/IA5String.h +++ b/src/core/libs/supl/asn-supl/IA5String.h @@ -8,17 +8,18 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef OCTET_STRING_t IA5String_t; /* Implemented via OCTET STRING */ + typedef OCTET_STRING_t IA5String_t; /* Implemented via OCTET STRING */ -/* + /* * IA5String ASN.1 type definition. */ -extern asn_TYPE_descriptor_t asn_DEF_IA5String; + extern asn_TYPE_descriptor_t asn_DEF_IA5String; -asn_constr_check_f IA5String_constraint; + asn_constr_check_f IA5String_constraint; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/INTEGER.h b/src/core/libs/supl/asn-supl/INTEGER.h index 5720bdbed..2acd13ab9 100644 --- a/src/core/libs/supl/asn-supl/INTEGER.h +++ b/src/core/libs/supl/asn-supl/INTEGER.h @@ -9,60 +9,61 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef ASN__PRIMITIVE_TYPE_t INTEGER_t; + typedef ASN__PRIMITIVE_TYPE_t INTEGER_t; -extern asn_TYPE_descriptor_t asn_DEF_INTEGER; + extern asn_TYPE_descriptor_t asn_DEF_INTEGER; -/* Map with to integer value association */ -typedef struct asn_INTEGER_enum_map_s -{ - long nat_value; /* associated native integer value */ - size_t enum_len; /* strlen("tag") */ - const char *enum_name; /* "tag" */ -} asn_INTEGER_enum_map_t; + /* Map with to integer value association */ + typedef struct asn_INTEGER_enum_map_s + { + long nat_value; /* associated native integer value */ + size_t enum_len; /* strlen("tag") */ + const char *enum_name; /* "tag" */ + } asn_INTEGER_enum_map_t; -/* This type describes an enumeration for INTEGER and ENUMERATED types */ -typedef struct asn_INTEGER_specifics_s -{ - asn_INTEGER_enum_map_t *value2enum; /* N -> "tag"; sorted by N */ - unsigned int *enum2value; /* "tag" => N; sorted by tag */ - int map_count; /* Elements in either map */ - int extension; /* This map is extensible */ - int strict_enumeration; /* Enumeration set is fixed */ - int field_width; /* Size of native integer */ - int field_unsigned; /* Signed=0, unsigned=1 */ -} asn_INTEGER_specifics_t; + /* This type describes an enumeration for INTEGER and ENUMERATED types */ + typedef struct asn_INTEGER_specifics_s + { + asn_INTEGER_enum_map_t *value2enum; /* N -> "tag"; sorted by N */ + unsigned int *enum2value; /* "tag" => N; sorted by tag */ + int map_count; /* Elements in either map */ + int extension; /* This map is extensible */ + int strict_enumeration; /* Enumeration set is fixed */ + int field_width; /* Size of native integer */ + int field_unsigned; /* Signed=0, unsigned=1 */ + } asn_INTEGER_specifics_t; -asn_struct_print_f INTEGER_print; -ber_type_decoder_f INTEGER_decode_ber; -der_type_encoder_f INTEGER_encode_der; -xer_type_decoder_f INTEGER_decode_xer; -xer_type_encoder_f INTEGER_encode_xer; -per_type_decoder_f INTEGER_decode_uper; -per_type_encoder_f INTEGER_encode_uper; + asn_struct_print_f INTEGER_print; + ber_type_decoder_f INTEGER_decode_ber; + der_type_encoder_f INTEGER_encode_der; + xer_type_decoder_f INTEGER_decode_xer; + xer_type_encoder_f INTEGER_encode_xer; + per_type_decoder_f INTEGER_decode_uper; + per_type_encoder_f INTEGER_encode_uper; -/*********************************** + /*********************************** * Some handy conversion routines. * ***********************************/ -/* + /* * Returns 0 if it was possible to convert, -1 otherwise. * -1/EINVAL: Mandatory argument missing * -1/ERANGE: Value encoded is out of range for long representation * -1/ENOMEM: Memory allocation failed (in asn_long2INTEGER()). */ -int asn_INTEGER2long(const INTEGER_t *i, long *l); -int asn_INTEGER2ulong(const INTEGER_t *i, unsigned long *l); -int asn_long2INTEGER(INTEGER_t *i, long l); -int asn_ulong2INTEGER(INTEGER_t *i, unsigned long l); + int asn_INTEGER2long(const INTEGER_t *i, long *l); + int asn_INTEGER2ulong(const INTEGER_t *i, unsigned long *l); + int asn_long2INTEGER(INTEGER_t *i, long l); + int asn_ulong2INTEGER(INTEGER_t *i, unsigned long l); -/* + /* * Convert the integer value into the corresponding enumeration map entry. */ -const asn_INTEGER_enum_map_t *INTEGER_map_value2enum(asn_INTEGER_specifics_t *specs, long value); + const asn_INTEGER_enum_map_t *INTEGER_map_value2enum(asn_INTEGER_specifics_t *specs, long value); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/IPAddress.h b/src/core/libs/supl/asn-supl/IPAddress.h index b6998aba9..a049e9d94 100644 --- a/src/core/libs/supl/asn-supl/IPAddress.h +++ b/src/core/libs/supl/asn-supl/IPAddress.h @@ -15,32 +15,34 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum IPAddress_PR { - IPAddress_PR_NOTHING, /* No components present */ - IPAddress_PR_ipv4Address, - IPAddress_PR_ipv6Address -} IPAddress_PR; - -/* IPAddress */ -typedef struct IPAddress -{ - IPAddress_PR present; - union IPAddress_u + /* Dependencies */ + typedef enum IPAddress_PR { - OCTET_STRING_t ipv4Address; - OCTET_STRING_t ipv6Address; - } choice; + IPAddress_PR_NOTHING, /* No components present */ + IPAddress_PR_ipv4Address, + IPAddress_PR_ipv6Address + } IPAddress_PR; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} IPAddress_t; + /* IPAddress */ + typedef struct IPAddress + { + IPAddress_PR present; + union IPAddress_u + { + OCTET_STRING_t ipv4Address; + OCTET_STRING_t ipv6Address; + } choice; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_IPAddress; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } IPAddress_t; + + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_IPAddress; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/KeyIdentity.h b/src/core/libs/supl/asn-supl/KeyIdentity.h index a7f20a278..1347758dc 100644 --- a/src/core/libs/supl/asn-supl/KeyIdentity.h +++ b/src/core/libs/supl/asn-supl/KeyIdentity.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* KeyIdentity */ -typedef BIT_STRING_t KeyIdentity_t; + /* KeyIdentity */ + typedef BIT_STRING_t KeyIdentity_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_KeyIdentity; -asn_struct_free_f KeyIdentity_free; -asn_struct_print_f KeyIdentity_print; -asn_constr_check_f KeyIdentity_constraint; -ber_type_decoder_f KeyIdentity_decode_ber; -der_type_encoder_f KeyIdentity_encode_der; -xer_type_decoder_f KeyIdentity_decode_xer; -xer_type_encoder_f KeyIdentity_encode_xer; -per_type_decoder_f KeyIdentity_decode_uper; -per_type_encoder_f KeyIdentity_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_KeyIdentity; + asn_struct_free_f KeyIdentity_free; + asn_struct_print_f KeyIdentity_print; + asn_constr_check_f KeyIdentity_constraint; + ber_type_decoder_f KeyIdentity_decode_ber; + der_type_encoder_f KeyIdentity_encode_der; + xer_type_decoder_f KeyIdentity_decode_xer; + xer_type_encoder_f KeyIdentity_encode_xer; + per_type_decoder_f KeyIdentity_decode_uper; + per_type_encoder_f KeyIdentity_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/KeyIdentity4.h b/src/core/libs/supl/asn-supl/KeyIdentity4.h index 7f6afc341..f2e502475 100644 --- a/src/core/libs/supl/asn-supl/KeyIdentity4.h +++ b/src/core/libs/supl/asn-supl/KeyIdentity4.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* KeyIdentity4 */ -typedef BIT_STRING_t KeyIdentity4_t; + /* KeyIdentity4 */ + typedef BIT_STRING_t KeyIdentity4_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_KeyIdentity4; -asn_struct_free_f KeyIdentity4_free; -asn_struct_print_f KeyIdentity4_print; -asn_constr_check_f KeyIdentity4_constraint; -ber_type_decoder_f KeyIdentity4_decode_ber; -der_type_encoder_f KeyIdentity4_encode_der; -xer_type_decoder_f KeyIdentity4_decode_xer; -xer_type_encoder_f KeyIdentity4_encode_xer; -per_type_decoder_f KeyIdentity4_decode_uper; -per_type_encoder_f KeyIdentity4_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_KeyIdentity4; + asn_struct_free_f KeyIdentity4_free; + asn_struct_print_f KeyIdentity4_print; + asn_constr_check_f KeyIdentity4_constraint; + ber_type_decoder_f KeyIdentity4_decode_ber; + der_type_encoder_f KeyIdentity4_encode_der; + xer_type_decoder_f KeyIdentity4_decode_xer; + xer_type_encoder_f KeyIdentity4_encode_xer; + per_type_decoder_f KeyIdentity4_decode_uper; + per_type_encoder_f KeyIdentity4_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/LocationId.h b/src/core/libs/supl/asn-supl/LocationId.h index ada91802e..55842f70b 100644 --- a/src/core/libs/supl/asn-supl/LocationId.h +++ b/src/core/libs/supl/asn-supl/LocationId.h @@ -16,25 +16,26 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* LocationId */ -typedef struct LocationId -{ - CellInfo_t cellInfo; - Status_t status; - /* + /* LocationId */ + typedef struct LocationId + { + CellInfo_t cellInfo; + Status_t status; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} LocationId_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } LocationId_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_LocationId; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_LocationId; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/MAC.h b/src/core/libs/supl/asn-supl/MAC.h index 02c3e9b63..27a57977b 100644 --- a/src/core/libs/supl/asn-supl/MAC.h +++ b/src/core/libs/supl/asn-supl/MAC.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* MAC */ -typedef BIT_STRING_t MAC_t; + /* MAC */ + typedef BIT_STRING_t MAC_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MAC; -asn_struct_free_f MAC_free; -asn_struct_print_f MAC_print; -asn_constr_check_f MAC_constraint; -ber_type_decoder_f MAC_decode_ber; -der_type_encoder_f MAC_encode_der; -xer_type_decoder_f MAC_decode_xer; -xer_type_encoder_f MAC_encode_xer; -per_type_decoder_f MAC_decode_uper; -per_type_encoder_f MAC_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MAC; + asn_struct_free_f MAC_free; + asn_struct_print_f MAC_print; + asn_constr_check_f MAC_constraint; + ber_type_decoder_f MAC_decode_ber; + der_type_encoder_f MAC_encode_der; + xer_type_decoder_f MAC_decode_xer; + xer_type_encoder_f MAC_encode_xer; + per_type_decoder_f MAC_decode_uper; + per_type_encoder_f MAC_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/MeasuredResults.h b/src/core/libs/supl/asn-supl/MeasuredResults.h index 21b6199f7..4b082732f 100644 --- a/src/core/libs/supl/asn-supl/MeasuredResults.h +++ b/src/core/libs/supl/asn-supl/MeasuredResults.h @@ -15,26 +15,27 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct FrequencyInfo; -struct CellMeasuredResultsList; + /* Forward declarations */ + struct FrequencyInfo; + struct CellMeasuredResultsList; -/* MeasuredResults */ -typedef struct MeasuredResults -{ - struct FrequencyInfo *frequencyInfo /* OPTIONAL */; - UTRA_CarrierRSSI_t *utra_CarrierRSSI /* OPTIONAL */; - struct CellMeasuredResultsList *cellMeasuredResultsList /* OPTIONAL */; + /* MeasuredResults */ + typedef struct MeasuredResults + { + struct FrequencyInfo *frequencyInfo /* OPTIONAL */; + UTRA_CarrierRSSI_t *utra_CarrierRSSI /* OPTIONAL */; + struct CellMeasuredResultsList *cellMeasuredResultsList /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} MeasuredResults_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } MeasuredResults_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MeasuredResults; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MeasuredResults; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/MeasuredResultsList.h b/src/core/libs/supl/asn-supl/MeasuredResultsList.h index b34ddaa67..6195c1876 100644 --- a/src/core/libs/supl/asn-supl/MeasuredResultsList.h +++ b/src/core/libs/supl/asn-supl/MeasuredResultsList.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct MeasuredResults; + /* Forward declarations */ + struct MeasuredResults; -/* MeasuredResultsList */ -typedef struct MeasuredResultsList -{ - A_SEQUENCE_OF(struct MeasuredResults) - list; + /* MeasuredResultsList */ + typedef struct MeasuredResultsList + { + A_SEQUENCE_OF(struct MeasuredResults) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} MeasuredResultsList_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } MeasuredResultsList_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MeasuredResultsList; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_MeasuredResultsList; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/NMR.h b/src/core/libs/supl/asn-supl/NMR.h index f36f0960a..629681368 100644 --- a/src/core/libs/supl/asn-supl/NMR.h +++ b/src/core/libs/supl/asn-supl/NMR.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct NMRelement; + /* Forward declarations */ + struct NMRelement; -/* NMR */ -typedef struct NMR -{ - A_SEQUENCE_OF(struct NMRelement) - list; + /* NMR */ + typedef struct NMR + { + A_SEQUENCE_OF(struct NMRelement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} NMR_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } NMR_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_NMR; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_NMR; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/NMRelement.h b/src/core/libs/supl/asn-supl/NMRelement.h index e2da78cf4..1ea9d3b5e 100644 --- a/src/core/libs/supl/asn-supl/NMRelement.h +++ b/src/core/libs/supl/asn-supl/NMRelement.h @@ -15,26 +15,27 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* NMRelement */ -typedef struct NMRelement -{ - long aRFCN; - long bSIC; - long rxLev; - /* + /* NMRelement */ + typedef struct NMRelement + { + long aRFCN; + long bSIC; + long rxLev; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} NMRelement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } NMRelement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_NMRelement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_NMRelement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/NativeEnumerated.h b/src/core/libs/supl/asn-supl/NativeEnumerated.h index 9c37887c1..3b3d4b074 100644 --- a/src/core/libs/supl/asn-supl/NativeEnumerated.h +++ b/src/core/libs/supl/asn-supl/NativeEnumerated.h @@ -16,14 +16,15 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated; + extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated; -xer_type_encoder_f NativeEnumerated_encode_xer; -per_type_decoder_f NativeEnumerated_decode_uper; -per_type_encoder_f NativeEnumerated_encode_uper; + xer_type_encoder_f NativeEnumerated_encode_xer; + per_type_decoder_f NativeEnumerated_decode_uper; + per_type_encoder_f NativeEnumerated_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/NativeInteger.h b/src/core/libs/supl/asn-supl/NativeInteger.h index 5f770861b..14311ae57 100644 --- a/src/core/libs/supl/asn-supl/NativeInteger.h +++ b/src/core/libs/supl/asn-supl/NativeInteger.h @@ -16,19 +16,20 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -extern asn_TYPE_descriptor_t asn_DEF_NativeInteger; + extern asn_TYPE_descriptor_t asn_DEF_NativeInteger; -asn_struct_free_f NativeInteger_free; -asn_struct_print_f NativeInteger_print; -ber_type_decoder_f NativeInteger_decode_ber; -der_type_encoder_f NativeInteger_encode_der; -xer_type_decoder_f NativeInteger_decode_xer; -xer_type_encoder_f NativeInteger_encode_xer; -per_type_decoder_f NativeInteger_decode_uper; -per_type_encoder_f NativeInteger_encode_uper; + asn_struct_free_f NativeInteger_free; + asn_struct_print_f NativeInteger_print; + ber_type_decoder_f NativeInteger_decode_ber; + der_type_encoder_f NativeInteger_encode_der; + xer_type_decoder_f NativeInteger_decode_xer; + xer_type_encoder_f NativeInteger_encode_xer; + per_type_decoder_f NativeInteger_decode_uper; + per_type_encoder_f NativeInteger_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/Notification.h b/src/core/libs/supl/asn-supl/Notification.h index 21730339f..5e2f488ee 100644 --- a/src/core/libs/supl/asn-supl/Notification.h +++ b/src/core/libs/supl/asn-supl/Notification.h @@ -18,29 +18,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Notification */ -typedef struct Notification -{ - NotificationType_t notificationType; - EncodingType_t *encodingType /* OPTIONAL */; - OCTET_STRING_t *requestorId /* OPTIONAL */; - FormatIndicator_t *requestorIdType /* OPTIONAL */; - OCTET_STRING_t *clientName /* OPTIONAL */; - FormatIndicator_t *clientNameType /* OPTIONAL */; - /* + /* Notification */ + typedef struct Notification + { + NotificationType_t notificationType; + EncodingType_t *encodingType /* OPTIONAL */; + OCTET_STRING_t *requestorId /* OPTIONAL */; + FormatIndicator_t *requestorIdType /* OPTIONAL */; + OCTET_STRING_t *clientName /* OPTIONAL */; + FormatIndicator_t *clientNameType /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Notification_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Notification_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Notification; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Notification; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/NotificationType.h b/src/core/libs/supl/asn-supl/NotificationType.h index 83e5a5881..24012dbcf 100644 --- a/src/core/libs/supl/asn-supl/NotificationType.h +++ b/src/core/libs/supl/asn-supl/NotificationType.h @@ -14,35 +14,37 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum NotificationType { - NotificationType_noNotificationNoVerification = 0, - NotificationType_notificationOnly = 1, - NotificationType_notificationAndVerficationAllowedNA = 2, - NotificationType_notificationAndVerficationDeniedNA = 3, - NotificationType_privacyOverride = 4 - /* + /* Dependencies */ + typedef enum NotificationType + { + NotificationType_noNotificationNoVerification = 0, + NotificationType_notificationOnly = 1, + NotificationType_notificationAndVerficationAllowedNA = 2, + NotificationType_notificationAndVerficationDeniedNA = 3, + NotificationType_privacyOverride = 4 + /* * Enumeration is extensible */ -} e_NotificationType; + } e_NotificationType; -/* NotificationType */ -typedef ENUMERATED_t NotificationType_t; + /* NotificationType */ + typedef ENUMERATED_t NotificationType_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_NotificationType; -asn_struct_free_f NotificationType_free; -asn_struct_print_f NotificationType_print; -asn_constr_check_f NotificationType_constraint; -ber_type_decoder_f NotificationType_decode_ber; -der_type_encoder_f NotificationType_encode_der; -xer_type_decoder_f NotificationType_decode_xer; -xer_type_encoder_f NotificationType_encode_xer; -per_type_decoder_f NotificationType_decode_uper; -per_type_encoder_f NotificationType_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_NotificationType; + asn_struct_free_f NotificationType_free; + asn_struct_print_f NotificationType_print; + asn_constr_check_f NotificationType_constraint; + ber_type_decoder_f NotificationType_decode_ber; + der_type_encoder_f NotificationType_encode_der; + xer_type_decoder_f NotificationType_decode_xer; + xer_type_encoder_f NotificationType_encode_xer; + per_type_decoder_f NotificationType_decode_uper; + per_type_encoder_f NotificationType_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/OCTET_STRING.h b/src/core/libs/supl/asn-supl/OCTET_STRING.h index 2f933ab64..124fde559 100644 --- a/src/core/libs/supl/asn-supl/OCTET_STRING.h +++ b/src/core/libs/supl/asn-supl/OCTET_STRING.h @@ -8,37 +8,38 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef struct OCTET_STRING -{ - uint8_t *buf; /* Buffer with consecutive OCTET_STRING bits */ - int size; /* Size of the buffer */ + typedef struct OCTET_STRING + { + uint8_t *buf; /* Buffer with consecutive OCTET_STRING bits */ + int size; /* Size of the buffer */ - asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ -} OCTET_STRING_t; + asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ + } OCTET_STRING_t; -extern asn_TYPE_descriptor_t asn_DEF_OCTET_STRING; + extern asn_TYPE_descriptor_t asn_DEF_OCTET_STRING; -asn_struct_free_f OCTET_STRING_free; -asn_struct_print_f OCTET_STRING_print; -asn_struct_print_f OCTET_STRING_print_utf8; -ber_type_decoder_f OCTET_STRING_decode_ber; -der_type_encoder_f OCTET_STRING_encode_der; -xer_type_decoder_f OCTET_STRING_decode_xer_hex; /* Hexadecimal */ -xer_type_decoder_f OCTET_STRING_decode_xer_binary; /* 01010111010 */ -xer_type_decoder_f OCTET_STRING_decode_xer_utf8; /* ASCII/UTF-8 */ -xer_type_encoder_f OCTET_STRING_encode_xer; -xer_type_encoder_f OCTET_STRING_encode_xer_utf8; -per_type_decoder_f OCTET_STRING_decode_uper; -per_type_encoder_f OCTET_STRING_encode_uper; + asn_struct_free_f OCTET_STRING_free; + asn_struct_print_f OCTET_STRING_print; + asn_struct_print_f OCTET_STRING_print_utf8; + ber_type_decoder_f OCTET_STRING_decode_ber; + der_type_encoder_f OCTET_STRING_encode_der; + xer_type_decoder_f OCTET_STRING_decode_xer_hex; /* Hexadecimal */ + xer_type_decoder_f OCTET_STRING_decode_xer_binary; /* 01010111010 */ + xer_type_decoder_f OCTET_STRING_decode_xer_utf8; /* ASCII/UTF-8 */ + xer_type_encoder_f OCTET_STRING_encode_xer; + xer_type_encoder_f OCTET_STRING_encode_xer_utf8; + per_type_decoder_f OCTET_STRING_decode_uper; + per_type_encoder_f OCTET_STRING_encode_uper; -/****************************** + /****************************** * Handy conversion routines. * ******************************/ -/* + /* * This function clears the previous value of the OCTET STRING (if any) * and then allocates a new memory with the specified content (str/size). * If size = -1, the size of the original string will be determined @@ -47,40 +48,40 @@ per_type_encoder_f OCTET_STRING_encode_uper; * current contents of the OCTET STRING. * Returns 0 if it was possible to perform operation, -1 otherwise. */ -int OCTET_STRING_fromBuf(OCTET_STRING_t *s, const char *str, int size); + int OCTET_STRING_fromBuf(OCTET_STRING_t *s, const char *str, int size); /* Handy conversion from the C string into the OCTET STRING. */ #define OCTET_STRING_fromString(s, str) OCTET_STRING_fromBuf(s, str, -1) -/* + /* * Allocate and fill the new OCTET STRING and return a pointer to the newly * allocated object. NULL is permitted in str: the function will just allocate * empty OCTET STRING. */ -OCTET_STRING_t *OCTET_STRING_new_fromBuf(asn_TYPE_descriptor_t *td, - const char *str, int size); + OCTET_STRING_t *OCTET_STRING_new_fromBuf(asn_TYPE_descriptor_t *td, + const char *str, int size); -/**************************** + /**************************** * Internally useful stuff. * ****************************/ -typedef struct asn_OCTET_STRING_specifics_s -{ - /* + typedef struct asn_OCTET_STRING_specifics_s + { + /* * Target structure description. */ - int struct_size; /* Size of the structure */ - int ctx_offset; /* Offset of the asn_struct_ctx_t member */ + int struct_size; /* Size of the structure */ + int ctx_offset; /* Offset of the asn_struct_ctx_t member */ - enum asn_OS_Subvariant - { - ASN_OSUBV_ANY, /* The open type (ANY) */ - ASN_OSUBV_BIT, /* BIT STRING */ - ASN_OSUBV_STR, /* String types, not {BMP,Universal}String */ - ASN_OSUBV_U16, /* 16-bit character (BMPString) */ - ASN_OSUBV_U32 /* 32-bit character (UniversalString) */ - } subvariant; -} asn_OCTET_STRING_specifics_t; + enum asn_OS_Subvariant + { + ASN_OSUBV_ANY, /* The open type (ANY) */ + ASN_OSUBV_BIT, /* BIT STRING */ + ASN_OSUBV_STR, /* String types, not {BMP,Universal}String */ + ASN_OSUBV_U16, /* 16-bit character (BMPString) */ + ASN_OSUBV_U32 /* 32-bit character (UniversalString) */ + } subvariant; + } asn_OCTET_STRING_specifics_t; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/Pathloss.h b/src/core/libs/supl/asn-supl/Pathloss.h index 8185be136..e0f0aa474 100644 --- a/src/core/libs/supl/asn-supl/Pathloss.h +++ b/src/core/libs/supl/asn-supl/Pathloss.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Pathloss */ -typedef long Pathloss_t; + /* Pathloss */ + typedef long Pathloss_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Pathloss; -asn_struct_free_f Pathloss_free; -asn_struct_print_f Pathloss_print; -asn_constr_check_f Pathloss_constraint; -ber_type_decoder_f Pathloss_decode_ber; -der_type_encoder_f Pathloss_encode_der; -xer_type_decoder_f Pathloss_decode_xer; -xer_type_encoder_f Pathloss_encode_xer; -per_type_decoder_f Pathloss_decode_uper; -per_type_encoder_f Pathloss_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Pathloss; + asn_struct_free_f Pathloss_free; + asn_struct_print_f Pathloss_print; + asn_constr_check_f Pathloss_constraint; + ber_type_decoder_f Pathloss_decode_ber; + der_type_encoder_f Pathloss_encode_der; + xer_type_decoder_f Pathloss_decode_xer; + xer_type_encoder_f Pathloss_encode_xer; + per_type_decoder_f Pathloss_decode_uper; + per_type_encoder_f Pathloss_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/PosMethod.h b/src/core/libs/supl/asn-supl/PosMethod.h index f81ffd92b..e34dd5a14 100644 --- a/src/core/libs/supl/asn-supl/PosMethod.h +++ b/src/core/libs/supl/asn-supl/PosMethod.h @@ -14,40 +14,42 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum PosMethod { - PosMethod_agpsSETassisted = 0, - PosMethod_agpsSETbased = 1, - PosMethod_agpsSETassistedpref = 2, - PosMethod_agpsSETbasedpref = 3, - PosMethod_autonomousGPS = 4, - PosMethod_aFLT = 5, - PosMethod_eCID = 6, - PosMethod_eOTD = 7, - PosMethod_oTDOA = 8, - PosMethod_noPosition = 9 - /* + /* Dependencies */ + typedef enum PosMethod + { + PosMethod_agpsSETassisted = 0, + PosMethod_agpsSETbased = 1, + PosMethod_agpsSETassistedpref = 2, + PosMethod_agpsSETbasedpref = 3, + PosMethod_autonomousGPS = 4, + PosMethod_aFLT = 5, + PosMethod_eCID = 6, + PosMethod_eOTD = 7, + PosMethod_oTDOA = 8, + PosMethod_noPosition = 9 + /* * Enumeration is extensible */ -} e_PosMethod; + } e_PosMethod; -/* PosMethod */ -typedef ENUMERATED_t PosMethod_t; + /* PosMethod */ + typedef ENUMERATED_t PosMethod_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_PosMethod; -asn_struct_free_f PosMethod_free; -asn_struct_print_f PosMethod_print; -asn_constr_check_f PosMethod_constraint; -ber_type_decoder_f PosMethod_decode_ber; -der_type_encoder_f PosMethod_encode_der; -xer_type_decoder_f PosMethod_decode_xer; -xer_type_encoder_f PosMethod_encode_xer; -per_type_decoder_f PosMethod_decode_uper; -per_type_encoder_f PosMethod_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_PosMethod; + asn_struct_free_f PosMethod_free; + asn_struct_print_f PosMethod_print; + asn_constr_check_f PosMethod_constraint; + ber_type_decoder_f PosMethod_decode_ber; + der_type_encoder_f PosMethod_encode_der; + xer_type_decoder_f PosMethod_decode_xer; + xer_type_encoder_f PosMethod_encode_xer; + per_type_decoder_f PosMethod_decode_uper; + per_type_encoder_f PosMethod_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/PosPayLoad.h b/src/core/libs/supl/asn-supl/PosPayLoad.h index 09c66421b..66c03457d 100644 --- a/src/core/libs/supl/asn-supl/PosPayLoad.h +++ b/src/core/libs/supl/asn-supl/PosPayLoad.h @@ -15,40 +15,42 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum PosPayLoad_PR { - PosPayLoad_PR_NOTHING, /* No components present */ - PosPayLoad_PR_tia801payload, - PosPayLoad_PR_rrcPayload, - PosPayLoad_PR_rrlpPayload, - /* Extensions may appear below */ - -} PosPayLoad_PR; - -/* PosPayLoad */ -typedef struct PosPayLoad -{ - PosPayLoad_PR present; - union PosPayLoad_u + /* Dependencies */ + typedef enum PosPayLoad_PR { - OCTET_STRING_t tia801payload; - OCTET_STRING_t rrcPayload; - OCTET_STRING_t rrlpPayload; - /* + PosPayLoad_PR_NOTHING, /* No components present */ + PosPayLoad_PR_tia801payload, + PosPayLoad_PR_rrcPayload, + PosPayLoad_PR_rrlpPayload, + /* Extensions may appear below */ + + } PosPayLoad_PR; + + /* PosPayLoad */ + typedef struct PosPayLoad + { + PosPayLoad_PR present; + union PosPayLoad_u + { + OCTET_STRING_t tia801payload; + OCTET_STRING_t rrcPayload; + OCTET_STRING_t rrlpPayload; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} PosPayLoad_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } PosPayLoad_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_PosPayLoad; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_PosPayLoad; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/PosProtocol.h b/src/core/libs/supl/asn-supl/PosProtocol.h index 3421b8cf9..a53abed35 100644 --- a/src/core/libs/supl/asn-supl/PosProtocol.h +++ b/src/core/libs/supl/asn-supl/PosProtocol.h @@ -15,26 +15,27 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* PosProtocol */ -typedef struct PosProtocol -{ - BOOLEAN_t tia801; - BOOLEAN_t rrlp; - BOOLEAN_t rrc; - /* + /* PosProtocol */ + typedef struct PosProtocol + { + BOOLEAN_t tia801; + BOOLEAN_t rrlp; + BOOLEAN_t rrc; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} PosProtocol_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } PosProtocol_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_PosProtocol; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_PosProtocol; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/PosTechnology.h b/src/core/libs/supl/asn-supl/PosTechnology.h index 09db10f1f..dcf3ea1c3 100644 --- a/src/core/libs/supl/asn-supl/PosTechnology.h +++ b/src/core/libs/supl/asn-supl/PosTechnology.h @@ -15,30 +15,31 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* PosTechnology */ -typedef struct PosTechnology -{ - BOOLEAN_t agpsSETassisted; - BOOLEAN_t agpsSETBased; - BOOLEAN_t autonomousGPS; - BOOLEAN_t aFLT; - BOOLEAN_t eCID; - BOOLEAN_t eOTD; - BOOLEAN_t oTDOA; - /* + /* PosTechnology */ + typedef struct PosTechnology + { + BOOLEAN_t agpsSETassisted; + BOOLEAN_t agpsSETBased; + BOOLEAN_t autonomousGPS; + BOOLEAN_t aFLT; + BOOLEAN_t eCID; + BOOLEAN_t eOTD; + BOOLEAN_t oTDOA; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} PosTechnology_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } PosTechnology_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_PosTechnology; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_PosTechnology; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/Position.h b/src/core/libs/supl/asn-supl/Position.h index 2fdd11ba8..20306a91f 100644 --- a/src/core/libs/supl/asn-supl/Position.h +++ b/src/core/libs/supl/asn-supl/Position.h @@ -16,29 +16,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct Velocity; + /* Forward declarations */ + struct Velocity; -/* Position */ -typedef struct Position -{ - UTCTime_t timestamp; - PositionEstimate_t positionEstimate; - struct Velocity *velocity /* OPTIONAL */; - /* + /* Position */ + typedef struct Position + { + UTCTime_t timestamp; + PositionEstimate_t positionEstimate; + struct Velocity *velocity /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Position_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Position_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Position; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Position; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/PositionEstimate.h b/src/core/libs/supl/asn-supl/PositionEstimate.h index f5e81aa28..d4d48ae55 100644 --- a/src/core/libs/supl/asn-supl/PositionEstimate.h +++ b/src/core/libs/supl/asn-supl/PositionEstimate.h @@ -16,47 +16,49 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum latitudeSign { - latitudeSign_north = 0, - latitudeSign_south = 1 -} e_latitudeSign; - -/* Forward declarations */ -struct AltitudeInfo; - -/* PositionEstimate */ -typedef struct PositionEstimate -{ - ENUMERATED_t latitudeSign; - long latitude; - long longitude; - struct uncertainty + /* Dependencies */ + typedef enum latitudeSign { - long uncertaintySemiMajor; - long uncertaintySemiMinor; - long orientationMajorAxis; + latitudeSign_north = 0, + latitudeSign_south = 1 + } e_latitudeSign; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } * uncertainty; - long *confidence /* OPTIONAL */; - struct AltitudeInfo *altitudeInfo /* OPTIONAL */; - /* + /* Forward declarations */ + struct AltitudeInfo; + + /* PositionEstimate */ + typedef struct PositionEstimate + { + ENUMERATED_t latitudeSign; + long latitude; + long longitude; + struct uncertainty + { + long uncertaintySemiMajor; + long uncertaintySemiMinor; + long orientationMajorAxis; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } * uncertainty; + long *confidence /* OPTIONAL */; + struct AltitudeInfo *altitudeInfo /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} PositionEstimate_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } PositionEstimate_t; -/* Implementation */ -/* extern asn_TYPE_descriptor_t asn_DEF_latitudeSign_2; // (Use -fall-defs-global to expose) */ -extern asn_TYPE_descriptor_t asn_DEF_PositionEstimate; + /* Implementation */ + /* extern asn_TYPE_descriptor_t asn_DEF_latitudeSign_2; // (Use -fall-defs-global to expose) */ + extern asn_TYPE_descriptor_t asn_DEF_PositionEstimate; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/PrefMethod.h b/src/core/libs/supl/asn-supl/PrefMethod.h index f46328fd7..39c343074 100644 --- a/src/core/libs/supl/asn-supl/PrefMethod.h +++ b/src/core/libs/supl/asn-supl/PrefMethod.h @@ -14,30 +14,32 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum PrefMethod { - PrefMethod_agpsSETassistedPreferred = 0, - PrefMethod_agpsSETBasedPreferred = 1, - PrefMethod_noPreference = 2 -} e_PrefMethod; + /* Dependencies */ + typedef enum PrefMethod + { + PrefMethod_agpsSETassistedPreferred = 0, + PrefMethod_agpsSETBasedPreferred = 1, + PrefMethod_noPreference = 2 + } e_PrefMethod; -/* PrefMethod */ -typedef ENUMERATED_t PrefMethod_t; + /* PrefMethod */ + typedef ENUMERATED_t PrefMethod_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_PrefMethod; -asn_struct_free_f PrefMethod_free; -asn_struct_print_f PrefMethod_print; -asn_constr_check_f PrefMethod_constraint; -ber_type_decoder_f PrefMethod_decode_ber; -der_type_encoder_f PrefMethod_encode_der; -xer_type_decoder_f PrefMethod_decode_xer; -xer_type_encoder_f PrefMethod_encode_xer; -per_type_decoder_f PrefMethod_decode_uper; -per_type_encoder_f PrefMethod_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_PrefMethod; + asn_struct_free_f PrefMethod_free; + asn_struct_print_f PrefMethod_print; + asn_constr_check_f PrefMethod_constraint; + ber_type_decoder_f PrefMethod_decode_ber; + der_type_encoder_f PrefMethod_encode_der; + xer_type_decoder_f PrefMethod_decode_xer; + xer_type_encoder_f PrefMethod_encode_xer; + per_type_decoder_f PrefMethod_decode_uper; + per_type_encoder_f PrefMethod_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/PrimaryCCPCH-RSCP.h b/src/core/libs/supl/asn-supl/PrimaryCCPCH-RSCP.h index a05a10fb1..a425a2daf 100644 --- a/src/core/libs/supl/asn-supl/PrimaryCCPCH-RSCP.h +++ b/src/core/libs/supl/asn-supl/PrimaryCCPCH-RSCP.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* PrimaryCCPCH-RSCP */ -typedef long PrimaryCCPCH_RSCP_t; + /* PrimaryCCPCH-RSCP */ + typedef long PrimaryCCPCH_RSCP_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_PrimaryCCPCH_RSCP; -asn_struct_free_f PrimaryCCPCH_RSCP_free; -asn_struct_print_f PrimaryCCPCH_RSCP_print; -asn_constr_check_f PrimaryCCPCH_RSCP_constraint; -ber_type_decoder_f PrimaryCCPCH_RSCP_decode_ber; -der_type_encoder_f PrimaryCCPCH_RSCP_encode_der; -xer_type_decoder_f PrimaryCCPCH_RSCP_decode_xer; -xer_type_encoder_f PrimaryCCPCH_RSCP_encode_xer; -per_type_decoder_f PrimaryCCPCH_RSCP_decode_uper; -per_type_encoder_f PrimaryCCPCH_RSCP_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_PrimaryCCPCH_RSCP; + asn_struct_free_f PrimaryCCPCH_RSCP_free; + asn_struct_print_f PrimaryCCPCH_RSCP_print; + asn_constr_check_f PrimaryCCPCH_RSCP_constraint; + ber_type_decoder_f PrimaryCCPCH_RSCP_decode_ber; + der_type_encoder_f PrimaryCCPCH_RSCP_encode_der; + xer_type_decoder_f PrimaryCCPCH_RSCP_decode_xer; + xer_type_encoder_f PrimaryCCPCH_RSCP_encode_xer; + per_type_decoder_f PrimaryCCPCH_RSCP_decode_uper; + per_type_encoder_f PrimaryCCPCH_RSCP_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/PrimaryCPICH-Info.h b/src/core/libs/supl/asn-supl/PrimaryCPICH-Info.h index de8ac1255..aceb12991 100644 --- a/src/core/libs/supl/asn-supl/PrimaryCPICH-Info.h +++ b/src/core/libs/supl/asn-supl/PrimaryCPICH-Info.h @@ -15,20 +15,21 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* PrimaryCPICH-Info */ -typedef struct PrimaryCPICH_Info -{ - long primaryScramblingCode; + /* PrimaryCPICH-Info */ + typedef struct PrimaryCPICH_Info + { + long primaryScramblingCode; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} PrimaryCPICH_Info_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } PrimaryCPICH_Info_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_PrimaryCPICH_Info; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_PrimaryCPICH_Info; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/QoP.h b/src/core/libs/supl/asn-supl/QoP.h index 46d66b557..2249a2a15 100644 --- a/src/core/libs/supl/asn-supl/QoP.h +++ b/src/core/libs/supl/asn-supl/QoP.h @@ -15,27 +15,28 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* QoP */ -typedef struct QoP -{ - long horacc; - long *veracc /* OPTIONAL */; - long *maxLocAge /* OPTIONAL */; - long *delay /* OPTIONAL */; - /* + /* QoP */ + typedef struct QoP + { + long horacc; + long *veracc /* OPTIONAL */; + long *maxLocAge /* OPTIONAL */; + long *delay /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} QoP_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } QoP_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_QoP; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_QoP; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/RequestedAssistData.h b/src/core/libs/supl/asn-supl/RequestedAssistData.h index 7daec3db3..5341cc072 100644 --- a/src/core/libs/supl/asn-supl/RequestedAssistData.h +++ b/src/core/libs/supl/asn-supl/RequestedAssistData.h @@ -15,36 +15,37 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct XNavigationModel; + /* Forward declarations */ + struct XNavigationModel; -/* RequestedAssistData */ -typedef struct RequestedAssistData -{ - BOOLEAN_t almanacRequested; - BOOLEAN_t utcModelRequested; - BOOLEAN_t ionosphericModelRequested; - BOOLEAN_t dgpsCorrectionsRequested; - BOOLEAN_t referenceLocationRequested; - BOOLEAN_t referenceTimeRequested; - BOOLEAN_t acquisitionAssistanceRequested; - BOOLEAN_t realTimeIntegrityRequested; - BOOLEAN_t navigationModelRequested; - struct XNavigationModel *navigationModelData /* OPTIONAL */; - /* + /* RequestedAssistData */ + typedef struct RequestedAssistData + { + BOOLEAN_t almanacRequested; + BOOLEAN_t utcModelRequested; + BOOLEAN_t ionosphericModelRequested; + BOOLEAN_t dgpsCorrectionsRequested; + BOOLEAN_t referenceLocationRequested; + BOOLEAN_t referenceTimeRequested; + BOOLEAN_t acquisitionAssistanceRequested; + BOOLEAN_t realTimeIntegrityRequested; + BOOLEAN_t navigationModelRequested; + struct XNavigationModel *navigationModelData /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} RequestedAssistData_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } RequestedAssistData_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RequestedAssistData; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_RequestedAssistData; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SETAuthKey.h b/src/core/libs/supl/asn-supl/SETAuthKey.h index 3976d1a86..7a9fbe6fe 100644 --- a/src/core/libs/supl/asn-supl/SETAuthKey.h +++ b/src/core/libs/supl/asn-supl/SETAuthKey.h @@ -15,38 +15,40 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum SETAuthKey_PR { - SETAuthKey_PR_NOTHING, /* No components present */ - SETAuthKey_PR_shortKey, - SETAuthKey_PR_longKey, - /* Extensions may appear below */ - -} SETAuthKey_PR; - -/* SETAuthKey */ -typedef struct SETAuthKey -{ - SETAuthKey_PR present; - union SETAuthKey_u + /* Dependencies */ + typedef enum SETAuthKey_PR { - BIT_STRING_t shortKey; - BIT_STRING_t longKey; - /* + SETAuthKey_PR_NOTHING, /* No components present */ + SETAuthKey_PR_shortKey, + SETAuthKey_PR_longKey, + /* Extensions may appear below */ + + } SETAuthKey_PR; + + /* SETAuthKey */ + typedef struct SETAuthKey + { + SETAuthKey_PR present; + union SETAuthKey_u + { + BIT_STRING_t shortKey; + BIT_STRING_t longKey; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SETAuthKey_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SETAuthKey_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SETAuthKey; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SETAuthKey; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SETCapabilities.h b/src/core/libs/supl/asn-supl/SETCapabilities.h index 31c226db3..f3429dab4 100644 --- a/src/core/libs/supl/asn-supl/SETCapabilities.h +++ b/src/core/libs/supl/asn-supl/SETCapabilities.h @@ -17,26 +17,27 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SETCapabilities */ -typedef struct SETCapabilities -{ - PosTechnology_t posTechnology; - PrefMethod_t prefMethod; - PosProtocol_t posProtocol; - /* + /* SETCapabilities */ + typedef struct SETCapabilities + { + PosTechnology_t posTechnology; + PrefMethod_t prefMethod; + PosProtocol_t posProtocol; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SETCapabilities_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SETCapabilities_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SETCapabilities; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SETCapabilities; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SETId.h b/src/core/libs/supl/asn-supl/SETId.h index fa9cbb76f..ece63df60 100644 --- a/src/core/libs/supl/asn-supl/SETId.h +++ b/src/core/libs/supl/asn-supl/SETId.h @@ -18,46 +18,48 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum SETId_PR { - SETId_PR_NOTHING, /* No components present */ - SETId_PR_msisdn, - SETId_PR_mdn, - SETId_PR_min, - SETId_PR_imsi, - SETId_PR_nai, - SETId_PR_iPAddress, - /* Extensions may appear below */ - -} SETId_PR; - -/* SETId */ -typedef struct SETId -{ - SETId_PR present; - union SETId_u + /* Dependencies */ + typedef enum SETId_PR { - OCTET_STRING_t msisdn; - OCTET_STRING_t mdn; - BIT_STRING_t min; - OCTET_STRING_t imsi; - IA5String_t nai; - IPAddress_t iPAddress; - /* + SETId_PR_NOTHING, /* No components present */ + SETId_PR_msisdn, + SETId_PR_mdn, + SETId_PR_min, + SETId_PR_imsi, + SETId_PR_nai, + SETId_PR_iPAddress, + /* Extensions may appear below */ + + } SETId_PR; + + /* SETId */ + typedef struct SETId + { + SETId_PR present; + union SETId_u + { + OCTET_STRING_t msisdn; + OCTET_STRING_t mdn; + BIT_STRING_t min; + OCTET_STRING_t imsi; + IA5String_t nai; + IPAddress_t iPAddress; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SETId_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SETId_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SETId; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SETId; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SLPAddress.h b/src/core/libs/supl/asn-supl/SLPAddress.h index 5da8bb2e3..4b13147ef 100644 --- a/src/core/libs/supl/asn-supl/SLPAddress.h +++ b/src/core/libs/supl/asn-supl/SLPAddress.h @@ -16,38 +16,40 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum SLPAddress_PR { - SLPAddress_PR_NOTHING, /* No components present */ - SLPAddress_PR_iPAddress, - SLPAddress_PR_fQDN, - /* Extensions may appear below */ - -} SLPAddress_PR; - -/* SLPAddress */ -typedef struct SLPAddress -{ - SLPAddress_PR present; - union SLPAddress_u + /* Dependencies */ + typedef enum SLPAddress_PR { - IPAddress_t iPAddress; - FQDN_t fQDN; - /* + SLPAddress_PR_NOTHING, /* No components present */ + SLPAddress_PR_iPAddress, + SLPAddress_PR_fQDN, + /* Extensions may appear below */ + + } SLPAddress_PR; + + /* SLPAddress */ + typedef struct SLPAddress + { + SLPAddress_PR present; + union SLPAddress_u + { + IPAddress_t iPAddress; + FQDN_t fQDN; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SLPAddress_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SLPAddress_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SLPAddress; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SLPAddress; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SLPMode.h b/src/core/libs/supl/asn-supl/SLPMode.h index 76a5eb2d9..54f6ffe27 100644 --- a/src/core/libs/supl/asn-supl/SLPMode.h +++ b/src/core/libs/supl/asn-supl/SLPMode.h @@ -14,29 +14,31 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum SLPMode { - SLPMode_proxy = 0, - SLPMode_nonProxy = 1 -} e_SLPMode; + /* Dependencies */ + typedef enum SLPMode + { + SLPMode_proxy = 0, + SLPMode_nonProxy = 1 + } e_SLPMode; -/* SLPMode */ -typedef ENUMERATED_t SLPMode_t; + /* SLPMode */ + typedef ENUMERATED_t SLPMode_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SLPMode; -asn_struct_free_f SLPMode_free; -asn_struct_print_f SLPMode_print; -asn_constr_check_f SLPMode_constraint; -ber_type_decoder_f SLPMode_decode_ber; -der_type_encoder_f SLPMode_encode_der; -xer_type_decoder_f SLPMode_decode_xer; -xer_type_encoder_f SLPMode_encode_xer; -per_type_decoder_f SLPMode_decode_uper; -per_type_encoder_f SLPMode_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SLPMode; + asn_struct_free_f SLPMode_free; + asn_struct_print_f SLPMode_print; + asn_constr_check_f SLPMode_constraint; + ber_type_decoder_f SLPMode_decode_ber; + der_type_encoder_f SLPMode_encode_der; + xer_type_decoder_f SLPMode_decode_xer; + xer_type_encoder_f SLPMode_encode_xer; + per_type_decoder_f SLPMode_decode_uper; + per_type_encoder_f SLPMode_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SUPLEND.h b/src/core/libs/supl/asn-supl/SUPLEND.h index 16a46a559..0370782b0 100644 --- a/src/core/libs/supl/asn-supl/SUPLEND.h +++ b/src/core/libs/supl/asn-supl/SUPLEND.h @@ -16,29 +16,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct Position; + /* Forward declarations */ + struct Position; -/* SUPLEND */ -typedef struct SUPLEND -{ - struct Position *position /* OPTIONAL */; - StatusCode_t *statusCode /* OPTIONAL */; - Ver_t *ver /* OPTIONAL */; - /* + /* SUPLEND */ + typedef struct SUPLEND + { + struct Position *position /* OPTIONAL */; + StatusCode_t *statusCode /* OPTIONAL */; + Ver_t *ver /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SUPLEND_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SUPLEND_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SUPLEND; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SUPLEND; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SUPLINIT.h b/src/core/libs/supl/asn-supl/SUPLINIT.h index ed7212782..40e4ebfed 100644 --- a/src/core/libs/supl/asn-supl/SUPLINIT.h +++ b/src/core/libs/supl/asn-supl/SUPLINIT.h @@ -18,35 +18,36 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct Notification; -struct SLPAddress; -struct QoP; + /* Forward declarations */ + struct Notification; + struct SLPAddress; + struct QoP; -/* SUPLINIT */ -typedef struct SUPLINIT -{ - PosMethod_t posMethod; - struct Notification *notification /* OPTIONAL */; - struct SLPAddress *sLPAddress /* OPTIONAL */; - struct QoP *qoP /* OPTIONAL */; - SLPMode_t sLPMode; - MAC_t *mAC /* OPTIONAL */; - KeyIdentity_t *keyIdentity /* OPTIONAL */; - /* + /* SUPLINIT */ + typedef struct SUPLINIT + { + PosMethod_t posMethod; + struct Notification *notification /* OPTIONAL */; + struct SLPAddress *sLPAddress /* OPTIONAL */; + struct QoP *qoP /* OPTIONAL */; + SLPMode_t sLPMode; + MAC_t *mAC /* OPTIONAL */; + KeyIdentity_t *keyIdentity /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SUPLINIT_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SUPLINIT_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SUPLINIT; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SUPLINIT; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SUPLPOS.h b/src/core/libs/supl/asn-supl/SUPLPOS.h index 9c4bdd8b0..9b9753f2f 100644 --- a/src/core/libs/supl/asn-supl/SUPLPOS.h +++ b/src/core/libs/supl/asn-supl/SUPLPOS.h @@ -15,28 +15,29 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct Velocity; + /* Forward declarations */ + struct Velocity; -/* SUPLPOS */ -typedef struct SUPLPOS -{ - PosPayLoad_t posPayLoad; - struct Velocity *velocity /* OPTIONAL */; - /* + /* SUPLPOS */ + typedef struct SUPLPOS + { + PosPayLoad_t posPayLoad; + struct Velocity *velocity /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SUPLPOS_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SUPLPOS_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SUPLPOS; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SUPLPOS; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SUPLPOSINIT.h b/src/core/libs/supl/asn-supl/SUPLPOSINIT.h index 0f2429441..741a88564 100644 --- a/src/core/libs/supl/asn-supl/SUPLPOSINIT.h +++ b/src/core/libs/supl/asn-supl/SUPLPOSINIT.h @@ -17,34 +17,35 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct RequestedAssistData; -struct Position; -struct SUPLPOS; + /* Forward declarations */ + struct RequestedAssistData; + struct Position; + struct SUPLPOS; -/* SUPLPOSINIT */ -typedef struct SUPLPOSINIT -{ - SETCapabilities_t sETCapabilities; - struct RequestedAssistData *requestedAssistData /* OPTIONAL */; - LocationId_t locationId; - struct Position *position /* OPTIONAL */; - struct SUPLPOS *sUPLPOS /* OPTIONAL */; - Ver_t *ver /* OPTIONAL */; - /* + /* SUPLPOSINIT */ + typedef struct SUPLPOSINIT + { + SETCapabilities_t sETCapabilities; + struct RequestedAssistData *requestedAssistData /* OPTIONAL */; + LocationId_t locationId; + struct Position *position /* OPTIONAL */; + struct SUPLPOS *sUPLPOS /* OPTIONAL */; + Ver_t *ver /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SUPLPOSINIT_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SUPLPOSINIT_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SUPLPOSINIT; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SUPLPOSINIT; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SUPLRESPONSE.h b/src/core/libs/supl/asn-supl/SUPLRESPONSE.h index 5d9adbce2..c2eea8bd7 100644 --- a/src/core/libs/supl/asn-supl/SUPLRESPONSE.h +++ b/src/core/libs/supl/asn-supl/SUPLRESPONSE.h @@ -16,31 +16,32 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct SLPAddress; -struct SETAuthKey; + /* Forward declarations */ + struct SLPAddress; + struct SETAuthKey; -/* SUPLRESPONSE */ -typedef struct SUPLRESPONSE -{ - PosMethod_t posMethod; - struct SLPAddress *sLPAddress /* OPTIONAL */; - struct SETAuthKey *sETAuthKey /* OPTIONAL */; - KeyIdentity4_t *keyIdentity4 /* OPTIONAL */; - /* + /* SUPLRESPONSE */ + typedef struct SUPLRESPONSE + { + PosMethod_t posMethod; + struct SLPAddress *sLPAddress /* OPTIONAL */; + struct SETAuthKey *sETAuthKey /* OPTIONAL */; + KeyIdentity4_t *keyIdentity4 /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SUPLRESPONSE_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SUPLRESPONSE_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SUPLRESPONSE; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SUPLRESPONSE; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SUPLSTART.h b/src/core/libs/supl/asn-supl/SUPLSTART.h index ab71f5144..fc6fd4b9e 100644 --- a/src/core/libs/supl/asn-supl/SUPLSTART.h +++ b/src/core/libs/supl/asn-supl/SUPLSTART.h @@ -16,29 +16,30 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct QoP; + /* Forward declarations */ + struct QoP; -/* SUPLSTART */ -typedef struct SUPLSTART -{ - SETCapabilities_t sETCapabilities; - LocationId_t locationId; - struct QoP *qoP /* OPTIONAL */; - /* + /* SUPLSTART */ + typedef struct SUPLSTART + { + SETCapabilities_t sETCapabilities; + LocationId_t locationId; + struct QoP *qoP /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SUPLSTART_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SUPLSTART_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SUPLSTART; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SUPLSTART; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SatelliteInfo.h b/src/core/libs/supl/asn-supl/SatelliteInfo.h index 3f7d3566b..4dea62f31 100644 --- a/src/core/libs/supl/asn-supl/SatelliteInfo.h +++ b/src/core/libs/supl/asn-supl/SatelliteInfo.h @@ -15,24 +15,25 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct SatelliteInfoElement; + /* Forward declarations */ + struct SatelliteInfoElement; -/* SatelliteInfo */ -typedef struct SatelliteInfo -{ - A_SEQUENCE_OF(struct SatelliteInfoElement) - list; + /* SatelliteInfo */ + typedef struct SatelliteInfo + { + A_SEQUENCE_OF(struct SatelliteInfoElement) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SatelliteInfo_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SatelliteInfo_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SatelliteInfo; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SatelliteInfo; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SatelliteInfoElement.h b/src/core/libs/supl/asn-supl/SatelliteInfoElement.h index 80c213662..a97dcf643 100644 --- a/src/core/libs/supl/asn-supl/SatelliteInfoElement.h +++ b/src/core/libs/supl/asn-supl/SatelliteInfoElement.h @@ -15,25 +15,26 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SatelliteInfoElement */ -typedef struct SatelliteInfoElement -{ - long satId; - long iODE; - /* + /* SatelliteInfoElement */ + typedef struct SatelliteInfoElement + { + long satId; + long iODE; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SatelliteInfoElement_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SatelliteInfoElement_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SatelliteInfoElement; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SatelliteInfoElement; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SessionID.h b/src/core/libs/supl/asn-supl/SessionID.h index 402ed734f..104229df5 100644 --- a/src/core/libs/supl/asn-supl/SessionID.h +++ b/src/core/libs/supl/asn-supl/SessionID.h @@ -14,25 +14,26 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct SetSessionID; -struct SlpSessionID; + /* Forward declarations */ + struct SetSessionID; + struct SlpSessionID; -/* SessionID */ -typedef struct SessionID -{ - struct SetSessionID *setSessionID /* OPTIONAL */; - struct SlpSessionID *slpSessionID /* OPTIONAL */; + /* SessionID */ + typedef struct SessionID + { + struct SetSessionID *setSessionID /* OPTIONAL */; + struct SlpSessionID *slpSessionID /* OPTIONAL */; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SessionID_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SessionID_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SessionID; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SessionID; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SetSessionID.h b/src/core/libs/supl/asn-supl/SetSessionID.h index 2a9c6666f..5ae549773 100644 --- a/src/core/libs/supl/asn-supl/SetSessionID.h +++ b/src/core/libs/supl/asn-supl/SetSessionID.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SetSessionID */ -typedef struct SetSessionID -{ - long sessionId; - SETId_t setId; + /* SetSessionID */ + typedef struct SetSessionID + { + long sessionId; + SETId_t setId; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SetSessionID_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SetSessionID_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SetSessionID; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SetSessionID; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/SlpSessionID.h b/src/core/libs/supl/asn-supl/SlpSessionID.h index 87ad10a35..e381f2fbe 100644 --- a/src/core/libs/supl/asn-supl/SlpSessionID.h +++ b/src/core/libs/supl/asn-supl/SlpSessionID.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* SlpSessionID */ -typedef struct SlpSessionID -{ - OCTET_STRING_t sessionID; - SLPAddress_t slpId; + /* SlpSessionID */ + typedef struct SlpSessionID + { + OCTET_STRING_t sessionID; + SLPAddress_t slpId; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} SlpSessionID_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } SlpSessionID_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_SlpSessionID; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_SlpSessionID; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/Status.h b/src/core/libs/supl/asn-supl/Status.h index 6d4f6df07..1405d998d 100644 --- a/src/core/libs/supl/asn-supl/Status.h +++ b/src/core/libs/supl/asn-supl/Status.h @@ -14,33 +14,35 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum Status { - Status_stale = 0, - Status_current = 1, - Status_unknown = 2 - /* + /* Dependencies */ + typedef enum Status + { + Status_stale = 0, + Status_current = 1, + Status_unknown = 2 + /* * Enumeration is extensible */ -} e_Status; + } e_Status; -/* Status */ -typedef ENUMERATED_t Status_t; + /* Status */ + typedef ENUMERATED_t Status_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Status; -asn_struct_free_f Status_free; -asn_struct_print_f Status_print; -asn_constr_check_f Status_constraint; -ber_type_decoder_f Status_decode_ber; -der_type_encoder_f Status_encode_der; -xer_type_decoder_f Status_decode_xer; -xer_type_encoder_f Status_encode_xer; -per_type_decoder_f Status_decode_uper; -per_type_encoder_f Status_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Status; + asn_struct_free_f Status_free; + asn_struct_print_f Status_print; + asn_constr_check_f Status_constraint; + ber_type_decoder_f Status_decode_ber; + der_type_encoder_f Status_encode_der; + xer_type_decoder_f Status_decode_xer; + xer_type_encoder_f Status_encode_xer; + per_type_decoder_f Status_decode_uper; + per_type_encoder_f Status_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/StatusCode.h b/src/core/libs/supl/asn-supl/StatusCode.h index ccd242755..b48c43e08 100644 --- a/src/core/libs/supl/asn-supl/StatusCode.h +++ b/src/core/libs/supl/asn-supl/StatusCode.h @@ -14,50 +14,52 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum StatusCode { - StatusCode_unspecified = 0, - StatusCode_systemFailure = 1, - StatusCode_unexpectedMessage = 2, - StatusCode_protocolError = 3, - StatusCode_dataMissing = 4, - StatusCode_unexpectedDataValue = 5, - StatusCode_posMethodFailure = 6, - StatusCode_posMethodMismatch = 7, - StatusCode_posProtocolMismatch = 8, - StatusCode_targetSETnotReachable = 9, - StatusCode_versionNotSupported = 10, - StatusCode_resourceShortage = 11, - StatusCode_invalidSessionId = 12, - StatusCode_nonProxyModeNotSupported = 13, - StatusCode_proxyModeNotSupported = 14, - StatusCode_positioningNotPermitted = 15, - StatusCode_authNetFailure = 16, - StatusCode_authSuplinitFailure = 17, - StatusCode_consentDeniedByUser = 100, - StatusCode_consentGrantedByUser = 101 - /* + /* Dependencies */ + typedef enum StatusCode + { + StatusCode_unspecified = 0, + StatusCode_systemFailure = 1, + StatusCode_unexpectedMessage = 2, + StatusCode_protocolError = 3, + StatusCode_dataMissing = 4, + StatusCode_unexpectedDataValue = 5, + StatusCode_posMethodFailure = 6, + StatusCode_posMethodMismatch = 7, + StatusCode_posProtocolMismatch = 8, + StatusCode_targetSETnotReachable = 9, + StatusCode_versionNotSupported = 10, + StatusCode_resourceShortage = 11, + StatusCode_invalidSessionId = 12, + StatusCode_nonProxyModeNotSupported = 13, + StatusCode_proxyModeNotSupported = 14, + StatusCode_positioningNotPermitted = 15, + StatusCode_authNetFailure = 16, + StatusCode_authSuplinitFailure = 17, + StatusCode_consentDeniedByUser = 100, + StatusCode_consentGrantedByUser = 101 + /* * Enumeration is extensible */ -} e_StatusCode; + } e_StatusCode; -/* StatusCode */ -typedef ENUMERATED_t StatusCode_t; + /* StatusCode */ + typedef ENUMERATED_t StatusCode_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_StatusCode; -asn_struct_free_f StatusCode_free; -asn_struct_print_f StatusCode_print; -asn_constr_check_f StatusCode_constraint; -ber_type_decoder_f StatusCode_decode_ber; -der_type_encoder_f StatusCode_encode_der; -xer_type_decoder_f StatusCode_decode_xer; -xer_type_encoder_f StatusCode_encode_xer; -per_type_decoder_f StatusCode_decode_uper; -per_type_encoder_f StatusCode_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_StatusCode; + asn_struct_free_f StatusCode_free; + asn_struct_print_f StatusCode_print; + asn_constr_check_f StatusCode_constraint; + ber_type_decoder_f StatusCode_decode_ber; + der_type_encoder_f StatusCode_encode_der; + xer_type_decoder_f StatusCode_decode_xer; + xer_type_encoder_f StatusCode_encode_xer; + per_type_decoder_f StatusCode_decode_uper; + per_type_encoder_f StatusCode_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/TGSN.h b/src/core/libs/supl/asn-supl/TGSN.h index a47ec1e88..525479bb4 100644 --- a/src/core/libs/supl/asn-supl/TGSN.h +++ b/src/core/libs/supl/asn-supl/TGSN.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* TGSN */ -typedef long TGSN_t; + /* TGSN */ + typedef long TGSN_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TGSN; -asn_struct_free_f TGSN_free; -asn_struct_print_f TGSN_print; -asn_constr_check_f TGSN_constraint; -ber_type_decoder_f TGSN_decode_ber; -der_type_encoder_f TGSN_encode_der; -xer_type_decoder_f TGSN_decode_xer; -xer_type_encoder_f TGSN_encode_xer; -per_type_decoder_f TGSN_decode_uper; -per_type_encoder_f TGSN_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_TGSN; + asn_struct_free_f TGSN_free; + asn_struct_print_f TGSN_print; + asn_constr_check_f TGSN_constraint; + ber_type_decoder_f TGSN_decode_ber; + der_type_encoder_f TGSN_encode_der; + xer_type_decoder_f TGSN_decode_xer; + xer_type_encoder_f TGSN_encode_xer; + per_type_decoder_f TGSN_decode_uper; + per_type_encoder_f TGSN_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/TimeslotISCP-List.h b/src/core/libs/supl/asn-supl/TimeslotISCP-List.h index 00e96efee..99e60db88 100644 --- a/src/core/libs/supl/asn-supl/TimeslotISCP-List.h +++ b/src/core/libs/supl/asn-supl/TimeslotISCP-List.h @@ -16,21 +16,22 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* TimeslotISCP-List */ -typedef struct TimeslotISCP_List -{ - A_SEQUENCE_OF(TimeslotISCP_t) - list; + /* TimeslotISCP-List */ + typedef struct TimeslotISCP_List + { + A_SEQUENCE_OF(TimeslotISCP_t) + list; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} TimeslotISCP_List_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } TimeslotISCP_List_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TimeslotISCP_List; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_TimeslotISCP_List; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/TimeslotISCP.h b/src/core/libs/supl/asn-supl/TimeslotISCP.h index f173d0b18..4b147e70f 100644 --- a/src/core/libs/supl/asn-supl/TimeslotISCP.h +++ b/src/core/libs/supl/asn-supl/TimeslotISCP.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* TimeslotISCP */ -typedef long TimeslotISCP_t; + /* TimeslotISCP */ + typedef long TimeslotISCP_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TimeslotISCP; -asn_struct_free_f TimeslotISCP_free; -asn_struct_print_f TimeslotISCP_print; -asn_constr_check_f TimeslotISCP_constraint; -ber_type_decoder_f TimeslotISCP_decode_ber; -der_type_encoder_f TimeslotISCP_encode_der; -xer_type_decoder_f TimeslotISCP_decode_xer; -xer_type_encoder_f TimeslotISCP_encode_xer; -per_type_decoder_f TimeslotISCP_decode_uper; -per_type_encoder_f TimeslotISCP_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_TimeslotISCP; + asn_struct_free_f TimeslotISCP_free; + asn_struct_print_f TimeslotISCP_print; + asn_constr_check_f TimeslotISCP_constraint; + ber_type_decoder_f TimeslotISCP_decode_ber; + der_type_encoder_f TimeslotISCP_encode_der; + xer_type_decoder_f TimeslotISCP_decode_xer; + xer_type_encoder_f TimeslotISCP_encode_xer; + per_type_decoder_f TimeslotISCP_decode_uper; + per_type_encoder_f TimeslotISCP_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/UARFCN.h b/src/core/libs/supl/asn-supl/UARFCN.h index c1771edaf..5c4315138 100644 --- a/src/core/libs/supl/asn-supl/UARFCN.h +++ b/src/core/libs/supl/asn-supl/UARFCN.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* UARFCN */ -typedef long UARFCN_t; + /* UARFCN */ + typedef long UARFCN_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_UARFCN; -asn_struct_free_f UARFCN_free; -asn_struct_print_f UARFCN_print; -asn_constr_check_f UARFCN_constraint; -ber_type_decoder_f UARFCN_decode_ber; -der_type_encoder_f UARFCN_encode_der; -xer_type_decoder_f UARFCN_decode_xer; -xer_type_encoder_f UARFCN_encode_xer; -per_type_decoder_f UARFCN_decode_uper; -per_type_encoder_f UARFCN_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_UARFCN; + asn_struct_free_f UARFCN_free; + asn_struct_print_f UARFCN_print; + asn_constr_check_f UARFCN_constraint; + ber_type_decoder_f UARFCN_decode_ber; + der_type_encoder_f UARFCN_encode_der; + xer_type_decoder_f UARFCN_decode_xer; + xer_type_encoder_f UARFCN_encode_xer; + per_type_decoder_f UARFCN_decode_uper; + per_type_encoder_f UARFCN_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/ULP-PDU.h b/src/core/libs/supl/asn-supl/ULP-PDU.h index cd6344270..c8582659a 100644 --- a/src/core/libs/supl/asn-supl/ULP-PDU.h +++ b/src/core/libs/supl/asn-supl/ULP-PDU.h @@ -18,23 +18,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* ULP-PDU */ -typedef struct ULP_PDU -{ - long length; - Version_t version; - SessionID_t sessionID; - UlpMessage_t message; + /* ULP-PDU */ + typedef struct ULP_PDU + { + long length; + Version_t version; + SessionID_t sessionID; + UlpMessage_t message; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} ULP_PDU_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ULP_PDU_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ULP_PDU; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_ULP_PDU; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/UTCTime.h b/src/core/libs/supl/asn-supl/UTCTime.h index a21cc1664..53517fde6 100644 --- a/src/core/libs/supl/asn-supl/UTCTime.h +++ b/src/core/libs/supl/asn-supl/UTCTime.h @@ -8,28 +8,29 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef OCTET_STRING_t UTCTime_t; /* Implemented via OCTET STRING */ + typedef OCTET_STRING_t UTCTime_t; /* Implemented via OCTET STRING */ -extern asn_TYPE_descriptor_t asn_DEF_UTCTime; + extern asn_TYPE_descriptor_t asn_DEF_UTCTime; -asn_struct_print_f UTCTime_print; -asn_constr_check_f UTCTime_constraint; -xer_type_encoder_f UTCTime_encode_xer; + asn_struct_print_f UTCTime_print; + asn_constr_check_f UTCTime_constraint; + xer_type_encoder_f UTCTime_encode_xer; -/*********************** + /*********************** * Some handy helpers. * ***********************/ -struct tm; /* */ + struct tm; /* */ -/* See asn_GT2time() in GeneralizedTime.h */ -time_t asn_UT2time(const UTCTime_t *, struct tm *_optional_tm4fill, int as_gmt); + /* See asn_GT2time() in GeneralizedTime.h */ + time_t asn_UT2time(const UTCTime_t *, struct tm *_optional_tm4fill, int as_gmt); -/* See asn_time2GT() in GeneralizedTime.h */ -UTCTime_t *asn_time2UT(UTCTime_t *__opt_ut, const struct tm *, int force_gmt); + /* See asn_time2GT() in GeneralizedTime.h */ + UTCTime_t *asn_time2UT(UTCTime_t *__opt_ut, const struct tm *, int force_gmt); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/UTRA-CarrierRSSI.h b/src/core/libs/supl/asn-supl/UTRA-CarrierRSSI.h index dc15b61c7..8e9ea3835 100644 --- a/src/core/libs/supl/asn-supl/UTRA-CarrierRSSI.h +++ b/src/core/libs/supl/asn-supl/UTRA-CarrierRSSI.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* UTRA-CarrierRSSI */ -typedef long UTRA_CarrierRSSI_t; + /* UTRA-CarrierRSSI */ + typedef long UTRA_CarrierRSSI_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_UTRA_CarrierRSSI; -asn_struct_free_f UTRA_CarrierRSSI_free; -asn_struct_print_f UTRA_CarrierRSSI_print; -asn_constr_check_f UTRA_CarrierRSSI_constraint; -ber_type_decoder_f UTRA_CarrierRSSI_decode_ber; -der_type_encoder_f UTRA_CarrierRSSI_encode_der; -xer_type_decoder_f UTRA_CarrierRSSI_decode_xer; -xer_type_encoder_f UTRA_CarrierRSSI_encode_xer; -per_type_decoder_f UTRA_CarrierRSSI_decode_uper; -per_type_encoder_f UTRA_CarrierRSSI_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_UTRA_CarrierRSSI; + asn_struct_free_f UTRA_CarrierRSSI_free; + asn_struct_print_f UTRA_CarrierRSSI_print; + asn_constr_check_f UTRA_CarrierRSSI_constraint; + ber_type_decoder_f UTRA_CarrierRSSI_decode_ber; + der_type_encoder_f UTRA_CarrierRSSI_encode_der; + xer_type_decoder_f UTRA_CarrierRSSI_decode_xer; + xer_type_encoder_f UTRA_CarrierRSSI_encode_xer; + per_type_decoder_f UTRA_CarrierRSSI_decode_uper; + per_type_encoder_f UTRA_CarrierRSSI_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/UlpMessage.h b/src/core/libs/supl/asn-supl/UlpMessage.h index b1d1925d8..15f42aa9c 100644 --- a/src/core/libs/supl/asn-supl/UlpMessage.h +++ b/src/core/libs/supl/asn-supl/UlpMessage.h @@ -21,50 +21,52 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum UlpMessage_PR { - UlpMessage_PR_NOTHING, /* No components present */ - UlpMessage_PR_msSUPLINIT, - UlpMessage_PR_msSUPLSTART, - UlpMessage_PR_msSUPLRESPONSE, - UlpMessage_PR_msSUPLPOSINIT, - UlpMessage_PR_msSUPLPOS, - UlpMessage_PR_msSUPLEND, - UlpMessage_PR_msDUMMY2, - UlpMessage_PR_msDUMMY3, - /* Extensions may appear below */ - -} UlpMessage_PR; - -/* UlpMessage */ -typedef struct UlpMessage -{ - UlpMessage_PR present; - union UlpMessage_u + /* Dependencies */ + typedef enum UlpMessage_PR { - SUPLINIT_t msSUPLINIT; - SUPLSTART_t msSUPLSTART; - SUPLRESPONSE_t msSUPLRESPONSE; - SUPLPOSINIT_t msSUPLPOSINIT; - SUPLPOS_t msSUPLPOS; - SUPLEND_t msSUPLEND; - DUMMY_t msDUMMY2; - DUMMY_t msDUMMY3; - /* + UlpMessage_PR_NOTHING, /* No components present */ + UlpMessage_PR_msSUPLINIT, + UlpMessage_PR_msSUPLSTART, + UlpMessage_PR_msSUPLRESPONSE, + UlpMessage_PR_msSUPLPOSINIT, + UlpMessage_PR_msSUPLPOS, + UlpMessage_PR_msSUPLEND, + UlpMessage_PR_msDUMMY2, + UlpMessage_PR_msDUMMY3, + /* Extensions may appear below */ + + } UlpMessage_PR; + + /* UlpMessage */ + typedef struct UlpMessage + { + UlpMessage_PR present; + union UlpMessage_u + { + SUPLINIT_t msSUPLINIT; + SUPLSTART_t msSUPLSTART; + SUPLRESPONSE_t msSUPLRESPONSE; + SUPLPOSINIT_t msSUPLPOSINIT; + SUPLPOS_t msSUPLPOS; + SUPLEND_t msSUPLEND; + DUMMY_t msDUMMY2; + DUMMY_t msDUMMY3; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} UlpMessage_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } UlpMessage_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_UlpMessage; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_UlpMessage; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/Velocity.h b/src/core/libs/supl/asn-supl/Velocity.h index da5577190..1db003a82 100644 --- a/src/core/libs/supl/asn-supl/Velocity.h +++ b/src/core/libs/supl/asn-supl/Velocity.h @@ -18,42 +18,44 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Dependencies */ -typedef enum Velocity_PR { - Velocity_PR_NOTHING, /* No components present */ - Velocity_PR_horvel, - Velocity_PR_horandvervel, - Velocity_PR_horveluncert, - Velocity_PR_horandveruncert, - /* Extensions may appear below */ - -} Velocity_PR; - -/* Velocity */ -typedef struct Velocity -{ - Velocity_PR present; - union Velocity_u + /* Dependencies */ + typedef enum Velocity_PR { - Horvel_t horvel; - Horandvervel_t horandvervel; - Horveluncert_t horveluncert; - Horandveruncert_t horandveruncert; - /* + Velocity_PR_NOTHING, /* No components present */ + Velocity_PR_horvel, + Velocity_PR_horandvervel, + Velocity_PR_horveluncert, + Velocity_PR_horandveruncert, + /* Extensions may appear below */ + + } Velocity_PR; + + /* Velocity */ + typedef struct Velocity + { + Velocity_PR present; + union Velocity_u + { + Horvel_t horvel; + Horandvervel_t horandvervel; + Horveluncert_t horveluncert; + Horandveruncert_t horandveruncert; + /* * This type is extensible, * possible extensions are below. */ - } choice; + } choice; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Velocity_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Velocity_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Velocity; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Velocity; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/Ver.h b/src/core/libs/supl/asn-supl/Ver.h index a2891dacd..17a44483b 100644 --- a/src/core/libs/supl/asn-supl/Ver.h +++ b/src/core/libs/supl/asn-supl/Ver.h @@ -14,23 +14,24 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Ver */ -typedef BIT_STRING_t Ver_t; + /* Ver */ + typedef BIT_STRING_t Ver_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Ver; -asn_struct_free_f Ver_free; -asn_struct_print_f Ver_print; -asn_constr_check_f Ver_constraint; -ber_type_decoder_f Ver_decode_ber; -der_type_encoder_f Ver_encode_der; -xer_type_decoder_f Ver_decode_xer; -xer_type_encoder_f Ver_encode_xer; -per_type_decoder_f Ver_decode_uper; -per_type_encoder_f Ver_encode_uper; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Ver; + asn_struct_free_f Ver_free; + asn_struct_print_f Ver_print; + asn_constr_check_f Ver_constraint; + ber_type_decoder_f Ver_decode_ber; + der_type_encoder_f Ver_encode_der; + xer_type_decoder_f Ver_decode_xer; + xer_type_encoder_f Ver_encode_xer; + per_type_decoder_f Ver_decode_uper; + per_type_encoder_f Ver_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/Version.h b/src/core/libs/supl/asn-supl/Version.h index 24d8a9c5d..7f1273592 100644 --- a/src/core/libs/supl/asn-supl/Version.h +++ b/src/core/libs/supl/asn-supl/Version.h @@ -15,22 +15,23 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Version */ -typedef struct Version -{ - long maj; - long min; - long servind; + /* Version */ + typedef struct Version + { + long maj; + long min; + long servind; - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} Version_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Version_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Version; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_Version; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/VisibleString.h b/src/core/libs/supl/asn-supl/VisibleString.h index 6697dcdfa..ca9ed7e4d 100644 --- a/src/core/libs/supl/asn-supl/VisibleString.h +++ b/src/core/libs/supl/asn-supl/VisibleString.h @@ -8,14 +8,15 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef OCTET_STRING_t VisibleString_t; /* Implemented via OCTET STRING */ + typedef OCTET_STRING_t VisibleString_t; /* Implemented via OCTET STRING */ -extern asn_TYPE_descriptor_t asn_DEF_VisibleString; + extern asn_TYPE_descriptor_t asn_DEF_VisibleString; -asn_constr_check_f VisibleString_constraint; + asn_constr_check_f VisibleString_constraint; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/WcdmaCellInformation.h b/src/core/libs/supl/asn-supl/WcdmaCellInformation.h index e5dee901c..9aaa46fdd 100644 --- a/src/core/libs/supl/asn-supl/WcdmaCellInformation.h +++ b/src/core/libs/supl/asn-supl/WcdmaCellInformation.h @@ -15,33 +15,34 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct FrequencyInfo; -struct MeasuredResultsList; + /* Forward declarations */ + struct FrequencyInfo; + struct MeasuredResultsList; -/* WcdmaCellInformation */ -typedef struct WcdmaCellInformation -{ - long refMCC; - long refMNC; - long refUC; - struct FrequencyInfo *frequencyInfo /* OPTIONAL */; - long *primaryScramblingCode /* OPTIONAL */; - struct MeasuredResultsList *measuredResultsList /* OPTIONAL */; - /* + /* WcdmaCellInformation */ + typedef struct WcdmaCellInformation + { + long refMCC; + long refMNC; + long refUC; + struct FrequencyInfo *frequencyInfo /* OPTIONAL */; + long *primaryScramblingCode /* OPTIONAL */; + struct MeasuredResultsList *measuredResultsList /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} WcdmaCellInformation_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } WcdmaCellInformation_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_WcdmaCellInformation; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_WcdmaCellInformation; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/XNavigationModel.h b/src/core/libs/supl/asn-supl/XNavigationModel.h index a3e1f6e79..0962aeec4 100644 --- a/src/core/libs/supl/asn-supl/XNavigationModel.h +++ b/src/core/libs/supl/asn-supl/XNavigationModel.h @@ -15,31 +15,32 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* Forward declarations */ -struct SatelliteInfo; + /* Forward declarations */ + struct SatelliteInfo; -/* XNavigationModel */ -typedef struct XNavigationModel -{ - long gpsWeek; - long gpsToe; - long nSAT; - long toeLimit; - struct SatelliteInfo *satInfo /* OPTIONAL */; - /* + /* XNavigationModel */ + typedef struct XNavigationModel + { + long gpsWeek; + long gpsToe; + long nSAT; + long toeLimit; + struct SatelliteInfo *satInfo /* OPTIONAL */; + /* * This type is extensible, * possible extensions are below. */ - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} XNavigationModel_t; + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } XNavigationModel_t; -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_XNavigationModel; + /* Implementation */ + extern asn_TYPE_descriptor_t asn_DEF_XNavigationModel; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/asn_SEQUENCE_OF.h b/src/core/libs/supl/asn-supl/asn_SEQUENCE_OF.h index 51d1b44dd..2ad8287a0 100644 --- a/src/core/libs/supl/asn-supl/asn_SEQUENCE_OF.h +++ b/src/core/libs/supl/asn-supl/asn_SEQUENCE_OF.h @@ -8,7 +8,8 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif /* @@ -21,27 +22,27 @@ extern "C" { #define ASN_SEQUENCE_ADD(headptr, ptr) \ asn_sequence_add((headptr), (ptr)) -/*********************************************** + /*********************************************** * Implementation of the SEQUENCE OF structure. */ #define asn_sequence_add asn_set_add #define asn_sequence_empty asn_set_empty -/* + /* * Delete the element from the set by its number (base 0). * This is NOT a constant-time operation. * The order of elements is preserved. * If _do_free is given AND the (*free) is initialized, the element * will be freed using the custom (*free) function as well. */ -void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free); + void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free); -/* + /* * Cope with different conversions requirements to/from void in C and C++. * This is mostly useful for support library. */ -typedef A_SEQUENCE_OF(void) asn_anonymous_sequence_; + typedef A_SEQUENCE_OF(void) asn_anonymous_sequence_; #define _A_SEQUENCE_FROM_VOID(ptr) ((asn_anonymous_sequence_ *)(ptr)) #define _A_CSEQUENCE_FROM_VOID(ptr) ((const asn_anonymous_sequence_ *)(ptr)) diff --git a/src/core/libs/supl/asn-supl/asn_SET_OF.h b/src/core/libs/supl/asn-supl/asn_SET_OF.h index 5b443872b..0edc0abc4 100644 --- a/src/core/libs/supl/asn-supl/asn_SET_OF.h +++ b/src/core/libs/supl/asn-supl/asn_SET_OF.h @@ -6,7 +6,8 @@ #define ASN_SET_OF_H #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif #define A_SET_OF(type) \ @@ -21,18 +22,18 @@ extern "C" { #define ASN_SET_ADD(headptr, ptr) \ asn_set_add((headptr), (ptr)) -/******************************************* + /******************************************* * Implementation of the SET OF structure. */ -/* + /* * Add another structure into the set by its pointer. * RETURN VALUES: * 0 for success and -1/errno for failure. */ -int asn_set_add(void *asn_set_of_x, void *ptr); + int asn_set_add(void *asn_set_of_x, void *ptr); -/* + /* * Delete the element from the set by its number (base 0). * This is a constant-time operation. The order of elements before the * deleted ones is guaranteed, the order of elements after the deleted @@ -40,19 +41,19 @@ int asn_set_add(void *asn_set_of_x, void *ptr); * If _do_free is given AND the (*free) is initialized, the element * will be freed using the custom (*free) function as well. */ -void asn_set_del(void *asn_set_of_x, int number, int _do_free); + void asn_set_del(void *asn_set_of_x, int number, int _do_free); -/* + /* * Empty the contents of the set. Will free the elements, if (*free) is given. * Will NOT free the set itself. */ -void asn_set_empty(void *asn_set_of_x); + void asn_set_empty(void *asn_set_of_x); -/* + /* * Cope with different conversions requirements to/from void in C and C++. * This is mostly useful for support library. */ -typedef A_SET_OF(void) asn_anonymous_set_; + typedef A_SET_OF(void) asn_anonymous_set_; #define _A_SET_FROM_VOID(ptr) ((asn_anonymous_set_ *)(ptr)) #define _A_CSET_FROM_VOID(ptr) ((const asn_anonymous_set_ *)(ptr)) diff --git a/src/core/libs/supl/asn-supl/asn_application.h b/src/core/libs/supl/asn-supl/asn_application.h index b226de7a9..43904afb0 100644 --- a/src/core/libs/supl/asn-supl/asn_application.h +++ b/src/core/libs/supl/asn-supl/asn_application.h @@ -12,20 +12,21 @@ #include "asn_codecs.h" /* for ASN.1 codecs specifics */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* + /* * Generic type of an application-defined callback to return various * types of data to the application. * EXPECTED RETURN VALUES: * -1: Failed to consume bytes. Abort the mission. * Non-negative return values indicate success, and ignored. */ -typedef int(asn_app_consume_bytes_f)(const void *buffer, size_t size, - void *application_specific_key); + typedef int(asn_app_consume_bytes_f)(const void *buffer, size_t size, + void *application_specific_key); -/* + /* * A callback of this type is called whenever constraint validation fails * on some ASN.1 type. See "constraints.h" for more details on constraint * validation. @@ -33,10 +34,10 @@ typedef int(asn_app_consume_bytes_f)(const void *buffer, size_t size, * the constraint check, as well as human readable message on what * particular constraint has failed. */ -typedef void(asn_app_constraint_failed_f)(void *application_specific_key, - struct asn_TYPE_descriptor_s *type_descriptor_which_failed, - const void *structure_which_failed_ptr, - const char *error_message_format, ...) GCC_PRINTFLIKE(4, 5); + typedef void(asn_app_constraint_failed_f)(void *application_specific_key, + struct asn_TYPE_descriptor_s *type_descriptor_which_failed, + const void *structure_which_failed_ptr, + const char *error_message_format, ...) GCC_PRINTFLIKE(4, 5); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/asn_codecs.h b/src/core/libs/supl/asn-supl/asn_codecs.h index 3a43d2d9f..717336ed5 100644 --- a/src/core/libs/supl/asn-supl/asn_codecs.h +++ b/src/core/libs/supl/asn-supl/asn_codecs.h @@ -7,12 +7,13 @@ #define _ASN_CODECS_H_ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* + /* * This structure defines a set of parameters that may be passed * to every ASN.1 encoder or decoder function. * WARNING: if max_stack_size member is set, and you are calling the @@ -21,9 +22,9 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */ * If you can't always satisfy this requirement, use ber_decode(), * xer_decode() and uper_decode() functions instead. */ -typedef struct asn_codec_ctx_s -{ - /* + typedef struct asn_codec_ctx_s + { + /* * Limit the decoder routines to use no (much) more stack than a given * number of bytes. Most of decoders are stack-based, and this * would protect against stack overflows if the number of nested @@ -34,31 +35,31 @@ typedef struct asn_codec_ctx_s * this variable. Be careful in multithreaded environments, as the * stack size is rather limited. */ - size_t max_stack_size; /* 0 disables stack bounds checking */ -} asn_codec_ctx_t; + size_t max_stack_size; /* 0 disables stack bounds checking */ + } asn_codec_ctx_t; -/* + /* * Type of the return value of the encoding functions (der_encode, xer_encode). */ -typedef struct asn_enc_rval_s -{ - /* + typedef struct asn_enc_rval_s + { + /* * Number of bytes encoded. * -1 indicates failure to encode the structure. * In this case, the members below this one are meaningful. */ - ssize_t encoded; + ssize_t encoded; - /* + /* * Members meaningful when (encoded == -1), for post mortem analysis. */ - /* Type which cannot be encoded */ - struct asn_TYPE_descriptor_s *failed_type; + /* Type which cannot be encoded */ + struct asn_TYPE_descriptor_s *failed_type; - /* Pointer to the structure of that type */ - void *structure_ptr; -} asn_enc_rval_t; + /* Pointer to the structure of that type */ + void *structure_ptr; + } asn_enc_rval_t; #define _ASN_ENCODE_FAILED \ do \ { \ @@ -79,7 +80,7 @@ typedef struct asn_enc_rval_s } \ while (0) -/* + /* * Type of the return value of the decoding functions (ber_decode, xer_decode) * * Please note that the number of consumed bytes is ALWAYS meaningful, @@ -87,17 +88,17 @@ typedef struct asn_enc_rval_s * decoded bytes, hence providing a possibility to fail with more diagnostics * (i.e., print the offending remainder of the buffer). */ -enum asn_dec_rval_code_e -{ - RC_OK, /* Decoded successfully */ - RC_WMORE, /* More data expected, call again */ - RC_FAIL /* Failure to decode data */ -}; -typedef struct asn_dec_rval_s -{ - enum asn_dec_rval_code_e code; /* Result code */ - size_t consumed; /* Number of bytes consumed */ -} asn_dec_rval_t; + enum asn_dec_rval_code_e + { + RC_OK, /* Decoded successfully */ + RC_WMORE, /* More data expected, call again */ + RC_FAIL /* Failure to decode data */ + }; + typedef struct asn_dec_rval_s + { + enum asn_dec_rval_code_e code; /* Result code */ + size_t consumed; /* Number of bytes consumed */ + } asn_dec_rval_t; #define _ASN_DECODE_FAILED \ do \ { \ diff --git a/src/core/libs/supl/asn-supl/asn_codecs_prim.h b/src/core/libs/supl/asn-supl/asn_codecs_prim.h index 8036f6457..cb8c37937 100644 --- a/src/core/libs/supl/asn-supl/asn_codecs_prim.h +++ b/src/core/libs/supl/asn-supl/asn_codecs_prim.h @@ -8,43 +8,44 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef struct ASN__PRIMITIVE_TYPE_s -{ - uint8_t *buf; /* Buffer with consecutive primitive encoding bytes */ - int size; /* Size of the buffer */ -} ASN__PRIMITIVE_TYPE_t; /* Do not use this type directly! */ + typedef struct ASN__PRIMITIVE_TYPE_s + { + uint8_t *buf; /* Buffer with consecutive primitive encoding bytes */ + int size; /* Size of the buffer */ + } ASN__PRIMITIVE_TYPE_t; /* Do not use this type directly! */ -asn_struct_free_f ASN__PRIMITIVE_TYPE_free; -ber_type_decoder_f ber_decode_primitive; -der_type_encoder_f der_encode_primitive; + asn_struct_free_f ASN__PRIMITIVE_TYPE_free; + ber_type_decoder_f ber_decode_primitive; + der_type_encoder_f der_encode_primitive; -/* + /* * A callback specification for the xer_decode_primitive() function below. */ -enum xer_pbd_rval -{ - XPBD_SYSTEM_FAILURE, /* System failure (memory shortage, etc) */ - XPBD_DECODER_LIMIT, /* Hit some decoder limitation or deficiency */ - XPBD_BROKEN_ENCODING, /* Encoding of a primitive body is broken */ - XPBD_NOT_BODY_IGNORE, /* Not a body format, but safe to ignore */ - XPBD_BODY_CONSUMED /* Body is recognized and consumed */ -}; -typedef enum xer_pbd_rval(xer_primitive_body_decoder_f)(asn_TYPE_descriptor_t *td, void *struct_ptr, - const void *chunk_buf, size_t chunk_size); + enum xer_pbd_rval + { + XPBD_SYSTEM_FAILURE, /* System failure (memory shortage, etc) */ + XPBD_DECODER_LIMIT, /* Hit some decoder limitation or deficiency */ + XPBD_BROKEN_ENCODING, /* Encoding of a primitive body is broken */ + XPBD_NOT_BODY_IGNORE, /* Not a body format, but safe to ignore */ + XPBD_BODY_CONSUMED /* Body is recognized and consumed */ + }; + typedef enum xer_pbd_rval(xer_primitive_body_decoder_f)(asn_TYPE_descriptor_t *td, void *struct_ptr, + const void *chunk_buf, size_t chunk_size); -/* + /* * Specific function to decode simple primitive types. * Also see xer_decode_general() in xer_decoder.h */ -asn_dec_rval_t xer_decode_primitive(asn_codec_ctx_t *opt_codec_ctx, - asn_TYPE_descriptor_t *type_descriptor, - void **struct_ptr, size_t struct_size, - const char *opt_mname, - const void *buf_ptr, size_t size, - xer_primitive_body_decoder_f *prim_body_decoder); + asn_dec_rval_t xer_decode_primitive(asn_codec_ctx_t *opt_codec_ctx, + asn_TYPE_descriptor_t *type_descriptor, + void **struct_ptr, size_t struct_size, + const char *opt_mname, + const void *buf_ptr, size_t size, + xer_primitive_body_decoder_f *prim_body_decoder); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/asn_internal.h b/src/core/libs/supl/asn-supl/asn_internal.h index 89e89033a..299c4e0e7 100644 --- a/src/core/libs/supl/asn-supl/asn_internal.h +++ b/src/core/libs/supl/asn-supl/asn_internal.h @@ -16,12 +16,13 @@ #endif #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif /* Environment version might be used to avoid running with the old library */ -#define ASN1C_ENVIRONMENT_VERSION 922 /* Compile-time version */ -int get_asn1c_environment_version(void); /* Run-time version */ +#define ASN1C_ENVIRONMENT_VERSION 922 /* Compile-time version */ + int get_asn1c_environment_version(void); /* Run-time version */ #define CALLOC(nmemb, size) calloc(nmemb, size) #define MALLOC(size) malloc(size) @@ -38,7 +39,7 @@ int get_asn1c_environment_version(void); /* Run-time version */ #ifdef ASN_THREAD_SAFE #define asn_debug_indent 0 #else /* !ASN_THREAD_SAFE */ -int asn_debug_indent; + int asn_debug_indent; #endif /* ASN_THREAD_SAFE */ #define ASN_DEBUG(fmt, args...) \ do \ @@ -51,14 +52,14 @@ int asn_debug_indent; } \ while (0) #else /* !__GNUC__ */ -void ASN_DEBUG_f(const char *fmt, ...); + void ASN_DEBUG_f(const char *fmt, ...); #define ASN_DEBUG ASN_DEBUG_f #endif /* __GNUC__ */ #else /* EMIT_ASN_DEBUG != 1 */ -static inline void ASN_DEBUG(const char *fmt, ...) -{ - (void)fmt; -} + static inline void ASN_DEBUG(const char *fmt, ...) + { + (void)fmt; + } #endif /* EMIT_ASN_DEBUG */ #endif /* ASN_DEBUG */ @@ -107,25 +108,25 @@ static inline void ASN_DEBUG(const char *fmt, ...) * Check stack against overflow, if limit is set. */ #define _ASN_DEFAULT_STACK_MAX (30000) -static inline int -_ASN_STACK_OVERFLOW_CHECK(asn_codec_ctx_t *ctx) -{ - if (ctx && ctx->max_stack_size) - { - /* ctx MUST be allocated on the stack */ - ptrdiff_t usedstack = ((char *)ctx - (char *)&ctx); - if (usedstack > 0) usedstack = -usedstack; /* grows up! */ + static inline int + _ASN_STACK_OVERFLOW_CHECK(asn_codec_ctx_t *ctx) + { + if (ctx && ctx->max_stack_size) + { + /* ctx MUST be allocated on the stack */ + ptrdiff_t usedstack = ((char *)ctx - (char *)&ctx); + if (usedstack > 0) usedstack = -usedstack; /* grows up! */ - /* double negative required to avoid int wrap-around */ - if (usedstack < -(ptrdiff_t)ctx->max_stack_size) - { - ASN_DEBUG("Stack limit %ld reached", - (long)ctx->max_stack_size); - return -1; - } - } - return 0; -} + /* double negative required to avoid int wrap-around */ + if (usedstack < -(ptrdiff_t)ctx->max_stack_size) + { + ASN_DEBUG("Stack limit %ld reached", + (long)ctx->max_stack_size); + return -1; + } + } + return 0; + } #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/ber_decoder.h b/src/core/libs/supl/asn-supl/ber_decoder.h index 58249df22..6a87fc23f 100644 --- a/src/core/libs/supl/asn-supl/ber_decoder.h +++ b/src/core/libs/supl/asn-supl/ber_decoder.h @@ -8,54 +8,55 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ -struct asn_codec_ctx_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_codec_ctx_s; /* Forward declaration */ -/* + /* * The BER decoder of any type. * This function may be invoked directly from the application. * The der_encode() function (der_encoder.h) is an opposite to ber_decode(). */ -asn_dec_rval_t ber_decode(struct asn_codec_ctx_s *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, - void **struct_ptr, /* Pointer to a target structure's pointer */ - const void *buffer, /* Data to be decoded */ - size_t size /* Size of that buffer */ -); + asn_dec_rval_t ber_decode(struct asn_codec_ctx_s *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of that buffer */ + ); -/* + /* * Type of generic function which decodes the byte stream into the structure. */ -typedef asn_dec_rval_t(ber_type_decoder_f)( - struct asn_codec_ctx_s *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, - void **struct_ptr, const void *buf_ptr, size_t size, - int tag_mode); + typedef asn_dec_rval_t(ber_type_decoder_f)( + struct asn_codec_ctx_s *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, const void *buf_ptr, size_t size, + int tag_mode); -/******************************* + /******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************/ -/* + /* * Check that all tags correspond to the type definition (as given in head). * On return, last_length would contain either a non-negative length of the * value part of the last TLV, or the negative number of expected * "end of content" sequences. The number may only be negative if the * head->last_tag_form is non-zero. */ -asn_dec_rval_t ber_check_tags( - struct asn_codec_ctx_s *opt_codec_ctx, /* codec options */ - struct asn_TYPE_descriptor_s *type_descriptor, - asn_struct_ctx_t *opt_ctx, /* saved decoding context */ - const void *ptr, size_t size, - int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ - int last_tag_form, /* {-1,0:1}: any, primitive, constr */ - ber_tlv_len_t *last_length, - int *opt_tlv_form /* optional tag form */ -); + asn_dec_rval_t ber_check_tags( + struct asn_codec_ctx_s *opt_codec_ctx, /* codec options */ + struct asn_TYPE_descriptor_s *type_descriptor, + asn_struct_ctx_t *opt_ctx, /* saved decoding context */ + const void *ptr, size_t size, + int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ + int last_tag_form, /* {-1,0:1}: any, primitive, constr */ + ber_tlv_len_t *last_length, + int *opt_tlv_form /* optional tag form */ + ); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/ber_tlv_length.h b/src/core/libs/supl/asn-supl/ber_tlv_length.h index b30d5d27f..7245624cd 100644 --- a/src/core/libs/supl/asn-supl/ber_tlv_length.h +++ b/src/core/libs/supl/asn-supl/ber_tlv_length.h @@ -6,12 +6,13 @@ #define _BER_TLV_LENGTH_H_ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef ssize_t ber_tlv_len_t; + typedef ssize_t ber_tlv_len_t; -/* + /* * This function tries to fetch the length of the BER TLV value and place it * in *len_r. * RETURN VALUES: @@ -21,27 +22,27 @@ typedef ssize_t ber_tlv_len_t; * On return with >0, len_r is constrained as -1..MAX, where -1 mean * that the value is of indefinite length. */ -ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, - ber_tlv_len_t *len_r); + ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, + ber_tlv_len_t *len_r); -/* + /* * This function expects bufptr to be positioned over L in TLV. * It returns number of bytes occupied by L and V together, suitable * for skipping. The function properly handles indefinite length. * RETURN VALUES: * Standard {-1,0,>0} convention. */ -ssize_t ber_skip_length( - struct asn_codec_ctx_s *opt_codec_ctx, /* optional context */ - int _is_constructed, const void *bufptr, size_t size); + ssize_t ber_skip_length( + struct asn_codec_ctx_s *opt_codec_ctx, /* optional context */ + int _is_constructed, const void *bufptr, size_t size); -/* + /* * This function serializes the length (L from TLV) in DER format. * It always returns number of bytes necessary to represent the length, * it is a caller's responsibility to check the return value * against the supplied buffer's size. */ -size_t der_tlv_length_serialize(ber_tlv_len_t len, void *bufptr, size_t size); + size_t der_tlv_length_serialize(ber_tlv_len_t len, void *bufptr, size_t size); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/ber_tlv_tag.h b/src/core/libs/supl/asn-supl/ber_tlv_tag.h index d9fb80005..31b634345 100644 --- a/src/core/libs/supl/asn-supl/ber_tlv_tag.h +++ b/src/core/libs/supl/asn-supl/ber_tlv_tag.h @@ -6,17 +6,18 @@ #define _BER_TLV_TAG_H_ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -enum asn_tag_class -{ - ASN_TAG_CLASS_UNIVERSAL = 0, /* 0b00 */ - ASN_TAG_CLASS_APPLICATION = 1, /* 0b01 */ - ASN_TAG_CLASS_CONTEXT = 2, /* 0b10 */ - ASN_TAG_CLASS_PRIVATE = 3 /* 0b11 */ -}; -typedef unsigned ber_tlv_tag_t; /* BER TAG from Tag-Length-Value */ + enum asn_tag_class + { + ASN_TAG_CLASS_UNIVERSAL = 0, /* 0b00 */ + ASN_TAG_CLASS_APPLICATION = 1, /* 0b01 */ + ASN_TAG_CLASS_CONTEXT = 2, /* 0b10 */ + ASN_TAG_CLASS_PRIVATE = 3 /* 0b11 */ + }; + typedef unsigned ber_tlv_tag_t; /* BER TAG from Tag-Length-Value */ /* * Tag class is encoded together with tag value for optimization purposes. @@ -27,32 +28,32 @@ typedef unsigned ber_tlv_tag_t; /* BER TAG from Tag-Length-Value */ #define BER_TAGS_EQUAL(tag1, tag2) ((tag1) == (tag2)) -/* + /* * Several functions for printing the TAG in the canonical form * (i.e. "[PRIVATE 0]"). * Return values correspond to their libc counterparts (if any). */ -ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t buflen); -ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *); -char *ber_tlv_tag_string(ber_tlv_tag_t tag); + ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t buflen); + ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *); + char *ber_tlv_tag_string(ber_tlv_tag_t tag); -/* + /* * This function tries to fetch the tag from the input stream. * RETURN VALUES: * 0: More data expected than bufptr contains. * -1: Fatal error deciphering tag. * >0: Number of bytes used from bufptr. tag_r will contain the tag. */ -ssize_t ber_fetch_tag(const void *bufptr, size_t size, ber_tlv_tag_t *tag_r); + ssize_t ber_fetch_tag(const void *bufptr, size_t size, ber_tlv_tag_t *tag_r); -/* + /* * This function serializes the tag (T from TLV) in BER format. * It always returns number of bytes necessary to represent the tag, * it is a caller's responsibility to check the return value * against the supplied buffer's size. */ -size_t ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufptr, size_t size); + size_t ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufptr, size_t size); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/constr_CHOICE.h b/src/core/libs/supl/asn-supl/constr_CHOICE.h index b9d7e84b9..264018481 100644 --- a/src/core/libs/supl/asn-supl/constr_CHOICE.h +++ b/src/core/libs/supl/asn-supl/constr_CHOICE.h @@ -9,47 +9,48 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef struct asn_CHOICE_specifics_s -{ - /* + typedef struct asn_CHOICE_specifics_s + { + /* * Target structure description. */ - int struct_size; /* Size of the target structure. */ - int ctx_offset; /* Offset of the asn_codec_ctx_t member */ - int pres_offset; /* Identifier of the present member */ - int pres_size; /* Size of the identifier (enum) */ + int struct_size; /* Size of the target structure. */ + int ctx_offset; /* Offset of the asn_codec_ctx_t member */ + int pres_offset; /* Identifier of the present member */ + int pres_size; /* Size of the identifier (enum) */ - /* + /* * Tags to members mapping table. */ - asn_TYPE_tag2member_t *tag2el; - int tag2el_count; + asn_TYPE_tag2member_t *tag2el; + int tag2el_count; - /* Canonical ordering of CHOICE elements, for PER */ - int *canonical_order; + /* Canonical ordering of CHOICE elements, for PER */ + int *canonical_order; - /* + /* * Extensions-related stuff. */ - int ext_start; /* First member of extensions, or -1 */ -} asn_CHOICE_specifics_t; + int ext_start; /* First member of extensions, or -1 */ + } asn_CHOICE_specifics_t; -/* + /* * A set specialized functions dealing with the CHOICE type. */ -asn_struct_free_f CHOICE_free; -asn_struct_print_f CHOICE_print; -asn_constr_check_f CHOICE_constraint; -ber_type_decoder_f CHOICE_decode_ber; -der_type_encoder_f CHOICE_encode_der; -xer_type_decoder_f CHOICE_decode_xer; -xer_type_encoder_f CHOICE_encode_xer; -per_type_decoder_f CHOICE_decode_uper; -per_type_encoder_f CHOICE_encode_uper; -asn_outmost_tag_f CHOICE_outmost_tag; + asn_struct_free_f CHOICE_free; + asn_struct_print_f CHOICE_print; + asn_constr_check_f CHOICE_constraint; + ber_type_decoder_f CHOICE_decode_ber; + der_type_encoder_f CHOICE_encode_der; + xer_type_decoder_f CHOICE_decode_xer; + xer_type_encoder_f CHOICE_encode_xer; + per_type_decoder_f CHOICE_decode_uper; + per_type_encoder_f CHOICE_encode_uper; + asn_outmost_tag_f CHOICE_outmost_tag; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/constr_SEQUENCE.h b/src/core/libs/supl/asn-supl/constr_SEQUENCE.h index 9f000ecff..e2664a123 100644 --- a/src/core/libs/supl/asn-supl/constr_SEQUENCE.h +++ b/src/core/libs/supl/asn-supl/constr_SEQUENCE.h @@ -8,51 +8,52 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef struct asn_SEQUENCE_specifics_s -{ - /* + typedef struct asn_SEQUENCE_specifics_s + { + /* * Target structure description. */ - int struct_size; /* Size of the target structure. */ - int ctx_offset; /* Offset of the asn_struct_ctx_t member */ + int struct_size; /* Size of the target structure. */ + int ctx_offset; /* Offset of the asn_struct_ctx_t member */ - /* + /* * Tags to members mapping table (sorted). */ - asn_TYPE_tag2member_t *tag2el; - int tag2el_count; + asn_TYPE_tag2member_t *tag2el; + int tag2el_count; - /* + /* * Optional members of the extensions root (roms) or additions (aoms). * Meaningful for PER. */ - int *oms; /* Optional MemberS */ - int roms_count; /* Root optional members count */ - int aoms_count; /* Additions optional members count */ + int *oms; /* Optional MemberS */ + int roms_count; /* Root optional members count */ + int aoms_count; /* Additions optional members count */ - /* + /* * Description of an extensions group. */ - int ext_after; /* Extensions start after this member */ - int ext_before; /* Extensions stop before this member */ -} asn_SEQUENCE_specifics_t; + int ext_after; /* Extensions start after this member */ + int ext_before; /* Extensions stop before this member */ + } asn_SEQUENCE_specifics_t; -/* + /* * A set specialized functions dealing with the SEQUENCE type. */ -asn_struct_free_f SEQUENCE_free; -asn_struct_print_f SEQUENCE_print; -asn_constr_check_f SEQUENCE_constraint; -ber_type_decoder_f SEQUENCE_decode_ber; -der_type_encoder_f SEQUENCE_encode_der; -xer_type_decoder_f SEQUENCE_decode_xer; -xer_type_encoder_f SEQUENCE_encode_xer; -per_type_decoder_f SEQUENCE_decode_uper; -per_type_encoder_f SEQUENCE_encode_uper; + asn_struct_free_f SEQUENCE_free; + asn_struct_print_f SEQUENCE_print; + asn_constr_check_f SEQUENCE_constraint; + ber_type_decoder_f SEQUENCE_decode_ber; + der_type_encoder_f SEQUENCE_encode_der; + xer_type_decoder_f SEQUENCE_decode_xer; + xer_type_encoder_f SEQUENCE_encode_xer; + per_type_decoder_f SEQUENCE_decode_uper; + per_type_encoder_f SEQUENCE_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/constr_SEQUENCE_OF.h b/src/core/libs/supl/asn-supl/constr_SEQUENCE_OF.h index 97c81b017..927ed5163 100644 --- a/src/core/libs/supl/asn-supl/constr_SEQUENCE_OF.h +++ b/src/core/libs/supl/asn-supl/constr_SEQUENCE_OF.h @@ -9,7 +9,8 @@ #include /* Implemented using SET OF */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif /* @@ -22,9 +23,9 @@ extern "C" { #define SEQUENCE_OF_decode_ber SET_OF_decode_ber #define SEQUENCE_OF_decode_xer SET_OF_decode_xer #define SEQUENCE_OF_decode_uper SET_OF_decode_uper -der_type_encoder_f SEQUENCE_OF_encode_der; -xer_type_encoder_f SEQUENCE_OF_encode_xer; -per_type_encoder_f SEQUENCE_OF_encode_uper; + der_type_encoder_f SEQUENCE_OF_encode_der; + xer_type_encoder_f SEQUENCE_OF_encode_xer; + per_type_encoder_f SEQUENCE_OF_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/constr_SET_OF.h b/src/core/libs/supl/asn-supl/constr_SET_OF.h index 0fb2131a1..52b446281 100644 --- a/src/core/libs/supl/asn-supl/constr_SET_OF.h +++ b/src/core/libs/supl/asn-supl/constr_SET_OF.h @@ -8,33 +8,34 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -typedef struct asn_SET_OF_specifics_s -{ - /* + typedef struct asn_SET_OF_specifics_s + { + /* * Target structure description. */ - int struct_size; /* Size of the target structure. */ - int ctx_offset; /* Offset of the asn_struct_ctx_t member */ + int struct_size; /* Size of the target structure. */ + int ctx_offset; /* Offset of the asn_struct_ctx_t member */ - /* XER-specific stuff */ - int as_XMLValueList; /* The member type must be encoded like this */ -} asn_SET_OF_specifics_t; + /* XER-specific stuff */ + int as_XMLValueList; /* The member type must be encoded like this */ + } asn_SET_OF_specifics_t; -/* + /* * A set specialized functions dealing with the SET OF type. */ -asn_struct_free_f SET_OF_free; -asn_struct_print_f SET_OF_print; -asn_constr_check_f SET_OF_constraint; -ber_type_decoder_f SET_OF_decode_ber; -der_type_encoder_f SET_OF_encode_der; -xer_type_decoder_f SET_OF_decode_xer; -xer_type_encoder_f SET_OF_encode_xer; -per_type_decoder_f SET_OF_decode_uper; -per_type_encoder_f SET_OF_encode_uper; + asn_struct_free_f SET_OF_free; + asn_struct_print_f SET_OF_print; + asn_constr_check_f SET_OF_constraint; + ber_type_decoder_f SET_OF_decode_ber; + der_type_encoder_f SET_OF_encode_der; + xer_type_decoder_f SET_OF_decode_xer; + xer_type_encoder_f SET_OF_encode_xer; + per_type_decoder_f SET_OF_decode_uper; + per_type_encoder_f SET_OF_encode_uper; #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/constr_TYPE.h b/src/core/libs/supl/asn-supl/constr_TYPE.h index 5703fe89b..0641f003c 100644 --- a/src/core/libs/supl/asn-supl/constr_TYPE.h +++ b/src/core/libs/supl/asn-supl/constr_TYPE.h @@ -16,25 +16,26 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ -struct asn_TYPE_member_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_member_s; /* Forward declaration */ -/* + /* * This type provides the context information for various ASN.1 routines, * primarily ones doing decoding. A member _asn_ctx of this type must be * included into certain target language's structures, such as compound types. */ -typedef struct asn_struct_ctx_s -{ - short phase; /* Decoding phase */ - short step; /* Elementary step of a phase */ - int context; /* Other context information */ - void *ptr; /* Decoder-specific stuff (stack elements) */ - ber_tlv_len_t left; /* Number of bytes left, -1 for indefinite */ -} asn_struct_ctx_t; + typedef struct asn_struct_ctx_s + { + short phase; /* Decoding phase */ + short step; /* Elementary step of a phase */ + int context; /* Other context information */ + void *ptr; /* Decoder-specific stuff (stack elements) */ + ber_tlv_len_t left; /* Number of bytes left, -1 for indefinite */ + } asn_struct_ctx_t; #include /* Basic Encoding Rules decoder */ #include /* Distinguished Encoding Rules encoder */ @@ -44,128 +45,128 @@ typedef struct asn_struct_ctx_s #include /* Packet Encoding Rules encoder */ #include /* Subtype constraints support */ -/* + /* * Free the structure according to its specification. * If (free_contents_only) is set, the wrapper structure itself (struct_ptr) * will not be freed. (It may be useful in case the structure is allocated * statically or arranged on the stack, yet its elements are allocated * dynamically.) */ -typedef void(asn_struct_free_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, int free_contents_only); + typedef void(asn_struct_free_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, int free_contents_only); #define ASN_STRUCT_FREE(asn_DEF, ptr) (asn_DEF).free_struct(&(asn_DEF), ptr, 0) #define ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF, ptr) \ (asn_DEF).free_struct(&(asn_DEF), ptr, 1) -/* + /* * Print the structure according to its specification. */ -typedef int(asn_struct_print_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - const void *struct_ptr, - int level, /* Indentation level */ - asn_app_consume_bytes_f *callback, void *app_key); + typedef int(asn_struct_print_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, + int level, /* Indentation level */ + asn_app_consume_bytes_f *callback, void *app_key); -/* + /* * Return the outmost tag of the type. * If the type is untagged CHOICE, the dynamic operation is performed. * NOTE: This function pointer type is only useful internally. * Do not use it in your application. */ -typedef ber_tlv_tag_t(asn_outmost_tag_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - const void *struct_ptr, int tag_mode, ber_tlv_tag_t tag); -/* The instance of the above function type; used internally. */ -asn_outmost_tag_f asn_TYPE_outmost_tag; + typedef ber_tlv_tag_t(asn_outmost_tag_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, int tag_mode, ber_tlv_tag_t tag); + /* The instance of the above function type; used internally. */ + asn_outmost_tag_f asn_TYPE_outmost_tag; -/* - * The definitive description of the destination language's structure. - */ -typedef struct asn_TYPE_descriptor_s -{ - char *name; /* A name of the ASN.1 type. "" in some cases. */ - char *xml_tag; /* Name used in XML tag */ - /* + * The definitive description of the destination language's structure. + */ + typedef struct asn_TYPE_descriptor_s + { + char *name; /* A name of the ASN.1 type. "" in some cases. */ + char *xml_tag; /* Name used in XML tag */ + + /* * Generalized functions for dealing with the specific type. * May be directly invoked by applications. */ - asn_struct_free_f *free_struct; /* Free the structure */ - asn_struct_print_f *print_struct; /* Human readable output */ - asn_constr_check_f *check_constraints; /* Constraints validator */ - ber_type_decoder_f *ber_decoder; /* Generic BER decoder */ - der_type_encoder_f *der_encoder; /* Canonical DER encoder */ - xer_type_decoder_f *xer_decoder; /* Generic XER decoder */ - xer_type_encoder_f *xer_encoder; /* [Canonical] XER encoder */ - per_type_decoder_f *uper_decoder; /* Unaligned PER decoder */ - per_type_encoder_f *uper_encoder; /* Unaligned PER encoder */ + asn_struct_free_f *free_struct; /* Free the structure */ + asn_struct_print_f *print_struct; /* Human readable output */ + asn_constr_check_f *check_constraints; /* Constraints validator */ + ber_type_decoder_f *ber_decoder; /* Generic BER decoder */ + der_type_encoder_f *der_encoder; /* Canonical DER encoder */ + xer_type_decoder_f *xer_decoder; /* Generic XER decoder */ + xer_type_encoder_f *xer_encoder; /* [Canonical] XER encoder */ + per_type_decoder_f *uper_decoder; /* Unaligned PER decoder */ + per_type_encoder_f *uper_encoder; /* Unaligned PER encoder */ - /*********************************************************************** + /*********************************************************************** * Internally useful members. Not to be used by applications directly. * **********************************************************************/ - /* + /* * Tags that are expected to occur. */ - asn_outmost_tag_f *outmost_tag; /* */ - ber_tlv_tag_t *tags; /* Effective tags sequence for this type */ - int tags_count; /* Number of tags which are expected */ - ber_tlv_tag_t *all_tags; /* Every tag for BER/containment */ - int all_tags_count; /* Number of tags */ + asn_outmost_tag_f *outmost_tag; /* */ + ber_tlv_tag_t *tags; /* Effective tags sequence for this type */ + int tags_count; /* Number of tags which are expected */ + ber_tlv_tag_t *all_tags; /* Every tag for BER/containment */ + int all_tags_count; /* Number of tags */ - asn_per_constraints_t *per_constraints; /* PER compiled constraints */ + asn_per_constraints_t *per_constraints; /* PER compiled constraints */ - /* + /* * An ASN.1 production type members (members of SEQUENCE, SET, CHOICE). */ - struct asn_TYPE_member_s *elements; - int elements_count; + struct asn_TYPE_member_s *elements; + int elements_count; - /* + /* * Additional information describing the type, used by appropriate * functions above. */ - void *specifics; -} asn_TYPE_descriptor_t; + void *specifics; + } asn_TYPE_descriptor_t; -/* + /* * This type describes an element of the constructed type, * i.e. SEQUENCE, SET, CHOICE, etc. */ -enum asn_TYPE_flags_e -{ - ATF_NOFLAGS, - ATF_POINTER = 0x01, /* Represented by the pointer */ - ATF_OPEN_TYPE = 0x02 /* ANY type, without meaningful tag */ -}; -typedef struct asn_TYPE_member_s -{ - enum asn_TYPE_flags_e flags; /* Element's presentation flags */ - int optional; /* Following optional members, including current */ - int memb_offset; /* Offset of the element */ - ber_tlv_tag_t tag; /* Outmost (most immediate) tag */ - int tag_mode; /* IMPLICIT/no/EXPLICIT tag at current level */ - asn_TYPE_descriptor_t *type; /* Member type descriptor */ - asn_constr_check_f *memb_constraints; /* Constraints validator */ - asn_per_constraints_t *per_constraints; /* PER compiled constraints */ - int (*default_value)(int setval, void **sptr); /* DEFAULT */ - char *name; /* ASN.1 identifier of the element */ -} asn_TYPE_member_t; + enum asn_TYPE_flags_e + { + ATF_NOFLAGS, + ATF_POINTER = 0x01, /* Represented by the pointer */ + ATF_OPEN_TYPE = 0x02 /* ANY type, without meaningful tag */ + }; + typedef struct asn_TYPE_member_s + { + enum asn_TYPE_flags_e flags; /* Element's presentation flags */ + int optional; /* Following optional members, including current */ + int memb_offset; /* Offset of the element */ + ber_tlv_tag_t tag; /* Outmost (most immediate) tag */ + int tag_mode; /* IMPLICIT/no/EXPLICIT tag at current level */ + asn_TYPE_descriptor_t *type; /* Member type descriptor */ + asn_constr_check_f *memb_constraints; /* Constraints validator */ + asn_per_constraints_t *per_constraints; /* PER compiled constraints */ + int (*default_value)(int setval, void **sptr); /* DEFAULT */ + char *name; /* ASN.1 identifier of the element */ + } asn_TYPE_member_t; -/* + /* * BER tag to element number mapping. */ -typedef struct asn_TYPE_tag2member_s -{ - ber_tlv_tag_t el_tag; /* Outmost tag of the member */ - int el_no; /* Index of the associated member, base 0 */ - int toff_first; /* First occurence of the el_tag, relative */ - int toff_last; /* Last occurence of the el_tag, relatvie */ -} asn_TYPE_tag2member_t; + typedef struct asn_TYPE_tag2member_s + { + ber_tlv_tag_t el_tag; /* Outmost tag of the member */ + int el_no; /* Index of the associated member, base 0 */ + int toff_first; /* First occurence of the el_tag, relative */ + int toff_last; /* Last occurence of the el_tag, relatvie */ + } asn_TYPE_tag2member_t; -/* + /* * This function is a wrapper around (td)->print_struct, which prints out * the contents of the target language's structure (struct_ptr) into the * file pointer (stream) in human readable form. @@ -174,9 +175,9 @@ typedef struct asn_TYPE_tag2member_s * -1: Problem dumping the structure. * (See also xer_fprint() in xer_encoder.h) */ -int asn_fprint(FILE *stream, /* Destination stream descriptor */ - asn_TYPE_descriptor_t *td, /* ASN.1 type descriptor */ - const void *struct_ptr); /* Structure to be printed */ + int asn_fprint(FILE *stream, /* Destination stream descriptor */ + asn_TYPE_descriptor_t *td, /* ASN.1 type descriptor */ + const void *struct_ptr); /* Structure to be printed */ #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/constraints.h b/src/core/libs/supl/asn-supl/constraints.h index 78a43d613..bc4fdb938 100644 --- a/src/core/libs/supl/asn-supl/constraints.h +++ b/src/core/libs/supl/asn-supl/constraints.h @@ -8,12 +8,13 @@ #include /* Platform-dependent types */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* + /* * Validate the structure according to the ASN.1 constraints. * If errbuf and errlen are given, they shall be pointing to the appropriate * buffer space and its length before calling this function. Alternatively, @@ -25,30 +26,30 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */ * This function returns 0 in case all ASN.1 constraints are met * and -1 if one or more constraints were failed. */ -int asn_check_constraints(struct asn_TYPE_descriptor_s *type_descriptor, - const void *struct_ptr, /* Target language's structure */ - char *errbuf, /* Returned error description */ - size_t *errlen /* Length of the error description */ -); + int asn_check_constraints(struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, /* Target language's structure */ + char *errbuf, /* Returned error description */ + size_t *errlen /* Length of the error description */ + ); -/* + /* * Generic type for constraint checking callback, * associated with every type descriptor. */ -typedef int(asn_constr_check_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - const void *struct_ptr, - asn_app_constraint_failed_f *optional_callback, /* Log the error */ - void *optional_app_key /* Opaque key passed to a callback */ -); + typedef int(asn_constr_check_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + const void *struct_ptr, + asn_app_constraint_failed_f *optional_callback, /* Log the error */ + void *optional_app_key /* Opaque key passed to a callback */ + ); -/******************************* + /******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************/ -asn_constr_check_f asn_generic_no_constraint; /* No constraint whatsoever */ -asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */ + asn_constr_check_f asn_generic_no_constraint; /* No constraint whatsoever */ + asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */ /* * Invoke the callback with a complete error message. diff --git a/src/core/libs/supl/asn-supl/der_encoder.h b/src/core/libs/supl/asn-supl/der_encoder.h index 63416b633..3eafbc281 100644 --- a/src/core/libs/supl/asn-supl/der_encoder.h +++ b/src/core/libs/supl/asn-supl/der_encoder.h @@ -8,57 +8,58 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* + /* * The DER encoder of any type. May be invoked by the application. * The ber_decode() function (ber_decoder.h) is an opposite of der_encode(). */ -asn_enc_rval_t der_encode(struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - asn_app_consume_bytes_f *consume_bytes_cb, - void *app_key /* Arbitrary callback argument */ -); + asn_enc_rval_t der_encode(struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key /* Arbitrary callback argument */ + ); -/* A variant of der_encode() which encodes data into the pre-allocated buffer */ -asn_enc_rval_t der_encode_to_buffer( - struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - void *buffer, /* Pre-allocated buffer */ - size_t buffer_size /* Initial buffer size (maximum) */ -); + /* A variant of der_encode() which encodes data into the pre-allocated buffer */ + asn_enc_rval_t der_encode_to_buffer( + struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (maximum) */ + ); -/* + /* * Type of the generic DER encoder. */ -typedef asn_enc_rval_t(der_type_encoder_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ - ber_tlv_tag_t tag, - asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ - void *app_key /* Arbitrary callback argument */ -); + typedef asn_enc_rval_t(der_type_encoder_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ + ber_tlv_tag_t tag, + asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ + ); -/******************************* + /******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************/ -/* + /* * Write out leading TL[v] sequence according to the type definition. */ -ssize_t der_write_tags( - struct asn_TYPE_descriptor_s *type_descriptor, - size_t struct_length, - int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ - int last_tag_form, /* {0,!0}: prim, constructed */ - ber_tlv_tag_t tag, - asn_app_consume_bytes_f *consume_bytes_cb, - void *app_key); + ssize_t der_write_tags( + struct asn_TYPE_descriptor_s *type_descriptor, + size_t struct_length, + int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ + int last_tag_form, /* {0,!0}: prim, constructed */ + ber_tlv_tag_t tag, + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/per_decoder.h b/src/core/libs/supl/asn-supl/per_decoder.h index 46e045742..a28509464 100644 --- a/src/core/libs/supl/asn-supl/per_decoder.h +++ b/src/core/libs/supl/asn-supl/per_decoder.h @@ -9,44 +9,45 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* + /* * Unaligned PER decoder of a "complete encoding" as per X.691#10.1. * On success, this call always returns (.consumed >= 1), as per X.691#10.1.3. */ -asn_dec_rval_t uper_decode_complete(struct asn_codec_ctx_s *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ - void **struct_ptr, /* Pointer to a target structure's pointer */ - const void *buffer, /* Data to be decoded */ - size_t size /* Size of data buffer */ -); + asn_dec_rval_t uper_decode_complete(struct asn_codec_ctx_s *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of data buffer */ + ); -/* + /* * Unaligned PER decoder of any ASN.1 type. May be invoked by the application. * WARNING: This call returns the number of BITS read from the stream. Beware. */ -asn_dec_rval_t uper_decode(struct asn_codec_ctx_s *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ - void **struct_ptr, /* Pointer to a target structure's pointer */ - const void *buffer, /* Data to be decoded */ - size_t size, /* Size of data buffer */ - int skip_bits, /* Number of unused leading bits, 0..7 */ - int unused_bits /* Number of unused tailing bits, 0..7 */ -); + asn_dec_rval_t uper_decode(struct asn_codec_ctx_s *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size, /* Size of data buffer */ + int skip_bits, /* Number of unused leading bits, 0..7 */ + int unused_bits /* Number of unused tailing bits, 0..7 */ + ); -/* + /* * Type of the type-specific PER decoder function. */ -typedef asn_dec_rval_t(per_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, - asn_per_constraints_t *constraints, - void **struct_ptr, - asn_per_data_t *per_data); + typedef asn_dec_rval_t(per_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, + asn_per_constraints_t *constraints, + void **struct_ptr, + asn_per_data_t *per_data); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/per_encoder.h b/src/core/libs/supl/asn-supl/per_encoder.h index a1fe4a7bc..896013095 100644 --- a/src/core/libs/supl/asn-supl/per_encoder.h +++ b/src/core/libs/supl/asn-supl/per_encoder.h @@ -9,57 +9,58 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* + /* * Unaligned PER encoder of any ASN.1 type. May be invoked by the application. * WARNING: This function returns the number of encoded bits in the .encoded * field of the return value. Use the following formula to convert to bytes: * bytes = ((.encoded + 7) / 8) */ -asn_enc_rval_t uper_encode(struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - asn_app_consume_bytes_f *consume_bytes_cb, /* Data collector */ - void *app_key /* Arbitrary callback argument */ -); + asn_enc_rval_t uper_encode(struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + asn_app_consume_bytes_f *consume_bytes_cb, /* Data collector */ + void *app_key /* Arbitrary callback argument */ + ); -/* + /* * A variant of uper_encode() which encodes data into the existing buffer * WARNING: This function returns the number of encoded bits in the .encoded * field of the return value. */ -asn_enc_rval_t uper_encode_to_buffer( - struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - void *buffer, /* Pre-allocated buffer */ - size_t buffer_size /* Initial buffer size (max) */ -); + asn_enc_rval_t uper_encode_to_buffer( + struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + void *buffer, /* Pre-allocated buffer */ + size_t buffer_size /* Initial buffer size (max) */ + ); -/* + /* * A variant of uper_encode_to_buffer() which allocates buffer itself. * Returns the number of bytes in the buffer or -1 in case of failure. * WARNING: This function produces a "Production of the complete encoding", * with length of at least one octet. Contrast this to precise bit-packing * encoding of uper_encode() and uper_encode_to_buffer(). */ -ssize_t uper_encode_to_new_buffer( - struct asn_TYPE_descriptor_s *type_descriptor, - asn_per_constraints_t *constraints, - void *struct_ptr, /* Structure to be encoded */ - void **buffer_r /* Buffer allocated and returned */ -); + ssize_t uper_encode_to_new_buffer( + struct asn_TYPE_descriptor_s *type_descriptor, + asn_per_constraints_t *constraints, + void *struct_ptr, /* Structure to be encoded */ + void **buffer_r /* Buffer allocated and returned */ + ); -/* + /* * Type of the generic PER encoder function. */ -typedef asn_enc_rval_t(per_type_encoder_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - asn_per_constraints_t *constraints, - void *struct_ptr, - asn_per_outp_t *per_output); + typedef asn_enc_rval_t(per_type_encoder_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + asn_per_constraints_t *constraints, + void *struct_ptr, + asn_per_outp_t *per_output); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/per_opentype.h b/src/core/libs/supl/asn-supl/per_opentype.h index 6fc5130a7..2110a794a 100644 --- a/src/core/libs/supl/asn-supl/per_opentype.h +++ b/src/core/libs/supl/asn-supl/per_opentype.h @@ -6,14 +6,15 @@ #define _PER_OPENTYPE_H_ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -asn_dec_rval_t uper_open_type_get(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd); + asn_dec_rval_t uper_open_type_get(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd); -int uper_open_type_skip(asn_codec_ctx_t *opt_codec_ctx, asn_per_data_t *pd); + int uper_open_type_skip(asn_codec_ctx_t *opt_codec_ctx, asn_per_data_t *pd); -int uper_open_type_put(asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void *sptr, asn_per_outp_t *po); + int uper_open_type_put(asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void *sptr, asn_per_outp_t *po); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/per_support.h b/src/core/libs/supl/asn-supl/per_support.h index fff2fc133..c99f12291 100644 --- a/src/core/libs/supl/asn-supl/per_support.h +++ b/src/core/libs/supl/asn-supl/per_support.h @@ -9,136 +9,137 @@ #include /* Platform-specific types */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* + /* * Pre-computed PER constraints. */ -typedef const struct asn_per_constraint_s -{ - enum asn_per_constraint_flags + typedef const struct asn_per_constraint_s { - APC_UNCONSTRAINED = 0x0, /* No PER visible constraints */ - APC_SEMI_CONSTRAINED = 0x1, /* Constrained at "lb" */ - APC_CONSTRAINED = 0x2, /* Fully constrained */ - APC_EXTENSIBLE = 0x4 /* May have extension */ - } flags; - int range_bits; /* Full number of bits in the range */ - int effective_bits; /* Effective bits */ - long lower_bound; /* "lb" value */ - long upper_bound; /* "ub" value */ -} asn_per_constraint_t; -typedef const struct asn_per_constraints_s -{ - struct asn_per_constraint_s value; - struct asn_per_constraint_s size; - int (*value2code)(unsigned int value); - int (*code2value)(unsigned int code); -} asn_per_constraints_t; + enum asn_per_constraint_flags + { + APC_UNCONSTRAINED = 0x0, /* No PER visible constraints */ + APC_SEMI_CONSTRAINED = 0x1, /* Constrained at "lb" */ + APC_CONSTRAINED = 0x2, /* Fully constrained */ + APC_EXTENSIBLE = 0x4 /* May have extension */ + } flags; + int range_bits; /* Full number of bits in the range */ + int effective_bits; /* Effective bits */ + long lower_bound; /* "lb" value */ + long upper_bound; /* "ub" value */ + } asn_per_constraint_t; + typedef const struct asn_per_constraints_s + { + struct asn_per_constraint_s value; + struct asn_per_constraint_s size; + int (*value2code)(unsigned int value); + int (*code2value)(unsigned int code); + } asn_per_constraints_t; -/* + /* * This structure describes a position inside an incoming PER bit stream. */ -typedef struct asn_per_data_s -{ - const uint8_t *buffer; /* Pointer to the octet stream */ - size_t nboff; /* Bit offset to the meaningful bit */ - size_t nbits; /* Number of bits in the stream */ - size_t moved; /* Number of bits moved through this bit stream */ - int (*refill)(struct asn_per_data_s *); - void *refill_key; -} asn_per_data_t; + typedef struct asn_per_data_s + { + const uint8_t *buffer; /* Pointer to the octet stream */ + size_t nboff; /* Bit offset to the meaningful bit */ + size_t nbits; /* Number of bits in the stream */ + size_t moved; /* Number of bits moved through this bit stream */ + int (*refill)(struct asn_per_data_s *); + void *refill_key; + } asn_per_data_t; -/* + /* * Extract a small number of bits (<= 31) from the specified PER data pointer. * This function returns -1 if the specified number of bits could not be * extracted due to EOD or other conditions. */ -int32_t per_get_few_bits(asn_per_data_t *per_data, int get_nbits); + int32_t per_get_few_bits(asn_per_data_t *per_data, int get_nbits); -/* Undo the immediately preceeding "get_few_bits" operation */ -void per_get_undo(asn_per_data_t *per_data, int get_nbits); + /* Undo the immediately preceeding "get_few_bits" operation */ + void per_get_undo(asn_per_data_t *per_data, int get_nbits); -/* + /* * Extract a large number of bits from the specified PER data pointer. * This function returns -1 if the specified number of bits could not be * extracted due to EOD or other conditions. */ -int per_get_many_bits(asn_per_data_t *pd, uint8_t *dst, int right_align, - int get_nbits); + int per_get_many_bits(asn_per_data_t *pd, uint8_t *dst, int right_align, + int get_nbits); -/* + /* * Get the length "n" from the Unaligned PER stream. */ -ssize_t uper_get_length(asn_per_data_t *pd, - int effective_bound_bits, - int *repeat); + ssize_t uper_get_length(asn_per_data_t *pd, + int effective_bound_bits, + int *repeat); -/* + /* * Get the normally small length "n". */ -ssize_t uper_get_nslength(asn_per_data_t *pd); + ssize_t uper_get_nslength(asn_per_data_t *pd); -/* + /* * Get the normally small non-negative whole number. */ -ssize_t uper_get_nsnnwn(asn_per_data_t *pd); + ssize_t uper_get_nsnnwn(asn_per_data_t *pd); -/* X.691-2008/11, #11.5.6 */ -int uper_get_constrained_whole_number(asn_per_data_t *pd, unsigned long *v, int nbits); + /* X.691-2008/11, #11.5.6 */ + int uper_get_constrained_whole_number(asn_per_data_t *pd, unsigned long *v, int nbits); -/* Non-thread-safe debugging function, don't use it */ -char *per_data_string(asn_per_data_t *pd); + /* Non-thread-safe debugging function, don't use it */ + char *per_data_string(asn_per_data_t *pd); -/* + /* * This structure supports forming PER output. */ -typedef struct asn_per_outp_s -{ - uint8_t *buffer; /* Pointer into the (tmpspace) */ - size_t nboff; /* Bit offset to the meaningful bit */ - size_t nbits; /* Number of bits left in (tmpspace) */ - uint8_t tmpspace[32]; /* Preliminary storage to hold data */ - int (*outper)(const void *data, size_t size, void *op_key); - void *op_key; /* Key for (outper) data callback */ - size_t flushed_bytes; /* Bytes already flushed through (outper) */ -} asn_per_outp_t; + typedef struct asn_per_outp_s + { + uint8_t *buffer; /* Pointer into the (tmpspace) */ + size_t nboff; /* Bit offset to the meaningful bit */ + size_t nbits; /* Number of bits left in (tmpspace) */ + uint8_t tmpspace[32]; /* Preliminary storage to hold data */ + int (*outper)(const void *data, size_t size, void *op_key); + void *op_key; /* Key for (outper) data callback */ + size_t flushed_bytes; /* Bytes already flushed through (outper) */ + } asn_per_outp_t; -/* Output a small number of bits (<= 31) */ -int per_put_few_bits(asn_per_outp_t *per_data, uint32_t bits, int obits); + /* Output a small number of bits (<= 31) */ + int per_put_few_bits(asn_per_outp_t *per_data, uint32_t bits, int obits); -/* Output a large number of bits */ -int per_put_many_bits(asn_per_outp_t *po, const uint8_t *src, int put_nbits); + /* Output a large number of bits */ + int per_put_many_bits(asn_per_outp_t *po, const uint8_t *src, int put_nbits); -/* + /* * Flush whole bytes (0 or more) through (outper) member. * The least significant bits which are not used are guaranteed to be set to 0. * Returns -1 if callback returns -1. Otherwise, 0. */ -int per_put_aligned_flush(asn_per_outp_t *po); + int per_put_aligned_flush(asn_per_outp_t *po); -/* X.691-2008/11, #11.5 */ -int uper_put_constrained_whole_number_s(asn_per_outp_t *po, long v, int nbits); -int uper_put_constrained_whole_number_u(asn_per_outp_t *po, unsigned long v, int nbits); + /* X.691-2008/11, #11.5 */ + int uper_put_constrained_whole_number_s(asn_per_outp_t *po, long v, int nbits); + int uper_put_constrained_whole_number_u(asn_per_outp_t *po, unsigned long v, int nbits); -/* + /* * Put the length "n" to the Unaligned PER stream. * This function returns the number of units which may be flushed * in the next units saving iteration. */ -ssize_t uper_put_length(asn_per_outp_t *po, size_t whole_length); + ssize_t uper_put_length(asn_per_outp_t *po, size_t whole_length); -/* + /* * Put the normally small length "n" to the Unaligned PER stream. * Returns 0 or -1. */ -int uper_put_nslength(asn_per_outp_t *po, size_t length); + int uper_put_nslength(asn_per_outp_t *po, size_t length); -/* + /* * Put the normally small non-negative whole number. */ -int uper_put_nsnnwn(asn_per_outp_t *po, int n); + int uper_put_nsnnwn(asn_per_outp_t *po, int n); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/xer_decoder.h b/src/core/libs/supl/asn-supl/xer_decoder.h index 4cf5b2017..52444af51 100644 --- a/src/core/libs/supl/asn-supl/xer_decoder.h +++ b/src/core/libs/supl/asn-supl/xer_decoder.h @@ -8,92 +8,95 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* + /* * The XER decoder of any ASN.1 type. May be invoked by the application. */ -asn_dec_rval_t xer_decode(struct asn_codec_ctx_s *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, - void **struct_ptr, /* Pointer to a target structure's pointer */ - const void *buffer, /* Data to be decoded */ - size_t size /* Size of data buffer */ -); + asn_dec_rval_t xer_decode(struct asn_codec_ctx_s *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, /* Pointer to a target structure's pointer */ + const void *buffer, /* Data to be decoded */ + size_t size /* Size of data buffer */ + ); -/* + /* * Type of the type-specific XER decoder function. */ -typedef asn_dec_rval_t(xer_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx, - struct asn_TYPE_descriptor_s *type_descriptor, - void **struct_ptr, - const char *opt_mname, /* Member name */ - const void *buf_ptr, size_t size); + typedef asn_dec_rval_t(xer_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx, + struct asn_TYPE_descriptor_s *type_descriptor, + void **struct_ptr, + const char *opt_mname, /* Member name */ + const void *buf_ptr, size_t size); -/******************************* + /******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************/ -/* + /* * Generalized function for decoding the primitive values. * Used by more specialized functions, such as OCTET_STRING_decode_xer_utf8 * and others. This function should not be used by applications, as its API * is subject to changes. */ -asn_dec_rval_t xer_decode_general(asn_codec_ctx_t *opt_codec_ctx, - asn_struct_ctx_t *ctx, /* Type decoder context */ - void *struct_key, /* Treated as opaque pointer */ - const char *xml_tag, /* Expected XML tag name */ - const void *buf_ptr, size_t size, - int (*opt_unexpected_tag_decoder)(void *struct_key, const void *chunk_buf, size_t chunk_size), - ssize_t (*body_receiver)(void *struct_key, const void *chunk_buf, size_t chunk_size, - int have_more)); + asn_dec_rval_t xer_decode_general(asn_codec_ctx_t *opt_codec_ctx, + asn_struct_ctx_t *ctx, /* Type decoder context */ + void *struct_key, /* Treated as opaque pointer */ + const char *xml_tag, /* Expected XML tag name */ + const void *buf_ptr, size_t size, + int (*opt_unexpected_tag_decoder)(void *struct_key, const void *chunk_buf, size_t chunk_size), + ssize_t (*body_receiver)(void *struct_key, const void *chunk_buf, size_t chunk_size, + int have_more)); -/* + /* * Fetch the next XER (XML) token from the stream. * The function returns the number of bytes occupied by the chunk type, * returned in the _ch_type. The _ch_type is only set (and valid) when * the return value is greater than 0. */ -typedef enum pxer_chunk_type { - PXER_TAG, /* Complete XER tag */ - PXER_TEXT, /* Plain text between XER tags */ - PXER_COMMENT /* A comment, may be part of */ -} pxer_chunk_type_e; -ssize_t xer_next_token(int *stateContext, - const void *buffer, size_t size, pxer_chunk_type_e *_ch_type); + typedef enum pxer_chunk_type + { + PXER_TAG, /* Complete XER tag */ + PXER_TEXT, /* Plain text between XER tags */ + PXER_COMMENT /* A comment, may be part of */ + } pxer_chunk_type_e; + ssize_t xer_next_token(int *stateContext, + const void *buffer, size_t size, pxer_chunk_type_e *_ch_type); -/* + /* * This function checks the buffer against the tag name is expected to occur. */ -typedef enum xer_check_tag { - XCT_BROKEN = 0, /* The tag is broken */ - XCT_OPENING = 1, /* This is the tag */ - XCT_CLOSING = 2, /* This is the tag */ - XCT_BOTH = 3, /* This is the tag */ - XCT__UNK__MASK = 4, /* Mask of everything unexpected */ - XCT_UNKNOWN_OP = 5, /* Unexpected tag */ - XCT_UNKNOWN_CL = 6, /* Unexpected tag */ - XCT_UNKNOWN_BO = 7 /* Unexpected tag */ -} xer_check_tag_e; -xer_check_tag_e xer_check_tag(const void *buf_ptr, int size, - const char *need_tag); + typedef enum xer_check_tag + { + XCT_BROKEN = 0, /* The tag is broken */ + XCT_OPENING = 1, /* This is the tag */ + XCT_CLOSING = 2, /* This is the tag */ + XCT_BOTH = 3, /* This is the tag */ + XCT__UNK__MASK = 4, /* Mask of everything unexpected */ + XCT_UNKNOWN_OP = 5, /* Unexpected tag */ + XCT_UNKNOWN_CL = 6, /* Unexpected tag */ + XCT_UNKNOWN_BO = 7 /* Unexpected tag */ + } xer_check_tag_e; + xer_check_tag_e xer_check_tag(const void *buf_ptr, int size, + const char *need_tag); -/* + /* * Check whether this buffer consists of entirely XER whitespace characters. * RETURN VALUES: * 1: Whitespace or empty string * 0: Non-whitespace */ -int xer_is_whitespace(const void *chunk_buf, size_t chunk_size); + int xer_is_whitespace(const void *chunk_buf, size_t chunk_size); -/* + /* * Skip the series of anticipated extensions. */ -int xer_skip_unknown(xer_check_tag_e tcv, ber_tlv_len_t *depth); + int xer_skip_unknown(xer_check_tag_e tcv, ber_tlv_len_t *depth); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/xer_encoder.h b/src/core/libs/supl/asn-supl/xer_encoder.h index e140bafff..5b640d425 100644 --- a/src/core/libs/supl/asn-supl/xer_encoder.h +++ b/src/core/libs/supl/asn-supl/xer_encoder.h @@ -8,30 +8,31 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -struct asn_TYPE_descriptor_s; /* Forward declaration */ + struct asn_TYPE_descriptor_s; /* Forward declaration */ -/* Flags used by the xer_encode() and (*xer_type_encoder_f), defined below */ -enum xer_encoder_flags_e -{ - /* Mode of encoding */ - XER_F_BASIC = 0x01, /* BASIC-XER (pretty-printing) */ - XER_F_CANONICAL = 0x02 /* Canonical XER (strict rules) */ -}; + /* Flags used by the xer_encode() and (*xer_type_encoder_f), defined below */ + enum xer_encoder_flags_e + { + /* Mode of encoding */ + XER_F_BASIC = 0x01, /* BASIC-XER (pretty-printing) */ + XER_F_CANONICAL = 0x02 /* Canonical XER (strict rules) */ + }; -/* + /* * The XER encoder of any type. May be invoked by the application. */ -asn_enc_rval_t xer_encode(struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - enum xer_encoder_flags_e xer_flags, - asn_app_consume_bytes_f *consume_bytes_cb, - void *app_key /* Arbitrary callback argument */ -); + asn_enc_rval_t xer_encode(struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + enum xer_encoder_flags_e xer_flags, + asn_app_consume_bytes_f *consume_bytes_cb, + void *app_key /* Arbitrary callback argument */ + ); -/* + /* * The variant of the above function which dumps the BASIC-XER (XER_F_BASIC) * output into the chosen file pointer. * RETURN VALUES: @@ -39,19 +40,19 @@ asn_enc_rval_t xer_encode(struct asn_TYPE_descriptor_s *type_descriptor, * -1: Problem printing the structure. * WARNING: No sensible errno value is returned. */ -int xer_fprint(FILE *stream, struct asn_TYPE_descriptor_s *td, void *sptr); + int xer_fprint(FILE *stream, struct asn_TYPE_descriptor_s *td, void *sptr); -/* + /* * Type of the generic XER encoder. */ -typedef asn_enc_rval_t(xer_type_encoder_f)( - struct asn_TYPE_descriptor_s *type_descriptor, - void *struct_ptr, /* Structure to be encoded */ - int ilevel, /* Level of indentation */ - enum xer_encoder_flags_e xer_flags, - asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ - void *app_key /* Arbitrary callback argument */ -); + typedef asn_enc_rval_t(xer_type_encoder_f)( + struct asn_TYPE_descriptor_s *type_descriptor, + void *struct_ptr, /* Structure to be encoded */ + int ilevel, /* Level of indentation */ + enum xer_encoder_flags_e xer_flags, + asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ + void *app_key /* Arbitrary callback argument */ + ); #ifdef __cplusplus } diff --git a/src/core/libs/supl/asn-supl/xer_support.h b/src/core/libs/supl/asn-supl/xer_support.h index dee9bb1fd..13d8bbd06 100644 --- a/src/core/libs/supl/asn-supl/xer_support.h +++ b/src/core/libs/supl/asn-supl/xer_support.h @@ -9,25 +9,27 @@ #include /* Platform-specific types */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -/* + /* * Types of data transferred to the application. */ -typedef enum { - PXML_TEXT, /* Plain text between XML tags. */ - PXML_TAG, /* A tag, starting with '<'. */ - PXML_COMMENT, /* An XML comment, including "". */ - /* + typedef enum + { + PXML_TEXT, /* Plain text between XML tags. */ + PXML_TAG, /* A tag, starting with '<'. */ + PXML_COMMENT, /* An XML comment, including "". */ + /* * The following chunk types are reported if the chunk * terminates the specified XML element. */ - PXML_TAG_END, /* Tag ended */ - PXML_COMMENT_END /* Comment ended */ -} pxml_chunk_type_e; + PXML_TAG_END, /* Tag ended */ + PXML_COMMENT_END /* Comment ended */ + } pxml_chunk_type_e; -/* + /* * Callback function that is called by the parser when parsed data is * available. The _opaque is the pointer to a field containing opaque user * data specified in pxml_create() call. The chunk type is _type and the text @@ -35,18 +37,18 @@ typedef enum { * pxml_feed() call) starting at offset _offset and of _size bytes size. * The chunk is NOT '\0'-terminated. */ -typedef int(pxml_callback_f)(pxml_chunk_type_e _type, - const void *_chunk_data, size_t _chunk_size, void *_key); + typedef int(pxml_callback_f)(pxml_chunk_type_e _type, + const void *_chunk_data, size_t _chunk_size, void *_key); -/* + /* * Parse the given buffer as it were a chunk of XML data. * Invoke the specified callback each time the meaninful data is found. * This function returns number of bytes consumed from the bufer. * It will always be lesser than or equal to the specified _size. * The next invocation of this function must account the difference. */ -ssize_t pxml_parse(int *_stateContext, const void *_buf, size_t _size, - pxml_callback_f *cb, void *_key); + ssize_t pxml_parse(int *_stateContext, const void *_buf, size_t _size, + pxml_callback_f *cb, void *_key); #ifdef __cplusplus } diff --git a/src/core/system_parameters/rtcm.cc b/src/core/system_parameters/rtcm.cc index 4c812f75f..9cd546aed 100644 --- a/src/core/system_parameters/rtcm.cc +++ b/src/core/system_parameters/rtcm.cc @@ -3498,34 +3498,35 @@ unsigned int Rtcm::msm_lock_time_indicator(unsigned int lock_time_period_s) } +// clang-format off unsigned int Rtcm::msm_extended_lock_time_indicator(unsigned int lock_time_period_s) { // Table 3.5-75 - if (lock_time_period_s < 64) return (lock_time_period_s); - if (64 <= lock_time_period_s && lock_time_period_s < 128) return (64 + (lock_time_period_s - 64) / 2); - if (128 <= lock_time_period_s && lock_time_period_s < 256) return (96 + (lock_time_period_s - 128) / 4); - if (256 <= lock_time_period_s && lock_time_period_s < 512) return (128 + (lock_time_period_s - 256) / 8); - if (512 <= lock_time_period_s && lock_time_period_s < 1024) return (160 + (lock_time_period_s - 512) / 16); - if (1024 <= lock_time_period_s && lock_time_period_s < 2048) return (192 + (lock_time_period_s - 1024) / 32); - if (2048 <= lock_time_period_s && lock_time_period_s < 4096) return (224 + (lock_time_period_s - 2048) / 64); - if (4096 <= lock_time_period_s && lock_time_period_s < 8192) return (256 + (lock_time_period_s - 4096) / 128); - if (8192 <= lock_time_period_s && lock_time_period_s < 16384) return (288 + (lock_time_period_s - 8192) / 256); - if (16384 <= lock_time_period_s && lock_time_period_s < 32768) return (320 + (lock_time_period_s - 16384) / 512); - if (32768 <= lock_time_period_s && lock_time_period_s < 65536) return (352 + (lock_time_period_s - 32768) / 1024); - if (65536 <= lock_time_period_s && lock_time_period_s < 131072) return (384 + (lock_time_period_s - 65536) / 2048); - if (131072 <= lock_time_period_s && lock_time_period_s < 262144) return (416 + (lock_time_period_s - 131072) / 4096); - if (262144 <= lock_time_period_s && lock_time_period_s < 524288) return (448 + (lock_time_period_s - 262144) / 8192); - if (524288 <= lock_time_period_s && lock_time_period_s < 1048576) return (480 + (lock_time_period_s - 524288) / 16384); - if (1048576 <= lock_time_period_s && lock_time_period_s < 2097152) return (512 + (lock_time_period_s - 1048576) / 32768); - if (2097152 <= lock_time_period_s && lock_time_period_s < 4194304) return (544 + (lock_time_period_s - 2097152) / 65536); - if (4194304 <= lock_time_period_s && lock_time_period_s < 8388608) return (576 + (lock_time_period_s - 4194304) / 131072); - if (8388608 <= lock_time_period_s && lock_time_period_s < 16777216) return (608 + (lock_time_period_s - 8388608) / 262144); - if (16777216 <= lock_time_period_s && lock_time_period_s < 33554432) return (640 + (lock_time_period_s - 16777216) / 524288); - if (33554432 <= lock_time_period_s && lock_time_period_s < 67108864) return (672 + (lock_time_period_s - 33554432) / 1048576); - if (67108864 <= lock_time_period_s) return (704); - return 1023; // will never happen + if( lock_time_period_s < 64 ) return ( lock_time_period_s ); + if( 64 <= lock_time_period_s && lock_time_period_s < 128 ) return ( 64 + (lock_time_period_s - 64 ) / 2 ); + if( 128 <= lock_time_period_s && lock_time_period_s < 256 ) return ( 96 + (lock_time_period_s - 128 ) / 4 ); + if( 256 <= lock_time_period_s && lock_time_period_s < 512 ) return (128 + (lock_time_period_s - 256 ) / 8 ); + if( 512 <= lock_time_period_s && lock_time_period_s < 1024 ) return (160 + (lock_time_period_s - 512 ) / 16 ); + if( 1024 <= lock_time_period_s && lock_time_period_s < 2048 ) return (192 + (lock_time_period_s - 1024 ) / 32 ); + if( 2048 <= lock_time_period_s && lock_time_period_s < 4096 ) return (224 + (lock_time_period_s - 2048 ) / 64 ); + if( 4096 <= lock_time_period_s && lock_time_period_s < 8192 ) return (256 + (lock_time_period_s - 4096 ) / 128 ); + if( 8192 <= lock_time_period_s && lock_time_period_s < 16384 ) return (288 + (lock_time_period_s - 8192 ) / 256 ); + if( 16384 <= lock_time_period_s && lock_time_period_s < 32768 ) return (320 + (lock_time_period_s - 16384 ) / 512 ); + if( 32768 <= lock_time_period_s && lock_time_period_s < 65536 ) return (352 + (lock_time_period_s - 32768 ) / 1024 ); + if( 65536 <= lock_time_period_s && lock_time_period_s < 131072 ) return (384 + (lock_time_period_s - 65536 ) / 2048 ); + if( 131072 <= lock_time_period_s && lock_time_period_s < 262144 ) return (416 + (lock_time_period_s - 131072 ) / 4096 ); + if( 262144 <= lock_time_period_s && lock_time_period_s < 524288 ) return (448 + (lock_time_period_s - 262144 ) / 8192 ); + if( 524288 <= lock_time_period_s && lock_time_period_s < 1048576 ) return (480 + (lock_time_period_s - 524288 ) / 16384 ); + if( 1048576 <= lock_time_period_s && lock_time_period_s < 2097152 ) return (512 + (lock_time_period_s - 1048576 ) / 32768 ); + if( 2097152 <= lock_time_period_s && lock_time_period_s < 4194304 ) return (544 + (lock_time_period_s - 2097152 ) / 65536 ); + if( 4194304 <= lock_time_period_s && lock_time_period_s < 8388608 ) return (576 + (lock_time_period_s - 4194304 ) / 131072 ); + if( 8388608 <= lock_time_period_s && lock_time_period_s < 16777216 ) return (608 + (lock_time_period_s - 8388608 ) / 262144 ); + if( 16777216 <= lock_time_period_s && lock_time_period_s < 33554432 ) return (640 + (lock_time_period_s - 16777216) / 524288 ); + if( 33554432 <= lock_time_period_s && lock_time_period_s < 67108864 ) return (672 + (lock_time_period_s - 33554432) / 1048576); + if( 67108864 <= lock_time_period_s ) return (704 ); + return 1023; // will never happen } - +// clang-format on // ***************************************************************************************************** // diff --git a/src/tests/common-files/gnuplot_i.h b/src/tests/common-files/gnuplot_i.h index 374256852..ef0f6cecb 100644 --- a/src/tests/common-files/gnuplot_i.h +++ b/src/tests/common-files/gnuplot_i.h @@ -2017,16 +2017,16 @@ bool Gnuplot::file_exists(const std::string &filename, int mode) return false; } - // int _access(const char *path, int mode); - // returns 0 if the file has the given mode, - // it returns -1 if the named file does not exist or is not accessible in - // the given mode - // mode = 0 (F_OK) (default): checks file for existence only - // mode = 1 (X_OK): execution permission - // mode = 2 (W_OK): write permission - // mode = 4 (R_OK): read permission - // mode = 6 : read and write permission - // mode = 7 : read, write and execution permission + // int _access(const char *path, int mode); + // returns 0 if the file has the given mode, + // it returns -1 if the named file does not exist or is not accessible in + // the given mode + // mode = 0 (F_OK) (default): checks file for existence only + // mode = 1 (X_OK): execution permission + // mode = 2 (W_OK): write permission + // mode = 4 (R_OK): read permission + // mode = 6 : read and write permission + // mode = 7 : read, write and execution permission #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__) if (_access(filename.c_str(), mode) == 0) #elif defined(unix) || defined(__unix) || defined(__unix__) || defined(__APPLE__) @@ -2088,19 +2088,19 @@ std::string Gnuplot::create_tmpfile(std::ofstream &tmp) throw GnuplotException(except.str()); } - // int mkstemp(char *name); - // shall replace the contents of the string pointed to by "name" by a unique - // filename, and return a file descriptor for the file open for reading and - // writing. Otherwise, -1 shall be returned if no suitable file could be - // created. The string in template should look like a filename with six - // trailing 'X' s; mkstemp() replaces each 'X' with a character from the - // portable filename character set. The characters are chosen such that the - // resulting name does not duplicate the name of an existing file at the - // time of a call to mkstemp() + // int mkstemp(char *name); + // shall replace the contents of the string pointed to by "name" by a unique + // filename, and return a file descriptor for the file open for reading and + // writing. Otherwise, -1 shall be returned if no suitable file could be + // created. The string in template should look like a filename with six + // trailing 'X' s; mkstemp() replaces each 'X' with a character from the + // portable filename character set. The characters are chosen such that the + // resulting name does not duplicate the name of an existing file at the + // time of a call to mkstemp() - // - // open temporary files for output - // + // + // open temporary files for output + // #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__) if (_mktemp(name) == NULL) #elif defined(unix) || defined(__unix) || defined(__unix__) || defined(__APPLE__) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc index 141598eb0..aba931623 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc @@ -251,7 +251,6 @@ TEST_F(GpsL1CaPcpsAcquisitionTest, ConnectAndRun) top_block->connect(source, 0, valve, 0); top_block->connect(valve, 0, acquisition->get_left_block(), 0); top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events")); - }) << "Failure connecting the blocks of acquisition test."; EXPECT_NO_THROW({ diff --git a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc index 3db41c863..af29edce9 100644 --- a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc @@ -566,7 +566,6 @@ TEST_F(HybridObservablesTest, ValidationOfResults) top_block->connect(observables->get_right_block(), 0, sink_ch0, 0); top_block->connect(observables->get_right_block(), 1, sink_ch1, 0); - }) << "Failure connecting the blocks."; tracking_ch0->start_tracking(); diff --git a/src/utils/gpstk/gnsspvt/src/kml_printer_gpstk.h b/src/utils/gpstk/gnsspvt/src/kml_printer_gpstk.h index f5d6dfeca..7d8e76cc4 100644 --- a/src/utils/gpstk/gnsspvt/src/kml_printer_gpstk.h +++ b/src/utils/gpstk/gnsspvt/src/kml_printer_gpstk.h @@ -32,7 +32,7 @@ #ifndef GNSS_SDR_KML_PRINTER_H_ -#define GNSS_SDR_KML_PRINTER_H_ +#define GNSS_SDR_KML_PRINTER_H_ #include #include @@ -48,6 +48,7 @@ class Kml_Printer_gpstk { private: std::ofstream kml_file; + public: bool set_headers(std::string filename); bool print_position(gpstk::Position position);