GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCM / dev > lcm_siu / rhel4-32
#include <string.h>
#include <stdio.h>
#include <PBS/TMR.h>
#include <PBS/MBA.h>
#include <PBS/FPA.h>
#include <PBS/FORK.h>
#include <PBS/SEM.h>
#include <LCM/LCM_msgs.h>
#include <LCBD/LCBD.h>
#include <MSG/MSG_pubdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <IMM/RBM_pubdefs.h>
#include <LSF/LSF.h>
#include <LSF/LSF_ids.h>
#include <CCSDS/CCSDS_pkt.h>
#include <ZLIB/zlib.h>
#include <CSSR.h>
Functions | |
int | CSSR_forkBuffSizeof () |
return size of CSSR control structure | |
int | CSSR_ssrRingOverhead () |
return size of overhead per packet to use in ssrRingBuffsize calc | |
unsigned int | CSSR_init (void *cssrH, char *taskName, int taskPriority, int numQueuedSends, int apidBase, int lsfDatagramId, int lsfDatagramVer, int ssrRingBuffsize, int ssrRingOverflow) |
init the Compress and Send SSR utility | |
void | CSSR_stop (void *cssrH) |
stop the forked task | |
unsigned int | CSSR_sendRtn (void *cssrH, int lsfId, int lsfVer, CSSR_collectRtn collectRtn, CSSR_compressRtn compressRtn, CSSR_freeRtn freeRtn, void *uParm) |
send a request to task with a "collect" task to run in task context | |
unsigned int | CSSR_sendBuff (void *cssrH, int lsfId, int lsfVer, unsigned int *buff, unsigned int buffLen, CSSR_compressRtn compressRtn, CSSR_freeRtn freeRtn, void *uParm) |
send a request to task with a pre-filled buffer | |
unsigned int | CSSR_zlibCompress (void *uParm, unsigned int *dst, int dstLen, unsigned int *src, int srcLen) |
compression routine that does standard ZIP compression | |
void | CSSR_stats (void *cssrH, int clear) |
print stats on CSSR task |
CVS $Id: CSSR.c,v 1.7 2011/03/30 23:01:16 apw Exp $
int CSSR_forkBuffSizeof | ( | ) |
unsigned int CSSR_init | ( | void * | cssrH, | |
char * | taskName, | |||
int | taskPriority, | |||
int | numQueuedSends, | |||
int | apidBase, | |||
int | lsfDatagramId, | |||
int | lsfDatagramVer, | |||
int | ssrRingBuffsize, | |||
int | ssrRingOverflow | |||
) |
init the Compress and Send SSR utility
cssrH | memory for control structure of len CSSR_sizeof() | |
taskName | name of compress and send SSR task | |
taskPriority | priority of compress and send SSR task | |
numQueuedSends | number of queued requests to task | |
apidBase | base APID in CCSDS header, the CPU offset will be added to it (0=SIU,1=EPU0,...) | |
lsfDatagramId | id in LSF datagram header for all SSR packets sent | |
lsfDatagramVer | version of LSF datagram header for all SSR packets sent | |
ssrRingBuffsize | size of ring buffer between task and LCB | |
ssrRingOverflow | overflow part of ring buffer betweem task and LCB |
Referenced by SMON_start().
unsigned int CSSR_sendBuff | ( | void * | cssrH, | |
int | lsfId, | |||
int | lsfVer, | |||
unsigned int * | buff, | |||
unsigned int | buffLen, | |||
CSSR_compressRtn | compressRtn, | |||
CSSR_freeRtn | freeRtn, | |||
void * | uParm | |||
) |
send a request to task with a pre-filled buffer
cssrH | handle of size CSSR_sizeof() | |
lsfId | id to be put in LSF contributor header | |
lsfVer | version of LSF contributor | |
buff | ptr to allocated and filled buffer | |
buffLen | length of buff in bytes | |
compressRtn | routine to compress the buffer, can use CSSR_zlibCompress or NULL for no compress | |
freeRtn | routine to free buffer | |
uParm | parameter provided to above 3 routines |
Send a filled buffer to the forked task to compress and send. The "free" routine should free that buffer The caller may provide own compress routine or use the provided CSSR_zlibCompress
unsigned int CSSR_sendRtn | ( | void * | cssrH, | |
int | lsfId, | |||
int | lsfVer, | |||
CSSR_collectRtn | collectRtn, | |||
CSSR_compressRtn | compressRtn, | |||
CSSR_freeRtn | freeRtn, | |||
void * | uParm | |||
) |
send a request to task with a "collect" task to run in task context
cssrH | handle of size CSSR_sizeof() | |
lsfId | id to be put in LSF contributor header | |
lsfVer | version of LSF contributor | |
collectRtn | routine to alloc and fill buffer to compress and send | |
compressRtn | routine to compress the buffer, can use CSSR_zlibCompress or NULL for none | |
freeRtn | routine to free buffer allocated in collectRtn | |
uParm | parameter provided to above 3 routines |
int CSSR_ssrRingOverhead | ( | ) |
return size of overhead per packet to use in ssrRingBuffsize calc
Referenced by SMON_start().
void CSSR_stats | ( | void * | cssrH, | |
int | clear | |||
) |
print stats on CSSR task
cssrH | handle for CSSR task, if NULL will use last one allocated | |
clear | clear stats counters used in this routine |
void CSSR_stop | ( | void * | cssrH | ) |
unsigned int CSSR_zlibCompress | ( | void * | uParm, | |
unsigned int * | dst, | |||
int | dstLen, | |||
unsigned int * | src, | |||
int | srcLen | |||
) |
compression routine that does standard ZIP compression
uParm | not used | |
dst | destination buffer (where compressed data put) | |
dstLen | max length of dest buffer | |
src | source buffer (that to be comporessed) | |
srcLen | length of source |