Echelon i.LON SmartServer 2.0 Manual de usuario Pagina 372

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 443
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 371
i.LON SmartServer 2.0 Programmer’s Reference
21-20
deviceItems.Command[0].UCPTcommand =
iLON_SmartServer.LON_Device_eCommand.ChangeApplicationStatus;
deviceItems.Command[0].UCPTstatus.Value = "STATUS_REQUEST";
deviceItems.Command[1].UCPTcommand =
iLON_SmartServer.LON_Device_eCommand.ChangeCommissionStatus;
deviceItems.Command[1].UCPTstatus.Value = "STATUS_REQUEST";
deviceItems.Command[2].UCPTcommand = iLON_SmartServer.LON_Device_eCommand.Reset;
deviceItems.Command[2].UCPTstatus.Value = "STATUS_REQUEST";
Console.Out.WriteLine("*DEVICE CONFIGURATION CHECK**\r\n\r\n" +
deviceItems.UCPTname + "\r\n---------------------------------\r\n\r\n" + "STATUS
= " + deviceItems.UCPTitemStatus.Value + "\r\n COMMISSION STATUS = " +
deviceItems.UCPTcommissionStatus.Value + "\r\n APPLICATION STATUS = " +
deviceItems.UCPTapplicationStatus.Value + "\r\n");
}
}
iLON_SmartServer.Item_Coll ItemColl_SetReturn = SmartServer.Set(ItemCfgColl);
ItemColl_SetReturn.xSelect = "//Item[@xsi:type=\"LON_Device_Cfg\"]";
bool bAllDone = false;
do
{
ItemCfgColl = SmartServer.Get(ItemColl_SetReturn);
if (ItemCfgColl.UCPTfaultCount > 0)
{
PrintGetError(ItemCfgColl);
break;
}
bAllDone = true;
// now check all the items to make sure all the commands are done
for (int i = 0; i < ItemCfgColl.Item.Length; i++)
{
iLON_SmartServer.LON_Device_Cfg deviceItemsCheck =
(iLON_SmartServer.LON_Device_Cfg)ItemCfgColl.Item[i];
bool bOnlinePass = (deviceItemsCheck.Command[0].UCPTstatus.Value == "STATUS_DONE");
bool bCommissionPass = (deviceItemsCheck.Command[1].UCPTstatus.Value == "STATUS_DONE");
bool bResetPass = (deviceItemsCheck.Command[2].UCPTstatus.Value == "STATUS_DONE");
bool bOnlineFail = (deviceItemsCheck.Command[0].UCPTstatus.Value == "STATUS_DONE");
bool bCommissionFail = (deviceItemsCheck.Command[1].UCPTstatus.Value == "STATUS_DONE");
bool bResetFail = (deviceItemsCheck.Command[2].UCPTstatus.Value == "STATUS_DONE");
// print out status
Console.Out.WriteLine("\r\n *INSTALLATION STATUS CHECK**\r\n\r\n");
Console.Out.WriteLine(deviceItemsCheck.UCPTname + "ONLINE REQUEST STATUS = " +
deviceItemsCheck.Command[0].UCPTstatus.Value);
if (bOnlineFail && deviceItemsCheck.Command[0].fault != null)
{
Console.Out.WriteLine("Error string: " +
deviceItemsCheck.Command[0].fault.faultstring + ", Error Code" +
deviceItemsCheck.Command[0].fault.faultcode);
}
Console.Out.WriteLine(deviceItemsCheck.UCPTname + "COMMISSION REQUEST
STATUS = " + deviceItemsCheck.Command[1].UCPTstatus.Value);
if (bOnlineFail && deviceItemsCheck.Command[1].fault != null)
{
Console.Out.WriteLine("Error string: " +
deviceItemsCheck.Command[1].fault.faultstring + ", Error Code" +
deviceItemsCheck.Command[1].fault.faultcode);
}
Vista de pagina 371
1 2 ... 367 368 369 370 371 372 373 374 375 376 377 ... 442 443

Comentarios a estos manuales

Sin comentarios