File: NJB_Set_Debug.3

package info (click to toggle)
libnjb 1.2-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,952 kB
  • ctags: 643
  • sloc: ansic: 10,718; sh: 7,926; makefile: 220
file content (53 lines) | stat: -rw-r--r-- 1,517 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.TH NJB_SET_UNICODE 3 "June 2004"
.SH NAME
NJB_Set_Debug \- Set the mode for debugging traces
.SH LIBRARY
libnjb
.SH SYNOPSIS
#include <libnjb.h>

extern int njb_error

NJB_Set_Debug (int 
.BR debug_flags)

.SH DESCRIPTION
NJB_Set_Debug sets the verbosity and cathegory of debug messages
printed to the standard output during execution of a program
using libnjb. This command is used mainly by developers, but
application developers are encouraged to add a command-line
option to turn debugging on, so that users may use this feature
to locate problems in programs using libnjb.

.SH ARGUMENT VALUES
The begug verbosity is selected by performing a logical 
.BR OR
operation between these possible debug messages:

.LP
.TP 10
DD_USBCTL
Dump control messages sent to the USB bus (i.e. endpoint 0)
to stdout in hexadecimal notation. This is very good for
tracing commands on the control channel used by NJB1.
.TP 10
DD_USBBLKIM
Obsolete.
.TP 10
DD_USBBLK
Dump bulk messages sent on the USB bus. These can be quite
large, and may considerably slow down the operation of 
your program, especially if the trace is displayed in a
terminal. This is however necessary for the series 3 devices,
since these use the bulk exclusively, even for commands to
the device.
.TP 10
DD_SUBTRACE
Dump a hierarchical trace stack of how functions inside libnjb
are called so that it is possible to locate the problematic
function by following the execution tree.

.SH Example usage

Example: NJB_Debug(DD_USBCTL | DD_USBBLK | DD_SUBTRACE)