-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
677 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module us{ | ||
module ihmc{ | ||
module robotDataLogger{ | ||
struct ZEDSDKAnnounce{ | ||
string address; | ||
short port; | ||
}; | ||
}; | ||
}; | ||
}; |
114 changes: 114 additions & 0 deletions
114
src/main/java-generated/us/ihmc/robotDataLogger/ZEDSDKAnnounce.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
package us.ihmc.robotDataLogger; | ||
|
||
import us.ihmc.communication.packets.Packet; | ||
import us.ihmc.euclid.interfaces.Settable; | ||
import us.ihmc.euclid.interfaces.EpsilonComparable; | ||
import java.util.function.Supplier; | ||
import us.ihmc.pubsub.TopicDataType; | ||
|
||
public class ZEDSDKAnnounce extends Packet<ZEDSDKAnnounce> implements Settable<ZEDSDKAnnounce>, EpsilonComparable<ZEDSDKAnnounce> | ||
{ | ||
public java.lang.StringBuilder address_; | ||
public short port_; | ||
|
||
public ZEDSDKAnnounce() | ||
{ | ||
address_ = new java.lang.StringBuilder(255); | ||
} | ||
|
||
public ZEDSDKAnnounce(ZEDSDKAnnounce other) | ||
{ | ||
this(); | ||
set(other); | ||
} | ||
|
||
public void set(ZEDSDKAnnounce other) | ||
{ | ||
address_.setLength(0); | ||
address_.append(other.address_); | ||
|
||
port_ = other.port_; | ||
|
||
} | ||
|
||
public void setAddress(java.lang.String address) | ||
{ | ||
address_.setLength(0); | ||
address_.append(address); | ||
} | ||
|
||
public java.lang.String getAddressAsString() | ||
{ | ||
return getAddress().toString(); | ||
} | ||
public java.lang.StringBuilder getAddress() | ||
{ | ||
return address_; | ||
} | ||
|
||
public void setPort(short port) | ||
{ | ||
port_ = port; | ||
} | ||
public short getPort() | ||
{ | ||
return port_; | ||
} | ||
|
||
|
||
public static Supplier<ZEDSDKAnnouncePubSubType> getPubSubType() | ||
{ | ||
return ZEDSDKAnnouncePubSubType::new; | ||
} | ||
|
||
@Override | ||
public Supplier<TopicDataType> getPubSubTypePacket() | ||
{ | ||
return ZEDSDKAnnouncePubSubType::new; | ||
} | ||
|
||
@Override | ||
public boolean epsilonEquals(ZEDSDKAnnounce other, double epsilon) | ||
{ | ||
if(other == null) return false; | ||
if(other == this) return true; | ||
|
||
if (!us.ihmc.idl.IDLTools.epsilonEqualsStringBuilder(this.address_, other.address_, epsilon)) return false; | ||
|
||
if (!us.ihmc.idl.IDLTools.epsilonEqualsPrimitive(this.port_, other.port_, epsilon)) return false; | ||
|
||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object other) | ||
{ | ||
if(other == null) return false; | ||
if(other == this) return true; | ||
if(!(other instanceof ZEDSDKAnnounce)) return false; | ||
|
||
ZEDSDKAnnounce otherMyClass = (ZEDSDKAnnounce) other; | ||
|
||
if (!us.ihmc.idl.IDLTools.equals(this.address_, otherMyClass.address_)) return false; | ||
|
||
if(this.port_ != otherMyClass.port_) return false; | ||
|
||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public java.lang.String toString() | ||
{ | ||
StringBuilder builder = new StringBuilder(); | ||
|
||
builder.append("ZEDSDKAnnounce {"); | ||
builder.append("address="); | ||
builder.append(this.address_); builder.append(", "); | ||
builder.append("port="); | ||
builder.append(this.port_); | ||
builder.append("}"); | ||
return builder.toString(); | ||
} | ||
} |
154 changes: 154 additions & 0 deletions
154
src/main/java-generated/us/ihmc/robotDataLogger/ZEDSDKAnnouncePubSubType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
package us.ihmc.robotDataLogger; | ||
|
||
/** | ||
* | ||
* Topic data type of the struct "ZEDSDKAnnounce" defined in "ZEDSDK.idl". Use this class to provide the TopicDataType to a Participant. | ||
* | ||
* This file was automatically generated from ZEDSDK.idl by us.ihmc.idl.generator.IDLGenerator. | ||
* Do not update this file directly, edit ZEDSDK.idl instead. | ||
* | ||
*/ | ||
public class ZEDSDKAnnouncePubSubType implements us.ihmc.pubsub.TopicDataType<us.ihmc.robotDataLogger.ZEDSDKAnnounce> | ||
{ | ||
public static final java.lang.String name = "us::ihmc::robotDataLogger::ZEDSDKAnnounce"; | ||
|
||
@Override | ||
public final java.lang.String getDefinitionChecksum() | ||
{ | ||
return "9f246f58e62fc3a5fa946f596f47987112d8e383291e0da8503af3ec09242643"; | ||
} | ||
|
||
@Override | ||
public final java.lang.String getDefinitionVersion() | ||
{ | ||
return "local"; | ||
} | ||
|
||
private final us.ihmc.idl.CDR serializeCDR = new us.ihmc.idl.CDR(); | ||
private final us.ihmc.idl.CDR deserializeCDR = new us.ihmc.idl.CDR(); | ||
|
||
@Override | ||
public void serialize(us.ihmc.robotDataLogger.ZEDSDKAnnounce data, us.ihmc.pubsub.common.SerializedPayload serializedPayload) throws java.io.IOException | ||
{ | ||
serializeCDR.serialize(serializedPayload); | ||
write(data, serializeCDR); | ||
serializeCDR.finishSerialize(); | ||
} | ||
|
||
@Override | ||
public void deserialize(us.ihmc.pubsub.common.SerializedPayload serializedPayload, us.ihmc.robotDataLogger.ZEDSDKAnnounce data) throws java.io.IOException | ||
{ | ||
deserializeCDR.deserialize(serializedPayload); | ||
read(data, deserializeCDR); | ||
deserializeCDR.finishDeserialize(); | ||
} | ||
|
||
public static int getMaxCdrSerializedSize() | ||
{ | ||
return getMaxCdrSerializedSize(0); | ||
} | ||
|
||
public static int getMaxCdrSerializedSize(int current_alignment) | ||
{ | ||
int initial_alignment = current_alignment; | ||
|
||
current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4) + 255 + 1; | ||
current_alignment += 2 + us.ihmc.idl.CDR.alignment(current_alignment, 2); | ||
|
||
|
||
return current_alignment - initial_alignment; | ||
} | ||
|
||
public final static int getCdrSerializedSize(us.ihmc.robotDataLogger.ZEDSDKAnnounce data) | ||
{ | ||
return getCdrSerializedSize(data, 0); | ||
} | ||
|
||
public final static int getCdrSerializedSize(us.ihmc.robotDataLogger.ZEDSDKAnnounce data, int current_alignment) | ||
{ | ||
int initial_alignment = current_alignment; | ||
|
||
current_alignment += 4 + us.ihmc.idl.CDR.alignment(current_alignment, 4) + data.getAddress().length() + 1; | ||
|
||
current_alignment += 2 + us.ihmc.idl.CDR.alignment(current_alignment, 2); | ||
|
||
|
||
|
||
return current_alignment - initial_alignment; | ||
} | ||
|
||
public static void write(us.ihmc.robotDataLogger.ZEDSDKAnnounce data, us.ihmc.idl.CDR cdr) | ||
{ | ||
if(data.getAddress().length() <= 255) | ||
cdr.write_type_d(data.getAddress());else | ||
throw new RuntimeException("address field exceeds the maximum length"); | ||
|
||
cdr.write_type_1(data.getPort()); | ||
|
||
} | ||
|
||
public static void read(us.ihmc.robotDataLogger.ZEDSDKAnnounce data, us.ihmc.idl.CDR cdr) | ||
{ | ||
cdr.read_type_d(data.getAddress()); | ||
data.setPort(cdr.read_type_1()); | ||
|
||
|
||
} | ||
|
||
@Override | ||
public final void serialize(us.ihmc.robotDataLogger.ZEDSDKAnnounce data, us.ihmc.idl.InterchangeSerializer ser) | ||
{ | ||
ser.write_type_d("address", data.getAddress()); | ||
ser.write_type_1("port", data.getPort()); | ||
} | ||
|
||
@Override | ||
public final void deserialize(us.ihmc.idl.InterchangeSerializer ser, us.ihmc.robotDataLogger.ZEDSDKAnnounce data) | ||
{ | ||
ser.read_type_d("address", data.getAddress()); | ||
data.setPort(ser.read_type_1("port")); | ||
} | ||
|
||
public static void staticCopy(us.ihmc.robotDataLogger.ZEDSDKAnnounce src, us.ihmc.robotDataLogger.ZEDSDKAnnounce dest) | ||
{ | ||
dest.set(src); | ||
} | ||
|
||
@Override | ||
public us.ihmc.robotDataLogger.ZEDSDKAnnounce createData() | ||
{ | ||
return new us.ihmc.robotDataLogger.ZEDSDKAnnounce(); | ||
} | ||
@Override | ||
public int getTypeSize() | ||
{ | ||
return us.ihmc.idl.CDR.getTypeSize(getMaxCdrSerializedSize()); | ||
} | ||
|
||
@Override | ||
public java.lang.String getName() | ||
{ | ||
return name; | ||
} | ||
|
||
public void serialize(us.ihmc.robotDataLogger.ZEDSDKAnnounce data, us.ihmc.idl.CDR cdr) | ||
{ | ||
write(data, cdr); | ||
} | ||
|
||
public void deserialize(us.ihmc.robotDataLogger.ZEDSDKAnnounce data, us.ihmc.idl.CDR cdr) | ||
{ | ||
read(data, cdr); | ||
} | ||
|
||
public void copy(us.ihmc.robotDataLogger.ZEDSDKAnnounce src, us.ihmc.robotDataLogger.ZEDSDKAnnounce dest) | ||
{ | ||
staticCopy(src, dest); | ||
} | ||
|
||
@Override | ||
public ZEDSDKAnnouncePubSubType newInstance() | ||
{ | ||
return new ZEDSDKAnnouncePubSubType(); | ||
} | ||
} |
Oops, something went wrong.