Class NetworkScanner
This class is used to scan the network for controllers and changes in the infrastructure.
Namespace: ABB.Robotics.Controllers.Discovery
Assembly: ABB.Robotics.Controllers.PC.dll
Syntax
public sealed class NetworkScanner
Constructors
NetworkScanner()
Creates a new network scanner instance.
Declaration
public NetworkScanner()
Properties
Controllers
get the collection of found controllers
Declaration
public ControllerInfoCollection Controllers { get; }
Property Value
Type | Description |
---|---|
ControllerInfoCollection |
Methods
AddRemoteController(IPAddress)
Adds a controller to netscan that isn't avaiable on the local subnet. Adding the same controller multiple times has no effect.
Declaration
public static void AddRemoteController(IPAddress address)
Parameters
Type | Name | Description |
---|---|---|
IPAddress | address |
AddRemoteController(String)
Adds a controller to netscan that isn't avaiable on the local subnet. Adding the same controller multiple times has no effect.
Declaration
public static void AddRemoteController(string address)
Parameters
Type | Name | Description |
---|---|---|
String | address |
Find(Guid)
Finds a specified controller on the network.
Declaration
public ControllerInfo Find(Guid systemId)
Parameters
Type | Name | Description |
---|---|---|
Guid | systemId | The system to locate. |
Returns
Type | Description |
---|---|
ControllerInfo | System to locate. |
Find(Guid, Int32, Int32)
Finds a specified controller on the network.
Declaration
public ControllerInfo Find(Guid systemId, int waitTime, int retries)
Parameters
Type | Name | Description |
---|---|---|
Guid | systemId | The system to locate. |
Int32 | waitTime | The ammount of time in milliseconds to wait between two tries. |
Int32 | retries | Number of times to retry the find operation on failure. |
Returns
Type | Description |
---|---|
ControllerInfo | System to locate, or null if the controller is |
Find(Guid, TimeSpan, Int32)
Finds a specified controller on the network.
Declaration
public ControllerInfo Find(Guid systemId, TimeSpan waitTime, int retries)
Parameters
Type | Name | Description |
---|---|---|
Guid | systemId | The system to locate. |
TimeSpan | waitTime | The ammount of time in milliseconds to wait between two tries. |
Int32 | retries | Number of times to retry the find operation on failure. |
Returns
Type | Description |
---|---|
ControllerInfo | System to locate. |
GetControllers()
returns all controllers as an array
Declaration
public ControllerInfo[] GetControllers()
Returns
Type | Description |
---|---|
ControllerInfo[] | the located controllers |
GetControllers(NetworkScannerSearchCriterias)
returns the
Declaration
public ControllerInfo[] GetControllers(NetworkScannerSearchCriterias criterias)
Parameters
Type | Name | Description |
---|---|---|
NetworkScannerSearchCriterias | criterias | search criterias |
Returns
Type | Description |
---|---|
ControllerInfo[] | the matching controllers |
Scan()
starts a single scan to load all controllers into memory.
Declaration
public void Scan()
TryFind(Guid, out ControllerInfo)
Finds a specified controller on the network.
Declaration
public bool TryFind(Guid systemId, out ControllerInfo info)
Parameters
Type | Name | Description |
---|---|---|
Guid | systemId | The system to locate. |
ControllerInfo | info | ControllerInfo if found. |
Returns
Type | Description |
---|---|
Boolean | True if the system was found. |
TryFind(Guid, Int32, Int32, out ControllerInfo)
Finds a specified controller on the network.
Declaration
public bool TryFind(Guid systemId, int waitTime, int retries, out ControllerInfo info)
Parameters
Type | Name | Description |
---|---|---|
Guid | systemId | The system to locate. |
Int32 | waitTime | The ammount of time in milliseconds to wait between two tries. |
Int32 | retries | Number of times to retry the find operation on failure. |
ControllerInfo | info | ControllerInfo if found. |
Returns
Type | Description |
---|---|
Boolean | True if the system was found. |
TryFind(Guid, TimeSpan, Int32, out ControllerInfo)
Finds a specified controller on the network.
Declaration
public bool TryFind(Guid systemId, TimeSpan waitTime, int retries, out ControllerInfo info)
Parameters
Type | Name | Description |
---|---|---|
Guid | systemId | The system to locate. |
TimeSpan | waitTime | The ammount of time in milliseconds to wait between two tries. |
Int32 | retries | Number of times to retry the find operation on failure. |
ControllerInfo | info | ControllerInfo if found. |
Returns
Type | Description |
---|---|
Boolean | True if the system was found. |