/
EcBase.cs
81 lines (63 loc) · 3.77 KB
/
EcBase.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
using System;
using System.Runtime.InteropServices;
using System.Security;
namespace SOEM.PInvoke
{
public class EcBase
{
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_setupdatagram(IntPtr port, IntPtr frame, byte com, byte idx, ushort ADP, ushort ADO, ushort length, IntPtr data);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_adddatagram(IntPtr port, IntPtr frame, byte com, byte idx, bool more, ushort ADP, ushort ADO, ushort length, IntPtr data);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_BWR(IntPtr port, ushort ADP, ushort ADO, ushort length, IntPtr data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_BRD(IntPtr port, ushort ADP, ushort ADO, ushort length, IntPtr data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_APRD(IntPtr port, ushort ADP, ushort ADO, ushort length, IntPtr data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_ARMW(IntPtr port, ushort ADP, ushort ADO, ushort length, IntPtr data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_FRMW(IntPtr port, ushort ADP, ushort ADO, ushort length, IntPtr data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern ushort ecx_APRDw(IntPtr port, ushort ADP, ushort ADO, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_FPRD(IntPtr port, ushort ADP, ushort ADO, ushort length, IntPtr data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern ushort ecx_FPRDw(IntPtr port, ushort ADP, ushort ADO, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_APWRw(IntPtr port, ushort ADP, ushort ADO, ushort data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_APWR(IntPtr port, ushort ADP, ushort ADO, ushort length, IntPtr data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_FPWRw(IntPtr port, ushort ADP, ushort ADO, ushort data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_FPWR(IntPtr port, ushort ADP, ushort ADO, ushort length, IntPtr data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_LRW(IntPtr port, uint LogAdr, ushort length, IntPtr data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_LRD(IntPtr port, uint LogAdr, ushort length, IntPtr data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_LWR(IntPtr port, uint LogAdr, ushort length, IntPtr data, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(EcShared.NATIVE_DLL_NAME)]
public static extern int ecx_LRWDC(IntPtr port, uint LogAdr, ushort length, IntPtr data, ushort DCrs, out long DCtime, int timeout);
}
}