PLCnext API Documentation  22.9.0.33
IForceService.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include <vector>
9 #include "Arp/Plc/Gds/Services/DataAccessError.hpp"
10 #include "Arp/Plc/Gds/Services/ForceItem.hpp"
11 #include "Arp/Plc/Gds/Services/ForceServiceProxyFactory.hpp"
12 #include "Arp/System/Rsc/Services/IRscService.hpp"
13 #include "Arp/System/Rsc/Services/RscString.hxx"
14 
15 // DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY IForceService.cs
16 
17 namespace Arp { namespace Plc { namespace Gds { namespace Services
18 {
19 
20 using namespace Arp;
21 using namespace Arp::System::Rsc::Services;
22 
30 class IForceService : public IRscService
31 {
32 public: // typedefs
33  using Ptr = std::shared_ptr<IForceService>;
34 
35 public: // construction/destruction
37  IForceService(void) = default;
38 
39 public: // static policy operation
40  static IRscServiceProxyFactory& GetProxyFactory(void);
41 
42 public: // abstract operations
59  virtual DataAccessError AddVariable(const ForceItem& item) = 0;
60 
67  virtual void RemoveVariable(const RscString<512>& variableName) = 0;
68 
75  virtual std::vector<ForceItem> GetVariables() = 0;
76 
84  virtual void Reset() = 0;
85 
97  virtual boolean IsForcable(const RscString<512>& variableName) = 0;
98 
104  virtual boolean IsActive() = 0;
105 };
106 
108 // inline methods of class IForceService
109 inline IRscServiceProxyFactory& IForceService::GetProxyFactory()
110 {
111  return ForceServiceProxyFactory::GetInstance();
112 }
113 
114 }}}} // end of namespace Arp::Plc::Gds::Services
A force item structure.
Definition: ForceItem.hpp:26
Service for managing and controlling force variables by the Arp GDS.
Definition: IForceService.hpp:31
IForceService(void)=default
Constructs an IForceService instance.
virtual DataAccessError AddVariable(const ForceItem &item)=0
Adds a new variable and value for forcing. Enables force mode.
virtual boolean IsActive()=0
Tests whether force mode is active.
virtual std::vector< ForceItem > GetVariables()=0
Gets a list of all forced variables.
virtual void RemoveVariable(const RscString< 512 > &variableName)=0
Resets forced variable. Disables force mode after force list is empty.
virtual void Reset()=0
Resets the force list. Disables force mode.
virtual boolean IsForcable(const RscString< 512 > &variableName)=0
Tests whether variable is forcable.
Base interface for all Rsc service interface.
Definition: IRscService.hpp:19
DataAccessError
This enumeration contains the possible data access errors.
Definition: DataAccessError.hpp:19
Namespace for classes and interfaces for the Remote Service Call implementation
Definition: IRscReadEnumerator.hxx:10
Root namespace for the PLCnext API