BaseFieldInfo

class lsst.ts.MTMount.field_info.BaseFieldInfo(name, doc, dtype, default=None)

Bases: object

Information about one field of a message.

Parameters:
name : str

Name of field. Must be a valid Python identifier.

doc : str

Description of the field.

default : any or None (optional)

Default value (using the native type of this FieldInfo). If None then this field must be specified when constructing a command or reply.

dtype : class

Data type.

Attributes Summary

default

Methods Summary

assert_value_ok(value)
str_from_value(value) Return a string representation of the value.
value_from_str(strval) Convert a string to a value of the correct type.

Attributes Documentation

default

Methods Documentation

assert_value_ok(value)
str_from_value(value)

Return a string representation of the value.

value_from_str(strval)

Convert a string to a value of the correct type.

Parameters:
strval : str

String representation of value.

Returns:
value : any

The parsed value.

Raises:
ValueError

If the value cannot be parsed.