#include "AisDeviceTracker.h"
#include "AisExperiment.h"
#include "AisInstrumentHandler.h"
#include "experiments/builder_elements/AisConstantPotElement.h"
#include <QCoreApplication>
#include <QDebug>
#define COMPORT "COM1"
#define CHANNEL 0
int main()
{
char** test = nullptr;
int args;
QCoreApplication a(args, test);
auto customExperiment = std::make_shared<AisExperiment>();
customExperiment->appendElement(cvElement, 1);
qDebug() << "Timestamp: " << data.timestamp << " Current: " << data.current << " Voltage: " << data.workingElectrodeVoltage << " CE Voltage : " << data.counterElectrodeVoltage;
});
qDebug() << "Timestamp: " << data.timestamp << " Frequency: " << data.frequency << "" << data.absoluteImpedance;
});
qDebug() <<
"New element starting: " << info.
stepName;
});
qDebug() << "Experiment Stopped Signal " << channel << "Reason : " << reason;
});
qDebug() << "Device Error: " << error;
});
};
qDebug() << "New Device Connected: " << deviceName;
});
qDebug() << "New Device Connected: " << deviceName;
auto& handler = tracker->getInstrumentHandler(deviceName);
connectSignals(handler);
AisErrorCode error = handler.uploadExperimentToChannel(CHANNEL, customExperiment);
if (error) {
qDebug() << error.message();
return;
}
error = handler.startUploadedExperiment(CHANNEL);
if (error) {
qDebug() << error.message();
return;
}
});
AisErrorCode error = tracker->connectToDeviceOnComPort(COMPORT);
if (error != error.Success) {
qDebug() << error.message();
return 0;
}
return a.exec();
}
an experiment that simulates a constant applied voltage.
Definition AisConstantPotElement.h:18
void deviceDisconnected(const QString &deviceName)
a signal to be emitted whenever a device has been disconnected.
static AisDeviceTracker * Instance()
get the instance of the device tracker.
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:18
this class provides control of the device including starting, pausing, resuming and stopping an exper...
Definition AisInstrumentHandler.h:27
void activeACDataReady(uint8_t channel, const AisACData &ACData)
a signal that is emitted whenever new AC data for an active experiment are ready.
void deviceError(uint8_t channel, const QString &error)
a signal that is emitted whenever device send any critical error.
void activeDCDataReady(uint8_t channel, const AisDCData &DCData)
a signal that is emitted whenever new DC data for an active experiment are ready.
void experimentNewElementStarting(uint8_t channel, const AisExperimentNode &stepInfo)
a signal that is emitted whenever a new elemental experiment has started.
void experimentStopped(uint8_t channel, const QString &reason)
a signal that is emitted whenever an experiment was stopped manually or has completed.
A structure containing AC data collected from the instrument.
Definition AisDataPoints.h:44
A structure containing DC data collected from the instrument.
Definition AisDataPoints.h:11
A structure containing some information regarding the running element.
Definition AisDataPoints.h:113
QString stepName
This is the name of the current element running.
Definition AisDataPoints.h:118