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
*
12
* This interface provides support for EtherNet/IP I/Os.
13
*/
14
class
ARCS_ABI_EXPORT
EtherNetIP
:
public
Io
15
{
16
public
:
17
EtherNetIP
(
EtherNetIP
&f);
18
EtherNetIP
(
EtherNetIP
&&f);
19
~EtherNetIP
();
20
21
/**
22
*
23
* @return Get the byte offset for this EtherNet/IP I/O.
24
*/
25
int
getByteOffset
();
26
27
/**
28
*
29
* @return Get the bit offset for this EtherNet/IP I/O.
30
*/
31
int
getBitOffset
();
32
33
/**
34
*
35
* @return Get the is slave for this EtherNet/IP I/O.
36
*/
37
bool
isSlave
();
38
39
/**
40
*
41
* @param value Set EtherNet/IP signal to an integer value. If the
42
* EtherNet/IP signal is digital, then <code>false</code> is represented by
43
* 0 and <code>true</code> are represented by all numbers different from 0.
44
*
45
* @return <code>true</code> if the EtherNet/IP signal was sent down to the
46
* controller, and <code>false</code> if the signal was not sent down, e.g.
47
* because the controller was not running. Notice that the EtherNet/IP
48
* signal must support writes, consult the Aubo EtherNet/IP protocol.
49
*/
50
bool
setValue
(
int
value);
51
52
/**
53
*
54
* @return the integer value of the EtherNet/IP signal. If the EtherNet/IP
55
* signal is digital then <code>false</code> is represented by 0 and
56
* <code>true}</code> is represented by the value 1.
57
*/
58
int
getValue
();
59
60
private
:
61
friend
class
DataSwitch
;
62
EtherNetIP
();
63
void
*
d_
{
nullptr
};
64
};
65
66
struct
EtherNetIPFilter
67
{
68
EtherNetIPFilter
(
Io::IoType
type,
bool
is_input)
69
:
type_
(type),
is_input_
(is_input)
70
{
71
}
72
bool
operator()
(IoPtr io)
73
{
74
return
std::dynamic_pointer_cast<EtherNetIP>(io) !=
nullptr
&&
75
io->getType() ==
type_
&& io->isInput() ==
is_input_
;
76
}
77
78
private
:
79
Io::IoType
type_
;
80
bool
is_input_
;
81
};
82
83
}
// namespace aubo_scope
84
}
// namespace arcs
85
86
#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
This interface provides support for EtherNet/IP I/Os.
定义
ethernet_ip.h:15
arcs::aubo_scope::EtherNetIP::EtherNetIP
EtherNetIP(EtherNetIP &f)
arcs::aubo_scope::EtherNetIP::EtherNetIP
EtherNetIP()
arcs::aubo_scope::EtherNetIP::getByteOffset
int getByteOffset()
arcs::aubo_scope::EtherNetIP::d_
void * d_
定义
ethernet_ip.h:63
arcs::aubo_scope::EtherNetIP::DataSwitch
friend class DataSwitch
定义
ethernet_ip.h:61
arcs::aubo_scope::EtherNetIP::isSlave
bool isSlave()
arcs::aubo_scope::EtherNetIP::getBitOffset
int getBitOffset()
arcs::aubo_scope::EtherNetIP::setValue
bool setValue(int value)
arcs::aubo_scope::EtherNetIP::~EtherNetIP
~EtherNetIP()
arcs::aubo_scope::EtherNetIP::getValue
int getValue()
arcs::aubo_scope::EtherNetIP::EtherNetIP
EtherNetIP(EtherNetIP &&f)
arcs::aubo_scope::Io::IoType
IoType
定义
io.h:20
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:68
arcs::aubo_scope::EtherNetIPFilter::type_
Io::IoType type_
定义
ethernet_ip.h:79
arcs::aubo_scope::EtherNetIPFilter::is_input_
bool is_input_
定义
ethernet_ip.h:80
arcs::aubo_scope::EtherNetIPFilter::operator()
bool operator()(IoPtr io)
定义
ethernet_ip.h:72
include
aubo_caps
domain
io
ethernet_ip.h
制作者
1.16.1