Federated Execution Protocol - lf-lang/lingua-franca GitHub Wiki

Overview

NOTE: This page is a work-in-progress.

This page describes the network protocol used in Lingua Franca federated execution.

Types of Messages

FIXME: Add types of messages.

Protocol Details

FIXME: Add more protocol details.

Stop Request Protocol

Overview of the algorithm:

When any federate calls lf_requestStop(), it will send a MSG_TYPE_STOP_REQUEST message to the RTI, which will then forward a MSG_TYPE_STOP_REQUEST message to any federate that has not yet provided a stop time to the RTI. The federates will reply with a MSG_TYPE_STOP_REQUEST_REPLY and a stop tag (which shall be the maximum of their current logical tag at the time they receive the MSG_TYPE_STOP_REQUEST and the tag of the stop request). When the RTI has gathered all the stop tags from federates (that are still connected), it will decide on a common stop tag which is the maximum of the seen stop tag and answer with a MSG_TYPE_STOP_GRANTED. The federate sending the MSG_TYPE_STOP_REQUEST and federates sending the MSG_TYPE_STOP_REQUEST_REPLY will freeze the advancement of tag until they receive the MSG_TYPE_STOP_GRANTED message, in which case they might continue their execution until the stop tag has been reached.