Janis Streib
19.05.23 b21ff09151ca7e87348f1ea38944decc1f46f5db
commit | author | age
4244cc 1 // G4Hub.cpp: implementation of the CG4Hub class.
JS 2 //
3 //////////////////////////////////////////////////////////////////////
4
5
6 #include "G4Hub.h"
7 #include <string.h>
8
9 //////////////////////////////////////////////////////////////////////
10 // Construction/Destruction
11 //////////////////////////////////////////////////////////////////////
12 CG4Hub::CG4Hub()
13 {
14     memset(m_col,0,sizeof(float)*3);    // black
15     for (int i=0;i<3;i++)
16         m_senActive[i]=false;
17 }
18
19 CG4Hub::~CG4Hub()
20 {
21 }
22
23 void CG4Hub::SetPnoData(float *pno,int sens)
24 {
25   //    float scale=2.0f;
26   //    float scale=0.01;
27   float scale=1.0f;
28     memcpy(m_pno[sens],pno,sizeof(float)*6);
29     for (int i=0;i<3;i++)
30         m_pno[sens][i]*=scale;
31     m_senActive[sens]=true;
32 }
33
34 int CG4Hub::GetId()
35 {
36     return m_id;
37 }
7fde24 38 uint32_t CG4Hub::GetDigIOData()
JS 39 {
40     return digio;
41 }
42 void CG4Hub::SetDigIOData(uint32_t data)
43 {
44     digio = data;
45 }
4244cc 46
d05d79 47 bool CG4Hub::IsSenActive(int i)
JS 48 {
49     return m_senActive[i];
50 }
4244cc 51
JS 52
53 void CG4Hub::SetId(int id)
54 {
55     m_id=id;
56 }
57 //#include <stdio.h>
58 float (*CG4Hub::GetPnoData())[6]
59 {
60     return m_pno;
61 }