FwLogger.java
Go to the documentation of this file.
1 package com.intel.realsense.librealsense;
2 
3 import java.io.File;
4 import java.util.Scanner;
5 
6 
7 
8 public class FwLogger extends Device {
9 
10  private boolean mIsParserAvailable = false;
11  private boolean mFwLogPullingStatus = false;
12 
13  FwLogger(long handle){
14  super(handle);
15  mOwner = false;
16  }
17 
18  public boolean initParser(String xml_path) {
19  // checking the input file path for parsing logs
20  if (!xml_path.contentEquals("") ) {
21  try{
22  try (Scanner scanner = new Scanner( new File(xml_path), "UTF-8" )) {
23  String xml_content_raw = scanner.useDelimiter("\\A").next();
24  String xml_content = xml_content_raw.replaceAll("\r\n", "\n" );
25  if (nInitParser(mHandle, xml_content)) {
26  mIsParserAvailable = true;
27  }
28  }
29  }
30  catch(Exception e){
31  throw new RuntimeException("path to fw logs xml did not succeed: " + e.getMessage());
32  }
33  }
34  return mIsParserAvailable;
35  }
36 
37  public FwLogMsg getFwLog(){
38  mFwLogPullingStatus = false;
39  return new FwLogMsg(nGetFwLog(mHandle));
40  }
41 
43  mFwLogPullingStatus = false;
44  return new FwLogMsg(nGetFlashLog(mHandle));
45  }
46 
47  public long getNumberOfUnreadFWLogs() {
48  return nGetNumberOfFwLogs(mHandle);
49  }
50 
51  public boolean getFwLogPullingStatus() { return mFwLogPullingStatus; }
52 
54  return new FwLogParsedMsg(nParseFwLog(mHandle, msg.getHandle()));
55  }
56 
57 
58  private native long nGetFwLog(long handle);
59  private native long nGetFlashLog(long handle);
60  private native long nGetNumberOfFwLogs(long handle);
61  private static native boolean nInitParser(long handle, String xml_content);
62  private static native long nParseFwLog(long handle, long fw_log_msg_handle);
63 }
uvc_xu_option< int > super
Definition: l500-options.h:32
native long nGetFwLog(long handle)
FwLogParsedMsg parseFwLog(FwLogMsg msg)
Definition: FwLogger.java:53
GLuint64 GLenum void * handle
Definition: glext.h:7785
e
Definition: rmse.py:177
::std_msgs::String_< std::allocator< void > > String
Definition: String.h:47
boolean initParser(String xml_path)
Definition: FwLogger.java:18
static native long nParseFwLog(long handle, long fw_log_msg_handle)
static native boolean nInitParser(long handle, String xml_content)
native long nGetFlashLog(long handle)
native long nGetNumberOfFwLogs(long handle)


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:15