PLCnext API Documentation  22.9.0.33
IDeviceSettingsService.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/Device/Interface/Services/AccessErrorCode.hpp"
9 #include "Arp/Device/Interface/Services/DeviceSettingItem.hpp"
10 #include "Arp/Device/Interface/Services/DeviceSettingResult.hpp"
11 #include "Arp/Device/Interface/Services/DeviceSettingsServiceProxyFactory.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 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 
31 {
32 public: // typedefs
33  using Ptr = std::shared_ptr<IDeviceSettingsService>;
34  using ReadValuesResultDelegate = delegate<void(IRscReadEnumerator<DeviceSettingResult>&)>;
35  using ReadValuesSettingsDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
36  using WriteValuesResultDelegate = delegate<void(IRscReadEnumerator<AccessErrorCode>&)>;
37  using WriteValuesSettingItemsDelegate = delegate<void(IRscWriteEnumerator<DeviceSettingItem>&)>;
38 
39 public: // construction/destruction
41  IDeviceSettingsService(void) = default;
42 
43 public: // static policy operation
44  static IRscServiceProxyFactory& GetProxyFactory(void);
45 
46 public: // abstract operations
52  virtual DeviceSettingResult ReadValue(const RscString<512>& setting) = 0;
53 
59  virtual void ReadValues(ReadValuesSettingsDelegate settingsDelegate, ReadValuesResultDelegate resultDelegate) = 0;
60 
67  virtual AccessErrorCode WriteValue(const DeviceSettingItem& settingItem) = 0;
68 
74  virtual void WriteValues(WriteValuesSettingItemsDelegate settingItemsDelegate, WriteValuesResultDelegate resultDelegate) = 0;
75 };
76 
78 // inline methods of class IDeviceSettingsService
79 inline IRscServiceProxyFactory& IDeviceSettingsService::GetProxyFactory()
80 {
81  return DeviceSettingsServiceProxyFactory::GetInstance();
82 }
83 
84 }}}} // end of namespace Arp::Device::Interface::Services
Container for a (relative) setting identifier with its value.
Definition: DeviceSettingItem.hpp:32
Container for a combination of an error code and a value which is a result for a read operation to a ...
Definition: DeviceSettingResult.hpp:30
Use this service to read and write device settings.
Definition: IDeviceSettingsService.hpp:31
virtual AccessErrorCode WriteValue(const DeviceSettingItem &settingItem)=0
Write a single setting
IDeviceSettingsService(void)=default
Constructs an IDeviceSettingsService instance.
virtual void WriteValues(WriteValuesSettingItemsDelegate settingItemsDelegate, WriteValuesResultDelegate resultDelegate)=0
Write a list of settings
virtual DeviceSettingResult ReadValue(const RscString< 512 > &setting)=0
Read a single setting
virtual void ReadValues(ReadValuesSettingsDelegate settingsDelegate, ReadValuesResultDelegate resultDelegate)=0
Read a list of settings
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
AccessErrorCode
Enumeration for error codes returned from Device.Interface.Services.
Definition: AccessErrorCode.hpp:19
Namespace for classes and interfaces for the Remote Service Call implementation
Definition: IRscReadEnumerator.hxx:10
Root namespace for the PLCnext API