GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LTX / V2-7-7 > ltx_utils / rhel5-32
#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 |
CVS $Id: LTX_utils.c,v 1.3 2011/03/29 23:45:15 apw Exp $
#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().
int LTX_HwReport | ( | int | type | ) |
Runs the hardware reporting mechanism.
Routine calling PCI bus scan.
type | Integer type of hardware report. | |
type | Specifies print only type report |
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.
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 |
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.
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.
LTX_OK | Success. | |
LTX_ERR | Failure. |
References LTX_dataSend(), LTX_ERR, LTX_OK, LTX_SOCK_BUFSIZE, LTX_STR_SIZE, and svr.
void* svr |
Socket server handle
Referenced by LTX_Initialize(), LTX_Shutdown(), and LTX_SwReport().
Socket server configuration handle