Documentation Set for Swarm 2.2
Prev | Reference III. Activity Library | Next

# Schedule

## Name

Schedule -- A collection of actions ordered by time values.

## Description

A schedule is compound action whose basic representation is a sorted Map of actions that have been created within it. The key value associated with each of these actions is an unsigned integer value for which the typedef timeval_t is supplied.

A schedule inherits its underlying representation from the Map type of the collections library. All the members of the ordered set must consist only of actions that are created by one of the createAction messages defined on Schedule itself. Once the actions are created, they may be accessed or traversed using standard messages of the Map type. The key values of this collection, however, must be cast to and from the id type defined for key values by the Map type.

The messages to create actions within a schedule are essentially the same as those for ActionGroup, except for the presence of an initial at: argument indicating the time at which an action is to be performed. Except for the time associated with each action, meaning of the createAction messages is the same as for ActionGroup.

When multiple actions are all scheduled at the same time, they are all inserted into a concurrent action group created for that time value. The ConcurrentGroupType option may be used to override the default action group for these concurrent actions by a custom user-defined subclass. (.. Details of doing this are not yet documented, but there are examples.)

## Protocols adopted by Schedule

Map CompoundAction ActionCreating RelativeTime RepeatInterval ConcurrentGroupType SingletonGroups CREATABLE

## Methods

### Phase: Creating

- - setKeepEmptyFlag: (BOOL)keepEmptyFlag
  Indicate whether an empty schedule should be dropped and ignored or or kept and attended to (default is YES).

- + create: (id <Zone>)aZone setAutoDrop: (BOOL)autoDrop
  Convenience method for creating an AutoDrop Schedule

- + create: (id <Zone>)aZone setRepeatInterval: (timeval_t)rptInterval
  Convenience method for creating a repeating Schedule

### Phase: Using

- - (id <ActionGroup>)insertGroup: (timeval_t)tVal

- - remove: anAction
  Remove action from either schedule or concurrent group.

- - (id <FActionForEachHomogeneous>)at: (timeval_t)tVal createFActionForEachHomogeneous: target call: (id <FCall>)call

- - (id <FActionForEachHeterogeneous>)at: (timeval_t)tVal createFActionForEachHeterogeneous: target call: (id <FCall>)call

- - (id <ActionForEach>)at: (timeval_t)tVal createActionForEach: target message: (SEL)aSel

- - (id <ActionForEach>)at: (timeval_t)tVal createActionForEach: target message: (SEL)aSel : arg1

- - (id <ActionForEach>)at: (timeval_t)tVal createActionForEach: target message: (SEL)aSel : arg1 : arg2

- - (id <ActionForEach>)at: (timeval_t)tVal createActionForEach: target message: (SEL)aSel : arg1 : arg2 : arg3

- - (id <ActionForEachHomogeneous>)at: (timeval_t)tVal createActionForEachHomogeneous: target message: (SEL)aSel

- - (id <ActionTo>)at: (timeval_t)tVal createActionTo: target message: (SEL)aSel

- - (id <ActionTo>)at: (timeval_t)tVal createActionTo: target message: (SEL)aSel : arg1

- - (id <ActionTo>)at: (timeval_t)tVal createActionTo: target message: (SEL)aSel : arg1 : arg2

- - (id <ActionTo>)at: (timeval_t)tVal createActionTo: target message: (SEL)aSel : arg1 : arg2 : arg3

- - (id <ActionCall>)at: (timeval_t)tVal createActionCall: (func_t)fptr

- - (id <ActionCall>)at: (timeval_t)tVal createActionCall: (func_t)fptr : arg1

- - (id <ActionCall>)at: (timeval_t)tVal createActionCall: (func_t)fptr : arg1 : arg2

- - (id <ActionCall>)at: (timeval_t)tVal createActionCall: (func_t)fptr : arg1 : arg2 : arg3

- - (id <FAction>)at: (timeval_t)tVal createFAction: (id <FCall>)call

- - at: (timeval_t)tVal createAction: anActionType

Prev | Home | Next
RepeatInterval | Up | ScheduleActivity