mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 11:55:24 +00:00
parent
9d7a58f6a7
commit
7676f47540
@ -400,6 +400,13 @@ void Depot_deploy::Child::gen_start_node(Xml_generator &xml, Xml_node common,
|
||||
/* runtime handling */
|
||||
Xml_node const runtime = _pkg_xml->xml().sub_node("runtime");
|
||||
|
||||
/*
|
||||
* Insert inline '<heartbeat>' node if provided by the start node.
|
||||
*/
|
||||
if (_start_xml->xml().has_sub_node("heartbeat")) {
|
||||
_gen_copy_of_sub_node(xml, _start_xml->xml(), "heartbeat");
|
||||
}
|
||||
|
||||
/*
|
||||
* Insert inline '<config>' node if provided by the start node,
|
||||
* the launcher definition (if a launcher is user), or the
|
||||
|
@ -74,9 +74,25 @@ struct Depot_deploy::Main
|
||||
|
||||
/* generate init config containing all configured start nodes */
|
||||
_init_config_reporter.generate([&] (Xml_generator &xml) {
|
||||
|
||||
Xml_node static_config = config.sub_node("static");
|
||||
static_config.with_raw_content([&] (char const *start, size_t length) {
|
||||
xml.append(start, length); });
|
||||
|
||||
config.with_sub_node("report", [&] (Xml_node const &report) {
|
||||
size_t const delay_ms = report.attribute_value("delay_ms", 1000UL);
|
||||
xml.node("report", [&] () {
|
||||
xml.attribute("delay_ms", delay_ms);
|
||||
});
|
||||
});
|
||||
|
||||
config.with_sub_node("heartbeat", [&] (Xml_node const &heartbeat) {
|
||||
size_t const rate_ms = heartbeat.attribute_value("rate_ms", 2000UL);
|
||||
xml.node("heartbeat", [&] () {
|
||||
xml.attribute("rate_ms", rate_ms);
|
||||
});
|
||||
});
|
||||
|
||||
Child::Depot_rom_server const parent { };
|
||||
_children.gen_start_nodes(xml, config.sub_node("common_routes"),
|
||||
parent, parent);
|
||||
|
Loading…
x
Reference in New Issue
Block a user