PLCnext API Documentation 23.3.0.32
ISubscriptionService.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/Plc/Gds/Services/DataAccessError.hpp"
9#include "Arp/Plc/Gds/Services/SubscriptionKind.hpp"
10#include "Arp/Plc/Gds/Services/SubscriptionServiceProxyFactory.hpp"
11#include "Arp/Plc/Gds/Services/VariableInfo.hpp"
12#include "Arp/System/Core/delegate.hxx"
13#include "Arp/System/Rsc/Services/IRscReadEnumerator.hxx"
14#include "Arp/System/Rsc/Services/IRscService.hpp"
15#include "Arp/System/Rsc/Services/IRscWriteEnumerator.hxx"
16#include "Arp/System/Rsc/Services/RscString.hxx"
17#include "Arp/System/Rsc/Services/RscVariant.hxx"
18
19// DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY ISubscriptionService.cs
20
21namespace Arp { namespace Plc { namespace Gds { namespace Services
22{
23
24using namespace Arp;
25using namespace Arp::System::Rsc::Services;
26
87{
88public: // typedefs
89 using Ptr = std::shared_ptr<ISubscriptionService>;
90 using AddVariablesResultDelegate = delegate<void(IRscReadEnumerator<DataAccessError>&)>;
91 using AddVariablesVariableNamesDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
92 using GetRecordInfosRecordInfosDelegate = delegate<void(IRscReadEnumerator<VariableInfo>&)>;
93 using GetTimeStampedVariableInfosVariableInfoDelegate = delegate<void(IRscReadEnumerator<VariableInfo>&)>;
94 using GetVariableInfosVariableInfoDelegate = delegate<void(IRscReadEnumerator<VariableInfo>&)>;
95 using ReadRecordsRecordsDelegate = delegate<void(IRscReadEnumerator<RscVariant<512>>&)>;
96 using ReadTimeStampedValuesValuesDelegate = delegate<void(IRscReadEnumerator<RscVariant<512>>&)>;
97 using ReadValuesValuesDelegate = delegate<void(IRscReadEnumerator<RscVariant<512>>&)>;
98
99public: // construction/destruction
101 ISubscriptionService(void) = default;
102
103public: // static policy operation
104 static IRscServiceProxyFactory& GetProxyFactory(void);
105
106public: // abstract operations
205
222 virtual uint32 CreateRecordingSubscription(uint16 recordCount) = 0;
223
274 virtual DataAccessError AddVariable(uint32 subscriptionId, const RscString<512>& variableName) = 0;
275
295 virtual void AddVariables(uint32 subscriptionId, AddVariablesVariableNamesDelegate variableNamesDelegate, AddVariablesResultDelegate resultDelegate) = 0;
296
315 virtual DataAccessError RemoveVariable(uint32 subscriptionId, const RscString<512>& variableName) = 0;
316
384 virtual DataAccessError Subscribe(uint32 subscriptionId, uint64 sampleRate) = 0;
385
414 virtual DataAccessError Resubscribe(uint32 subscriptionId, uint64 sampleRate) = 0;
415
436 virtual DataAccessError Unsubscribe(uint32 subscriptionId) = 0;
437
451 virtual DataAccessError DeleteSubscription(uint32 subscriptionId) = 0;
452
503 virtual DataAccessError GetVariableInfos(uint32 subscriptionId, GetVariableInfosVariableInfoDelegate variableInfoDelegate) = 0;
504
552 virtual DataAccessError GetTimeStampedVariableInfos(uint32 subscriptionId, GetTimeStampedVariableInfosVariableInfoDelegate variableInfoDelegate) = 0;
553
569 virtual DataAccessError GetRecordInfos(uint32 subscriptionId, GetRecordInfosRecordInfosDelegate recordInfosDelegate) = 0;
570
618 virtual DataAccessError ReadValues(uint32 subscriptionId, ReadValuesValuesDelegate valuesDelegate) = 0;
619
665 virtual DataAccessError ReadTimeStampedValues(uint32 subscriptionId, ReadTimeStampedValuesValuesDelegate valuesDelegate) = 0;
666
744 virtual DataAccessError ReadRecords(uint32 subscriptionId, uint16 count, ReadRecordsRecordsDelegate recordsDelegate) = 0;
745};
746
748// inline methods of class ISubscriptionService
749inline IRscServiceProxyFactory& ISubscriptionService::GetProxyFactory()
750{
751 return SubscriptionServiceProxyFactory::GetInstance();
752}
753
754}}}} // end of namespace Arp::Plc::Gds::Services
Services for the subscription.
Definition: ISubscriptionService.hpp:87
virtual DataAccessError DeleteSubscription(uint32 subscriptionId)=0
Deletes the subscription.
virtual DataAccessError Subscribe(uint32 subscriptionId, uint64 sampleRate)=0
Subscribes the subscription with the given id.
virtual uint32 CreateSubscription(SubscriptionKind kind)=0
Creates a subscription of the given Arp.Plc.Gds.Services.SubscriptionKind.
virtual DataAccessError RemoveVariable(uint32 subscriptionId, const RscString< 512 > &variableName)=0
Removes the variable with the specific variable name from the subscription.
ISubscriptionService(void)=default
Constructs an ISubscriptionService instance.
virtual DataAccessError GetVariableInfos(uint32 subscriptionId, GetVariableInfosVariableInfoDelegate variableInfoDelegate)=0
Get the subscribed variable information of the subscription.
virtual DataAccessError ReadValues(uint32 subscriptionId, ReadValuesValuesDelegate valuesDelegate)=0
Read the data from the subscription with the given id.
virtual DataAccessError GetTimeStampedVariableInfos(uint32 subscriptionId, GetTimeStampedVariableInfosVariableInfoDelegate variableInfoDelegate)=0
Get the subscribed variable information including information of timestamps of the subscription.
virtual uint32 CreateRecordingSubscription(uint16 recordCount)=0
Creates a subscription of Arp.Plc.Gds.Services.SubscriptionKind.Recording.
virtual DataAccessError AddVariable(uint32 subscriptionId, const RscString< 512 > &variableName)=0
Extends the subscription with the given id by inserting the given variable name
virtual DataAccessError Unsubscribe(uint32 subscriptionId)=0
Unsubscribes the subscription with the given id.
virtual DataAccessError GetRecordInfos(uint32 subscriptionId, GetRecordInfosRecordInfosDelegate recordInfosDelegate)=0
Get the subscribed variable information as a record of the subscription.
virtual DataAccessError ReadRecords(uint32 subscriptionId, uint16 count, ReadRecordsRecordsDelegate recordsDelegate)=0
Read the data including timestamps from the subscription with the given id separated in task records.
virtual void AddVariables(uint32 subscriptionId, AddVariablesVariableNamesDelegate variableNamesDelegate, AddVariablesResultDelegate resultDelegate)=0
Extends the subscription with the given id by inserting a range of new variables.
virtual DataAccessError Resubscribe(uint32 subscriptionId, uint64 sampleRate)=0
Resubscribes the subscription with the given id.
virtual DataAccessError ReadTimeStampedValues(uint32 subscriptionId, ReadTimeStampedValuesValuesDelegate valuesDelegate)=0
Read the data including timestamps from the subscription with the given id.
Interface for reading an array or an enumerator. For regular enumerators UndefinedArrayLength is used...
Definition: IRscReadEnumerator.hxx:21
Base interface for all Rsc service interface.
Definition: IRscService.hpp:19
Interface for writing an array or an enumerator. For regular enumerators UndefinedArrayLength is used...
Definition: IRscWriteEnumerator.hxx:23
std::uint64_t uint64
The Arp unsigned integer type of 8 byte size.
Definition: PrimitiveTypes.hpp:39
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:35
std::uint16_t uint16
The Arp unsigned integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:31
DataAccessError
This enumeration contains the possible data access errors.
Definition: DataAccessError.hpp:19
SubscriptionKind
This enumeration contains the possible kinds of subscriptions.
Definition: SubscriptionKind.hpp:28
Namespace for classes and interfaces for the Remote Service Call implementation
Root namespace for the PLCnext API