🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
BlockLogicalOperator.hpp
浏览该文件的文档.
1
19
20#pragma once
21
22#include "AstGlobal.h"
23#include "AstCore/FuncBlock.hpp"
24
25AST_NAMESPACE_BEGIN
26
29{
30 eAnd,
31 eOr,
32 eNot,
33 eXor
34};
35
37class AST_CORE_API BlockLogicalOperator: public FuncBlock
38{
39public:
40 BlockLogicalOperator(ELogicalOperatorType type = ELogicalOperatorType::eAnd);
41
42 errc_t run(const SimTime &simTime) override;
43
46 void setOperatorType(ELogicalOperatorType type);
47
50 ELogicalOperatorType getOperatorType() const;
51
52protected:
53 ELogicalOperatorType operatorType_{ELogicalOperatorType::eAnd};
54 int* input1_{nullptr};
55 int* input2_{nullptr};
56 int* output_{&outputBuffer_};
57 int outputBuffer_{0};
58};
59
60AST_NAMESPACE_END
逻辑运算符块
定义 BlockLogicalOperator.hpp:38
函数块/功能块
定义 FuncBlock.hpp:39
virtual errc_t run(const SimTime &simTime)=0
计算函数块
仿真时间
定义 SimTime.hpp:30
@ eNot
逻辑非
定义 ScriptAPI.hpp:103
@ eAnd
逻辑与
定义 ScriptAPI.hpp:48
@ eOr
逻辑或
定义 ScriptAPI.hpp:49
ELogicalOperatorType
逻辑运算符类型枚举
定义 BlockLogicalOperator.hpp:29