Skip to content

Commit 63ae97e

Browse files
committed
Add fps and bitrate to ZED announce message.
1 parent 2b3a895 commit 63ae97e

File tree

3 files changed

+62
-2
lines changed

3 files changed

+62
-2
lines changed

src/main/idl/ZEDSDK.idl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ module robotDataLogger{
55
string sensor_name;
66
string address;
77
short port;
8+
long fps;
9+
long bitrate;
810
};
911
};
1012
};

src/main/java-generated/us/ihmc/robotDataLogger/ZEDSDKAnnounce.java

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ public class ZEDSDKAnnounce extends Packet<ZEDSDKAnnounce> implements Settable<Z
1111
public java.lang.StringBuilder sensor_name_;
1212
public java.lang.StringBuilder address_;
1313
public short port_;
14+
public int fps_;
15+
public int bitrate_;
1416

1517
public ZEDSDKAnnounce()
1618
{
@@ -34,6 +36,10 @@ public void set(ZEDSDKAnnounce other)
3436

3537
port_ = other.port_;
3638

39+
fps_ = other.fps_;
40+
41+
bitrate_ = other.bitrate_;
42+
3743
}
3844

3945
public void setSensorName(java.lang.String sensor_name)
@@ -75,6 +81,24 @@ public short getPort()
7581
return port_;
7682
}
7783

84+
public void setFps(int fps)
85+
{
86+
fps_ = fps;
87+
}
88+
public int getFps()
89+
{
90+
return fps_;
91+
}
92+
93+
public void setBitrate(int bitrate)
94+
{
95+
bitrate_ = bitrate;
96+
}
97+
public int getBitrate()
98+
{
99+
return bitrate_;
100+
}
101+
78102

79103
public static Supplier<ZEDSDKAnnouncePubSubType> getPubSubType()
80104
{
@@ -99,6 +123,10 @@ public boolean epsilonEquals(ZEDSDKAnnounce other, double epsilon)
99123

100124
if (!us.ihmc.idl.IDLTools.epsilonEqualsPrimitive(this.port_, other.port_, epsilon)) return false;
101125

126+
if (!us.ihmc.idl.IDLTools.epsilonEqualsPrimitive(this.fps_, other.fps_, epsilon)) return false;
127+
128+
if (!us.ihmc.idl.IDLTools.epsilonEqualsPrimitive(this.bitrate_, other.bitrate_, epsilon)) return false;
129+
102130

103131
return true;
104132
}
@@ -118,6 +146,10 @@ public boolean equals(Object other)
118146

119147
if(this.port_ != otherMyClass.port_) return false;
120148

149+
if(this.fps_ != otherMyClass.fps_) return false;
150+
151+
if(this.bitrate_ != otherMyClass.bitrate_) return false;
152+
121153

122154
return true;
123155
}
@@ -133,7 +165,11 @@ public java.lang.String toString()
133165
builder.append("address=");
134166
builder.append(this.address_); builder.append(", ");
135167
builder.append("port=");
136-
builder.append(this.port_);
168+
builder.append(this.port_); builder.append(", ");
169+
builder.append("fps=");
170+
builder.append(this.fps_); builder.append(", ");
171+
builder.append("bitrate=");
172+
builder.append(this.bitrate_);
137173
builder.append("}");
138174
return builder.toString();
139175
}

src/main/java-generated/us/ihmc/robotDataLogger/ZEDSDKAnnouncePubSubType.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class ZEDSDKAnnouncePubSubType implements us.ihmc.pubsub.TopicDataType<us
1515
@Override
1616
public final java.lang.String getDefinitionChecksum()
1717
{
18-
return "e3710472cf327eef8765ab1aafdd1a4fdc8b7cba2ab45bd577bbca5435234f75";
18+
return "0a8a4b3b0580df7906673f4755a2db962b6a9a5b2be9db40bac836b844922163";
1919
}
2020

2121
@Override
@@ -56,6 +56,10 @@ public static int getMaxCdrSerializedSize(int current_alignment)
5656
current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4) + 255 + 1;
5757
current_alignment += 2 + us.ihmc.idl.CDR.alignment(current_alignment, 2);
5858

59+
current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4);
60+
61+
current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4);
62+
5963

6064
return current_alignment - initial_alignment;
6165
}
@@ -76,6 +80,12 @@ public final static int getCdrSerializedSize(us.ihmc.robotDataLogger.ZEDSDKAnnou
7680
current_alignment += 2 + us.ihmc.idl.CDR.alignment(current_alignment, 2);
7781

7882

83+
current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4);
84+
85+
86+
current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4);
87+
88+
7989

8090
return current_alignment - initial_alignment;
8191
}
@@ -92,6 +102,10 @@ public static void write(us.ihmc.robotDataLogger.ZEDSDKAnnounce data, us.ihmc.id
92102

93103
cdr.write_type_1(data.getPort());
94104

105+
cdr.write_type_2(data.getFps());
106+
107+
cdr.write_type_2(data.getBitrate());
108+
95109
}
96110

97111
public static void read(us.ihmc.robotDataLogger.ZEDSDKAnnounce data, us.ihmc.idl.CDR cdr)
@@ -100,6 +114,10 @@ public static void read(us.ihmc.robotDataLogger.ZEDSDKAnnounce data, us.ihmc.idl
100114
cdr.read_type_d(data.getAddress());
101115
data.setPort(cdr.read_type_1());
102116

117+
data.setFps(cdr.read_type_2());
118+
119+
data.setBitrate(cdr.read_type_2());
120+
103121

104122
}
105123

@@ -109,6 +127,8 @@ public final void serialize(us.ihmc.robotDataLogger.ZEDSDKAnnounce data, us.ihmc
109127
ser.write_type_d("sensor_name", data.getSensorName());
110128
ser.write_type_d("address", data.getAddress());
111129
ser.write_type_1("port", data.getPort());
130+
ser.write_type_2("fps", data.getFps());
131+
ser.write_type_2("bitrate", data.getBitrate());
112132
}
113133

114134
@Override
@@ -117,6 +137,8 @@ public final void deserialize(us.ihmc.idl.InterchangeSerializer ser, us.ihmc.rob
117137
ser.read_type_d("sensor_name", data.getSensorName());
118138
ser.read_type_d("address", data.getAddress());
119139
data.setPort(ser.read_type_1("port"));
140+
data.setFps(ser.read_type_2("fps"));
141+
data.setBitrate(ser.read_type_2("bitrate"));
120142
}
121143

122144
public static void staticCopy(us.ihmc.robotDataLogger.ZEDSDKAnnounce src, us.ihmc.robotDataLogger.ZEDSDKAnnounce dest)

0 commit comments

Comments
 (0)