PLCnext API Documentation 23.0.2.9
IDataAccessService.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/DataAccessServiceProxyFactory.hpp"
10#include "Arp/Plc/Gds/Services/ReadItem.hpp"
11#include "Arp/Plc/Gds/Services/WriteItem.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
18// DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY IDataAccessService.cs
19
20namespace Arp { namespace Plc { namespace Gds { namespace Services
21{
22
23using namespace Arp;
24using namespace Arp::System::Rsc::Services;
25
71{
72public: // typedefs
73 using Ptr = std::shared_ptr<IDataAccessService>;
74 using ReadPortNamesDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
75 using ReadResultDelegate = delegate<void(IRscReadEnumerator<ReadItem>&)>;
76 using WriteDataDelegate = delegate<void(IRscWriteEnumerator<WriteItem>&)>;
77 using WriteResultDelegate = delegate<void(IRscReadEnumerator<DataAccessError>&)>;
78
79public: // construction/destruction
81 IDataAccessService(void) = default;
82
83public: // static policy operation
84 static IRscServiceProxyFactory& GetProxyFactory(void);
85
86public: // abstract operations
107 virtual ReadItem ReadSingle(const RscString<512>& portName) = 0;
108
128 virtual void Read(ReadPortNamesDelegate portNamesDelegate, ReadResultDelegate resultDelegate) = 0;
129
150 virtual DataAccessError WriteSingle(const WriteItem& data) = 0;
151
171 virtual void Write(WriteDataDelegate dataDelegate, WriteResultDelegate resultDelegate) = 0;
172};
173
175// inline methods of class IDataAccessService
176inline IRscServiceProxyFactory& IDataAccessService::GetProxyFactory()
177{
178 return DataAccessServiceProxyFactory::GetInstance();
179}
180
181}}}} // end of namespace Arp::Plc::Gds::Services
Services for the direct data access.
Definition: IDataAccessService.hpp:71
virtual void Write(WriteDataDelegate dataDelegate, WriteResultDelegate resultDelegate)=0
Writes the given values to the given variables containing in the given Arp.Plc.Gds....
IDataAccessService(void)=default
Constructs an IDataAccessService instance.
virtual void Read(ReadPortNamesDelegate portNamesDelegate, ReadResultDelegate resultDelegate)=0
Reads the variable values directly from the given variable names.
virtual ReadItem ReadSingle(const RscString< 512 > &portName)=0
Reads the value of the variable directly from the given variable name.
virtual DataAccessError WriteSingle(const WriteItem &data)=0
Writes the given value to the given variable name containing in the given Arp.Plc....
Stores the data to be read, written by the controller and a possible data access error.
Definition: ReadItem.hpp:27
Stores the to be written data and the related variable name to be write to.
Definition: WriteItem.hpp:27
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
DataAccessError
This enumeration contains the possible data access errors.
Definition: DataAccessError.hpp:19
Namespace for classes and interfaces for the Remote Service Call implementation
Root namespace for the PLCnext API