cramph.reported_statechart#

The copy of a statechart a server runs, rebuilt from the payloads it reports the statechart in, see StatechartPayloadKey.

Classes#

ReportedStatechart

A copy of the statechart a server reports on, holding the structure and the states

Module Contents#

class cramph.reported_statechart.ReportedStatechart#

A copy of the statechart a server reports on, holding the structure and the states of the payloads it took over.

statechart: cramph.statechart.Statechart | None = None#

The copy, None until a payload carried the structure of a statechart.

take_over(payload: dict[str, Any]) → None#

Take over the structure, the joined nodes and the states payload reports.

A payload arriving before any structure is ignored, since its states belong to nodes this copy does not know.

Parameters:

payload – A payload of the server.