SlideShare a Scribd company logo
1 of 95
Baltimore SIGAda
• Rational Rose Real Time Presentation
Baltimore SIGAda
• Real-Time System Design
Concepts
Baltimore SIGAda
• Characteristics of Real-Time Systems
– Responsiveness
– Timeliness
– Concurrency
– Dynamic structure and behaviour
– Distribution
– Reliability
Baltimore SIGAda
• Hard Real-Time Systems
– Deterministic system behaviour
• Soft Real-Time Systems
• System combinations of Soft and Hard
Real-Time Systems
Baltimore SIGAda
• Hard Real-Time Systems are often designed
with an additional component that is not
part of the UML Standard – Timing
Diagrams.
Hard Real-Time Systems are often designed
to interact with sensors and activators on the
equipment that the system is
communicating with.
Baltimore SIGAda
• Hard real-time systems that are safety-critical may
contain within the architecture a watchdog timer
implementation.
• Watchdog timers may be built into a
microprocessor card and are typically driven by a
periodic reset signal from the primary processor.
If the reset signal fails to reset the watchdog timer
within that time, the watchdog timer restarts the
main processor.
Baltimore SIGAda
• Real-time systems may make use of a
technique called “interrupts”.
Interrupts may be disabled and the result is
a portion of code that is “atomic”. Some
portions of a real-time system to operate
correctly are labelled “critical sections” are
must be atomic for the system to operate
properly.
Baltimore SIGAda
• Modeling Real-Time Systems
Baltimore SIGAda
• Concurrency support from operating
systems and programming languages is
limited.
• Many complex real-time systems are state-
based. The behaviour of these systems may
be difficult to design and understand.
Baltimore SIGAda
• In order to model states with concurrency
one needs a notation, a process and a tool.
• This pyramid of building blocks is
represented by the Unified Modeling
Language, the Rational Unified Process and
the Rational Rose Real-Time Modeling tool.
Baltimore SIGAda
• UML and Rose Realtime handle concurrency with
the capsule. The capsule provides this capability
to model concurrency.
• To support concurrency a passive object must
exercise control over “critical” or “atomic”
sections of code where variable could be accessed
simultaneously. An example of the problem is the
Shared Data Bug.
Baltimore SIGAda
• Active Objects and Finite State Machines
– State – condition in which an active object
persists and behaves in a predetermined way for
some time
– Transition -- path connecting two states
– Trigger – an event which fires a transition
– Action – work performed by action code when
transition is fired by the triggering event
Baltimore SIGAda
• Capsule enforce the O-O concept of
encapsulation.
• Capsules interact via asynchronous message
passing.
• Capsules encapsulate the finite state
machine behaviour, an execution thread,
and the properties of the capsule.
Baltimore SIGAda
• Capsules may be concurrent or distributed.
• Capsules may be tested independently.
• Demonstrate use of a capsule in a concurrent
architecture.
• In a Class Diagram identify the UML notation for
a capsule.
– Attributes
– Operations
– Ports
– Finite State Machine
– Structure Diagram
Baltimore SIGAda
• UML Models
– Use Case Model – similar to requirements
– Design Model – realized by class diagrams
– Implementation Model – collection of
components
– Test Model – test cases and procedures
Baltimore SIGAda
• Rose Real-Time Views
– Use-Case View – use-case diagrams; interaction
diagrams – sequence and collaboration diagrams;
– Logical View – class diagrams; structure diagrams;
state diagrams; collaboration diagrams; sequence
diagrams;
– Implementation (Component) View – executables, C++
Libraries; C++ External Libraries
– Deployment View – software components are mapped
to hardware deployment configuration
– See Rational Training Course DEV160 Modeling
Behaviour with UML
– Demonstrate the views to the working group.
Baltimore SIGAda
• Use-Case View diagrams consist of use-
case and interaction diagrams
• Use Case Diagrams consist of actors and
use cases
• Actors are outside of the system and interact
with the system
• Use cases are actions performed by the
system
Baltimore SIGAda
• Interaction Diagrams consist
of collaboration diagrams
– Framework for sequence diagrams
Baltimore SIGAda
• Sequence Diagrams are
interactions between elements
as a time ordered set of
messages.
• Contain instances of
capsules.
Baltimore SIGAda
• Logical View contains Class
Diagrams, Structure Diagrams,
State Diagrams, Collaboration
Diagrams and Sequence
Diagrams.
Baltimore SIGAda
• Class Diagrams depict static
view of Packages, Capsules,
Classes, Protocols and
Relationships
Baltimore SIGAda
• Structure Diagrams are a
specialized Collaboration
Diagram.
• Contain Capsule roles, Ports
and Connectors.
• Structure diagrams are
contained within a capsule.
Baltimore SIGAda
• State Diagrams depict high
level behaviour of a capsule
in a finite state machine
• Contain States, substates and
transitions
Baltimore SIGAda
• Component View describes
organization of static
software modules
• The software is built in this
view (i.e. compiled)
• Contains executables and C
and C++ Libraries
Baltimore SIGAda
• Deployment View is where software
components are mapped onto hardware
• Contains processors and component
instances
– Processors describe on what processor the built
component is run on
– Component instances are executable
components
Baltimore SIGAda
• Socket Interface Presentation
• The purpose of this
presentation is to describe
how a Socket Interface may be
implemented using Rational
Rose.
Baltimore SIGAda
• This demo uses the following
Architecture:
Baltimore SIGAda
• This is the Class Diagram for the
server (ReceiverSameThread) and
client (SenderSameThread)
capsules. They represent the top-
level capsules for the ping/pong
example. The IPC and TCP capsules
are incarnated by the top-level
capsules onto a physical thread
configured with the
RTCustomController implementation
class.
Baltimore SIGAda
• The Class Diagram depicts a
composition relationship
between the top-level
capsules and the IPC and TCP
capsules. The next two
slides describe a composition
relationship.
Baltimore SIGAda
• Server Side Socket Connection
Description
Baltimore SIGAda
• The IPCReceiver capsule is incarnated
by the top-level capsules onto a
physical thread configured with the
RTCustomController implementation
class i.e. a RTCustomController thread.
• The frame service in Rose Real-Time is
used to incarnate an IPCReceiver
capsule role.
Baltimore SIGAda
• An example of how the frame
service is used below to
incarnate (i.e. create or
instanstiate) capsule roles,
destroy capsule roles, plug
in capsule roles (i.e.
import) or unplug capsule
roles (i.e. deport)
• id =
frame.incarnate(iPCReceiver,
Baltimore SIGAda
The frame service call is action
code contained within the
transition Labelled initialize.
This is a state diagram for the
capsule ReceiverSameThread.
Baltimore SIGAda
• The incarnated TCPServer and
TCPClient architecture
Baltimore SIGAda
• Here is structure diagram
which contains a capsule role
labelled iPCReceiver.
Baltimore SIGAda
• The previous slides shows a structure
diagram for ReceiverSameThread
which contains a capsule role labelled
IPCReceiver. This capsule role has a
symbol in the lower right corner that
indicates that there is a nested capsule
role within this capsule role.
Baltimore SIGAda
• The structure diagram for IPCReceiver
capsule contains a capsule role labelled
customIPCLayer of class TCPServer.
Baltimore SIGAda
• iPCReceiver refers to the
optional Capsule Role
• IPCReceiver is the address to
myData
• EmptyObject is an optional
piece of data that is
delivered to the capsule in
its initial transition.
• CustomIPCThread refers to the
logical thread in which the
Baltimore SIGAda
• The IPCReceiver capsule controls the
number of messages exchanged with
the TCPclient capsule through the
contained optional capsule
'customIPCLayer'.
Baltimore SIGAda
• The capsule role labelled
customIPCLayer of class TCPServer is
connected via a connector to a port
labelled talkRemote.
• The talkRemote port is a conjugated,
wired, protected, end port in the
structure diagram for IPCReceiver.
Baltimore SIGAda
• In the previous slide, the rounded rectangle
attached to the end port refers to the state
machine of the associated capsule. So
messages coming in on this port are
delivered to, and are processed by the
associated capsule’s state machine. The
connected boxes inside the rounded
rectangle refer to a connection. Ports that
have the connected boxes in it are wired
ports.
Baltimore SIGAda
• This is the state diagram for
the IPCReceiver capsule.
Baltimore SIGAda
• The following slide depicts
how action code contained
within the transition
labelled Initialize will
incarnate a TCPServer.
Baltimore SIGAda
• An example of how the frame
service is used below to
incarnate (i.e. create or
instanstiate) capsule roles,
destroy capsule roles, plug
in capsule roles (i.e.
import) or unplug capsule
roles (i.e. deport)
• id =
frame.incarnate(customIPCLaye
r,
Baltimore SIGAda
• The action code in the transition
labelled ping uses the talkRemote
port to send the pong signal. The
format for sending data in Rose
Real-Time is
port_name.signal(data).send();
• The pong signal is defined in a
protocol class and optionally may
have data associated with them.
Action code is below.
• talkRemote.pong().send();
Baltimore SIGAda
• This is the state diagram for
the TCPServer capsule.
Baltimore SIGAda
• The transition for internalSetup
sets a variable called internalFd
which will be used by 'wakeup'
calls to unblock the
RTCustomController.
• internalFD is a internal UDP
socket descriptor.
• UDP sockets are connectionless and
have no protocol. There are
suitable to use for the purpose of
local host (board) communication.
• internalFd = makeUdpConnection();
Baltimore SIGAda
• A connectionless service is
one in which transmissions
take place without a pre-
established path between the
source and destination.
Because packets may arrive by
different paths and in random
sequences, there is no way to
guarantee delivery of a
message in a connectionless
service. Because it can not
guarantee delivery, a
Baltimore SIGAda
• The Action Code for the
choice point labelled
internalOK checks the value
of internalFd [which is an
internal socket descriptor]
to see if if it has been set
to a value other than -1
which it was initialized to.
• Action code is on next slide.
Baltimore SIGAda
• if( internalFd < 0 )
• return 0; // not OK
• // Follow the
FALSE path
• // of the
Choice Point
• ioMonitor.add( internalFd,
RTIOMonitor::CanRead );
• return 1; // OK
• // Follow
the TRUE path
Baltimore SIGAda
• TCPServer side transition
action code for externalSetUp
on next three slides
• create an variable labelled
listener of type RTTcpSocket
class
• RTTcpSocket listener;
Baltimore SIGAda
• use the RoseRT log service to
output a message
without a carriage return
and the integer value of the
listening port.
• LISTENING_PORT is a constant
in the TCPIP_Proxies package
and its value is set to 31736
• log.show("Listening to: ");
log.log( (int)LISTENING_PORT
);
Baltimore SIGAda
• ioMonitor of class
RTIOmonitor is used to
monitor the external socket
channel 'c_socket'
• registerWith is a public
function which returns a void
which is contained within
header file RTTcpSocket.h
• c_socket.registerWith(
&ioMonitor );
Baltimore SIGAda
• Action Code for Choice Point
labelled external OK
• The function int
RTTcpSocket::state() returns
'Established‘ if the socket
file descriptor is usable
• return ( c_socket.state() ==
RTTcpSocket::Established );
Baltimore SIGAda
• if the state() function
returns Established then the
socket file descriptor is
usable then take the TRUE
path of the choice point
which in this case is
registerWithController
• if the state() function does
not return Established then
the socket file descriptor is
Baltimore SIGAda
• Action Code for transition
labelled giveUp
• Use the Rational Rose RT
System Service called the Log
Service to output a message
without a carriage return
• log.show("IPC channel
initialization failedn");
• Close the external socket
channel c_socket
• c_socket.close();
Baltimore SIGAda
• Action Code for transition
labelled registerWithController
• The macro REGISTER_LAYER takes
three arguments which are pointers
to the 'waitfunc', 'wakeupFunc',
and 'processFunc‘ functions to be
called by the RTCustomController.
• If any of these are null pointers
the default values are used.
• The waitForEvents function is
called when the when the
RTCustomController does not have
any messages left to deliver.
Baltimore SIGAda
• REGISTER_LAYER( waitForEvents,
wakeup, 0);
• Use the Rational Rose RT System
Service called the Log Service to
output a message with a carriage
return
• log.log("Connected");
• set the length of the buffer to
the integer value of the constant
BUFFLEN which is in this 100
• buffLen = (int)BUFF_LEN;
Baltimore SIGAda
• State Diagram for substate
labelled Operational
Baltimore SIGAda
• Action Code for transition
labelled ‘pong’
• int RTTcpSocket::write() -
writes on a socket file
descriptor using the system
call write
• The incoming buffer needs to
be of size buffLen which is
100
• if( c_socket.write(
incomingBuffer, buffLen ) !=
Baltimore SIGAda
Use the Rational Rose RT
System Servic called the Log
Service to output a message
without a carriage return
• log.show( "TCPServer:
incomplete writen" );
• the incoming Buffer was not
of length buffLen
Baltimore SIGAda
• This is the structure diagram
for the TCPServer capsule.
Baltimore SIGAda
• The port labelled talkRemote
is an public, unconjugated,
wired end port.
Baltimore SIGAda
• Client Side Socket
Description
Baltimore SIGAda
• The incarnated TCPServer and
TCPClient architecture
Baltimore SIGAda
• The IPCSender capsule is incarnated
by the top-level capsules onto a
physical thread configured with the
RTCustomController implementation
class i.e. a RTCustomController thread.
• The frame service in Rose Real-Time is
used to incarnate an IPCSender
capsule role.
Baltimore SIGAda
• An example of how the frame
service is used below to
incarnate (i.e. create or
instanstiate) capsule roles,
destroy capsule roles, plug
in capsule roles (i.e.
import) or unplug capsule
roles (i.e. deport)
• id =
frame.incarnate(iPCSender,
IPCSender,
Baltimore SIGAda
The frame service call is action
code contained within the
transition Labelled initialize.
Baltimore SIGAda
• Here is a structure diagram
which contains a capsule role
labelled iPCSender.
Baltimore SIGAda
• The previous slides shows a structure
diagram for SenderSameThread which
contains a capsule role labelled
IPCSender. This capsule role has a
symbol in the lower right corner that
indicates that there is a nested capsule
role within this capsule role.
Baltimore SIGAda
• The structure diagram for IPCSender
capsule contains a capsule role labelled
customIPCLayer of class TCPClient.
Baltimore SIGAda
• iPCSender refers to the
optional Capsule Role
• IPCSender is the address to
myData
• EmptyObject is an optional
piece of data that is
delivered to the capsule in
its initial transition.
• CustomIPCThread refers to the
logical thread in which the
Baltimore SIGAda
• The IPCSender capsule controls the
number of messages exchanged with
the TCPServer capsule through the
contained optional capsule
'customIPCLayer'.
Baltimore SIGAda
• The capsule role labelled
customIPCLayer of class TCPServer is
connected via a connector to a port
labelled talkRemote.
• The talkRemote port is an
unconjugated, wired, protected, end
port in the structure diagram for
IPCSender.
Baltimore SIGAda
• In the previous slide, the rounded rectangle
attached to the end port refers to the state
machine of the associated capsule. So
messages coming in on this port are
delivered to, and are processed by the
associated capsule’s state machine. The
connected boxes inside the rounded
rectangle refer to a connection. Ports that
have the connected boxes in it are wired
ports.
Baltimore SIGAda
• This is the state diagram for
the IPCSender capsule.
Baltimore SIGAda
• The following slide depicts
how action code contained
within the transition
labelled Initialize will
incarnate a TCPClient.
Baltimore SIGAda
• An example of how the frame
service is used below to
incarnate (i.e. create or
instanstiate) capsule roles,
destroy capsule roles, plug
in capsule roles (i.e.
import) or unplug capsule
roles (i.e. deport)
• id =
frame.incarnate(customIPCLaye
r,
Baltimore SIGAda
• The action code in the transition
labelled pong uses the talkRemote
port to send the ping signal. The
format for sending data in Rose
Real-Time is
port_name.signal(data).send();
• The ping signal is defined in a
protocol class and optionally may
have data associated with them.
Action code is below.
• talkRemote.ping().send();
Baltimore SIGAda
• This is the state diagram for
the TCPClient capsule.
Baltimore SIGAda
• The transition for internalSetup
sets a variable called internalFd
which will be used by 'wakeup'
calls to unblock the
RTCustomController.
• internalFD is a internal UDP
socket descriptor.
• UDP sockets are connectionless and
have no protocol. There are
suitable to use for the purpose of
local host (board) communication.
• internalFd = makeUdpConnection();
Baltimore SIGAda
• A connectionless service is
one in which transmissions
take place without a pre-
established path between the
source and destination.
Because packets may arrive by
different paths and in random
sequences, there is no way to
guarantee delivery of a
message in a connectionless
service. Because it can not
guarantee delivery, a
Baltimore SIGAda
• The Action Code for the
choice point labelled
internalOK checks the value
of internalFd [which is an
internal socket descriptor]
to see if if it has been set
to a value other than -1
which it was initialized to.
• Action code is on next slide.
Baltimore SIGAda
• if( internalFd < 0 )
• return 0; // not OK
• // Follow the
FALSE path
• // of the
Choice Point
• ioMonitor.add( internalFd,
RTIOMonitor::CanRead );
• return 1; // OK
• // Follow
the TRUE path
Baltimore SIGAda
• TCPClient side transition
action code for externalSetUp
on next three slides
• The client will form
connections actively to the
TCPServer.
• The value of listening port
has been set to 31736. This
is the port number value of
the NASAServer on this
Baltimore SIGAda
• The RoseRT call to the log
service will display the
• port number of the NASAServer
• log.show("Connecting to: ");
log.show( (int)LISTENING_PORT
);
Baltimore SIGAda
If running on an embedded target,
run either the server or client
down on the embedded board. Run
the other on your host machine.
Modify the ip address defined in
the TCPIP_Proxies::CONSTANTS to
that of either the host or target.
If both the server and client run
on the same workstation the ip
address can remain at 127.0.0.1.
• For the purposes of this demo
MASTER_HOST is set to 127.0.0.1
because the client and server are
Baltimore SIGAda
• if( c_socket.create() &&
• c_socket.connect( (const
char *)MASTER_HOST,
(int)LISTENING_PORT ) )
• while( c_socket.state()
== RTTcpSocket::SynSent )
• ioMonitor.wait(
&RTTimespec::zero );
Baltimore SIGAda
• Action Code for Choice Point
labelled external OK
• The function int
RTTcpSocket::state() returns
'Established‘ if the socket
file descriptor is usable
• return ( c_socket.state() ==
RTTcpSocket::Established );
Baltimore SIGAda
• if the state() function
returns Established then the
socket file descriptor is
usable then take the TRUE
path of the choice point
which in this case is
registerWithController
• if the state() function does
not return Established then
the socket file descriptor is
Baltimore SIGAda
• Action Code for transition
labelled giveUp
• Use the Rational Rose RT
System Service called the Log
Service to output a message
without a carriage return
• log.show("IPC channel
initialization failedn");
• Close the external socket
channel c_socket
• c_socket.close();
Baltimore SIGAda
• Action Code for transition labeled
registerWithController
• The macro REGISTER_LAYER takes
three arguments which are pointers
to the 'waitfunc', 'wakeupFunc',
and 'processFunc‘ functions to be
called by the RTCustomController.
• If any of these are null pointers
the default values are used.
• The waitForEvents function is
called when the when the
RTCustomController does not have
any messages left to deliver.
Baltimore SIGAda
• REGISTER_LAYER( waitForEvents,
wakeup, 0);
• Use the Rational Rose RT System
Service called the Log Service to
output a message with a carriage
return
• log.log("Connected");
• set the length of the buffer to
the integer value of the constant
BUFFLEN which is in this 100
• buffLen = (int)BUFF_LEN;
Baltimore SIGAda
• This is the structure diagram
for the TCPClient capsule.
Baltimore SIGAda
• The port labeled talkRemote
is an public, conjugated,
wired end port.
• Rational RoseReal-Time is a
product of IBM Rational
Software Corp.

More Related Content

Similar to 200402_RoseRealTime.ppt

Azure Function Workflow
Azure Function WorkflowAzure Function Workflow
Azure Function WorkflowAndrea Tosato
 
Reactive Programming With Akka - Lessons Learned
Reactive Programming With Akka - Lessons LearnedReactive Programming With Akka - Lessons Learned
Reactive Programming With Akka - Lessons LearnedDaniel Sawano
 
Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache CamelChristian Posta
 
Python Control library
Python Control libraryPython Control library
Python Control libraryMassimo Talia
 
DotNext 2020 - When and How to Use the Actor Model and Akka.NET
DotNext 2020 - When and How to Use the Actor Model and Akka.NETDotNext 2020 - When and How to Use the Actor Model and Akka.NET
DotNext 2020 - When and How to Use the Actor Model and Akka.NETpetabridge
 
Taking your machine learning workflow to the next level using Scikit-Learn Pi...
Taking your machine learning workflow to the next level using Scikit-Learn Pi...Taking your machine learning workflow to the next level using Scikit-Learn Pi...
Taking your machine learning workflow to the next level using Scikit-Learn Pi...Philip Goddard
 
Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014Lari Hotari
 
Integration made easy with Apache Camel
Integration made easy with Apache CamelIntegration made easy with Apache Camel
Integration made easy with Apache CamelRosen Spasov
 
Deploying Machine Learning Models with Pulsar Functions - Pulsar Summit Asia...
Deploying Machine Learning Models with Pulsar Functions  - Pulsar Summit Asia...Deploying Machine Learning Models with Pulsar Functions  - Pulsar Summit Asia...
Deploying Machine Learning Models with Pulsar Functions - Pulsar Summit Asia...StreamNative
 
Easy migration to a new Chart of Accounts
Easy migration to a new Chart of AccountsEasy migration to a new Chart of Accounts
Easy migration to a new Chart of AccountsChitra Kanakaraj
 
Automation framework
Automation frameworkAutomation framework
Automation frameworkRamu Palanki
 
Event Sourcing and beyond with Akka.NET Persistence
Event Sourcing and beyond with Akka.NET PersistenceEvent Sourcing and beyond with Akka.NET Persistence
Event Sourcing and beyond with Akka.NET PersistenceKonrad Dusza
 
Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014 Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014 Uri Cohen
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceESUG
 
Mule Custom Aggregator
Mule Custom AggregatorMule Custom Aggregator
Mule Custom AggregatorAnkush Sharma
 
Ratpack and Grails 3
Ratpack and Grails 3Ratpack and Grails 3
Ratpack and Grails 3Lari Hotari
 
Ratpack and Grails 3
 Ratpack and Grails 3 Ratpack and Grails 3
Ratpack and Grails 3GR8Conf
 
Convergent Replicated Data Types in Riak 2.0
Convergent Replicated Data Types in Riak 2.0Convergent Replicated Data Types in Riak 2.0
Convergent Replicated Data Types in Riak 2.0Big Data Spain
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and ActivatorKevin Webber
 
Optimica Compiler Toolkit - Overview
Optimica Compiler Toolkit - OverviewOptimica Compiler Toolkit - Overview
Optimica Compiler Toolkit - OverviewModelon
 

Similar to 200402_RoseRealTime.ppt (20)

Azure Function Workflow
Azure Function WorkflowAzure Function Workflow
Azure Function Workflow
 
Reactive Programming With Akka - Lessons Learned
Reactive Programming With Akka - Lessons LearnedReactive Programming With Akka - Lessons Learned
Reactive Programming With Akka - Lessons Learned
 
Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache Camel
 
Python Control library
Python Control libraryPython Control library
Python Control library
 
DotNext 2020 - When and How to Use the Actor Model and Akka.NET
DotNext 2020 - When and How to Use the Actor Model and Akka.NETDotNext 2020 - When and How to Use the Actor Model and Akka.NET
DotNext 2020 - When and How to Use the Actor Model and Akka.NET
 
Taking your machine learning workflow to the next level using Scikit-Learn Pi...
Taking your machine learning workflow to the next level using Scikit-Learn Pi...Taking your machine learning workflow to the next level using Scikit-Learn Pi...
Taking your machine learning workflow to the next level using Scikit-Learn Pi...
 
Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014
 
Integration made easy with Apache Camel
Integration made easy with Apache CamelIntegration made easy with Apache Camel
Integration made easy with Apache Camel
 
Deploying Machine Learning Models with Pulsar Functions - Pulsar Summit Asia...
Deploying Machine Learning Models with Pulsar Functions  - Pulsar Summit Asia...Deploying Machine Learning Models with Pulsar Functions  - Pulsar Summit Asia...
Deploying Machine Learning Models with Pulsar Functions - Pulsar Summit Asia...
 
Easy migration to a new Chart of Accounts
Easy migration to a new Chart of AccountsEasy migration to a new Chart of Accounts
Easy migration to a new Chart of Accounts
 
Automation framework
Automation frameworkAutomation framework
Automation framework
 
Event Sourcing and beyond with Akka.NET Persistence
Event Sourcing and beyond with Akka.NET PersistenceEvent Sourcing and beyond with Akka.NET Persistence
Event Sourcing and beyond with Akka.NET Persistence
 
Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014 Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performance
 
Mule Custom Aggregator
Mule Custom AggregatorMule Custom Aggregator
Mule Custom Aggregator
 
Ratpack and Grails 3
Ratpack and Grails 3Ratpack and Grails 3
Ratpack and Grails 3
 
Ratpack and Grails 3
 Ratpack and Grails 3 Ratpack and Grails 3
Ratpack and Grails 3
 
Convergent Replicated Data Types in Riak 2.0
Convergent Replicated Data Types in Riak 2.0Convergent Replicated Data Types in Riak 2.0
Convergent Replicated Data Types in Riak 2.0
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
Optimica Compiler Toolkit - Overview
Optimica Compiler Toolkit - OverviewOptimica Compiler Toolkit - Overview
Optimica Compiler Toolkit - Overview
 

More from Tigabu Yaya

ML_basics_lecture1_linear_regression.pdf
ML_basics_lecture1_linear_regression.pdfML_basics_lecture1_linear_regression.pdf
ML_basics_lecture1_linear_regression.pdfTigabu Yaya
 
03. Data Exploration in Data Science.pdf
03. Data Exploration in Data Science.pdf03. Data Exploration in Data Science.pdf
03. Data Exploration in Data Science.pdfTigabu Yaya
 
MOD_Architectural_Design_Chap6_Summary.pdf
MOD_Architectural_Design_Chap6_Summary.pdfMOD_Architectural_Design_Chap6_Summary.pdf
MOD_Architectural_Design_Chap6_Summary.pdfTigabu Yaya
 
MOD_Design_Implementation_Ch7_summary.pdf
MOD_Design_Implementation_Ch7_summary.pdfMOD_Design_Implementation_Ch7_summary.pdf
MOD_Design_Implementation_Ch7_summary.pdfTigabu Yaya
 
GER_Project_Management_Ch22_summary.pdf
GER_Project_Management_Ch22_summary.pdfGER_Project_Management_Ch22_summary.pdf
GER_Project_Management_Ch22_summary.pdfTigabu Yaya
 
lecture_GPUArchCUDA02-CUDAMem.pdf
lecture_GPUArchCUDA02-CUDAMem.pdflecture_GPUArchCUDA02-CUDAMem.pdf
lecture_GPUArchCUDA02-CUDAMem.pdfTigabu Yaya
 
lecture_GPUArchCUDA04-OpenMPHOMP.pdf
lecture_GPUArchCUDA04-OpenMPHOMP.pdflecture_GPUArchCUDA04-OpenMPHOMP.pdf
lecture_GPUArchCUDA04-OpenMPHOMP.pdfTigabu Yaya
 
6_RealTimeScheduling.pdf
6_RealTimeScheduling.pdf6_RealTimeScheduling.pdf
6_RealTimeScheduling.pdfTigabu Yaya
 
matrixfactorization.ppt
matrixfactorization.pptmatrixfactorization.ppt
matrixfactorization.pptTigabu Yaya
 
The Jacobi and Gauss-Seidel Iterative Methods.pdf
The Jacobi and Gauss-Seidel Iterative Methods.pdfThe Jacobi and Gauss-Seidel Iterative Methods.pdf
The Jacobi and Gauss-Seidel Iterative Methods.pdfTigabu Yaya
 
C_and_C++_notes.pdf
C_and_C++_notes.pdfC_and_C++_notes.pdf
C_and_C++_notes.pdfTigabu Yaya
 

More from Tigabu Yaya (20)

ML_basics_lecture1_linear_regression.pdf
ML_basics_lecture1_linear_regression.pdfML_basics_lecture1_linear_regression.pdf
ML_basics_lecture1_linear_regression.pdf
 
03. Data Exploration in Data Science.pdf
03. Data Exploration in Data Science.pdf03. Data Exploration in Data Science.pdf
03. Data Exploration in Data Science.pdf
 
MOD_Architectural_Design_Chap6_Summary.pdf
MOD_Architectural_Design_Chap6_Summary.pdfMOD_Architectural_Design_Chap6_Summary.pdf
MOD_Architectural_Design_Chap6_Summary.pdf
 
MOD_Design_Implementation_Ch7_summary.pdf
MOD_Design_Implementation_Ch7_summary.pdfMOD_Design_Implementation_Ch7_summary.pdf
MOD_Design_Implementation_Ch7_summary.pdf
 
GER_Project_Management_Ch22_summary.pdf
GER_Project_Management_Ch22_summary.pdfGER_Project_Management_Ch22_summary.pdf
GER_Project_Management_Ch22_summary.pdf
 
lecture_GPUArchCUDA02-CUDAMem.pdf
lecture_GPUArchCUDA02-CUDAMem.pdflecture_GPUArchCUDA02-CUDAMem.pdf
lecture_GPUArchCUDA02-CUDAMem.pdf
 
lecture_GPUArchCUDA04-OpenMPHOMP.pdf
lecture_GPUArchCUDA04-OpenMPHOMP.pdflecture_GPUArchCUDA04-OpenMPHOMP.pdf
lecture_GPUArchCUDA04-OpenMPHOMP.pdf
 
6_RealTimeScheduling.pdf
6_RealTimeScheduling.pdf6_RealTimeScheduling.pdf
6_RealTimeScheduling.pdf
 
Regression.pptx
Regression.pptxRegression.pptx
Regression.pptx
 
lecture6.pdf
lecture6.pdflecture6.pdf
lecture6.pdf
 
lecture5.pdf
lecture5.pdflecture5.pdf
lecture5.pdf
 
lecture4.pdf
lecture4.pdflecture4.pdf
lecture4.pdf
 
lecture3.pdf
lecture3.pdflecture3.pdf
lecture3.pdf
 
lecture2.pdf
lecture2.pdflecture2.pdf
lecture2.pdf
 
Chap 4.ppt
Chap 4.pptChap 4.ppt
Chap 4.ppt
 
matrixfactorization.ppt
matrixfactorization.pptmatrixfactorization.ppt
matrixfactorization.ppt
 
nnfl.0620.pptx
nnfl.0620.pptxnnfl.0620.pptx
nnfl.0620.pptx
 
L20.ppt
L20.pptL20.ppt
L20.ppt
 
The Jacobi and Gauss-Seidel Iterative Methods.pdf
The Jacobi and Gauss-Seidel Iterative Methods.pdfThe Jacobi and Gauss-Seidel Iterative Methods.pdf
The Jacobi and Gauss-Seidel Iterative Methods.pdf
 
C_and_C++_notes.pdf
C_and_C++_notes.pdfC_and_C++_notes.pdf
C_and_C++_notes.pdf
 

Recently uploaded

power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Recently uploaded (20)

power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 

200402_RoseRealTime.ppt

  • 1. Baltimore SIGAda • Rational Rose Real Time Presentation
  • 2. Baltimore SIGAda • Real-Time System Design Concepts
  • 3. Baltimore SIGAda • Characteristics of Real-Time Systems – Responsiveness – Timeliness – Concurrency – Dynamic structure and behaviour – Distribution – Reliability
  • 4. Baltimore SIGAda • Hard Real-Time Systems – Deterministic system behaviour • Soft Real-Time Systems • System combinations of Soft and Hard Real-Time Systems
  • 5. Baltimore SIGAda • Hard Real-Time Systems are often designed with an additional component that is not part of the UML Standard – Timing Diagrams. Hard Real-Time Systems are often designed to interact with sensors and activators on the equipment that the system is communicating with.
  • 6. Baltimore SIGAda • Hard real-time systems that are safety-critical may contain within the architecture a watchdog timer implementation. • Watchdog timers may be built into a microprocessor card and are typically driven by a periodic reset signal from the primary processor. If the reset signal fails to reset the watchdog timer within that time, the watchdog timer restarts the main processor.
  • 7. Baltimore SIGAda • Real-time systems may make use of a technique called “interrupts”. Interrupts may be disabled and the result is a portion of code that is “atomic”. Some portions of a real-time system to operate correctly are labelled “critical sections” are must be atomic for the system to operate properly.
  • 8. Baltimore SIGAda • Modeling Real-Time Systems
  • 9. Baltimore SIGAda • Concurrency support from operating systems and programming languages is limited. • Many complex real-time systems are state- based. The behaviour of these systems may be difficult to design and understand.
  • 10. Baltimore SIGAda • In order to model states with concurrency one needs a notation, a process and a tool. • This pyramid of building blocks is represented by the Unified Modeling Language, the Rational Unified Process and the Rational Rose Real-Time Modeling tool.
  • 11. Baltimore SIGAda • UML and Rose Realtime handle concurrency with the capsule. The capsule provides this capability to model concurrency. • To support concurrency a passive object must exercise control over “critical” or “atomic” sections of code where variable could be accessed simultaneously. An example of the problem is the Shared Data Bug.
  • 12. Baltimore SIGAda • Active Objects and Finite State Machines – State – condition in which an active object persists and behaves in a predetermined way for some time – Transition -- path connecting two states – Trigger – an event which fires a transition – Action – work performed by action code when transition is fired by the triggering event
  • 13. Baltimore SIGAda • Capsule enforce the O-O concept of encapsulation. • Capsules interact via asynchronous message passing. • Capsules encapsulate the finite state machine behaviour, an execution thread, and the properties of the capsule.
  • 14. Baltimore SIGAda • Capsules may be concurrent or distributed. • Capsules may be tested independently. • Demonstrate use of a capsule in a concurrent architecture. • In a Class Diagram identify the UML notation for a capsule. – Attributes – Operations – Ports – Finite State Machine – Structure Diagram
  • 15. Baltimore SIGAda • UML Models – Use Case Model – similar to requirements – Design Model – realized by class diagrams – Implementation Model – collection of components – Test Model – test cases and procedures
  • 16. Baltimore SIGAda • Rose Real-Time Views – Use-Case View – use-case diagrams; interaction diagrams – sequence and collaboration diagrams; – Logical View – class diagrams; structure diagrams; state diagrams; collaboration diagrams; sequence diagrams; – Implementation (Component) View – executables, C++ Libraries; C++ External Libraries – Deployment View – software components are mapped to hardware deployment configuration – See Rational Training Course DEV160 Modeling Behaviour with UML – Demonstrate the views to the working group.
  • 17. Baltimore SIGAda • Use-Case View diagrams consist of use- case and interaction diagrams • Use Case Diagrams consist of actors and use cases • Actors are outside of the system and interact with the system • Use cases are actions performed by the system
  • 18. Baltimore SIGAda • Interaction Diagrams consist of collaboration diagrams – Framework for sequence diagrams
  • 19. Baltimore SIGAda • Sequence Diagrams are interactions between elements as a time ordered set of messages. • Contain instances of capsules.
  • 20. Baltimore SIGAda • Logical View contains Class Diagrams, Structure Diagrams, State Diagrams, Collaboration Diagrams and Sequence Diagrams.
  • 21. Baltimore SIGAda • Class Diagrams depict static view of Packages, Capsules, Classes, Protocols and Relationships
  • 22. Baltimore SIGAda • Structure Diagrams are a specialized Collaboration Diagram. • Contain Capsule roles, Ports and Connectors. • Structure diagrams are contained within a capsule.
  • 23. Baltimore SIGAda • State Diagrams depict high level behaviour of a capsule in a finite state machine • Contain States, substates and transitions
  • 24. Baltimore SIGAda • Component View describes organization of static software modules • The software is built in this view (i.e. compiled) • Contains executables and C and C++ Libraries
  • 25. Baltimore SIGAda • Deployment View is where software components are mapped onto hardware • Contains processors and component instances – Processors describe on what processor the built component is run on – Component instances are executable components
  • 26. Baltimore SIGAda • Socket Interface Presentation • The purpose of this presentation is to describe how a Socket Interface may be implemented using Rational Rose.
  • 27. Baltimore SIGAda • This demo uses the following Architecture:
  • 28. Baltimore SIGAda • This is the Class Diagram for the server (ReceiverSameThread) and client (SenderSameThread) capsules. They represent the top- level capsules for the ping/pong example. The IPC and TCP capsules are incarnated by the top-level capsules onto a physical thread configured with the RTCustomController implementation class.
  • 29. Baltimore SIGAda • The Class Diagram depicts a composition relationship between the top-level capsules and the IPC and TCP capsules. The next two slides describe a composition relationship.
  • 30. Baltimore SIGAda • Server Side Socket Connection Description
  • 31. Baltimore SIGAda • The IPCReceiver capsule is incarnated by the top-level capsules onto a physical thread configured with the RTCustomController implementation class i.e. a RTCustomController thread. • The frame service in Rose Real-Time is used to incarnate an IPCReceiver capsule role.
  • 32. Baltimore SIGAda • An example of how the frame service is used below to incarnate (i.e. create or instanstiate) capsule roles, destroy capsule roles, plug in capsule roles (i.e. import) or unplug capsule roles (i.e. deport) • id = frame.incarnate(iPCReceiver,
  • 33. Baltimore SIGAda The frame service call is action code contained within the transition Labelled initialize. This is a state diagram for the capsule ReceiverSameThread.
  • 34. Baltimore SIGAda • The incarnated TCPServer and TCPClient architecture
  • 35. Baltimore SIGAda • Here is structure diagram which contains a capsule role labelled iPCReceiver.
  • 36. Baltimore SIGAda • The previous slides shows a structure diagram for ReceiverSameThread which contains a capsule role labelled IPCReceiver. This capsule role has a symbol in the lower right corner that indicates that there is a nested capsule role within this capsule role.
  • 37. Baltimore SIGAda • The structure diagram for IPCReceiver capsule contains a capsule role labelled customIPCLayer of class TCPServer.
  • 38. Baltimore SIGAda • iPCReceiver refers to the optional Capsule Role • IPCReceiver is the address to myData • EmptyObject is an optional piece of data that is delivered to the capsule in its initial transition. • CustomIPCThread refers to the logical thread in which the
  • 39. Baltimore SIGAda • The IPCReceiver capsule controls the number of messages exchanged with the TCPclient capsule through the contained optional capsule 'customIPCLayer'.
  • 40. Baltimore SIGAda • The capsule role labelled customIPCLayer of class TCPServer is connected via a connector to a port labelled talkRemote. • The talkRemote port is a conjugated, wired, protected, end port in the structure diagram for IPCReceiver.
  • 41. Baltimore SIGAda • In the previous slide, the rounded rectangle attached to the end port refers to the state machine of the associated capsule. So messages coming in on this port are delivered to, and are processed by the associated capsule’s state machine. The connected boxes inside the rounded rectangle refer to a connection. Ports that have the connected boxes in it are wired ports.
  • 42. Baltimore SIGAda • This is the state diagram for the IPCReceiver capsule.
  • 43. Baltimore SIGAda • The following slide depicts how action code contained within the transition labelled Initialize will incarnate a TCPServer.
  • 44. Baltimore SIGAda • An example of how the frame service is used below to incarnate (i.e. create or instanstiate) capsule roles, destroy capsule roles, plug in capsule roles (i.e. import) or unplug capsule roles (i.e. deport) • id = frame.incarnate(customIPCLaye r,
  • 45. Baltimore SIGAda • The action code in the transition labelled ping uses the talkRemote port to send the pong signal. The format for sending data in Rose Real-Time is port_name.signal(data).send(); • The pong signal is defined in a protocol class and optionally may have data associated with them. Action code is below. • talkRemote.pong().send();
  • 46. Baltimore SIGAda • This is the state diagram for the TCPServer capsule.
  • 47. Baltimore SIGAda • The transition for internalSetup sets a variable called internalFd which will be used by 'wakeup' calls to unblock the RTCustomController. • internalFD is a internal UDP socket descriptor. • UDP sockets are connectionless and have no protocol. There are suitable to use for the purpose of local host (board) communication. • internalFd = makeUdpConnection();
  • 48. Baltimore SIGAda • A connectionless service is one in which transmissions take place without a pre- established path between the source and destination. Because packets may arrive by different paths and in random sequences, there is no way to guarantee delivery of a message in a connectionless service. Because it can not guarantee delivery, a
  • 49. Baltimore SIGAda • The Action Code for the choice point labelled internalOK checks the value of internalFd [which is an internal socket descriptor] to see if if it has been set to a value other than -1 which it was initialized to. • Action code is on next slide.
  • 50. Baltimore SIGAda • if( internalFd < 0 ) • return 0; // not OK • // Follow the FALSE path • // of the Choice Point • ioMonitor.add( internalFd, RTIOMonitor::CanRead ); • return 1; // OK • // Follow the TRUE path
  • 51. Baltimore SIGAda • TCPServer side transition action code for externalSetUp on next three slides • create an variable labelled listener of type RTTcpSocket class • RTTcpSocket listener;
  • 52. Baltimore SIGAda • use the RoseRT log service to output a message without a carriage return and the integer value of the listening port. • LISTENING_PORT is a constant in the TCPIP_Proxies package and its value is set to 31736 • log.show("Listening to: "); log.log( (int)LISTENING_PORT );
  • 53. Baltimore SIGAda • ioMonitor of class RTIOmonitor is used to monitor the external socket channel 'c_socket' • registerWith is a public function which returns a void which is contained within header file RTTcpSocket.h • c_socket.registerWith( &ioMonitor );
  • 54. Baltimore SIGAda • Action Code for Choice Point labelled external OK • The function int RTTcpSocket::state() returns 'Established‘ if the socket file descriptor is usable • return ( c_socket.state() == RTTcpSocket::Established );
  • 55. Baltimore SIGAda • if the state() function returns Established then the socket file descriptor is usable then take the TRUE path of the choice point which in this case is registerWithController • if the state() function does not return Established then the socket file descriptor is
  • 56. Baltimore SIGAda • Action Code for transition labelled giveUp • Use the Rational Rose RT System Service called the Log Service to output a message without a carriage return • log.show("IPC channel initialization failedn"); • Close the external socket channel c_socket • c_socket.close();
  • 57. Baltimore SIGAda • Action Code for transition labelled registerWithController • The macro REGISTER_LAYER takes three arguments which are pointers to the 'waitfunc', 'wakeupFunc', and 'processFunc‘ functions to be called by the RTCustomController. • If any of these are null pointers the default values are used. • The waitForEvents function is called when the when the RTCustomController does not have any messages left to deliver.
  • 58. Baltimore SIGAda • REGISTER_LAYER( waitForEvents, wakeup, 0); • Use the Rational Rose RT System Service called the Log Service to output a message with a carriage return • log.log("Connected"); • set the length of the buffer to the integer value of the constant BUFFLEN which is in this 100 • buffLen = (int)BUFF_LEN;
  • 59. Baltimore SIGAda • State Diagram for substate labelled Operational
  • 60. Baltimore SIGAda • Action Code for transition labelled ‘pong’ • int RTTcpSocket::write() - writes on a socket file descriptor using the system call write • The incoming buffer needs to be of size buffLen which is 100 • if( c_socket.write( incomingBuffer, buffLen ) !=
  • 61. Baltimore SIGAda Use the Rational Rose RT System Servic called the Log Service to output a message without a carriage return • log.show( "TCPServer: incomplete writen" ); • the incoming Buffer was not of length buffLen
  • 62. Baltimore SIGAda • This is the structure diagram for the TCPServer capsule.
  • 63. Baltimore SIGAda • The port labelled talkRemote is an public, unconjugated, wired end port.
  • 64. Baltimore SIGAda • Client Side Socket Description
  • 65. Baltimore SIGAda • The incarnated TCPServer and TCPClient architecture
  • 66. Baltimore SIGAda • The IPCSender capsule is incarnated by the top-level capsules onto a physical thread configured with the RTCustomController implementation class i.e. a RTCustomController thread. • The frame service in Rose Real-Time is used to incarnate an IPCSender capsule role.
  • 67. Baltimore SIGAda • An example of how the frame service is used below to incarnate (i.e. create or instanstiate) capsule roles, destroy capsule roles, plug in capsule roles (i.e. import) or unplug capsule roles (i.e. deport) • id = frame.incarnate(iPCSender, IPCSender,
  • 68. Baltimore SIGAda The frame service call is action code contained within the transition Labelled initialize.
  • 69. Baltimore SIGAda • Here is a structure diagram which contains a capsule role labelled iPCSender.
  • 70. Baltimore SIGAda • The previous slides shows a structure diagram for SenderSameThread which contains a capsule role labelled IPCSender. This capsule role has a symbol in the lower right corner that indicates that there is a nested capsule role within this capsule role.
  • 71. Baltimore SIGAda • The structure diagram for IPCSender capsule contains a capsule role labelled customIPCLayer of class TCPClient.
  • 72. Baltimore SIGAda • iPCSender refers to the optional Capsule Role • IPCSender is the address to myData • EmptyObject is an optional piece of data that is delivered to the capsule in its initial transition. • CustomIPCThread refers to the logical thread in which the
  • 73. Baltimore SIGAda • The IPCSender capsule controls the number of messages exchanged with the TCPServer capsule through the contained optional capsule 'customIPCLayer'.
  • 74. Baltimore SIGAda • The capsule role labelled customIPCLayer of class TCPServer is connected via a connector to a port labelled talkRemote. • The talkRemote port is an unconjugated, wired, protected, end port in the structure diagram for IPCSender.
  • 75. Baltimore SIGAda • In the previous slide, the rounded rectangle attached to the end port refers to the state machine of the associated capsule. So messages coming in on this port are delivered to, and are processed by the associated capsule’s state machine. The connected boxes inside the rounded rectangle refer to a connection. Ports that have the connected boxes in it are wired ports.
  • 76. Baltimore SIGAda • This is the state diagram for the IPCSender capsule.
  • 77. Baltimore SIGAda • The following slide depicts how action code contained within the transition labelled Initialize will incarnate a TCPClient.
  • 78. Baltimore SIGAda • An example of how the frame service is used below to incarnate (i.e. create or instanstiate) capsule roles, destroy capsule roles, plug in capsule roles (i.e. import) or unplug capsule roles (i.e. deport) • id = frame.incarnate(customIPCLaye r,
  • 79. Baltimore SIGAda • The action code in the transition labelled pong uses the talkRemote port to send the ping signal. The format for sending data in Rose Real-Time is port_name.signal(data).send(); • The ping signal is defined in a protocol class and optionally may have data associated with them. Action code is below. • talkRemote.ping().send();
  • 80. Baltimore SIGAda • This is the state diagram for the TCPClient capsule.
  • 81. Baltimore SIGAda • The transition for internalSetup sets a variable called internalFd which will be used by 'wakeup' calls to unblock the RTCustomController. • internalFD is a internal UDP socket descriptor. • UDP sockets are connectionless and have no protocol. There are suitable to use for the purpose of local host (board) communication. • internalFd = makeUdpConnection();
  • 82. Baltimore SIGAda • A connectionless service is one in which transmissions take place without a pre- established path between the source and destination. Because packets may arrive by different paths and in random sequences, there is no way to guarantee delivery of a message in a connectionless service. Because it can not guarantee delivery, a
  • 83. Baltimore SIGAda • The Action Code for the choice point labelled internalOK checks the value of internalFd [which is an internal socket descriptor] to see if if it has been set to a value other than -1 which it was initialized to. • Action code is on next slide.
  • 84. Baltimore SIGAda • if( internalFd < 0 ) • return 0; // not OK • // Follow the FALSE path • // of the Choice Point • ioMonitor.add( internalFd, RTIOMonitor::CanRead ); • return 1; // OK • // Follow the TRUE path
  • 85. Baltimore SIGAda • TCPClient side transition action code for externalSetUp on next three slides • The client will form connections actively to the TCPServer. • The value of listening port has been set to 31736. This is the port number value of the NASAServer on this
  • 86. Baltimore SIGAda • The RoseRT call to the log service will display the • port number of the NASAServer • log.show("Connecting to: "); log.show( (int)LISTENING_PORT );
  • 87. Baltimore SIGAda If running on an embedded target, run either the server or client down on the embedded board. Run the other on your host machine. Modify the ip address defined in the TCPIP_Proxies::CONSTANTS to that of either the host or target. If both the server and client run on the same workstation the ip address can remain at 127.0.0.1. • For the purposes of this demo MASTER_HOST is set to 127.0.0.1 because the client and server are
  • 88. Baltimore SIGAda • if( c_socket.create() && • c_socket.connect( (const char *)MASTER_HOST, (int)LISTENING_PORT ) ) • while( c_socket.state() == RTTcpSocket::SynSent ) • ioMonitor.wait( &RTTimespec::zero );
  • 89. Baltimore SIGAda • Action Code for Choice Point labelled external OK • The function int RTTcpSocket::state() returns 'Established‘ if the socket file descriptor is usable • return ( c_socket.state() == RTTcpSocket::Established );
  • 90. Baltimore SIGAda • if the state() function returns Established then the socket file descriptor is usable then take the TRUE path of the choice point which in this case is registerWithController • if the state() function does not return Established then the socket file descriptor is
  • 91. Baltimore SIGAda • Action Code for transition labelled giveUp • Use the Rational Rose RT System Service called the Log Service to output a message without a carriage return • log.show("IPC channel initialization failedn"); • Close the external socket channel c_socket • c_socket.close();
  • 92. Baltimore SIGAda • Action Code for transition labeled registerWithController • The macro REGISTER_LAYER takes three arguments which are pointers to the 'waitfunc', 'wakeupFunc', and 'processFunc‘ functions to be called by the RTCustomController. • If any of these are null pointers the default values are used. • The waitForEvents function is called when the when the RTCustomController does not have any messages left to deliver.
  • 93. Baltimore SIGAda • REGISTER_LAYER( waitForEvents, wakeup, 0); • Use the Rational Rose RT System Service called the Log Service to output a message with a carriage return • log.log("Connected"); • set the length of the buffer to the integer value of the constant BUFFLEN which is in this 100 • buffLen = (int)BUFF_LEN;
  • 94. Baltimore SIGAda • This is the structure diagram for the TCPClient capsule.
  • 95. Baltimore SIGAda • The port labeled talkRemote is an public, conjugated, wired end port. • Rational RoseReal-Time is a product of IBM Rational Software Corp.