PLCnext API Documentation 23.6.0.37
Namespaces | Classes | Typedefs | Enumerations | Functions
Arp Namespace Reference

Root namespace for the PLCnext API More...

Namespaces

namespace  Device
 Namespace for device abstraction components
 
namespace  Hardware
 Namespace for hardware abstraction components
 
namespace  Io
 Namespace for I/O subsystems
 
namespace  Plc
 Namespace for classes related to the PLC functionality
 
namespace  Services
 Namespace for service components
 
namespace  System
 Namespace of system functions of PLCnext
 

Classes

class  AppDomain
 This class represents a single application domain for each process and is implemented as singleton. More...
 
class  AppDomainSingleton
 This class implements the singleton pattern for singletons with process wide scope. More...
 
class  ArpVersion
 This class provides the actual Arp version. More...
 
class  BasicFormatter
 This class encapsulates formatting operations which are based on the open source library libfmt formerly known as cppformat. More...
 
class  BasicString
 
class  BasicVersion
 This class represents the version of a special SDK or Arp build. More...
 
class  ByteConverter
 This pure static class provides operation sfor byte converting from little to big endian and vice versa. More...
 
class  CommonTypeName
 This (meta programming) class provides the typename according the CLS (common language specification) of the as template argument passed type. More...
 
class  CommonTypeName< void >
 This (meta programming) pure static class provides some factory operations to create CommonTypeName generically from variables or pointers. More...
 
class  DateTime
 The class contains date and time informations. More...
 
class  delegate< R(A...)>
 This class represents a delegate, that is a compound of an object reference and a member function pointer. The generic type of a delegate just depends on the signature of the (member) function pointer but not on the type of the object on which the member function pointer is invoked. More...
 
class  Enum
 Adapter class for enums to make them loggable and parsable from e.g. XML files. More...
 
class  EnumDictionary
 The class implements an adapter for enums to define the string literals of the enum entries. More...
 
class  EnumDictionaryBase
 The class implements an adapter for enums to define the string literals of the enum entries. More...
 
class  Enumerator
 This class defines a base class for all enumerator implementations and some predefined enumerators as nested classes. More...
 
class  EnumFlagsDictionary
 The class implements an adapter for enums to define the string literals of the enum entries. More...
 
class  event
 Use this class to register and invoke several delegates (function pointer in OOP design). More...
 
class  event< void >
 Use this class to register and invoke several delegates (function pointer in OOP design). More...
 
class  Exception
 This is the base class of all Arp exception classes. More...
 
class  IEnumerator
 Declares the interface of the enumerator pattern, which is leaned on .NET enumerator idiom. More...
 
class  PimplPtr
 Small wrapper class to ensure const correctness using PImpl pattern. More...
 
class  PimplPtr< T, true >
 
struct  remove_shared_ptr
 Gets the value type of a shared_ptr. More...
 
struct  remove_shared_ptr< std::shared_ptr< T > >
 Gets the value type of a shared_ptr. More...
 
class  RuntimeTypeInfo
 The class implements some RTTI utility operations. More...
 
class  Singleton
 This class implements the singleton pattern. More...
 
class  slim_delegate
 
class  slim_delegate< R(A...)>
 This class is deprecated. More...
 
struct  Timeout
 Defines some predefined timeouts. More...
 
class  TypeName
 This (meta programming) class provides the C++ typename of the as template argument passed type. More...
 
class  TypeName< void >
 This (meta programming) pure static class provides some operations to retrieve typenames generically from variables or pointers. More...
 
struct  underlying_enum_type
 Determines the underlying type of an enum class. More...
 
struct  underlying_enum_type< T, true >
 Determines the underlying type of an enum class. More...
 

Typedefs

using boolean = bool
 The Arp boolean type.
 
using byte = unsigned char
 The Arp character type.
 
using sbyte = signed char
 The Arp signed byte type.
 
using uint8 = std::uint8_t
 The Arp unsigned integer type of 1 byte size.
 
using int8 = std::int8_t
 The Arp integer type of 1 byte size.
 
using uint16 = std::uint16_t
 The Arp unsigned integer type of 2 byte size.
 
using int16 = std::int16_t
 The Arp integer type of 2 byte size.
 
using uint32 = std::uint32_t
 The Arp unsigned integer type of 4 byte size.
 
using int32 = std::int32_t
 The Arp integer type of 4 byte size.
 
using uint64 = std::uint64_t
 The Arp unsigned integer type of 8 byte size.
 
using int64 = std::int64_t
 The Arp integer type of 8 byte size.
 
using float32 = float
 The Arp floating point numbers type of 4 byte size.
 
using float64 = double
 The Arp floating point numbers type of 8 byte size.
 
using char8 = char
 The Arp character type of 1 byte size.
 
using char16 = char16_t
 The Arp character type of 2 byte size.
 
using String = Arp::BasicString< char8 >
 The Arp String class.
 
using Version = Arp::BasicVersion
 The Arp Version class.
 
using SteadyClock = std::chrono::steady_clock
 Represents the monotonic clock.
 
using SystemClock = std::chrono::system_clock
 Represents the system-wide real time wall clock.
 
using SteadyTimePoint = SteadyClock::time_point
 Represents the type of a monotonic clock timepoint.
 
using SystemTimePoint = SystemClock::time_point
 Represents the type of a system clock timepoint.
 
using Nanoseconds = std::chrono::nanoseconds
 The Arp Nanoseconds unit class.
 
using Microseconds = std::chrono::microseconds
 The Arp Microseconds unit class.
 
using Milliseconds = std::chrono::milliseconds
 The Arp Milliseconds unit class.
 
using Seconds = std::chrono::seconds
 The Arp Seconds unit class.
 
using Minutes = std::chrono::minutes
 The Arp Minutes unit class.
 
using Hours = std::chrono::hours
 The Arp Hours unit class.
 
using Duration = Nanoseconds
 Represents a duration in arbitary units like ns, ms, s and more. The duration unit might not be ommitted. More...
 
using uintx = uint32
 The Arp unsigned integer type matching CPU width.
 
using intx = int32
 The Arp integer type matching CPU width.
 
using intptr = uint32
 The Arp integer type matching pointer size.
 

Enumerations

enum class  DateTimeKind { DateTimeKind::Unspecified = 0 , DateTimeKind::Utc = 1 }
 Specifies whether a DateTime object represents a local time, a Coordinated Universal Time (UTC), or is not specified. More...
 
enum class  Endianness { None = 0 , BigEndian = 1 , LittleEndian = 2 , Current = LittleEndian }
 This enum defines the endinannes of the target architecture. More...
 

Functions

template<class CharType , class Alloc >
void swap (BasicString< CharType, Alloc > &left, BasicString< CharType, Alloc > &right) noexcept
 Swaps the content of the left string with the content of the right string. More...
 
template<class CharType , class Alloc >
std::ostream & operator<< (std::ostream &os, const BasicString< CharType, Alloc > &right)
 Streams the right string to the outstream os . More...
 
template<class CharType , class Alloc >
std::istream & operator>> (std::istream &is, BasicString< CharType, Alloc > &right)
 Streams the instream is into the right string. More...
 
template<class CharType , class Alloc >
BasicString< CharType, Alloc > operator+ (const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
 Concatenates the right string to the left string. More...
 
template<class CharType , class Alloc >
BasicString< CharType, Alloc > operator+ (const CharType *left, const BasicString< CharType, Alloc > &right)
 Concatenates the right string to the left string. More...
 
template<class CharType , class Alloc >
BasicString< CharType, Alloc > operator+ (const CharType left, const BasicString< CharType, Alloc > &right)
 Concatenates the right string to the left character. More...
 
template<class CharType , class Alloc >
BasicString< CharType, Alloc > operator+ (const BasicString< CharType, Alloc > &left, const CharType *right)
 Concatenates the right C-string to the left string. More...
 
template<class CharType , class Alloc >
BasicString< CharType, Alloc > operator+ (const BasicString< CharType, Alloc > &left, const CharType right)
 Concatenates the right character to the left string. More...
 
template<class CharType , class Alloc >
BasicString< CharType, Alloc > operator+ (const BasicString< CharType, Alloc > &left, BasicString< CharType, Alloc > &&right)
 Concatenates the right string to the left string. More...
 
template<class CharType , class Alloc >
BasicString< CharType, Alloc > operator+ (BasicString< CharType, Alloc > &&left, const BasicString< CharType, Alloc > &right)
 Concatenates the right string to the left string. More...
 
template<class CharType , class Alloc >
BasicString< CharType, Alloc > operator+ (BasicString< CharType, Alloc > &&left, BasicString< CharType, Alloc > &&right)
 Concatenates the right string to the left string. More...
 
template<class CharType , class Alloc >
BasicString< CharType, Alloc > operator+ (const CharType *left, BasicString< CharType, Alloc > &&right)
 Concatenates the right string to the left string. More...
 
template<class CharType , class Alloc >
BasicString< CharType, Alloc > operator+ (const CharType left, BasicString< CharType, Alloc > &&right)
 Concatenates the right string to the left character. More...
 
template<class CharType , class Alloc >
BasicString< CharType, Alloc > operator+ (BasicString< CharType, Alloc > &&left, const CharType *right)
 Concatenates the right string to the left string. More...
 
template<class CharType , class Alloc >
BasicString< CharType, Alloc > operator+ (BasicString< CharType, Alloc > &&left, const CharType right)
 Concatenates the right character to the left string. More...
 
template<class CharType , class Alloc >
bool operator== (const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
 Compares the left string to the right string on equality. More...
 
template<class CharType , class Alloc >
bool operator== (const CharType *left, const BasicString< CharType, Alloc > &right)
 Compares the left string to the right string on equality. More...
 
template<class CharType , class Alloc >
bool operator== (const BasicString< CharType, Alloc > &left, const CharType *right)
 Compares the left string to the right string on equality. More...
 
template<class CharType , class Alloc >
bool operator!= (const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
 Compares the left string to the right string on inequality. More...
 
template<class CharType , class Alloc >
bool operator!= (const CharType *left, const BasicString< CharType, Alloc > &right)
 Compares the left string to the right string on inequality. More...
 
template<class CharType , class Alloc >
bool operator!= (const BasicString< CharType, Alloc > &left, const CharType *right)
 Compares the left string to the right string on inequality. More...
 
template<class CharType , class Alloc >
bool operator< (const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
 Compares the left string to the right string. More...
 
template<class CharType , class Alloc >
bool operator< (const CharType *left, const BasicString< CharType, Alloc > &right)
 Compares the left string to the right string. More...
 
template<class CharType , class Alloc >
bool operator< (const BasicString< CharType, Alloc > &left, const CharType *right)
 Compares the left string to the right string. More...
 
template<class CharType , class Alloc >
bool operator> (const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
 Compares the left string to the right string. More...
 
template<class CharType , class Alloc >
bool operator> (const CharType *left, const BasicString< CharType, Alloc > &right)
 Compares the left string to the right string. More...
 
template<class CharType , class Alloc >
bool operator> (const BasicString< CharType, Alloc > &left, const CharType *right)
 Compares the left string to the right string. More...
 
template<class CharType , class Alloc >
bool operator<= (const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
 Compares the left string to the right string. More...
 
template<class CharType , class Alloc >
bool operator<= (const CharType *left, const BasicString< CharType, Alloc > &right)
 Compares the left string to the right string. More...
 
template<class CharType , class Alloc >
bool operator<= (const BasicString< CharType, Alloc > &left, const CharType *right)
 Compares the left string to the right string. More...
 
template<class CharType , class Alloc >
bool operator>= (const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
 Compares the left string to the right string. More...
 
template<class CharType , class Alloc >
bool operator>= (const CharType *left, const BasicString< CharType, Alloc > &right)
 Compares the left string to the right string. More...
 
template<class CharType , class Alloc >
bool operator>= (const BasicString< CharType, Alloc > &left, const CharType *right)
 Compares the left string to the right string. More...
 
std::ostream & operator<< (std::ostream &os, const DateTime &dateTime)
 The ostream operator is used for logging and string formatting and formats the DateTime value in ISO-8601 format.
 
std::istream & operator>> (std::istream &is, DateTime &dateTime)
 The istream operator is used for string parsing and expects the ISO-8601 format.
 
ARP_CXX_SYMBOL_EXPORT std::ostream & operator<< (std::ostream &os, Endianness value)
 
ARP_CXX_SYMBOL_EXPORT std::istream & operator>> (std::istream &is, Endianness &value)
 
template<class T >
Enum< T > make_enum (T value)
 Global make function to adapt any enum class by class Enum. More...
 
template<class T >
std::ostream & operator<< (std::ostream &os, Enum< T > value)
 Makes the Enum class loggable and streamable. More...
 
template<class T >
std::istream & operator>> (std::istream &is, Enum< T > &value)
 Makes the Enum class parsable. More...
 
template<class T >
Enum< T > operator| (Enum< T > lhs, Enum< T > rhs)
 Bitwise Or operator for class Enum. More...
 
template<class T >
Enum< T > operator& (Enum< T > lhs, Enum< T > rhs)
 Bitwise And operator for class Enum. More...
 
template<class T >
bool operator== (Enum< T > lhs, Enum< T > rhs)
 Equality operator of class Enum. More...
 
template<class T >
bool operator< (Enum< T > lhs, Enum< T > rhs)
 Less operator for class Enum. More...
 
template<class T >
bool operator> (Enum< T > lhs, Enum< T > rhs)
 Greater operator for class Enum. More...
 
template<class T >
bool operator<= (Enum< T > lhs, Enum< T > rhs)
 Less or equal operator for class Enum. More...
 
template<class T >
bool operator>= (Enum< T > lhs, Enum< T > rhs)
 Greater or equal operator for class Enum. More...
 
template<class T >
bool operator== (Enum< T > lhs, T rhs)
 Equality operator of class Enum. More...
 
template<class T >
bool operator< (Enum< T > lhs, T rhs)
 Less operator for class Enum. More...
 
template<class T >
bool operator> (Enum< T > lhs, T rhs)
 Greater operator for class Enum. More...
 
template<class T >
bool operator<= (Enum< T > lhs, T rhs)
 Less or equal operator for class Enum. More...
 
template<class T >
bool operator>= (Enum< T > lhs, T rhs)
 Greater or equal operator for class Enum. More...
 
template<class T >
bool operator== (T lhs, Enum< T > rhs)
 Equality operator of class Enum. More...
 
template<class T >
bool operator< (T lhs, Enum< T > rhs)
 Less operator for class Enum. More...
 
template<class T >
bool operator> (T lhs, Enum< T > rhs)
 Greater operator for class Enum. More...
 
template<class T >
bool operator<= (T lhs, Enum< T > rhs)
 Less or equal operator for class Enum. More...
 
template<class T >
bool operator>= (T lhs, Enum< T > rhs)
 Greater or equal operator for class Enum. More...
 
template<class T >
ARP_CXX_SYMBOL_EXPORT const char * GetEnumString (T value)
 Deprecated! This helper function returns the string of the specified enum entry. More...
 
template<class T >
ARP_CXX_SYMBOL_EXPORT bool TryGetEnumValue (const char *name, T &value)
 Deprecated! This helper function tries to return the enum entry of the specified string. More...
 
template<class T >
class ARP_DEPRECATED ("Use Arp::Enum<T> instead.") EnumStrings
 Deprecated! The class implements an adapter for enums to define the string literals of the enum entries. More...
 
std::ostream & operator<< (std::ostream &os, const Exception &e)
 Makes the Exception class loggable and streamable. More...
 
bool SecureStrIsNullOrEmpty (const char *str, size_t maxSize)
 Determines if a const char* is nullptr or the string is empty More...
 
size_t SecureStrnlen (const char *str, size_t maxSize)
 Warpper for strnlen_s More...
 
void SecureStrcpy (char *dest, size_t destMaxSize, const char *src)
 Wrapper for strcpy_s More...
 
void SecureStrncpy (char *dest, size_t destMaxSize, const char *src, size_t count)
 Wrapper for strncpy_s More...
 
template<class T , class TInstance >
bool IsInstanceOfType (const TInstance &instance)
 Tests if the type of the as argument passed instance is T or derived by T . More...
 
template<class T , class TInstance >
bool IsInstanceOfType (const TInstance *pInstance)
 Tests if the type of the as argument passed instance is T or derived by T . More...
 
template<class T , class TInstance >
bool IsInstanceOfType (TInstance &instance)
 Tests if the type of the as argument passed instance is T or derived by T . More...
 
template<class T , class TInstance >
bool IsInstanceOfType (TInstance *pInstance)
 Tests if the type of the as argument passed instance is T or derived by T . More...
 
template<class T >
std::ostream & operator<< (std::ostream &os, const TypeName< T > &typeName)
 Makes the TypeName class loggable and streamable. More...
 
constexpr byte operator""_b (unsigned long long int value)
 
constexpr byte operator""_B (unsigned long long int value)
 
template<class R , class ... A>
delegate< R(A...)> make_delegate (R(*const function_ptr)(A...)) noexcept
 Creates a delegate from a static function. More...
 
template<class C , class R , class ... A>
delegate< R(A...)> make_delegate (C *const pObject, R(C::*const pMethod)(A...)) noexcept
 Creates a delegate from a member function and object pointer. More...
 
template<class C , class R , class ... A>
delegate< R(A...)> make_delegate (C const *const pObject, R(C::*const pMethod)(A...) const) noexcept
 Creates a delegate from a member function and object pointer. More...
 
template<class C , class R , class ... A>
delegate< R(A...)> make_delegate (C &object, R(C::*const pMethod)(A...)) noexcept
 Creates a delegate from a const member function and const object reference. More...
 
template<class C , class R , class ... A>
delegate< R(A...)> make_delegate (const C &object, R(C::*const pMethod)(A...) const) noexcept
 Creates a delegate from a const member function and const object reference. More...
 
template<class R , class ... A>
delegate< R(A...)> make_delegate (std::function< R(A...)> &&f) noexcept
 Creates a delegate from a lambda expression or std::function. More...
 
template<class R , class ... A>
delegate< R(A...)> make_delegate (const std::function< R(A...)> &f) noexcept
 Creates a delegate from a lambda expression or std::function. More...
 
template<typename T >
auto format_cast (T &&value)
 
auto format_cast (int8 value)
 
auto format_cast (uint8 value)
 

Detailed Description

Root namespace for the PLCnext API

Enumeration Type Documentation

◆ Endianness

enum class Arp::Endianness
strong

This enum defines the endinannes of the target architecture.

Enumerator
None 

Not specified.

BigEndian 

Determines big endian.

LittleEndian 

Determines little endian.

Current 

Determines the current endianness.

Function Documentation

◆ ARP_DEPRECATED()

template<class T >
class Arp::ARP_DEPRECATED ( "Use Arp::Enum<T> instead."  )

Deprecated! The class implements an adapter for enums to define the string literals of the enum entries.

Template Parameters
TThe type of the enum.

This class is deprecated! Use Arp::Enum<T> instead.

Deprecated! Returns the string of the specified enum entry.

Parameters
keyThe enum entry of enmum T to get the associated string from.
Returns
The string literal of the as argument passed enum entry.

This class is deprecated! Use Arp::Enum<T> instead.

Deprecated! Tries to return the enum entry of the specified string.

Parameters
nameThe string to get the associated enum entry of enum T from.
valueThe enum entry of enum T associated to the argument passed name .
Returns
true on success, otherwise false.

This class is deprecated! Use Arp::Enum<T> instead.

◆ GetEnumString()

template<class T >
ARP_CXX_SYMBOL_EXPORT const char * Arp::GetEnumString ( value)

Deprecated! This helper function returns the string of the specified enum entry.

Template Parameters
TThe type of the enum.
Parameters
valueThe enum entry of enum T to get the associated string from.
Returns
The string literal of the as argument passed enum entry.
Deprecated:
Use Arp::Enum<T> instead.

◆ operator<<() [1/2]

std::ostream & Arp::operator<< ( std::ostream &  os,
const Exception e 
)
inline

Makes the Exception class loggable and streamable.

Parameters
osThe stream to write the exception to.
eThe exception to write.
Returns
The as argument passed stream.

◆ operator<<() [2/2]

template<class T >
std::ostream & Arp::operator<< ( std::ostream &  os,
const TypeName< T > &  typeName 
)
inline

Makes the TypeName class loggable and streamable.

Parameters
osThe stream to write the typename to.
typeNameThe typeName to write.
Returns
The as argument passed stream.

◆ SecureStrcpy()

void Arp::SecureStrcpy ( char *  dest,
size_t  destMaxSize,
const char *  src 
)

Wrapper for strcpy_s

Parameters
destpointer to the destination array
destMaxSizesize of the destination array
srcpointer to the source string

On error an Arp::Exception is thrown.

◆ SecureStrIsNullOrEmpty()

bool Arp::SecureStrIsNullOrEmpty ( const char *  str,
size_t  maxSize 
)

Determines if a const char* is nullptr or the string is empty

Parameters
strpointer to the string
maxSizemaximum size of the string
Returns
true if the string is empty or a nullptr

On error an Arp::Exception is thrown.

◆ SecureStrncpy()

void Arp::SecureStrncpy ( char *  dest,
size_t  destMaxSize,
const char *  src,
size_t  count 
)

Wrapper for strncpy_s

Parameters
destpointer to the destination array
destMaxSizesize of the destination array
srcpointer to the source string
countnumber of characters to copy

On error an Arp::Exception is thrown.

◆ SecureStrnlen()

size_t Arp::SecureStrnlen ( const char *  str,
size_t  maxSize 
)

Warpper for strnlen_s

Parameters
strpointer to the string
maxSizemaximum size of the string
Returns
length of the string

On error an Arp::Exception is thrown.

◆ TryGetEnumValue()

template<class T >
ARP_CXX_SYMBOL_EXPORT bool Arp::TryGetEnumValue ( const char *  name,
T &  value 
)

Deprecated! This helper function tries to return the enum entry of the specified string.

Template Parameters
TThe type of the enum.
Parameters
nameThe string to get the associated enum entry of enum T from.
valueThe enum entry of enum T associated to the argument passed name .
Returns
true on success, otherwise false.
Deprecated:
Use Arp::Enum<T> instead.