GQLLC GMC-300  0.1
GQ Electronics Geiger-Counter Model 300
Classes | Functions | Variables
/home/phil/Projects/gqgmc/gqgmc.cc File Reference
#include <string>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <ios>
#include <unistd.h>
#include <fcntl.h>
#include <termios.h>
#include <string.h>
#include "gqgmc.hh"

Classes

struct  HexCharStruct

Functions

static std::ostream & operator<< (std::ostream &o, const HexCharStruct &hs)
static HexCharStruct Hex (unsigned char _c)

Variables

static const string get_serial_cmd = "<GETSERIAL>>"
static const string get_version_cmd = "<GETVER>>"
static const string get_voltage_cmd = "<GETVOLT>>"
static const string get_cpm_cmd = "<GETCPM>>"
static const string get_cps_cmd = "<GETCPS>>"
static const string get_cfg_cmd = "<GETCFG>>"
static const string erase_cfg_cmd = "<ECFG>>"
static const string update_cfg_cmd = "<CFGUPDATE>>"
static const string turn_on_cps_cmd = "<HEARTBEAT1>>"
static const string turn_off_cps_cmd = "<HEARTBEAT0>>"
static const string turn_off_pwr_cmd = "<POWEROFF>>"
static float const kNew_Firmware = 2.15f
static uint32_t const kNVMSize = 256
static struct termios settings

Detailed Description

Define the class and its methods describing the capabilities of the GQ Electronics LLC Geiger-Muller Counter (GQ GMC). this code applies to model 300 and later geiger counters.


Function Documentation

static HexCharStruct Hex ( unsigned char  _c) [static]
static std::ostream& operator<< ( std::ostream &  o,
const HexCharStruct hs 
) [static]

Variable Documentation

const string erase_cfg_cmd = "<ECFG>>" [static]
const string get_cfg_cmd = "<GETCFG>>" [static]
const string get_cpm_cmd = "<GETCPM>>" [static]
const string get_cps_cmd = "<GETCPS>>" [static]
const string get_serial_cmd = "<GETSERIAL>>" [static]

Here we declare local constants which are the ASCII strings for the various commands to the GQ GMC. These are not declared as data members of the GQGMC class because there is just no need to do so. The user never need know the actual string commands because there is a dedicated public method for each command.

All commands start with '<'. That is followed by ASCII text, followed by ">>". Commands which take binary data as parameters must be dynamically constructed within the command method.

const string get_version_cmd = "<GETVER>>" [static]
const string get_voltage_cmd = "<GETVOLT>>" [static]
float const kNew_Firmware = 2.15f [static]
uint32_t const kNVMSize = 256 [static]
struct termios settings [static]
const string turn_off_cps_cmd = "<HEARTBEAT0>>" [static]
const string turn_off_pwr_cmd = "<POWEROFF>>" [static]
const string turn_on_cps_cmd = "<HEARTBEAT1>>" [static]
const string update_cfg_cmd = "<CFGUPDATE>>" [static]
 All Classes Namespaces Files Functions Variables Enumerations Enumerator