This commit is contained in:
cfif 2025-06-02 13:26:39 +03:00
commit 88bc5ae073
3 changed files with 224 additions and 0 deletions

153
ReadDataByIdentifier_22.h Normal file
View File

@ -0,0 +1,153 @@
//
// Created by cfif on 25.07.2024.
//
#ifndef SMART_COMPONENTS_UPDATE_READDATABYIDENTIFIER_22_H
#define SMART_COMPONENTS_UPDATE_READDATABYIDENTIFIER_22_H
#include "stdint.h"
typedef enum {
//нет зарядки
NO_CHARGE = 0,
//капельная зарядка
TRICLE_CHHARGE = 1,
//быстрая зарядка
FAST_CHARGE = 2,
//уходовая зарядка
CARE_CHARGE = 3,
//проверить старое
CHECK_OLD = 4,
//отсутствие проверки
CHECK_ABSENCE = 5,
//стабилизация
STABILISATION = 6,
//не определено
UNDEFINDET = 7,
} eTypeBatState;
typedef enum {
INITIALIZING = 0,
IDLE = 1,
SLEEP = 2,
TESTING_W1 = 3,
TESTING_W2 = 4,
TESTING_W3 = 5,
TESTING_OTHER = 6,
TESTING_SOUND_CONDITION = 7,
SOS_COMM = 8,
SERV_COMM = 9,
REGISTRATION = 10,
CALL_PREPARATION = 11,
DIAL = 12,
ENABLE_SLEEP = 13,
SLEEP_PIN = 14,
MSD_SENDS = 15,
INCOMING_CALL = 16,
NOT_INITIALIZED = 17,
// 18-30 NOT_USED,
UNDEFINED = 31,
} eTypeModemState;
typedef enum {
STATE_RECORD001_OFF = 0,
STATE_RECORD001_ON = 1,
STATE_RECORD001_UNDEFINDET = 2,
STATE_RECORD001_NOT_USED = 3,
} eTypeState_001;
typedef enum {
STATE_RECORD002_OFF = 0,
STATE_RECORD002_ON = 1,
STATE_RECORD002_UNDEFINDET = 2,
STATE_RECORD002_NOT_USED = 3,
} eTypeState_002;
typedef enum {
ECALL_ERA_112 = 0,
ECALL_ERA_TEST = 1,
ECALL_ERA_DEBUG = 2,
} eCALLToTest;
typedef enum {
GPIO_FALSE_ECALL_OUT_CAN_UDS = 0,
GPIO_TRUE_ECALL_OUT_CAN_UDS = 1,
GPIO_FALSE_GARAGE_CAN_UDS = 2,
GPIO_TRUE_GARAGE_CAN_UDS = 3,
GPIO_FALSE_MUTE_P_CAN_UDS = 4,
GPIO_TRUE_MUTE_P_CAN_UDS = 5,
GPIO_FALSE_MUTE_N_CAN_UDS = 6,
GPIO_TRUE_MUTE_N_CAN_UDS = 7,
GPIO_FALSE_LED_RED_CAN_UDS = 8,
GPIO_TRUE_LED_RED_CAN_UDS = 9,
GPIO_FALSE_LED_GREEN_CAN_UDS = 10,
GPIO_TRUE_LED_GREEN_CAN_UDS = 11
} eTypeFunctionCanUdsWrite;
typedef enum {
// Запуск/Остановка потока индикации
TASK_INDICATION_STOP_CAN_UDS = 0,
TASK_INDICATION_START_CAN_UDS = 1
} eTypeFunctionCanUdsTaskIndicationStartStop;
typedef enum {
// Запись данных ввода/вывода
GPIO_WRITE_CAN_UDS = 0,
TASK_INDICATION_STOP_START_CAN_UDS = 1,
AUDIO_TEST_PLAY_CAN_UDS = 2
} eTypeFunctionCanUds;
// Для зажигания
typedef struct __attribute__ ((packed)) {
uint8_t Input_ACC: 2;
uint8_t Input_KL15: 2;
uint8_t Input_Service: 2;
uint8_t Input_SOS: 2;
uint8_t Reserved: 4;
uint8_t Input_3: 2;
uint8_t Input_ENS: 2;
} tInputStatesRecord_0001;
typedef struct __attribute__ ((packed)) {
uint8_t NotUsed1: 2;
uint8_t Output_SOS_LED: 2;
uint8_t Output_SERVICE_LED: 2;
uint8_t NotUsed2: 2;
uint8_t NotUsed3: 2;
uint8_t OutputMODEM_ON: 2;
uint8_t OutputCheckACC: 2;
uint8_t OutputEN_CAN: 2;
uint8_t Output_ON_OFF_Mode: 2;
uint8_t Output_ON_Charg: 2;
uint8_t Output_RED_LED: 2;
uint8_t Output_GREEN_LED: 2;
uint8_t Output_EN_VMIC: 2;
uint8_t Output_Modem_Wake: 2;
uint8_t Output_Modem_Reset: 2;
uint8_t Output_Mute: 2;
} tOutputStatesRecord_0002;
// Для готовности загрузки модема
typedef struct __attribute__ ((packed)) {
uint8_t Comfort_State: 2;
uint8_t Airbag_State: 3;
uint8_t TCM_State: 3;
uint8_t Reserved2: 3;
uint8_t Battery_State: 3;
uint8_t Motion_State: 2;
uint8_t Reserved3: 2;
uint8_t RolloverAngleStatus: 1;
uint8_t GSM_State: 5;
} tSystemStateID_0006;
#endif //SMART_COMPONENTS_UPDATE_READDATABYIDENTIFIER_22_H

61
RoutineControl_31.h Normal file
View File

@ -0,0 +1,61 @@
//
// Created by cfif on 08.08.2024.
//
#ifndef SMART_COMPONENTS_TELEMATICA_ROUTINECONTROL_31_H
#define SMART_COMPONENTS_TELEMATICA_ROUTINECONTROL_31_H
#include "stdint.h"
typedef enum {
RoutineStartStopSuccess = 0,
RoutineStartStopFailure = 0xff
} eUdsStartStopRoutineResult;
typedef enum {
UDS_RoutineStop = 0,
UDS_RoutineRun = 1,
UDS_RoutineFinishError = 2,
UDS_RoutineFinishSuccess = 3
} eUdsRequestRoutineResult;
typedef enum {
UDS_StartRoutine = 1,
UDS_StopRoutine = 2,
UDS_RequestRoutineResults = 3
} eUdsRoutineControlType;
typedef enum {
UDS_ClearALLMSD = 1,
UDS_DeleteFile = 2,
UDS_ModuleRegistration = 3,
UDS_Self_Test = 4,
UDS_Bootstrap_transition = 5,
UDS_SOS_call = 6,
UDS_AcellCalibration = 7,
UDS_ChangeSimProfile = 8,
UDS_Sertification = 9,
UDS_FindingNetworks = 0x0A,
UDS_ChangeSim = 0x0B,
UDS_BoardVoltageCalibration = 0x0C,
Clear_EEPROM = 0x1243
} eUdsRoutineIdentifier;
typedef enum {
UDS_NotDefined = 0,
UDS_MicrophoneDynamic = 1,
UDS_SosTestCall = 2,
UDS_SosTestCallNoMTS = 3,
UDS_SertDelGPSMem = 4,
UDS_SertColdResetGPS = 5,
UDS_ModuleRegistration_PSAP_25077 = 6,
UDS_ModuleRegistration_Megafon_25002 = 7,
UDS_ModuleRegistration_Tele2_25020 = 8,
UDS_ModuleRegistration_Beeline_25099 = 9,
UDS_ModuleRegistration_MTS_25001 = 0x0A,
UDS_ModuleRegistration_ECALL_ONLY = 0x10,
UDS_MicrophoneDynamicExt = 0x11,
UDS_LEDs = 0x12
} eUdsRoutineModes;
#endif //SMART_COMPONENTS_TELEMATICA_ROUTINECONTROL_31_H

10
modular.json Normal file
View File

@ -0,0 +1,10 @@
{
"cmake": {
"inc_dirs": [
"./"
],
"srcs": [
"./**.c"
]
}
}