Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@ external/
ci/coverage.info
ci/html/

# Files produced by testing suite
invalid_points.xml
test_att.h5
test_dim1.h5
test_dim2.h5
test1_001.h5
testing_0.5
valid_points.xml
4 changes: 4 additions & 0 deletions ADApp/ADSrc/Codec.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#ifndef Codec_H
#define Codec_H

#include <string>

static std::string codecName[] = {
"",
"jpeg",
"zlib",
"blosc",
"lz4",
"lz4hdf5",
Expand All @@ -13,6 +16,7 @@ static std::string codecName[] = {
typedef enum {
NDCODEC_NONE,
NDCODEC_JPEG,
NDCODEC_ZLIB,
NDCODEC_BLOSC,
NDCODEC_LZ4,
NDCODEC_LZ4HDF5,
Expand Down
38 changes: 30 additions & 8 deletions ADApp/Db/NDCodec.template
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ record(mbbo, "$(P)$(R)Compressor")
field(ZRVL, "0")
field(ONST, "JPEG")
field(ONVL, "1")
field(TWST, "Blosc")
field(TWST, "Zlib")
field(TWVL, "2")
field(THST, "LZ4")
field(THST, "Blosc")
field(THVL, "3")
field(FRST, "LZ4HDF5")
field(FRST, "LZ4")
field(FRVL, "4")
field(FVST, "BSLZ4")
field(FVST, "LZ4HDF5")
field(FVVL, "5")
field(SXST, "BSLZ4")
field(SXVL, "6")
info(autosaveFields, "VAL")
}

Expand All @@ -57,14 +59,16 @@ record(mbbi, "$(P)$(R)Compressor_RBV")
field(ZRVL, "0")
field(ONST, "JPEG")
field(ONVL, "1")
field(TWST, "Blosc")
field(TWST, "Zlib")
field(TWVL, "2")
field(THST, "LZ4")
field(THST, "Blosc")
field(THVL, "3")
field(FRST, "LZ4HDF5")
field(FRST, "LZ4")
field(FRVL, "4")
field(FVST, "BSLZ4")
field(FVST, "LZ4HDF5")
field(FVVL, "5")
field(SXST, "BSLZ4")
field(SXVL, "6")
field(SCAN, "I/O Intr")
}

Expand Down Expand Up @@ -95,6 +99,24 @@ record(longin, "$(P)$(R)JPEGQuality_RBV")
field(SCAN, "I/O Intr")
}

record(longout, "$(P)$(R)ZlibCLevel")
{
field(PINI, "YES")
field(DTYP, "asynInt32")
field(OUT, "@asyn($(PORT),$(ADDR=0),$(TIMEOUT=1))ZLIB_CLEVEL")
field(VAL, "6")
field(DRVH, "9")
field(DRVL, "0")
info(autosaveFields, "VAL")
}

record(longin, "$(P)$(R)ZlibCLevel_RBV")
{
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),$(ADDR=0),$(TIMEOUT=1))ZLIB_CLEVEL")
field(SCAN, "I/O Intr")
}

record(mbbo, "$(P)$(R)BloscCompressor")
{
field(PINI, "YES")
Expand Down
1 change: 1 addition & 0 deletions ADApp/Db/NDCodec_settings.req
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$(P)$(R)Mode
$(P)$(R)Compressor
$(P)$(R)JPEGQuality
$(P)$(R)ZlibCLevel
$(P)$(R)BloscCompressor
$(P)$(R)BloscCLevel
$(P)$(R)BloscShuffle
Expand Down
91 changes: 67 additions & 24 deletions ADApp/op/adl/NDCodec.adl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

file {
name="/home/epics/devel/areaDetector-3-14/ADCore/ADApp/op/adl/NDCodec.adl"
version=030117
name="/home/jwlodek/Workspace/ADCore/ADApp/op/adl/NDCodec.adl"
version=030122
}
display {
object {
x=330
y=189
x=3193
y=313
width=775
height=600
}
Expand Down Expand Up @@ -116,7 +116,7 @@ rectangle {
x=390
y=40
width=380
height=285
height=310
}
"basic attribute" {
clr=14
Expand Down Expand Up @@ -263,7 +263,7 @@ text {
"text update" {
object {
x=665
y=151
y=175
width=100
height=18
}
Expand All @@ -279,7 +279,7 @@ text {
"text update" {
object {
x=665
y=176
y=200
width=100
height=18
}
Expand All @@ -294,7 +294,7 @@ text {
"text update" {
object {
x=665
y=201
y=225
width=100
height=18
}
Expand All @@ -310,7 +310,7 @@ text {
menu {
object {
x=580
y=151
y=175
width=80
height=18
}
Expand All @@ -323,7 +323,7 @@ menu {
"text entry" {
object {
x=580
y=175
y=199
width=80
height=20
}
Expand All @@ -338,7 +338,7 @@ menu {
menu {
object {
x=580
y=201
y=225
width=80
height=18
}
Expand All @@ -351,7 +351,7 @@ menu {
text {
object {
x=415
y=150
y=174
width=160
height=20
}
Expand All @@ -364,7 +364,7 @@ text {
text {
object {
x=405
y=175
y=199
width=170
height=20
}
Expand All @@ -377,7 +377,7 @@ text {
text {
object {
x=445
y=200
y=224
width=130
height=20
}
Expand Down Expand Up @@ -418,7 +418,7 @@ text {
text {
object {
x=455
y=275
y=299
width=120
height=20
}
Expand All @@ -431,7 +431,7 @@ text {
"text update" {
object {
x=580
y=276
y=300
width=80
height=18
}
Expand All @@ -449,7 +449,7 @@ text {
text {
object {
x=395
y=300
y=325
width=110
height=20
}
Expand All @@ -462,7 +462,7 @@ text {
"text update" {
object {
x=510
y=303
y=328
width=255
height=14
}
Expand All @@ -478,7 +478,7 @@ text {
"text update" {
object {
x=665
y=226
y=250
width=100
height=18
}
Expand All @@ -493,7 +493,7 @@ text {
"text entry" {
object {
x=580
y=225
y=249
width=80
height=20
}
Expand All @@ -508,7 +508,7 @@ text {
text {
object {
x=405
y=225
y=249
width=170
height=20
}
Expand All @@ -521,7 +521,7 @@ text {
"text update" {
object {
x=664
y=251
y=275
width=100
height=18
}
Expand All @@ -536,7 +536,7 @@ text {
"text entry" {
object {
x=579
y=250
y=274
width=80
height=20
}
Expand All @@ -551,7 +551,7 @@ text {
text {
object {
x=394
y=250
y=274
width=180
height=20
}
Expand All @@ -561,3 +561,46 @@ text {
textix="LZ4HDF5 Block Size"
align="horiz. right"
}
text {
object {
x=455
y=150
width=120
height=20
}
"basic attribute" {
clr=14
}
textix="Zlib Comp. Level"
align="horiz. right"
}
"text entry" {
object {
x=580
y=150
width=80
height=20
}
control {
chan="$(P)$(R)ZlibCLevel"
clr=14
bclr=51
}
limits {
}
}
"text update" {
object {
x=665
y=151
width=100
height=18
}
monitor {
chan="$(P)$(R)ZlibCLevel_RBV"
clr=54
bclr=4
}
limits {
}
}
8 changes: 8 additions & 0 deletions ADApp/pluginSrc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ ifeq ($(WITH_BITSHUFFLE), YES)
USR_CXXFLAGS += -DHAVE_BITSHUFFLE
endif

ifeq ($(WITH_ZLIB), YES)
USR_CXXFLAGS += -DHAVE_ZLIB
endif

ifdef BLOSC_INCLUDE
USR_INCLUDES += $(addprefix -I, $(BLOSC_INCLUDE))
endif
Expand All @@ -219,6 +223,10 @@ ifdef BITSHUFFLE_INCLUDE
USR_INCLUDES += $(addprefix -I, $(BITSHUFFLE_INCLUDE))
endif

ifdef ZLIB_INCLUDE
USR_INCLUDES += $(addprefix -I, $(ZLIB_INCLUDE))
endif

ifdef HDF5_INCLUDE
USR_INCLUDES += $(addprefix -I, $(HDF5_INCLUDE))
endif
Expand Down
6 changes: 5 additions & 1 deletion ADApp/pluginSrc/NDFileHDF5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3323,6 +3323,9 @@ asynStatus NDFileHDF5::configureCompression(NDArray *pArray)
setIntegerParam(NDFileHDF5_bloscCompressLevel, pArray->codec.level);
setIntegerParam(NDFileHDF5_bloscShuffleType, pArray->codec.shuffle);
setIntegerParam(NDFileHDF5_bloscCompressor, pArray->codec.compressor);
} else if (pArray->codec.name == codecName[NDCODEC_ZLIB]) {
setIntegerParam(NDFileHDF5_compressionType, HDF5CompressZlib);
setIntegerParam(NDFileHDF5_zCompressLevel, pArray->codec.level);
} else if (pArray->codec.name == codecName[NDCODEC_BSLZ4]) {
setIntegerParam(NDFileHDF5_compressionType, HDF5CompressBshuf);
} else if (pArray->codec.name == codecName[NDCODEC_LZ4]) {
Expand Down Expand Up @@ -3381,7 +3384,8 @@ asynStatus NDFileHDF5::configureCompression(NDArray *pArray)
"%s::%s Setting zlib compression filter level=%d\n",
driverName, functionName, zLevel);
H5Pset_deflate(this->cparms, zLevel);
this->codec.name = "zlib";
this->codec.name = codecName[NDCODEC_ZLIB];
this->codec.level = zLevel;
break;
case HDF5CompressBlosc: {
asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW,
Expand Down
Loading
Loading