GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LTX / V2-7-4 > ltx_utils / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LTX_utils.c File Reference

LTX utilties library, contains the socket initialization and LAT flight software and hardware discovery routines. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <ctype.h>
#include <CMX/CMX_asBuiltPub.h>
#include <LTX_pcihdr.h>
#include <LTX/LTX_utils.h>
#include <LTX_utils_priv.h>
#include <LTX/LTX_server.h>

Defines

#define LTX_SOCK_BUFSIZE   256
#define LTX_STR_SIZE   32
#define LTX_TASK_ID   "tLTXrx"
#define LTX_TASK_PRI   160

Functions

int LTX_Initialize (int tx_port, int rx_port, int msg)
 Initializes the socket server.
int LTX_Shutdown (void)
 Shuts down the socket server.
int LTX_SwReport (void)
 Runs the software reporting mechanism.
int LTX_HwReport (int type)
 Runs the hardware reporting mechanism.

Variables

void * svr
LTX_server_config svrCfg


Detailed Description

LTX utilties library, contains the socket initialization and LAT flight software and hardware discovery routines.

Author:
S. Maldonado - smaldona@slac.stanford.edu

   CVS $Id: LTX_utils.c,v 1.3 2011/03/29 23:45:15 apw Exp $
   

Define Documentation

#define LTX_SOCK_BUFSIZE   256

Socket buffer size

Referenced by LTX_SwReport().

#define LTX_STR_SIZE   32

The max string size

Referenced by LTX_SwReport().

#define LTX_TASK_ID   "tLTXrx"

The LTX task ID

Referenced by LTX_Initialize().

#define LTX_TASK_PRI   160

The LTX task priority

Referenced by LTX_Initialize().


Function Documentation

int LTX_HwReport ( int  type  ) 

Runs the hardware reporting mechanism.

Routine calling PCI bus scan.

Parameters:
type Integer type of hardware report.
type Specifies print only type report
Return values:
LTX_OK Success.
LTX_ERR Failure.

References LTX_ERR, LTX_NUM_BUSES, and LTX_OK.

int LTX_Initialize ( int  tx_port,
int  rx_port,
int  msg 
)

Initializes the socket server.

Intialize socket and data structures.

Parameters:
tx_port The transmit socket port number
rx_port The receive socket port number
msg FLag to enable message printing
tx_port The transmit socket port number.
rx_port The receive socket port number.
msg Flag to enable message printing
Return values:
LTX_OK Success.
LTX_ERR Failure.

References _LTX_server_config::cmdRxExit, LTX_ERR, LTX_OK, LTX_serverInit(), LTX_serverSizeof(), LTX_TASK_ID, LTX_TASK_PRI, _LTX_server_config::rx_port, svr, and _LTX_server_config::tx_port.

int LTX_Shutdown ( void   ) 

Shuts down the socket server.

Close socket and free memory.

Return values:
LTX_OK Success.
LTX_ERR Failure.

References _LTX_server_config::cmdRxExit, LTX_ERR, LTX_OK, LTX_serverClose(), and svr.

int LTX_SwReport ( void   ) 

Runs the software reporting mechanism.

Routine calling CMX asBuilt functions.

Return values:
LTX_OK Success.
LTX_ERR Failure.

References LTX_dataSend(), LTX_ERR, LTX_OK, LTX_SOCK_BUFSIZE, LTX_STR_SIZE, and svr.


Variable Documentation

void* svr

Socket server handle

Referenced by LTX_Initialize(), LTX_Shutdown(), and LTX_SwReport().

Socket server configuration handle


Generated on Sat Apr 9 23:23:15 2011 by  doxygen 1.5.8