示例#1
0
 public XsPortInfoArray(XsPortInfoArray other) : this(xsensdeviceapiPINVOKE.new_XsPortInfoArray__SWIG_3(XsPortInfoArray.getCPtr(other)), true)
 {
     if (xsensdeviceapiPINVOKE.SWIGPendingException.Pending)
     {
         throw xsensdeviceapiPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#2
0
        public static XsPortInfoArray filterResponsiveDevices(XsPortInfoArray ports)
        {
            XsPortInfoArray ret = new XsPortInfoArray(xsensdeviceapiPINVOKE.XsScanner_filterResponsiveDevices__SWIG_3(XsPortInfoArray.getCPtr(ports)), true);

            if (xsensdeviceapiPINVOKE.SWIGPendingException.Pending)
            {
                throw xsensdeviceapiPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
示例#3
0
        public static XsPortInfoArray filterResponsiveDevices(XsPortInfoArray ports, XsBaudRate baudrate, int singleScanTimeout)
        {
            XsPortInfoArray ret = new XsPortInfoArray(xsensdeviceapiPINVOKE.XsScanner_filterResponsiveDevices__SWIG_1(XsPortInfoArray.getCPtr(ports), (int)baudrate, singleScanTimeout), true);

            if (xsensdeviceapiPINVOKE.SWIGPendingException.Pending)
            {
                throw xsensdeviceapiPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
示例#4
0
        public static XsPortInfoArray scanComPortList(XsStringArray portList)
        {
            XsPortInfoArray ret = new XsPortInfoArray(xsensdeviceapiPINVOKE.XsScanner_scanComPortList__SWIG_3(XsStringArray.getCPtr(portList)), true);

            if (xsensdeviceapiPINVOKE.SWIGPendingException.Pending)
            {
                throw xsensdeviceapiPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
示例#5
0
        public static XsPortInfoArray scanComPortList(XsStringArray portList, XsIntArray portLinesOptionsList, XsBaudRate baudrate)
        {
            XsPortInfoArray ret = new XsPortInfoArray(xsensdeviceapiPINVOKE.XsScanner_scanComPortList__SWIG_1(XsStringArray.getCPtr(portList), XsIntArray.getCPtr(portLinesOptionsList), (int)baudrate), true);

            if (xsensdeviceapiPINVOKE.SWIGPendingException.Pending)
            {
                throw xsensdeviceapiPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
示例#6
0
        public void scanPorts()
        {
            List <XsPortInfo> scannedDevicesSet = new List <XsPortInfo>();
            XsPortInfoArray   scannedDevices    = XsScanner.scanPorts();

            // Check if we found new devices.
            for (uint i = 0; i < scannedDevices.size(); i++)
            {
                XsPortInfo port = scannedDevices.at(i);
                scannedDevicesSet.Add(port);
                if (!findPortInfo(port))
                {
                    if (port.deviceId().isWirelessMaster())
                    {
                        if (WirelessMasterDetected != null)
                        {
                            WirelessMasterDetected(this, new PortInfoArg(port));
                        }
                    }
                    else if (port.deviceId().isMtw())
                    {
                        if (DockedMtwDetected != null)
                        {
                            DockedMtwDetected(this, new PortInfoArg(port));
                        }
                    }
                }
            }

            // Check if we have lost devices (that are not opened already).
            foreach (XsPortInfo portD in _DetectedDevices)
            {
                bool   found = false;
                String did   = portD.deviceId().toXsString().toString();
                foreach (XsPortInfo portS in scannedDevicesSet)
                {
                    if (portS.deviceId().toXsString().toString() == portD.deviceId().toXsString().toString())
                    {
                        found = true;
                    }
                }
                if (!found)
                {
                    if (portD.deviceId().isMtw() && MtwUndocked != null)
                    {
                        MtwUndocked(this, new PortInfoArg(portD));
                    }
                }
            }

            _DetectedDevices = scannedDevicesSet;
        }
示例#7
0
        public static XsPortInfoArray scanPorts()
        {
            XsPortInfoArray ret = new XsPortInfoArray(xsensdeviceapiPINVOKE.XsScanner_scanPorts__SWIG_4(), true);

            return(ret);
        }
示例#8
0
        public static XsPortInfoArray scanPorts(XsBaudRate baudrate)
        {
            XsPortInfoArray ret = new XsPortInfoArray(xsensdeviceapiPINVOKE.XsScanner_scanPorts__SWIG_3((int)baudrate), true);

            return(ret);
        }
示例#9
0
        public static XsPortInfoArray scanPorts(XsBaudRate baudrate, int singleScanTimeout)
        {
            XsPortInfoArray ret = new XsPortInfoArray(xsensdeviceapiPINVOKE.XsScanner_scanPorts__SWIG_2((int)baudrate, singleScanTimeout), true);

            return(ret);
        }
示例#10
0
        public static XsPortInfoArray scanPorts(XsBaudRate baudrate, int singleScanTimeout, bool ignoreNonXsensDevices, bool detectRs485)
        {
            XsPortInfoArray ret = new XsPortInfoArray(xsensdeviceapiPINVOKE.XsScanner_scanPorts__SWIG_0((int)baudrate, singleScanTimeout, ignoreNonXsensDevices, detectRs485), true);

            return(ret);
        }
示例#11
0
        public static XsPortInfoArray enumerateNetworkDevices()
        {
            XsPortInfoArray ret = new XsPortInfoArray(xsensdeviceapiPINVOKE.XsScanner_enumerateNetworkDevices(), true);

            return(ret);
        }
示例#12
0
        public static XsPortInfoArray enumerateSerialPorts()
        {
            XsPortInfoArray ret = new XsPortInfoArray(xsensdeviceapiPINVOKE.XsScanner_enumerateSerialPorts__SWIG_1(), true);

            return(ret);
        }
示例#13
0
        public static XsPortInfoArray enumerateSerialPorts(bool ignoreNonXsensDevices)
        {
            XsPortInfoArray ret = new XsPortInfoArray(xsensdeviceapiPINVOKE.XsScanner_enumerateSerialPorts__SWIG_0(ignoreNonXsensDevices), true);

            return(ret);
        }
示例#14
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(XsPortInfoArray obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }