include
odva_ethernetip
message_router_response.h
Go to the documentation of this file.
1
26
#ifndef ODVA_ETHERNETIP_MESSAGE_ROUTER_RESPONSE_H
27
#define ODVA_ETHERNETIP_MESSAGE_ROUTER_RESPONSE_H
28
29
#include <string>
30
#include <boost/shared_ptr.hpp>
31
32
#include "
odva_ethernetip/eip_types.h
"
33
#include "
odva_ethernetip/serialization/serializable.h
"
34
#include "
odva_ethernetip/serialization/reader.h
"
35
#include "
odva_ethernetip/serialization/writer.h
"
36
37
using
boost::shared_ptr;
38
39
namespace
eip
{
40
41
using
serialization::Serializable;
42
using
serialization::Reader;
43
using
serialization::Writer;
44
48
class
MessageRouterResponse
:
public
Serializable
49
{
50
public
:
51
52
EIP_USINT
service
;
53
EIP_USINT
general_status
;
54
58
MessageRouterResponse
() :
service
(0),
general_status
(0) { }
59
64
shared_ptr<Serializable>
getAdditionalStatus
()
const
65
{
66
return
additional_status_
;
67
}
68
73
shared_ptr<Serializable>
getResponseData
()
const
74
{
75
return
response_data_
;
76
}
77
82
virtual
size_t
getLength
()
const
;
83
90
virtual
Writer
&
serialize
(
Writer
& writer)
const
91
{
92
throw
std::logic_error(
"Not implemented"
);
93
}
94
98
virtual
Reader
&
deserialize
(
Reader
& reader,
size_t
length);
99
103
virtual
Reader
&
deserialize
(
Reader
& reader)
104
{
105
throw
std::logic_error(
"Must have size to deserialize"
);
106
}
107
108
private
:
109
shared_ptr<Serializable>
additional_status_
;
110
shared_ptr<Serializable>
response_data_
;
111
120
shared_ptr<Serializable>
readData
(
Reader
& reader,
int
length);
121
};
122
123
}
// namespace eip
124
125
#endif // ODVA_ETHERNETIP_MESSAGE_ROUTER_RESPONSE_H
eip::serialization::Writer
Definition:
writer.h:41
eip_types.h
eip::serialization::Reader
Definition:
reader.h:42
eip
Definition:
connection.h:41
eip::MessageRouterResponse::deserialize
virtual Reader & deserialize(Reader &reader, size_t length)
Definition:
message_router_response.cpp:52
eip::MessageRouterResponse::getAdditionalStatus
shared_ptr< Serializable > getAdditionalStatus() const
Definition:
message_router_response.h:64
eip::MessageRouterResponse::additional_status_
shared_ptr< Serializable > additional_status_
Definition:
message_router_response.h:109
eip::MessageRouterResponse::response_data_
shared_ptr< Serializable > response_data_
Definition:
message_router_response.h:110
eip::MessageRouterResponse::MessageRouterResponse
MessageRouterResponse()
Definition:
message_router_response.h:58
EIP_USINT
uint8_t EIP_USINT
Definition:
eip_types.h:36
eip::serialization::Serializable
Definition:
serializable.h:38
eip::MessageRouterResponse::serialize
virtual Writer & serialize(Writer &writer) const
Definition:
message_router_response.h:90
reader.h
eip::MessageRouterResponse::getResponseData
shared_ptr< Serializable > getResponseData() const
Definition:
message_router_response.h:73
eip::MessageRouterResponse
Definition:
message_router_response.h:48
eip::MessageRouterResponse::readData
shared_ptr< Serializable > readData(Reader &reader, int length)
Definition:
message_router_response.cpp:65
eip::MessageRouterResponse::getLength
virtual size_t getLength() const
Definition:
message_router_response.cpp:37
eip::MessageRouterResponse::service
EIP_USINT service
Definition:
message_router_response.h:52
eip::MessageRouterResponse::general_status
EIP_USINT general_status
Definition:
message_router_response.h:53
eip::MessageRouterResponse::deserialize
virtual Reader & deserialize(Reader &reader)
Definition:
message_router_response.h:103
serializable.h
writer.h
odva_ethernetip
Author(s): Kareem Shehata
autogenerated on Wed Mar 2 2022 00:38:56