00001
00002
00003 package ros.pkg.std_msgs.msg;
00004
00005 import java.nio.ByteBuffer;
00006
00007 public class Header extends ros.communication.Message {
00008
00009 public long seq;
00010 public ros.communication.Time stamp = new ros.communication.Time();
00011 public java.lang.String frame_id = new java.lang.String();
00012
00013 public Header() {
00014 }
00015
00016 public static java.lang.String __s_getDataType() { return "std_msgs/Header"; }
00017 public java.lang.String getDataType() { return __s_getDataType(); }
00018 public static java.lang.String __s_getMD5Sum() { return "2176decaecbce78abc3b96ef049fabed"; }
00019 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); }
00020 public static java.lang.String __s_getMessageDefinition() { return "# Standard metadata for higher-level stamped data types.\n" +
00021 "# This is generally used to communicate timestamped data \n" +
00022 "# in a particular coordinate frame.\n" +
00023 "# \n" +
00024 "# sequence ID: consecutively increasing ID \n" +
00025 "uint32 seq\n" +
00026 "#Two-integer timestamp that is expressed as:\n" +
00027 "# * stamp.secs: seconds (stamp_secs) since epoch\n" +
00028 "# * stamp.nsecs: nanoseconds since stamp_secs\n" +
00029 "# time-handling sugar is provided by the client library\n" +
00030 "time stamp\n" +
00031 "#Frame this data is associated with\n" +
00032 "# 0: no frame\n" +
00033 "# 1: global frame\n" +
00034 "string frame_id\n" +
00035 "\n" +
00036 ""; }
00037 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); }
00038
00039 public Header clone() {
00040 Header c = new Header();
00041 c.deserialize(serialize(0));
00042 return c;
00043 }
00044
00045 public void setTo(ros.communication.Message m) {
00046 deserialize(m.serialize(0));
00047 }
00048
00049 public int serializationLength() {
00050 int __l = 0;
00051 __l += 4;
00052 __l += 8;
00053 __l += 4 + frame_id.length();
00054 return __l;
00055 }
00056
00057 public void serialize(ByteBuffer bb, int seq) {
00058 bb.putInt((int)seq);
00059 Serialization.writeTime(bb, stamp);
00060 Serialization.writeString(bb, frame_id);
00061 }
00062
00063 public void deserialize(ByteBuffer bb) {
00064 seq = (long)(bb.getInt() & 0xffffffff);
00065 stamp = Serialization.readTime(bb);
00066 frame_id = Serialization.readString(bb);
00067 }
00068
00069 @SuppressWarnings("all")
00070 public boolean equals(Object o) {
00071 if(!(o instanceof Header))
00072 return false;
00073 Header other = (Header) o;
00074 return
00075 seq == other.seq &&
00076 stamp.equals(other.stamp) &&
00077 frame_id.equals(other.frame_id) &&
00078 true;
00079 }
00080
00081 @SuppressWarnings("all")
00082 public int hashCode() {
00083 final int prime = 31;
00084 int result = 1;
00085 long tmp;
00086 result = prime * result + (int)(this.seq ^ (this.seq >>> 32));
00087 result = prime * result + (this.stamp == null ? 0 : this.stamp.hashCode());
00088 result = prime * result + (this.frame_id == null ? 0 : this.frame_id.hashCode());
00089 return result;
00090 }
00091 }
00092