Skip to content

Signals used in the State Machines (Distributed Logic)

Benedek Horvath edited this page May 25, 2016 · 5 revisions

Signals used in the State Machines (Distributed Logic)

Section

Incoming signals (they are declared in the Section interface):

The integer parameter contains the direction to which the turnout sends the event. If it matches with the section’s direction field, that means the section is the recipient.

  • revokeLock: if the section is locked (disabled), then try to unlock it, which means the section locking protocol (begining with sectionLockFrom: integer) is started.

  • lockRequestTo: integer: the same as sectionLockedWithReplyTo: integer.

  • sectionLockedWithReplyTo: integer: the turnout sends to the section this signal, because it would like to figure out whether there is anyone on the section. The section should reply to this signal either with a passingAllowedFrom: integer event or a passingDeniedFrom: integer event.

  • sectionLockedTo: integer: the train is not allowed to go to the turnout from this section. It must stop.

  • sectionAllowedTo: integer: the train is allowed to go to the turnout from this section.

  • sectionOccupied: the section is occupied by a train.

  • sectionFree: the section is free from any trains.

Outgoing signals (they are declared in the Section interface):

The integer parameter contains the direction to which the section sends the event. If it matches with the turnout’s direction field, that means the turnout is the recipient. (The direction indicates the connection direction from which the section connects to the turnout.)

  • passingAllowedFrom: integer: the train can come from the turnout, because the section is free.

  • passingDeniedFrom: integer: the train cannot come from the turnout, because the section is occupied.

  • sectionLockFrom: integer: the section asks the turnout whether the train can go there.

Turnout

Normal Turnout

The integer parameter contains the direction to which the section or the remote turnout sends the event. If it matches with the local turnout’s expected direction field, that means the local turnout is the recipient.

Incoming signals (they are declared in the Turnout interface):

  • turnoutStraight: the turnout is switched to straight direction (connecting sections straight and top).

  • turnoutDivergent: the turnout is switched to divergent direction (connecting sections divergent and top).

  • passingAllowedFrom: integer: the train can go to the section that connects from the integer parameter direction.

  • passingDeniedFrom: integer: the train cannot go to the section that connects from the integer parameter direction.

  • remPassageAllowedFrom: integer: the train can go to the remote turnout that connects from the integer parameter direction.

  • remPassageDeniedFrom: integer: the train cannot go to the remote turnout that connects from the integer parameter direction.

  • sectionLockFrom: integer: a train would like to come to the turnout from a section that connects from the integer parameter direction.

  • remSectionLockFrom: integera train would like to come to the turnout from a remote section that connects from the integer parameter direction.

Outgoing signals (they are declared in the Turnout interface, except the last one — remPassageDeniedToAll — that is declared in the Sections interface):

The integer parameter contains the direction to which the local turnout sends the event. If it matches with the remote turnout’s expected direction or the section’s direction field, that means the remote turnout or section is the recipient.

  • sectionAllowedTo: integer: the train is allowed to come from the section denoted by the integer parameter.

  • sectionLockedTo: integer: the train is not allowed to come (and must stop) from the section denoted by the integer parameter.

  • sectionLockedWithReplyTo: integer: the turnout tries to figure out whether there is a train on the section denoted by the integer parameter.

  • lockRequestTo: integer: the turnout tries to stop a train on the section denoted by the integer parameter (even if there is none there).

  • remShortPassageRequestTo: integer: the turnout sends a short passage request to the neighbouring turnout, that means the remote turnout shall only check that section (whether there is a train there) which is nearer to the local turnout, but not check the section that is the continuation on the other side of the turnout. So only that section shall be checked, that is nearer to the local turnout (that sends the event), but the other side of the turnout is ommited.

  • remPassageAllowedTo: integer: the train is allowed to come from the remote turnout or remote section denoted by the integer parameter.

  • remPassageDeniedTo: integer: the train is not allowed to come (and must stop) from the remote turnout or remote section denoted by the integer parameter.

  • remPassageRequestTo: integer: the local turnout sends this event to the neighbouring turnout (that connects from the direction denoted by the integer parameter), and tries to figure out whether there is any train on the neighbouring turnout’s territory (connecting sections and the turnout itself).

  • remPassageDeniedToAll: all the trains should be stopped that are on the territority (connecting sections) of the local turnout.

English Turnout

The integer parameter contains the direction to which the section or the remote turnout sends the event. If it matches with the local english turnout’s expected direction field, that means the local english turnout is the recipient.

Since the English turnout consists of two "normal turnouts" from the modeling perspective, it means the English turnout’s statechart is instantiated two times, and are interconnected via Java glue code (for details see the respective documentation). The events/signals ending with OtherHalf are those which go between these two halves, via Java glue code.

Incoming signals (they are declared in the Turnout interface):

  • turnoutStraight: the turnout is switched to straight direction (connecting sections straight and top).

  • turnoutDivergent: the turnout is switched to divergent direction (connecting sections divergent and top).

  • passingAllowedFrom: integer: the train can go to the section that connects from the integer parameter direction.

  • passingDeniedFrom: integer: the train cannot go to the section that connects from the integer parameter direction.

  • remPassageAllowedFrom: integer: the train can go to the remote turnout that connects from the integer parameter direction.

  • remPassageDeniedFrom: integer: the train cannot go to the remote turnout that connects from the integer parameter direction.

  • passingAllowedFromOtherHalfIN: the train can go to the other half of the english turnout.

  • passingDeniedFromOtherHalfIN: the train cannot go to the other half of the english turnout.

  • remPassingAllowedFromOtherHalfIN: the train can go to the remote turnout that connects from the other half of the english turnout.

  • remPassingDeniedFromOtherHalfIN: the train cannot go to the remote turnout that connects from the other half of the english turnout.

  • sectionLockFrom: integer: a train would like to come to the turnout from a section that connects from the integer parameter direction.

  • remSectionLockFrom: integera train would like to come to the turnout from a remote section that connects from the integer parameter direction.

  • remShortSectionLockFrom: integer: a train would like to come to the turnout from a remote section that connects from the integer parameter direction, but at this time only that section shall be checked that is between the english turnout and the neighbouring turnout (connecting from the integer parameter direction).

  • sectionLockFromOtherHalfIN: a train would like to come from the territory of the other half of the english turnout.

  • remSectionLockFromOtherHalfIN: a train would like to come from a remote turnout that is the neighbour of the other half of the english turnout.

Outgoing signals (they are declared in the Turnout interface, except the last one — remPassageDeniedToAll — that is declared in the Sections interface):

  • sectionAllowedTo: integer: the train is allowed to come from the section denoted by the integer parameter.

  • lockRequestTo: integer: the turnout tries to stop a train on the section denoted by the integer parameter (even if there is none there).

  • sectionLockedTo: integer: the train is not allowed to come (and must stop) from the section denoted by the integer parameter.

  • sectionLockedWithReplyTo: integer: the turnout tries to figure out whether there is a train on the section denoted by the integer parameter.

  • remPassageRequestTo: integer: the local turnout sends this event to the neighbouring turnout (that connects from the direction denoted by the integer parameter), and tries to figure out whether there is any train on the neighbouring turnout’s territory (connecting sections and the turnout itself).

  • remPassageAllowedTo: integer: the train is allowed to come from the remote turnout or remote section denoted by the integer parameter.

  • remPassageDeniedTo: integer: the train is not allowed to come (and must stop) from the remote turnout or remote section denoted by the integer parameter.

  • sectionLockFromOtherHalfOUT: a train would like to come from a section that is supervised by the "local" half of the english turnout, but the other half of the english turnout shall be checked, whether the train can go there.

  • remSectionLockFromOtherHalfOUT: a train would like to come from a remote turnout, and the other half of the english turnout shall be checked.

  • passingAllowedFromOtherHalfOUT: the train is allowed to come from the other half of the english turnout.

  • passingDeniedFromOtherHalfOUT: the train is not allowed to come from the other half of the english turnout.

  • remPassingAllowedFromOtherHalfOUT: the train is allowed to come from the remote turnout that connects to the other half of the english turnout.

  • remPassingDeniedFromOtherHalfOUT: the train is not allowed to come from the remote turnout that connects to the other half of the english turnout.

  • remPassageDeniedToAll: all the trains should be stopped that are on the territority (connecting sections) of the local turnout.

Clone this wiki locally