Add interface methods startPhysicalLayer() / stopPhysicalLayer()
This commit is contained in:
parent
37d45f3c69
commit
2cd73aaa86
@ -85,6 +85,38 @@ PLUGIN_STATE ATBDeviceControllerPlugin::initDCPlugin(QObject *eventReceiver, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ATBDeviceControllerPlugin::startPhysicalLayer()
|
||||||
|
{
|
||||||
|
if (this->pluginState == PLUGIN_STATE::NOT_INITIALIZED)
|
||||||
|
{
|
||||||
|
qCritical() << "ATBDeviceControllerPlugin::startPhysicalLayer(): plugin is not initialized";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// open serial port
|
||||||
|
hw->dc_openSerial(5, "115200", this->serialPortName, 1);
|
||||||
|
|
||||||
|
hw->dc_autoRequest(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ATBDeviceControllerPlugin::stopPhysicalLayer()
|
||||||
|
{
|
||||||
|
if (this->pluginState == PLUGIN_STATE::NOT_INITIALIZED)
|
||||||
|
{
|
||||||
|
qCritical() << "ATBDeviceControllerPlugin::startPhysicalLayer(): plugin is not initialized";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
hw->dc_autoRequest(false);
|
||||||
|
|
||||||
|
hw->dc_closeSerial();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Handle Mode-Changes --------------------------------------------------------
|
// Handle Mode-Changes --------------------------------------------------------
|
||||||
|
|
||||||
void ATBDeviceControllerPlugin::onChangedProgramModeToSELL()
|
void ATBDeviceControllerPlugin::onChangedProgramModeToSELL()
|
||||||
|
@ -71,7 +71,8 @@ public slots:
|
|||||||
void onChangedProgramModeToIDLE();
|
void onChangedProgramModeToIDLE();
|
||||||
void onChangedProgramModeToOOO();
|
void onChangedProgramModeToOOO();
|
||||||
|
|
||||||
|
void startPhysicalLayer();
|
||||||
|
void stopPhysicalLayer();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,6 +81,10 @@ public slots:
|
|||||||
virtual void onChangedProgramModeToIDLE() = 0;
|
virtual void onChangedProgramModeToIDLE() = 0;
|
||||||
virtual void onChangedProgramModeToOOO() = 0;
|
virtual void onChangedProgramModeToOOO() = 0;
|
||||||
|
|
||||||
|
virtual void startPhysicalLayer() = 0;
|
||||||
|
virtual void stopPhysicalLayer() = 0;
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void printTicketFinished(nsDeviceControllerInterface::RESULT_STATE resultState,
|
void printTicketFinished(nsDeviceControllerInterface::RESULT_STATE resultState,
|
||||||
const QString & errorCode,
|
const QString & errorCode,
|
||||||
|
Loading…
Reference in New Issue
Block a user