search for: ser_get

Displaying 4 results from an estimated 4 matches for "ser_get".

Did you mean: user_get
2008 Jul 10
2
[PATCH] tripplite driver updates
...retries W/L/V/X commands on failure. I've never seen these commands fail, but better to be safe. - upsdrv_shutdown() is significantly more robust. All serial i/o is checked for failure, errors are reported, and where possible, data returned is checked for range validity. - Wait time for ser_get calls is now 1.0s rather than 3.0s. - Update copyright date. --- nut-2.2.2/drivers/tripplite.c 2007-05-26 10:24:26.000000000 -0400 +++ nut-2.2.2-nk/drivers/tripplite.c 2008-07-09 16:38:08.000000000 -0400 @@ -6,7 +6,7 @@ Copyright (C) 1999 Russell Kroll <rkroll at exploits.org> Cop...
2013 Nov 18
2
[PATCH] al175: updated driver, please restore it
...don't like in this driver is the use of > > alarm(). > > > > Although this is presently used in the 'net-xml' driver (in case an > > older > > > > neon library is detected), there is no need for this here. We have > > > > timeouts on *all* ser_get* functions and these *must* be used instead. > > > > Note that with using timeouts I mean something different than setting > > > > them to '999' seconds and setting an alarm() to breakout early. Unless > > > > there is a really good reason to use an alarm...
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...fatalx(EXIT_FAILURE, "Unable to detect a Best/SOLA or Phoenix protocol UPS"); @@ -333,7 +333,7 @@ void upsdrv_updateinfo(void) } /* these things need a long time to respond completely */ - usleep(200000); + struct timespec delay = {0, 200e6}; nanosleep(&delay, NULL); ret = ser_get_line(upsfd, buf, sizeof(buf), ENDCHAR, "", SER_WAIT_SEC, SER_WAIT_USEC); Index: b/drivers/microdowell.c =================================================================== --- a/drivers/microdowell.c 2011-08-17 00:40:17.000000000 +0300 +++ b/drivers/microdowell.c 2011-08-17 00:40:17.0...
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...9 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* anything commented is optional anything else is mandatory */ #include "main.h" #include "serial.h" #define UPSDELAY 50000 /* 50 ms delay required for reliable operation */ #define SER_WAIT_SEC 2 /* allow 2.0 sec for ser_get calls */ #define SER_WAIT_USEC 0 #define ENDCHAR '\r' #define IGNCHARS " \n" #if defined(__sgi) && ! defined(__GNUC__) #define inline __inline #endif static int instcmd (const char *cmdname, const char *extra); static int upsdrv_setvar (const char *varname, cons...