Echelon i.LON 100 e2 Internet Server Manual de usuario Pagina 212

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 223
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 211
i.LON 100 Internet Server Programmer’s Reference 14-5
'the string to be retrieved and manipulated. Load the <Result>
'parameter into the XMLDocument object using the LoadXml method.
Dim myXML As New Xml.XmlDocument()
myXML.LoadXml(myXMLreturnString)
'Create a variable to reference the list of NVLs returned by the
'function. Each NVL child element in the string returned by the
'function will be considered a separate node within this list.
Dim myXmlNodeList As Xml.XmlNodeList
myXmlNodeList = myXML.SelectNodes("/iLONDataServer/NVL")
'Create a reference to a user-specified NVL from the list returned
'by DataServerList.
Dim myXmlNode As Xml.XmlNode
Const NV_INDEX As Integer = 0
myXmlNode = myXmlNodeList.Item(NV_INDEX)
'Insert the <iLONDataServer> element around the node to match the
'format required within the <Data> parameter of the DataServerGet
'function. Call the DataServerGet function, using the created
'string as input. The function will return the configuration of
'the data point with index number NV_INDEX.
myXMLreturnString =
myWebReference.DataServerGet("<iLONDataServer>" &_
myXmlNode.OuterXml & "</iLONDataServer>")
'Store the <Result> parameter returned by DataServerGet in the
'XMLDocument object created earlier. Then, reference the NVL 'element
included in the return string in the myXmlNode variable.
myXML.LoadXml(myXMLreturnString)
myXmlNodeList = myXML.SelectNodes("/iLONDataServer/NVL")
myXmlNode = myXmlNodeList.Item(NV_INDEX)
'Insert updated text into the <UCPTlocation> property of the
'string returned by DataServerGet. Then pass the string to
'DataServerSet. The <UCPTlocation> of the data point will be
'updated in the Data Server when DataServerSet is called. The
'<UCPTlocation> property is the third property within each <NVL>
'element. As a result, the index value fed to the ChildNodes
'property must be 2, since the index values are 0-based.
Dim myNewLocation As String
myNewLocation = "\Building 1\Room 3\Ceiling "
Const UCPTlocation As Integer = 2
myXmlNode.ChildNodes(UCPTlocation).InnerText = myNewLocation
myXMLreturnString = myWebReference.DataServerSet(myXML.OuterXml)
'Verify that the index number returned by DataServerSet matches
'the index number supplied in the input to the function. If they
'match, the data point was updated successfully.
Vista de pagina 211
1 2 ... 207 208 209 210 211 212 213 214 215 216 217 ... 222 223

Comentarios a estos manuales

Sin comentarios