-
Notifications
You must be signed in to change notification settings - Fork 309
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)
* feat(api): added gnss type data to PositionService Signed-off-by: SimoneFiorani <simone.fiorani@abinsula.com> * test: added tests Signed-off-by: SimoneFiorani <simone.fiorani@abinsula.com> * refactor: moved GNSSType enum to api bundle Signed-off-by: SimoneFiorani <simone.fiorani@abinsula.com> * refactor: removed testing logger Signed-off-by: SimoneFiorani <simone.fiorani@abinsula.com> * refactor: refactored gnsstype Signed-off-by: SimoneFiorani <simone.fiorani@abinsula.com> * refactor: updated with suggestions Signed-off-by: SimoneFiorani <simone.fiorani@abinsula.com> * fix: fixed line length Signed-off-by: SimoneFiorani <simone.fiorani@abinsula.com> * Update kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/position/PositionService.java Co-authored-by: Mattia Dal Ben <mattdibi@users.noreply.github.com> * Update GNSSType.java --------- Signed-off-by: SimoneFiorani <simone.fiorani@abinsula.com> Co-authored-by: Mattia Dal Ben <mattdibi@users.noreply.github.com>
- 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.