Add interface methods startPhysicalLayer() / stopPhysicalLayer()
This commit is contained in:
@@ -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 --------------------------------------------------------
|
||||
|
||||
void ATBDeviceControllerPlugin::onChangedProgramModeToSELL()
|
||||
|
Reference in New Issue
Block a user