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