1 |
1026 |
ivang |
@c
|
2 |
|
|
@c COPYRIGHT (c) 1988-2002.
|
3 |
|
|
@c On-Line Applications Research Corporation (OAR).
|
4 |
|
|
@c All rights reserved.
|
5 |
|
|
@c
|
6 |
|
|
@c monitor.t,v 1.3 2002/01/17 21:47:45 joel Exp
|
7 |
|
|
@c
|
8 |
|
|
|
9 |
|
|
@chapter Monitor Task
|
10 |
|
|
|
11 |
|
|
@section Introduction
|
12 |
|
|
|
13 |
|
|
The monitor task is a simple interactive shell that allows the user to
|
14 |
|
|
make inquries about he state of various system objects. The routines
|
15 |
|
|
provided by the monitor task manager are:
|
16 |
|
|
|
17 |
|
|
@itemize @bullet
|
18 |
|
|
@item @code{rtems_monitor_init} - Initialize the Monitor Task
|
19 |
|
|
@item @code{rtems_monitor_wakeup} - Wakeup the Monitor Task
|
20 |
|
|
@end itemize
|
21 |
|
|
|
22 |
|
|
@section Background
|
23 |
|
|
|
24 |
|
|
There is no background information.
|
25 |
|
|
|
26 |
|
|
@section Operations
|
27 |
|
|
|
28 |
|
|
@subsection Initializing the Monitor
|
29 |
|
|
|
30 |
|
|
The monitor is initialized by calling @code{rtems_monitor_init}. When
|
31 |
|
|
initialized, the monitor is created as an independent task. An example
|
32 |
|
|
of initializing the monitor is shown below:
|
33 |
|
|
|
34 |
|
|
@example
|
35 |
|
|
@group
|
36 |
|
|
#include
|
37 |
|
|
...
|
38 |
|
|
rtems_monitor_init(0);
|
39 |
|
|
@end group
|
40 |
|
|
@end example
|
41 |
|
|
|
42 |
|
|
The "0" parameter to the @code{rtems_monitor_init} routine
|
43 |
|
|
causes the monitor to immediately enter command mode.
|
44 |
|
|
This parameter is a bitfield. If the monitor is to suspend
|
45 |
|
|
itself on startup, then the @code{RTEMS_MONITOR_SUSPEND} bit
|
46 |
|
|
should be set.
|
47 |
|
|
|
48 |
|
|
@section Routines
|
49 |
|
|
|
50 |
|
|
This section details the monitor task manager's routines.
|
51 |
|
|
A subsection is dedicated to each of this manager's routines
|
52 |
|
|
and describes the calling sequence, related constants, usage,
|
53 |
|
|
and status codes.
|
54 |
|
|
|
55 |
|
|
@page
|
56 |
|
|
@subsection rtems_monitor_init - Initialize the Monitor Task
|
57 |
|
|
|
58 |
|
|
@subheading CALLING SEQUENCE:
|
59 |
|
|
|
60 |
|
|
@ifset is-C
|
61 |
|
|
@example
|
62 |
|
|
void rtems_monitor_init(
|
63 |
|
|
unsigned32 monitor_flags
|
64 |
|
|
);
|
65 |
|
|
@end example
|
66 |
|
|
@end ifset
|
67 |
|
|
|
68 |
|
|
@ifset is-Ada
|
69 |
|
|
@example
|
70 |
|
|
An Ada interface is not currently available.
|
71 |
|
|
@end example
|
72 |
|
|
@end ifset
|
73 |
|
|
|
74 |
|
|
@subheading STATUS CODES: NONE
|
75 |
|
|
|
76 |
|
|
@subheading DESCRIPTION:
|
77 |
|
|
|
78 |
|
|
This routine initializes the RTEMS monitor task. The
|
79 |
|
|
@code{monitor_flags} parameter indicates how the server
|
80 |
|
|
task is to start. This parameter is a bitfield and
|
81 |
|
|
has the following constants associated with it:
|
82 |
|
|
|
83 |
|
|
@itemize @bullet
|
84 |
|
|
@item @b{RTEMS_MONITOR_SUSPEND} - suspend monitor on startup
|
85 |
|
|
@item @b{RTEMS_MONITOR_GLOBAL} - monitor should be global
|
86 |
|
|
@end itemize
|
87 |
|
|
|
88 |
|
|
If the @code{RTEMS_MONITOR_SUSPEND} bit is set, then the
|
89 |
|
|
monitor task will suspend itself after it is initialized.
|
90 |
|
|
A subsequent call to @code{rtems_monitor_wakeup} will be required
|
91 |
|
|
to activate it.
|
92 |
|
|
|
93 |
|
|
@subheading NOTES:
|
94 |
|
|
|
95 |
|
|
The monitor task is created with priority 1. If there are
|
96 |
|
|
application tasks at priority 1, then there may be times
|
97 |
|
|
when the monitor task is not executing.
|
98 |
|
|
|
99 |
|
|
@page
|
100 |
|
|
@subsection rtems_monitor_wakeup - Wakeup the Monitor Task
|
101 |
|
|
|
102 |
|
|
@subheading CALLING SEQUENCE:
|
103 |
|
|
|
104 |
|
|
@ifset is-C
|
105 |
|
|
@example
|
106 |
|
|
void rtems_monitor_wakeup( void );
|
107 |
|
|
@end example
|
108 |
|
|
@end ifset
|
109 |
|
|
|
110 |
|
|
@ifset is-Ada
|
111 |
|
|
@example
|
112 |
|
|
An Ada interface is not currently available.
|
113 |
|
|
@end example
|
114 |
|
|
@end ifset
|
115 |
|
|
|
116 |
|
|
@subheading STATUS CODES: NONE
|
117 |
|
|
|
118 |
|
|
@subheading DESCRIPTION:
|
119 |
|
|
|
120 |
|
|
This routine is used to activate the monitor task if it is suspended.
|
121 |
|
|
|
122 |
|
|
@subheading NOTES:
|
123 |
|
|
|
124 |
|
|
NONE
|
125 |
|
|
|
126 |
|
|
@page
|
127 |
|
|
@section Monitor Interactive Commands
|
128 |
|
|
|
129 |
|
|
The following commands are supported by the monitor task:
|
130 |
|
|
|
131 |
|
|
@itemize @bullet
|
132 |
|
|
@item @code{help} - Obtain Help
|
133 |
|
|
@item @code{pause} - Pause Monitor for a Specified Number of Ticks
|
134 |
|
|
@item @code{exit} - Invoke a Fatal RTEMS Error
|
135 |
|
|
@item @code{symbol} - Show Entries from Symbol Table
|
136 |
|
|
@item @code{continue} - Put Monitor to Sleep Waiting for Explicit Wakeup
|
137 |
|
|
@item @code{config} - Show System Configuration
|
138 |
|
|
@item @code{itask} - List Init Tasks
|
139 |
|
|
@item @code{mpci} - List MPCI Config
|
140 |
|
|
@item @code{task} - Show Task Information
|
141 |
|
|
@item @code{queue} - Show Message Queue Information
|
142 |
|
|
@item @code{extension} - User Extensions
|
143 |
|
|
@item @code{driver} - Show Information About Named Drivers
|
144 |
|
|
@item @code{dname} - Show Information About Named Drivers
|
145 |
|
|
@item @code{object} - Generic Object Information
|
146 |
|
|
@item @code{node} - Specify Default Node for Commands That Take IDs
|
147 |
|
|
@end itemize
|
148 |
|
|
|
149 |
|
|
|
150 |
|
|
@subsection help - Obtain Help
|
151 |
|
|
|
152 |
|
|
The @code{help} command prints out the list of commands. If invoked
|
153 |
|
|
with a command name as the first argument, detailed help information
|
154 |
|
|
on that command is printed.
|
155 |
|
|
|
156 |
|
|
@subsection pause - Pause Monitor for a Specified Number of Ticks
|
157 |
|
|
|
158 |
|
|
The @code{pause} command cause the monitor task to suspend itself
|
159 |
|
|
for the specified number of ticks. If this command is invoked with
|
160 |
|
|
no arguments, then the task is suspended for 1 clock tick.
|
161 |
|
|
|
162 |
|
|
@subsection exit - Invoke a Fatal RTEMS Error
|
163 |
|
|
|
164 |
|
|
The @code{exit} command invokes @code{rtems_error_occurred} directive
|
165 |
|
|
with the specified error code. If this command is invoked with
|
166 |
|
|
no arguments, then the @code{rtems_error_occurred} directive is
|
167 |
|
|
invoked with an arbitrary error code.
|
168 |
|
|
|
169 |
|
|
@subsection symbol - Show Entries from Symbol Table
|
170 |
|
|
|
171 |
|
|
The @code{symbol} command lists the specified entries in the symbol table.
|
172 |
|
|
If this command is invoked with no arguments, then all the
|
173 |
|
|
symbols in the symbol table are printed.
|
174 |
|
|
|
175 |
|
|
@subsection continue - Put Monitor to Sleep Waiting for Explicit Wakeup
|
176 |
|
|
|
177 |
|
|
The @code{continue} command suspends the monitor task with no timeout.
|
178 |
|
|
|
179 |
|
|
@subsection config - Show System Configuration
|
180 |
|
|
|
181 |
|
|
The @code{config} command prints the system configuration.
|
182 |
|
|
|
183 |
|
|
@subsection itask - List Init Tasks
|
184 |
|
|
|
185 |
|
|
The @code{itask} command lists the tasks in the initialization tasks table.
|
186 |
|
|
|
187 |
|
|
@subsection mpci - List MPCI Config
|
188 |
|
|
|
189 |
|
|
The @code{mpci} command shows the MPCI configuration information
|
190 |
|
|
|
191 |
|
|
@subsection task - Show Task Information
|
192 |
|
|
|
193 |
|
|
The @code{task} command prints out information about one or more tasks in
|
194 |
|
|
the system. If invoked with no arguments, then
|
195 |
|
|
information on all the tasks in the system is printed.
|
196 |
|
|
|
197 |
|
|
@subsection queue - Show Message Queue Information
|
198 |
|
|
|
199 |
|
|
The @code{queue} command prints out information about one or more
|
200 |
|
|
message queues in the system. If invoked with no arguments, then
|
201 |
|
|
information on all the message queues in the system is printed.
|
202 |
|
|
|
203 |
|
|
@subsection extension - User Extensions
|
204 |
|
|
|
205 |
|
|
The @code{extension} command prints out information about the user
|
206 |
|
|
extensions.
|
207 |
|
|
|
208 |
|
|
@subsection driver - Show Information About Named Drivers
|
209 |
|
|
|
210 |
|
|
The @code{driver} command prints information about the device driver table.
|
211 |
|
|
|
212 |
|
|
@subsection dname - Show Information About Named Drivers
|
213 |
|
|
|
214 |
|
|
The @code{dname} command prints information about the named device drivers.
|
215 |
|
|
|
216 |
|
|
@subsection object - Generic Object Information
|
217 |
|
|
|
218 |
|
|
The @code{object} command prints information about RTEMS objects.
|
219 |
|
|
|
220 |
|
|
@subsection node - Specify Default Node for Commands That Take IDs
|
221 |
|
|
|
222 |
|
|
The @code{node} command sets the default node for commands that look
|
223 |
|
|
at object ID ranges.
|
224 |
|
|
|