enum influxcmdtype { I_READ, I_WRITE, I_PING }; char *getdevpath(int vid, int pid, char *retvar); int resetusb(char *path); char *append(char *orig, char *new, int maxlen); void colprintf( char *prefix, const char *col, char* format, va_list *args ); double getdecibels(uint8_t *buf); void cleanup(void); void handle_signal(int signum); void info( char* format, ... ); void vinfo( char* format, ... ); void err( char* format, ... ); void warn( char* format, ... ); int hextoint(char *hex); int readresult(hid_device *dev, uint8_t *retbuf); void dooutput(uint8_t *buf); int tcpconnect(char *hname, int port); int dohttp(char *hname, int port, char *header, char *body, char *retbuf); struct hostent *resolve(char *hname); int influx_init(char *hname, char *db, char *user, char *pass); int influx_cmd(enum influxcmdtype cmdtype, char *cmd, char *retbuf); int influx_insert(char *cmd, char *retbuf); int influx_query(char *cmd, char *retbuf); int influx_ping(char *retbuf); int influx_write_decibels(double decibels);