class mrpt::hwdrivers::CRaePID

Overview

This class implements a driver for the RAE Systems gas PhotoIonization Detector (PID) (Tested on a MiniRAE Lite) The sensor is accessed via a standard (or USB) serial port.

Refer to the manufacturer website for details on this sensor: http://www.raesystems.com/products/minirae-lite

See also:

mrpt::obs::CObservationGasSensors

#include <mrpt/hwdrivers/CRaePID.h>

class CRaePID: public mrpt::hwdrivers::CGenericSensor
{
public:
    // construction

    CRaePID();

    // methods

    virtual void doProcess();
    virtual void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase& configSource, const std::string& section);
    std::string getFirmware();
    std::string getModel();
    std::string getSerialNumber();
    std::string getName();
    bool switchPower();
    mrpt::obs::CObservationGasSensors getFullInfo();
    bool errorStatus(std::string& errorString);
    void getLimits(float& min, float& max);
};

Inherited Members

public:
    // typedefs

    typedef std::shared_ptr<CGenericSensor> Ptr;
    typedef std::multimap<mrpt::system::TTimeStamp, mrpt::serialization::CSerializable::Ptr> TListObservations;
    typedef std::pair<mrpt::system::TTimeStamp, mrpt::serialization::CSerializable::Ptr> TListObsPair;

    // enums

    enum TSensorState;

    // methods

    virtual const mrpt::hwdrivers::TSensorClassId* GetRuntimeClass() const = 0;
    TSensorState getState() const;
    double getProcessRate() const;
    std::string getSensorLabel() const;
    void setSensorLabel(const std::string& sensorLabel);
    void enableVerbose(bool enabled = true);
    bool isVerboseEnabled() const;
    CGenericSensor& operator = (const CGenericSensor&);
    virtual void loadConfig(const mrpt::config::CConfigFileBase& configSource, const std::string& section);
    virtual void initialize();
    virtual void doProcess() = 0;
    virtual TListObservations getObservations();
    virtual void setPathForExternalImages(] const std::string& directory);
    virtual void setExternalImageFormat(const std::string& ext);
    virtual void setExternalImageJPEGQuality(const unsigned int quality);
    virtual unsigned int getExternalImageJPEGQuality() const;
    static void registerClass(const TSensorClassId* pNewClass);
    static CGenericSensor* createSensor(const std::string& className);
    static Ptr createSensorPtr(const std::string& className);

Construction

CRaePID()

Default constructor.

Methods

virtual void doProcess()

This method will be invoked at a minimum rate of “process_rate” (Hz)

Parameters:

This

method must throw an exception with a descriptive message if some critical error is found.

virtual void loadConfig_sensorSpecific(
    const mrpt::config::CConfigFileBase& configSource,
    const std::string& section
    )

Loads specific configuration for the device from a given source of configuration parameters, for example, an “.ini” file, loading from the section “[iniSection]” (see config::CConfigFileBase and derived classes)

Parameters:

This

method must throw an exception with a descriptive message if some critical parameter is missing or has an invalid value.

std::string getFirmware()

Get firmware version string.

std::string getModel()

Get model string.

std::string getSerialNumber()

Get serial number as a string.

std::string getName()

Get name string.

bool switchPower()

Switch power on or off (returns true if turned on).

mrpt::obs::CObservationGasSensors getFullInfo()

Get full reading (see PID documentation).

In the returned observation, each reding is saved as a separate e-nose

bool errorStatus(std::string& errorString)

Get error status (true if an error was found).

errorString shows the error code (see PID documentation)

void getLimits(float& min, float& max)

Get alarm limits.