コード例 #1
0
        public async Task <List <DiscoveryDevice> > FindNetworkDevices(string ipAddress)
        {
            var discovery = new WSDiscovery();
            var devices   = await discovery.Discover(10, new UdpClientWrapper(ipAddress, 9001));

            return(devices.ToList());
        }
コード例 #2
0
        public async Task <List <DiscoveryDevice> > FindNetworkDevices()
        {
            var discovery = new WSDiscovery();
            var devices   = await discovery.Discover(5);

            return(devices.ToList());
        }
コード例 #3
0
        static async Task Main()
        {
            Console.WriteLine("Starting Discover ONVIF cameras!");
            var discovery = new WSDiscovery();
            var devices   = await discovery.Discover(1);

            foreach (var device in devices)
            {
                Console.WriteLine($"Device model {device.Model} has address {device.Address}");
            }
            Console.WriteLine("ONVIF Discovery finished");
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: Nokecy/RTMSTest
        static async Task Main(string[] args)
        {
            Console.WriteLine("开始探索ONVIF相机!");
            var discovery = new WSDiscovery();
            var devices   = await discovery.Discover(5);

            Console.WriteLine($"发现的设备: {devices.Count()}");
            int i = 1;

            foreach (var device in devices)
            {
                Console.Write($"( {i} ) 名称: {device.Name} Model: {device.Model} ");
                Console.Write($"XAddresses: ");
                foreach (var address in device.XAdresses)
                {
                    Console.Write($"{address}, ");

                    await GetDeviceInfoAsync(address);
                }
                i++;
                Console.WriteLine("");
            }
            Console.WriteLine("ONVIF Discovery finnished!");
        }