Echelon i.LON SmartServer Informacje Techniczne Strona 370

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 443
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 369
i.LON SmartServer 2.0 Programmer’s Reference
21-18
", fault string: " + Device_Return_ItemColl.Item[j].fault.faultstring);
}
}
}
else
{
ItemCfgColl = SmartServer.Get(Device_Return_ItemColl);
for (int j = 0; j < ItemCfgColl.Item.Length; j++)
{
iLON_SmartServer.LON_Device_Cfg newDevice = (iLON_SmartServer.LON_Device_Cfg)ItemCfgColl.Item[j];
Console.WriteLine("New Device Created = " + newDevice.UCPTname + ". Status = " +
newDevice.UCPTcommissionStatus.Value + " and " +
newDevice.UCPTapplicationStatus.Value + ".\r");
}
}
Console.ReadLine();
}
finally
{
iLON_SoapCalls.CloseBindingToSmartServer();
}
}
}
}
21.1.5
Commissioning External Devices in Visual C# .NET
This C# console example reads the <UCPTitemStatus> of external LonWorks devices (obtained using
an xSelect), commissions any unconfigured devices, and reports the status of the network management
commands.
You can execute this code after you have referenced and inherited from the SmartServer WSDL as
described in
section 20.1, and instantiated and initialized the Web service client as described in section
20.2.
For more information on the network management commands issued in this example, see
section
14.3.3.1,
Issuing Network Management Commands.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace SmartServerConsoleExample
{
class MyDeviceProgram
{
// If you are using NET 2.0 Framework, uncomment the following line of code to enter your
// SmartServer’s IP Address
// public static string _iLonEndpointIpAddress = "<SmartServer IP Address>";
static void PrintGetError(iLON_SmartServer.Item_CfgColl ItemCfgColl)
{
// print out error and exit
Console.Out.WriteLine("An error occurred:");
for (int j = 0; j < ItemCfgColl.Item.Length; j++)
{
if (ItemCfgColl.Item[j].fault != null)
{
Console.Out.WriteLine("Item: " + ItemCfgColl.Item[j].UCPTname + ", fault code: " +
ItemCfgColl.Item[j].fault.faultcode + ", fault string: " +
ItemCfgColl.Item[j].fault.faultstring);
}
}
}
Przeglądanie stron 369
1 2 ... 365 366 367 368 369 370 371 372 373 374 375 ... 442 443

Komentarze do niniejszej Instrukcji

Brak uwag