Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-02 08:21:01

0001 
0002 // device_i.cc
0003 /* This defines the device class.  
0004  * This module inherits
0005  * its fsm from the activecomponent class
0006  * Its static implementation is inherited from the component class
0007  *
0008  * created June 9,1997
0009  *
0010  * author:
0011  *
0012  * module = %M% date = %D% Version = %I%
0013  * modifications: 
0014  *  none
0015  */
0016 
0017 
0018 #include <iostream>
0019 #include "daq_device.h"
0020 
0021 
0022 daq_device::daq_device()
0023 {
0024 
0025 }
0026 
0027 
0028 
0029 daq_device::~daq_device() 
0030 {
0031 }
0032 
0033 
0034 int daq_device::formatPacketHdr(int * adr)
0035 {
0036   packetdata_ptr sevt =  (packetdata_ptr) adr;
0037 
0038   sevt->sub_length = 6;
0039   
0040   // sevt->hdrversion = 1;
0041   // sevt->hdrlength = 6;
0042   // sevt->status = 0;
0043   
0044   sevt->hdrinfo = 0x01060000;
0045 
0046   sevt->sub_id =0;
0047   
0048   sevt->debug_length =0;
0049   sevt->error_length =0;
0050   
0051   // sevt->structure =0;
0052   // sevt->numDescWds =1;
0053   // sevt->endianism=2;
0054   // sevt->sub_padding=0;
0055 
0056   sevt->structureinfo = 0x00010200;
0057 
0058   sevt->sub_type =4;
0059   sevt->sub_decoding =0;
0060   return 0;
0061 }
0062 
0063