/// <summary> /// Nexts the plan spot result. /// </summary> /// <param name="buf">The buf.</param> /// <returns>System.Nullable<SpotResult>.</returns> public static SpotResult?NextSpotResult(this BufferChunk buf) { var plan = new SpotResult(); try { plan.id = buf.NextInt32(); plan.result_xangle = buf.NextFloat(); plan.result_zangle = buf.NextFloat(); plan.result_pcount = buf.NextFloat(); plan.done = buf.NextInt32(); } catch { //plan.id = -1; // return(null); } return(plan); }
/// <summary> /// Nexts the Spot. /// </summary> /// <param name="buf">The buffer chunk.</param> /// <returns>Spot.</returns> public static Spot?NextSpot(this BufferChunk buf) { var plan = new Spot(); try { plan.id = buf.NextInt32(); plan.xangle = buf.NextFloat(); plan.zangle = buf.NextFloat(); plan.energy = buf.NextFloat(); plan.pcount = buf.NextFloat(); } catch { //plan.id = -1; // return(null); } return(plan); }
/// <summary> /// Nexts the full spot. /// </summary> /// <param name="buf">The buf.</param> /// <returns>System.Nullable<SpotFull>.</returns> public static SpotFull?NextSpotFull(this BufferChunk buf) { var plan = new SpotFull(); try { plan.changed = buf.NextInt32(); plan.done = buf.NextInt32(); plan.energy = buf.NextFloat(); plan.id = buf.NextInt32(); plan.need_to_sent = buf.NextInt32(); plan.pcount = buf.NextFloat(); plan.result_pcount = buf.NextFloat(); plan.result_xangle = buf.NextFloat(); plan.result_zangle = buf.NextFloat(); plan.xangle = buf.NextFloat(); plan.zangle = buf.NextFloat(); } catch { //plan.id = -1; // return(null); } return(plan); }