Exemple #1
0
 public V_COPYIN_RESULT CopyIn(System.IntPtr typePtr, SensorData from, ref __SensorData to)
 {
     if (from == null)
     {
         return(V_COPYIN_RESULT.INVALID);
     }
     to.bbg_id = from.bbg_id;
     if (from.sensorName == null)
     {
         return(V_COPYIN_RESULT.INVALID);
     }
     // Unbounded string: bounds check not required...
     if (!Write(c.getBase(typePtr), ref to.sensorName, from.sensorName))
     {
         return(V_COPYIN_RESULT.OUT_OF_MEMORY);
     }
     if (from.dateTime == null)
     {
         return(V_COPYIN_RESULT.INVALID);
     }
     // Unbounded string: bounds check not required...
     if (!Write(c.getBase(typePtr), ref to.dateTime, from.dateTime))
     {
         return(V_COPYIN_RESULT.OUT_OF_MEMORY);
     }
     to._value = from._value;
     return(V_COPYIN_RESULT.OK);
 }
Exemple #2
0
        public override void CopyOut(System.IntPtr from, System.IntPtr to)
        {
            __SensorData nativeImg     = (__SensorData)Marshal.PtrToStructure(from, typeof(__SensorData));
            GCHandle     tmpGCHandleTo = GCHandle.FromIntPtr(to);
            SensorData   toObj         = tmpGCHandleTo.Target as SensorData;

            CopyOut(ref nativeImg, ref toObj);
            tmpGCHandleTo.Target = toObj;
        }
Exemple #3
0
 public static void CopyOut(ref __SensorData from, ref SensorData to)
 {
     if (to == null)
     {
         to = new SensorData();
     }
     to.bbg_id     = from.bbg_id;
     to.sensorName = ReadString(from.sensorName);
     to.dateTime   = ReadString(from.dateTime);
     to._value     = from._value;
 }
Exemple #4
0
        public V_COPYIN_RESULT CopyIn(System.IntPtr typePtr, SensorData from, System.IntPtr to)
        {
            __SensorData    nativeImg = new __SensorData();
            V_COPYIN_RESULT result    = CopyIn(typePtr, from, ref nativeImg);

            if (result == V_COPYIN_RESULT.OK)
            {
                Marshal.StructureToPtr(nativeImg, to, false);
            }
            return(result);
        }
Exemple #5
0
        public static void StaticCopyOut(System.IntPtr from, ref SensorData to)
        {
            __SensorData nativeImg = (__SensorData)Marshal.PtrToStructure(from, typeof(__SensorData));

            CopyOut(ref nativeImg, ref to);
        }