44
Real-Time Protocols 1 IEC Train Communication Network IEC 61375 - Clause 2 1999 December, HK Train Communication Network IEC 61375-2 Real Time Protocols Message Services

Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

  • Upload
    others

  • View
    9

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

1 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Train Communication Network

IEC 61375-2

Real Time Protocols

Message Services

Page 2: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

2 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

RTP- Message Services

1. General Principles

2. Variables

3. Messages

1. Principle of Message Data communication

5. Software structure

2. Link Layer Interface

4. Transport protocol

3. Networking and Routing

1. Principle of cyclic Process Data broadcast

2. Traffic Stores principle and implementation

3. Process Variables and Datasets

4. Software structure

5. Application Layer Interface for Process Varialbles

6. Networking

6. Application Interface

Page 3: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

3 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

TCN Stack

Lin

k

Ph

ys

ica

l N

etw

ork

-in

de

pe

nd

en

t

Pro

toc

ols

periodic

medium access

process data

sporadic

medium access

message data

variables messages

presentation

(session)

presentation

supervisory

access

medium-independent signalling

mechanical and electrical elements

(transport)

(network)

supervisory data

physical signalling

void

Layer 2 interface

Layer 7 interface

Layer 1 interface

urgent less urgent

Layer

Management

physical media

Page 4: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

4 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Functions and Devices

Each vehicle supports a number of standardized functions.

The Train Bus accesses vehicles without knowing their internal structure.

The train bus accesses functions rather than devices .

These functions are implemented by one or several vehicle bus devices, or even by the gateway itself.

vehicle bus

sensor bus

Train Bus

device

air condition

doors

brakes

doors

passenger info

device device device device

sensors/

actors

bus

master

The gateway deduces the device from the function and routes messages.

train-vehicle

gateway

Page 5: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

5 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Client-Server Service

replier

time-out

The Application Interface for Messages provides a "Call with Reply" service

Network Caller Replier

Call_Request

Call_Confirm

Reply_Request

time

Transport Transport

Receive_Request

Receive_Request

Receive_Confirm

Applications communicate among themselves on a Client/Server basis.

Tasks use the same communication scheme:

• within the same processor

• within the same vehicle bus and

• within the Train Communication Network

Page 6: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

6 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Transport Protocol for Messages

train bus

F F F F F

the message transport protocol is executed by the vehicle bus devices

in vehicles without vehicle bus, the message transport protocol

is executed by the train bus node

gateway gateway node vehicle

bus

vehicle bus

the message transport protocol applies also within

the same bus and within the same device.

functions

F F F F F F F F

The Message Transport Protocol runs in each device

The transport protocol ensures a reliable communication from end-to-end between Application Functions.

Page 7: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

7 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Message Data Transmission

Messages are lengthy, but not so urgent data.

They are used e.g. for diagnostics, passenger information, down-loading.

Messages are segmented into packets for transmission.

Data, ackowledgements and control packets form the Message Data .

Message Data are sent upon demand between two process data cycles.

The sender and receivers of Message Data are queues (no buffers):

Bus

data packets

acknowledgements

Application Processes

send queue

receive

queue

Page 8: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

8 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

End-to-end Transport Protocol

WTB segment MVB segment

Porting the MTP to a bus providing connectionless datagrams is easy

link

network

transport

session

presentation

link

network

transport

session

presentation

(router)

application application

link

physical physical physical

Message

Transport

Protocol

link

network

transport

session

presentation

link

network

transport

session

presentation

(router)

application application

link

physical physical physical

MVB segment

Page 9: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

9 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

RTP- Network Layer

1. General Principles

2. Process Data

3. Messages

1. Principle of Messages communication

5. Software structure

2. Link Layer Interface

4. Transport and Session protocol

3. Networking and Routing

1. Principle of cyclic Process Data broadcast

2. Traffic Stores principle and implementation

3. Process Variables and Datasets

4. Software structure

5. Application Layer Interface for Process Variables

6. Networking

6. Application Interface

Page 10: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

10 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Packet Routing

Packets are transported in Message Data frames as datagrams which contain the full origin and final address.

The gateway operates as a router : it forwards packets from bus to bus without keeping knowledge of previous packets.

train bus

origin

station final

station

Message Data frame

vehicle bus vehicle bus

source

source

source

destination

destination

net_adr

ne

t_a

dr

ne

t_a

dr

destination

gateway gateway gateway gateway

Page 11: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

11 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Message Data Frames

DD WTB

MVB

8 bits

LLC

8

SD

8

transport data unit

8

MTC

DD

12

typ

e

4

SD

12 8

mo

de

4

link header network

addresses

transport data unit

8

MTC

8 8 8 8

8 8 8 8

final origin

Link Data Unit - common to all busses

size

8

size final origin

Message Data have the same format on the vehicle or on the train bus.

They are datagrams, which carry the full origin and final address

DD: destination device

SD: source device

LLC: link layer control

MTC: Messsage Transport Control

Message Data carry data packets, acknowledgements and control data.

Page 12: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

12 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Networking Different Busses

2-level hierarchy

I ntelligent stations and sensors/actuators are

attached to the vehicle bus

3-level hierachy

Sensors are attached directly or by a sensor

bus

1-level hierarchy

Equipments are attached to a node-internal

backplane bus which plays the role of a vehicle bus

train level

stations

vehicle bus

sensors & actuators

backplane bus vehicle bus

sensor bus

gateway gateway node

The real-time protocols allow to interconnect different vehicle structures

Page 13: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

13 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network Layer Operation

The network layer is responsible for the routing of packets

(data, acknowledgement and control) through the network

It is connectionless, i.e. it retains no knowledge about previous packets belonging to the same message

Routing is done on the base of two directory tables:

• station directory

• function directory

These directories are set up by the application or by network management.

Routing relies on the network addresses contained in each packet.

The network layer has no protocols (no segmentation / reassembly), but

address calculation is complex.

Page 14: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

14 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Reference Architecture

UP1

UP2

UPf

Agent

me

sse

ng

er

UP1

UP2

UPf

Agent

me

sse

ng

er

UP1

UP2

UPf

Agent

me

sse

ng

er

UP1

UP2

UPf

Agent

me

sse

ng

er

Application

Processes

Train Bus

Ve

hic

le B

us

UP1

UP2

UPf

Agent

me

sse

ng

er

UP1

UP2

UPf

Agent

me

sse

ng

er

UP1

UP2

UPf

Agent

me

sse

ng

er

rou

ter

node node node

station

station

Ve

hic

le B

us

LL

LL LL

LL

LL

LL

L

L

LL

L

L

rou

ter

A station is a (vehicle or train bus) device capable of message communication.

All Application Processes (UPs, Agents) communicate through the Messenger.

link layer

User Processes

Page 15: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

15 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Example of an Actual Configuration

Vehicle Busses

Ve

hic

le B

us

UP1

UP2

UPf

Agent

messenger

rou

ter UP1

UP2

UPf

Agent

me

sse

ng

er

UP1

UP2

UPf

Agent

me

sse

ng

er

rou

ter

#101

#102

#103

#122

#123

#125

#156

#157

#158

0021

0022

0023

0022

0023

0025

56

57

58

Physical Address

#002

0002

#003

0003 #004 (Station Identifier)

#001 #011 #001 node 05 node 06 node 07

0001 0020 56 0020

Station Identifier

repeater

UP1

UPf

Agent

me

sse

ng

er

0004

(physical

address)

Manager

Train Bus

Page 16: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

16 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Reference Gateway

Agent User

Processes

User

Processes User

Processes

Messenger

Message Transport Protocol

application interface AM

Application Processes

WTB physical medium MVB physical medium

Session Layer

Transport Layer

Network Layer

Link Layer

Physical Layer

NodDi

Application Layer

StaDi

A gateway has a router and more than one link layer

Agent = Station Management Agent

( for parametrizing, down-loading, configuration, debugging, performance measurement)

Router LM LM

WTB

Link Layer MVB

Link Layer

FunDi

Page 17: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

17 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: System Point Of View

Train Bus

Node # 01 Node # 03 Node # 02

station

(agent)

#002

station

(agent)

#003

station

(agent)

#020

station

(agent)

#001

station

(agent)

#003

station

(agent & manager)

#100

The System Engineer identifies stations attached to train bus nodes.

The interconnection of the stations is not visible (no, 1, 2,... vehicle busses).

The train bus node counts as one station.

The communicating entities are the Agents and the Managers.

The nodes route the packets through their Station Directory

station

(agent)

#001

Page 18: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

18 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Train Bus Addresses

attended driver's cab

03 04 05 06 07 08 02 01

principal direction of travel

UIC applications address vehicles by their position relative to the head of the train.

The Train Bus operates with nodes addresses, which is the position of a node relative to the master node (address 01)

01

(master) 02 03 05 06 04 07 08

The train inauguration gives each node its position and the direction of the master.

hauled vehicles pushed vehicles

Since a vehicle may have one, two or no operative node, there must exist a mapping between node address and UIC application address.

63

The real-time protocols only rely on the TCN addressing.

Page 19: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

19 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Example Of Communication

UP1

UP2

UPf

Agent

me

sse

ng

er

Train Bus

Node # 05 Node # 08 Node # 06

#002

0002

#103

0003

0100

Station

Identifier

#002

0002

#003

0003

#004

0004

#002

0002

#003

0003

#232

0232

0200

Vehicle Bus

(Physical)

Address

#001

LL

Ve

hic

le B

us

Ve

hic

le B

us

Ve

hic

le B

us

Page 20: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

20 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Example of Frame Exchange

Back

0100 0133 08 (05) 133 232

08 05 08 05 133 232

VB

origin

TB

intermediate

0232 0200 (08) 05 133 232

simple routing

0200 0232 05 (08) 232 133

05 08 05 08 232 133

0133 0100 (05) 08 232 133

simple routing

simple routing

Forth

VB

final

simple routing

VB

origin

TB

intermediate

VB

final

physical addresses network addresses

application knows that node #8 is accessed over Station #100

(its gateway)

node #05 inserts its current node address

node #8 routes Station #232 to VB Address 0232 (simple routing)

node #08 checks

its correct TB address

node #05 routes Station #133 to VB address 0133 (simple routing)

Station #232 acknowledges to Station #200.

Page 21: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

21 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Station Directory

Station Link Layer Physical Address

003 MVB1 0003

005 MVB1 0005

103 MVB2 0003

223 Parallel_Bus 203040

The Station Directory in the network layer routes the messages on the base of their station address to the corresponding link layer and device address

Page 22: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

22 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Routing Between Two Vehicle Busses

Train Bus

Vehicle Bus 1

gateway

Two (or more) vehicle busses may be attached to a train bus gateway.

The gateway routes message data according to the network address

from vehicle bus to vehicle bus or from vehicle bus to train bus.

Vehicle Bus 2

device group 1 device group 2

The station identifier must be unique under a given train bus node.

station #001

bus address 0011 bus address 1011

bus address:

#002 #003 #004 #005 #006 #007 #008 #009 station:

0012 0013 0014 0015 0012 0013 1014 1015

Page 23: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

23 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Sensor Bus Configuration

Train Bus

Vehicle Bus

UP1

UP2

UPf

agent

me

sse

nger

rou

ter

agent

#101 agent

#102

agent

#002

UP1

UP2

UPf

agent

me

sse

nger

rou

ter

agent

#003

agent

#100

Sensor Bus

StaDi

Station

#004

Station

#001

StaDi

Page 24: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

24 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Sensor Bus Path

Train Bus

Ve

hic

le B

us

me

sse

nger

UP1

UP2

UPf

agent

me

sse

nger

rou

ter

Sensor Bus

Station #206

Station Identifier

0200

#202

0202

Station Identifier

VB address

Node # 08

#294 4

Station Identifier

SB address #292

2 #293

3

1

station link device

#294 SB 4 SB

VB

0206

0202

0204

#002

0002

#103

0003

#133

0133

0100

Station Identifier

VB address

Node # 05

Ve

hic

le B

us

StaDi

StaDi

station link device

#206 VB 206

#294 VB 206

Station Directory

UP1

UP2

UPf

agent Node # 05

rou

ter

Page 25: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

25 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: User Point Of View

F3 F2 F1 F3 F2 F1 F3 F2 F1

Train Bus

Node # 01 Node # t Node # 02

The user sees functions attached to nodes.

The node itself is not a function - but the node device can implement functions

Page 26: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

26 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Function Architecture

UP1

UP2

UPf

agent

me

sse

nger

Application

Processes

Train Bus

UP1

UP2

UPf

agent

me

sse

nger

rou

ter UP1

UP2

UPf

agent

me

sse

nger

rou

ter UP1

UP2

UPf

agent

me

sse

nger

UP

#101 UP

#102

UP1

UP2

UPf

agent

me

sse

nger

rou

ter

UP

#100

Sensor Bus

FunDi

UP1

UP2

UPf

agent

me

sse

nger

FunDi

FunDi

UP1

UP2

UPf

agent

me

sse

nger

FunDi

Fun

Di

Fun

Di

Fun

Di

The communicating entities are functions in the different stations

Ve

hic

le B

us

Page 27: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

27 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Function Directory

Function Station

2 003

5 104

7 0 (local)

12 30

Station Link Layer Physical Address

003 MVB1 0003

005 MVB1 0005

103 local 0

223 Parallel_Bus 203040

Function Directory

Station Directory

The Function Directory maps the function to the corresponding station

Page 28: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

28 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Address Kinds

Physical Address: identifies a device on a bus - can be a broadcast address.

gateways have more than one physical address

each frame carries the source and destination address.

Link Identifier: In a gateway, link layers are identified by their address (e.g. 1,2)

Network Address:

Each frame carries the origin and final network address

Link Service Access Point Only one default LSAP is used in TCN (unused).

Application Address: system/user

individual/group

node

station or function

next station

The application process identifies the remote application process through its network address.

All other addresses are deduced from this one. 1 bit

1 bit

6 bits

8 bits

8 bits

The network address is the concadenation node + (station or function)

Page 29: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

29 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Address Calculation

16-bit Function Address

1 = System (Station)

train bus node next station (device) function (user process)

(1/255) Function Identifier 0 0/1 node

0 = individual

1 = group

1 (1/254) Station Identifier node

0 = User (Function)

16-bit Station Address

Application Address

Station

Link and Physical Address

Function

Directory

Station

Directory

station (agent)

Page 30: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

30 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Message Consistency and WTB Topography

if a topography change occurs while a message is transmitted,

the remaining packets may be delivered to the wrong node.

if a topography change occurs between a call and a reply message,

the reply message may be delivered to the wrong node.

To this effect, each WTB node maintains a topography counter, which is incremented each time the topography of the WTB changes.

This misaddressing will be detected in most cases.

When nodes swap their addresses, undetectable situations may occur.

All packets of a message exchanged over the vehicle bus carry the topography counter in place of the local node address (which is redundant).

If a station detects that topography changed, it cancels only that conversation.

When topography changes, each WTB node signals its messenger,

which cancels all ongoing message data communication over the WTB and flushes the queues of the WTB link layer.

Transport level:

Session level:

Page 31: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

31 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Impact of Topography Change on Communication

A topography change cancels indistinctly all conversations over the WTB.

It would not be necessary to cancel conversations between nodes which

did not change their addresses.

However, it is not possible to guarantee that the topography change did not affect the addresses of either partner.

Even if no node address changed, it is not possible to guarantee that the reason why this address was chosen still holds.

Even if the node address and function did not change, the application mapping may not anymore be correct, since it was based on some dynamic property of the node which changed in between (e.g. attended driver seat).

Therefore, communication must be cancelled indistinctly when the transport

protocol becomes unable to guarantee correct delivery in all cases.

Page 32: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

32 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Network: Inclusion of Topography Counter

Train Bus

08 CR 00

Final Node Origin Node

X X

LTC5 CC 08 X X

08 DT LTC5 X X

LTC5 AK 08 X X

LTC8 CR 05

FN ON

X X

05 CC LTC8 X X

LTC8 DT 05 X X

05 AK LTC8 X X

consumer

station

"producer"

Node # 05 "consumer"

node # 08 Node # 06

Ve

hic

le B

us

FN ON

producer

station

LTC5

FN ON

LTC8 Local

Topography

Counter

The gateway substitutes the topography counter in place of the node address

Ve

hic

le B

us

Page 33: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

33 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Transport and Session Protocol

1. General Principles

2. Variables

3. Messages

1. Principle of Messages communication

5. Software structure

2. Link Layer Interface

4. Transport and Session Protocol

3. Networking and Routing

1. Principle of cyclic Process Data broadcast

2. Traffic Stores principle and implementation

3. Process Variables and Datasets

4. Software structure

5. Application Layer Interface for Process Variables

6. Networking

6. Application Interface

Page 34: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

34 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Transport: Message Transport Protocol

The MTP opens a connection for each call message and

closes it after the reply message has been received.

It uses in each direction a sliding window protocol with a window size of 1…7

and positive acknowledgement (negative is also possible)

The frame and window size are negotiated at connection opening.

The origin and destination addresses uniquely identify the connection.

A connection reference prevents duplication of messages.

It is half-duplex (call and reply cannot take place at the same time)

A caller reference pairs messages in a multi-tasking station.

Page 35: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

35 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Transport: Frame Exchange in one Direction

Transport

DATA (0)

ACK (1)

DATA (1)

DATA ( last)

ACK (last)

ACK (2)

Transport Session

(Consumer)

alive

time-out

connect

time-out

ack

time-out

late acks

Connect Request

Connect Confirm

i

k

k

k

v

v

v

Session

(Producer)

sm_message_ind

sm_connect.ind

tm_message.req

sm_message.cnf v

Connection

Transfer

Disconnection

Network

sm_connect.cnf

A transport exchange consists of three phases: connection, transfer and disconnection

In this example, the transfer takes place with a window size of 1

Page 36: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

36 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Session: Call And Reply Over A Network

Vehicle

Bus Train

Bus Vehicle

Bus application

process application

process

time

messenger

messenger

connect

request

connect confirm

data

ack

route

r

route

r

Reply_request

messenger

messenger

connect

request

connect confirm

data

ack ro

ute

r

route

r replier

time-out

Call

Phase

Reply

Phase

Receive_confirm

Call_confirm Reply_confirm

connect

data

connect

data

Call_request Receive_request

server

works

Page 37: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

37 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Software Structure

1. General Principles

2. Variables

3. Message Data

1. Principle of Message Data communication

5. Software structure

2. Link Layer Interface

4. Transport and Session Layer

3. Networking and Routing

1. Principle of cyclic Process Data broadcast

2. Traffic Stores principle and implementation

3. Process Variables and Datasets

4. Software structure

5. Application Layer Interface for Process Variables

6. Networking

6. Application Interface

Page 38: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

38 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Software: Message Software Structure

network

MAA

MLA MLA

transport

network

MAA

MLA MLA

transport

network

MAA

MLA MLA

transport

Application

Process 1

Link 2

Application

Process 2 Application

Process 3 Application

Process n

Bus 1 Bus 2

Application

Message

Interface

Link Interface

Messenger

Process

Instances Network Layer

Transport Layer

AMA AMA AMA AMA

Link Processes for router station only Link 1

Function Directory

Applications access the network through the Application-Message Interface (AMI)

This interface supports multiple simultaneous calls and replies

MLA MLA

LMA LMA

Session Layer

Station Directory

Page 39: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

39 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Software Interfaces

Messenger

Link Layer Kern

el

Physical Layer

Interface

Physical Layer

Process Data Interface

Message Data

Interface

Porting of the TCN software to different platforms is eased by well-defined interfaces between the communication software and the application, the kernel and the link layer.

The bus-specific link layer also has a defined interface to the physical layer.

Application

Page 40: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

40 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Processor Interface Library (PIL)

The Messenger relies on services of the kernel

(e.g. memory allocation, timers, task wake-up)

To ease portability, the kernel services are defined in an interface module, the Processor Interface Library (PIL).

The PIL provides a set of basic functions as any commercial kernel (e.g. VRTX, WinWorks) can deliver.

Writing the PIL module is part of the porting process. In many cases, the PIL modules consists only of a redefinition of existing functions.

Page 41: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

41 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

PIL Functions

Block copy pi_copy8, pi_copy16

Interrupt Control pi_disable, pi_enable disables/enables all interrupts pi_call_hw_int software trap

Dynamic Memory pi_alloc, pi_free allocate memory block, free it.

Queues: pi_create_queue create queue, define priority pi_accept_queue check if a mesages is in the queu pi_send_queue insert a message in the queue pi_receive_queue suspend until message or time-out

Semaphores pi_create_semaphore create semaphore, define priority pi_inquiry_semaphore check semaphore value pi_pend_semaphore decrement sema, suspend if 0. pi_post_semaphore increment semaphore

Tasks pi_create/delete_task not part of PIL pi_lock_taks begin critical section pi_unlock_taks end critical section

Time-outs pi_create_time-out define function to call pi_enable_time-out enable a time-out and specify value pi_disable_time-out disable time-out pi_delete_time-out delete time-out

Page 42: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

42 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

AMI Procedures

Caller Interface

am_call_request

am_call_confirm

am_call_cancel

sends a call message

called on arrival of the reply message (or error)

cancel this call

Replier Interface

am_bind_replier

am_unbind_replier

am_receive_request

announces the service to the messenger

retires the service

expresses readyness to receive

am_receive_confirm called on arrival of a call message

am_reply_request sends the reply message

am_reply_confirm terminates the reply

am_receive_cancel cancels a receive or an unconfirmed reply

Directories (network layer access)

am_directory_insert inserts an entry in the directory

am_directory_remove removes an entry in the directory

Page 43: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

43 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK

Page 44: Train Communication Network IEC 61375-2 Real Time Protocols · (session) presentation supervisory medium-independent signalling mechanical and electrical elements (transport) (network)

Real-Time Protocols

44 IEC Train Communication Network IEC 61375 - Clause 2

1999 December, HK