Nol.A SDK Library 26.11.2
For IoT System Software Development
Loading...
Searching...
No Matches
PMS7003 Class Reference

PMS7003 particulate sensor with particle-count reporting. Use inherited begin() before receiving measurements. More...

#include <PMS7003.hpp>

Inheritance diagram for PMS7003:
PMS3003

Classes

struct  value_t
 One measurement frame. Mass concentrations are in micrograms/m^3; particle counts are cumulative counts above the indicated size per 100 mL. More...

Public Member Functions

 PMS7003 (SerialPort &port, int pinSet, int pinReset)
 Bind the sensor UART, SET pin, and RESET pin.
void onReadDone (void(*func)(value_t &))
 Register a completed-frame callback; all fields are -1 on checksum failure; nullptr disables it.
Public Member Functions inherited from PMS3003
 PMS3003 (SerialPort &, int pinSet, int pinReset)
 Bind the UART, SET output pin, and RESET output pin.
void begin ()
 Configure the sensor UART and control pins, then start listening.
void onReadDone (void(*func)(int32_t pm1_0_CF1, int32_t pm2_5_CF1, int32_t pm10_0_CF1, int32_t pm1_0_Atmosphere, int32_t pm2_5_Atmosphere, int32_t pm10_0_Atmosphere))
 Register notification for a complete measurement frame.

Protected Member Functions

void eventSensorDataReceived () override

Protected Attributes

void(* callback )(value_t &) = NULL
Protected Attributes inherited from PMS3003
void(* callback )(int32_t pm1_0_CF1, int32_t pm2_5_CF1, int32_t pm10_0_CF1, int32_t pm1_0_Atmosphere, int32_t pm2_5_Atmosphere, int32_t pm10_0_Atmosphere) = NULL
SerialPort & p
const int pinSet
const int pinReset
uint8_t index = 0
uint8_t high = 0
uint16_t checkCode

Detailed Description

PMS7003 particulate sensor with particle-count reporting. Use inherited begin() before receiving measurements.

Author
Jongsoo Jeong (CoXlab)
Date
2018. 8. 16.

Member Function Documentation

◆ eventSensorDataReceived()

void PMS7003::eventSensorDataReceived ( )
overrideprotectedvirtual

Reimplemented from PMS3003.

◆ onReadDone()

void PMS7003::onReadDone ( void(* func )(value_t &))

Register a completed-frame callback; all fields are -1 on checksum failure; nullptr disables it.

Parameters
funcReceives a reference to driver-owned storage reused on the next frame. Copy the value inside the callback if it must be retained.

The documentation for this class was generated from the following file: