6 #include "../../../include/librealsense2/h/rs_internal.h" 11 JNIEXPORT jlong JNICALL
13 jlong fw_logger_handle) {
21 bool result_bool = (result != 0);
22 jclass clazz = env->GetObjectClass(instance);
23 jfieldID resultField = env->GetFieldID(clazz,
"mFwLogPullingStatus",
"Z");
24 env->SetBooleanField(instance, resultField, result_bool);
26 return (jlong)log_msg;
30 JNIEXPORT jlong JNICALL
32 jlong fw_logger_handle) {
40 bool result_bool = (result != 0);
41 jclass clazz = env->GetObjectClass(instance);
42 jfieldID resultField = env->GetFieldID(clazz,
"mFwLogPullingStatus",
"Z");
43 env->SetBooleanField(instance, resultField, result_bool);
45 return (jlong)log_msg;
49 JNIEXPORT jlong JNICALL
51 jlong fw_logger_handle) {
53 unsigned int numOfFwLogsPolledFromDevice =
rs2_get_number_of_fw_logs(reinterpret_cast<rs2_device*>(fw_logger_handle), &e);
56 return (jlong)(
unsigned long long)numOfFwLogsPolledFromDevice;
60 JNIEXPORT jboolean JNICALL
62 jlong fw_logger_handle,
63 jstring xml_content) {
64 const char* xml_content_arr = env->GetStringUTFChars(xml_content, 0);
70 env->ReleaseStringUTFChars(xml_content, xml_content_arr);
72 bool resultBool = (result != 0);
73 return (jboolean)resultBool;
77 JNIEXPORT jlong JNICALL
79 jlong fw_logger_handle, jlong fw_log_msg_handle) {
85 reinterpret_cast<rs2_firmware_log_message*>(fw_log_msg_handle),
89 return (jlong)parsed_msg;
94 extern "C" JNIEXPORT
void JNICALL
99 extern "C" JNIEXPORT jint JNICALL
107 extern "C" JNIEXPORT jstring JNICALL
114 return env->NewStringUTF(severity_string);
117 extern "C" JNIEXPORT jlong JNICALL
122 return (jlong)(
unsigned long long)timestamp;
125 extern "C" JNIEXPORT jint JNICALL
133 extern "C" JNIEXPORT jbyteArray JNICALL
135 jlong
handle,jbyteArray input_buffer) {
136 jbyte *
buffer = env->GetByteArrayElements(input_buffer,
NULL);
142 const unsigned char* message_data =
rs2_fw_log_message_data(reinterpret_cast<rs2_firmware_log_message*>(handle), &e);
145 env->ReleaseByteArrayElements(input_buffer, buffer, 0);
146 jbyteArray rv = env->NewByteArray(size);
147 env->SetByteArrayRegion (rv, 0, size, reinterpret_cast<const jbyte *>(message_data));
154 extern "C" JNIEXPORT
void JNICALL
160 extern "C" JNIEXPORT jstring JNICALL
166 return env->NewStringUTF(message);
169 extern "C" JNIEXPORT jstring JNICALL
175 return env->NewStringUTF(file_name);
178 extern "C" JNIEXPORT jstring JNICALL
184 return env->NewStringUTF(thread_name);
187 extern "C" JNIEXPORT jstring JNICALL
194 return env->NewStringUTF(severity_string);
197 extern "C" JNIEXPORT jint JNICALL
205 extern "C" JNIEXPORT jlong JNICALL
210 return (jlong)(
unsigned long long)timestamp;
213 extern "C" JNIEXPORT jint JNICALL
218 return (jint)sequence;
GLenum GLuint GLenum GLsizei const GLchar * message
GLenum GLuint GLenum severity
JNIEXPORT jstring JNICALL Java_com_intel_realsense_librealsense_FwLogMsg_nGetSeverityStr(JNIEnv *env, jclass clazz, jlong handle)
JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_FwLogger_nGetNumberOfFwLogs(JNIEnv *env, jobject instance, jlong fw_logger_handle)
GLuint64 GLenum void * handle
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_FwLogParsedMsg_nGetLine(JNIEnv *env, jclass clazz, jlong handle)
const char * rs2_get_fw_log_parsed_thread_name(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message thread name.
int rs2_fw_log_message_size(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message size.
unsigned int rs2_get_fw_log_parsed_sequence_id(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message sequence id - cyclic number of FW log with [0...
unsigned int rs2_fw_log_message_timestamp(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message timestamp.
void handle_error(JNIEnv *env, rs2_error *error)
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_FwLogMsg_nRelease(JNIEnv *env, jclass clazz, jlong handle)
JNIEXPORT jstring JNICALL Java_com_intel_realsense_librealsense_FwLogParsedMsg_nGetSeverity(JNIEnv *env, jclass clazz, jlong handle)
void rs2_delete_fw_log_parsed_message(rs2_firmware_log_parsed_message *fw_log_parsed_msg)
Deletes RealSense firmware log parsed message.
unsigned int rs2_get_fw_log_parsed_line(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message relevant line (in the file that is returned by rs2_get_fw_...
JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_FwLogParsedMsg_nGetTimestamp(JNIEnv *env, jclass clazz, jlong handle)
int rs2_get_flash_log(rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error)
Gets RealSense flash log - this is a fw log that has been written in the device during the previous s...
JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_FwLogParsedMsg_nRelease(JNIEnv *env, jclass clazz, jlong handle)
JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_FwLogger_nGetFwLog(JNIEnv *env, jobject instance, jlong fw_logger_handle)
rs2_log_severity rs2_fw_log_message_severity(const rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message severity.
JNIEXPORT jstring JNICALL Java_com_intel_realsense_librealsense_FwLogParsedMsg_nGetFileName(JNIEnv *env, jclass clazz, jlong handle)
JNIEXPORT jstring JNICALL Java_com_intel_realsense_librealsense_FwLogParsedMsg_nGetThreadName(JNIEnv *env, jclass clazz, jlong handle)
const char * rs2_get_fw_log_parsed_message(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message.
unsigned int rs2_get_fw_log_parsed_timestamp(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message timestamp.
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_FwLogParsedMsg_nGetSequenceId(JNIEnv *env, jclass clazz, jlong handle)
JNIEXPORT jstring JNICALL Java_com_intel_realsense_librealsense_FwLogParsedMsg_nGetMessage(JNIEnv *env, jclass clazz, jlong handle)
JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_FwLogger_nParseFwLog(JNIEnv *env, jclass clazz, jlong fw_logger_handle, jlong fw_log_msg_handle)
int rs2_init_fw_log_parser(rs2_device *dev, const char *xml_content, rs2_error **error)
Initializes RealSense firmware logs parser in device.
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_FwLogMsg_nGetSeverity(JNIEnv *env, jclass clazz, jlong handle)
void rs2_delete_fw_log_message(rs2_firmware_log_message *msg)
JNIEXPORT jbyteArray JNICALL Java_com_intel_realsense_librealsense_FwLogMsg_nGetData(JNIEnv *env, jclass clazz, jlong handle, jbyteArray input_buffer)
JNIEXPORT jint JNICALL Java_com_intel_realsense_librealsense_FwLogMsg_nGetSize(JNIEnv *env, jclass clazz, jlong handle)
rs2_log_severity rs2_get_fw_log_parsed_severity(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message severity.
rs2_firmware_log_message * rs2_create_fw_log_message(rs2_device *dev, rs2_error **error)
Creates RealSense firmware log message.
JNIEXPORT jboolean JNICALL Java_com_intel_realsense_librealsense_FwLogger_nInitParser(JNIEnv *env, jclass clazz, jlong fw_logger_handle, jstring xml_content)
JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_FwLogger_nGetFlashLog(JNIEnv *env, jobject instance, jlong fw_logger_handle)
const char * rs2_log_severity_to_string(rs2_log_severity info)
const char * rs2_get_fw_log_parsed_file_name(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message file name.
JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_FwLogMsg_nGetTimestamp(JNIEnv *env, jclass clazz, jlong handle)
int rs2_parse_firmware_log(rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_firmware_log_parsed_message *parsed_msg, rs2_error **error)
Gets RealSense firmware log parser.
const unsigned char * rs2_fw_log_message_data(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message data.
rs2_firmware_log_parsed_message * rs2_create_fw_log_parsed_message(rs2_device *dev, rs2_error **error)
Creates RealSense firmware log parsed message.
rs2_log_severity
Severity of the librealsense logger.
unsigned int rs2_get_number_of_fw_logs(rs2_device *dev, rs2_error **error)
Returns number of fw logs already polled from device but not by user yet.
int rs2_get_fw_log(rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error)
Gets RealSense firmware log.