DDS - Visu
DDS - Visu
DDS - Visu
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>DDS</strong> – Advanced Training<br />
© All rights with <strong>Visu</strong>-IT! GmbH, also for pending patent applications.<br />
All powers of disposition, such as copying and distribution, from <strong>Visu</strong>-IT!<br />
<strong>DDS</strong> – Advanced Training<br />
Representation Model Configuration<br />
<strong>DDS</strong><br />
Data<br />
Declaration<br />
System<br />
Franz Lohberger<br />
Jun-05<br />
Page: 1
<strong>DDS</strong> – Advanced Training<br />
© All rights with <strong>Visu</strong>-IT! GmbH, also for pending patent applications.<br />
All powers of disposition, such as copying and distribution, from <strong>Visu</strong>-IT!<br />
Representation Model Configuration<br />
Content<br />
Overview and Concept<br />
Mapping Scheme and Representation Model<br />
Configure mappingScheme and mappingElements<br />
The MappingScheme Wizard<br />
Objectives:<br />
After completing this unit you will:<br />
• know the concept of mappingSchemes<br />
• be able to choose the correct schemes for your model(s)<br />
Franz Lohberger<br />
Jun-05<br />
Page: 2
<strong>DDS</strong> – Advanced Training<br />
© All rights with <strong>Visu</strong>-IT! GmbH, also for pending patent applications.<br />
All powers of disposition, such as copying and distribution, from <strong>Visu</strong>-IT!<br />
Representation Model Configuration<br />
Overview<br />
• What is a representation model? Why is a representation<br />
model needed?<br />
<strong>DDS</strong> mappingScheme<br />
C-code<br />
model<br />
ASAP2<br />
Record-Layout<br />
• The <strong>DDS</strong> model must cover both the C-code model and<br />
the ASAP2 model<br />
Franz Lohberger<br />
Jun-05<br />
Page: 3
<strong>DDS</strong> – Advanced Training<br />
© All rights with <strong>Visu</strong>-IT! GmbH, also for pending patent applications.<br />
All powers of disposition, such as copying and distribution, from <strong>Visu</strong>-IT!<br />
Representation Model Configuration<br />
How does a map look like in the C-Code?<br />
(A) with ‚global‘ axis<br />
header file<br />
extern const int myMap[6];<br />
source file<br />
const int myMap[6] = {1,2,3,4,5,6};<br />
(B) with ‚global‘ axis and axisSize field<br />
header file<br />
extern const int myMap[1+6];<br />
source file<br />
const int myMap[1+6] =<br />
{6,<br />
1,2,3,4,5,6};<br />
(C) with ‚local‘ axis (map is an array, values are<br />
alternating)<br />
header file<br />
extern const int myMap[6][2];<br />
source file<br />
const int myMap[6][2] = {<br />
{256,1},<br />
{512,2},<br />
{768,3},<br />
{1024,4},<br />
{1280,5},<br />
{1536,6}};<br />
(D) with ‚local‘ axis (map is an array)<br />
header file<br />
extern const int myMap[1+6+6];<br />
source file<br />
const int myMap[1+6+6] =<br />
{6,<br />
256,512,768,1024,1280,1536,<br />
1,2,3,4,5,6};<br />
(E) with ‚local‘ axis (map is a structure)<br />
header file<br />
extern const struct myMap_STRUCT {<br />
int xSize;<br />
int xDist[6];<br />
int values[6];<br />
} myMap;<br />
source file<br />
const struct myMap_STRUCT myMap =<br />
{6,<br />
{256,512,768,1024,1280,1536},<br />
{1,2,3,4,5,6}};<br />
etc.<br />
Franz Lohberger<br />
Jun-05<br />
Page: 4
<strong>DDS</strong> – Advanced Training<br />
© All rights with <strong>Visu</strong>-IT! GmbH, also for pending patent applications.<br />
All powers of disposition, such as copying and distribution, from <strong>Visu</strong>-IT!<br />
Representation Model Configuration<br />
Mapping Scheme & Representation Model<br />
Mapping Scheme for<br />
Parameters<br />
Mapping Scheme for<br />
Axis<br />
Mapping Scheme for<br />
Maps<br />
Mapping Scheme for<br />
Online Values<br />
Mapping Scheme for<br />
cBase definitions<br />
Franz Lohberger<br />
Jun-05<br />
Page: 5
<strong>DDS</strong> – Advanced Training<br />
© All rights with <strong>Visu</strong>-IT! GmbH, also for pending patent applications.<br />
All powers of disposition, such as copying and distribution, from <strong>Visu</strong>-IT!<br />
Representation Model Configuration<br />
Mapping Scheme<br />
Special c-Code mapping for the datatype<br />
of the definition, e.g.<br />
always export the ‚builtin‘ dataType (even<br />
if there is a typedef ‚chain‘ in <strong>DDS</strong>)<br />
Important flags which influence the appearance of<br />
the data in the C-Code and/or in the ASAP2 file:<br />
The attributes isValBlk, isAscii and isLibbit are only<br />
allowed for arrays of online, parameter, and cBase.<br />
These trigger another handling of the init values for<br />
these arrays.<br />
The attribute isAlternate makes only sense for<br />
map's with an embedded axis and means that the<br />
values for the axis and for the map alternate.<br />
The attribute byRows makes only sense for map's<br />
with at least two axis and means that the values<br />
corresponding the axis are exchanged. For a map<br />
with two axis with size 3 and 5 the map values are a<br />
map of size [5,3] not [3,5].<br />
The attribute isEmbedded makes only sense for<br />
axes. Axes with a mapping scheme that has that<br />
attribute set are contained in the memory of their<br />
corresponding map and are embedded.<br />
There are two classes of memory layout's. The<br />
whole data structure is a C struct with members for<br />
the different parts of the memory layout or the<br />
whole data structure is an array and the members<br />
occupy different parts of this array. In the second<br />
case the attribute isArray is set to true.<br />
Franz Lohberger<br />
Jun-05<br />
Page: 6
<strong>DDS</strong> – Advanced Training<br />
© All rights with <strong>Visu</strong>-IT! GmbH, also for pending patent applications.<br />
All powers of disposition, such as copying and distribution, from <strong>Visu</strong>-IT!<br />
Representation Model Configuration<br />
Mapping Elements - Principle<br />
• A mapping scheme contains several (but at least one) mapping<br />
elements.<br />
• Usually, a mapping element corresponds to one ‚index‘-attribute of<br />
the ASAP2 RECORD_LAYOUT<br />
• The most important attribute of the mappingElement is the ‚kind‘<br />
attribute which controls the mapping to ASAP2:<br />
value of ‚kind‘ attribute of<br />
mappingElement<br />
values<br />
axisSize<br />
axisValues<br />
reserved<br />
...<br />
corresponding attribute of<br />
RECORD_LAYOUT<br />
FNC_VALUES<br />
NO_AXIS_PTS_‘x‘<br />
AXIS_PTS_‘x‘<br />
RESERVED<br />
...<br />
Franz Lohberger<br />
Jun-05<br />
Page: 7
<strong>DDS</strong> – Advanced Training<br />
© All rights with <strong>Visu</strong>-IT! GmbH, also for pending patent applications.<br />
All powers of disposition, such as copying and distribution, from <strong>Visu</strong>-IT!<br />
Representation Model Configuration<br />
Mapping Elements<br />
Most important attribute:<br />
Says what's the contents of the<br />
mappingElement: The values of<br />
the map or the axis, the size of<br />
the second axis or some<br />
unknown value<br />
Determines for what axis<br />
(1, 2, or 3) this axis<br />
specific element in the<br />
map will be used.<br />
axisNumber = -1 means:<br />
this element represents all<br />
axis.<br />
Special c-Code mapping<br />
for the datatype of the<br />
definition<br />
Name of the C struct<br />
member for this element.<br />
Only allowed for axis values<br />
and says that the axis values<br />
must be decreasing, normally<br />
they are increasing<br />
Select a<br />
mappingElement<br />
Only allowed for axis values and means that the axis values have room<br />
for fixAxisSize values regardless of the size of the axis. (The axis is only<br />
allowed to be smaller then fixAxisSize).<br />
Add a new<br />
mappingElemen<br />
t<br />
Modify current<br />
mappingElement<br />
DataType for this<br />
mappingElement. If the<br />
dataType is missing the<br />
elemType of the entity using this<br />
mappingScheme will be used<br />
Says that the value is not stored<br />
in this element but a pointer of<br />
the given size is stored in this<br />
element.<br />
Only allowed for map values<br />
and says that the array<br />
representing the map values<br />
has not size [2,3,4] for axis with<br />
length 2, 3, and 4 but size<br />
[2*3*4].<br />
Change order of<br />
mappingElements<br />
Franz Lohberger<br />
Jun-05<br />
Page: 8
<strong>DDS</strong> – Advanced Training<br />
© All rights with <strong>Visu</strong>-IT! GmbH, also for pending patent applications.<br />
All powers of disposition, such as copying and distribution, from <strong>Visu</strong>-IT!<br />
Representation Model Configuration<br />
Example<br />
Example:<br />
In <strong>DDS</strong>, there is the map ‚myMap‘ which<br />
- has the mappingScheme ‚myScheme‘ (see below) assigned<br />
- has the dataType ‚int‘ and the init-values ‚1‘, ‚2‘, ‚3‘, ‚4‘<br />
- has the embedded axis ‚someAxis‘ with the dataType ‚int‘ and the axisSize ‚4‘ assigned<br />
C-Code<br />
/* declaration (*.h) */<br />
extern struct myMap_STRUCT {<br />
int x;<br />
int y;<br />
} myMap[4];<br />
/* definition (*.c) */<br />
struct myMap_STRUCT myMap[4] =<br />
{<br />
{256, 1},<br />
{512, 2},<br />
{768, 3},<br />
{1024, 4}};<br />
Axis<br />
values<br />
Map<br />
values<br />
<strong>DDS</strong> mappingScheme<br />
mappingSchemeMap ‚myScheme‘ {<br />
displayName = { „my Scheme"; }<br />
alternate = true;<br />
mappingElements = (<br />
mappingElement {<br />
kind = axisValues;<br />
axisNumber = 1;<br />
memberName = "x";<br />
}<br />
mappingElement {<br />
kind = values;<br />
memberName = "y";<br />
}<br />
)<br />
}<br />
ASAP2 Record_Layout<br />
/begin RECORD_LAYOUT myScheme<br />
AXIS_PTS_X 1 SWORD INDEX_INCR<br />
DIRECT<br />
FNC_VALUES 2 SWORD<br />
ALTERNATE_WITH_X DIRECT<br />
/end RECORD_LAYOUT<br />
Franz Lohberger<br />
Jun-05<br />
Page: 9
<strong>DDS</strong> – Advanced Training<br />
© All rights with <strong>Visu</strong>-IT! GmbH, also for pending patent applications.<br />
All powers of disposition, such as copying and distribution, from <strong>Visu</strong>-IT!<br />
Representation Model Configuration<br />
The MappingScheme Wizard (1)<br />
The MappingScheme Wizard<br />
• gives an overview about the used <strong>DDS</strong> mapping schemes<br />
• gives the possibility to change the assigned mapping schemes in a consistent and<br />
convenient way<br />
The MappingScheme Wizard can be launched:<br />
• Automatically by the ASAP2 Import (in 'CodeMode‘)<br />
• By using the MappingScheme Wizard entry in the Project menu or the icon in the<br />
main toolbar (contains all entities)<br />
• Via the context menu (contains only entities within the current scope)<br />
Start the MappingScheme Wizard on<br />
the current database<br />
Franz Lohberger<br />
Jun-05<br />
Page: 10
<strong>DDS</strong> – Advanced Training<br />
© All rights with <strong>Visu</strong>-IT! GmbH, also for pending patent applications.<br />
All powers of disposition, such as copying and distribution, from <strong>Visu</strong>-IT!<br />
Representation Model Configuration<br />
The MappingScheme Wizard (2)<br />
List of available<br />
mapping schemes<br />
Step 1: select a<br />
mapping scheme<br />
Step 2: select those<br />
entities (of the current mapping<br />
scheme) which should be assigned<br />
to another compatible mapping<br />
scheme<br />
Step 3: Drag and Drop<br />
the selected entities to<br />
a compatible mapping<br />
scheme<br />
Franz Lohberger<br />
Jun-05<br />
Page: 11
<strong>DDS</strong> – Advanced Training<br />
© All rights with <strong>Visu</strong>-IT! GmbH, also for pending patent applications.<br />
All powers of disposition, such as copying and distribution, from <strong>Visu</strong>-IT!<br />
Representation Model Configuration<br />
Summary<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
__________________________________________________<br />
Franz Lohberger<br />
Jun-05<br />
Page: 12