Skip to content

Commit

Permalink
Format the protos
Browse files Browse the repository at this point in the history
format the protos using clang-format
  • Loading branch information
rurounijones committed Nov 17, 2021
1 parent eb031b6 commit b7a9981
Show file tree
Hide file tree
Showing 10 changed files with 128 additions and 155 deletions.
167 changes: 83 additions & 84 deletions protos/dcs/coalition/v0/coalition.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,105 +19,104 @@ service CoalitionService {
* See https://wiki.hoggitworld.com/view/DCS_func_getMainRefPoint for more
* details
*/
rpc GetBullseye(GetBullseyeRequest)
returns (GetBullseyeResponse) {}
rpc GetBullseye(GetBullseyeRequest) returns (GetBullseyeResponse) {}

// https://wiki.hoggitworld.com/view/DCS_func_getPlayers
rpc GetPlayers(GetPlayersRequest) returns (GetPlayersResponse) {}
}

message AddGroupRequest {
// The coalition is determined by the provided Country
// and the coalition setup of the mission
dcs.common.v0.Country country = 2;
dcs.common.v0.GroupCategory group_category = 3;
oneof template {
GroundGroupTemplate ground_template = 4;
ShipGroupTemplate ship_template = 5;
HelicopterGroupTemplate helicopter_template = 6;
PlaneGroupTemplate plane_template = 7;
}

message GroundGroupTemplate {
optional uint32 group_id = 1;
bool hidden = 2;
bool late_activation = 3;
string name = 4;
dcs.common.v0.Position position = 5;
repeated Point route = 6;
uint32 start_time = 7;
string task = 8;
bool task_selected = 9;
repeated Task tasks = 10;
bool uncontrollable = 11;
repeated GroundUnitTemplate units = 12;
bool visible = 13;
}
message GroundUnitTemplate {
string name = 1;
string type = 2;
dcs.common.v0.Position position = 3;
optional uint32 unit_id = 4;
optional uint32 heading = 5;
Skill skill = 6;
}

message ShipGroupTemplate {}
message ShipUnitTemplate {}

message HelicopterGroupTemplate {}
message HelicopterUnitTemplate {}

message PlaneGroupTemplate {}
message PlaneUnitTemplate {}

message Point {
enum AltitudeType {
ALTITUDE_TYPE_UNSPECIFIED = 0;
ALTITUDE_TYPE_BAROMETRIC = 1;
ALTITUDE_TYPE_RADIO = 2;
}

enum Type {
TYPE_UNSPECIFIED = 0;
TAKEOFF = 1;
TAKEOFF_PARKING = 2;
TURNING_POINT = 3;
TAKEOFF_PARKING_HOT = 4;
LAND = 5;
}

dcs.common.v0.Position position = 1;
AltitudeType altitude_type = 2;
Type type = 3;
string action = 4;
string form = 5;
double speed = 6;
}

enum Skill {
SKILL_RANDOM = 0;
SKILL_AVERAGE = 1;
SKILL_GOOD = 2;
SKILL_HIGH = 3;
SKILL_EXCELLENT = 4;
SKILL_PLAYER = 5;
}

message Task{}
// The coalition is determined by the provided Country
// and the coalition setup of the mission
dcs.common.v0.Country country = 2;
dcs.common.v0.GroupCategory group_category = 3;
oneof template {
GroundGroupTemplate ground_template = 4;
ShipGroupTemplate ship_template = 5;
HelicopterGroupTemplate helicopter_template = 6;
PlaneGroupTemplate plane_template = 7;
}

message GroundGroupTemplate {
optional uint32 group_id = 1;
bool hidden = 2;
bool late_activation = 3;
string name = 4;
dcs.common.v0.Position position = 5;
repeated Point route = 6;
uint32 start_time = 7;
string task = 8;
bool task_selected = 9;
repeated Task tasks = 10;
bool uncontrollable = 11;
repeated GroundUnitTemplate units = 12;
bool visible = 13;
}
message GroundUnitTemplate {
string name = 1;
string type = 2;
dcs.common.v0.Position position = 3;
optional uint32 unit_id = 4;
optional uint32 heading = 5;
Skill skill = 6;
}

message ShipGroupTemplate {}
message ShipUnitTemplate {}

message HelicopterGroupTemplate {}
message HelicopterUnitTemplate {}

message PlaneGroupTemplate {}
message PlaneUnitTemplate {}

message Point {
enum AltitudeType {
ALTITUDE_TYPE_UNSPECIFIED = 0;
ALTITUDE_TYPE_BAROMETRIC = 1;
ALTITUDE_TYPE_RADIO = 2;
}

enum Type {
TYPE_UNSPECIFIED = 0;
TAKEOFF = 1;
TAKEOFF_PARKING = 2;
TURNING_POINT = 3;
TAKEOFF_PARKING_HOT = 4;
LAND = 5;
}

dcs.common.v0.Position position = 1;
AltitudeType altitude_type = 2;
Type type = 3;
string action = 4;
string form = 5;
double speed = 6;
}

enum Skill {
SKILL_RANDOM = 0;
SKILL_AVERAGE = 1;
SKILL_GOOD = 2;
SKILL_HIGH = 3;
SKILL_EXCELLENT = 4;
SKILL_PLAYER = 5;
}

message Task {}
}

message AddGroupResponse {
dcs.common.v0.Group group = 1;
dcs.common.v0.Group group = 1;
}

message GetGroupsRequest {
dcs.common.v0.Coalition coalition = 1;
optional dcs.common.v0.GroupCategory category = 2;
dcs.common.v0.Coalition coalition = 1;
optional dcs.common.v0.GroupCategory category = 2;
}

message GetGroupsResponse {
repeated dcs.common.v0.Group groups = 1;
repeated dcs.common.v0.Group groups = 1;
}

message GetBullseyeRequest {
Expand Down
27 changes: 12 additions & 15 deletions protos/dcs/common/v0/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ message Unit {
* An instance of a DCS group
*/
message Group {
uint32 id = 1; // The DCS generated ID
string name = 2; // The name of the group as assigned in the mission editor
Coalition coalition = 3; // The coalition of the group
GroupCategory category = 4; // The group category.
uint32 id = 1; // The DCS generated ID
string name = 2; // The name of the group as assigned in the mission editor
Coalition coalition = 3; // The coalition of the group
GroupCategory category = 4; // The group category.
}

/**
Expand Down Expand Up @@ -260,14 +260,12 @@ message Weapon {
* These objects are often buildings but can also be vehicles that have no AI or
* other game behaviour aside from being destroyable
*/
message Static {
}
message Static {}

/**
* An instance of a DCS scenery object
*/
message Scenery {
}
message Scenery {}

/**
* An instance of a DCS Airfield
Expand Down Expand Up @@ -295,8 +293,7 @@ message Airbase {
/**
* An instance of a DCS Cargo object
*/
message Cargo {
}
message Cargo {}

/*
* The initiator of an event
Expand Down Expand Up @@ -352,12 +349,12 @@ message MarkPanel {
}

/**
* A vector in a left-handed coordinate system with +z being north, -z south, +x east, -x west,
* +y up and -y down (as opposed to DCS' unusual right-handed coordinate system where x is north/
* south and z is west/east; the underlying conversion is basically swapping `x` and `z` as in `x=z`
* and `z=x`).
* A vector in a left-handed coordinate system with +z being north, -z south, +x
* east, -x west, +y up and -y down (as opposed to DCS' unusual right-handed
* coordinate system where x is north/ south and z is west/east; the underlying
* conversion is basically swapping `x` and `z` as in `x=z` and `z=x`).
*/
message Vector {
message Vector {
double x = 1;
double y = 2;
double z = 3;
Expand Down
3 changes: 1 addition & 2 deletions protos/dcs/controller/v0/controller.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ message SetAlarmStateRequest {
AlarmState alarm_state = 3;
}

message SetAlarmStateResponse {
}
message SetAlarmStateResponse {}
6 changes: 2 additions & 4 deletions protos/dcs/custom/v0/custom.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,14 @@ message RequestMissionAssignmentRequest {
string mission_type = 2;
}

message RequestMissionAssignmentResponse {
}
message RequestMissionAssignmentResponse {}

message JoinMissionRequest {
string unit_name = 1;
int32 mission_code = 2;
}

message JoinMissionResponse {
}
message JoinMissionResponse {}

message EvalRequest {
string lua = 1;
Expand Down
6 changes: 2 additions & 4 deletions protos/dcs/hook/v0/hook.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ service HookService {
rpc Eval(EvalRequest) returns (EvalResponse) {}
}

message GetMissionNameRequest {
}
message GetMissionNameRequest {}

message GetMissionNameResponse {
string name = 1;
}

message StreamChatMessagesRequest {
}
message StreamChatMessagesRequest {}

message StreamChatMessagesResponse {
// The ID of the player sending the chat messaage.
Expand Down
18 changes: 6 additions & 12 deletions protos/dcs/mission/v0/mission.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ service MissionService {
returns (GetScenarioCurrentTimeResponse) {}
}

message StreamEventsRequest {
}
message StreamEventsRequest {}

// The DCS Event information. Contains event information and a timestamp.
message StreamEventsResponse {
Expand Down Expand Up @@ -114,12 +113,10 @@ message StreamEventsResponse {
}

// Occurs when the mission starts.
message MissionStartEvent {
}
message MissionStartEvent {}

// Occurs when the mission stops.
message MissionEndEvent {
}
message MissionEndEvent {}

// Occurs when an aircraft is finished taking fuel.
message RefuelingStopEvent {
Expand Down Expand Up @@ -263,8 +260,7 @@ message StreamEventsResponse {
}

// A score change (doesn't contain any useful information)
message ScoreEvent {
}
message ScoreEvent {}

// A unit got destroyed.
message UnitLostEvent {
Expand Down Expand Up @@ -376,15 +372,13 @@ message StreamUnitsResponse {
}
}

message GetScenarioStartTimeRequest {
}
message GetScenarioStartTimeRequest {}

message GetScenarioStartTimeResponse {
string datetime = 1;
}

message GetScenarioCurrentTimeRequest {
}
message GetScenarioCurrentTimeRequest {}

message GetScenarioCurrentTimeResponse {
string datetime = 1;
Expand Down
9 changes: 3 additions & 6 deletions protos/dcs/timer/v0/timer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ service TimerService {
rpc GetTimeZero(GetTimeZeroRequest) returns (GetTimeZeroResponse) {}
}

message GetTimeRequest {
}
message GetTimeRequest {}

message GetTimeResponse {
double time = 1;
}

message GetAbsoluteTimeRequest {
}
message GetAbsoluteTimeRequest {}

message GetAbsoluteTimeResponse {
// The current time in seconds since 00:00 of the start date of the mission.
Expand All @@ -33,8 +31,7 @@ message GetAbsoluteTimeResponse {
int32 year = 4;
}

message GetTimeZeroRequest {
}
message GetTimeZeroRequest {}

message GetTimeZeroResponse {
// The time in seconds since 00:00.
Expand Down
Loading

0 comments on commit b7a9981

Please sign in to comment.