Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
DeviceLocation.cs
1using System;
2using System.Collections.Generic;
3using System.Threading.Tasks;
4
6{
10 public class DeviceLocation
11 {
12 private readonly UPnPClient client;
13 private readonly UPnPHeaders headers;
14 private readonly string searchTarget;
15 private readonly string server;
16 private readonly string location;
17 private readonly string uniqueServiceName;
18
28 internal DeviceLocation(UPnPClient Client, string SearchTarget, string Server, string Location, string UniqueServiceName, UPnPHeaders Headers)
29 {
30 this.client = Client;
31 this.searchTarget = SearchTarget;
32 this.server = Server;
33 this.location = Location;
34 this.uniqueServiceName = UniqueServiceName;
35 this.headers = Headers;
36 }
37
41 public string SearchTarget => this.searchTarget;
42
46 public string Server => this.server;
47
51 public string Location => this.location;
52
56 public string UniqueServiceName => this.uniqueServiceName;
57
61 public UPnPHeaders Headers => this.headers;
62
71 {
72 return this.client.GetDevice(this.location);
73 }
74
84 {
85 return this.client.GetDevice(this.location, Timeout);
86 }
87
92 public Task<DeviceDescriptionDocument> GetDeviceAsync()
93 {
94 return this.client.GetDeviceAsync(this.location);
95 }
96
98 public override string ToString()
99 {
100 return this.location;
101 }
102 }
103}
Contains the information provided in a Device Description Document, downloaded from a device in the n...
UPnPDevice GetDevice(string DeviceType)
Gets a device or embedded device, given its device type.
Contains information about the location of a device on the network.
Task< DeviceDescriptionDocument > GetDeviceAsync()
Gets a Device Description Document from a device.
DeviceDescriptionDocument GetDevice()
Gets the device description document from a device in the network. This method is the synchronous ver...
DeviceDescriptionDocument GetDevice(int Timeout)
Gets the device description document from a device in the network. This method is the synchronous ver...
string Location
Location of device information
string SearchTarget
SSDP Search Target
string UniqueServiceName
Unique Service Name (USN)
UPnPHeaders Headers
UPnP Headers
Implements support for the UPnP protocol, as described in: http://upnp.org/specs/arch/UPnP-arch-Devic...
Definition: UPnPClient.cs:21
Class managing any HTTP headers in a UPnP UDP request/response.
Definition: UPnPHeaders.cs:32