com.azalient.api.b.control
Interface ITurn

All Superinterfaces:
IRecord, IRestrictable, RecordR, RecordRW, RecordW, SortableData, StoreRecordRW

public interface ITurn
extends IRestrictable, StoreRecordRW

A Turn represents a traffic movement, from an intersection approach link to an intersection exit link. Each turn must have at least one stream.

(Side note for filter turns) If there is a filter lane making a kerb-side turn, and there are no streams making the turn, then there will be no Turn object for that movement.


Field Summary
static char DIVIDER
           
static char TURN_TO
           
static ITurn[] ZERO
          A static zero-length array, created for convenience, and to save memory
 
Fields inherited from interface com.azalient.api.a.tables.IRecord
DELETED, KEY_SEP, KEY_SEP_CHAR
 
Method Summary
 void addStream(IStream m)
           
 ITurn[] conflictingTurns()
          Returns an array of any turns that conflict with this one.
 void delStream(IStream m)
           
 Equipment equipment()
          The type of signalling equipment available for this turn
 void equipment(Equipment eq)
           
 IGroup filterGroup()
          The filter, or "secondary" group to which this turn belongs.
 void filterGroup(IGroup group)
           
 Signal filterSignal()
          The signal state applied when the filter group is active.
 void filterSignal(Signal signal)
           
 void fixed(Signal signal)
           
 IGroup group()
          The "primary" group to which this turn belongs.
 void group(IGroup group)
           
 boolean hasConflict()
          Returns true if this turn conflicts with any other.
 IIntersection intersection()
          The intersection on which this turn occurs
 boolean isFixed()
          Return true if the signal on this turn never changes [get value from signal()]
 UTime lastSignalChange()
          The time of the last change of the signal on this turn
 ILink linkI()
          The inward link leading to this turn - the approach
 ILink linkO()
          The outward link to which this turn leads
 int preference()
          Returns the preference level of this turn for directing traffic within a parking zone
 void preference(int p)
          Set the preference level of this turn for directing traffic within a parking zone
 IRestriction restriction()
          Any restriction attached to this turn, or null, if none.
 boolean selected()
          Return true if this object is selected in the GUI
 void selected(boolean b)
          Set to true to mark this object as being selected in the GUI
 Signal signal()
          The current signal for this turn
 void signal(Signal signal)
           
 IStream[] streams()
          The streams making up this turn
 
Methods inherited from interface com.azalient.api.b.network.IRestrictable
allows, allows, closed, closed, multipleRestrictions, multipleRestrictions, name, restriction, restrictionIndex
 
Methods inherited from interface com.azalient.api.file.StoreRecordRW
canRename, rename, store
 
Methods inherited from interface com.azalient.api.file.RecordR
extraSet, finished, isApplicable, isEditable, set
 
Methods inherited from interface com.azalient.api.a.tables.IRecord
name
 
Methods inherited from interface com.azalient.api.file.RecordW
extraCols, extraGet, extraGetB, extraGetD, extraGetI, extraGetS, extraGetT, get, isVolatile
 

Field Detail

TURN_TO

static final char TURN_TO
See Also:
Constant Field Values

DIVIDER

static final char DIVIDER
See Also:
Constant Field Values

ZERO

static final ITurn[] ZERO
A static zero-length array, created for convenience, and to save memory

Method Detail

intersection

IIntersection intersection()
The intersection on which this turn occurs


streams

IStream[] streams()
The streams making up this turn


hasConflict

boolean hasConflict()
Returns true if this turn conflicts with any other. Two turns conflict if any stream in one turn conflicts with any stream in the other turn


conflictingTurns

ITurn[] conflictingTurns()
Returns an array of any turns that conflict with this one. Two turns conflict if any stream in one turn conflicts with any stream in the other turn


signal

Signal signal()
The current signal for this turn


group

IGroup group()
The "primary" group to which this turn belongs. A turn may not have a primary group, for example if it has a fixed signal


filterGroup

IGroup filterGroup()
The filter, or "secondary" group to which this turn belongs. A filter group is active for a turn if the intersection is signalised, and the primary group is either null, or has state Signal.OFF. When a filter group is active, the signal state returned by filterSignal() is applied to the turn


filterSignal

Signal filterSignal()
The signal state applied when the filter group is active. In a typical configuration, this will be set to GREEN_YIELD, which means that traffic signalled by this group can proceed, but will yield to oncoming traffic on a conflicting stream.


isFixed

boolean isFixed()
Return true if the signal on this turn never changes [get value from signal()]


restriction

IRestriction restriction()
Any restriction attached to this turn, or null, if none. Each turn may have at most one restriction.

Specified by:
restriction in interface IRestrictable

equipment

Equipment equipment()
The type of signalling equipment available for this turn


linkI

ILink linkI()
The inward link leading to this turn - the approach


linkO

ILink linkO()
The outward link to which this turn leads


lastSignalChange

UTime lastSignalChange()
The time of the last change of the signal on this turn


addStream

void addStream(IStream m)
Internal - Not recommended for use. Public as a side-effect of implementation method
Add a stream to this turn

delStream

void delStream(IStream m)
Internal - Not recommended for use. Public as a side-effect of implementation method
Delete a stream from this turn

group

void group(IGroup group)
Internal - Not recommended for use. Public as a side-effect of implementation method
Set the main group for this turn

signal

void signal(Signal signal)
Internal - Not recommended for use. Public as a side-effect of implementation method
Set the currently active signal for this turn

filterGroup

void filterGroup(IGroup group)
Internal - Not recommended for use. Public as a side-effect of implementation method
Set the filter group for this turn

filterSignal

void filterSignal(Signal signal)
Internal - Not recommended for use. Public as a side-effect of implementation method
Set the filter signal for this turn (normally green yield)

fixed

void fixed(Signal signal)
Internal - Not recommended for use. Public as a side-effect of implementation method
Set the fixed signal for this turn.

equipment

void equipment(Equipment eq)
Internal - Not recommended for use. Public as a side-effect of implementation method
Set the available siganlling equipment for this turn

selected

boolean selected()
Return true if this object is selected in the GUI


selected

void selected(boolean b)
Set to true to mark this object as being selected in the GUI


preference

int preference()
Returns the preference level of this turn for directing traffic within a parking zone


preference

void preference(int p)
Set the preference level of this turn for directing traffic within a parking zone