26 #include "../../DSM/SyntaxTree.h"
48 if (pGOPPRR ==
nullptr)
62 if (p->second.m_Type ==
"IsExternal" && p->second.m_Value ==
"T")
83 ::std::time_t Now = ::std::chrono::system_clock::to_time_t(::std::chrono::system_clock::now());
94 if (pGOPPRR ==
nullptr)
105 VMID = pRootGraph->
m_ID;
108 while (VMID.find(
" ") != std::string::npos)
111 VMID.replace(VMID.find(
" "), 1,
"_");
117 "# Copyright (C) 2010-2012\n"
118 "# Johannes Feuser <feuser@uni-bremen.de>\n"
119 "# This file is part of the openETCS project\n"
121 "# The openETCS library is free software: you can redistribute it and/or modify\n"
122 "# it under the terms of the GNU General Public License as published by\n"
123 "# the Free Software Foundation, either version 3 of the License, or\n"
124 "# any later version.\n"
126 "# The openETCS library is distributed in the hope that it will be useful,\n"
127 "# but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
128 "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
129 "# GNU General Public License for more details.\n"
131 "# You should have received a copy of the GNU General Public License\n"
132 "# along with the openETCS library. If not, see <http://www.gnu.org/licenses/>.\n"
134 "# Xen configuration file for the EVC PIM virtual machine/DomU\n"
135 "# generated for openETCS EVC by VM configuration generator\n"
136 "# time point (UTC) of generation: " << ::std::asctime(::std::gmtime(&Now)) <<
"\n"
138 "kernel = \"/boot/<xen-kernel-image>\" # <...> must be replaced\n"
139 "ramdisk = \"/boot/<xen-kernel-initramdisk>\" # <...> must be replaced\n"
141 "name = \"" << VMID <<
"_PIM\"\n"
142 "vif = ['ip=192.168.53.1']\n"
143 "disk = ['file:<PIM.img,sda1>,w','file:<PIMswap.img,sda2>,w'] # <...> must be replaced\n"
144 "root = \"/dev/sda1 ro\"\n"
157 ::std::time_t Now = ::std::chrono::system_clock::to_time_t(::std::chrono::system_clock::now());
165 if (this->HasPSM(pSyntaxTree))
172 if (pGOPPRR ==
nullptr)
183 VMID = pRootGraph->
m_ID;
186 while (VMID.find(
" ") != std::string::npos)
189 VMID.replace(VMID.find(
" "), 1,
"_");
195 "# Copyright (C) 2010-2012\n"
196 "# Johannes Feuser <feuser@uni-bremen.de>\n"
197 "# This file is part of the openETCS project\n"
199 "# The openETCS library is free software: you can redistribute it and/or modify\n"
200 "# it under the terms of the GNU General Public License as published by\n"
201 "# the Free Software Foundation, either version 3 of the License, or\n"
202 "# any later version.\n"
204 "# The openETCS library is distributed in the hope that it will be useful,\n"
205 "# but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
206 "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
207 "# GNU General Public License for more details.\n"
209 "# You should have received a copy of the GNU General Public License\n"
210 "# along with the openETCS library. If not, see <http://www.gnu.org/licenses/>.\n"
212 "# Xen configuration file for the EVC PSM virtual machine/DomU\n"
213 "# generated for openETCS EVC by VM configuration generator\n"
214 "# time point (UTC) of generation: " << ::std::asctime(::std::gmtime(&Now)) <<
"\n"
216 "kernel = \"/boot/<xen-kernel-image>\" # <...> must be replaced\n"
217 "ramdisk = \"/boot/<xen-kernel-initramdisk>\" # <...> must be replaced\n"
219 "name = \"" << VMID <<
"_PSM\"\n"
220 "vif = ['ip=192.168.53.1']\n"
221 "disk = ['file:<PSM.img,sda1>,w','file:<PSMswap.img,sda2>,w'] # <...> must be replaced\n"
222 "root = \"/dev/sda1 ro\"\n"