This commit is contained in:
2021-07-15 13:44:42 +02:00
parent a127f8c97a
commit 8354395f64
14 changed files with 216 additions and 42 deletions

View File

@ -36,6 +36,7 @@ std::string ToString(const defs::dacIndex s);
std::string ToString(const std::vector<defs::dacIndex> &vec);
std::string ToString(const defs::burstMode s);
std::string ToString(const defs::timingSourceType s);
std::string ToString(const defs::EthernetInterface s);
std::string ToString(const slsDetectorDefs::xy &coord);
std::ostream &operator<<(std::ostream &os, const slsDetectorDefs::xy &coord);
@ -297,6 +298,7 @@ template <> defs::readoutMode StringTo(const std::string &s);
template <> defs::dacIndex StringTo(const std::string &s);
template <> defs::burstMode StringTo(const std::string &s);
template <> defs::timingSourceType StringTo(const std::string &s);
template <> defs::EthernetInterface StringTo(const std::string &s);
template <> uint32_t StringTo(const std::string &s);
template <> uint64_t StringTo(const std::string &s);

View File

@ -394,6 +394,29 @@ typedef struct {
*/
enum timingSourceType { TIMING_INTERNAL, TIMING_EXTERNAL };
#ifdef __cplusplus
enum class EthernetInterface : int32_t {
#else
enum EthernetInterface {
#endif
NONE = 0,
I3GBE = 1 << 1,
I10GBE = 1 << 2,
ALL = I3GBE | I10GBE
};
#ifdef __cplusplus
inline EthernetInterface operator|(EthernetInterface a,
EthernetInterface b) {
return EthernetInterface(static_cast<int32_t>(a) |
static_cast<int32_t>(b));
}
inline bool operator&(EthernetInterface a, EthernetInterface b) {
return (static_cast<int32_t>(a) & static_cast<int32_t>(b));
}
#endif
#ifdef __cplusplus
/** scan structure */