def unit_name(unit):
    """
    Return name of unit (must of course match unit_t in opendps/uui.h)
    """
    if unit == 0:
        return "unitless"  # none
    if unit == 1:
        return "A"  # ampere
    if unit == 2:
        return "V"  # volt
    if unit == 3:
        return "W"  # watt
    if unit == 4:
        return "s"  # second
    if unit == 5:
        return "Hz"  # hertz
    return "unknown"