KR102120231B1 - Automatic generation method of sensor node program using state transition diagram - Google Patents

Automatic generation method of sensor node program using state transition diagram Download PDF

Info

Publication number
KR102120231B1
KR102120231B1 KR1020180107865A KR20180107865A KR102120231B1 KR 102120231 B1 KR102120231 B1 KR 102120231B1 KR 1020180107865 A KR1020180107865 A KR 1020180107865A KR 20180107865 A KR20180107865 A KR 20180107865A KR 102120231 B1 KR102120231 B1 KR 102120231B1
Authority
KR
South Korea
Prior art keywords
value
state
event
sensor node
state transition
Prior art date
Application number
KR1020180107865A
Other languages
Korean (ko)
Other versions
KR20200025971A (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 강릉원주대학교산학협력단
Publication of KR20200025971A publication Critical patent/KR20200025971A/en
Application granted granted Critical
Publication of KR102120231B1 publication Critical patent/KR102120231B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

본 발명은 센서노드에 대한 상태천이 다이어그램을 통해 센서노드 프로그램 또는 프로그램 골격을 자동으로 생성할 수 있는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법에 관한 것으로, 더욱 상세하게는, 센서노드의 상태를 나타내는 상태값이 구성되는 상태값 생성단계; 상태값에서 발생되는 센서노드의 사건을 나타내는 사건값이 구성되는 사건값 생성단계; 사건값의 타입(조건)을 나타내는 조건값이 구성되는 조건값 생성단계; 생성된 사건값과 조건값에 대응되는 프로그래밍 언어의 소스 코드(프로그램)가 생성 및 저장되는 사건값 코딩단계; 상태값, 사건값 및 조건값을 이용하여 상태천이도가 생성되는 다이어그램 생성단계; 및 생성된 상태천이도의 상태값, 사건값 및 조건값에 따른 상태와 저장된 소스 코드를 기반으로 센서노드에 대한 프로그램이 기설정된 코드 형태로 출력되는 프로그램 출력단계;를 포함하는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법에 관한 것이다.The present invention relates to a method for automatically generating a sensor node program through a state transition diagram capable of automatically generating a sensor node program or a program skeleton through a state transition diagram for a sensor node, and more specifically, the state of the sensor node. A state value generation step in which the indicated state value is constructed; An event value generation step in which an event value representing an event of the sensor node generated from the state value is configured; A condition value generating step in which a condition value indicating the type (condition) of the event value is constructed; An event value coding step in which source codes (programs) of a programming language corresponding to the generated event values and condition values are generated and stored; A diagram generation step in which a state transition diagram is generated using the state value, the event value, and the condition value; And a program output step in which a program for a sensor node is output in a predetermined code form based on the state values, event values and condition values of the generated state transition diagram and stored source code. It relates to a method for automatically generating a sensor node program.

Description

상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법{AUTOMATIC GENERATION METHOD OF SENSOR NODE PROGRAM USING STATE TRANSITION DIAGRAM}Automatic generation of sensor node program through state transition diagram {AUTOMATIC GENERATION METHOD OF SENSOR NODE PROGRAM USING STATE TRANSITION DIAGRAM}

본 발명은 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법에 관한 것으로, 특히, 센서노드에 대한 상태천이 다이어그램을 통해 센서노드 프로그램 또는 프로그램 골격을 자동으로 생성할 수 있는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법에 관한 것이다.The present invention relates to a method for automatically generating a sensor node program through a state transition diagram, and in particular, a sensor node program through a state transition diagram capable of automatically generating a sensor node program or a program skeleton through a state transition diagram for a sensor node. It is about the automatic generation method.

센서네트워크는 해양, 국방, 스마트 홈, 스마트 팩토리 등의 다양한 분야에서 센서데이터를 수집하고 응용하는데 있어 유용하게 활용되고 있다. 특히 최근에 4차 산업혁명이 이슈로 떠오르면서 클라우드 컴퓨팅, 빅데이터 컴퓨팅, IoT (Internet of Things)가 함께 이슈가 되고 있는데, 센서네트워크는 IoT의 기반이 되는 대표적인 기술이라 할 수 있다. 이러한 센서네트워크는 크게 센서, 센서노드, 게이트웨이 등으로 구성되는데 센서네트워크의 역할 중 하나인 센서데이터를 수집하는데 있어 직접적으로 관여하는 요소는 센서노드이다.The sensor network is useful in collecting and applying sensor data in various fields such as marine, defense, smart home, and smart factory. In particular, as the 4th Industrial Revolution recently emerged as an issue, cloud computing, big data computing, and the Internet of Things (IoT) have become issues together, and the sensor network can be said to be a representative technology that is the basis of the IoT. The sensor network is largely composed of sensors, sensor nodes, and gateways. The sensor node, which is directly involved in collecting sensor data, which is one of the roles of the sensor network, is a sensor node.

센서노드의 주된 역할은 주위 환경의 데이터를 수집하여 처리 및 상위노드로 전달하며, 센서데이터의 수집 및 상위노드로 전달을 위한 빈번한 통신 등으로 인해 센서네트워크의 에너지 효율, 통신 오버헤드 등의 성능에 막대한 영향을 미친다. 특히 한정된 자원을 갖는 센서네트워크는 에너지 효율이 중요하기 때문에 센서네트워크의 성능에 큰 영향을 미치는 센서노드를 사용 환경에 적합하도록 구성하여 에너지 효율을 높여야 한다.The main role of the sensor node is to collect the data of the surrounding environment and process it and deliver it to the upper node. Due to the frequent communication for the collection of sensor data and delivery to the upper node, the sensor node's energy efficiency, communication overhead, etc. It has a huge effect. In particular, energy efficiency is important for a sensor network with limited resources, so it is necessary to increase the energy efficiency by configuring the sensor node that has a great influence on the performance of the sensor network to suit the usage environment.

센서데이터 획득과 센서네트워크에서 데이터 혹은 메시지 송수신을 위한 센서노드 코드(프로그램)를 작성하는 것은 하드웨어, 특히 마이크로 컨트롤러 장치와 임베디드 프로그래밍 언어 그리고 임베디드 프로그래밍에 대한 전문적 지식과 기술을 요하는 작업이며, 이 지식과 기술을 익히기 위해서는 많은 시간과 노력 그리고 시행착오를 거쳐야 한다. 따라서, 이러한 시간과 노력 및 시행착오를 크게 줄이고 생산성과 유지보수성을 높이기 위해 센서노드가 수행할 수 있는 일반적 기능들을 커버하는 요소를 식별하고, 이 요소들을 기반으로 센서노드의 임베디드 소프트웨어를 설계하고 자동으로 코드를 생성하기 위한 상태천이모델을 이용하는 방법을 제안하고자 한다.Writing sensor node code (program) for acquiring sensor data and sending/receiving data or messages on sensor network is a task that requires expertise and skills in hardware, especially microcontroller devices, embedded programming languages, and embedded programming. It takes a lot of time, effort, and trial and error to master the skills and techniques. Therefore, to reduce the time, effort and trial and error, and to increase productivity and maintainability, identify the elements that cover the general functions that the sensor node can perform, and design and automate the embedded software of the sensor node based on these elements. We propose a method using a state transition model to generate codes.

상태천이모델을 이용하여 센서노드 임베디드 소프트웨어를 설계하고 코드를 자동으로 생성하는 방법을 제안하는 이유는 다음과 같은 장점을 가지기 때문이다.The reason for designing the sensor node embedded software and generating the code automatically using the state transition model is because it has the following advantages.

1. 센서노드 소프트웨어의 모델링을 수월하게 할 수 있다.1. It can facilitate modeling of sensor node software.

2. 상태천이모델 자체로 프로그램 설계가 되어 이벤트 중심의 코드로 쉽게 변환이 가능하다.2. The program is designed with the state transition model itself, so it can be easily converted into event-oriented code.

3. 모델별 처리 방식, 차이점 등을 비교하기 쉽다.3. It is easy to compare the processing method and difference for each model.

4. 센서노드 프로그램의 생산성을 높일 수 있으며, 유지보수가 쉽다.4. Productivity of sensor node program can be increased and maintenance is easy.

(인용논문 1) DongHyun Shin, Changhwa Kim, "Sensor Node Design based on State Transition Model" Journal of Korea Multimedia Society Vol. 20, No. 8, August 2017(pp. 1357-1368)(Quote 1) DongHyun Shin, Changhwa Kim, "Sensor Node Design based on State Transition Model" Journal of Korea Multimedia Society Vol. 20, No. 8, August 2017 (pp. 1357-1368)

본 발명이 해결하고자 하는 기술적 과제는, 구성한 상태, 사건 및 조건값을 기반으로 상태천이 다이어그램을 생성하고 이를 통해 기설정된 형태의 센서노드 프로그램을 자동으로 생성할 수 있는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법을 제공하는데 있다.The technical problem to be solved by the present invention is to generate a state transition diagram based on the configured state, event and condition values, and through this, a sensor node program through a state transition diagram that can automatically generate a sensor node program of a predetermined type. It is to provide an automatic generation method.

본 발명이 해결하고자 하는 다른 기술적 과제는, 상기와 같이 상태천이 다이어그램을 생성하고, 이를 통해 프로그래밍 언어별 문법에 맞춰 유사부호(pseudo code) 형태로 출력하여 프로그램 골격을 제공할 수 있는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법을 제공하는데 있다.Another technical problem to be solved by the present invention is to generate a state transition diagram as described above, and through this, a state transition diagram capable of providing a program skeleton by outputting it in a form of pseudo code according to a grammar for each programming language. It is to provide a method for automatically generating a sensor node program through the.

상기 기술적 과제를 달성하기 위한 본 발명의 특징에 따르면, 본 발명은 상태천이 다이어그램을 이용하여 센서노드에 대한 프로그램을 생성시키는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법에 관한 것으로, 상기 센서노드의 상태를 나타내는 상태값이 구성되는 상태값 생성단계; 상기 상태값에서 발생되는 상기 센서노드의 사건을 나타내는 사건값이 구성되는 사건값 생성단계; 상기 사건값의 타입(조건)을 나타내는 조건값이 구성되는 조건값 생성단계; 생성된 상기 사건값과 조건값에 대응되는 프로그래밍 언어의 소스 코드(프로그램)가 생성 및 저장되는 사건값 코딩단계; 상기 상태값, 사건값 및 조건값을 이용하여 상태천이도가 생성되는 다이어그램 생성단계; 및 생성된 상기 상태천이도의 상태값, 사건값 및 조건값에 따른 상태와 상기 저장된 소스 코드를 기반으로 센서노드에 대한 프로그램이 기설정된 코드 형태로 출력되는 프로그램 출력단계;를 포함하는 것을 특징으로 한다.According to a feature of the present invention for achieving the above technical problem, the present invention relates to a method for automatically generating a sensor node program through a state transition diagram that generates a program for a sensor node using a state transition diagram. A state value generation step in which a state value representing a state is configured; An event value generation step in which an event value representing an event of the sensor node generated from the state value is configured; A condition value generating step in which a condition value representing the type (condition) of the event value is constructed; An event value coding step in which source codes (programs) of a programming language corresponding to the generated event values and condition values are generated and stored; A diagram generation step in which a state transition diagram is generated using the state value, event value, and condition value; And a program output step in which a program for a sensor node is output in a predetermined code form based on the generated state value, event value, and condition value of the state transition diagram and the stored source code. do.

또한, 상기 상태값 생성단계는, 상기 센서노드의 상태를 나타내는 상태값이 입력되는 상태값 입력단계; 및 상기 입력된 상태값이 삭제되는 상태값 삭제단계;를 포함하는 것을 특징으로 한다.In addition, the step of generating a status value includes: a status value input step in which a status value representing the state of the sensor node is input; And a status value deleting step in which the input status value is deleted.

또한, 상기 상태값은, Start, PortCheck, Sleep, InterruptCheck, MessageProcessing, Data/MessageReception, DataTransmission, Data/MessageOptionJudgement, Data/MessageSourceJudgement, DataSave 및 Stop을 포함하는 한 군 중에서 선택된 적어도 복수 개의 상태값들로 구성된 것을 특징으로 한다.In addition, the status value is composed of at least a plurality of status values selected from one group including Start, PortCheck, Sleep, InterruptCheck, MessageProcessing, Data/MessageReception, DataTransmission, Data/MessageOptionJudgement, Data/MessageSourceJudgement, DataSave and Stop It is characterized by.

또한, 상기 사건값 생성단계는, 상기 상태값에서 발생되는 사건값이 입력되는 사건값 입력단계; 및 상기 입력된 사건값이 삭제되는 사건값 삭제단계;를 포함하는 것을 특징으로 한다.In addition, the event value generating step includes: an event value input step in which an event value generated from the status value is input; And an event value deletion step in which the input event value is deleted.

또한, 상기 사건값에는 사건 함수명과 매개변수가 포함되며, 함수 코드가 선택적으로 포함되어 표시되는 것을 특징으로 한다.In addition, the event value includes the event function name and parameters, and the function code is selectively included and displayed.

또한, 상기 사건값은, MessageExistance(), MessageReceptionCompletion(), DataTransmissionCompletion(), MessageSourceCheck(), MessageOptionCheck(), FinalData(), InterruptCheck(), WFU, ProcessingCompletion, Interrupt을 포함하는 한 군 중에서 선택된 적어도 복수 개의 사건값들로 구성된 것을 특징으로 한다.In addition, the event value, MessageExistance(), MessageReceptionCompletion(), DataTransmissionCompletion(), MessageSourceCheck(), MessageOptionCheck(), FinalData(), InterruptCheck(), WFU, ProcessingCompletion, Interrupt at least a plurality of selected from the group It is characterized by consisting of event values.

또한, 상기 조건값 생성단계는, 상기 사건값에 대한 리턴값의 타입이나 종류가 부여되는 리턴값 부여단계;를 포함하는 것을 특징으로 한다.In addition, the condition value generation step, characterized in that it comprises; a return value assignment step to which the type or type of the return value for the event value is assigned.

또한, 상기 다이어그램 생성단계는, 상기 상태값, 사건값 및 조건값을 통해 도식화되는 사용자 인터페이스(UI : User Interface)가 사용되는 것을 특징으로 한다.In addition, the step of generating the diagram is characterized in that a user interface (UI) that is schematized through the status value, event value, and condition value is used.

또한, 생성된 상기 상태천이도에서 어느 하나의 상기 상태값과 이에 연결된 상기 사건값 및 조건값은 다른 하나의 상기 상태값과 이에 연결된 상기 사건값 및 조건값과 구분되도록 표시되는 것을 특징으로 한다.In addition, in the generated state transition diagram, one of the state value and the event value and condition value connected thereto are displayed to be distinguished from the other of the state value and the event value and condition value connected thereto.

또한, 상기 기설정된 코드 형태는 유사부호(Pseudo Code)인 것을 특징으로 한다.In addition, the preset code type is characterized in that it is a pseudo code (Pseudo Code).

또한, 상기 프로그래밍 언어는 임베디드 프로그래밍 언어들 중 어느 하나인 것을 특징으로 한다.In addition, the programming language is characterized in that any one of the embedded programming language.

이상에서 상술한 본 발명에 의한 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법은 다음과 같은 효과가 있다.The method for automatically generating a sensor node program through the state transition diagram according to the present invention described above has the following effects.

먼저, 상태천이모델을 이용하여 센서노드 소프트웨어의 모델링 작업을 수월하게 진행할 수 있다.First, it is possible to facilitate the modeling of the sensor node software by using the state transition model.

또한, 상태천이모델 자체로 프로그램 설계가 가능하므로 이벤트 중심의 코드(프로그램)로 용이하게 변환할 수 있다.In addition, since the program can be designed with the state transition model itself, it can be easily converted into an event-oriented code (program).

또한, 상태값, 사건값 및 조건값을 기반으로 상태천이 다이어그램 설계작업 역시 용이함은 물론, 설계된 상태천이 다이어그램을 통해 기설정된 소스코드로 출력되므로 프로그램으로 쉽게 변환할 수 있다.In addition, it is easy to design a state transition diagram based on state values, event values, and condition values, and can be easily converted into a program because it is output as a predetermined source code through the designed state transition diagram.

또한, 상태천이 다이어그램 유지보수를 통해 센서노드 프로그램 유지보수가 용이하며, 완벽한 소스코드가 출력되지 않더라도 임베디드 프로그래밍 언어별로 프로그램 골격을 제공하여 초급 프로그래머들도 용이하게 프로그램 작업을 수행할 수 있기 때문에, 코드(프로그램) 설계와 작성 시간을 줄일 수 있어 작업 효율성을 향상시킬 수 있다.In addition, it is easy to maintain the sensor node program through maintenance of the state transition diagram, and even if the complete source code is not output, the program skeleton is provided for each embedded programming language, so even beginner programmers can easily perform the program work. (Program) The design and production time can be reduced to improve work efficiency.

도 1은 본 발명인 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법의 일실시례에 의한 구성도,
도 2 내지 도 12는 본 발명에 따른 상태천이도가 생성되는 과정을 일실시례에 의해 나타낸 도면,
도 13은 도 2내 지 도 12에서의 상태천이도 생성에서의 상태천이 배열 상태를 나타낸 도면,
도 14는 일실시례에 의한 폴링 기반의 상태천이도를 나타낸 도면,
도 15는 일실시례에 의한 인터럽트 기반의 상태천이도를 나타낸 도면,
도 16은 일실시례에 의한 폴링과 인터럽트 기반의 상태천이도를 나타낸 도면.
1 is a configuration diagram according to an embodiment of a method for automatically generating a sensor node program through a state transition diagram according to the present inventors;
2 to 12 are views showing a process of generating a state transition diagram according to an embodiment of the present invention,
13 is a view showing a state transition arrangement state in the state transition diagram generation in FIGS. 2 to 12,
14 is a diagram illustrating a state transition diagram based on polling according to an embodiment;
15 is a diagram illustrating an interrupt-based state transition diagram according to an embodiment;
16 is a diagram illustrating a state transition diagram based on polling and interruption according to an embodiment.

이하, 본 발명의 일부 실시례들을 예시적인 도면을 통해 상세하게 설명한다. 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명의 실시례를 설명함에 있어, 관련된 공지구성 또는 기능에 대한 구체적인 설명이 본 발명의 실시례에 대한 이해를 방해한다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, some embodiments of the present invention will be described in detail through exemplary drawings. It should be noted that in adding reference numerals to the components of each drawing, the same components have the same reference numerals as possible even though they are displayed on different drawings. In addition, in describing the embodiments of the present invention, when it is determined that detailed descriptions of related well-known structures or functions interfere with the understanding of the embodiments of the present invention, detailed descriptions thereof will be omitted.

또한, 본 발명의 실시례의 구성 요소를 설명하는 데 있어서, 제 1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성요소에 직접적으로 연결되거나 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결합" 또는 "접속"될 수도 있다고 이해되어야 할 것이다.In addition, in describing the components of the embodiments of the present invention, terms such as first, second, A, B, (a), (b), and the like can be used. These terms are only for distinguishing the component from other components, and the nature, order, or order of the component is not limited by the term. When a component is described as being "connected", "coupled" or "connected" to another component, that component may be directly connected to or connected to the other component, but another component between each component It should be understood that may be "connected", "coupled" or "connected".

먼저, 본 발명에 적용되는 센서노드를 설계하기 위해 고려해야 하는 요소들을 기반으로 실제 센서노드를 쉽게 모델링 할 수 있도록 센서노드 구성을 위한 상태천이모델의 구성요소를 식별하도록 한다.First, to identify the components of the state transition model for constructing the sensor node so that the actual sensor node can be easily modeled based on factors to be considered for designing the sensor node applied to the present invention.

센서노드 설계를 위한 상태천이모델의 구성요소는 크게 상태(값)와 사건(값) 및 사건(값)에 종속된 조건(값)으로 분류할 수 있다.The components of the state transition model for sensor node design can be broadly classified into states (values) and events (values) and conditions (values) dependent on events (values).

상태천이모델을 구성하는 대표적인 상태의 종류는 Start, PortCheck, Sleep, InterruptCheck, MessageProcessing, Data/MessageReception, DataTransmission, Data/MessageOptionJudgement, Data/MessageSourceJudgement, DataSave, Stop로 총 11가지이며, 이에 대한 설명은 하기의 [표 1]와 같다.The representative types of states that make up the state transition model are Start, PortCheck, Sleep, InterruptCheck, MessageProcessing, Data/MessageReception, DataTransmission, Data/MessageOptionJudgement, Data/MessageSourceJudgement, DataSave, and Stop, which are a total of 11 types. It is as shown in [Table 1].

물론, 센서노드 설계에 따라 상기 열거한 11가지 상태의 종류 이외에도 상태가 추가 및 삭제될 수 있다.Of course, depending on the design of the sensor node, states may be added and deleted in addition to the 11 types listed above.

No.No. StatesStates ExplanationExplanation 1One StartStart Program start stateProgram start state 22 PortCheckPortCheck Port Check state for pollingPort Check state for polling 33 SleepSleep Sleep state of MCUSleep state of MCU 44 InterruptCheckInterruptCheck State for interrupt checkState for interrupt check 55 MessageProcessingMessageProcessing State for other message processingState for other message processing 66 Data/MessageReceptionData/MessageReception State for data or message receptionState for data or message reception 77 DataTransmissionDataTransmission State for data transmission to upper nodeState for data transmission to upper node 88 Data/MessageOption
Judgement
Data/MessageOption
Judgement
State for immediate or delayed delivery selectionState for immediate or delayed delivery selection
99 Data/MessageSource
Judgement
Data/MessageSource
Judgement
State for data/message source identificationState for data/message source identification
1010 DataSaveDataSave State for data-savingState for data-saving 1111 StopStop Program stop stateProgram stop state

또한, 각 상태가 다음 상태로 이동하기 위해서는 사건(이벤트) 발생이 필요하다. 여기에 필요한 대표적인 사건은 MessageExistence(), MessageReceptionCompletion(), DataTransmissionCompletion(), MessageSourceCheck(), MessageOptionCheck(), FinalData(), InterruptCheck(), WFI, Processing Completion, Interrupt로 총 10가지가 있으며, 이에 대한 자세한 설명은 하기 [표 2]를 참조할 수 있다.In addition, an event (event) is required for each state to move to the next state. The typical events required for this are MessageExistence(), MessageReceptionCompletion(), DataTransmissionCompletion(), MessageSourceCheck(), MessageOptionCheck(), FinalData(), InterruptCheck(), WFI, Processing Completion, Interrupt, and a total of 10. See Table 2 below for a description.

이 역시 센서노드 설계 및 각 상태에 따라 상기 열거한 10가지 상태의 종류 이외에도 사건이 추가 및 삭제될 수 있다.According to the sensor node design and each state, events may be added and deleted in addition to the above 10 types of states.

No.No. EventsEvents ExplanationExplanation
1

One

MessageExistence()

MessageExistence()
This event checks whether any message exists in port check state. If true it moves data/message reception state, otherwise, it remains still in port check stateThis event checks whether any message exists in port check state. If true it moves data/message reception state, otherwise, it remains still in port check state

2

2

MessageReception
Completion()

MessageReception
Completion()
This event checks whether the message reception is finished completely in data/message reception state. If true the current state moves to data/message source judgement state, otherwise, the state remains still in data/message reception stateThis event checks whether the message reception is finished completely in data/message reception state. If true the current state moves to data/message source judgement state, otherwise, the state remains still in data/message reception state

3

3

DataTransmission
Completion()

DataTransmission
Completion()
This event checks whether the message transmission is finished completely in data transmission state. If true the current state moves to port check state, otherwise, the state remains still in data transmission stateThis event checks whether the message transmission is finished completely in data transmission state. If true the current state moves to port check state, otherwise, the state remains still in data transmission state


4


4

MessageSource
Check()

MessageSource
Check()
This event checks what the type of the received message source is. If message source is the sensor type in data/message source judgement, the current state moves to data/message option judgement state, but if the source type is ETC, it moves to message processing stateThis event checks what the type of the received message source is. If message source is the sensor type in data/message source judgment, the current state moves to data/message option judgment state, but if the source type is ETC, it moves to message processing state


5


5

MessageOption
Check()

MessageOption
Check()
If the returned option value as the result of this event is IM in data/message option judgement state, the current state moves to data transmission state, but if it is SV, the current state moves to data save state
IM means immediate transmission, SV means save and transmission
If the returned option value as the result of this event is IM in data/message option judgement state, the current state moves to data transmission state, but if it is SV, the current state moves to data save state
IM means immediate transmission, SV means save and transmission

6

6

FinalData()

FinalData()
If the saved data is final in data save state, the current state moves to data transmission state, otherwise, it moves to port check or sleep stateIf the saved data is final in data save state, the current state moves to data transmission state, otherwise, it moves to port check or sleep state

7

7

InterruptCheck()

InterruptCheck()
If the return value of interrupt check() is reception, the current state moves to data/message receipt state, but if ETC, it moves to message processing stateIf the return value of interrupt check() is reception, the current state moves to data/message receipt state, but if ETC, it moves to message processing state
88 WFIWFI If data transmission is completed in data transmission state, the current state moves to WFI (Wait for Interrupt) stateIf data transmission is completed in data transmission state, the current state moves to WFI (Wait for Interrupt) state 99 Processing
Completion
Processing
Completion
If data transmission is completed in message processing state, the current state moves to sleep stateIf data transmission is completed in message processing state, the current state moves to sleep state
1010 InterruptInterrupt If interrupt occurs in sleep state, the current state moves to interrupt stateIf interrupt occurs in sleep state, the current state moves to interrupt state

또한, 조건은 사건의 방향성을 나타내는 것으로, 사건값에 따라 천이가 발생하고, 어느 방향으로(어떤 상태로의) 천이가 발생하는지는 조건값에 따라 결정된다.In addition, the condition indicates the directionality of the event, and the transition occurs according to the event value, and in which direction (to which state) the transition occurs is determined according to the condition value.

조건값은 'True'나 'False' 또는 센서로부터 전송된 값인지 아닌지('Sensor' or 'ETC') 등을 포함하여 함수의 리턴값으로 표현될 수 있다.The condition value may be expressed as a return value of a function including'True' or'False' or whether it is a value transmitted from a sensor ('Sensor' or'ETC').

본 발명은 상태천이 다이어그램을 이용하여 센서노드에 대한 프로그램을 생성시키는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법에 관한 것이다.The present invention relates to a method for automatically generating a sensor node program through a state transition diagram that generates a program for a sensor node using a state transition diagram.

도 1을 참조하면, 본 발명은 상태값 생성단계, 사건값 생성단계, 조건값 생성단계, 사건값 코딩단계, 다이어그램 생성단계 및 프로그램 출력단계를 포함하여 구성된다.Referring to FIG. 1, the present invention includes a state value generation step, an event value generation step, a condition value generation step, an event value coding step, a diagram generation step, and a program output step.

상태값 생성단계에서는 센서노드의 상태를 나타내는 상태값이 구성된다. 상태값은 Start, PortCheck, Sleep, InterruptCheck, MessageProcessing, Data/MessageReception, DataTransmission, Data/MessageOptionJudgement, Data/MessageSourceJudgement, DataSave 및 Stop을 포함할 수 있으며, 상기 열거된 상태값들 중에서 선택된 적어도 복수 개의 상태값으로 구성될 수 있다.In the state value generation step, a state value representing the state of the sensor node is configured. The status values may include Start, PortCheck, Sleep, InterruptCheck, MessageProcessing, Data/MessageReception, DataTransmission, Data/MessageOptionJudgement, Data/MessageSourceJudgement, DataSave and Stop, and at least a plurality of status values selected from the listed status values. Can be configured.

전술한 상태값들은 상태값 입력단계와 상태값 삭제단계를 통해 추가되거나 삭제될 수 있다.The above-described status values can be added or deleted through the status value input step and the status value deletion step.

사건값 생성단계에서는 상기 상태값에서 발생되는 상기 센서노드의 사건을 나타내는 사건값이 구성된다. 사건값은, MessageExistance(), MessageReceptionCompletion(), DataTransmissionCompletion(), MessageSourceCheck(), MessageOptionCheck(), FinalData(), InterruptCheck(), WFU, ProcessingCompletion, Interrupt을 포함할 수 있으며, 상기 열거된 사건값들 중에서 선택된 적어도 복수 개의 사건값으로 구성될 수 있다.In the event value generation step, an event value representing an event of the sensor node generated from the state value is configured. The event value may include MessageExistance(), MessageReceptionCompletion(), DataTransmissionCompletion(), MessageSourceCheck(), MessageOptionCheck(), FinalData(), InterruptCheck(), WFU, ProcessingCompletion, Interrupt, among the event values listed above. It may be composed of at least a plurality of selected event values.

전술한 사건값들 역시 사건값 입력단계와 사건값 삭제단계를 통해 추가되거나 삭제될 수 있다. The above-described event values may also be added or deleted through the event value input step and the event value deletion step.

사건값은 사건 함수명(사건 발생 체크를 위해 함수로 처리) 형태로 표현할 수 있다. 일례로, 사건값인 "MessageExistance()"에서 사건 함수명은 "MessageExistance"이고, 함수는 "()"부분으로 괄호 안에 매개변수가 표시된다. 매개변수를 확실하게 정의할 수 없는 경우에는 상기 표시한 바와 같이 빈칸으로 구성하고, 매개변수를 확실하게 정의할 수 있는 경우에는 변환하고자 하는 프로그래밍 언어의 문법에 따라 정의한다. 함수 매개변수 정의에 이어서 함수에 대한 코드 역시 확실하게 정의할 수 없는 경우에는 빈칸으로 구성하고, 함수 코드를 확실하게 정의할 수 있는 경우에는 변환하고자 하는 프로그래밍 언어의 문법에 따라 완전한 실제 코드를 삽입할 수 있다. 여기서 코드란 프로그램을 지칭한다.The event value can be expressed in the form of an event function name (processed as a function to check the occurrence of an event). For example, in the event value "MessageExistance()", the event function name is "MessageExistance", and the function is indicated by parameters in parentheses as the "()" part. If the parameter cannot be defined reliably, it is composed of blanks as indicated above, and if the parameter can be reliably defined, it is defined according to the grammar of the programming language to be converted. Following the function parameter definition, if the code for the function cannot be clearly defined, it is composed of blanks. If the function code can be clearly defined, insert the complete actual code according to the syntax of the programming language to be converted. Can be. Here, code refers to a program.

조건값 생성단계에서는 상기 사건값의 타입(조건)을 나타내는 전술한 조건값이 구성된다. 또한, 리턴값 부여단계를 통해 상기 사건값에 대한 리턴값의 타입이나 종류 혹은 변수를 부여할 수 있다. 즉, 사건 함수의 각 리턴 항목은 타입을 주는 부분과 변수를 주는 부분 등을 고려해야 하는데 타입과 변수는 사용할 임베디드 프로그램밍 언어 및 그에 따른 문법 등을 고려해야 한다.In the condition value generation step, the above-described condition value indicating the type (condition) of the event value is configured. In addition, a type, type, or variable of a return value for the event value may be assigned through a return value assignment step. That is, each return item of the event function should consider the part giving the type and the part giving the variable, and the type and the variable should consider the embedded programming language to be used and the grammar accordingly.

사건값 코딩단계에서는 생성된 상기 사건값과 조건값에 대응되는 프로그래밍 언어의 소스 코드(프로그램)가 생성 및 저장된다. 상기 상태값은 프로그램에 그대로 표시되므로, 상기 사건값과 조건값에 대응되는 코드만 생성하여 저장한다. 이때, 적용할 임베디드 프로그래밍 언어에 따라 적합한 소스 코드를 선택하여 생성 및 저장한다. 상기 프로그래밍 언어는 임베디드 C나 임베디드 자바 등과 같은 임베디드 프로그래밍 언어들 중 하나일 수 있다.In the event value coding step, source codes (programs) of a programming language corresponding to the generated event values and condition values are generated and stored. Since the status value is displayed as it is in the program, only codes corresponding to the event value and the condition value are generated and stored. At this time, the appropriate source code is selected according to the embedded programming language to be applied and generated and stored. The programming language may be one of embedded programming languages such as embedded C and embedded Java.

다이어그램 생성단계에서는 상기 상태값, 사건값 및 조건값을 이용하여 상태천이도가 생성되며, 도 2 내지 도 12를 통해 상태천이도 생성 과정을 보다 자세히 설명하도록 한다.In the diagram generation step, a state transition diagram is generated using the state value, the event value, and the condition value, and the process of generating the state transition diagram will be described in more detail with reference to FIGS. 2 to 12.

상기 다이어그램 생성단계에서는 상기 상태값, 사건값 및 조건값을 통해 도식화가 가능한 사용자 인터페이스(UI : User Interface)가 사용될 수 있으며, 사용자 인터페이스는 컴퓨터 소프트웨어로 구성될 수 있다.In the diagram generating step, a user interface (UI) capable of being plotted through the state value, event value, and condition value may be used, and the user interface may be configured with computer software.

컴퓨터 소프트웨어로 구성할 경우 사용자 인터페이스는 모니터, 마우스 및 키보드 등을 사용할 수 있다. 모니터 상의 상부에는 다수 개의 기능아이콘이 배열된 주메뉴가 구성되고, 주메뉴의 하단 좌측에는 상태 메뉴가 우측에는 사건(천이)메뉴가 구성된다. 상태 메뉴와 사건(천이)메뉴 사이에는 상태천이도 생성화면이 구성된다. 전술한 바와 같이 상태 및 사건은 필요에 따라 추가 및 삭제할 수 있다.When configured with computer software, the user interface can use a monitor, mouse, and keyboard. A main menu in which a plurality of function icons are arranged is configured at an upper portion of the monitor, a status menu is configured at the bottom left of the main menu, and an event (transition) menu is configured at the right. Between the status menu and the event (transition) menu, a screen for generating a status transition is configured. As described above, states and events can be added and deleted as needed.

센서노드 프로그램은 임베디드 C 코드의 경우 인클루드(include)할 헤더 파일과 더불어 초기화 부분에서 MCU에서 입출력을 위해 사용할 핀 세팅, 타이머 선택 및 클럭인가 등의 초기화가 필요한데 주메뉴를 통해 초기화 코드에 필요한 정보를 세팅할 수 있다.In the case of embedded C code, the sensor node program needs to initialize the header file to be included (include), and also the initialization such as pin setting, timer selection and clock application to be used for input/output from the MCU in the initialization part. Can be set.

먼저, 도 2와 같이 초기에는 상태천이도 생성화면에 상태값의 'Start' 상태로 시작되고, 이와 'Start' 상태와 연결된 화살표가 표시된다. 'Start' 상태는 시작을 의미하고, 프로그램이 시작될 때 상기 화살표에 연결된 상태부터 시작된다.First, as shown in FIG. 2, initially, the state transition diagram starts with a'Start' state of the state value on the generation screen, and an arrow associated with the'Start' state is displayed. The'Start' state means the start and starts from the state connected to the arrow when the program starts.

도 3과 같이 상태 메뉴의 상태들 중 원하는 상태를 마우스로 선택하여 상태천이도 생성화면에 끌어다 놓으면 그 위치에서 자동으로 상태 명칭을 갖는 상태 도형이 생성된다. 점선은 마우스로 선택 후 끌기를 수행하는 행위를 나타내며, 번호는 상태를 생성한 순서를 나타낸다.As shown in FIG. 3, when a desired state is selected from the states of the state menu with a mouse and dragged onto the state transition generation screen, a state figure having a state name is automatically generated at that location. Dotted lines indicate the act of dragging after selecting with the mouse, and numbers indicate the order in which the states were created.

도 4를 참조하면, 사건(천이) 메뉴에서 상태 천이(이동)를 발생시키는 사건을 선택하면 천이 조건에 해당하는 조건값들이 메뉴에 나타나며, 나타난 메뉴에서 원하는 상태 천이 조건을 선택할 수 있다. ①의 'MessageExistance()'은 사건값을 나타내고, ②의 'TRUE, FALSE'는 조건값을 나타낸다. 이때, 상기 각각의 상태값 선택시 선택된 상태값마다 생성 가능한 천이값이 활성화되고, 상기 각각의 천이값 선택시 선택된 천이값마다 생성 가능한 조건값이 활성화되도록 구성할 수 있다.Referring to FIG. 4, when an event that causes a state transition (movement) is selected from the event (transition) menu, condition values corresponding to the transition condition appear on the menu, and a desired state transition condition can be selected from the displayed menu. 'MessageExistance()' in ① indicates an event value, and'TRUE, FALSE' in ② indicates a condition value. At this time, when each of the state values is selected, a transition value that can be generated for each selected state value is activated, and when each of the transition values is selected, a condition value that can be generated for each selected transition value can be configured to be activated.

도 5에서 ①, ② 번호는 상태 천이(state transition)를 수행해야 하는 순서를 나타내며, ③은 선택한 사건에 의해 천이가 발생하는 두 노드를 선택하거나 혹은 한 노드(상태 선택 후 다음 상태노드로 마우스 끌기를 실행하면 두 노드 사이에 화살표가 생성되면서 화살표 위에 선택한 '사건명칭 = 조건값' 표시가 나타나는 것을 보여주고 있다.In FIG. 5, numbers ① and ② indicate the order in which state transition is to be performed, and ③ indicates two nodes where a transition occurs by a selected event or one node (after selecting a state, dragging the mouse to the next state node. When is executed, an arrow is created between two nodes, showing that the selected'event name = condition value' is displayed above the arrow.

도 6에서 ④, ⑤ 번호 역시 상태 천이(state transition)를 수행해야 하는 순서를 나타내며, ⑥은 이전 방법과 동일한 방법으로 'MessageExistence()=False' 사건으로 'PortCheck' 상태에서 자신으로 가는 상태로의 천이를 나타낸다.In FIG. 6, ④ and ⑤ numbers also indicate an order in which state transition is to be performed, and ⑥ is a'MessageExistence()=False' event in the same way as the previous method, from the'PortCheck' state to the state going to itself. Indicates the transition.

도 7을 참조하면, ⑦, ⑧ 번호 역시 상태 천이(state transition)를 수행해야 하는 순서를 나타내며, 사건값 선택(⑦) 및 조건값 선택(⑧) 후 상태천이 상태들 간의 연결(⑨)순서로 상태천이도가 생성된다.Referring to FIG. 7, the numbers ⑦ and ⑧ also indicate the order in which state transitions should be performed, in order of connection between state transition states (⑨) after event value selection (⑦) and condition value selection (⑧). A state transition diagram is generated.

도 8 내지 도 11에 나타난 번호들은 사건을 생성한 순서를 나타내며, 모든 상태를 생성한 후에 모든 상태천이(사건, 조건)를 생성할 수도 있으나, 상태와 상태천이를 순서 없이 생성할 수도 있음을 보여준다.The numbers shown in FIGS. 8 to 11 indicate the order in which the events are generated, and after all the states are generated, all state transitions (events, conditions) may be generated, but the states and state transitions may be generated in any order. .

또한, 도 12에 도시된 바와 같이, 생성된 상기 상태천이도에서 어느 하나의 상기 상태값과 이에 연결된 상기 사건값 및 조건값은 다른 하나의 상기 상태값과 그에 연결된 상기 사건값 및 조건값과 구분되도록 표시될 수 있다. 일례로 도면상에는 색상을 달리하여 구분하였다. 상기와 같이 구분시 오류 수정이 용이하며, 진행 상태를 보다 쉽고 빠르게 파악할 수 있는 장점을 갖는다.In addition, as shown in FIG. 12, in the generated state transition diagram, any one of the state values and the event values and condition values connected thereto are separated from the other one and the event values and condition values connected thereto. It can be marked as possible. As an example, different colors were identified on the drawing. As described above, it is easy to correct errors when classifying, and has an advantage of easily and quickly grasping the progress.

도 13은 상기와 같은 절차에 의해 상태천이도(상태천이 다이어그램) 생성시 상태 천이 배열상태를 나타낸다.13 shows a state transition arrangement state when a state transition diagram (state transition diagram) is generated by the above procedure.

상태 천이 배열은 상태 천이 배열 원소는 상태천이에 해당하는 이전 상태, 이후 상태, 천이를 발생시키는 사건 및 그 사건의 조건값으로 구성된다.The state transition array consists of a state transition array element, which is a previous state corresponding to the state transition, a subsequent state, an event that causes the transition, and a condition value of the event.

또한, 원소 생성 방법은 상기 상태천이 생성 방법에서 볼 수 있듯이, 사건 선택 → 조건값 선택 → 상태천이를 위한 두 상태 선택이 이루어지면 이 값들을 가지고 이전 상태, 이후 상태, 사건, 조건값의 레코드를 구성하여 상태천이 배열에 삽입할 수 있다.In addition, as shown in the above state transition generation method, the element generation method selects an event → a condition value selection → when two state selections for a state transition are made, records the previous state, subsequent state, event, and condition values with these values. It can be configured and inserted into the state transition array.

프로그램 출력단계에서는 상기와 같이 생성된 상기 상태천이도의 상태값, 사건값 및 조건값에 따른 상태와 상기 저장된 소스 코드를 기반으로 센서노드에 대한 프로그램이 기설정된 코드 형태로 출력된다.In the program output step, a program for the sensor node is output in the form of a predetermined code based on the state value, the event value, and the condition value of the state transition diagram generated as described above and the stored source code.

전술한 바와 같이 함수값을 확실하게 정의할 수 있는 경우 완전한 실제 코드를 삽입함으로써 완성된 프로그램을 출력할 수 있다.If the function value can be reliably defined as described above, the completed program can be output by inserting the complete actual code.

한편, 전술한 바와 같이 상태천이도(상태천이 다이어그램)에 기반하여 프로그램으로 출력한 상태를 다음의 폴링 기반의 상태천이도, 인터럽트 기반의 상태천이도 및 폴링과 인터럽트 기반의 상태천이도를 예를 들어 설명하도록 한다.On the other hand, as described above, the state output to the program based on the state transition diagram (state transition diagram) includes the following polling-based state transition diagram, interrupt-based status transition diagram, and polling and interrupt-based status transition diagram. Listen and explain.

도 14는 전술한 절차로 생성된 폴링 기반의 상태천이도를 나타내며, 하기에 기재된 데이터(Data or Message)는 센서로부터 수신된 센서데이터이거나 상위노드로부터 수신된 상위노드데이터일 수 있다.14 shows a polling-based state transition diagram generated by the above-described procedure, and the data (Data or Message) described below may be sensor data received from a sensor or higher node data received from a higher node.

도 14를 참조하면, 포트체크단계(S100)에서는 시작(Start)과 함께 수신포트에 수신할 데이터의 존재여부를 확인한다. 수신포트에 수신할 데이터가 존재하지 않으면 다시 수신포트를 체크하여 데이터 존재여부를 확인하고, 데이터 존재시에는 존재하는 데이터를 수신하는 데이터 수신단계(S110)로 이동한다(① → ①' → ②).Referring to FIG. 14, in the port check step (S100), it is confirmed whether there is data to be received in the reception port with start. If there is no data to be received in the receiving port, check the receiving port again to check whether there is data, and if there is, move to the data receiving step (S110) to receive the existing data (① → ①'→ ②) .

데이터 수신단계(S110)에서 데이터를 수신하고 데이터 수신이 완료되면 수신 완료된 데이터가 센서에서 수신된 데이터(센서데이터)인지 또는 상위노드에서 수신된 데이터(상위노드데이터)인지를 확인하는 데이터소스 판단단계(S120)로 이동한다(②' → ③).Data source determination step of receiving data in the data receiving step (S110) and confirming whether the received data is data received from the sensor (sensor data) or data received from the upper node (higher node data) when data reception is completed. Go to (S120) (②' → ③).

데이터소스 판단단계(S120)에서는 수신된 데이터가 센서데이터인지 상위노드데이터인지를 판단한다. 이때, 센서데이터일 경우 수신된 센서데이터를 즉시 상위노드로 전송할 것인지 통합하여 전송할 것인지를 판단하는 데이터옵션 판단단계(S130)로 이동한다(④).In the data source determination step S120, it is determined whether the received data is sensor data or upper node data. At this time, in the case of sensor data, it moves to the data option determination step (S130) to determine whether to immediately transmit the received sensor data to the upper node or to integrate it (④).

데이터옵션 판단단계(S130)에서 센서데이터를 상위노드로 즉시 전송하는 경우로 판단할 경우에는, 자세히 도시하진 않았으나, 데이터 전송단계(S140)에서 센서데이터를 상위노드로 전송하고, 센서데이터의 전송이 완료되면 다시 포트체크단계(S100)로 이동한다.(⑤ → ⑥) 또한, 센서데이터의 전송이 완료되지 않으면 데이터 전송단계(S140)로 회귀한다.(⑥')When it is determined in the data option determination step (S130) that the sensor data is immediately transmitted to the upper node, although not shown in detail, in the data transmission step (S140), the sensor data is transmitted to the upper node, and the sensor data is transmitted. When it is completed, it moves back to the port check step (S100). (⑤ → ⑥) Also, if the transmission of the sensor data is not completed, the process returns to the data transfer step (S140). (⑥')

또한, 데이터옵션 판단단계(S130)에서 센서데이터를 통합하여 전송하는 경우로 판단할 경우에는, 데이터 저장단계(S150)에서 수신된 센서데이터를 저장한 후 포트체크단계(S100)로 이동하며, 수신된 센서데이터가 마지막 데이터인 경우에는 데이터 전송단계(S140)로 이동한다(④ → ⑦ → (⑧ → ① → ①' → ② → ②' → ③ → ④ → ⑦)을 반복 후 → ⑨). 구체적으로, 센서데이터를 통합하여 전송하는 경우에는 센서데이터를 수신할 때마다 계속해서 저장하는 것이다. 이는 마지막 센서데이터가 수신될 때까지 저장이 계속 진행되며, 마지막 센서데이터가 수신되어 저장되면 이전에 계속 저장했던 센서데이터를 통합하여 상위노드로 전송하도록 하는 것이다. 또한, 수신된 센서데이터가 마지막 데이터가 아닌 경우 데이터 저장단계(S150)로 회귀한다.(⑨')In addition, when it is determined that the sensor data is integrated and transmitted in the data option determination step (S130), the sensor data received in the data storage step (S150) is stored, and then the port check step (S100) is performed. If the sensor data is the last data, go to the data transfer step (S140) (④ → ⑦ → (⑧ → ① → ①'→ ② → ②'→ ③ → ④ → ⑦) and repeat → ⑨). Specifically, when sensor data is integrated and transmitted, the sensor data is continuously stored each time it is received. This continues to store until the last sensor data is received, and when the last sensor data is received and stored, the previously stored sensor data is integrated and transmitted to the upper node. In addition, if the received sensor data is not the last data, it returns to the data storage step (S150). (⑨')

여기서, 데이터옵션 판단단계(S130)는 센서데이터가 수신될 때마다 판단하며 센서데이터의 저장이 이루어지고 있는 동안에 즉시 전송으로 판단되는 경우에는 그 해당 데이터를 즉시 상위노드로 전송하게 된다.Here, the data option determination step (S130) is determined whenever sensor data is received, and if it is determined to be transmitted immediately while sensor data is being stored, the corresponding data is immediately transmitted to the upper node.

한편, 데이터소스 판단단계(S120)에서 수신된 데이터가 상위노드로부터 수신된 상위노드데이터일 경우 상기 수신된 상위노드데이터를 처리 후 포트체크단계(S100)로 이동한다(⑩ → ⑪).On the other hand, when the data received in the data source determination step S120 is upper node data received from the upper node, the received upper node data is processed and then the port check step S100 is performed (⑩ → ⑪).

즉, PortCheck 상태에서 신호가 감지되면 데이터를 수신하고, 메시지 옵션 상태에 따라 즉시 상위노드로 전송할지, 저장 후 전송할지 결정하게 된다. 처음 시작하면 포트를 확인하는 상태(PortCheck)가 되며, 메시지가 수신된 경우 메시지를 수신하는 상태로 이동하게 된다. 이때 메시지 수신이 완료되면 메시지가 센서로부터 도착한 센서 메시지인지, 상위노드에서 도착한 메시지인지 확인하는 상태로 이동하게 되며, 센서로부터 도착한 메시지인 경우 센서데이터를 즉시 상위노드로 전송할 것인지, 통합하여 전송할 것인지 판단하는 상태로 이동하게 되고, 옵션 값이 즉시 전송인 경우 데이터를 전송하는 상태로 이동 후 데이터 전송이 완료되면 처음 상태로 돌아가며, 옵션 값이 추후 전송인 경우 데이터를 저장하는 상태로 이동후 처음 상태로 이동하게 된다. 이때 마지막 데이터인 경우 데이터를 전송하는 상태로 이동 후 데이터 전송이 완료되면 처음 상태로 이동한다. 만약 상위노드로부터 도착한 메시지인 경우 해당 메시지를 처리하는 상태에서 메시지 처리 후 처음 상태로 돌아가게 된다.That is, when a signal is detected in the PortCheck state, data is received and it is determined whether to immediately transmit to the upper node or store and transmit according to the message option state. When it starts for the first time, the port is checked (PortCheck), and when a message is received, it is moved to the receiving state. At this time, when the message reception is completed, the message is moved to the status of checking whether it is a sensor message from the sensor or a message from the upper node. In the case of a message from the sensor, it is determined whether the sensor data is immediately transmitted to the upper node or integrated. When the option value is immediately transmitted, it moves to the status of transmitting data and returns to the initial status when data transfer is completed. If the option value is later transmitted, it moves to the status of saving data and moves to the initial status. Is done. At this time, in the case of the last data, it moves to the state of transmitting data, and then, when the data transmission is completed, it moves to the first state. If the message arrives from the parent node, it returns to the initial state after processing the message in the state of processing the message.

전술한 폴링 기반의 상태천이도를 생성하게 되면 프로그램 출력단계에서는 기설정된 코드 형태(여기에서는 유사부호(Pseudo Code) 형태)로 프로그램이 출력되며, 출력된 코드는 하기 [표 3]과 같다.When the above-described polling-based state transition diagram is generated, a program is output in a predetermined code form (here, a pseudo code form) in the program output step, and the output codes are as shown in [Table 3].

Figure 112018089780364-pat00001
Figure 112018089780364-pat00001

도 15는 전술한 절차로 생성된 인터럽트 기반의 상태천이도를 나타내며, 이를 설명하면 다음과 같다.15 shows an interrupt-based state transition diagram generated by the above-described procedure, which will be described below.

스타트(Start)와 함께 절전상태를 유지하는 절전모드단계(S200)로 이동한다(①).Move to the power saving mode step (S200) to maintain the power saving state with the start (①).

절전모드단계(S200)에서 데이터의 수신에 대응하는 인터럽트(Interrupt) 발생시 인터럽트 확인단계(S210)에서 인터럽트 발생여부를 확인한다(②).When an interrupt corresponding to reception of data occurs in the power saving mode step S200, it is checked whether an interrupt has occurred in the interrupt checking step S210 (②).

인터럽트 확인단계(S210)에서 데이터 수신에 대한 인터럽트 발생시 해당 데이터를 수신하는 데이터 수신단계(S220)로 이동한다. 데이터 수신단계(S220)에서 데이터 수신이 완료되면 상기 수신된 센서데이터를 즉시 상위노드로 전송할 것인지 통합하여 전송할 것인지를 판단하는 데이터옵션 판단단계(S230)로 이동한다(③ → ③' → ④).In the interrupt confirmation step (S210 ), when an interrupt for data reception occurs, the process moves to a data reception step (S220) for receiving the corresponding data. When the data reception is completed in the data reception step (S220), the process moves to the data option determination step (S230), which determines whether the received sensor data is to be transmitted to the upper node immediately or integratedly (③ → ③'→ ④).

데이터옵션 판단단계(S230)에서 센서데이터를 상위노드로 즉시 전송하는 경우로 판단할 경우에는, 자세히 도시하진 않았으나, 데이터 전송단계(S240)에서 센서데이터를 상위노드로 전송하고, 센서데이터의 전송이 완료되면 다시 절전모드단계로 이동한다(⑤ → ⑥).If it is determined in the data option determination step (S230) that the sensor data is immediately transmitted to the upper node, although not shown in detail, in the data transmission step (S240), the sensor data is transmitted to the upper node, and the sensor data is transmitted. When completed, go back to the power saving mode step (⑤ → ⑥).

또한, 데이터옵션 판단단계(S230)에서 센서데이터를 통합하여 전송하는 경우로 판단할 경우에는, 데이터 저장단계(S250)에서 수신된 센서데이터를 저장한 후 절전모드단계(S200)로 이동하며, 수신된 센서데이터가 마지막 데이터인 경우에는 데이터 전송단계(S240)로 이동한다(④ → ⑦ → (⑧ → ① → ② → ③ → ③' → ④ → ⑦)을 반복 후 → ⑨). 이 경우에도 센서데이터를 통합하여 전송하는 경우 센서데이터를 수신할 때마다 계속해서 저장하는 것이다. 이는 마지막 센서데이터가 수신될 때까지 저장이 계속 진행되며, 마지막 센서데이터가 수신되어 저장되면 이전에 계속 저장했던 센서데이터를 통합하여 상위노드로 전송하도록 하는 것이다.In addition, when it is determined that the sensor data is integrated and transmitted in the data option determination step (S230), the sensor data received in the data storage step (S250) is stored, and then the power saving mode step (S200) is performed. If the sensor data is the last data, go to the data transmission step (S240) (④ → ⑦ → (⑧ → ① → ② → ③ → ③'→ ④ → ⑦) and repeat → ⑨). Even in this case, when sensor data is integrated and transmitted, it is continuously stored whenever sensor data is received. This continues to store until the last sensor data is received, and when the last sensor data is received and stored, the previously stored sensor data is integrated and transmitted to the upper node.

여기서, 데이터옵션 판단단계(S230)는 센서데이터가 수신될 때마다 판단하며 센서데이터의 저장이 이루어지고 있는 동안에 즉시 전송으로 판단되는 경우에는 그 해당 데이터를 즉시 상위노드로 전송하게 된다.Here, the data option determination step (S230) is judged whenever the sensor data is received, and if it is determined as an immediate transmission while the sensor data is being stored, the corresponding data is immediately transmitted to the upper node.

한편, 인터럽트 확인단계(S210)에서 상기 상위노드로부터 데이터(상위노드데이터) 수신에 대한 인터럽트 발생시 상기 수신된 상위노드데이터를 처리 후 절전모드단계(S200)로 이동한다(⑩ → ⑪).On the other hand, in the interrupt confirmation step (S210), when an interrupt occurs for receiving data (higher node data) from the upper node, the received upper node data is processed and then moved to the power saving mode step (S200) (⑩ → ⑪).

즉, 인터럽트 기반의 상태천이도에서는 데이터 혹은 메시지를 대기하는 동안 인터럽트 방식을 사용하는 방법이다. 이 방법은 처음 시작하자마자 Sleep 상태에 있으며, 인터럽트가 발생할 경우에만 다음 절차를 수행할 수 있다. 제2실시례는 제1실시례와 비슷하지만 처음에 포트를 확인하지 않고 바로 절전 모드(Sleep 상태)로 들어가게 된다. 이때 인터럽트가 발생한 경우 인터럽트가 데이터 수신에 대한 인터럽트이면 데이터를 수신하는 상태로 이동하고, 기타 인터럽트이면 해당 인터럽트를 처리하는 상태로 이동하게 된다. 이것을 제외한 내용은 폴링 기반의 상태천이도의 설명 내용과 동일하다.That is, in an interrupt-based state transition diagram, an interrupt method is used while waiting for data or a message. This method is in the Sleep state as soon as it is first started, and the following procedure can be performed only when an interrupt occurs. The second embodiment is similar to the first embodiment, but immediately enters a power saving mode (Sleep state) without first checking the port. At this time, if an interrupt occurs, if the interrupt is an interrupt for data reception, the data is moved to a receiving state, and if it is an interrupt, the interrupt is moved to a processing state. Except for this, the contents of the polling-based state transition diagram are the same.

전술한 인터럽트 기반의 상태천이도를 생성하게 되면 프로그램 출력단계에서는 기설정된 코드 형태(여기에서는 유사부호(Pseudo Code) 형태)로 프로그램이 출력되며, 출력된 코드는 하기 [표 4]와 같다.When the above-described interrupt-based state transition diagram is generated, a program is output in a predetermined code form (here, a pseudo code form) in the program output step, and the output codes are as shown in [Table 4].

Figure 112018089780364-pat00002
Figure 112018089780364-pat00002

도 16은 폴링과 인터럽트 기반의 상태천이도를 나타내며, 이를 설명하면 다음과 같다.16 shows a state transition diagram based on polling and interrupt, and this will be described as follows.

폴링과 인터럽트 기반은 전술한 인터럽트 기반과 동일하며, 전술한 폴링 기반과 같이 포트체크단계를 더 포함한다는 점이 다르다 할 것이다.The polling and interrupt base is the same as the interrupt base described above, and it will be different in that it further includes a port check step like the polling base described above.

포트체크단계(270)에서는 인터럽트 확인단계(S210) 이후 데이터의 존재여부를 확인하고 데이터가 존재시 데이터 수신단계(S220)로 이동한다(⑫ → ⑫' → ⑬).In the port check step 270, it is checked whether the data exists after the interrupt check step (S210), and if data is present, the data is transferred to the data receiving step (S220) (⑫ → ⑫'→ ⑬).

그 이외의 동작은 전술한 인터럽트 기반의 동작 상태를 참조할 수 있다.Other operations may refer to the above-described interrupt-based operation state.

즉, 폴링과 인터럽트 기반은 폴링 및 인터럽트를 모두 사용하는 기법이다. 시작과 함께 절전 모드를 수행하며, 일정 주기마다 상기 폴링의 방법으로 데이터를 받아오고 그 이외에는 상기 인터럽트 방식으로 데이터를 받아온다. 이때 센서와 센서노드 간에는 폴링 방법으로, 센서모듈과 센서노드 간에는 인터럽트 방법으로 데이터를 받아올 수 있다. 이 방법은 폴링 기반의 상태천이도와 인터럽트 기반의 상태천이도를 혼합하여 사용한 것으로, 전술한 폴링과 인터럽트 기반의 상태천이도를 생성하게 되면 프로그램 출력단계에서는 기설정된 코드 형태(여기에서는 유사부호(Pseudo Code) 형태)로 프로그램이 출력되며, 출력된 코드는 하기 [표 5]와 같다.In other words, polling and interrupt-based are techniques that use both polling and interrupting. A power saving mode is performed at the start, and data is received by the polling method at regular intervals, and data is received by the interrupt method otherwise. In this case, data can be received by a polling method between the sensor and the sensor node, and an interrupt method between the sensor module and the sensor node. This method is a mixture of polling-based state transition and interrupt-based state transition, and when the above-described polling and interrupt-based state transition is generated, a predetermined code form in the program output step (here, a pseudo code (Pseudo Program) is output in the form of Code), and the output codes are as shown in [Table 5].

Figure 112018089780364-pat00003
Figure 112018089780364-pat00003

한편, 상기 기설정된 코드 형태는 유사부호(Pseudo Code) 형태로 출력될 수 있다.Meanwhile, the preset code type may be output in the form of a pseudo code.

즉, 완벽한 프로그램(코드)으로 생성할 수도 있으나, 함수를 정확히 모를 경우 각각의 프로그래밍 언어에 맞춰 사용자가 쉽게 프로그램을 완성할 수 있도록 프로그램 골격(코드 골격) 형태로 제공할 수 있다.That is, although it can be generated as a complete program (code), if the function is not known exactly, it can be provided in the form of a program skeleton (code skeleton) so that the user can easily complete the program according to each programming language.

사건 함수의 코드 프레임 생성 절차에 대한 일례를 설명하면 다음과 같다.An example of the procedure for generating a code frame of an event function is as follows.

먼저, 사건 천이 배열의 모든 레코드들에 대해 '사건(천이 사건)' 필드값에 해당하는 중복되지 않은 사건들, 집합 Events를 구한다.First, non-overlapping events corresponding to the value of the'event (transition event)' field for all records in the event transition array are obtained.

다음으로, 집합 Event의 모든 원소(사건)에 대해(이 원소의 값을 Event라 한다)가 이미 코드가 정의된 함수이면 그 함수 코드를 출력하고, 정의되어 있지 않으면 하기와 같이 유사부호(pseudo code) 형태의 코드 프레임을 출력하되 실제 코드 구현은 해당 프로그래밍 언어 문법에 따라 출력한다(여기에서 'ReturnValueType' 은 사건 함수 Event가 리턴하는 값의 타입이다).Next, for all elements (events) of the set Event (the value of this element is called Event), if the code is already a defined function, the function code is output. If not defined, the pseudo code is as follows. ) Outputs the code frame in the form, but outputs the actual code implementation according to the grammar of the corresponding programming language (where'ReturnValueType' is the type of the value returned by the event function Event).

'ReturnValueType Event() {'ReturnValueType Event() {

}'}'

또한, 메인 프로그램의 코드 프레임 생성 절차에 대한 일례를 설명하면 다음과 같다.Also, an example of the code frame generation procedure of the main program will be described as follows.

단계 1 : 초기 화면을 통해 이미 정의된 초기화 코드 부분을 출력한다.Step 1: The predefined initialization code portion is output through the initial screen.

단계 2 : 상태 배열로부터 첫 번째 원소(상태)인 'Start'를 읽고 상태천이 배열에서 이전 상태가 'Start'인 레코드를 찾아 그 레코드의 이후상태(이 필드의 값을 PostState이라 한다)에 대해 다음의 Pseudo 코드를 출력하되 실제 코드 출력은 해당 프로그래밍 언어의 문법에 따른다.Step 2: Read the first element (state)'Start' from the state array, find the record with the previous state'Start' in the state transition array, and then record the next state of the record (the value of this field is called PostState). Pseudo code is output, but the actual code output follows the syntax of the programming language.

'STATE = PostState;'STATE = PostState;

CONTINUE=TRUE;'CONTINUE=TRUE;'

단계 3 : 다음의 Pseudo 코드를 출력하되 실제 코드 출력은 해당 프로그래밍 언어의 문법에 따른다.Step 3: Output the following pseudo code, but the actual code output follows the grammar of the corresponding programming language.

'WHILE(CONTINUE) {'WHILE(CONTINUE) {

SWITCH(STATE) {' SWITCH(STATE) {'

단계 4 : 상태 배열의 두 번째 상태(원소)부터 마지막 상태(원소)까지 각 상태(이 상태의 값을 StateValue라 한다)에 다음과 같이 처리한다.Step 4: Each state (the value of this state is called StateValue) is processed as follows from the second state (element) to the last state (element) of the state array.

경우 1 : 'StateValue'가 'Stop'가 아닌 경우 (경우 2는 후술함)Case 1: When'StateValue' is not'Stop' (case 2 will be described later)

단계 4-1 : 다음의 Pseudo 코드를 출력하되 실제 코드 출력은 해당 프로그래밍 언어의 문법에 따른다.Step 4-1: Output the following pseudo code, but the actual code output follows the syntax of the corresponding programming language.

'CASE StateValue:''CASE StateValue:'

단계 4-2 : 상태천이 배열에서 이 Event를 이전 상태로 하는 모든 레코드들을 찾되 레코드가 하나만 존재하는 경우 다음의 Pseudo 코드를 출력하되 실제 코드 출력은 해당 프로그래밍 언어의 문법에 따른다(여기에서, 'PostState', 'TransitionEvent', 'ConditionValue'는 각각 해당 레코드의 이후상태, 사건, 조건값 필드들의 값을 나타낸다).Step 4-2: In the state transition array, find all records with this event as the previous state, but if there is only one record, output the following pseudo code, but the actual code output follows the syntax of the programming language (here,'PostState ','TransitionEvent', and'ConditionValue' indicate the values of the fields after the record, event, and condition values).

'IF(TransitionEvent == ConditionValue) THEN STATE = PostState;'IF(TransitionEvent == ConditionValue) THEN STATE = PostState;

BREAK;'BREAK;'

단계 4-3 : 단계 4-2에서 레코드가 둘 이상인 경우 다음 경우들을 처리한다.Step 4-3: If there are two or more records in step 4-2, the following cases are processed.

경우 1-1 : 첫번째 레코드에 대해 다음의 Pseudo 코드를 출력하되 실제 코드 출력은 해당 프로그래밍 언어의 문법에 따른다.Case 1-1: Output the following pseudo code for the first record, but the actual code output follows the syntax of the corresponding programming language.

'IF(TransitionEvent == ConditionValue) THEN STATE = PostState;''IF(TransitionEvent == ConditionValue) THEN STATE = PostState;'

경우 1-2 : 첫번째 레코드도 아니고 마지막이 아닌 각 레코드에 대해 다음의 Pseudo 코드를 출력하되 실제 코드 출력은 해당 프로그래밍 언어의 문법에 따른다.Case 1-2: The following Pseudo code is output for each record that is not the first record but the last one, but the actual code output follows the syntax of the corresponding programming language.

'ELSE IF(TransitionEvent == ConditionValue) THEN STATE = PostState''ELSE IF(TransitionEvent == ConditionValue) THEN STATE = PostState'

경우 1-3 : 마지막 레코드에 대해 다음의 Pseudo 코드를 출력하되 실제 코드 출력은 해당 프로그래밍 언어의 문법에 따른다.Case 1-3: Output the following pseudo code for the last record, but the actual code output follows the syntax of the corresponding programming language.

'ELSE IF(TransitionEvent == ConditionValue) THEN STATE = PostState;'ELSE IF(TransitionEvent == ConditionValue) THEN STATE = PostState;

BREAK;'BREAK;'

경우 2 : 'StateValue'가 'Stop'인 경우 다음의 Pseudo 코드를 출력하되 실제 코드 출력은 해당 프로그래밍 언어의 문법에 따른다.Case 2: If'StateValue' is'Stop', the following Pseudo code is output, but the actual code output follows the syntax of the corresponding programming language.

'CASE StateValue:'CASE StateValue:

CONTINUE=FALSE; CONTINUE=FALSE;

BREAK;' BREAK;'

단계 5 : 다음의 Pseudo 코드를 출력하되 실제 코드 출력은 해당 프로그래밍 언어의 문법에 따른다.Step 5: Output the following pseudo code, but the actual code output follows the grammar of the corresponding programming language.

' }'}

}' }'

이상에서, 본 발명의 실시례를 구성하는 모든 구성 요소들이 하나로 결합하거나 결합하여 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시례에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성 요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다. 또한, 이상에서 기재된 "포함하다", "구성하다" 또는 "가지다" 등의 용어는, 특별히 반대되는 기재가 없는 한, 해당 구성 요소가 내재할 수 있음을 의미하는 것이므로, 다른 구성 요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것으로 해석되어야 한다. 기술적이거나 과학적인 용어를 포함한 모든 용어들은, 다르게 정의되지 않는 한, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미가 있다. 사전에 정의된 용어와 같이 일반적으로 사용되는 용어들은 관련 기술의 문맥상의 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.In the above, even if all the components constituting the embodiments of the present invention are described as being combined or operated as one, the present invention is not necessarily limited to these embodiments. That is, if it is within the scope of the present invention, all of the components may be selectively combined and operated. In addition, the terms "include", "consist" or "have" as described above mean that the corresponding component can be intrinsic, unless specifically stated otherwise, to exclude other components. It should not be interpreted as being able to further include other components. All terms, including technical or scientific terms, have the same meaning as generally understood by a person skilled in the art to which the present invention belongs, unless otherwise defined. Commonly used terms, such as predefined terms, should be interpreted as being consistent with the contextual meaning of the related art, and are not to be interpreted as ideal or excessively formal meanings unless explicitly defined in the present invention.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 게시된 실시례들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시례에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of the present invention, and those of ordinary skill in the art to which the present invention pertains will be capable of various modifications and variations without departing from the essential characteristics of the present invention. Therefore, the embodiments disclosed in the present invention are not intended to limit the technical spirit of the present invention, but to explain, and the scope of the technical spirit of the present invention is not limited by these embodiments. The scope of protection of the present invention should be interpreted by the following claims, and all technical spirits within the equivalent range should be interpreted as being included in the scope of the present invention.

Claims (11)

상태천이 다이어그램을 이용하여 센서노드에 대한 프로그램을 생성시키는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법에 관한 것으로,
상기 센서노드의 상태를 나타내는 상태값이 구성되는 상태값 생성단계;
상기 상태값에서 발생되는 상기 센서노드의 사건을 나타내는 사건값이 구성되는 사건값 생성단계;
상기 사건값의 타입(조건)을 나타내는 조건값이 구성되는 조건값 생성단계;
생성된 상기 사건값과 조건값에 대응되는 프로그래밍 언어의 소스 코드(프로그램)가 생성 및 저장되는 사건값 코딩단계;
상기 상태값, 사건값 및 조건값을 이용하여 상태천이도가 생성되는 다이어그램 생성단계; 및
생성된 상기 상태천이도의 상태값, 사건값 및 조건값에 따른 상태와 상기 저장된 소스 코드를 기반으로 센서노드에 대한 프로그램이 기설정된 코드 형태로 출력되는 프로그램 출력단계;를 포함하며,
상기 조건값 생성단계는, 상기 사건값에 대한 리턴값의 타입이나 종류가 부여되는 리턴값 부여단계를 포함하는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법.
A method for automatically generating a sensor node program through a state transition diagram that generates a program for a sensor node using a state transition diagram,
A state value generation step in which a state value representing the state of the sensor node is configured;
An event value generation step in which an event value representing an event of the sensor node generated from the state value is configured;
A condition value generating step in which a condition value representing the type (condition) of the event value is constructed;
An event value coding step in which source codes (programs) of a programming language corresponding to the generated event values and condition values are generated and stored;
A diagram generation step in which a state transition diagram is generated using the state value, event value, and condition value; And
And a program output step in which a program for a sensor node is output in a predetermined code form based on the generated state value, event value and condition value of the state transition diagram and the stored source code.
The condition value generating step includes a method for automatically generating a sensor node program through a state transition diagram including a step of assigning a return value to which the type or type of the return value is assigned to the event value.
제1항에 있어서, 상기 상태값 생성단계는,
상기 센서노드의 상태를 나타내는 상태값이 입력되는 상태값 입력단계; 및
상기 입력된 상태값이 삭제되는 상태값 삭제단계;를 포함하는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법.
The method of claim 1, wherein the generating of the status value comprises:
A state value input step in which a state value representing the state of the sensor node is input; And
A method for automatically generating a sensor node program through a state transition diagram, including; a state value deletion step in which the input state value is deleted.
제1항에 있어서, 상기 상태값은,
Start, PortCheck, Sleep, InterruptCheck, MessageProcessing, Data/MessageReception, DataTransmission, Data/MessageOptionJudgement, Data/MessageSourceJudgement, DataSave 및 Stop을 포함하는 한 군 중에서 선택된 적어도 복수 개의 상태값들로 구성된 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법.
The method of claim 1, wherein the state value,
Sensor node program through a state transition diagram consisting of at least a plurality of status values selected from one group including Start, PortCheck, Sleep, InterruptCheck, MessageProcessing, Data/MessageReception, DataTransmission, Data/MessageOptionJudgement, Data/MessageSourceJudgement, DataSave and Stop Automatic generation method.
제1항에 있어서, 상기 사건값 생성단계는,
상기 상태값에서 발생되는 사건값이 입력되는 사건값 입력단계; 및
상기 입력된 사건값이 삭제되는 사건값 삭제단계;를 포함하는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법.
The method of claim 1, wherein the generating the event value,
An event value input step in which an event value generated from the status value is input; And
Method for automatically generating a sensor node program through a state transition diagram comprising; an event value deletion step in which the input event value is deleted.
제1항에 있어서, 상기 사건값에는,
사건 함수명과 매개변수가 포함되며, 함수 코드가 선택적으로 포함되어 표시되는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법.
According to claim 1, The event value,
A method for automatically generating a sensor node program through a state transition diagram that includes an event function name and parameters, and optionally includes a function code.
제1항에 있어서, 상기 사건값은,
MessageExistance(), MessageReceptionCompletion(), DataTransmissionCompletion(), MessageSourceCheck(), MessageOptionCheck(), FinalData(), InterruptCheck(), WFU, ProcessingCompletion, Interrupt을 포함하는 한 군 중에서 선택된 적어도 복수 개의 사건값들로 구성된 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법.
The method of claim 1, wherein the event value,
State transition consisting of at least a plurality of event values selected from the group including MessageExistance(), MessageReceptionCompletion(), DataTransmissionCompletion(), MessageSourceCheck(), MessageOptionCheck(), FinalData(), InterruptCheck(), WFU, ProcessingCompletion, Interrupt How to automatically generate a sensor node program through a diagram.
삭제delete 제1항에 있어서, 상기 다이어그램 생성단계는,
상기 상태값, 사건값 및 조건값을 통해 도식화되는 사용자 인터페이스(UI : User Interface)가 사용되는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법.
According to claim 1, The diagram generating step,
A method for automatically generating a sensor node program through a state transition diagram in which a user interface (UI), which is schematically illustrated through the state value, event value, and condition value, is used.
제1항에 있어서,
생성된 상기 상태천이도에서 어느 하나의 상기 상태값과 이에 연결된 상기 사건값 및 조건값은 다른 하나의 상태값과 이에 연결된 상기 사건값 및 조건값과 구분되도록 표시되는 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법.
According to claim 1,
In the generated state transition diagram, a sensor node program through a state transition diagram is displayed so that any one of the state values and the event values and condition values connected thereto are distinguished from the other state values and the event values and condition values connected thereto. Automatic generation method.
제1항에 있어서,
상기 기설정된 코드 형태는 유사부호(Pseudo Code)인 상태천이 다이어그램을 통한 센서노드 프로그램 자동 생성 방법.
According to claim 1,
The preset code type is a method for automatically generating a sensor node program through a state transition diagram that is a pseudo code.
제1항 내지 제6항 중 어느 한 항에 있어서,
상기 프로그래밍 언어는 임베디드 프로그래밍 언어들 중 어느 하나인 센서노드 프로그램 자동 생성 방법.
The method according to any one of claims 1 to 6,
The programming language is a method for automatically generating a sensor node program, which is one of embedded programming languages.
KR1020180107865A 2018-08-30 2018-09-10 Automatic generation method of sensor node program using state transition diagram KR102120231B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20180102956 2018-08-30
KR1020180102956 2018-08-30

Publications (2)

Publication Number Publication Date
KR20200025971A KR20200025971A (en) 2020-03-10
KR102120231B1 true KR102120231B1 (en) 2020-06-16

Family

ID=69801228

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180107865A KR102120231B1 (en) 2018-08-30 2018-09-10 Automatic generation method of sensor node program using state transition diagram

Country Status (1)

Country Link
KR (1) KR102120231B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010003160A (en) * 2008-06-20 2010-01-07 Internatl Business Mach Corp <Ibm> Computer system for editing state transition diagram on graphic programming tool, and method and computer program for the same
KR101475797B1 (en) * 2013-08-29 2014-12-30 구글 인코포레이티드 Dynamic information adaptation for a computing device having multiple power modes
JP2015506020A (en) * 2012-03-01 2015-02-26 ▲ホア▼▲ウェイ▼技術有限公司 Method and computing node for processing sensor data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010003160A (en) * 2008-06-20 2010-01-07 Internatl Business Mach Corp <Ibm> Computer system for editing state transition diagram on graphic programming tool, and method and computer program for the same
JP2015506020A (en) * 2012-03-01 2015-02-26 ▲ホア▼▲ウェイ▼技術有限公司 Method and computing node for processing sensor data
KR101475797B1 (en) * 2013-08-29 2014-12-30 구글 인코포레이티드 Dynamic information adaptation for a computing device having multiple power modes

Also Published As

Publication number Publication date
KR20200025971A (en) 2020-03-10

Similar Documents

Publication Publication Date Title
JP4619245B2 (en) Design verification method, apparatus, logic and system
US8468124B2 (en) Debugging workflows
CN105653630B (en) Data migration method and device for distributed database
CN111126781A (en) RPA service flow establishing method and system
CN103020089A (en) Method and device for importing data in EXCEL file to database
CN103324173A (en) Multiple-heterogeneous robot cooperation method based on middleware
CN101957745A (en) Method for converting ladder diagram language into structure text language
CN111736837B (en) Method, device and equipment for restoring webpage operation, readable storage medium and system
CN109325016A (en) Data migration method, device, medium and electronic equipment
CN101916200B (en) The method of terminal staging, the method for backoff of terminal upgrading and upgrading management center
CN110347976B (en) Method, system, apparatus and storage medium for fast exporting device data model
CN112698640B (en) ECU upgrading test system
KR102120231B1 (en) Automatic generation method of sensor node program using state transition diagram
CN105912740A (en) CAE distributed cooperative work method based on cloud calculation
CN110780981B (en) Task scheduling management system and method for hadoop big data platform
CN111027284A (en) Standardized output method based on flexible data access
CN105207799A (en) Batch command executing method and device
CN113741882B (en) RPA graphical instruction design method
CN116974628A (en) Information acquisition method, information acquisition device, electronic equipment and computer readable storage medium
CN113806153B (en) Chip verification method
CN114416533A (en) Artificial intelligence-based use case generation method and system for vehicle-mounted electronic product
CN114401121A (en) Application program login method and device, electronic equipment and readable storage medium
CN114416305A (en) Robot engine implementation method and system and electronic equipment
CN105302552A (en) Expansion method and device of user interface view
CN108279994B (en) Automatic solution method for connection Citrix published application exception

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