Sync biosiglite with upstream

parent 42076965
......@@ -44,7 +44,7 @@ extern "C" {
#ifdef NDEBUG
#define VERBOSE_LEVEL 0 // turn off debugging information, but its only used without NDEBUG
#else
extern int VERBOSE_LEVEL; // used for debugging, variable is always defined
extern int VERBOSE_LEVEL __attribute__ ((visibility ("default") )); // used for debugging, variable is always defined
#endif
......@@ -108,7 +108,7 @@ char *getlogin (void);
#define BIOSIG_VERSION_MAJOR 1
#define BIOSIG_VERSION_MINOR 9
#define BIOSIG_PATCHLEVEL 3
#define BIOSIG_PATCHLEVEL 5
// for backward compatibility
#define BIOSIG_VERSION_STEPPING BIOSIG_PATCHLEVEL
#define BIOSIG_VERSION (BIOSIG_VERSION_MAJOR * 10000 + BIOSIG_VERSION_MINOR * 100 + BIOSIG_PATCHLEVEL)
......@@ -533,10 +533,15 @@ struct NomenclatureAnnotatedECG_t {
const char *refid;
} ATT_MSSTRUCT;
extern const struct etd_t ETD [];
extern const struct event_groups_t EventCodeGroups [];
extern const struct etd_t ETD [] __attribute__ ((visibility ("default") ));
extern const struct event_groups_t EventCodeGroups [] __attribute__ ((visibility ("default") ));
extern const struct FileFormatStringTable_t FileFormatStringTable [];
typedef struct {
const char *free_text_event_limiter;
} biosig_options_type;
HDRTYPE* sopen_extended(const char* FileName, const char* MODE, HDRTYPE* hdr, biosig_options_type* options) __attribute__ ((visibility ("default") ));
/* reset structure packing to default settings */
#pragma pack(pop)
......@@ -1057,6 +1062,8 @@ typedef struct aecg {
/** **/
/****************************************************************************/
#pragma GCC visibility push(default)
/*
file access wrapper: use ZLIB (if available) or STDIO
*/
......@@ -1083,6 +1090,8 @@ int iferror(HDRTYPE* hdr);
uint32_t gcd(uint32_t A, uint32_t B);
uint32_t lcm(uint32_t A, uint32_t B);
#pragma GCC visibility pop
extern const uint16_t GDFTYP_BITS[];
extern const char *LEAD_ID_TABLE[];
......@@ -1103,7 +1112,7 @@ int month_string2int(const char *s);
int u32cmp(const void *a, const void *b);
void biosigERROR(HDRTYPE *hdr, enum B4C_ERROR errnum, const char *errmsg);
void biosigERROR(HDRTYPE *hdr, enum B4C_ERROR errnum, const char *errmsg) __attribute__ ((visibility ("default") ));
/*
sets the local and the (deprecated) global error variables B4C_ERRNUM and B4C_ERRMSG
the global error variables are kept for backwards compatibility.
......@@ -1116,8 +1125,8 @@ void biosigERROR(HDRTYPE *hdr, enum B4C_ERROR errnum, const char *errmsg);
therefore not exported to standard user applications.
*/
void struct2gdfbin(HDRTYPE *hdr);
int gdfbin2struct(HDRTYPE *hdr);
void struct2gdfbin(HDRTYPE *hdr) __attribute__ ((visibility ("default") ));
int gdfbin2struct(HDRTYPE *hdr) __attribute__ ((visibility ("default") ));
/* struct2gdfbin and gdfbin2struct
convert between the streamed header information (as in a GDF file or
on a network connection) and the header structure HDRTYPE
......@@ -1127,14 +1136,14 @@ int gdfbin2struct(HDRTYPE *hdr);
event table itself.
------------------------------------------------------------------------*/
size_t hdrEVT2rawEVT(HDRTYPE *hdr);
void rawEVT2hdrEVT(HDRTYPE *hdr, size_t length_rawEventTable);
size_t hdrEVT2rawEVT(HDRTYPE *hdr) __attribute__ ((visibility ("default") ));
void rawEVT2hdrEVT(HDRTYPE *hdr, size_t length_rawEventTable) __attribute__ ((visibility ("default") ));
/* rawEVT2hdrEVT and hdrEVT2rawEVT
convert between streamed event table and the structure
HDRTYPE.EVENT.
------------------------------------------------------------------------*/
int NumberOfChannels(HDRTYPE *hdr);
int NumberOfChannels(HDRTYPE *hdr) __attribute__ ((visibility ("default") ));
/*
returns the number of channels returned by SREAD.
This might be different than the number of data channels in the file
......@@ -1153,7 +1162,7 @@ void FreeGlobalEventCodeTable();
free memory allocated for global event code
------------------------------------------------------------------------*/
size_t sread_raw(size_t START, size_t LEN, HDRTYPE* hdr, char flag, void *buf, size_t bufsize);
size_t sread_raw(size_t START, size_t LEN, HDRTYPE* hdr, char flag, void *buf, size_t bufsize) __attribute__ ((visibility ("default") ));
/* sread_raw:
LEN data segments are read from file associated with hdr, starting from
segment START.
......@@ -1177,7 +1186,7 @@ size_t sread_raw(size_t START, size_t LEN, HDRTYPE* hdr, char flag, void *buf, s
block and the number of blocks, respectively.
--------------------------------------------------------------- */
size_t bpb8_collapsed_rawdata(HDRTYPE *hdr);
size_t bpb8_collapsed_rawdata(HDRTYPE *hdr) __attribute__ ((visibility ("default") ));
/* bpb8_collapsed_rawdata
computes the bits per block when rawdata is collapsed
--------------------------------------------------------------- */
......@@ -1192,11 +1201,11 @@ HDRTYPE* getfiletype(HDRTYPE* hdr);
hdr->VERSION is defined for some selected formats e.g. ACQ, EDF, BDF, GDF
--------------------------------------------------------------- */
const char* GetFileTypeString(enum FileFormat FMT);
const char* GetFileTypeString(enum FileFormat FMT) __attribute__ ((visibility ("default") ));
/* returns a string with file format
--------------------------------------------------------------- */
enum FileFormat GetFileTypeFromString(const char *);
enum FileFormat GetFileTypeFromString(const char *) __attribute__ ((visibility ("default") ));
/* returns file format from string
--------------------------------------------------------------- */
......
This diff is collapsed.
......@@ -31,6 +31,9 @@
#define BIOSIG_FLAG_OVERFLOWDETECTION 0x0004
#define BIOSIG_FLAG_ROW_BASED_CHANNELS 0x0008
#pragma GCC visibility push(default)
#ifdef __cplusplus
extern "C" {
#endif
......@@ -514,6 +517,8 @@ int biosig_channel_set_datatype(CHANNEL_TYPE *hc, uint16_t gdftyp);
const char *biosig_channel_get_transducer(CHANNEL_TYPE *hc);
int biosig_channel_set_transducer(CHANNEL_TYPE *hc, const char *transducer);
#pragma GCC visibility pop
/*
DO NOT USE DO NOT USE DO NOT USE DO NOT USE
......
This diff is collapsed.
......@@ -18,7 +18,9 @@
{ 0x0120, "Stimulus for Evoked potentials" },
{ 0x0130, "Stimulus for Steady State Evoked potentials" },
{ 0x0140, "Response code" },
{ 0x0200, "Neural activity, patch clamp" },
{ 0x0200, "Neural spikes, and spike trains" },
{ 0x0210, "miniature post-synaptic events" },
{ 0x0300, "BCI: Trigger, cues, classlabels" },
{ 0x0400, "Respiratory Events" },
{ 0x0410, "Sleep stages according to Rechtschaffen&Kales and AASM'07" },
......
......@@ -302,6 +302,10 @@
{ 0x0202, 0x0200, "Burst " },
{ 0x0203, 0x0200, "maximum slope time" },
{ 0x0204, 0x0200, "peak time of spike" },
{ 0x0211, 0x0210, "EPSP - Excitatory Post-Synaptic Potentials" },
{ 0x0212, 0x0210, "IPSP - Inhibitory Post-Synaptic Potentials" },
{ 0x0213, 0x0210, "EPSC - Excitatory Post-Synaptic Currents" },
{ 0x0214, 0x0210, "IPSC - Inhibitory Post-Synaptic Currents" },
{ 0x0300, 0x0300, "Start of Trial, Trigger at t=0s" },
{ 0x0301, 0x0300, "class1, Left hand" },
{ 0x0302, 0x0300, "class2, Right hand" },
......
......@@ -71,6 +71,8 @@ typedef int64_t gdf_time, gdftime_t; /* gdf time is represented in 64 bits */
#define ntp_time2gdf_time(t) ((gdf_time)ldexp(ldexp(((double)(t)),-32)/86400 + 719529.0 - 70,32))
#define gdf_time2ntp_time(t) ((int64_t)ldexp((ldexp(((double)(t)),-32) - 719529.0 + 70) * 86400,32))
#pragma GCC visibility push(default)
#ifdef __cplusplus
EXTERN_C {
#endif
......@@ -111,6 +113,8 @@ void gdftime2date(&int,&int,&int)
}
#endif
#pragma GCC visibility pop
/****************************************************************************/
/** **/
......
......@@ -33,6 +33,7 @@
#include <inttypes.h>
#endif
#pragma GCC visibility push(default)
#ifdef __cplusplus
extern "C" {
......@@ -54,6 +55,8 @@ double PhysDimScale(uint16_t PhysDimCode);
for undefined codes, not-a-number (NAN) is returned
--------------------------------------------------------------- */
#pragma GCC visibility pop
#ifdef __cplusplus
}
#endif
......
......@@ -745,6 +745,7 @@ EXTERN_C void sopen_abf2_read(HDRTYPE* hdr) {
hc->bufptr = NULL;
hc->LeadIdCode = 0;
hc->OnOff = 1;
hc->Transducer[0] = 0;
hc->LowPass = lef32p(hdr->AS.auxBUF + S.uBytes*k + offsetof(struct ABF_ADCInfo, fSignalLowpassFilter));
hc->HighPass = lef32p(hdr->AS.auxBUF + S.uBytes*k + offsetof(struct ABF_ADCInfo, fSignalHighpassFilter));
......
......@@ -158,6 +158,7 @@ if (VERBOSE_LEVEL>7) fprintf(stdout,"<%6.2f> %i- %s | %s\n",hdr->VERSION, STATUS
hc->Off = 0.0;
hc->PhysMax = hc->DigMax;
hc->PhysMin = hc->DigMin;
hc->Transducer[0] = 0;
strncpy(hc->Label, t, MAX_LENGTH_LABEL+1);
char* t2= strchr(t1,',');
......
......@@ -201,6 +201,7 @@ if (VERBOSE_LEVEL>7) fprintf(stdout,"%s(line %i) Channel #%i/%i: %i<%s>/%i<%s>\n
}
hc->bi = bpb;
bpb += GDFTYP_BITS[hc->GDFTYP]>>3; // per single sample
hc->Transducer[0] = '\0';
hc->Impedance = NAN;
hc->TOffset = NAN;
hc->LowPass = NAN;
......@@ -1022,6 +1023,7 @@ EXTERN_C void sopen_smr_read(HDRTYPE* hdr) {
hc->SPR = 0;
hc->GDFTYP = 3;
hc->LeadIdCode = 0;
hc->Transducer[0] = '\0';
int stringLength = hdr->AS.Header[off+108];
assert(stringLength < MAX_LENGTH_LABEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment