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

125 lines
3.5 KiB
PHP
Vendored

<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: gw/gw.proto
namespace Chirpstack\Gateway;
use UnexpectedValueException;
/**
* Protobuf type <code>gw.TxAckStatus</code>
*/
class TxAckStatus
{
/**
* Ignored (when a previous item was already emitted).
*
* Generated from protobuf enum <code>IGNORED = 0;</code>
*/
const IGNORED = 0;
/**
* Packet has been programmed for downlink.
*
* Generated from protobuf enum <code>OK = 1;</code>
*/
const OK = 1;
/**
* Rejected because it was already too late to program this packet for
* downlink.
*
* Generated from protobuf enum <code>TOO_LATE = 2;</code>
*/
const TOO_LATE = 2;
/**
* Rejected because downlink packet timestamp is too much in advance.
*
* Generated from protobuf enum <code>TOO_EARLY = 3;</code>
*/
const TOO_EARLY = 3;
/**
* Rejected because there was already a packet programmed in requested
* timeframe.
*
* Generated from protobuf enum <code>COLLISION_PACKET = 4;</code>
*/
const COLLISION_PACKET = 4;
/**
* Rejected because there was already a beacon planned in requested timeframe.
*
* Generated from protobuf enum <code>COLLISION_BEACON = 5;</code>
*/
const COLLISION_BEACON = 5;
/**
* Rejected because requested frequency is not supported by TX RF chain.
*
* Generated from protobuf enum <code>TX_FREQ = 6;</code>
*/
const TX_FREQ = 6;
/**
* Rejected because requested power is not supported by gateway.
*
* Generated from protobuf enum <code>TX_POWER = 7;</code>
*/
const TX_POWER = 7;
/**
* Rejected because GPS is unlocked, so GPS timestamp cannot be used.
*
* Generated from protobuf enum <code>GPS_UNLOCKED = 8;</code>
*/
const GPS_UNLOCKED = 8;
/**
* Downlink queue is full.
*
* Generated from protobuf enum <code>QUEUE_FULL = 9;</code>
*/
const QUEUE_FULL = 9;
/**
* Internal error.
*
* Generated from protobuf enum <code>INTERNAL_ERROR = 10;</code>
*/
const INTERNAL_ERROR = 10;
/**
* Duty-cycle overflow.
*
* Generated from protobuf enum <code>DUTY_CYCLE_OVERFLOW = 11;</code>
*/
const DUTY_CYCLE_OVERFLOW = 11;
private static $valueToName = [
self::IGNORED => 'IGNORED',
self::OK => 'OK',
self::TOO_LATE => 'TOO_LATE',
self::TOO_EARLY => 'TOO_EARLY',
self::COLLISION_PACKET => 'COLLISION_PACKET',
self::COLLISION_BEACON => 'COLLISION_BEACON',
self::TX_FREQ => 'TX_FREQ',
self::TX_POWER => 'TX_POWER',
self::GPS_UNLOCKED => 'GPS_UNLOCKED',
self::QUEUE_FULL => 'QUEUE_FULL',
self::INTERNAL_ERROR => 'INTERNAL_ERROR',
self::DUTY_CYCLE_OVERFLOW => 'DUTY_CYCLE_OVERFLOW',
];
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);
}
}