Parses a bitmask value into a set of device types.
Converts a set of device types into a bitmask value.