-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): added gnss type data to PositionService (#5381) [backport …
…release-5.6.0] (#5407) feat(api): added gnss type data to PositionService (#5381) * feat(api): added gnss type data to PositionService Signed-off-by: SimoneFiorani <[email protected]> * test: added tests Signed-off-by: SimoneFiorani <[email protected]> * refactor: moved GNSSType enum to api bundle Signed-off-by: SimoneFiorani <[email protected]> * refactor: removed testing logger Signed-off-by: SimoneFiorani <[email protected]> * refactor: refactored gnsstype Signed-off-by: SimoneFiorani <[email protected]> * refactor: updated with suggestions Signed-off-by: SimoneFiorani <[email protected]> * fix: fixed line length Signed-off-by: SimoneFiorani <[email protected]> * Update kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/position/PositionService.java Co-authored-by: Mattia Dal Ben <[email protected]> * Update GNSSType.java --------- Signed-off-by: SimoneFiorani <[email protected]> Co-authored-by: Mattia Dal Ben <[email protected]> (cherry picked from commit 51fcd57)
- Loading branch information
Showing
17 changed files
with
249 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/position/GNSSType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.eclipse.kura.position; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public enum GNSSType { | ||
UNKNOWN("Unknown"), | ||
OTHER("Other"), | ||
BEIDOU("Beidou"), | ||
GALILEO("Galileo"), | ||
GLONASS("Glonass"), | ||
GPS("Gps"), | ||
IRNSS("IRNSS"), | ||
QZSS("QZSS"); | ||
|
||
private String value; | ||
|
||
private static Map<String, GNSSType> valuesMap = new HashMap<>(); | ||
|
||
static { | ||
for (GNSSType type : GNSSType.values()) { | ||
valuesMap.put(type.getValue(), type); | ||
} | ||
} | ||
|
||
private GNSSType(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String getValue() { | ||
return this.value; | ||
} | ||
|
||
public static GNSSType fromValue(String value) { | ||
return valuesMap.get(value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.