Skip to content

Instantly share code, notes, and snippets.

@moriarty
Created January 29, 2016 01:12
Show Gist options
  • Select an option

  • Save moriarty/61732b693120e0ba94e1 to your computer and use it in GitHub Desktop.

Select an option

Save moriarty/61732b693120e0ba94e1 to your computer and use it in GitHub Desktop.
UnderDev RoboCup RefBox Diff
diff --git a/src/libs/protobuf_clips/communicator.h b/src/libs/protobuf_clips/communicator.h
index 8bca07f..d2d769d 100644
--- a/src/libs/protobuf_clips/communicator.h
+++ b/src/libs/protobuf_clips/communicator.h
@@ -63,7 +63,7 @@ class ClipsProtobufCommunicator
ClipsProtobufCommunicator(CLIPS::Environment *env, fawkes::Mutex &env_mutex);
ClipsProtobufCommunicator(CLIPS::Environment *env, fawkes::Mutex &env_mutex,
std::vector<std::string> &proto_path);
- ~ClipsProtobufCommunicator();
+ virtual ~ClipsProtobufCommunicator();
void enable_server(int port);
void disable_server();
diff --git a/src/libs/protobuf_comm/mqtt/mqtt_publisher.cpp b/src/libs/protobuf_comm/mqtt/mqtt_publisher.cpp
index 10a878c..4757aff 100644
--- a/src/libs/protobuf_comm/mqtt/mqtt_publisher.cpp
+++ b/src/libs/protobuf_comm/mqtt/mqtt_publisher.cpp
@@ -19,6 +19,8 @@ MqttPublisher::MqttPublisher(string host, int port, bool cleanSession)
}
+MqttPublisher::~MqttPublisher() {};
+
void MqttPublisher::publish(string topic, std::shared_ptr <google::protobuf::Message> &m)
{
this->publish(topic,*m);
diff --git a/src/libs/protobuf_comm/mqtt/mqtt_publisher.h b/src/libs/protobuf_comm/mqtt/mqtt_publisher.h
index 922fba5..a2df828 100644
--- a/src/libs/protobuf_comm/mqtt/mqtt_publisher.h
+++ b/src/libs/protobuf_comm/mqtt/mqtt_publisher.h
@@ -15,6 +15,7 @@ class MqttPublisher: public MqttClient
public:
/* Constructor for Publisher */
MqttPublisher(std::string host, int port, bool cleanSession = true);
+ virtual ~MqttPublisher();
/** Boost signal for on publish */
typedef
diff --git a/src/libs/protobuf_comm/mqtt/mqtt_subscriber.cpp b/src/libs/protobuf_comm/mqtt/mqtt_subscriber.cpp
index 4060d98..c2960ab 100644
--- a/src/libs/protobuf_comm/mqtt/mqtt_subscriber.cpp
+++ b/src/libs/protobuf_comm/mqtt/mqtt_subscriber.cpp
@@ -20,6 +20,8 @@ MqttSubscriber::MqttSubscriber(std::string host, int port, bool cleanSession) :
own_message_register_ = true;
}
+MqttSubscriber::~MqttSubscriber() {};
+
void MqttSubscriber::subscribe(string team, string msg_type, int qos){
int mid;
diff --git a/src/libs/protobuf_comm/mqtt/mqtt_subscriber.h b/src/libs/protobuf_comm/mqtt/mqtt_subscriber.h
index c146a23..9bf4ad7 100644
--- a/src/libs/protobuf_comm/mqtt/mqtt_subscriber.h
+++ b/src/libs/protobuf_comm/mqtt/mqtt_subscriber.h
@@ -17,6 +17,7 @@ class MqttSubscriber : public MqttClient
public:
/** Constructor for Subscriber */
MqttSubscriber(std::string host, int port, bool cleanSession = true);
+ virtual ~MqttSubscriber();
void subscribe(std::string team, std::string msg_type, int qos = 1);
diff --git a/src/refbox/Makefile b/src/refbox/Makefile
index f1a6e63..a3deae5 100644
--- a/src/refbox/Makefile
+++ b/src/refbox/Makefile
@@ -31,13 +31,13 @@ LIBS_llsf_refbox = stdc++ m llsfrbaspects llsfrbbaseapp llsfrbcore llsfrbconfig
llsf_protobuf_clips
OBJS_llsf_refbox = main.o refbox.o clips_logger.o
-ifeq ($(HAVE_PROTOBUF)$(HAVE_LIBMODBUS)$(HAVE_CLIPS)$(HAVE_BOOST_LIBS),1111)
+ifeq ($(HAVE_PROTOBUF)$(HAVE_CLIPS)$(HAVE_BOOST_LIBS),111)
OBJS_all = $(OBJS_llsf_refbox)
BINS_all = $(BINDIR)/llsf-refbox
- CFLAGS += $(CFLAGS_PROTOBUF) $(CFLAGS_LIBMODBUS) $(CFLAGS_CLIPS) $(CFLAGS_MONGODB) \
+ CFLAGS += $(CFLAGS_PROTOBUF) $(CFLAGS_CLIPS) $(CFLAGS_MONGODB) \
$(call boost-libs-cflags,$(REQ_BOOST_LIBS))
- LDFLAGS += $(LDFLAGS_PROTOBUF) $(LDFLAGS_LIBMODBUS) $(LDFLAGS_CLIPS) \
+ LDFLAGS += $(LDFLAGS_PROTOBUF) $(LDFLAGS_CLIPS) \
$(call boost-libs-ldflags,$(REQ_BOOST_LIBS))
#MANPAGES_all = $(MANDIR)/man1/llsf-refbox.1
@@ -53,9 +53,6 @@ else
ifneq ($(HAVE_PROTOBUF),1)
WARN_TARGETS += warning_protobuf
endif
- ifneq ($(HAVE_LIBMODBUS),1)
- WARN_TARGETS += warning_libmodbus
- endif
ifneq ($(HAVE_CLIPS),1)
WARN_TARGETS += warning_clips
endif
@@ -71,8 +68,6 @@ endif
ifeq ($(OBJSSUBMAKE),1)
all: $(WARN_TARGETS) $(WARN_TARGETS_BOOST)
.PHONY: warning_libmodbus warning_clips
-warning_libmodbus:
- $(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Cannot build LLSF RefBox$(TNORMAL) (libmodbus not found)"
warning_clips:
$(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Cannot build LLSF RefBox$(TNORMAL) (clipsmm not found)"
warning_mongodb:
diff --git a/src/refbox/refbox.h b/src/refbox/refbox.h
index d805ba3..7202efa 100644
--- a/src/refbox/refbox.h
+++ b/src/refbox/refbox.h
@@ -42,7 +42,7 @@
#include <logging/logger.h>
#include <core/threading/mutex.h>
#include <core/threading/mutex_locker.h>
-#include <protobuf_comm/server.h>
+//#include <protobuf_comm/server.h>
#include <clipsmm.h>
#ifdef HAVE_MONGODB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment