KR101073430B1 - Method of invoking asynchronous function for controlling robots and system therefor - Google Patents

Method of invoking asynchronous function for controlling robots and system therefor Download PDF

Info

Publication number
KR101073430B1
KR101073430B1 KR1020090105475A KR20090105475A KR101073430B1 KR 101073430 B1 KR101073430 B1 KR 101073430B1 KR 1020090105475 A KR1020090105475 A KR 1020090105475A KR 20090105475 A KR20090105475 A KR 20090105475A KR 101073430 B1 KR101073430 B1 KR 101073430B1
Authority
KR
South Korea
Prior art keywords
asynchronous
function
asynchronous operation
state
called
Prior art date
Application number
KR1020090105475A
Other languages
Korean (ko)
Other versions
KR20100080342A (en
Inventor
이강우
김형선
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to US12/647,832 priority Critical patent/US20100168912A1/en
Publication of KR20100080342A publication Critical patent/KR20100080342A/en
Application granted granted Critical
Publication of KR101073430B1 publication Critical patent/KR101073430B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Manipulator (AREA)
  • Numerical Control (AREA)

Abstract

본 발명의 비동기 함수 호출 방법은, 기계 장치를 제어하기 위한 비동기 함수 호출 방법에 관한 것으로서, 비동기 함수 호출에 따른 비동기 연산 수행을 요청 받는 단계; 비동기 연산 수행 요청에 따른 결과를 바로 전달하고, 해당 비동기 함수의 비동기 연산 수행을 제어할 수 있는 제어 객체를 반환하는 단계; 반환된 제어 객체를 통해 비동기 연산 수행 상태를 확인하여 취소 가능한 상태인지를 확인하는 단계; 비동기 연산 수행 상태가 취소 가능한 상태이면, 강제 취소 요청이 수신되는 지를 확인하는 단계; 및 강제 취소 요청이 수신되면, 비동기 연산 수행을 강제로 취소시키는 단계를 포함한다. 본 발명에 의하면, 기계 장치를 제어하기 위해 비동기 함수 호출을 사용하는 모든 프로그램에서 공통적으로 사용될 수 있고, 로봇과 같은 기계 장치를 컴퓨터 프로그램을 통해 제어하는 응용들과 같이 비동기 함수 호출이 빈번하게 사용되는 응용 프로그램에서 개발자의 작업 편의를 도모한다.The asynchronous function call method of the present invention relates to an asynchronous function call method for controlling a mechanical device, the method comprising: receiving a request to perform an asynchronous operation according to an asynchronous function call; Immediately returning a result according to the asynchronous operation execution request and returning a control object capable of controlling the asynchronous operation of the asynchronous function; Checking whether an asynchronous operation is performed through the returned control object to determine whether it is in a cancelable state; If the asynchronous operation execution state is a cancelable state, checking whether a forced cancellation request is received; And if the forced cancellation request is received, forcibly canceling the asynchronous operation. According to the present invention, it can be commonly used in all programs that use asynchronous function calls to control mechanical devices, and asynchronous function calls are frequently used, such as applications that control mechanical devices such as robots through computer programs. To facilitate the work of developers in the application.

비동기, 함수, 호출, 제어, 객체, 결과, 오류 Asynchronous, function, call, control, object, result, error

Description

로봇 제어를 위한 비동기 함수 호출 방법{Method of invoking asynchronous function for controlling robots and system therefor}Method of invoking asynchronous function for controlling robots and system therefor}

본 발명은 로봇 제어를 위한 비동기 함수 호출 방법에 관한 것이다. 더욱 상세하게는, 장기간 수행 연산을 자주 수행하는 로봇과 같은 기계 장치를 프로그램을 통해 제어하는 경우에 유용한 비동기 함수 호출 방법에 관한 것이다.The present invention relates to an asynchronous function call method for robot control. More specifically, the present invention relates to a method of asynchronous function call, which is useful when controlling a mechanical device such as a robot which frequently performs a long-running operation through a program.

본 발명은 지식경제부 및 정보통신연구진흥원의 IT성장동력핵심기술개발사업의 일환으로 수행한 연구로부터 도출된 것이다[과제관리번호:2008-S-029-01, 과제명:RUPI-서버 기술 개발].The present invention is derived from the research conducted as part of the IT growth engine core technology development project of the Ministry of Knowledge Economy and the Ministry of Information and Communication Research and Development. [Task management number: 2008-S-029-01, Task name: RUPI-Server technology development] .

일반적으로 로봇은 외부 환경을 센싱하고, 센싱된 정보를 바탕으로 판단하고, 판단 결과에 따라 행동하는 세 가지 기능 요소를 갖으며, 이러한 기능들을 처리하기 위한 장치들을 구비하고 있다. 하지만, 로봇에 다양한 기능을 부가하거나 새로운 기능을 부가하기 위해서는 그 만큼 복잡한 구성 및 고가의 장비들이 필요하게 되므로 다양한 기능을 제공하기 어려우며, 비용 부담이 증가하게 된다.In general, a robot has three functional elements that sense an external environment, make a determination based on sensed information, and act according to a determination result, and have devices for processing these functions. However, in order to add various functions to the robot or to add new functions, complicated configurations and expensive equipment are required, and thus it is difficult to provide various functions and the cost burden increases.

따라서, 최근에는 보다 저렴한 로봇을 제공하기 위해 로봇에서의 기능들을 네트워크를 통해 분산 처리하기 위한 네트워크 로봇 시스템이 개발되고 있다.Therefore, recently, a network robot system for distributing functions in a robot through a network has been developed to provide a more inexpensive robot.

일반적으로 네트워크 로봇 시스템은 서버와 다수의 로봇 클라이언트와 구성된 분산 시스템으로 이루어져 있다. 이러한 분산 시스템에서의 네트워크 통신은 통신 미들웨어를 활용하여 분산된 시스템 간의 메시지 교환을 통해 이루어진다. 이들 미들웨어는 객체지향 개념과 결합되어 원격 객체 호출 기능을 제공하며, DCOM, COBRA, RMI, XML Web Services 등의 다양한 방법이 제안되어 사용되어 왔다.In general, a network robot system is composed of a distributed system consisting of a server and a plurality of robot clients. Network communication in such a distributed system is achieved through message exchange between distributed systems utilizing communication middleware. These middlewares are combined with object-oriented concepts to provide remote object invocation, and various methods such as DCOM, COBRA, RMI, and XML Web Services have been proposed and used.

한편, 비동기 함수 호출은 기존의 IT분야에서 많은 연구가 진행되어 왔다. 예를 들어 COBRA와 같은 RPC(Remote Procedure Call) 기반의 통신 미들웨어에서는 AMI(Asynchronous Method Invocation)에 대해 언급이 되어 왔다. On the other hand, asynchronous function calls have been studied in the existing IT field. For example, asynchronous method invocation (AMI) has been mentioned in RPC (Remote Procedure Call) based communication middleware such as COBRA.

그러나, 대부분의 기술 또는 연구는 함수 호출 인터페이스에서 비동기 연산이 처리되는 과정과 밀접하게 관련되어 있어서, 만일 다른 비동기 함수 호출 기법을 사용하는 경우는 해당 인터페이스를 사용할 수 없는 문제점을 갖고 있다. However, most of the techniques or researches are closely related to the process of asynchronous operation processing in the function call interface, and thus, there is a problem that the interface cannot be used when other asynchronous function call methods are used.

'비동기 함수 호출'은 기존의 동기적 함수 호출과는 달리 함수 호출 후에 함수의 결과 값이 계산되어 반환될 때까지 대기하지 않고, 컨트롤이 바로 반환되어 다음 함수 호출(또는 명령)을 처리할 수 있는 호출 방식이다. 그러므로, 비동기 함수 호출은 동기적 함수 호출과 비교할 때, 프로그램의 응답성을 높여주는 등 기능 및 성능적인 장점이 있다. 하지만, 비동기적으로 수행시킨 함수 호출의 상태를 확인하거나 그 결과 값을 획득하는 방법, 그리고 비동기 함수의 수행 중 오류가 발생된 경우 이를 검출할 수 있는 방법 등 신뢰성 있는 비동기 함수 호출 방법이 구체적으로 제시되고 있지 않았다. Unlike a synchronous function call, 'asynchronous function call' does not wait for the result value of the function to be calculated and returned after the function call, but instead of returning the control to process the next function call (or command). Calling method. Therefore, asynchronous function calls have functional and performance advantages, such as increased program responsiveness, compared to synchronous function calls. However, reliable asynchronous function call methods are presented in detail such as checking the status of a function call executed asynchronously, obtaining a result value, and detecting an error when an asynchronous function is executed. It was not going.

비동기적으로 수행시킨 함수 호출의 경우, 전술한 바와 같은 기능이 제공되 지 않는다면 신뢰성 있는 프로그램을 작성하는 것이 불가능하게 된다.In the case of a function call executed asynchronously, it is impossible to write a reliable program unless the function described above is provided.

특히, 로봇과 같은 기계 장치를 원격의 프로그램을 통해 제어하는 경우, 신뢰성 있는 비동기 함수 호출 방식의 제공은 매우 절실하다고 할 수 있다.In particular, when controlling a mechanical device such as a robot through a remote program, it is very urgent to provide a reliable asynchronous function call method.

본 발명은 상기한 바와 같은 문제점을 해결하기 위해 고안된 것으로서,The present invention is designed to solve the above problems,

의존적이지 않은 비동기 함수 호출 인터페이스를 정의해줌으로써, 로봇과 같은 기계 장치를 컴퓨터 프로그램을 통해 제어하는 응용들과 같이 비동기 함수 호출을 빈번하게 사용하는 모든 프로그램에서 공통적으로 사용될 수 있는 로봇 제어를 위한 비동기 함수 호출 방법을 제공하는 것을 목적으로 한다.By defining a non-dependent asynchronous function call interface, asynchronous functions for robot control that can be commonly used in all programs that frequently use asynchronous function calls, such as applications that control machine devices such as robots through computer programs. Its purpose is to provide a calling method.

본 발명의 비동기 함수 호출 방법은, 기계 장치를 제어하기 위한 비동기 함수 호출 방법에 관한 것으로서, 비동기 함수 호출에 따른 비동기 연산 수행을 요청 받는 단계; 상기 비동기 연산 수행 요청에 따른 결과를 바로 전달하고, 해당 비동기 함수의 비동기 연산 수행을 제어할 수 있는 제어 객체를 반환하는 단계; 상기 반환된 제어 객체를 통해 비동기 연산 수행 상태를 확인하여 취소 가능한 상태인지를 확인하는 단계; 상기 비동기 연산 수행 상태가 취소 가능한 상태이면, 강제 취소 요청이 수신되는 지를 확인하는 단계; 및 강제 취소 요청이 수신되면, 상기 비동기 연산 수행을 강제로 취소시키는 단계를 포함한다.The asynchronous function call method of the present invention relates to an asynchronous function call method for controlling a mechanical device, the method comprising: receiving a request to perform an asynchronous operation according to an asynchronous function call; Immediately returning a result according to the asynchronous operation execution request and returning a control object capable of controlling the asynchronous operation of the asynchronous function; Checking an asynchronous operation execution state through the returned control object to determine whether it is in a cancelable state; If the asynchronous operation execution state is a cancelable state, confirming whether a forced cancellation request is received; And if a forced cancellation request is received, forcibly canceling the asynchronous operation.

특히, 강제 취소 요청이 수신되지 않는 경우, 상기 반환된 제어 객체를 통해 상기 비동기 연산 수행의 결과 값을 획득하여 호출자에게 제공하는 단계를 더 포함하는 것을 특징으로 한다.In particular, when the forced cancellation request is not received, the method may further include acquiring a result value of performing the asynchronous operation through the returned control object and providing the result to the caller.

또한, 상기 비동기 연산 수행의 결과 값을 이용하여 상기 비동기 연산 수행 중에 발생된 오류 원인을 파악하는 단계를 더 포함하는 것을 특징으로 한다.The method may further include determining a cause of an error occurring during the asynchronous operation using the result value of the asynchronous operation.

또한, 상기 비동기 연산 수행 결과 값을 획득하는 단계는, 상기 비동기 연산 수행이 종료되지 않은 경우, 비동기 연산 수행이 종료할 때까지 대기하였다가 비동기 연산 수행의 결과 값을 획득하는 것을 특징으로 한다.The acquiring of the asynchronous operation execution result value may include waiting until the asynchronous operation execution is completed and obtaining a result value of the asynchronous operation execution if the asynchronous operation execution is not finished.

또한, 상기 비동기 연산 수행 상태를 확인하는 단계는, 상기 반환된 제어 객체를 통한 폴링(Polling) 방식에 의해 상기 비동기 연산 수행 상태를 확인하는 것을 특징으로 한다.The checking of the asynchronous operation execution state may include checking the asynchronous operation execution state by a polling method through the returned control object.

또한, 상기 비동기 연산 수행 상태를 확인하는 단계는, 호출한 비동기 함수가 시작되었는지 여부, 호출한 비동기 함수가 성공적으로 완료되었는지 여부, 호출한 비동기 함수가 수행 중에 오류 발생으로 인해 중단되었는지 여부, 및 호출한 비동기 함수가 수행 중 강제로 취소되었는지 여부 중 하나 이상을 확인하는 것을 특징으로 한다.In addition, the checking of the state of performing the asynchronous operation includes whether the calling asynchronous function has been started, whether the calling asynchronous function has completed successfully, whether the calling asynchronous function has been interrupted due to an error during execution, and calling It is characterized by checking whether one or more asynchronous functions are forcibly canceled during execution.

또한, 상기 비동기 연산 수행 상태를 확인하는 단계는, 상기 반환된 제어 객체를 통한 콜백(Callback) 방식에 의해 상기 비동기 연산 수행 상태를 확인하는 것을 특징으로 한다.The checking of the asynchronous operation execution state may include checking the asynchronous operation execution state by a callback method through the returned control object.

또한, 상기 강제 취소 요청이 수신되면 상기 비동기 연산 수행을 강제로 취소시키는 단계는, 강제 취소를 요청하는 강체 취소 요청자로부터 취소 이유를 문자 열로 입력받아 취소 처리를 수행하는 것을 특징으로 한다.In addition, when the forced cancellation request is received, forcibly canceling the asynchronous operation may be performed by receiving a cancellation reason as a string from a rigid body cancellation requester requesting the forced cancellation.

본 발명에 따르면 다음과 같은 효과가 있다.According to the present invention has the following effects.

본 발명에서 언급하는 비동기 함수 호출 인터페이스는 비동기 연산 처리방식과는 무관하게 다양한 비동기 함수 호출 인터페이스를 기술하는 장점이 있다.The asynchronous function call interface referred to in the present invention has an advantage of describing various asynchronous function call interfaces regardless of the asynchronous operation processing method.

또한, 본 발명에서 제안한 방법은 비동기 함수 호출을 사용하는 모든 프로그램에서 공통적으로 사용될 수 있다. 따라서, 로봇과 같은 기계적인 장치를 컴퓨터 프로그램을 통해 제어하는 응용들과 같이 비동기 함수 호출이 빈번하게 사용되는 응용 프로그램에서 개발자의 작업 편의를 도모할 수가 있다.In addition, the method proposed in the present invention can be commonly used in all programs using asynchronous function calls. Therefore, it is possible to facilitate the developer's work in an application program where asynchronous function calls are frequently used, such as applications that control a mechanical device such as a robot through a computer program.

본 발명을 첨부된 도면을 참조하여 상세히 설명하면 다음과 같다. 여기서, 반복되는 설명, 본 발명의 요지를 불필요하게 흐릴 수 있는 공지 기능, 및 구성에 대한 상세한 설명은 생략한다. 본 발명의 실시형태는 당 업계에서 평균적인 지식을 가진 자에게 본 발명을 보다 완전하게 설명하기 위해서 제공되는 것이다. 따라서, 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있다.The present invention will now be described in detail with reference to the accompanying drawings. Here, the repeated description, well-known functions and configurations that may unnecessarily obscure the subject matter of the present invention, and detailed description of the configuration will be omitted. Embodiments of the present invention are provided to more completely describe the present invention to those skilled in the art. Accordingly, the shape and size of elements in the drawings may be exaggerated for clarity.

이하, 본 발명에 따른 비동기 함수 호출 방법을 도면을 참조하여 상세하게 설명하기로 한다.Hereinafter, the asynchronous function call method according to the present invention will be described in detail with reference to the drawings.

도 1은 호출된 비동기 함수들이 갖는 상태 전이를 설명하기 위한 도면이다.1 is a diagram for explaining a state transition of called asynchronous functions.

호출된 비동기 함수는 도 1과 같은 상태 전이를 따른다. The asynchronous function called follows the state transition as shown in FIG.

참조부호 10의 'PENDING' 상태는 비동기 함수가 호출되었으나, 동일 자원을 사용하는 스레드(Thread)가 있는 경우, 시작되지 못하고 대기하고 있는 상태를 나타낸다. 물론 비동기 함수의 대기 여부는 비동기 연산 스케쥴러(Scheduler)에 따라 달라질 수 있다.'PENDING' state of reference numeral 10 indicates that the asynchronous function is called, but there is a thread that fails to start when there is a thread using the same resource. Of course, whether to wait for an asynchronous function may vary depending on the asynchronous operation scheduler.

다음으로, 호출된 비동기 함수는 'PENDING' 상태에서 대기하고 있다가 자신보다 앞서 있는 모든 스레드가 해당 자원에 대한 사용을 완료하면, 해당 자원을 할당받아 비동기 연산 수행을 시작하고 참조부호 20의 'RUNNING' 상태로 전이된다. Next, the called asynchronous function waits in the 'PENDING' state, and when all the threads ahead of it finish using the resource, it is allocated the resource and starts to perform the asynchronous operation. 'Transition to state.

호출된 비동기 함수의 연산 수행이 성공적으로 완료되면 참조부호 30과 같이 'COMPLETED' 상태로 전이된다. 하지만, 호출된 비동기 함수의 연산 수행이 성공적으로 완료되지 못하고 종료되는 경우에는 참조부호 40의 'FAILED' 상태로 전이된다. 예컨대, 로봇과 같은 기계 장치를 제어하는 경우 오류가 자주 발생하게 되어 호출된 비동기 함수의 연산 수행이 성공적으로 수행되지 못하고 종료되는 경우가 빈번하게 발생한다.If the operation of the called asynchronous function completes successfully, it transitions to 'COMPLETED' state as indicated by reference numeral 30. However, if the operation of the called asynchronous function is not completed successfully and is terminated, the state transitions to the 'FAILED' state of reference numeral 40. For example, in the case of controlling a mechanical device such as a robot, an error frequently occurs, and thus often a case in which operation of the called asynchronous function cannot be performed successfully is terminated.

일반적으로 기계적 장치의 구동을 유발하는 함수는 그 수행 시간이 기존의 다른 함수 호출과 비교하여 상대적으로 긴 수행시간을 필요로 한다. 예를 들어 로봇의 주행, 이동, 또는 문장 읽기와 같은 경우는 그 수행 시간이 수초에서 길게는 수분의 수행 시간을 필요로 한다. 본 발명에서는 이러한 함수 호출을 '장기간 수행 연산'이라 정의하기로 한다. 일반적인 연산은 동기적으로 수행되기 때문에 그 수행이 모두 마칠 때까지 대기하지만, 장기간 수행 연산의 경우에는 요청 직후 바로 컨트롤이 반환되고 추후 원하는 경우 그 결과를 확인할 수 있는 기능이 필요하다. 따라서, 비동기 함수 호출을 수행해야 한다. 비동기 함수 호출은 호출 후 바로 컨트롤이 반환되기 때문에, 개발자는 필요에 따라 호출한 함수를 강제로 취소시키는 경우가 있을 수 있다. 그 수행 시간이 수초 이상으로 긴 경우, 함수 취소의 필요성은 더욱더 증가하게 된다. 이렇듯 비동기 함수 호출은 개발자가 호출 후 이미 완료되거나 실패된 경우를 제외하면 언제든지 취소될 수 있다. 즉, 호출한 비동기 함수의 수행 상태가 참조부호 30의 'COMPLETED' 상태 또는 참조부호 40의 'FAILED' 상태만 아니면, 개발자는 호출한 비동기 함수의 연산 수행을 언제든지 취소할 수 있다.In general, a function that causes the driving of a mechanical device requires a relatively long execution time compared to other function calls. For example, when the robot moves, moves, or reads a sentence, the execution time requires several seconds to several minutes. In the present invention, such a function call will be defined as a 'long term execution operation'. Since general operations are performed synchronously, they wait until the execution is completed. However, for long-running operations, control is returned immediately after the request, and the function can be checked later if desired. Therefore, you must make asynchronous function calls. Because an asynchronous function call returns control immediately after the call, the developer may be forced to cancel the function if necessary. If the execution time is longer than a few seconds, the necessity of canceling the function becomes more and more. As such, an asynchronous function call can be canceled at any time, except when the developer has already completed or failed after the call. That is, the developer can cancel the operation of the called asynchronous function at any time unless the execution state of the called asynchronous function is the 'COMPLETED' state of the reference numeral 30 or the 'FAILED' state of the reference numeral 40.

도 1을 참고하면, 참조부호 10의 'PENDING' 상태와 참조부호 20의 'RUNNING' 상태에서 강제로 취소가 가능하다. 강제 취소 요청에 따라 호출한 비동기 함수의 연산 수행이 최소되면, 바로 참조부호 50의 'CANCELLING' 상태로 전이된다. 여기서 비동기 연산 수행에 대한 취소 작업은 해당 함수 호출 내용과 비동기 함수 처리 방식에 따라 달라질 수 있다.Referring to FIG. 1, it is possible to forcibly cancel in the 'PENDING' state of the reference numeral 10 and the 'RUNNING' state of the reference numeral 20. When the operation of the asynchronous function called by the forced cancellation request is minimized, the state immediately transitions to the 'CANCELLING' state of reference numeral 50. Here, the canceling operation for asynchronous operation may vary depending on the function call contents and the asynchronous function processing method.

참조부호 50의 'CANCELLING' 상태를 거쳐 최종적으로는 취소 작업이 종료되면 참조부호 60의 'CANCELED' 상태로 전이된다.After the cancel operation is completed through the 'CANCELLING' state of reference numeral 50, the state transitions to the 'CANCELED' state of reference numeral 60.

도 2는 본 발명에 따른 비동기 함수 호출 시스템에서의 비동기 오퍼레이션 계층(Asynchronous operation layer)의 구조를 설명하기 위한 도면이다. 그리고, 도 3는 Java 언어를 이용하여 구현한 비동기 함수 호출을 제어하는 객체의 인터페이스를 나타낸다.2 is a view for explaining the structure of an asynchronous operation layer in the asynchronous function call system according to the present invention. 3 illustrates an interface of an object that controls asynchronous function calls implemented using the Java language.

본 발명에 따른 비동기 함수 호출 시스템에서의 비동기 오퍼레이션 계층은 로봇의 주행, 이동, 또는 문장 읽기와 같이 장기간 수행되는 연산의 경우 요청 직후 컨트롤을 바로 반환하고, 나중에 원하는 경우 그 결과를 확인할 수 있도록 비동기 연산을 수행하는 계층이다. 여기서 비동기 함수의 경우에는 오퍼레이션 핸들(Operation Handle) 타입으로 정의되어 장기간 수행되는 연산의 객체를 반환하게 된다. 즉, 이러한 오퍼레이션 핸들은 장기간 비동기 연산 수행에 대한 상태 확인, 제어 그리고 연산의 결과를 얻을 수 있는 인터페이스를 제공한다.In the asynchronous function call system according to the present invention, the asynchronous operation layer returns control immediately after a request for a long-running operation such as driving, moving, or reading a sentence, and asynchronous operation so that the result can be checked later if desired. This is the layer to perform. In this case, the asynchronous function is defined as an operation handle type and returns an object of a long-running operation. In other words, these operation handles provide an interface to check the status, control, and obtain the results of a long-term asynchronous operation.

비동기 오퍼레이션 계층은 오퍼레이션 핸들러(Operation Handler, 100) 및 오퍼레이션 어뎁터(Operation Adapter, 120)로 구분되며, 오퍼레이션 어뎁터(Operation Adapter, 120)는 스케쥴러(Scheduler, 122)를 구비한다.The asynchronous operation layer is divided into an operation handler 100 and an operation adapter 120, and the operation adapter 120 includes a scheduler 122.

오퍼레이션 어뎁터(120)에 구비된 스케쥴러(120)는 비동기 함수 호출에 따른 비동기 연산 요청에 대해 하나의 워크 스레드를 할당하고, 큐(Queue)에 저장된 비동기 연산 객체를 하나씩 수행시킨다.The scheduler 120 provided in the operation adapter 120 allocates one work thread to an asynchronous operation request according to an asynchronous function call, and performs one asynchronous operation object stored in a queue.

오퍼레이션 핸들러(100)는 오퍼레이션 핸들의 인터페이스로 정의된 비동기 연산 처리를 담당하며, 오퍼레이션 어뎁터(120)로 비동기 연산 수행을 요청한다.The operation handler 100 is responsible for asynchronous operation processing defined as an interface of the operation handle, and requests the operation adapter 120 to perform asynchronous operation.

보다 상세하게는, 오퍼레이션 핸들러(100)는 호출한 비동기 함수의 수행 상태를 확인하는 진행 상태 확인부(112), 호출한 비동기 함수의 호출 결과를 획득하 는 호출 결과 획득부(114), 호출한 비동기 함수의 수행 중에 발생되는 오류 정보를 파악하는 예외 처리부(116), 및 호출한 비동기 연산 수행 함수를 강제로 취소시키는 강제 취소 처리부(118)을 구비한다.More specifically, the operation handler 100 is a progress check unit 112 for checking the execution state of the asynchronous function called, a call result obtaining unit 114 for obtaining a call result of the asynchronous function called, calling An exception processing unit 116 for identifying error information generated during the execution of the asynchronous function, and a forced cancellation processing unit 118 forcibly canceling the called asynchronous operation execution function.

먼저, 비동기 함수는 호출 후 컨트롤이 비동기 함수의 연산 수행이 완료되기 이전에 돌아오고 바로 다음으로 진행되기 때문에, 응용 개발자는 자신이 호출한 비동기 함수의 수행 상태를 확인할 수 있어야만 한다. 따라서, 본 발명에서는 진행 상태 확인부(112)를 통해 호출한 비동기 함수의 연산 수행 상태를 확인할 수 있는 인터페이스를 제공한다.First, the asynchronous function must be able to check the execution status of the asynchronous function that it calls because the control returns after the call and before the operation of the asynchronous function completes. Accordingly, the present invention provides an interface for checking the operation execution state of the asynchronous function called through the progress state checking unit 112.

도 3의 참조부호 101은 호출된 비동기 함수의 수행 상태를 확인하기 위해 질의하는 인터페이스를 보여준다. 즉, 호출된 비동기 함수의 연산 수행 상태를 확인하기 위한 질의 메소드들이다. 'isStarted()'를 통해 비동기 함수가 실제로 시작되었는지를 확인할 수 있고, 'isCompleted()'를 통해 비동기 함수의 연산 수행이 성공적으로 완료되었지 확인할 수 있다. 그리고, 'isFailed()'를 통해 비동기 함수 연산 수행 중 오류 발생으로 중단되었는지 여부를 확인할 수 있고, 'isCanceled()'를 통해 비동기 함수의 연산 수행 중 강제로 취소되었는지 여부를 확인할 수 있다. 마지막으로 'isFinished()'를 통해 비동기 함수가 그 연산 수행을 마쳤는지 여부를 확인할 수 있다. 마지막 함수는 전술한 'isCompleted()', 'isFailed()', 그리고 'isCancelled()' 중 하나가 참인 경우 참을 반환한다.Reference numeral 101 in FIG. 3 shows an interface for querying to check the execution state of the called asynchronous function. That is, query methods to check the operation execution status of called asynchronous function. You can use 'isStarted ()' to check whether the asynchronous function has actually started, and 'isCompleted ()' to check whether the asynchronous function has completed its operation successfully. And, through 'isFailed ()', you can check whether the abortion is interrupted due to an error while performing asynchronous function operation, and 'isCanceled ()' to check whether the asynchronous function is forcibly canceled during execution. Finally, 'isFinished ()' lets you see whether the asynchronous function has finished performing its operation. The last function returns true if one of the aforementioned 'isCompleted ()', 'isFailed ()', and 'isCancelled ()' is true.

전술한 인터페이스는 비동기 함수의 수행 상태를 폴링(polling)하는 인터페이스였다. 하지만, 폴링(polling)만을 이용한 상태 확인은 불필요한 자원을 낭비할 수 있다. 따라서, 본 발명에 따른 진행 상태 확인부(112)는 콜백(callback)에 기반한 상태 확인 방법을 추가적으로 제공한다.The above-described interface was an interface for polling the execution state of an asynchronous function. However, status checking using only polling can waste unnecessary resources. Therefore, the progress status checker 112 according to the present invention additionally provides a status check method based on callback.

도 3의 참조부호 104는 비동기 함수의 상태 전이를 확인하기 위해 필요한 콜백(callback)을 설정하는 인터페이스를 나타낸다. 즉, 비동기 연산 수행 시작 및 종료 리스너 설정 메소드들이다.Reference numeral 104 in FIG. 3 represents an interface for setting a callback required to confirm the state transition of the asynchronous function. That is, start and stop listener configuration methods of asynchronous operation execution.

'setStartListener()' 메소드는 호출된 비동기 함수가 실제로 시작되는 경우 호출될 콜백을 설정하는 것으로 호출될 콜백의 인터페이스는 참조부호 105에 기술되어 있다. 'setCompletionListener()' 메소드는 호출된 비동기 함수가 종료된 경우 호출될 콜백를 설정하는 것으로 호출될 콜백의 인터페이스는 참조부호 106에 기술되어 있다.The 'setStartListener ()' method sets the callback to be called if the called asynchronous function is actually started. The interface of the callback to be called is described at 105. The 'setCompletionListener ()' method sets the callback to be called when the called asynchronous function terminates. The interface of the callback to be called is described at 106.

호출된 비동기 함수의 연산 수행 상태를 확인하는 또 다른 방법으로 호출한 함수가 주요 상태로 전이될 때까지 대기하는 인터페이스가 있다.Another way to check the operation performance of a called asynchronous function is to wait for the called function to transition to its main state.

참조부호 103은 호출한 함수가 실제 시작되거나 종료될 때까지 대기하는 인터페이스를 나타낸다. 각각은 무한히 대기하는 메소드와 미리 지정된 시간만을 대기하는 메소드와 같이 두가지 타입을 제공한다.Reference numeral 103 denotes an interface that waits for the called function to actually start or end. Each provides two types: methods that wait indefinitely and methods that wait only a predetermined amount of time.

호출 결과 획득부(114)는 호출한 비동기 함수의 호출 결과 값을 획득할 수 있는 인터페이스를 제공한다. 여기서, 호출 결과 획득부(114)는 해당 비동기 함수의 연산이 종료되어야만 결과 값을 얻을 수 있기 때문에, 호출 결과 획득부(114)는 호출한 비동기 함수의 호출 결과 값을 획득하기 위해 해당 비동기 함수의 비동기 연산 수행이 종료할 때까지 대기하였다가 결과 값을 획득한다.The call result obtaining unit 114 provides an interface for obtaining a call result value of the called asynchronous function. Here, since the call result obtaining unit 114 may obtain a result value only after the operation of the asynchronous function is completed, the call result obtaining unit 114 obtains the call result value of the called asynchronous function. Wait until the asynchronous operation finishes and get the result.

도 3의 참조부호 102는 호출한 비동기 함수의 호출 결과 값을 획득하기 위한 인터페이스를 나타낸다. 참조부호 102에 기재된 각 함수는 연산 수행이 종료되지 않은 경우는 연산 수행이 종료될 때까지 대기하게 되고, 이미 종료된 상태라면 결과 값을 바로 반환하게 된다. 만일 호출한 비동기 함수의 연산 수행 중에 오류가 발생하여 중단된 상태라면 'ExecutionException'을 발생시켜 확인할 수 있게 하고, 강제로 취소된 상태라면 'CancellationException'을 발생시켜 확인할 수 있게 한다.Reference numeral 102 in FIG. 3 represents an interface for obtaining a call result value of a called asynchronous function. Each function described by reference numeral 102 waits until the operation is completed if the operation is not finished, and returns a result value immediately if the operation is already completed. If an error occurs during the operation of the calling asynchronous function, it can be checked by generating an 'ExecutionException'. If it is forcibly canceled, it can be checked by generating a 'CancellationException'.

예외 처리부(116)는 호출한 비동기 함수의 연산 수행 중에 발생된 오류 정보를 파악할 수 있는 인터페이스를 제공한다. 즉, 본 발명의 인터페이스에서 기술된 메소드 호출시 발생되는 'ExecutionException' 예외와 참조부호 101에서 기재된 'isFailed()'를 통해 예외 사실 및 비동기 연산 수행 중에 발생된 발생된 오류의 원인을 알 수 있는 기능을 제공한다.The exception processing unit 116 provides an interface for grasping error information generated while performing an operation of the asynchronous function called. That is, the function that can know the cause of the exception and the error that occurred during the execution of asynchronous operation through the 'ExecutionException' exception that occurs when calling a method described in the interface of the present invention and 'isFailed ()' described in 101. To provide.

강제 취소 처리부(118)는 호출한 비동기 연산 수행 함수를 강제로 취소시킬 수 있는 인터페이스를 제공한다. 강제 취소 처리부(118)는 도 3의 참조부호 107에 기재된 바와 같이 'cancel()' 메소드를 통해 강제로 취소시킬 수 있다.The forced cancellation processing unit 118 provides an interface for forcibly canceling the called asynchronous operation execution function. The forced cancellation processing unit 118 may force the cancellation through the 'cancel ()' method as described with reference numeral 107 of FIG. 3.

강제 취소 처리부(118)는 본래의 비동기 함수의 호출자가 아니어도 호출된 비동기 연산 수행 함수를 강제로 취소할 수 있도록 한다. 그리고, 강제 취소 처리부(118)는 호출된 비동기 연산 수행 함수를 강제로 취소시키는 취소 이유를 문자열로 입력받을 수 있다. 이 경우 강제 취소 처리부(118)는 호출자에게 취소되었음을 예외로 전달할 때, 취소 이유를 함께 전달하여 호출자로 하여금 호출한 함수가 취 소된 이유를 파악할 수 있도록 한다.The forced cancel processing unit 118 allows forcibly canceling the called asynchronous operation performing function even if not the caller of the original asynchronous function. The forced cancellation processing unit 118 may receive a cancellation reason for forcibly canceling the called asynchronous operation execution function as a string. In this case, when the forced cancellation processing unit 118 delivers an exception to the caller as an exception, the forced cancellation processing unit 118 transmits the cancellation reason together so that the caller can grasp the reason why the called function is canceled.

도 4는 본 발명에 따른 로봇 제어를 위한 비동기 함수 호출 방법을 설명하기 위한 흐름도이고, 도 5는 전술한 비동기 함수 호출 인터페이스를 사용하여 로봇 주행을 제어하는 주행 인터페이스를 나타내는 도면이다.4 is a flowchart illustrating an asynchronous function call method for controlling a robot according to the present invention, and FIG. 5 is a diagram illustrating a driving interface for controlling robot driving using the asynchronous function call interface described above.

먼저, 호출자에 의해 기계 장치(예컨대, 로봇)를 제어하기 위한 비동기 함수가 호출되고, 그에 따른 비동기 연산 수행을 요청받는다(S10, S20). 호출된 비동기 함수는 기존의 동기적 함수 호출과 달리 함수 호출 후에 함수의 결과 값이 계산되어 반환 될 때까지 대기하지 않고, 비동기 연산 수행 요청에 따른 결과를 바로 전달한다. 그리고, 해당 비동기 함수의 비동기 연산 수행 상태를 확인하거나 제어할 수 있는 제어 객체를 반환한다(S30). 이때, 호출된 비동기 함수는 도 1에 도시한 바와 같은 상태 전이를 따른다. 즉, 비동기 함수가 호출되었으나, 동일 자원을 사용하는 쓰레드가 있는 경우 비동기 함수 호출에 따른 비동기 연산이 수행되지 못하고 대기 상태에 있게 된다. 물론 함수의 대기 여부는 스케쥴러에 따라 각기 달라질 수 있다. 호출된 함수는 자신보다 앞서 있는 모든 쓰레드가 해당 자원을 사용 완료하면, 해당 자원을 할당받아 실제 비동기 연산을 수행하는 상태로 전이된다. 하지만, 로봇과 같은 기계 장치를 제어하는 경우, 이렇게 연산을 수행하는 상태(즉, 'RUNNING' 상태)에서 잦은 오류 발생으로 인해 비동기 연산 수행이 성공적으로 완료되지 못하고 실패 상태(즉, 'FAILED' 상태)로 전이되는 경우가 자주 발생하게 된다. First, an asynchronous function for controlling a mechanical device (for example, a robot) is called by the caller, and thus a request for performing asynchronous operation is performed (S10 and S20). Unlike the synchronous function call, the called asynchronous function does not wait for the result value of the function to be calculated and returned after the function call. In operation S30, a control object for checking or controlling an asynchronous operation execution state of the corresponding asynchronous function is returned. At this time, the called asynchronous function follows a state transition as shown in FIG. In other words, if an asynchronous function is called but there are threads using the same resource, the asynchronous operation cannot be performed according to the asynchronous function call. Of course, whether or not to wait for a function can vary depending on the scheduler. When all the threads that are ahead of the thread have finished using the resource, the called function is allocated the resource and transitions to the actual asynchronous operation. However, in the case of controlling a mechanical device such as a robot, asynchronous operation execution cannot be completed successfully due to frequent errors in this operation state (i.e., 'RUNNING' state) and failed state (i.e., 'FAILED' state). Is often transitioned to).

따라서, 본 발명에서는 S30 단계에서 비동기 연산 수행 상태를 제어할 수 있는 제어 객체를 반환하고, 반환된 제어 객체를 통해 비동기 함수 호출에 따른 비동기 연산 수행의 상태를 확인할 수 있도록 한다(S40). 즉, 제어 객체를 통해 비동기 함수 호출에 따른 비동기 연산 수행의 상태를 확인한다. 이때, S40 단계에서 호출된 비동기 함수의 수행 상태를 제어하기 위한 제어 객체로 도 3에서 정의한 'AsyncOperation' 타입의 객체가 이용될 수 있다.Therefore, in the present invention, the control object capable of controlling the asynchronous operation execution state is returned in step S30, and the status of the asynchronous operation execution according to the asynchronous function call can be checked through the returned control object (S40). That is, check the status of asynchronous operation execution according to asynchronous function call through control object. In this case, an object of type 'AsyncOperation' defined in FIG. 3 may be used as a control object for controlling the execution state of the asynchronous function called in step S40.

다음으로, S40 단계에서 비동기 연산 수행 상태를 확인하고, 결과 비동기 연산 수행 상태가 취소가 가능한 상태인지를 판단한다(S50). Next, in step S40, the asynchronous operation execution state is checked, and the result is determined whether the asynchronous operation execution state is in a state in which cancellation is possible (S50).

취소가 가능한 상태이면 강제 취소 요청이 수신되는지를 판단하고(S60), 강제 취소 요청이 수신된 경우, 강체 취소 요청자로부터 취소 이유를 문자열로 입력받아 취소 처리를 수행한다(S90). 그리고, 호출자에게 취소 이유와 함께 예외로 전달되도록 한다(S100). If the cancellation is possible, it is determined whether a forced cancellation request is received (S60). If a forced cancellation request is received, the cancellation process is input as a string from the rigid cancellation requester (S90). Then, the caller is sent as an exception with the cancellation reason (S100).

한편, S50 단계 와 S60 단계는 순서를 달리하여 수행될 수도 있다. 즉, 먼저 강제 취소 요청이 수신되는 지를 판단하고, 강제 취소 요청이 수신되면 현재 호출된 비동기 함수의 수행 상태가 취소 가능한 상태인지를 판단할 수도 있다.On the other hand, step S50 and step S60 may be performed in a different order. That is, first, it may be determined whether a forced cancellation request is received, and when the forced cancellation request is received, it may be determined whether the execution state of the currently called asynchronous function is cancelable.

S60 단계에서 강제 취소 요청이 수신되지 않는 경우, 제어 객체를 통해 호출된 비동기 함수의 비동기 연산 수행 결과 값을 획득하여 호출자에게 제공한다(S70). 여기서, 비동기 연산 수행 결과 값은 해당 비동기 연산이 종료되어야만 그 값을 얻을 수 있기 때문에, 비동기 연산 수행의 결과 값을 획득하기 위해 해당 비동기 함수의 연산 수행이 종료할 때까지 대기하였다가 결과 값을 획득한다. 도 3 의 참조부호 102는 호출한 비동기 함수의 호출 결과 값을 획득하기 위한 제어 객체를 나타낸다. 참조부호 102에 기재된 각 함수는 연산 수행이 종료되지 않은 경우는 연산 수행이 종료될 때까지 대기하게 되고, 이미 종료된 상태라면 결과 값을 바로 제공하게 된다.When the forced cancellation request is not received in step S60, the asynchronous operation result value of the asynchronous function called through the control object is obtained and provided to the caller (S70). In this case, the result value of the asynchronous operation execution can be obtained only when the asynchronous operation ends. Therefore, to obtain the result value of the asynchronous operation execution, it waits until the operation execution of the asynchronous function ends and then obtains the result value. do. Reference numeral 102 in FIG. 3 represents a control object for obtaining a call result value of the called asynchronous function. Each function described in the reference numeral 102 waits until the operation is completed if the operation is not finished, and provides a result value immediately if the operation is already completed.

다음으로, 호출한 비동기 함수의 연산 수행 중에 발생된 오류 원인을 파악하여 호출자에게 제공한다(S80). 즉, 도 3에 기재된 'ExecutionException'와 'isFailed()'를 통해 예외 사실 및 비동기 연산 수행 중에 발생된 발생된 오류의 원인을 파악하여 호출자에게 제공한다.Next, the cause of the error occurred while performing the operation of the asynchronous function called is provided to the caller (S80). That is, through the 'ExecutionException' and 'isFailed ()' described in FIG. 3, the cause of the exception and the error occurring during the asynchronous operation are identified and provided to the caller.

예컨대, 도 5는 로봇과 같은 기계 장치를 정해진 랜드마크(landmark)까지 주행시키는 함수 'navigateToLandmark()'를 보여준다. 해당 함수는 호출되면 실제 주행이 완료될 때까지 대기하는 것이 아니라 주행 요청을 비동기적으로 수행시키고 호출자에게 바로 컨트롤을 전환한다. 즉, 호출된 주행 함수의 상태 확인을 위한 질의나 제어를 위한 객체로 도 3에서 정의한 'AsyncOperation' 타입의 객체를 반환한다. 주행 함수 호출자는 함수 호출 후 받은 'AsyncOperation' 객체를 통해 언제든지 해당 주행 연산을 제어할 수 있다.For example, FIG. 5 shows a function 'navigateToLandmark ()' that drives a mechanical device such as a robot to a predetermined landmark. When this function is called, it does not wait for the actual driving to complete but rather executes the driving request asynchronously and transfers control directly to the caller. That is, an object of type 'AsyncOperation' defined in FIG. 3 is returned as an object for querying or controlling the state of the called driving function. The driving function caller can control the driving operation at any time through the 'AsyncOperation' object received after the function call.

도 6은 주행 함수를 호출하는 예시를 보여준다. 6 shows an example of calling a driving function.

도 6에서는 로봇에게 '안방'으로 주행을 요청한다(401). 그리고, 최대 30초간 주행이 완료할 때까지 대기한다(402). 만약 30초 전에 주행이 완료되지 않으면 'TimeoutException'이 발생되어 요청한 주행을 강제로 취소(403)하는 예를 나타낸 다.In FIG. 6, the robot requests driving in a 'room' (401). Then, the vehicle waits for a maximum of 30 seconds to complete (402). If the driving is not completed before 30 seconds, a 'TimeoutException' is generated, thereby forcibly canceling the requested driving (403).

본 발명에 의하면, 비동기 함수 호출자는 함수 호출 후 반환된 제어 객체를 통해 언제든지 해당 비동기 연산 수행을 제어할 수가 있게 되고, 로봇과 같은 기계적인 장치를 컴퓨터 프로그램을 통해 제어하는 응용들과 같이 비동기 함수 호출이 빈번하게 사용되는 응용 프로그램에서 개발자의 작업 편의를 도모할 수가 있게 되는데 그 효과가 있다.According to the present invention, the asynchronous function caller can control the execution of the asynchronous operation at any time through the control object returned after the function call, and the asynchronous function call like applications that control a mechanical device such as a robot through a computer program. This frequently used application can facilitate the developer's work, which is effective.

한편, 비동기 연산은 단순히 로봇과 같은 기계적 장치에 제어뿐만 아니라, 기타 IT 분야에서 다양하게 발생하며 전술한 본 발명의 활용 분야는 하나의 실시예에 불과한 것이다. 또한, Java 언어를 기반으로 한 비동기 연산 인터페이스 역시 그 개념을 기술하기 위한 방편으로, 해당 개념을 다양한 프로그래밍 언어를 통해 구현하여 확장하는 것이 가능하다.On the other hand, asynchronous operation is not only a control to a mechanical device such as a robot, but also variously occurs in other IT fields, and the field of application of the present invention described above is just one embodiment. In addition, the asynchronous operation interface based on the Java language is also a way to describe the concept, it is possible to extend the concept by implementing it through various programming languages.

본 발명은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크 및 광 데이터 저장장치 등이 있을 수 있다. 또한, 캐리어 웨이브(예컨대, 인터넷을 통한 전송)의 형태로 구현되는 것도 포함된다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드로 저장되고 실행될 수 있다.The present invention can be embodied as computer-readable codes on a computer-readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media may include ROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage. Also included are those implemented in the form of carrier waves (eg, transmission over the Internet). The computer readable recording medium can also be distributed over network coupled systems so that the computer readable code is stored and executed in a distributed fashion.

이상에서와 같이 도면과 명세서에서 최적의 실시예가 개시되었다. 여기서 특정한 용어들이 사용되었으나, 이는 단지 본 발명을 설명하기 위한 목적에서 사용된 것이지 의미 한정이나 특허청구범위에 기재된 본 발명의 범위를 제한하기 위하여 사용된 것은 아니다. 그러므로, 본 기술 분야의 통상의 지식을 가진자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호범위는 첨부된 특허청구범위의 기술적 사상에 의해 정해져야 할 것이다. As described above, the best embodiment has been disclosed in the drawings and the specification. Although specific terms have been used herein, they are used only for the purpose of describing the present invention and are not used to limit the scope of the present invention as defined in the meaning or claims. Therefore, those skilled in the art will understand that various modifications and equivalent other embodiments are possible from this. Therefore, the true technical protection scope of the present invention will be defined by the technical spirit of the appended claims.

도 1은 호출된 비동기 함수들이 갖는 상태 전이를 설명하기 위한 도면이다.1 is a diagram for explaining a state transition of called asynchronous functions.

도 2는 본 발명에 따른 비동기 함수 호출 시스템에서의 비동기 오퍼레이션 계층(Asynchronous operation layer)의 구조를 설명하기 위한 도면이다. 2 is a view for explaining the structure of an asynchronous operation layer in the asynchronous function call system according to the present invention.

도 3은 Java 언어를 이용하여 구현한 비동기 함수 호출을 제어하는 객체의 인터페이스를 나타낸다. 3 illustrates an interface of an object for controlling asynchronous function calls implemented using the Java language.

도 4는 본 발명에 따른 로봇 제어를 위한 비동기 함수 호출 방법을 설명하기 위한 흐름도이다.4 is a flowchart illustrating a asynchronous function call method for robot control according to the present invention.

도 5는 전술한 비동기 함수 호출 인터페이스를 사용하여 로봇 주행을 제어하는 주행 인터페이스를 나타내는 도면이다.5 is a diagram illustrating a driving interface for controlling robot driving using the asynchronous function call interface described above.

도 6은 주행 함수를 호출하는 예시를 나타내는 도면이다. 6 is a diagram illustrating an example of calling a driving function.

Claims (8)

기계 장치를 제어하기 위한 비동기 함수 호출 방법에 있어서,In the asynchronous function call method for controlling a mechanical device, 비동기 함수 호출에 따른 비동기 연산 수행을 요청 받는 단계;Receiving a request to perform an asynchronous operation according to an asynchronous function call; 상기 비동기 연산 수행 요청에 따른 결과를 바로 전달하고, 해당 비동기 함수의 비동기 연산 수행을 제어할 수 있는 제어 객체를 반환하는 단계;Immediately returning a result according to the asynchronous operation execution request and returning a control object capable of controlling the asynchronous operation of the asynchronous function; 상기 반환된 제어 객체를 통해 호출한 비동기 함수가 시작되었는지 여부, 호출한 비동기 함수가 성공적으로 완료되었는지 여부, 호출한 비동기 함수가 수행 중에 오류 발생으로 인해 중단되었는지 여부, 호출한 비동기 함수가 수행 중 강제로 취소되었는지 여부, 및 호출한 비동기 함수가 연산 수행을 마쳤는지 여부 중 하나 이상을 확인하여 비동기 연산 수행 상태가 취소 가능한 상태인지를 확인하는 단계;Whether the asynchronous function called by the returned control object has started, whether the called asynchronous function has completed successfully, whether the called asynchronous function was interrupted due to an error while executing, or the calling asynchronous function was forced during execution. Checking whether the asynchronous operation execution state is a cancelable state by checking at least one of whether the operation is canceled and whether the called asynchronous function has finished performing the operation; 상기 비동기 연산 수행 상태가 취소 가능한 상태이면, 강제 취소 요청이 수신되는 지를 확인하는 단계; 및If the asynchronous operation execution state is a cancelable state, confirming whether a forced cancellation request is received; And 강제 취소 요청이 수신되면, 상기 비동기 연산 수행을 강제로 취소시키는 단계를 포함하는 비동기 함수 호출 방법.If the force cancellation request is received, forcibly canceling the asynchronous operation. 청구항 1에 있어서,The method according to claim 1, 강제 취소 요청이 수신되지 않는 경우, 상기 반환된 제어 객체를 통해 상기 비동기 연산 수행의 결과 값을 획득하여 호출자에게 제공하는 단계를 더 포함하는 것을 특징으로 하는 비동기 함수 호출 방법.And if a force cancellation request is not received, acquiring a result value of performing the asynchronous operation through the returned control object and providing the result to the caller. 청구항 2에 있어서,The method according to claim 2, 상기 비동기 연산 수행의 결과 값을 이용하여 상기 비동기 연산 수행 중에 발생된 오류 원인을 파악하는 단계를 더 포함하는 것을 특징으로 하는 비동기 함수 호출 방법.And determining a cause of an error occurring during the asynchronous operation by using a result value of the asynchronous operation. 청구항 2에 있어서,The method according to claim 2, 상기 비동기 연산 수행 결과 값을 획득하는 단계는,Acquiring the result of performing the asynchronous operation, 상기 비동기 연산 수행이 종료되지 않은 경우, 비동기 연산 수행이 종료할 때까지 대기하였다가 비동기 연산 수행의 결과 값을 획득하는 것을 특징으로 하는 비동기 함수 호출 방법.If the asynchronous operation is not finished, the method waits until the end of the asynchronous operation is completed, the asynchronous function call method, characterized in that to obtain a result value of the asynchronous operation. 청구항 1에 있어서,The method according to claim 1, 상기 비동기 연산 수행 상태가 취소 가능한 상태인지를 확인하는 단계는,The step of checking whether the asynchronous operation execution state is a cancelable state, 상기 반환된 제어 객체를 통한 폴링(Polling) 방식에 의해 상기 비동기 연산 수행 상태가 취소 가능한 상태인지를 확인하는 것을 특징으로 하는 비동기 함수 호출 방법.And checking whether the asynchronous operation execution state is a cancelable state by a polling method through the returned control object. 삭제delete 청구항 1에 있어서,The method according to claim 1, 상기 비동기 연산 수행 상태가 취소 가능한 상태인지를 확인하는 단계는,The step of checking whether the asynchronous operation execution state is a cancelable state, 상기 반환된 제어 객체를 통한 콜백(Callback) 방식에 의해 상기 비동기 연산 수행 상태가 취소 가능한 상태인지를 확인하는 것을 특징으로 하는 비동기 함수 호출 방법.And checking whether the state of performing the asynchronous operation is cancelable by a callback method through the returned control object. 청구항 1에 있어서,The method according to claim 1, 상기 강제 취소 요청이 수신되면 상기 비동기 연산 수행을 강제로 취소시키는 단계는,When the forced cancellation request is received, forcibly canceling the asynchronous operation is performed. 강제 취소를 요청하는 강제 취소 요청자로부터 취소 이유를 문자열로 입력받아 취소 처리를 수행하는 것을 특징으로 하는 비동기 함수 호출 방법.A method of calling an asynchronous function characterized in that the cancellation processing is performed by receiving a cancellation reason as a string from the forced cancellation requestor requesting the forced cancellation.
KR1020090105475A 2008-12-29 2009-11-03 Method of invoking asynchronous function for controlling robots and system therefor KR101073430B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US12/647,832 US20100168912A1 (en) 2008-12-29 2009-12-28 Method of invoking asynchronous function for controlling robots

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020080135417 2008-12-29
KR20080135417 2008-12-29

Publications (2)

Publication Number Publication Date
KR20100080342A KR20100080342A (en) 2010-07-08
KR101073430B1 true KR101073430B1 (en) 2011-10-17

Family

ID=42641294

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020090105475A KR101073430B1 (en) 2008-12-29 2009-11-03 Method of invoking asynchronous function for controlling robots and system therefor

Country Status (1)

Country Link
KR (1) KR101073430B1 (en)

Also Published As

Publication number Publication date
KR20100080342A (en) 2010-07-08

Similar Documents

Publication Publication Date Title
EP1027794B1 (en) Method and system for facilitating distributed software development in a distribution unaware manner
EP1027796B1 (en) Distributed web application server
US9235495B2 (en) Method and system that provides an interactive debugging session
US7406699B2 (en) Enhanced runtime hosting
US7530081B2 (en) System for creating a dynamic OGSI service proxy framework using runtime introspection of an OGSI service
US8789058B2 (en) System and method for supporting batch job management in a distributed transaction system
WO2009113381A1 (en) Multiprocessor system and method of sharing device among os in multiprocessor system
US8752057B1 (en) Techniques for synchronizing processing of at least two code threads
WO2003032124A2 (en) System and method for managing service interactions
US8060788B2 (en) Real-time signal handling in guest and host operating systems
US7353498B2 (en) Multi-process debugger
WO2009055755A2 (en) Performing requested commands for model-based applications
KR20010041297A (en) Method and apparatus for the suspension and continuation of remote processes
US7712082B2 (en) Profiler stackwalker
US6148325A (en) Method and system for protecting shared code and data in a multitasking operating system
KR100370548B1 (en) Realtime Middleware apparatus providing an integrated software development frameworks of embedded system and its service method
US20100168912A1 (en) Method of invoking asynchronous function for controlling robots
US7676810B2 (en) Identification of execution context
Krishnamurthy et al. The design and implementation of real-time CORBA 2.0: Dynamic scheduling in TAO
KR101073430B1 (en) Method of invoking asynchronous function for controlling robots and system therefor
JP4112511B2 (en) Task management program and task management device
JP3777092B2 (en) Method and system for running distributed applications
US8291377B2 (en) External configuration of processing content for script
CN114462388A (en) Handle management or communication method, electronic device, storage medium, and program product
JP2000003288A (en) Method and device for compelling locked invariable in multi-thread system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20140926

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20150925

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20160927

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee