DDC.Properties-Channel.cs 5.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. using System;
  2. using System.Runtime.InteropServices;
  3. using TDMS.Common;
  4. namespace TDMS.Externals
  5. {
  6. internal partial class DDC : DIAdemConnectivity
  7. {
  8. [DllImport(DLL, CallingConvention = CallingConvention.Cdecl, EntryPoint = "DDC_SetChannelProperty")]
  9. public static extern Error SetChannelProperty(IntPtr channel, string property, __arglist);
  10. [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_SetChannelPropertyTimestampComponents")]
  11. public static extern Error SetChannelPropertyTimestampComponents(IntPtr channel,
  12. string property,
  13. uint year,
  14. uint month,
  15. uint day,
  16. uint hour,
  17. uint minute,
  18. uint second,
  19. double milliSecond);
  20. [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_SetChannelPropertyV")]
  21. public static extern Error SetChannelPropertyV(IntPtr channel, string property, IntPtr args);
  22. [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_GetChannelProperty")]
  23. public static extern Error GetChannelProperty(IntPtr channel,
  24. string property,
  25. ref byte value,
  26. uint valueSizeInBytes);
  27. [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_GetChannelPropertyTimestampComponents")]
  28. public static extern Error GetChannelPropertyTimestampComponents(IntPtr channel,
  29. string property,
  30. out uint year,
  31. out uint month,
  32. out uint day,
  33. out uint hour,
  34. out uint minute,
  35. out uint second,
  36. out double milliSecond,
  37. out uint weekDay);
  38. [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_GetChannelStringPropertyLength")]
  39. public static extern Error GetChannelStringPropertyLength(IntPtr channel, string property, out uint length);
  40. [DllImport(DLL, CallingConvention = CallingConvention.Cdecl, EntryPoint = "DDC_CreateChannelProperty")]
  41. public static extern Error CreateChannelProperty(IntPtr channel,
  42. string property,
  43. TDMSDataType dataType,
  44. __arglist);
  45. [DllImport(DLL, CallingConvention = CallingConvention.StdCall,
  46. EntryPoint = "DDC_CreateChannelPropertyTimestampComponents")]
  47. public static extern Error CreateChannelPropertyTimestampComponents(IntPtr channel,
  48. string property,
  49. uint year,
  50. uint month,
  51. uint day,
  52. uint hour,
  53. uint minute,
  54. uint second,
  55. double milliSecond);
  56. [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_CreateChannelPropertyV")]
  57. public static extern Error CreateChannelPropertyV(IntPtr channel,
  58. string property,
  59. TDMSDataType dataType,
  60. IntPtr args);
  61. [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_ChannelPropertyExists")]
  62. public static extern Error ChannelPropertyExists(IntPtr channel, string property, out bool exists);
  63. [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_GetNumChannelProperties")]
  64. public static extern Error CountChannelProperties(IntPtr channel, out uint numProperties);
  65. [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_GetChannelPropertyNames")]
  66. public static extern Error GetChannelPropertyNames(IntPtr channel, IntPtr[] propertyNames, uint numPropertyNames);
  67. [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_GetChannelPropertyType")]
  68. public static extern Error GetChannelPropertyType(IntPtr channel, string property, out TDMSDataType dataType);
  69. }
  70. }