Stargate NetBridge Gateway User’s Manual
8
Appendix A. Advanced XServe Configuration
8.1 Configuring XServe
XServe is configured through a set of XML Configuration files. Each file defines how a data
packet from the mesh is parsed and converted into sensor data. It also describes which
processing module will handle the sensor data and how it will be processed.
XML Configuration files consist of 3 sections:
•
Field Definitions:
Field Definitions describe the structure of a mesh data packet and
define how to convert mesh data into sensor data. These definitions are responsible for
parsing the incoming mesh data.
•
Filter Definitions:
Filter Definitions construct logical statements which determine the
type of any incoming mesh data packets and are used to choose the appropriate XML
Field Definitions to parse the data packet.
•
DataSink Parameters:
Datasink Parameters describe which processing modules will
handle the sensor data, and pass data specific parameters into the processing module.
Below is a portion XML Configuration for a MTS300 data packet:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE XServeConfig SYSTEM "./xserve_config.dtd">
<XServeConfig>
<XFieldExtractor name="XMTS300 Multihop Config XML" order="3">
<XFields>
<XField name="amtype" byteoffset="2" length="1" type="uint8"/>
<XField name="nodeid" byteoffset="7" length="2" type="uint16" specialtype="nodeid"/>
<XField name="parent" byteoffset="14" length="2" type="uint16" specialtype="parentid"/>
<XField name="group" byteoffset="3" length="1" type="uint8"/>
<XField name="board_id" byteoffset="12" length="1" type="uint8" specialtype="boardid"/>
<XField name="packet_id" byteoffset="13" length="1" type="uint8"/>
<XField name="voltage" byteoffset="16" length="2" type="uint16">
<XConversion function="(1252352/x)" returntype="uint16">
<XConvParam variablename="x" fieldname="voltage" type="float"/>
</XConversion>
</XField>
<XField name="temp" byteoffset="18" length="2" type="uint16"/>
<XField name="light" byteoffset="20" length="2" type="uint16">
<XConversion function="(y * (1252352/x) / 1023)" returntype="uint16">
<XConvParam variablename="x" fieldname="voltage" type="float"/>
<XConvParam variablename="y" fieldname="light" type="uint16"/>
</XConversion>
Page 42
Doc. # 7430-0449-01 Rev. A
Содержание Stargate NetBridge
Страница 1: ...Stargate NetBridge Gateway User s Manual Revision A October 2007 PN 7430 0449 01 ...
Страница 6: ......
Страница 60: ......
Страница 61: ......