10 #include "daq_dta_structs.h"
42 #define DAQ_DTA_STRUCT(expr) __STRING(expr),sizeof(expr)
43 #define DAQ_DTA_ENDIANESS 0x04030201
44 #define DAQ_DTA_C_VERSION 0
45 #define DAQ_DTA_H_VERSION 0
61 inline void sw(u_int &x) {
64 inline void sw(
int &x) {
67 inline void sw(u_short &x) {
70 inline void sw(
short &x) {
76 inline void psw(u_int &x) {
77 if(do_swap) x = swap32(x) ;
79 inline void psw(
int &x) {
80 if(do_swap) x = swap32(x) ;
82 inline void psw(u_short &x) {
83 if(do_swap) x = swap16(x) ;
85 inline void psw(
short &x) {
86 if(do_swap) x = swap16(x) ;
91 inline u_int tsw(u_int x) {
92 if(do_swap)
return swap32(x) ;
95 inline int tsw(
int x) {
96 if(do_swap)
return swap32(x) ;
99 inline u_short tsw(u_short x) {
100 if(do_swap)
return swap16(x) ;
103 inline short tsw(
short x) {
104 if(do_swap)
return swap16(x) ;
109 inline short l2h(
short x) {
return l2h16(x) ; } ;
110 inline u_short l2h(u_short x) {
return l2h16(x) ; } ;
111 inline int l2h(
int x) {
return l2h32(x) ; } ;
112 inline u_int l2h(u_int x) {
return l2h32(x) ; } ;
114 inline short b2h(
short x) {
return b2h16(x) ; } ;
115 inline u_short b2h(u_short x) {
return b2h16(x) ; } ;
116 inline int b2h(
int x) {
return b2h32(x) ; } ;
117 inline u_int b2h(u_int x) {
return b2h32(x) ; } ;
127 void commit(u_int bytes=0) ;
137 daq_store *create(u_int bytes,
const char *name,
int rts_id,
const char *o_name, u_int obj_size) ;
139 void *request(u_int obj_cou) ;
140 void finalize(u_int obj_cou,
int s=0,
int row=0,
int pad=0) ;
148 inline size_t get_size_t() {
149 return hdr->obj_bytes ;
152 virtual const char *GetCVS()
const {
153 static const char cvs[]=
"Tag $Name: $: $Id: daq_dta.h,v 1.10 2018/04/10 12:13:31 tonko Exp $: built " __DATE__
" " __TIME__ ;
164 unsigned char *Byte ;
165 unsigned short *Short ;
166 unsigned int *Int32 ;
167 unsigned long long *Int64 ;