Oyster Harvest Area Closure Analysis 0.1
Prediction and analysis of NSW oyster harvest area closures.
Loading...
Searching...
No Matches
devices.c File Reference
#include "Ubidots/devices.h"
Include dependency graph for devices.c:

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...
 

Function Documentation

◆ Ubidots_DevicesToCSV()

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.

Parameters
devicesDevices struct to write to file.
Returns
Error codes. 0 = OK ... 1 = ERROR

◆ Ubidots_ListDevices()

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).

CURLcode Ubidots_ListDevices(Ubidots_Devices_TypeDef *devices)
List all ubidots devices.
Definition: devices.c:19
TODO turn this into a single device then have a list of devices struct.
Definition: devices.h:21
See also
https://docs.ubidots.com/reference/get-all-devices @info Device names need to be less than 100 characters.
Parameters
devicesUbidots devices struct to populate.
Returns
Status code respresenting response status.