Laelaps  2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
laelaps_utils.cxx File Reference

Diagnostic utilities. More...

#include <sys/types.h>
#include <unistd.h>
#include <termios.h>
#include <limits.h>
#include <dirent.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string>
#include "rnr/rnrconfig.h"
#include "rnr/color.h"
#include "laelaps_diag.h"

Go to the source code of this file.

Macros

#define COLOR_PASS   ANSI_FG_GREEN
 
#define COLOR_WARN   ANSI_FG_YELLOW
 
#define COLOR_FAIL   ANSI_FG_RED
 
#define COLOR_YN   ANSI_FG_BLUE
 
#define COLOR_FATAL   ANSI_FG_BRIGHT_RED
 
#define COLOR_OFF   ANSI_COLOR_RESET
 

Functions

static int getch ()
 
long findProc (const string &strName)
 
int kbblock ()
 
int kbhit ()
 
void setTags (bool bColor)
 
void printHdr (string strDiag)
 
void printSubHdr (string strName)
 
void printTestResult (const char *sTag, const char *sFmt,...)
 
void printSubTotals (DiagStats &stats)
 
void printTotals (DiagStats &stats)
 
void printGrandTotals (DiagStats &stats)
 

Variables

static const char * DiagSep
 
static const char * SubHdrSep
 
static const char * SubSumTag = " ..."
 
static const char * TotSumTag = "..."
 
const int MaxTagSize = 32
 
char PassTag [MaxTagSize]
 
char WarnTag [MaxTagSize]
 
char FailTag [MaxTagSize]
 
char WaitTag [MaxTagSize]
 
char YNTag [MaxTagSize]
 
char FatalTag [MaxTagSize]
 

Detailed Description

Diagnostic utilities.

Author
Robin Knight (robin.nosp@m..kni.nosp@m.ght@r.nosp@m.oadn.nosp@m.arrow.nosp@m.s.co.nosp@m.m)
Copyright
© 2015-2017. RoadNarrows LLC.
http://www.roadnarrows.com
All Rights Reserved

Definition in file laelaps_utils.cxx.

Variable Documentation

const char* DiagSep
static
Initial value:
=
"-----------------------------------------------------------------------------"

Definition at line 82 of file laelaps_utils.cxx.

const char* SubHdrSep
static
Initial value:
=
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ."

Definition at line 85 of file laelaps_utils.cxx.