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

#include <Block.hpp>

Inheritance diagram for control::Block:
Collaboration diagram for control::Block:

Public Member Functions

 Block (SuperBlock *parent, const char *name)
 
virtual ~Block ()=default
 
 Block (const Block &)=delete
 
Blockoperator= (const Block &)=delete
 
 Block (Block &&)=delete
 
Blockoperator= (Block &&)=delete
 
void getName (char *name, size_t n)
 
virtual void updateParams ()
 
virtual void setDt (float dt)
 
float getDt ()
 
- Public Member Functions inherited from ListNode< Block *>
void setSibling (Block * sibling)
 
const Block * getSibling () const
 

Protected Member Functions

virtual void updateParamsSubclass ()
 
SuperBlockgetParent ()
 
List< BlockParamBase * > & getParams ()
 

Protected Attributes

const char * _name
 
SuperBlock_parent
 
float _dt {0.0f}
 
List< BlockParamBase * > _params
 
- Protected Attributes inherited from ListNode< Block *>
Block * _list_node_sibling
 

Friends

class BlockParamBase
 

Detailed Description

Definition at line 59 of file Block.hpp.

Constructor & Destructor Documentation

◆ Block() [1/3]

control::Block::Block ( SuperBlock parent,
const char *  name 
)

Definition at line 48 of file Block.cpp.

References control::SuperBlock::getChildren(), and getParent().

Here is the call graph for this function:

◆ ~Block()

virtual control::Block::~Block ( )
virtualdefault

◆ Block() [2/3]

control::Block::Block ( const Block )
delete

◆ Block() [3/3]

control::Block::Block ( Block &&  )
delete

Member Function Documentation

◆ getDt()

◆ getName()

void control::Block::getName ( char *  name,
size_t  n 
)

Definition at line 57 of file Block.cpp.

References _name, control::blockNameLengthMax, getName(), and getParent().

Referenced by control::BlockParamBase::BlockParamBase(), getName(), control::SuperBlock::setDt(), control::SuperBlock::updateChildParams(), and updateParams().

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

◆ getParams()

List<BlockParamBase *>& control::Block::getParams ( )
inlineprotected

Definition at line 85 of file Block.hpp.

Referenced by control::BlockParamBase::BlockParamBase(), and updateParams().

Here is the caller graph for this function:

◆ getParent()

SuperBlock* control::Block::getParent ( )
inlineprotected

Definition at line 84 of file Block.hpp.

Referenced by Block(), and getName().

Here is the caller graph for this function:

◆ operator=() [1/2]

Block& control::Block::operator= ( const Block )
delete

◆ operator=() [2/2]

Block& control::Block::operator= ( Block &&  )
delete

◆ setDt()

virtual void control::Block::setDt ( float  dt)
inlinevirtual

Reimplemented in control::SuperBlock.

Definition at line 77 of file Block.hpp.

References dt.

Referenced by control::blockHighPassTest(), blockHighPassTest(), control::blockLowPass2Test(), blockLowPass2Test(), control::blockLowPassTest(), blockLowPassTest(), blockPTest(), control::blockPTest(), and control::SuperBlock::setDt().

Here is the caller graph for this function:

◆ updateParams()

void control::Block::updateParams ( )
virtual

Reimplemented in control::SuperBlock.

Definition at line 79 of file Block.cpp.

References control::blockNameLengthMax, getName(), getParams(), ListNode< T >::getSibling(), control::maxParamsPerBlock, name, control::BlockParamBase::update(), and updateParamsSubclass().

Referenced by control::SuperBlock::updateChildParams(), and control::SuperBlock::updateParams().

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

◆ updateParamsSubclass()

virtual void control::Block::updateParamsSubclass ( )
inlineprotectedvirtual

Definition at line 82 of file Block.hpp.

Referenced by updateParams().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ BlockParamBase

friend class BlockParamBase
friend

Definition at line 62 of file Block.hpp.

Member Data Documentation

◆ _dt

float control::Block::_dt {0.0f}
protected

Definition at line 89 of file Block.hpp.

Referenced by MulticopterPositionControl::Run().

◆ _name

const char* control::Block::_name
protected

Definition at line 87 of file Block.hpp.

Referenced by getName().

◆ _params

List<BlockParamBase *> control::Block::_params
protected

Definition at line 91 of file Block.hpp.

◆ _parent

SuperBlock* control::Block::_parent
protected

Definition at line 88 of file Block.hpp.


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