PLCnext API Documentation  21.9.0.40
IDeviceSettingsService.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 "DeviceSettingsServiceProxyFactory.hpp"
10 #include "AccessErrorCode.hpp"
11 #include "Arp/System/Core/delegate.hxx"
12 #include "Arp/System/Rsc/Services/IRscReadEnumerator.hxx"
13 #include "Arp/System/Rsc/Services/IRscWriteEnumerator.hxx"
14 #include "Arp/System/Rsc/Services/RscString.hxx"
15 #include "DeviceSettingItem.hpp"
16 #include "DeviceSettingResult.hpp"
17 
18 // DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY IDeviceSettingsService.cs
19 
20 namespace Arp { namespace Device { namespace Interface { namespace Services
21 {
22 
23 using namespace Arp;
24 using namespace Arp::System::Rsc::Services;
25 
30 {
31 public: // typedefs
32  using Ptr = std::shared_ptr<IDeviceSettingsService>;
33  using ReadValuesSettingsDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
34  using ReadValuesResultDelegate = delegate<void(IRscReadEnumerator<DeviceSettingResult>&)>;
35  using WriteValuesSettingItemsDelegate = delegate<void(IRscWriteEnumerator<DeviceSettingItem>&)>;
36  using WriteValuesResultDelegate = delegate<void(IRscReadEnumerator<AccessErrorCode>&)>;
37 
38 public: // construction/destruction
40  IDeviceSettingsService(void) = default;
41 
42 public: // static policy operation
43  static IRscServiceProxyFactory& GetProxyFactory(void);
44 
45 public: // abstract operations
51  virtual DeviceSettingResult ReadValue(const RscString<512>& setting) = 0;
52 
58  virtual void ReadValues(ReadValuesSettingsDelegate settingsDelegate, ReadValuesResultDelegate resultDelegate) = 0;
59 
66  virtual AccessErrorCode WriteValue(const DeviceSettingItem& settingItem) = 0;
67 
73  virtual void WriteValues(WriteValuesSettingItemsDelegate settingItemsDelegate, WriteValuesResultDelegate resultDelegate) = 0;
74 };
75 
77 // inline methods of class IDeviceSettingsService
78 inline IRscServiceProxyFactory& IDeviceSettingsService::GetProxyFactory()
79 {
80  return DeviceSettingsServiceProxyFactory::GetInstance();
81 }
82 
83 }}}} // end of namespace Arp::Device::Interface::Services
Namespace for classes and interfaces for the Remote Service Call implementation
Definition: IRscReadEnumerator.hxx:9
Use this service to read and write device settings.
Definition: IDeviceSettingsService.hpp:29
Container for a combination of an error code and a value which is a result for a read operation to a ...
Definition: DeviceSettingResult.hpp:29
Container for a (relative) setting identifier with its value.
Definition: DeviceSettingItem.hpp:31
Root namespace for the PLCnext API
Base interface for all Rsc service interface.
Definition: IRscService.hpp:18
AccessErrorCode
Enumeration for error codes returned from Device.Interface.Services.
Definition: AccessErrorCode.hpp:20