MBSE, arch ag

background image

Pathfinder Solutions

Design Templates and Components

Analyst’s Guide

version 2.0

6/3/99

copyright 1995 – 1999 Pathfinder Solutions Inc. all right reserved.

N

S

W

E

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

1

1.

INTRODUCTION .......................................................................................................................... 3

1.1

H

OW TO

U

SE THIS

D

OCUMENT

.................................................................................................... 3

1.2

D

ESIGN

G

OALS

.......................................................................................................................... 3

1.3

O

PERATING

C

ONFIGURATIONS

.................................................................................................... 3

1.4

T

ERMINOLOGY

........................................................................................................................... 4

2.

SYSTEM OVERVIEW .................................................................................................................. 5

2.1

S

OURCE

C

OMPONENTS

............................................................................................................... 5

2.1.1

Mechanisms ...................................................................................................................... 5

2.1.2

Derived Components ......................................................................................................... 5

2.1.3

Realized Domains.............................................................................................................. 7

3.

MBSE EXECUTION INFRASTRUCTURE.................................................................................. 8

3.1

P

ROGRAM

C

OMPONENT

S

TRUCTURE

........................................................................................... 8

3.2

P

ROGRAM

T

ASK

S

TRUCTURE

...................................................................................................... 8

3.3

O

BJECT

T

RACKING

S

TRUCTURES

................................................................................................. 9

3.3.1

Instance Populations ......................................................................................................... 9

3.3.2

Instance Sorting ................................................................................................................ 9

3.4

E

VENTS

................................................................................................................................... 10

3.4.1

Delayed Events ............................................................................................................... 10

3.5

S

TARTUP

S

UPPORT

................................................................................................................... 10

3.6

I

NSTRUMENTED

E

XECUTION

S

UPPORT

....................................................................................... 10

3.7

C

OMPILER

F

LAG

S

UMMARY

...................................................................................................... 10

4.

MODELING CONVENTIONS.................................................................................................... 11

4.1

A

TTRIBUTE

, E

VENT

D

ATA

I

TEM AND

T

RANSIENT

D

ATA

T

YPES

.................................................. 11

4.2

I

NFORMATION

M

ODELING

........................................................................................................ 12

4.3

D

ESIGN

P

ROPERTIES

S

UMMARY

................................................................................................ 12

4.3.1

Analysis Properties ......................................................................................................... 12

4.3.2

Design Properties............................................................................................................ 12

5.

SOFTWARE MECHANISM SERVICES.................................................................................... 13

5.1

D

ERIVED

S

ERVICES

.................................................................................................................. 13

5.2

S

TANDARD

B

RIDGE

S

ERVICES

................................................................................................... 13

5.2.1

Shutdown......................................................................................................................... 13

5.2.2

Run-Time Context Information ........................................................................................ 13

6.

RUN-TIME ERROR HANDLING .............................................................................................. 14

6.1

S

HUT

D

OWN

!= STATUS_OK .................................................................................................. 14

6.2

O

UT OF

M

EMORY

..................................................................................................................... 14

6.3

E

VENT

“C

AN

T

H

APPEN

” .......................................................................................................... 14

7.

APPENDIX - BASE AND GENERATED MECHANISMS ........................................................ 15

7.1

B

ASE AND

G

ENERATED

M

ECHANISMS

- I

NFORMATION

M

ODEL

................................................... 15

7.2

B

ASE AND

G

ENERATED

M

ECHANISMS

- O

BJECT AND

A

TTRIBUTE

R

EPORT

:.................................. 16

7.2.1

class PfdObject ............................................................................................................... 16

7.2.2

class PfdActiveObject...................................................................................................... 16

7.2.3

class derived_inactive_objects ........................................................................................ 16

7.2.4

class derived_active_objects ........................................................................................... 17

7.2.5

class PfdBaseList ............................................................................................................ 17

7.2.6

class PfdBaseListElement_ .............................................................................................. 18

7.2.7

class PfdBaseListIter ....................................................................................................... 18

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

2

7.2.8

class PfdInstanceTable .................................................................................................... 18

7.2.9

class PfdEvent................................................................................................................. 18

7.2.10

class PfdCreateEvent ...................................................................................................... 19

7.2.11

class PfdInstanceEvent.................................................................................................... 19

7.2.12

class derived_event_profiles............................................................................................ 20

7.2.13

class derived_events........................................................................................................ 20

7.2.14

class PfdTask .................................................................................................................. 20

7.2.15

class PfdBufferManager .................................................................................................. 21

7.2.16

class PfdAllocationCluster_ ............................................................................................ 21

7.2.17

class PfdClusterManager ................................................................................................ 22

7.2.18

class PfdInterTaskEventQueue ........................................................................................ 22

7.2.19

class PfdCriticalSection .................................................................................................. 22

7.2.20

class PfdDataContainer .................................................................................................. 23

7.2.21

class PfdString ................................................................................................................ 23

7.2.22

class PfdServiceHandle ................................................................................................... 23

7.3

R

ELATION

R

EPORT

:.................................................................................................................. 23

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

3

1. INTRODUCTION

1.1 How to Use this Document

This document provides the analyst with the information needed to develop MBSE Analysis
models compatible with the Pathfinder Solutions Design Templates and Components.

It is assumed in general that the reader is familiar with the material presented in the Pathfinder
Solutions paper "Model Based Software Engineering: An Overview of Rigorous and Effective
Software Development using UML

". It is assumed that the analyst actually applying this

document to implement their models has attended Pathfinder Solutions' MBSE Waypoint series
practitioner-level training .

Please refer to section 2 SYSTEM OVERVIEW to understand the composition of the overall
system, including analysis and implementation aspects. The system-level data abstractions are
introduced here.

Section 3 MBSE EXECUTION INFRASTRUCTURE provides an overview of the internal
mechanisms in the Software Mechanisms domain that support the abstraction, behavior, and
maintenance of Analysis Object instances.

The details of how the analyst models the application to fit into and take advantage of the Design
are covered in section 3.7 Compiler Flag Summary.

The services available from the Software Mechanisms service interface are described in section
5 SOFTWARE MECHANISM SERVICES.

1.2 Design Goals

The Design goals are to provide a reliable and flexible base for the MBSE application:

n support the implementation of MBSE analysis elements specified in UML

n provide a portable and optimized mapping of Pathfinder Solutions' Action Language to

C++

n support fully automated translation of MBSE elements to code
n attain the greatest degree of O/S, GUI and other forms of platform independence

feasible

n support Instrumented Execution with execution control and analysis element information

access.

n provide project-independent space and time performance optimizations
n provide infrastructure to directly support project-specific space and time performance

optimizations

1.3 Operating Configurations

The Design execution strategy has the following characteristics:

n asynchronous event transmission
n provide support for the creation, loading, and invocation of Indirect Services (via the

ServiceHandle)

n generate bridge service interfaces to all domains
n control of Instrumented Execution code generation with domain-level properties
n control of Instrumented Execution code compilation compiler symbols
n automatic enable/disable of Instrumented Execution code at run-time.

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

4

1.4 Terminology

MBSE

Model Based Software Engineering: a software development method where
the system to be developed is separated into subject matter domains, UML
is used to express rigorous and complete Analysis model for some of these
domains, and translation is used to map the Analysis through Design
templates into a deliverable implementation.

Object

This term is used instead of UML Class for clarity

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

5

2. SYSTEM OVERVIEW

This section describes the design and implementation components used to realize the behavior
of the system.

2.1 Source Components

There are 3 major source components of the system: the Software Mechanisms, the code
resulting from the Analyzed Domains, and the Realized Domains.

2.1.1 Mechanisms

The Software Mechanisms are those classes that provide the foundation on which Analysis
Active Objects execute their actions, and Analysis Objects and Events are managed. The
mechanisms also provide support for Instrumented Execution - managing application data and
execution control during dynamic verification and debug execution. Base mechanism classes
serve as the run-time foundation for application-specific classes derived from Analysis Objects
and Events.

Please refer to Section 7 Appendix - Base and Generated Mechanisms for a detailed "extended-
notation" IM and report on the base and generated mechanisms.

2.1.1.1 PfdObject

The Object is the base class for all classes generated from Analysis Objects. It's only function is
to manage information for Instrumented Execution (debug) purposes.

2.1.1.2 PfdActiveObject

The ActiveObject is a subclass of Object, and is the base class for all classes generated from
active Analysis Objects. It provides a generic subset of the event handling capabilities.

2.1.1.3 PfdEvent

The PfdEvent is the base class for all classes generated from Analysis Events.

2.1.1.3.1 PfdCreateEvent

The PfdCreateEvent is the base class for all classes generated from Analysis Create Events. It
is special because it has no destination, and each derivative of this class has it's own dispatch()
that calls the correct create action.

2.1.1.3.2 PfdInstanceEvent

The PfdInstanceEvent is the base class for all classes generated from Analysis non-create
Events

2.1.1.4 PfdTask

Task is the class that serves as the central queuing and dispatch point for all Analysis events. It
has the main event loop, where the next event is dequeued and dispatched.

2.1.2 Derived Components

A significant component of the system is the code resulting from the set of analyzed domains.
These derived components are generated from analysis information.

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

6

2.1.2.1 Derived Objects

A C++ class is generated for every Analysis Object named "<domain prefix>_<object prefix>".
This class contains the object's attributes, accessors, services, and for active objects, the state
table and all action methods. It inherits from either PfdObject, PfdActiveObject, or a supertype
derived object class. The class header is defined in a file named <class name>.hpp, and the
class body is defined in a file named <class name>.cpp.

2.1.2.2 Derived Events

Every Analysis Event has a class generated to carry any parameters it may have. The name of
an event class is "<destination object class name>_Event_<event name>". The event class
definitions and implementation are defined in the destination object class files.

2.1.2.3 Indirect Services

The Action Language ServiceHandle construct supports the indirect specification of services.
An Indirect Service is handle to an Analysis-level domain or object service. It is created at run-
time, carries parameter values which can be individually updated, can be passed as an Analysis
data item (object attribute, service parameter, event parameter or action local variable) and can
be invoked indirectly.

This provides the capability to specify in data which service is to be invoked, associate
parameters with the service id data, and invoke the service using this data. This capability
supports the following applications:

n data-driven behavior selection, such as command routing and "recipe" execution
n allows a run-time dynamic binding mapping alternative to translation-time or compile-

time service resolution

n supports a single domain server to respond to a varying client population without

analysis changes

n facilitates an increased degree of data-driven bridging between domains
n provides a way to pre-seed input values with a service index to facilitate call-backs,

without forcing the server to learn too much about the client call back parameters

The use of the ServiceHandle is detailed in the Action Language description.

2.1.2.4 Domain Classes

Every domain (analyzed and realized) will have a support and service interface class named
<domain prefix> defined in the generated file "<domain prefix>.hpp". This class has no data
members, so no instances of it are ever created. Each analyzed domain class had the following
common static methods defined:

static bool_t generatedStartup_()

Perform domain startup; return FALSE if any errors

encountered

static bool_t setupPreInst_()

Establish pre-existing instances at startup (this method

is hand-written in the system/pre-inst.cpp file)

static bool_t generatedShutdown_()

Perform domain shutdown; return FALSE if any errors

encountered

static bool_t dispatchService_(PfdServiceHandle* handle)

Dispatch indirect service; return

FALSE if any errors encountered

The bodies for these methods are in "<domain prefix>.cpp". In addition, all domain services are
defined as static methods of the domain class. The service function profiles are defined in
"<domain prefix>.hpp", and their bodies are in "<domain prefix>_services.cpp".

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

7

2.1.3 Realized Domains

A realized domain is any domain is not Analyzed. The interfaces (service definitions) for all
realized domains must be captured in the CASE tool, and the resulting generated service body
skeletons (from "<domain prefix>_services.cpp") can be used as a starting point for writing an
interface layer.

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

8

3. MBSE EXECUTION INFRASTRUCTURE

3.1 Program Component Structure

Diagram 3.1 below shows the major components of the overall application. Please note coupling
between analyzed domains and realized components is generally done through the service
interface to the realized domains.

typical embedded application program structure

realized domain implementations

Operating System

target H/W interface

S/W Mechanisms

Analyzed domain implementations

Domain Bridge

Services (both

realized and

analyzed)

diagram 3.1

3.2 Program Task Structure

Diagram 3.2 below illustrates the task structure for a Multi-Process/Processor context.

In the “main” process, the "main" function starts the main MBSE executive controller - PfdTask -
in a separate thread of control. PfdTask does system startup and waits for the first Analysis
Event. As Analysis Events are queued by MBSE actions and external entities, Task dequeues
the correct next event, and dispatches it. It performs the transition processing and state action
as appropriate. Some of these actions may result in additional Analysis Events.

The internal configuration of the MBSE Task mechanisms relies on the correct setting of the
preprocessor flag PATH_MULTI_TASK.

Setting this flag configures the mechanisms to use multi-thread support, and enables that
application program to use the PfdInterTaskEventQueue from threads outside the MBSE thread.

Leaving this preprocessor flag unset will configure the MBSE Task for simple single-process,
single-thread operation.

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

9

system event communication

realized code running in a separate thread

OOA Task

interprocess OOA event traffic

intertask OOA event traffic

local OOA Event traffic

inter-task OOA event queue

OOA Object State Action

or

Domain Bridge Service

OOA process

other application processes

realized code

Analyzed Domain Bridge Service

local event queue

OOA Events are received from external sources
(realized code invoking analyzed domain services
that send events) by the OOA Task, and are
queued and ultimately dispatched as local events.

diagram 3.2

3.3 Object Tracking Structures

3.3.1 Instance Populations

All instances of every object are tracked in the system. In general, a linked-list structure is used
to track instances on a per-object basis. This offers the most flexibility in terms of number of
instances that can be tracked, and the time/space loading is proportional to the population. This
type of instance tracking is the default for all objects.

If the total instance population of an object is known, and it is expected that most of the time a
majority of this population will exist, then it may be more efficient in terms of both space and
time to use an array-based structure to track instances. To use array-based instance tracking,
the analyst/developer must:
n set the object property "MaxIndex” to maximum population for that object

NOTE: Care must be taken to ensure that all levels of a hierarchy are considered separately -
the maximum population for a supertype should correspond to the sum of the subtype
populations.

3.3.2 Instance Sorting

Lists of Analysis Object instances are maintained at the object level. For non-array based
objects, the sort order for these lists can be specified by using the property “SortOrder” for an
object or relationship. The values “FIFO”, “LIFO”, ascending”, or “descending” may be provided.
The default is “FIFO”.

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

10

If “ascending” or “descending” is specified, the property “SortKey” must be specified, with a
comma-separated list of at least one of the sorted object’s attributes. Every datatype used to
abstract attributes identified by "SortKey" must have the operator "<" defined.

3.4 Events

3.4.1 Delayed Events

Analysis Event Generate processes allow the specification of a delay period. For this Design,
the delay value is in milliseconds. The PfdTask class supports the delayed transmission of
events by queueing these events up in a single delayed event list until it is time for them to be
sent. The mechanism for initiating the transmission of each of these events at the proper time is
platform specific.

Delayed Events should be used to send an Analysis Event at least the specified time after the
invocation of its generate process. The event is sent once.

3.5 Startup Support

The file startup.cpp defines the function system_startup(). This function contains
required generic startup processing, and should be edited to call any application-specific startup
methods/functions necessary.

3.6 Instrumented Execution Support

Code required to support Instrumented Execution

is generated by the provided archetypes for

every domain with the “IE Enabled” property set on (this is found in the domain definition). Once
generated, this code can be conditionally compiled out of the system by setting the preprocessor
flag NO_PATH_IE. Set preprocessor flags in your VC++ project through Build->Settings-> C++-
>Category:Preprocessor->Preprocessor Definitions.

3.7 Compiler Flag Summary

A number of compiler flags are provided to help tailor the Design to the target execution
environment. In general, do not define any flags to get the default architecture configuration:
single thread of control on Win32.

symbol name define this symbol when the target environment…

PATH_NO_FILESYSTEMS

doesn’t support standard file I/O

PATH_NO_STREAMS

doesn’t support C++ streams

PATH_NO_WIN32

isn’t Win32

PATH_NO_DISPLAY

doesn’t have a display

PATH_NO_CLOCK

doesn’t have an system clock

PATH_NO_FLOAT

doesn't support floating point (double)

other symbols:

NO_PATH_IE

define this to suppress Instrumented Execution code in both the
generated code and the base mechanisms

PATH_MULTI_TASK

define this to enable shared memory intertask capabilities using
the InterTaskEventQueue

PATH_NO_SHARED_MEMORY define this to enable inter-process communication without

relying on shared memory

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

11

4. MODELING CONVENTIONS

In order ensure proper integration with the Software Mechanisms and take full advantage of their
capabilities, the guidelines and conventions presented in the "Pathfinder Solutions

MBSE

Modeling Guide" must be followed. In addition, the following restrictions must be observed:

4.1 Attribute, Event Data Item and Transient Data Types

The analysis data type for an Attribute, Event Data Item or Transient provides the information
needed to select the proper implementation data type for the corresponding implementation
element. This data type must be either a build int data type, or map to system-level data type
defined in sys_def.hpp.

DATA TYPE TABLE:

analysis implementation
Boolean

bool_t

Character

char

GenericValue

PfdDataContainer

Handle

void*

Integer

int

Real

double

String

PfdString

Void

void

Group

PfdBaseList

GroupIter

PfdBaseListIter

ServiceHandle

PfdServiceHandle*

For items crossing domain boundaries, such as domain service parameters, or indirect service
parameters, built-in or system-level data types must be used.

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

12

4.2 Information Modeling

- only use letters to construct an object’s prefix.
- do not use supertype/subtype hierarchies with 2 or more sets of disjoint leaves, such as

the following hierarchy, where Dog is the parent of all, but SmallDog is only a sibling of
BigDog and not BlackDog or RedDog.

RedDog

Dog____________/

/ \
_____/_ BlackDog
/ \
BigDog

SmallDog

instead use something like:

Dog

______________|____________________
/

/

\

\

BigRed SmallRed

BigBlack

SmallBlack

- if an attribute points to dynamically allocated memory, and therefore requires explicit

deallocation upon object instance deletion, then the "ExplicitDelete" coloring property for
the attribute must be set.

4.3 Design Properties Summary

The following "coloring" properties have been described in this (or another) document.

4.3.1 Analysis Properties

Analysis properties are used to overcome ambiguities in the method, or shortcomings in a
vendor's support of it.

analysis element property name property range of values default section
Domain

Encyclopedia

<directory path>

same as Dom Chrt

MBSE Modeling
Guide

IE Enabled

“T” | “F”

“F”

3.6

Object

SortOrder

“FIFO” | “LIFO” | “ascending”

“FIFO”

3.3

“descending”

SortKey

<comma separated attribute

required with

3.3

list>

SortOrder

4.3.2 Design Properties

These specify aspects of the system not captured in analysis elements.

analysis element property name property range of values default section
Object

Include

<space sep. list of files>

none

4.2

Attribute

MaxIndex

<max id value>

“<unbounded>”

3.3

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

13

5. SOFTWARE MECHANISM SERVICES

5.1 Derived Services

Derived services are unique to the Software Mechanisms domain. They are services that are
expanded by the Design templates into inline code.

5.2 Standard Bridge Services

The following sections detail the services provided by the Software Mechanisms.

5.2.1 Shutdown

SW:shutDown : inputs: status_t error_code; outputs: none;

purpose : shut down the system and put error_code in the error log. NOTE - To initiate the
orderly shutdown of the program, ShutDown is invoked with a status of STATUS_OK.

5.2.2 Run-Time Context Information

SW:getDateTime: inputs: none; outputs: String date_time;

purpose: get the date/time value for *now*.

SW.8 Bridge ProgramID : inputs: none; outputs: String prog_id;

purpose: supply program identification string.
- Plural Chain participation: member (participation supported only with plural

conditional control input)

SW:getTime: inputs: none; outputs: int time;

purpose: get the time value for *now* (specific to time.h support)
purpose: Register the given event for periodic transmission.
- Plural Chain participation: end

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

14

6. RUN-TIME ERROR HANDLING

During the course of system execution, there are a number of project-specific error conditions
that can detected by the Software Mechanisms.

6.1 ShutDown != STATUS_OK

In the case that ShutDown is called with status != STATUS_OK, the Software Mechanisms will
log appropriate debug information, and immediately shut down the program.

6.2 Out of Memory

By overriding ::new, the Software Mechanisms can be informed when available heap is
exhausted. In this case, the Software Mechanisms will log appropriate debug information, and
immediately shut down the program.

6.3 Event “Can’t Happen”

When a “can’t happen” transition is encountered, the Software Mechanisms will log appropriate
debug information, and immediately shut down the program.

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

15

7. Appendix - Base and Generated Mechanisms

This appendix describes the major structural components in the architecture.

7.1 Base and Generated Mechanisms - Information Model

SoftwareMechanisms

SA/Object Architect

Thu Jun 03, 1999 19:09

Comment

Peter J. Fontana

copyright 1995-1999 Pathfinder Solutions, Inc.

all rights reserved.

22 PfdServiceHandle

Data

processorIndex_
domainIndex_
serviceIndex_
parameters_
create<s>
invoke<>
setParameterValue<>

3 derived_inactive_objects

Data

instanceList [PK1]
derived_attributes
plugIn<v>
unplug<v>
isA<v>
findFromIds<s>
deleteAllInstances<s>
createFromAttributes<s>
createFromString<s>

method details available
from task.hpp

14 PfdTask

Data

singleTask [PK1]
taskId_
processId_
eventQueue_
delayedEvents_
periodicEvents_
eventPeriods_
periodTimers_
execMode_
delayEventTimer_

9 PfdEvent

Data

source
send<>
sendLocal<v>
dispatch<v>
cancelMe<>
indirectSendCopy<v>
label<v>
isCreate<v>

11 PfdInstanceEvent

Data

destination
sendLocal<v>
dispatch<v>
indirectSendCopy<v>
setDestination<v>
label<v>
isCreate<v>

10 PfdCreateEvent

Data

sendLocal<v>
dispatch<v>
cancel<s>
indirectSendCopy<v>
label<v>
isCreate<v>

2 PfdActiveObject

Data

state
takeEvent<>
nextState<v>
performStateAction<v>
evSeqNum<v>

4 derived_active_objects

Data

transitionTable [PK1]
evSeqNum<v>
nextState<v>
performStateAction<v>

method details available
from datacont.hpp

20 PfdDataContainer

Data

type_
integerValue_
realValue_
pointerValue_
listValue_
stringValue_

method details available
from buf_mgr.hpp

15 PfdBufferManager

Data

gHandle [PK1]
critSection_
blockCounts_
blockSizes_
clusterManagers_

method details available
from list.hpp

6 PfdBaseListElement_

Data

next
prev
item
genericKey

method details available
from buf_mgr.hpp

16 PfdAllocationCluster_

Data

manager_
clusterIndex_
freeBlockCount_
nextCluster_

method details available
from iteq.hpp

18 PfdInterTaskEventQueue

Data

eventQueue
eventQueueCriticalSection
eventOnQueue

1 PfdObject

Data

domainNumber_
objectNumber_
plugIn<v>
unplug<v>
isA<v>

method details available
from buf_mgr.hpp

17 PfdClusterManager

Data

sizeIndex
topCluster
firstClusterWithFree_

13 derived_events

Data

label<v>
indirectSendCopy<v>
setDestination<v>

19 PfdCriticalSection

Data

inUse
enter<>
leave<>

method details available
from list.hpp

5 PfdBaseList

Data

front
current
last

method details available
from instance_table.hpp

8 PfdInstanceTable

Data

table_
capacity_

method details available
from list.hpp

7 PfdBaseListIter

Data

list_
current_

method details available
from pfdstr.hpp

21 PfdString

Data

contents_
length_

NOTE: derived_events will either inherit
from PfdCreateEvent (through R11), or from
PfdInstanceEvent (through R12)

R3 indicates that a derived_active_object is
generated with all the data members and methods
generated for a derived_inactive_object.

NOTATONAL EXTENSIONS:
- data members appear at descriptive attributes
- static data members appear at identifying attributes
- private data members have a trailing _
- methods appear as attributes with a trailing "<>"
- method data types indicate the return type
- virtual methods have a "v" in the "<>"
- static methods have an "s" in the "<>"

C

R19 uses

controls inter-task event queueing for

C

R18 uses

controls inter-task access for

C

R17 uses

controls inter-task access for

R16 manages a list of

handles one cluster of blocks for

R15 manages a single block size

manager clusters for

C

R15 is sent to

is destination for

C

R14 queues and dispatches

is queued and dispatched by

R12

R11

R8

C

R7 can be accessed by

iterates over

C

R6 stores items in

stores one item for

C

C

R5 used for instance list

tracks instances of

C

R4 uses for instance list

tracks instances of

R3

R2

R1

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

16

7.2 Base and Generated Mechanisms - Object and Attribute Report:

7.2.1 class PfdObject

Base class for all Analysis Objects.

data members:

int domainNumber_
For debug reporting only
int objectNumber_
For debug reporting only

methods:

void plugIn();
Add to instanceList or instanceTable
void unplug();
Disconnect from any relationships, unplug from instance lists
bool_t isA();
Return TRUE if this object's number matches the input

7.2.2 class PfdActiveObject

Base class for all Analysis Active Objects.

data members:

int state
The analysis state this instance is in.

methods:

void takeEvent();
Receive instance-based events (create events call create actions directly)
int nextState();
Compute the next state for this object based on the incoming event
void performStateAction();
Call the appropriate state action for the current state
int evSeqNum();
Look up the event sequence number for the given event. Inactive supertypes may have
events directed to them. The event sequence number is the index of the event into the state
transition table.

7.2.3 class derived_inactive_objects

The set of classes dervied from MBSE inactive objects.

data members:

static PfdBaseList or PfdInstanceTable instanceList
This is the list of all instances of objects of this type.
atomic for this domain derived_attributes

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

17

The set of anaysis attributes defined for this Analysis Object.

methods:

void plugIn();
Add to instanceList or instanceTable
void unplug();
Disconnect from any relationships, unplug from instance lists
int isA();
Returns TRUE if the instance is of the specified type.
pointer to this class findFromIds();
Find an instance from id attributes. If 'critical' is specified, log an error and shut down if a
matching instance is not found.
void deleteAllInstances();
Delete all instances of this object
pointer to this class createFromAttributes();
Create a new instance of this object from a set of attribute values.
pointer to this class createFromString();
Creates a new instance of the object. Attribute values are parsed from a string which
was specified in the pre-existing instance file. Returns 0 if attr_values string fails parsing.

7.2.4 class derived_active_objects

The set of classes derived from Analysis Active Objects.

data members:

static int[number of states][number of events] transitionTable
State transition table: 2D array of Integers indicating next state first index :

ordinal

number of current state second index :

ordinal number of received event value:

positive numbers are valid transitions

EVENT_IGNORED indicates event

ignored

EVENT_CANT_HAPPEN indicates can't happen

methods:

int evSeqNum();
Look up the event sequence number for this event
int nextState();
Compute the next state for this object based on the incoming event and the current state.
void performStateAction();
Call the appropriate state action for the current state

7.2.5 class PfdBaseList

General purpose double-linked and optionally sorted list class.

data members:

PfdBaseListElement_* front
The first element in the list.
PfdBaseListElement_* current
The current element in the list - this is the list "cursor". It may be 0.
PfdBaseListElement_* last
The last element in the list.

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

18

methods:

7.2.6 class PfdBaseListElement_

Single node in PfdBaseList

data members:

PfdBaseListElement_* next
Node after this one.
PfdBaseListElement_* prev
The node before this one.
void* item
Address of the actual item in the list.
PfdDataContainer genericKey
Optional sort key.

methods:

7.2.7 class PfdBaseListIter

Iterator for items in a PfdBaseList.

data members:

PfdBaseList* list_
The list we're iterating over.
PfdBaseListElement_* current_
The 'cursor' for this iterator - may be 0.

methods:

7.2.8 class PfdInstanceTable

Holding structure for arrays of PfdObject's.

data members:

PfdObject** table_
Pointer to array of object instances (allocated once at construction) - empty slots are
initialized to 0
int capacity_
Maximum population

methods:

7.2.9 class PfdEvent

Abstract base classes for all Analysis Events.

data members:

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

19

PfdActiveObject* source
The object that sent this event. May be 0 for events sent from realized code

methods:

void send();
Determine if the receiver is in the same task or is in a different task. Places the event on
the appropriate queue.
void sendLocal();
Queue event locally:in the same process and task at the processMBSE thread of control.
void dispatch();
Executes the action function for the new state entered as a result of receiving this event.
void cancelMe();
Cancel this event before dispatch
PfdEvent* indirectSendCopy();
Make copy of event to send indirectly
int label();
Return the event label
bool_t isCreate();
Returns TRUE if this is a create event.

7.2.10 class PfdCreateEvent

Base class for generated MBSE create event classes.

data members:

methods:

void sendLocal();
Send from/to MBSE task in this process.
void dispatch();
At start of action, dispatch directly to action function
void cancel();
Cancel the next instance of a create event with the given label
PfdEvent* indirectSendCopy();
Make copy of event to send indirectly
int label();
Return the event label
bool_t isCreate();
Returns TRUE if this is a create event.

7.2.11 class PfdInstanceEvent

Base class for generated MBSE instance (non-create) events.

data members:

PfdActiveObject* destination
Active object receiving event.

methods:

void sendLocal();
Send from/to MBSE task in this process
void dispatch();

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

20

At start of action, dispatch to transition and action function
PfdEvent* indirectSendCopy();
Make copy of event to send indirectly.
void setDestination();
Set the destination if not already set (only call this within task running MBSE)
int label();
Return the event label
bool_t isCreate();
Returns TRUE if this is a create event.

7.2.12 class derived_event_profiles

This is the set of event profile classes generated. There is one for each distinct Indirect Event
Profile identified in the Analysis Event properties. It is named from the event profile name.

data members:

Atomic for the domain. derived_event_data_items
The set of anaysis event data items (destination and payload) defined for this Analysis
Object.

methods:

PfdEvent* sendIndirectCopy();
Make copy of event to send indirectly.

7.2.13 class derived_events

One event class is generated for each unique Analysis Event defined in the system.

data members:

methods:

int label();
Return the event label
PfdEvent* indirectSendCopy();
Make copy of event to send indirectly.
void setDestination();
For instance-based events, sets the destination if not already set. This function should
only be called by the task running MBSE.

7.2.14 class PfdTask

The Analysis Event loop which dispatches Analysis Events and executes MBSE actions.

data members:

static PfdTask* singleTask
The single instance of the PfdTask class. Only one thread of MBSE execution is allowed
per task.
double taskId_
The id of the OS task/thread this is running in.
int processId_

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

21

The id of the process this is running in.
PfdBaseList eventQueue_
Main event queue.
PfdBaseList delayedEvents_
Delayed event queue - sorted by transmission time
PfdBaseList[] periodicEvents_
Periodic event queues - filled by invocations of SW.12
int[] eventPeriods_
Period in milliseconds for each periodic event queue
int[] periodTimers_
Timer id's for periodic event timers
exec_mode_t execMode_
Execution mode: indicates whether the task is running, idle, or under IE control.
int delayEventTimer_
When the delayedEvents_ is not empty, this is the timer used for the next event

methods:

7.2.15 class PfdBufferManager

This class manages the lists of memory blocks used to satisfy heap requests. It is not intended
for general use through direct access. Classes using the buffer manager must override the new
and delete operators.

data members:

static PfdBufferManager* gHandle
A handle to the single instance of the buffer manager used under the current
configuration.
PfdCriticalSection* critSection_
Mitigates access contention to buffer in multi-threaded contexts using critical sections.
int [] blockCounts_
Number of each type of block
int [] blockSizes_
Size of each block type in bytes
PfdClusterManager_*[] clusterManagers_
A cluster manager is used to control the space for a single block size

methods:

7.2.16 class PfdAllocationCluster_

Manages one group of allocation blocks of a single size

data members:

PfdClusterManager_* manager_
The buffer manager controlling this cluster
int clusterIndex_
The block size index for this cluster.
int freeBlockCount_
Number of free blocks for this cluster
PfdAllocationCluster_* nextCluster_
The next cluster in this buffer manager serving blocks of the same size as me.

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

22

methods:

7.2.17 class PfdClusterManager

Manages all PfdAllocationCluster_s handling the same size blocks

data members:

int sizeIndex
Indicates the size of block for this cluster
PfdAllocationCluster_* topCluster
The first cluster in the list this manager is responsible for. The clusters form a chain, and
this is the head for our specific block size.
PfdAllocationCluster_ firstClusterWithFree_
Handle to the first cluster in the list that may have a free block; may == 0

methods:

7.2.18 class PfdInterTaskEventQueue

Event queue used to manage events destined to the PfdTask that are being sent from other
threads of control.

data members:

PfdBaseList eventQueue
List of events waiting to be sent to the PfdTask
CRITICAL_SECTION eventQueueCriticalSection
Intertask mechanism used to control access to the eventQueue
HANDLE eventOnQueue
O/S event regulating the critical section

methods:

7.2.19 class PfdCriticalSection

Resolves inter-task data contention through a critical section.

data members:

CRITICAL_SECTON inUse
Critical section (simulated with a boolean on the ARM)

methods:

void enter();
Gain access to the critical section.
void leave();
Relinquish access to the critical section.

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

23

7.2.20 class PfdDataContainer

Allows the generic storage and manipulation of data values.

data members:

value_type_t type_
The actual type of the value stored.
int integerValue_
Access member for integer value (in union with realValue_ and pointerValue_)
double realValue_
Access member for floating point value (in union with intValue_ and pointerValue_)
void* pointerValue_
Access member for pointervalue (in union with realValue_ and integerValue_)
PfdBaseList* listValue_
Access member for list value.
PfdString stringValue_
Access member for string value.

methods:

7.2.21 class PfdString

General-purpose string class

data members:

char* contents_
Storage handle for string contents.
int length_
Number of bytes currently allocated to contents_

methods:

7.2.22 class PfdServiceHandle

Implements the indirect service capability.

data members:

int processorIndex_
Id of the processor the target service is allocated to.
int domainIndex_
Domain that contains the service to be called.
int serviceIndex_
Internal id of service to be called.
PfdBaseList parameters
List of data containers holding the input parameter values

methods:

7.3 Relation Report:

R1: PfdObject ISA

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

24

derived_inactive_objects, PfdActiveObject

R2: PfdActiveObject ISA

derived_active_objects

R3: derived_inactive_objects ISA

derived_active_objects

R4:

derived_inactive_objects uses for instance list PfdBaseList (M:Mc)PfdBaseList tracks

instances of derived_inactive_objects (Mc:M)

R5:

derived_inactive_objects used for instance list PfdInstanceTable

(Mc:1c)PfdInstanceTable tracks instances of derived_inactive_objects (1c:Mc)

R6:

PfdBaseList stores items in PfdBaseListElement_ (1:Mc)PfdBaseListElement_ stores

one item for PfdBaseList (Mc:1)

R7:

PfdBaseList can be accessed by PfdBaseListIter (1:Mc)PfdBaseListIter iterates over

PfdBaseList (Mc:1)

R8: PfdEvent ISA

PfdInstanceEvent, PfdCreateEvent

R9: PfdCreateEvent ISA

derived_event_profiles

R10: PfdInstanceEvent ISA

derived_event_profiles

R11: PfdCreateEvent ISA

derived_events

R12: PfdInstanceEvent ISA

derived_events

R14:

PfdTask queues and dispatches PfdEvent (1:Mc)PfdEvent is queued and dispatched by

PfdTask (Mc:1)

R15:

PfdInstanceEvent is sent to PfdActiveObject (Mc:1)PfdActiveObject is destination for

PfdInstanceEvent (1:Mc)

R15:

PfdBufferManager manages a single block size PfdClusterManager

(1:M)PfdClusterManager manager clusters for PfdBufferManager (M:1)

R16:

PfdClusterManager manages a list of PfdAllocationCluster_ (1:M)PfdAllocationCluster_

handles one cluster of blocks for PfdClusterManager (M:1)

background image

Pathfinder Solutions Design Templates and Components Analyst’s Guide

25

R17:

PfdBufferManager uses PfdCriticalSection (1c:1)PfdCriticalSection controls inter-task

access for PfdBufferManager (1:1c)

R18:

PfdInterTaskEventQueue uses PfdCriticalSection (1c:1)PfdCriticalSection controls inter-

task access for PfdInterTaskEventQueue (1:1c)

R19:

PfdTask uses PfdInterTaskEventQueue (1:1c)PfdInterTaskEventQueue controls inter-

task event queueing for PfdTask (1c:1)


Wyszukiwarka

Podobne podstrony:
arch biol 20092010 sz id 67616 Nieznany
AG 04 id 52754 Nieznany
38 USTAWA O OC ARCH I INZ
In literary studies literary translation is a term of two meanings rev ag
Cu i Ag id 402344 Nieznany
Materialy pomocnicze cardan AG Nieznany
MBSE, ooarev
arch biol 20042005 wo
ARCH MED SĄD KRYM 1998, XLVII, 27 34
arch med sad 2 2012
ag kolokwium 21 04 08 rozwiazania
7331 tech arch kraj ark prak1 c Nieznany
loveparade 2010 anlage 05 protokoll ag verkehr 20 10 09
ARCH MED SĄD KRYM 1999, XLIX, 277 286
diebstahl einer ag
Algorytmy Genetyczne, AG 1
ag
Ag zgodnosci tkankowej przeszcz Nieznany

więcej podobnych podstron