api.CadPeriodicity */ class CadPeriodicity { /** * 1 second. * * Generated from protobuf enum SEC_1 = 0; */ const SEC_1 = 0; /** * 500 milliseconds * * Generated from protobuf enum MS_500 = 1; */ const MS_500 = 1; /** * 250 milliseconds * * Generated from protobuf enum MS_250 = 2; */ const MS_250 = 2; /** * 100 milliseconds * * Generated from protobuf enum MS_100 = 3; */ const MS_100 = 3; /** * 50 milliseconds * * Generated from protobuf enum MS_50 = 4; */ const MS_50 = 4; /** * 20 milliseconds * * Generated from protobuf enum MS_20 = 5; */ const MS_20 = 5; private static $valueToName = [ self::SEC_1 => 'SEC_1', self::MS_500 => 'MS_500', self::MS_250 => 'MS_250', self::MS_100 => 'MS_100', self::MS_50 => 'MS_50', self::MS_20 => 'MS_20', ]; 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); } }