RASCSI/src/raspberrypi/rascsi_interface.proto

57 lines
881 B
Protocol Buffer
Raw Normal View History

syntax = "proto3";
option optimize_for = LITE_RUNTIME;
package rascsi_interface;
// The supported device types
enum DeviceType {
UNDEFINED = 0;
SASI_HD = 1;
SCSI_HD = 2;
MO = 3;
CD = 4;
BR = 5;
NUVOLINK = 6;
DAYNAPORT = 7;
}
// rascsi remote operations
enum Operation {
NONE = 0;
LIST = 1;
ATTACH = 2;
DETACH = 3;
INSERT = 4;
EJECT = 5;
PROTECT = 6;
LOG_LEVEL = 7;
}
// Commands rascsi can execute
message Command {
Operation cmd = 1;
int32 id = 2;
int32 un = 3;
DeviceType type = 4;
string params = 5;
}
// The result of a command
message Result {
bool status = 1;
string msg = 2;
}
// The device meta data
message Device {
int32 id = 1;
int32 un = 2;
string type = 3;
string file = 4;
bool read_only = 5;
}
message Devices {
repeated Device devices = 1;
}