|
Oyster Harvest Area Closure Analysis 0.1
Prediction and analysis of NSW oyster harvest area closures.
|
#include <string.h>#include <math.h>#include <curl/curl.h>#include <cjson/cJSON.h>#include <log.h>#include "Ubidots/authenticate.h"#include "http.h"#include "utils.h"Go to the source code of this file.
Data Structures | |
| struct | Ubidots_Devices_TypeDef |
| TODO turn this into a single device then have a list of devices struct. More... | |
Macros | |
| #define | UBIDOTS_MAX_NUMBER_DEVICES 300 |
| Maximum number of devices in buffer. More... | |
| #define | UBIDOTS_MAX_INFO_LENGTH 100 |
| Maximum name length for devices. More... | |
Functions | |
| CURLcode | Ubidots_ListDevices (Ubidots_Devices_TypeDef *devices) |
| List all ubidots devices. More... | |
| int8_t | Ubidots_DevicesToCSV (Ubidots_Devices_TypeDef *devices) |
| Write devices to csv file for caching. More... | |
| #define UBIDOTS_MAX_INFO_LENGTH 100 |
Maximum name length for devices.
| #define UBIDOTS_MAX_NUMBER_DEVICES 300 |
Maximum number of devices in buffer.
| int8_t Ubidots_DevicesToCSV | ( | Ubidots_Devices_TypeDef * | devices | ) |
Write devices to csv file for caching.
Writes out device list from ubidots to a .csv file.
Device list containing names, ids and coordinates (if available) are written to a .csv file. The devices count is used to terminate this loop. Errors (1) are returned if directories cannot be created.
| devices | Devices struct to write to file. |
| CURLcode Ubidots_ListDevices | ( | Ubidots_Devices_TypeDef * | devices | ) |
List all ubidots devices.
Method to get a list of all devices on Ubidots.
Page size should be set high enough to get all devices (default 500).
| devices | Ubidots devices struct to populate. |