static private RobotStatus Wait(RobotAgent robot_agent, object[] args) { int ret = robot_agent.WaitStatus((int)args[0], (int)args[1], WAIT_TIMEOUT); RobotStatus robot_status = robot_agent.GetStatus(); robot_status.ret_code = ret; return(robot_status); }