Station API
GMCounter Class Reference
class for Geiger Mueller Counter More...
#include <GMCounter.h>
Public Member Functions | |
GMCounter (PinName gmcPin, PinName buzzerPin, PinName ledPin, float cpm2usv=1.0F/120, bool buzzerEnabled=true, bool ledEnabled=true) | |
Constructor. | |
int | getCPM () |
gets CPM (Counts Per Minute) value | |
float | getAverageCPM () |
gets average CPM (Counts Per Minute) | |
float | getRadiation () |
Returns radiation. | |
float | getAverageRadiation () |
Returns average radiation. | |
bool | getBuzzer () |
returns buzzer status | |
void | setBuzzer (bool enable=true) |
sets buzzer enabled or disabled | |
bool | getLED () |
returns LED status | |
void | setLED (bool enable=true) |
sets LED enabled or disabled | |
void | setConversionRatio (float cpm2usv) |
sets CPM to uSv conversion ration | |
Static Public Member Functions | |
static GMCounter | create (PinName gmcPin, PinName buzzerPin, PinName ledPin, char *filename, bool verbose=false) |
creates an GMCounter object |
Detailed Description
class for Geiger Mueller Counter
Definition at line 32 of file GMCounter.h.
Constructor & Destructor Documentation
GMCounter | ( | PinName | gmcPin, |
PinName | buzzerPin, | ||
PinName | ledPin, | ||
float | cpm2usv = 1.0F / 120 , |
||
bool | buzzerEnabled = true , |
||
bool | ledEnabled = true |
||
) |
Constructor.
- Parameters:
-
gmcPin pin for GMC input buzzerPin pin for buzzer output ledPin pin for LED output cpm2usv conversion ratio of CPM to uSv buzzerEnabled if true enable buzzer ledEnabled if true enable LED
Definition at line 44 of file GMCounter.h.
Member Function Documentation
static GMCounter create | ( | PinName | gmcPin, |
PinName | buzzerPin, | ||
PinName | ledPin, | ||
char * | filename, | ||
bool | verbose = false |
||
) | [static] |
creates an GMCounter object
- Parameters:
-
gmcPin pin for GMC input buzzerPin pin for buzzer output ledPin pin for LED output filename name of the config file verbose if true display debug info
- Returns:
- GMCounter object
Definition at line 65 of file GMCounter.h.
float getAverageCPM | ( | ) |
gets average CPM (Counts Per Minute)
- Returns:
- average CPM during the last 60 minutes
Definition at line 111 of file GMCounter.h.
float getAverageRadiation | ( | ) |
Returns average radiation.
- Returns:
- average radiation during last 60 minutes in uSv
Definition at line 137 of file GMCounter.h.
bool getBuzzer | ( | ) |
int getCPM | ( | ) |
gets CPM (Counts Per Minute) value
- Returns:
- counts during the last 60 seconds
Definition at line 94 of file GMCounter.h.
bool getLED | ( | ) |
float getRadiation | ( | ) |
void setBuzzer | ( | bool | enable = true ) |
sets buzzer enabled or disabled
Definition at line 153 of file GMCounter.h.
void setConversionRatio | ( | float | cpm2usv ) |
sets CPM to uSv conversion ration
- Parameters:
-
cpm2usv conversion ratio uSv/CPM
Definition at line 178 of file GMCounter.h.
void setLED | ( | bool | enable = true ) |
sets LED enabled or disabled
Definition at line 169 of file GMCounter.h.
Generated on Wed Jul 20 2022 21:57:16 by 1.7.2