add command-files
This commit is contained in:
parent
bb2d53a63a
commit
9e147b4164
@ -67,11 +67,13 @@ contains( CONFIG, DesktopLinux ) {
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
message_handler.cpp
|
||||
message_handler.cpp \
|
||||
process/command.cpp
|
||||
|
||||
HEADERS += \
|
||||
message_handler.h \
|
||||
plugins/interfaces.h
|
||||
plugins/interfaces.h \
|
||||
process/command.h
|
||||
|
||||
OTHER_FILES += \
|
||||
ATBDownloadDCJsonFiles.ini
|
||||
|
24
main.cpp
24
main.cpp
@ -7,10 +7,8 @@
|
||||
#include "plugins/interfaces.h"
|
||||
|
||||
|
||||
#if defined (__unix__) || defined (__linux__)
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
//#include <unistd.h>
|
||||
//#include <errno.h>
|
||||
|
||||
#ifdef PTU5
|
||||
#define SERIAL_PORT "ttymxc2"
|
||||
@ -36,5 +34,23 @@ int main(int argc, char **argv) {
|
||||
setDebugLevel(LOG_NOTICE);
|
||||
}
|
||||
|
||||
int r = std::system("ls -l /proc/[0-9]*/fd/* 2>/dev/null | grep /dev/ttymxc2 > /tmp/slave-or-master.txt");
|
||||
// lrwx------ 1 root root 64 Oct 31 14:55 /proc/884/fd/18 -> /dev/ttymxc2
|
||||
|
||||
//std::ifstream ifs("/tmp/slave-or-master.txt");
|
||||
|
||||
//if (ifs.is_open()) {
|
||||
// std::string line;
|
||||
// if (std::getline(ifs, line)) {
|
||||
// if (line.size() > 0) {
|
||||
// std::cout << "SLAVE " << line << std::endl;
|
||||
// }
|
||||
// } else {
|
||||
// }
|
||||
|
||||
// ifs.close();
|
||||
|
||||
//}
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
#ifndef COMMAND_H_INCLUDED
|
||||
#define COMMAND_H_INCLUDED
|
||||
#endif // COMMAND_H_INCLUDED
|
||||
|
||||
#include <QObject>
|
||||
#include <QCoreApplication>
|
||||
@ -33,3 +32,5 @@ private slots:
|
||||
void readyReadStandardError();
|
||||
void finished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
};
|
||||
|
||||
#endif // COMMAND_H_INCLUDED
|
||||
|
Loading…
Reference in New Issue
Block a user