Next: Entities
Up: The Main Task
Previous: The Main Task
Contents
Main Task is a framework for running entities that provide services, and for
controlling network devices. It is responsible for system initialization,
reconfiguration, and communication of the reconfiguration events to the
various entities, which in turn correspond with the functional tasks.
Main Task is also responsible for coordinating dependencies between entities
and network devices. For example, it coordinates between a DSL PPP link and a
dependent underlying ATM device.
Since OpenRG is a single-thread-single-process, operations should never perform
blocking actions. Blocking actions are handled by an event dispatch loop. Main Task provides a callback mechanism to enable actions to be performed while other
actions wait for a result.
Main Task's general behavior is as follows:
- Main Task runs a task for the first time by calling the task's
open() function.
- During the task's life cycle, it may need to wait for an external
event to occur. This delay may be the result of the task waiting for a
timeout or a packet.
- The task will register a request for the desired event in Main Task's
event dispatch loop, specifying a callback function, and return to its
caller - usually Main Task.
- When the registered event occurs, the dispatch loop invokes the
callback function to handle the event.
Next: Entities
Up: The Main Task
Previous: The Main Task
Contents
Jungo Software Technologies