phyphox BLE
Plot your Arduino's data in the phyphox app and control the board from the phone
Loading...
Searching...
No Matches
PhyphoxBleExperiment::Sensor Class Reference

A sensor of the phone whose readings the phone sends to the board. More...

#include <phyphoxBleExperiment.h>

Public Member Functions

 Sensor ()=default
 
 Sensor (const char *type)
 
 Sensor (const Sensor &)=delete
 
void setType (const char *)
 a SENSOR_* constant (phyphox file-format name)
 
void setAverage (bool)
 
void setRate (int hz)
 
void setRateStrategy (const char *)
 How the phone reconciles the requested rate with what its sensor offers: "auto", "request", "generate" or "limit" (format 1.14).
 
void setStride (int n)
 use only every n-th reading (1.14)
 
void setNameFilter (const char *)
 Select a sensor by name (the app's device info lists them) — needed for SENSOR_CUSTOM, useful when a phone has several sensors of one type (1.19, Android).
 
void setTypeFilter (int androidSensorType)
 select by Android sensor type constant (1.19)
 
void mapChannel (const char *component, int ch)
 Deliver component ("x", "y", "z", "abs", "accuracy", "t") into input channel ch.
 
void setComponent (const char *)
 1.x: like mapChannel(component, next free)
 
void setXMLAttribute (const char *)
 

Public Attributes

phyphox::SensorData data
 
Sensor * next = nullptr
 

Detailed Description

A sensor of the phone whose readings the phone sends to the board.

Constructor & Destructor Documentation

◆ Sensor() [1/3]

PhyphoxBleExperiment::Sensor::Sensor ( )
default

◆ Sensor() [2/3]

PhyphoxBleExperiment::Sensor::Sensor ( const char *  type)
inlineexplicit

◆ Sensor() [3/3]

PhyphoxBleExperiment::Sensor::Sensor ( const Sensor &  )
delete

Member Function Documentation

◆ mapChannel()

void PhyphoxBleExperiment::Sensor::mapChannel ( const char *  component,
int  ch 
)

Deliver component ("x", "y", "z", "abs", "accuracy", "t") into input channel ch.

◆ setAverage()

void PhyphoxBleExperiment::Sensor::setAverage ( bool  )

◆ setComponent()

void PhyphoxBleExperiment::Sensor::setComponent ( const char *  )

1.x: like mapChannel(component, next free)

◆ setNameFilter()

void PhyphoxBleExperiment::Sensor::setNameFilter ( const char *  )

Select a sensor by name (the app's device info lists them) — needed for SENSOR_CUSTOM, useful when a phone has several sensors of one type (1.19, Android).

◆ setRate()

void PhyphoxBleExperiment::Sensor::setRate ( int  hz)

◆ setRateStrategy()

void PhyphoxBleExperiment::Sensor::setRateStrategy ( const char *  )

How the phone reconciles the requested rate with what its sensor offers: "auto", "request", "generate" or "limit" (format 1.14).

◆ setStride()

void PhyphoxBleExperiment::Sensor::setStride ( int  n)

use only every n-th reading (1.14)

◆ setType()

void PhyphoxBleExperiment::Sensor::setType ( const char *  )

a SENSOR_* constant (phyphox file-format name)

◆ setTypeFilter()

void PhyphoxBleExperiment::Sensor::setTypeFilter ( int  androidSensorType)

select by Android sensor type constant (1.19)

◆ setXMLAttribute()

void PhyphoxBleExperiment::Sensor::setXMLAttribute ( const char *  )

Member Data Documentation

◆ data

phyphox::SensorData PhyphoxBleExperiment::Sensor::data

◆ next

Sensor* PhyphoxBleExperiment::Sensor::next = nullptr

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