/[PAMELA software]/chewbacca/event/HB_HKBuffer_INFN.h
ViewVC logotype

Contents of /chewbacca/event/HB_HKBuffer_INFN.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Tue Sep 23 07:19:48 2008 UTC (16 years, 2 months ago) by mocchiut
Branch: v0r00, MAIN
CVS Tags: v1r02, v1r00, v1r01, start, v10RED, v9r00, v9r01, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
Imported sources, 23/09/2008

1 /****************************************************************************
2 * F i l e D a t a
3 * $Id: HB_HKBuffer_INFN.h,v 1.1 2008-01-11 17:14:20 messineo Exp $
4 * $Revision: 1.1 $
5 * $Date: 2008-01-11 17:14:20 $
6 * $RCSfile: HB_HKBuffer_INFN.h,v $
7 *
8 ****************************************************************************
9 * S W D e v e l o p m e n t E n v i r o n m e n t
10 *
11 * $Author: messineo $
12 * :
13 ****************************************************************************
14 *
15 *****************************************************************************/
16
17 #ifndef _HB_HKBUFFER_INFN_H
18 #define _HB_HKBUFFER_INFN_H
19
20
21 /*============================= Include File ================================*/
22
23 #ifndef I386
24 #include <src/SRAMManager/SRAMPageManager/SM_SRAMPageManager_p.h>
25 #include <src/BasicSW/RTEMSInterface/OS_rtems_p.h>
26 #include <src/MCMDManager/MCMDArea/MA_MCMDArea_p.h>
27 #include <src/INFN/OS_rtems_INFN_p.h>
28 #endif // I386
29
30 #ifdef OLDANALISI
31 #include <src/INFN/CM_Common_INFN.h>
32 #include <src/INFN/DAQ_IDAQ_INFN.h>
33 #endif // OLDANALISI
34
35 #define UINT32 unsigned int
36 /*============================ Global define ================================*/
37
38 #define HB_SKETCHSIZE SM_SKETCHSIZE
39
40
41 #define HB_BUF_TMTC_SIZE (20*1024)
42 #define HB_BUF_MCMD_SIZE (20*1024)
43 #define HB_BUF_LOG_SIZE ( 6*1024)
44 #define HB_BUF_VARDUMP_SIZE PRH_TOTAL_VAR_SIZE
45 #define HB_BUF_ARRDUMP_SIZE PRH_TOTAL_ARR_SIZE
46 #define HB_BUF_TABDUMP_SIZE PRH_TOTAL_TAB_SIZE
47 #define HB_BUF_RUNHEADER_SIZE (1*1024)
48 #define HB_BUF_RUNTRAILER_SIZE (1*1024)
49 #define HB_BUF_SKETCHBOARD_SIZE (64*1024)
50 #define HB_BUF_USERDATA_SIZE (64*1024)
51
52 /* number of user defined buffer */
53 #define HB_USERDATA_NO 4
54
55 #define HB_HEADER_1 0xFA
56 #define HB_HEADER_2 0xFE
57 #define HB_HEADER_3 0xDE
58
59 #define HB_PKTTYPE_PHYS_PKT 0x10 /* Experiment Event Packet */
60 #define HB_PKTTYPE_FORCED_PKT 0x11 /* Force Idaq Cmd-queue Event Packet */
61 #define HB_PKTTYPE_CALIB_TRK 0x12 /* Tracker Calibration Event Packet */
62 #define HB_PKTTYPE_CALIB_TRG 0x13 /* Trigger Calibration Event Packet */
63 #define HB_PKTTYPE_CALIB_CAL 0x14 /* Calorimeter Calibration Event Packet */
64 #define HB_PKTTYPE_CALIB_TRD 0x15 /* TRD Calibration Event Packet */
65 #define HB_PKTTYPE_CALIB_TOF 0x16 /* TOF Calibration Event Packet */
66 #define HB_PKTTYPE_CALIB_S4 0x17 /* S4 Calibration Event Packet */
67 #define HB_PKTTYPE_RUNHEADER 0x20 /* The starting of a Run */
68 #define HB_PKTTYPE_RUNTRAILER 0x21 /* The ending of a Run */
69 #define HB_PKTTYPE_ALARM 0x30 /* TBD */
70 #define HB_PKTTYPE_KHB 0x40 /* TBD */
71 #define HB_PKTTYPE_LOG 0x50 /* Log block */
72 #define HB_PKTTYPE_VARDUMP 0x51 /* ParamDump block var*/
73 #define HB_PKTTYPE_ARRDUMP 0x52 /* ParamDump block arr*/
74 #define HB_PKTTYPE_TABDUMP 0x53 /* ParamDump block tab*/
75 #define HB_PKTTYPE_TMTC 0x54 /* TMTC block */
76 #define HB_PKTTYPE_MCMD 0x55 /* MCMD block */
77
78 /*============================== global types ==============================*/
79
80
81
82
83 /*****************************************************************************/
84 /*=========================== Structure define ==============================*/
85
86 typedef struct {
87 // TBD:
88 UINT32 info1;
89 UINT32 info2;
90 } HB_RUN_HEADER_INFO;
91
92 typedef struct {
93 // TBD:
94 UINT32 info1;
95 UINT32 info2;
96 } HB_RUN_TRAILER_INFO;
97
98 /*****************************************************************************/
99 /*============================ Enumerate define =============================*/
100 typedef enum {
101 HB_NULL,
102 HB_TMTC,
103 HB_MCMD,
104 HB_LOG,
105 HB_VARDUMP,
106 HB_ARRDUMP,
107 HB_TABDUMP,
108 HB_SKETCHBOARD,
109 HB_RUNHEADER,
110 HB_RUNTRAILER,
111 HB_USERDATA0,
112 HB_USERDATA1,
113 HB_USERDATA2,
114 HB_USERDATA3,
115 HB_MAX
116 } HB_BUF;
117
118 /*===========================================================================*/
119
120
121
122 #ifndef I386
123 static status_code HB_SemP();
124 static status_code HB_SemV();
125 status_code HB_Init();
126 static status_code HB_InitBuf_NoLock(HB_BUF bufid);
127 status_code HB_InitBuf(HB_BUF bufid);
128 unsigned int HB_SpaceLeft(HB_BUF bufid);
129 status_code HB_Store(HB_BUF bufid,unsigned short int len,void *dataptr,TI_TIME obt);
130 status_code HB_WriteToPIF();
131 status_code HB_SaveBuffer2MM(DAQ_CMD_BUF *buffer, FS_FILEID id,UINT32 timeout);
132
133 status_code HB_SaveHBBuffer2MM(HB_BUF bufid,UINT32 timeout);
134 status_code HB_SetRunHeaderInfo( /* params TBD */ );
135 status_code HB_SetRunTrailerInfo( /* params TBD */ );
136 #endif // I386
137
138
139
140 #endif // _HB_HKBUFFER_INFN_H
141
142

  ViewVC Help
Powered by ViewVC 1.1.23