DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DeviceManager.hpp
Go to the documentation of this file.
1
8#ifndef SSPMODULES_SRC_ANLBOARD_DEVICEMANAGER_HPP_
9#define SSPMODULES_SRC_ANLBOARD_DEVICEMANAGER_HPP_
10
11//#include "ftd2xx.h"
12//#include "USBDevice.h"
13#include "EthernetDevice.hpp"
14
15#include <vector>
16#include <map>
17#include <iostream>
18#include <iomanip>
19#include <string>
20#include <stdint.h>
21#include <cstdio>
22#include <cstring>
23#include <unistd.h>
24#include <memory>
25
26namespace dunedaq {
27namespace sspmodules {
28
30
31public:
32
33 //Get reference to instance of DeviceManager singleton
34 static DeviceManager& Get();
35
36 //unsigned int GetNUSBDevices();
37
38 //Open a device and return a pointer containing a handle to it
39 Device* OpenDevice(unsigned int deviceId, bool slowControlOnly=false);
40
41 //Interrogate FTDI for list of devices. GetNUSBDevices and OpenDevice will call this
42 //if it has not yet been run, so it should not normally be necessary to call this directly.
43 void RefreshDevices();
44
45private:
46
48
49 DeviceManager(DeviceManager const&); //Don't implement
50
51 void operator=(DeviceManager const&); //Don't implement
52
53 //List of USB devices on FTDI link
54 //std::vector<USBDevice> fUSBDevices;
55
56 //Ethernet devices keyed by IP address
57 std::map<unsigned long,std::unique_ptr<EthernetDevice> > fEthernetDevices; // NOLINT(runtime/int)
58
59
61};
62
63} // namespace sspmodules
64} // namespace dunedaq
65
66#endif // SSPMODULES_SRC_ANLBOARD_DEVICEMANAGER_HPP_
void operator=(DeviceManager const &)
std::map< unsigned long, std::unique_ptr< EthernetDevice > > fEthernetDevices
DeviceManager(DeviceManager const &)
Device * OpenDevice(unsigned int deviceId, bool slowControlOnly=false)
Including Qt Headers.