PLCnext API Documentation 24.0.0.71
RscClientContext.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include <memory>
9#include <csetjmp>
10#include "Arp/System/Rsc/Services/Rsc.h"
11#include "Arp/System/Rsc/Services/RscReader.hpp"
12#include "Arp/System/Rsc/Services/RscClient.hpp"
13#include "Arp/System/Rsc/Services/RscWriter.hpp"
14#include "Arp/System/Rsc/Services/RscContext.hpp"
15
16namespace CommonRemoting
17{
18class RemotingClient;
19class RemotingClientContext;
20class RemotingSession;
21}
22
23namespace Arp { namespace System { namespace Rsc { namespace Services
24{
25
30class RscClientContext
31{
32public: // usings
33 using RemotingClientContextPtr = std::unique_ptr<RemotingClientContext>;
34
35public:
36 RscClientContext(RscClient& rscClient);
37 RscClientContext(const RscClientContext&) = delete;
38 ~RscClientContext();
39
40public: // getter / setter
41 RscReader& GetReader(void);
42 RscWriter& GetWriter(void);
43
44public: // operations
45 void BeginServiceInvocationRequest(RscHandle serviceProviderHandle, RscHandle rscServiceHandle, RscHandle rscMethodHandle);
46 void EndServiceInvocationRequest(void);
47 void BeginServiceInvocationResponse(RscHandle serviceProviderHandle, RscHandle rscServiceHandle, RscHandle rscMethodHandle);
48 void EndServiceInvocationResponse(void);
49
50private:
51 RemotingClientContextPtr remotingClientContextPtr;
52 RscReader rscReader;
53 RscWriter rscWriter;
54 RscClient& rscClient;
55
56public: // Properties
57 jmp_buf& AbortJump;
58};
59
61// inline methods of class RscClientContext
62inline RscReader& RscClientContext::GetReader(void)
63{
64 return this->rscReader;
65}
66
67inline RscWriter& RscClientContext::GetWriter(void)
68{
69 return this->rscWriter;
70}
71
72}}}} // end of namespace Arp::System::Rsc::Services
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API