AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
ntv2supportlogger.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #ifndef NTV2SUPPORTLOGGER_H
9 #define NTV2SUPPORTLOGGER_H
10 
11 #include "ntv2card.h"
12 #include <map>
13 #include <string>
14 #include "ntv2utils.h"
15 
16 typedef enum
17 {
18  NTV2_SupportLoggerSectionInfo = 0x00000001 << 0,
20  NTV2_SupportLoggerSectionAudio = 0x00000001 << 2,
25 
31 {
32 public:
40 
47  CNTV2SupportLogger (UWord cardIndex = 0,
49 
50  virtual ~CNTV2SupportLogger ();
51 
52  static int Version (void);
53 
59  virtual void PrependToSection (uint32_t section, const std::string & sectionData);
60 
66  virtual void AppendToSection (uint32_t section, const std::string & sectionData);
67 
73  virtual void AddHeader (const std::string & sectionName, const std::string & sectionData);
74 
80  virtual void AddFooter (const std::string & sectionName, const std::string & sectionData);
81 
82  virtual std::string ToString (void) const;
83 
88  virtual void ToString (std::string & outString) const;
89 
90  virtual bool LoadFromLog (const std::string & inLogFilePath, const bool bForceLoad);
91 
92 
93 private:
94  void FetchInfoLog (std::ostringstream& oss) const;
95  void FetchRegisterLog (std::ostringstream& oss) const;
96  void FetchAutoCirculateLog (std::ostringstream& oss) const;
97  void FetchAudioLog (std::ostringstream& oss) const;
98  void FetchRoutingLog (std::ostringstream& oss) const;
99 
100 private:
101  CNTV2Card & mDevice;
102  bool mDispose;
103  NTV2SupportLoggerSections mSections;
104  std::string mHeaderStr;
105  std::string mFooterStr;
106  std::map<uint32_t, std::string> mPrependMap;
107  std::map<uint32_t, std::string> mAppendMap;
108 
109 public:
110  static std::string InventLogFilePathAndName (CNTV2Card & inDevice,
111  std::string inPrefix = "aja_supportlog",
112  std::string inExtension = "log"); // New in SDK 16.0
113  static bool DumpDeviceSDRAM (CNTV2Card & inDevice,
114  const std::string & inFilePath,
115  std::ostream & msgStream); // New in SDK 16.0
116 }; // CNTV2SupportLogger
117 
118 
125 AJAExport std::ostream & operator << (std::ostream & outStream, const CNTV2SupportLogger & inData);
126 
127 #endif // NTV2SUPPORTLOGGER_H
NTV2_SupportLoggerSectionRouting
@ NTV2_SupportLoggerSectionRouting
Definition: ntv2supportlogger.h:21
operator<<
std::ostream & operator<<(std::ostream &outStream, const CNTV2SupportLogger &inData)
Writes a given CNTV2SupportLogger's text into the given output stream.
CNTV2SupportLogger
Generates a standard support log (register log) for any NTV2 device attached to the host....
Definition: ntv2supportlogger.h:30
NTV2_SupportLoggerSectionRegisters
@ NTV2_SupportLoggerSectionRegisters
Definition: ntv2supportlogger.h:22
ntv2card.h
Declares the CNTV2Card class.
UWord
uint16_t UWord
Definition: ajatypes.h:244
ntv2utils.h
Declares numerous NTV2 utility functions.
CNTV2Card
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:262
NTV2_SupportLoggerSectionAutoCirculate
@ NTV2_SupportLoggerSectionAutoCirculate
Definition: ntv2supportlogger.h:19
AJAExport
#define AJAExport
Definition: export.h:33
NTV2_SupportLoggerSectionInfo
@ NTV2_SupportLoggerSectionInfo
Definition: ntv2supportlogger.h:18
NTV2_SupportLoggerSectionAudio
@ NTV2_SupportLoggerSectionAudio
Definition: ntv2supportlogger.h:20
NTV2_SupportLoggerSectionsAll
@ NTV2_SupportLoggerSectionsAll
Definition: ntv2supportlogger.h:23
NTV2SupportLoggerSections
NTV2SupportLoggerSections
Definition: ntv2supportlogger.h:16