powerguru-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Powerguru-commit] [SCM] powerguru branch, master, updated. b5ff0e87cd97


From: Rob Savoye
Subject: [Powerguru-commit] [SCM] powerguru branch, master, updated. b5ff0e87cd976125141b4416a9bd1d472c396f2b
Date: Thu, 22 Nov 2018 14:47:00 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "powerguru".

The branch, master has been updated
       via  b5ff0e87cd976125141b4416a9bd1d472c396f2b (commit)
       via  aee579f1cc25d0678cdea867f05df55090cca26d (commit)
       via  55fae81d91c615d1fae7da83126258443b2d7c8d (commit)
       via  1f8712f22e06e6c2e8b7ad7e640c1c4ba090ed18 (commit)
       via  2507f08aeec28f8ac89ec2192aef0ab87249dfaa (commit)
      from  d8e1668698904a0701e432489d900f6d909810c8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/powerguru.git/commit/?id=b5ff0e87cd976125141b4416a9bd1d472c396f2b


commit b5ff0e87cd976125141b4416a9bd1d472c396f2b
Author: Rob Savoye <address@hidden>
Date:   Thu Nov 22 12:46:18 2018 -0700

    Use std:: explicitly instead of by default.

diff --git a/sim/fakeuart.cc b/sim/fakeuart.cc
index 8b88596..33f05d5 100644
--- a/sim/fakeuart.cc
+++ b/sim/fakeuart.cc
@@ -33,63 +33,61 @@
 #include <cstring>
 #include <fstream>
 
-using namespace std;
-
 extern LogFile dbglogfilefile;
 
 FakeUart::FakeUart(void)
 {
-  uartfd = 0;
+  _uartfd = 0;
   name = DEFAULT_FAKEUART;
   state = IDLE;
 }
 
 FakeUart::~FakeUart(void)
 {
-  dbglogfile << "Closing fake uart " << name << endl;
+    dbglogfile << "Closing fake uart " << name << std::endl;
 
   // Don't try to close a device that isn't open
   if (state == OPEN) {
-    close(uartfd);
+    close(_uartfd);
   }
 }
 
 retcode_t
-//FakeUart::Open(string &filespec, ErrCond &Err)
-FakeUart::Open(ErrCond *Err)
+//FakeUart::Open(string &filespec, ErrCond &err)
+FakeUart::Open(ErrCond &err)
 {
     DEBUGLOG_REPORT_FUNCTION;
 
-    string filespec;
+    std::string filespec;
     int i,j, flag;
     int master = -1;
     struct termios newtty, oldtty;
-    char *letterpart = "pqrstuvwxyzPQRST";
-    char *numberpart = "0123456789abcdef";
+    const char *letterpart = "pqrstuvwxyzPQRST";
+    const char *numberpart = "0123456789abcdef";
 
     filespec = "/dev/ptmx";
-    dbglogfile << "Opening " << filespec << endl;
-    if (filespec.size() > 0) {
-        if ((master = open(filespec.c_str(), O_RDWR | O_NONBLOCK)) < 0) {
-            if (errno == ENOENT) {
-                cerr << "ERROR: no more pty's available";
-                return ERROR;
-            }
+    dbglogfile << "Looking for a pty: " << filespec.c_str() << std::endl;
+    if ((master = open(filespec.c_str(), O_RDWR | O_NONBLOCK)) < 0) {
+        if (errno == ENOENT) {
+            std::cerr << "ERROR: no more pty's available";
+            return ERROR;
         }
+    } else {
+        dbglogfile << "Opening pty master: " << filespec << std::endl; 
     }
-
-    // filespec = "/dev/pty??";
-    filespec = "/dev/ptmx";
-  
+    
     // Search for a free pty
     for(i=0; i<16 && master <= 0; i++) {
         for(j=0; j<16 && master <= 0; j++) {
             filespec[8] = letterpart[i];
             filespec[9] = numberpart[j];
+            dbglogfile << "Opening pty: " << filespec.c_str() << std::endl;
             if ((master = open(filespec.c_str(), O_RDWR | O_NONBLOCK)) < 0) {
                 if (errno == ENOENT) {
-                    cerr << "ERROR: no more pty's available";
+                    std::cerr << "ERROR: no more pty's available";
                     return ERROR;
+                } else {
+                    dbglogfile << "Opened pty: " << filespec << std::endl;
                 }
             }
         } // for j loop
@@ -97,7 +95,7 @@ FakeUart::Open(ErrCond *Err)
 
     if ((master < 0) && (i == 16) && (j == 16)) {
         // failed to found an available pty
-        cerr << "ERROR: couldn't open a pty";
+        std::cerr << "ERROR: couldn't open a pty";
         return(ERROR);
     }
 
@@ -107,13 +105,13 @@ FakeUart::Open(ErrCond *Err)
     //filespec[5] = 't';
     filespec = ptsname(master);
 
-    dbglogfile << "Opened " << ptsname(master) << " with file descriptor " << 
master << endl;
+    dbglogfile << "Opened " << ptsname(master) << " with file descriptor " << 
master << std::endl;
 
     grantpt(master);
     unlockpt(master);
 
-    uartfd = master;
-    uartStream = fdopen(uartfd, "w+");
+    _uartfd = master;
+    uartStream = fdopen(_uartfd, "w+");
 
     tcgetattr(master, &oldtty);
     newtty = oldtty;
@@ -134,41 +132,55 @@ FakeUart::Open(ErrCond *Err)
 }
 
 retcode_t
-FakeUart::Close(string &filespec, ErrCond &Err)
+FakeUart::Close(std::string &filespec, ErrCond &err)
 {
     DEBUGLOG_REPORT_FUNCTION;
 
     if (state == OPEN)
-        close(uartfd);
+        close(_uartfd);
   
-    uartfd = 0;
+    _uartfd = 0;
     state = CLOSED;
     return SUCCESS;
 }
 
 int
-FakeUart::Read(unsigned char *buf, int nbytes, ErrCond &Err)
+FakeUart::Read(unsigned char *buf, int nbytes, ErrCond &err)
 {
-    // DEBUGLOG_REPORT_FUNCTION;
+    DEBUGLOG_REPORT_FUNCTION;
 
-    return read (uartfd, buf, nbytes);
+    return read (_uartfd, buf, nbytes);
 }
 
+#if 0
 int
-FakeUart::Write(unsigned char *buf, int nbytes, ErrCond &Err)
+FakeUart::Write(std::string &str, ErrCond &err)
 {
-    //  DEBUGLOG_REPORT_FUNCTION;
+    DEBUGLOG_REPORT_FUNCTION;
 
-    write (uartfd, buf, nbytes);
+    if (!str.empty()) {
+        dbglogfile << "Writing " << str << " to uart FD: " << _uartfd << 
std::endl;
+        //write(4, str.c_str(), str.size());
+        //write (_uartfd, str.c_str(), str.size());
+    }
+}
+
+int
+FakeUart::Write(const unsigned char *buf, int nbytes, ErrCond &err)
+{
+    DEBUGLOG_REPORT_FUNCTION;
+
+    //write (_uartfd, buf, nbytes);
 }
+#endif
 
 #if 0
 int
-FakeUart::GetChar(char *buf, ErrCond &Err)
+FakeUart::GetChar(char *buf, ErrCond &err)
 {
     //  DEBUGLOG_REPORT_FUNCTION;
 
-    read (uartfd, buf, 1);
+    read (_uartfd, buf, 1);
   
     return (int)*buf;
 }
@@ -183,11 +195,11 @@ FakeUart::operator << (int x) {
     dbglogfile << x;
 
     if (state == OPEN)
-        write (uartfd, (char *)&x, sizeof(int)); 
+        write (_uartfd, (char *)&x, sizeof(int)); 
 }
 
 FakeUart& 
-FakeUart::operator << (string &s) {
+FakeUart::operator << (std::string &s) {
     dbglogfile << s;
   
     if (state == OPEN)
@@ -199,14 +211,14 @@ FakeUart::operator << (const char *c) {
     dbglogfile << c;
   
     if (state == OPEN) {
-        write (uartfd, c, strlen(c));
+        write (_uartfd, c, strlen(c));
     }
 }
 #endif
 
 // Accessors
 inline void
-FakeUart::SetName (string &newname)
+FakeUart::SetName (std::string &newname)
 {
     name = newname;
 }
diff --git a/sim/fakeuart.h b/sim/fakeuart.h
index 6dba897..0177432 100644
--- a/sim/fakeuart.h
+++ b/sim/fakeuart.h
@@ -1,5 +1,5 @@
 // 
-// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 
Inc.
+// Copyright (C) 2005, 2006-2018 Free Software Foundation, Inc.
 // 
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -35,13 +35,26 @@ public:
   enum state_e {IDLE, OPEN, INPROGRESS, CLOSED};
   FakeUart(void);
   ~FakeUart(void);
-  retcode_t Open(ErrCond *Err);
-  retcode_t Open(std::string &filespec, ErrCond &Err);
-  retcode_t Close(std::string &filespec, ErrCond &Err);
-
-  int Read(unsigned char *, int, ErrCond &Err);
-  int Write(unsigned char *, int, ErrCond &Err);
-
+  retcode_t Open(ErrCond &err);
+  retcode_t Open(std::string &filespec, ErrCond &err);
+  retcode_t Close(std::string &filespec, ErrCond &err);
+
+  int Read(unsigned char *, int, ErrCond &);
+  int Write(const unsigned char *, int, ErrCond &) 
+  {
+
+  }
+  
+  int Write(std::string &str, ErrCond &) {
+    DEBUGLOG_REPORT_FUNCTION;
+    
+    if (!str.empty()) {
+      //dbglogfile << "Writing " << str << " to uart FD: " << _uartfd << 
std::endl;
+      //write(4, str.c_str(), str.size());
+      //write (_uartfd, str.c_str(), str.size());
+      write(4, "Hello World!\r\n", 12); 
+    }
+  }
   void SendEOL(void);
 
    // get a byte from the console
@@ -68,12 +81,12 @@ public:
 
   FILE *GetStreamHandle(void) { return uartStream; }
 
-  int GetFileDescriptor(void) { return uartfd; }
+  int GetFileDescriptor(void) { return _uartfd; }
 
 
 private:
   std::string name;
-  int uartfd;
+  int _uartfd;
   FILE *uartStream;
   state_e state;
 };
diff --git a/sim/osim.cc b/sim/osim.cc
index 3f37339..1ff96b4 100644
--- a/sim/osim.cc
+++ b/sim/osim.cc
@@ -21,12 +21,12 @@
 # include "config.h"
 #endif
 
+#include <string>
 #include <cstring>
 #include <vector>
-#include <stdlib.h>
+#include <cstdlib>
 #include <unistd.h>
 
-#include <cstring>
 #include <iostream>
 #include <fstream>
 
@@ -45,20 +45,20 @@ extern char *optarg;
 #include "fakeuart.h"
 #include "rc.h"
 
-using namespace std;
 using namespace rcinit;
-using namespace outbackpower;
+using namespace pdev;
 
 static void usage (const char *);
 extern LogFile dbglogfile;
  
-retcode_t sim_mx(const char *filespec);
-retcode_t sim_fx(const char *filespec);
-  
+retcode_t sim_mx(const std::string &filespec);
+retcode_t sim_fx(const std::string &filespec);
+
+int
 main(int argc, char *argv[])
 {
     int c, i, ch, ret;
-    char *filespec = 0;
+    std::string device;
     ErrCond Err;
     outback_type_t otype;
     
@@ -71,13 +71,14 @@ main(int argc, char *argv[])
     RCinitFile config;
     config.load_files();
     if (config.deviceGet().size() > 0) {    
-      filespec = (char *)config.deviceGet().c_str();
+      device = config.deviceGet();
+    } else {
+        device = DEFAULT_UART;
     }
 
     // Default to being an MX charge controller device
     otype = OUTBACK_MX;
     
-    filespec = DEFAULT_UART;
     // Process the command line arguments.
     while ((c = getopt (argc, argv, "hvd:t:")) != -1) {
       switch (c) {
@@ -88,11 +89,11 @@ main(int argc, char *argv[])
       case 'v':
         // verbosity++;
        dbglogfile.set_verbosity();
-       dbglogfile << "Verbose output turned on" << endl;
+       dbglogfile << "Verbose output turned on" << std::endl;
        break;
         
       case 'd':
-       filespec = strdup(optarg);
+       device = strdup(optarg);
        break;
 
       case 't':
@@ -101,7 +102,7 @@ main(int argc, char *argv[])
         } else if (strncmp(optarg, "fx", 2) == 0) {
           otype = OUTBACK_MX;
         } else {
-          cerr << "ERROR: No Device Type specified, \"" << optarg << "\" is 
bogus!" << endl;
+            std::cerr << "ERROR: No Device Type specified, \"" << optarg << 
"\" is bogus!" << std::endl;
           exit(-1);
         }
         
@@ -115,80 +116,83 @@ main(int argc, char *argv[])
 
     // Say which device we're simulating
     if (otype == OUTBACK_MX) {
-      dbglogfile << "Simulating a Outback MX60 charge controller" << endl;
-      sim_mx(filespec);
+      dbglogfile << "Simulating a Outback MX60 charge controller" << std::endl;
+      sim_mx(device);
     }
     if (otype == OUTBACK_FX) {
-      dbglogfile << "Simulating a Outback FX Series Inverter" << endl;
-      sim_fx(filespec);
+      dbglogfile << "Simulating a Outback FX Series Inverter" << std::endl;
+      sim_fx(device);
     }
 
+    exit(0);
 }
 
 static void
 usage (const char *prog)
 {
-    cerr <<"This program implements a command line interface" << endl; 
-    cerr << "for an Outback Power Systems Device" << endl;
-    cerr << "Usage: " << prog << " [hvd]" << endl;
-    cerr << "\t-h\t\t\t\tHelp (this display)" << endl;
-    cerr << "\t-v\t\t\t\tVerbose mode" << endl;
-    cerr << "\t-d [filespec]\t\t\tSpecify Serial Port (default=/dev/ttyS0)" << 
endl;
-    cerr << "\t-t [t]\t\t\t\tSpecify Device Type (default=mx)" << endl;
+    std::cerr <<"This program implements a command line interface" << 
std::endl; 
+    std::cerr << "for an Outback Power Systems Device" << std::endl;
+    std::cerr << "Usage: " << prog << " [hvd]" << std::endl;
+    std::cerr << "\t-h\t\t\t\tHelp (this display)" << std::endl;
+    std::cerr << "\t-v\t\t\t\tVerbose mode" << std::endl;
+    std::cerr << "\t-d [filespec]\t\t\tSpecify Serial Port 
(default=/dev/ttyS0)" << std::endl;
+    std::cerr << "\t-t [t]\t\t\t\tSpecify Device Type (default=mx)" << 
std::endl;
     
     exit (-1);
 }
 
 retcode_t
-sim_mx(const char *filespec)
+sim_mx(const std::string &device)
 {
-    struct stat stats;
-    char *home;
-    string loadfile;
-    ErrCond Err;
-    string line, newline;
-    ifstream in;
+    //struct stat stats;
+    std::string datafile;
+    std::string home;
+    ErrCond err;
+    std::string line, newline;
+    std::ifstream in;
     FakeUart fu;
-    if (filespec == 0) {
+    if (device.empty()) {
         return ERROR;
     }
     
-    fu.Open(&Err);
+    // See if it exists in the right place
+    fu.Open(err);
     
-    // Check the users home directory
-    home = getenv("HOME");
-    if (home) {
-        loadfile = home;
-        loadfile += "/.powerguru/mx60.data";
-    }
+    // Check the users home directory for the data file
+    datafile = std::getenv("HOME");
+    datafile += "/.powerguru/mx60.data";
     
-    // See if it exists in the right place
-    dbglogfile << "Seeing if " << loadfile.c_str() << " exists." << endl;
-    if (stat(loadfile.c_str(), &stats) == 0) {
-        in.open(loadfile.c_str());
-        
-        if (!in) {
-            dbglogfile << "ERROR: Couldn't open file: " << filespec << endl;
-            return ERROR;
-        }
+    //dbglogfile << "Seeing if the TTY "<< device << " exists." << std::endl;
+    //if (stat(datafile.c_str(), &stats) == 0) {
+    in.open(datafile);
+    if (!in) {
+        dbglogfile << "ERROR: Couldn't open datafile: " << datafile << 
std::endl;
+        return ERROR;
+    } else {
+        dbglogfile << "Opened datafile: " << datafile << std::endl;
+    }
         
-        // Read in each line and send it
-        while (getline(in, line)) {
-            newline = '*';
-            newline += line;
-            newline += '\n';
-            fu.Write((unsigned char *)newline.c_str(), newline.size(), Err);
-            // All outback products send their data at 1 second intervals
-            sleep(1);
-        }
-    } 
+    // Read in each line and send it
+    while (getline(in, line)) {
+        //newline = '*';
+        newline = line;
+        newline += "\r\n";
+        std::cout << newline;
+        write(4, newline.c_str(), newline.size());
+        //fu.Write(newline, err);
+        //fu.Write((const unsigned char *)newline.c_str(), newline.size(), 
err);
+        // All outback products send their data at 1 second intervals
+        sleep(1);
+    }
+ 
     in.close();
     return ERROR;
 }
 
 retcode_t
-sim_fx(const char *filespec)
+sim_fx(const std::string &device)
 {
+    return ERROR;
 }
 
 // local Variables:

http://git.savannah.gnu.org/cgit/powerguru.git/commit/?id=aee579f1cc25d0678cdea867f05df55090cca26d


commit aee579f1cc25d0678cdea867f05df55090cca26d
Author: Rob Savoye <address@hidden>
Date:   Thu Nov 22 12:46:00 2018 -0700

    Use std:: explicitly instead of by default.

diff --git a/lib/log.cc b/lib/log.cc
index c2eb449..ce8d19d 100644
--- a/lib/log.cc
+++ b/lib/log.cc
@@ -3,8 +3,6 @@
 #include <cstring>
 // #include <strstream>
 
-using namespace std;
-
 // Target Manager internal logging sub-system
 #include "log.h"
 
@@ -16,12 +14,12 @@ using namespace std;
 #include <time.h>
 
 # if 0
-ofstream LogFile::outstream;
+std::ofstream LogFile::outstream;
 string LogFile::logentry;
 bool LogFile::stamp;
 enum LogFile::file_state LogFile::state;
 #endif
-ofstream LogFile::console;
+std::ofstream LogFile::console;
 int LogFile::verbose;
 
 const unsigned char hexchars[]="0123456789abcdef";
@@ -33,24 +31,24 @@ extern "C" char digit2hex(int);
 extern "C" int hex2digit (int);
 
 
-ostream& operator<<(ostream& os, Verbose& b) {
+std::ostream& operator<<(std::ostream& os, Verbose& b) {
     // dbglogfile.verbosity(b);
     return os;
 }
 
 #if 0
-ostream& stampon(ostream& x) {
+std::ostream& stampon(std::ostream& x) {
     LogFile::stamp(true);
     return x;
 }
 
-ostream& stampoff(ostream& x) {
+std::ostream& stampoff(std::ostream& x) {
     LogFile::SetStamp(false);
     return x;
 }
 #endif
 
-ostream& timestamp(ostream& x) {
+std::ostream& timestamp(std::ostream& x) {
     time_t t;
     char buf[10];
 
@@ -61,20 +59,19 @@ ostream& timestamp(ostream& x) {
     return x << buf << ": ";
 }
 
-string timestamp() {
+std::string &timestamp(std::string &str) {
     time_t t;
-    string sbuf;
     char buf[10];
 
     memset (buf, '0', 10);     // this terminates the string
     time (&t);                 // get the current time
     strftime (buf, sizeof(buf), "%H:%M:%S", localtime (&t));
-    sbuf = buf;
+    str = buf;
 
-    return sbuf;
+    return str;
 }
 
-ostream& datetimestamp(ostream& x) {
+std::ostream& datetimestamp(std::ostream& x) {
     time_t t;
     char buf[20];
 
@@ -87,14 +84,14 @@ ostream& datetimestamp(ostream& x) {
 
 // FIXME: This controls the entire output stream
 #if 0
-ostream & operator << (ostream &os, string x) {
+std::ostream & operator << (std::ostream &os, std::string x) {
     if (dbglogfile.get_verbosity() > 0)
        cout << timestamp << x;
     return os << x.c_str();
 }
 #endif
 
-ostream &operator<<(ostream &os, LogFile &l) {
+std::ostream &operator<<(std::ostream &os, LogFile &l) {
     return os << l.GetEntry();
 }
 
@@ -109,7 +106,7 @@ LogFile::GetEntry(void) {
 LogFile::LogFile (void) {
     verbose = 0;
     stamp = true;
-    LogFile::outstream.open (DEFAULT_LOGFILE, ios::out);
+    LogFile::outstream.open (DEFAULT_LOGFILE, std::ios::out);
     state = OPEN;
 }
 
@@ -118,7 +115,7 @@ LogFile::LogFile (const char *filespec) {
     stamp = true;
     if (state == OPEN)
         LogFile::outstream.close ();
-    LogFile::outstream.open (filespec, ios::out);
+    LogFile::outstream.open (filespec, std::ios::out);
     state = OPEN;
 }
 
@@ -126,10 +123,10 @@ retcode_t
 LogFile::Open (const char *filespec) {
     if (state == OPEN)
         LogFile::outstream.close ();
-    LogFile::outstream.open (filespec, ios::out);
+    LogFile::outstream.open (filespec, std::ios::out);
     state = OPEN;
   
-    // LogFile::outstream << "Opened " << filespec << endl;
+    // LogFile::outstream << "Opened " << filespec << std::endl;
   
     return SUCCESS;
 }
@@ -149,7 +146,7 @@ LogFile::Close (void) {
 LogFile&
 LogFile::operator << (ErrCond& e) {
     if (verbose > 0)
-        cout << e << endl;
+        std::cout << e << std::endl;
     LogFile::outstream << e;
     state = INPROGRESS;
 
@@ -160,7 +157,7 @@ LogFile&
 LogFile::operator << (long x)
 {
     if (verbose > 0)
-        cout << x;
+        std::cout << x;
     LogFile::outstream << x;
     state = INPROGRESS;
   
@@ -171,7 +168,7 @@ LogFile&
 LogFile::operator << (unsigned int x)
 {
     if (verbose > 0)
-        cout << x;
+        std::cout << x;
     LogFile::outstream << x;
     state = INPROGRESS;
   
@@ -183,7 +180,7 @@ LogFile::operator << (float x)
 { 
     LogFile::outstream << x;
     if (verbose > 0) {
-        cout << x;
+        std::cout << x;
     }
     state = INPROGRESS;
 
@@ -195,7 +192,7 @@ LogFile::operator << (double &x)
 {
     LogFile::outstream << x; 
     if (verbose > 0) {
-        cout << x;
+        std::cout << x;
     }
   
     state = INPROGRESS;
@@ -207,7 +204,7 @@ LogFile&
 LogFile::operator << (int x) {
     
     if (verbose > 0)
-       cout << x;
+        std::cout << x;
     LogFile::outstream << x;
     state = INPROGRESS;
 
@@ -218,7 +215,7 @@ LogFile&
 LogFile::operator << (void *ptr) {
     
     if (verbose > 0)
-       cout << ptr;
+        std::cout << ptr;
     LogFile::outstream << ptr;
     state = INPROGRESS;
 
@@ -226,24 +223,25 @@ LogFile::operator << (void *ptr) {
 }
 
 LogFile& 
-LogFile::operator << (string s) {
+LogFile::operator << (const std::string &s) {
     outstream << s;
     return *this;
 }
 
 LogFile& 
 LogFile::operator << (const char *c) {
-    logentry = timestamp();
+    std::string str;
+    logentry = timestamp(str);
     logentry += ": ";
 
     if (stamp == true && (state == IDLE || state == OPEN)) {
         LogFile::state = INPROGRESS;
        if (verbose > 0)
-           cout << logentry  << c;
+           std::cout << logentry  << c;
         outstream << logentry << c;
     } else {
        if (verbose > 0)
-           cout << c;
+           std::cout << c;
         outstream << c;
     }
     logentry += c;
@@ -253,7 +251,8 @@ LogFile::operator << (const char *c) {
 
 LogFile& 
 LogFile::operator << (const unsigned char *c) {
-    logentry = timestamp();
+    std::string str;
+    logentry = timestamp(str);
     logentry += ": ";
 
     if (c == NULL) {
@@ -263,11 +262,11 @@ LogFile::operator << (const unsigned char *c) {
     if (stamp == true && (state == IDLE || state == OPEN)) {
         LogFile::state = INPROGRESS;
        if (verbose > 0)
-           cout << logentry  << c;
+           std::cout << logentry  << c;
         outstream << logentry << c;
     } else {
        if (verbose > 0)
-           cout << c;
+           std::cout << c;
         outstream << c;
     }
     logentry += (const char*)c;
@@ -276,16 +275,16 @@ LogFile::operator << (const unsigned char *c) {
 }
 
 // This grabs the endl operator;
-ostream&
-LogFile::operator << (ostream & (&)(ostream &)) {
+std::ostream&
+LogFile::operator << (std::ostream & (&)(std::ostream &)) {
     if (verbose > 0)
-        cout << "\r" << endl;
-    LogFile::outstream << endl;;
+        std::cout << "\r" << std::endl;
+    LogFile::outstream << std::endl;;
     LogFile::outstream.flush();
     LogFile::state = IDLE;
 
     // FIXME: This is probably not the value to return
-    return cout;
+    return std::cout;
 }
 
 #if 0
@@ -328,14 +327,14 @@ LogFile::note (int level, const char *fmt, ...) {
     // don't ever print log messages to the screen.
 #if 0
     if (verbose >= level) {
-        cout << tmp;       ;
-        cout.flush();
+        std::cout << tmp;       ;
+        std::cout.flush();
     }
 #endif
 
     // write the message with a timestamp to the log file
     if (state == OPEN) {
-        logout << buf << ":" << tmp << endl;
+        logout << buf << ":" << tmp << std::endl;
         logout.flush();
     }
 
@@ -357,8 +356,8 @@ LogFile::printf (int level, const char *fmt, ...) {
     // don't ever print log messages to the screen.
 #if 0
     if (verbose >= level) {
-        cout << tmp;
-        cout.flush();
+        std::cout << tmp;
+        std::cout.flush();
     }
 #endif    
 
diff --git a/lib/log.h b/lib/log.h
index f374efd..8f3f060 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -50,21 +50,21 @@
 #define TIMESTAMP_LENGTH 24             // timestamp length
 #define TIMESTAMP_FORMAT "%Y-%m-%d %H:%M:%S     " // timestamp format
 
-extern std::ostream& stampon(std::ostream& x);
-extern std::ostream& stampoff(std::ostream& x);
-extern std::ostream& timestamp(std::ostream& x);
-extern std::ostream& datetimestamp(std::ostream& x);
+extern std::ostream &stampon(std::ostream& x);
+extern std::ostream &stampoff(std::ostream& x);
+extern std::ostream &timestamp(std::ostream& x);
+extern std::ostream &datetimestamp(std::ostream& x);
 
 // Print a number in binary:
 class Verbose {
     int level;
 public:
     Verbose(int l) { level = l; }
-    friend std::ostream& operator<<(std::ostream&, Verbose&);
+    friend std::ostream &operator<<(std::ostream &, Verbose &);
 };
 
 // Get the current timestamp
-std::string timestamp();
+std::string &timestamp(std::string &);
 
 // This is a basic file logging class
 class LogFile { // public std::ofstream {
@@ -86,20 +86,20 @@ public:
     } state;
   
     file_state GetState (void) { return state; }
-    LogFile& operator << (ErrCond&);
-    LogFile& operator << (int x);
-    LogFile& operator << (long x);
-    LogFile& operator << (unsigned int x);
+    LogFile &operator << (ErrCond&);
+    LogFile &operator << (int x);
+    LogFile &operator << (long x);
+    LogFile &operator << (unsigned int x);
     // These both resolve to an unsigned int.
     // LogFile& operator << (size_t x);
     // LogFile& operator << (time_t x);
-    LogFile& operator << (float x);
-    LogFile& operator << (double &x);
-    LogFile& operator << (bool x);
-    LogFile& operator << (void *);
-    LogFile& operator << (const char *);
-    LogFile& operator << (const unsigned char *);
-    LogFile& operator << (std::string );
+    LogFile &operator << (float x);
+    LogFile &operator << (double &x);
+    LogFile &operator << (bool x);
+    LogFile &operator << (void *);
+    LogFile &operator << (const char *);
+    LogFile &operator << (const unsigned char *);
+    LogFile &operator << (const std::string &);
     std::ostream& operator << (std::ostream & (&)(std::ostream &));
     const char *GetEntry(void);
   
diff --git a/lib/msgs.cc b/lib/msgs.cc
index c24f4ff..9314c70 100644
--- a/lib/msgs.cc
+++ b/lib/msgs.cc
@@ -131,12 +131,12 @@ Msgs::init(net_mode_e mode, std::string hostname)
 // By default, if just a hostname is supplied, we assume it's to establish
 // a network connection to the specified host.
 retcode_t
-Msgs::init(std::string hostname)
+Msgs::init(std::string &hostname)
 {
     DEBUGLOG_REPORT_FUNCTION;
   
     if (createNetClient(hostname)) {
-        dbglogfile << "Connected to server at " << hostname.c_str() << endl;
+        dbglogfile << "Connected to server at " << hostname << endl;
         init();                     // initialize the table of pointers
         _net_mode = CLIENT;
         writeNet(heloCreate(_version));
@@ -912,10 +912,13 @@ Msgs::responseCreate(xml_msg_e type, const char *tag, 
string val)
           str = "meters";
           break;
       case CONFIG:
-          str = "meters";
+          str = "config";
           break;
       case COMMAND:
-          str = "meters";
+          str = "command";
+          break;
+      case RESPONSE:
+          str = "response";
           break;
     };
   
@@ -1448,9 +1451,8 @@ Msgs::commandProcess(XMLNode *node)
 
     // dbglogfile <<  node->valueGet() << endl;
 
-#if 0
     if (_net_mode == DAEMON) {
-        if (strcmp(node->value Get(), "auxilary") == 0) {
+        if (strcmp(node->valueGet(), "auxilary") == 0) {
             str = responseCreate(COMMAND, node->valueGet(), "0.0");
         } else if (strcmp(node->valueGet(), "relay") == 0) {
             str = responseCreate(COMMAND, node->valueGet(), "none");
@@ -1458,8 +1460,11 @@ Msgs::commandProcess(XMLNode *node)
             str = responseCreate(COMMAND, node->valueGet(), "inverter");    
         } else if (strcmp(node->valueGet(), "") == 0) {
             str = responseCreate(COMMAND, node->valueGet(), "charger");
+        } else {
+            dbglogfile << "VALUEGET: " << node->valueGet() << std::endl;
+            str = responseCreate(RESPONSE, node->valueGet(), "foobar");
         }
-        if (writeNet(str)) {
+        if (writeNet(str + "\r\n")) {
             return ERROR;
         } else {
             return SUCCESS;
@@ -1475,7 +1480,6 @@ Msgs::commandProcess(XMLNode *node)
     
         return SUCCESS;
     }
-#endif
 
     return ERROR;  
 }
diff --git a/lib/msgs.h b/lib/msgs.h
index a69061d..70e6a5f 100644
--- a/lib/msgs.h
+++ b/lib/msgs.h
@@ -98,7 +98,8 @@ public:
         STATUS,
         COMMAND,
         CONFIG,
-        HEARTBEAT
+        HEARTBEAT,
+        RESPONSE
     } xml_msg_e;
   
     typedef retcode_t (Msgs::*methodPtr_t)(XMLNode *node);
@@ -116,7 +117,7 @@ public:
 
     retcode_t init(void);
     retcode_t init(net_mode_e mode);
-    retcode_t init(std::string hostname);
+    retcode_t init(std::string &hostname);
     retcode_t init(net_mode_e mode, std::string hostname);
     retcode_t init(bool block);
     retcode_t init(net_mode_e mode, bool block);
diff --git a/lib/serial.cc b/lib/serial.cc
index 5497dde..2026510 100644
--- a/lib/serial.cc
+++ b/lib/serial.cc
@@ -41,8 +41,6 @@
 #include "log.h"
 #include "serial.h"
 
-using namespace std;
-
 extern LogFile dbglogfile;
 LogFile seriallogfile; // ("tserial.log")
 
@@ -131,31 +129,24 @@ Serial::~Serial(void)
 // Open the serial port. This function must initialize the serial port so that
 // it can be read/write in raw mode.
 retcode_t
-Serial::Open(string name)
-{
-    return Open(name.c_str());
-}
-
-
-retcode_t
-Serial::Open(const char *filespec)
+Serial::Open(std::string &filespec)
 {
     DEBUGLOG_REPORT_FUNCTION;
   
-    dbglogfile << "Opening host device " << filespec << endl;
+    dbglogfile << "Opening host device " << filespec << std::endl;
 
     // We don't want to timestamp
     seriallogfile.SetStamp(false);
 
-    seriallogfile << "<?xml version='1.0'?>" << endl;
-    seriallogfile << "<device>\"" << filespec << "\"</device>" << endl;
+    seriallogfile << "<?xml version='1.0'?>" << std::endl;
+    seriallogfile << "<device>\"" << filespec << "\"</device>" << std::endl;
   
-    //  serialin.open(name, ios::in|ios::out);
+    //  serialin.open(name, ios::in|std::ios::out);
 
-    if (filespec != 0) {
-        if ((_uartfd = open(filespec, O_RDWR | O_NONBLOCK)) < 0) { //  | 
O_NONBLOCK
+    if (!filespec.empty()) {
+        if ((_uartfd = open(filespec.c_str(), O_RDWR | O_NONBLOCK)) < 0) { //  
| O_NONBLOCK
             if (_uartfd < 0) {
-                errcond << "couldn't open " << filespec << endl;
+                errcond << "couldn't open " << filespec << std::endl;
                 throw errcond;
             }
         }
@@ -192,8 +183,8 @@ Serial::Close(void)
 {
     DEBUGLOG_REPORT_FUNCTION;
   
-    dbglogfile << endl << "Closing host device" << endl;
-    seriallogfile << endl << "Closing host device" << endl;
+    dbglogfile << std::endl << "Closing host device" << std::endl;
+    seriallogfile << std::endl << "Closing host device" << std::endl;
 
     tcsetattr(_uartfd, TCSANOW, &origtty);
 
@@ -221,7 +212,7 @@ Serial::Read(char *buf, int nbytes)
     int ret, sret, i;
     fd_set fdset;
     int retries = 2;
-    string data;
+    std::string data;
     struct timeval timeout;
 
     ret = -1;
@@ -238,11 +229,11 @@ Serial::Read(char *buf, int nbytes)
       
             sret = select(_uartfd+1, &fdset, NULL, NULL, &timeout);
             dbglogfile << "select returned " << sret
-                       << " for file descriptor  " << _uartfd << endl;
+                       << " for file descriptor  " << _uartfd << std::endl;
 #if 1
             if (sret == 0) {
                 memset(buf, 0, nbytes);
-                //seriallogfile << "<device><select>Timeout</select></device>" 
<< endl;
+                //seriallogfile << "<device><select>Timeout</select></device>" 
<< std::endl;
                 return sret;
             }
             if ((sret < 0) && (errno == EAGAIN)) {
@@ -254,13 +245,13 @@ Serial::Read(char *buf, int nbytes)
             memset(tmpbuf, 0, nbytes+1);
             memset(buf, 0, nbytes);
             ret = ::read (_uartfd, tmpbuf, nbytes);
-            dbglogfile << "read returned " << ret << " for file descriptor  " 
<< _uartfd << endl;
+            dbglogfile << "read returned " << ret << " for file descriptor  " 
<< _uartfd << std::endl;
             if (ret == 0) {
                 continue;
             }
       
             if (ret > 0) {
-                dbglogfile << "Read " << ret << " bytes" << endl;
+                dbglogfile << "Read " << ret << " bytes" << std::endl;
                 //if ((line.find('\n', 0) == string::npos) && (ret > 0)) 
                 // Filter out the control characters that appear on the
                 // end of the line
@@ -272,16 +263,17 @@ Serial::Read(char *buf, int nbytes)
                         data += tmpbuf[i];
                     }
                 } // end of for loop
-                // dbglogfile << "Reading more data, data left before is \"" 
<< tmpbuf << "\"" << endl;
+                // dbglogfile << "Reading more data, data left before is \"" 
<< tmpbuf << "\"" << std::endl;
             }
       
             //if (ret < 0)
             {
                 //data = line.substr(0, line.find('\n', 0));
                 if (data.size() > 0) {
-                    seriallogfile << "<read time=" << timestamp()
+                    std::string str;
+                    seriallogfile << "<read time=" << timestamp(str)
                                   << " bytes=" << (int)data.size()
-                                  << ">" << data << "</read>" << endl;
+                                  << ">" << data << "</read>" << std::endl;
           
                     memcpy(buf, data.c_str(), data.size());
                     return data.size();
@@ -299,12 +291,12 @@ Serial::Read(char *buf, int nbytes)
         
     //if ((ret == 1) && (ret == 0xa)) {
     if (ret == 1) {
-        dbglogfile << "Read CR " << endl;
+        dbglogfile << "Read CR " << std:;endl;
         //ret = ::read (_uartfd, buf, 36);
     }
         
     if (ret > 0) {
-        dbglogfile << "Read " << ret << " bytes" << endl;
+        dbglogfile << "Read " << ret << " bytes" << std::endl;
         for (i=0; i< nbytes; i++){
 #if 0
             if (buf[i] == 0xa) {
@@ -313,7 +305,7 @@ Serial::Read(char *buf, int nbytes)
             }
 #endif
             if ((buf[i] > ' ') && (buf[i] < 'z')) {
-                dbglogfile << "Copying character: " << i << endl;
+                dbglogfile << "Copying character: " << i << std::endl;
                 *bufptr++ = buf[i];
             } else {
                 buf[i] = ' ';
@@ -322,17 +314,17 @@ Serial::Read(char *buf, int nbytes)
         *bufptr = 0;
         seriallogfile << "<read  time=" << timestamp()
                       << " bytes=" << ret
-                      << ">" << buf << "</read>" << endl;
+                      << ">" << buf << "</read>" << std::endl;
     }
 }
 
 if ((sret == 0) && (ret <= 0)) {
-    dbglogfile << "WARNING: Too many retries." << endl;
+    dbglogfile << "WARNING: Too many retries." << std::endl;
 }
 
 //    seriallogfile.Write((const char *)buf, ret);
 
-//seriallogfile << "<read>" << buf << "</read>" << endl;
+//seriallogfile << "<read>" << buf << "</read>" << std::endl;
 } else {
       return ERROR;
   }
@@ -357,9 +349,10 @@ Serial::Write(const char *buf, int nbytes) const
         tcdrain(_uartfd);
         //    seriallogfile.write((const char *)buf, ret);
         //   seriallogfile << buf;
-        seriallogfile << "<write time=" << timestamp()
+        std::string str;
+        seriallogfile << "<write time=" << timestamp(str)
                       << " bytes=" << ret
-                      << ">" << buf << "</write>" << endl;
+                      << ">" << buf << "</write>" << std::endl;
         return nbytes;
     } else {
         return -1;
@@ -385,20 +378,20 @@ Serial::SetBaud (int baudcode)
 #endif
     int ret = tcsetattr(_uartfd, TCSANOW, &ctty);
     if (ret == 0) {
-        dbglogfile << __PRETTY_FUNCTION__ << " worked" << endl;
+        dbglogfile << __PRETTY_FUNCTION__ << " worked" << std::endl;
         return SUCCESS;
     }
   
-    seriallogfile << "<device><baud>\"" << serial_speeds[baudcode] << 
"\"</baud></device>" << endl;
+    seriallogfile << "<device><baud>\"" << serial_speeds[baudcode] << 
"\"</baud></device>" << std::endl;
 
     // See if it worked
     //int ret = tcsetattr(_uartfd, TCSADRAIN, &currenttty);
     ibaud = cfgetispeed(&currenttty);
     obaud = cfgetospeed(&currenttty);
-    dbglogfile << "Input baud is now set to " << serial_speeds[ibaud] << endl;
-    dbglogfile << "Output baud is now set to " << serial_speeds[obaud] << endl;
+    dbglogfile << "Input baud is now set to " << serial_speeds[ibaud] << 
std::endl;
+    dbglogfile << "Output baud is now set to " << serial_speeds[obaud] << 
std::endl;
 
-    dbglogfile << __PRETTY_FUNCTION__ << " failed" << endl;
+    dbglogfile << __PRETTY_FUNCTION__ << " failed" << std::endl;
     return ERROR;
 }
 
@@ -419,7 +412,7 @@ Serial::SetBlocking(bool mode)
 {
     tcgetattr(_uartfd, &currenttty);
   
-    //seriallogfile << "<device><blocking>True</device>" << endl;
+    //seriallogfile << "<device><blocking>True</device>" << std::endl;
 
     currenttty.c_cc[VMIN] = 0;
     currenttty.c_cc[VTIME] = 10;
@@ -446,14 +439,14 @@ Serial::SetDTR (bool value)
 
     ioctl(_uartfd, TIOCMGET, (unsigned long) &arg);
 
-    cerr << "ARG is " << arg << endl;
+    std::cerr << "ARG is " << arg << std::endl;
   
     // Turn off everything but DTR
     if (value) {  
-        seriallogfile << "<device><DTR>True</DTR></device>" << endl;
+        seriallogfile << "<device><DTR>True</DTR></device>" << std::endl;
         arg = TIOCM_DTR;
     } else { 
-        seriallogfile << "<device><DTR>False</DTR></device>" << endl;
+        seriallogfile << "<device><DTR>False</DTR></device>" << std::endl;
         arg = 0;
     }
     // arg |= TIOCM_DTR | ~TIOCM_RTS;
@@ -501,10 +494,10 @@ Serial::DumpTtyState (void)
     int ibaud, obaud;
 
     ibaud = cfgetispeed(&currenttty);
-    dbglogfile << "Input baud rate is " << serial_speeds[ibaud] << endl;
+    dbglogfile << "Input baud rate is " << serial_speeds[ibaud] << std::endl;
 
     obaud = cfgetospeed(&currenttty);
-    dbglogfile << "Output baud rate is " << serial_speeds[obaud] << endl;
+    dbglogfile << "Output baud rate is " << serial_speeds[obaud] << std::endl;
   
 }
 
@@ -560,11 +553,11 @@ Serial::Putc (int x)
 
 // This grabs the endl operator. If we see this, then we are done
 // formatting the string. We currently don't do anything with this.
-ostream&
-Serial::operator << (ostream & (&)(ostream &)) {
-    ostream outserial (serialin.rdbuf());
+std::ostream&
+Serial::operator << (std::ostream & (&)(std::ostream &)) {
+    std::ostream outserial (serialin.rdbuf());
     outserial.write("\n", 1);
-    return cout;                  // FIXME: this is probably bogus
+    return std::cout;                  // FIXME: this is probably bogus
 }
 
 Serial& 
@@ -572,7 +565,7 @@ Serial::operator << (char const *x)
 {
     DEBUGLOG_REPORT_FUNCTION;
 
-    ostream outserial (serialin.rdbuf());
+    std::ostream outserial (serialin.rdbuf());
     outserial.write(x, strlen(x));
 
     seriallogfile << x;
@@ -581,11 +574,11 @@ Serial::operator << (char const *x)
 }
 
 Serial& 
-Serial::operator << (string &x)
+Serial::operator << (std::string &x)
 {
     DEBUGLOG_REPORT_FUNCTION;
 
-    ostream outserial (serialin.rdbuf());
+    std::ostream outserial (serialin.rdbuf());
 
     //outserial.write(x, x.length());
 
@@ -594,12 +587,12 @@ Serial::operator << (string &x)
     return *this;
 }
 
-ostream& 
-operator << (ostream &os, Serial& e)
+std::ostream& 
+operator << (std::ostream &os, Serial& e)
 {
     DEBUGLOG_REPORT_FUNCTION;
 
-    string msg;
+    std::string msg;
 
 #if 0
     if (e.GetCode() > EMEDIUMTYPE) {
diff --git a/lib/serial.h b/lib/serial.h
index d25d8fe..4882588 100644
--- a/lib/serial.h
+++ b/lib/serial.h
@@ -67,8 +67,7 @@ public:
     termios *GetTtyState (void);
 
     // These methods operate on the serial port
-    retcode_t Open   (std::string name);
-    retcode_t Open   (const char *name);
+    retcode_t Open   (std::string &name);
     retcode_t Close  (void);
     int Read   (char *buf, int nbytes);
     int Write  (const char *buf, int nbytes) const;
diff --git a/lib/tcpip.cc b/lib/tcpip.cc
index 7ffab08..1244a83 100644
--- a/lib/tcpip.cc
+++ b/lib/tcpip.cc
@@ -48,8 +48,6 @@
 #include "log.h"
 #include "err.h"
 
-using namespace std;
-
 //static const char *SERVICENAME = "powerguru";
 static const char *DEFAULTPROTO = "tcp";
 static const short DEFAULTPORT  = 7654;
@@ -83,25 +81,25 @@ Tcpip::~Tcpip(void)
 {    
 }
 
-const string
+const std::string&
 Tcpip::remoteIP(void)
 {
     return inet_ntoa(_client.sin_addr);
 }
 
-const string
+const std::string &
 Tcpip::remoteIP(struct in_addr sockin)
 {
     return inet_ntoa(sockin);
 }
 
-const string
+const std::string &
 Tcpip::remoteName(void)
 {
     return hostByAddrGet(inet_ntoa(_client.sin_addr));
 }
 
-const string
+const std::string &
 Tcpip::remoteName(struct in_addr sockin)
 {
     return hostByAddrGet(inet_ntoa(sockin));
@@ -120,19 +118,19 @@ Tcpip::createNetServer(void)
 retcode_t
 Tcpip::createNetServer(short port)
 {
-    string str = DEFAULTPROTO;
+    std::string str = DEFAULTPROTO;
     return createNetServer(port, str);
 }
 
 retcode_t
-Tcpip::createNetServer(string &service)
+Tcpip::createNetServer(std::string &service)
 {
-    string str = DEFAULTPROTO;
+    std::string str = DEFAULTPROTO;
     return createNetServer(service, str);
 }
 
 retcode_t
-Tcpip::createNetServer(string &service, string &proto)
+Tcpip::createNetServer(std::string &service, std::string &proto)
 {
     DEBUGLOG_REPORT_FUNCTION;
 
@@ -143,13 +141,13 @@ Tcpip::createNetServer(string &service, string &proto)
     // See if we got a service data structure
     if (serv == 0) {
         dbglogfile << "ERROR: unable to get " << service
-                   << " service entry" << endl;
+                   << " service entry" << std::endl;
         _port = 0;
         return ERROR;
     }
 
     dbglogfile << "Port number is " << serv->s_port
-               << ", byte swapped is " << htons(serv->s_port) << endl;
+               << ", byte swapped is " << htons(serv->s_port) << std::endl;
 
     // Store the port number
     _port = serv->s_port;
@@ -159,7 +157,7 @@ Tcpip::createNetServer(string &service, string &proto)
 }
 
 retcode_t
-Tcpip::createNetServer(short port, string &protocol)
+Tcpip::createNetServer(short port, std::string &protocol)
 {
     DEBUGLOG_REPORT_FUNCTION;
   
@@ -191,7 +189,7 @@ Tcpip::createNetServer(short port, string &protocol)
     if ((ppe = getprotobyname(protocol.c_str())) == 0) {
         // error, wasn't able to get a protocol entry
         dbglogfile << "WARNING: unable to get " << protocol
-                   << " protocol entry" << endl;
+                   << " protocol entry" << std::endl;
         return ERROR;
     }
   
@@ -207,14 +205,14 @@ Tcpip::createNetServer(short port, string &protocol)
   
     // error, wasn't able to create a socket
     if (_sockIOfd < 0) {
-        dbglogfile << "unable to create socket: " << strerror(errno) << endl;
+        dbglogfile << "unable to create socket: " << strerror(errno) << 
std::endl;
         return SUCCESS;
     }
 
     on = 1;
     if (setsockopt(_sockIOfd, SOL_SOCKET, SO_REUSEADDR,
                    (char *)&on, sizeof(on)) < 0) {
-        dbglogfile << "setsockopt SO_REUSEADDR failed" << endl;
+        dbglogfile << "setsockopt SO_REUSEADDR failed" << std::endl;
         return ERROR;
     }
 
@@ -226,7 +224,7 @@ Tcpip::createNetServer(short port, string &protocol)
                  sizeof(sock_in)) == -1) {
             dbglogfile << "WARNING: unable to bind to"
                        << inet_ntoa(sock_in.sin_addr)
-                       << " port!" << strerror(errno) << endl;
+                       << " port!" << strerror(errno) << std::endl;
       
             // If there is something already bound to this IP number,
             // then we increment the number to be the next one in the
@@ -247,7 +245,7 @@ Tcpip::createNetServer(short port, string &protocol)
                     continue;
                 } else {
                     dbglogfile <<
-                        "ERROR: There is another process already bound to this 
port!" << endl;
+                        "ERROR: There is another process already bound to this 
port!" << std::endl;
                     return ERROR;
                 }
             }
@@ -260,24 +258,24 @@ Tcpip::createNetServer(short port, string &protocol)
         char                ascip[32];
         inet_ntop(AF_INET, &_ipaddr, ascip, INET_ADDRSTRLEN);
         dbglogfile << "Host Name is " << host->h_name << " IP is " <<
-            ascip << endl;
+            ascip << std::endl;
 #endif
     
         dbglogfile << "Server bound to service "
                    << " on port: " << ntohs(sock_in.sin_port)
                    << " on IP " << inet_ntoa(sock_in.sin_addr)
-                   << " using fd #" << _sockIOfd << endl;
+                   << " using fd #" << _sockIOfd << std::endl;
     
         if (type == SOCK_STREAM && listen(_sockIOfd, 5) < 0) {
             dbglogfile << "ERROR: unable to listen on port: "
-                       << port << ": " <<  strerror(errno) << endl; 
+                       << port << ": " <<  strerror(errno) << std::endl; 
             return ERROR;
         }
 
         _port = port;
     
 #if 0
-        dbglogfile << "Listening for net traffic on fd #\n" << _sockfd << endl;
+        dbglogfile << "Listening for net traffic on fd #\n" << _sockfd << 
std::endl;
 #endif
     
         return SUCCESS;
@@ -309,7 +307,7 @@ Tcpip::newNetConnection(bool block)
     alen = sizeof(struct sockaddr_in);
   
 #ifdef NET_DEBUG
-    dbglogfile << "Trying to accept net traffic on fd #" << _sockfd << endl;
+    dbglogfile << "Trying to accept net traffic on fd #" << _sockfd << 
std::endl;
 #endif
   
     if (_sockIOfd <= 2) {
@@ -338,7 +336,7 @@ Tcpip::newNetConnection(bool block)
         }
     
         if (FD_ISSET(0, &fdset)) {
-            dbglogfile << "There is data at the console for stdin!" << endl;
+            dbglogfile << "There is data at the console for stdin!" << 
std::endl;
             return SUCCESS;
         }
 
@@ -346,12 +344,12 @@ Tcpip::newNetConnection(bool block)
         if (ret == -1 && errno == EINTR) {
             dbglogfile <<
                 "The accept() socket for fd #%d was interupted by a system 
call!"
-                       << _sockIOfd << endl;
+                       << _sockIOfd << std::endl;
         }
     
         if (ret == -1) {
             dbglogfile << "ERROR: The accept() socket for fd " << _sockIOfd
-                       << " never was available for writing!" << endl;
+                       << " never was available for writing!" << std::endl;
             return ERROR;
         }
     
@@ -359,7 +357,7 @@ Tcpip::newNetConnection(bool block)
             if (_debug) {
                 dbglogfile <<
                     "ERROR: The accept() socket for fd #%d timed out waiting 
to write!"
-                           << _sockIOfd << endl;
+                           << _sockIOfd << std::endl;
             }
         }
     }
@@ -368,12 +366,12 @@ Tcpip::newNetConnection(bool block)
     _sockfd = accept(_sockIOfd, &fsin, &alen);
   
     if (_sockfd < 0) {
-        dbglogfile << "unable to accept : " << strerror(errno) << endl;
+        dbglogfile << "unable to accept : " << strerror(errno) << std::endl;
         return ERROR;
     }
   
     dbglogfile << "Accepting tcp/ip connection on fd #"
-               << _sockfd << endl;
+               << _sockfd << std::endl;
 
     memcpy(&_client, &fsin, sizeof(struct sockaddr));
   
@@ -385,8 +383,8 @@ retcode_t
 Tcpip::createNetClient(void)
 {
     DEBUGLOG_REPORT_FUNCTION;
-    string str = DEFAULTPROTO;
-    string host = "localhost";
+    std::string str = DEFAULTPROTO;
+    std::string host = "localhost";
   
     return createNetClient(host, DEFAULTPORT, str);
 }
@@ -395,37 +393,37 @@ retcode_t
 Tcpip::createNetClient(short port)
 {
     DEBUGLOG_REPORT_FUNCTION;
-    string str = DEFAULTPROTO;
-    string host = "localhost";
+    std::string str = DEFAULTPROTO;
+    std::string host = "localhost";
   
     return createNetClient(host, port, str);
 }
 
 retcode_t
-Tcpip::createNetClient(string &hostname, short port)
+Tcpip::createNetClient(std::string &hostname, short port)
 {
     DEBUGLOG_REPORT_FUNCTION;
-    string str = DEFAULTPROTO;
+    std::string str = DEFAULTPROTO;
     return createNetClient(hostname, port, str);
 }
 
 retcode_t
-Tcpip::createNetClient(string &hostname)
+Tcpip::createNetClient(std::string &hostname)
 {
     DEBUGLOG_REPORT_FUNCTION;
-    string str = DEFAULTPROTO;
+    std::string str = DEFAULTPROTO;
     return createNetClient(hostname, DEFAULTPORT, str);
 }
 
 retcode_t
-Tcpip::createNetClient(string &hostname, string &srvname, string &protocol)
+Tcpip::createNetClient(std::string &hostname, std::string &srvname, 
std::string &protocol)
 {
     DEBUGLOG_REPORT_FUNCTION;
     //    return createNetClient(hostname, srvname, "tcp");
 }
 
 retcode_t
-Tcpip::createNetClient(string &hostname, short port, string &protocol)
+Tcpip::createNetClient(std::string &hostname, short port, std::string 
&protocol)
 {
     DEBUGLOG_REPORT_FUNCTION;
     struct sockaddr_in sock_in;
@@ -448,7 +446,7 @@ Tcpip::createNetClient(string &hostname, short port, string 
&protocol)
                            << thishostname;
             }
         } else {
-            dbglogfile << "WARNING: Couldn't get the hostname for this 
machine!" << endl;
+            dbglogfile << "WARNING: Couldn't get the hostname for this 
machine!" << std::endl;
         }
     } else {
         strcpy(thishostname, hostname.c_str());
@@ -462,7 +460,7 @@ Tcpip::createNetClient(string &hostname, short port, string 
&protocol)
 #if 0
     char                ascip[32];
     inet_ntop(AF_INET, &sock_in.sin_addr.s_addr, ascip, INET_ADDRSTRLEN);
-    dbglogfile << "The IP address for this client socket is " << ascip << endl;
+    dbglogfile << "The IP address for this client socket is " << ascip << 
std::endl;
 #endif
   
     sock_in.sin_port = htons(port);
@@ -477,7 +475,7 @@ Tcpip::createNetClient(string &hostname, short port, string 
&protocol)
   
     if (protoDataGet(protocol) == 0) {
         dbglogfile << "unable to get <%s> protocol entry\n"
-                   << protoNameGet() << endl;
+                   << protoNameGet() << std::endl;
         return ERROR;
     }
   
@@ -485,7 +483,7 @@ Tcpip::createNetClient(string &hostname, short port, string 
&protocol)
   
     if (_sockfd < 0) {
         dbglogfile << "WARNING: unable to create socket: "
-                   << strerror(errno) << endl;
+                   << strerror(errno) << std::endl;
         return ERROR;
     }
 
@@ -510,13 +508,13 @@ Tcpip::createNetClient(string &hostname, short port, 
string &protocol)
             if (ret == -1 && errno == EINTR) {
                 dbglogfile <<
                     "The connect() socket for fd #%d was interupted by a 
system call!"
-                           << _sockfd << endl;
+                           << _sockfd << std::endl;
             }
       
             if (ret == -1) {
                 dbglogfile <<
                     "The connect() socket for fd #%d never was available for 
writing!"
-                           << _sockfd << endl;
+                           << _sockfd << std::endl;
                 shutdown(_sockfd, SHUT_RDWR);
                 return ERROR;
             }
@@ -525,7 +523,7 @@ Tcpip::createNetClient(string &hostname, short port, string 
&protocol)
                 if (_debug) {
                     dbglogfile <<
                         "WARNING: The connect() socket for fd #%d timed out 
waiting to write!"
-                               << _sockfd << endl;
+                               << _sockfd << std::endl;
                 }
             }
         }
@@ -536,7 +534,7 @@ Tcpip::createNetClient(string &hostname, short port, string 
&protocol)
             dbglogfile << "unable to connect to "
                        << thishostname
                        << ", port " << port
-                       << ": " << strerror(errno) << endl;
+                       << ": " << strerror(errno) << std::endl;
             close(_sockfd);
             return ERROR;
         }
@@ -544,7 +542,7 @@ Tcpip::createNetClient(string &hostname, short port, string 
&protocol)
 
     dbglogfile << "Client connected to service at port " << port
                << " at IP " << inet_ntoa(sock_in.sin_addr)
-               << " using fd #" << _sockfd << endl;
+               << " using fd #" << _sockfd << std::endl;
   
     // For a client, the IO file descriptor is the same as the default one
     _sockIOfd = _sockfd;
@@ -613,10 +611,10 @@ Tcpip::closeNet(int sockfd)
             if (shutdown(sockfd, SHUT_RDWR) < 0) {
                 if (errno != ENOTCONN) {
                     dbglogfile << "WARNING: Unable to shutdown socket for fd #"
-                               << sockfd << strerror(errno) << endl;
+                               << sockfd << strerror(errno) << std::endl;
                 } else {
                     dbglogfile << "The socket using fd #" << sockfd
-                               << " has been shut down successfully." << endl;
+                               << " has been shut down successfully." << 
std::endl;
                     return SUCCESS;
                 }
             }
@@ -624,13 +622,13 @@ Tcpip::closeNet(int sockfd)
             if (close(sockfd) < 0) {
                 dbglogfile <<
                     "WARNING: Unable to close the socket for fd "
-                           <<  sockfd << strerror(errno) << endl;
+                           <<  sockfd << strerror(errno) << std::endl;
                 sleep(1);
                 retries++;
             } else {
                 dbglogfile << "Closed the socket for "
                            << serviceNameGet()
-                           << " on fd " << sockfd << endl;
+                           << " on fd " << sockfd << std::endl;
                 return SUCCESS;
             }
         }
@@ -652,7 +650,7 @@ Tcpip::toggleDebug(bool val)
 
 // Return true if there is data in the socket, otherwise return false.
 retcode_t
-Tcpip::anydata(vector<const unsigned char *> &msgs)
+Tcpip::anydata(std::vector<const unsigned char *> &msgs)
 {
     DEBUGLOG_REPORT_FUNCTION;
     //printf("%s: \n", __FUNCTION__);
@@ -662,7 +660,7 @@ Tcpip::anydata(vector<const unsigned char *> &msgs)
 // This waits for data on the socket, and on stdin. This way we can sit
 // here in a kernel sleep instead of polling all devices.
 retcode_t
-Tcpip::anydata(int fd, vector<const unsigned char *> &msgs)
+Tcpip::anydata(int fd, std::vector<const unsigned char *> &msgs)
 {
     DEBUGLOG_REPORT_FUNCTION;
     fd_set                fdset;
@@ -699,26 +697,26 @@ Tcpip::anydata(int fd, vector<const unsigned char *> 
&msgs)
         // If interupted by a system call, try again
         if (ret == -1 && (errno == EINTR || errno == EAGAIN)) {
             dbglogfile << "The socket for fd #%d was interupted by a system 
call!"
-                       << fd << endl;
+                       << fd << std::endl;
             continue;
         }
         if (ret == 0) {
-            dbglogfile << "There is no data in the socket for fd #" << fd << 
endl;
+            dbglogfile << "There is no data in the socket for fd #" << fd << 
std::endl;
             msgs.clear();
             return SUCCESS;
         }
         if (ret == -1) {
             dbglogfile << "The socket for fd #%d never was available!"
-                       << fd << endl;
+                       << fd << std::endl;
             return ERROR;
         }
         if (ret > 0) {
             if (FD_ISSET(fileno(stdin), &fdset)) {
-                dbglogfile << "There is data at the console for stdin!" << 
endl;
+                dbglogfile << "There is data at the console for stdin!" << 
std::endl;
                 msgs.clear();
                 return SUCCESS;
             }
-            dbglogfile << "There is data in the socket for fd #" << fd << endl;
+            dbglogfile << "There is data in the socket for fd #" << fd << 
std::endl;
         }
         memset(buf, 0, INBUF);
         if (FD_ISSET(_sockfd, &fdset)) {
@@ -742,8 +740,8 @@ Tcpip::anydata(int fd, vector<const unsigned char *> &msgs)
             return ERROR;
         }
         cr = strlen(buf);
-//     dbglogfile << "read " << ret << " bytes, first msg terminates at " << 
cr << endl;
-//     dbglogfile << "read " << buf << endl;
+//     dbglogfile << "read " << ret << " bytes, first msg terminates at " << 
cr << std::endl;
+//     dbglogfile << "read " << buf << std::endl;
         ptr = buf;
         // If we get a single XML message, do less work
         if (ret == cr + 1) {
@@ -791,7 +789,7 @@ Tcpip::anydata(int fd, vector<const unsigned char *> &msgs)
                 memset(packet, 0, adjusted_size);
                 strcpy(packet, ptr);
                 ptr += cr + 1;
-                //dbglogfile << "Packet is: " << packet << endl;
+                //dbglogfile << "Packet is: " << packet << std::endl;
             } // end of if remainder
             if (*packet == '<') {
                 eom = strrchr(packet, '\n'); // drop the CR off the end there 
is one
@@ -804,11 +802,11 @@ Tcpip::anydata(int fd, vector<const unsigned char *> 
&msgs)
                 msgs.push_back((const unsigned char *)packet);
             } else {
                 if (*packet == *ptr) {
-                    // dbglogfile << "Read all XML messages in packet " << 
packet << endl;
+                    // dbglogfile << "Read all XML messages in packet " << 
packet << std::endl;
                     break;
                 } else { 
-                    //dbglogfile << "WARNING: Throwing out partial packet " << 
endl;
-                    dbglogfile << "WARNING: Throwing out partial packet " << 
packet << endl;
+                    //dbglogfile << "WARNING: Throwing out partial packet " << 
std::endl;
+                    dbglogfile << "WARNING: Throwing out partial packet " << 
packet << std::endl;
                     break;
                 }
             }
@@ -873,7 +871,7 @@ Tcpip::readNet(int fd, char *buffer, int nbytes, int 
timeout)
         FD_SET(fd, &fdset);
     } else {
         dbglogfile << "WARNING: Can't do anything with socket fd #"
-                   << fd << endl;
+                   << fd << std::endl;
         return -1;
     }
   
@@ -895,22 +893,22 @@ Tcpip::readNet(int fd, char *buffer, int nbytes, int 
timeout)
     if (ret == -1 && errno == EINTR) {
         dbglogfile <<
             "The socket for fd #" << fd << " we interupted by a system call!"
-                                  << endl;
-        dbglogfile << "WARNING: error is " << strerror(errno) << endl;
+                                  << std::endl;
+        dbglogfile << "WARNING: error is " << strerror(errno) << std::endl;
         return 0;
     }
   
     if (ret == -1) {
         dbglogfile <<
             "The socket for fd #" << fd << " never was available for reading!"
-                                  << endl;
+                                  << std::endl;
         return -1;
     }
   
     if (ret == 0) {
 #if 0                           // FIXME: too verbose
         dbglogfile <<
-            "The socket for fd #" << fd << " timed out waiting to read!" << 
endl;
+            "The socket for fd #" << fd << " timed out waiting to read!" << 
std::endl;
 #endif
         return 0;
     }
@@ -918,8 +916,8 @@ Tcpip::readNet(int fd, char *buffer, int nbytes, int 
timeout)
     ret = read(fd, buffer, nbytes);
 #if 0
     if (ret != 0) {
-        dbglogfile << "Read " << ret << " bytes from fd #" << fd << endl;
-        dbglogfile << "Buffer says " << buffer << endl;
+        dbglogfile << "Read " << ret << " bytes from fd #" << fd << std::endl;
+        dbglogfile << "Buffer says " << buffer << std::endl;
     }
 #endif
     return ret;
@@ -928,7 +926,7 @@ Tcpip::readNet(int fd, char *buffer, int nbytes, int 
timeout)
 // Write data to the socket. We first make sure the socket is ready for
 // data.
 int
-Tcpip::writeNet(string buffer)
+Tcpip::writeNet(const std::string &buffer)
 {
     return writeNet(_sockfd, buffer.c_str(), buffer.size(), DEFAULTTIMEOUT);
 }
@@ -969,7 +967,7 @@ Tcpip::writeNet(int fd, char const *buffer, int nbytes, int 
timeout)
   
     bufptr = buffer;
 
-    dbglogfile << "Writing to socket: \r\n\t" << buffer << endl;
+    dbglogfile << "Writing to socket: \r\n\t" << buffer << std::endl;
 
     while (retries-- > 1) {
         // Wait for the socket to be ready for writing
@@ -978,7 +976,7 @@ Tcpip::writeNet(int fd, char const *buffer, int nbytes, int 
timeout)
             FD_SET(fd, &fdset);
         } else {
             dbglogfile << "WARNING: Can't do anything with socket fd #!"
-                       << fd << endl;
+                       << fd << std::endl;
             return -1;
         }
     
@@ -994,18 +992,18 @@ Tcpip::writeNet(int fd, char const *buffer, int nbytes, 
int timeout)
         // If interupted by a system call, try again
         if (ret == -1 && errno == EINTR) {
             dbglogfile <<
-                "The socket for fd #" << fd << " we interupted by a system 
call!" << endl;
+                "The socket for fd #" << fd << " we interupted by a system 
call!" << std::endl;
         }
     
         if (ret == -1) {
             dbglogfile << "The socket for fd #" << fd
-                       << " never was available for writing!" << endl;
+                       << " never was available for writing!" << std::endl;
             continue;
         }
     
         if (ret == 0) {
             dbglogfile << "The socket for fd #"
-                       << fd << " timed out waiting to write!" << endl;
+                       << fd << " timed out waiting to write!" << std::endl;
             continue;
         }
         ret = write(fd, bufptr, nbytes);
@@ -1014,13 +1012,13 @@ Tcpip::writeNet(int fd, char const *buffer, int nbytes, 
int timeout)
     
     
         if (ret == 0) {
-            dbglogfile << "Couldn't write any bytes to fd #" << fd << endl;
+            dbglogfile << "Couldn't write any bytes to fd #" << fd << 
std::endl;
             return ret;
         }
     
         if (ret < 0) {
             dbglogfile << "Couldn't write " << nbytes << " bytes to fd #"
-                       << fd << endl;
+                       << fd << std::endl;
             return ret;
         }
     
@@ -1028,17 +1026,17 @@ Tcpip::writeNet(int fd, char const *buffer, int nbytes, 
int timeout)
             bufptr += ret;            
             if (ret != nbytes) {
                 dbglogfile << "wrote " << ret << " bytes to fd #"
-                           << fd << " expected " <<  nbytes << endl;
+                           << fd << " expected " <<  nbytes << std::endl;
                 retries++;
             } else {
 #if 0
-                dbglogfile << "Wrote " << ret << " bytes to fd #" << fd << 
endl;
+                dbglogfile << "Wrote " << ret << " bytes to fd #" << fd << 
std::endl;
 #endif
                 return ret;
             }
       
             if (ret == 0) {
-                dbglogfile << "Wrote 0 bytes to fd #" << fd << endl;
+                dbglogfile << "Wrote 0 bytes to fd #" << fd << std::endl;
             }
         }
     }
diff --git a/lib/tcpip.h b/lib/tcpip.h
index 24fafd9..291a717 100644
--- a/lib/tcpip.h
+++ b/lib/tcpip.h
@@ -79,7 +79,7 @@ public:
     int readNet(int fd, char *buffer, int nbytes, int timeout);
   
     // Write to the socket  
-    int writeNet(std::string buffer);
+    int writeNet(const std::string &buffer);
     int writeNet(char const *buffer);
     int writeNet(char const *buffer, int nbytes);
     int writeNet(int fd, char const *buffer);
@@ -100,10 +100,10 @@ public:
     retcode_t authNetServer(void);
 
     // Extract some info from the other end of the connection.
-    const std::string remoteIP(void);
-    const std::string remoteIP(struct in_addr addr);
-    const std::string remoteName(void);
-    const std::string remoteName(struct in_addr addr);
+    const std::string &remoteIP(void);
+    const std::string &remoteIP(struct in_addr addr);
+    const std::string &remoteName(void);
+    const std::string &remoteName(struct in_addr addr);
 
     Tcpip &operator = (Tcpip &tcp);
 

http://git.savannah.gnu.org/cgit/powerguru.git/commit/?id=55fae81d91c615d1fae7da83126258443b2d7c8d


commit 55fae81d91c615d1fae7da83126258443b2d7c8d
Author: Rob Savoye <address@hidden>
Date:   Wed Nov 21 21:27:28 2018 -0700

    Add a timestamp column

diff --git a/devices/ownet.h b/devices/ownet.h
index b922764..2e07432 100644
--- a/devices/ownet.h
+++ b/devices/ownet.h
@@ -132,9 +132,12 @@ public:
             temp->lowtemp =std::stof(getValue(device, "templow"));
             temp->hightemp = std::stof(getValue(device, "temphigh"));
             // Add data to the database
+            std::string stamp;
+            stamp = pdb.gettime(stamp);
             std::string query = family + ',';
             query += "\'" + id;
             query += "\', \'" + type;
+            query += "\', \'" + stamp;
             query += "\', " + std::to_string(temp->temp);
             query += ", " + std::to_string(temp->lowtemp);
             query +=  ", " + std::to_string(temp->hightemp);
@@ -239,9 +242,12 @@ public:
                 temp->hightemp = std::stof(getValue(*it, "temphigh"));
                 _temperatures[*it] = temp;
 
+                std::string stamp;
+                stamp = pdb.gettime(stamp);
                 std::string query = data->family + ',';
                 query += "\'" + data->id;
                 query += "\', \'" + data->type;
+                query += "\', \'" + stamp;
                 query += "\', " + std::to_string(temp->temp);
                 query += ", " + std::to_string(temp->lowtemp);
                 query +=  ", " + std::to_string(temp->hightemp);

http://git.savannah.gnu.org/cgit/powerguru.git/commit/?id=1f8712f22e06e6c2e8b7ad7e640c1c4ba090ed18


commit 1f8712f22e06e6c2e8b7ad7e640c1c4ba090ed18
Author: Rob Savoye <address@hidden>
Date:   Wed Nov 21 21:26:19 2018 -0700

    use parens, not braces for variables

diff --git a/client/Makefile.am b/client/Makefile.am
index c8507b9..b86607f 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -27,8 +27,8 @@ pguru_SOURCES = cmd.cc
 pguru_LDADD = ../lib/libpguru.la -ldl
 
 if BUILD_LIBXML
-pguru_CPPFLAGS += ${LIBXML_CPPFLAGS}
-pguru_LDADD += ${LIBXML_LIBS}
+pguru_CPPFLAGS += $(LIBXML_CPPFLAGS)
+pguru_LDADD += $(LIBXML_LIBS)
 endif
 
 if BUILD_SNMP
@@ -39,5 +39,11 @@ if BUILD_OWNET
 pguru_LDADD += $(OWNET_LIBS)
 endif
 
+if BUILD_POSTGRESQL
+pguru_CPPFLAGS += $(PQ_CPPFLAGS)
+pguru_LDADD +=  $(PQ_LIBS)
+endif
+
+
 # pguru_DEPENDENCIES = ../lib/libpguru.la
 

http://git.savannah.gnu.org/cgit/powerguru.git/commit/?id=2507f08aeec28f8ac89ec2192aef0ab87249dfaa


commit 2507f08aeec28f8ac89ec2192aef0ab87249dfaa
Author: Rob Savoye <address@hidden>
Date:   Wed Nov 21 21:25:26 2018 -0700

    Add a timestamp column

diff --git a/powerguru.sql b/powerguru.sql
index 3549a76..455edf9 100644
--- a/powerguru.sql
+++ b/powerguru.sql
@@ -56,8 +56,9 @@ CREATE TABLE meters (
 DROP TABLE IF EXISTS onewire;
 CREATE TABLE onewire (
   family integer NOT NULL default '0',
-  id integer NOT NULL default '0',
+  id char(16) NOT NULL default '0',
   type char(12) NOT NULL default '0',
+  "timestamp" timestamp without time zone,
   temphigh float NOT NULL default '0',
   templow float NOT NULL default '0',
   temperature float NOT NULL default '0'

-----------------------------------------------------------------------

Summary of changes:
 client/Makefile.am |  10 +++-
 devices/ownet.h    |   6 ++
 lib/log.cc         |  85 ++++++++++++++-------------
 lib/log.h          |  34 +++++------
 lib/msgs.cc        |  20 ++++---
 lib/msgs.h         |   5 +-
 lib/serial.cc      | 105 ++++++++++++++++------------------
 lib/serial.h       |   3 +-
 lib/tcpip.cc       | 164 ++++++++++++++++++++++++++---------------------------
 lib/tcpip.h        |  10 ++--
 powerguru.sql      |   3 +-
 sim/fakeuart.cc    |  94 ++++++++++++++++--------------
 sim/fakeuart.h     |  33 +++++++----
 sim/osim.cc        | 122 ++++++++++++++++++++-------------------
 14 files changed, 365 insertions(+), 329 deletions(-)


hooks/post-receive
-- 
powerguru



reply via email to

[Prev in Thread] Current Thread [Next in Thread]