////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public LaiYoung_OneRoundMessage(LaiYoung_OneRoundNetwork network, object messageType, int sourceProcess, int sourcePort, int destProcess, int destPort, string messageName, int round, int logicalClock) : base(network, messageType, sourceProcess, sourcePort, destProcess, destPort, messageName, round, logicalClock)
        ///
        /// \brief Constructor.
        ///
        /// \par Description.
        ///      Create a message when all the header are given.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///
        /// \author Ilanh
        /// \date 14/03/2017
        ///
        /// \param network        (LaiYoung_OneRoundNetwork) - The network.
        /// \param messageType   (dynamic) - Type of the message.
        /// \param sourceProcess (int) - Source process.
        /// \param sourcePort    (int) - Source port.
        /// \param destProcess   (int) - Destination process.
        /// \param destPort      (int) - Destination port.
        /// \param messageName    (string) - Name of the message.
        /// \param round         (int) - The round.
        /// \param logicalClock  (int) - The logical clock.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public LaiYoung_OneRoundMessage(LaiYoung_OneRoundNetwork network,
                                        object messageType,
                                        int sourceProcess,
                                        int sourcePort,
                                        int destProcess,
                                        int destPort,
                                        string messageName,
                                        int round,
                                        int logicalClock) : base(network,
                                                                 messageType,
                                                                 sourceProcess,
                                                                 sourcePort,
                                                                 destProcess,
                                                                 destPort,
                                                                 messageName,
                                                                 round,
                                                                 logicalClock)
        {
        }
예제 #2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public LaiYoung_OneRoundProcess(LaiYoung_OneRoundNetwork network) : base(network)
        ///
        /// \brief Constructor.
        ///
        /// \par Description.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///      It is not recommended to change the constructor. All the attributes has to be inserted
        ///      to the pa or dictionaries in the Init... methods
        ///
        /// \author Ilanh
        /// \date 27/06/2017
        ///
        /// \param network  (LaiYoung_OneRoundNetwork) - The network.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public LaiYoung_OneRoundProcess(LaiYoung_OneRoundNetwork network) : base(network)
        {
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public LaiYoung_OneRoundChannel(LaiYoung_OneRoundNetwork network) : base(network)
        ///
        /// \brief Constructor.
        ///
        /// \par Description.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///      It is not recommended to change the constructor. All the attributes has to be inserted
        ///      to the pa or dictionaries in the Init... methods         ///
        ///
        /// \author Ilanh
        /// \date 27/06/2017
        ///
        /// \param network  (LaiYoung_OneRoundNetwork) - The network.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public LaiYoung_OneRoundChannel(LaiYoung_OneRoundNetwork network) : base(network)
        {
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public static bool LaiYoung_OneRoundChannelDefaultAttributeCheck(LaiYoung_OneRoundNetwork network, NetworkElement networkElement, Attribute parentAttribute, Attribute attribute, string newValue, out string errorMessage)
        ///
        /// \brief A prototype for attribute checking.
        ///
        /// \par Description.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///      -#  Each Attribute can be assigned a value check that will be performed when changing the
        ///          attribute from the channel edit window while in design mode
        ///      -#  For each attribute that you want to add a check to one method with the prototype of the
        ///          following method have to be designed
        ///      -#  In order to add the check to the attribute you have to set the EndInputOperationMethod
        ///          member of the Attribute with the method you generated for example :
        /// ~~~{.cs}
        ///       // Setting the method to an existing attribute
        ///       attribute.EndInputOperationMethod =  LaiYoung_OneRoundChannelDefaultAttributeCheck
        ///
        ///       // Setting the method to an attribute while creation
        ///       pa.Add(c.pak.SomeKey, new Attribute {Value = SomeValue, EndInputOperationMethod =  LaiYoung_OneRoundChannelDefaultAttributeCheck})
        /// ~~~
        ///
        /// \author Ilan Hindy
        /// \date 24/01/2017
        ///
        /// \param       network          (LaiYoung_OneRoundNetwork) - The network.
        /// \param       networkElement   (NetworkElement) - The network element.
        /// \param       parentAttribute  (Attribute) - The parent attribute.
        /// \param       attribute        (Attribute) - The attribute.
        /// \param       newValue         (string) - The new value.
        /// \param [out] errorMessage    (out string) - Message describing the error.
        ///
        /// \return True if it's OK to change the attribute's value.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public static bool LaiYoung_OneRoundChannelDefaultAttributeCheck(LaiYoung_OneRoundNetwork network, NetworkElement networkElement, Attribute parentAttribute, Attribute attribute, string newValue, out string errorMessage)
        {
            errorMessage = "";
            return(true);
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public LaiYoung_OneRoundChannel(LaiYoung_OneRoundNetwork network, int id, int sourceProcessId, int destProcessId) : base(network, id, sourceProcessId, destProcessId)
        ///
        /// \brief Constructor.
        ///
        /// \par Description.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///
        /// \author Ilanh
        /// \date 27/06/2017
        ///
        /// \param network          (LaiYoung_OneRoundNetwork) - The network.
        /// \param id               (int) - The identifier.
        /// \param sourceProcessId  (int) - Identifier for the source process.
        /// \param destProcessId    (int) - Identifier for the destination process.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public LaiYoung_OneRoundChannel(LaiYoung_OneRoundNetwork network, int id, int sourceProcessId, int destProcessId)
            : base(network, id, sourceProcessId, destProcessId)
        {
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public LaiYoung_OneRoundMessage(LaiYoung_OneRoundNetwork network, object messageType, LaiYoung_OneRoundChannel channel, string messageName, int round = 0, int logicalClock = 0): base(network, messageType, channel, messageName, round, logicalClock)
        ///
        /// \brief Constructor.
        ///
        /// \par Description.
        ///      Construct a message from header parameters.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///
        /// \author Ilanh
        /// \date 14/03/2017
        ///
        /// \param network       (LaiYoung_OneRoundNetwork) - The network.
        /// \param messageType  (dynamic) - Type of the message.
        /// \param channel      (LaiYoung_OneRoundChannel) - The channel.
        /// \param messageName   (string) - Name of the message.
        /// \param round        (Optional)  (int) - The round.
        /// \param logicalClock (Optional)  (int) - The logical clock.
        ///
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public LaiYoung_OneRoundMessage(LaiYoung_OneRoundNetwork network, object messageType, LaiYoung_OneRoundChannel channel, string messageName, int round = 0, int logicalClock = 0) :
            base(network, messageType, channel, messageName, round, logicalClock)
        {
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public LaiYoung_OneRoundMessage(LaiYoung_OneRoundNetwork network, string messageString):base(network, messageString)
        ///
        /// \brief Constructor.
        ///
        /// \par Description.
        ///      Create a message from string which holds the message XML.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///
        /// \author Ilanh
        /// \date 14/03/2017
        ///
        /// \param network        (LaiYoung_OneRoundNetwork) - The network.
        /// \param messageString (string) - The message string.
        ///
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public LaiYoung_OneRoundMessage(LaiYoung_OneRoundNetwork network, string messageString) : base(network, messageString)
        {
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public LaiYoung_OneRoundMessage(LaiYoung_OneRoundMessage sourceMessage, LaiYoung_OneRoundChannel sendingChannel): base(sourceMessage, sendingChannel)
        ///
        /// \brief Constructor.
        ///
        /// \par Description.
        ///      A message that is duplicated to the source except for the channel parameters.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///      This constructor is useful when you want to forward a message to other channels
        ///
        /// \author Ilanh
        /// \date 14/03/2017
        ///
        /// \param sourceMessage  (LaiYoung_OneRoundMessage) - Message describing the source.
        /// \param sendingChannel (LaiYoung_OneRoundChannel) - The sending channel.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public LaiYoung_OneRoundMessage(LaiYoung_OneRoundNetwork network, LaiYoung_OneRoundMessage sourceMessage, LaiYoung_OneRoundChannel sendingChannel) :
            base(network, sourceMessage, sendingChannel)
        {
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public LaiYoung_OneRoundMessage(LaiYoung_OneRoundNetwork network, LaiYoung_OneRoundMessage sourceMessage): base(network, sourceMessage)
        ///
        /// \brief Constructor.
        ///
        /// \par Description.
        ///      Constructor that generates a duplication of a source message.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///
        /// \author Ilanh
        /// \date 27/06/2017
        ///
        /// \param network       (LaiYoung_OneRoundNetwork) - The network.
        /// \param sourceMessage (LaiYoung_OneRoundMessage) - Message describing the source.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public LaiYoung_OneRoundMessage(LaiYoung_OneRoundNetwork network, LaiYoung_OneRoundMessage sourceMessage) : base(network, sourceMessage)
        {
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public LaiYoung_OneRoundMessage(LaiYoung_OneRoundNetwork network):base(network)
        ///
        /// \brief Constructor.
        ///
        /// \par Description.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///      Constructor used by the system. You should not use it
        ///
        /// \author Ilanh
        /// \date 27/06/2017
        ///
        /// \param network  (LaiYoung_OneRoundNetwork) - The network.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public LaiYoung_OneRoundMessage(LaiYoung_OneRoundNetwork network) : base(network)
        {
        }