<config>
	<input name="leitzentrale_enabled" rom="leitzentrale" node="leitzentrale">
		<attribute name="enabled" /> </input>
	<input name="reset_enabled" rom="reset" node="reset">
		<attribute name="enabled" /> </input>

	<output node="config">
		<inline>
			<parent-provides>
				<service name="ROM"/>
				<service name="PD"/>
				<service name="RM"/>
				<service name="CPU"/>
				<service name="LOG"/>
				<service name="Nitpicker"/>
				<service name="Timer"/>
				<service name="File_system"/>
			</parent-provides>

			<default-route> <any-service> <parent/> </any-service> </default-route>

			<default caps="100"/>
		</inline>
		<if>
			<has_value input="leitzentrale_enabled" value="yes" />
			<then>
				<inline>
					<start name="control_fader">
						<binary name="nit_fader"/>
						<resource name="RAM" quantum="19M"/>
						<provides> <service name="Nitpicker"/> </provides>
						<config alpha="190"/>
					</start>
					<start name="log_fader">
						<binary name="nit_fader"/>
						<resource name="RAM" quantum="8M"/>
						<provides> <service name="Nitpicker"/> </provides>
						<config alpha="200"/>
					</start>
				</inline>
			</then>
			<else>
				<inline>
					<start name="control_fader">
						<binary name="nit_fader"/>
						<resource name="RAM" quantum="19M"/>
						<provides> <service name="Nitpicker"/> </provides>
						<config alpha="0"/>
					</start>
					<start name="log_fader">
						<binary name="nit_fader"/>
						<resource name="RAM" quantum="8M"/>
						<provides> <service name="Nitpicker"/> </provides>
						<config alpha="0"/>
					</start>
				</inline>
			</else>
		</if>
		<inline>
			<start name="control_nit_fb">
				<binary name="nit_fb"/>
				<resource name="RAM" quantum="8M"/>
				<provides> <service name="Framebuffer"/> <service name="Input"/> </provides>
				<config xpos="2" ypos="2" width="-416" height="-4"/>
				<route>
					<service name="Nitpicker"> <child name="control_fader"/> </service>
					<any-service> <parent/> </any-service>
				</route>
			</start>

			<start name="log_nit_fb">
				<binary name="nit_fb"/>
				<resource name="RAM" quantum="4M"/>
				<provides> <service name="Framebuffer"/> <service name="Input"/> </provides>
				<config origin="top_right" xpos="-412" ypos="2" width="410" height="-4"/>
				<route>
					<service name="Nitpicker"> <child name="log_fader"/> </service>
					<any-service> <parent/> </any-service>
				</route>
			</start>

			<start name="log_terminal">
				<binary name="terminal"/>
				<resource name="RAM" quantum="4M"/>
				<provides> <service name="Terminal"/> </provides>
				<config>
					<keyboard layout="none"/>
					<font size="8" />
				</config>
				<route>
					<any-service> <child name="log_nit_fb"/> <parent/> </any-service>
				</route>
			</start>

			<start name="log_noux" caps="200">
				<binary name="noux"/>
				<resource name="RAM" quantum="24M" />
				<config>
					<fstab>
						<tar name="coreutils-minimal.tar" />
						<dir name="dev"> <zero/> <null/> </dir>
						<dir name="report"> <fs label="report"/> </dir>
					</fstab>
					<start name="/bin/tail">
						<env name="TERM" value="linux" />
						<arg value="-f"/>
						<arg value="/report/log"/>
					</start>
				</config>
				<route>
					<any-service> <child name="log_terminal"/> <parent/> </any-service>
				</route>
			</start>

<!--
			<start name="cpu_load_display">
				<resource name="RAM" quantum="6M"/>
				<route>
					<service name="ROM" label="trace_subjects"> <parent label="trace_subjects"/> </service>
					<any-service> <parent/> <any-child/> </any-service>
				</route>
			</start>
			-->

		</inline>
		<if>
			<has_value input="reset_enabled" value="no" />
			<then>
				<inline>
					<start name="control_terminal">
						<binary name="terminal"/>
						<resource name="RAM" quantum="8M"/>
						<provides> <service name="Terminal"/> </provides>
						<config>
							<keyboard layout="none"/>
							<font size="16" />
						</config>
						<route>
							<any-service> <child name="control_nit_fb"/> <parent/> </any-service>
						</route>
					</start>

					<start name="control_noux" caps="1000">
						<binary name="noux"/>
						<resource name="RAM" quantum="48M" />
						<config>
							<fstab>
								<tar name="coreutils-minimal.tar" />
								<tar name="vim-minimal.tar" />
								<tar name="bash-minimal.tar" />
								<dir name="dev"> <zero/> <null/> </dir>
								<dir name="config"> <fs label="config"/> </dir>
								<dir name="report"> <fs label="report"/> </dir>
								<dir name="tmp"> <ram /> </dir>
								<dir name="share"> <dir name="vim"> <rom name="vimrc"/> </dir> </dir>
								<rom name="README"/>
							</fstab>
							<start name="/bin/bash">
								<env name="TERM" value="linux" />
								<env name="PS1" value="genode:$PWD> " />
							</start>
						</config>
						<route>
							<any-service> <child name="control_terminal"/> <parent/> </any-service>
						</route>
					</start>

				</inline>
			</then>
		</if>
	</output>
</config>
