PLCnext API Documentation 23.6.0.37
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
38{
39public: // typedefs
40 using Ptr = std::shared_ptr<IDataLoggerService2>;
42 using GetLoggedVariablesInfosDelegate = delegate<void(IRscReadEnumerator<VariableInfo>&)>;
43 using GetRotatedFileNamesFilenamesDelegate = delegate<void(IRscReadEnumerator<RscString<512>>&)>;
44 using GetSessionNamesResultDelegate = delegate<void(IRscReadEnumerator<RscString<512>>&)>;
45 using ListSessionNamesResultDelegate = delegate<void(IRscReadEnumerator<RscString<512>>&)>;
46 using ReadVariablesDataValuesDelegate = delegate<void(IRscReadEnumerator<RscVariant<512>>&)>;
47 using ReadVariablesDataVariableNamesDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
48 using SetTriggerConditionTriggerConditionDelegate = delegate<void(IRscWriteEnumerator<TriggerRpnItem>&)>;
49 using SetVariablesResultDelegate = delegate<void(IRscReadEnumerator<ErrorCode>&)>;
50 using SetVariablesVariableNamesDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
51
52public: // construction/destruction
54 IDataLoggerService2(void) = default;
55
56public: // static policy operation
57 static IRscServiceProxyFactory& GetProxyFactory(void);
58
59public: // abstract operations
64 virtual void ListSessionNames(ListSessionNamesResultDelegate resultDelegate) = 0;
65
103 virtual ErrorCode CreateSession(const RscString<512>& sessionName, boolean persistent = false) = 0;
104
141 virtual ErrorCode RemoveSession(const RscString<512>& sessionName) = 0;
142
179 virtual ErrorCode StartSession(const RscString<512>& sessionName) = 0;
180
217 virtual ErrorCode StopSession(const RscString<512>& sessionName) = 0;
218
264 virtual ErrorCode ConfigureSession(const RscString<512>& sessionname, const std::vector<SessionProperty>& properties) = 0;
265
296 virtual ErrorCode GetSessionConfiguration(const RscString<512>& sessionname, std::vector<SessionProperty>& properties, boolean& isPersistent) = 0;
297
328 virtual ErrorCode GetSessionState(const RscString<512>& sessionName, SessionState& state) = 0;
329
357 virtual void SetVariables(const RscString<512>& sessionName, SetVariablesVariableNamesDelegate variableNamesDelegate, SetVariablesResultDelegate resultDelegate) = 0;
358
388 virtual ErrorCode GetLoggedVariables(const RscString<512>& sessionName, GetLoggedVariablesInfosDelegate infosDelegate) = 0;
389
475 virtual ErrorCode ReadVariablesData(const RscString<512>& sessionName, DateTime startTime, DateTime endTime, ReadVariablesDataVariableNamesDelegate variableNamesDelegate, ReadVariablesDataValuesDelegate valuesDelegate) = 0;
476
514 virtual ErrorCode GetRotatedFileNames(const RscString<512>& sessionname, GetRotatedFileNamesFilenamesDelegate filenamesDelegate) = 0;
515
521 virtual void GetSessionNames(const RscString<512>& variablename, GetSessionNamesResultDelegate resultDelegate) = 0;
522
585 virtual ErrorCode SetTriggerCondition(const RscString<512>& sessionName, const RscString<512>& taskName, uint16 preCycleCount, uint16 postCycleCount, SetTriggerConditionTriggerConditionDelegate triggerConditionDelegate) = 0;
586};
587
589// inline methods of class IDataLoggerService2
590inline IRscServiceProxyFactory& IDataLoggerService2::GetProxyFactory()
591{
592 return DataLoggerService2ProxyFactory::GetInstance();
593}
594
595}}}} // end of namespace Arp::Services::DataLogger::Services
The class contains date and time informations.
Definition: DateTime.hpp:46
Describes a subscribed variable.
Definition: VariableInfo.hpp:31
The DataLogger provides an interface to log and store variables during firmware runtime.
Definition: IDataLoggerService2.hpp:38
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:20
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:32
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