from_string


Description:

public static SupplyType from_string (string type)

Converts a string to a supply type.

Possible values are Battery, UPS, Mains, USB, USB_DCP, USB_CDP , and USB_ACA. Anything else will return UNKNOWN.