cueOS  2.4
cueOS - Universal Show Control OS for ARM
DMX512_scene.h
1
10#ifndef DMX512_SCENE_H
11#define DMX512_SCENE_H
12
13#include <stdint.h>
14
15#include "DMX512_defs.h"
16#include "DMX512_fixture_preset.h"
17#include "ms_chronometer.h"
18
25#define DMX512_SCENE_DEFAULT {0, 0, 0, 0, NULL, {}, DMX512_SCENE_IDLE, DMX512_SCENE_UNINITIALISED}
26
27
33typedef enum{
37
44typedef enum{
49
50
54typedef struct{
55 uint16_t id;
56 uint16_t fadein_time;
57 uint16_t fadeout_time;
64
65
66DMX512_scene_s DMX512_scene_new(uint16_t id, uint16_t fadein_time, uint16_t fadeout_time);
74
75#endif
76
DMX512_engine_err_e
DMX512 engine error index constants.
Definition: DMX512_defs.h:24
void DMX512_scene_manage(DMX512_scene_s *scene)
State machine to manage scene at a given state.
Definition: DMX512_scene.c:198
void DMX512_scene_stop(DMX512_scene_s *scene)
Starts a scene fade-out process.
Definition: DMX512_scene.c:187
DMX512_fixture_preset_s * DMX512_scene_get_fixture_preset(DMX512_scene_s *scene, uint16_t id)
Gets a fixture instance from the pool.
Definition: DMX512_scene.c:163
DMX512_scene_s DMX512_scene_new(uint16_t id, uint16_t fadein_time, uint16_t fadeout_time)
Creates and initialises a new scene instance.
Definition: DMX512_scene.c:96
DMX512_engine_err_e DMX512_scene_add_fixture_preset(DMX512_scene_s *scene, DMX512_fixture_preset_s fp)
Adds a fixture preset instance into the scene.
Definition: DMX512_scene.c:112
DMX512_engine_err_e DMX512_scene_del_fixture_preset(DMX512_scene_s *scene, uint16_t id)
Deletes a fixture preset instance from the scene.
Definition: DMX512_scene.c:137
void DMX512_scene_start(DMX512_scene_s *scene)
Starts a scene fade-in process.
Definition: DMX512_scene.c:177
DMX512_scene_status_e
Status of a scene instance.
Definition: DMX512_scene.h:33
DMX512_scene_state_e
Current playing state of a scene.
Definition: DMX512_scene.h:44
void DMX512_scene_free(DMX512_scene_s *scene)
Resets a scene to its uninitialised state. frees dynamically allocated scene Data.
Definition: DMX512_scene.c:212
@ DMX512_SCENE_UNINITIALISED
Definition: DMX512_scene.h:34
@ DMX512_SCENE_INITIALISED
Definition: DMX512_scene.h:35
@ DMX512_SCENE_FADEIN
Definition: DMX512_scene.h:46
@ DMX512_SCENE_FADEOUT
Definition: DMX512_scene.h:47
@ DMX512_SCENE_IDLE
Definition: DMX512_scene.h:45
DMX512 fixture preset structure object.
DMX512 scene structure object.
Definition: DMX512_scene.h:54
ms_chronometer_s ms_chronometer
Definition: DMX512_scene.h:60
DMX512_fixture_preset_s * fixture_presets
Definition: DMX512_scene.h:59
uint16_t fadein_time
Definition: DMX512_scene.h:56
DMX512_scene_state_e state
Definition: DMX512_scene.h:61
DMX512_scene_status_e status
Definition: DMX512_scene.h:62
uint16_t fixture_preset_count
Definition: DMX512_scene.h:58
uint16_t fadeout_time
Definition: DMX512_scene.h:57
ms_chronometer structure object