PLCnext API Documentation 23.3.0.32
IDataLoggerService2.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include <vector>
9#include "Arp/Plc/Gds/Services/VariableInfo.hpp"
10#include "Arp/Services/DataLogger/Services/DataLoggerService2ProxyFactory.hpp"
11#include "Arp/Services/DataLogger/Services/ErrorCode.hpp"
12#include "Arp/Services/DataLogger/Services/SessionProperty.hpp"
13#include "Arp/Services/DataLogger/Services/SessionState.hpp"
14#include "Arp/Services/DataLogger/Services/TriggerRpnItem.hpp"
15#include "Arp/System/Core/delegate.hxx"
16#include "Arp/System/Rsc/Services/IRscReadEnumerator.hxx"
17#include "Arp/System/Rsc/Services/IRscService.hpp"
18#include "Arp/System/Rsc/Services/IRscWriteEnumerator.hxx"
19#include "Arp/System/Rsc/Services/RscString.hxx"
20#include "Arp/System/Rsc/Services/RscVariant.hxx"
21
22// DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY IDataLoggerService2.cs
23
24namespace Arp { namespace Services { namespace DataLogger { namespace Services
25{
26
27using namespace Arp;
28using namespace Arp::System::Rsc::Services;
29
35{
36public: // typedefs
37 using Ptr = std::shared_ptr<IDataLoggerService2>;
39 using GetLoggedVariablesInfosDelegate = delegate<void(IRscReadEnumerator<VariableInfo>&)>;
40 using GetRotatedFileNamesFilenamesDelegate = delegate<void(IRscReadEnumerator<RscString<512>>&)>;
41 using GetSessionNamesResultDelegate = delegate<void(IRscReadEnumerator<RscString<512>>&)>;
42 using ListSessionNamesResultDelegate = delegate<void(IRscReadEnumerator<RscString<512>>&)>;
43 using ReadVariablesDataValuesDelegate = delegate<void(IRscReadEnumerator<RscVariant<512>>&)>;
44 using ReadVariablesDataVariableNamesDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
45 using SetTriggerConditionTriggerConditionDelegate = delegate<void(IRscWriteEnumerator<TriggerRpnItem>&)>;
46 using SetVariablesResultDelegate = delegate<void(IRscReadEnumerator<ErrorCode>&)>;
47 using SetVariablesVariableNamesDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
48
49public: // construction/destruction
51 IDataLoggerService2(void) = default;
52
53public: // static policy operation
54 static IRscServiceProxyFactory& GetProxyFactory(void);
55
56public: // abstract operations
61 virtual void ListSessionNames(ListSessionNamesResultDelegate resultDelegate) = 0;
62
70 virtual ErrorCode CreateSession(const RscString<512>& sessionName, boolean persistent = false) = 0;
71
78 virtual ErrorCode RemoveSession(const RscString<512>& sessionName) = 0;
79
86 virtual ErrorCode StartSession(const RscString<512>& sessionName) = 0;
87
94 virtual ErrorCode StopSession(const RscString<512>& sessionName) = 0;
95
103 virtual ErrorCode ConfigureSession(const RscString<512>& sessionname, const std::vector<SessionProperty>& properties) = 0;
104
113 virtual ErrorCode GetSessionConfiguration(const RscString<512>& sessionname, std::vector<SessionProperty>& properties, boolean& isPersistent) = 0;
114
123 virtual ErrorCode GetSessionState(const RscString<512>& sessionName, SessionState& state) = 0;
124
132 virtual void SetVariables(const RscString<512>& sessionName, SetVariablesVariableNamesDelegate variableNamesDelegate, SetVariablesResultDelegate resultDelegate) = 0;
133
141 virtual ErrorCode GetLoggedVariables(const RscString<512>& sessionName, GetLoggedVariablesInfosDelegate infosDelegate) = 0;
142
189 virtual ErrorCode ReadVariablesData(const RscString<512>& sessionName, DateTime startTime, DateTime endTime, ReadVariablesDataVariableNamesDelegate variableNamesDelegate, ReadVariablesDataValuesDelegate valuesDelegate) = 0;
190
199 virtual ErrorCode GetRotatedFileNames(const RscString<512>& sessionname, GetRotatedFileNamesFilenamesDelegate filenamesDelegate) = 0;
200
206 virtual void GetSessionNames(const RscString<512>& variablename, GetSessionNamesResultDelegate resultDelegate) = 0;
207
226 virtual ErrorCode SetTriggerCondition(const RscString<512>& sessionName, const RscString<512>& taskName, uint16 preCycleCount, uint16 postCycleCount, SetTriggerConditionTriggerConditionDelegate triggerConditionDelegate) = 0;
227};
228
230// inline methods of class IDataLoggerService2
231inline IRscServiceProxyFactory& IDataLoggerService2::GetProxyFactory()
232{
233 return DataLoggerService2ProxyFactory::GetInstance();
234}
235
236}}}} // end of namespace Arp::Services::DataLogger::Services
The class contains date and time informations.
Definition: DateTime.hpp:45
Describes a subscribed variable.
Definition: VariableInfo.hpp:31
The DataLogger provides an interface to log and store variables during firmware runtime.
Definition: IDataLoggerService2.hpp:35
virtual void ListSessionNames(ListSessionNamesResultDelegate resultDelegate)=0
List all names of sessions inside the data logger component.
virtual ErrorCode CreateSession(const RscString< 512 > &sessionName, boolean persistent=false)=0
Tries to create a new session.
virtual ErrorCode GetLoggedVariables(const RscString< 512 > &sessionName, GetLoggedVariablesInfosDelegate infosDelegate)=0
Queries all infos about logged variables of a session.
virtual ErrorCode GetSessionConfiguration(const RscString< 512 > &sessionname, std::vector< SessionProperty > &properties, boolean &isPersistent)=0
Tries to query the current configuration of a session
virtual ErrorCode ReadVariablesData(const RscString< 512 > &sessionName, DateTime startTime, DateTime endTime, ReadVariablesDataVariableNamesDelegate variableNamesDelegate, ReadVariablesDataValuesDelegate valuesDelegate)=0
Read the data from the given variable from the session with the session name.
IDataLoggerService2(void)=default
Constructs an IDataLoggerService2 instance.
virtual ErrorCode StopSession(const RscString< 512 > &sessionName)=0
Tries to stop a logging session.
virtual ErrorCode ConfigureSession(const RscString< 512 > &sessionname, const std::vector< SessionProperty > &properties)=0
(Re)configures a session
virtual ErrorCode RemoveSession(const RscString< 512 > &sessionName)=0
Tries to remove a session.
virtual ErrorCode GetRotatedFileNames(const RscString< 512 > &sessionname, GetRotatedFileNamesFilenamesDelegate filenamesDelegate)=0
Returns names of all files that have been written by a session
virtual ErrorCode SetTriggerCondition(const RscString< 512 > &sessionName, const RscString< 512 > &taskName, uint16 preCycleCount, uint16 postCycleCount, SetTriggerConditionTriggerConditionDelegate triggerConditionDelegate)=0
Sets a trigger condition
virtual void GetSessionNames(const RscString< 512 > &variablename, GetSessionNamesResultDelegate resultDelegate)=0
Tries to retrieve names of sessions which log assigned variables
virtual ErrorCode GetSessionState(const RscString< 512 > &sessionName, SessionState &state)=0
Tries to query the state of a session.
virtual void SetVariables(const RscString< 512 > &sessionName, SetVariablesVariableNamesDelegate variableNamesDelegate, SetVariablesResultDelegate resultDelegate)=0
Tries to add a variable to a session.
virtual ErrorCode StartSession(const RscString< 512 > &sessionName)=0
Tries to start a logging session.
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
std::uint16_t uint16
The Arp unsigned integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:31
ErrorCode
Possible error codes for data-logger rsc services.
Definition: ErrorCode.hpp:19
SessionState
State of a data logger session
Definition: SessionState.hpp:19
Namespace for classes and interfaces for the Remote Service Call implementation
Root namespace for the PLCnext API