gw.CodeRate */ class CodeRate { /** * Generated from protobuf enum CR_UNDEFINED = 0; */ const CR_UNDEFINED = 0; /** * LoRa * * Generated from protobuf enum CR_4_5 = 1; */ const CR_4_5 = 1; /** * Generated from protobuf enum CR_4_6 = 2; */ const CR_4_6 = 2; /** * Generated from protobuf enum CR_4_7 = 3; */ const CR_4_7 = 3; /** * Generated from protobuf enum CR_4_8 = 4; */ const CR_4_8 = 4; /** * LR-FHSS * * Generated from protobuf enum CR_3_8 = 5; */ const CR_3_8 = 5; /** * Generated from protobuf enum CR_2_6 = 6; */ const CR_2_6 = 6; /** * Generated from protobuf enum CR_1_4 = 7; */ const CR_1_4 = 7; /** * Generated from protobuf enum CR_1_6 = 8; */ const CR_1_6 = 8; /** * Generated from protobuf enum CR_5_6 = 9; */ const CR_5_6 = 9; /** * LoRa 2.4 gHz * * Generated from protobuf enum CR_LI_4_5 = 10; */ const CR_LI_4_5 = 10; /** * Generated from protobuf enum CR_LI_4_6 = 11; */ const CR_LI_4_6 = 11; /** * Generated from protobuf enum CR_LI_4_8 = 12; */ const CR_LI_4_8 = 12; private static $valueToName = [ self::CR_UNDEFINED => 'CR_UNDEFINED', self::CR_4_5 => 'CR_4_5', self::CR_4_6 => 'CR_4_6', self::CR_4_7 => 'CR_4_7', self::CR_4_8 => 'CR_4_8', self::CR_3_8 => 'CR_3_8', self::CR_2_6 => 'CR_2_6', self::CR_1_4 => 'CR_1_4', self::CR_1_6 => 'CR_1_6', self::CR_5_6 => 'CR_5_6', self::CR_LI_4_5 => 'CR_LI_4_5', self::CR_LI_4_6 => 'CR_LI_4_6', self::CR_LI_4_8 => 'CR_LI_4_8', ]; 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); } }