PLCnext API Documentation
25.0.2.69
Arp
Base
Rsc
Commons
Services
RscClientContext.hpp
1
2
//
3
// Copyright Phoenix Contact GmbH & Co. KG
4
//
6
#pragma once
7
#include "
Arp/Base/Core/Arp.hpp
"
8
#include "Arp/Base/Core/delegate.hxx"
9
#include "Arp/Base/Rsc/Commons/Rsc.hpp"
10
#include "Arp/Base/Rsc/Commons/Services/IRscServiceProxy.hpp"
11
#include "Arp/Base/Rsc/Commons/Services/RscClient.TransactionGuard.hpp"
// do not remove, this is used in all proxies
12
13
namespace
Arp::Base::Rsc::Commons::Services
14
{
15
20
class
ARP_EXPORT
RscClientContext
21
{
22
public
:
// usings
23
using
ReadDelegate
=
delegate
<void(
RscReader
&)>;
24
using
WriteDelegate
=
delegate
<void(
RscWriter
&)>;
25
26
public
:
// construction
27
RscClientContext
(
IRscServiceProxy
& serviceProxy, RscHandle methodHandle,
const
char
* methodName);
28
29
// canonical construction/destruction/assignment
30
RscClientContext
(
const
RscClientContext
& arg) =
delete
;
31
RscClientContext
(
RscClientContext
&& arg)
noexcept
=
delete
;
32
RscClientContext
& operator=(
const
RscClientContext
&) =
delete
;
33
RscClientContext
& operator=(
RscClientContext
&&)noexcept = delete;
34
~
RscClientContext
(
void
);
35
36
public:
// getter
37
RscReader
& GetReader(
void
);
38
RscWriter
& GetWriter(
void
);
39
40
public:
// operations
41
void
SendRequest(
WriteDelegate
writeFunction);
42
void
ReceiveResponse(
ReadDelegate
readFunction);
43
44
private:
// methods
45
IRscServiceProxy
& GetServiceProxy(
void
);
46
47
private:
// fields
48
IRscServiceProxy
& serviceProxy;
49
RscHandle methodHandle = 0;
50
const
char
* methodName =
nullptr
;
51
SecurityToken
cachedSecurityToken;
52
};
53
54
}
// end of namespace Arp::Base::Rsc::Commons::Services
Arp.hpp
Arp::Base::Commons::Security::SecurityToken
This class is used for authorization of arbitrary operations.
Definition:
SecurityToken.hpp:18
Arp::Base::Core::delegate
Prototyping of delegate template.
Definition:
delegate.hxx:14
Arp::Base::Rsc::Commons::Services::IRscServiceProxy
Interface of RSC service proxies used on client side to invoke a service remotely.
Definition:
IRscServiceProxy.hpp:20
Arp::Base::Rsc::Commons::Services::RscClientContext
RSC wrapper class of Remoting client context.
Definition:
RscClientContext.hpp:21
Arp::Base::Rsc::Commons::Services::RscReader
Reads marshaled data of RSC services.
Definition:
RscReader.hpp:34
Arp::Base::Rsc::Commons::Services::RscWriter
Writes marshalled data of RSC services.
Definition:
RscWriter.hpp:34
Generated on Mon May 12 2025 14:03:46 for PLCnext API Documentation by
1.9.4