示例#1
0
        public Device()
        {
            m_nativeInstance = DeviceNative.Create();

            IntPtr controllerHandle = DeviceNative.GetController(m_nativeInstance);

            m_controller = new Controller(controllerHandle);
        }
示例#2
0
        public void Dispose()
        {
            m_controller = null;

            if (m_nativeInstance != IntPtr.Zero)
            {
                DeviceNative.Destroy(m_nativeInstance);
                m_nativeInstance = IntPtr.Zero;
            }
        }
示例#3
0
 public bool IsThisDevice(DeviceAddress address)
 {
     return(DeviceNative.IsThisDevice(m_nativeInstance, address.NativeInstance));
 }
示例#4
0
 public void RemovePort(IntPtr portHandle)
 {
     DeviceNative.RemovePort(m_nativeInstance, portHandle);
 }
示例#5
0
 public IntPtr AddPort(string hostname, UInt16 hostPort)
 {
     return(DeviceNative.AddPort(m_nativeInstance, hostname, hostPort));
 }
示例#6
0
 public void Loop()
 {
     DeviceNative.Loop(m_nativeInstance);
 }