Zone Data [zones]

This request returns a Zones Data data structure. Use this response to determine what zones are defined and their playbacks, join groups, and active presets.

URL:

/get.cgi?req=zones

Response:

The following variable-length structure is returned by this request:

typedef struct ZonesData {
    uint16_t            signature;              // Signature = 'CS'
    int16_t             version;                // Version = 0x0001 (or negative error code)
    uint8_t             reserved[2];            // -
    uint16_t            zoneCount;              // Number of zones
    ZoneRecord          zones[];                // Variable array of zone records
} ZonesData;

#define STACK_NAME_BUF_SIZE     16

typedef struct ZoneRecord {
    char                name[STACK_NAME_BUF_SIZE];  // Name of zone
    uint8_t             playbackIndex;          // Playback index
    uint8_t             joinGroup;              // Join group
    uint16_t            count;                  // Number of PresetID/Status pairs
    uint32_t            data[];                 // Array of PresetID/Status pairs (32 pairs max)
} ZoneRecord;

The PresetID/Status pairs are included for any preset in the zone that is active. The PresetID denotes the preset number and the Status value indicates the preset’s active state. The following table shows preset states:

Preset Status Description
1 This preset is active.
2 This preset is modified.

 
Errors:

If an error occurs during the processing of the request, only the first four bytes of the above structure will be returned by this URL. The first two bytes will have the “CS” signature and the next two bytes will contain an error value as described by the following table:

Error Value Description
-1 An internal shared memory error occurred.