Squidstat API User Manual
Loading...
Searching...
No Matches
AisDeviceTracker.h
1#ifndef SQUIDSTATLIBRARY_AISDEVICETRACKER_H
2#define SQUIDSTATLIBRARY_AISDEVICETRACKER_H
3
4#include "AisErrorCode.h"
5#include "AisSquidstatGlobal.h"
6#include <QObject>
7#include <memory>
8
9
10
11class AisDeviceTrackerPrivate;
13
14
19class SQUIDSTATLIBRARY_EXPORT AisDeviceTracker final : public QObject
20{
21 Q_OBJECT
22public:
23 ~AisDeviceTracker() override;
24 static AisDeviceTracker *Instance();
25
38 AisErrorCode connectToDeviceOnComPort(const QString &comPort);
39
51 const AisInstrumentHandler &getInstrumentHandler(const QString &deviceName) const;
52
57 const std::list<QString> getConnectedDevices() const;
58
68
81 AisErrorCode updateFirmwareOnComPort(const QString& comport) const;
82
95
103 void saveLogToFile(bool save);
104
113 void setLogFilePath(const QString& path);
114
115signals:
121 void newDeviceConnected(const QString &deviceName);
122
127 void deviceDisconnected(const QString &deviceName);
128
129 void firmwareUpdateNotification(const QString& message);
130
131private:
134 void operator=(const AisDeviceTracker &);
135
136
137 std::unique_ptr<AisDeviceTrackerPrivate> m_data;
138};
139
140#endif
This class is used track device connections to the computer. It can establish connection with plugged...
Definition: AisDeviceTracker.h:20
void deviceDisconnected(const QString &deviceName)
a signal to be emitted whenever a device has been disconnected.
AisErrorCode connectToDeviceOnComPort(const QString &comPort)
establish a connection with a device connected on a USB port.
const AisInstrumentHandler & getInstrumentHandler(const QString &deviceName) const
get an instrument handler to control a specific device.
void saveLogToFile(bool save)
Allow to collect device error message in file for debugging purpose.
AisErrorCode updateFirmwareOnComPort(const QString &comport) const
update firmware on connected device at USB port.
void setLogFilePath(const QString &path)
This will help to change the log file directory.
int updateFirmwareOnAllAvailableDevices()
request firmware update for all available devices.
int connectAllPluggedInDevices()
connect all devices physically plugged to the computer.
const std::list< QString > getConnectedDevices() const
get a list of all the connected devices.
void newDeviceConnected(const QString &deviceName)
a signal to be emitted whenever a new connection has been successfully established with a device.
This class contains the possible error codes returned to the user when working with the API.
Definition: AisErrorCode.h:15
this class provides control of the device including starting, pausing, resuming and stopping an exper...
Definition: AisInstrumentHandler.h:24