|
🛰️航天仿真算法库 SpaceAST 0.0.1
|
#include <FuncBlock.hpp>
类 ast::FuncBlock 继承关系图:Public 成员函数 | |
| virtual errc_t | run (const SimTime &simTime)=0 |
| const std::vector< DataPort > & | getInputPorts () const |
| std::vector< DataPort > & | getInputPorts () |
| const std::vector< DataPort > & | getOutputPorts () const |
| std::vector< DataPort > & | getOutputPorts () |
| size_t | getNumInputPorts () const |
| size_t | getNumOutputPorts () const |
| DataPort * | getInputPort (StringView portName) |
| DataPort * | getOutputPort (StringView portName) |
| DataPort * | getInputPort (size_t portIndex) |
| DataPort * | getOutputPort (size_t portIndex) |
| DataPort::EValueType | getInputPortDataType (size_t portIndex) |
| DataPort::EValueType | getOutputPortDataType (size_t portIndex) |
| void * | getInputPortSignal (size_t portIndex) |
| void * | getOutputPortSignal (size_t portIndex) |
| double * | getInputPortRealSignal (size_t portIndex) |
| double * | getOutputPortRealSignal (size_t portIndex) |
| int | getInputPortWidth (size_t portIndex) |
| int | getOutputPortWidth (size_t portIndex) |
静态 Public 成员函数 | |
| static errc_t | connect (FuncBlock *src, StringView srcPortName, FuncBlock *dst, StringView dstPortName) |
| static errc_t | connect (FuncBlock *src, size_t srcPortIndex, FuncBlock *dst, size_t dstPortIndex) |
Protected 属性 | |
| std::vector< DataPort > | inputPorts_ |
| std::vector< DataPort > | outputPorts_ |
函数块/功能块
函数块是一个基本的计算单元,用于执行特定的数学或逻辑操作。 每个函数块都有输入端口和输出端口,用于接收和发送信号。 在函数块中,信号指的是指向数据的指针
输入和输出信号可以与其他函数块的端口进行连接,形成信号流/数据流。 函数块的具体计算逻辑由派生类实现。
|
static |
连接函数块的端口
| src | 源函数块 |
| srcPortIndex | 源端口索引 |
| dst | 目标函数块 |
| dstPortIndex | 目标端口索引 |
|
static |
连接函数块的端口
| src | 源函数块 |
| srcPortName | 源端口名称 |
| dst | 目标函数块 |
| dstPortName | 目标端口名称 |
| DataPort * ast::FuncBlock::getInputPort | ( | size_t | portIndex | ) |
获取输入端口
| portIndex | 端口索引 |
| DataPort * ast::FuncBlock::getInputPort | ( | StringView | portName | ) |
获取输入端口
| portName | 端口名称 |
| DataPort::EValueType ast::FuncBlock::getInputPortDataType | ( | size_t | portIndex | ) |
获取输入端口数据类型
| portIndex | 端口索引 |
| double * ast::FuncBlock::getInputPortRealSignal | ( | size_t | portIndex | ) |
获取输入端口实数值信号
| portIndex | 端口索引 |
|
inline |
获取输入端口
| ports | 输入端口向量 |
| void * ast::FuncBlock::getInputPortSignal | ( | size_t | portIndex | ) |
获取输入端口信号
| portIndex | 端口索引 |
| int ast::FuncBlock::getInputPortWidth | ( | size_t | portIndex | ) |
获取输入端口宽度
| portIndex | 端口索引 |
|
inline |
获取输入端口数量
|
inline |
获取输出端口数量
| DataPort * ast::FuncBlock::getOutputPort | ( | size_t | portIndex | ) |
获取输出端口
| portIndex | 端口索引 |
| DataPort * ast::FuncBlock::getOutputPort | ( | StringView | portName | ) |
获取输出端口
| portName | 端口名称 |
| DataPort::EValueType ast::FuncBlock::getOutputPortDataType | ( | size_t | portIndex | ) |
获取输出端口数据类型
| portIndex | 端口索引 |
| double * ast::FuncBlock::getOutputPortRealSignal | ( | size_t | portIndex | ) |
获取输出端口实数值信号
| portIndex | 端口索引 |
|
inline |
获取输出端口
| ports | 输出端口向量 |
| void * ast::FuncBlock::getOutputPortSignal | ( | size_t | portIndex | ) |
获取输出端口信号
| portIndex | 端口索引 |
| int ast::FuncBlock::getOutputPortWidth | ( | size_t | portIndex | ) |
获取输出端口宽度
| portIndex | 端口索引 |
|
pure virtual |
计算函数块
| simTime | 仿真时间 |
在 ast::BlockAbs, ast::BlockConstant, ast::BlockDeadZone, ast::BlockDivide, ast::BlockDot, ast::BlockGain, ast::BlockGravity, ast::BlockIn, ast::BlockLogicalOperator, ast::BlockMotion, ast::BlockOut, ast::BlockProduct, ast::BlockRelationalOperator, ast::BlockSaturation, ast::BlockSign, ast::BlockSin, ast::BlockSubtract, ast::BlockSum, ast::BlockSwitch, ast::BlockSystem, ast::BlockTerminator, ast::BlockThirdBody, ast::BlockTransform, ast::BlockTwoBody , 以及 ast::BlockUnaryMinus 内被实现.