From e7a07ae2d4ab6e35c1286216ac72b139325c5afb Mon Sep 17 00:00:00 2001 From: Rainer Zaiser Date: Tue, 12 Nov 2024 23:12:55 +0100 Subject: [PATCH] Unified XCPlite and xcp-lite record layout names --- CPP_Demo/CPP_Demo.a2l | 96 +++++++++++++++--------------- CPP_Demo/C_Demo.a2l | 133 ------------------------------------------ CPP_Demo/main_cfg.h | 4 +- C_Demo/C_Demo.a2l | 104 ++++++++++++++++----------------- C_Demo/main.c | 3 - XCPlite/XCPlite.a2l | 71 +++++++++++----------- XCPlite/main.c | 3 - src/A2L.c | 132 +++++++++++++++++++++++------------------ 8 files changed, 212 insertions(+), 334 deletions(-) delete mode 100644 CPP_Demo/C_Demo.a2l diff --git a/CPP_Demo/CPP_Demo.a2l b/CPP_Demo/CPP_Demo.a2l index 404bae9..a1b492c 100644 --- a/CPP_Demo/CPP_Demo.a2l +++ b/CPP_Demo/CPP_Demo.a2l @@ -15,50 +15,50 @@ ALIGNMENT_FLOAT64_IEEE 1 ALIGNMENT_INT64 1 /end MOD_COMMON -/begin RECORD_LAYOUT R_FLOAT64_IEEE FNC_VALUES 1 FLOAT64_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_FLOAT64_IEEE "" FLOAT64_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_FLOAT64_IEEE "" VALUE R_FLOAT64_IEEE 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_FLOAT32_IEEE FNC_VALUES 1 FLOAT32_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_FLOAT32_IEEE "" FLOAT32_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_FLOAT32_IEEE "" VALUE R_FLOAT32_IEEE 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_A_INT64 FNC_VALUES 1 A_INT64 ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_A_INT64 "" A_INT64 NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_A_INT64 "" VALUE R_A_INT64 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_SLONG FNC_VALUES 1 SLONG ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_SLONG "" SLONG NO_COMPU_METHOD 0 0 -2147483648 2147483647 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_SLONG "" VALUE R_SLONG 0 NO_COMPU_METHOD -2147483648 2147483647 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_SWORD FNC_VALUES 1 SWORD ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_SWORD "" SWORD NO_COMPU_METHOD 0 0 -32768 32767 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_SWORD "" VALUE R_SWORD 0 NO_COMPU_METHOD -32768 32767 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_SBYTE FNC_VALUES 1 SBYTE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_SBYTE "" SBYTE NO_COMPU_METHOD 0 0 -128 127 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_SBYTE "" VALUE R_SBYTE 0 NO_COMPU_METHOD -128 127 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_UBYTE FNC_VALUES 1 UBYTE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_UBYTE "" UBYTE NO_COMPU_METHOD 0 0 0 255 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_UBYTE "" VALUE R_UBYTE 0 NO_COMPU_METHOD 0 255 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_UWORD FNC_VALUES 1 UWORD ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_UWORD "" UWORD NO_COMPU_METHOD 0 0 0 65535 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_UWORD "" VALUE R_UWORD 0 NO_COMPU_METHOD 0 65535 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_ULONG FNC_VALUES 1 ULONG ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_ULONG "" ULONG NO_COMPU_METHOD 0 0 0 4294967295 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_ULONG "" VALUE R_ULONG 0 NO_COMPU_METHOD 0 4294967295 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_A_UINT64 FNC_VALUES 1 A_UINT64 ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_A_UINT64 "" A_UINT64 NO_COMPU_METHOD 0 0 0 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_A_UINT64 "" VALUE R_A_UINT64 0 NO_COMPU_METHOD 0 1E12 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT F64 FNC_VALUES 1 FLOAT64_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_F64 "" FLOAT64_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_F64 "" VALUE F64 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT F32 FNC_VALUES 1 FLOAT32_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_F32 "" FLOAT32_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_F32 "" VALUE F32 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT S64 FNC_VALUES 1 A_INT64 ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_S64 "" A_INT64 NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_S64 "" VALUE S64 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT S32 FNC_VALUES 1 SLONG ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_S32 "" SLONG NO_COMPU_METHOD 0 0 -2147483648 2147483647 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_S32 "" VALUE S32 0 NO_COMPU_METHOD -2147483648 2147483647 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT S16 FNC_VALUES 1 SWORD ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_S16 "" SWORD NO_COMPU_METHOD 0 0 -32768 32767 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_S16 "" VALUE S16 0 NO_COMPU_METHOD -32768 32767 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT S8 FNC_VALUES 1 SBYTE ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_S8 "" SBYTE NO_COMPU_METHOD 0 0 -128 127 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_S8 "" VALUE S8 0 NO_COMPU_METHOD -128 127 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT U8 FNC_VALUES 1 UBYTE ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_U8 "" UBYTE NO_COMPU_METHOD 0 0 0 255 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_U8 "" VALUE U8 0 NO_COMPU_METHOD 0 255 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT U16 FNC_VALUES 1 UWORD ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_U16 "" UWORD NO_COMPU_METHOD 0 0 0 65535 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_U16 "" VALUE U16 0 NO_COMPU_METHOD 0 65535 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT U32 FNC_VALUES 1 ULONG ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_U32 "" ULONG NO_COMPU_METHOD 0 0 0 4294967295 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_U32 "" VALUE U32 0 NO_COMPU_METHOD 0 4294967295 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT U64 FNC_VALUES 1 A_UINT64 ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_U64 "" A_UINT64 NO_COMPU_METHOD 0 0 0 1E12 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_U64 "" VALUE U64 0 NO_COMPU_METHOD 0 1E12 /end TYPEDEF_CHARACTERISTIC -/begin TYPEDEF_STRUCTURE gSignalParameters "This is the global signal parameters structure type" 0x18 SYMBOL_TYPE_LINK "gSignalParameters" - /begin STRUCTURE_COMPONENT ampl C_FLOAT64_IEEE 0x0 SYMBOL_TYPE_LINK "ampl" /end STRUCTURE_COMPONENT - /begin STRUCTURE_COMPONENT offset C_FLOAT64_IEEE 0x8 SYMBOL_TYPE_LINK "offset" /end STRUCTURE_COMPONENT - /begin STRUCTURE_COMPONENT phase C_FLOAT64_IEEE 0x10 SYMBOL_TYPE_LINK "phase" /end STRUCTURE_COMPONENT +/begin TYPEDEF_STRUCTURE sSignalParameters "This is the global signal parameters structure type" 0x18 SYMBOL_TYPE_LINK "sSignalParameters" + /begin STRUCTURE_COMPONENT ampl C_F64 0x0 SYMBOL_TYPE_LINK "ampl" /end STRUCTURE_COMPONENT + /begin STRUCTURE_COMPONENT offset C_F64 0x8 SYMBOL_TYPE_LINK "offset" /end STRUCTURE_COMPONENT + /begin STRUCTURE_COMPONENT phase C_F64 0x10 SYMBOL_TYPE_LINK "phase" /end STRUCTURE_COMPONENT /end TYPEDEF_STRUCTURE -/begin INSTANCE gSignalParameters "This is the global signal parameters structure instance" sSignalParameters 0x2F58000 /end INSTANCE -/begin CHARACTERISTIC gPeriod "Period of sinus signal in s" VALUE 0x2F58018 R_FLOAT64_IEEE 0 NO_COMPU_METHOD 0 10 PHYS_UNIT "s" SYMBOL_LINK "gPeriod" 0 /end CHARACTERISTIC -/begin CHARACTERISTIC gCycleTime "Cycle time of demo event loop in us" VALUE 0x2F58020 R_SLONG 0 NO_COMPU_METHOD 0 1e+06 PHYS_UNIT "us" SYMBOL_LINK "gCycleTime" 0 /end CHARACTERISTIC -/begin CHARACTERISTIC gDebugLevel "Console output verbosity level" VALUE 0x2F58024 R_SBYTE 0 NO_COMPU_METHOD -128 127 SYMBOL_LINK "gDebugLevel" 0 /end CHARACTERISTIC +/begin INSTANCE gSignalParameters "This is the global signal parameters structure instance" sSignalParameters 0x2FF4000 /end INSTANCE +/begin CHARACTERISTIC gPeriod "Period of sinus signal in s" VALUE 0x2FF4018 F64 0 NO_COMPU_METHOD 0 10 PHYS_UNIT "s" SYMBOL_LINK "gPeriod" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC gCycleTime "Cycle time of demo event loop in us" VALUE 0x2FF4020 S32 0 NO_COMPU_METHOD 0 1e+06 PHYS_UNIT "us" SYMBOL_LINK "gCycleTime" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC gDebugLevel "Console output verbosity level" VALUE 0x2FF4024 S8 0 NO_COMPU_METHOD -128 127 SYMBOL_LINK "gDebugLevel" 0 /end CHARACTERISTIC /begin COMPU_METHOD gChannel1.Conversion "" LINEAR "%6.3" "V" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT gChannel1 "Sinus signal as double with physical conversion rule" FLOAT64_IEEE gChannel1.Conversion 0 0 -1000000000000.0000 1000000000000.00000 ECU_ADDRESS 0x2F58038 PHYS_UNIT "V" READ_WRITE SYMBOL_LINK "gChannel1" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin MEASUREMENT gChannel1 "Sinus signal as double with physical conversion rule" FLOAT64_IEEE gChannel1.Conversion 0 0 -1000000000000.0000 1000000000000.00000 ECU_ADDRESS 0x2FF4038 PHYS_UNIT "V" READ_WRITE SYMBOL_LINK "gChannel1" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT /begin COMPU_METHOD gCounter.Conversion "" LINEAR "%6.3" "" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT gCounter "Event counter as uint32" SWORD gCounter.Conversion 0 0 -32768.000000 32767.000000 ECU_ADDRESS 0x2F58040 READ_WRITE SYMBOL_LINK "gCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin MEASUREMENT gCounter "Event counter as uint32" SWORD gCounter.Conversion 0 0 -32768.000000 32767.000000 ECU_ADDRESS 0x2FF4040 READ_WRITE SYMBOL_LINK "gCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT /begin INSTANCE SigGen1 "" SigGen 0x10000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x1 /end DAQ_EVENT /end IF_DATA /end INSTANCE /begin INSTANCE SigGen2 "" SigGen 0x20000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x2 /end DAQ_EVENT /end IF_DATA /end INSTANCE /begin INSTANCE SigGen3 "" SigGen 0x30000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x3 /end DAQ_EVENT /end IF_DATA /end INSTANCE @@ -70,16 +70,16 @@ ALIGNMENT_INT64 1 /begin INSTANCE SigGen9 "" SigGen 0x90000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x9 /end DAQ_EVENT /end IF_DATA /end INSTANCE /begin INSTANCE SigGen10 "" SigGen 0xA0000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0xA /end DAQ_EVENT /end IF_DATA /end INSTANCE /begin TYPEDEF_STRUCTURE SigGen "" 0x48 SYMBOL_TYPE_LINK "SigGen" - /begin STRUCTURE_COMPONENT xcpInstanceId M_SWORD 0x14 SYMBOL_TYPE_LINK "xcpInstanceId" /end STRUCTURE_COMPONENT - /begin STRUCTURE_COMPONENT value M_FLOAT64_IEEE 0x38 SYMBOL_TYPE_LINK "value" /end STRUCTURE_COMPONENT - /begin STRUCTURE_COMPONENT par_ampl C_FLOAT64_IEEE 0x20 SYMBOL_TYPE_LINK "par_ampl" /end STRUCTURE_COMPONENT - /begin STRUCTURE_COMPONENT par_phase C_FLOAT64_IEEE 0x28 SYMBOL_TYPE_LINK "par_phase" /end STRUCTURE_COMPONENT - /begin STRUCTURE_COMPONENT par_offset C_FLOAT64_IEEE 0x30 SYMBOL_TYPE_LINK "par_offset" /end STRUCTURE_COMPONENT + /begin STRUCTURE_COMPONENT xcpInstanceId M_S16 0x14 SYMBOL_TYPE_LINK "xcpInstanceId" /end STRUCTURE_COMPONENT + /begin STRUCTURE_COMPONENT value M_F64 0x38 SYMBOL_TYPE_LINK "value" /end STRUCTURE_COMPONENT + /begin STRUCTURE_COMPONENT par_ampl C_F64 0x20 SYMBOL_TYPE_LINK "par_ampl" /end STRUCTURE_COMPONENT + /begin STRUCTURE_COMPONENT par_phase C_F64 0x28 SYMBOL_TYPE_LINK "par_phase" /end STRUCTURE_COMPONENT + /begin STRUCTURE_COMPONENT par_offset C_F64 0x30 SYMBOL_TYPE_LINK "par_offset" /end STRUCTURE_COMPONENT /end TYPEDEF_STRUCTURE /begin IF_DATA XCP /begin PROTOCOL_LAYER - 0x0103 1000 2000 0 0 0 0 0 248 1468 BYTE_ORDER_MSB_LAST ADDRESS_GRANULARITY_BYTE + 0x0104 1000 2000 0 0 0 0 0 248 1468 BYTE_ORDER_MSB_LAST ADDRESS_GRANULARITY_BYTE OPTIONAL_CMD GET_COMM_MODE_INFO OPTIONAL_CMD GET_ID OPTIONAL_CMD SET_MTA @@ -87,9 +87,6 @@ OPTIONAL_CMD UPLOAD OPTIONAL_CMD SHORT_UPLOAD OPTIONAL_CMD DOWNLOAD OPTIONAL_CMD SHORT_DOWNLOAD -OPTIONAL_CMD GET_CAL_PAGE -OPTIONAL_CMD SET_CAL_PAGE -OPTIONAL_CMD BUILD_CHECKSUM OPTIONAL_CMD GET_DAQ_RESOLUTION_INFO OPTIONAL_CMD GET_DAQ_PROCESSOR_INFO OPTIONAL_CMD FREE_DAQ @@ -105,6 +102,7 @@ OPTIONAL_CMD START_STOP_DAQ_LIST OPTIONAL_CMD GET_DAQ_CLOCK OPTIONAL_CMD WRITE_DAQ_MULTIPLE OPTIONAL_CMD TIME_CORRELATION_PROPERTIES +OPTIONAL_LEVEL1_CMD GET_VERSION /end PROTOCOL_LAYER /begin DAQ DYNAMIC 0 11 0 OPTIMISATION_TYPE_DEFAULT ADDRESS_EXTENSION_FREE IDENTIFICATION_FIELD_TYPE_RELATIVE_BYTE GRANULARITY_ODT_ENTRY_SIZE_DAQ_BYTE 0xF8 OVERLOAD_INDICATION_PID diff --git a/CPP_Demo/C_Demo.a2l b/CPP_Demo/C_Demo.a2l deleted file mode 100644 index bd65606..0000000 --- a/CPP_Demo/C_Demo.a2l +++ /dev/null @@ -1,133 +0,0 @@ -ASAP2_VERSION 1 71 -/begin PROJECT CPP_DEMO "" -/begin HEADER "" VERSION "1.0" /end HEADER -/begin MODULE CPP_DEMO "" -/include "XCP_104.aml" - -/begin MOD_COMMON "" -BYTE_ORDER MSB_LAST -ALIGNMENT_BYTE 1 -ALIGNMENT_WORD 1 -ALIGNMENT_LONG 1 -ALIGNMENT_FLOAT16_IEEE 1 -ALIGNMENT_FLOAT32_IEEE 1 -ALIGNMENT_FLOAT64_IEEE 1 -ALIGNMENT_INT64 1 -/end MOD_COMMON - -/begin RECORD_LAYOUT R_FLOAT64_IEEE FNC_VALUES 1 FLOAT64_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_FLOAT64_IEEE "" FLOAT64_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_FLOAT64_IEEE "" VALUE R_FLOAT64_IEEE 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_FLOAT32_IEEE FNC_VALUES 1 FLOAT32_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_FLOAT32_IEEE "" FLOAT32_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_FLOAT32_IEEE "" VALUE R_FLOAT32_IEEE 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_A_INT64 FNC_VALUES 1 A_INT64 ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_A_INT64 "" A_INT64 NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_A_INT64 "" VALUE R_A_INT64 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_SLONG FNC_VALUES 1 SLONG ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_SLONG "" SLONG NO_COMPU_METHOD 0 0 -2147483648 2147483647 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_SLONG "" VALUE R_SLONG 0 NO_COMPU_METHOD -2147483648 2147483647 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_SWORD FNC_VALUES 1 SWORD ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_SWORD "" SWORD NO_COMPU_METHOD 0 0 -32768 32767 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_SWORD "" VALUE R_SWORD 0 NO_COMPU_METHOD -32768 32767 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_SBYTE FNC_VALUES 1 SBYTE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_SBYTE "" SBYTE NO_COMPU_METHOD 0 0 -128 127 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_SBYTE "" VALUE R_SBYTE 0 NO_COMPU_METHOD -128 127 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_UBYTE FNC_VALUES 1 UBYTE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_UBYTE "" UBYTE NO_COMPU_METHOD 0 0 0 255 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_UBYTE "" VALUE R_UBYTE 0 NO_COMPU_METHOD 0 255 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_UWORD FNC_VALUES 1 UWORD ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_UWORD "" UWORD NO_COMPU_METHOD 0 0 0 65535 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_UWORD "" VALUE R_UWORD 0 NO_COMPU_METHOD 0 65535 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_ULONG FNC_VALUES 1 ULONG ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_ULONG "" ULONG NO_COMPU_METHOD 0 0 0 4294967295 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_ULONG "" VALUE R_ULONG 0 NO_COMPU_METHOD 0 4294967295 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_A_UINT64 FNC_VALUES 1 A_UINT64 ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_A_UINT64 "" A_UINT64 NO_COMPU_METHOD 0 0 0 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_A_UINT64 "" VALUE R_A_UINT64 0 NO_COMPU_METHOD 0 1E12 /end TYPEDEF_CHARACTERISTIC - -/begin TYPEDEF_STRUCTURE sSignalParameters "This is the global signal parameters structure type" 0x18 SYMBOL_TYPE_LINK "sSignalParameters" - /begin STRUCTURE_COMPONENT ampl C_FLOAT64_IEEE 0x0 SYMBOL_TYPE_LINK "ampl" /end STRUCTURE_COMPONENT - /begin STRUCTURE_COMPONENT offset C_FLOAT64_IEEE 0x8 SYMBOL_TYPE_LINK "offset" /end STRUCTURE_COMPONENT - /begin STRUCTURE_COMPONENT phase C_FLOAT64_IEEE 0x10 SYMBOL_TYPE_LINK "phase" /end STRUCTURE_COMPONENT -/end TYPEDEF_STRUCTURE -/begin INSTANCE gSignalParameters "This is the global signal parameters structure instance" sSignalParameters 0x4CA4000 /end INSTANCE -/begin CHARACTERISTIC gPeriod "Period of sinus signal in s" VALUE 0x4CA4018 R_FLOAT64_IEEE 0 NO_COMPU_METHOD 0 10 PHYS_UNIT "s" SYMBOL_LINK "gPeriod" 0 /end CHARACTERISTIC -/begin CHARACTERISTIC gCycleTime "Cycle time of demo event loop in us" VALUE 0x4CA4020 R_SLONG 0 NO_COMPU_METHOD 0 1e+06 PHYS_UNIT "us" SYMBOL_LINK "gCycleTime" 0 /end CHARACTERISTIC -/begin CHARACTERISTIC gDebugLevel "Console output verbosity level" VALUE 0x4CA4024 R_SBYTE 0 NO_COMPU_METHOD -128 127 SYMBOL_LINK "gDebugLevel" 0 /end CHARACTERISTIC -/begin COMPU_METHOD gChannel1.Conversion "" LINEAR "%6.3" "V" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT gChannel1 "Sinus signal as double with physical conversion rule" FLOAT64_IEEE gChannel1.Conversion 0 0 -1000000000000.0000 1000000000000.00000 ECU_ADDRESS 0x4CA4038 PHYS_UNIT "V" READ_WRITE SYMBOL_LINK "gChannel1" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT -/begin COMPU_METHOD gCounter.Conversion "" LINEAR "%6.3" "" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT gCounter "Event counter as uint32" SWORD gCounter.Conversion 0 0 -32768.000000 32767.000000 ECU_ADDRESS 0x4CA4040 READ_WRITE SYMBOL_LINK "gCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT -/begin INSTANCE SigGen1 "" SigGen 0x10000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x1 /end DAQ_EVENT /end IF_DATA /end INSTANCE -/begin INSTANCE SigGen2 "" SigGen 0x20000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x2 /end DAQ_EVENT /end IF_DATA /end INSTANCE -/begin INSTANCE SigGen3 "" SigGen 0x30000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x3 /end DAQ_EVENT /end IF_DATA /end INSTANCE -/begin INSTANCE SigGen4 "" SigGen 0x40000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x4 /end DAQ_EVENT /end IF_DATA /end INSTANCE -/begin INSTANCE SigGen5 "" SigGen 0x50000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x5 /end DAQ_EVENT /end IF_DATA /end INSTANCE -/begin INSTANCE SigGen6 "" SigGen 0x60000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x6 /end DAQ_EVENT /end IF_DATA /end INSTANCE -/begin INSTANCE SigGen7 "" SigGen 0x70000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x7 /end DAQ_EVENT /end IF_DATA /end INSTANCE -/begin INSTANCE SigGen8 "" SigGen 0x80000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x8 /end DAQ_EVENT /end IF_DATA /end INSTANCE -/begin INSTANCE SigGen9 "" SigGen 0x90000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x9 /end DAQ_EVENT /end IF_DATA /end INSTANCE -/begin INSTANCE SigGen10 "" SigGen 0xA0000 ECU_ADDRESS_EXTENSION 1 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0xA /end DAQ_EVENT /end IF_DATA /end INSTANCE -/begin TYPEDEF_STRUCTURE SigGen "" 0x48 SYMBOL_TYPE_LINK "SigGen" - /begin STRUCTURE_COMPONENT xcpInstanceId M_SWORD 0x14 SYMBOL_TYPE_LINK "xcpInstanceId" /end STRUCTURE_COMPONENT - /begin STRUCTURE_COMPONENT value M_FLOAT64_IEEE 0x38 SYMBOL_TYPE_LINK "value" /end STRUCTURE_COMPONENT - /begin STRUCTURE_COMPONENT par_ampl C_FLOAT64_IEEE 0x20 SYMBOL_TYPE_LINK "par_ampl" /end STRUCTURE_COMPONENT - /begin STRUCTURE_COMPONENT par_phase C_FLOAT64_IEEE 0x28 SYMBOL_TYPE_LINK "par_phase" /end STRUCTURE_COMPONENT - /begin STRUCTURE_COMPONENT par_offset C_FLOAT64_IEEE 0x30 SYMBOL_TYPE_LINK "par_offset" /end STRUCTURE_COMPONENT -/end TYPEDEF_STRUCTURE - -/begin IF_DATA XCP -/begin PROTOCOL_LAYER - 0x0104 1000 2000 0 0 0 0 0 248 1468 BYTE_ORDER_MSB_LAST ADDRESS_GRANULARITY_BYTE -OPTIONAL_CMD GET_COMM_MODE_INFO -OPTIONAL_CMD GET_ID -OPTIONAL_CMD SET_MTA -OPTIONAL_CMD UPLOAD -OPTIONAL_CMD SHORT_UPLOAD -OPTIONAL_CMD DOWNLOAD -OPTIONAL_CMD SHORT_DOWNLOAD -OPTIONAL_CMD GET_CAL_PAGE -OPTIONAL_CMD SET_CAL_PAGE -OPTIONAL_CMD BUILD_CHECKSUM -OPTIONAL_CMD GET_DAQ_RESOLUTION_INFO -OPTIONAL_CMD GET_DAQ_PROCESSOR_INFO -OPTIONAL_CMD FREE_DAQ -OPTIONAL_CMD ALLOC_DAQ -OPTIONAL_CMD ALLOC_ODT -OPTIONAL_CMD ALLOC_ODT_ENTRY -OPTIONAL_CMD SET_DAQ_PTR -OPTIONAL_CMD WRITE_DAQ -OPTIONAL_CMD GET_DAQ_LIST_MODE -OPTIONAL_CMD SET_DAQ_LIST_MODE -OPTIONAL_CMD START_STOP_SYNCH -OPTIONAL_CMD START_STOP_DAQ_LIST -OPTIONAL_CMD GET_DAQ_CLOCK -OPTIONAL_CMD WRITE_DAQ_MULTIPLE -OPTIONAL_CMD TIME_CORRELATION_PROPERTIES -OPTIONAL_LEVEL1_CMD GET_VERSION -/end PROTOCOL_LAYER -/begin DAQ -DYNAMIC 0 11 0 OPTIMISATION_TYPE_DEFAULT ADDRESS_EXTENSION_FREE IDENTIFICATION_FIELD_TYPE_RELATIVE_BYTE GRANULARITY_ODT_ENTRY_SIZE_DAQ_BYTE 0xF8 OVERLOAD_INDICATION_PID -/begin TIMESTAMP_SUPPORTED -0x01 SIZE_DWORD UNIT_1NS TIMESTAMP_FIXED -/end TIMESTAMP_SUPPORTED -/begin EVENT "mainLoop" "mainLoop" 0x0 DAQ 0xFF 0 0 0 CONSISTENCY EVENT /end EVENT -/begin EVENT "SigGen1" "SigGen1" 0x1 DAQ 0xFF 0 0 0 CONSISTENCY EVENT /end EVENT -/begin EVENT "SigGen2" "SigGen2" 0x2 DAQ 0xFF 0 0 0 CONSISTENCY EVENT /end EVENT -/begin EVENT "SigGen3" "SigGen3" 0x3 DAQ 0xFF 0 0 0 CONSISTENCY EVENT /end EVENT -/begin EVENT "SigGen4" "SigGen4" 0x4 DAQ 0xFF 0 0 0 CONSISTENCY EVENT /end EVENT -/begin EVENT "SigGen5" "SigGen5" 0x5 DAQ 0xFF 0 0 0 CONSISTENCY EVENT /end EVENT -/begin EVENT "SigGen6" "SigGen6" 0x6 DAQ 0xFF 0 0 0 CONSISTENCY EVENT /end EVENT -/begin EVENT "SigGen7" "SigGen7" 0x7 DAQ 0xFF 0 0 0 CONSISTENCY EVENT /end EVENT -/begin EVENT "SigGen8" "SigGen8" 0x8 DAQ 0xFF 0 0 0 CONSISTENCY EVENT /end EVENT -/begin EVENT "SigGen9" "SigGen9" 0x9 DAQ 0xFF 0 0 0 CONSISTENCY EVENT /end EVENT -/begin EVENT "SigGen10" "SigGen10" 0xA DAQ 0xFF 0 0 0 CONSISTENCY EVENT /end EVENT -/end DAQ -/begin XCP_ON_UDP_IP - 0x0104 5555 ADDRESS "127.0.0.1" -/end XCP_ON_UDP_IP -/end IF_DATA - -/end MODULE -/end PROJECT diff --git a/CPP_Demo/main_cfg.h b/CPP_Demo/main_cfg.h index a9e5b8b..7435e65 100644 --- a/CPP_Demo/main_cfg.h +++ b/CPP_Demo/main_cfg.h @@ -71,8 +71,8 @@ #define OPTION_ENABLE_A2L_GEN // Enable A2L generation #define OPTION_ENABLE_A2L_UPLOAD #ifdef OPTION_ENABLE_A2L_GEN - #define OPTION_A2L_NAME "C_Demo" // A2L name - #define OPTION_A2L_FILE_NAME "C_Demo.a2l" // A2L filename + #define OPTION_A2L_NAME "CPP_Demo" // A2L name + #define OPTION_A2L_FILE_NAME "CPP_Demo.a2l" // A2L filename #endif // Debug prints diff --git a/C_Demo/C_Demo.a2l b/C_Demo/C_Demo.a2l index ac58bd5..acbeade 100644 --- a/C_Demo/C_Demo.a2l +++ b/C_Demo/C_Demo.a2l @@ -15,42 +15,42 @@ ALIGNMENT_FLOAT64_IEEE 1 ALIGNMENT_INT64 1 /end MOD_COMMON -/begin RECORD_LAYOUT R_FLOAT64_IEEE FNC_VALUES 1 FLOAT64_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_FLOAT64_IEEE "" FLOAT64_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_FLOAT64_IEEE "" VALUE R_FLOAT64_IEEE 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_FLOAT32_IEEE FNC_VALUES 1 FLOAT32_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_FLOAT32_IEEE "" FLOAT32_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_FLOAT32_IEEE "" VALUE R_FLOAT32_IEEE 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_A_INT64 FNC_VALUES 1 A_INT64 ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_A_INT64 "" A_INT64 NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_A_INT64 "" VALUE R_A_INT64 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_SLONG FNC_VALUES 1 SLONG ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_SLONG "" SLONG NO_COMPU_METHOD 0 0 -2147483648 2147483647 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_SLONG "" VALUE R_SLONG 0 NO_COMPU_METHOD -2147483648 2147483647 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_SWORD FNC_VALUES 1 SWORD ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_SWORD "" SWORD NO_COMPU_METHOD 0 0 -32768 32767 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_SWORD "" VALUE R_SWORD 0 NO_COMPU_METHOD -32768 32767 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_SBYTE FNC_VALUES 1 SBYTE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_SBYTE "" SBYTE NO_COMPU_METHOD 0 0 -128 127 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_SBYTE "" VALUE R_SBYTE 0 NO_COMPU_METHOD -128 127 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_UBYTE FNC_VALUES 1 UBYTE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_UBYTE "" UBYTE NO_COMPU_METHOD 0 0 0 255 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_UBYTE "" VALUE R_UBYTE 0 NO_COMPU_METHOD 0 255 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_UWORD FNC_VALUES 1 UWORD ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_UWORD "" UWORD NO_COMPU_METHOD 0 0 0 65535 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_UWORD "" VALUE R_UWORD 0 NO_COMPU_METHOD 0 65535 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_ULONG FNC_VALUES 1 ULONG ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_ULONG "" ULONG NO_COMPU_METHOD 0 0 0 4294967295 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_ULONG "" VALUE R_ULONG 0 NO_COMPU_METHOD 0 4294967295 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_A_UINT64 FNC_VALUES 1 A_UINT64 ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_A_UINT64 "" A_UINT64 NO_COMPU_METHOD 0 0 0 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_A_UINT64 "" VALUE R_A_UINT64 0 NO_COMPU_METHOD 0 1E12 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT F64 FNC_VALUES 1 FLOAT64_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_F64 "" FLOAT64_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_F64 "" VALUE F64 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT F32 FNC_VALUES 1 FLOAT32_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_F32 "" FLOAT32_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_F32 "" VALUE F32 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT S64 FNC_VALUES 1 A_INT64 ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_S64 "" A_INT64 NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_S64 "" VALUE S64 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT S32 FNC_VALUES 1 SLONG ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_S32 "" SLONG NO_COMPU_METHOD 0 0 -2147483648 2147483647 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_S32 "" VALUE S32 0 NO_COMPU_METHOD -2147483648 2147483647 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT S16 FNC_VALUES 1 SWORD ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_S16 "" SWORD NO_COMPU_METHOD 0 0 -32768 32767 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_S16 "" VALUE S16 0 NO_COMPU_METHOD -32768 32767 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT S8 FNC_VALUES 1 SBYTE ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_S8 "" SBYTE NO_COMPU_METHOD 0 0 -128 127 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_S8 "" VALUE S8 0 NO_COMPU_METHOD -128 127 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT U8 FNC_VALUES 1 UBYTE ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_U8 "" UBYTE NO_COMPU_METHOD 0 0 0 255 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_U8 "" VALUE U8 0 NO_COMPU_METHOD 0 255 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT U16 FNC_VALUES 1 UWORD ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_U16 "" UWORD NO_COMPU_METHOD 0 0 0 65535 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_U16 "" VALUE U16 0 NO_COMPU_METHOD 0 65535 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT U32 FNC_VALUES 1 ULONG ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_U32 "" ULONG NO_COMPU_METHOD 0 0 0 4294967295 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_U32 "" VALUE U32 0 NO_COMPU_METHOD 0 4294967295 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT U64 FNC_VALUES 1 A_UINT64 ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_U64 "" A_UINT64 NO_COMPU_METHOD 0 0 0 1E12 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_U64 "" VALUE U64 0 NO_COMPU_METHOD 0 1E12 /end TYPEDEF_CHARACTERISTIC /begin MOD_PAR "" -EPK "Nov 11 2024 20:49:06" -ADDR_EPK 0x00D1FB50 +EPK "Nov 12 2024 23:10:48" +ADDR_EPK 0x008EBB50 /begin MEMORY_SEGMENT -CALRAM "" DATA FLASH INTERN 0x00D1FB50 0x000000A8 -1 -1 -1 -1 -1 +CALRAM "" DATA FLASH INTERN 0x008EBB50 0x000000A8 -1 -1 -1 -1 -1 /begin IF_DATA XCP /begin SEGMENT 0x01 0x02 0x00 0x00 0x00 /begin CHECKSUM XCP_ADD_44 MAX_BLOCK_SIZE 0xFFFF EXTERNAL_FUNCTION "" /end CHECKSUM @@ -61,44 +61,44 @@ CALRAM "" DATA FLASH INTERN 0x00D1FB50 0x000000A8 -1 -1 -1 -1 -1 /end MEMORY_SEGMENT /end MOD_PAR -/begin CHARACTERISTIC ecuPar.ampl "Amplitude" VALUE 0xD1FB90 R_FLOAT64_IEEE 0 NO_COMPU_METHOD 0 800 PHYS_UNIT "V" SYMBOL_LINK "ecuPar.ampl" 0 /end CHARACTERISTIC -/begin CHARACTERISTIC ecuPar.offset "RefOffset" VALUE 0xD1FB80 R_FLOAT64_IEEE 0 NO_COMPU_METHOD -200 200 PHYS_UNIT "V" SYMBOL_LINK "ecuPar.offset" 0 /end CHARACTERISTIC -/begin CHARACTERISTIC ecuPar.phase "Phase" VALUE 0xD1FB88 R_FLOAT64_IEEE 0 NO_COMPU_METHOD 0 6.28319 SYMBOL_LINK "ecuPar.phase" 0 /end CHARACTERISTIC -/begin CHARACTERISTIC ecuPar.period "Period in s" VALUE 0xD1FB78 R_FLOAT64_IEEE 0 NO_COMPU_METHOD 0 10 PHYS_UNIT "s" SYMBOL_LINK "ecuPar.period" 0 /end CHARACTERISTIC -/begin CHARACTERISTIC ecuPar.cycleTimeUs "ECU task cycle time in us" VALUE 0xD1FB70 R_ULONG 0 NO_COMPU_METHOD 50 1e+06 PHYS_UNIT "us" SYMBOL_LINK "ecuPar.cycleTimeUs" 0 /end CHARACTERISTIC -/begin CHARACTERISTIC ecuPar.map1_8_8 "8*8 byte calibration array" MAP 0xD1FB98 R_UBYTE 0 NO_COMPU_METHOD 0 255 /begin AXIS_DESCR FIX_AXIS NO_INPUT_QUANTITY NO_COMPU_METHOD 8 0 7 FIX_AXIS_PAR_DIST 0 1 8 /end AXIS_DESCR /begin AXIS_DESCR FIX_AXIS NO_INPUT_QUANTITY NO_COMPU_METHOD 8 0 7 FIX_AXIS_PAR_DIST 0 1 8 /end AXIS_DESCR SYMBOL_LINK "ecuPar.map1_8_8" 0 /end CHARACTERISTIC -/begin CHARACTERISTIC ecuPar.curve1_32 "32 byte calibration array" CURVE 0xD1FBD8 R_UBYTE 0 NO_COMPU_METHOD 0 255 /begin AXIS_DESCR FIX_AXIS NO_INPUT_QUANTITY NO_COMPU_METHOD 32 0 31 FIX_AXIS_PAR_DIST 0 1 32 /end AXIS_DESCR SYMBOL_LINK "ecuPar.curve1_32" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC ecuPar.ampl "Amplitude" VALUE 0x8EBB90 F64 0 NO_COMPU_METHOD 0 800 PHYS_UNIT "V" SYMBOL_LINK "ecuPar.ampl" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC ecuPar.offset "RefOffset" VALUE 0x8EBB80 F64 0 NO_COMPU_METHOD -200 200 PHYS_UNIT "V" SYMBOL_LINK "ecuPar.offset" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC ecuPar.phase "Phase" VALUE 0x8EBB88 F64 0 NO_COMPU_METHOD 0 6.28319 SYMBOL_LINK "ecuPar.phase" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC ecuPar.period "Period in s" VALUE 0x8EBB78 F64 0 NO_COMPU_METHOD 0 10 PHYS_UNIT "s" SYMBOL_LINK "ecuPar.period" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC ecuPar.cycleTimeUs "ECU task cycle time in us" VALUE 0x8EBB70 U32 0 NO_COMPU_METHOD 50 1e+06 PHYS_UNIT "us" SYMBOL_LINK "ecuPar.cycleTimeUs" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC ecuPar.map1_8_8 "8*8 byte calibration array" MAP 0x8EBB98 U8 0 NO_COMPU_METHOD 0 255 /begin AXIS_DESCR FIX_AXIS NO_INPUT_QUANTITY NO_COMPU_METHOD 8 0 7 FIX_AXIS_PAR_DIST 0 1 8 /end AXIS_DESCR /begin AXIS_DESCR FIX_AXIS NO_INPUT_QUANTITY NO_COMPU_METHOD 8 0 7 FIX_AXIS_PAR_DIST 0 1 8 /end AXIS_DESCR SYMBOL_LINK "ecuPar.map1_8_8" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC ecuPar.curve1_32 "32 byte calibration array" CURVE 0x8EBBD8 U8 0 NO_COMPU_METHOD 0 255 /begin AXIS_DESCR FIX_AXIS NO_INPUT_QUANTITY NO_COMPU_METHOD 32 0 31 FIX_AXIS_PAR_DIST 0 1 32 /end AXIS_DESCR SYMBOL_LINK "ecuPar.curve1_32" 0 /end CHARACTERISTIC /begin GROUP Parameters "" ROOT /begin REF_CHARACTERISTIC ecuPar.cycleTimeUs ecuPar.map1_8_8 ecuPar.curve1_32 ecuPar.period ecuPar.ampl ecuPar.phase ecuPar.offset /end REF_CHARACTERISTIC /end GROUP /begin COMPU_METHOD byteCounter.Conversion "" LINEAR "%6.3" "" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT byteCounter "" UBYTE byteCounter.Conversion 0 0 0.000000 255.000000 ECU_ADDRESS 0xD24038 READ_WRITE SYMBOL_LINK "byteCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin MEASUREMENT byteCounter "" UBYTE byteCounter.Conversion 0 0 0.000000 255.000000 ECU_ADDRESS 0x8F0038 READ_WRITE SYMBOL_LINK "byteCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT /begin COMPU_METHOD wordCounter.Conversion "" LINEAR "%6.3" "" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT wordCounter "" UWORD wordCounter.Conversion 0 0 0.000000 65535.000000 ECU_ADDRESS 0xD2403A READ_WRITE SYMBOL_LINK "wordCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin MEASUREMENT wordCounter "" UWORD wordCounter.Conversion 0 0 0.000000 65535.000000 ECU_ADDRESS 0x8F003A READ_WRITE SYMBOL_LINK "wordCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT /begin COMPU_METHOD dwordCounter.Conversion "" LINEAR "%6.3" "" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT dwordCounter "" ULONG dwordCounter.Conversion 0 0 0.000000 4294967295.000000 ECU_ADDRESS 0xD2403C READ_WRITE SYMBOL_LINK "dwordCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin MEASUREMENT dwordCounter "" ULONG dwordCounter.Conversion 0 0 0.000000 4294967295.000000 ECU_ADDRESS 0x8F003C READ_WRITE SYMBOL_LINK "dwordCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT /begin COMPU_METHOD sbyteCounter.Conversion "" LINEAR "%6.3" "" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT sbyteCounter "" SBYTE sbyteCounter.Conversion 0 0 -128.000000 127.000000 ECU_ADDRESS 0xD24040 READ_WRITE SYMBOL_LINK "sbyteCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin MEASUREMENT sbyteCounter "" SBYTE sbyteCounter.Conversion 0 0 -128.000000 127.000000 ECU_ADDRESS 0x8F0040 READ_WRITE SYMBOL_LINK "sbyteCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT /begin COMPU_METHOD swordCounter.Conversion "" LINEAR "%6.3" "" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT swordCounter "" SWORD swordCounter.Conversion 0 0 -32768.000000 32767.000000 ECU_ADDRESS 0xD24042 READ_WRITE SYMBOL_LINK "swordCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin MEASUREMENT swordCounter "" SWORD swordCounter.Conversion 0 0 -32768.000000 32767.000000 ECU_ADDRESS 0x8F0042 READ_WRITE SYMBOL_LINK "swordCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT /begin COMPU_METHOD sdwordCounter.Conversion "" LINEAR "%6.3" "" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT sdwordCounter "" SLONG sdwordCounter.Conversion 0 0 -2147483648.000000 2147483647.000000 ECU_ADDRESS 0xD24044 READ_WRITE SYMBOL_LINK "sdwordCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin MEASUREMENT sdwordCounter "" SLONG sdwordCounter.Conversion 0 0 -2147483648.000000 2147483647.000000 ECU_ADDRESS 0x8F0044 READ_WRITE SYMBOL_LINK "sdwordCounter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT /begin COMPU_METHOD channel1.Conversion "" LINEAR "%6.3" "" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT channel1 "Sinus signal 1" FLOAT64_IEEE channel1.Conversion 0 0 -1000000000000.0000 1000000000000.00000 ECU_ADDRESS 0xD24020 READ_WRITE SYMBOL_LINK "channel1" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin MEASUREMENT channel1 "Sinus signal 1" FLOAT64_IEEE channel1.Conversion 0 0 -1000000000000.0000 1000000000000.00000 ECU_ADDRESS 0x8F0020 READ_WRITE SYMBOL_LINK "channel1" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT /begin COMPU_METHOD channel2.Conversion "" LINEAR "%6.3" "" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT channel2 "Sinus signal 2" FLOAT64_IEEE channel2.Conversion 0 0 -1000000000000.0000 1000000000000.00000 ECU_ADDRESS 0xD24028 READ_WRITE SYMBOL_LINK "channel2" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin MEASUREMENT channel2 "Sinus signal 2" FLOAT64_IEEE channel2.Conversion 0 0 -1000000000000.0000 1000000000000.00000 ECU_ADDRESS 0x8F0028 READ_WRITE SYMBOL_LINK "channel2" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT /begin COMPU_METHOD channel3.Conversion "" LINEAR "%6.3" "" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT channel3 "Sinus signal 3" FLOAT64_IEEE channel3.Conversion 0 0 -1000000000000.0000 1000000000000.00000 ECU_ADDRESS 0xD24030 READ_WRITE SYMBOL_LINK "channel3" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT -/begin CHARACTERISTIC byteArray1 "" VAL_BLK 0xD24048 R_UBYTE 0 NO_COMPU_METHOD 0 255 MATRIX_DIM 1024 SYMBOL_LINK "byteArray1" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end CHARACTERISTIC -/begin CHARACTERISTIC longArray1 "" VAL_BLK 0xD244F0 R_ULONG 0 NO_COMPU_METHOD 0 4294967295 MATRIX_DIM 1024 SYMBOL_LINK "longArray1" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end CHARACTERISTIC +/begin MEASUREMENT channel3 "Sinus signal 3" FLOAT64_IEEE channel3.Conversion 0 0 -1000000000000.0000 1000000000000.00000 ECU_ADDRESS 0x8F0030 READ_WRITE SYMBOL_LINK "channel3" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin CHARACTERISTIC byteArray1 "" VAL_BLK 0x8F0048 U8 0 NO_COMPU_METHOD 0 255 MATRIX_DIM 1024 SYMBOL_LINK "byteArray1" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end CHARACTERISTIC +/begin CHARACTERISTIC longArray1 "" VAL_BLK 0x8F04F0 U32 0 NO_COMPU_METHOD 0 4294967295 MATRIX_DIM 1024 SYMBOL_LINK "longArray1" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end CHARACTERISTIC /begin GROUP EcuTaskSignals "" ROOT /begin REF_MEASUREMENT channel1 channel2 channel3 byteCounter wordCounter dwordCounter sbyteCounter swordCounter sdwordCounter /end REF_MEASUREMENT /end GROUP /begin GROUP EcuTaskArrays "" ROOT /begin REF_CHARACTERISTIC byteArray1 longArray1 /end REF_CHARACTERISTIC /end GROUP -/begin CHARACTERISTIC gDebugLevel "Console output verbosity" VALUE 0xD24008 R_ULONG 0 NO_COMPU_METHOD 0 100 SYMBOL_LINK "gDebugLevel" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC gDebugLevel "Console output verbosity" VALUE 0x8F0008 U32 0 NO_COMPU_METHOD 0 100 SYMBOL_LINK "gDebugLevel" 0 /end CHARACTERISTIC /begin IF_DATA XCP /begin PROTOCOL_LAYER diff --git a/C_Demo/main.c b/C_Demo/main.c index e4e1603..84c131b 100644 --- a/C_Demo/main.c +++ b/C_Demo/main.c @@ -68,9 +68,6 @@ int main(int argc, char* argv[]) { printf("\nXCP on Ethernet C Demo\n"); if (!cmdline_parser(argc, argv)) return 0; - // Initialize high resolution clock for measurement event timestamping - if (!clockInit()) return 0; - // Initialize the XCP Server if (!XcpEthServerInit(gOptionBindAddr, gOptionPort, gOptionUseTCP)) return 0; diff --git a/XCPlite/XCPlite.a2l b/XCPlite/XCPlite.a2l index ed1ea84..d795a5d 100644 --- a/XCPlite/XCPlite.a2l +++ b/XCPlite/XCPlite.a2l @@ -15,44 +15,44 @@ ALIGNMENT_FLOAT64_IEEE 1 ALIGNMENT_INT64 1 /end MOD_COMMON -/begin RECORD_LAYOUT R_FLOAT64_IEEE FNC_VALUES 1 FLOAT64_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_FLOAT64_IEEE "" FLOAT64_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_FLOAT64_IEEE "" VALUE R_FLOAT64_IEEE 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_FLOAT32_IEEE FNC_VALUES 1 FLOAT32_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_FLOAT32_IEEE "" FLOAT32_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_FLOAT32_IEEE "" VALUE R_FLOAT32_IEEE 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_A_INT64 FNC_VALUES 1 A_INT64 ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_A_INT64 "" A_INT64 NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_A_INT64 "" VALUE R_A_INT64 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_SLONG FNC_VALUES 1 SLONG ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_SLONG "" SLONG NO_COMPU_METHOD 0 0 -2147483648 2147483647 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_SLONG "" VALUE R_SLONG 0 NO_COMPU_METHOD -2147483648 2147483647 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_SWORD FNC_VALUES 1 SWORD ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_SWORD "" SWORD NO_COMPU_METHOD 0 0 -32768 32767 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_SWORD "" VALUE R_SWORD 0 NO_COMPU_METHOD -32768 32767 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_SBYTE FNC_VALUES 1 SBYTE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_SBYTE "" SBYTE NO_COMPU_METHOD 0 0 -128 127 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_SBYTE "" VALUE R_SBYTE 0 NO_COMPU_METHOD -128 127 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_UBYTE FNC_VALUES 1 UBYTE ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_UBYTE "" UBYTE NO_COMPU_METHOD 0 0 0 255 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_UBYTE "" VALUE R_UBYTE 0 NO_COMPU_METHOD 0 255 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_UWORD FNC_VALUES 1 UWORD ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_UWORD "" UWORD NO_COMPU_METHOD 0 0 0 65535 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_UWORD "" VALUE R_UWORD 0 NO_COMPU_METHOD 0 65535 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_ULONG FNC_VALUES 1 ULONG ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_ULONG "" ULONG NO_COMPU_METHOD 0 0 0 4294967295 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_ULONG "" VALUE R_ULONG 0 NO_COMPU_METHOD 0 4294967295 /end TYPEDEF_CHARACTERISTIC -/begin RECORD_LAYOUT R_A_UINT64 FNC_VALUES 1 A_UINT64 ROW_DIR DIRECT /end RECORD_LAYOUT -/begin TYPEDEF_MEASUREMENT M_A_UINT64 "" A_UINT64 NO_COMPU_METHOD 0 0 0 1E12 /end TYPEDEF_MEASUREMENT -/begin TYPEDEF_CHARACTERISTIC C_A_UINT64 "" VALUE R_A_UINT64 0 NO_COMPU_METHOD 0 1E12 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT F64 FNC_VALUES 1 FLOAT64_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_F64 "" FLOAT64_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_F64 "" VALUE F64 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT F32 FNC_VALUES 1 FLOAT32_IEEE ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_F32 "" FLOAT32_IEEE NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_F32 "" VALUE F32 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT S64 FNC_VALUES 1 A_INT64 ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_S64 "" A_INT64 NO_COMPU_METHOD 0 0 -1E12 1E12 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_S64 "" VALUE S64 0 NO_COMPU_METHOD -1E12 1E12 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT S32 FNC_VALUES 1 SLONG ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_S32 "" SLONG NO_COMPU_METHOD 0 0 -2147483648 2147483647 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_S32 "" VALUE S32 0 NO_COMPU_METHOD -2147483648 2147483647 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT S16 FNC_VALUES 1 SWORD ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_S16 "" SWORD NO_COMPU_METHOD 0 0 -32768 32767 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_S16 "" VALUE S16 0 NO_COMPU_METHOD -32768 32767 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT S8 FNC_VALUES 1 SBYTE ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_S8 "" SBYTE NO_COMPU_METHOD 0 0 -128 127 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_S8 "" VALUE S8 0 NO_COMPU_METHOD -128 127 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT U8 FNC_VALUES 1 UBYTE ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_U8 "" UBYTE NO_COMPU_METHOD 0 0 0 255 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_U8 "" VALUE U8 0 NO_COMPU_METHOD 0 255 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT U16 FNC_VALUES 1 UWORD ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_U16 "" UWORD NO_COMPU_METHOD 0 0 0 65535 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_U16 "" VALUE U16 0 NO_COMPU_METHOD 0 65535 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT U32 FNC_VALUES 1 ULONG ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_U32 "" ULONG NO_COMPU_METHOD 0 0 0 4294967295 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_U32 "" VALUE U32 0 NO_COMPU_METHOD 0 4294967295 /end TYPEDEF_CHARACTERISTIC +/begin RECORD_LAYOUT U64 FNC_VALUES 1 A_UINT64 ROW_DIR DIRECT /end RECORD_LAYOUT +/begin TYPEDEF_MEASUREMENT M_U64 "" A_UINT64 NO_COMPU_METHOD 0 0 0 1E12 /end TYPEDEF_MEASUREMENT +/begin TYPEDEF_CHARACTERISTIC C_U64 "" VALUE U64 0 NO_COMPU_METHOD 0 1E12 /end TYPEDEF_CHARACTERISTIC -/begin CHARACTERISTIC ampl "Amplitude of sinus signal in V" VALUE 0x2CA8000 R_FLOAT64_IEEE 0 NO_COMPU_METHOD 0 800 PHYS_UNIT "V" SYMBOL_LINK "ampl" 0 /end CHARACTERISTIC -/begin CHARACTERISTIC period "Period of sinus signal in s" VALUE 0x2CA8008 R_FLOAT64_IEEE 0 NO_COMPU_METHOD 0 10 PHYS_UNIT "s" SYMBOL_LINK "period" 0 /end CHARACTERISTIC -/begin CHARACTERISTIC cycleTime "Cycle time of demo event loop in us" VALUE 0x2CA8010 R_FLOAT64_IEEE 0 NO_COMPU_METHOD 0 1e+06 PHYS_UNIT "us" SYMBOL_LINK "cycleTime" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC ampl "Amplitude of sinus signal in V" VALUE 0x27A0000 F64 0 NO_COMPU_METHOD 0 800 PHYS_UNIT "V" SYMBOL_LINK "ampl" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC period "Period of sinus signal in s" VALUE 0x27A0008 F64 0 NO_COMPU_METHOD 0 10 PHYS_UNIT "s" SYMBOL_LINK "period" 0 /end CHARACTERISTIC +/begin CHARACTERISTIC cycleTime "Cycle time of demo event loop in us" VALUE 0x27A0010 F64 0 NO_COMPU_METHOD 0 1e+06 PHYS_UNIT "us" SYMBOL_LINK "cycleTime" 0 /end CHARACTERISTIC /begin COMPU_METHOD channel1.Conversion "" LINEAR "%6.3" "V" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT channel1 "Sinus demo signal" FLOAT64_IEEE channel1.Conversion 0 0 -1000000000000.0000 1000000000000.00000 ECU_ADDRESS 0x2CA8028 PHYS_UNIT "V" READ_WRITE SYMBOL_LINK "channel1" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin MEASUREMENT channel1 "Sinus demo signal" FLOAT64_IEEE channel1.Conversion 0 0 -1000000000000.0000 1000000000000.00000 ECU_ADDRESS 0x27A0028 PHYS_UNIT "V" READ_WRITE SYMBOL_LINK "channel1" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT /begin COMPU_METHOD counter.Conversion "" LINEAR "%6.3" "" COEFFS_LINEAR 1 0 /end COMPU_METHOD -/begin MEASUREMENT counter "Event counter" ULONG counter.Conversion 0 0 0.000000 4294967295.000000 ECU_ADDRESS 0x2CA8030 READ_WRITE SYMBOL_LINK "counter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT +/begin MEASUREMENT counter "Event counter" ULONG counter.Conversion 0 0 0.000000 4294967295.000000 ECU_ADDRESS 0x27A0030 READ_WRITE SYMBOL_LINK "counter" 0 /begin IF_DATA XCP /begin DAQ_EVENT FIXED_EVENT_LIST EVENT 0x0 /end DAQ_EVENT /end IF_DATA /end MEASUREMENT /begin IF_DATA XCP /begin PROTOCOL_LAYER @@ -64,7 +64,6 @@ OPTIONAL_CMD UPLOAD OPTIONAL_CMD SHORT_UPLOAD OPTIONAL_CMD DOWNLOAD OPTIONAL_CMD SHORT_DOWNLOAD -OPTIONAL_CMD BUILD_CHECKSUM OPTIONAL_CMD GET_DAQ_RESOLUTION_INFO OPTIONAL_CMD GET_DAQ_PROCESSOR_INFO OPTIONAL_CMD FREE_DAQ diff --git a/XCPlite/main.c b/XCPlite/main.c index 97bddf8..b2b2d2e 100644 --- a/XCPlite/main.c +++ b/XCPlite/main.c @@ -52,9 +52,6 @@ int main() { printf("\nXCPlite - Simple Demo\n"); - // Initialize high resolution clock for measurement event timestamping - if (!clockInit()) return 0; - // Initialize the XCP Server uint8_t ipAddr[] = OPTION_SERVER_ADDR; if (!XcpEthServerInit(ipAddr, OPTION_SERVER_PORT, FALSE)) return 0; diff --git a/src/A2L.c b/src/A2L.c index 3e6ce7c..9033159 100644 --- a/src/A2L.c +++ b/src/A2L.c @@ -225,21 +225,40 @@ const char* A2lGetSymbolName(const char* instanceName, const char* name) { } } -static const char* getType(int32_t type) { +static const char* getA2lTypeName(int32_t type) { const char* types; switch (type) { - case A2L_TYPE_INT8: types = "SBYTE"; break; - case A2L_TYPE_INT16: types = "SWORD"; break; - case A2L_TYPE_INT32: types = "SLONG"; break; - case A2L_TYPE_INT64: types = "A_INT64"; break; - case A2L_TYPE_UINT8: types = "UBYTE"; break; - case A2L_TYPE_UINT16: types = "UWORD"; break; - case A2L_TYPE_UINT32: types = "ULONG"; break; - case A2L_TYPE_UINT64: types = "A_UINT64"; break; - case A2L_TYPE_FLOAT: types = "FLOAT32_IEEE"; break; - case A2L_TYPE_DOUBLE: types = "FLOAT64_IEEE"; break; - default: - types = NULL; + case A2L_TYPE_INT8: types = "SBYTE"; break; + case A2L_TYPE_INT16: types = "SWORD"; break; + case A2L_TYPE_INT32: types = "SLONG"; break; + case A2L_TYPE_INT64: types = "A_INT64"; break; + case A2L_TYPE_UINT8: types = "UBYTE"; break; + case A2L_TYPE_UINT16: types = "UWORD"; break; + case A2L_TYPE_UINT32: types = "ULONG"; break; + case A2L_TYPE_UINT64: types = "A_UINT64"; break; + case A2L_TYPE_FLOAT: types = "FLOAT32_IEEE"; break; + case A2L_TYPE_DOUBLE: types = "FLOAT64_IEEE"; break; + default: + types = NULL; + } + return types; +} + +static const char* getTypeName(int32_t type) { + const char* types; + switch (type) { + case A2L_TYPE_INT8: types = "S8"; break; + case A2L_TYPE_INT16: types = "S16"; break; + case A2L_TYPE_INT32: types = "S32"; break; + case A2L_TYPE_INT64: types = "S64"; break; + case A2L_TYPE_UINT8: types = "U8"; break; + case A2L_TYPE_UINT16: types = "U16"; break; + case A2L_TYPE_UINT32: types = "U32"; break; + case A2L_TYPE_UINT64: types = "U64"; break; + case A2L_TYPE_FLOAT: types = "F32"; break; + case A2L_TYPE_DOUBLE: types = "F64"; break; + default: + types = NULL; } return types; } @@ -247,13 +266,13 @@ static const char* getType(int32_t type) { static const char* getTypeMin(int32_t type) { const char* min; switch (type) { - case A2L_TYPE_INT8: min = "-128"; break; - case A2L_TYPE_INT16: min = "-32768"; break; - case A2L_TYPE_INT32: min = "-2147483648"; break; - case A2L_TYPE_INT64: min = "-1E12"; break; - case A2L_TYPE_FLOAT: min = "-1E12"; break; - case A2L_TYPE_DOUBLE: min = "-1E12"; break; - default: min = "0"; + case A2L_TYPE_INT8: min = "-128"; break; + case A2L_TYPE_INT16: min = "-32768"; break; + case A2L_TYPE_INT32: min = "-2147483648"; break; + case A2L_TYPE_INT64: min = "-1E12"; break; + case A2L_TYPE_FLOAT: min = "-1E12"; break; + case A2L_TYPE_DOUBLE: min = "-1E12"; break; + default: min = "0"; } return min; } @@ -261,13 +280,13 @@ static const char* getTypeMin(int32_t type) { static const char* getTypeMax(int32_t type) { const char* max; switch (type) { - case A2L_TYPE_INT8: max = "127"; break; - case A2L_TYPE_INT16: max = "32767"; break; - case A2L_TYPE_INT32: max = "2147483647"; break; - case A2L_TYPE_UINT8: max = "255"; break; - case A2L_TYPE_UINT16: max = "65535"; break; - case A2L_TYPE_UINT32: max = "4294967295"; break; - default: max = "1E12"; + case A2L_TYPE_INT8: max = "127"; break; + case A2L_TYPE_INT16: max = "32767"; break; + case A2L_TYPE_INT32: max = "2147483647"; break; + case A2L_TYPE_UINT8: max = "255"; break; + case A2L_TYPE_UINT16: max = "65535"; break; + case A2L_TYPE_UINT32: max = "4294967295"; break; + default: max = "1E12"; } return max; } @@ -275,13 +294,13 @@ static const char* getTypeMax(int32_t type) { static const char* getPhysMin(int32_t type, double factor, double offset) { double value = 0.0; switch (type) { - case A2L_TYPE_INT8: value = -128; break; - case A2L_TYPE_INT16: value = -32768; break; - case A2L_TYPE_INT32: value = -(double)2147483648; break; - case A2L_TYPE_INT64: value = -1E12; break; - case A2L_TYPE_FLOAT: value = -1E12; break; - case A2L_TYPE_DOUBLE: value = -1E12; break; - default: value = 0.0; + case A2L_TYPE_INT8: value = -128; break; + case A2L_TYPE_INT16: value = -32768; break; + case A2L_TYPE_INT32: value = -(double)2147483648; break; + case A2L_TYPE_INT64: value = -1E12; break; + case A2L_TYPE_FLOAT: value = -1E12; break; + case A2L_TYPE_DOUBLE: value = -1E12; break; + default: value = 0.0; } static char str[20]; @@ -292,13 +311,13 @@ static const char* getPhysMin(int32_t type, double factor, double offset) { static const char* getPhysMax(int32_t type, double factor, double offset) { double value = 0.0; switch (type) { - case A2L_TYPE_INT8: value = 127; break; - case A2L_TYPE_INT16: value = 32767; break; - case A2L_TYPE_INT32: value = 2147483647; break; - case A2L_TYPE_UINT8: value = 255; break; - case A2L_TYPE_UINT16: value = 65535; break; - case A2L_TYPE_UINT32: value = 4294967295; break; - default: value = 1E12; + case A2L_TYPE_INT8: value = 127; break; + case A2L_TYPE_INT16: value = 32767; break; + case A2L_TYPE_INT32: value = 2147483647; break; + case A2L_TYPE_UINT8: value = 255; break; + case A2L_TYPE_UINT16: value = 65535; break; + case A2L_TYPE_UINT32: value = 4294967295; break; + default: value = 1E12; } static char str[20]; snprintf(str, 20, "%f", factor * value + offset); @@ -323,11 +342,12 @@ BOOL A2lOpen(const char *filename, const char* projectName ) { // Create standard record layouts for elementary types for (int i = -10; i <= +10; i++) { - const char* t = getType(i); - if (t != NULL) { - fprintf(gA2lFile, "/begin RECORD_LAYOUT R_%s FNC_VALUES 1 %s ROW_DIR DIRECT /end RECORD_LAYOUT\n", t, t); - fprintf(gA2lFile, "/begin TYPEDEF_MEASUREMENT M_%s \"\" %s NO_COMPU_METHOD 0 0 %s %s /end TYPEDEF_MEASUREMENT\n", t, t, getTypeMin(i), getTypeMax(i)); - fprintf(gA2lFile, "/begin TYPEDEF_CHARACTERISTIC C_%s \"\" VALUE R_%s 0 NO_COMPU_METHOD %s %s /end TYPEDEF_CHARACTERISTIC\n", t, t, getTypeMin(i), getTypeMax(i)); + const char* at = getA2lTypeName(i); + if (at != NULL) { + const char* t = getTypeName(i); + fprintf(gA2lFile, "/begin RECORD_LAYOUT %s FNC_VALUES 1 %s ROW_DIR DIRECT /end RECORD_LAYOUT\n", t, at); + fprintf(gA2lFile, "/begin TYPEDEF_MEASUREMENT M_%s \"\" %s NO_COMPU_METHOD 0 0 %s %s /end TYPEDEF_MEASUREMENT\n", t, at, getTypeMin(i), getTypeMax(i)); + fprintf(gA2lFile, "/begin TYPEDEF_CHARACTERISTIC C_%s \"\" VALUE %s 0 NO_COMPU_METHOD %s %s /end TYPEDEF_CHARACTERISTIC\n", t, t, getTypeMin(i), getTypeMax(i)); } } fprintf(gA2lFile, "\n"); @@ -505,14 +525,14 @@ void A2lTypedefBegin_(const char* name, uint32_t size, const char* comment) { void A2lTypedefMeasurementComponent_(const char* name, int32_t type, uint32_t offset) { assert(gA2lFile != NULL); - fprintf(gA2lFile, " /begin STRUCTURE_COMPONENT %s M_%s 0x%X SYMBOL_TYPE_LINK \"%s\" /end STRUCTURE_COMPONENT\n", name, getType(type), offset, name); + fprintf(gA2lFile, " /begin STRUCTURE_COMPONENT %s M_%s 0x%X SYMBOL_TYPE_LINK \"%s\" /end STRUCTURE_COMPONENT\n", name, getTypeName(type), offset, name); gA2lComponents++; } void A2lTypedefParameterComponent_(const char* name, int32_t type, uint32_t offset) { assert(gA2lFile != NULL); - fprintf(gA2lFile, " /begin STRUCTURE_COMPONENT %s C_%s 0x%X SYMBOL_TYPE_LINK \"%s\" /end STRUCTURE_COMPONENT\n", name, getType(type), offset, name); + fprintf(gA2lFile, " /begin STRUCTURE_COMPONENT %s C_%s 0x%X SYMBOL_TYPE_LINK \"%s\" /end STRUCTURE_COMPONENT\n", name, getTypeName(type), offset, name); gA2lComponents++; } @@ -551,7 +571,7 @@ void A2lCreateMeasurement_(const char* instanceName, const char* name, int32_t t } //fprintf(gA2lFile, "/begin MEASUREMENT %s \"%s\" %s %s.Conversion 0 0 %s %s ECU_ADDRESS 0x%X", A2lGetSymbolName(instanceName, name), comment, getType(type), conv, getTypeMin(type), getTypeMax(type), addr); - fprintf(gA2lFile, "/begin MEASUREMENT %s \"%s\" %s %s.Conversion 0 0 %s %s ECU_ADDRESS 0x%X", A2lGetSymbolName(instanceName, name), comment, getType(type), conv, getPhysMin(type, factor, offset), getPhysMax(type, factor, offset), addr); + fprintf(gA2lFile, "/begin MEASUREMENT %s \"%s\" %s %s.Conversion 0 0 %s %s ECU_ADDRESS 0x%X", A2lGetSymbolName(instanceName, name), comment, getA2lTypeName(type), conv, getPhysMin(type, factor, offset), getPhysMax(type, factor, offset), addr); printAddrExt(ext); printPhysUnit(unit); fprintf(gA2lFile, " READ_WRITE"); @@ -569,7 +589,7 @@ void A2lCreateMeasurement_(const char* instanceName, const char* name, int32_t t void A2lCreateMeasurementArray_(const char* instanceName, const char* name, int32_t type, int dim, uint8_t ext, uint32_t addr) { assert(gA2lFile != NULL); - fprintf(gA2lFile, "/begin CHARACTERISTIC %s \"\" VAL_BLK 0x%X R_%s 0 NO_COMPU_METHOD %s %s MATRIX_DIM %u", A2lGetSymbolName(instanceName, name), addr, getType(type), getTypeMin(type), getTypeMax(type), dim); + fprintf(gA2lFile, "/begin CHARACTERISTIC %s \"\" VAL_BLK 0x%X %s 0 NO_COMPU_METHOD %s %s MATRIX_DIM %u", A2lGetSymbolName(instanceName, name), addr, getTypeName(type), getTypeMin(type), getTypeMax(type), dim); printAddrExt(ext); #ifdef OPTION_ENABLE_A2L_SYMBOL_LINKS fprintf(gA2lFile, " SYMBOL_LINK \"%s\" %u", A2lGetSymbolName(instanceName, name), 0); @@ -583,7 +603,7 @@ void A2lCreateMeasurementArray_(const char* instanceName, const char* name, int3 void A2lCreateParameterWithLimits_(const char* name, int32_t type, uint8_t ext, uint32_t addr, const char* comment, const char* unit, double min, double max) { assert(gA2lFile != NULL); - fprintf(gA2lFile, "/begin CHARACTERISTIC %s \"%s\" VALUE 0x%X R_%s 0 NO_COMPU_METHOD %g %g", name, comment, addr, getType(type), min, max); + fprintf(gA2lFile, "/begin CHARACTERISTIC %s \"%s\" VALUE 0x%X %s 0 NO_COMPU_METHOD %g %g", name, comment, addr, getTypeName(type), min, max); printPhysUnit(unit); printAddrExt(ext); #ifdef OPTION_ENABLE_A2L_SYMBOL_LINKS @@ -596,7 +616,7 @@ void A2lCreateParameterWithLimits_(const char* name, int32_t type, uint8_t ext, void A2lCreateParameter_(const char* name, int32_t type, uint8_t ext, uint32_t addr, const char* comment, const char* unit) { assert(gA2lFile != NULL); - fprintf(gA2lFile, "/begin CHARACTERISTIC %s \"%s\" VALUE 0x%X R_%s 0 NO_COMPU_METHOD %s %s", name, comment, addr, getType(type), getTypeMin(type), getTypeMax(type)); + fprintf(gA2lFile, "/begin CHARACTERISTIC %s \"%s\" VALUE 0x%X %s 0 NO_COMPU_METHOD %s %s", name, comment, addr, getTypeName(type), getTypeMin(type), getTypeMax(type)); printPhysUnit(unit); printAddrExt(ext); #ifdef OPTION_ENABLE_A2L_SYMBOL_LINKS @@ -610,10 +630,10 @@ void A2lCreateMap_(const char* name, int32_t type, uint8_t ext, uint32_t addr, u assert(gA2lFile != NULL); fprintf(gA2lFile, - "/begin CHARACTERISTIC %s \"%s\" MAP 0x%X R_%s 0 NO_COMPU_METHOD %s %s" + "/begin CHARACTERISTIC %s \"%s\" MAP 0x%X %s 0 NO_COMPU_METHOD %s %s" " /begin AXIS_DESCR FIX_AXIS NO_INPUT_QUANTITY NO_COMPU_METHOD %u 0 %u FIX_AXIS_PAR_DIST 0 1 %u /end AXIS_DESCR" " /begin AXIS_DESCR FIX_AXIS NO_INPUT_QUANTITY NO_COMPU_METHOD %u 0 %u FIX_AXIS_PAR_DIST 0 1 %u /end AXIS_DESCR", - name, comment, addr, getType(type), getTypeMin(type), getTypeMax(type), xdim, xdim-1, xdim, ydim, ydim-1, ydim); + name, comment, addr, getTypeName(type), getTypeMin(type), getTypeMax(type), xdim, xdim-1, xdim, ydim, ydim-1, ydim); printPhysUnit(unit); printAddrExt(ext); #ifdef OPTION_ENABLE_A2L_SYMBOL_LINKS @@ -627,9 +647,9 @@ void A2lCreateCurve_(const char* name, int32_t type, uint8_t ext, uint32_t addr, assert(gA2lFile != NULL); fprintf(gA2lFile, - "/begin CHARACTERISTIC %s \"%s\" CURVE 0x%X R_%s 0 NO_COMPU_METHOD %s %s" + "/begin CHARACTERISTIC %s \"%s\" CURVE 0x%X %s 0 NO_COMPU_METHOD %s %s" " /begin AXIS_DESCR FIX_AXIS NO_INPUT_QUANTITY NO_COMPU_METHOD %u 0 %u FIX_AXIS_PAR_DIST 0 1 %u /end AXIS_DESCR", - name, comment, addr, getType(type), getTypeMin(type), getTypeMax(type), xdim, xdim-1, xdim); + name, comment, addr, getTypeName(type), getTypeMin(type), getTypeMax(type), xdim, xdim-1, xdim); printPhysUnit(unit); printAddrExt(ext); #ifdef OPTION_ENABLE_A2L_SYMBOL_LINKS