metaonly module ti.bios.log.ndk.LogServerCgi |
 |
LogServerCgi module
The LogServerCgi module provides a command interface to the Target DSP using
the Common Gateway Interface (CGI). The commands in this interface may be
called by a remote machine when connected to the Target via ethernet cable.
These commands must be sent over the internet using the HTTP protocol.
[
more ... ]
XDCspec summary |
sourced in ti/bios/log/ndk/LogServerCgi.xdc |
metaonly module LogServerCgi { ...
XDCscript usage |
meta-domain |
var LogServerCgi = xdc.useModule('ti.bios.log.ndk.LogServerCgi');
XDCspec declarations |
sourced in ti/bios/log/ndk/LogServerCgi.xdc |
metaonly module LogServerCgi {
}
DETAILS
The LogServerCgi module provides a command interface to the Target DSP using
the Common Gateway Interface (CGI). The commands in this interface may be
called by a remote machine when connected to the Target via ethernet cable.
These commands must be sent over the internet using the HTTP protocol.
Each command in this interface corresponds to an operation that can be
performed by the DSP. The following CGI commands are supported by the
LogServerCgi module:
capturelogs.cgi // capture log data for a set of BIOS logs.
disablelogging.cgi // disable a set of BIOS logs.
enablelogging.cgi // enable a set of BIOS logs.
getcpuspeed.cgi // get the speed of the DSP.
logflush.cgi // flush and discard data for a set of BIOS logs.
readword.cgi // read a word of data from Target memory.
settrackaddrs.cgi // set addresses for which the LogTrack module will
// print values for.
stopstream.cgi // stop streaming of BIOS log data.
streamlogs.cgi // stream log data for a set of BIOS logs.
writeword.cgi // write a word of data to Target memory.
Each of the above CGIs corresponds to a C function, which is called in its
own thread context. This thread will be started with the default priority
of OS_TASKPRINORM, as defined in the NDK. Each CGI function will run to
completion, at which point the thread will terminate.
If the user desires, some properties of these CGI threads can be configured
using the C structure LogServerCgi_Config. This structure allows
the user to change the default CGI thread priority, the size of the log data
buffer (the buffer used to copy log data from the target in order to send it
to the Host), as well as the memory segment from which to allocate this
buffer. The structure is defined as follows:
typedef struct LogServerCgi_Config {
Uint32 priority;
Int segId;
Uint32 bufSize;
} LogServerCgi_Config;
- priority - used to change the priority which CGI threads will run at. The
setting of CGI thread priority using this variable will result in
all CGI threads in the program running at that priority level.
However, the user is limited to the values in the range
[0 - OS_TASKPRINORM].
The following rules apply when setting the CGI thread priority:
- priority set to a number in the range [0 - OS_TASKPRINORM] -
All CGI threads in the program will run at the value specified.
- priority set to a negative number - All CGI threads will run at
the default priority of OS_TASKPRINORM.
- priority set to a value greater than OS_TASKPRINORM - All CGI
threads will run at default priority of OS_TASKPRINORM.
- segId - Used to change the memory segment in which the data buffer used
for copying log data is allocated from.
- bufSize - Used to change the size of the data buffer used for copying log
data.
If the user wishes to use this structure to configure these settings, then
it is necessary to define an instance of this type named LogServerCgi_config
in the user's code.
For example, in order to change the CGI thread priority to 1 (for all CGIs),
change the memory segment to allocate the transfer buffer from to segment 0,
and to change the size of the transfer buffer to 4096, the following code
should be added to the user's program:
LogServerCgi_Config LogServerCgi_config =
{1,
0,
4096,
};
Important note: Re-defining the above mentioned config structure works by
using a linker ordering trick. Since the user program containing the above
redefinition is linked after the logservercgi library, the latest definition
will override the one in the logservercgi library. That being said, it is
important that the user's redefined config definition be linked after the
logservercgi library, or any other file that may redefine the
LogServerCgi_config struct!
generated on Sat, 23 May 2009 00:29:50 GMT