Skip to content
Juvix imports

module node_architecture.engines.template_messages;

import prelude open;

Template Messages

Message interface

Auxiliary Juvix code

syntax alias MethodOneArgOne := Nat;

syntax alias MethodOneArgTwo := Nat;

syntax alias MethodOneArgThree := Nat;

syntax alias MethodTwoArgOne := Nat;

type TemplateMsg :=
| MethodOneMsg {
argOne : MethodOneArgOne;
argTwo : MethodOneArgTwo;
argThree : MethodOneArgThree
}
| MethodTwoMsg {argOne : MethodTwoArgOne};

MethodOneMsg

MethodOneMsg

MethodOneMsg {
  argOne : MethodOneArgOne;
  argTwo : MethodOneArgTwo;
  argThree : MethodOneArgThree;
}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. The following is an example of a MethodOneMsg-message:

example_message_one : TemplateMsg :=
MethodOneMsg@{
argOne := 1;
argTwo := 2;
argThree := 3
};
argOne
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
argTwo
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
argThree
This is the last argument and here we actually can describe more detail about the property about argOne and argThree mentioned above.

MethodTwoMsg

MethodTwoMsg

MethodTwoMsg {
  argOne : MethodTwoArgOne;
}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. The following is an example of a MethodTwoMsg message:

example_message_two : TemplateMsg :=
MethodTwoMsg@{
argOne := 1
};
argOne
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Message sequence diagrams

[Title of message sequence diagram ⟨𝑖⟩]

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut purus eget sapien. Nulla facilisi.

sequenceDiagram
    participant Template
    participant EngineTemplateClient

    EngineTemplateClient ->> Template: Send MethodOneMsg
    Template ->> EngineTemplateClient: Respond with MethodOneMsg
Lorem ipsum dolor sit amet, consectetur adipiscing elit.