Synopsis
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;
Description

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.

Structure
id
The datastream identifier.
capacity
The maximum number of datapoints that this datastream buffer can contain.
count
The current number of datapoints held in the datastream buffer.
r
Private read index.
w
Private write index.
u
Private update count.
data
Private pointer to the memory that implements the ring buffer.
data
Private pointer to the next datastream in the list of feed datastreams.