rusefi-1/unit_tests/native/native_impl.cpp

32 lines
884 B
C++
Raw Normal View History

2022-02-26 09:51:50 -08:00
/*
* native_impl.cpp
*
* @date Feb 26, 2022
* @author Andrey Belomutskiy, (c) 2012-2022
*/
2022-02-26 14:48:07 -08:00
#include "pch.h"
#include "com_rusefi_native__EngineLogic.h"
2022-02-26 09:51:50 -08:00
2022-02-28 09:29:02 -08:00
//static EngineTestHelper eth(TEST_ENGINE);
2022-02-26 14:48:07 -08:00
JNIEXPORT jstring JNICALL Java_com_rusefi_native_1_EngineLogic_getVersion(JNIEnv * env, jobject) {
const char msg[60] = "Hello from unit tests";
const char* fileName = msg;
jstring result = env->NewStringUTF(msg);
2022-02-28 09:29:02 -08:00
printf("[native] hello\n");
2022-02-26 14:48:07 -08:00
return result;
}
2022-02-26 09:51:50 -08:00
2022-02-28 09:29:02 -08:00
JNIEXPORT jbyteArray JNICALL Java_com_rusefi_native_1_EngineLogic_getConfiguration(JNIEnv *env, jobject) {
return nullptr;
}
JNIEXPORT void JNICALL Java_com_rusefi_native_1_EngineLogic_setConfiguration(JNIEnv *env, jobject instance,
jbyteArray data, jint offset, jint size) {
printf("[native] setConfiguration %d %d\n", offset, size);
// printf("[native] engine %d %d\n", engineConfiguration->engineType);
}