Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
u
v
w
x
Functions
Variables
Typedefs
Enumerations
Enumerator
a
b
c
e
f
h
i
l
m
n
o
p
r
s
u
v
w
x
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
b
c
d
e
f
g
h
i
l
m
r
s
t
u
x
Functions
Variables
Typedefs
Enumerator
Macros
b
c
d
e
f
g
h
i
l
m
r
s
t
x
src
ControlSession.cpp
Go to the documentation of this file.
1
// -- BEGIN LICENSE BLOCK ----------------------------------------------
20
// -- END LICENSE BLOCK ------------------------------------------------
21
22
#include "
sick_safevisionary_base/ControlSession.h
"
23
#include "
sick_safevisionary_base/CoLaParameterWriter.h
"
24
25
namespace
visionary
{
26
27
ControlSession::ControlSession
(
IProtocolHandler
& ProtocolHandler)
28
: m_ProtocolHandler(ProtocolHandler)
29
{
30
}
31
32
ControlSession::~ControlSession
() {}
33
34
CoLaCommand
ControlSession::prepareRead
(
const
std::string& varname)
35
{
36
CoLaCommand
cmd =
CoLaParameterWriter
(
CoLaCommandType::READ_VARIABLE
, varname.c_str()).
build
();
37
return
cmd;
38
}
39
40
CoLaCommand
ControlSession::prepareWrite
(
const
std::string& varname)
41
{
42
CoLaCommand
cmd =
CoLaParameterWriter
(
CoLaCommandType::WRITE_VARIABLE
, varname.c_str()).
build
();
43
return
cmd;
44
}
45
46
CoLaCommand
ControlSession::prepareCall
(
const
std::string& varname)
47
{
48
CoLaCommand
cmd =
49
CoLaParameterWriter
(
CoLaCommandType::METHOD_INVOCATION
, varname.c_str()).
build
();
50
return
cmd;
51
}
52
53
CoLaCommand
ControlSession::send
(
const
CoLaCommand
& cmd)
54
{
55
// ToDo: send command via CoLaProtocolHandler?
56
// ProcolHandler needs to add e.g. header and checksum
57
// Afterwards send to socket and receive the response.
58
// return the response.
59
return
m_ProtocolHandler
.
send
(cmd);
60
}
61
62
}
// namespace visionary
visionary::ControlSession::prepareWrite
CoLaCommand prepareWrite(const std::string &varname)
Definition:
ControlSession.cpp:40
visionary
Definition:
AuthenticationLegacy.h:25
visionary::CoLaParameterWriter
Builder for constructing CoLaCommands.
Definition:
CoLaParameterWriter.h:35
visionary::CoLaCommand
Definition:
CoLaCommand.h:32
visionary::ControlSession::ControlSession
ControlSession(IProtocolHandler &ProtocolHandler)
Definition:
ControlSession.cpp:27
visionary::CoLaCommandType::WRITE_VARIABLE
@ WRITE_VARIABLE
Definition:
CoLaCommandType.h:34
CoLaParameterWriter.h
visionary::IProtocolHandler::send
virtual CoLaCommand send(CoLaCommand cmd)=0
ControlSession.h
visionary::CoLaCommandType::READ_VARIABLE
@ READ_VARIABLE
Definition:
CoLaCommandType.h:32
visionary::ControlSession::send
CoLaCommand send(const CoLaCommand &cmd)
Definition:
ControlSession.cpp:53
visionary::ControlSession::prepareRead
CoLaCommand prepareRead(const std::string &varname)
Definition:
ControlSession.cpp:34
visionary::IProtocolHandler
Definition:
IProtocolHandler.h:29
visionary::CoLaCommandType::METHOD_INVOCATION
@ METHOD_INVOCATION
Definition:
CoLaCommandType.h:36
visionary::ControlSession::m_ProtocolHandler
IProtocolHandler & m_ProtocolHandler
Definition:
ControlSession.h:45
visionary::ControlSession::prepareCall
CoLaCommand prepareCall(const std::string &varname)
Definition:
ControlSession.cpp:46
visionary::ControlSession::~ControlSession
virtual ~ControlSession()
Definition:
ControlSession.cpp:32
visionary::CoLaParameterWriter::build
const CoLaCommand build()
Definition:
CoLaParameterWriter.cpp:198
sick_safevisionary_base
Author(s):
autogenerated on Sat Oct 21 2023 02:24:26