typedef struct { const char *id; size_t capacity; volatile unsigned count; volatile unsigned w; volatile unsigned r; unsigned u; CTL_XIVELY_DATAPOINT_t *data; CTL_XIVELY_DATASTREAM_t *__next; CTL_XIVELY_FEED_t *__feed; } CTL_XIVELY_DATASTREAM_t;
CTL_XIVELY_DATASTREAM_t defines a queue of datapoints that can be pushed to Xively. The queue is implemented as a ring buffer of datapoints such that datapoints can be posted to the datastream from an interrupt service routine.