PLCnext API Documentation  20.0.0.24462
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 
85 {
86 public: // typedefs
87  typedef std::shared_ptr<ISubscriptionService> Ptr;
88  typedef delegate<void(IRscWriteEnumerator<RscString<512>>&)> AddVariablesVariableNamesDelegate;
89  typedef delegate<void(IRscReadEnumerator<DataAccessError>&)> AddVariablesResultDelegate;
90  typedef delegate<void(IRscReadEnumerator<VariableInfo>&)> GetVariableInfosVariableInfoDelegate;
91  typedef delegate<void(IRscReadEnumerator<VariableInfo>&)> GetTimeStampedVariableInfosVariableInfoDelegate;
92  typedef delegate<void(IRscReadEnumerator<VariableInfo>&)> GetRecordInfosRecordInfosDelegate;
93  typedef delegate<void(IRscReadEnumerator<RscVariant<512>>&)> ReadValuesValuesDelegate;
94  typedef delegate<void(IRscReadEnumerator<RscVariant<512>>&)> ReadTimeStampedValuesValuesDelegate;
95  typedef delegate<void(IRscReadEnumerator<RscVariant<512>>&)> ReadRecordsRecordsDelegate;
96 
97 public: // construction/destruction
101  virtual ~ISubscriptionService(void);
102 
103 public: // static policy operation
104  static IRscServiceProxyFactory& GetProxyFactory(void);
105 
106 public: // abstract operations
210  virtual uint32 CreateSubscription(SubscriptionKind kind) = 0;
211 
228  virtual uint32 CreateRecordingSubscription(uint16 recordCount) = 0;
229 
280  virtual DataAccessError AddVariable(uint32 subscriptionId, const RscString<512>& variableName) = 0;
281 
301  virtual void AddVariables(uint32 subscriptionId, AddVariablesVariableNamesDelegate variableNamesDelegate, AddVariablesResultDelegate resultDelegate) = 0;
302 
321  virtual DataAccessError RemoveVariable(uint32 subscriptionId, const RscString<512>& variableName) = 0;
322 
390  virtual DataAccessError Subscribe(uint32 subscriptionId, uint64 sampleRate) = 0;
391 
420  virtual DataAccessError Resubscribe(uint32 subscriptionId, uint64 sampleRate) = 0;
421 
442  virtual DataAccessError Unsubscribe(uint32 subscriptionId) = 0;
443 
457  virtual DataAccessError DeleteSubscription(uint32 subscriptionId) = 0;
458 
509  virtual DataAccessError GetVariableInfos(uint32 subscriptionId, GetVariableInfosVariableInfoDelegate variableInfoDelegate) = 0;
510 
558  virtual DataAccessError GetTimeStampedVariableInfos(uint32 subscriptionId, GetTimeStampedVariableInfosVariableInfoDelegate variableInfoDelegate) = 0;
559 
615  virtual DataAccessError GetRecordInfos(uint32 subscriptionId, GetRecordInfosRecordInfosDelegate recordInfosDelegate) = 0;
616 
664  virtual DataAccessError ReadValues(uint32 subscriptionId, ReadValuesValuesDelegate valuesDelegate) = 0;
665 
711  virtual DataAccessError ReadTimeStampedValues(uint32 subscriptionId, ReadTimeStampedValuesValuesDelegate valuesDelegate) = 0;
712 
790  virtual DataAccessError ReadRecords(uint32 subscriptionId, uint16 count, ReadRecordsRecordsDelegate recordsDelegate) = 0;
791 
792 private: // deleted methods (for non-copyable classes)
793  ISubscriptionService(const ISubscriptionService& arg) = delete;
794  ISubscriptionService& operator=(const ISubscriptionService& arg) = delete;
795 };
796 
798 // inline methods of class ISubscriptionService
800 {
801 }
802 
804 {
805 }
806 
807 inline IRscServiceProxyFactory& ISubscriptionService::GetProxyFactory()
808 {
809  return SubscriptionServiceProxyFactory::GetInstance();
810 }
811 
812 }}}} // end of namespace Arp::Plc::Gds::Services
Namespace for classes and interfaces for the Remote Service Call implementation
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:35
Services for the subscription.
Definition: ISubscriptionService.hpp:84
ISubscriptionService(void)
Constructs an ISubscriptionService instance.
Definition: ISubscriptionService.hpp:799
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:803