/*test case:test the reaction of the system called with an activation of a task*/ static void test_t1_instance1(void) { StatusType result_inst_1, result_inst_2, result_inst_3, result_inst_4, result_inst_5; SCHEDULING_CHECK_INIT(1); result_inst_1 = GetResource(Resource1); SCHEDULING_CHECK_AND_EQUAL_INT(1,E_OK, result_inst_1); SCHEDULING_CHECK_INIT(2); result_inst_2 = ActivateTask(t2); SCHEDULING_CHECK_AND_EQUAL_INT(2,E_OK, result_inst_2); SCHEDULING_CHECK_INIT(3); result_inst_3 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(4,E_OS_RESOURCE , result_inst_3); SCHEDULING_CHECK_INIT(5); result_inst_4 = ActivateTask(t3); SCHEDULING_CHECK_AND_EQUAL_INT(9,E_OK , result_inst_4); SCHEDULING_CHECK_INIT(10); result_inst_5 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(11,E_OS_RESOURCE , result_inst_5); }
void test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl( thread_queue_t * p_PortIdAccess_in, AppModeType * targetModeValue_accessForBA, test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_currentState * Parent_BA_currentState_Access) { Base_Types__Integer_16 test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_p_localVariable; StatusType test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_p_ErrorCode = 0; StatusType test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_the_proc_modes_the_proc_modes_mode_m2_runtime_call_ret; Base_Types__Integer_16 test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_p_countValue = 0; test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_behaviorIdentifier_enum whichPortActivated = test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_behaviorIdentifier_enum_default_behavior; while(1) { switch(the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_current_state) { case test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_BA_entrypoint_init_state: // Transition id: which_behavior_default_mode if(1) // no execution condition { the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_current_state = test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_BA_entrypoint_exec_state; whichPortActivated = test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_behaviorIdentifier_enum_default_behavior; break; } case test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_BA_entrypoint_wait_dispatch_state: // Transition id: dispatch_transition if(1) // no execution condition { the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_current_state = test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_BA_entrypoint_exec_state; TerminateTask (); break; } case test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_BA_entrypoint_exec_state: // Transition id: behavior_specification_1 -- Priority 0 if(whichPortActivated == test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_behaviorIdentifier_enum_default_behavior) { the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_current_state = test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_BA_entrypoint_wait_dispatch_state; test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_p_ErrorCode = ReceiveInputs_runtime (p_PortIdAccess_in, 0); test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_p_ErrorCode = GetCount_runtime (p_PortIdAccess_in, 0, &test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_p_countValue); if ((*Parent_BA_currentState_Access) == test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_currentState_ModeSwitch_init_state) { if (test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl_p_countValue != 0) { (*targetModeValue_accessForBA) = m1; StartOS ((*targetModeValue_accessForBA)); } (*Parent_BA_currentState_Access) = test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_currentState_ModeSwitch_init_state; TerminateTask (); } break; } } } }
void SquawkTask(void){ printf("Squawk task\r\n"); #if RUN_SQUAWK runSquawk(); #endif TerminateTask(); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t2_instance(void) { StatusType result_inst_1, result_inst_2, result_inst_3, result_inst_4, result_inst_5; StatusType received_char; SCHEDULING_CHECK_INIT(11); result_inst_1 = GetMessageStatus(rm); SCHEDULING_CHECK_AND_EQUAL_INT(13,E_COM_ID, result_inst_1); SCHEDULING_CHECK_INIT(14); result_inst_2 = ReceiveMessage(rm, &received_char); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(14,E_OK, result_inst_2); SCHEDULING_CHECK_AND_EQUAL_INT(14,(int)('1'), (int)received_char); SCHEDULING_CHECK_INIT(15); result_inst_3 = ReceiveMessage(rm, &received_char); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(15,E_OK, result_inst_3); SCHEDULING_CHECK_AND_EQUAL_INT(15,(int)('1'), (int)received_char); SCHEDULING_CHECK_INIT(16); result_inst_4 = ReceiveMessage(INVALID_MESSAGE, &received_char); SCHEDULING_CHECK_AND_EQUAL_INT(19,E_COM_ID, result_inst_4); SCHEDULING_CHECK_INIT(20); result_inst_5 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(20,E_OK, result_inst_5); }
void StartupTask( void ) { pi_printf("infor: start up\r\n"); bcm2835_read_mac_address(); parse_config(); printf("ACT LED on GPIO %d\r\n", act_led_gpio); printf("CAN bus frequency %d MHz\r\n", MCP2515_FREQUENCY_MHz); EcuM_StartupTwo(); // Startup CanIf due to ComM is missing in this example CanIf_SetControllerMode(CANIF_CanIfCtrlCfg, CANIF_CS_STARTED); CanIf_SetPduMode(CANIF_CanIfCtrlCfg, CANIF_SET_ONLINE); /** Setup Com stack with necessary parameters**/ Com_IpduGroupVector groupVector; Com_ClearIpduGroupVector(groupVector); //Start the IPDU group Com_SetIpduGroup(groupVector, COM_PDU_GROUP_ID_TXIPDUGROUP, TRUE); Com_SetIpduGroup(groupVector, COM_PDU_GROUP_ID_RXIPDUGROUP, TRUE); Com_IpduGroupControl(groupVector, TRUE); TerminateTask(); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t1_instance(void) { StatusType result_inst_1,result_inst_2,result_inst_3,result_inst_4,result_inst_5,result_inst_6, result_inst_7; SCHEDULING_CHECK_INIT(1); result_inst_1 = ActivateTask(t2); SCHEDULING_CHECK_AND_EQUAL_INT(1,E_OK , result_inst_1); SCHEDULING_CHECK_INIT(2); result_inst_2 = ActivateTask(t3); SCHEDULING_CHECK_AND_EQUAL_INT(2,E_OK , result_inst_2); SCHEDULING_CHECK_INIT(3); result_inst_3 = ActivateTask(t2); SCHEDULING_CHECK_AND_EQUAL_INT(3,E_OK , result_inst_3); SCHEDULING_CHECK_INIT(4); result_inst_4 = ActivateTask(t2); SCHEDULING_CHECK_AND_EQUAL_INT(4,E_OK , result_inst_4); SCHEDULING_CHECK_INIT(5); result_inst_5 = ActivateTask(t3); SCHEDULING_CHECK_AND_EQUAL_INT(5,E_OK , result_inst_5); SCHEDULING_CHECK_INIT(6); result_inst_6 = ActivateTask(t3); SCHEDULING_CHECK_AND_EQUAL_INT(6,E_OK , result_inst_6); SCHEDULING_CHECK_INIT(7); result_inst_7 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(7,E_OK , result_inst_7); }
void motorTest_refined_model__proces_th_entrypoint_impl(int * cc5_portNb, int * cc6_brake, int * cc7_speed) { StatusType motorTest_refined_model__proces_th_entrypoint_impl_proces_th_runtime_call_ret; motorTest_refined_model__proces_th_behaviorIdentifier_enum whichPortActivated = motorTest_refined_model__proces_th_behaviorIdentifier_enum_default_behavior; while(1) { switch(proces_th_entrypoint_impl_current_state) { case motorTest_refined_model__proces_th_entrypoint_impl_BA_entrypoint_init_state: // Transition id: which_behavior_default_mode if(1) // no execution condition { proces_th_entrypoint_impl_current_state = motorTest_refined_model__proces_th_entrypoint_impl_BA_entrypoint_exec_state; whichPortActivated = motorTest_refined_model__proces_th_behaviorIdentifier_enum_default_behavior; break; } case motorTest_refined_model__proces_th_entrypoint_impl_BA_entrypoint_wait_dispatch_state: // Transition id: dispatch_transition if(1) // no execution condition { proces_th_entrypoint_impl_current_state = motorTest_refined_model__proces_th_entrypoint_impl_BA_entrypoint_exec_state; TerminateTask (); break; } case motorTest_refined_model__proces_th_entrypoint_impl_BA_entrypoint_exec_state: // Transition id: call1 -- Priority 0 if(whichPortActivated == motorTest_refined_model__proces_th_behaviorIdentifier_enum_default_behavior) { proces_th_entrypoint_impl_current_state = motorTest_refined_model__proces_th_entrypoint_impl_BA_entrypoint_wait_dispatch_state; nxt_motor_set_speed (*cc5_portNb, *cc7_speed, *cc6_brake); break; } } } }
static void test_t2_instance2(void) { Std_ReturnType result_inst_1, result_inst_2, result_inst_3; TestType1 data1 = 0x00; TestType2 data2; data2.a=0x00; data2.b=0x00; SCHEDULING_CHECK_INIT(9); result_inst_1 = IocRead_ioc1(&data1); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(9,IOC_E_OK, result_inst_1); SCHEDULING_CHECK_AND_EQUAL_INT(9,0x01, data1); SCHEDULING_CHECK_INIT(10); result_inst_2 = IocRead_ioc2(&data2); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(10,IOC_E_OK, result_inst_2); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(10,0x01, data2.a); SCHEDULING_CHECK_AND_EQUAL_INT(10,0x02, data2.b); SCHEDULING_CHECK_INIT(11); result_inst_3 = IocRead_ioc3(&data2); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(11,IOC_E_OK, result_inst_3); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(11,0x0A, data2.a); SCHEDULING_CHECK_AND_EQUAL_INT(11,0x0B, data2.b); SCHEDULING_CHECK_STEP(12); TerminateTask(); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t2_instance(void) { StatusType result_inst_1,result_inst_2,result_inst_3,result_inst_4,result_inst_5; SCHEDULING_CHECK_INIT(2); result_inst_1 = ActivateTask(t1); SCHEDULING_CHECK_AND_EQUAL_INT(2 , E_OS_LIMIT , result_inst_1); SCHEDULING_CHECK_INIT(3); result_inst_2 = ActivateTask(t2); SCHEDULING_CHECK_AND_EQUAL_INT(3 , E_OS_LIMIT , result_inst_2); SCHEDULING_CHECK_INIT(4); result_inst_3 = WaitEvent(Event2); SCHEDULING_CHECK_AND_EQUAL_INT(8 , E_OK , result_inst_3); SCHEDULING_CHECK_INIT(9); result_inst_4 = ChainTask(t1); SCHEDULING_CHECK_AND_EQUAL_INT(9 , E_OS_LIMIT , result_inst_4); SCHEDULING_CHECK_INIT(10); result_inst_5 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(10 , E_OK , result_inst_5); }
static void test_t2_instance1(void) { Std_ReturnType result_inst_1, result_inst_2, result_inst_3; TestType1 data1 = 0x00; TestType2 data2 = {0x00, 0x00}; SCHEDULING_CHECK_INIT(1); result_inst_1 = IocRead_ioc1(&data1); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(1,IOC_E_OK, result_inst_1); SCHEDULING_CHECK_AND_EQUAL_INT(1,0xFF, data1); SCHEDULING_CHECK_INIT(2); result_inst_2 = IocRead_ioc2(&data2); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(2,IOC_E_OK, result_inst_2); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(2,0xFF, data2.a); SCHEDULING_CHECK_AND_EQUAL_INT(2,0xFF, data2.b); SCHEDULING_CHECK_INIT(3); result_inst_3 = IocRead_ioc3(&data2); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(3,IOC_E_OK, result_inst_3); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(3,0xFA, data2.a); SCHEDULING_CHECK_AND_EQUAL_INT(3,0xFA, data2.b); SCHEDULING_CHECK_STEP(4); TerminateTask(); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t2_instance(void) { StatusType result_inst_0, result_inst_1, result_inst_3, result_inst_4, result_inst_5; EventMaskType result_inst_2; SCHEDULING_CHECK_INIT(1); result_inst_0 = ActivateTask(t1); SCHEDULING_CHECK_AND_EQUAL_INT(1,E_OK, result_inst_0); SCHEDULING_CHECK_INIT(2); result_inst_1 = SetEvent(t1, Event1); SCHEDULING_CHECK_AND_EQUAL_INT(2,E_OK, result_inst_1); SCHEDULING_CHECK_INIT(3); result_inst_3 = GetEvent(t1,&result_inst_2); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(3,Event1, result_inst_2); SCHEDULING_CHECK_AND_EQUAL_INT(3,E_OK, result_inst_3); SCHEDULING_CHECK_INIT(4); result_inst_4 = WaitEvent(Event2); SCHEDULING_CHECK_AND_EQUAL_INT(13,E_OK, result_inst_4); SCHEDULING_CHECK_INIT(14); result_inst_5 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(14,E_OK, result_inst_5); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t6_instance(void) { StatusType result_inst; SCHEDULING_CHECK_INIT(13); result_inst = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(13,E_OK , result_inst); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t2_instance1(void) { StatusType result_inst_1; SCHEDULING_CHECK_INIT(27); result_inst_1 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(27,E_OK, result_inst_1); }
// Tasks void Task1( void ) { EcuM_StartupTwo(); CanIf_SetControllerMode(CANIF_Controller_A, CANIF_CS_STARTED); Com_IpduGroupStart(CanDbImportedPdus, 1); TerminateTask(); }
//StopSensor_Runnable void StopSensor_Runnable() { uint8_t value = 0; RTE_StopSensor_GetSensorValue_OSPort_In(&value); if(value >0) { DISPLAY_OUTPUT(0,6, "StopSensor"); RTE_StopSensor_Manager_SetValue_Event_Out(); } TerminateTask(); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t4_instance(void) { StatusType result_inst_1, result_inst_2; SCHEDULING_CHECK_INIT(7); result_inst_1 = SetEvent(t2, Event2); SCHEDULING_CHECK_AND_EQUAL_INT(7,E_OK , result_inst_1); SCHEDULING_CHECK_INIT(8); result_inst_2 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(8,E_OK , result_inst_2); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t7_instance(void) { StatusType result_inst_1, result_inst_2; SCHEDULING_CHECK_INIT(19); result_inst_1 = SetEvent(t8, Event1); SCHEDULING_CHECK_AND_EQUAL_INT(19,E_OK , result_inst_1); SCHEDULING_CHECK_INIT(20); result_inst_2 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(20,E_OK, result_inst_2); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t2_instance2(void) { StatusType result_inst_1, result_inst_2; SCHEDULING_CHECK_INIT(16); result_inst_1 = WaitEvent(Event1); SCHEDULING_CHECK_AND_EQUAL_INT(16,E_OK, result_inst_1); SCHEDULING_CHECK_INIT(17); result_inst_2 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(17,E_OK, result_inst_2); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t1_instance2(void) { StatusType result_inst_1, result_inst_2; SCHEDULING_CHECK_INIT(7); result_inst_1 = ActivateTask(t1); SCHEDULING_CHECK_AND_EQUAL_INT(7,E_OK , result_inst_1); SCHEDULING_CHECK_INIT(8); result_inst_2 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(8,E_OK , result_inst_2); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t3_instance(void) { StatusType result_inst_1, result_inst_2; SCHEDULING_CHECK_INIT(2); result_inst_1 = ActivateTask(t2); SCHEDULING_CHECK_AND_EQUAL_INT(2 , E_OK , result_inst_1); SCHEDULING_CHECK_INIT(3); result_inst_2 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(3 , E_OK , result_inst_2); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t7_instance2(void) { StatusType result_inst_1, result_inst_2; StatusType received_char; SCHEDULING_CHECK_INIT(18); result_inst_1 = ReceiveMessage(rm_newisgreaterorequal, &received_char); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(18,E_OK, result_inst_1); SCHEDULING_CHECK_AND_EQUAL_INT(18,3, (int)received_char); SCHEDULING_CHECK_INIT(19); result_inst_2 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(19,E_OK, result_inst_2); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t6_instance2(void) { StatusType result_inst_1, result_inst_2; StatusType received_char; SCHEDULING_CHECK_INIT(41); result_inst_1 = ReceiveMessage(rm_newisless, &received_char); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(41,E_OK, result_inst_1); SCHEDULING_CHECK_AND_EQUAL_INT(41,0, (int)received_char); SCHEDULING_CHECK_INIT(42); result_inst_2 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(42,E_OK, result_inst_2); }
void test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl( data_port_t * input_data_m1, data_port_t * input_data_m2) { StatusType test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_the_proc_modes_the_receiver_runtime_call_ret; test_osek_modes__Integer test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_input_data_localVariable; Base_Types__Integer_16 test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_input_data_Length = sizeof(test_osek_modes__Integer); StatusType test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_input_data_ErrorCode = 0; AppModeType test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_the_receiver_currentMode; test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_behaviorIdentifier_enum whichPortActivated = test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_behaviorIdentifier_enum_default_behavior; while(1) { switch(the_proc_modes_the_receiver_entrypoint_impl_current_state) { case test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_BA_entrypoint_init_state: // Transition id: which_behavior_default_mode if(1) // no execution condition { the_proc_modes_the_receiver_entrypoint_impl_current_state = test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_BA_entrypoint_exec_state; whichPortActivated = test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_behaviorIdentifier_enum_default_behavior; break; } case test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_BA_entrypoint_wait_dispatch_state: // Transition id: dispatch_transition if(1) // no execution condition { the_proc_modes_the_receiver_entrypoint_impl_current_state = test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_BA_entrypoint_exec_state; TerminateTask (); break; } case test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_BA_entrypoint_exec_state: // Transition id: call -- Priority 0 if(whichPortActivated == test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_behaviorIdentifier_enum_default_behavior) { the_proc_modes_the_receiver_entrypoint_impl_current_state = test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_BA_entrypoint_wait_dispatch_state; test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_the_receiver_currentMode = GetActiveApplicationMode (); if (test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_the_receiver_currentMode == m1) { test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_input_data_ErrorCode = GetValueDataPort_runtime (input_data_m1, &test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_input_data_localVariable); } if (test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_the_receiver_currentMode == m2) { test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_input_data_ErrorCode = GetValueDataPort_runtime (input_data_m2, &test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_input_data_localVariable); } if (test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_input_data_ErrorCode == 0) { receive (test_osek_modes_modes_refined_refined_model__the_proc_modes_the_receiver_entrypoint_impl_input_data_localVariable); } break; } } } }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t5_instance2(void) { StatusType result_inst_1, result_inst_2; StatusType received_char; SCHEDULING_CHECK_INIT(26); result_inst_1 = ReceiveMessage(rm_newislessorequal, &received_char); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(26,E_OK, result_inst_1); SCHEDULING_CHECK_AND_EQUAL_INT(26,1, (int)received_char); SCHEDULING_CHECK_INIT(27); result_inst_2 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(27,E_OK, result_inst_2); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t2_instance(void) { StatusType result_inst_1, result_inst_2; StatusType received_char; SCHEDULING_CHECK_INIT(4); result_inst_1 = ReceiveMessage(rm_activatetask, &received_char); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(4,E_OK, result_inst_1); SCHEDULING_CHECK_AND_EQUAL_INT(4,(int)('1'), (int)received_char); SCHEDULING_CHECK_INIT(5); result_inst_2 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(5,E_OK, result_inst_2); }
void init( void ) { valuetx1 = valuetx2 = valuetx3 = 0; Lin_Init(NULL); Lin_InitChannel(LIN_CTRL_A, &LinChannelConfigData[0]); LinIf_Init(NULL); PduR_Init(&PduR_Config); LinSM_Init(NULL); Com_Init(&ComConfiguration); LinSM_RequestComMode(0,COMM_FULL_COMMUNICATION); LinSM_ScheduleRequest(0,1); TerminateTask(); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t2_instance3(void) { StatusType result_inst_1, result_inst_2; StatusType received_char; SCHEDULING_CHECK_INIT(31); result_inst_1 = ReceiveMessage(rm_maskednewequalsx, &received_char); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(31,E_OK, result_inst_1); SCHEDULING_CHECK_AND_EQUAL_INT(31,7, (int)received_char); SCHEDULING_CHECK_INIT(32); result_inst_2 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(32,E_OK, result_inst_2); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t2_instance(void) { StatusType result_inst_2, result_inst_3; TaskStateType result_inst_1; SCHEDULING_CHECK_INIT(5); result_inst_2 = GetTaskState(t1,&result_inst_1); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(5,READY , result_inst_1); SCHEDULING_CHECK_AND_EQUAL_INT(5,E_OK , result_inst_2); SCHEDULING_CHECK_INIT(6); result_inst_3 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(6,E_OK , result_inst_3); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t5_instance3(void) { StatusType result_inst_1, result_inst_2; StatusType received_char; SCHEDULING_CHECK_INIT(22); result_inst_1 = ReceiveMessage(rm_newisdifferent, &received_char); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(22,E_OK, result_inst_1); SCHEDULING_CHECK_AND_EQUAL_INT(22,7, (int)received_char); SCHEDULING_CHECK_INIT(23); result_inst_2 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(23,E_OK, result_inst_2); }
/*test case:test the reaction of the system called with an activation of a task*/ static void test_t2_instance8(void) { StatusType result_inst_1, result_inst_2; StatusType received_char; SCHEDULING_CHECK_INIT(43); result_inst_1 = ReceiveMessage(rm_always, &received_char); SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(43,2, (int)received_char); SCHEDULING_CHECK_AND_EQUAL_INT(43,E_OK, result_inst_1); SCHEDULING_CHECK_INIT(44); result_inst_2 = TerminateTask(); SCHEDULING_CHECK_AND_EQUAL_INT(44,E_OK, result_inst_2); }