Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create AWS S3 Interface for TIFF Files #458

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ADApp/Db/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ DB += NDAttrPlotAttr.template
DB += NDAttrPlotData.template
DB += NDAttrPlot.template
DB += NDCodec.template
DB += NDFileTIFFS3.template

#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
Expand Down
7 changes: 7 additions & 0 deletions ADApp/Db/NDFileTIFFS3.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#=================================================================#
# Template file: NDFileTIFFS3.template
# Database for NDFileTIFFS3 driver, which saves NDArray data
# in the TIFF file format

include "NDFileTIFF.template"
include "NDPluginBase.template"
1 change: 1 addition & 0 deletions ADApp/Db/NDFileTIFFS3_settings.req
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
file "NDPluginFile_settings.req", P=$(P), R=$(R)
20 changes: 20 additions & 0 deletions ADApp/commonDriverMakefile
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,26 @@ ifdef ADPLUGINCENTROIDS
PROD_LIBS += NDPluginCentroids centroids
endif

ifeq ($(WITH_TIFFS3),YES)
$(DBD_NAME)_DBD += NDFileTIFFS3.dbd
ifeq ($(TIFFS3_EXTERNAL),NO)
PROD_LIBS += tiff
else
ifdef TIFFS3_LIB
tiff_DIR = $(TIFF_LIB)
PROD_LIBS += tiff
else
PROD_SYS_LIBS += tiff
PROD_SYS_LIBS += tiffxx
PROD_SYS_LIBS += aws-cpp-sdk-s3
PROD_SYS_LIBS += aws-cpp-sdk-core
PROD_SYS_LIBS += aws-c-event-stream
PROD_SYS_LIBS += aws-c-common
PROD_SYS_LIBS += aws-checksums
endif
endif
endif

# Required modules
$(DBD_NAME)_DBD += asyn.dbd
PROD_LIBS += asyn
Expand Down
13 changes: 13 additions & 0 deletions ADApp/pluginSrc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,19 @@ ifeq ($(WITH_BITSHUFFLE), YES)
USR_CXXFLAGS += -DHAVE_BITSHUFFLE
endif

ifeq ($(WITH_TIFFS3),YES)
DBD += NDFileTIFFS3.dbd
INC += NDFileTIFFS3.h
LIB_SRCS += NDFileTIFFS3.cpp
ifeq ($(SHARED_LIBRARIES),NO)
# This flag is used to indicate that the TIFF library was built statically
USR_CXXFLAGS_WIN32 += -DLIBTIFF_STATIC
endif
ifdef TIFFS3_INCLUDE
USR_INCLUDES += $(addprefix -I, $(TIFFS3_INCLUDE))
endif
endif

ifdef BLOSC_INCLUDE
USR_INCLUDES += $(addprefix -I, $(BLOSC_INCLUDE))
endif
Expand Down
5 changes: 2 additions & 3 deletions ADApp/pluginSrc/NDFileTIFF.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ class epicsShareClass NDFileTIFF : public NDPluginFile {
virtual asynStatus writeFile(NDArray *pArray);
virtual asynStatus closeFile();

private:
protected:
TIFF *tiff;
NDColorMode_t colorMode;
int *pAttributeId;
NDAttributeList *pFileAttributes;
int numAttributes_;

int *pAttributeId;
};

#endif
Loading