1 /* Java Wrappers to the MSG API. */
3 /* Copyright (c) 2007-2017. 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 JavaVM* get_java_VM();
29 JNIEnv* get_current_thread_env();
31 * This function throws the correct exception according to the status provided.
33 void jmsg_throw_status(JNIEnv* env, msg_error_t status);
35 JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv* env, jclass cls);
36 JNIEXPORT void JNICALL JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv* env, jclass cls);
38 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv* env, jclass cls, jobjectArray jargs);
39 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit();
40 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_fileSystemInit();
42 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_debug(JNIEnv* env, jclass cls, jstring jargs);
43 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_verb(JNIEnv* env, jclass cls, jstring jargs);
44 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_info(JNIEnv* env, jclass cls, jstring jargs);
45 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_warn(JNIEnv* env, jclass cls, jstring jargs);
46 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_error(JNIEnv* env, jclass cls, jstring jargs);
47 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_critical(JNIEnv* env, jclass cls, jstring jargs);
49 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_createEnvironment(JNIEnv* env, jclass cls, jstring jplatformFile);
50 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Msg_environmentGetRoutingRoot(JNIEnv* env, jclass cls);
51 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_deployApplication(JNIEnv* env, jclass cls, jstring jdeploymentFile);