Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.ugcs</groupId>
<artifactId>ugcs-java-sdk</artifactId>
<name>UgCS Server Java SDK</name>
<version>4.2</version>
<version>4.12</version>
<packaging>pom</packaging>
<modules>
<module>ucs-messaging</module>
Expand All @@ -13,11 +13,11 @@
<module>ucs-client</module>
</modules>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<slf4j.version>1.7.25</slf4j.version>
<slf4j.version>1.7.26</slf4j.version>
<logback.version>1.2.3</logback.version>
<jackson.version>2.8.7</jackson.version>
</properties>
Expand All @@ -34,6 +34,11 @@
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>javax.naming</groupId>
<artifactId>jndi</artifactId>
<version>1.2.1</version>
</dependency>
<!-- protobuf -->
<dependency>
<groupId>com.google.protobuf</groupId>
Expand Down Expand Up @@ -79,17 +84,23 @@
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.7.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.21.0</version>
<version>2.28.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -166,15 +177,15 @@
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.3</version>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>3.1.12</version>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
<xmlOutput>true</xmlOutput>
<findbugsXmlOutputDirectory>${project.build.directory}</findbugsXmlOutputDirectory>
<excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
<xmlOutputDirectory>${project.build.directory}</xmlOutputDirectory>
<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion ucs-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.ugcs</groupId>
<artifactId>ugcs-java-sdk</artifactId>
<version>4.2</version>
<version>4.12</version>
</parent>
<artifactId>ucs-api</artifactId>
<name>UCS API</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,9 @@ public HciMessageMapping() {
putMapping(163, GetElevationTilesResponse.class);
putMapping(164, ExportRouteToKmlRequest.class);
putMapping(165, ExportRouteToKmlResponse.class);
putMapping(168, GetTelemetrySnapshotRequest.class);
putMapping(169, GetTelemetrySnapshotResponse.class);
putMapping(170, SplitRouteByCorridorPointRequest.class);
putMapping(171, SplitRouteByCorridorPointResponse.class);
}
}
55 changes: 49 additions & 6 deletions ucs-api/src/main/proto/Domain.proto
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ enum VehicleParameterType {
enum PayloadType {
PT_CAMERA = 0;
PT_DATA_LINK = 1;
PT_LIDAR = 2;
}

enum PayloadParameterType {
Expand All @@ -147,6 +148,9 @@ enum PayloadParameterType {
PPT_SENSOR_HORIZONTAL_PIXELS = 6;
PPT_SENSOR_VERTICAL_PIXELS = 7;
PPT_MIN_TRIGGERING_INTERVAL = 8;
PPT_SCANNING_FOV = 9;
PPT_SCANNING_RANGE = 10;
PPT_SCANNING_SPEED = 11;
}

enum SeverityLevel {
Expand Down Expand Up @@ -180,6 +184,11 @@ enum FailsafeAction {
FA_NA = 4;
}

enum RecordingState {
RS_OFF = 0;
RS_ON = 1;
}

enum TriggerState {
TS_SINGLE_SHOT = 0;
TS_START_RECORDING = 1;
Expand Down Expand Up @@ -269,6 +278,7 @@ enum ActionCode {
AC_REPEAT_SERVO = 15;
AC_TRANSITION_FIXED = 16;
AC_TRANSITION_VTOL = 17;
AC_LIDAR_RECORDING_CONTROL = 18;
}

enum NfzType {
Expand Down Expand Up @@ -327,6 +337,8 @@ enum Subsystem {
S_ADSB_VEHICLE = 10;
S_WEATHER_STATION = 11;
S_VSM = 12;
S_LIDAR = 13;
S_RANGEFINDER = 14;
}

enum Semantic {
Expand Down Expand Up @@ -367,11 +379,17 @@ enum Semantic {
S_FLIGHT_MODE = 35;
S_LIST = 36;
S_AUTOPILOT_STATUS = 37;
S_TIMESTAMP = 38;
S_ANY = 39;
S_TEMPERATURE = 40;
S_HUMIDITY = 41;
S_PRECIPITATION = 42;
S_TIMESTAMP = 38;
S_ANY = 39;
S_DISTANCE = 43;
}

enum KmlExportAltitudeMode {
E_AMSL = 1;
E_RELATIVE_TO_FIRST_WP = 2;
}

//*****************************************************************************
Expand Down Expand Up @@ -452,10 +470,12 @@ message DomainObjectWrapper {
optional SetServo setServo = 82;
optional RepeatServo repeatServo = 83;
optional TransitionFixed transitionFixed = 84;
optional TransitionVtol transitionVtol = 85;
optional TransitionVtol transitionVtol = 85;
optional RouteUpload routeUpload = 86;
optional RoutePass routePass = 87;
optional Setting setting = 88;
optional LidarRecordingControlDefinition lidarRecordingControlDefinition = 89;
optional LidarRecordingControl lidarRecordingControl = 90;
}

//*****************************************************************************
Expand Down Expand Up @@ -505,7 +525,6 @@ message MissionPreference {
optional string tag = 7;
}


message Setting {
optional int32 id = 1;
optional string name = 2;
Expand Down Expand Up @@ -765,7 +784,7 @@ message Route {
optional int64 scheduledTime = 6 [(ugcs_field_posix_time) = true];
optional Mission mission = 7;
repeated SegmentDefinition segments = 8;
optional TrajectoryType trajectoryType = 10;
optional TrajectoryType trajectoryType = 10 [deprecated=true];
optional double safeAltitude = 11;
optional double maxAltitude = 12;
optional double initialSpeed = 13;
Expand Down Expand Up @@ -935,6 +954,7 @@ message Action {
optional RepeatServo repeatServo = 24;
optional TransitionVtol transitionVtol = 26;
optional TransitionFixed transitionFixed = 27;
optional LidarRecordingControl lidarRecordingControl = 28;
optional string tag = 21;
optional double estimatedTime = 25;
}
Expand All @@ -951,6 +971,7 @@ message Waypoint {
optional WaypointTurnType turnType = 9;
optional AltitudeFrame altitudeFrame = 11;
optional string tag = 10;
optional double cornerRadius = 12;
}

message CameraControl {
Expand Down Expand Up @@ -1009,6 +1030,14 @@ message HeadingChange {
optional string tag = 6;
}

// Start/Stop lidar data recording.
message LidarRecordingControl {
optional int32 id = 1;
optional int32 version = 2;
optional RecordingState targetState = 3;
optional string tag = 4;
}

message PoiChange {
optional int32 id = 1;
optional int32 version = 2;
Expand Down Expand Up @@ -1123,8 +1152,9 @@ message ActionDefinition {
optional PanoramaDefinition panoramaDefinition = 13;
optional SetServoDefinition setServoDefinition = 14;
optional RepeatServoDefinition repeatServoDefinition = 15;
optional TransitionVtolDefinition transitionVtolDefinition = 17;
optional TransitionVtolDefinition transitionVtolDefinition = 17;
optional TransitionFixedDefinition transitionFixedDefinition = 18;
optional LidarRecordingControlDefinition lidarRecordingControlDefinition = 19;
optional string tag = 16;
}

Expand Down Expand Up @@ -1165,6 +1195,13 @@ message CameraSeriesByDistanceDefinition {
optional string tag = 8;
}

message LidarRecordingControlDefinition {
optional int32 id = 1;
optional int32 version = 2;
optional RecordingState targetState = 3;
optional string tag = 4;
}

message HeadingDefinition {
optional int32 id = 1;
optional int32 version = 2;
Expand Down Expand Up @@ -1474,6 +1511,12 @@ message VehicleTrack {
optional Track track = 2;
}

message TelemetrySnapshot {
optional Vehicle vehicle = 1 [(ugcs_field_id) = true];
optional int64 snapshotTime = 2 [(ugcs_field_posix_time) = true];
repeated Telemetry telemetry = 3;
}

//*****************************************************************************
// Events
//*****************************************************************************
Expand Down
34 changes: 33 additions & 1 deletion ucs-api/src/main/proto/Messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ syntax = "proto2";
option java_package = "com.ugcs.ucs.proto";
option java_outer_classname = "MessagesProto";
option (ugcs_protocol_major_version) = 1;
option (ugcs_protocol_minor_version) = 2;
option (ugcs_protocol_minor_version) = 7;

import "Options.proto";
import "Domain.proto";
Expand Down Expand Up @@ -85,6 +85,7 @@ message LicensePermissionsDto {
required bool kmlExport = 20;
optional int32 vehicleConnectionsLimit = 21;
optional bool dssClient = 22 [default = false];
repeated string forbiddenCommandCodes = 23;
}

message PlatformAndBooleanPairDto {
Expand Down Expand Up @@ -154,6 +155,10 @@ message PlatformParametersDto {
required PlatformParameters parameters = 2;
}

message PayloadParametersMappingDto {
required PayloadType payloadType = 1;
repeated PayloadParameterType parameterTypes = 2;
}
// Keys and values

message PlatformAndVehicleTypePairDto {
Expand Down Expand Up @@ -530,6 +535,7 @@ message GetRasterGridResponse {
required int32 height = 3;
required bool noData = 4;
}

//Request for elevation tiles in specified rectangle
message GetElevationTilesRequest {
required int32 clientId = 1;
Expand Down Expand Up @@ -685,6 +691,7 @@ message GetKmlRouteRepresentationRequest {
required string routeName = 2;
required VehicleProfile routeVehicleProfile = 3;
repeated Wgs84LocationDto waypoints = 4;
required KmlExportAltitudeMode altitudeMode = 5;
}
//Deprecated
message GetKmlRouteRepresentationResponse {
Expand All @@ -694,6 +701,7 @@ message GetKmlRouteRepresentationResponse {
message ExportRouteToKmlRequest {
required int32 clientId = 1;
optional ProcessedRoute route = 2;
required KmlExportAltitudeMode altitudeMode = 3;
}

message ExportRouteToKmlResponse {
Expand Down Expand Up @@ -938,6 +946,7 @@ message GetMappingRequest {
optional bool getFacadeScanPatterns = 9;
optional bool getAltitudeFrames = 10;
optional bool getPlatformParameters = 11;
optional bool getPayloadParameters = 12;
}

message GetMappingResponse {
Expand All @@ -951,6 +960,7 @@ message GetMappingResponse {
optional FacadeScanPatternsMappingDto facadeScanPaterrnsMapping = 9;
optional AltitudeFramesMappingDto altitudeFramesMapping = 10;
repeated PlatformParametersDto platformParameters = 11;
repeated PayloadParametersMappingDto payloadParameters = 12;
}

// Locks
Expand Down Expand Up @@ -1069,6 +1079,17 @@ message SplitRouteByDistanceResponse {
repeated Route parts = 1;
}

message SplitRouteByCorridorPointRequest {
required int32 clientId = 1;
required Route route = 2;
required int32 segmentIndex = 3;
required int32 pointIndex = 4;
}

message SplitRouteByCorridorPointResponse {
repeated Route parts = 1;
}

message JoinRouteRequest {
required int32 clientId = 1;
repeated Route parts = 2;
Expand Down Expand Up @@ -1136,3 +1157,14 @@ message UnsubscribeEventRequest {

message UnsubscribeEventResponse {
}

message GetTelemetrySnapshotRequest {
required int32 clientId = 1;
// list of vehicles to get snapshots for
repeated Vehicle vehicles = 2;
}

message GetTelemetrySnapshotResponse {
// list of vehicle telemetry snapshots
repeated TelemetrySnapshot snapshots = 1;
}
2 changes: 1 addition & 1 deletion ucs-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.ugcs</groupId>
<artifactId>ugcs-java-sdk</artifactId>
<version>4.2</version>
<version>4.12</version>
</parent>
<artifactId>ucs-client</artifactId>
<name>UCS Client</name>
Expand Down
5 changes: 3 additions & 2 deletions ucs-client/src/main/java/com/ugcs/ucs/client/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public Client(SocketAddress serverAddress) {
this.connector = new MinaConnector(
new MessageWrapperCodecFactory(new HciMessageMapping()),
1,
1);
1,
null);
}

public void addNotificationListener(ServerNotificationListener listener) {
Expand Down Expand Up @@ -183,4 +184,4 @@ public boolean select(Object message) {
&& !STATUS_MESSAGE_TYPES.contains(wrapper.getMessage().getClass());
}
}
}
}
Loading