The device reports the status of its limit switches, as a number of them are zeros (which means a line containing "010111110000"). An ideal representation of these switches would be an enumeration of such flags:
[Flags] public enum SwitchStatus { xMin, xMax, yMin, yMax, aMax, bMax, cMax, unknown4, unknown3, unknown2, unknown1, unknown0 }
Is it possible to convert a string representation to an enumeration? If so, how?
Lukas source share