/// <summary> /// Process an atomic command /// </summary> /// <param name="cmd"></param> /// <returns>The response port</returns> public DsspResponsePort <RoombaReturnPacket> ProcessAtomicCommand(RoombaCommand cmd) { ProcessAtomicCommand processCmd = new ProcessAtomicCommand(cmd); this.PostUnknownType(processCmd); return(processCmd.ResponsePort); }
public void ExecCommand(RoombaCommand command, byte[] parameters) { byte[] commandBytes = new byte[parameters.Length + 1]; commandBytes[0] = (byte)command; parameters.CopyTo(commandBytes, 1); // offset 1 logCommand(command, parameters); this.ExecGeneralCommand(commandBytes); }
private void logCommand(RoombaCommand cmd, byte[] parameters) { //string output = "Sending command " + Enum.GetName(typeof(RoombaCommand), cmd) + ", " + cmd; string output = "Sensing command " + cmd.ToString(); if (parameters != null) { output += ", paramters: "; foreach (byte b in parameters) { output += " " + b; } } //Debug.Print(output); }
public void ExecCommand(RoombaCommand command) { byte[] commandBytes = new byte[] { (byte)command }; logCommand(command, null); this.ExecGeneralCommand(commandBytes); }
/// <summary> /// Initialization Constructor /// </summary> /// <param name="cmd"></param> public ExecuteIRobotCommand(RoombaCommand cmd) { this.Body = cmd; }
/// <summary> /// Initialization Constructor /// </summary> public ProcessAtomicCommand(RoombaCommand cmd) { this.Body = cmd; }