| | |
| | | if(!use_text) { |
| | | p << osc::BeginBundleImmediate; |
| | | } |
| | | p << osc::BeginMessage( (string("/g4/hub/") + std::to_string(prs->hubList[i].GetId()) + string("/digio")).c_str()); |
| | | std::ostringstream ss; |
| | | if(use_text) { |
| | | ss << prs->hubList[i].GetDigIOData(); |
| | | auto res = ss.str(); |
| | | p << res.c_str(); |
| | | } else { |
| | | p << osc::int64(prs->hubList[i].GetDigIOData()); |
| | | } |
| | | p << osc::EndMessage; |
| | | auto dat = prs->hubList[i].GetPnoData(); |
| | | for(int j=0;j<G4_SENSORS_PER_HUB;j++) { |
| | | if(!prs->hubList[i].IsSenActive(j)){ |
| | |
| | | {
|
| | | return m_id;
|
| | | }
|
| | | uint32_t CG4Hub::GetDigIOData()
|
| | | {
|
| | | return digio;
|
| | | }
|
| | | void CG4Hub::SetDigIOData(uint32_t data)
|
| | | {
|
| | | digio = data;
|
| | | }
|
| | |
|
| | | bool CG4Hub::IsSenActive(int i)
|
| | | {
|
| | |
| | | int GetId();
|
| | | void SetPnoData(float* pno,int sen);
|
| | | float (*GetPnoData())[6];
|
| | | void SetDigIOData(uint32_t pno);
|
| | | uint32_t GetDigIOData();
|
| | | bool IsSenActive(int i);
|
| | | CG4Hub();
|
| | | virtual ~CG4Hub();
|
| | |
| | | float m_col[3][3];
|
| | | int m_id;
|
| | | float m_pno[G4_SENSORS_PER_HUB][6];
|
| | | uint32_t digio;
|
| | | };
|
| | |
|
| | | #endif // !defined(AFX_G4HUB_H__41DD193E_B016_4FF7_93E6_CF8AEC652FF1__INCLUDED_)
|
| | |
| | | for (int a=0;a<m_numHubs;a++){
|
| | | if ((unsigned int)prs->hubList[a].GetId()==m_pframeData[i].hub){
|
| | | prs->hubreadmap|=(0x01<<a);
|
| | | prs->hubList[a].SetDigIOData(m_pframeData[i].dig_io); // set digio
|
| | | for (int j=0;j<G4_SENSORS_PER_HUB;j++){
|
| | | if (m_pframeData[i].stationMap&(0x01<<j))
|
| | | prs->hubList[a].SetPnoData(m_pframeData[i].sfd[j].pos,j); // set it
|