Skip to content

Commit

Permalink
Merge pull request #1764 from DSheirer/1760-dmr-vendor-ids
Browse files Browse the repository at this point in the history
#1760 Update DMR vendor enumeration.
  • Loading branch information
DSheirer authored Dec 14, 2023
2 parents 526c960 + a199f03 commit f0cfbb8
Showing 1 changed file with 33 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* *****************************************************************************
* Copyright (C) 2014-2020 Dennis Sheirer
* 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
Expand Down Expand Up @@ -33,43 +33,70 @@ public enum Vendor
MOTOROLA_CONNECT_PLUS(6, "MOTOROLA CON+"),
RADIO_DATA_GMBH(7, "RADIO DATA GMBH"),
HYTERA_8(8, "HYTERA"),
ASELSAN(9, "ASELSAN"),
KIRISUN(10, "KIRISUN"),
DMR_ASSOCIATION(11, "DMR ASSOCIATION"),
SEPURA(12, "SEPURA"),
ITALIA_RED_CROSS(13, "ITALIA RED CROSS"),
MOTOROLA_CAPACITY_PLUS(16, "MOTOROLA CAP+"),
EMC_SPA_19(19, "EMC SPA"),
EMC_SPA_28(28, "EMC SPA"),
RADIO_ACTIVITY_SRL_51(51, "RADIO ACTIVITY SRL"),
RADIO_ACTIVITY_SRL_60(60, "RADIO ACTIVITY SRL"),
MINISTERO_DELL_INTERNO(19, "ITALY MIN INTERIOR"),
EMC_COMM_SRL_28(28, "EMC COMM SRL 28"),
EMC_COMM_SRL_32(32, "EMC COMM SRL 32"),
JVC_KENWOOD(51, "JVC-KENWOOD"),
RADIO_ACTIVITY_SRL(60, "RADIO ACTIVITY SRL"),
ZTE_TRUNKING(84, "ZTE TRUNKING"),
TAIT(88, "TAIT"),
HYTERA_68(104, "HYTERA"),
VERTEX_STANDARD(119, "VERTEX STANDARD"),
SIMOCO(120, "SIMOCO"),
TEST(121, "TEST"),
HYTERA_88(136, "HYTERA"),
UNKNOWN(-1, "UNKNOWN");

private int mValue;
private String mLabel;

/**
* Constructs an instance
* @param value decimal for the vendor
* @param label for pretty print
*/
Vendor(int value, String label)
{
mValue = value;
mLabel = label;
}

/**
* Vendor ID value
* @return value
*/
public int getValue()
{
return mValue;
}

/**
* Pretty print label
* @return label
*/
public String getLabel()
{
return mLabel;
}

/**
* Overrides default to use the label value instead.
* @return string representation.
*/
@Override
public String toString()
{
return getLabel();
}

/**
* Map of integer values to corresponding vendor entries
* Quick lookup map of integer values to corresponding vendor entries
*/
private static final Map<Integer,Vendor> LOOKUP_MAP = new TreeMap<>();

Expand Down

0 comments on commit f0cfbb8

Please sign in to comment.