Commit 633ec13d authored by Jean Meurice's avatar Jean Meurice
Browse files

ProgramInterface print, SimplePacketType tweaj

parent 1507e56c
Pipeline #400588 passed with stage
in 32 seconds
......@@ -8,7 +8,7 @@
<groupId>montisim</groupId>
<artifactId>commons</artifactId>
<version>2.0.13</version>
<version>2.0.14</version>
<properties>
......
......@@ -17,8 +17,10 @@ public class ProgramInterface {
String res = "ProgramInterface of "+name+ " (v" + version+"):\n";
for (PortInformation p : ports) {
res += '\t';
if (p.direction == PortDirection.INPUT) res += (p.port_type == PortType.SOCKET) ? "sock_in " : "I ";
else res += (p.port_type == PortType.SOCKET) ? "sock_out " : "O ";
if (p.port_type == PortType.SOCKET) res += "socket ";
if (p.direction == PortDirection.INPUT) res += "I ";
else if (p.direction == PortDirection.OUTPUT) res += "O ";
else res += "IO ";
res += p.name + ": "+p.data_type.toString()+"\n";
}
return res;
......
......@@ -35,6 +35,10 @@ public class SimplePacketType extends DataType {
private SimplePacketType() {
}
public DataType getPayloadType() {
return payloadType;
}
@Override
public int getDataSize(Object o) {
return HEADER_SIZE + payloadType.getDataSize(o);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment