203 lines
11 KiB
HTML
203 lines
11 KiB
HTML
<!-- HTML header for doxygen 1.9.1-->
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.15.0"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>L4Re Operating System Framework: Cons, the Console Multiplexer</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript" src="cookie.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
|
<link href="l4re-awesome.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="L4Re_rgb_logo_quer_hg_h55.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">L4Re Operating System Framework
|
|
</div>
|
|
<div id="projectbrief">Interface and Usage Documentation</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.15.0 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
</script>
|
|
<script type="text/javascript">
|
|
$(function() { codefold.init(); });
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search',true);
|
|
$(function() { init_search(); });
|
|
});
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(function(){initNavTree('l4re_servers_cons.html','',''); });
|
|
</script>
|
|
<div id="container">
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div><div class="header">
|
|
<div class="headertitle"><div class="title">Cons, the Console Multiplexer </div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><p><a class="anchor" id="md_pkg_2cons_2doc_2usage"></a></p>
|
|
<p><span class="tt">cons</span> is an interactive multiplexer for console input and output. It buffers the output from different L4 clients and allows to switch between them to redirect input.</p>
|
|
<h1>Multiplexers and Frontends</h1>
|
|
<p>cons is able to connect multiple clients to multiple console I/O servers. All clients are connected to all configured multiplexers</p>
|
|
<p>Multiplexers and frontends come in pairs where the actual I/O is handled by the frontend. From the point-of-view of cons, a frontend consists of an IPC channel to a server that speaks an appropriate server protocol. By default the L4.Env.log capability is used. Only frontends that speak the <a class="el" href="classL4_1_1Vcon.html" title="C++ L4 Vcon interface, see Virtual Console for the C interface.">L4::Vcon</a> protocol are supported.</p>
|
|
<p>A multiplexer handles and routes the I/O of each client to and from its respective frontend.</p>
|
|
<p>Each client's console settings (e.g. color, visibility) apply to all multiplexers and cannot be changed individually. A user can connect to all clients through all multiplexers. It is not possible to assign individual clients to distinct multiplexers.</p>
|
|
<h1>Client sessions</h1>
|
|
<p>For clients cons implements the <a class="el" href="classL4_1_1Vcon.html" title="C++ L4 Vcon interface, see Virtual Console for the C interface.">L4::Vcon</a> and the Virtio console interface. A client session can be requested through a <span class="tt">create</span> call to cons' factory. cons binds its factory capability to the <span class="tt">cons</span> capability. See the example below on how this can be set up.</p>
|
|
<h1>Starting the service</h1>
|
|
<p>The cons server can be started with Lua like this: </p><pre class="fragment">local log_server = L4.default_loader:new_channel()
|
|
L4.default_loader:start({
|
|
caps = {
|
|
cons = log_server:svr(),
|
|
},
|
|
log = L4.Env.log,
|
|
},
|
|
"rom/cons")
|
|
</pre><p>First an IPC gate (<span class="tt">log_server</span>) is created which is used between the cons server and a client to request a new session. The server side is assigned to the mandatory <span class="tt">cons</span> capability of cons. This example explicitly assigns the kernel's log capability (<span class="tt">L4.Env.log</span>) to cons' <span class="tt">log</span> capability in order to allow cons to provide input and output for its clients. The default log factory (usually provided by <span class="tt">moe</span>) doesn't provide input capabilities.</p>
|
|
<h1>Command Line Options</h1>
|
|
<p>cons accepts the following command line switches:</p>
|
|
<ul>
|
|
<li><p class="startli"><span class="tt">-a</span>, <span class="tt">--show-all</span></p>
|
|
<p class="startli">Initially show output from all clients.</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">-B <size></span>, <span class="tt">--defaultbufsize <size></span></p>
|
|
<p class="startli">Default buffer size per client in bytes. Default: 40960</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">-c <client></span>, <span class="tt">--autoconnect <client></span></p>
|
|
<p class="startli">Automatically connect to the client with the given name. That means that output of this client will be visible and input will be routed to it.</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">-f <cap></span>, <span class="tt">--frontend <cap></span></p>
|
|
<p class="startli">Set the frontend for the current multiplexer. Output for the multiplexer is then sent to the capability with the given name <span class="tt"><cap></span>. The server connected to the capability needs to understand the <a class="el" href="classL4_1_1Vcon.html" title="C++ L4 Vcon interface, see Virtual Console for the C interface.">L4::Vcon</a> protocol.</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">-k</span>, <span class="tt">--keep</span></p>
|
|
<p class="startli">Keep the console buffer when a client disconnects.</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">-l</span>, <span class="tt">--no-line-buffering</span></p>
|
|
<p class="startli">By default, merge the client output to entire lines. If the client writes characters without a final newline, the following client output is merged with the current line content. Specifying this switch disables the line buffered mode by default.</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">--line-buffering-ms <timeout></span></p>
|
|
<p class="startli">Timeout in milliseconds before buffered client output is written even without a newline. Default value is 50.</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">-m <prompt name></span>, <span class="tt">--mux <prompt name></span></p>
|
|
<p class="startli">Add a new multiplexer named <span class="tt"><prompt name></span>. This is necessary if output should be sent to different frontends. This option must be used in conjunction with the <span class="tt">-f</span> frontend option</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">-n</span>, <span class="tt">--defaultname</span></p>
|
|
<p class="startli">Default name for the multiplexer prompt. Default: <span class="tt">cons</span>.</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">-t</span>, <span class="tt">--timestamp</span></p>
|
|
<p class="startli">Prefix the output with timestamps.</p>
|
|
</li>
|
|
</ul>
|
|
<h1>Connecting a client</h1>
|
|
<pre class="fragment"> create(backend_type, ["client_name"], ["color"], ["option"] [,"option"] ...)
|
|
</pre><ul>
|
|
<li><p class="startli"><span class="tt">backend_type</span></p>
|
|
<p class="startli">The type of backend that should be created for the client. The type is a positive integer and currently the following types are supported:</p><ul>
|
|
<li><span class="tt">L4.Proto.Log</span>: <a class="el" href="classL4_1_1Vcon.html" title="C++ L4 Vcon interface, see Virtual Console for the C interface.">L4::Vcon</a> client</li>
|
|
<li><span class="tt">1</span>: Virtio console client</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<p>cons accepts the following per-client options:</p>
|
|
<ul>
|
|
<li><p class="startli"><span class="tt">bufsz=n</span></p>
|
|
<p class="startli">Use a buffer of <span class="tt">n</span> bytes for this client, deviating from the default buffer size.</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">keep</span> / <span class="tt">no-keep</span></p>
|
|
<p class="startli">The console buffer is kept / thrown away when the client disconnects.</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">key=<key></span></p>
|
|
<p class="startli">Assign <span class="tt"><key></span> as keyboard shortcut to this client.</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">line-buffering</span> / <span class="tt">no-linux-buffering</span></p>
|
|
<p class="startli">Line buffering is enabled / disabled for this client.</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">show</span> / <span class="tt">hide</span></p>
|
|
<p class="startli">Output from this client is initially shown / hidden.</p>
|
|
</li>
|
|
<li><p class="startli"><span class="tt">timestamp</span> / <span class="tt">no-timestamp</span></p>
|
|
<p class="startli">Do / do not prefix the output of this client with timestamps. </p>
|
|
</li>
|
|
</ul>
|
|
</div></div><!-- contents -->
|
|
</div><!-- PageDoc -->
|
|
</div><!-- doc-content -->
|
|
<div id="page-nav" class="page-nav-panel">
|
|
<div id="page-nav-resize-handle"></div>
|
|
<div id="page-nav-tree">
|
|
<div id="page-nav-contents">
|
|
</div><!-- page-nav-contents -->
|
|
</div><!-- page-nav-tree -->
|
|
</div><!-- page-nav -->
|
|
</div><!-- container -->
|
|
<!-- HTML footer for doxygen 1.9.1-->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a href="l4re_servers.html">L4Re Servers</a></li>
|
|
<li class="footer">Generated on <span class="timestamp"></span> for L4Re Operating System Framework by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.15.0 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|