//-------------------------------------------------------------------------------------------------- static void Testle_ecall_LoadMsd ( void ) { le_ecall_CallRef_t testECallRef = 0x00; LE_INFO("Start Testle_ecall_LoadMsd"); LE_ASSERT((testECallRef=le_ecall_Create()) != NULL); LE_ASSERT(le_ecall_SetMsdPosition(testECallRef, true, +48898064, +2218092, 0) == LE_OK); LE_ASSERT(le_ecall_SetMsdPassengersCount(testECallRef, 3) == LE_OK); // Check LE_DUPLICATE on le_ecall_SetMsdPosition and le_ecall_SetMsdPassengersCount LE_ASSERT(le_ecall_ImportMsd(testECallRef, ImportedMsd, sizeof(ImportedMsd)) == LE_OK); LE_ASSERT(le_ecall_SetMsdPosition(testECallRef, true, +48070380, -11310000, 45) == LE_DUPLICATE); LE_ASSERT(le_ecall_SetMsdPassengersCount(testECallRef, 3) == LE_DUPLICATE); LE_ASSERT(le_ecall_ResetMsdEraGlonassCrashSeverity(testECallRef) == LE_DUPLICATE); LE_ASSERT(le_ecall_SetMsdEraGlonassCrashSeverity(testECallRef, 0) == LE_DUPLICATE); LE_ASSERT(le_ecall_ResetMsdEraGlonassDiagnosticResult(testECallRef) == LE_DUPLICATE); LE_ASSERT(le_ecall_SetMsdEraGlonassDiagnosticResult(testECallRef, LE_ECALL_DIAG_RESULT_PRESENT_MIC_CONNECTION_FAILURE) == LE_DUPLICATE); LE_ASSERT(le_ecall_ResetMsdEraGlonassCrashInfo(testECallRef) == LE_DUPLICATE); LE_ASSERT(le_ecall_SetMsdEraGlonassCrashInfo(testECallRef, LE_ECALL_CRASH_INFO_PRESENT_CRASH_FRONT_OR_SIDE | LE_ECALL_CRASH_INFO_CRASH_FRONT_OR_SIDE) == LE_DUPLICATE); le_ecall_Delete(testECallRef); }
//-------------------------------------------------------------------------------------------------- void Testle_ecall_EraGlonassSettings ( void ) { uint16_t attempts = 0; uint16_t duration = 0; le_ecall_CallRef_t testECallRef = 0x00; LE_INFO("Start Testle_ecall_EraGlonassSettings"); LE_ASSERT((testECallRef=le_ecall_Create()) != NULL); LE_ASSERT(le_ecall_SetEraGlonassManualDialAttempts(7) == LE_OK); LE_ASSERT(le_ecall_GetEraGlonassManualDialAttempts(&attempts) == LE_OK); LE_ASSERT(attempts == 7); LE_ASSERT(le_ecall_SetEraGlonassAutoDialAttempts(9) == LE_OK); LE_ASSERT(le_ecall_GetEraGlonassAutoDialAttempts(&attempts) == LE_OK); LE_ASSERT(attempts == 9); LE_ASSERT(le_ecall_SetEraGlonassDialDuration(240) == LE_OK); LE_ASSERT(le_ecall_GetEraGlonassDialDuration(&duration) == LE_OK); LE_ASSERT(duration == 240); /* Crash Severity configuration */ LE_ASSERT(le_ecall_SetMsdEraGlonassCrashSeverity(testECallRef, 0) == LE_OK); LE_ASSERT(le_ecall_ResetMsdEraGlonassCrashSeverity(testECallRef) == LE_OK); LE_ASSERT(le_ecall_SetMsdEraGlonassCrashSeverity(testECallRef, 99) == LE_OK); /* DataDiagnosticResult configuration */ LE_ASSERT(le_ecall_SetMsdEraGlonassDiagnosticResult(testECallRef, 0x3FFFFFFFFFF) == LE_OK); LE_ASSERT(le_ecall_SetMsdEraGlonassDiagnosticResult(testECallRef, 0) == LE_OK); LE_ASSERT(le_ecall_ResetMsdEraGlonassDiagnosticResult(testECallRef) == LE_OK); LE_ASSERT(le_ecall_SetMsdEraGlonassDiagnosticResult(testECallRef, LE_ECALL_DIAG_RESULT_PRESENT_MIC_CONNECTION_FAILURE) == LE_OK); /* CrashInfo configuration */ LE_ASSERT(le_ecall_SetMsdEraGlonassCrashInfo(testECallRef, 0xFFFF) == LE_OK); LE_ASSERT(le_ecall_SetMsdEraGlonassCrashInfo(testECallRef, 0) == LE_OK); LE_ASSERT(le_ecall_ResetMsdEraGlonassCrashInfo(testECallRef) == LE_OK); LE_ASSERT(le_ecall_SetMsdEraGlonassCrashInfo(testECallRef, LE_ECALL_CRASH_INFO_PRESENT_CRASH_FRONT_OR_SIDE | LE_ECALL_CRASH_INFO_CRASH_FRONT_OR_SIDE) == LE_OK); le_ecall_Delete(testECallRef); }