PDF
简体中文
简体中文
English
AuboStudio SDK
0.6.3
profinet.h
浏览该文件的文档.
1
#ifndef AUBO_SCOPE_PROFINET_H
2
#define AUBO_SCOPE_PROFINET_H
3
4
#include <
aubo_caps/domain/io/io.h
>
5
6
namespace
arcs
{
7
namespace
aubo_scope
{
8
ARCS_CLASS_FORWARD
(
Profinet
);
9
10
/**
11
* @ingroup ApplicationApi
12
* \chinese
13
* PROFINET IO 接口
14
* 此接口提供对 PROFINET I/O 的支持。
15
* \endchinese
16
* \english
17
* Profinet
18
* This interface provides support for PROFINET I/Os.
19
* \endenglish
20
*/
21
class
ARCS_ABI_EXPORT
Profinet
:
public
Io
22
{
23
public
:
24
Profinet
(
Profinet
&f);
25
Profinet
(
Profinet
&&f);
26
~Profinet
();
27
28
/**
29
* @ingroup Profinet
30
* \chinese
31
* 获取此PROFINET I/O的字节偏移量
32
* @return 字节偏移量。
33
* \endchinese
34
* \english
35
* Returns the byte offset for this Profinet I/O.
36
* @return Get the byte offset for this Profinet I/O.
37
* \endenglish
38
*/
39
int
getByteOffset
();
40
41
/**
42
* @ingroup Profinet
43
* \chinese
44
* 获取此PROFINET I/O的位偏移量
45
* @return 位偏移量。
46
* \endchinese
47
* \english
48
* Returns the bit offset for this Profinet I/O.
49
* @return Get the bit offset for this Profinet I/O.
50
* \endenglish
51
*/
52
int
getBitOffset
();
53
54
/**
55
* @ingroup Profinet
56
* \chinese
57
* 判断此PROFINET I/O是否为从站
58
* @return 是否为从站。
59
* \endchinese
60
* \english
61
* Returns whether this Profinet I/O is a slave.
62
* @return <code>true</code> if this is a slave.
63
* \endenglish
64
*/
65
bool
isSlave
();
66
67
/**
68
* @ingroup Profinet
69
* \chinese
70
* 设置PROFINET信号的整数值。如果PROFINET信号是数字量,则<code>false</code>用0
71
* 表示,<code>true</code>用所有非0数字表示。
72
*
73
* @param value 要设置的整数值。
74
* @return 如果PROFINET信号已下发到控制器则返回<code>true</code>,如果信号未下发
75
* (例如控制器未运行)则返回<code>false</code>。注意PROFINET信号必须支持写入,
76
* 请查阅Aubo PROFINET协议。
77
* \endchinese
78
* \english
79
* Set PROFINET signal to an integer value. If the PROFINET signal is
80
* digital, then <code>false</code> is represented by 0 and
81
* <code>true</code> are represented by all numbers different from 0.
82
*
83
* @param value the integer value to set.
84
* @return <code>true</code> if the PROFINET signal was sent down to the
85
* controller, and <code>false</code> if the signal was not sent down, e.g.
86
* because the controller was not running. Notice that the PROFINET signal
87
* must support writes, consult the Aubo PROFINET protocol.
88
* \endenglish
89
*/
90
bool
setValue
(
int
value);
91
92
/**
93
* @ingroup Profinet
94
* \chinese
95
* 获取PROFINET信号的整数值。如果PROFINET信号是数字量,则<code>false</code>用0
96
* 表示,<code>true</code>用值1表示。
97
* @return PROFINET信号的整数值。
98
* \endchinese
99
* \english
100
* Returns the integer value of the PROFINET signal. If the PROFINET signal
101
* is digital then <code>false</code> is represented by 0 and
102
* <code>true</code> is represented by the value 1.
103
* @return the integer value of the PROFINET signal.
104
* \endenglish
105
*/
106
int
getValue
();
107
108
private
:
109
friend
class
DataSwitch
;
110
Profinet
();
111
void
*
d_
{
nullptr
};
112
};
113
114
struct
ProfinetFilter
115
{
116
ProfinetFilter
(
Io::IoType
type,
bool
is_input)
117
:
type_
(type),
is_input_
(is_input)
118
{
119
}
120
bool
operator()
(IoPtr io)
121
{
122
return
std::dynamic_pointer_cast<Profinet>(io) !=
nullptr
&&
123
io->getType() ==
type_
&& io->isInput() ==
is_input_
;
124
}
125
126
private
:
127
Io::IoType
type_
;
128
bool
is_input_
;
129
};
130
131
}
// namespace aubo_scope
132
}
// namespace arcs
133
134
#endif
// PROFINETIO_H
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
定义
class_forward.h:16
ARCS_CLASS_FORWARD
#define ARCS_CLASS_FORWARD(C)
Macro that forward declares a class and defines the respective smartpointers through ARCS_DECLARE_PTR...
定义
class_forward.h:68
arcs::aubo_scope::Io::IoType
IoType
定义
io.h:26
arcs::aubo_scope::Io::Io
Io(Io &f)
arcs::aubo_scope::Profinet
PROFINET IO 接口 此接口提供对 PROFINET I/O 的支持。
定义
profinet.h:22
arcs::aubo_scope::Profinet::getValue
int getValue()
获取PROFINET信号的整数值。如果PROFINET信号是数字量,则false用0 表示,true用值1表示。
arcs::aubo_scope::Profinet::setValue
bool setValue(int value)
设置PROFINET信号的整数值。如果PROFINET信号是数字量,则false用0 表示,true用所有非0数字表示。
arcs::aubo_scope::Profinet::Profinet
Profinet(Profinet &f)
arcs::aubo_scope::Profinet::DataSwitch
friend class DataSwitch
定义
profinet.h:109
arcs::aubo_scope::Profinet::Profinet
Profinet()
arcs::aubo_scope::Profinet::d_
void * d_
定义
profinet.h:111
arcs::aubo_scope::Profinet::getBitOffset
int getBitOffset()
获取此PROFINET I/O的位偏移量
arcs::aubo_scope::Profinet::Profinet
Profinet(Profinet &&f)
arcs::aubo_scope::Profinet::isSlave
bool isSlave()
判断此PROFINET I/O是否为从站
arcs::aubo_scope::Profinet::~Profinet
~Profinet()
arcs::aubo_scope::Profinet::getByteOffset
int getByteOffset()
获取此PROFINET I/O的字节偏移量
io.h
arcs::aubo_scope
定义
contribution_provider.h:8
arcs
定义
contribution_provider.h:7
arcs::aubo_scope::ProfinetFilter::is_input_
bool is_input_
定义
profinet.h:128
arcs::aubo_scope::ProfinetFilter::operator()
bool operator()(IoPtr io)
定义
profinet.h:120
arcs::aubo_scope::ProfinetFilter::type_
Io::IoType type_
定义
profinet.h:127
arcs::aubo_scope::ProfinetFilter::ProfinetFilter
ProfinetFilter(Io::IoType type, bool is_input)
定义
profinet.h:116
include
aubo_caps
domain
io
profinet.h
制作者
1.16.1