#! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'MANIFEST' <<'END_OF_FILE' X File Name Archive # Description X----------------------------------------------------------- X MANIFEST 1 This shipping list X Wdog 1 X Wdog/Makefile 1 X Wdog/Wdog.hh 1 END_OF_FILE if test 238 -ne `wc -c <'MANIFEST'`; then echo shar: \"'MANIFEST'\" unpacked with wrong size! fi # end of 'MANIFEST' fi if test ! -d 'Wdog' ; then echo shar: Creating directory \"'Wdog'\" mkdir 'Wdog' fi if test -f 'Wdog/Makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Wdog/Makefile'\" else echo shar: Extracting \"'Wdog/Makefile'\" \(951 characters\) sed "s/^X//" >'Wdog/Makefile' <<'END_OF_FILE' X# X# Makefile for X# Author: X# Date: X# X# GNU C++ XCCC= g++68 X# XOPT= -O -fstrength-reduce -fforce-mem -finline-functions -fcombine-regs \ X -fomit-frame-pointer -fminimal-debug X# XDEFINES= X# XINCLUDES= -I/vx/h -I../include X# XCCFLAGS= $(OPT) $(DEFINES) $(INCLUDES) X# XLIBS= X# XOBJS= X# XSRCS= X# XHEADERS= Wdog.hh X# XBINDIR= ../bin X# XINCDIR= ../include X X.KEEP_STATE: X Xall: X -for i in $(HEADERS); \ X do (diff $$i $(INCDIR)/$$i >tmpdiff; \ X if test -s tmpdiff; \ X then \ X (echo "Copying $$i"; cp $$i $(INCDIR)) \ X fi;); \ X done; X -rm tmpdiff X Xtst: wtst.o X Xasm: X Xget_rcs: X for i in $(HEADERS); \ X do (echo "co $$i";co $$i); \ X done; X Xget_rcs_locked: X for i in $(HEADERS); \ X do (echo "co -l $$i";co -l $$i); \ X done; X Xput_rcs: X for i in $(HEADERS); \ X do (echo "ci $$i";ci $$i); \ X done; X Xset_rcs: X for i in $(HEADERS); \ X do (echo "rcs -c\" * \" -L $$i";rcs -c" * " -L $$i); \ X done; X Xclean: X rm -f *.o *~ core X Xreal_clean: clean X rm -f *.c *.h X X X X X X END_OF_FILE if test 951 -ne `wc -c <'Wdog/Makefile'`; then echo shar: \"'Wdog/Makefile'\" unpacked with wrong size! fi # end of 'Wdog/Makefile' fi if test -f 'Wdog/Wdog.hh' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Wdog/Wdog.hh'\" else echo shar: Extracting \"'Wdog/Wdog.hh'\" \(1261 characters\) sed "s/^X//" >'Wdog/Wdog.hh' <<'END_OF_FILE' X/* This looks like C, but it's really C++!! X * $Id: Wdog.hh,v 1.1 1992/01/16 20:25:18 thor Exp $ X * X * Module: Wdog.hh X * Original Author: Richard E. K. Neitzel X * Copywrited by the National Center for Atmospheric Research X * Date: $Date: 1992/01/16 20:25:18 $ X * X * revision history X * ---------------- X * $Log: Wdog.hh,v $ X * Revision 1.1 1992/01/16 20:25:18 thor X * Initial revision X * X * X * X * description: X * This class encapulates the WRS watchdog functions. X * X */ X#ifndef INCWdoghh X#define INCWdoghh X Xextern "C" { X#include "vxWorks.h" X#include "wdLib.h" X}; X Xclass Wdog { X private: X WDOG_ID wid; // The watchdog id. X X VOIDFUNCPTR code; // The function to invoke when the X // watchdog triggers. X X int parameter; // Value passed to code. X X int delay; // Timeout in ticks. X X public: X Wdog(VOIDFUNCPTR func, int time, int param, int go = 0) X { X delay = time; X code = func; X parameter = param; X X wid = wdCreate(); X X if (go) // Default is to wait for explicit start. X Start(); X } X X void Start(void) { wdStart(wid,delay,code,parameter); } X X void Cancel(void) { wdCancel(wid); } X X void Restart(void) { Cancel(); Start(); } X X ~Wdog(void) { wdDelete(wid); } X}; X X#endif // INCWdoghh END_OF_FILE if test 1261 -ne `wc -c <'Wdog/Wdog.hh'`; then echo shar: \"'Wdog/Wdog.hh'\" unpacked with wrong size! fi # end of 'Wdog/Wdog.hh' fi echo shar: End of archive 1 \(of 1\). cp /dev/null ark1isdone MISSING="" for I in 1 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have the archive. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0