/* Soil Sensor Data Decoding Module * Sensiplicity Systems * * Copyright 2015 * * Department of Botany and Plant Pathology * Center for Genome Research and Biocomputing * Oregon State University * Corvallis, OR 97331 * * This program is not free software; you can not redistribute it and/or * modify it at all. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ #include #include #include "sense-net.h" /* Type codes for soil sensors. */ const int TYPECODE_SOIL_1ZONE; const int TYPECODE_SOIL_2ZONE; const int TYPECODE_SOIL_4ZONE; /* Print a CSV column header row to the given file. */ void soil_print_header(FILE *stream); /* Parse data from a soil sensor and print a CSV line to the given file. * On success, 0 is returned. On error (wrong number of bytes), -1 is returned. */ int soil_parse_data(FILE *stream, int bus, node_t node, uint8_t *packet_data, uint8_t data_size);