Buffer Interface
Public Member Functions | Friends | List of all members
BufferAcquisition::BufferInterface::Properties Class Reference

Static properties of an open BufferAcquisition::BufferInterface. More...

#include <BufferInterfaceProperties.h>

Public Member Functions

bool test (const Trait trait) const
 
InterfaceType interface_type (void) const
 
BFU32 vfg_number (void) const
 
std::string model_name (void) const
 
bool get_model_name (char *const strBuf, size_t *const pBufSize) const
 
std::string family_name (void) const
 
bool get_family_name (char *const strBuf, size_t *const pBufSize) const
 

Friends

class ::BufferAcquisition::BufferInterface
 

Detailed Description

Static properties of an open BufferAcquisition::BufferInterface.

Member Function Documentation

std::string BufferInterface::Properties::family_name ( void  ) const

Return the family name of the opened board.

Returns
The family name of the opened board.
Exceptions
BFCiException- Thrown if the string cannot be retrieved.

References BFCiException::check(), and MAX_STRING.

212 {
213  char modelStr [MAX_STRING], familyStr [MAX_STRING];
214  BFU32 familyIndex, ciFamily;
215 
216  BFCiException::check(m_pd.board(), BFGetBoardStrings(m_pd.board(), modelStr, sizeof(modelStr), familyStr, sizeof(familyStr), &familyIndex, &ciFamily));
217 
218  return familyStr;
219 }
unsigned long BFU32
Definition: BFTypeNT.h:55
#define MAX_STRING
Definition: BFType.h:65
static void check(Bd hBoard, const BFU32 error)
Definition: BFException.cpp:212
bool BufferInterface::Properties::get_family_name ( char *const  strBuf,
size_t *const  pBufSize 
) const

Retrieve the family name of the opened board.

Parameters
[out]strBuf- Output buffer for the name string, filled as completely as possible. This may be nullptr.
[in,out]pBufSize- As input, the size of the strBuf (if not nullptr). As output, the buffer size required to retrieve the entire mode name string.
Returns
True on success, false otherwise.
Exceptions
BFCiException- Thrown if the string cannot be retrieved.
234 {
235  return BufInHelpers::set_str(family_name(), strBuf, pBufSize);
236 }
std::string family_name(void) const
Definition: BufferInterfaceProperties.cpp:211
bool BufferInterface::Properties::get_model_name ( char *const  strBuf,
size_t *const  pBufSize 
) const

Retrieve the model name of the opened board.

Parameters
[out]strBuf- Output buffer for the name string, filled as completely as possible. This may be nullptr.
[in,out]pBufSize- As input, the size of the strBuf (if not nullptr). As output, the buffer size required to retrieve the entire mode name string.
Returns
True on success, false otherwise.
Exceptions
BFCiException- Thrown if the string cannot be retrieved.
200 {
201  return BufInHelpers::set_str(model_name(), strBuf, pBufSize);
202 }
std::string model_name(void) const
Definition: BufferInterfaceProperties.cpp:177
InterfaceType BufferInterface::Properties::interface_type ( void  ) const

Return the BufferAcquisition::InterfaceType of the opened board.

Returns
The BufferAcquisition::InterfaceType of the opened board.

References BufferAcquisition::Analog, BiException::check(), BufferAcquisition::CL, BufferAcquisition::CXP, BufferAcquisition::Dif, and BufferAcquisition::Unknown.

97 {
98  if (BFIsCXP(m_pd.board()))
99  return InterfaceType::CXP;
100  else if (BFIsCL(m_pd.board()))
101  return InterfaceType::CL;
102 
103  BFU32 model;
104  BiException::check(m_pd.board(), BiBrdInquire(m_pd.board(), BFBrdInqModel, &model) );
105 
106  switch (model)
107  {
108  case BFBrdValModel11: return InterfaceType::Dif;
109  case BFBrdValModel12: return InterfaceType::Dif;
110  case BFBrdValModel13: return InterfaceType::Dif;
111  case BFBrdValModel14: return InterfaceType::Dif;
112  case BFBrdValModel23: return InterfaceType::Dif;
113  case BFBrdValModel24: return InterfaceType::Dif;
114  case BFBrdValModel44: return InterfaceType::Dif;
115  case BFBrdValModel010: return InterfaceType::Analog;
116  case BFBrdValModel110: return InterfaceType::Analog;
117  case BFBrdValModel220: return InterfaceType::Analog;
118  case BFBrdValModel330: return InterfaceType::Analog;
119  case BFBrdValModel440: return InterfaceType::Analog;
120  case BFBrdValModelR64Dif: return InterfaceType::Dif;
121  case BFBrdValModelR64ClF: return InterfaceType::CL;
122  case BFBrdValModelR64ClD: return InterfaceType::CL;
123  case BFBrdValModelR64DifB: return InterfaceType::Dif;
124  case BFBrdValModelR64ClFB: return InterfaceType::CL;
125  case BFBrdValModelR64ClDB: return InterfaceType::CL;
126  case BFBrdValModelR64DifH: return InterfaceType::Dif;
127  case BFBrdValModelR64ClFH: return InterfaceType::CL;
128  case BFBrdValModelR64ClDH: return InterfaceType::CL;
129  case BFBrdValModelR64DifHB: return InterfaceType::Dif;
130  case BFBrdValModelR64ClFHB: return InterfaceType::CL;
131  case BFBrdValModelR64ClDHB: return InterfaceType::CL;
132  case BFBrdValModelKbn2D: return InterfaceType::CL;
133  case BFBrdValModelKbn2F: return InterfaceType::CL;
134  case BFBrdValModelKbn4D: return InterfaceType::CL;
135  case BFBrdValModelKbn4F: return InterfaceType::CL;
136  case BFBrdValModelNeonB: return InterfaceType::CL;
137  case BFBrdValModelNeonD: return InterfaceType::CL;
138  case BFBrdValModelNeonQ: return InterfaceType::CL;
139  case BFBrdValModelNeonDif: return InterfaceType::Dif;
140  case BFBrdValModelAltaAN1: return InterfaceType::Analog;
141  case BFBrdValModelAltaAN2: return InterfaceType::Analog;
142  case BFBrdValModelAltaAN4: return InterfaceType::Analog;
143  case BFBrdValModelAltaCO1: return InterfaceType::Analog;
144  case BFBrdValModelAltaCO2: return InterfaceType::Analog;
145  case BFBrdValModelAltaCO4: return InterfaceType::Analog;
146  case BFBrdValModelKbnCXP1: return InterfaceType::CXP;
147  case BFBrdValModelKbnCXP2: return InterfaceType::CXP;
148  case BFBrdValModelKbnCXP4: return InterfaceType::CXP;
149  case BFBrdValModelCtnCXP4: return InterfaceType::CXP;
150  case BFBrdValModelCtnCXP2: return InterfaceType::CXP;
151  case BFBrdValModelAxn1xE: return InterfaceType::CL;
152  case BFBrdValModelAxn2xE: return InterfaceType::CL;
153  case BFBrdValModelAxn2xB: return InterfaceType::CL;
154  case BFBrdValModelAxn4xB: return InterfaceType::CL;
155  }
156 
157  return InterfaceType::Unknown;
158 }
unsigned long BFU32
Definition: BFTypeNT.h:55
static void check(Bd hBoard, const BFU32 error)
Definition: BFException.cpp:306
std::string BufferInterface::Properties::model_name ( void  ) const

Return the model name of the opened board.

Returns
The model name of the opened board.
Exceptions
BFCiException- Thrown if the string cannot be retrieved.

References BFCiException::check(), and MAX_STRING.

178 {
179  char modelStr [MAX_STRING], familyStr [MAX_STRING];
180  BFU32 familyIndex, ciFamily;
181 
182  BFCiException::check(m_pd.board(), BFGetBoardStrings(m_pd.board(), modelStr, sizeof(modelStr), familyStr, sizeof(familyStr), &familyIndex, &ciFamily));
183 
184  return modelStr;
185 }
unsigned long BFU32
Definition: BFTypeNT.h:55
#define MAX_STRING
Definition: BFType.h:65
static void check(Bd hBoard, const BFU32 error)
Definition: BFException.cpp:212
bool BufferInterface::Properties::test ( const Trait  trait) const

Determine if the opened board possesses the specified BufferAcquisition::Trait.

Returns
True or false, whether the opened board possesses the BufferAcquisition::Trait.

References BufferAcquisition::Alta, BufferAcquisition::Alta1, BufferAcquisition::Alta2, BufferAcquisition::Alta4, BufferAcquisition::AltaAN, BufferAcquisition::AltaCO, BufferAcquisition::AltaYPC, BufferAcquisition::Aon, BufferAcquisition::AonCXP1, BufferAcquisition::Axn, BufferAcquisition::Axn1xE, BufferAcquisition::Axn2xB, BufferAcquisition::Axn2xE, BufferAcquisition::Axn4xB, BufferAcquisition::CL, BufferAcquisition::Ctn, BufferAcquisition::CtnCXP2, BufferAcquisition::CtnCXP4, BufferAcquisition::CXP, BufferAcquisition::EncDiv, BufferAcquisition::Gn2, BufferAcquisition::Kbn, BufferAcquisition::Kbn2, BufferAcquisition::Kbn4, BufferAcquisition::KbnBase, BufferAcquisition::KbnCXP, BufferAcquisition::KbnCXP1, BufferAcquisition::KbnCXP2, BufferAcquisition::KbnCXP4, BufferAcquisition::KbnFull, BufferAcquisition::Master, BufferAcquisition::Neon, BufferAcquisition::NeonBase, BufferAcquisition::NeonD, BufferAcquisition::NeonDif, BufferAcquisition::NeonQ, BufferAcquisition::NTG, BufferAcquisition::PLDA, BufferAcquisition::PMC, BufferAcquisition::R2, BufferAcquisition::R3, BufferAcquisition::R64, BufferAcquisition::R64Board, BufferAcquisition::Rv, BufferAcquisition::Slave, BufferAcquisition::StreamSyncDMA, and BufferAcquisition::Synthetic.

36 {
37  switch (trait)
38  {
39  case Trait::R2: return !!BFIsR2(m_pd.board());
40  case Trait::Rv: return !!BFIsRv(m_pd.board());
41  case Trait::R64: return !!BFIsR64(m_pd.board());
42  case Trait::R64Board: return !!BFIsR64Board(m_pd.board());
43  case Trait::CL: return !!BFIsCL(m_pd.board());
44  case Trait::R3: return !!BFIsR3(m_pd.board());
45  case Trait::PMC: return !!BFIsPMC(m_pd.board());
46  case Trait::PLDA: return !!BFIsPLDA(m_pd.board());
47  case Trait::StreamSyncDMA: return !!BFIsStreamSyncDMA(m_pd.board());
48  case Trait::Kbn: return !!BFIsKbn(m_pd.board());
49  case Trait::Kbn4: return !!BFIsKbn4(m_pd.board());
50  case Trait::Kbn2: return !!BFIsKbn2(m_pd.board());
51  case Trait::KbnBase: return !!BFIsKbnBase(m_pd.board());
52  case Trait::KbnFull: return !!BFIsKbnFull(m_pd.board());
53  case Trait::Neon: return !!BFIsNeon(m_pd.board());
54  case Trait::NeonBase: return !!BFIsNeonBase(m_pd.board());
55  case Trait::NeonD: return !!BFIsNeonD(m_pd.board());
56  case Trait::NeonQ: return !!BFIsNeonQ(m_pd.board());
57  case Trait::NeonDif: return !!BFIsNeonDif(m_pd.board());
58  case Trait::Alta: return !!BFIsAlta(m_pd.board());
59  case Trait::AltaAN: return !!BFIsAltaAN(m_pd.board());
60  case Trait::AltaCO: return !!BFIsAltaCO(m_pd.board());
61  case Trait::AltaYPC: return !!BFIsAltaYPC(m_pd.board());
62  case Trait::Alta1: return !!BFIsAlta1(m_pd.board());
63  case Trait::Alta2: return !!BFIsAlta2(m_pd.board());
64  case Trait::Alta4: return !!BFIsAlta4(m_pd.board());
65  case Trait::Master: return !!BFIsMaster(m_pd.board());
66  case Trait::Slave: return !!BFIsSlave(m_pd.board());
67  case Trait::EncDiv: return !!BFIsEncDiv(m_pd.board());
68  case Trait::NTG: return !!BFIsNTG(m_pd.board());
69  case Trait::KbnCXP: return !!BFIsKbnCXP(m_pd.board());
70  case Trait::KbnCXP1: return !!BFIsKbnCXP1(m_pd.board());
71  case Trait::KbnCXP2: return !!BFIsKbnCXP2(m_pd.board());
72  case Trait::KbnCXP4: return !!BFIsKbnCXP4(m_pd.board());
73  case Trait::Gn2: return !!BFIsGn2(m_pd.board());
74  case Trait::Ctn: return !!BFIsCtn(m_pd.board());
75  case Trait::CXP: return !!BFIsCXP(m_pd.board());
76  case Trait::CtnCXP2: return !!BFIsCtnCXP2(m_pd.board());
77  case Trait::CtnCXP4: return !!BFIsCtnCXP4(m_pd.board());
78  case Trait::Axn: return !!BFIsAxn(m_pd.board());
79  case Trait::Axn1xE: return !!BFIsAxn1xE(m_pd.board());
80  case Trait::Axn2xE: return !!BFIsAxn2xE(m_pd.board());
81  case Trait::Axn2xB: return !!BFIsAxn2xB(m_pd.board());
82  case Trait::Axn4xB: return !!BFIsAxn4xB(m_pd.board());
83  case Trait::Aon: return !!BFIsAon(m_pd.board());
84  case Trait::AonCXP1: return !!BFIsAonCXP1(m_pd.board());
85  case Trait::Synthetic: return !!BFIsSynthetic(m_pd.board());
86  }
87 
88  return false;
89 }
BFU32 BufferInterface::Properties::vfg_number ( void  ) const

Return the VFG number of the opened board.

Returns
The VFG number of the opened board.
166 {
167  return BFGetVFGNum(m_pd.board());
168 }

Friends And Related Function Documentation

friend class ::BufferAcquisition::BufferInterface
friend

The documentation for this class was generated from the following files: