/*test case:test the reaction of the system called with 
 an activation of a task*/
static void test_error_instance3(void)
{
	StatusType result_inst_1;
	
	SCHEDULING_CHECK_INIT(16);
	result_inst_1 = OSErrorGetServiceId();
	SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(16,OSServiceId_SetRelAlarm , result_inst_1);
	SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(16, 0 , OSError_SetRelAlarm_increment());
	SCHEDULING_CHECK_AND_EQUAL_INT_FIRST(16, 0 , OSError_SetRelAlarm_cycle());
	SCHEDULING_CHECK_AND_EQUAL_INT(16, Alarm_ActivateTask , OSError_SetRelAlarm_AlarmID());
		
}
Exemple #2
0
/* Set global variables to the hook API call parameters. This is called from the
 * error hook so that outside the error hook the test code can see what was passed
 * through.
 * 
 * $Req: artf1230 $
 */
void set_error_hook_parameters(OSServiceIdType service)
{
	switch(service) {
		case OSServiceId_NoServiceId:
			break;
		case OSServiceId_GetAlarm:
			param_AlarmType = OSError_GetAlarm_AlarmID();
			param1_TickRefType = OSError_GetAlarm_Tick();
			break;
		case OSServiceId_SetRelAlarm:
			param_AlarmType = OSError_SetRelAlarm_AlarmID();
			param1_TickType = OSError_SetRelAlarm_increment();
			param2_TickType = OSError_SetRelAlarm_cycle();
			break;
		case OSServiceId_SetAbsAlarm:
			param_AlarmType = OSError_SetAbsAlarm_AlarmID();
			param1_TickType = OSError_SetAbsAlarm_start();
			param2_TickType = OSError_SetAbsAlarm_cycle();
			break;
		case OSServiceId_CancelAlarm:
			param_AlarmType = OSError_CancelAlarm_AlarmID();
			break;
		case OSServiceId_GetActiveApplicationMode:
			param_AppModeType = OSError_StartOS_Mode();
			break;
		case OSServiceId_StartOS:
			break;
		case OSServiceId_ShutdownOS:
			break;
		case OSServiceId_ActivateTask:
			param_TaskType = OSError_ActivateTask_TaskID();
			break;
		case OSServiceId_TerminateTask:
			break;
		case OSServiceId_ChainTask:
			param_TaskType = OSError_ChainTask_TaskID();
			break;
		case OSServiceId_Schedule:
			break;
		case OSServiceId_GetTaskState:
			param_TaskType = OSError_GetTaskState_TaskID();
			param_TaskStateRefType = OSError_GetTaskState_State();
			break;
		case OSServiceId_GetResource:
			param_ResourceType = OSError_GetResource_ResID();
			break;
		case OSServiceId_ReleaseResource:
			param_ResourceType = OSError_ReleaseResource_ResID();
			break;
		case OSServiceId_SetEvent:
			param_EventMaskType = OSError_SetEvent_Mask();
			param_TaskType = OSError_SetEvent_TaskID();
			break;
		case OSServiceId_ClearEvent:
			param_EventMaskType = OSError_ClearEvent_Mask();
			break;
		case OSServiceId_GetEvent:
			param_TaskType = OSError_GetEvent_TaskID();
			param_EventMaskRefType = OSError_GetEvent_Event();
			break;
		case OSServiceId_WaitEvent:
			param_EventMaskType = OSError_WaitEvent_Mask();
			break;
		case OSServiceId_IncrementCounter:
			param_CounterType = OSError_IncrementCounter_CounterID();
			break;
		case OSServiceId_ExpireCounter:
			param_CounterType = OSError_ExpireCounter_CounterID();
			break;
		case OSServiceId_StartScheduleTableRel:
			param1_ScheduleTableType = OSError_StartScheduleTableRel_ScheduleTableID();
			param1_TickType = OSError_StartScheduleTableRel_Offset();
			break;
		case OSServiceId_StartScheduleTableAbs:
			param1_ScheduleTableType = OSError_StartScheduleTableAbs_ScheduleTableID();
			param1_TickType = OSError_StartScheduleTableAbs_Tickvalue();
			break;
		case OSServiceId_NextScheduleTable:
			param1_ScheduleTableType = OSError_NextScheduleTable_ScheduleTableID_current();
			param2_ScheduleTableType = OSError_NextScheduleTable_ScheduleTableID_next();
			break;
		case OSServiceId_StopScheduleTable:
			param1_ScheduleTableType = OSError_StopScheduleTable_ScheduleTableID();
			break;
		case OSServiceId_GetScheduleTableStatus:
			param1_ScheduleTableType = OSError_GetScheduleTableStatus_ScheduleID();
			param_ScheduleTableStatusRefType = OSError_GetScheduleTableStatus_ScheduleStatus();
			break;
		case OSServiceId_GetAlarmBase:
			param_AlarmType = OSError_GetAlarmBase_AlarmID();
			param_AlarmBaseRefType = OSError_GetAlarmBase_Info();
			break;
		case OSServiceId_GetCounterValue:
			param_CounterType = OSError_GetCounterValue_CounterID();
			param1_TickRefType = OSError_GetCounterValue_Value();
		case OSServiceId_GetElapsedCounterValue:
			param_CounterType = OSError_GetElapsedCounterValue_CounterID();
			param1_TickRefType = OSError_GetElapsedCounterValue_Value();
			param2_TickRefType = OSError_GetElapsedCounterValue_ElapsedValue();
		case OSServiceId_ControlDevice:
			break;
	}
}