Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 796c4b898ad40dac54e08fb0fd9175e136d7a8f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Add a data class</title>
<link href="book.css" rel="stylesheet" type="text/css">
<meta content="DocBook XSL Stylesheets V1.75.1" name="generator">
<link rel="home" href="index.html" title="eTrice User Guide">
<link rel="up" href="TutorialSendingData.html" title="Tutorial Sending Data">
<link rel="prev" href="Createanewmodelfromscratch3.html" title="Create a new model from scratch">
<link rel="next" href="Createanewprotocol2.html" title="Create a new protocol">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Add a data class</h1>
<div class="section" title="Add a data class">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
<a name="Addadataclass"></a>Add a data class</h2>
</div>
</div>
</div>
<p>Position the cursor outside any class definition and right click the mouse within the editor window. From the context menu select 
				[<span class="citation">Content Assist</span>] (or Ctrl+Space).  
			</p>
<p>
				
</p>
<div class="mediaobject">
<img src="images/025-SendingData01.png"></div>
<p>
			
</p>
<p>Select 
				[<span class="citation">DataClass &ndash; data class skeleton</span>] and name it 
				[<span class="citation">DemoData</span>].
				Remove the operations and ass the following Attributes:
			</p>
<div class="literallayout">
<p>
<code class="code">	DataClass&nbsp;DemoData&nbsp;{<br>
		Attribute&nbsp;int32Val:&nbsp;int32&nbsp;=&nbsp;"4711"<br>
		Attribute&nbsp;int8Array&nbsp;[&nbsp;10&nbsp;]:&nbsp;int8&nbsp;=&nbsp;"{1,2,3,4,5,6,7,8,9,10}"<br>
		Attribute&nbsp;float64Val:&nbsp;float64&nbsp;=&nbsp;"0.0"<br>
		Attribute&nbsp;stringVal:&nbsp;string&nbsp;=&nbsp;"\"empty\""<br>
	}<br>

</code>
</p>
</div>
<div class="blockquote">
<blockquote class="blockquote">
<p></p>
</blockquote>
</div>
<p>Save the model and visit the outline view.
				Note that the outline view contains all data elements as defined in the model. </p>
</div>
</body>
</html>

Back to the top