440 likes | 613 Views
Component Development and System Configuration in Cadena with OpenCCM. KSU CCM Workshop May 19, 2003. John Hatcliff Jesse Greenwald. http://www.cis.ksu.edu/cadena. In this talk…. I’ll try not to bore those people who have already seen numerous talks about Cadena…
E N D
Component Development and System Configuration in Cadena with OpenCCM KSU CCM Workshop May 19, 2003 John Hatcliff Jesse Greenwald http://www.cis.ksu.edu/cadena
In this talk… • I’ll try not to bore those people who have already seen numerous talks about Cadena… • …but I am responding to requests from Doug to explain to some CIAO team members how Cadena is used for both component development and system configuration • Show a little more about what happens “under the hood” wrt the interaction with OpenCCM • Summarize how we think Cadena should interact with CIAO both in short-term (upcoming PI meeting) and longer term KSU CCM Workshop -- Cadena Development
Big Picture Component Property Specifications (extra semantic information) .cps Cadena .cad .idl3 Java/C++ Component Code via OpenCCM IR <CONFIGURATION_PASS> <HOME> <…> <COMPONENT> <ID> <…></ID> <EVENT_SUPPLIER> <…events this component supplies…> </EVENT_SUPPLIER> </COMPONENT> </HOME> </CONFIGURATION_PASS> .java assembly program Bold Stroke XML Configurator Info System Configuration Component Development KSU CCM Workshop -- Cadena Development
Boeing BasicSP Example 4 4 1. Logical GPS component receives a periodic event indicating that it should read the physical GPS device. Input 1 2. Logical GPS publishes DATA_AVAILABLE event 3. Airframe component fetches GPS data by calling GPS GetData method 2 4. Airframe updates its position data and publishes DATA_AVAILABLE event 3 6 5. NavDisplay component fetches AirFrame data by calling AirFrame GetData method 5 6. NavDisplay updates the physical display Output KSU CCM Workshop -- Cadena Development
Eclipse editor Sends to OpenCCM Interface Repository (IR) Parsing and type-checking currently done by IR ClosedED Component Type component BMClosedED { provides ReadData dataOut; uses ReadData dataIn; publishes DataAvailable outDataAvailable; consumes DataAvailable inDataAvailable; }; home BMClosedEDHome manages BMClosedED { }; KSU CCM Workshop -- Cadena Development
Interface Repository CORBA Interface Repository • manages information about interface definitions, • provides a means of type-checking of interface signatures, • assists in checking the correctness of interface inheritance graphs, • provides support for CASE environments(e.g., an interface browser) input to OpenCCM IDL compilers type-checking database of interface definitions KSU CCM Workshop -- Cadena Development
Use of OpenCCM IR …from OpenCCM documentation KSU CCM Workshop -- Cadena Development …active links
Demonstration Component Definition http://cadena.projects.cis.ksu.edu/documentation/component-development.shtml KSU CCM Workshop -- Cadena Development
CIDL Use in Cadena • We currently use the jimpl instead of a CIDL/CIF framework. • Currently generates code using the monolithic implementation strategy. • We will be moving to the CIDL/CIF framework (this summer) • Issues: • what sort of developer support might we want to provide? • e.g., static analysis/checking for common errors?? KSU CCM Workshop -- Cadena Development
IR API in Cadena • Currently we are hard-wired to the script-based interface of OpenCCM • Moving toward… • support for using any OMG conformant IR implementations • publish standard interfaces for common development activites • e.g., compilation of IDL3, CIDL, code generation, etc. • In short term, we propose… • no need to use CIAO’s IR • simply emit IDL and CIDL and CIAO’s compilation process takes over KSU CCM Workshop -- Cadena Development
Impl Classes A lot of stuff gets generated! … …but there is a single class (Executor implementation) that contains templates that need to be filled in with the business logic. KSU CCM Workshop -- Cadena Development
Push Method Implementation get receptacle reference make sure connection exists get data from supplier (e.g. GPS) inform clients that data is available publicvoid push(cisksu.basicsp.DataAvailable event){ ReadData dataIn = the_context_.get_connection_dataIn(); if(dataIn == null){ System.err.println("The basicsp::BMClosedED::dataIn receptacle is not set!"); return; } data=dataIn.getData(); the_context_.push_outDataAvailable(new cisksu.basicsp.DataAvailableImpl()); } KSU CCM Workshop -- Cadena Development
Component Properties IDL Compiler Component Implementation Stubs & Skeletons + dependencydefault == none; dependencies { inDataAvailable -> outDataAvailable; } behavior { if (mode==enabled) { push outDataAvailable; else … } Model Builder Dependency Analysis and Model-checking Engine Dependency Annotations Transition System Semantics .cps KSU CCM Workshop -- Cadena Development
Incremental Specification port action dependencies refinement refinement mode-based dependencies Y …only in mode Y component transition semantics …state machines give abstract behavior Specifications Component Structure Increasing Effort & Strength of Verification KSU CCM Workshop -- Cadena Development
Dependency Specifications • Inter-component dependences are given by connection information (coming later) • We now give notation for specifying intra-component dependencies • Light-weight specification layer that provides significant benefit … • In this case, component integrator leverages this info in a variety of ways to specify aspects such as rates/priorities, distribution, scheduling, etc. • Used to visualize system behavior in different modes KSU CCM Workshop -- Cadena Development
Light-weight Dependency Specs outDataAvailableport action call on set_data() triggers dependencydefault == none; dependencies { dataWriteOut.set_data() -> outDataAvailable; } behavior { ... } KSU CCM Workshop -- Cadena Development
Mode-based Projections NavSteering enabled TacticalSteering disabled NavSteering disabled TacticalSteering enabled Scenario Diagram w/ Complete Connectivity … Enabled Connectivity for Different Modes KSU CCM Workshop -- Cadena Development
Light-weight Dependency Specs triggers no other actions dependencydefault == all; dependencies { modeChange() ->; case modeChange.modeVar of { enabled: inDataAvailable -> dataIn.get_data(), outDataAvailable; disabled: inDataAvailable ->; } } behavior { ... } KSU CCM Workshop -- Cadena Development
Light-weight Dependency Specs in enabled mode, shows actions triggered by receipt of event on inDataAvailable port dependencydefault == all; dependencies { modeChange() ->; case modeChange.modeVar of { enabled: inDataAvailable -> dataIn.get_data(), outDataAvailable; disabled: inDataAvailable ->; } } behavior { ... } KSU CCM Workshop -- Cadena Development
Light-weight Dependency Specs in disabled mode, inDataAvailable triggers no other port actions dependencydefault == all; dependencies { modeChange() ->; case modeChange.modeVar of { enabled: inDataAvailable -> dataIn.get_data(), outDataAvailable; disabled: inDataAvailable ->; } } behavior { ... } KSU CCM Workshop -- Cadena Development
Demonstration CPS Definition KSU CCM Workshop -- Cadena Development
Three Synchronized Views Graphical View Spreadsheet View Textual View Single Internal Representation Scenario Description KSU CCM Workshop -- Cadena Development
Textual View KSU CCM Workshop -- Cadena Development
Textual View KSU CCM Workshop -- Cadena Development
Textual View …allocate AirFrame component instance KSU CCM Workshop -- Cadena Development
Textual View …connect event ports and facet/receptacles KSU CCM Workshop -- Cadena Development
Textual View KSU CCM Workshop -- Cadena Development
Textual View …component name & type KSU CCM Workshop -- Cadena Development
Textual View …receptacle/facet & event source/sink connection outline KSU CCM Workshop -- Cadena Development
Graphical View KSU CCM Workshop -- Cadena Development
Graphical View …port names and connections KSU CCM Workshop -- Cadena Development
Graphical View …correlators KSU CCM Workshop -- Cadena Development
Graphical View …design-level analyses mode-base views KSU CCM Workshop -- Cadena Development
Mode-based Projections …possible values for mode variables Automatic! Value Added: Multiple mode-based views are automatically created and synchronized through the design process. KSU CCM Workshop -- Cadena Development
Spreadsheet View RT Attributes …distribution sites …rate group …ports for component type …port types …port connections KSU CCM Workshop -- Cadena Development
Spreadsheet View Results of automatic rate group synthesis are fed back into spreadsheet KSU CCM Workshop -- Cadena Development
Spreadsheet View Pull-down menus give type-correct connection possibilities Value Added: Incremental, iterative scenario construction with multiple forms of visualization, analyses, and automated “design advice”. KSU CCM Workshop -- Cadena Development
Demonstration System Configuration KSU CCM Workshop -- Cadena Development
Configuration Output Java assembly program System.out.println("Instantiating components..."); EventChannel event = sh.create(); BMClosedED airframe = bmclosed.create(); BMDevice gps = bmdevice.create(); BMDisplay navDisplay = bmdisplay.create(); // Connect event and interface ports event.subscribe_timeOut20(gps.get_consumer_timeOut20()); gps.subscribe_outDataAvailable(airframe.get_consumer_inDataAvailable()); airframe.subscribe_outDataAvailable(navDisplay.get_consumer_inDataAvailable()); ReadData dataOut = gps.provide_dataOut(); airframe.connect_dataIn(dataOut); dataOut = airframe.provide_dataOut(); navDisplay.connect_dataIn(dataOut); event connections interface connections KSU CCM Workshop -- Cadena Development
Future Goals • Moving to programmatic APIs for… • accessing IR, IDL & CIDL type-checking and compilation, code generation, etc. • Provide CCM-compliant packaging and deployment artifacts • Configuration of correlation, filtering, synchronization, in RT event channel • Tight integration of model-checking tools KSU CCM Workshop -- Cadena Development
Cadena/CIAO Integration (PI Meeting) must be done manually by CIAO team Cadena might adapted to spit out something – let’s agree on a CCM-compliant format Cadena CIAO IDL3 CIDL deployment and configuration Interaction Points KSU CCM Workshop -- Cadena Development
Cadena/CIAO Integration (summer) Cadena can be extended with a CIDL editor Cadena will support CCM deployment and packaging artifacts Cadena CIAO IDL3 CIDL deployment and configuration …and a variety of interactions possible on RT/QoS aspects! Interaction Points KSU CCM Workshop -- Cadena Development
CIAO Integration -- this meeting • Agree on an extension to the existing CCM specification for packing and deployment artifacts • Getting an idea for CIAO group about how Cadena should support CIDL development KSU CCM Workshop -- Cadena Development
Cadena Site http://www.cis.ksu.edu/cadena KSU CCM Workshop -- Cadena Development