예제 #1
0
        //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();
        }
예제 #2
0
        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());
        }
예제 #3
0
 public void addToJSON(JSONBuilder jb)
 {
     jb.addPrimitive("Key", value);
 }
예제 #4
0
파일: Gimbal.cs 프로젝트: Phyberosis/ArmP2
 public void addToJSON(JSONBuilder jb)
 {
     jb.addPrimitive("Vec", vec);
     jb.addPrimitive("Mag", mag);
     jb.closeMe();
 }
예제 #5
0
 public void addToJSON(JSONBuilder jb)
 {
     jb.addObject("ArmCursor", Cursor);
     jb.addPrimitive("Time", Time);
     jb.closeMe();
 }
예제 #6
0
 public void addToJSON(JSONBuilder jb)
 {
     jb.addPrimitive("Pos", Pos);
     jb.addPrimitive("Dir", Dir);
     jb.closeMe();
 }