GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > TCL / V9-0-0

Constituent: hd     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

hd.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <string.h>
#include <limits.h>
#include "tcl.h"
#include "tk.h"
#include "TCL/hd.h"

Include dependency graph for hd.c:

Include dependency graph

Data Structures

struct  _hd_config

Typedefs

typedef _hd_config hd_config

Functions

int LineRead (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int FileRewind (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int LineAscii (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int Tcl_HdInit (Tcl_Interp *interp)
int ReadInteger (hd_config *g, Tcl_Interp *interp, int size, int numItems, char *format)
int ReadFloat (hd_config *g, Tcl_Interp *interp, int size, int numItems, char *format)
int main (int argc, char **argv)

Variables

hd_config hdConfig
const char * usageStr

Detailed Description

Function definitions for hd application.

Typedef Documentation

hd_config
 

The typedef for _hd_config.


Function Documentation

int FileRewind ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
char *  argv[]
[static]
 

Callback for the Tcl FileRewind command. Rewinds the dump file.

Parameters:
clientData Application global config info.
interp The Tcl interpreter handle.
argc The number of arguments.
argv Pointers to the argument strings.
Returns:
TCL_OK.

int LineAscii ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
char *  argv[]
[static]
 

Callback for the Tcl LineAscii command. Expects:
argv[1] = # of bytes to convert
The ASCII version of the binary data is linked to the Tcl interpreter result field.

Parameters:
clientData Application global config info.
interp The Tcl interpreter handle.
argc The number of arguments.
argv Pointers to the argument strings.
Returns:
TCL_OK.

int LineRead ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
char *  argv[]
[static]
 

Callback for the Tcl LineRead command. Expects:
argv[1] = # of bytes in data
argv[2] = data format
argv[3] = # of items to read
The ASCII version of the binary data is linked to the Tcl interpreter result field.

Parameters:
clientData Application global config info.
interp The Tcl interpreter handle.
argc The number of arguments.
argv Pointers to the argument strings.
Return values:
TCL_OK Success.
TCL_ERROR Failure.

Here is the call graph for this function:

int main int  argc,
char **  argv
 

Application entry point. The program resources are intialized, then the Tcl and Tk interpreters are started using the script hd.tk".

Parameters:
argc The number of command line arguments.
argv Pointer to the command line argument strings.
Return values:
0 Success.
-1 Failure.

Here is the call graph for this function:

int ReadFloat hd_config g,
Tcl_Interp *  interp,
int  size,
int  numItems,
char *  format
[static]
 

Reads in one or more floating point values from the input file. The data is converted to the appropriate ASCII string and appended to the Tcl interpreter result field.

Parameters:
g Application global config info.
interp The Tcl interpreter handle.
size The size in bytes of each item to read.
numItems The number of items to read and convert.
format The format string to apply.
Return values:
TCL_OK Success.
TCL_ERROR Failure.

int ReadInteger hd_config g,
Tcl_Interp *  interp,
int  size,
int  numItems,
char *  format
[static]
 

Reads in one or more integer values from the input file. The data is converted to the appropriate ASCII string and appended to the Tcl interpreter result field.

Parameters:
g Application global config info.
interp The Tcl interpreter handle.
size The size in bytes of each item to read.
numItems The number of items to read and convert.
format The format string to apply.
Return values:
TCL_OK Success.
TCL_ERROR Failure.

int Tcl_HdInit Tcl_Interp *  interp  )  [static]
 

The Tcl/Tk initialization callback. This function is called by Tcl after the interpreter is created but before the application starts. The Tcl interpreter is expanded to handle the application specific commands.

Parameters:
interp The Tcl interpreter handle.
Return values:
TCL_OK Success.
TCL_ERROR Failure.

Here is the call graph for this function:


Variable Documentation

hdConfig [static]
 

The application global config info.

usageStr [static]
 

Initial value:

 "hd [-b|n|x|d|X|D|f|F] file_name\n\n"
                                  "\tb - 8-bit hex\n"
                                  "\tn - 8-bit dec\n"
                                  "\tx - 16-bit hex\n"
                                  "\td - 16-bit dec\n"
                                  "\tX - 32-bit hex\n"
                                  "\tD - 32-bit dec\n"
                                  "\tf - 32-bit single float\n"
                                  "\tF - 64-bin double float"
The help string for the application.


Generated on Fri Oct 15 05:36:54 2004 by doxygen 1.3.3