Resovles #721 Suppress RID values of 0. (#723)

Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
Denny Sheirer
2020-04-01 09:05:28 +00:00
committed by GitHub
parent 85c27a6cca
commit fdecac4230
3 changed files with 13 additions and 28 deletions

View File

@@ -37,6 +37,6 @@ public abstract class RadioIdentifier extends IntegerIdentifier
@Override @Override
public boolean isValid() public boolean isValid()
{ {
return getValue() >= 0; return getValue() > 0;
} }
} }

View File

@@ -24,7 +24,7 @@ package io.github.dsheirer.module.decode.p25.phase1.message.lc.motorola;
import io.github.dsheirer.bits.BinaryMessage; import io.github.dsheirer.bits.BinaryMessage;
import io.github.dsheirer.identifier.Identifier; import io.github.dsheirer.identifier.Identifier;
import io.github.dsheirer.module.decode.p25.identifier.talkgroup.APCO25Talkgroup; import io.github.dsheirer.module.decode.p25.identifier.radio.APCO25RadioIdentifier;
import io.github.dsheirer.module.decode.p25.phase1.message.lc.LinkControlWord; import io.github.dsheirer.module.decode.p25.phase1.message.lc.LinkControlWord;
import java.util.ArrayList; import java.util.ArrayList;
@@ -94,7 +94,7 @@ public class LCMotorolaTalkComplete extends LinkControlWord
{ {
if(mAddress == null) if(mAddress == null)
{ {
mAddress = APCO25Talkgroup.create(getMessage().getInt(ADDRESS)); mAddress = APCO25RadioIdentifier.createFrom(getMessage().getInt(ADDRESS));
} }
return mAddress; return mAddress;

View File

@@ -336,11 +336,8 @@ public class P25P2DecoderState extends TimeslotDecoderState implements Identifie
for(Identifier identifier : mac.getIdentifiers()) for(Identifier identifier : mac.getIdentifiers())
{ {
if(!(identifier.getForm() == Form.TALKGROUP && identifier.getRole() == Role.FROM)) //Add to the identifier collection after filtering through the patch group manager
{ getIdentifierCollection().update(mPatchGroupManager.update(identifier));
//Add to the identifier collection after filtering through the patch group manager
getIdentifierCollection().update(mPatchGroupManager.update(identifier));
}
} }
} }
else else
@@ -373,11 +370,8 @@ public class P25P2DecoderState extends TimeslotDecoderState implements Identifie
for(Identifier identifier : mac.getIdentifiers()) for(Identifier identifier : mac.getIdentifiers())
{ {
if(!(identifier.getForm() == Form.TALKGROUP && identifier.getRole() == Role.FROM)) //Add to the identifier collection after filtering through the patch group manager
{ getIdentifierCollection().update(mPatchGroupManager.update(identifier));
//Add to the identifier collection after filtering through the patch group manager
getIdentifierCollection().update(mPatchGroupManager.update(identifier));
}
} }
} }
else else
@@ -410,11 +404,8 @@ public class P25P2DecoderState extends TimeslotDecoderState implements Identifie
for(Identifier identifier : mac.getIdentifiers()) for(Identifier identifier : mac.getIdentifiers())
{ {
if(!(identifier.getForm() == Form.TALKGROUP && identifier.getRole() == Role.FROM)) //Add to the identifier collection after filtering through the patch group manager
{ getIdentifierCollection().update(mPatchGroupManager.update(identifier));
//Add to the identifier collection after filtering through the patch group manager
getIdentifierCollection().update(mPatchGroupManager.update(identifier));
}
} }
} }
else else
@@ -447,11 +438,8 @@ public class P25P2DecoderState extends TimeslotDecoderState implements Identifie
for(Identifier identifier : mac.getIdentifiers()) for(Identifier identifier : mac.getIdentifiers())
{ {
if(!(identifier.getForm() == Form.TALKGROUP && identifier.getRole() == Role.FROM)) //Add to the identifier collection after filtering through the patch group manager
{ getIdentifierCollection().update(mPatchGroupManager.update(identifier));
//Add to the identifier collection after filtering through the patch group manager
getIdentifierCollection().update(mPatchGroupManager.update(identifier));
}
} }
} }
else else
@@ -484,11 +472,8 @@ public class P25P2DecoderState extends TimeslotDecoderState implements Identifie
for(Identifier identifier : mac.getIdentifiers()) for(Identifier identifier : mac.getIdentifiers())
{ {
if(!(identifier.getForm() == Form.TALKGROUP && identifier.getRole() == Role.FROM)) //Add to the identifier collection after filtering through the patch group manager
{ getIdentifierCollection().update(mPatchGroupManager.update(identifier));
//Add to the identifier collection after filtering through the patch group manager
getIdentifierCollection().update(mPatchGroupManager.update(identifier));
}
} }
} }
else else