DP3
DataFormat.h
Go to the documentation of this file.
1 // DataFormat.h: Get the data format (endian type)
2 //
3 // Copyright (C) 2020 ASTRON (Netherlands Institute for Radio Astronomy)
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 
6 #ifndef LOFAR_COMMON_DATAFORMAT_H
7 #define LOFAR_COMMON_DATAFORMAT_H
8 
9 // Never #include <config.h> or #include <lofar_config.h> in a header file!
10 
11 namespace dp3 {
12 namespace common {
13 
15 
24 enum DataFormat { LittleEndian = 0, BigEndian = 1 };
25 
28 #if defined(WORDS_BIGENDIAN)
29 {
30  return BigEndian;
31 }
32 #else
33 {
34  return LittleEndian;
35 }
36 #endif
37 
38 } // namespace common
39 } // namespace dp3
40 
41 #endif
DataFormat dataFormat()
Get the endian type on this machine.
Definition: DataFormat.h:27
DataFormat
This file defines an enum for the possible machine data formats.
Definition: DataFormat.h:24
@ LittleEndian
Definition: DataFormat.h:24
@ BigEndian
Definition: DataFormat.h:24
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53