🛰️航天仿真算法库 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 explicit BlockLogicalOperator(ELogicalOperatorType type = ELogicalOperatorType::eAnd);
41
43 BlockLogicalOperator& operator=(const BlockLogicalOperator&) = delete;
44
45 errc_t run(const SimTime &simTime) override;
46
49 void setOperatorType(ELogicalOperatorType type);
50
53 ELogicalOperatorType getOperatorType() const;
54
55protected:
56 ELogicalOperatorType operatorType_{ELogicalOperatorType::eAnd};
57 int* input1_{nullptr};
58 int* input2_{nullptr};
59 int* output_{&outputBuffer_};
60 int outputBuffer_{0};
61};
62
63AST_NAMESPACE_END
逻辑运算符块
定义 BlockLogicalOperator.hpp:38
函数块/功能块
定义 FuncBlock.hpp:41
virtual errc_t run(const SimTime &simTime)=0
计算函数块
仿真时间
定义 SimTime.hpp:30
@ eNot
逻辑非
定义 ScriptAPI.hpp:106
@ eAnd
逻辑与
定义 ScriptAPI.hpp:51
@ eOr
逻辑或
定义 ScriptAPI.hpp:52
ELogicalOperatorType
逻辑运算符类型枚举
定义 BlockLogicalOperator.hpp:29