Data Structures | Typedefs | Enumerations | Functions | Variables

Programmable Signals.

Data Structures

struct  SignalProgram
 The actual programmable signal information. More...
struct  EnumPropsT< SignalOpcode >
class  SignalInstruction
 Signal instruction base class. More...
class  SignalCondition
class  SignalSimpleCondition
 Simple condition code. More...
class  SignalVariableCondition
 A conditon based upon comparing a variable and a value. More...
class  SignalStateCondition
 A condition which is based upon the state of another signal. More...
class  SignalSpecial
 The special start and end pseudo instructions. More...
class  SignalIf
 If signal instruction. More...
class  SignalSet
 Set signal instruction. More...

Typedefs

typedef SmallVector
< SignalInstruction *, 4 > 
InstructionList
typedef std::map
< SignalReference,
SignalProgram * > 
ProgramList
typedef std::map
< SignalReference, uint16 > 
SpeedLimits

Enumerations

enum  SignalOpcode {
  PSO_FIRST = 0, PSO_LAST = 1, PSO_IF = 2, PSO_IF_ELSE = 3,
  PSO_IF_ENDIF = 4, PSO_SET_SIGNAL = 5, PSO_END, PSO_INVALID = 0xFF
}
 

Programmable Signal opcode.

More...
enum  SignalConditionCode {
  PSC_ALWAYS = 0, PSC_NEVER = 1, PSC_NUM_GREEN = 2, PSC_NUM_RED = 3,
  PSC_SIGNAL_STATE = 4, PSC_MAX = PSC_SIGNAL_STATE
}
 

Programmable Signal condition code.

More...
enum  SignalComparator {
  SGC_EQUALS = 0, SGC_NOT_EQUALS = 1, SGC_LESS_THAN = 2, SGC_LESS_THAN_EQUALS = 3,
  SGC_MORE_THAN = 4, SGC_MORE_THAN_EQUALS = 5, SGC_IS_TRUE = 6, SGC_IS_FALSE = 7,
  SGC_LAST = SGC_IS_FALSE
}
 

Comparator to use for variable conditions.

More...
enum  SignalConditionField { SCF_COMPARATOR = 0, SCF_VALUE = 1 }
 

Which field to modify in a condition.

More...

Functions

static bool HasProgrammableSignals (SignalReference ref)
static bool HasSpeedSignals (SignalReference ref)
void ShowSignalProgramWindow (SignalReference ref)
void ShowSpeedSignalWindow (SignalReference ref)
SignalProgramGetSignalProgram (SignalReference ref)
uint16 GetSignalSpeed (SignalReference ref)
void FreeSignalProgram (SignalReference ref)
void FreeSignalPrograms ()
void FreeSignalSpeed (SignalReference ref)
void FreeSignalSpeeds ()
SignalState RunSignalProgram (SignalReference ref, uint num_exits, uint num_green)
void RemoveProgramDependencies (SignalReference by, SignalReference on)

Variables

ProgramList _signal_programs
SpeedLimits _speedlimits

Enumeration Type Documentation

Comparator to use for variable conditions.

Enumerator:
SGC_EQUALS 

the variable is equal to the specified value.

SGC_NOT_EQUALS 

the variable is not equal to the specified value.

SGC_LESS_THAN 

the variable is less than specified value.

SGC_LESS_THAN_EQUALS 

the variable is less than or equal to the specified value.

SGC_MORE_THAN 

the variable is greater than the specified value.

SGC_MORE_THAN_EQUALS 

the variable is grater than or equal to the specified value.

SGC_IS_TRUE 

the variable is true (non-zero).

SGC_IS_FALSE 

the variable is false (zero).

Definition at line 167 of file programmable_signals.h.

Programmable Signal condition code.

These discriminate conditions in much the same way that SignalOpcode discriminates instructions.

Enumerator:
PSC_ALWAYS 

Always true.

PSC_NEVER 

Always false.

PSC_NUM_GREEN 

Number of green signals behind this signal.

PSC_NUM_RED 

Number of red signals behind this signal.

PSC_SIGNAL_STATE 

State of another signal.

Definition at line 126 of file programmable_signals.h.

Which field to modify in a condition.

A parameter to CMD_MODIFY_SIGNAL_INSTRUCTION.

Enumerator:
SCF_COMPARATOR 

the comparator (value from SignalComparator enum).

SCF_VALUE 

the value (integer value).

Definition at line 181 of file programmable_signals.h.

Programmable Signal opcode.

Opcode types are discriminated by this enumeration. It is primarily used for code which must be able to inspect the type of a signal operation, rather than evaluate it (such as the programming GUI).

Enumerator:
PSO_FIRST 

Start pseudo instruction.

PSO_LAST 

End pseudo instruction.

PSO_IF 

If instruction.

PSO_IF_ELSE 

If Else pseudo instruction.

PSO_IF_ENDIF 

If Endif pseudo instruction.

PSO_SET_SIGNAL 

Set signal instruction.

Definition at line 53 of file programmable_signals.h.