Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
59d9e0ba
Commit
59d9e0ba
authored
Apr 15, 2010
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CHANGE] - some doc in the template module concerning information properties.
parent
a00f9cd6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/modules/template/WMTemplate.cpp
src/modules/template/WMTemplate.cpp
+4
-2
No files found.
src/modules/template/WMTemplate.cpp
View file @
59d9e0ba
...
...
@@ -243,7 +243,9 @@ void WMTemplate::properties()
// Later on, we will use this property to provide the number of run cycles to the user.
// In more detail, the purpose type of the property gets set to PV_PURPOSE_INFORMATION automatically by m_infoProperties. You can, of course,
// add information properties to your custom groups or m_properties too. There, you need to set the purpose flag of the property manually:
m_aStringOutput
=
m_group1a
->
addProperty
(
"Hello World in C"
,
"The hello world command in C."
,
std
::
string
(
"printf(
\"
Hello World!
\"
);"
)
);
std
::
string
message
=
std
::
string
(
"Hey you! Besides all these parameters, you also can print values, html formatted strings, colors and "
)
+
std
::
string
(
"so on using properties! Isn't it <b>amazing</b>?"
);
m_aStringOutput
=
m_group1a
->
addProperty
(
"A Message"
,
"A message to the user."
,
message
);
m_aStringOutput
->
setPurpose
(
PV_PURPOSE_INFORMATION
);
// This adds the property m_aStringOutput to your group and sets its purpose. The default purpose for all properties is always
// "PV_PURPOSE_PARAMETER". It simply denotes the meaning of the property - its meant to be used as modifier for the module's behaviour; a
...
...
@@ -293,7 +295,7 @@ void WMTemplate::moduleMain()
debugLog
()
<<
"Waiting ..."
;
m_moduleState
.
wait
();
// As you might remember, this property is a
information property to provide the number of run cycles to the outside world. It wont
't be
// As you might remember, this property is a
n information property to provide the number of run cycles to the outside world. It won
't be
// modified but the module can modify it. This is useful to provide statistics, counts, times or even a "hello world" string to the user
// as an information or status report. Please do not abuse these information properties as progress indicators. A short overview on how
// to make progress indicators is provided some lines below. Here, we simply increase the value.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment