Station API

Dependents:   GMCStation

Embed: (wiki syntax)

« Back to documentation index

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:
gmcPinpin for GMC input
buzzerPinpin for buzzer output
ledPinpin for LED output
cpm2usvconversion ratio of CPM to uSv
buzzerEnabledif true enable buzzer
ledEnabledif 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:
gmcPinpin for GMC input
buzzerPinpin for buzzer output
ledPinpin for LED output
filenamename of the config file
verboseif 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 (  )

returns buzzer status

Returns:
buzzer status

Definition at line 146 of file GMCounter.h.

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 (  )

returns LED status

Returns:
LED status

Definition at line 162 of file GMCounter.h.

float getRadiation (  )

Returns radiation.

Returns:
radiation in uSv

Definition at line 128 of file GMCounter.h.

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:
cpm2usvconversion 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.