⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 synth.sgml

📁 开放源码实时操作系统源码.
💻 SGML
📖 第 1 页 / 共 5 页
字号:
    <informalfigure PgWide=1>
      <mediaobject>
        <imageobject>
          <imagedata fileref="screen_main.png" Scalefit=1 Align="Center">
        </imageobject>
      </mediaobject>
    </informalfigure>
    <para>
The title bar identifies the window as belonging to an eCos synthetic
target application and lists both the application name and its process
id. The latter is especially useful if the application was started
directly from a shell prompt and the user now wants to attach a gdb
session. The window has a conventional menu bar with the usual
entries, plus a toolbar with buttons for common operations such as cut
and paste. Balloon help is supported.
    </para>
    <para>
There is a central <link linkend="synth-gui-text">text window</link>,
possibly surrounded by various sub-windows for various devices. For
example there could be a row of emulated LED's above the text window,
and monitors of ethernet traffic and interrupt activity on the right.
At the bottom of the window is a status line, including a small
animation that shows whether or not the eCos application is still
running.
    </para>
  </refsect1>

  <refsect1 id="synth-gui-menus"><title>Menus and the Toolbar</title>
    <para>
Usually there will be four menus on the menu bar:
<guimenu>File</guimenu>, <guimenu>Edit</guimenu>,
<guimenu>View</guimenu> and <guimenu>Help</guimenu>.
    </para>
      <informalfigure PgWide=1>
      <mediaobject>
        <imageobject>
          <imagedata fileref="menu_file.png" Scalefit=1 Align="Center">
        </imageobject>
      </mediaobject>
    </informalfigure>
    <para>
On the <guimenu>File</guimenu> menu there are three entries related to
saving the current contents of the central text window.
<guimenuitem>Save</guimenuitem> is used to save the currently visible
contents of the text window. Any text that is hidden because of
filters will not be written to the savefile. If there has been a
previous <guimenuitem>Save</guimenuitem> or <guimenuitem>Save
As</guimenuitem> operation then the existing savefile will be re-used,
otherwise the user will be asked to select a suitable file.
<guimenuitem>Save As</guimenuitem> also saves just the currently
visible contents but will always prompt the user for a filename.
<guimenuitem>Save All</guimenuitem> can be used to save the full
contents of the text window, including any text that is currently
hidden. It will always prompt for a new filename, to avoid confusion
with partial savefiles.
    </para>
    <para>
Usually the eCos application will be run from inside gdb or from a
shell prompt. Killing off the application while it is being debugged
in a gdb session is not a good idea, it would be better to use gdb's
own <command>kill</command> command. Alternatively the eCos
application itself can use the <function>CYG_TEST_EXIT</function> or
<filename>cyg_hal_sys_exit</filename> functionality. However it is
possible to terminate the application from the I/O auxiliary using
<guimenuitem>Kill eCos</guimenuitem>. A clean shutdown will be
attempted, but that can fail if the application is currently halted
inside gdb or if it has crashed completely. As a last resort
<constant>SIGKILL</constant> will be used.
    </para>
    <para>
When operating in graphical mode the I/O auxiliary will normally
continue to run even after the eCos application has exited. This
allows the user to examine the last few lines of output, and perhaps
perform actions such as saving the output to a file. The
<guimenuitem>Exit</guimenuitem> menu item can be used to shut down the
auxiliary. Note that this behaviour can be changed with command line
arguments <link
linkend="synth-running-arguments"><option>--exit</option></link> and
<link
linkend="synth-running-arguments"><option>--no-exit</option></link>.
    </para>
    <para>
If <guimenuitem>Exit</guimenuitem> is used while the eCos application
is still running then the I/O auxiliary will first attempt to
terminate the application cleanly, and then exit.
    </para>
    <informalfigure PgWide=1>
      <mediaobject>
        <imageobject>
          <imagedata fileref="menu_edit.png" Scalefit=1 Align="Center">
        </imageobject>
      </mediaobject>
    </informalfigure>
    <para>
The <guimenu>Edit</guimenu> menu contains the usual entries for
text manipulation: <guimenuitem>Cut</guimenuitem>,
<guimenuitem>Copy</guimenuitem>, <guimenuitem>Paste</guimenuitem>,
<guimenuitem>Clear</guimenuitem> and <guimenuitem>Select
All</guimenuitem>. These all operate on the central text window. By
default this window cannot be edited so the cut, paste and clear
operations are disabled. If the user wants to edit the contents of the
text window then the <guimenuitem>Read Only</guimenuitem> checkbutton
should be toggled.
    </para>
    <para>
The <guimenuitem>Preferences</guimenuitem> menu item brings up a
miscellaneous preferences dialog. One of the preferences relates to
online help: the I/O auxiliary does not currently have a built-in html
viewer; instead it will execute an external browser of some sort. With
the example settings shown, the I/O auxiliary will first attempt to
interact with an existing mozilla session. If that fails it will try
to run a new mozilla instance, or as a last result use the Gnome help
viewer. 
    </para>
    <informalfigure PgWide=1>
      <mediaobject>
        <imageobject>
          <imagedata fileref="preferences.png" Scalefit=1 Align="Center">
        </imageobject>
      </mediaobject>
    </informalfigure>
    <para>
The <guimenu>View</guimenu> menu contains the <guimenuitem>System
Filters</guimenuitem> entry, used to edit the settings for the current
<link linkend="synth-gui-text">filters</link>.
    </para>
     <informalfigure PgWide=1>
      <mediaobject>
        <imageobject>
          <imagedata fileref="menu_view.png" Scalefit=1 Align="Center">
        </imageobject>
      </mediaobject>
    </informalfigure>
    <para>
The <guimenu>Help</guimenu> menu can be used to activate online help
for eCos generally, for the synthetic target as a whole, and for
specific devices supported by the generic target. The Preferences
dialog can be used to select the browser that will be used.
    </para>
    <informalfigure PgWide=1>
      <mediaobject>
        <imageobject>
          <imagedata fileref="menu_help.png" Scalefit=1 Align="Center">
        </imageobject>
      </mediaobject>
    </informalfigure>
    <note><para>
At the time of writing there is no well-defined toplevel index file
for all eCos documentation. Hence the relevant menu item is disabled.
Documentation for the synthetic target and the supported devices
is stored as part of the package itself so can usually be found fairly
easily. It may be necessary to set the <envar>ECOS_REPOSITORY</envar>
environment variable.
    </para></note>

  </refsect1>

  <refsect1 id="synth-gui-text"><title>The Main Text Window</title>
    <para>
The central text window holds the console output from the eCos
application: the screen shot above shows DHCP initialization data from
the TCP/IP stack, and some output from the <function>main</function>
thread at the bottom. Some devices can insert text of their own, for
example the ethernet device support can be configured to show details
of incoming and outgoing packets. Mixing the output from the eCos
application and the various devices can make it easier to understand
the order in which events occur.
    </para>
    <para>
The appearance of text from different sources can be controlled by
means of filters, and it is also possible to hide some of the text.
For example, if tracing is enabled in the eCos configuration then the
trace output can be given its own colour scheme, making it stand out
from the rest of the output. In addition the trace output is generally
voluminous so it can be hidden by default, made visible only to find
out more about what was happening when a particular problem occurred.
Similarly the ethernet device support can output details of the
various packets being transferred, and using a different background
colour for this output again makes it easier to distinguish from
console output.
    </para>
    <para>
The default appearance for most filters is controlled via the
<link linkend="synth-running-tdf">target definition file</link>. An
example entry might be:
    </para>
    <programlisting>
  filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
</programlisting>
    <para>
The various colours and the hide flag for each filter can be changed
at run-time, using the <guimenuitem>System Filters</guimenuitem> item
on the <guimenu>View</guimenu> menu. This will bring up a dialog like
the following:
    </para>
    <informalfigure PgWide=1>
      <mediaobject>
        <imageobject>
          <imagedata fileref="filters.png" Scalefit=1 Align="Center">
        </imageobject>
      </mediaobject>
    </informalfigure>
    <para>
It should be noted that the text window is line-oriented, not
character-oriented. If an eCos application sends a partial line of
text then that will remain buffered until a newline character is
received, rather than being displayed immediately. This avoids
confusion when there is concurrent output from several sources.
    </para>
    <para>
By default the text window is read-only. This means it will not allow
cut, paste and clear operations, and keyboard input will be ignored.
The <guimenu>Edit</guimenu> menu has a checkbutton <guimenuitem>Read
Only</guimenuitem> which can be toggled to allow write operations. For
example, a user could type in a reminder of what was happening at this
time, or paste in part of a gdb session. Such keyboard input does not
get forwarded to the eCos application: if the latter requires keyboard
input then that should happen via a separate keyboard device.
    </para>
  </refsect1>

  <refsect1 id="synth-gui-layout"><title>Positioning Optional Windows</title>
    <para>
Some devices may create their own subwindows, for example to monitor
ethernet traffic or to provide additional I/O facilities such as
emulated LED's or buttons. Usually the target definition file can be
used to control the <link linkend="synth-gui-layout">layout</link> of
these windows. This requires an understanding of the overall layout of
the display.
    </para>
    <informalfigure PgWide=1>
      <mediaobject>
        <imageobject>
          <imagedata fileref="layout.png" Scalefit=1 Align="Center">
        </imageobject>
      </mediaobject>
    </informalfigure>
    <para>
Subwindows are generally packed in one of eight frames surrounding the
central text window: <varname>.main.nw</varname>,
<varname>.main.n</varname>, <varname>.main.ne</varname>,
<varname>.main.w</varname>, <varname>.main.e</varname>,
<varname>.main.sw</varname>, <varname>.main.s</varname>, and
<varname>.main.se</varname>. To position a row of LED's above the text
window and towards the left, a target definition file could contain an
entry such as:
    </para>
    <programlisting>
synth_device led {
    pack -in .main.n -side left
    &hellip;
}
</programlisting>
    <para>
Similarly, to put a traffic monitor window on the right of the text
window would involve something like:
    </para>
    <programlisting>
    &hellip;
    monitor_pack -in .main.e -side bottom
    &hellip;
</programlisting>
    <para>
Often it will be sufficient to specify a container frame and one of
<constant>left</constant>, <constant>right</constant>,
<constant>top</constant> or <constant>bottom</constant>. Full control
over the positioning requires an understanding of Tcl/Tk and in
particular the packing algorithm, and an appropriate reference work
should be consulted.
    </para>
  </refsect1>

  <refsect1 id="synth-gui-global-config"><title>Global Settings</title>
    <note><para>
This section still to be written - it should document the interaction
between X resources and ecosynth, and how users can control settings
such as the main foreground and background colours.
    </para></note>
  </refsect1>

</refentry>

<!-- }}} -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -