def get_base_type_of_signal(signal):
    # type: (canmatrix.Signal) -> typing.Tuple[str, int]
    """Get signal arxml-type and size based on the Signal properties."""
    if signal.is_float:
        if signal.size > 32:
            create_type = "double"
            size = 64
        else:
            create_type = "single"
            size = 32
    else:
        if signal.size > 32:
            if signal.is_signed:
                create_type = "sint64"
            else:
                create_type = "uint64"
            size = 64                            
        elif signal.size > 16:
            if signal.is_signed:
                create_type = "sint32"
            else:
                create_type = "uint32"
            size = 32                            
        elif signal.size > 8:
            if signal.is_signed:
                create_type = "sint16"
            else:
                create_type = "uint16"
            size = 16
        else:
            if signal.is_signed:
                create_type = "sint8"
            else:
                create_type = "uint8"
            size = 8
    return create_type, size
def get_base_type_of_signal ( signal ) : if signal . is_float : if signal . size > 32 : create_type = "double" size = 64 else : create_type = "single" size = 32 else : if signal . size > 32 : if signal . is_signed : create_type = "sint64" else : create_type = "uint64" size = 64 elif signal . size > 16 : if signal . is_signed : create_type = "sint32" else : create_type = "uint32" size = 32 elif signal . size > 8 : if signal . is_signed : create_type = "sint16" else : create_type = "uint16" size = 16 else : if signal . is_signed : create_type = "sint8" else : create_type = "uint8" size = 8 return create_type , size
Get signal arxml-type and size based on the Signal properties.