106 lines
2.5 KiB
Protocol Buffer
106 lines
2.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
package dcs.unit.v0;
|
|
import "dcs/common/v0/common.proto";
|
|
option csharp_namespace = "RurouniJones.Dcs.Grpc.V0.Unit";
|
|
option go_package = "github.com/DCS-gRPC/go-bindings/dcs/v0/unit";
|
|
|
|
// https://wiki.hoggitworld.com/view/DCS_Class_Unit
|
|
service UnitService {
|
|
// https://wiki.hoggitworld.com/view/DCS_func_getRadar
|
|
rpc GetRadar(GetRadarRequest) returns (GetRadarResponse) {}
|
|
|
|
// https://wiki.hoggitworld.com/view/DCS_func_getPoint
|
|
rpc GetPosition(GetPositionRequest) returns (GetPositionResponse) {}
|
|
|
|
// https://wiki.hoggitworld.com/view/DCS_func_getPlayerName
|
|
rpc GetPlayerName(GetPlayerNameRequest) returns (GetPlayerNameResponse) {}
|
|
|
|
rpc GetDescriptor(GetDescriptorRequest) returns (GetDescriptorResponse) {}
|
|
|
|
// https://wiki.hoggitworld.com/view/DCS_func_enableEmission
|
|
rpc SetEmission(SetEmissionRequest) returns (SetEmissionResponse) {}
|
|
|
|
// https://wiki.hoggitworld.com/view/DCS_func_getByName
|
|
rpc Get(GetRequest) returns (GetResponse) {}
|
|
|
|
/**
|
|
* Get information about the unit in 3D space, including its position,
|
|
* orientation and velocity.
|
|
*/
|
|
rpc GetTransform(GetTransformRequest) returns (GetTransformResponse) {}
|
|
|
|
// https://wiki.hoggitworld.com/view/DCS_func_destroy
|
|
rpc Destroy(DestroyRequest) returns (DestroyResponse) {}
|
|
}
|
|
|
|
message GetRadarRequest {
|
|
string name = 1;
|
|
}
|
|
|
|
message GetRadarResponse {
|
|
bool active = 1;
|
|
dcs.common.v0.Target target = 2;
|
|
}
|
|
|
|
message GetPositionRequest {
|
|
string name = 1;
|
|
}
|
|
|
|
message GetPositionResponse {
|
|
dcs.common.v0.Position position = 1;
|
|
}
|
|
|
|
message GetTransformRequest {
|
|
string name = 1;
|
|
}
|
|
|
|
message GetTransformResponse {
|
|
// Time in seconds since the scenario started.
|
|
double time = 1;
|
|
// The position of the unit
|
|
dcs.common.v0.Position position = 2;
|
|
// The orientation of the unit in both 2D and 3D space
|
|
dcs.common.v0.Orientation orientation = 3;
|
|
// The velocity of the unit in both 2D and 3D space
|
|
dcs.common.v0.Velocity velocity = 4;
|
|
}
|
|
|
|
message GetPlayerNameRequest {
|
|
string name = 1;
|
|
}
|
|
|
|
message GetPlayerNameResponse {
|
|
optional string player_name = 1;
|
|
}
|
|
|
|
message GetDescriptorRequest {
|
|
string name = 1;
|
|
}
|
|
|
|
// TODO fill these in as and when we need em
|
|
message GetDescriptorResponse {
|
|
repeated string attributes = 1;
|
|
}
|
|
|
|
message SetEmissionRequest {
|
|
string name = 1;
|
|
bool emitting = 2;
|
|
}
|
|
|
|
message SetEmissionResponse {
|
|
}
|
|
|
|
message GetRequest {
|
|
string name = 1;
|
|
}
|
|
|
|
message GetResponse {
|
|
dcs.common.v0.Unit unit = 1;
|
|
}
|
|
|
|
message DestroyRequest {
|
|
string name = 1;
|
|
}
|
|
|
|
message DestroyResponse {
|
|
} |