mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
add --enable-mongoose, disable by default #943
This commit is contained in:
parent
a9f36b6dcc
commit
117bf3ebfb
@ -312,7 +312,7 @@ these agreements$(tput sgr0))
|
|||||||
),
|
),
|
||||||
[TRICK_MONGOOSE="0"]
|
[TRICK_MONGOOSE="0"]
|
||||||
)
|
)
|
||||||
AC_SUBST([TRICK_OFFLINE])
|
AC_SUBST([TRICK_MONGOOSE])
|
||||||
|
|
||||||
# If offline is specified, set some compilation flags
|
# If offline is specified, set some compilation flags
|
||||||
AC_ARG_ENABLE([offline],
|
AC_ARG_ENABLE([offline],
|
||||||
|
1
configure
vendored
1
configure
vendored
@ -674,6 +674,7 @@ ac_ct_CC
|
|||||||
CFLAGS
|
CFLAGS
|
||||||
CC
|
CC
|
||||||
AWK
|
AWK
|
||||||
|
TRICK_MONGOOSE
|
||||||
TRICK_OFFLINE
|
TRICK_OFFLINE
|
||||||
TRICK_FORCE_32BIT
|
TRICK_FORCE_32BIT
|
||||||
LIBXML
|
LIBXML
|
||||||
|
@ -4,6 +4,8 @@ PURPOSE: (Represent the state and initial conditions of an http server.)
|
|||||||
#ifndef WEB_SERVER_H
|
#ifndef WEB_SERVER_H
|
||||||
#define WEB_SERVER_H
|
#define WEB_SERVER_H
|
||||||
|
|
||||||
|
#if !defined(SWIG) || defined(USE_MONGOOSE)
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
@ -62,4 +64,6 @@ class WebServer {
|
|||||||
void handleHTTPGETrequest(struct mg_connection *nc, http_message *hm, std::string handlerName);
|
void handleHTTPGETrequest(struct mg_connection *nc, http_message *hm, std::string handlerName);
|
||||||
void marshallWebSocketSessionData();
|
void marshallWebSocketSessionData();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,6 +4,7 @@ PURPOSE: (Represent Websocket connection.)
|
|||||||
#ifndef WEB_SOCKET_SESSION_HH
|
#ifndef WEB_SOCKET_SESSION_HH
|
||||||
#define WEB_SOCKET_SESSION_HH
|
#define WEB_SOCKET_SESSION_HH
|
||||||
|
|
||||||
|
#if !defined(SWIG) || defined(USE_MONGOOSE)
|
||||||
#include <string>
|
#include <string>
|
||||||
#ifndef SWIG
|
#ifndef SWIG
|
||||||
#include "mongoose/mongoose.h"
|
#include "mongoose/mongoose.h"
|
||||||
@ -25,4 +26,6 @@ class WebSocketSession {
|
|||||||
|
|
||||||
struct mg_connection* connection;
|
struct mg_connection* connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -65,7 +65,7 @@ export TRICK_PYTHON_PATH := $(TRICK_PYTHON_PATH)
|
|||||||
export TRICK_GTE_EXT := $(TRICK_GTE_EXT)
|
export TRICK_GTE_EXT := $(TRICK_GTE_EXT)
|
||||||
export TRICK_HOST_CPU := $(shell TRICK_FORCE_32BIT=$(TRICK_FORCE_32BIT) $(TRICK_HOME)/bin/trick-gte TRICK_HOST_CPU)
|
export TRICK_HOST_CPU := $(shell TRICK_FORCE_32BIT=$(TRICK_FORCE_32BIT) $(TRICK_HOME)/bin/trick-gte TRICK_HOST_CPU)
|
||||||
export TRICK_EXEC_LINK_LIBS := ${PTHREAD_LIBS} $(PYTHON_LIB) $(UDUNITS_LDFLAGS) $(PLATFORM_LIBS) -lm -ldl
|
export TRICK_EXEC_LINK_LIBS := ${PTHREAD_LIBS} $(PYTHON_LIB) $(UDUNITS_LDFLAGS) $(PLATFORM_LIBS) -lm -ldl
|
||||||
export TRICK_LIBS := ${RPATH} -L${TRICK_LIB_DIR} -ltrick -ltrick_pyip -ltrick_comm -ltrick_math -ltrick_units -ltrick_mm -ltrickHTTP ${TRICK_LIB_DIR}/libmongoose.a
|
export TRICK_LIBS := ${RPATH} -L${TRICK_LIB_DIR} -ltrick -ltrick_pyip -ltrick_comm -ltrick_math -ltrick_units -ltrick_mm
|
||||||
export TRICK_SYSTEM_LDFLAGS := $(TRICK_SYSTEM_LDFLAGS)
|
export TRICK_SYSTEM_LDFLAGS := $(TRICK_SYSTEM_LDFLAGS)
|
||||||
export TRICK_SWIG_FLAGS := $(TRICK_SWIG_FLAGS)
|
export TRICK_SWIG_FLAGS := $(TRICK_SWIG_FLAGS)
|
||||||
export TRICK_SWIG_CFLAGS := $(TRICK_SWIG_CFLAGS)
|
export TRICK_SWIG_CFLAGS := $(TRICK_SWIG_CFLAGS)
|
||||||
@ -171,6 +171,11 @@ ifneq ($(GSL_HOME),)
|
|||||||
TRICK_SYSTEM_CXXFLAGS += -D_HAVE_GSL
|
TRICK_SYSTEM_CXXFLAGS += -D_HAVE_GSL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (${TRICK_MONGOOSE},1)
|
||||||
|
TRICK_LIBS += -ltrickHTTP ${TRICK_LIB_DIR}/libmongoose.a
|
||||||
|
TRICK_SWIG_FLAGS += -DUSE_MONGOOSE
|
||||||
|
endif
|
||||||
|
|
||||||
# We pipe the output of compiler through tee. If the user wanted gcc color, make sure they get it.
|
# We pipe the output of compiler through tee. If the user wanted gcc color, make sure they get it.
|
||||||
ifdef GCC_COLORS
|
ifdef GCC_COLORS
|
||||||
TRICK_SYSTEM_CXXFLAGS += -fdiagnostics-color=always
|
TRICK_SYSTEM_CXXFLAGS += -fdiagnostics-color=always
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
|
|
||||||
exec(open("Modified_data/realtime.py").read())
|
exec(open("Modified_data/realtime.py").read())
|
||||||
exec(open("Modified_data/cannon.dr").read())
|
exec(open("Modified_data/cannon.dr").read())
|
||||||
|
@ -9,7 +9,7 @@ LIBRARY DEPENDENCIES:
|
|||||||
*************************************************************/
|
*************************************************************/
|
||||||
|
|
||||||
#include "sim_objects/default_trick_sys.sm"
|
#include "sim_objects/default_trick_sys.sm"
|
||||||
#include "sim_objects/WebServer.sm"
|
// #include "sim_objects/WebServer.sm"
|
||||||
##include "cannon/gravity/include/cannon_numeric.h"
|
##include "cannon/gravity/include/cannon_numeric.h"
|
||||||
|
|
||||||
class CannonSimObject : public Trick::SimObject {
|
class CannonSimObject : public Trick::SimObject {
|
||||||
|
@ -7,9 +7,7 @@ exec(open("Modified_data/realtime.py").read())
|
|||||||
#==========================================
|
#==========================================
|
||||||
varServerPort = trick.var_server_get_port();
|
varServerPort = trick.var_server_get_port();
|
||||||
trick.set_var_server_info_msg_on()
|
trick.set_var_server_info_msg_on()
|
||||||
web.server.enable=True
|
|
||||||
|
|
||||||
print(varServerPort)
|
|
||||||
MsdGui_path = "models/graphics/dist/MsdGui.jar"
|
MsdGui_path = "models/graphics/dist/MsdGui.jar"
|
||||||
|
|
||||||
if (os.path.isfile(MsdGui_path)) :
|
if (os.path.isfile(MsdGui_path)) :
|
||||||
|
@ -13,7 +13,7 @@ LIBRARY DEPENDENCIES:
|
|||||||
*************************************************************/
|
*************************************************************/
|
||||||
|
|
||||||
#include "sim_objects/default_trick_sys.sm"
|
#include "sim_objects/default_trick_sys.sm"
|
||||||
#include "sim_objects/WebServer.sm"
|
// #include "sim_objects/WebServer.sm"
|
||||||
##include "msd/include/msd.hh"
|
##include "msd/include/msd.hh"
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,6 +52,13 @@ ifeq ($(USE_ER7_UTILS_CHECKPOINTHELPER), 1)
|
|||||||
SWIG_DEFS += -DUSE_ER7_UTILS_CHECKPOINTHELPER
|
SWIG_DEFS += -DUSE_ER7_UTILS_CHECKPOINTHELPER
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(TRICK_MONGOOSE), 1)
|
||||||
|
SWIG_DEFS += -DUSE_MONGOOSE
|
||||||
|
endif
|
||||||
|
|
||||||
|
foo:
|
||||||
|
echo ${SWIG_DEFS}
|
||||||
|
|
||||||
default: $(SWIG_OBJECT_FILES) $(TRICK_LIB) $(TEST_DIR)
|
default: $(SWIG_OBJECT_FILES) $(TRICK_LIB) $(TEST_DIR)
|
||||||
|
|
||||||
trick: $(SWIG_OBJECT_FILES) $(OBJECT_FILES) $(TEST_DIR)
|
trick: $(SWIG_OBJECT_FILES) $(OBJECT_FILES) $(TEST_DIR)
|
||||||
|
Loading…
Reference in New Issue
Block a user