KR20120032106A - General upnp middleware adaptor and control method using the same - Google Patents

General upnp middleware adaptor and control method using the same Download PDF

Info

Publication number
KR20120032106A
KR20120032106A KR1020100093549A KR20100093549A KR20120032106A KR 20120032106 A KR20120032106 A KR 20120032106A KR 1020100093549 A KR1020100093549 A KR 1020100093549A KR 20100093549 A KR20100093549 A KR 20100093549A KR 20120032106 A KR20120032106 A KR 20120032106A
Authority
KR
South Korea
Prior art keywords
upnp
user program
general
module
service
Prior art date
Application number
KR1020100093549A
Other languages
Korean (ko)
Other versions
KR101195535B1 (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 KR1020100093549A priority Critical patent/KR101195535B1/en
Publication of KR20120032106A publication Critical patent/KR20120032106A/en
Application granted granted Critical
Publication of KR101195535B1 publication Critical patent/KR101195535B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • 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
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • 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
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5066Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
    • 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
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications

Abstract

PURPOSE: A general UPnP middleware adapter and a control method using the same are provided to easily perform communication with UPnP network by configuring a UPnP control point or a UPnP device by being connected to a user program. CONSTITUTION: An XML(eXtensible Markup Language) generating module(110) generates an XML file about a device or service description according to a user program. An interface wrapper module(120) parses the XML file and maps the interface of the user program to UPnP device information. A UPnP general control point module(130) controls the UPnP device through the UPnP device information.

Description

제너럴 UPnP 미들웨어 어댑터 및 이를 이용한 제어 방법{GENERAL UPnP MIDDLEWARE ADAPTOR AND CONTROL METHOD USING THE SAME}GENERAL UPnP MIDDLEWARE ADAPTER AND CONTROL METHOD USING THE SAME

본 발명은 사용자 프로그램에 독립되어 연결될 수 있는 제너럴 UPnP 미들웨어 어댑터 및 이를 이용한 제어 방법에 관한 것이다.
The present invention relates to a general UPnP middleware adapter that can be connected to a user program independently and a control method using the same.

UPnP(UPnP: Universal Plug and Play) 기술은 네트워크에 연결된 정보 가전 기기 간에 복잡한 설정 절차 없이도 통신을 가능하게 해 주는 기술로서, 한 기기가 제공하는 서비스를 다른 기기가 자동으로 찾을 수 있도록 해준다. UPnP를 사용하게 되면, 일반 사용자가 단지 기기를 네트워크에 연결만 시켜주면 기존에 네트워크 상에 연결된 기기들이 자동으로 새로 추가된 기기를 발견하여 제어할 수 있는 수단을 제공하며, 이미 네트워크에 연결된 기기들끼리는 찾기를 원하는 기기의 이름을 포함한 메시지를 주고 받음으로써 원하는 기기를 발견하여 제어할 수 있다.Universal Plug and Play (UPnP) technology enables communication between information appliances connected to a network without complicated setup procedures, allowing other devices to automatically find services provided by one device. When UPnP is used, the general user simply connects the device to the network, and the devices connected to the network automatically provide a means for discovering and controlling newly added devices. You can find and control the devices you want by sending and receiving messages that include the names of the devices you want to find.

UPnP는 댁내망의 여러 디바이스들을 단대단(peer-to-peer) 방식으로 연결시켜주는 미들웨어 구조이다. UPnP는 특정 운영체제나 프로그래밍 언어, 미디어와 독립적으로 네트워크 상의 디바이스 간에 명령과 제어를 가능하게 한다. UPnP는 IP, TCP, UDP, HTTP, XML과 같은 기존의 프로토콜을 사용한다. TCP/IP 네트워크에 기반을 두고 있으며, 디바이스 간에 교환하는 데이터는 XML로 표현된 SOAP 형식으로 메시지화 되고, 이를 HTTP를 통해 통신한다. 이와 같은 UPnP는 네트워크 장치들이 다이나믹(dynamic)하게 연결되고 분리되는 경우에도 복잡한 설정 절차 없이 장치들 사이에 통신을 가능하게 해주는 등의 장점이 있다. UPnP is a middleware architecture that connects multiple devices in a home network in a peer-to-peer manner. UPnP allows commands and control between devices on a network, independent of any operating system, programming language, or media. UPnP uses existing protocols such as IP, TCP, UDP, HTTP, and XML. Based on a TCP / IP network, the data exchanged between devices is messaged in a SOAP format expressed in XML and communicated over HTTP. Such UPnP has advantages such as enabling communication between devices without complicated configuration procedures even when network devices are dynamically connected and disconnected.

최근 UPnP는 로봇 소프트웨어의 미들웨어로도 사용하고자 하는 시도가 있으며, 이 경우 로봇 프로그램들이 각각 UPnP 컨트롤 포인트나 UPnP 디바이스 역할로 UPnP 통신 연결을 수행한다.
Recently, there is an attempt to use UPnP as a middleware of robot software, in which case, the robot programs perform UPnP communication connection as a UPnP control point or UPnP device, respectively.

본 발명은 사용자 프로그램에 독립되어 연결되고, 종합적으로 UPnP 컨트롤 포인트 및 UPnP 디바이스를 구성하는 제너럴 UPnP 미들웨어 어댑터 및 이를 이용한 제어 방법을 제공하고자 한다.
An object of the present invention is to provide a general UPnP middleware adapter independently connected to a user program and comprehensively configuring a UPnP control point and a UPnP device, and a control method using the same.

상기한 과제를 실현하기 위한 본 발명의 일 실시예와 관련된 제너럴 UPnP 미들웨어 어댑터는, 사용자 프로그램의 기능에 따른 디바이스 명세 또는 서비스 명세에 대한 XML 파일을 생성하는 XML 생성 모듈, 생성된 XML 파일을 파싱하여 사용자 프로그램의 인터페이스를 UPnP 디바이스 정보로 매핑하는 인터페이스 래퍼 모듈 및 상기 UPnP 디바이스 정보를 이용하여 UPnP 디바이스를 제어하는 UPnP 제너럴 컨트롤 포인트 모듈을 포함한다.General UPnP middleware adapter according to an embodiment of the present invention for realizing the above object, the XML generation module for generating an XML file for the device specification or service specification according to the function of the user program, parsing the generated XML file An interface wrapper module for mapping an interface of a user program to UPnP device information, and a UPnP general control point module for controlling the UPnP device using the UPnP device information.

또한, 사용자 프로그램의 변경에 대응하여 임베디드 디바이스를 생성, 소멸 또는 관리하는 디바이스 관리 모듈을 더 포함할 수 있다.The apparatus may further include a device management module for generating, destroying, or managing an embedded device in response to a change of a user program.

또한, 상기 XML 생성 모듈은 사용자 프로그램의 기능에 따른 루트 디바이스 명세를 생성하고, 상기 디바이스 관리 모듈은 사용자 프로그램에 동적 링크 라이브러리가 추가되면, 상기 루트 디바이스 명세의 임베디드 디바이스를 생성할 수 있다.The XML generation module may generate a root device specification according to a function of a user program, and the device management module may generate an embedded device of the root device specification when a dynamic link library is added to the user program.

또한, 상기 UPnP 제너럴 컨트롤 포인트 모듈은 독립된 라이브러리 형태로 상기 제너럴 UPnP 미들웨어 어댑터에 연결될 수 있다.
In addition, the UPnP general control point module may be connected to the general UPnP middleware adapter in the form of an independent library.

상기한 과제를 실현하기 위한 제너럴 UPnP 미들웨어 어댑터를 이용한 제어 방법은, 사용자 프로그램의 기능에 따른 디바이스 명세 또는 서비스 명세에 대한 XML 파일을 생성하는 단계, 생성된 XML 파일을 이용하여 사용자 프로그램의 인터페이스를 UPnP 디바이스 정보로 매핑하는 단계 및 상기 UPnP 디바이스 정보를 이용하여 UPnP 컨트롤 포인트가 UPnP 디바이스를 제어하는 단계를 포함한다.The control method using the general UPnP middleware adapter for realizing the above object, generating an XML file for the device specification or service specification according to the function of the user program, UPnP interface of the user program using the generated XML file Mapping to device information and controlling the UPnP device by a UPnP control point using the UPnP device information.

또한, 상기 디바이스 명세 또는 서비스 명세를 생성하는 단계는, 사용자 프로그램의 변경에 대응하여 임베디드 디바이스를 생성, 소멸 또는 관리하는 단계를 더 포함할 수 있다.
The generating of the device specification or service specification may further include generating, destroying or managing an embedded device in response to a change of a user program.

상기와 같이 구성되는 본 발명의 적어도 하나의 실시예에 관련된 제너럴 UPnP 미들웨어 어댑터는, 사용자 프로그램 개발 시에는 UPnP에 대한 고려 없이 개발할 수 있고, 사용자 프로그램 실행 시에는 사용자 프로그램에 연결되어 UPnP 컨트롤 포인트 또는 UPnP 디바이스를 구성하여 UPnP 네트워크를 구성함으로써, 쉽게 UPnP 네트워크의 통신을 수행할 수 있는 이점이 있다. 또한, 플러그인(plug-in) 추가 등으로 사용자 프로그램의 기능이 실행 중 다이나믹(dynamic)하게 바뀌어도 이를 실시간에 반영하여 UPnP 네트워크에 공지하고 통신 기능을 수행할 수 있게 되는 장점이 있다. The general UPnP middleware adapter according to at least one embodiment of the present invention configured as described above can be developed without considering UPnP when the user program is developed, and is connected to the user program when the user program is executed and is connected to the UPnP control point or UPnP. By configuring the device to configure the UPnP network, there is an advantage that can easily communicate with the UPnP network. In addition, even if the function of the user program changes dynamically during execution due to the addition of a plug-in, there is an advantage in that it can be reflected in real time to the UPnP network and perform a communication function.

도 1은 본 발명의 일 실시예에 따른 제너럴 UPnP 미들웨어 어댑터의 구성도.
도 2a 및 도 2b는 본 발명의 일 실시예에 따른 제너럴 UPnP 미들웨어 어댑터를 이용한 제어 과정을 도시하는 도면들.
1 is a block diagram of a general UPnP middleware adapter according to an embodiment of the present invention.
2A and 2B are diagrams illustrating a control process using a general UPnP middleware adapter according to an embodiment of the present invention.

이하, 본 발명과 관련된 제너럴 UPnP 미들웨어 어댑터 및 이를 이용한 제어 방법에 대해서 도면을 참조하여 보다 상세하게 설명한다. 본 발명이 속한 기술 분야에서 통상의 지식을 가진자라면, 도면을 참조 또는 변형하여 상기 제너럴 UPnP 미들웨어 어댑터의 구성에 대한 다양한 실시예를 유추할 수 있을 것이나, 본 발명은 상기 유추되는 다양한 실시예를 포함하며 이루어지며, 아래 도면에 도시된 실시예로 그 기술적 특징이 한정되지 아니한다.
Hereinafter, a general UPnP middleware adapter related to the present invention and a control method using the same will be described in more detail with reference to the accompanying drawings. Those skilled in the art to which the present invention pertains will be able to infer various embodiments of the configuration of the general UPnP middleware adapter by referring to or modifying the drawings. Included and made, and the technical features are not limited to the embodiment shown in the drawings below.

도 1은 본 발명의 일 실시예에 따른 제너럴 UPnP 미들웨어 어댑터의 구성도이다.1 is a block diagram of a general UPnP middleware adapter according to an embodiment of the present invention.

도 1을 참조하면, 상기 제너럴 UPnP 미들웨어 어댑터(100)는 XML 생성 모듈(110), 인터페이스 래퍼 모듈(120), UPnP 제너럴 컨트롤 포인트 모듈(130) 및 디바이스 관리 모듈(140)을 포함한다. 상기 제너럴 UPnP 미들웨어 어댑터(100)는 사용자 프로그램에 독립적으로 연결되어, 동적 링크 라이브러리(DLL: Dynamic Link Library)로 로드되어 실행되는 미들웨어 통신 모듈이다. Referring to FIG. 1, the general UPnP middleware adapter 100 includes an XML generation module 110, an interface wrapper module 120, a UPnP general control point module 130, and a device management module 140. The general UPnP middleware adapter 100 is a middleware communication module that is connected to a user program independently and is loaded and executed into a dynamic link library (DLL).

상기 XML 생성 모듈(XML generation module)(110)은 연결되는 사용자 프로그램의 기능에 따른 디바이스 명세(device description) 또는 서비스 명세(service description)에 대한 XML 파일을 생성한다. 상기 XML 생성 모듈(110)을 통해 생성된 디바이스 명세 및 서비스 명세에는 개체의 정보가 포함된다. 상기 XML 생성 모듈(110)은 사용자 프로그램의 기능에 따라 최초로 생성된 디바이스 명세인 루트 디바이스 명세(root device description)를 생성할 수 있다. 상기 디바이스 명세에 대한 개체의 이름 및 디바이스 명세에 대한 XML 파일을 저장할 디렉토리를 지정하여 디바이스 명세에 대한 XML 파일을 생성할 수 있고, 이후 추가적인 정보는 가변인자를 이용하여 입력할 수 있다. 상기 가변인자의 순서는 UDN, manufacturer, manufacturerURL, modelDescription, modelName, modelNumber, serialNumber의 순서가 될 수 있다. 상기 UDN은 각 개체를 구분할 수 있는 유니크(unique)한 값이 입력될 수 있으며, 만약, UDN이 지정되지 않는 경우에는 개체이름 및 맥 어드레스(MAC address)로 조합된 UDNdl 자동으로 생성되도록 설정하여 등록시킬 수 있다. 상기 디바이스 명세에는 UDN, 서비스 ID, 서비스 타입(type) 또는 SCPD 경로(Service Control Protocol Description URL) 정보 중 하나 이상을 포함할 수 있다. 또한 상기 서비스 명세에는 사용자 프로그램의 인터페이스 명칭 및 입출력 파라미터 정보 중 하나 이상을 포함할 수 있으며, 상기 서비스 명세를 이용하여 개체가 서버(server)로서 서비스를 제공하고, 다른 프로그램은 클라이언트(client)로서 서비스를 요청할 수 있다. The XML generation module 110 generates an XML file for a device description or a service description according to the function of the connected user program. The device specification and the service specification generated by the XML generation module 110 include information of an entity. The XML generation module 110 may generate a root device description, which is a device specification initially generated according to a function of a user program. The name of the entity for the device specification and the directory for storing the XML file for the device specification may be designated to generate an XML file for the device specification, and then additional information may be input using a variable factor. The order of the variable factors may be UDN, manufacturer, manufacturerURL, modelDescription, modelName, modelNumber, serialNumber. The UDN may be inputted with a unique value to distinguish each entity. If UDN is not specified, a UDNdl combined with an entity name and MAC address is automatically generated and registered. You can. The device specification may include one or more of UDN, service ID, service type, or SCPD path information. In addition, the service specification may include one or more of an interface name and input / output parameter information of a user program. An entity provides a service as a server using the service specification, and another program serves as a client. You can request

상기 인터페이스 래퍼 모듈(interface wrapper module)(120)은 상기 XML 생성 모듈(110)을 통해 생성된 XML 파일을 파싱(parsing)하여 사용자 프로그램의 인터페이스를 UPnP 디바이스 정보로 매핑함으로써, 사용자 프로그램이 UPnP 디바이스로 동작하도록 임의의 UPnP 디바이스를 구성한다. 구체적으로, 상기 인터페이스 래퍼 모듈(120)은 생성된 디바이스 명세에 대한 XML을 파싱하여 UDN(Unique Device Name), 서비스 ID, 서비스 타입(type) 또는 SCPD 경로(Service Control Protocol Description URL) 정보를 생성한다. 또한, 상기 인터페이스 래퍼 모듈(120)은 상기 SCPD 경로에 따른 서비스 명세에 대한 XML 파일을 파싱하여 ActionName, argName, argDirection, relatedVariable, variableName, variableType, variableStrVal, variableEvent 정보 등이 포함되는 서비스 파라미터 정보를 생성하여, 네트워크의 서버로서 임의의 액션(action)이 수행될 때 클라이언트에게 서비스를 제공할 수 있다. 서비스에 해당되는 하나의 액션은 ActionName, pActionFunc, argName, argDirection, relatedVariable로 구성되고, 상기 relatedVariable은 variableName, variableType 정보와 연관관계를 구성하게 된다. 만약, UPnP 기본 데이터 타입 외의 경우에는, variableType을 정의한 XML 스키마 정의(XML Schema Definition)을 파싱하여 데이터 타입을 구성할 수 있다. 사용자 프로그램은 상기 제너럴 UPnP 미들웨어 어댑터(100)에 연결되면, 제너럴 UPnP 미들웨어 어댑터에 인터페이스 함수를 등록해야 한다. 예를 들어, setActionFunc 함수를 통해 ActionName 및 pActionFunc를 등록할 수 있다. 상기 pActionFunc란, 상기 제너럴 UPnP 미들웨어 어댑터(100)에 연결된 사용자 프로그램의 함수 포인터를 의미한다. 사용자 프로그램이 상기 제너럴 UPnP 미들웨어 어댑터(100)에 연결되면, setActionFunc 함수를 통해 ActionName 및 pActionFunc를 등록해야 한다. 상기 pActionFunc란, 상기 제너럴 UPnP 미들웨어 어댑터(100)에 연결된 사용자 프로그램의 함수 포인터이다. 즉, 서비스 요청에 따라 이벤트가 발생하면 이벤트에 따른 UDN, 서비스ID 및 ActionName으로 등록된 pActionFunc를 호출한다. 이후, pActionFunc의 입력인자(input argument)는 초기에 설정된 argName, argDirection, relatedVariable, variableName, variableType로부터 생성되며, 출력인자(output argument)는 argName 및 return value이 스트링(string)으로 변환된 후, 서비스를 요청한 곳으로 SOAP(Simple Object Access Protocol) 메시지 형태를 통해 전송된다. The interface wrapper module 120 parses an XML file generated by the XML generation module 110 and maps an interface of a user program to UPnP device information, thereby allowing the user program to be uploaded to the UPnP device. Configure any UPnP device to operate. Specifically, the interface wrapper module 120 parses the XML for the generated device specification to generate unique device name (UDN), service ID, service type or service control protocol description URL information. . In addition, the interface wrapper module 120 parses an XML file for a service specification according to the SCPD path to generate service parameter information including ActionName, argName, argDirection, relatedVariable, variableName, variableType, variableStrVal, variableEvent information, and the like. As a server of the network, it may provide a service to the client when any action is performed. One action corresponding to the service is composed of ActionName, pActionFunc, argName, argDirection, and relatedVariable. The relatedVariable forms an association with variableName and variableType information. If the UPnP basic data type is not included, the data type may be configured by parsing an XML Schema Definition defining a variableType. When the user program is connected to the general UPnP middleware adapter 100, an interface function must be registered in the general UPnP middleware adapter. For example, you can register ActionName and pActionFunc through the setActionFunc function. The pActionFunc means a function pointer of a user program connected to the general UPnP middleware adapter 100. When the user program is connected to the general UPnP middleware adapter 100, ActionName and pActionFunc must be registered through the setActionFunc function. The pActionFunc is a function pointer of a user program connected to the general UPnP middleware adapter 100. That is, when an event occurs according to a service request, pActionFunc registered with UDN, service ID, and ActionName according to the event is called. After that, the input argument of pActionFunc is generated from the initially set argName, argDirection, relatedVariable, variableName, variableType, and the output argument is converted to a string after the argName and return value are converted into strings. It is sent in the form of a Simple Object Access Protocol (SOAP) message to the request.

상기 UPnP 제너럴 컨트롤 포인트 모듈(UPnP general control point module)(130)은 네트워크 상에 있는 UPnP 디바이스 정보를 이용하여 UPnP 기본 통신 방식에 따른 프로토콜을 통해 외부 UPnP 디바이스를 제어한다. 즉, 상기 UPnP 제너럴 컨트롤 포인트 모듈(130)은 UPnP 기본 통신 방식인 제어(control), 이벤팅(eventing)을 통해 요청(request), 응답(response) 또는 이벤트(event)를 전송하고, 추가적으로, UPnP의 프레젠테이션(presentation) 기능을 사용하여 웹 인터페이스(web interface)를 제공할 수 있다. 상기 제너럴 UPnP 미들웨어 어댑터(100)에 연결되는 사용자 프로그램은 자동으로 IP 및 포트(port)를 부여받게 되며, 상기 UPnP 제너럴 컨트롤 포인트 모듈(130)은 새롭게 로드된 개체를 자동으로 인식할 수 있다. 상기 UPnP 제너럴 컨트롤 포인트 모듈(130)은 독립된 라이브러리 형태로 상기 제너럴 UPnP 미들웨어 어댑터(100)에 연결되어, 독립적으로 사용될 수 있다. 상기 UPnP 제너럴 컨트롤 포인트 모듈(130)은 네트워크의 클라이언트로서 서버로 서비스를 요청할 수 있다. 즉, 상기 UPnP 제너럴 컨트롤 포인트 모듈(130)은 네트워크에 명세된 모든 개체를 구독(subscription)하고, 타이머 스레드(timer thread)가 미리 설정된 주기로 구독 요청을 보낼 수 있다. 상기 UPnP 제너럴 컨트롤 포인트 모듈(130)은 개체가 명세되면 디바이스 테이블(device table)을 생성한다. 즉, 새로운 개체에 따른 이벤트가 발생하면 이벤트 구조체(struct)에서 UDN 필드로 기존의 디바이스 테이블에 동일한 개체의 정보가 존재하는지 확인한 후, 동일한 개체의 정보가 없는 경우 새로운 테이블을 생성한다. 상기 이벤트 구조체에서 디바이스 명세의 경로(URL)을 획득하여, 디바이스 테이블의 DESCURL에 기록하고, 디바이스 명세에 대한 XML 파일을 파싱하여 URLBase, deviceType, friendlyName, manufacturer, manufacturerURL, modelDescription, modelName, modelNumber, modelURL, serialNumber, UDN, UPC, presentationURL, AdvrTimeOut 정보를 생성하고, 각 서비스별로 serviceType, serviceID, SCPDURL, controlURL, eventSubURL을 생성한다. 또한, 상기 UPnP 제너럴 컨트롤 포인트 모듈(130)은 상기 SCPDURL에 따른 서비스 명세에 대한 XML을 파싱하여 디바이스 테이블에 링크되는 서비스 테이블을 생성한다. 즉, 상기 서비스 명세에 대한 XML 파일로부터 각 액션별로 action_name, nArg, arg_name, arg_direction, relatedvar_name를 생성하고, stateVariable 노드 리스트로부터 statevar_name, statevar_type, statevar_defvalue, statevar_val, statevar_isEvent를 생성한다. 각 액션의 realtedvar_name과 stateVariable의 statevar_name이 연관관계를 이루므로, 이를 비교검색하여 각 액션의 relatedvar_type, related_defvalue, related_isEvent 정보를 생성한다. 만약, UPnP 기본 데이터 타입 외의 경우에는, variableType을 정의한 XML 스키마 정의(XML Schema Definition)을 파싱하여 데이터 타입을 구성할 수 있다. 상기 UPnP 제너럴 컨트롤 포인트 모듈(130)은 네트워크에 개체가 로드되었는지 여부를 확인하여 액션을 호출할 수 있다. 상기 액션의 호출에는 공통 인터페이스를 사용한다. 즉, UPnP 디바이스의 friendlyname, actionName, 입력인자(inputArgument) 개수, 입력인자값(inputArgument)을 차례로 입력하여 액션을 호출한다. 상기 액션에 대한 반환값(return value)은 공통 호출 인터페이스의 반환값으로 받거나, 반환값 포인터로 값을 받을 수 있다. 상기 UPnP 제너럴 컨트롤 포인트 모듈(130)은 액션을 호출할 때 입력인자 값을 SOAP 메시지로 변환하여 액션을 호출하고, 반환값으로 받은 SOAP 메시지를 디바이스 테이블의 relatedvar_type를 이용하여 실제 데이터 타입으로 변환할 수 있다. 만약, UPnP 기본 데이터 타입 외의 경우에는, XSD 테이블을 참조하여 값을 변환할 수 있다. 상기 UPnP 네트워크 통신이 종료에 따른 이벤트가 발생하면, 상기 UPnP 제너럴 컨트롤 포인트 모듈(130)은 UDN으로 해당 디바이스 테이블 정보를 삭제한다. The UPnP general control point module 130 controls the external UPnP device through a protocol according to the UPnP basic communication method by using UPnP device information on the network. That is, the UPnP general control point module 130 transmits a request, a response, or an event through control and event, which is a UPnP basic communication method, and additionally, UPnP A presentation interface can be used to provide a web interface. A user program connected to the general UPnP middleware adapter 100 is automatically assigned an IP and a port, and the UPnP general control point module 130 may automatically recognize a newly loaded object. The UPnP general control point module 130 may be connected to the general UPnP middleware adapter 100 in an independent library form and used independently. The UPnP general control point module 130 may request a service from a server as a client of a network. That is, the UPnP general control point module 130 may subscribe to all entities specified in the network, and may send a subscription request at a predetermined interval by a timer thread. The UPnP general control point module 130 generates a device table when an object is specified. That is, when an event according to a new object occurs, the UDN field in the event structure struct checks whether information of the same object exists in the existing device table, and when there is no information of the same object, creates a new table. Obtain the path (URL) of the device specification from the event structure, record it in the DESCURL of the device table, parse the XML file for the device specification, and read URLBase, deviceType, friendlyName, manufacturer, manufacturerURL, modelDescription, modelName, modelNumber, modelURL, Create serialNumber, UDN, UPC, presentationURL, AdvrTimeOut information, and create serviceType, serviceID, SCPDURL, controlURL, eventSubURL for each service. In addition, the UPnP general control point module 130 parses the XML for the service specification according to the SCPDURL to generate a service table linked to the device table. That is, action_name, nArg, arg_name, arg_direction, and relatedvar_name are generated for each action from the XML file for the service specification, and statevar_name, statevar_type, statevar_defvalue, statevar_val, and statevar_isEvent are generated from the stateVariable node list. Since the realtedvar_name of each action and the statevar_name of the stateVariable form an association relationship, they are compared and searched to generate relatedvar_type, related_defvalue, and related_isEvent information of each action. If the UPnP basic data type is not included, the data type may be configured by parsing an XML Schema Definition defining a variableType. The UPnP general control point module 130 may determine whether an object is loaded in the network and call an action. Invoking the action uses a common interface. That is, the action is invoked by inputting friendlyname of the UPnP device, actionName, the number of inputArgument, and inputArgument. A return value for the action may be received as a return value of the common call interface or a return value pointer. When the UPnP general control point module 130 invokes an action, the UPnP general control point module 130 calls an action by converting an input argument value into a SOAP message and converts the SOAP message received as a return value into an actual data type using the relatedvar_type of the device table. have. If it is not the UPnP basic data type, the value can be converted by referring to the XSD table. When an event occurs when the UPnP network communication ends, the UPnP general control point module 130 deletes the corresponding device table information by UDN.

상기 제너럴 UPnP 미들웨어 어댑터(100)는 멀티 디바이스를 생성할 수 있고, 상기 디바이스 관리 모듈(device management module)(140)은 연결된 사용자 프로그램이 플러그 인(plug in)되거나 기능이 변화되는 등의 사용자 프로그램의 변경에 대응하여 임베디드 디바이스(embedded device)를 생성, 소멸 또는 관리를 수행한다. 구체적으로, 상기 XML 생성 모듈(110)은 사용자 프로그램의 기능에 따른 루트 디바이스 명세(root device description)를 생성하고, 이후 사용자 프로그램에 동적 링크 라이브러리가 추가되는 경우 상기 디바이스 관리 모듈(140)은 상기 루트 디바이스 명세를 수정하고, 상기 루트 디바이스 명세에 계층적으로 임베디드 디바이스를 구성할 수 있다. 또한, 상기 디바이스 관리 모듈(140)은 수정된 디바이스 명세에 대한 정보를 디바이스 테이블로 로드하여 새로운 정보를 갱신하여 새로운 서비스 처리가 가능한 상태로 만들어준다.
The general UPnP middleware adapter 100 may generate a multi-device, and the device management module 140 may include a user program such as a connected user program plugged in or a function changed. In response to the change, an embedded device is created, destroyed, or managed. Specifically, the XML generation module 110 generates a root device description according to the function of the user program, and when the dynamic link library is added to the user program, the device management module 140 determines the root. The device specification may be modified, and the embedded device may be configured hierarchically in the root device specification. In addition, the device management module 140 loads the information on the modified device specification into the device table to update the new information to make a new service process possible.

도 2a 및 도 2b는 본 발명의 일 실시예에 따른 제너럴 UPnP 미들웨어 어댑터를 이용한 제어 과정을 도시하는 도면들이다.2A and 2B illustrate a control process using a general UPnP middleware adapter according to an embodiment of the present invention.

도 2a는 단일 UPnP 디바이스를 구성한 제너럴 UPnP 미들웨어 어댑터를 이용한 제어 과정을 도시하는 도면이고, 도 2b는 멀티 UPnP 디바이스를 구성한 제너럴 UPnP 미들웨어 어댑터를 이용한 제어 과정을 도시하는 도면이다.FIG. 2A illustrates a control process using a general UPnP middleware adapter configuring a single UPnP device, and FIG. 2B illustrates a control process using a general UPnP middleware adapter configuring a multi-UPnP device.

도 2a를 참조하면, 상기 제너럴 UPnP 미들웨어 어댑터에 사용자 프로그램이 연결되면(S210), 상기 제너럴 UPnP 미들웨어 어댑터는 디바이스 명세에 대한 XML 파일을 생성하고(S220), 서비스 명세에 대한 XML 파일을 생성한다(S230). 생성된 XML 파일을 이용하여 사용자 프로그램의 인터페이스를 UPnP 디바이스 정보로 매핑하여(S240), UPnP 네트워크 통신을 통해 UPnP 처리를 수행한다(S250).Referring to FIG. 2A, when a user program is connected to the general UPnP middleware adapter (S210), the general UPnP middleware adapter generates an XML file for a device specification (S220) and generates an XML file for a service specification (S220). S230). The interface of the user program is mapped to UPnP device information using the generated XML file (S240), and UPnP processing is performed through UPnP network communication (S250).

도 2b를 참조하면, 상기 도2a의 과정에서 사용자 프로그램에 동적 링크 라이브러리가 추가되면(S241), 임베디드 디바이스를 생성하여(S242), 생성된 임베디드 디바이스에 대한 서비스 명세를 더 생성할 수 있다(S243).Referring to FIG. 2B, when the dynamic link library is added to the user program in the process of FIG. 2A (S241), an embedded device may be generated (S242), and a service specification for the generated embedded device may be further generated (S243). ).

상기와 같은 제너럴 UPnP 미들웨어 어댑터를 이용하면, 사용자 프로그램이 실행될 때 연결되어 UPnP 컨트롤 포인트 및 UPnP 디바이스를 콤보(combo) 형태로 종합적으로 구성할 수 있으며, 사용자 프로그램 사이의 통신을 위한 구성(configuration)이 사용자의 간섭없이 자동으로 수행되는 등의 UPnP 네트워크의 장점을 그대로 이용할 수 있다. 또한, 플러그인(plug-in) 추가 등으로 사용자 프로그램이 실행 중에 변경되어도 이를 실시간 반영하여 UPnP 네트워크 통신 기능을 수행할 수 있다.
By using the above general UPnP middleware adapter, when the user program is executed, the UPnP control point and the UPnP device can be collectively configured in the form of a combo, and the configuration for communication between the user programs You can take advantage of the UPnP network as it is automatically performed without user intervention. In addition, even if the user program is changed during execution due to the addition of a plug-in, the UPnP network communication function may be performed by reflecting this in real time.

또한, 상기 제너럴 UPnP 미들웨어 어댑터는 홈 네트워크 또는 로봇 프로그래밍 등의 UPnP 프로그램이 이용되는 곳에 모두 사용될 수 있다. 또한, 상기 제너럴 UPnP 미들웨어 어댑터를 통해 UPnP 프로그램 작성시, 사용자 프로그램과 UPnP 어댑터를 독립적으로 구성할 수 있으며, 이후, 사용자 프로그램이 실행될 때 사용자 프로그램에 동적으로 연결되어 하나의 실행파일을 구성할 수 있다.
In addition, the general UPnP middleware adapter can be used wherever UPnP programs such as home network or robot programming are used. In addition, when the UPnP program is created through the general UPnP middleware adapter, the user program and the UPnP adapter may be independently configured, and then, when the user program is executed, the user program may be dynamically connected to configure one executable file. .

상기와 같이 설명된 제너럴 UPnP 미들웨어 어댑터 및 이를 이용한 제어 방법은 상기 설명된 실시예들의 구성과 방법이 한정되게 적용될 수 있는 것이 아니라, 상기 실시예들은 다양한 변형이 이루어질 수 있도록 각 실시예들의 전부 또는 일부가 선택적으로 조합되어 구성될 수 있다.
The general UPnP middleware adapter and the control method using the same described above are not limited to the configuration and method of the above-described embodiments, but the embodiments may be all or part of each embodiment so that various modifications may be made. May optionally be combined.

100: 제너럴 UPnP 미들웨어 어댑터
110: XML 생성 모듈
120: 인터페이스 래퍼 모듈
130: UPnP 제너럴 컨트롤 포인트 모듈
140: 디바이스 관리 모듈
100: General UPnP Middleware Adapter
110: XML generation module
120: interface wrapper module
130: UPnP General Control Point Module
140: device management module

Claims (7)

사용자 프로그램의 기능에 따른 디바이스 명세 또는 서비스 명세에 대한 XML 파일을 생성하는 XML 생성 모듈;
생성된 XML 파일을 파싱하여 사용자 프로그램의 인터페이스를 UPnP 디바이스 정보로 매핑하는 인터페이스 래퍼 모듈; 및
상기 UPnP 디바이스 정보를 이용하여 UPnP 디바이스를 제어하는 UPnP 제너럴 컨트롤 포인트 모듈;을 포함하는 제너럴 UPnP 미들웨어 어댑터.
An XML generation module generating an XML file for a device specification or a service specification according to a function of a user program;
An interface wrapper module for parsing the generated XML file and mapping an interface of a user program to UPnP device information; And
And a UPnP general control point module for controlling the UPnP device by using the UPnP device information.
제1항에 있어서,
사용자 프로그램의 변경에 대응하여 임베디드 디바이스를 생성, 소멸 또는 관리하는 디바이스 관리 모듈;을 더 포함하는 것을 특징으로 하는 제너럴 UPnP 미들웨어 어댑터.
The method of claim 1,
And a device management module for generating, destroying, or managing an embedded device in response to a change of a user program.
제2항에 있어서,
상기 XML 생성 모듈은 사용자 프로그램의 기능에 따른 루트 디바이스 명세를 생성하고,
상기 디바이스 관리 모듈은 사용자 프로그램에 동적 링크 라이브러리가 추가되면, 상기 루트 디바이스 명세의 임베디드 디바이스를 생성하는 것을 특징으로 하는 제너럴 UPnP 미들웨어 어댑터.
The method of claim 2,
The XML generation module generates a root device specification according to the function of the user program,
And the device management module generates an embedded device of the root device specification when a dynamic link library is added to a user program.
제1항에 있어서,
상기 인터페이스 래퍼 모듈은 디바이스 명세에 대한 XML 파일을 파싱하여, UDN, 서비스 ID, 서비스 타입 또는 SCPD 경로 정보 중 하나 이상의 정보를 포함하는 UPnP 디바이스 테이블에 매핑하는 것을 특징으로 하는 UPnP 미들웨어 어댑터.
The method of claim 1,
The interface wrapper module parses an XML file for a device specification and maps it to a UPnP device table including one or more of UDN, service ID, service type, or SCPD path information.
제1항에 있어서,
상기 UPnP 제너럴 컨트롤 포인트 모듈은 독립된 라이브러리 형태로 상기 제너럴 UPnP 미들웨어 어댑터에 연결될 수 있는 것을 특징으로 하는 제너럴 UPnP 미들웨어 어댑터.
The method of claim 1,
The UPnP general control point module may be connected to the general UPnP middleware adapter in the form of an independent library.
사용자 프로그램의 기능에 따른 디바이스 명세 또는 서비스 명세에 대한 XML 파일을 생성하는 단계;
생성된 XML 파일을 이용하여 사용자 프로그램의 인터페이스를 UPnP 디바이스 정보로 매핑하는 단계; 및
상기 UPnP 디바이스 정보를 이용하여 UPnP 컨트롤 포인트가 UPnP 디바이스를 제어하는 단계;를 포함하는 제너럴 UPnP 미들웨어 어댑터를 이용한 제어 방법.
Generating an XML file for a device specification or a service specification according to a function of a user program;
Mapping an interface of a user program to UPnP device information using the generated XML file; And
And controlling, by the UPnP control point, the UPnP device by using the UPnP device information.
제6항에 있어서, 상기 디바이스 명세 또는 서비스 명세를 생성하는 단계는,
사용자 프로그램의 변경에 대응하여 임베디드 디바이스를 생성, 소멸 또는 관리하는 단계;를 더 포함하는 것을 특징으로 하는 제너럴 UPnP 미들웨어 어댑터를 이용한 제어 방법.
The method of claim 6, wherein generating the device specification or service specification comprises:
And generating, destroying, or managing an embedded device in response to a change in a user program.
KR1020100093549A 2010-09-28 2010-09-28 COMPUTER-READABLE RECORDING MEDIUM HAVING GENERAL UPnP MIDDLEWARE ADAPTOR PROGRAM AND CONTROL METHOD USING THE SAME KR101195535B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100093549A KR101195535B1 (en) 2010-09-28 2010-09-28 COMPUTER-READABLE RECORDING MEDIUM HAVING GENERAL UPnP MIDDLEWARE ADAPTOR PROGRAM AND CONTROL METHOD USING THE SAME

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100093549A KR101195535B1 (en) 2010-09-28 2010-09-28 COMPUTER-READABLE RECORDING MEDIUM HAVING GENERAL UPnP MIDDLEWARE ADAPTOR PROGRAM AND CONTROL METHOD USING THE SAME

Publications (2)

Publication Number Publication Date
KR20120032106A true KR20120032106A (en) 2012-04-05
KR101195535B1 KR101195535B1 (en) 2012-10-30

Family

ID=46135291

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100093549A KR101195535B1 (en) 2010-09-28 2010-09-28 COMPUTER-READABLE RECORDING MEDIUM HAVING GENERAL UPnP MIDDLEWARE ADAPTOR PROGRAM AND CONTROL METHOD USING THE SAME

Country Status (1)

Country Link
KR (1) KR101195535B1 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100984810B1 (en) 2004-02-02 2010-10-01 삼성전자주식회사 Apparatus and method for enabling UPnP device to control PLC device
KR100654442B1 (en) 2004-10-18 2006-12-06 삼성전자주식회사 Network device for providing service constitution virtual and method thereof

Also Published As

Publication number Publication date
KR101195535B1 (en) 2012-10-30

Similar Documents

Publication Publication Date Title
KR100984810B1 (en) Apparatus and method for enabling UPnP device to control PLC device
US8954541B2 (en) Method, computer-readable medium, and system for discovery and registration of controlled devices associated with self-describing modules
JP3711866B2 (en) Framework having plug and play function and reconfiguration method thereof
US7603266B2 (en) Generic emulator of devices in a device communications protocol
US7958272B2 (en) Method and apparatus for outputting a user interface (UI) event of 3rd party device in home network
JP2006236354A (en) Service framework of home network and control method thereof
WO2011137788A1 (en) Device management method, middleware, and machine-to-machine communication platform, device and system
US11940778B2 (en) Method of commissioning a field device in an industrial system network
KR20070120098A (en) Method for setting home code in network system and device for network
CN104883266A (en) Network configuration accessing method and device thereof
US7191232B2 (en) Extendable provisioning mechanism for a service gateway
US8589381B2 (en) Resource management program, resource management process, and resource management apparatus
Evensen et al. SenseWrap: A service oriented middleware with sensor virtualization and self-configuration
KR100661856B1 (en) Service discovery system based on agent and method thereof, and recording medium thereof
KR20030028574A (en) Information processing apparatus and method
US20020069257A1 (en) Provisioning mechanism for a service gateway
KR20050078541A (en) Protocol for monitoring and control of home network devices
KR20190093294A (en) Device profile based gateway platform system and method for integrated control and management of heterogeneous iot network
EP2592781A1 (en) Method and system for managing network topologies in home networks
KR101195535B1 (en) COMPUTER-READABLE RECORDING MEDIUM HAVING GENERAL UPnP MIDDLEWARE ADAPTOR PROGRAM AND CONTROL METHOD USING THE SAME
JP4515489B2 (en) Information management apparatus and information management method
EP2168305B1 (en) Method of receiving/transmitting event message, controlled device, and control point
KR20080000310A (en) System for sharing information between home-network and method thereof
KR101134791B1 (en) Home network system for supporting heterogeneous network or heterogeneous device based on multi-agent technology and home gateway apparatus for the same
KR100952280B1 (en) Protocol for remote controlled-rebooting of Residential Gateway

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: 20151002

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20161004

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20170928

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20181002

Year of fee payment: 7