Skip to main content

Eye Position

The Eye Position API enables precise control over eye movement and eyelid state in the Luniris OS system. This API provides bidirectional communication for both coordinates and eyelid states, supporting real-time control and monitoring.


Protocol Buffer Definition

syntax = "proto3";
import "google/protobuf/empty.proto";

service EyePositionService {
// Receive in real-time the eye coordinates update
rpc StreamEyeCoordinatesToClient (google.protobuf.Empty) returns (stream EyeCoordinates);

// Send eye coordinates
rpc SendEyeCoordinates (EyeCoordinates) returns (google.protobuf.Empty);

// Streams eye coordinates to the server
rpc StreamEyeCoordinatesToServer (stream EyeCoordinates) returns (google.protobuf.Empty);

// Receive in real-time the eyelid state update
rpc StreamEyelidStateToClient (google.protobuf.Empty) returns (stream EyelidState);

// Send eyelid update
rpc SendEyelidState (EyelidState) returns (google.protobuf.Empty);
}

// Normalized eye coordinates (-1 to 1)
message EyeCoordinates {
float x = 1; // Horizontal position (-1: left, 1: right)
float y = 2; // Vertical position (-1: down, 1: up)
}

// Eyelid closure state (0 to 1)
message EyelidState {
float closure_percentage = 1; // 0: fully open, 1: fully closed
}