Files
guardian/crates/dcs-grpc/protos/dcs/trigger/v0/trigger.proto
2023-12-19 19:16:41 +01:00

279 lines
6.6 KiB
Protocol Buffer

syntax = "proto3";
package dcs.trigger.v0;
import "dcs/common/v0/common.proto";
option csharp_namespace = "RurouniJones.Dcs.Grpc.V0.Trigger";
option go_package = "github.com/DCS-gRPC/go-bindings/dcs/v0/trigger";
// https://wiki.hoggitworld.com/view/DCS_singleton_trigger
service TriggerService {
// https://wiki.hoggitworld.com/view/DCS_func_outText
rpc OutText(OutTextRequest) returns (OutTextResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_outTextForCoalition
rpc OutTextForCoalition(OutTextForCoalitionRequest)
returns (OutTextForCoalitionResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_outTextForGroup
rpc OutTextForGroup(OutTextForGroupRequest)
returns (OutTextForGroupResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_outTextForUnit
rpc OutTextForUnit(OutTextForUnitRequest)
returns (OutTextForUnitResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_getUserFlag
rpc GetUserFlag(GetUserFlagRequest) returns (GetUserFlagResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_setUserFlag
rpc SetUserFlag(SetUserFlagRequest) returns (SetUserFlagResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_markToAll
rpc MarkToAll(MarkToAllRequest) returns (MarkToAllResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_markToCoalition
rpc MarkToCoalition(MarkToCoalitionRequest)
returns (MarkToCoalitionResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_markToGroup
rpc MarkToGroup(MarkToGroupRequest) returns (MarkToGroupResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_markupToAll
rpc MarkupToAll(MarkupToAllRequest) returns (MarkupToAllResponse) {}
// Uses markupToAll under the hood but enforces a coalition to be specified
// https://wiki.hoggitworld.com/view/DCS_func_markupToAll
rpc MarkupToCoalition(MarkupToCoalitionRequest)
returns (MarkupToCoalitionResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_removeMark
rpc RemoveMark(RemoveMarkRequest) returns (RemoveMarkResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_explosion
rpc Explosion(ExplosionRequest) returns (ExplosionResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_smoke
rpc Smoke(SmokeRequest) returns (SmokeResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_illuminationBomb
rpc IlluminationBomb(IlluminationBombRequest)
returns (IlluminationBombResponse) {}
// https://wiki.hoggitworld.com/view/DCS_func_signalFlare
rpc SignalFlare(SignalFlareRequest) returns (SignalFlareResponse) {}
}
message OutTextRequest {
string text = 1;
int32 display_time = 2;
bool clear_view = 3;
}
message OutTextResponse {
}
message OutTextForCoalitionRequest {
string text = 1;
int32 display_time = 2;
bool clear_view = 3;
dcs.common.v0.Coalition coalition = 4;
}
message OutTextForCoalitionResponse {
}
message OutTextForGroupRequest {
string text = 1;
int32 display_time = 2;
bool clear_view = 3;
uint32 group_id = 4;
}
message OutTextForGroupResponse {
}
message OutTextForUnitRequest {
string text = 1;
int32 display_time = 2;
bool clear_view = 3;
uint32 unit_id = 4;
}
message OutTextForUnitResponse {
}
message GetUserFlagRequest {
string flag = 1;
}
message GetUserFlagResponse {
uint32 value = 1;
}
message SetUserFlagRequest {
string flag = 1;
uint32 value = 2;
}
message SetUserFlagResponse {
}
message MarkToAllRequest {
string text = 2;
dcs.common.v0.InputPosition position = 3;
bool read_only = 4;
string message = 5;
}
message MarkToAllResponse {
uint32 id = 1;
}
message MarkToCoalitionRequest {
uint32 id = 1;
string text = 2;
dcs.common.v0.InputPosition position = 3;
dcs.common.v0.Coalition coalition = 4;
bool read_only = 5;
string message = 6;
}
message MarkToCoalitionResponse {
uint32 id = 1;
}
message MarkToGroupRequest {
uint32 id = 1;
string text = 2;
dcs.common.v0.InputPosition position = 3;
uint32 group_id = 4;
bool read_only = 5;
string message = 6;
}
message MarkToGroupResponse {
uint32 id = 1;
}
message RemoveMarkRequest {
uint32 id = 1;
}
message RemoveMarkResponse {
}
message ExplosionRequest {
dcs.common.v0.InputPosition position = 1;
uint32 power = 2;
}
message ExplosionResponse {
}
message SmokeRequest {
enum SmokeColor {
SMOKE_COLOR_UNSPECIFIED = 0;
SMOKE_COLOR_GREEN = 1;
SMOKE_COLOR_RED = 2;
SMOKE_COLOR_WHITE = 3;
SMOKE_COLOR_ORANGE = 4;
SMOKE_COLOR_BLUE = 5;
}
// Altitude parameter will be ignored. Smoke always eminates from ground
// level which will be calculated server-side
dcs.common.v0.InputPosition position = 1;
SmokeColor color = 2;
}
message SmokeResponse {
}
message IlluminationBombRequest {
// The altitude of Illumination Bombs is meters above ground. Ground level
// will be calculated server-side
dcs.common.v0.InputPosition position = 1;
uint32 power = 2;
}
message IlluminationBombResponse {
}
message SignalFlareRequest {
enum FlareColor {
FLARE_COLOR_UNSPECIFIED = 0;
FLARE_COLOR_GREEN = 1;
FLARE_COLOR_RED = 2;
FLARE_COLOR_WHITE = 3;
FLARE_COLOR_YELLOW = 4;
}
// Altitude parameter will be ignored. Signal flares always fire from
// ground level which will be calculated server-side
dcs.common.v0.InputPosition position = 1;
FlareColor color = 2;
uint32 azimuth = 3;
}
message SignalFlareResponse {
}
enum LineType {
// protolint:disable:next ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH
LINE_TYPE_NO_LINE = 0;
LINE_TYPE_SOLID = 1;
LINE_TYPE_DASHED = 2;
LINE_TYPE_DOTTED = 3;
LINE_TYPE_DOT_DASH = 4;
LINE_TYPE_LONG_DASH = 5;
LINE_TYPE_TWO_DASH = 6;
}
// Represents an RGBA color but instead of using 0-255 as the color
// values it uses 0 to 1. A red color with 50% transparency would be
// RGBA of 1, 0, 0, 0.5
message Color {
double red = 1;
double green = 2;
double blue = 3;
double alpha = 4;
}
enum Shape {
SHAPE_UNSPECIFIED = 0;
SHAPE_LINE = 1;
SHAPE_CIRCLE = 2;
SHAPE_RECT = 3;
SHAPE_ARROW = 4;
SHAPE_TEXT = 5;
SHAPE_QUAD = 6;
SHAPE_FREEFORM = 7;
}
message MarkupToAllRequest {
Shape shape = 1;
repeated dcs.common.v0.InputPosition points = 2;
Color border_color = 3;
Color fill_color = 4;
LineType line_type = 5;
bool read_only = 6;
string message = 7;
}
message MarkupToAllResponse {
uint32 id = 1;
}
message MarkupToCoalitionRequest {
Shape shape = 1;
dcs.common.v0.Coalition coalition = 2;
repeated dcs.common.v0.InputPosition points = 3;
Color border_color = 4;
Color fill_color = 5;
LineType line_type = 6;
bool read_only = 7;
string message = 8;
}
message MarkupToCoalitionResponse {
uint32 id = 1;
}