Macro mpstthree::create_recv_mpst_all_session[][src]

macro_rules! create_recv_mpst_all_session {
    ($func_name : ident, $sender : ident, $receiver : ident, $meshedchannels_name
 : ident, $nsessions : literal, $exclusion : literal) => { ... };
}
Expand description

Creates a recv function to receive from a broadcasting role on a given binary session type of a MeshedChannels.

Arguments

  • The name of the new recv function
  • The name of the broadcasting sender
  • The name of the receiver
  • The name of the MeshedChannels type that will be used
  • The number of participants (all together)
  • The index of the binary session type that will receive in the MeshedChannels for this specific role. Index starts at 1.

Example

use mpstthree::{
    create_broadcast_role, create_normal_role, create_recv_mpst_all_session, create_meshedchannels,
};

create_normal_role!(RoleA, RoleADual);
create_broadcast_role!(RoleAlltoD, RoleDtoAll);

create_meshedchannels!(MeshedChannels, 3);

create_recv_mpst_all_session!(recv_mpst_a_all_from_d, RoleAlltoD, RoleA, MeshedChannels, 3, 2);