Class MC2AckNakMessage

java.lang.Object
org.sim0mq.message.Sim0MQMessage
org.sim0mq.message.Sim0MQReply
org.sim0mq.message.modelcontroller.MC2AckNakMessage
All Implemented Interfaces:
Serializable

public class MC2AckNakMessage extends Sim0MQReply
AckNak, MC.2. Message sent by the Model to acknowledge the reception and implementation of a message sent by the Federation Manager.

Copyright (c) 2016-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See Sim0MQ License.

Author:
Alexander Verbraeck
See Also:
  • Constructor Details

    • MC2AckNakMessage

      public MC2AckNakMessage(Object federationId, Object senderId, Object receiverId, Object messageId, Object uniqueId, boolean status, String error) throws Sim0MQException, NullPointerException
      Parameters:
      federationId - the federation id can be coded using different types. Examples are two 64-bit longs indicating a UUID, or a String with a UUID number, a String with meaningful identification, or a short or an int with a simulation run number.
      senderId - The sender id can be used to send back a message to the sender at some later time.
      receiverId - The receiver id can be used to check whether the message is meant for us, or should be discarded (or an error can be sent if we receive a message not meant for us).
      messageId - The unique message number is meant to confirm with a callback that the message has been received correctly. The number is unique for the sender, so not globally within the federation.
      uniqueId - Id to identify the callback to the message.
      status - boolean; indicates whether the command sent by the FM has been successfully implemented, e.g. whether the run control parameters are set successfully.
      error - If ‘status’ is False, an error message that indicates what went wrong. Otherwise, an empty string.
      Throws:
      Sim0MQException - on unknown data type
      NullPointerException - when one of the parameters is null
    • MC2AckNakMessage

      public MC2AckNakMessage(Object[] objectArray) throws Sim0MQException, NullPointerException
      Parameters:
      objectArray - Object[]; Full message object array
      Throws:
      Sim0MQException - on unknown data type
      NullPointerException - when one of the parameters is null
  • Method Details

    • getStatus

      public final boolean getStatus()
      Returns:
      status
    • getError

      public final String getError()
      Returns:
      error