gw.DownlinkTiming */ class DownlinkTiming { /** * Send the downlink immediately. * * Generated from protobuf enum IMMEDIATELY = 0; */ const IMMEDIATELY = 0; /** * Send downlink at the given delay (based on provided context). * * Generated from protobuf enum DELAY = 1; */ const DELAY = 1; /** * Send at given GPS epoch value. * * Generated from protobuf enum GPS_EPOCH = 2; */ const GPS_EPOCH = 2; private static $valueToName = [ self::IMMEDIATELY => 'IMMEDIATELY', self::DELAY => 'DELAY', self::GPS_EPOCH => 'GPS_EPOCH', ]; 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); } }