Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
EC8791 UML-model train controller
1. RMK COLLEGE OF ENGINEERING AND
TECHNOLOGY
DEPARTMENT OF ELECTRONICS AND
COMMUNICATION ENGINEERING
EC8791
EMBEDDED AND REAL TIME SYSTEMS
S. Rajalakshmi
AP/ECE
2. UML (Unified Modeling Language)
Visual language used to capture the design tasks.
Encourages design by successive rather than re-thinking the design at each new
level of abstraction.
UML is an object-oriented modeling language. Used to model the outside world
that interacts with the system (Objects- People/Machines)
(i) Structural Description
Specify the overall structure of the design
(ii) Behavioral Description
Used to specify the behavior of the system. One way to specify the behavior of
an operation is a state machine.
3. The UML description of the Display class - An object describing a display (such as a CRT
screen)
9. Model train controller – WORKING PRINCIPLE
The user sends messages to the train with a control box attached to the
tracks. The control box consists of a console, throttle, emergency stop
button, and so on.
Since the train receives its electrical power from the two rails of the track, the
control box
can send signals to the train over the tracks by modulating the power supply
voltage.
The control panel sends packets over the tracks to the receiver on the train.
This is a one-way communication system—the model train cannot send
commands back to
the user.
10. Requirements
Consolecontrols up to 8 trains on 1 track.
Throttle hasat least 63 levels.
Inertia control adjustsresponsiveness with at least 8 levels.
Emergency stop button.
Error detection scheme on messages.
Ignore erroneous messages
11. Requirements form
name
purpose
inputs
outputs
functions
performance
model train controller
control speed of <= 8 model trains throttle,
inertia, emergency stop, train #
train control signals
set engine speed w. inertia;
emergency stop
can update train speed at least 10
times/sec
manufacturing cost $50
power
physical
size/weight
wall powered
console comfortable for 2 hands; < 2 lbs.
12. Requirements form
name
purpose
inputs
outputs
functions
performance
model train controller
control speed of <= 8 model trains throttle,
inertia, emergency stop, train #
train control signals
set engine speed w. inertia;
emergency stop
can update train speed at least 10
times/sec
manufacturing cost $50
power
physical
size/weight
wall powered
console comfortable for 2 hands; < 2 lbs.
8
13. The DCC standard is given in two documents:
■Standard S-9.1, the DCC Electrical Standard, defines how bits are
encoded on the rails for transmission.
■Standard S-9.2, the DCC Communication Standard, defines the
packets that carry information.
.
15. DCC packet types
• Baseline packet: minimum packet that must be
accepted by all DCC implementations.
– Address data byte gives receiver address.
– Instruction data byte gives basic instruction.
– 0110 1 0 10
– Error correction data byte gives ECC.
11
16. DCC communication standard
• Basic packet format: PSA(sD)+E.
• P: preamble = 1111111111.
• S: packet start bit = 0.
• A: address data byte.
• s: data byte start bit.
• D: data byte (info in CU bit format )
• E: packet end bit = 1.
12
17. Functions
Console:
read state of front panel;
format messages;
Transmit messages.
Train:
receive message;
interpret message;
control the train.
25. Formatter class
formatter
current-train: integer
current-speed[ntrains]: integer
current-inertia[ntrains]:
unsigned-integer
current-estop[ntrains]: boolean
send-command()
panel-active() : boolean
operate()
Formatter class holds state for each
train, setting for current train.
The operate() operation performs
the basic formatting task.