class RS485
{
[DllImportAttribute("owen_io.dll", EntryPoint = "OpenPort", CallingConvention = CallingConvention.StdCall)]
public static extern int OpenPort(int n, int sped, int part, int bits, int stop, int vid);
[DllImportAttribute("owen_io.dll", EntryPoint = "ClosePort", CallingConvention = CallingConvention.StdCall)]
public static extern int ClosePort();
[DllImportAttribute("owen_io.dll", EntryPoint = "ReadIEEE32", CallingConvention = CallingConvention.StdCall)]
public static extern int ReadIEEE32(int adr, int adr_type, System.IntPtr command, ref float value, ref int time, int index);
[DllImportAttribute("owen_io.dll", EntryPoint = "SetMaxRetriesGlobal", CallingConvention = CallingConvention.StdCall)]
public static extern void SetMaxRetriesGlobal(int n);
[DllImportAttribute("owen_io.dll", EntryPoint = "ReadFloat24", CallingConvention = CallingConvention.StdCall)]
public static extern int ReadFloat24(int adr, int adr_type, System.IntPtr command, ref float value, int index);
[DllImportAttribute("owen_io.dll", EntryPoint = "ReadSInt", CallingConvention = CallingConvention.StdCall)]
public static extern int ReadSInt(int adr, int adr_type, IntPtr command, ref int param, int index);
[DllImportAttribute("owen_io.dll", EntryPoint = "WriteWord", CallingConvention = CallingConvention.StdCall)]
public static extern int WriteWord(int adr, int adr_type, IntPtr command, int value, int index);
}