The Robot Application Programming Interface Delegate Project
|
/* * Copyright (c) 2009 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. * All Rights Reserved. */ package gov.nasa.rapid.examples.event; import java.io.Serializable; public class MessageSent implements Serializable { private static final long serialVersionUID = 1L; protected String message; protected float[] values; protected long timeStamp; public MessageSent(String message, float[] values, long time) { this.message = message; this.values = values; this.timeStamp = time; } public String getMessage() { return message; } public float[] getValues() { return values; } public long getTimeStamp() { return timeStamp; } public void setTimeStamp(long time) { timeStamp = time; } @Override public String toString() { StringBuffer message = new StringBuffer(""); message.append("Message: " + message); message.append("\nValues: ("); for (float f : values) message.append(" " + f); message.append(")\n"); message.append("Timestamp: " + timeStamp); return message.toString(); } }