YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
template_res.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6#ifndef TEMPLATE_RES
7#define TEMPLATE_RES
8
9#include <string>
10
11static const std::string str_app_template =
12" <application>\n"
13" <!-- Generic information-->\n"
14" <name>ApplicationName</name>\n"
15" <description>Template Application</description>\n"
16" <version></version>\n"
17"\n"
18" <authors>\n"
19" <author email=\"\"> author.name </author>\n"
20" </authors>\n"
21"\n"
22" <!-- Required modules -->\n"
23" <module>\n"
24" <name>Module_Name</name>\n"
25" <parameters></parameters>\n"
26" <node></node>\n"
27" <stdio></stdio>\n"
28" <prefix></prefix>\n"
29" </module>\n"
30"\n"
31" <!-- Embedded applications -->\n"
32" <application>\n"
33" <name>Application_Name</name>\n"
34" <prefix></prefix>\n"
35" </application>\n"
36"\n"
37" <!-- Required connections -->\n"
38" <connection>\n"
39" <from></from>\n"
40" <to></to>\n"
41" <protocol></protocol>\n"
42" </connection>\n"
43"\n"
44" </application>\n";
45
46static const std::string str_mod_template =
47"<module>\n"
48" <!-- module's name should match its executable file's name. -->\n"
49" <name>module_name</name>\n"
50" <description>Template module</description>\n"
51" <version>1.0</version>\n"
52"\n"
53" <!-- <arguments> can have multiple <param> tags-->\n"
54" <arguments>\n"
55" <param desc=\"first parameter\"> param1 </param>\n"
56" </arguments>\n"
57"\n"
58" <!-- <authors> can have multiple <author> tags. -->\n"
59" <authors>\n"
60" <author email=\"\"> author1 </author>\n"
61" </authors>\n"
62"\n"
63" <!-- <data> can have multiple <input> or <output> tags. -->\n"
64" <data>\n"
65" <!-- input data if available-->\n"
66" <input>\n"
67" <!-- <type> refers to nominal type of data (e.g. ImageFrame, String). -->\n"
68" <type>DataType</type>\n"
69"\n"
70" <!-- input port which receive the data. -->\n"
71" <port carrier=\"tcp\">/portname</port>\n"
72"\n"
73" <!-- required input means the execution of module depends on\n"
74" this input data. Notice that not all the input are required\n"
75" for a module to perform its task (e.g. control input, status\n"
76" request input). -->\n"
77" <required>yes</required>\n"
78"\n"
79" <!-- priority forces the execution of module to be delayed\n"
80" until the required data becomes available on the port -->\n"
81" <priority>no</priority>\n"
82" <description></description>\n"
83" </input>\n"
84"\n"
85" <!-- output datas if available -->\n"
86" <output>\n"
87" <type>DataType</type>\n"
88" <port carrier=\"tcp\">/portname</port>\n"
89" <description></description>\n"
90" </output>\n"
91" </data>\n"
92"\n"
93" <!-- physical and logical resource dependencies can be introduced in this\n"
94" section. Dependencies must follow resource conceptional models. Currently\n"
95" available resource models are 'memory', 'processor', 'storage', 'network',\n"
96" 'yarp_port', 'platform' and 'gpu'. All resource dependencies should be introduced\n"
97" inside <computer></computer> tags. While resources described inside <computer>\n"
98" tags represent conjunctional dependency, resources from different <computer>\n"
99" tags can be seen as disjunctions. Meaning that If a module depend on either\n"
100" resource R1 or R2 they can be introduced inside two different <computer> tags.\n"
101" Resource dependencies should be introduced if they are really required. For\n"
102" example, if module's performance drops significantly in case of memory swapping,\n"
103" a memory resource dependency can be introduced with the required memory space. -->\n"
104" <dependencies>\n"
105" <computer>\n"
106" </computer>\n"
107" </dependencies>\n"
108"\n"
109" <!-- specific libraries or header files which are used for development -->\n"
110" <development>\n"
111" <header></header>\n"
112" <library></library>\n"
113" </development>\n"
114"\n"
115"</module>\n";
116
117static const std::string str_res_template =
118"<resources>\n"
119" <!-- Multiple computer descriptions can be introduced -->\n"
120" <computer>\n"
121" <name>hostname1</name>\n"
122" <description>Template resource</description>\n"
123"\n"
124" <!-- A disabled resource will not be used. -->\n"
125" <disable>no</disable>\n"
126"\n"
127" <!-- Platform, Memory, Storage, Processor and Network speceification\n"
128" will be discoverd automatically. But peripherals sush as GPU need to\n"
129" be specifically introduced. -->\n"
130" </computer>\n"
131"\n"
132"</resources>\n";
133
134
135
136#endif // TEMPLATE_RES
static const std::string str_res_template
static const std::string str_mod_template
static const std::string str_app_template