Classes | |
class | ArrayType |
class | Attribute |
class | CompoundType |
class | Constant |
class | Field |
class | Parser |
class | PrimitiveType |
class | Type |
class | VoidType |
Functions | |
def | bitlen_to_bytelen (x) |
def | enforce (cond, fmt, *args) |
def | error (fmt, *args) |
def | evaluate_expression (expression) |
def | parse_namespaces (source_dirs, search_dirs=None) |
def | validate_attribute_name (name) |
def | validate_compound_type_full_name (name) |
def | validate_data_type_id (t) |
def | validate_namespace_name (name) |
def | validate_search_directories (dirnames) |
def | validate_union (t) |
Variables | |
logger = getLogger(__name__) | |
long = int | |
int | MAX_FULL_TYPE_NAME_LEN = 80 |
int | MESSAGE_DATA_TYPE_ID_MAX = 65535 |
int | SERVICE_DATA_TYPE_ID_MAX = 255 |
str = unicode | |
def pyuavcan_v0.dsdl.parser.evaluate_expression | ( | expression | ) |
def pyuavcan_v0.dsdl.parser.parse_namespaces | ( | source_dirs, | |
search_dirs = None |
|||
) |
Use only this function to parse DSDL definitions. This function takes a list of root namespace directories (containing DSDL definition files to parse) and an optional list of search directories (containing DSDL definition files that can be referenced from the types that are going to be parsed). Returns the list of parsed type definitions, where type of each element is CompoundType. Args: source_dirs: List of root namespace directories to parse. search_dirs: List of root namespace directories with referenced types (optional). This list is automatically extended with source_dirs. Example: >>> import pyuavcan_v0 >>> a = pyuavcan_v0.dsdl.parse_namespaces(['../dsdl/uavcan']) >>> len(a) 77 >>> a[0] pyuavcan_v0.Timestamp >>> a[0].fields [truncated uint48 husec] >>> a[0].constants [saturated uint48 UNKNOWN = 0, saturated uint48 USEC_PER_LSB = 100]
def pyuavcan_v0.dsdl.parser.validate_attribute_name | ( | name | ) |
def pyuavcan_v0.dsdl.parser.validate_compound_type_full_name | ( | name | ) |
def pyuavcan_v0.dsdl.parser.validate_namespace_name | ( | name | ) |
def pyuavcan_v0.dsdl.parser.validate_search_directories | ( | dirnames | ) |
int pyuavcan_v0.dsdl.parser.MESSAGE_DATA_TYPE_ID_MAX = 65535 |