pax_global_header 0000666 0000000 0000000 00000000064 14145762041 0014516 g ustar 00root root 0000000 0000000 52 comment=b0fd14cceeb66be29304fe866d09842cd1eca8f0
data_exporter-master/ 0000775 0000000 0000000 00000000000 14145762041 0015214 5 ustar 00root root 0000000 0000000 data_exporter-master/Makefile 0000664 0000000 0000000 00000007014 14145762041 0016656 0 ustar 00root root 0000000 0000000 #================================================================================
EXEC_NAME=dataExporter-srv
INST_NAME=test
DEBUG_LEV=-v3
INSTALL_DIR=/usr/local/bin
VERSION := `git describe --tags`
TAR_NAME := `basename $(PWD)`
#================================================================================
INC_DIR=/usr/local/omniORB/include \
/usr/local/zeromq/include \
/usr/local/tango/include/tango \
/usr/local/boost/include \
/usr/local/soci/include \
/usr/local/soci/include/soci \
/usr/include/mysql \
/usr/include/soci \
/usr/local/protobuf/include \
./src
LIB_DIR=/usr/local/omniORB/lib \
/usr/local/zeromq/lib \
/usr/local/tango/lib \
/usr/local/boost/lib \
/usr/local/soci/lib64 \
/usr/local/protobuf/lib \
/usr/lib64/mysql
#================================================================================
CC=g++
CXX_DEBUG_FLAGS=-g -DVERBOSE_DEBUG
CXX_RELEASE_FLAGS=-O3
CXX_DEFAULT_FLAGS=-c -Wall -Wextra -std=c++0x -Wno-unused-local-typedefs -DHAVE_BOOST
LDFLAGS=-Wall -lomniORB4 -lomniDynamic4 -lCOS4 -lomnithread -ltango -llog4tango \
-lsoci_core -lsoci_mysql -lmysqlclient -lboost_system -lboost_thread \
-lboost_filesystem -lboost_date_time -lprotobuf -lssl -lcrypto -lpthread
INC_PARM=$(foreach d, $(INC_DIR), -I$d)
LIB_PARM=$(foreach d, $(LIB_DIR), -L$d)
PROTOC :=/usr/local/protobuf/bin/protoc
#================================================================================
SRC_DIR=./src
OBJ_DIR=./obj
BIN_DIR=./bin
PROTO_DIR=./proto
#================================================================================
EXECUTABLE := $(BIN_DIR)/$(EXEC_NAME)
CPP_FILES := $(wildcard $(SRC_DIR)/*.cpp)
OBJ_FILES := $(addprefix $(OBJ_DIR)/,$(notdir $(CPP_FILES:.cpp=.o)))
#================================================================================
PROTO_FILES := $(wildcard $(PROTO_DIR)/*.proto)
PROTO_HEADERS := $(addprefix $(SRC_DIR)/,$(notdir $(PROTO_FILES:.proto=.pb.h)))
PROTO_CLASSES := $(addprefix $(SRC_DIR)/,$(notdir $(PROTO_FILES:.proto=.pb.cc)))
CPP_FILES += $(PROTO_CLASSES)
OBJ_FILES += $(addprefix $(OBJ_DIR)/,$(notdir $(PROTO_CLASSES:.pb.cc=.pb.o)))
#================================================================================
.PHONY: all
all: debug
.PHONY: run
run: debug
$(EXECUTABLE) $(INST_NAME) $(DEBUG_LEV)
.PHONY: release
release: CXXFLAGS+=$(CXX_RELEASE_FLAGS) $(CXX_DEFAULT_FLAGS)
release: $(EXECUTABLE)
.PHONY: debug
debug: CXXFLAGS+=$(CXX_DEBUG_FLAGS) $(CXX_DEFAULT_FLAGS)
debug: $(EXECUTABLE)
$(EXECUTABLE): makedir $(OBJ_FILES)
$(CC) $(LDFLAGS) $(LIB_PARM) -o $@ $(OBJ_FILES)
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
$(CC) $(CXXFLAGS) $(INC_PARM) -o $@ $<
$(OBJ_DIR)/%.pb.o: $(SRC_DIR)/%.pb.cc
$(CC) $(CXXFLAGS) $(INC_PARM) -o $@ $<
.PHONY: protoc
protoc:
$(PROTOC) --proto_path=$(PROTO_DIR) --cpp_out=$(SRC_DIR) $(PROTO_FILES)
.PHONY: makedir
makedir:
-mkdir -p $(OBJ_DIR) $(BIN_DIR)
.PHONY: clean
clean:
-rm -rf $(OBJ_DIR) $(BIN_DIR)
.PHONY: deepclean
deepclean:
-rm -rf $(OBJ_DIR) $(BIN_DIR) $(PROTO_HEADERS) $(PROTO_CLASSES)
.PHONY: install
install:
-cp $(EXECUTABLE) $(INSTALL_DIR)
.PHONY: tar
tar:
-tar -czvf $(TAR_NAME)_$(VERSION).tar.gz --transform="s|^.|$(TAR_NAME)_$(VERSION)/|" $(PROTO_DIR) $(SRC_DIR) ./Makefile
.PHONY: echo
echo:
@echo EXECUTABLE:
@echo $(EXECUTABLE)
@echo CPP FILES:
@echo $(CPP_FILES)
@echo OBJ_FILES:
@echo $(OBJ_FILES)
@echo INC_PARM
@echo $(INC_PARM)
@echo LIB_PARM
@echo $(LIB_PARM)
@echo PROTO_FILES
@echo $(PROTO_FILES)
@echo PROTO_CLASSES
@echo $(PROTO_CLASSES)
@echo PROTO_HEADERS
@echo $(PROTO_HEADERS)
data_exporter-master/proto/ 0000775 0000000 0000000 00000000000 14145762041 0016357 5 ustar 00root root 0000000 0000000 data_exporter-master/proto/Request.proto 0000664 0000000 0000000 00000000351 14145762041 0021073 0 ustar 00root root 0000000 0000000 package DataExporter_ns;
message Request
{
required string username = 1;
required string password = 2;
required string schema = 3;
required string table = 4;
required int32 file_version = 5;
required string file_name = 6;
}
data_exporter-master/proto/Response.proto 0000664 0000000 0000000 00000000643 14145762041 0021245 0 ustar 00root root 0000000 0000000 package DataExporter_ns;
message Response
{
enum State
{
REQUEST_ACCEPTED = 0;
ACCESS_DENY = 1;
TABLE_NOT_EXPORTED = 2;
METADATA_NOT_FOUND = 3;
FILE_NOT_DOWNLOADED = 4;
FILE_NOT_FOUND = 5;
GENERIC_ERROR = 6;
}
required State state = 1;
required string status = 2;
optional string file_path = 3;
optional int32 file_version = 4;
optional string file_name = 5;
optional uint64 file_size = 6;
}
data_exporter-master/src/ 0000775 0000000 0000000 00000000000 14145762041 0016003 5 ustar 00root root 0000000 0000000 data_exporter-master/src/ClassFactory.cpp 0000664 0000000 0000000 00000003565 14145762041 0021115 0 ustar 00root root 0000000 0000000 /*----- PROTECTED REGION ID(DataExporter::ClassFactory.cpp) ENABLED START -----*/
//=============================================================================
//
// file : ClassFactory.cpp
//
// description : C++ source for the class_factory method of the DServer
// device class. This method is responsible for the creation of
// all class singleton for a device server. It is called
// at device server startup.
//
// project : Data exporter
//
// This file is part of Tango device class.
//
// Tango is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Tango is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Tango. If not, see .
//
// $Author: $
//
// $Revision: $
// $Date: $
//
// $HeadURL: $
//
//=============================================================================
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//=============================================================================
#include
#include
// Add class header files if needed
/**
* Create DataExporter Class singleton and store it in DServer object.
*/
void Tango::DServer::class_factory()
{
// Add method class init if needed
add_class(DataExporter_ns::DataExporterClass::init("DataExporter"));
}
/*----- PROTECTED REGION END -----*/ // DataExporter::ClassFactory.cpp
data_exporter-master/src/Configuration.h 0000664 0000000 0000000 00000014523 14145762041 0020770 0 ustar 00root root 0000000 0000000 #ifndef CONFIGURATION_H
#define CONFIGURATION_H
#include