Skip to content

Commit

Permalink
Add Motorola Failsoft LC opcode $02
Browse files Browse the repository at this point in the history
This is broadcast on channels when a site is in failsoft operation (site controller has failed or too few channels are functional to operate in trunking mode).
  • Loading branch information
ilyacodes committed Dec 5, 2024
1 parent 4cf5140 commit 4b3e0be
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1984,6 +1984,9 @@ private void processLC(LinkControlWord lcw, long timestamp, boolean isTerminator
case MOTOROLA_GROUP_REGROUP_VOICE_CHANNEL_UPDATE:
//Voice Channel Update message - indicates calls in-progress on another channel - ignored
break;
case MOTOROLA_FAILSOFT:
//Ignore - there's nothing we can do with failsoft
break;
case MOTOROLA_TALKER_ALIAS_HEADER:
case MOTOROLA_TALKER_ALIAS_DATA_BLOCK:
//Inore - we'll pickup the talker alias from the assembler in the MessageProcessor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public enum LinkControlOpcode

MOTOROLA_GROUP_REGROUP_VOICE_CHANNEL_USER("MOTOROLA GROUP REGROUP VOICE CHANNEL USER", 0),
MOTOROLA_GROUP_REGROUP_VOICE_CHANNEL_UPDATE("MOTOROLA GROUP REGROUP VOICE CHANNEL UPDATE", 1),
MOTOROLA_FAILSOFT("MOTOROLA FAILSOFT", 2),
MOTOROLA_GROUP_REGROUP_ADD("MOTOROLA GROUP REGROUP ADD", 3),
MOTOROLA_GROUP_REGROUP_DELETE("MOTOROLA GROUP REGROUP DELETE", 4),
MOTOROLA_UNIT_GPS("MOTOROLA UNIT GPS", 6),
Expand Down Expand Up @@ -241,6 +242,8 @@ public static LinkControlOpcode fromValue(int value, Vendor vendor)
return MOTOROLA_GROUP_REGROUP_VOICE_CHANNEL_USER;
case 1:
return MOTOROLA_GROUP_REGROUP_VOICE_CHANNEL_UPDATE;
case 2:
return MOTOROLA_FAILSOFT;
case 3:
return MOTOROLA_GROUP_REGROUP_ADD;
case 4:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import io.github.dsheirer.module.decode.p25.phase1.message.lc.l3harris.LCHarrisUnknownOpcode42;
import io.github.dsheirer.module.decode.p25.phase1.message.lc.l3harris.LCHarrisUnknownOpcode43;
import io.github.dsheirer.module.decode.p25.phase1.message.lc.motorola.LCMotorolaEmergencyAlarmActivation;
import io.github.dsheirer.module.decode.p25.phase1.message.lc.motorola.LCMotorolaFailsoft;
import io.github.dsheirer.module.decode.p25.phase1.message.lc.motorola.LCMotorolaGroupGroupDelete;
import io.github.dsheirer.module.decode.p25.phase1.message.lc.motorola.LCMotorolaGroupRegroupAdd;
import io.github.dsheirer.module.decode.p25.phase1.message.lc.motorola.LCMotorolaGroupRegroupVoiceChannelUpdate;
Expand Down Expand Up @@ -175,6 +176,8 @@ public static LinkControlWord create(CorrectedBinaryMessage message, long timest
case L3HARRIS_UNKNOWN:
return new UnknownLinkControlWord(message);

case MOTOROLA_FAILSOFT:
return new LCMotorolaFailsoft(message);
case MOTOROLA_GROUP_REGROUP_ADD:
return new LCMotorolaGroupRegroupAdd(message);
case MOTOROLA_GROUP_REGROUP_DELETE:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* *****************************************************************************
* Copyright (C) 2014-2024 Dennis Sheirer, 2024 Ilya Smirnov
*
* 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.p25.phase1.message.lc.motorola;

import io.github.dsheirer.bits.CorrectedBinaryMessage;
import io.github.dsheirer.identifier.Identifier;
import io.github.dsheirer.module.decode.p25.phase1.message.lc.LinkControlWord;
import java.util.Collections;
import java.util.List;

/**
* Failsoft operation.
*/
public class LCMotorolaFailsoft extends LinkControlWord
{
/**
* Constructs a Link Control Word from the binary message sequence.
*
* @param message
*/
public LCMotorolaFailsoft(CorrectedBinaryMessage message)
{
super(message);
}

@Override
public List<Identifier> getIdentifiers()
{
return Collections.EMPTY_LIST;
}

@Override
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append(" MOTOROLA FAILSOFT:");
sb.append(" MSG:").append(getMessage().toHexString());
return sb.toString();
}
}

0 comments on commit 4b3e0be

Please sign in to comment.