Commit 34742155 authored by Juan David Gonzalez Cobas's avatar Juan David Gonzalez Cobas

Merge branch 'fsi-lib-data-sizes' into fsi-lib-devel

parents 69cb5c3d 62f796b9
......@@ -9,6 +9,10 @@ lib: libfsi.a
libfsi.a: $(LIBOBJS) fsi.h
$(AR) $(ARFLAGS) $@ $^
sizes: sizes.o lib
$(CC) $(CFLAGS) -o $@ sizes.o libfsi.a $(LDFLAGS) $(LDLIBS)
sizes.o: fsi.h
doc: doc/html
doc/html: $(DOXYFILE)
doxygen $(DOXYFILE)
......
#include <stdio.h>
#include "fsi.h"
#define NCHANNELS 1024
int main(int argc, char *argv[])
{
int scc = sizeof(struct fsi_channel_config);
int gcc = sizeof(struct fsi_channel_config) + sizeof(unsigned);
int mcc = NCHANNELS * scc;
int cms = sizeof(struct fsi_channel_measurement);
int tms = NCHANNELS * cms;
int fms = sizeof(struct fsi_full_measurement);
const char fmt[] = "%-30s: %10d %s\n";
printf(fmt, "channel config set", scc, "bytes/channel");
printf(fmt, "channel config get", gcc, "bytes/channel");
printf(fmt, "bulk channel config", mcc, "total bytes maximum");
printf(fmt, "channel get measurement", cms, "bytes/channel");
printf(fmt, "bulk get measurements", tms, "total bytes max/cycle");
printf(fmt, "get full (raw) measurement", fms, "bytes (single channel)");
}
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