PX4 Firmware
PX4 Autopilot Software http://px4.io
NullMixer Class Reference

Null mixer; returns zero. More...

#include <NullMixer.hpp>

Inheritance diagram for NullMixer:
Collaboration diagram for NullMixer:

Public Member Functions

 NullMixer ()
 
virtual ~NullMixer ()=default
 
 NullMixer (const NullMixer &)=delete
 
NullMixeroperator= (const NullMixer &)=delete
 
 NullMixer (NullMixer &&)=delete
 
NullMixeroperator= (NullMixer &&)=delete
 
unsigned mix (float *outputs, unsigned space) override
 Perform the mixing function. More...
 
unsigned set_trim (float trim) override
 Set trim offset for this mixer. More...
 
unsigned get_trim (float *trim) override
 Get trim offset for this mixer. More...
 
- Public Member Functions inherited from Mixer
 Mixer (ControlCallback control_cb, uintptr_t cb_handle)
 Constructor. More...
 
virtual ~Mixer ()=default
 
 Mixer (const Mixer &)=delete
 
Mixeroperator= (const Mixer &)=delete
 
 Mixer (Mixer &&)=delete
 
Mixeroperator= (Mixer &&)=delete
 
virtual uint16_t get_saturation_status ()
 Get the saturation status. More...
 
virtual void groups_required (uint32_t &groups)
 Analyses the mix configuration and updates a bitmask of groups that are required. More...
 
virtual void set_max_delta_out_once (float delta_out_max)
 Empty method, only implemented for MultirotorMixer and MixerGroup class. More...
 
virtual void set_thrust_factor (float val)
 
virtual void set_airmode (Airmode airmode)
 Set airmode. More...
 
virtual unsigned get_multirotor_count ()
 
- Public Member Functions inherited from ListNode< Mixer *>
void setSibling (Mixer * sibling)
 
const MixergetSibling () const
 

Static Public Member Functions

static NullMixerfrom_text (const char *buf, unsigned &buflen)
 Factory method. More...
 

Additional Inherited Members

- Public Types inherited from Mixer
enum  Airmode : int32_t { Airmode::disabled = 0, Airmode::roll_pitch = 1, Airmode::roll_pitch_yaw = 2 }
 
typedef int(* ControlCallback) (uintptr_t handle, uint8_t control_group, uint8_t control_index, float &control)
 Fetch a control value. More...
 
- Protected Member Functions inherited from Mixer
float get_control (uint8_t group, uint8_t index)
 Invoke the client callback to fetch a control value. More...
 
- Static Protected Member Functions inherited from Mixer
static const char * findtag (const char *buf, unsigned &buflen, char tag)
 Find a tag. More...
 
static char findnexttag (const char *buf, unsigned buflen)
 Find next tag and return it (0 is returned if no tag is found) More...
 
static const char * skipline (const char *buf, unsigned &buflen)
 Skip a line. More...
 
static bool string_well_formed (const char *buf, unsigned &buflen)
 Check wether the string is well formed and suitable for parsing. More...
 
- Protected Attributes inherited from Mixer
ControlCallback _control_cb
 client-supplied callback used when fetching control values More...
 
uintptr_t _cb_handle
 
- Protected Attributes inherited from ListNode< Mixer *>
Mixer_list_node_sibling
 

Detailed Description

Null mixer; returns zero.

Used as a placeholder for output channels that are unassigned in groups.

Definition at line 43 of file NullMixer.hpp.

Constructor & Destructor Documentation

◆ NullMixer() [1/3]

NullMixer::NullMixer ( )
inline

Definition at line 46 of file NullMixer.hpp.

References from_text(), mix(), operator=(), and ~NullMixer().

Referenced by from_text().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~NullMixer()

virtual NullMixer::~NullMixer ( )
virtualdefault

Referenced by NullMixer().

Here is the caller graph for this function:

◆ NullMixer() [2/3]

NullMixer::NullMixer ( const NullMixer )
delete

◆ NullMixer() [3/3]

NullMixer::NullMixer ( NullMixer &&  )
delete

Member Function Documentation

◆ from_text()

NullMixer * NullMixer::from_text ( const char *  buf,
unsigned &  buflen 
)
static

Factory method.

Given a pointer to a buffer containing a text description of the mixer, returns a pointer to a new instance of the mixer.

Parameters
bufBuffer containing a text description of the mixer.
buflenLength of the buffer in bytes, adjusted to reflect the bytes consumed.
Returns
A new NullMixer instance, or nullptr if the text format is bad.

Definition at line 52 of file NullMixer.cpp.

References NullMixer(), and Mixer::string_well_formed().

Referenced by MixerGroup::load_from_buf(), and NullMixer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_trim()

unsigned NullMixer::get_trim ( float *  trim)
inlineoverridevirtual

Get trim offset for this mixer.

Returns
the number of outputs this mixer feeds to

Reimplemented from Mixer.

Definition at line 73 of file NullMixer.hpp.

◆ mix()

unsigned NullMixer::mix ( float *  outputs,
unsigned  space 
)
overridevirtual

Perform the mixing function.

Parameters
outputsArray into which mixed output(s) should be placed.
spaceThe number of available entries in the output array;
Returns
The number of entries in the output array that were populated.

Implements Mixer.

Definition at line 41 of file NullMixer.cpp.

Referenced by NullMixer().

Here is the caller graph for this function:

◆ operator=() [1/2]

NullMixer& NullMixer::operator= ( const NullMixer )
delete

Referenced by NullMixer().

Here is the caller graph for this function:

◆ operator=() [2/2]

NullMixer& NullMixer::operator= ( NullMixer &&  )
delete

◆ set_trim()

unsigned NullMixer::set_trim ( float  trim)
inlineoverridevirtual

Set trim offset for this mixer.

Returns
the number of outputs this mixer feeds to

Reimplemented from Mixer.

Definition at line 72 of file NullMixer.hpp.


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