本文整理汇总了C++中TerminateTask函数的典型用法代码示例。如果您正苦于以下问题:C++ TerminateTask函数的具体用法?C++ TerminateTask怎么用?C++ TerminateTask使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TerminateTask函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_t1_instance1
/*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);
}
示例2: test_osek_modes_modes_refined_refined_model__the_proc_modes_the_proc_modes_mode_m2_entrypoint_impl
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;
}
}
}
}
示例3: SquawkTask
void SquawkTask(void){
printf("Squawk task\r\n");
#if RUN_SQUAWK
runSquawk();
#endif
TerminateTask();
}
示例4: test_t2_instance
/*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);
}
示例5: StartupTask
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();
}
示例6: test_t1_instance
/*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);
}
示例7: motorTest_refined_model__proces_th_entrypoint_impl
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;
}
}
}
}
示例8: test_t2_instance2
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();
}
示例9: test_t2_instance
/*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);
}
示例10: test_t2_instance1
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();
}
示例11: test_t2_instance
/*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);
}
示例12: test_t6_instance
/*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);
}
示例13: test_t2_instance1
/*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);
}
示例14: Task1
// Tasks
void Task1( void ) {
EcuM_StartupTwo();
CanIf_SetControllerMode(CANIF_Controller_A, CANIF_CS_STARTED);
Com_IpduGroupStart(CanDbImportedPdus, 1);
TerminateTask();
}
示例15: StopSensor_Runnable
//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();
}