<commit_before>/**
 * Copyright 2017, Digi International Inc.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, you can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */
package com.digi.xbee.api.models;

import java.util.HashMap;

/**
 * Enumerates the different modem status events. This enumeration list is 
 * intended to be used within the 
 * {@link com.digi.xbee.api.packet.common.ModemStatusPacket} packet.
 */
public enum ModemStatusEvent {

	// Enumeration elements
	STATUS_HARDWARE_RESET (0, "Device was reset"),
	STATUS_WATCHDOG_TIMER_RESET (1, "Watchdog timer was reset"),
	STATUS_JOINED_NETWORK (2, "Device joined to network"),
	STATUS_DISASSOCIATED (3, "Device disassociated"),
	STATUS_ERROR_SYNCHRONIZATION_LOST (4, "Configuration error/synchronization lost"),
	STATUS_COORDINATOR_REALIGNMENT (5, "Coordinator realignment"),
	STATUS_COORDINATOR_STARTED (6, "The coordinator started"),
	STATUS_NETWORK_SECURITY_KEY_UPDATED (7, "Network security key was updated"),
	STATUS_NETWORK_WOKE_UP (0x0B, "Network Woke Up"),
	STATUS_NETWORK_WENT_TO_SLEEP (0x0C, "Network Went To Sleep"),
	STATUS_VOLTAGE_SUPPLY_LIMIT_EXCEEDED (0x0D, "Voltage supply limit exceeded"),
	/** @since 1.2.0 */
	STATUS_DEVICE_CLOUD_CONNECTED (0x0E, "Device Cloud connected"),
	/** @since 1.2.0 */
	STATUS_DEVICE_CLOUD_DISCONNECTED (0x0F, "Device Cloud disconnected"),
	STATUS_MODEM_CONFIG_CHANGED_WHILE_JOINING (0x11, " Modem configuration changed while joining"),
	STATUS_ERROR_STACK (0x80, "Stack error"),
	STATUS_ERROR_AP_NOT_CONNECTED (0x82, "Send/join command issued without connecting from AP"),
	STATUS_ERROR_AP_NOT_FOUND (0x83, "Access point not found"),
	STATUS_ERROR_PSK_NOT_CONFIGURED (0x84, "PSK not configured"),
	STATUS_ERROR_SSID_NOT_FOUND (0x87, "SSID not found"),
	STATUS_ERROR_FAILED_JOIN_SECURITY (0x88, "Failed to join with security enabled"),
	STATUS_ERROR_INVALID_CHANNEL (0x8A, "Invalid channel"),
	STATUS_ERROR_FAILED_JOIN_AP (0x8E, "Failed to join access point"),
	STATUS_UNKNOWN (0xFF, "UNKNOWN");
	
	// Variables
	private final int id;
	
	private final String description;
	
	private final static HashMap<Integer, ModemStatusEvent> lookupTable = new HashMap<Integer, ModemStatusEvent>();
	
	static {<commit_msg>modem_status: add missing modem status codes<commit_after>/**
 * Copyright 2017-2019, Digi International Inc.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, you can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */
package com.digi.xbee.api.models;

import java.util.HashMap;

/**
 * Enumerates the different modem status events. This enumeration list is 
 * intended to be used within the 
 * {@link com.digi.xbee.api.packet.common.ModemStatusPacket} packet.
 */
public enum ModemStatusEvent {

	// Enumeration elements
	STATUS_HARDWARE_RESET (0, "Hardware reset"),
	STATUS_WATCHDOG_TIMER_RESET (1, "Watchdog reset"),
	STATUS_JOINED_NETWORK (2, "Device associated"),
	STATUS_DISASSOCIATED (3, "Device disassociated"),
	STATUS_ERROR_SYNCHRONIZATION_LOST (4, "Configuration error/synchronization lost"),
	STATUS_COORDINATOR_REALIGNMENT (5, "Coordinator realignment"),
	STATUS_COORDINATOR_STARTED (6, "The coordinator started"),
	STATUS_NETWORK_SECURITY_KEY_UPDATED (7, "Network security key was updated"),
	/** @since 1.3.0 */
	STATUS_SYNCH_SENT (8, "Reserved, see twiki"),
	/** @since 1.3.0 */
	STATUS_SYNCH_RX (9, "Reserved, see twiki"),
	/** @since 1.3.0 */
	STATUS_SYNCH_MISS (0x0A, "Reserved, see twiki"),
	STATUS_NETWORK_WOKE_UP (0x0B, "Network Woke Up"),
	STATUS_NETWORK_WENT_TO_SLEEP (0x0C, "Network Went To Sleep"),
	STATUS_VOLTAGE_SUPPLY_LIMIT_EXCEEDED (0x0D, "Overvoltage"),
	/** @since 1.2.0 */
	STATUS_DEVICE_CLOUD_CONNECTED (0x0E, "Device Cloud connected"),
	/** @since 1.2.0 */
	STATUS_DEVICE_CLOUD_DISCONNECTED (0x0F, "Device Cloud disconnected"),
	/** @since 1.3.0 */
	STATUS_MODEM_KEY_ESTABLISHMT_DONE (0x10, "Modem key established"),
	STATUS_MODEM_CONFIG_CHANGED_WHILE_JOINING (0x11, "Modem configuration changed while joining"),
	/** @since 1.3.0 */
	STATUS_ACESS_FAULT (0x12, "Access fault"),
	/** @since 1.3.0 */
	STATUS_FATAL_STACK_ERROR (0x13, "Fatal stack error"),
	/** @since 1.3.0 */
	STATUS_MODEM_PLKE_INITIATED (0x14, "PLKE table initiated"),
	/** @since 1.3.0 */
	STATUS_MODEM_PLKE_SUCCESS (0x15, "PLKE table success"),
	/** @since 1.3.0 */
	STATUS_MODEM_PLKE_TABLE_FULL (0x16, "PLKE table is full"),
	/** @since 1.3.0 */
	STATUS_MODEM_PLKE_NOT_AUTHORIZED (0x17, "PLKE Not authorized"),
	/** @since 1.3.0 */
	STATUS_MODEM_PLKE_INVALID_TC_REQ (0x18, "PLKE Invalid Trust Center Request"),
	/** @since 1.3.0 */
	STATUS_MODEM_PLKE_TC_UPDATE_FAIL (0x19, "PLKE Trust Center update fail"),
	/** @since 1.3.0 */
	STATUS_MODEM_PLKE_BAD_EUI64 (0x1A, "PLKE Bad EUI address"),
	/** @since 1.3.0 */
	STATUS_MODEM_PLKE_LK_REJECTED (0x1B, "PLKE Link Key rejected"),
	/** @since 1.3.0 */
	STATUS_MODEM_PLKE_UPDATE (0x1C, "PLKE update occurred"),
	/** @since 1.3.0 */
	STATUS_MODEM_PLKE_CLEAR_LK_TABLE (0x1D, "PLKE Link Key table clear"),
	/** @since 1.3.0 */
	STATUS_MODEM_FREQUENCY_AGILITY (0x1E, "Zigbee Frequency agility has requested channel change"),
	/** @since 1.3.0 */
	STATUS_MODEM_FR_NOASSOC (0x1F, "Zigbee special case execute ATFR when there's no joinable beacon responses after 60 seconds"),
	/** @since 1.3.0 */
	STATUS_MODEM_TOKENS_RECOVERED (0x20, "Zigbee tokens space recovered"),
	/** @since 1.3.0 */
	STATUS_MODEM_TOKENS_UNRECOVERABLE (0x21, "Zigbee tokens space unrecoverable"),
	/** @since 1.3.0 */
	STATUS_MODEM_TOKENS_CORRUPTED (0x22, "Zigbee tokens space corrupted"),
	/** @since 1.3.0 */
	STATUS_MODEM_METAFRAME_ERROR (0x30, "Zigbee Dual Mode metaframe error"),
	/** @since 1.3.0 */
	STATUS_BLE_CONNECT (0x32, "BLE Connect"),
	/** @since 1.3.0 */
	STATUS_BLE_DISCONNECT (0x33, "BLE Disconnect"),
	/** @since 1.3.0 */
	STATUS_BANDMASK_CONFIG_FAILED (0x34, "Bandmask Configuration Failed"),
	STATUS_ERROR_STACK (0x80, "Stack reset"),
	/** @since 1.3.0 */
	STATUS_FIB_BOOTLOADER_RESET (0x81, "FIB Bootloader reset"),
	STATUS_ERROR_AP_NOT_CONNECTED (0x82, "Send/join command issued without connecting from AP"),
	STATUS_ERROR_AP_NOT_FOUND (0x83, "Access point not found"),
	STATUS_ERROR_PSK_NOT_CONFIGURED (0x84, "PSK not configured"),
	STATUS_ERROR_SSID_NOT_FOUND (0x87, "SSID not found"),
	STATUS_ERROR_FAILED_JOIN_SECURITY (0x88, "Failed to join with security enabled"),
	/** @since 1.3.0 */
	STATUS_CORE_LOCKUP_FAILURE (0x89, "Core lockup or crystal failure reset"),
	STATUS_ERROR_INVALID_CHANNEL (0x8A, "Invalid channel"),
	/** @since 1.3.0 */
	STATUS_LOW_VCC_RESET (0x8B, "Low Vcc reset"),
	STATUS_ERROR_FAILED_JOIN_AP (0x8E, "Failed to join access point"),
	STATUS_UNKNOWN (0xFF, "UNKNOWN");
	
	// Variables
	private final int id;
	
	private final String description;
	
	private final static HashMap<Integer, ModemStatusEvent> lookupTable = new HashMap<Integer, ModemStatusEvent>();
	
	static {
{'fraction_non_alphanumeric': 0.11072664359861592, 'fraction_numerical': 0.03460207612456748, 'mean_word_length': 5.117157974300832, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5629545', 'n_tokens_mistral': 2987, 'n_tokens_neox': 2823, 'n_words': 814}