cueOS  2.4
cueOS - Universal Show Control OS for ARM
DMX512 REST API
Collaboration diagram for DMX512 REST API:

Macros

#define DMX512_ARG_UNDEF   513
 

Enumerations

enum  DMX512_rest_api_endpoint_e {
  DMX512_API_ENDPOINT_PATCH ,
  DMX512_API_ENDPOINT_GROUPS ,
  DMX512_API_ENDPOINT_SCENES ,
  DMX512_API_ENDPOINT_CHASERS ,
  DMX512_API_ENDPOINT_EFFECTS ,
  DMX512_API_ENDPOINT_CUES ,
  DMX512_API_ENDPOINT_CONFIGURE ,
  DMX512_API_ENDPOINT_DEFAULT
}
 DMX512 API endpoint string indexes. More...
 
enum  DMX512_rest_api_args_e {
  DMX512_API_PARAM_ID ,
  DMX512_API_PARAM_ADDRESS ,
  DMX512_API_PARAM_CHANNEL_COUNT ,
  DMX512_API_PARAM_FADEIN_TIME ,
  DMX512_API_PARAM_FADEOUT_TIME ,
  DMX512_API_PARAM_CHANNELS ,
  DMX512_API_PARAM_VALUES ,
  DMX512_API_PARAM_START ,
  DMX512_API_PARAM_STOP
}
 DMX512 API parameter strings indexes. More...
 

Functions

void DMX512_rest_api_router (http_request_s *req)
 Parses the current HTTP request method and URI in order to route requests to a specific api function. More...
 

Variables

static const char *const DMX512_rest_api_endpoints_str []
 DMX512 API endpoint string. More...
 
static char *const DMX512_rest_api_args_str []
 DMX512 API parameter strings. More...
 

Detailed Description

DMX512 engine HTTP wrapper. Handles manipulation of the DMX512 engine resources over HTTP through a user-friendly REST API.

Macro Definition Documentation

◆ DMX512_ARG_UNDEF

#define DMX512_ARG_UNDEF   513

Undefined argument default size TODO: remove/change this implementation

Definition at line 12 of file DMX512_rest_api.h.

Enumeration Type Documentation

◆ DMX512_rest_api_args_e

DMX512 API parameter strings indexes.

Enumerator
DMX512_API_PARAM_ID 

"id" API request parameter string index

DMX512_API_PARAM_ADDRESS 

"address" API request parameter string index

DMX512_API_PARAM_CHANNEL_COUNT 

"channel count" API request parameter string index

DMX512_API_PARAM_FADEIN_TIME 

"fadein time" API request parameter string index

DMX512_API_PARAM_FADEOUT_TIME 

"fadeout time" API request parameter string index

DMX512_API_PARAM_CHANNELS 

"channels" API request parameter string index

DMX512_API_PARAM_VALUES 

"values" API request parameter string index

DMX512_API_PARAM_START 

"start" API request parameter string index

DMX512_API_PARAM_STOP 

"stop" API request parameter string index

Definition at line 32 of file DMX512_rest_api.h.

◆ DMX512_rest_api_endpoint_e

DMX512 API endpoint string indexes.

Enumerator
DMX512_API_ENDPOINT_PATCH 

"patch" API endpoint string index

DMX512_API_ENDPOINT_GROUPS 

"groups" API endpoint string index

DMX512_API_ENDPOINT_SCENES 

"scenes" API endpoint string index

DMX512_API_ENDPOINT_CHASERS 

"chasers" API endpoint string index

DMX512_API_ENDPOINT_EFFECTS 

"effects" API endpoint string index

DMX512_API_ENDPOINT_CUES 

"cues" API endpoint string index

DMX512_API_ENDPOINT_CONFIGURE 

"configure" API endpoint string index

DMX512_API_ENDPOINT_DEFAULT 

default API endpoint index

Definition at line 18 of file DMX512_rest_api.h.

Function Documentation

◆ DMX512_rest_api_router()

void DMX512_rest_api_router ( http_request_s req)

Parses the current HTTP request method and URI in order to route requests to a specific api function.

Parameters
*reqpointer to the http request instance for retrieving uri parameters
See also
http_server.h for further information relative to http requests parameter parsing and retrieval.

Definition at line 380 of file DMX512_rest_api.c.

Variable Documentation

◆ DMX512_rest_api_args_str

char* const DMX512_rest_api_args_str[]
static
Initial value:
= {
"id",
"addr",
"ch_count",
"fadein",
"fadeout",
"channels",
"values",
"start",
"stop"
}

DMX512 API parameter strings.

Definition at line 61 of file DMX512_rest_api.h.

◆ DMX512_rest_api_endpoints_str

const char* const DMX512_rest_api_endpoints_str[]
static
Initial value:
= {
"/patch",
"/groups",
"/scenes",
"/chasers",
"/effects",
"/cues",
"/configure"
}

DMX512 API endpoint string.

Definition at line 48 of file DMX512_rest_api.h.