MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / openDevice

Method openDevice

tests/rigctld_test.cpp:2109–2122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2107 ~PtyClient() { if (m_fd >= 0) ::close(m_fd); }
2108
2109 bool openDevice(const QString& path)
2110 {
2111 errno = 0;
2112 m_fd = ::open(path.toLocal8Bit().constData(), O_RDWR | O_NOCTTY | O_NONBLOCK);
2113 if (m_fd < 0) return false;
2114 struct termios tio;
2115 if (::tcgetattr(m_fd, &tio) == 0) {
2116 ::cfmakeraw(&tio);
2117 tio.c_cc[VMIN] = 0;
2118 tio.c_cc[VTIME] = 0;
2119 ::tcsetattr(m_fd, TCSANOW, &tio);
2120 }
2121 return true;
2122 }
2123
2124 void send(const QString& cmd)
2125 {

Callers 1

sectionPtyFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected