GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EMP / V1-4-1 > asc / mv2304


Interface   Data Structures   File List   Data Fields   Globals  

ASC_eds.c File Reference

Setup the ASC histogram within the EDS framework. More...

#include <EMP/LSD_sdi.h>
#include <EMP/ASC.h>
#include <EMP/ASC_ids.h>
#include <EMP/ASC_ascCtb.h>
#include <EMP/ASC_ascBdy.h>
#include <EMP/EMP_hdrdefs.h>
#include <EMP/EMP_tlmdefs.h>
#include <EMP/EMP_write.h>
#include <EMP_hdr.h>
#include <EMP/ASC_statsdefs.h>
#include <EMP/EMP_msgs.h>
#include <EMP_DB/ASC_DB_schema.h>
#include <EDS_DB/EDS_DB_schema.h>
#include <EDS/EDS_fw.h>
#include <EDS/EBF_evt.h>
#include <EDS/EBF_cid.h>
#include <EDS/EBF_gem.h>
#include <EDS/EBF_dir.h>
#include <EDS/EBF_gemLocate.h>
#include <EDS/EDR_acdUnpack.h>
#include <LSF/LSF.h>
#include <LSF/LSF_ids.h>
#include <LSF/LSF_reason.h>
#include <ZLIB/zlib.h>
#include <MSG/MSG_pubdefs.h>
#include <PBS/TMR.h>
#include <PBS/MBA.h>
#include <PBS/FPA.h>
#include <PBS/WUT.h>
#include <PBS/WUT_tmr.h>
#include <PBS/FORK.h>
#include <PBS/PTS.h>
#include <PBS/WCT.h>
#include <PBS/BSWP.h>
#include <string.h>

Classes

struct  _OutputMessage
 This is a buffer with a header large enough to hold the control information to both store this on the FPA free que and post it to an output FORK que. The body of the message is the buffer for the output datagram. More...
struct  _Prescaler
 Prescaler control structure. More...
struct  _LastEvent
 Information about the last event in the previous packet. This used to seed the begin information of the next packet. More...
struct  _FlushMessage
 Flush fork message structure. More...
struct  _Flush
 Flush control structure. More...
struct  _ASC
 The control structure for an ASC process. More...

Defines

#define TRACE_PUT(xx, yy)
#define ASC_VER_K_DATAGRAM   0
 The version of the ASC datagram that is being produced.
#define NUM_COUNTER_BUFFS   3
 Number of messages to accumulate histograms in.
#define RND_TO(_v, _r)   (((_v) + (_r) - 1) & ~((_r) - 1))
 Rounds the specified value up to the _r. _r must be a binary power of 2.

Typedefs

typedef struct _OutputMessage OutputMessage
 Typedef for struct _OutputMessage.
typedef struct _Prescaler Prescaler
 Typedef for struct _Prescaler.
typedef struct _LastEvent LastEvent
 Typedef for struct _LastEvent.
typedef struct _FlushMessage FlushMessage
 Typedef for struct _FlushMessage.
typedef int(* FlushDeliverRtn )(void *ctx, FORK_cb_rtn rtn, FORK_msg_hdr *msg)
 Signature of routine to deliver a flush message.
typedef struct _Flush Flush
 Typedef for struct _Flush.
typedef struct _ASC ASC
 Typedef for struct _ASC.

Functions

static int get_node_id ()
 Return the node id.
static const char * get_task_name ()
 Return the name of the task.
static int get_task_priority ()
 Return priority to assign the task.
static unsigned int AscEdsSizeof (const void *db, void *prm)
 This is the EDS service to return the size of the context structure.
static const
EDS_fwHandlerServicesX1 * 
AscEdsConstruct (ASC *asc, unsigned int id, const ASC_DB_Schema *db, unsigned int key, ASC_handlerConstructCfg *cfg, EDS_fw *edsFw)
 This is the EDS constructor for ASC. It's name is supplied to the caller via the ASC_constructServicesGet routine.
static int AscEdsDestruct (ASC *asc)
 The EDS destructor service.
static unsigned int AscEdsObjectsGet (ASC *asc)
 The EDS Objects Get service. This returns a bit mask of the objects managed EDS that ASC requires.
static unsigned int AscEdsNeedsGet (ASC *asc)
 The EDS Needs Get service.
static int AscEdsFlush (ASC *asc, int reason)
 The EDS flush service.
static unsigned int AscEdsProcess (ASC *asc, unsigned int pktBytes, EBF_pkt *pkt, EBF_siv siv, EDS_fwIxb *ixb, int id)
 The EDS Event Processing Service.
static int CompressIt (z_stream *zstream, void *dst, int dstLen, void *src, int srcLen)
 Utility function to call the ZLIB deflate routine.
static unsigned int output (ASC *asc, OutputMessage *msg)
 The datagram output routine. This is a FORK service callback routine.
static unsigned int forkExit (ASC *asc, OutputMessage *msg)
 Forces the FORK task to exit.
static void initMsg (void *unused, OutputMessage *msg, int msg_size, int pcb_offset)
 This is the FPA initialization callback routine used to initialize each packet in the FPA pool.
const
EDS_DB_HandlerConstructServices * 
ASC_constructServicesGet (ASC_handlerConstructCfg *cfg)
 Routine called by LPA (via EMP_DB) to get constructionr info for ASC.
static void __inline swap32bN (unsigned int *buf, int n32)
 Inplace 32 swap to a big-endian buffer, noop on big-endian machines.
static __inline FPA_fcb * createFpaPool (int cnt)
 Creates the FPA pool used to hold the input message packets.
static __inline unsigned int createOutputTask (ASC *asc)
static __inline ASC_ascBdy_Raw0get_packet (ASC *asc)
 Returns a pointer to the packet to be filled in.
static __inline void set_aem (EBF_dir *dir, EBF_pkt *pkt, unsigned int pktBytes)
 Locates the AEM data without doing a full directory. The pointer to the AEM contribution is stashed away in the EBF directory structure. This is a little sleazy, but that's where EDR_acdUnpack expects to find it.
static void * zlibMalloc (void *arg, unsigned int nitems, unsigned int size)
 Callback function used by ZLIB to allocate memory.
static void zlibFree (void *arg, void *address)
 Callback function used by ZLIB to free memory.
static unsigned int zlibInitStream (z_stream *stream, int level)
 Does the one time initialization of the compression stream.
int flush_forward (void *lcb, FlushMessage *msg)
 Executes in the context of the event handling task.
WUT_cb_status flush_tmr (ASC *asc, WUT_tmr *tmr)
 This is the timer ISR flush routine.
static __inline void dgmComplete (LSF_datagram *dgm, ASC *asc, unsigned int payloadSize, unsigned int bridge)
 Completes the datagram header information.

Variables

static const unsigned char OpenReasons [16]
 Maps a closing reason into its complimentary open reason.


Detailed Description

Setup the ASC histogram within the EDS framework.

Author:
Ed Bacho - ebacho@slac.stanford.edu

JJRussell- russell@slac.stanford.edu


    CVS $Id: ASC_eds.c,v 1.13 2011/04/01 18:26:36 russell Exp $

SYNOPSIS
Sets up the ASC histogram routines as an EDS service to be connected to the event stream. THis also handles the compression of the histograms into science packets to be sent to the SDI.

Define Documentation

#define NUM_COUNTER_BUFFS   3

Number of messages to accumulate histograms in.

Processing in fork takes about 300mSec for compress,clear, and output Since buffers will be switched after maybe 10sec, double buffer would probably work but 3 are specified for safety

Referenced by AscEdsConstruct().

#define RND_TO ( _v,
_r   )     (((_v) + (_r) - 1) & ~((_r) - 1))

Rounds the specified value up to the _r. _r must be a binary power of 2.

Returns:
The rounded value
Parameters:
_v The value to round
_r The boundary to round up to. This must be a binary power of 2, e.g. 2, 4, 8, 16 etc.

Referenced by createFpaPool(), LSD_sdiConstruct(), and output().


Typedef Documentation

int(* FlushDeliverRtn)(void *ctx, FORK_cb_rtn rtn, FORK_msg_hdr *msg)

Signature of routine to deliver a flush message.

Returns:
Status
Parameters:
ctx Context parameter, likely controls the destination
rtn The routine to call once the message is delivered
msg The message to deliver


Function Documentation

const EDS_DB_HandlerConstructServices ASC_constructServicesGet ( ASC_handlerConstructCfg cfg  ) 

Routine called by LPA (via EMP_DB) to get constructionr info for ASC.

Returns:
Pointer to EDS_DB_HandlerConstructServices structure
Parameters:
cfg The handler construction configuration

References AscEdsConstruct(), and AscEdsSizeof().

static const EDS_fwHandlerServicesX1 * AscEdsConstruct ( ASC asc,
unsigned int  id,
const ASC_DB_Schema *  db,
unsigned int  key,
ASC_handlerConstructCfg cfg,
EDS_fw *  edsFw 
) [static]

This is the EDS constructor for ASC. It's name is supplied to the caller via the ASC_constructServicesGet routine.

Returns:
The table of EDS services for ASC
Parameters:
asc The ASC context handle to fill in
id The ID of this handler
db The configuration database.
key The configuration database file key
cfg Optional user parameter. This is just part of the EDS services interface and is not used in the case of ASC. In some applications, the size of the context structure might depend on this parameter. Whereas the schema is meant to be fairly static object read from a file, prm is meant to be used more dynamically, perhaps being derived from command line parameters
edsFw The handle of the controlling EDS framework
This routine, along with AscEdsSizeof, form the pair of routines used by high level applications to install an event handler into an EDS framework. This routine has to functions

  1. To initialize the ASC context handle. This handle is usually allocated by the called using the Sizeof service in the construct services to determine the memory requirements.

  1. To return the vector of standard EDS services

References _FlushMessage::asc, ASC_ID_K_ASC, ASC_ID_K_DATAGRAM, ASC_VER_K_DATAGRAM, AscEdsDestruct(), AscEdsFlush(), AscEdsNeedsGet(), AscEdsObjectsGet(), AscEdsProcess(), _LastEvent::beg_invalid, _Flush::cnt, createFpaPool(), createOutputTask(), _ASC::ctbId, _Flush::ctx, _ASC::db, _ASC::dgmId, EMP_ASCSIU_TLM_APID, _LastEvent::evt, _ASC::flush, flush_tmr(), _ASC::frequency, get_node_id(), _ASC::last, _Prescaler::left, LSD_sdiConstruct(), LSD_sdiSizeof(), _ASC::msg, _Flush::msg, _ASC::msg_pool, _Flush::nsecx, NUM_COUNTER_BUFFS, _ASC::open_reason, _ASC::prescaler, _LSD_sdiWriteCbp::prm, _Prescaler::refresh, _EMP_hdrEvt::relative, _Flush::rtn, _LSD_sdiWriteCbp::rtn, _ASC::sdi, _Flush::tmr, _ASC_handlerConstructCfg::write, zlibInitStream(), and _ASC::zstream.

Referenced by ASC_constructServicesGet().

static int AscEdsDestruct ( ASC asc  )  [static]

The EDS destructor service.

Returns:
Status, 0 is considered successful
Parameters:
asc The ASC context handle
This is called when the EDS framework itself is destroyed or when this handler is unregistered. In general, the destructor frees only its internal resources. The memory for the ASC context handle itself should be freed by the same entity that allocated it.

References _ASC::flush, _ASC::fork_que, _ASC::fork_task, forkExit(), LSD_sdiDestruct(), _ASC::msg, _ASC::msg_pool, _ASC::sdi, and _Flush::tmr.

Referenced by AscEdsConstruct().

static int AscEdsFlush ( ASC asc,
int  reason 
) [static]

The EDS flush service.

Parameters:
asc The ASC context handle
reason An enumeration of why the flush is being called.
This routine is called both internally by the ASC event processing routine when a packet is ready to be shipped and by the EDS framework, for example, when a run is being ended and the event handlers are being requested to flush their buffers to the output stream.

References _EMP_hdrEvtSpan::beg, _LastEvent::beg_invalid, _OutputMessage::bridge, _EMP_hdrEvtSpan::end, _LastEvent::evt, _OutputMessage::fork, _ASC::fork_que, _ASC::frequency, _ASC_stats::frequency, _OutputMessage::hdr, _ASC_ascBdy_Raw0::hdr, _ASC::last, _ASC::msg, _ASC::nmissed, _ASC_stats::nmissed, _EMP_hdr::nsampled, _ASC::open_reason, OpenReasons, output(), _OutputMessage::pkt, _EMP_hdrEvt::relative, _EMP_hdr::span, and _ASC_ascBdy_Raw0::stats.

Referenced by AscEdsConstruct(), AscEdsProcess(), and flush_forward().

static unsigned int AscEdsNeedsGet ( ASC asc  )  [static]

The EDS Needs Get service.

Returns:
Returns a bit mask of which packets in a multi-packet event ASC processing routine needs to see.
Parameters:
asc The ASC context handle
ASC is fairly typical of the event processors in that it wishes to be called back only on the first and last packet in a sequence. On multi-packet events, the processing routine will request EDS to compose a directory on its behalf and to be not called back until the final packet. On single packet events, where the first and last packets are the same packet, the ASC event processing routine processes the event on the first call and cancels its request to be called back on the last packet.

Referenced by AscEdsConstruct().

static unsigned int AscEdsObjectsGet ( ASC asc  )  [static]

The EDS Objects Get service. This returns a bit mask of the objects managed EDS that ASC requires.

Parameters:
asc The ASC context handle

Referenced by AscEdsConstruct().

static unsigned int AscEdsProcess ( ASC asc,
unsigned int  pktBytes,
EBF_pkt *  ebfPkt,
EBF_siv  siv,
EDS_fwIxb *  ixb,
int  id 
) [static]

The EDS Event Processing Service.

Return values:
EDS_FW_FN_M_NO_MORE,when no more packets of this event are needed to complete the processing.
EDS_FW_FN_M_DIR,when ASC is requesting EDS to compose a directory on its behalf.
0,when ASC has been handed one of the middle packets in a sequence. This is an error either in AscEdsNeedsGet (it should only specifiy the first and last packet be delivered to this routine) or an internal error in the EDS framework.
Parameters:
asc The ASC context handle
pktBytes The number of bytes in ebfPkt
ebfPkt The EBF packet as delivered by the hardware
siv The state information vector. This value is provided as a community service to all event handlers. It summarizes the current state of the packet, including an transport or protocol errors it has encounter and the packet's sequencing information (FIRST, ONLY, MIDDLE, LAST).
ixb The information exchange block. This is a shared knowledge base managed by EDS and used by the event processors. It contains higher level information about the event. Once filled by one processor, all others are free to use it. This tactic saves the CPU from producing this information for each consumer.
id The EDS identifier. This value is unused in the case for ASC, but some applications need this value as a way of identifying themselves.

References ASC_accumulateU(), AscEdsFlush(), _EMP_hdrEvtSpan::beg, _LastEvent::beg_invalid, _Flush::cnt, _ASC_ascBdy_Raw0::counters, _ASC_stats::eacc, _ASC_stats::edir, EMP_hdrEvtSet(), _ASC_stats::etotal, _ASC_stats::eunpack, _LastEvent::evt, _ASC::flush, get_packet(), _ASC_ascBdy_Raw0::hdr, _ASC::last, _Prescaler::left, _ASC::msg, _EMP_hdr::nsampled, _Flush::nsecx, _ASC_stats::nused, _OutputMessage::pkt, _ASC::prescaler, _Prescaler::refresh, set_aem(), _EMP_hdr::span, _ASC_ascBdy_Raw0::stats, and _Flush::tmr.

Referenced by AscEdsConstruct().

static unsigned int AscEdsSizeof ( const void *  db,
void *  prm 
) [static]

This is the EDS service to return the size of the context structure.

Returns:
The size, in bytes, of the ASC context
Parameters:
db The configuration database. This parameter is just part of the EDS services interface and is not used in the case of ASC. In some applications, the size of the context structure might depend on configuration parameters in the database.
prm Optional user parameter. This is just part of the EDS services interface and is not used in the case of ASC. In some applications, the size of the context structure might depend on this parameter. Whereas the schema is meant to be fairly static object read from a file, prm is meant to be used more dynamically, perhaps being derived from command line parameters
This routine is seeded as the Sizeof service of the ASC constructor services routine and is used by the called to determine the size of and then allocate a ASC context handle. This handle is then passed to the construct service (AscEdsConstruct).

Referenced by ASC_constructServicesGet().

static int CompressIt ( z_stream *  stream,
void *  dst,
int  dstLen,
void *  src,
int  srcLen 
) [static]

Utility function to call the ZLIB deflate routine.

Returns:
The length, in bytes, of the compressed data. If 0, then the deflate failed.
Parameters:
stream The ZLIB stream used to control the deflation
dst The destination buffer
dstLen The length, in bytes, of the destination buffer
src The source buffer to compress
srcLen The length, in bytes, of the source buffer.
This is just a jacketing routine for the ZLIB deflate routine

Referenced by output().

static __inline FPA_fcb * createFpaPool ( int  cnt  )  [static]

Creates the FPA pool used to hold the input message packets.

Returns:
On success, the handle to the created FPA pool On failure, NULL
Parameters:
cnt The number of packets to place in the pool

References initMsg(), and RND_TO.

Referenced by AscEdsConstruct().

static __inline unsigned int createOutputTask ( ASC asc  )  [static]

Returns:
Status, 0 = success On failure, non-zero
Parameters:
asc The ASC control structure, this is just passed transparently as the user parameter to the created FORK task

References _ASC::fork_que, _ASC::fork_task, get_task_name(), and get_task_priority().

Referenced by AscEdsConstruct().

static __inline void dgmComplete ( LSF_datagram *  dgm,
ASC asc,
unsigned int  payloadSize,
unsigned int  bridge 
) [static]

Completes the datagram header information.

Parameters:
dgm The target datagram
asc The ASC context handle
payloadSize The size, in bytes, of the contribution's data
bridge The contribuion bridge word

References _ASC::ctbId, and _ASC::dgmId.

Referenced by output().

int flush_forward ( void *  lcb,
FlushMessage msg 
)

Executes in the context of the event handling task.

Parameters:
lcb The LCB device context handle, not used here
msg The message
Forcing this routine to execute in the context of the event handling task provides the necessary synchronization so that an update of the histograms is not happening simoultaneously with this routine.

References _FlushMessage::asc, AscEdsFlush(), _ASC::flush, _Flush::nsecx, and _Flush::tmr.

Referenced by flush_tmr().

WUT_cb_status flush_tmr ( ASC asc,
WUT_tmr *  tmr 
)

This is the timer ISR flush routine.

Returns:
WUT_K_STATE_CHANGE_NO
Parameters:
asc The ASC context handle
tmr The timer

References _Flush::ctx, _ASC::flush, flush_forward(), _FlushMessage::hdr, _Flush::msg, and _Flush::rtn.

Referenced by AscEdsConstruct().

static unsigned int forkExit ( ASC asc,
OutputMessage msg 
) [static]

Forces the FORK task to exit.

Return values:
!FORK_C_CONTINUE 
Parameters:
asc The ASC context handle, ignored
msg The FORK messsage, ignored

Referenced by AscEdsDestruct().

static inline int get_node_id (  )  [inline, static]

Return the node id.

Returns:
The node id
This routine eliminates the dependency of this file on ITC

Referenced by AscEdsConstruct().

static __inline ASC_ascBdy_Raw0 * get_packet ( ASC asc  )  [static]

Returns a pointer to the packet to be filled in.

Returns:
A pointer to the packet to be filled in, or NULL on failure
Parameters:
asc The ASC context handle

References _EMP_hdrEvtSpan::beg, _LastEvent::beg_invalid, _LastEvent::evt, _ASC_ascBdy_Raw0::hdr, _ASC::last, _ASC::msg, _ASC::msg_pool, _ASC::nmissed, _OutputMessage::pkt, _EMP_hdrEvt::relative, and _EMP_hdr::span.

Referenced by AscEdsProcess().

static inline get_task_name (  )  [inline, static]

Return the name of the task.

The task name This routine eliminates the dependency of this file on CPU_DB.

  • For VXWORKS platforms it fetches the name from the CPU data base.
  • For all other platforms it just returns a fixed name, EvtMonTask.

Referenced by createOutputTask().

static inline get_task_priority (  )  [inline, static]

Return priority to assign the task.

The priority to be assigned to the Event Monitor Task This routine eliminates the dependency of this file on CPU_DB.

  • For VXWORKS platforms it fetches the priority from the CPU data base.
  • For all other platforms it just returns 0. This is okay, since no host platforms currently support task priorities

Referenced by createOutputTask().

static void initMsg ( void *  unused,
OutputMessage msg,
int  msg_size,
int  pcb_offset 
) [static]

This is the FPA initialization callback routine used to initialize each packet in the FPA pool.

Parameters:
unused This is usually the user context parameter. In this case it is unused.
msg The message packet to initialize.
msg_size The size, in bytes, of msg. In this case it is unused.
pcb_offset The offset, in bytes, of the packet control block. This parameter is provided by FPA so that the user may avoid stomping on the control block of this packet.

References ASC_clear(), _ASC_ascBdy_Raw0::counters, EMP_hdrClear(), _ASC_ascBdy_Raw0::hdr, _OutputMessage::pkt, and _ASC_ascBdy_Raw0::stats.

Referenced by createFpaPool().

static unsigned int output ( ASC asc,
OutputMessage msg 
) [static]

The datagram output routine. This is a FORK service callback routine.

Return values:
FORK_C_CONTINUE,to continue processing packets
Parameters:
asc The ASC context handle
msg The FORK messsage
This routine is generally executed in the context of ASC's output FORK task. It is responsible for completing the formatting of an ASC datagram and shoveling it off to the output device (the SDI).

References ASC_clear(), _OutputMessage::bridge, _ASC_ascBdy_Gzip0::buf, CompressIt(), _ASC_ascBdy_Raw0::counters, _ASC::db, dgmComplete(), _ASC_stats::eacc, _ASC_stats::ecompress, _ASC_stats::edir, EMP_hdrClear(), _ASC_stats::etotal, _ASC_stats::eunpack, _ASC_stats::frequency, _ASC_ascBdy_Raw0::hdr, _ASC_ascBdy_Gzip0::hdr, _ASC_ascBdy_Gzip0::len, LSD_sdiGetW(), LSD_sdiPdsDgmGet(), LSD_sdiSend(), LSD_sdiShrink(), _ASC::msg_pool, _ASC_stats::nmissed, _ASC_stats::nused, _OutputMessage::pkt, RND_TO, _ASC::sdi, _ASC_ascBdy_Raw0::stats, _ASC_ascBdy_Gzip0::stats, swap32bN(), and _ASC::zstream.

Referenced by AscEdsFlush().

static __inline void set_aem ( EBF_dir *  dir,
EBF_pkt *  pkt,
unsigned int  pktBytes 
) [static]

Locates the AEM data without doing a full directory. The pointer to the AEM contribution is stashed away in the EBF directory structure. This is a little sleazy, but that's where EDR_acdUnpack expects to find it.

Parameters:
dir The directory structure
pkt The event packet
pktBytes The number of bytes in the packet
This routine can be used only on single packet events and should be used iff the directory has not already been formed. The only reason this routine exists is for speed. In the case where the directory has already been formed, obviously there is no point in locating the AEM structure again. When applicable this routine is about 40% faster than doing a full directory structure (on the SUN DIR is around 3.8 usecs and this routine is around 2.5 usecs.)

References ASC_aem_locate().

Referenced by AscEdsProcess().

static void __inline swap32bN ( unsigned int *  buf,
int  n32 
) [static]

Inplace 32 swap to a big-endian buffer, noop on big-endian machines.

Parameters:
buf The 32-bit buffer to swap
n32 The number of 32-bit words to swap

Referenced by output().

static void * zlibFree ( void *  arg,
void *  address 
) [static]

Callback function used by ZLIB to free memory.

Returns:
A pointer to the memory to free
Parameters:
arg Arbitrary user parameter, unused in this routine
address The adddress of the memory to free
This is just a call-through to MBA_free.

Referenced by zlibInitStream().

static unsigned int zlibInitStream ( z_stream *  stream,
int  level 
) [static]

Does the one time initialization of the compression stream.

Return values:
0,on success
EMP_GENERROR,on error
Parameters:
stream The compression stream to initialize
level The compression level to use

References zlibFree(), and zlibMalloc().

Referenced by AscEdsConstruct().

static void * zlibMalloc ( void *  arg,
unsigned int  nitems,
unsigned int  size 
) [static]

Callback function used by ZLIB to allocate memory.

Returns:
A pointer to the allocated memory
Parameters:
arg Arbitrary user parameter, unused in this routine
nitems The number of items to allocate
size The size, in bytes, of an item
This is just a call-through to MBA_alloc.

Referenced by zlibInitStream().


Variable Documentation

unsigned char OpenReasons[16] [static]

Initial value:

{
  LSF_REASON_OPEN_K_START,      
  LSF_REASON_OPEN_K_START_OP,   
  LSF_REASON_OPEN_K_AUTO_TIME,  
  LSF_REASON_OPEN_K_AUTO_COUNT, 


                                
  LSF_REASON_OPEN_K_START,      
  LSF_REASON_OPEN_K_START_OP,   
  LSF_REASON_OPEN_K_START_AUTO, 
  LSF_REASON_OPEN_K_START,      

                                
  LSF_REASON_OPEN_K_RESUME,     
  LSF_REASON_OPEN_K_RESUME_OP,  
  LSF_REASON_OPEN_K_RESUME_AUTO,

                                
  LSF_REASON_OPEN_K_AUTO,       
  LSF_REASON_OPEN_K_AUTO_MODE,  
  LSF_REASON_OPEN_K_AUTO_TIME,  
  LSF_REASON_OPEN_K_AUTO_COUNT, 
  LSF_REASON_OPEN_K_AUTO_FULL   
}
Maps a closing reason into its complimentary open reason.

When a datagram is closed, it is highly likely that a new one will be opened. This new datagram needs a reason for being opened. In many cases this reopening is automatic, so the opening reason must be internally generated. This array fills that need, mapping an closing reason into its complimentary open reason.
Even though this maps all close reasons, some the close reasons are not automatically and likely will not be used. For completeness, a reasonable value is filled in. These entries are marked in the comments with an XX

Referenced by AscEdsFlush().


Generated on Wed Nov 21 19:11:52 2012 by  doxygen 1.5.8