PLCnext API Documentation 25.0.2.69
Static Public Member Functions | List of all members
Arp::Base::Core::ByteConverter Class Reference

This pure static class provides operations for byte converting from little to big endian and vice versa. More...

#include <ByteConverter.hpp>

Static Public Member Functions

template<class T >
static void Swap (T &value)
 Swaps the bytes of the as argument passed value of any primitive type. More...
 
static void Swap (byte *pBuffer, size_t size)
 Swaps the bytes of the as argument buffer of the given size. More...
 
template<class T >
static void ReverseCopy (const T &source, T &target)
 Copies the reverted bytes of the source argument to the target argument. More...
 
static void ReverseCopy (const byte *pSource, byte *pTarget, size_t size)
 Copies the reverted bytes of the source argument to the target argument. More...
 

Detailed Description

This pure static class provides operations for byte converting from little to big endian and vice versa.

Member Function Documentation

◆ ReverseCopy() [1/2]

void Arp::Base::Core::ByteConverter::ReverseCopy ( const byte pSource,
byte pTarget,
size_t  size 
)
static

Copies the reverted bytes of the source argument to the target argument.

Parameters
pSourceThe source buffer to revert and copy.
pTargetThe target buffer to copy the reverted bytes to.
sizeThe size of the source and target buffers.

◆ ReverseCopy() [2/2]

template<class T >
void Arp::Base::Core::ByteConverter::ReverseCopy ( const T &  source,
T &  target 
)
inlinestatic

Copies the reverted bytes of the source argument to the target argument.

Parameters
sourceThe source value to revert and copy.
targetThe target value to copy the reverted value to.

◆ Swap() [1/2]

void Arp::Base::Core::ByteConverter::Swap ( byte pBuffer,
size_t  size 
)
static

Swaps the bytes of the as argument buffer of the given size.

Parameters
pBufferThe buffer to swap the bytes from.
sizeThe size of the as argument passed buffer.

◆ Swap() [2/2]

template<class T >
void Arp::Base::Core::ByteConverter::Swap ( T &  value)
inlinestatic

Swaps the bytes of the as argument passed value of any primitive type.

Parameters
valueThe value to swap.
Template Parameters
TThe type of the as argument passed value (should be a primitive type).

The documentation for this class was generated from the following files: