EasyManua.ls Logo

Siemens SIMATIC S7 - Querynetworkinterfacecards Method

Siemens SIMATIC S7
134 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SIMATIC Automation Tool API for .NET framework
6.5 The Network class
SIMATIC Automation Tool V2.1 user guide
74 Manual, V2.1.1 07/2016, A5E33042676-AC
6.5.2
QueryNetworkInterfaceCards method
Return type
Method name
Result
QueryNetworkInterfaceCards
Parameters
Name
Data type
Parameter type
Description
aInterfaces
List<string>
Out
A collection of all the network
interface cards on the PG/PC listed
by name.
To identify the available network interface cards, use the QueryNetworkInterfaceCards
method, as shown in the following example:
Network myNetwork = new Network();
List<String> interfaces = new List<String>();
Result retVal = myNetwork.QueryNetworkInterfaceCards(out interfaces);
if (retVal.Succeeded)
{
//-----------------------------------------------------
// The method returns a List of strings.
// Each string in the list represents an available NIC.
// The list can be iterated using array notation.
//-----------------------------------------------------
for (Int32 index = 0; index < interfaces.Count; index++)
{
String strInterfaceName = interfaces[index]);
}
}
As the example shows, the method outputs a list of strings. Each item in the list represents
an available network interface card, identified by name.
The
QueryNetworkInterfaceCards method returns a Result object. This represents the status
of the operation. At a high level, this object will indicate whether the operation succeeded
(the Succeeded property is true) or failed (the Succeeded property is false). There are many
reasons that an operation might fail.
For a complete description of the Result class, see also
Result class (Page 72)

Table of Contents

Other manuals for Siemens SIMATIC S7

Related product manuals