diff --git a/ColdFrameProfile.html b/ColdFrameProfile.html index 9275753e..f1fc1ee5 100644 --- a/ColdFrameProfile.html +++ b/ColdFrameProfile.html @@ -1,10 +1,8 @@ - - - + ColdFrameProfile @@ -35,10 +33,10 @@

Stereotypes

- Normally the abbreviation of a class's name is formed from the initial letters of the words in the name. If there's only one - word, it's formed by prepending "A_" or "An_". This stereotype is provided to support the {abbreviation} tag, which allows - the modeller to override the default behaviour. - + Normally the abbreviation of a class's name is formed from the initial letters of + the words in the name. If there's only one word, it's formed by prepending "A_" or + "An_". This stereotype is provided to support the {abbreviation} tag, which allows + the modeller to override the default behaviour. @@ -74,9 +72,9 @@

Stereotypes

- The marked datatype must have only one operation, whose name is discarded (and can be omitted): instead, the datatype specifies - an access to an operation of the given profile. - + The marked datatype must have only one operation, whose name is discarded (and can + be omitted): instead, the datatype specifies an access to an operation of the given + profile.
@@ -90,9 +88,8 @@

Stereotypes

- The tagged operation is an accessor for one of the attributes of the class, determined by scope (instance/class), name and - parameter or result type. - + The tagged operation is an accessor for one of the attributes of the class, determined + by scope (instance/class), name and parameter or result type.
@@ -106,9 +103,9 @@

Stereotypes

- Each instance of the class is to have an associated task.
Setting the "isActive" modifier "true" has the same effect but is less visible for such a significant aspect of the generated - code, and also doesn't allow setting of {priority} and {stack}. - + Each instance of the class is to have an associated task.
Setting the "isActive" modifier "true" has the same effect but is less visible for + such a significant aspect of the generated code, and also doesn't allow setting of + {priority} and {stack}. @@ -123,8 +120,7 @@

Stereotypes

+ - + - + @@ -173,7 +170,8 @@

Stereotypes

association-class-naming *deprecated* - - @@ -132,11 +128,12 @@

Stereotypes

This stereotype supports the tags {association-name}, which is used to specify the name to be used for the association part - of an AssociationClass, and {class-name}, which is used to specify the name to be used for the class part. Both can be supplied; - if only one is supplied, the other part retains the name specified in the model; if neither is supplied, the name used is - formed by appending "_Class" to the AssociationClass name. - This stereotype supports the tags {association-name}, which is used to specify the + name to be used for the association part of an AssociationClass, and {class-name}, + which is used to specify the name to be used for the class part. Both can be supplied; + if only one is supplied, the other part retains the name specified in the model; if + neither is supplied, the name used is formed by appending "_Class" to the AssociationClass + name. @@ -157,9 +154,9 @@

Stereotypes

The attribute must be read from memory or written to memory each time it is accessed, like «volatile», but additionally in - such a way that it's proof against concurrent access.
The implementation may limit the size of objects that can be treated as atomic. -
The attribute must be read from memory or written to memory each time it is accessed, + like «volatile», but additionally in such a way that it's proof against concurrent + access.
The implementation may limit the size of objects that can be treated as atomic.
- Specifies that the datatype is a string of length up to a maximum. The maximum length is specified in the tag {length}. + Specifies that the datatype is a string of length up to a maximum. The maximum length + is specified in the tag {length}. @@ -197,11 +195,12 @@

Stereotypes

- If applied to a type, callback support code is to be generated. The idea here is that a (lower-level) Domain may need to support - Observers from higher-level Domains, and the higher-level Domains can register to be notified when something has changed in - the lower-level Domain.
If applied to an operation, the operation is to be an Observer of some change in a lower-level domain. This implies the stereotype - «class». The operation must take a single parameter of the type concerned. - + If applied to a type, callback support code is to be generated. The idea here is that + a (lower-level) Domain may need to support Observers from higher-level Domains, and + the higher-level Domains can register to be notified when something has changed in + the lower-level Domain.
If applied to an operation, the operation is to be an Observer of some change in a + lower-level domain. This implies the stereotype «class». The operation must take a + single parameter of the type concerned.
@@ -215,10 +214,10 @@

Stereotypes

- Specifies (in the associated {max} tag) the maximum number of instances of a class. Note, under some circumstances ColdFrame - can calculate the maximum number of instances (for example, if the class has a single identifier of an enumeration type): - this setting will override such a calculation. - + Specifies (in the associated {max} tag) the maximum number of instances of a class. + Note, under some circumstances ColdFrame can calculate the maximum number of instances + (for example, if the class has a single identifier of an enumeration type): this setting + will override such a calculation. @@ -242,10 +241,10 @@

Stereotypes

- This stereotype is used to manage class events, which is a ColdFrame concept that distinguishes events directed to state machines - (instance events) from events originating outside the domain (class events, because external entities have no visibility of - state-machine related events). - + This stereotype is used to manage class events, which is a ColdFrame concept that + distinguishes events directed to state machines (instance events) from events originating + outside the domain (class events, because external entities have no visibility of + state-machine related events).
@@ -259,8 +258,10 @@

Stereotypes

- Indicates that the type is a constrained subtype of the type specified in the accompanying {constrains}.
The constraints are indicated in the accompanying {lower} and {upper}, at least one of which must be present.
If either {lower} or {upper} is absent, the lower or upper bound respectively of the {constrains} type is used. - + Indicates that the type is a constrained subtype of the type specified in the accompanying + {constrains}.
The constraints are indicated in the accompanying {lower} and {upper}, at least one + of which must be present.
If either {lower} or {upper} is absent, the lower or upper bound respectively of the + {constrains} type is used. @@ -290,8 +291,8 @@

Stereotypes

- Specifies that the conventions of the programming language specified in the accompanying {language} tag are to be used.
If specified on a class, the class must be stereotyped «datatype». - + Specifies that the conventions of the programming language specified in the accompanying + {language} tag are to be used.
If specified on a class, the class must be stereotyped «datatype». @@ -337,9 +338,8 @@

Stereotypes

- Causes the generation of discriminated records; the discriminant is an enumeration type with literals formed from the attribute - names with _T appended.
To be applied to a Class stereotyped «datatype» and with attributes. - + Causes the generation of discriminated records; the discriminant is an enumeration + type with literals formed from the attribute names with _T appended.
To be applied to a Class stereotyped «datatype» and with attributes.
@@ -353,11 +353,13 @@

Stereotypes

- A domain is a separate real, hypothetical, or abstract world inhabited by a distinct set of classes that behave according - to rules and policies characteristic of that domain.
A domain is translated as a top-level Ada package, with the name derived from the package name using the usual name conversion - rules (it can be overridden using the tagged value {name}).
Child UML packages are included (recursively), unless they are steretyped «ignore». The child UML package structure is not - reflected in the generated code (for example, all classes end up as direct Ada child packages of the domain package). - + A domain is a separate real, hypothetical, or abstract world inhabited by a distinct + set of classes that behave according to rules and policies characteristic of that + domain.
A domain is translated as a top-level Ada package, with the name derived from the + package name using the usual name conversion rules (it can be overridden using the + tagged value {name}).
Child UML packages are included (recursively), unless they are steretyped «ignore». + The child UML package structure is not reflected in the generated code (for example, + all classes end up as direct Ada child packages of the domain package). @@ -378,10 +380,10 @@

Stereotypes

- Supports unit test.
Marks a package (which needs to be a child of a «domain» package) as containing all the «public» classes and «callback» types, - any types used by them, and any exceptions that form part of the external interface of the parent package.
Use the {name} tag to define the name to generate (the code will still be placed in the directory derived from the actual - package name, which should be <parent>_Interface). - + Supports unit test.
Marks a package (which needs to be a child of a «domain» package) as containing all + the «public» classes and «callback» types, any types used by them, and any exceptions + that form part of the external interface of the parent package.
Use the {name} tag to define the name to generate (the code will still be placed in + the directory derived from the actual package name, which should be <parent>_Interface). @@ -402,10 +404,11 @@

Stereotypes

- In an active class, you can specify task entries using the «entry» stereotype. It's permissible to have an ordinary operation - with the same name as an «entry», because «entry» operations don't generate normal subprograms.
In a «protected» type, you can nominate procedures (operations without a return value) as entries using the «entry» stereotype.
The point about an entry of a protected type is that your implementation specifies a guard condition; callers of the entry - block until the guard becomes open. - + In an active class, you can specify task entries using the «entry» stereotype. It's + permissible to have an ordinary operation with the same name as an «entry», because + «entry» operations don't generate normal subprograms.
In a «protected» type, you can nominate procedures (operations without a return value) + as entries using the «entry» stereotype.
The point about an entry of a protected type is that your implementation specifies + a guard condition; callers of the entry block until the guard becomes open.
@@ -422,8 +425,9 @@

Stereotypes

- If applied to a (Simple)State, indicates that the marked state is a final state; no outgoing transitions are allowed.
If applied to an Operation, indicates that the marked operation deletes the instance.
Used in state machines to ensure that no further accesses are made to the deleted instance.
The (generated) operation Delete is automatically «final». - + If applied to a (Simple)State, indicates that the marked state is a final state; no + outgoing transitions are allowed.
If applied to an Operation, indicates that the marked operation deletes the instance.
Used in state machines to ensure that no further accesses are made to the deleted + instance.
The (generated) operation Delete is automatically «final».
@@ -437,10 +441,11 @@

Stereotypes

- Operations to be called to clean up as an instance is deleted (for example, to tidy up associations) are marked with the stereotype - «finalize». (It would be possible in theory to use Ada's controlled types, but that depends on your target language being - Ada). Also, it's possible to have more than one «finalize» operation; if so, they're called in alphabetical order. - + Operations to be called to clean up as an instance is deleted (for example, to tidy + up associations) are marked with the stereotype «finalize». (It would be possible + in theory to use Ada's controlled types, but that depends on your target language + being Ada). Also, it's possible to have more than one «finalize» operation; if so, + they're called in alphabetical order.
@@ -454,7 +459,8 @@

Stereotypes

- Specifies that the datatype is a fixed length string. The length is specified in the tag {length}. + Specifies that the datatype is a fixed length string. The length is specified in the + tag {length}. @@ -493,8 +499,9 @@

Stereotypes

- Used on a package to indicate that the contents of the package is to be ignored for code generation (it may, for example, - include additional documentation).
Used on a state transition to indicate that the trigger event is to be ignored in the source state.
+ Used on a package to indicate that the contents of the package is to be ignored for + code generation (it may, for example, include additional documentation).
Used on a state transition to indicate that the trigger event is to be ignored in + the source state.
@@ -511,7 +518,8 @@

Stereotypes

- Specifies that the object is to be found at the external reference specified in the {imported} tag. + Specifies that the object is to be found at the external reference specified in the + {imported} tag. @@ -532,9 +540,9 @@

Stereotypes

- Operations to be called from the Domain Initialize procedure are marked with the stereotype «init». This implies the stereotype - «class». These operations must be parameterless procedures. - + Operations to be called from the Domain Initialize procedure are marked with the stereotype + «init». This implies the stereotype «class». These operations must be parameterless + procedures.
@@ -548,8 +556,9 @@

Stereotypes

- This stereotype is applied to an operation parameter which is not permitted to be null.
It must only be applied to parameters of an access type (for example, a class in the domain). - + This stereotype is applied to an operation parameter which is not permitted to be + null.
It must only be applied to parameters of an access type (for example, a class in the + domain).
@@ -577,8 +586,8 @@

Stereotypes

- Specifies that instances of the type are protected against concurrent access by multiple threads of execution.
To be applied to a Class stereotyped «datatype» and with attributes. - + Specifies that instances of the type are protected against concurrent access by multiple + threads of execution.
To be applied to a Class stereotyped «datatype» and with attributes.
@@ -612,7 +621,8 @@

Stereotypes

- Specifies that the object is a renaming of the external reference specified in the {renames} tag. + Specifies that the object is a renaming of the external reference specified in the + {renames} tag. @@ -633,7 +643,8 @@

Stereotypes

- Specifies that the marked class has precisely one instance (which will be automatically created on domain initialization). + Specifies that the marked class has precisely one instance (which will be automatically + created on domain initialization).
@@ -647,10 +658,10 @@

Stereotypes

- If you have a symmetrical association of multiplicity 1:1, 1c:1c, 1-(1:1) or 1-(1c:1c), ColdFrame requires you to tell it - how the association is to be formalized.
This stereotype marks the association end from which the referential attribute (which appears in the other end, or which forms - the identifier of the Association Class) is taken. - + If you have a symmetrical association of multiplicity 1:1, 1c:1c, 1-(1:1) or 1-(1c:1c), + ColdFrame requires you to tell it how the association is to be formalized.
This stereotype marks the association end from which the referential attribute (which + appears in the other end, or which forms the identifier of the Association Class) + is taken.
@@ -664,7 +675,8 @@

Stereotypes

- Instance operations to be called during teardown (in unit test) are marked with the stereotype «teardown». + Instance operations to be called during teardown (in unit test) are marked with the + stereotype «teardown».
@@ -678,7 +690,8 @@

Stereotypes

- Specifies that the datatype is an unsigned type, with modulus stated in the accompanying {mod} tag. + Specifies that the datatype is an unsigned type, with modulus stated in the accompanying + {mod} tag. @@ -725,37 +738,33 @@

Tags

- + - + - + + - + + @@ -765,21 +774,22 @@

Tags

- + - + - + @@ -789,17 +799,18 @@

Tags

- + - + - + @@ -814,7 +825,8 @@

Tags

- + @@ -824,8 +836,7 @@

Tags

- + @@ -867,85 +878,76 @@

Types

- + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
abbreviationNormally the abbreviation of a class's name is formed from the initial letters of the words in the name. If there's only one - word, it's formed by prepending "A_" or "An". This tag allows the modeller to override this, if the default behaviour leads - to aliasing. - Normally the abbreviation of a class's name is formed from the initial letters of + the words in the name. If there's only one word, it's formed by prepending "A_" or + "An". This tag allows the modeller to override this, if the default behaviour leads + to aliasing. abbreviation
access-to-typeNames the type to which the marked type is an access; it must be a domain type, not one of those that ColdFrame defines (such - as Integer).
Mandatory. -
Names the type to which the marked type is an access; it must be a domain type, not + one of those that ColdFrame defines (such as Integer).
Mandatory.
access
association-name *deprecated* - - This tag is used to specify the name to be used for the association part of an AssociationClass. If not supplied, the name - used is the AssociationClass name. - This tag is used to specify the name to be used for the association part of an AssociationClass. + If not supplied, the name used is the AssociationClass name. association-class-naming
class-name *deprecated* - - This tag is used to specify the name to be used for the class part of an AssociationClass. If neither this tag nor {association-name} - is supplied, the name used is formed by appending "_Class" to the AssociationClass name. - This tag is used to specify the name to be used for the class part of an AssociationClass. + If neither this tag nor {association-name} is supplied, the name used is formed by + appending "_Class" to the AssociationClass name. association-class-naming
formalizesThe marked identifying attribute suffices to formalize the named association. It must be the name of the class at the other - end of the association. - The marked identifying attribute suffices to formalize the named association. It must + be the name of the class at the other end of the association. id
hashSpecifies how a renamed type is to be hashed. Currently the only supported styles are:
* 'discrete', which will work for imported enumerations or integer ranges but not for private or access types, and
* 'enumeration', which is similar but acts as a code generation optimization directive. -
Specifies how a renamed type is to be hashed. Currently the only supported styles + are:
* 'discrete', which will work for imported enumerations or integer ranges but not + for private or access types, and
* 'enumeration', which is similar but acts as a code generation optimization directive.
renaming
hashSpecifies how an imported type is to be hashed. Currently the only supported styles are:
* 'discrete', which will work for imported enumerations or integer ranges but not for private or access types, and
* 'enumeration', which is similar but acts as a code generation optimization directive. -
Specifies how an imported type is to be hashed. Currently the only supported styles + are:
* 'discrete', which will work for imported enumerations or integer ranges but not + for private or access types, and
* 'enumeration', which is similar but acts as a code generation optimization directive.
imported
languageSpecifies the programming language whose conventions are to be used in the translation; mandatory.Specifies the programming language whose conventions are to be used in the translation; + mandatory. convention
lengthSpecifies the maximum length of the «bounded-string» string.Specifies the maximum length of the «bounded-string» string. bounded-string
lengthSpecifies the length of the «fixed-string» string.Specifies the length of the «fixed-string» string. fixed-string
modIf the value is m, the tagged «unsigned type» is to be able to store values 0 .. m - 1.If the value is m, the tagged «unsigned type» is to be able to store values 0 .. m + - 1. unsigned
nameThe Ada package name to be used, if not the default (the UML package name).
Should match the name of the parent «domain» package. -
The Ada package name to be used, if not the default (the UML package name).
Should match the name of the parent «domain» package.
domain-interface
AutonumberUsed for automatically-generated instance identifiers.
For Ada, translates to Long_Long_Integer (typically 64-bits). -
Used for automatically-generated instance identifiers.
For Ada, translates to Long_Long_Integer (typically 64-bits).
BooleanThe standard boolean type.
Corresponds directly to the Ada Boolean. -
The standard boolean type.
Corresponds directly to the Ada Boolean.
CharacterThe standard character type.
Corresponds directly to the Ada Character. -
The standard character type.
Corresponds directly to the Ada Character.
CounterpartUsed for references to instances in other domains (but see «counterpart»).Used for references to instances in other domains (but see «counterpart»).
DateMay correspond to a calendar date, but for Ada translates to ColdFrame.Project.Calendar.Time (the same as Time).May correspond to a calendar date, but for Ada translates to ColdFrame.Project.Calendar.Time + (the same as Time).
DurationA time interval.
Corresponds directly to the Ada Duration. -
A time interval.
Corresponds directly to the Ada Duration.
FloatThe standard short float type.
Corresponds directly to the Ada Float. -
The standard short float type.
Corresponds directly to the Ada Float.
IntegerThe standard integer type.
Corresponds directly to the Ada Integer. -
The standard integer type.
Corresponds directly to the Ada Integer.
Long_FloatThe standard long float type.
Corresponds directly to the Ada Long_Float. -
The standard long float type.
Corresponds directly to the Ada Long_Float.
NaturalAn integer, constrained to be greater than or equal to zero.
Corresponds directly to the Ada Natural. -
An integer, constrained to be greater than or equal to zero.
Corresponds directly to the Ada Natural.
PositiveAn integer, constrained to be greater than zero.
Corresponds directly to the Ada Positive. -
An integer, constrained to be greater than zero.
Corresponds directly to the Ada Positive.
RealA floating-point value.
For Ada, translates to Float. -
A floating-point value.
For Ada, translates to Float.
StringA fixed-length character string, normally used as an operation parameter, when it has the length of the actual. Can only be - used for an attribute if the attribute is given an initial value.
Corresponds directly to the Ada String.
A fixed-length character string, normally used as an operation parameter, when it + has the length of the actual. Can only be used for an attribute if the attribute is + given an initial value.
Corresponds directly to the Ada String.
TextAn unbounded string.
For Ada, translates to Ada.Strings.Unbounded.Unbounded_String. -
An unbounded string.
For Ada, translates to Ada.Strings.Unbounded.Unbounded_String.
TimeMay correspond to a time-of-day, but for Ada translates to ColdFrame.Project.Calendar.Time (the same as Date).May correspond to a time-of-day, but for Ada translates to ColdFrame.Project.Calendar.Time + (the same as Date).
TimerUsed mainly for timeouts in state machines.
A timer can hold at most one event, which is to be released at some future time but which can be cancelled or revoked. -
Used mainly for timeouts in state machines.
A timer can hold at most one event, which is to be released at some future time but + which can be cancelled or revoked.
Unbounded_StringA variable-length string.
Corresponds directly to Ada.Strings.Unbounded.Unbounded_String. -
A variable-length string.
Corresponds directly to Ada.Strings.Unbounded.Unbounded_String.
diff --git a/Digital_IO.html b/Digital_IO.html index f523a38a..33cc7f44 100644 --- a/Digital_IO.html +++ b/Digital_IO.html @@ -1,9 +1,9 @@ - - Digital_IO + + Digital_IO

Digital_IO

Copyright (C) Simon Wright <simon@pushface.org>

-

This package is free software; you can redistribute it and/or modify it under terms of the GNU General Public License - as published by the Free Software Foundation; either version 2, or (at your option) any later version. This package - is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should - have received a copy of the GNU General Public License distributed with this package; see file COPYING. If not, - write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -

-

Contains the input-output domain Digital_IO for ColdFrame's House Management demonstration.

+

This package is free software; you can redistribute it and/or modify it + under terms of the GNU General Public License as published by the Free Software + Foundation; either version 2, or (at your option) any later version. This package + is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. You should have + received a copy of the GNU General Public License distributed with this package; + see file COPYING. If not, write to the Free Software Foundation, 59 Temple Place + - Suite 330, Boston, MA 02111-1307, USA.

+

Contains the input-output domain Digital_IO for ColdFrame's House Management + demonstration.

Contents

-

All classes

Class diagram for Digital_IO

Types

+

All classes

Class diagram for Digital_IO

Types

-
+

Types

Implementation_Class_P

-

This type is a class-wide pointer to the abstract type Implementation; the required concrete bottom half calls - Register to connect itself to the top half. -

-

Imported from Digital_IO_Support. -

+

This type is a class-wide pointer to the abstract type Implementation; the + required concrete bottom half calls Register to connect itself to the top half.

+

Imported from Digital_IO_Support.

Implementation_Class_P has operations:

Register
@@ -89,12 +91,10 @@

Implementation_Class_P

Input_Signal

Numbers the input (switch) signal pins.

-

A constrained version of Integer from 0 to 15. -

+

A constrained version of Integer from 0 to 15.

Input_Signal has operations:

-
Get returns Boolean -
+
Get returns Boolean

Returns the current state of the input signal for pin S.

Parameters:

@@ -105,7 +105,8 @@

Input_Signal

Input_Signal_State

-

Provides application domains with callback facilities for input signal state changes.

+

Provides application domains with callback facilities for input signal state + changes.

Callback support is provided.

A record type, with attributes:

@@ -120,8 +121,7 @@

Input_Signal_State

Output_Signal

Numbers the output (lamp) signal pins.

-

A constrained version of Integer from 0 to 15. -

+

A constrained version of Integer from 0 to 15.

Output_Signal has operations:

Set
diff --git a/House_Management.html b/House_Management.html index aa6bdbd1..07e73203 100644 --- a/House_Management.html +++ b/House_Management.html @@ -1,9 +1,9 @@ - - House_Management + + House_Management

House_Management

Copyright (C) Simon Wright <simon@pushface.org>

-

This package is free software; you can redistribute it and/or modify it under terms of the GNU General Public License - as published by the Free Software Foundation; either version 2, or (at your option) any later version. This package - is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should - have received a copy of the GNU General Public License distributed with this package; see file COPYING. If not, - write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -

+

This package is free software; you can redistribute it and/or modify it + under terms of the GNU General Public License as published by the Free Software + Foundation; either version 2, or (at your option) any later version. This package + is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. You should have + received a copy of the GNU General Public License distributed with this package; + see file COPYING. If not, write to the Free Software Foundation, 59 Temple Place + - Suite 330, Boston, MA 02111-1307, USA.

This domain represents an electronic household control system.

The first release only manages the stairwell lighting system.

Contents

-

All classes

- - - - - - - - - - - - - Class diagram for House_Management

Private Classes

+

All classes

Class diagram for House_Management

Private Classes

-
+

Private Classes

-

A1

- - - - - - - Context class diagram for A1

Eacb Button controls one or more Lamps; each Lamp is controlled by one or more Buttons.

-

There's no association-specific data, but this has to be an association class because it's a many-to-many relationship.

+

A1

Context class diagram for A1

Eacb Button controls one or more Lamps; each Lamp is controlled by one or more + Buttons.

+

There's no association-specific data, but this has to be an association + class because it's a many-to-many relationship.

This is an Association Class.

Roles

Button (1..n) Controls (1..n) Lamp

Lamp (1..n) Is_Controlled_By (1..n) Button

-

Button

- - - - - - - - - - Context class diagram for Button

There are one or more pushbuttons on each landing. Each pushbutton controls a number of Lamps; if any of the controlling - Buttons is set, the controlled Lamp is lit. -

+

Button

Context class diagram for Button

There are one or more pushbuttons on each landing. Each pushbutton controls + a number of Lamps; if any of the controlling Buttons is set, the controlled + Lamp is lit.

Supertype in Button. - -

+

Identifying attributes

Name : Button_Name
-

Each Button is uniquely identified by its name. The name corresponds to the geographical location of the button.

+

Each Button is uniquely identified by its name. The name corresponds to the + geographical location of the button.

Private class operations

Changed
-

Acts as receiver of state changes from Digital IO, via Signal State Callback. Calls the instance Changed so the Button - can take the appropriate action. -

+

Acts as receiver of state changes from Digital IO, via Signal State Callback. + Calls the instance Changed so the Button can take the appropriate action.

Parameters:

S : in Input_Signal_State
@@ -149,8 +123,7 @@

Private class operations

Public instance operations

-
Get_State, abstract returns Boolean -
+
Get_State, abstract returns Boolean

Protected instance operations

@@ -162,8 +135,7 @@

Protected instance operations

Private instance operations

-
Changed, abstract -
+
Changed, abstract

Called to indicate that the Button has been pushed or released.

Parameters:

@@ -177,23 +149,20 @@

Associations

-

Lamp

- - - - Context class diagram for Lamp

There is a lamp between each pair of landings.

-

A Lamp is connected to one or more Buttons; it is lit if any of the connected Buttons is set.

+

Lamp

Context class diagram for Lamp

There is a lamp between each pair of landings.

+

A Lamp is connected to one or more Buttons; it is lit if any of the + connected Buttons is set.

Identifying attributes

Name : Lamp_Name
-

Each Lamp is uniquely identified by its name. The name corresponds to the geographical location of the lamp.

+

Each Lamp is uniquely identified by its name. The name corresponds to the + geographical location of the lamp.

Private class operations

-
Initialize, class initialization -
+
Initialize, class initialization

This operation initializes the Lamps and Buttons.

@@ -202,9 +171,9 @@

Public instance operations

Changed
-

This operation is used by a linked Button to tell the Lamp to evaluate all its linked Buttons to see if any are Set - (in which case the Lamp should be lit) or all are Reset (in which case the Lamp should be off). -

+

This operation is used by a linked Button to tell the Lamp to evaluate all + its linked Buttons to see if any are Set (in which case the Lamp should be + lit) or all are Reset (in which case the Lamp should be off).

Private instance operations

@@ -218,20 +187,17 @@

Associations

-

Timed_Button

- - - - Context class diagram for Timed_Button

When a Timed Button is pushed, it remains set for a preset period.

-

If it is pushed again while it is still set, the set period is extended by the preset period.

+

Timed_Button

Context class diagram for Timed_Button

When a Timed Button is pushed, it remains set for a preset period.

+

If it is pushed again while it is still set, the set period is extended + by the preset period.

Subtype of Button in Button. - -

+

Normal attributes

Timeout : Timer
-

This ColdFrame Timer is used to reset the Button at the end of its activation period.

+

This ColdFrame Timer is used to reset the Button at the end of its activation + period.

States

@@ -290,18 +256,20 @@

State-Event Matrix

State Diagram

State diagram for House_Management.Timed_Button

Public instance operations

-
Get_State returns Boolean -
+
Get_State returns Boolean
-

This overriding implementation returns the current state of the Timed Button (True => on)

+

This overriding implementation returns the current state of the Timed Button + (True => on)

Protected instance operations

Changed
-

This overriding implementation is called to indicate that the Button has been pushed or released.

-

For this kind of Button, actions a Button_Pushed event in case of a push; a release is ignored.

+

This overriding implementation is called to indicate that the Button has + been pushed or released.

+

For this kind of Button, actions a Button_Pushed event in case of + a push; a release is ignored.

Parameters:

Pushed : in Boolean
@@ -317,17 +285,13 @@

Private instance operations

Set_Timeout
-

This state entry action sets the instance Timeout to the required activation period.

+

This state entry action sets the instance Timeout to the required activation + period.

-

Toggle_Button

- - - - Context class diagram for Toggle_Button

A Toggle Button is a push-on, push-off toggle.

+

Toggle_Button

Context class diagram for Toggle_Button

A Toggle Button is a push-on, push-off toggle.

Subtype of Button in Button. - -

+

Normal attributes

On : Boolean, initial value False
@@ -335,18 +299,20 @@

Normal attributes

Public instance operations

-
Get_State returns Boolean -
+
Get_State returns Boolean
-

This overriding implementation returns the current state of the Toggle Button (from On)

+

This overriding implementation returns the current state of the Toggle Button + (from On)

Protected instance operations

Changed
-

This overriding implementation is called to indicate that the Button has been pushed or released.

-

For this kind of Button, toggles On in case of a push; a release is ignored.

+

This overriding implementation is called to indicate that the Button has + been pushed or released.

+

For this kind of Button, toggles On in case of a push; a release + is ignored.

Notifies connected lamps of the change.

Parameters:

@@ -379,13 +345,12 @@

Button_Name

  • Second_Floor_Toggle
  • Input_Signal_State

    -

    This type is used by the supporting Digital IO domain to report input (switch) state changes.

    -

    Imported from Digital_IO. -

    +

    This type is used by the supporting Digital IO domain to report input (switch) + state changes.

    +

    Imported from Digital_IO.

    Lamp_Name

    -

    There is a lamp beween each pair of landings. This type names the lamps; the name is that of the landing on whose ceiling - the lamp is fixed. -

    +

    There is a lamp beween each pair of landings. This type names the lamps; the + name is that of the landing on whose ceiling the lamp is fixed.

    An enumeration, with literals:

    Output_Signal

    This type is used by the supporting Digital IO domain to name outputs (lamps).

    -

    Imported from Digital_IO. -

    +

    Imported from Digital_IO.

    Timed_Button_Name

    -

    Some of the pushbuttons are 'timed', that is, the electrical connection is made for a period after the button is pushed. - If the button is pushed again before the period expires, the made period is extended. -

    -

    A constrained version of Button_Name from Basement_Timed to Second_Floor_Timed. -

    +

    Some of the pushbuttons are 'timed', that is, the electrical connection is + made for a period after the button is pushed. If the button is pushed again + before the period expires, the made period is extended.

    +

    A constrained version of Button_Name from Basement_Timed to Second_Floor_Timed.

    Toggle_Button_Name

    -

    Some of the pushbuttons are 'toggled', that is, the electrical connection is made when the button is pushed, and remains - made until the Button is pushed again. -

    -

    A constrained version of Button_Name from Basement_Toggle to Second_Floor_Toggle. -

    +

    Some of the pushbuttons are 'toggled', that is, the electrical connection is + made when the button is pushed, and remains made until the Button is pushed + again.

    +

    A constrained version of Button_Name from Basement_Toggle to Second_Floor_Toggle.

    \ No newline at end of file diff --git a/House_Management.images/House_Management.A1.class.cmapx b/House_Management.images/House_Management.A1.class.cmapx index 58e31ba4..7f0d29c7 100644 --- a/House_Management.images/House_Management.A1.class.cmapx +++ b/House_Management.images/House_Management.A1.class.cmapx @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/House_Management.images/House_Management.A1.class.png b/House_Management.images/House_Management.A1.class.png index 01f66344..a4c3cb69 100644 Binary files a/House_Management.images/House_Management.A1.class.png and b/House_Management.images/House_Management.A1.class.png differ diff --git a/House_Management.images/House_Management.Button.class.cmapx b/House_Management.images/House_Management.Button.class.cmapx index d0377766..44df57d7 100644 --- a/House_Management.images/House_Management.Button.class.cmapx +++ b/House_Management.images/House_Management.Button.class.cmapx @@ -1,12 +1,12 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/House_Management.images/House_Management.Button.class.png b/House_Management.images/House_Management.Button.class.png index 975bc879..1ba4eead 100644 Binary files a/House_Management.images/House_Management.Button.class.png and b/House_Management.images/House_Management.Button.class.png differ diff --git a/House_Management.images/House_Management.Lamp.class.cmapx b/House_Management.images/House_Management.Lamp.class.cmapx index 9025b4ff..7188ab07 100644 --- a/House_Management.images/House_Management.Lamp.class.cmapx +++ b/House_Management.images/House_Management.Lamp.class.cmapx @@ -1,6 +1,6 @@ - - - - + + + + diff --git a/House_Management.images/House_Management.Lamp.class.png b/House_Management.images/House_Management.Lamp.class.png index 18c0f219..3fb07513 100644 Binary files a/House_Management.images/House_Management.Lamp.class.png and b/House_Management.images/House_Management.Lamp.class.png differ diff --git a/House_Management.images/House_Management.Timed_Button.class.cmapx b/House_Management.images/House_Management.Timed_Button.class.cmapx index 37a9e5b1..6ef93af8 100644 --- a/House_Management.images/House_Management.Timed_Button.class.cmapx +++ b/House_Management.images/House_Management.Timed_Button.class.cmapx @@ -1,6 +1,6 @@ - - - - + + + + diff --git a/House_Management.images/House_Management.Timed_Button.class.png b/House_Management.images/House_Management.Timed_Button.class.png index 693aee75..b80cf85f 100644 Binary files a/House_Management.images/House_Management.Timed_Button.class.png and b/House_Management.images/House_Management.Timed_Button.class.png differ diff --git a/House_Management.images/House_Management.Timed_Button.state.png b/House_Management.images/House_Management.Timed_Button.state.png index 46303da6..d4e2778f 100644 Binary files a/House_Management.images/House_Management.Timed_Button.state.png and b/House_Management.images/House_Management.Timed_Button.state.png differ diff --git a/House_Management.images/House_Management.Toggle_Button.class.cmapx b/House_Management.images/House_Management.Toggle_Button.class.cmapx index e4ff32d4..dbc6f97d 100644 --- a/House_Management.images/House_Management.Toggle_Button.class.cmapx +++ b/House_Management.images/House_Management.Toggle_Button.class.cmapx @@ -1,6 +1,6 @@ - - - - + + + + diff --git a/House_Management.images/House_Management.Toggle_Button.class.png b/House_Management.images/House_Management.Toggle_Button.class.png index c3d7b445..6f3008f7 100644 Binary files a/House_Management.images/House_Management.Toggle_Button.class.png and b/House_Management.images/House_Management.Toggle_Button.class.png differ diff --git a/House_Management.images/House_Management.overall.cmapx b/House_Management.images/House_Management.overall.cmapx index 44d981ef..9782a0ef 100644 --- a/House_Management.images/House_Management.overall.cmapx +++ b/House_Management.images/House_Management.overall.cmapx @@ -1,15 +1,15 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/House_Management.images/House_Management.overall.png b/House_Management.images/House_Management.overall.png index c849ee59..e72498cb 100644 Binary files a/House_Management.images/House_Management.overall.png and b/House_Management.images/House_Management.overall.png differ diff --git a/house-2.gif b/house-2.gif deleted file mode 100644 index 674c8af8..00000000 Binary files a/house-2.gif and /dev/null differ diff --git a/house-2.png b/house-2.png new file mode 100644 index 00000000..014b5728 Binary files /dev/null and b/house-2.png differ diff --git a/self-events.png b/self-events.png index f6bbef06..09d9e2d9 100644 Binary files a/self-events.png and b/self-events.png differ diff --git a/textuml.pdf b/textuml.pdf index b3a9c737..91f2a7ba 100644 Binary files a/textuml.pdf and b/textuml.pdf differ diff --git a/use-cases.html b/use-cases.html index c153c472..0d509201 100644 --- a/use-cases.html +++ b/use-cases.html @@ -1,379 +1,336 @@ - + + + + Use Cases for Code Generation - - - - - - - - - -
    -


    - -Next: , -Previous: (dir), -Up: (dir) - -
    - -

    Code Generation

    - - -

    --- The Detailed Node Listing --- - -

    Instances - -

    - -

    Associations - -

    - -

    Inheritance relationships -

    - -

    Glossary + -

    - +
    + +

    Code Generation

    - -
    -


    - -Next: , -Previous: Top, -Up: Top + +
    +
    + - -

    1 Introduction

    +

    1 Introduction

    When code is automatically generated from a model (in the present case, a UML model), there are two approaches: - -

    -
    Use a Design Model
    -A design model is derived from an analysis model by adding support +

    +
    +
    Use a Design Model
    +
    +

    A design model is derived from an analysis model by adding support classes to map the analysis model to the Software Architecture -(see Software Architecture). An example would be a container for all +(see Software Architecture). An example would be a container for all the instances of a given class. - -

    A tool which uses this approach is Rational Rose. - -

    Use an Analysis model
    -An analysis model contains classes and relationships that are part of +

    +

    A tool which uses this approach is Rational Rose. +

    +
    +
    Use an Analysis model
    +
    +

    An analysis model contains classes and relationships that are part of the subject matter of the analyzed subsystem. Code which supports the execution of the model (for example, navigation from an instance of one class through an association to find the set of corresponding instances of another class) is automatically generated. - -

    Tools which use this approach include Software through Pictures from -Aonix, Rhapsody from I-Logix, xUML from -Abstract Solutions (was +

    +

    Tools which use this approach include Software through Pictures from +Aonix, Rhapsody from I-Logix, xUML from +Abstract Solutions (was Kennedy-Carter), BridgePoint from -Mentor Graphics +Mentor Graphics (was Project Technology; now open-sourced), and the present project. +

    +
    +
    -
    - -

    Automatically-generated support code comes in several flavours: - -

    -
    Explicitly-generated
    -The code generation process writes out new code. An example is the +

    Automatically-generated support code comes in several flavours: +

    +
    +
    Explicitly-generated
    +
    +

    The code generation process writes out new code. An example is the creation of a record structure to correspond to instance attributes. +

    +
    +
    Instantiation
    +
    +

    The new code is an instantiation of an existing generic component. +

    +
    +
    Derivation
    +
    +

    The new code is an extension of an existing (base) component. +

    +
    +
    -
    Instantiation
    -The new code is an instantiation of an existing generic component. - -
    Derivation
    -The new code is an extension of an existing (base) component. - -
    - -

    This set of Use Cases (well, that's what I'm calling them!) covers the -requirements to be met by the Software Architecture (see Software Architecture), particularly by supporting components. - -

    The Actor concerned is the analyst who specifies the logic of operations +

    This set of Use Cases (well, that’s what I’m calling them!) covers the +requirements to be met by the Software Architecture (see Software Architecture), particularly by supporting components. +

    +

    The Actor concerned is the analyst who specifies the logic of operations or actions. The programmer who implements these specifications (or, in an advanced tool such as iUML or BridgePoint, implements the mechanisms which provide full translation) is, rather, concerned with building components to meet the requirements expressed here, and (eventually) with using them. - -

    No distinction is made at this point between generic and base +

    +

    No distinction is made at this point between generic and base components. +

    - -
    -


    - -Next: , -Previous: Introduction, -Up: Top +
    +
    + +

    2 General considerations

    -

    2 General considerations

    - -

    It isn't possible to maintain all the invariants of the model (for +

    It isn’t possible to maintain all the invariants of the model (for example, constraints on relationships) within any given operation; on the other hand, the analyst must not allow any operation to complete with the model in an inconsistent state. +

    - -
    -


    - -Next: , -Previous: General considerations, -Up: Top +
    - -

    3 Instances

    +
    + +

    3 Instances

    The existence of an Instance must be independent of how many copies of its data are held. One possibility is to have the Class be responsible for the existence of Instances. +

    -