DeviceLogJSON.h
Go to the documentation of this file.
1 /*
2 MIT LICENSE
3 
4 Copyright (c) 2014-2021 Inertial Sense, Inc. - http://inertialsense.com
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
7 
8 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 
10 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 */
12 
13 #ifndef DEVICE_LOG_JSON_H
14 #define DEVICE_LOG_JSON_H
15 
16 #include <stdio.h>
17 #include <string>
18 #include <vector>
19 #include <map>
20 
21 #include "DataJSON.h"
22 #include "DeviceLog.h"
23 #include "com_manager.h"
24 
25 class cDeviceLogJSON : public cDeviceLog
26 {
27 public:
28  bool CloseAllFiles() OVERRIDE;
29  bool SaveData(p_data_hdr_t* dataHdr, const uint8_t* dataBuf) OVERRIDE;
31  void SetSerialNumber(uint32_t serialNumber) OVERRIDE;
32  std::string LogFileExtention() OVERRIDE { return std::string(".json"); }
33 
34 private:
35  bool GetNextItemForFile();
36 
38  string m_jsonString;
41 };
42 
43 #endif // DEVICE_LOG_CSV_H
p_data_t m_dataBuffer
Definition: DeviceLogJSON.h:40
#define OVERRIDE
Definition: ISConstants.h:423
bool CloseAllFiles() OVERRIDE
cDataJSON m_json
Definition: DeviceLogJSON.h:39
bool SaveData(p_data_hdr_t *dataHdr, const uint8_t *dataBuf) OVERRIDE
p_data_t * ReadData() OVERRIDE
bool GetNextItemForFile()
string m_jsonString
Definition: DeviceLogJSON.h:38
p_data_t * ReadDataFromFile()
std::string LogFileExtention() OVERRIDE
Definition: DeviceLogJSON.h:32
void SetSerialNumber(uint32_t serialNumber) OVERRIDE


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:57