Parameter MakeQueue.1-Event

type msg

The type of the messages.

type t =
| Message of int * int * Clock.t * Clock.t * msg(*

Message receival event: sender, receipient, send_timestamp, receive_timestamp, msg

*)
| MintBlock of int * Clock.t
| Timeout of int * Clock.t * timeout_label

The type of the events processed during the simulation.

val timestamp : t -> Clock.t

Returns the timestamp when the event should be executed.

  • parameter event

    an event

val target : t -> int option

Return the node that should process an event.

  • parameter event

    an event

val create_message : int -> int -> Clock.t -> Clock.t -> msg -> t

Create a message receival event.

  • parameter sender

    the id of a node

  • parameter recipient

    the id of a node

  • parameter send_ts

    the timestamp when the message was sent

  • parameter recept_ts

    the timestamp when the message will be received

  • parameter msg

    the contents of the message

val create_mint : int -> Clock.t -> t

Create a minting event.

  • parameter minter

    the id of a node

  • parameter timestamp

    the timestamp when the block will be created

val create_timeout : int -> Clock.t -> timeout_label -> t

Create a timeout event.

  • parameter node_id

    the id of a node

  • parameter delay

    the amount of time that must elapse until the timeout occurs

  • parameter label

    the label to be associated with the timeout