🛰️航天仿真算法库 SpaceAST
0.0.1
载入中...
搜索中...
未找到
BlockLogicalOperator.hpp
浏览该文件的文档.
1
19
20
#pragma once
21
22
#include "AstGlobal.h"
23
#include "AstCore/FuncBlock.hpp"
24
25
AST_NAMESPACE_BEGIN
26
28
enum class
ELogicalOperatorType
29
{
30
eAnd
,
31
eOr
,
32
eNot
,
33
eXor
34
};
35
37
class
AST_CORE_API
BlockLogicalOperator
:
public
FuncBlock
38
{
39
public
:
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
52
protected
:
53
ELogicalOperatorType
operatorType_{ELogicalOperatorType::eAnd};
54
int
* input1_{
nullptr
};
55
int
* input2_{
nullptr
};
56
int
* output_{&outputBuffer_};
57
int
outputBuffer_{0};
58
};
59
60
AST_NAMESPACE_END
ast::BlockLogicalOperator
逻辑运算符块
定义
BlockLogicalOperator.hpp:38
ast::FuncBlock
函数块/功能块
定义
FuncBlock.hpp:39
ast::FuncBlock::run
virtual errc_t run(const SimTime &simTime)=0
计算函数块
ast::SimTime
仿真时间
定义
SimTime.hpp:30
ast::eNot
@ eNot
逻辑非
定义
ScriptAPI.hpp:103
ast::eAnd
@ eAnd
逻辑与
定义
ScriptAPI.hpp:48
ast::eOr
@ eOr
逻辑或
定义
ScriptAPI.hpp:49
ast::ELogicalOperatorType
ELogicalOperatorType
逻辑运算符类型枚举
定义
BlockLogicalOperator.hpp:29
ast::ELogicalOperatorType::eXor
@ eXor
逻辑异或
src
AstCore
Propagator
HPOP
BlockCommon
LogicAndBitOperations
BlockLogicalOperator.hpp
制作者
1.12.0