8#include "Arp/System/Rsc/Services/Rsc.h"
9#include "Arp/System/Rsc/Services/IRscServiceProxy.hpp"
10#include "Arp/System/Rsc/Services/RscClient.hpp"
12namespace Arp {
namespace System {
namespace Rsc {
namespace Services
22template<
class TServiceInterface>
23class RscServiceProxyBase :
public IRscServiceProxy,
public TServiceInterface
26 using IRscService = TServiceInterface;
27 using Base = RscServiceProxyBase<TServiceInterface>;
31 RscServiceProxyBase(RscHandle providerHandle, RscHandle serviceHandle, RscClient& rscClient);
33 ~RscServiceProxyBase(
void)
override =
default;
36 RscHandle GetServiceProviderHandle(
void)
override;
37 RscHandle GetServiceHandle(
void)
override;
38 void ReadServiceHandle(
void)
override;
41 RscServiceProxyBase(
const RscServiceProxyBase& arg);
42 RscServiceProxyBase& operator=(
const RscServiceProxyBase& arg);
45 RscHandle rscServiceProviderHandle;
46 RscHandle rscServiceHandle;
52template<
class TServiceInterface>
53inline RscServiceProxyBase<TServiceInterface>::RscServiceProxyBase(RscHandle providerHandle, RscHandle serviceHandle, RscClient& rscClient)
54 : rscServiceProviderHandle(providerHandle)
55 , rscServiceHandle(serviceHandle)
56 , rscClient(rscClient)
60template<
class TServiceInterface>
61inline RscHandle RscServiceProxyBase<TServiceInterface>::GetServiceHandle()
63 return this->rscServiceHandle;
66template<
class TServiceInterface>
67inline RscHandle RscServiceProxyBase<TServiceInterface>::GetServiceProviderHandle()
69 return this->rscServiceProviderHandle;
72template<
class TServiceInterface>
73inline void RscServiceProxyBase<TServiceInterface>::ReadServiceHandle()
75 this->rscServiceHandle = this->rscClient.GetServiceHandle(this->rscServiceProviderHandle, TServiceInterface::GetProxyFactory().GetServiceName());
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API