IFXScheduler

The IFXScheduler interface is used to initialize and drive the scheduling subsystem. It provides access to the managers such as the Collision Manager, Input Manager and Time Manager so that Event objects can be submitted and Task objects can be registered. It also exposes the current simulation and system time. It provides basic control over the simulation time during authoring. The IFXScheduler interface is derived from the IFXUnknown interface and is supported by the CIFXScheduler object.

Interface Methods

Description

Initialize

Registers an IFXCoreServices interface with the Scheduler instance

GetCollisionManager

Gets a pointer to the Collision Manager's IFXCollisionManager interface

GetInputManager

Gets a pointer to the Input Manager's IFXInputManager interface

GetNotificationManager

Gets a pointer to the Notification Manager's IFXNotificationManager interface

GetTimeManager

Gets a pointer to the Time Manager's IFXTimeManager interface

AdvanceSimulationTimeTo

Advances the simulation time to a new setting

GetSimulationFrame

Gets the simulation frame number

GetSimulationState

Gets the simulation state

GetSimulationTime

Gets the simulation time in milliseconds

GetSimulationTimeDelta

Gets the elapsed simulation time in milliseconds

GetSystemTime

Gets the system time in milliseconds

ResetSimulation

Resets the simulation

ResetSimulationTime

Resets the simulation time to zero, but does not reset the managers

NotifyPause

Sets a pause notification

ServiceManagers

Gives the Scheduler an opportunity to service each of its managers and update the simulation prior to rendering a frame

SetSimulationState

Sets the simulation state

UnregisterTask

Unregisters the task identified by taskHandle

AddTaskMonitor

Registers a task which monitors another task

RemoveTaskMonitor

Unregisters the monitor task identified by taskHandle


IFXScheduler::Initialize(IFXCoreServices *)

Initializes the component.

Parameters:

pCoreServices

pointer to the IFXCoreServices object

Return Values


IFXScheduler::GetCollisionManager(IFXCollisionManager **p)

Gets a pointer to the Collision Manager.

Parameters:

**p

Pointer to an IFXCollisionManager pointer, which will be initialized with the Collision Manager object

Return Values


IFXScheduler::GetInputManager(IFXInputManager **p)

Gets a pointer to the Input Manager.

Parameters:

**p

Pointer to an IFXInputManager pointer, which will be initialized with the Input Manager object.

Return Values


IFXScheduler::GetNotificationManager(IFXNotificationManager **p)

Gets a pointer to the Notification Manager.

Parameters:

**p

Pointer to an IFXNotificationManager pointer, which will be initialized with the Notification Manager object.

Return Values


IFXScheduler::GetTimeManager(IFXTimeManager **p)

Gets a pointer to the Time Manager.

Parameters:

**p

Pointer to an IFXTimeManager pointer, which will be initialized with the Time Manager object.

Return Values


IFXScheduler::AdvanceSimulationTimeTo(U32 newtime)

Advances the simulation time to a new setting.

Parameters:

newtime

Integer that will be set to the new time

Return Values


IFXScheduler::GetSimulationFrame(U32 * pFrameNumber)

Gets the current simulation frame.

Parameters:

*pFrameNumber

Pointer to an integer that will be set to the current frame number

Return Values


IFXScheduler::GetSimulationState(BOOL *pState)

Gets the current simulation state (running or stopped).

Parameters:

*pState

Pointer to a BOOL that will be set to the current state. A value of TRUE indicates that the simulation clock is running, while a value of FALSE indicates that the simulation clock is stopped.

Return Values


IFXScheduler::GetSimulationTime(U32 *pTime)

Gets the current simulation time. The simulation time is the zero-based time in milliseconds since the simulation was started. Simulation time does not advance while the simulation state is stopped.

Parameters:

*pTime

Pointer to an integer that will be set to the current simulation time

Return Values


IFXScheduler::GetSimulationTimeDelta(U32 *pTime)

Gets the time delta since the last frame, which is the elapsed time since the start of the current frame and the start of the last frame.

Parameters:

*pTime

Pointer to an integer that will be set to the simulation time delta

Return Values


IFXScheduler::GetSystemTime(U32 *pTime)

Gets the current system time. The system time is the actual zero-based time in milliseconds since the Scheduler was created. System time advances even when the simulation state is stopped.

Parameters:

*pTime

pointer to a U32 which will be set to the current system time

Return Values


IFXScheduler::ResetSimulation()

Resets the simulation and all the managers to initial startup conditions. Any tasks which have been registered with the managers are unregistered and released.

Parameters:

None

Return Values


IFXScheduler::ResetSimulationTime()

Resets the simulation time to zero, but does not reset the managers. Any jobs which are currently registered will still be registered.

Parameters:

None

Return Values


IFXScheduler::NotifyPause()

Parameters:

None

Return Values


IFXScheduler::ServiceManagers(BOOL *jobExecuted)

Services the managers. This should only be called once per frame.

Parameters:

*jobExecuted

Pointer to a BOOL which will be set to TRUE if and only if one or more tasks were executed during the course of servicing the managers

Return Values


IFXScheduler::SetSimulationState(BOOL start)

Sets the simulation state to running or stopped. This controls whether or not the simulation time advanced, which in turn determines whether or not time tasks are executed or animations are played. If the simulation is stopped and set to running, it picks up where it left off, so this can also be used as a pause/resume function.

Parameters:

start

If TRUE, the simulation state is set to run. If FALSE, the simulation state is set to stopped.

Return Values


IFXScheduler::UnregisterTask(IFXTaskHandle taskHandle)

Unregisters the task identified by taskHandle, regardless of the manager it is registered with.

Parameters:

taskHandle

An IFXTaskHandle which uniquely identifies a registered task. Task Handles are generated and returned by the RegisterTask method on each manager.

Return Values


IFXScheduler::AddTaskMonitor(IFXTaskMonitor * p, IFXTaskHandle task_id, IFXTaskHandle * monitor_id)

Registers a task which monitors another task. Task monitors are used to obtain notification when a task fails and returns an error code. If no monitor is assigned to a task, any failure will be ignored. Multiple monitors may be assigned to a given taskHandle. As the IFXTaskMonitor is itself a task, this method returns a taskHandle which uniquely identifies the monitor task and allows it to be removed by RemoveTaskMonitor. It is possible to monitor an IFXTaskMonitor.

Parameters:

* p

Pointer to an IFXTaskMonitor interface which will receive notifications about the task identified by taskHandle

task_id

Identifies the task to be monitored

monitor_id

The task handle for the IFXTaskMonitor task

Return Values


IFXScheduler::RemoveTaskMonitor(IFXTaskHandle monitor_id)

Unregisters the monitor task identified by taskHandle.

Parameters:

monitor_id

Identifies the monitor task to be removed

Return Values

 

§See asterisked (*) statement at Legal Information © 2001 Intel Corporation.