Gw XML setup

From Phobos Wiki
Revision as of 14:13, 19 May 2011 by Roland (talk | contribs)
Jump to navigation Jump to search

Element: Setup

The XML setup starts with the tag Setup. The entire setup is contained in this element.

This element contains:

  • Element: Device
    • At least one element of this type.
  • Attribute: device
    • If more than one Device element available. This attribute specifies the id of the Device to use as current setup.
<Setup device="Telem-Gw6-1">
	<Device id="Telem-Gw6-1" />
	<Device id="Gw1" />
	<Device id="Gw2" />
</Setup>

Element: Device

This element contains setup for a specific device. This might be Gw itself or some substation device or SCADA device.

This element contains:

Child elements of Device when used as GW device

<Device id="Telem-Gw6-1">
	<Channel />
	<Interfaces />
</Device>

Child elements of Device when used as the device we're connecting to.

<Device id="DI-24T-1">
	<Protocol />
	<Objects />
</Device>

Element: Channel

This element contains:

<Channel id="DI-24T-1">
	<Port />
	<Device />
	<Objects />
</Channel>

Element: Protocol

<Protocol comment="protocol8" id="prot_8_0">
	<Address />
	<CommunicationDelay unit="millisecond">0</CommunicationDelay>
	<PollingTimeout unit="millisecond">500</PollingTimeout>
	<TimeSync />
	<RemoveCount>5</RemoveCount>
	<RemoveTime unit="second">20</RemoveTime>
	<ReplaceTime>false</ReplaceTime>
	<Type SubVersion="0" isMaster="false">IEC101UnBalanced</Type>
</Protocol>

Element: Address

This elements contents depend on the protocol selected

Iec-10x

<Address>
	<LinkAddress>1</LinkAddress>
	<LinkAddressLength>1</LinkAddressLength>
	<AsduAddress>1</AsduAddress>
	<AsduAddressLength>2</AsduAddressLength>
	<ObjectAddressLength>2</ObjectAddressLength>
</Address>

MODBUS

Value: integer

<Address>2</Address>

IEC62056-21

Value: string

Can be empty if only one device on channel.

<Address>addr123</Address>

Element: TimeSync

Timesync interval and correction setup

<TimeSync isEnabled="true">
	<Interval unit="second">30</Interval>
	<Correction />
</TimeSync>

Element: Correction

Possible timesync correction types:

  • Absolute
    • Timesync message shall always modified by this amount.
  • ConnectionSpeed
    • Baudrate based(only when using serial port)
<Correction>
	<Absolute enabled="true" unit="millisecond">0</Absolute>
	<ConnectionSpeed enabled="true"/>
</Correction>

Element: Port

Serial port

<Port class="SerialPortSetup">
	<BaudRate>9600</BaudRate>
	<DataBits>8</DataBits>
	<StopBits>1</StopBits>
	<Parity>none</Parity>
	<FlowControl>none</FlowControl>
</Port>

TCP/IP server

<Port class="TcpIpServerSetup">
	<PortNumber>80</PortNumber>
	<ClientIpMask>0.0.0.0</ClientIpMask>
	<Interface>eth0</Interface>
</Port>

TCP/IP client

<Port class="TcpIpClientSetup" name="16">
	<PortNumber>502</PortNumber>
	<IpAddress>10.0.0.89</IpAddress>
	<Interface>eth0</Interface>
</Port>

Virtual port

They are ports 3-5 on GW6.

<Port class="VirtualPortSetup">
	<Port class="SerialPortSetup">
	      <BaudRate>9600</BaudRate>
	      <DataBits>8</DataBits>
	      <StopBits>1</StopBits>
	      <Parity>none</Parity>
	      <FlowControl>none</FlowControl>
	</Port>
</Port>

Element: Objects

Element: Status

Master protocol has (connection)status DI object.

Has child Object element.

Element: Object

Depending on protocol the object belongs to (master/slave), has different child elements.

Possible child elements:

  • Address
  • Buffer
  • Filter

Attribute: type

Defines object type.

Possible values:

  • DI
  • AI
  • CN
  • DO
  • AO


Element: MxValue

Defines the object for current/latest value.

Child elements define default value, flags and time tag.

<MxValue id="DI_6_value">
	<Value>0</Value>
	<BitMask>
		<Bit>Invalid</Bit>
		<Bit>NotTopical</Bit>
	</BitMask>
</MxValue>


Element: Filter

Defines what is going to happen to the incoming measured value.

When an event is received, it is sent to it's filter. After the filter does what it's supposed to do, it will pass the event to the Next Filter

<Filter class="Change">
	<Next>
		<Filter class="Proxy">
		</Filter>
	</Next>
</Filter>
AddToBuffer

AddToBuffer may have more than one Target.

Target is a Buffer object.

<Filter class="AddToBuffer">
	<Target ref="DI_0_7_buf"/>
	<Target ref="DI_1_7_buf"/>
	<Target ref="DI_2_7_buf"/>
	<Target ref="DI_3_7_buf"/>
	<Target ref="DI_4_7_buf"/>
</Filter>
Assert

Generate event only if specified MxValue == false.

<Filter class="Assert">
	<Target ref="DI_7_value"/>
	<Next />
</Filter>
Change

Detects change in Digital measurments value and status bits.

Deadband
Fallback

Falls back to specified value.

Inversion

Inverts the passed digital value.

Proxy

Proxy may have more than one next Filter.

<Filter class="Proxy">
	<Next>
		<Filter class="AddToBuffer" />
		<Filter class="AddToBuffer" />
		<Filter class="Fallback" />
	</Next>
</Filter>
CsvLogger
UpdateLatest

Target is a MxValue object.

<Filter class="UpdateLatest">
	<Target ref="DI_7_value"/>
</Filter>

Element: Buffer

Defines a buffer object, with depth.

<Buffer id="DI_8_0_buf">
	<Depth>10</Depth>
</Buffer>

Element: Interfaces

Network setup

Has at least one Interface element.

<Interface name="eth0">
	<IpAddress>192.168.0.111</IpAddress>
	<Netmask>255.255.255.0</Netmask>
	<Gateway>192.168.0.1</Gateway>
</Interface>

VLAN

Other child elements required for Interface when using VLAN

<Vlan interface ="eth0">
    <VlanId>10</VlanId>
    <VlanIngressQos>4</VlanIngressQos>
    <VlanEgressQos>4</VlanEgressQos>
    <IpIngressQos>0</IpIngressQos>
    <IpEgressQos>0</IpEgressQos>
</Vlan>
<Vlan interface ="eth0">
    <VlanId>131</VlanId>
    <VlanIngressQos>4</VlanIngressQos>
    <VlanEgressQos>4</VlanEgressQos>
    <IpIngressQos>0</IpIngressQos>
    <IpEgressQos>0</IpEgressQos>
    <IpAddress>172.18.0.11</IpAddress>
    <Netmask>255.255.255.0</Netmask>
    <Gateway>172.18.0.254</Gateway>
</Vlan>