Topics

PlantUML Question


Dave Sand
 

I am trying to document the initialization sequence for advanced block routing. This is used by SML and NX.

When a layout block has a block routing change to broadcast, it creates a RoutingPacket which is sent using firePropertyChange.

The neighbors, which listen for property changes from their neighbors, receive the PropertyChangeEvent and use the RoutingPacket content to make local changes which may result in more RoutingPackets being sent by firePropertyChange.

The final result is each layout block has a complete list of reachable blocks and the number of hops, along with other information, to a possible destination.

The question is whether something like this can be described using PlantUML and if so, which type?

Dave Sand


Bob Jacobsen
 

That’s a sequence diagram:

https://plantuml.com/sequence-diagram

It’s a bit hard to draw because it’s a somewhat unbounded process without a clear set of involved objects. But you could show some representative examples.

Bob

On Jun 1, 2020, at 12:38 PM, Dave Sand <@davesand> wrote:

I am trying to document the initialization sequence for advanced block routing. This is used by SML and NX.

When a layout block has a block routing change to broadcast, it creates a RoutingPacket which is sent using firePropertyChange.

The neighbors, which listen for property changes from their neighbors, receive the PropertyChangeEvent and use the RoutingPacket content to make local changes which may result in more RoutingPackets being sent by firePropertyChange.

The final result is each layout block has a complete list of reachable blocks and the number of hops, along with other information, to a possible destination.

The question is whether something like this can be described using PlantUML and if so, which type?

Dave Sand

--
Bob Jacobsen
@BobJacobsen


Dave Sand
 

Bob,

That is what I have started with but I am not sure how best to convey the LayoutBlock > RoutingPacket > firePropertyChange > neighbor LayoutBlock PropertyChangeEvent sequence.


Dave Sand



----- Original message -----
From: Bob Jacobsen <rgj1927@...>
Subject: Re: [jmri-developers] PlantUML Question
Date: Monday, June 01, 2020 2:41 PM

That’s a sequence diagram:


It’s a bit hard to draw because it’s a somewhat unbounded process without a clear set of involved objects.  But you could show some representative examples.

Bob

> On Jun 1, 2020, at 12:38 PM, Dave Sand <ds@...> wrote:

> I am trying to document the initialization sequence for advanced block routing. This is used by SML and NX.

> When a layout block has a block routing change to broadcast, it creates a RoutingPacket which is sent using firePropertyChange.

> The neighbors, which listen for property changes from their neighbors, receive the PropertyChangeEvent and use the RoutingPacket content to make local changes which may result in more RoutingPackets being sent by firePropertyChange.

> The final result is each layout block has a complete list of reachable blocks and the number of hops, along with other information, to a possible destination.

> The question is whether something like this can be described using PlantUML and if so, which type?

> Dave Sand



--
Bob Jacobsen






Paul Bender
 

On Jun 1, 2020, at 3:51 PM, Dave Sand <@davesand> wrote:
That is what I have started with but I am not sure how best to convey the LayoutBlock > RoutingPacket > firePropertyChange > neighbor LayoutBlock PropertyChangeEvent sequence.
You have multiple layout block actors.

At dime point, the neighbor has to register to receive property changes. You put that Interaction in the diagram. Somewhere before the property change event.

The property change event is just a method call that triggers communication with another object, so there is an interaction with the listening neighbor(s).

Paul