コード例 #1
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("GetGraspPoses_args");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Posture != null && __isset.posture)
         {
             field.Name = "posture";
             field.Type = TType.Struct;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             Posture.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (__isset.handType)
         {
             field.Name = "handType";
             field.Type = TType.I32;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32((int)HandType);
             oprot.WriteFieldEnd();
         }
         if (SceneObject != null && __isset.sceneObject)
         {
             field.Name = "sceneObject";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             SceneObject.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (__isset.repositionHand)
         {
             field.Name = "repositionHand";
             field.Type = TType.Bool;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(RepositionHand);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
コード例 #2
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("MIKServiceResult");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Posture == null)
         {
             throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Posture not set");
         }
         field.Name = "Posture";
         field.Type = TType.Struct;
         field.ID   = 1;
         oprot.WriteFieldBegin(field);
         Posture.Write(oprot);
         oprot.WriteFieldEnd();
         field.Name = "Success";
         field.Type = TType.Bool;
         field.ID   = 2;
         oprot.WriteFieldBegin(field);
         oprot.WriteBool(Success);
         oprot.WriteFieldEnd();
         if (Error == null)
         {
             throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Error not set");
         }
         field.Name = "Error";
         field.Type = TType.List;
         field.ID   = 3;
         oprot.WriteFieldBegin(field);
         {
             oprot.WriteListBegin(new TList(TType.Double, Error.Count));
             foreach (double _iter3 in Error)
             {
                 oprot.WriteDouble(_iter3);
             }
             oprot.WriteListEnd();
         }
         oprot.WriteFieldEnd();
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
コード例 #3
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("MPostureConstraint");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Posture == null)
         {
             throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Posture not set");
         }
         field.Name = "posture";
         field.Type = TType.Struct;
         field.ID   = 1;
         oprot.WriteFieldBegin(field);
         Posture.Write(oprot);
         oprot.WriteFieldEnd();
         if (JointConstraints != null && __isset.JointConstraints)
         {
             field.Name = "JointConstraints";
             field.Type = TType.List;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, JointConstraints.Count));
                 foreach (MJointConstraint _iter12 in JointConstraints)
                 {
                     _iter12.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
コード例 #4
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("MSimulationResult");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Posture == null)
         {
             throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Posture not set");
         }
         field.Name = "Posture";
         field.Type = TType.Struct;
         field.ID   = 1;
         oprot.WriteFieldBegin(field);
         Posture.Write(oprot);
         oprot.WriteFieldEnd();
         if (Constraints != null && __isset.Constraints)
         {
             field.Name = "Constraints";
             field.Type = TType.List;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, Constraints.Count));
                 foreach (MMIStandard.MConstraint _iter27 in Constraints)
                 {
                     _iter27.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (Events != null && __isset.Events)
         {
             field.Name = "Events";
             field.Type = TType.List;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, Events.Count));
                 foreach (MSimulationEvent _iter28 in Events)
                 {
                     _iter28.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (SceneManipulations != null && __isset.SceneManipulations)
         {
             field.Name = "SceneManipulations";
             field.Type = TType.List;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, SceneManipulations.Count));
                 foreach (MMIStandard.MSceneManipulation _iter29 in SceneManipulations)
                 {
                     _iter29.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (DrawingCalls != null && __isset.DrawingCalls)
         {
             field.Name = "DrawingCalls";
             field.Type = TType.List;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, DrawingCalls.Count));
                 foreach (MMIStandard.MDrawingCall _iter30 in DrawingCalls)
                 {
                     _iter30.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (LogData != null && __isset.LogData)
         {
             field.Name = "LogData";
             field.Type = TType.List;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.String, LogData.Count));
                 foreach (string _iter31 in LogData)
                 {
                     oprot.WriteString(_iter31);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }