Class MC1StatusMessage
- java.lang.Object
-
- org.sim0mq.message.Sim0MQMessage
-
- org.sim0mq.message.Sim0MQReply
-
- org.sim0mq.message.modelcontroller.MC1StatusMessage
-
- All Implemented Interfaces:
Serializable
public class MC1StatusMessage extends Sim0MQReply
StatusMessage, MC.1. The Model sends this message as a response to RequestStatus messages sent by the Federate Starter or the Federation Manager.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MC1StatusMessage.Builder
Builder for the StartFederate Message.
-
Field Summary
-
Fields inherited from class org.sim0mq.message.Sim0MQMessage
VERSION
-
-
Constructor Summary
Constructors Constructor Description MC1StatusMessage(Object[] objectArray)
MC1StatusMessage(Object federationId, Object senderId, Object receiverId, Object messageId, Object uniqueId, String status, String error)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getError()
String
getStatus()
-
Methods inherited from class org.sim0mq.message.Sim0MQReply
getReplyToId
-
Methods inherited from class org.sim0mq.message.Sim0MQMessage
check, createByteArray, createObjectArray, decode, decodeToArray, encodeReplyUTF16, encodeReplyUTF8, encodeUTF16, encodeUTF8, getFederationId, getMagicNumber, getMessageId, getMessageTypeId, getNumberOfPayloadFields, getReceiverId, getSenderId, isBigEndian, listPayload, print
-
-
-
-
Constructor Detail
-
MC1StatusMessage
public MC1StatusMessage(Object federationId, Object senderId, Object receiverId, Object messageId, Object uniqueId, String 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
- A string that refers to the model status. Four options: "started", "running", "ended", "error".error
- Optional. If there is an error, the error message is sent as well. Otherwise this field is an empty string.- Throws:
Sim0MQException
- on unknown data typeNullPointerException
- when one of the parameters is null
-
MC1StatusMessage
public MC1StatusMessage(Object[] objectArray) throws Sim0MQException, NullPointerException
- Parameters:
objectArray
- Object[]; Full message object array- Throws:
Sim0MQException
- on unknown data typeNullPointerException
- when one of the parameters is null
-
-