PLCnext API Documentation 24.6.0.58
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Enumerations | Functions
Arp::Services::DataLogger::Services Namespace Reference

Namespace for services of the DataLogger More...

Classes

class  DataLoggerService2ProxyFactory
 Proxy factory class of service IDataLoggerService2 More...
 
class  IDataLoggerService2
 The DataLogger provides an interface to log and store variables during firmware runtime. More...
 
class  SessionProperty
 Association between a name and a value for a session configuration More...
 
class  TriggerRpnItem
 Item of the trigger condition/>. More...
 

Enumerations

enum class  ErrorCode : uint8 {
  None = 0 , NoSuchSession = 1 , SessionRunning = 2 , NoSuchVariable = 3 ,
  AlreadyExists = 4 , OutOfMemory = 5 , NotSupported = 6 , NoData = 7 ,
  DataUnavailable = 8 , InvalidConfig = 9 , Exception = 10 , Unspecified = 255
}
 Possible error codes for data-logger rsc services. More...
 
enum class  RecordType : uint8 {
  None = 0 , Continuous = 1 , PreCycle = 2 , Trigger = 3 ,
  PostCycle = 4
}
 Attribute to mark the recorded values of a triggered session More...
 
enum class  RpnItemType : uint8 { None = 0 , Variable = 1 , Constant = 2 , Operation = 3 }
 Item type of the Arp.Services.DataLogger.Services.TriggerRpnItem structure. (RPN = Reverse Polnish Notation) More...
 
enum class  SessionPropertyName : int32 {
  Undefined = 0 , SamplingInterval = 1 , PublishInterval = 2 , BufferCapacity = 3 ,
  SinkType = 4 , SinkProperties = 5 , TaskContext = 6
}
 All available names of properties that can be set on a session More...
 
enum class  SessionState : uint8 {
  None = 0 , Created = 1 , Initialized = 2 , Running = 3 ,
  Stopped = 4 , Error = 5
}
 State of a data logger session More...
 
enum class  SinkType : int32 {
  None = 0 , Empty = 1 , Database = 2 , Volatile = 3 ,
  TSDB = 4
}
 Enumeration of possible sink types. More...
 
enum class  TriggerConditionOperation : uint8 {
  None = 0 , Equals = 1 , NotEqual = 2 , GreaterThan = 3 ,
  GreaterEqual = 4 , LessThan = 5 , LessEqual = 6 , Modified = 7 ,
  RisingEdge = 8 , FallingEdge = 9 , And = 10 , Or = 11
}
 

Functions

ARP_CXX_SYMBOL_EXPORT std::ostream & operator<< (std::ostream &os, ErrorCode value)
 
ARP_CXX_SYMBOL_EXPORT std::istream & operator>> (std::istream &is, ErrorCode &value)
 
ARP_CXX_SYMBOL_EXPORT std::ostream & operator<< (std::ostream &os, RecordType value)
 
ARP_CXX_SYMBOL_EXPORT std::istream & operator>> (std::istream &is, RecordType &value)
 
ARP_CXX_SYMBOL_EXPORT std::ostream & operator<< (std::ostream &os, RpnItemType value)
 
ARP_CXX_SYMBOL_EXPORT std::istream & operator>> (std::istream &is, RpnItemType &value)
 
ARP_CXX_SYMBOL_EXPORT std::ostream & operator<< (std::ostream &os, SessionPropertyName value)
 
ARP_CXX_SYMBOL_EXPORT std::istream & operator>> (std::istream &is, SessionPropertyName &value)
 
ARP_CXX_SYMBOL_EXPORT std::ostream & operator<< (std::ostream &os, SessionState value)
 
ARP_CXX_SYMBOL_EXPORT std::istream & operator>> (std::istream &is, SessionState &value)
 
ARP_CXX_SYMBOL_EXPORT std::ostream & operator<< (std::ostream &os, SinkType value)
 
ARP_CXX_SYMBOL_EXPORT std::istream & operator>> (std::istream &is, SinkType &value)
 
ARP_CXX_SYMBOL_EXPORT std::ostream & operator<< (std::ostream &os, TriggerConditionOperation value)
 
ARP_CXX_SYMBOL_EXPORT std::istream & operator>> (std::istream &is, TriggerConditionOperation &value)
 

Detailed Description

Namespace for services of the DataLogger

Enumeration Type Documentation

◆ ErrorCode

Possible error codes for data-logger rsc services.

Enumerator
None 

Function call succeeded.

NoSuchSession 

The specified session does not exist.

SessionRunning 

The specified session is in running state.

NoSuchVariable 

The specified variable does not exists.

AlreadyExists 

A session with the same name already exists.

OutOfMemory 

An attempt to allocate memory failed.

NotSupported 

Logging of variable not supported.

NoData 

No data exists for the requested time range

DataUnavailable 

Expected data is unavailable for the requested time range due to an unmounted volume an off-line archive or similar reason for temporary unavailability.

InvalidConfig 

The configuration for the session contains an error

Exception 

An exception occurred during RSC service call. See notification log for more information.

Unspecified 

Unspecified error. See log file for more information.

◆ RecordType

Attribute to mark the recorded values of a triggered session

Enumerator
None 

Initialization value

Continuous 

Record belongs to continously logging session.

PreCycle 

Values are recorded before the condition was triggered

Trigger 

Records are recorded when the condition was triggered

PostCycle 

Records are recorded after the condition was triggered

◆ RpnItemType

Item type of the Arp.Services.DataLogger.Services.TriggerRpnItem structure. (RPN = Reverse Polnish Notation)

Enumerator
None 

Initialization value

Variable 

The Value of Item is the instance path of a variable.

Constant 

The Value of the Item is a constant.

Operation 

The value of Item is a byte containing a value of the Arp.Services.DataLogger.Services.TriggerConditionOperation enumeration.

◆ SessionPropertyName

All available names of properties that can be set on a session

Enumerator
Undefined 

Determines a newly created not yet configured property

<cref name="SessionProperty" > with undefined name will be ignored.

SamplingInterval 

The desired sampling rate. Can either be provided as Int64 which will be interpreted as microseconds count or as string containing the actual unit, e.g. "100ms".

See <cref name="ISubscriptionService::Subscribe" > for more information about the sampling rate

PublishInterval 

The rate in which values will be written to the session´s sink. Can either be provided as Int64 which will be interpreted as microseconds count or as string containing the actual unit, e.g. "100ms"

BufferCapacity 

Amount of capacity of the underlying ring buffer.

See <cref name="ISubscriptionService::CreateRecordingSubscription" > for more information

SinkType 

The type of sink used by the session. Must be of type <cref name="SinkType" >

SinkProperties 

Special property to configure a session sinks. Properties must be provided as string.

TaskContext 

Optional task context. If provided all variables are recorded in the context of the task.

Available since firmware version 2021.3. Must be provided as string. If a sampling interval is provided together with a task context, the sampling interval will be ignored, i.e. set to zero and a notification will be generated. If a trigger condition is set for the session using a task context for sampling, the task context of the trigger condition will be used regardless of the task context set by this property.

◆ SessionState

State of a data logger session

Enumerator
None 

Initialization value

Created 

The session was already created but not yet initialized

Initialized 

The session has loaded a configuration and is ready to run

Running 

The session is currently running and logging variables

Stopped 

The session is currently not running.

Error 

The session is in an error state.

◆ SinkType

Enumeration of possible sink types.

Enumerator
None 

Value not initialized.

Empty 

No sink assigned to session yet.

Database 

Sink using SQLite based database.

Volatile 

Sink used to store data in volatile memory, i.e. after a power reset or a deletion of the session all data is lost.

TSDB 

Sink used to store data in timeseries data base. Cannot be used with IDataLoggerService2!

◆ TriggerConditionOperation

Enumerator
None 

No trigger condition, start recording immediately.

Equals 

Start recording if TriggerVariable1 is equal to TriggerVariable2.

NotEqual 

Start recording if TriggerVariable1 is not equal to TriggerVariable2.

GreaterThan 

Start recording if TriggerVariable1 is greater than to TriggerVariable2.

GreaterEqual 

Start recording if TriggerVariable1 is greater or equal to TriggerVariable2.

LessThan 

Start recording if TriggerVariable1 is less than TriggerVariable2.

LessEqual 

Start recording if TriggerVariable1 is less or equal to TriggerVariable2.

Modified 

Start recording when a modification of the TriggerVariable1 is detected.

RisingEdge 

Start recording when a positive (rising) edge of the TriggerVariable1 is detected.

FallingEdge 

Start recording when a negative (falling) edge of the TriggerVariable1 is detected.

And 

Start recording if TriggerCondition1 and TriggerCondition2 is true.

Or 

Start recording if TriggerCondition1 or TriggerCondition2 is true.