public V_COPYIN_RESULT CopyIn(System.IntPtr typePtr, ContinueData from, ref __ContinueData to) { if (from == null) { return(V_COPYIN_RESULT.INVALID); } to.bbg_id = from.bbg_id; to.daq_id = from.daq_id; to.check_count = from.check_count; to.read_count = from.read_count; to.sample_rate = from.sample_rate; to.is_32 = from.is_32 ? (byte)1 : (byte)0; if (from.payload == null) { return(V_COPYIN_RESULT.INVALID); } int attr6Seq0Length = from.payload.Length; // Unbounded sequence: bounds check not required... if (attr6Seq0Type == IntPtr.Zero) { IntPtr memberOwnerType = DDS.OpenSplice.Database.c.resolve(c.getBase(typePtr), fullyScopedName); IntPtr specifier = DDS.OpenSplice.Database.c.metaResolveSpecifier(memberOwnerType, "payload"); IntPtr specifierType = DDS.OpenSplice.Database.c.specifierType(specifier); attr6Seq0Type = DDS.OpenSplice.Database.c.typeActualType(specifierType); } IntPtr attr6Seq0Buf = DDS.OpenSplice.Database.c.newSequence(attr6Seq0Type, attr6Seq0Length); if (attr6Seq0Buf == IntPtr.Zero) { return(V_COPYIN_RESULT.OUT_OF_MEMORY); } Marshal.Copy((Int16[])(Array)from.payload, 0, attr6Seq0Buf, attr6Seq0Length); return(V_COPYIN_RESULT.OK); }
public override void CopyOut(System.IntPtr from, System.IntPtr to) { __ContinueData nativeImg = (__ContinueData)Marshal.PtrToStructure(from, typeof(__ContinueData)); GCHandle tmpGCHandleTo = GCHandle.FromIntPtr(to); ContinueData toObj = tmpGCHandleTo.Target as ContinueData; CopyOut(ref nativeImg, ref toObj); tmpGCHandleTo.Target = toObj; }
public V_COPYIN_RESULT CopyIn(System.IntPtr typePtr, ContinueData from, System.IntPtr to) { __ContinueData nativeImg = new __ContinueData(); V_COPYIN_RESULT result = CopyIn(typePtr, from, ref nativeImg); if (result == V_COPYIN_RESULT.OK) { Marshal.StructureToPtr(nativeImg, to, false); } return(result); }
public static void CopyOut(ref __ContinueData from, ref ContinueData to) { if (to == null) { to = new ContinueData(); } to.bbg_id = from.bbg_id; to.daq_id = from.daq_id; to.check_count = from.check_count; to.read_count = from.read_count; to.sample_rate = from.sample_rate; to.is_32 = from.is_32 != 0 ? true : false; IntPtr attr6Seq0Buf = from.payload; int attr6Seq0Length = DDS.OpenSplice.Database.c.arraySize(attr6Seq0Buf); if (to.payload == null || to.payload.Length != attr6Seq0Length) { to.payload = new ushort[attr6Seq0Length]; } if (attr6Seq0Length > 0) { Marshal.Copy(attr6Seq0Buf, (short[])(Array)to.payload, 0, attr6Seq0Length); } }
public static void StaticCopyOut(System.IntPtr from, ref ContinueData to) { __ContinueData nativeImg = (__ContinueData)Marshal.PtrToStructure(from, typeof(__ContinueData)); CopyOut(ref nativeImg, ref to); }