GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCS / dev > lcs / rhel5-32
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <PBI/TBD_id.h>
#include <PBS/TBD.ih>
#include <PBS/WCT.h>
#include <MSG/MSG_pubdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <LCS/LCS_pubdefs.h>
#include <LCS/LCS_msgs.h>
#include <LCS_prvdefs.h>
Functions | |
LCS_Control * | LCS_getControl () |
Return the LCS control handle. | |
LCS_NodeAddress | LCS_getNodeAddress (ITC_NodeID nid) |
Return the LCB hardware node address for a logical ITC node ID. | |
ITC_NodeID | LCS_getNodeID (LCS_NodeAddress nih) |
Return the logical ITC node ID for an LCB hardware node address. | |
LRX_Engine * | LCS_getRxEngine (ITC_NodeID nid, ITC_QueueID qid) |
Return the LRX engine handle. | |
LTX_Engine * | LCS_getTxEngine (ITC_TaskID tid, ITC_QueueID qid) |
Return the LTX engine handle. | |
unsigned int | LCS_roundTo (unsigned int val, unsigned int off, unsigned int rnd) |
Round a number up to the next (off + n * rnd) boundary. | |
unsigned int | LCS_setNodeAddressSIU (LCS_NodeAddress nih) |
Set the hardware address of the SIU (on EPU only). | |
unsigned int | LCS_sizeofRxEngine () |
Return size of an LRX engine structure. | |
unsigned int | LCS_sizeofTxEngine () |
Return size of an LTX engine structure. | |
unsigned int | LCS_wct2ascii (WCT_time tim, char *asc) |
Convert a time (absolute units) to an ASCII string. |
CVS $Id: LCS_utility.c,v 1.10 2011/03/28 22:49:56 apw Exp $
LCS_Control* LCS_getControl | ( | void | ) |
Return the LCS control handle.
x | LCS control handle | |
NULL | Cannot find handle |
References LCS_lcb.
LCS_NodeAddress LCS_getNodeAddress | ( | ITC_NodeID | nid | ) |
Return the LCB hardware node address for a logical ITC node ID.
nid | (in) ITC (logical) node ID |
LCS_NIH_NONE | LCB (hardware) address not known | |
LCS_NIH_SIU0 | LCB (hardware) address for SIU 0 (SC "redundant SIU") | |
LCS_NIH_SIU1 | LCB (hardware) address for SIU 1 (SC "primary SIU") | |
LCS_NIH_EPU0 | LCB (hardware) address for EPU 0 | |
LCS_NIH_EPU1 | LCB (hardware) address for EPU 1 | |
LCS_NIH_EPU2 | LCB (hardware) address for EPU 2 | |
LCS_NIH_EPU3 | LCB (hardware) address for EPU 3/external SIU | |
LCS_NIH_SDI | LCB (hardware) address for science data interface |
References LCS_CTL_UNINITIALIZED, LCS_lcb, LCS_NIH_NONE, _LCS_Control::map, and _LCS_Control::state.
Referenced by LRX_replySend(), LTX_service(), and LTX_submit().
ITC_NodeID LCS_getNodeID | ( | LCS_NodeAddress | nih | ) |
Return the logical ITC node ID for an LCB hardware node address.
nih | (in) LCS (hardware) address |
ITC_NID_NONE | ITC (logical) node ID not known | |
ITC_NID_SIU | ITC (logical) node ID SIU | |
ITC_NID_EPU0 | ITC (logical) node ID EPU 0 | |
ITC_NID_EPU1 | ITC (logical) node ID EPU 1 | |
ITC_NID_EPU2 | ITC (logical) node ID EPU 2 | |
ITC_NID_EPU3 | ITC (logical) node ID EPU 3/external SIU | |
ITC_NID_SSR | ITC (logical) node ID SSR |
References LCS_CTL_UNINITIALIZED, LCS_K_HARDBASE, LCS_lcb, _LCS_Control::rev, and _LCS_Control::state.
Referenced by LCS_completeEPU(), and LRX_process().
LRX_Engine* LCS_getRxEngine | ( | ITC_NodeID | nid, | |
ITC_QueueID | qid | |||
) |
Return the LRX engine handle.
nid | (in) ITC node ID | |
qid | (in) ITC queue ID |
x | Handle for LRX engine | |
NULL | Cannot find handle |
References LCS_lcb, _LCS_Control::lrx, and _LRX_Service::rxe.
LTX_Engine* LCS_getTxEngine | ( | ITC_TaskID | tid, | |
ITC_QueueID | qid | |||
) |
Return the LTX engine handle.
tid | (in) ITC task ID | |
qid | (in) ITC queue ID |
x | Handle for LTX engine | |
NULL | Cannot find handle |
References LCS_lcb, _LCS_Control::ltx, and _LTX_Service::txe.
unsigned int LCS_roundTo | ( | unsigned int | val, | |
unsigned int | off, | |||
unsigned int | rnd | |||
) |
Round a number up to the next (off + n * rnd) boundary.
val | (in) Value to round off | |
off | (in) Offset from boundary | |
rnd | (in) Boundary |
x | Rounded off value |
Referenced by createEngines().
unsigned int LCS_setNodeAddressSIU | ( | LCS_NodeAddress | nih | ) |
Set the hardware address of the SIU (on EPU only).
nih | (in) Hardware address of the SIU |
LCS_NOTINIT | LCS control block not available | |
LCS_NOTSIUND | Node address is not valid for an SIU | |
LCS_SUCCESS | Success |
References LCS_CTL_UNINITIALIZED, LCS_K_HARDBASE, LCS_lcb, LCS_NIH_SIU0, LCS_NIH_SIU1, LCS_NIH_SIUE, _LCS_Control::map, _LCS_Control::rev, and _LCS_Control::state.
Referenced by LCS_completeEPU(), and LCS_completeSIU().
unsigned int LCS_sizeofRxEngine | ( | void | ) |
Return size of an LRX engine structure.
x | Size (bytes) of LRX engine |
unsigned int LCS_sizeofTxEngine | ( | void | ) |
Return size of an LTX engine structure.
x | Size (bytes) of LRX engine |
unsigned int LCS_wct2ascii | ( | WCT_time | tim, | |
char * | asc | |||
) |
Convert a time (absolute units) to an ASCII string.
tim | (in) Hardware address of the SIU | |
asc | (out) ASCII datestamp string |
LCS_NOTINIT | LCS control block not available | |
LCS_NOTSIUND | Node address is not valid for an SIU | |
LCS_SUCCESS | Success |
asc
is assumed to point to a buffer that can accomodate the full return string. There is no protection against overwriting other memory if the buffer area is too short. The minimum buffer length is 30 (including the string terminator ... this number is available as a #define). Now you know why this is strictly an LCS private routine!
Referenced by LRX_replySent(), and LTX_resultList().