PLCnext API Documentation  21.9.0.40
IDataLoggerService2.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 "DataLoggerService2ProxyFactory.hpp"
10 #include "Arp/System/Core/delegate.hxx"
11 #include "Arp/System/Rsc/Services/IRscReadEnumerator.hxx"
12 #include "Arp/System/Rsc/Services/IRscWriteEnumerator.hxx"
13 #include "Arp/System/Rsc/Services/RscString.hxx"
14 #include "Arp/System/Rsc/Services/RscVariant.hxx"
15 #include "ErrorCode.hpp"
16 #include "SessionProperty.hpp"
17 #include "SessionState.hpp"
18 #include "TriggerRpnItem.hpp"
19 #include "VariableInfo.hpp"
20 #include <vector>
21 
22 // DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY IDataLoggerService2.cs
23 
24 namespace Arp { namespace Services { namespace DataLogger { namespace Services
25 {
26 
27 using namespace Arp;
28 using namespace Arp::System::Rsc::Services;
29 
34 {
35 public: // typedefs
36  using Ptr = std::shared_ptr<IDataLoggerService2>;
37  using ListSessionNamesResultDelegate = delegate<void(IRscReadEnumerator<RscString<512>>&)>;
38  using SetVariablesVariableNamesDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
39  using SetVariablesResultDelegate = delegate<void(IRscReadEnumerator<ErrorCode>&)>;
40  using GetLoggedVariablesInfosDelegate = delegate<void(IRscReadEnumerator<VariableInfo>&)>;
41  using ReadVariablesDataVariableNamesDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
42  using ReadVariablesDataValuesDelegate = delegate<void(IRscReadEnumerator<RscVariant<512>>&)>;
43  using GetRotatedFileNamesFilenamesDelegate = delegate<void(IRscReadEnumerator<RscString<512>>&)>;
44  using GetSessionNamesResultDelegate = delegate<void(IRscReadEnumerator<RscString<512>>&)>;
45  using SetTriggerConditionTriggerConditionDelegate = delegate<void(IRscWriteEnumerator<TriggerRpnItem>&)>;
46 
47 public: // construction/destruction
49  IDataLoggerService2(void) = default;
50 
51 public: // static policy operation
52  static IRscServiceProxyFactory& GetProxyFactory(void);
53 
54 public: // abstract operations
59  virtual void ListSessionNames(ListSessionNamesResultDelegate resultDelegate) = 0;
60 
68  virtual ErrorCode CreateSession(const RscString<512>& sessionName, boolean persistent = false) = 0;
69 
76  virtual ErrorCode RemoveSession(const RscString<512>& sessionName) = 0;
77 
84  virtual ErrorCode StartSession(const RscString<512>& sessionName) = 0;
85 
92  virtual ErrorCode StopSession(const RscString<512>& sessionName) = 0;
93 
101  virtual ErrorCode ConfigureSession(const RscString<512>& sessionname, const std::vector<SessionProperty>& properties) = 0;
102 
111  virtual ErrorCode GetSessionConfiguration(const RscString<512>& sessionname, std::vector<SessionProperty>& properties, boolean& isPersistent) = 0;
112 
121  virtual ErrorCode GetSessionState(const RscString<512>& sessionName, SessionState& state) = 0;
122 
130  virtual void SetVariables(const RscString<512>& sessionName, SetVariablesVariableNamesDelegate variableNamesDelegate, SetVariablesResultDelegate resultDelegate) = 0;
131 
139  virtual ErrorCode GetLoggedVariables(const RscString<512>& sessionName, GetLoggedVariablesInfosDelegate infosDelegate) = 0;
140 
187  virtual ErrorCode ReadVariablesData(const RscString<512>& sessionName, DateTime startTime, DateTime endTime, ReadVariablesDataVariableNamesDelegate variableNamesDelegate, ReadVariablesDataValuesDelegate valuesDelegate) = 0;
188 
197  virtual ErrorCode GetRotatedFileNames(const RscString<512>& sessionname, GetRotatedFileNamesFilenamesDelegate filenamesDelegate) = 0;
198 
204  virtual void GetSessionNames(const RscString<512>& variablename, GetSessionNamesResultDelegate resultDelegate) = 0;
205 
224  virtual ErrorCode SetTriggerCondition(const RscString<512>& sessionName, const RscString<512>& taskName, uint16 preCycleCount, uint16 postCycleCount, SetTriggerConditionTriggerConditionDelegate triggerConditionDelegate) = 0;
225 };
226 
228 // inline methods of class IDataLoggerService2
229 inline IRscServiceProxyFactory& IDataLoggerService2::GetProxyFactory()
230 {
231  return DataLoggerService2ProxyFactory::GetInstance();
232 }
233 
234 }}}} // end of namespace Arp::Services::DataLogger::Services
Namespace for classes and interfaces for the Remote Service Call implementation
Definition: IRscReadEnumerator.hxx:9
The class contains date and time informations.
Definition: DateTime.hpp:44
The DataLogger provides an interface to log and store variables during firmware runtime.
Definition: IDataLoggerService2.hpp:33
Root namespace for the PLCnext API
std::uint16_t uint16
The Arp unsigned integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:31
Base interface for all Rsc service interface.
Definition: IRscService.hpp:18
ErrorCode
Possible error codes for data-logger rsc services.
Definition: ErrorCode.hpp:20
SessionState
State of a data logger session
Definition: SessionState.hpp:20