//public static PacketKey responseKey(PacketKey original) //{ // var p = new PacketKey(); // p.parentValue = original.value; // return p; //} //public bool isResponseOf(PacketKey other) //{ // return parentValue == other.value; //} public void addToJSON(JSONBuilder jb) { jb.beginItem(); jb.addField("value"); jb.addPrimitive(value.ToString()); jb.endItem(); }
public string pack() { JSONBuilder jb = new JSONBuilder(); jb.beginItem(); jb.addField("flavour"); jb.addPrimitive(flavour.ToString()); jb.addField("key"); key.addToJSON(jb); if (flavour != Flavour.ECHO) { jb.addField("data"); data.addToJSON(jb); } jb.endItem(); return(jb.ToString()); }
public void addToJSON(JSONBuilder jb) { jb.addPrimitive("Key", value); }
public void addToJSON(JSONBuilder jb) { jb.addPrimitive("Vec", vec); jb.addPrimitive("Mag", mag); jb.closeMe(); }
public void addToJSON(JSONBuilder jb) { jb.addObject("ArmCursor", Cursor); jb.addPrimitive("Time", Time); jb.closeMe(); }
public void addToJSON(JSONBuilder jb) { jb.addPrimitive("Pos", Pos); jb.addPrimitive("Dir", Dir); jb.closeMe(); }