当前位置: 首页>>代码示例>>C++>>正文


C++ SCHEDULING_CHECK_AND_EQUAL_INT函数代码示例

本文整理汇总了C++中SCHEDULING_CHECK_AND_EQUAL_INT函数的典型用法代码示例。如果您正苦于以下问题:C++ SCHEDULING_CHECK_AND_EQUAL_INT函数的具体用法?C++ SCHEDULING_CHECK_AND_EQUAL_INT怎么用?C++ SCHEDULING_CHECK_AND_EQUAL_INT使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SCHEDULING_CHECK_AND_EQUAL_INT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: test_t1_instance3

/*test case:test the reaction of the system called with 
 an activation of a task*/
static void test_t1_instance3(void)
{
	StatusType result_inst_1, result_inst_2, result_inst_3, result_inst_4, result_inst_5;
	
  SCHEDULING_CHECK_INIT(8);
	result_inst_1 = WaitEvent(t1_event1);
	SCHEDULING_CHECK_AND_EQUAL_INT(8,E_OK, result_inst_1);
  
  SCHEDULING_CHECK_INIT(9);
	result_inst_2 = ClearEvent(t1_event1);
	SCHEDULING_CHECK_AND_EQUAL_INT(9,E_OK, result_inst_2);
  
  SCHEDULING_CHECK_INIT(10);
	result_inst_3 = StopScheduleTable(sched1);
  SCHEDULING_CHECK_AND_EQUAL_INT(10,E_OK, result_inst_3);
	
  SCHEDULING_CHECK_INIT(11);
	result_inst_4 = SetEvent(t3, t3_event1);
  SCHEDULING_CHECK_AND_EQUAL_INT(13,E_OK, result_inst_4);
	
  SCHEDULING_CHECK_INIT(14);
	result_inst_5 = ActivateTask(t4);
  SCHEDULING_CHECK_AND_EQUAL_INT(14,E_OK, result_inst_5);
	
  while(1); /* --> Protection Hook */
}
开发者ID:TrampolineRTOS,项目名称:trampoline,代码行数:28,代码来源:task1_instance3.c

示例2: 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);

}
开发者ID:miaozhendaoren,项目名称:trampoline,代码行数:27,代码来源:task1_instance1.c

示例3: test_t1_instance2

/*test case:test the reaction of the system called with 
 an activation of a task*/
static void test_t1_instance2(void)
{
	ApplicationType result_app_1;
	StatusType result_inst_1, result_inst_2, result_inst_3, result_inst_4;
	ScheduleTableStatusType ScheduleTableStatusType_inst_1;
	TickType TickType_inst_1;
	
	SCHEDULING_CHECK_INIT(10);
	result_app_1 = GetApplicationID(); 
	SCHEDULING_CHECK_AND_EQUAL_INT(10, app1, result_app_1);
	
	SCHEDULING_CHECK_INIT(11);
	result_inst_1 = GetAlarm(Alarm1, &TickType_inst_1); 
	SCHEDULING_CHECK_AND_EQUAL_INT(11, E_OS_NOFUNC, result_inst_1);
		
	SCHEDULING_CHECK_INIT(12);
	result_inst_2 = GetScheduleTableStatus(sched1, &ScheduleTableStatusType_inst_1);
	SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(12 , SCHEDULETABLE_STOPPED , ScheduleTableStatusType_inst_1);
	SCHEDULING_CHECK_AND_EQUAL_INT(12, E_OK, result_inst_2);
	
	SCHEDULING_CHECK_INIT(13);
	result_inst_3 = ReleaseResource(Resource1); 
	SCHEDULING_CHECK_AND_EQUAL_INT(13, E_OS_NOFUNC, result_inst_3);
	
	SCHEDULING_CHECK_INIT(14);
	result_inst_4 = TerminateApplication(app1, NO_RESTART); 
	SCHEDULING_CHECK_AND_EQUAL_INT(140, E_OK, result_inst_4);
			
}
开发者ID:TrampolineRTOS,项目名称:trampoline,代码行数:31,代码来源:task1_instance2.c

示例4: 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();

}
开发者ID:1984c,项目名称:trampoline,代码行数:29,代码来源:task2_instance.c

示例5: 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();

}
开发者ID:1984c,项目名称:trampoline,代码行数:31,代码来源:task2_instance.c

示例6: 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);
	
}
开发者ID:1984c,项目名称:trampoline,代码行数:29,代码来源:task2_instance.c

示例7: 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);
}
开发者ID:TrampolineRTOS,项目名称:trampoline,代码行数:29,代码来源:task2_instance.c

示例8: test_t2_instance1

static void test_t2_instance1(void)
{
  Std_ReturnType result_inst_1, result_inst_2, result_inst_3, result_inst_4;

  TestType1 data1 = 0x00;
  TestType2 data2;
  data2.a=0x00;
  data2.b=0x00;


  SCHEDULING_CHECK_INIT(4);
  result_inst_1 = IocSendGroup_ioc1(data1, &data2);
  SCHEDULING_CHECK_AND_EQUAL_INT(4,IOC_E_NOT_OK, result_inst_1);
	
  SCHEDULING_CHECK_INIT(5);
  result_inst_2 = IocReceiveGroup_ioc1(&data1, &data2);
  SCHEDULING_CHECK_AND_EQUAL_INT(5,IOC_E_OK, result_inst_2);	
	
  SCHEDULING_CHECK_INIT(6);
  result_inst_3 = IocSendGroup_ioc2(data1, &data2);
  SCHEDULING_CHECK_AND_EQUAL_INT(6,IOC_E_OK, result_inst_3);
	
  SCHEDULING_CHECK_INIT(7);
  result_inst_4 = IocReceiveGroup_ioc2(&data1, &data2);
  SCHEDULING_CHECK_AND_EQUAL_INT(7,IOC_E_NOT_OK, result_inst_4);

  SCHEDULING_CHECK_STEP(8);

}
开发者ID:TrampolineRTOS,项目名称:trampoline,代码行数:29,代码来源:task2_instance.c

示例9: test_t1_instance

static void test_t1_instance(void)
{
  Std_ReturnType result_inst_1, result_inst_2, result_inst_3;
  StatusType result_inst_4;

  TestType1 data1 = 0x01;
  TestType2 data2;
  data2.a=0x01;
  data2.b=0x02;
	
  /* test write on simple data type */
  SCHEDULING_CHECK_INIT(5);
  result_inst_1 = IocWrite_ioc1(data1);
  SCHEDULING_CHECK_AND_EQUAL_INT(5,IOC_E_OK, result_inst_1);
	
  /* test write on complex data type */
  SCHEDULING_CHECK_INIT(6);
  result_inst_2 = IocWrite_ioc2(&data2);
  SCHEDULING_CHECK_AND_EQUAL_INT(6,IOC_E_OK, result_inst_2);
	
  /* test write with several senders */
  SCHEDULING_CHECK_INIT(7);
  data2.a=0x0A;
  data2.b=0x0B;
  result_inst_3 = IocWrite_ioc3_sender1(&data2);
  SCHEDULING_CHECK_AND_EQUAL_INT(7,IOC_E_OK, result_inst_3);

  SCHEDULING_CHECK_INIT(8);
  result_inst_4 = ActivateTask(t2);
  SCHEDULING_CHECK_AND_EQUAL_INT(12,E_OK, result_inst_4);


  SCHEDULING_CHECK_STEP(13);

}
开发者ID:1984c,项目名称:trampoline,代码行数:35,代码来源:task1_instance.c

示例10: 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_4,result_inst_5,result_inst_6,result_inst_7;
	TaskStateType result_inst_3;
	
	SCHEDULING_CHECK_INIT(1);
	result_inst_1 = ActivateTask(t2);
	SCHEDULING_CHECK_AND_EQUAL_INT(4 , E_OK , result_inst_1);
	
	SCHEDULING_CHECK_INIT(5);
	result_inst_4 = GetTaskState(t2,&result_inst_3);
	SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(5 , WAITING , result_inst_3);
	SCHEDULING_CHECK_AND_EQUAL_INT(5 , E_OK , result_inst_4);
	
	SCHEDULING_CHECK_INIT(6);
	result_inst_5 = ActivateTask(t2);
	SCHEDULING_CHECK_AND_EQUAL_INT(6 , E_OS_LIMIT , result_inst_5);
	
	SCHEDULING_CHECK_INIT(7);
	result_inst_6 = ChainTask(t2);
	SCHEDULING_CHECK_AND_EQUAL_INT(7 , E_OS_LIMIT , result_inst_6);	
	
	SCHEDULING_CHECK_INIT(8);
	result_inst_7 = SetEvent(t2,Event2);
	SCHEDULING_CHECK_AND_EQUAL_INT(10 , E_OK , result_inst_7);

}
开发者ID:TrampolineRTOS,项目名称:trampoline,代码行数:29,代码来源:task1_instance.c

示例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_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);
	
}
开发者ID:1984c,项目名称:trampoline,代码行数:27,代码来源:task2_instance.c

示例12: test_pretask_instance2

/*test case:test the reaction of the system called with 
 an activation of a task*/
static void test_pretask_instance2(void)
{
	StatusType result_inst_1, result_inst_2, result_inst_3, result_inst_4, result_inst_5;
	TaskType task_id;
	TaskStateType task_state;
	EventMaskType event_mask;
	AlarmBaseType alarm_base;
	TickType tik;
	
	SCHEDULING_CHECK_INIT(15);
	result_inst_1 = GetTaskID(&task_id);
	SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(15,INVALID_TASK , task_id); 
	SCHEDULING_CHECK_AND_EQUAL_INT(15,E_OK , result_inst_1); 
	
	SCHEDULING_CHECK_INIT(16);
	result_inst_2 = GetTaskState(task_id, &task_state);
	SCHEDULING_CHECK_AND_EQUAL_INT(17,E_OS_ID , result_inst_2);
	
	SCHEDULING_CHECK_INIT(18);
	result_inst_3 = GetEvent(task_id,&event_mask);
	SCHEDULING_CHECK_AND_EQUAL_INT(19,E_OS_ID , result_inst_3);
	
	SCHEDULING_CHECK_INIT(20);
	result_inst_4 = GetAlarmBase(Alarm1, &alarm_base);
	SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(20,OSMAXALLOWEDVALUE_Counter1, (int)(alarm_base.maxallowedvalue));
	SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(20,OSTICKSPERBASE_Counter1, (int)(alarm_base.ticksperbase));
	SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(20,OSMINCYCLE_Counter1, (int)(alarm_base.mincycle));
	SCHEDULING_CHECK_AND_EQUAL_INT(20,E_OK , result_inst_4);
	
	SCHEDULING_CHECK_INIT(21);
	result_inst_5 = GetAlarm(Alarm1,&tik);
	SCHEDULING_CHECK_AND_EQUAL_INT(21,E_OK , result_inst_5);
}
开发者ID:TrampolineRTOS,项目名称:trampoline,代码行数:35,代码来源:pretask_instance2.c

示例13: test_t2_instance2

/*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);
}
开发者ID:TrampolineRTOS,项目名称:trampoline,代码行数:14,代码来源:task2_instance2.c

示例14: test_t7_instance

/*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);
}
开发者ID:TrampolineRTOS,项目名称:trampoline,代码行数:14,代码来源:task7_instance.c

示例15: test_t4_instance

/*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);
}
开发者ID:1984c,项目名称:trampoline,代码行数:14,代码来源:task4_instance.c


注:本文中的SCHEDULING_CHECK_AND_EQUAL_INT函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。