🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ast::FuncBlock类 参考abstract

#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
 
DataPortgetInputPort (StringView portName)
 
DataPortgetOutputPort (StringView portName)
 
DataPortgetInputPort (size_t portIndex)
 
DataPortgetOutputPort (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< DataPortinputPorts_
 
std::vector< DataPortoutputPorts_
 

详细描述

函数块/功能块

函数块是一个基本的计算单元,用于执行特定的数学或逻辑操作。 每个函数块都有输入端口和输出端口,用于接收和发送信号。 在函数块中,信号指的是指向数据的指针

输入和输出信号可以与其他函数块的端口进行连接,形成信号流/数据流。 函数块的具体计算逻辑由派生类实现。

成员函数说明

◆ connect() [1/2]

errc_t ast::FuncBlock::connect ( FuncBlock * src,
size_t srcPortIndex,
FuncBlock * dst,
size_t dstPortIndex )
static

连接函数块的端口

参数
src源函数块
srcPortIndex源端口索引
dst目标函数块
dstPortIndex目标端口索引
返回
错误码

◆ connect() [2/2]

errc_t ast::FuncBlock::connect ( FuncBlock * src,
StringView srcPortName,
FuncBlock * dst,
StringView dstPortName )
static

连接函数块的端口

参数
src源函数块
srcPortName源端口名称
dst目标函数块
dstPortName目标端口名称
返回
错误码

◆ getInputPort() [1/2]

DataPort * ast::FuncBlock::getInputPort ( size_t portIndex)

获取输入端口

参数
portIndex端口索引
返回
输入端口指针

◆ getInputPort() [2/2]

DataPort * ast::FuncBlock::getInputPort ( StringView portName)

获取输入端口

参数
portName端口名称
返回
输入端口指针

◆ getInputPortDataType()

DataPort::EValueType ast::FuncBlock::getInputPortDataType ( size_t portIndex)

获取输入端口数据类型

参数
portIndex端口索引
返回
输入端口数据类型

◆ getInputPortRealSignal()

double * ast::FuncBlock::getInputPortRealSignal ( size_t portIndex)

获取输入端口实数值信号

参数
portIndex端口索引
返回
输入端口实数值信号指针

◆ getInputPorts()

const std::vector< DataPort > & ast::FuncBlock::getInputPorts ( ) const
inline

获取输入端口

参数
ports输入端口向量

◆ getInputPortSignal()

void * ast::FuncBlock::getInputPortSignal ( size_t portIndex)

获取输入端口信号

参数
portIndex端口索引
返回
输入端口信号指针

◆ getInputPortWidth()

int ast::FuncBlock::getInputPortWidth ( size_t portIndex)

获取输入端口宽度

参数
portIndex端口索引
返回
输入端口宽度

◆ getNumInputPorts()

size_t ast::FuncBlock::getNumInputPorts ( ) const
inline

获取输入端口数量

返回
输入端口数量

◆ getNumOutputPorts()

size_t ast::FuncBlock::getNumOutputPorts ( ) const
inline

获取输出端口数量

返回
输出端口数量

◆ getOutputPort() [1/2]

DataPort * ast::FuncBlock::getOutputPort ( size_t portIndex)

获取输出端口

参数
portIndex端口索引
返回
输出端口指针

◆ getOutputPort() [2/2]

DataPort * ast::FuncBlock::getOutputPort ( StringView portName)

获取输出端口

参数
portName端口名称
返回
输出端口指针

◆ getOutputPortDataType()

DataPort::EValueType ast::FuncBlock::getOutputPortDataType ( size_t portIndex)

获取输出端口数据类型

参数
portIndex端口索引
返回
输出端口数据类型

◆ getOutputPortRealSignal()

double * ast::FuncBlock::getOutputPortRealSignal ( size_t portIndex)

获取输出端口实数值信号

参数
portIndex端口索引
返回
输出端口实数值信号指针

◆ getOutputPorts()

const std::vector< DataPort > & ast::FuncBlock::getOutputPorts ( ) const
inline

获取输出端口

参数
ports输出端口向量

◆ getOutputPortSignal()

void * ast::FuncBlock::getOutputPortSignal ( size_t portIndex)

获取输出端口信号

参数
portIndex端口索引
返回
输出端口信号指针

◆ getOutputPortWidth()

int ast::FuncBlock::getOutputPortWidth ( size_t portIndex)

获取输出端口宽度

参数
portIndex端口索引
返回
输出端口宽度

◆ run()


该类的文档由以下文件生成: