PDF
简体中文
简体中文
English
AuboStudio SDK
0.6.3
ethernet_ip.h
浏览该文件的文档.
1
#ifndef AUBO_SCOPE_ETHERNET_IP_H
2
#define AUBO_SCOPE_ETHERNET_IP_H
3
4
#include <
aubo_caps/domain/io/io.h
>
5
6
namespace
arcs
{
7
namespace
aubo_scope
{
8
ARCS_CLASS_FORWARD
(
EtherNetIP
);
9
10
/**
11
* \chinese
12
* EtherNet/IP IO 接口
13
* 此接口提供对 EtherNet/IP I/O 的支持。
14
* \endchinese
15
* \english
16
* EtherNetIP
17
* This interface provides support for EtherNet/IP I/Os.
18
* \endenglish
19
*/
20
class
ARCS_ABI_EXPORT
EtherNetIP
:
public
Io
21
{
22
public
:
23
EtherNetIP
(
EtherNetIP
&f);
24
EtherNetIP
(
EtherNetIP
&&f);
25
~EtherNetIP
();
26
27
/**
28
* \chinese
29
* 获取此EtherNet/IP I/O的字节偏移量
30
* @return 字节偏移量。
31
* \endchinese
32
* \english
33
* Returns the byte offset for this EtherNet/IP I/O.
34
* @return Get the byte offset for this EtherNet/IP I/O.
35
* \endenglish
36
*/
37
int
getByteOffset
();
38
39
/**
40
* \chinese
41
* 获取此EtherNet/IP I/O的位偏移量
42
* @return 位偏移量。
43
* \endchinese
44
* \english
45
* Returns the bit offset for this EtherNet/IP I/O.
46
* @return Get the bit offset for this EtherNet/IP I/O.
47
* \endenglish
48
*/
49
int
getBitOffset
();
50
51
/**
52
* \chinese
53
* 判断此EtherNet/IP I/O是否为从站
54
* @return 是否为从站。
55
* \endchinese
56
* \english
57
* Returns whether this EtherNet/IP I/O is a slave.
58
* @return Get the is slave for this EtherNet/IP I/O.
59
* \endenglish
60
*/
61
bool
isSlave
();
62
63
/**
64
* \chinese
65
* 设置EtherNet/IP信号的整数值。
66
* @param value 要设置的整数值。
67
* @return 信号下发成功返回<code>true</code>,否则返回<code>false</code>。
68
* \endchinese
69
* \english
70
* Set EtherNet/IP signal to an integer value.
71
* @param value Set EtherNet/IP signal to an integer value.
72
* @return <code>true</code> if the EtherNet/IP signal was sent down to the
73
* controller, and <code>false</code> if the signal was not sent down.
74
* \endenglish
75
*/
76
bool
setValue
(
int
value);
77
78
/**
79
* \chinese
80
* 获取EtherNet/IP信号的整数值。
81
* @return EtherNet/IP信号的整数值。
82
* \endchinese
83
* \english
84
* Returns the integer value of the EtherNet/IP signal.
85
* @return the integer value of the EtherNet/IP signal.
86
* \endenglish
87
*/
88
int
getValue
();
89
90
private
:
91
friend
class
DataSwitch
;
92
EtherNetIP
();
93
void
*
d_
{
nullptr
};
94
};
95
96
struct
EtherNetIPFilter
97
{
98
EtherNetIPFilter
(
Io::IoType
type,
bool
is_input)
99
:
type_
(type),
is_input_
(is_input)
100
{
101
}
102
bool
operator()
(IoPtr io)
103
{
104
return
std::dynamic_pointer_cast<EtherNetIP>(io) !=
nullptr
&&
105
io->getType() ==
type_
&& io->isInput() ==
is_input_
;
106
}
107
108
private
:
109
Io::IoType
type_
;
110
bool
is_input_
;
111
};
112
113
}
// namespace aubo_scope
114
}
// namespace arcs
115
116
#endif
// EtherNet/IPIO_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::EtherNetIP
EtherNet/IP IO 接口 此接口提供对 EtherNet/IP I/O 的支持。
定义
ethernet_ip.h:21
arcs::aubo_scope::EtherNetIP::EtherNetIP
EtherNetIP(EtherNetIP &f)
arcs::aubo_scope::EtherNetIP::EtherNetIP
EtherNetIP()
arcs::aubo_scope::EtherNetIP::getByteOffset
int getByteOffset()
获取此EtherNet/IP I/O的字节偏移量
arcs::aubo_scope::EtherNetIP::d_
void * d_
定义
ethernet_ip.h:93
arcs::aubo_scope::EtherNetIP::DataSwitch
friend class DataSwitch
定义
ethernet_ip.h:91
arcs::aubo_scope::EtherNetIP::isSlave
bool isSlave()
判断此EtherNet/IP I/O是否为从站
arcs::aubo_scope::EtherNetIP::getBitOffset
int getBitOffset()
获取此EtherNet/IP I/O的位偏移量
arcs::aubo_scope::EtherNetIP::setValue
bool setValue(int value)
设置EtherNet/IP信号的整数值。
arcs::aubo_scope::EtherNetIP::~EtherNetIP
~EtherNetIP()
arcs::aubo_scope::EtherNetIP::getValue
int getValue()
获取EtherNet/IP信号的整数值。
arcs::aubo_scope::EtherNetIP::EtherNetIP
EtherNetIP(EtherNetIP &&f)
arcs::aubo_scope::Io::IoType
IoType
定义
io.h:26
arcs::aubo_scope::Io::Io
Io(Io &f)
io.h
arcs::aubo_scope
定义
contribution_provider.h:8
arcs
定义
contribution_provider.h:7
arcs::aubo_scope::EtherNetIPFilter::EtherNetIPFilter
EtherNetIPFilter(Io::IoType type, bool is_input)
定义
ethernet_ip.h:98
arcs::aubo_scope::EtherNetIPFilter::type_
Io::IoType type_
定义
ethernet_ip.h:109
arcs::aubo_scope::EtherNetIPFilter::is_input_
bool is_input_
定义
ethernet_ip.h:110
arcs::aubo_scope::EtherNetIPFilter::operator()
bool operator()(IoPtr io)
定义
ethernet_ip.h:102
include
aubo_caps
domain
io
ethernet_ip.h
制作者
1.16.1