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