|
|
|
|
|
|
|
|
|
|
|
|
|
|
ChildStream::ChildStream(std::vector<std::string> const &args,
|
|
|
ChildStream::ChildStream(std::vector<std::string> const &args,
|
|
|
size_t bufSize) :
|
|
|
size_t bufSize) :
|
|
|
childStreambuf(bufSize),
|
|
|
|
|
|
std::iostream(&childStreambuf),
|
|
|
std::iostream(&childStreambuf),
|
|
|
|
|
|
childStreambuf(bufSize),
|
|
|
cmdArgs(args) {
|
|
|
cmdArgs(args) {
|
|
|
|
|
|
|
|
|
init();
|
|
|
init();
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
ChildStream::ChildStream(std::string const &childpath, size_t bufSize) :
|
|
|
ChildStream::ChildStream(std::string const &childpath, size_t bufSize) :
|
|
|
childStreambuf(bufSize),
|
|
|
|
|
|
std::iostream(&childStreambuf) {
|
|
|
|
|
|
|
|
|
std::iostream(&childStreambuf),
|
|
|
|
|
|
childStreambuf(bufSize) {
|
|
|
|
|
|
|
|
|
cmdArgs.push_back(childpath);
|
|
|
cmdArgs.push_back(childpath);
|
|
|
init();
|
|
|
init();
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
ChildStream::ChildStream(size_t bufSize) :
|
|
|
ChildStream::ChildStream(size_t bufSize) :
|
|
|
childStreambuf(bufSize),
|
|
|
|
|
|
std::iostream(&childStreambuf) {
|
|
|
|
|
|
|
|
|
std::iostream(&childStreambuf),
|
|
|
|
|
|
childStreambuf(bufSize) {
|
|
|
|
|
|
|
|
|
init();
|
|
|
init();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CodeDweller::PollTimer pollTimer(nominalPollTime_ms, maximumPollTime_ms);
|
|
|
CodeDweller::PollTimer pollTimer(nominalPollTime_ms, maximumPollTime_ms);
|
|
|
|
|
|
|
|
|
auto sleepTime = std::chrono::milliseconds(maximumPollTime_ms);
|
|
|
|
|
|
|
|
|
|
|
|
while (!stopFlag) {
|
|
|
while (!stopFlag) {
|
|
|
|
|
|
|
|
|
char *bufferPtr;
|
|
|
char *bufferPtr;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CodeDweller::PollTimer pollTimer(nominalPollTime_ms, maximumPollTime_ms);
|
|
|
CodeDweller::PollTimer pollTimer(nominalPollTime_ms, maximumPollTime_ms);
|
|
|
|
|
|
|
|
|
auto sleepTime = std::chrono::milliseconds(maximumPollTime_ms);
|
|
|
|
|
|
|
|
|
|
|
|
while (!stopFlag) {
|
|
|
while (!stopFlag) {
|
|
|
|
|
|
|
|
|
char *bufferPtr;
|
|
|
char *bufferPtr;
|