TCN Message Data - PowerPoint PPT Presentation

1 / 44
About This Presentation
Title:

TCN Message Data

Description:

1. Principle of cyclic Process Data broadcast. 2. Traffic Stores principle and implementation ... hauled vehicles. pushed vehicles ... – PowerPoint PPT presentation

Number of Views:145
Avg rating:3.0/5.0
Slides: 45
Provided by: hubertk
Category:
Tags: tcn | data | hauled | message

less

Transcript and Presenter's Notes

Title: TCN Message Data


1
Train Communication Network IEC 61375-2
Real Time Protocols
Message Services
2
RTP- Message Services
1. General Principles
2. Variables
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
3. Messages
1. Principle of Message Data communication
2. Link Layer Interface
3. Networking and Routing
4. Transport protocol
5. Software structure
6. Application Interface
3
TCN Stack
urgent
less urgent
Layer 7 interface
variables
messages
Layer
Management
presentation
presentation
Network-independent
Protocols
(session)
void
(transport)
(network)
Layer 2 interface
periodic
sporadic
supervisory
medium access
medium access
access
Link
supervisory data
process data
message data
Layer 1 interface
medium-independent signalling
physical signalling
Physical
physical media
mechanical and electrical elements
4
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.
Train Bus
train-vehicle
bus
gateway
vehicle
master
bus
air condition
passenger info
device
device
device
device
device
sensors/
doors
doors
sensor bus
actors
brakes
The gateway deduces the device from the function
and routes messages.
5
Client-Server Service
Caller
Replier
Network
Transport
Transport
Receive_Request
call
Call_Request
Receive_Confirm
replier
time-out
Reply_Request
reply
Call_Confirm
Receive_Request
time
The Application Interface for Messages provides a
"Call with Reply" service
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
6
Transport Protocol for Messages
The transport protocol ensures a reliable
communication from end-to-end
between
Application Functions.
train bus
node
gateway
vehicle
gateway
vehicle
bus
functions
bus
F
F
F
F
F
F
F
F
F
F
F
F
F
the message transport
in vehicles without vehicle bus,
the message transport
protocol is executed by
the message transport protocol
protocol applies also within
the vehicle bus devices
is executed by the train bus
the same bus and within
node
the same device.
The Message Transport Protocol runs in each device
7
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)
Application Processes
send
receive
queue
queue
Bus
acknowledgements
data packets
8
End-to-end Transport Protocol
(router)
(router)
application
application
application
application
presentation
presentation
presentation
presentation
Message Transport Protocol
session
session
session
session
transport
transport
transport
transport
network
network
network
network
link
link
link
link
link
link
physical
physical
physical
physical
physical
physical
WTB segment
MVB segment
MVB segment
Porting the MTP to a bus providing connectionless
datagrams is easy
9
RTP- Network Layer
1. General Principles
2. Process Data
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
3. Messages
1. Principle of Messages communication
2. Link Layer Interface
3. Networking and Routing
4. Transport and Session protocol
5. Software structure
6. Application Interface
10
Network Packet Routing
The gateway operates as a
router
it forwards packets from bus to bus
without keeping knowledge of previous packets.
Packets are transported in Message Data frames as
datagrams
which contain the full origin and final address.
Message Data frame
net_adr
train bus
source
destination
gateway
gateway
gateway
gateway
source
destination
net_adr
net_adr
origin
final
station
station
source
destination
vehicle bus
vehicle bus
11
Network Message Data Frames
Message Data carry data packets, acknowledgements
and control data.
network
link header
addresses
WTB
transport data unit
DD
LLC
SD
final
origin
size
MTC
8 bits
8
8
8
8
8
8
8
8
MVB
transport data unit
DD
SD
size
final
origin
mode
type
MTC
12
4
12
8
4
8
8
8
8
8
Link Data Unit - common to all busses
DD destination device
SD source device
LLC link layer control
MTC Messsage Transport Control
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
12
Networking Different Busses
node
gateway
gateway
backplane bus
train level
vehicle bus
vehicle bus
stations
sensor bus
sensors
actuators
2-level hierarchy

3-level hierachy

1-level hierarchy

I
ntelligent stations and
Sensors are attached
Equipments are attached
sensors/actuators are
directly or by a sensor
to a node-internal
attached to the vehicle bus
bus
backplane bus which plays
the role of a vehicle bus
The real-time protocols allow to interconnect
different vehicle structures
13
Network Layer Operation
The network layer is responsible for the routing
of packets
(data, acknowledgement and control) through the
network
Routing relies on the network addresses contained
in each packet.
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.
The network layer has no protocols (no
segmentation / reassembly), but address
calculation is complex.
14
Network Reference Architecture
Train Bus
node
node
node
Agent
Agent
Agent
LL
LL
LL
link layer
UP1
UP1
UP1
router
router
messenger
messenger
UP2
UP2
UP2
messenger
UPf
UPf
UPf
LL
LL
station
Agent
Agent
UP1
UP1
LL
LL
station
UP2
UP2
messenger
messenger
UPf
UPf
Vehicle Bus
Vehicle Bus
User Processes
Agent
Agent
UP1
UP1
Application
LL
LL
messenger
UP2
messenger
UP2
Processes
UPf
UPf
All Application Processes (UPs, Agents)
communicate through the Messenger.
A station is a (vehicle or train bus) device
capable of message communication.
15
Network Example of an Actual Configuration
Train Bus
node 05
node 06
011
001
node 07
001
Agent
Agent
Agent
UP1
UP1
UP1
router
router
messenger
UP2
messenger
UP2
messenger
UP2
UPf
UPf
UPf
0001
0020
56
0020
002
Station Identifier
101
122
156
0002
0021
0022
56
Physical Address
repeater
102
123
157
003
0022
0023
57
0003
004 (Station Identifier)
Vehicle Bus
Agent
103
125
158
Manager
0023
0025
58
messenger
Vehicle Busses
UP1
0004
(physical
UPf
address)
16
Network Reference Gateway
User
User
Application
User
Agent
Processes
Processes
Processes
Processes
Application Layer
application interface AM
Session Layer
Message Transport Protocol
Transport Layer
FunDi
Messenger
NodDi
Network Layer
Router
LM
LM
StaDi
WTB

MVB

Link Layer
Link Layer
Link Layer
WTB physical medium
Physical Layer
MVB physical medium
Agent Station Management Agent
(
for parametrizing, down-loading, configuration,
debugging, performance measurement)
A gateway has a router and more than one link
layer
17
Network System Point Of View
Train Bus
Node 03
Node 01
Node 02
station
station
station
station
station
station
station
(agent)
(agent)
(agent)
(agent)
(agent)
(agent)
(agent
002
003
020
001
003
001
manager)
100
The System Engineer identifies stations attached
to train bus nodes.
The train bus node counts as one station.
The interconnection of the stations is not
visible (no, 1, 2,... vehicle busses).
The communicating entities are the Agents and the
Managers.
The nodes route the packets through their Station
Directory
18
Network Train Bus Addresses
The Train Bus operates with nodes addresses,
which is the position of a node
relative to the master node (address 01)
01
02
03
05
06
07
08
63
(master)

The
train inauguration
gives each node its position and the direction of
the master.
UIC applications
address
vehicles
by their position relative to the head of the
train.
principal direction of travel
03
04
05
06
07
08
02
01
hauled vehicles
pushed vehicles
attended driver's cab
Since a vehicle may have one, two or no operative
node, there must exist a
mapping
between node address and UIC application
address.
The real-time protocols only rely on the TCN
addressing.
19
Network Example Of Communication
Train Bus
Node 05
Node 08
Node 06
001
0100
0200
002
002
002
0002
Vehicle
0002
0002
Bus
(Physical)
Station
103
Address
Identifier
003
003
0003
0003
0003
Agent
UP1
004
232
LL
UP2
messenger
0004
0232
UPf
Vehicle Bus
Vehicle Bus
Vehicle Bus
20
Network Example of Frame Exchange
physical addresses
network addresses
Forth
simple routing
application knows that node 8 is
VB
accessed over Station 100
0100
0133
08
(05)
133
232
origin
(its gateway)
node 05 inserts its current node
TB
08
05
08
05
133
232
address
intermediate
simple routing
node 8 routes Station 232 to VB
VB
0232
0200
(08)
05
133
232
Address 0232 (simple routing)
final
Back
simple routing
Station 232 acknowledges to
VB
0200
0232
05
(08)
232
133
Station 200.
origin
node 08 checks
TB
05
08
05
08
232
133
its correct TB address
intermediate
simple routing
node 05 routes Station 133 to
VB
0133
0100
(05)
08
232
133
VB address 0133 (simple routing)
final
21
Network Station Directory
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
Station
Link Layer
Physical Address
003
MVB1
0003
005
MVB1
0005
103
MVB2
0003
223
Parallel_Bus
203040
22
Network Routing Between Two Vehicle Busses
Train Bus
station 001
gateway
bus address 0011
bus address 1011
Vehicle Bus 1
Vehicle Bus 2
002
003
004
005
006
007
008
009
station
bus address
0012
0013
0014
0015
0012
0013
1014
1015
device group 2
device group 1
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.
The station identifier must be unique under a
given train bus node.
23
Network Sensor Bus Configuration
Train Bus
Station
agent
001
UP1
router
StaDi
UP2
messenger
UPf
agent
002
agent
Station
003
Vehicle Bus
004
agent
StaDi
UP1
router
UP2
messenger
UPf
Sensor Bus
agent
agent
agent
101
102
100
24
Network Sensor Bus Path
Train Bus
Node 08
Node 05
Station
agent
Node 05
Identifier
UP1
StaDi
router
UP2
messenger
0100
UPf
station
link
device
002
0200
206
VB
206
0002
Station Identifier
202
294
VB
206
0202
0202
VB address
Station Directory
103
Vehicle Bus
0003
0204
Station 206
Station Identifier
133
agent
StaDi
0133
VB address
UP1
0206
router
VB
UP2
messenger
station
link
device
294
SB
4
UPf
SB
Vehicle Bus
1
Sensor Bus
Station Identifier
294
292
293
SB address
4
2
3
25
Network User Point Of View
Train Bus
Node 01
Node t
Node 02
F3
F2
F1
F3
F2
F1
F3
F2
F1
The user sees functions attached to nodes.
The node itself is not a function - but the node
device can implement functions
26
Network Function Architecture
The communicating entities are functions in the
different stations
Train Bus
agent
agent
agent
UP1
UP1
UP1
UP2
router
UP2
router
UP2
messenger
messenger
messenger
FunDi
FunDi
UPf
UPf
UPf
FunDi
agent
agent
UP1
UP1
UP2
UP2
messenger
messenger
Vehicle Bus
UPf
FunDi
UPf
FunDi
agent
agent
FunDi
UP1
UP1
Application
UP2
UP2
router
Processes
messenger
messenger
UPf
UPf
FunDi
Sensor Bus
UP
UP
UP
101
102
100
27
Network Function Directory
The Function Directory maps the function to the
corresponding station
Function Directory
Function
Station
2
003
Station Directory
5
104
Station
Link Layer
Physical Address
7
0 (local)
003
MVB1
0003
12
30
005
MVB1
0005
103
local
0
223
Parallel_Bus
203040
28
Network Address Kinds
identifies a device on a bus - can be a broadcast
address.
Physical Address
gateways have more than one physical address
each frame carries the source and destination
address.
In a gateway, link layers are identified by their
Link Identifier
address (e.g. 1,2)
Only one default LSAP is used in TCN (unused).
Link Service Access Point
The application process identifies the remote
application
Network Address
process through its network address.
Each frame carries the
origin
and
final
network address
The network address is the concadenation node
(station or function)
All other addresses are deduced from this one.
Application Address
system/user
1 bit
individual/group
1 bit
node
6 bits
station or function
8 bits
next station
8 bits
29
Network Address Calculation
Application Address
train bus node
next station (device)
function (user process)
station (agent)
16-bit Station Address
1
(1/254) Station Identifier
node
1 System (Station)
(1/255) Function Identifier
0
0/1
node
16-bit Function Address
Function
0 User (Function)
Directory
0 individual
1 group
Station
Station
Directory
Link and Physical Address
30
Network Message Consistency and WTB Topography
Transport level

if a topography change occurs while a message is
transmitted,
the remaining packets may be delivered to the
wrong node.

Session level
if a topography change occurs between a call and
a reply message,
the reply message may be delivered to the wrong
node.
This misaddressing will be detected in most
cases.

When nodes swap their addresses, undetectable
situations may occur.
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.
To this effect, each WTB node maintains a
topography counter, which is
incremented each time the topography of the WTB
changes.
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.

31
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.
32
Network Inclusion of Topography Counter
Train Bus
"producer"
"consumer"
Node 06
Node 05
node 08
LTC5
LTC8
Local
Topography
FN
ON
FN
ON
Counter
consumer
producer
station
station
Vehicle Bus
Vehicle Bus
Final Node
Origin Node
FN
ON
08
00
X
X
CR
05
X
X
LTC8
CR
05
X
X
CC
LTC8
08
X
X
LTC5
CC
08
X
X
DT
LTC5
05
X
X
LTC8
DT
05
X
X
AK
LTC8
08
X
X
LTC5
AK
The gateway substitutes the topography counter in
place of the node address
33
Transport and Session Protocol
1. General Principles
2. Variables
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
3. Messages
1. Principle of Messages communication
2. Link Layer Interface
3. Networking and Routing
4. Transport and Session Protocol
5. Software structure
6. Application Interface
34
Transport Message Transport Protocol
The MTP opens a connection for each call message
and
closes it after the reply message has been
received.
It is half-duplex (call and reply cannot take
place at the same time)
It uses in each direction a sliding window
protocol with a window size of 17
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.
A caller reference pairs messages in a
multi-tasking station.
35
Transport Frame Exchange in one Direction
Transport
Transport
Session
Session
Network
(Consumer)
(Producer)
Connection
Connect Request
tm_message.req
sm_connect.ind
connect
i
time-out
sm_connect.cnf
Connect Confirm
Transfer
v
DATA (0)
ack
k
time-out
ACK (1)
alive
v
time-out
DATA (1)
k
ACK (2)
v
DATA ( last)
k
sm_message_ind
v
ACK (last)
late
sm_message.cnf
Disconnection
acks
A transport exchange consists of three phases
connection, transfer and disconnection
In this example, the transfer takes place with a
window size of 1
36
Session Call And Reply Over A Network
Vehicle
Train
Vehicle
application
application
Bus
Bus
Bus
process
process
Call_request
connect
Receive_request

request
connect
router
messenger
Call
router
messenger
Phase
data
Receive_confirm
data
ack
server works
connect
Reply_request
request
router
connect
replier
time
messenger
time-out
Reply
router
messenger
Phase
data
data
ack
Call_confirm
Reply_confirm
37
Software Structure
1. General Principles
2. Variables
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
3. Message Data
1. Principle of Message Data communication
2. Link Layer Interface
3. Networking and Routing
4. Transport and Session Layer
5. Software structure
6. Application Interface
38
Software Message Software Structure
Application
Application
Application
Application
Process 1
Process 2
Process 3
Process n
AMA
AMA
AMA
AMA
Application
Message
Interface
Function Directory
Messenger
Session Layer
Process
Transport Layer
Instances
Station Directory
Network Layer
MLA
MLA
Link Interface
LMA
LMA
for router
Link Processes
station only
Link 2
Link 1
Bus 2
Bus 1
Applications access the network through the
Application-Message Interface (AMI)
This interface supports multiple simultaneous
calls and replies
39
Software Interfaces
Application
Process Data
Message Data
Interface
Interface
Messenger
PIL
Kernel
Link Layer
Physical Layer
Interface
Physical Layer
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.
40
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.
41
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
42
AMI Procedures
Caller Interface
am_call_request
sends a call message
am_call_confirm
called on arrival of the reply message (or error)
am_call_cancel
cancel this call
Replier Interface
am_bind_replier
announces the service to the messenger
am_unbind_replier
retires the service
am_receive_request
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
43
(No Transcript)
44
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com