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

Unit test liblaelaps thread base class. More...

#include <unistd.h>
#include <termios.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <iostream>
#include <fstream>
#include <string>
#include "rnr/rnrconfig.h"
#include "rnr/log.h"
#include "rnr/opts.h"
#include "rnr/pkg.h"
#include "rnr/appkit/Random.h"
#include "Laelaps/laelaps.h"
#include "Laelaps/laeThread.h"
#include "version.h"

Go to the source code of this file.

Classes

class  UTThread
 

Macros

#define APP_EC_OK   0
 success exit code
 
#define APP_EC_ARGS   2
 command-line options/arguments error exit code
 
#define APP_EC_EXEC   4
 execution exit code
 

Functions

int getch ()
 
int kbhit ()
 
static void mainInit (int argc, char *argv[])
 Main initialization. More...
 
int main (int argc, char *argv[])
 Main. More...
 

Variables

static char * Argv0
 the command
 
static double OptsHz = 2
 thread hertz rate
 
static bool_t OptsRand = false
 thread random jitter
 
static OptsPgmInfo_T PgmInfo
 Program information. More...
 
static OptsInfo_T OptsInfo []
 Command line options information.
 
UTThread operator
 

Detailed Description

Unit test liblaelaps thread base class.

LastChangedDate
2015-01-15 12:45:22 -0700 (Thu, 15 Jan 2015)
Rev
3857
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 utThread.cxx.

Function Documentation

static void mainInit ( int  argc,
char *  argv[] 
)
static

Main initialization.

Parameters
argcCommand-line argument count.
argvCommand-line argument list.
Exits:
Program terminates on conversion error.

Definition at line 242 of file utThread.cxx.

References APP_EC_OK, Argv0, laelaps::LaeThread::createThread(), main(), OptsHz, OptsInfo, PgmInfo, PkgInfo, laelaps::LaeThread::runThread(), and laelaps::LaeThread::terminateThread().

243 {
244  // name of this process
245  Argv0 = basename(argv[0]);
246 
247  // parse input options
248  argv = OptsGet(Argv0, &PkgInfo, &PgmInfo, OptsInfo, true, &argc, argv);
249 }
static char * Argv0
the command
Definition: utThread.cxx:86
static OptsInfo_T OptsInfo[]
Command line options information.
Definition: utThread.cxx:111
static const PkgInfo_T PkgInfo
Definition: version.h:45
static OptsPgmInfo_T PgmInfo
Program information.
Definition: utThread.cxx:93