2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * Created on: Oct 22, 2013
23 #ifndef LOGGER_SERVICE_SERVER_INCLUDE_READERWRITER_READER_MEM_READER_H_
24 #define LOGGER_SERVICE_SERVER_INCLUDE_READERWRITER_READER_MEM_READER_H_
26 #include <native_service/ns_sharedmem.h>
27 #include <native_service/ns_sharedmem_reader.h>
31 namespace ReaderWriter {
32 class CMemReader : public ReaderWriter::CReader {
35 virtual ~CMemReader();
36 EFrameworkunifiedStatus Initialize(CLoggerCfg* f_pLoggerCfg, std::string f_name,
38 EFrameworkunifiedStatus Read(UI_8* f_data, UI_32 f_length, SI_32& f_bytesRead); // NOLINT (runtime/references)
39 EFrameworkunifiedStatus ReadToFile(std::string f_fileName, UI_32& f_Written); // NOLINT (runtime/references)
40 EFrameworkunifiedStatus Open(void);
43 EFrameworkunifiedStatus ResetPosition(void);
46 CNSSharedMemReader* m_pSharedBuf;
47 UI_32 m_sharedBufSize;
49 } // namespace ReaderWriter
51 #endif // LOGGER_SERVICE_SERVER_INCLUDE_READERWRITER_READER_MEM_READER_H_