-
Notifications
You must be signed in to change notification settings - Fork 26
/
dataBlockHdr.h
78 lines (69 loc) · 2.29 KB
/
dataBlockHdr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
** dataBlockHdr.h
**
** Author: $Author: purschke $
** Date: $Date: 2000/07/21 01:51:11 $
**
** $Log: dataBlockHdr.h,v $
** Revision 1.1.1.1 2000/07/21 01:51:11 purschke
** mlp -- adding the new automakified "basic" module to CVS.
**
**
** Revision 1.3 1998/12/11 22:01:15 markacs
** (stephen markacs) adding log into cvs tags
**
*/
/*
**
** dataBlockHdr.h
**
** This file defines the descriptor for the data block and some constants
** used for interpreting, accessing or storing data in the descriptor.
** It also defines the default setting for all of the data descriptor
** fields, even those set by the user.
**/
#ifndef _DATABLOCKHDR_
#define _DATABLOCKHDR_
/*
** Use C linkage
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef
struct dataBlockHdr {
BYTE wordSize ; /* "Word" size used to store packet data */
BYTE addrLength ; /* number of bytes used for channel address*/
BYTE hitLength ; /* Length of a single "hit" in bytes */
BYTE dataPadding ; /* Padding of the data block */
SWORD hitFormat ; /* Format of a single hit */
SWORD numEntries ; /* Number of "objects" stored in packet *
* (definition depends on packetStruct) */
} DATABLOCKHDR, * DATABLOCKHDR_ptr;
/*
** These are the default settings for all of the fields
** in the data descriptor. Some of the fields are user specified,
** but still have default values listed here.
*/
#define CURRENT_NUM_ENTRIES 0
#define CURRENT_WORD_SIZE 0
#define CURRENT_HIT_LENGTH 0
#define CURRENT_HIT_FORMAT 0
#define CURRENT_ADDR_LENGTH 0
#define CURRENT_DATA_PADDING 0
#define CURRENT_DESC_LENGTH 2
#define CURRENT_UNSTRUCT_DESC_LENGTH 1
CONSTANT UINT currentNumEntries = CURRENT_NUM_ENTRIES;
CONSTANT UINT currentWordSize = CURRENT_WORD_SIZE;
CONSTANT UINT currentHitLength = CURRENT_HIT_LENGTH;
CONSTANT UINT currentHitFormat = CURRENT_HIT_FORMAT;
CONSTANT UINT currentAddrLength = CURRENT_ADDR_LENGTH;
CONSTANT UINT currentDataPadding = CURRENT_DATA_PADDING;
CONSTANT UINT currentDescLength = CURRENT_DESC_LENGTH;
CONSTANT UINT currentUnstructDescLength = CURRENT_UNSTRUCT_DESC_LENGTH;
#ifdef __cplusplus
}
/* end of extern "C" */
#endif
#endif
/* end the ifndef in _DATABLOCKHDR_ block */