-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1759 from DSheirer/1758-l3h-talker-alias-gps
#1758 P25 Phase 2 L3Harris Talker Alias and GPS Report.
- Loading branch information
Showing
8 changed files
with
573 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
src/main/java/io/github/dsheirer/identifier/alias/P25TalkerAliasIdentifier.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,54 @@ | ||
/* | ||
* ***************************************************************************** | ||
* Copyright (C) 2014-2023 Dennis Sheirer | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/> | ||
* **************************************************************************** | ||
*/ | ||
|
||
package io.github.dsheirer.identifier.alias; | ||
|
||
import io.github.dsheirer.protocol.Protocol; | ||
|
||
/** | ||
* Talker alias value provided by the network for the current talker (ie FROM). | ||
*/ | ||
public class P25TalkerAliasIdentifier extends TalkerAliasIdentifier | ||
{ | ||
/** | ||
* Constructs an instance. | ||
* @param value of the talker alias | ||
*/ | ||
public P25TalkerAliasIdentifier(String value) | ||
{ | ||
super(value); | ||
} | ||
|
||
@Override | ||
public boolean isValid() | ||
{ | ||
return getValue() != null && !getValue().isEmpty(); | ||
} | ||
|
||
@Override | ||
public Protocol getProtocol() | ||
{ | ||
return Protocol.APCO25; | ||
} | ||
|
||
public static P25TalkerAliasIdentifier create(String value) | ||
{ | ||
return new P25TalkerAliasIdentifier(value); | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
src/main/java/io/github/dsheirer/module/decode/dmr/identifier/P25Location.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,60 @@ | ||
/* | ||
* ***************************************************************************** | ||
* Copyright (C) 2014-2023 Dennis Sheirer | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/> | ||
* **************************************************************************** | ||
*/ | ||
|
||
package io.github.dsheirer.module.decode.dmr.identifier; | ||
|
||
import io.github.dsheirer.identifier.Role; | ||
import io.github.dsheirer.identifier.location.LocationIdentifier; | ||
import io.github.dsheirer.identifier.location.Point; | ||
import io.github.dsheirer.protocol.Protocol; | ||
|
||
/** | ||
* P25 location identifier for user radio reported GPS positions. | ||
*/ | ||
public class P25Location extends LocationIdentifier | ||
{ | ||
/** | ||
* Constructs an instance | ||
* | ||
* @param value location | ||
* @param role to or from | ||
*/ | ||
public P25Location(Point value, Role role) | ||
{ | ||
super(value, role); | ||
} | ||
|
||
@Override | ||
public Protocol getProtocol() | ||
{ | ||
return Protocol.APCO25; | ||
} | ||
|
||
/** | ||
* Utility method to create a new DMR location | ||
* @param latitude of the position | ||
* @param longitude of the position | ||
* @return constructed DMR location identifier | ||
*/ | ||
public static P25Location createFrom(double latitude, double longitude) | ||
{ | ||
Point point = new Point(latitude, longitude); | ||
return new P25Location(point, Role.FROM); | ||
} | ||
} |
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.