syntax = "proto2"; package fx; // ENUMS enum Mode { FX_MODE_STATIC = 0; FX_MODE_BLINK = 1; FX_MODE_BREATH = 2; FX_MODE_COLOR_WIPE = 3; FX_MODE_COLOR_WIPE_INV = 4; FX_MODE_COLOR_WIPE_REV = 5; FX_MODE_COLOR_WIPE_REV_INV = 6; FX_MODE_COLOR_WIPE_RANDOM = 7; FX_MODE_RANDOM_COLOR = 8; FX_MODE_SINGLE_DYNAMIC = 9; FX_MODE_MULTI_DYNAMIC = 10; FX_MODE_RAINBOW = 11; FX_MODE_RAINBOW_CYCLE = 12; FX_MODE_SCAN = 13; FX_MODE_DUAL_SCAN = 14; FX_MODE_FADE = 15; FX_MODE_THEATER_CHASE = 16; FX_MODE_THEATER_CHASE_RAINBOW = 17; FX_MODE_RUNNING_LIGHTS = 18; FX_MODE_TWINKLE = 19; FX_MODE_TWINKLE_RANDOM = 20; FX_MODE_TWINKLE_FADE = 21; FX_MODE_TWINKLE_FADE_RANDOM = 22; FX_MODE_SPARKLE = 23; FX_MODE_FLASH_SPARKLE = 24; FX_MODE_HYPER_SPARKLE = 25; FX_MODE_STROBE = 26; FX_MODE_STROBE_RAINBOW = 27; FX_MODE_MULTI_STROBE = 28; FX_MODE_BLINK_RAINBOW = 29; FX_MODE_CHASE_WHITE = 30; FX_MODE_CHASE_COLOR = 31; FX_MODE_CHASE_RANDOM = 32; FX_MODE_CHASE_RAINBOW = 33; FX_MODE_CHASE_FLASH = 34; FX_MODE_CHASE_FLASH_RANDOM = 35; FX_MODE_CHASE_RAINBOW_WHITE = 36; FX_MODE_CHASE_BLACKOUT = 37; FX_MODE_CHASE_BLACKOUT_RAINBOW = 38; FX_MODE_COLOR_SWEEP_RANDOM = 39; FX_MODE_RUNNING_COLOR = 40; FX_MODE_RUNNING_RED_BLUE = 41; FX_MODE_RUNNING_RANDOM = 42; FX_MODE_LARSON_SCANNER = 43; FX_MODE_COMET = 44; FX_MODE_FIREWORKS = 45; FX_MODE_FIREWORKS_RANDOM = 46; FX_MODE_MERRY_CHRISTMAS = 47; FX_MODE_FIRE_FLICKER = 48; FX_MODE_FIRE_FLICKER_SOFT = 49; FX_MODE_FIRE_FLICKER_INTENSE = 50; FX_MODE_CIRCUS_COMBUSTUS = 51; FX_MODE_HALLOWEEN = 52; FX_MODE_BICOLOR_CHASE = 53; FX_MODE_TRICOLOR_CHASE = 54; FX_MODE_ICU = 55; FX_MODE_CUSTOM_0 = 56; FX_MODE_CUSTOM_1 = 57; FX_MODE_CUSTOM_2 = 58; FX_MODE_CUSTOM_3 = 59; } enum FadeRate { FADE_RATE_XFAST = 1; FADE_RATE_FAST = 2; FADE_RATE_MEDIUM = 3; FADE_RATE_SLOW = 4; FADE_RATE_XSLOW = 5; FADE_RATE_XXSLOW = 6; FADE_RATE_GLACIAL = 7; } enum Size { SIZE_SMALL = 0; SIZE_MEDIUM = 1; SIZE_LARGE = 2; SIZE_XLARGE = 3; } // TYPES message RGB { required uint32 r = 1; required uint32 g = 2; required uint32 b = 3; } message RGBW { required uint32 r = 1; required uint32 g = 2; required uint32 b = 3; required uint32 w = 4; } message MultiColor { required fixed32 col1 = 1; required fixed32 col2 = 2; required fixed32 col3 = 3; } message ColorType { oneof colorTypes { RGB rgb = 1; RGBW rgbw = 2; fixed32 color = 3; MultiColor multiColor = 4; } } message Options { required bool reverse = 1; required FadeRate fadeRate = 2; required bool gammaCorrect = 3; required Size size = 4; } // MESSAGES message init_msg { //(void), } message service_msg { //(void), } message start_msg { //(void), } message stop_msg { //(void), } message pause_msg { //(void), } message resume_msg { //(void), } message strip_off_msg { //(void), } message fade_out_msg { optional uint32 fadeTime = 1; } message setMode_msg { optional uint32 segment = 1; required Mode mode = 2; } message setOptions_msg { required uint32 segment = 1; required Options options = 2; } message setSpeed_msg { optional uint32 segment = 1; required uint32 speed = 2; } message increaseSpeed_msg { required uint32 step = 1; } message decreaseSpeed_msg { required uint32 step = 1; } message setColor_msg { optional uint32 segment = 1; required ColorType color = 2; } message setBrightness_msg { required uint32 brightness = 1; } message increaseBrightness_msg { required uint32 step = 1; } message decreaseBrightness_msg { required uint32 step = 1; } message setLength_msg { required uint32 numPixels = 1; } message increaseLength_msg { required uint32 step = 1; } message decreaseLength_msg { required uint32 step = 1; } message trigger_msg { //(void), } message setNumSegments_msg { required uint32 numSegments = 1; } message setSegment_msg { required uint32 segment = 1; required uint32 start = 2; required uint32 end = 3; required Mode mode = 4; required ColorType color = 5; required uint32 speed = 6; required Options options = 7; } message resetSegments_msg { //(), } message resetSegmentRuntimes_msg { //(), } message resetSegmentRuntime_msg { required uint32 segment = 1; } message setPixelColor_msg { required uint32 offset = 1; required ColorType color = 2; } message copyPixels_msg { required uint32 destination = 1; required uint32 source = 2; required uint32 count = 3; } message display_msg { required uint32 offset = 1; repeated fixed32 color = 2; } message show_msg { //(void); } message halt_msg { //(void); } // MAIN MESSAGE message Root { oneof msg { init_msg init = 1; start_msg start = 2; stop_msg stop = 3; pause_msg pause = 4; resume_msg resume = 5; strip_off_msg strip_off = 6; fade_out_msg fade_out = 7; setMode_msg setMode = 8; setOptions_msg setOptions = 9; setSpeed_msg setSpeed = 10; increaseSpeed_msg increaseSpeed = 11; decreaseSpeed_msg decreaseSpeed = 12; setColor_msg setColor = 13; setBrightness_msg setBrightness = 14; increaseBrightness_msg increaseBrightness = 15; decreaseBrightness_msg decreaseBrightness = 16; setLength_msg setLength = 17; increaseLength_msg increaseLength = 18; decreaseLength_msg decreaseLength = 19; trigger_msg trigger = 20; setNumSegments_msg setNumSegments = 21; setSegment_msg setSegment = 22; resetSegments_msg resetSegments = 23; resetSegmentRuntimes_msg resetSegmentRuntimes = 24; resetSegmentRuntime_msg resetSegmentRuntime = 25; setPixelColor_msg setPixelColor = 26; copyPixels_msg copyPixels = 27; display_msg display = 28; show_msg show = 29; halt_msg halt = 30; } } //ORG // init(void), // service(void), // start(void), // stop(void), // pause(void), // resume(void), // strip_off(void), // fade_out(void), // fade_out(uint32_t), // setMode(uint8_t m), // setMode(uint8_t seg, uint8_t m), // setOptions(uint8_t seg, uint8_t o), // setCustomMode(uint16_t (*p)()), // setCustomShow(void (*p)()), // setSpeed(uint16_t s), // setSpeed(uint8_t seg, uint16_t s), // increaseSpeed(uint8_t s), // decreaseSpeed(uint8_t s), // setColor(uint8_t r, uint8_t g, uint8_t b), // setColor(uint8_t r, uint8_t g, uint8_t b, uint8_t w), // setColor(uint32_t c), // setColor(uint8_t seg, uint32_t c), // setColors(uint8_t seg, uint32_t* c), // setBrightness(uint8_t b), // increaseBrightness(uint8_t s), // decreaseBrightness(uint8_t s), // setLength(uint16_t b), // increaseLength(uint16_t s), // decreaseLength(uint16_t s), // trigger(void), // setNumSegments(uint8_t n), // setSegment(uint8_t n, uint16_t start, uint16_t stop, uint8_t mode, uint32_t color, uint16_t speed, bool reverse), // setSegment(uint8_t n, uint16_t start, uint16_t stop, uint8_t mode, uint32_t color, uint16_t speed, uint8_t options), // setSegment(uint8_t n, uint16_t start, uint16_t stop, uint8_t mode, const uint32_t colors[], uint16_t speed, bool reverse), // setSegment(uint8_t n, uint16_t start, uint16_t stop, uint8_t mode, const uint32_t colors[], uint16_t speed, uint8_t options), // resetSegments(), // resetSegmentRuntimes(), // resetSegmentRuntime(uint8_t), // setPixelColor(uint16_t n, uint32_t c), // setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b), // setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w), // copyPixels(uint16_t d, uint16_t s, uint16_t c), // show(void);