2024-06-25 12:27:28 +01:00

117 lines
3.2 KiB
PHP
Vendored

<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: integration/integration.proto
namespace Chirpstack\Integration;
use UnexpectedValueException;
/**
* Protobuf type <code>integration.LogCode</code>
*/
class LogCode
{
/**
* Unknown type.
*
* Generated from protobuf enum <code>UNKNOWN = 0;</code>
*/
const UNKNOWN = 0;
/**
* Error related to the downlink payload size.
* Usually seen when the payload exceeded the maximum allowed payload size.
*
* Generated from protobuf enum <code>DOWNLINK_PAYLOAD_SIZE = 1;</code>
*/
const DOWNLINK_PAYLOAD_SIZE = 1;
/**
* Uplink codec error.
*
* Generated from protobuf enum <code>UPLINK_CODEC = 2;</code>
*/
const UPLINK_CODEC = 2;
/**
* Downlink codec error.
*
* Generated from protobuf enum <code>DOWNLINK_CODEC = 3;</code>
*/
const DOWNLINK_CODEC = 3;
/**
* OTAA error.
*
* Generated from protobuf enum <code>OTAA = 4;</code>
*/
const OTAA = 4;
/**
* Uplink frame-counter was reset.
*
* Generated from protobuf enum <code>UPLINK_F_CNT_RESET = 5;</code>
*/
const UPLINK_F_CNT_RESET = 5;
/**
* Uplink MIC error.
*
* Generated from protobuf enum <code>UPLINK_MIC = 6;</code>
*/
const UPLINK_MIC = 6;
/**
* Uplink frame-counter retransmission.
*
* Generated from protobuf enum <code>UPLINK_F_CNT_RETRANSMISSION = 7;</code>
*/
const UPLINK_F_CNT_RETRANSMISSION = 7;
/**
* Downlink gateway error.
*
* Generated from protobuf enum <code>DOWNLINK_GATEWAY = 8;</code>
*/
const DOWNLINK_GATEWAY = 8;
/**
* Relay new end-device.
*
* Generated from protobuf enum <code>RELAY_NEW_END_DEVICE = 9;</code>
*/
const RELAY_NEW_END_DEVICE = 9;
/**
* Downlink frame-counter.
*
* Generated from protobuf enum <code>F_CNT_DOWN = 10;</code>
*/
const F_CNT_DOWN = 10;
private static $valueToName = [
self::UNKNOWN => 'UNKNOWN',
self::DOWNLINK_PAYLOAD_SIZE => 'DOWNLINK_PAYLOAD_SIZE',
self::UPLINK_CODEC => 'UPLINK_CODEC',
self::DOWNLINK_CODEC => 'DOWNLINK_CODEC',
self::OTAA => 'OTAA',
self::UPLINK_F_CNT_RESET => 'UPLINK_F_CNT_RESET',
self::UPLINK_MIC => 'UPLINK_MIC',
self::UPLINK_F_CNT_RETRANSMISSION => 'UPLINK_F_CNT_RETRANSMISSION',
self::DOWNLINK_GATEWAY => 'DOWNLINK_GATEWAY',
self::RELAY_NEW_END_DEVICE => 'RELAY_NEW_END_DEVICE',
self::F_CNT_DOWN => 'F_CNT_DOWN',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}