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

#include <phyphoxBleExperiment.h>

Inheritance diagram for PhyphoxBleExperiment::Dropdown:

Public Member Functions

 Dropdown ()
 
 Dropdown (const char *label, int channel=0)
 
void setOptions (int n, const char *const labels[], const float *values)
 1.x form: n options from two arrays (copied at addExperiment; the arrays may be locals).
 
void addOption (const char *label, float value)
 New in 2.0; up to PHYPHOX_BLE_INLINE_OPTIONS this way, any number via setOptions().
 
void setColor (const char *)
 
- Public Member Functions inherited from PhyphoxBleExperiment::InputElement
void setChannel (int)
 input channel 1…PHYPHOX_BLE_INPUT_CHANNELS
 
void setDefault (float)
 
void onChange (phyphox::ChangeCallback)
 Called on the board whenever the phone delivers a new value for this channel.
 
- Public Member Functions inherited from PhyphoxBleExperiment::Element
 Element (const Element &)=delete
 
Element & operator= (const Element &)=delete
 
virtual ~Element ()
 
virtual void setLabel (const char *)
 
void setXMLAttribute (const char *)
 Raw attribute text appended verbatim to the element's start tag, e.g.
 
void setVisibility (int inputChannel)
 Show the element only while the last value in that input channel is > 0 (a toggle's channel, typically).
 
phyphox::ElementData & data ()
 
const phyphox::ElementData & data () const
 
virtual bool isExportData () const
 

Public Attributes

phyphox::MapEntry inlineOptions [PHYPHOX_BLE_INLINE_OPTIONS]
 
const char *const * optionLabels = nullptr
 setOptions(): the caller's arrays
 
const float * optionValues = nullptr
 
uint8_t optionCount = 0
 
- Public Attributes inherited from PhyphoxBleExperiment::Element
Element * next = nullptr
 intrusive list link, set by View::addElement()
 
View * owner = nullptr
 the view whose list holds this object (set by addElement)
 
const Element * aliasOf = nullptr
 An element added to a second view is represented there by a small heap-allocated alias that points back at the original — the store reads the original's data.
 

Additional Inherited Members

- Protected Member Functions inherited from PhyphoxBleExperiment::InputElement
 InputElement (phyphox::ElementType t)
 
- Protected Member Functions inherited from PhyphoxBleExperiment::Element
 Element (phyphox::ElementType t)
 
- Protected Attributes inherited from PhyphoxBleExperiment::Element
phyphox::ElementData data_
 

Constructor & Destructor Documentation

◆ Dropdown() [1/2]

PhyphoxBleExperiment::Dropdown::Dropdown ( )
inline

◆ Dropdown() [2/2]

PhyphoxBleExperiment::Dropdown::Dropdown ( const char *  label,
int  channel = 0 
)
inlineexplicit

Member Function Documentation

◆ addOption()

void PhyphoxBleExperiment::Dropdown::addOption ( const char *  label,
float  value 
)

New in 2.0; up to PHYPHOX_BLE_INLINE_OPTIONS this way, any number via setOptions().

◆ setColor()

void PhyphoxBleExperiment::Dropdown::setColor ( const char *  )

◆ setOptions()

void PhyphoxBleExperiment::Dropdown::setOptions ( int  n,
const char *const  labels[],
const float *  values 
)

1.x form: n options from two arrays (copied at addExperiment; the arrays may be locals).

Member Data Documentation

◆ inlineOptions

phyphox::MapEntry PhyphoxBleExperiment::Dropdown::inlineOptions[PHYPHOX_BLE_INLINE_OPTIONS]

◆ optionCount

uint8_t PhyphoxBleExperiment::Dropdown::optionCount = 0

◆ optionLabels

const char* const* PhyphoxBleExperiment::Dropdown::optionLabels = nullptr

setOptions(): the caller's arrays

◆ optionValues

const float* PhyphoxBleExperiment::Dropdown::optionValues = nullptr

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