libcyberradio  22.01.24
VitaIfSpec.cpp
1 /***************************************************************************
2  * \file VitaIfSpec.cpp
3  * \brief Defines the VITA interface specification for an NDR-class radio.
4  * \author DA
5  * \author NH
6  * \author MN
7  * \copyright (c) 2017 CyberRadio Solutions, Inc. All rights reserved.
8  *
9  ***************************************************************************/
10 
11 #include "LibCyberRadio/Driver/VitaIfSpec.h"
12 
16 namespace LibCyberRadio
17 {
21  namespace Driver
22  {
23  VitaIfSpec::VitaIfSpec(int headerSizeWords,
24  int payloadSizeWords,
25  int tailSizeWords,
26  const char* byteOrder,
27  bool iqSwapped,
28  bool usesV491) :
29  headerSizeWords(headerSizeWords),
30  payloadSizeWords(payloadSizeWords),
31  tailSizeWords(tailSizeWords),
32  byteOrder(byteOrder),
33  iqSwapped(iqSwapped),
34  usesV491(usesV491)
35  {
36  }
37 
38  VitaIfSpec::~VitaIfSpec()
39  {
40  }
41 
42  VitaIfSpec::VitaIfSpec(const VitaIfSpec& other) :
43  headerSizeWords(other.headerSizeWords),
44  payloadSizeWords(other.payloadSizeWords),
45  tailSizeWords(other.tailSizeWords),
46  byteOrder(other.byteOrder),
47  iqSwapped(other.iqSwapped),
48  usesV491(other.usesV491)
49  {
50  }
51 
52  VitaIfSpec& VitaIfSpec::operator=(const VitaIfSpec& other)
53  {
54  if ( this != &other )
55  {
56  headerSizeWords = other.headerSizeWords;
57  payloadSizeWords = other.payloadSizeWords;
58  tailSizeWords = other.tailSizeWords;
59  byteOrder = other.byteOrder;
60  iqSwapped = other.iqSwapped;
61  usesV491 = other.usesV491;
62  }
63  return *this;
64  }
65 
66  } /* namespace Driver */
67 
68 } /* namespace LibCyberRadio */
69 
bool iqSwapped
Whether the I/Q data in the payload are swapped.
Definition: VitaIfSpec.h:56
const char * byteOrder
Byte order used by the radio.
Definition: VitaIfSpec.h:54
Defines functionality for LibCyberRadio applications.
Definition: App.h:23
int payloadSizeWords
Size of the payload, in 32-byte words.
Definition: VitaIfSpec.h:50
int headerSizeWords
Size of the VITA 49 header, in 32-byte words.
Definition: VitaIfSpec.h:48
bool usesV491
Whether the data packets use VITA 49.1 framing.
Definition: VitaIfSpec.h:58
int tailSizeWords
Size of the VITA 49 "tail", in 32-byte words.
Definition: VitaIfSpec.h:52