PLCnext API Documentation 25.0.2.69
Endianness.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
7
8#ifndef ARP_USE_ARP_SYSTEM_CORE
9
10#include "Arp/Base/Core/Endianness.hpp"
11
12#else
13
14#include "Arp/System/Core/Arp.h"
15
16namespace Arp
17{
18
20enum class Endianness
21{
22 None = 0,
23 BigEndian = 1,
24 LittleEndian = 2,
25
26 // define Current endianess
27#ifdef ARP_BIG_ENDIAN
28 Current = BigEndian
29#else
30 Current = LittleEndian
31#endif
32};
33
35// global stream operators of enum Endianness for logging and parsing
36ARP_CXX_SYMBOL_EXPORT std::ostream& operator<<(std::ostream& os, Endianness value);
37ARP_CXX_SYMBOL_EXPORT std::istream& operator>>(std::istream& is, Endianness& value);
38
39} // end of namespace Arp
40
42// template specialization of Endianness formatter
43template<> struct fmt::formatter<Arp::Endianness> : public fmt::ostream_formatter {};
44
45#endif // ndef ARP_USE_ARP_SYSTEM_CORE
46
47
Root namespace for the PLCnext API