migrate to async IO model
new PIIODevice::interrupt() virtual method new PIWaitEvent private class PIEthernet and PISerial basically tested on Windows and Linux
This commit is contained in:
@@ -45,10 +45,11 @@ PICloudClient::PICloudClient(const PIString & path, PIIODevice::DeviceMode mode)
|
||||
|
||||
PICloudClient::~PICloudClient() {
|
||||
//piCoutObj << "~PICloudClient()";
|
||||
softStopThreadedRead();
|
||||
//softStopThreadedRead();
|
||||
//eth.close();
|
||||
//if (is_connected) disconnected();
|
||||
close();
|
||||
//close();
|
||||
stopAndWait();
|
||||
//piCoutObj << "~PICloudClient() closed";
|
||||
internalDisconnect();
|
||||
// stop(false);
|
||||
@@ -69,6 +70,11 @@ void PICloudClient::setKeepConnection(bool on) {
|
||||
}
|
||||
|
||||
|
||||
void PICloudClient::interrupt() {
|
||||
eth.interrupt();
|
||||
}
|
||||
|
||||
|
||||
bool PICloudClient::openDevice() {
|
||||
//piCoutObj << "open";// << path();
|
||||
bool op = eth.connect(PIEthernet::Address::resolve(path()), false);
|
||||
|
||||
Reference in New Issue
Block a user