📄 synth-gui.html
字号:
>.
</P
><DIV
CLASS="INFORMALFIGURE"
><A
NAME="AEN18035"><P
></P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="menu_view.gif"
ALIGN="CENTER"></P
></DIV
><P
></P
></DIV
><P
>The <SPAN
CLASS="GUIMENU"
>Help</SPAN
> 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.
</P
><DIV
CLASS="INFORMALFIGURE"
><A
NAME="AEN18041"><P
></P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="menu_help.gif"
ALIGN="CENTER"></P
></DIV
><P
></P
></DIV
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
>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 <TT
CLASS="ENVAR"
>ECOS_REPOSITORY</TT
>
environment variable.
</P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="SYNTH-GUI-TEXT"
></A
><H2
>The Main Text Window</H2
><P
>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 <TT
CLASS="FUNCTION"
>main</TT
>
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.
</P
><P
>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.
</P
><P
>The default appearance for most filters is controlled via the
<A
HREF="synth-running.html#SYNTH-RUNNING-TDF"
>target definition file</A
>. An
example entry might be:
</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
> filter trace {^TRACE:.*} -foreground HotPink1 -hide 1</PRE
></TD
></TR
></TABLE
><P
>The various colours and the hide flag for each filter can be changed
at run-time, using the <SPAN
CLASS="GUIMENUITEM"
>System Filters</SPAN
> item
on the <SPAN
CLASS="GUIMENU"
>View</SPAN
> menu. This will bring up a dialog like
the following:
</P
><DIV
CLASS="INFORMALFIGURE"
><A
NAME="AEN18059"><P
></P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="filters.gif"
ALIGN="CENTER"></P
></DIV
><P
></P
></DIV
><P
>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.
</P
><P
>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 <SPAN
CLASS="GUIMENU"
>Edit</SPAN
> menu has a checkbutton <SPAN
CLASS="GUIMENUITEM"
>Read
Only</SPAN
> 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.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="SYNTH-GUI-LAYOUT"
></A
><H2
>Positioning Optional Windows</H2
><P
>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 <A
HREF="synth-gui.html#SYNTH-GUI-LAYOUT"
>layout</A
> of
these windows. This requires an understanding of the overall layout of
the display.
</P
><DIV
CLASS="INFORMALFIGURE"
><A
NAME="AEN18071"><P
></P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="layout.gif"
ALIGN="CENTER"></P
></DIV
><P
></P
></DIV
><P
>Subwindows are generally packed in one of eight frames surrounding the
central text window: <TT
CLASS="VARNAME"
>.main.nw</TT
>,
<TT
CLASS="VARNAME"
>.main.n</TT
>, <TT
CLASS="VARNAME"
>.main.ne</TT
>,
<TT
CLASS="VARNAME"
>.main.w</TT
>, <TT
CLASS="VARNAME"
>.main.e</TT
>,
<TT
CLASS="VARNAME"
>.main.sw</TT
>, <TT
CLASS="VARNAME"
>.main.s</TT
>, and
<TT
CLASS="VARNAME"
>.main.se</TT
>. 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:
</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>synth_device led {
pack -in .main.n -side left
…
}</PRE
></TD
></TR
></TABLE
><P
>Similarly, to put a traffic monitor window on the right of the text
window would involve something like:
</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
> …
monitor_pack -in .main.e -side bottom
…</PRE
></TD
></TR
></TABLE
><P
>Often it will be sufficient to specify a container frame and one of
<TT
CLASS="CONSTANT"
>left</TT
>, <TT
CLASS="CONSTANT"
>right</TT
>,
<TT
CLASS="CONSTANT"
>top</TT
> or <TT
CLASS="CONSTANT"
>bottom</TT
>. 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.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="SYNTH-GUI-GLOBAL-CONFIG"
></A
><H2
>Global Settings</H2
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
>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.
</P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="synth-running.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ecos-ref.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="synth-console.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Running a Synthetic Target Application</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="hal-synth-arch.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>The Console Device</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -