+ p_str \ + r).streamline() p_AIMessage.setParseAction(lambda x: messaging.AIMessage(*x[0])) p_AIlogMessage = pp.Group(l \ + p_str \ + r).streamline() p_AIlogMessage.setParseAction(lambda x: messaging.AIlogMessage(*x[0])) p_LightControlMessage = pp.Group(l \ + p_LightID + c \ + p_int \ + r).streamline() p_LightControlMessage.setParseAction(lambda x: messaging.LightControlMessage(*x[0])) p_CuttingDeviceMessage = pp.Group(l \ + p_int \ + r).streamline() p_CuttingDeviceMessage.setParseAction(lambda x: messaging.CuttingDeviceMessage(*x[0])) p_RedHerringBatteryStatusMessage = pp.Group(l \ + p_int \ + r).streamline() p_RedHerringBatteryStatusMessage.setParseAction(lambda x: messaging.RedHerringBatteryStatusMessage(*x[0])) p_SimPositionMessage = pp.Group(l \ + p_float + c \ + p_float + c \ + p_float + c \ + p_floatYPR + c \ + p_floatXYZ \ + r).streamline() p_SimPositionMessage.setParseAction(lambda x: messaging.SimPositionMessage(*x[0])) # Parse any Message
p_AIMessage.setParseAction(lambda x: messaging.AIMessage(*x[0])) p_AIlogMessage = pp.Group(l \ + p_str \ + r).streamline() p_AIlogMessage.setParseAction(lambda x: messaging.AIlogMessage(*x[0])) p_LightControlMessage = pp.Group(l \ + p_LightID + c \ + p_int \ + r).streamline() p_LightControlMessage.setParseAction( lambda x: messaging.LightControlMessage(*x[0])) p_CuttingDeviceMessage = pp.Group(l \ + p_int \ + r).streamline() p_CuttingDeviceMessage.setParseAction( lambda x: messaging.CuttingDeviceMessage(*x[0])) p_RedHerringBatteryStatusMessage = pp.Group(l \ + p_int \ + r).streamline() p_RedHerringBatteryStatusMessage.setParseAction( lambda x: messaging.RedHerringBatteryStatusMessage(*x[0])) p_SimPositionMessage = pp.Group(l \ + p_float + c \ + p_float + c \ + p_float + c \ + p_floatYPR + c \ + p_floatXYZ \ + r).streamline() p_SimPositionMessage.setParseAction( lambda x: messaging.SimPositionMessage(*x[0]))