syntax = "proto3"; /* Layer defines some default layers for compositing animations onto for various purposes. */ enum Layer { NONE = 0; // Well-known layers LIGHT = 1; COLOR = 2; NOTIFICATIONS = 8; PRIORITY = 9; } /* FrameData represents an ARGB array of dots. */ message FrameData { // ARGB repeated fixed32 dots = 1; } /* FrameBuffer represents an entire frame together with a layer tag. It also defines a timestamp that can be used within a FrameSequence to define the duration a frame will be shown. */ message FrameBuffer { FrameData frame = 1; // Time offset from start of frame in milliseconds fixed32 timestamp = 2; // Layer to apply the frame to Layer layer = 3; } /* FrameSequence buffers a series of frames to be drawn one by one at intervals defined by the timestamp included in the FrameBuffers. Useful for running smooth animations. In the future, this should have more metadata like looping counts and async animations. */ message FrameSequence { repeated FrameBuffer frames = 1; // Number of times to loop the sequence int32 loop = 2; } message DrawResponse { } message LengthRequest { } message LengthResponse { fixed32 length = 1; } service Drawer { // DrawFrame draws one frame rpc DrawFrame (FrameBuffer) returns (DrawResponse) {} // DrawFrames draws a series of frames rpc DrawFrames (FrameSequence) returns (DrawResponse) {} // GetLength returns the length of the strip rpc GetLength (LengthRequest) returns (LengthResponse) {} }