mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-04-26 05:49:51 +00:00
88 lines
2.2 KiB
PHP
Vendored
88 lines
2.2 KiB
PHP
Vendored
<?php
|
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
# source: common/common.proto
|
|
|
|
namespace Chirpstack\Common;
|
|
|
|
use UnexpectedValueException;
|
|
|
|
/**
|
|
* Protobuf type <code>common.LocationSource</code>
|
|
*/
|
|
class LocationSource
|
|
{
|
|
/**
|
|
* Unknown.
|
|
*
|
|
* Generated from protobuf enum <code>UNKNOWN = 0;</code>
|
|
*/
|
|
const UNKNOWN = 0;
|
|
/**
|
|
* GPS.
|
|
*
|
|
* Generated from protobuf enum <code>GPS = 1;</code>
|
|
*/
|
|
const GPS = 1;
|
|
/**
|
|
* Manually configured.
|
|
*
|
|
* Generated from protobuf enum <code>CONFIG = 2;</code>
|
|
*/
|
|
const CONFIG = 2;
|
|
/**
|
|
* Geo resolver (TDOA).
|
|
*
|
|
* Generated from protobuf enum <code>GEO_RESOLVER_TDOA = 3;</code>
|
|
*/
|
|
const GEO_RESOLVER_TDOA = 3;
|
|
/**
|
|
* Geo resolver (RSSI).
|
|
*
|
|
* Generated from protobuf enum <code>GEO_RESOLVER_RSSI = 4;</code>
|
|
*/
|
|
const GEO_RESOLVER_RSSI = 4;
|
|
/**
|
|
* Geo resolver (GNSS).
|
|
*
|
|
* Generated from protobuf enum <code>GEO_RESOLVER_GNSS = 5;</code>
|
|
*/
|
|
const GEO_RESOLVER_GNSS = 5;
|
|
/**
|
|
* Geo resolver (WIFI).
|
|
*
|
|
* Generated from protobuf enum <code>GEO_RESOLVER_WIFI = 6;</code>
|
|
*/
|
|
const GEO_RESOLVER_WIFI = 6;
|
|
|
|
private static $valueToName = [
|
|
self::UNKNOWN => 'UNKNOWN',
|
|
self::GPS => 'GPS',
|
|
self::CONFIG => 'CONFIG',
|
|
self::GEO_RESOLVER_TDOA => 'GEO_RESOLVER_TDOA',
|
|
self::GEO_RESOLVER_RSSI => 'GEO_RESOLVER_RSSI',
|
|
self::GEO_RESOLVER_GNSS => 'GEO_RESOLVER_GNSS',
|
|
self::GEO_RESOLVER_WIFI => 'GEO_RESOLVER_WIFI',
|
|
];
|
|
|
|
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);
|
|
}
|
|
}
|
|
|