"Fossies" - the Fresh Open Source Software Archive

Member "xosview-1.23/linux/serialmeter.h" (11 Jul 2020, 916 Bytes) of package /linux/misc/xosview-1.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "serialmeter.h" see the Fossies "Dox" file reference documentation.

    1 //
    2 //  Copyright (c) 1994, 1995, 2006 by Mike Romberg ( mike.romberg@noaa.gov )
    3 //
    4 //  This file may be distributed under terms of the GPL
    5 //
    6 
    7 #ifndef _SERIALMETER_H_
    8 #define _SERIALMETER_H_
    9 
   10 // hack for not having linux/serial_reg.h, (Debian bug #427599)
   11 #define UART_LSR        5
   12 #define UART_MSR        6
   13 
   14 #include "bitmeter.h"
   15 #include "xosview.h"
   16 
   17 
   18 class SerialMeter : public BitMeter {
   19 public:
   20   enum Device { S0, S1, S2, S3, S4, S5, S6, S7, S8, S9 };
   21   static int numDevices(void) { return 10; }
   22 
   23   SerialMeter( XOSView *parent, Device device);
   24   ~SerialMeter( void );
   25 
   26   static const char *getResourceName(Device dev);
   27 
   28   void checkevent( void );
   29 
   30   void checkResources( void );
   31 
   32 private:
   33   unsigned short int _port;
   34   Device _device;
   35 
   36   void getserial( void );
   37   bool getport(unsigned short int port);
   38   const char *getTitle(Device dev) const;
   39   unsigned short int getPortBase(Device dev) const;
   40 };
   41 
   42 #endif