Class FS4FederateKilledMessage

  • All Implemented Interfaces:
    Serializable

    public class FS4FederateKilledMessage
    extends Sim0MQMessage
    FederateKilled, FS.4. Message sent by the Federate Starter to the Federation Manager in response to message FM.8.

    Copyright (c) 2016-2020 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:
    Serialized Form
    • Constructor Detail

      • FS4FederateKilledMessage

        public FS4FederateKilledMessage​(Object federationId,
                                        Object senderId,
                                        Object receiverId,
                                        Object messageId,
                                        Object instanceId,
                                        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.
        instanceId - The sender id of the model that was killed or had an error while killing. This is exactly the same as the instanceId sent by the Federation Manager in the KillFederate message.
        status - Did the termination of the model succeed?
        error - If there was an error with the model termination, the error message is sent as well. Otherwise this field is an empty string.
        Throws:
        Sim0MQException - on unknown data type
        NullPointerException - when one of the parameters is null
    • Method Detail

      • getInstanceId

        public Object getInstanceId()
        Returns:
        instanceId
      • isStatus

        public boolean isStatus()
        Returns:
        status
      • getError

        public String getError()
        Returns:
        error
      • getMessageType

        public static final String getMessageType()
        Returns:
        messagetype