PLCnext API Documentation  21.0.0.35466
ISubscriptionService.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/System/Rsc/Services/IRscService.hpp"
9 #include "SubscriptionServiceProxyFactory.hpp"
10 #include "Arp/System/Core/delegate.hxx"
11 #include "Arp/System/Rsc/Services/IRscReadEnumerator.hxx"
12 #include "Arp/System/Rsc/Services/IRscWriteEnumerator.hxx"
13 #include "Arp/System/Rsc/Services/RscString.hxx"
14 #include "Arp/System/Rsc/Services/RscVariant.hxx"
15 #include "DataAccessError.hpp"
16 #include "SubscriptionKind.hpp"
17 #include "VariableInfo.hpp"
18 
19 // DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY ISubscriptionService.cs
20 
21 namespace Arp { namespace Plc { namespace Gds { namespace Services
22 {
23 
24 using namespace Arp;
25 using namespace Arp::System::Rsc::Services;
26 
86 {
87 public: // typedefs
88  typedef std::shared_ptr<ISubscriptionService> Ptr;
89  typedef delegate<void(IRscWriteEnumerator<RscString<512>>&)> AddVariablesVariableNamesDelegate;
90  typedef delegate<void(IRscReadEnumerator<DataAccessError>&)> AddVariablesResultDelegate;
91  typedef delegate<void(IRscReadEnumerator<VariableInfo>&)> GetVariableInfosVariableInfoDelegate;
92  typedef delegate<void(IRscReadEnumerator<VariableInfo>&)> GetTimeStampedVariableInfosVariableInfoDelegate;
93  typedef delegate<void(IRscReadEnumerator<VariableInfo>&)> GetRecordInfosRecordInfosDelegate;
94  typedef delegate<void(IRscReadEnumerator<RscVariant<512>>&)> ReadValuesValuesDelegate;
95  typedef delegate<void(IRscReadEnumerator<RscVariant<512>>&)> ReadTimeStampedValuesValuesDelegate;
96  typedef delegate<void(IRscReadEnumerator<RscVariant<512>>&)> ReadRecordsRecordsDelegate;
97 
98 public: // construction/destruction
100  ISubscriptionService(void);
102  virtual ~ISubscriptionService(void);
103 
104 public: // static policy operation
105  static IRscServiceProxyFactory& GetProxyFactory(void);
106 
107 public: // abstract operations
211  virtual uint32 CreateSubscription(SubscriptionKind kind) = 0;
212 
229  virtual uint32 CreateRecordingSubscription(uint16 recordCount) = 0;
230 
281  virtual DataAccessError AddVariable(uint32 subscriptionId, const RscString<512>& variableName) = 0;
282 
302  virtual void AddVariables(uint32 subscriptionId, AddVariablesVariableNamesDelegate variableNamesDelegate, AddVariablesResultDelegate resultDelegate) = 0;
303 
322  virtual DataAccessError RemoveVariable(uint32 subscriptionId, const RscString<512>& variableName) = 0;
323 
391  virtual DataAccessError Subscribe(uint32 subscriptionId, uint64 sampleRate) = 0;
392 
421  virtual DataAccessError Resubscribe(uint32 subscriptionId, uint64 sampleRate) = 0;
422 
443  virtual DataAccessError Unsubscribe(uint32 subscriptionId) = 0;
444 
458  virtual DataAccessError DeleteSubscription(uint32 subscriptionId) = 0;
459 
510  virtual DataAccessError GetVariableInfos(uint32 subscriptionId, GetVariableInfosVariableInfoDelegate variableInfoDelegate) = 0;
511 
559  virtual DataAccessError GetTimeStampedVariableInfos(uint32 subscriptionId, GetTimeStampedVariableInfosVariableInfoDelegate variableInfoDelegate) = 0;
560 
616  virtual DataAccessError GetRecordInfos(uint32 subscriptionId, GetRecordInfosRecordInfosDelegate recordInfosDelegate) = 0;
617 
665  virtual DataAccessError ReadValues(uint32 subscriptionId, ReadValuesValuesDelegate valuesDelegate) = 0;
666 
712  virtual DataAccessError ReadTimeStampedValues(uint32 subscriptionId, ReadTimeStampedValuesValuesDelegate valuesDelegate) = 0;
713 
791  virtual DataAccessError ReadRecords(uint32 subscriptionId, uint16 count, ReadRecordsRecordsDelegate recordsDelegate) = 0;
792 
793 private: // deleted methods (for non-copyable classes)
794  ISubscriptionService(const ISubscriptionService& arg) = delete;
795  ISubscriptionService& operator=(const ISubscriptionService& arg) = delete;
796 };
797 
799 // inline methods of class ISubscriptionService
801 {
802 }
803 
805 {
806 }
807 
808 inline IRscServiceProxyFactory& ISubscriptionService::GetProxyFactory()
809 {
810  return SubscriptionServiceProxyFactory::GetInstance();
811 }
812 
813 }}}} // end of namespace Arp::Plc::Gds::Services
Namespace for classes and interfaces for the Remote Service Call implementation
Definition: IRscReadEnumerator.hxx:9
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:35
Services for the subscription.
Definition: ISubscriptionService.hpp:85
ISubscriptionService(void)
Constructs an ISubscriptionService instance.
Definition: ISubscriptionService.hpp:800
DataAccessError
This enumeration contains the possible data access errors.
Definition: DataAccessError.hpp:20
Root namespace for the PLCnext API
std::uint16_t uint16
The Arp unsigned integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:31
std::uint64_t uint64
The Arp unsigned integer type of 8 byte size.
Definition: PrimitiveTypes.hpp:39
Base interface for all Rsc service interface.
Definition: IRscService.hpp:18
SubscriptionKind
This enumeration contains the possible kinds of subscriptions.
Definition: SubscriptionKind.hpp:29
virtual ~ISubscriptionService(void)
Destructs this instance and frees all resouces.
Definition: ISubscriptionService.hpp:804