PLCnext API Documentation 24.0.0.71
RscContext.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Rsc/Services/Rsc.h"
9#include "Arp/System/Rsc/Services/RscReader.hpp"
10#include "Arp/System/Rsc/Services/RscWriter.hpp"
11
12// forwards
13namespace CommonRemoting
14{
15class RemotingContext;
16}
17
18namespace Arp { namespace System { namespace Rsc { namespace Services
19{
20
21using namespace CommonRemoting;
22
27class RscContext
28{
29 friend class RscReader;
30 friend class RscWriter;
31
32public: // typedefs
33
34public: // construction/destruction
36 RscContext(RemotingContext& remotingContext);
38 RscContext(const RscContext& arg) = default;
40 RscContext& operator=(const RscContext& arg) = default;
42 ~RscContext(void) = default;
43
44public: // setter/getter operations
45 RscReader& GetReader(void);
46 RscWriter& GetWriter(void);
47
48public: // operations
49
50private: // methods
51
52private: // fields
53 RscReader reader;
54 RscWriter writer;
55 RemotingContext& remotingContext;
56};
57
59// inline methods of class RscContext
60
61
62inline RscReader& RscContext::GetReader()
63{
64 return this->reader;
65}
66
67inline RscWriter& RscContext::GetWriter()
68{
69 return this->writer;
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