1 /* Java Wrappers to the MSG API. */
3 /* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */
5 /* This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package. */
11 #include <simgrid/msg.h>
12 #include <unordered_map>
16 /* Shut up some errors in eclipse online compiler. I wish such a pimple wouldn't be needed */
23 /* end of eclipse-mandated pimple */
25 extern int JAVA_HOST_LEVEL;
26 static std::unordered_map<msg_storage_t, jobject> java_storage_map;
28 JNIEnv* get_current_thread_env();
30 * This function throws the correct exception according to the status provided.
32 void jmsg_throw_status(JNIEnv* env, msg_error_t status);
34 JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv* env, jclass cls);
35 JNIEXPORT void JNICALL JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv* env, jclass cls);
37 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv* env, jclass cls, jobjectArray jargs);
38 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit();
39 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_liveMigrationInit();
40 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_fileSystemInit();
41 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_loadInit();
43 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_debug(JNIEnv* env, jclass cls, jstring jargs);
44 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_verb(JNIEnv* env, jclass cls, jstring jargs);
45 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_info(JNIEnv* env, jclass cls, jstring jargs);
46 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_warn(JNIEnv* env, jclass cls, jstring jargs);
47 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_error(JNIEnv* env, jclass cls, jstring jargs);
48 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_critical(JNIEnv* env, jclass cls, jstring jargs);
50 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_createEnvironment(JNIEnv* env, jclass cls, jstring jplatformFile);
51 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Msg_environmentGetRoutingRoot(JNIEnv* env, jclass cls);
52 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_deployApplication(JNIEnv* env, jclass cls, jstring jdeploymentFile);