Skip to content

Network messages

Benedek Horvath edited this page Sep 7, 2017 · 22 revisions

Messages are separated for two categories: command and state. The previous one is to send command to the recipient for which it replies with a state / status response.

The messages as of 07.09.2017 are defined by the Protocol Buffers (protobuf) format. They are inside the hu.bme.mit.inf.modes3.messaging.proto project, in the /src/main/proto folder. In order to generate Java classes from the proto files, you should:

  1. install gradle on your machine,

  2. go to the root java folder of the repository,

  3. execute the following commands in command-line: ./gradlew :messaging:hu.bme.mit.inf.modes3.messaging.proto:generateProto

Notes

  • In the following sections each messages is illustrated by a screenshot created from its protobuf definition. You may notice that each field has an equation mark and a number on the right hand side that is due to the protobuf data format. One may ignore it when interpreting the different fields.

  • On the refactoring branch (API v2.0), there is a separate Java class for every message (except from the ComplexGesture and the TurnoutReferenceCommand) in the hu.bme.mit.inf.modes3.messaging.messages project. One should use this representation in a Java project, instead of the serialization dependent one.

Command messages

DccOperationsCommand

DccOperationsCommand

SegmentCommand

SegmentCommand

SendAllStatus

SendAllStatus

TrainFunctionCommand

TrainFunctionCommand

TrainReferenceSpeedCommand

TrainReferenceSpeedCommand

TurnoutCommand

TurnoutCommand

TurnoutReferenceCommand

TurnoutReferenceCommand

Status messages

ComplexGesture

ComplexGesture

ComputerVisionObjectPositions

ComputerVisionObjectPositions

DccOperationsState

DccOperationsState

SegmentOccupancy

SegmentOccupancy

SegmentState

SegmentState

TrainCurrentSegment

TrainCurrentSegment

TrainCurrentSpeed

TrainCurrentSpeed

TrainFunctionState

TrainFunctionState

TrainReferenceSpeed

TrainReferenceSpeed

TurnoutReferenceState

TurnoutReferenceState

TurnoutState

TurnoutState

Clone this wiki locally