JP2007328501A - Program debug support processor, adapter for communication and program debug support processing program - Google Patents

Program debug support processor, adapter for communication and program debug support processing program Download PDF

Info

Publication number
JP2007328501A
JP2007328501A JP2006158482A JP2006158482A JP2007328501A JP 2007328501 A JP2007328501 A JP 2007328501A JP 2006158482 A JP2006158482 A JP 2006158482A JP 2006158482 A JP2006158482 A JP 2006158482A JP 2007328501 A JP2007328501 A JP 2007328501A
Authority
JP
Japan
Prior art keywords
program
debug
data
command
processing
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2006158482A
Other languages
Japanese (ja)
Other versions
JP4716929B2 (en
Inventor
Yamahiko Ito
山彦 伊藤
Shigeki Suzuki
繁樹 鈴木
Yoshiko Ochiai
淑子 落合
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2006158482A priority Critical patent/JP4716929B2/en
Publication of JP2007328501A publication Critical patent/JP2007328501A/en
Application granted granted Critical
Publication of JP4716929B2 publication Critical patent/JP4716929B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program debug support processor for achieving the debug support processing of a program described in high rank language integrated in equipment, and for easily changing setting relating to a debug command without using any expensive device such as an emulator. <P>SOLUTION: A program debug support device includes a communication processing part 106 for executing the transmission/reception processing of a telegraphic message and a description program interpreting part 105 equipped with a command deciding part 105a for deciding whether or not data relating to a signal received by the communication processing part 106 are a debug command under the execution of processing based on a main body program based on a debug program stored in a data changeable storage part 101 in which a debug program including a main body program to be debugged and data relating to a debug command for debug support processing for detecting the error of the main body program is stored, and configured to perform processing based on the main body program or the debug program based on the decision. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

この発明は、例えば、組み込み機器に機能を実行させるために搭載するプログラムのデバッグ(バグ(プログラムの誤り)の修正)を支援するための処理装置及びその処理を実現するためのプログラムに関するものである。   The present invention relates to, for example, a processing apparatus for supporting debugging (correction of a bug (program error)) of a program mounted for causing an embedded device to execute a function, and a program for realizing the processing. .

従来のプログラムデバッグ装置は、プログラム本体のほか、デバッグ支援処理(メモリに記憶された変数等の値の出力、レジスタの参照等)を行うためのコマンドのデータ(以下、デバッグコマンドという)を受信し、解釈し、実行し、その結果を返答する機能(プログラム)を行う手段を付加し、機能動作を行わせることにより、エミュレータ等を用いずにプログラム本体のデバッグ支援処理を直接行うことができるように構成している(例えば特許文献1参照)。   In addition to the program itself, a conventional program debugging device receives command data (hereinafter referred to as a debug command) for performing debugging support processing (output of values of variables and the like stored in memory, reference of registers, etc.). By adding a means for performing a function (program) that interprets, executes, and responds to the result, it is possible to directly perform debugging support processing of the program body without using an emulator or the like. (For example, refer to Patent Document 1).

特開平11−167501号公報(第1頁〜4頁、第1図)Japanese Patent Laid-Open No. 11-167501 (pages 1 to 4 and FIG. 1)

従来のプログラムデバッグ支援処理装置では、デバッグコマンドの受信・解釈・実行・返答を実行する手段が予めファームウェア内に組み込まれる構成となっており、プログラム本体のデバッグのために必要な情報を得る(出力させる)ためには、レジスタやメモリ内の特定のアドレス値等、ハードウェアのリソースを直接指定する必要があった。従って、例えば高級言語等でプログラムが記述されているような、変数の値の参照など、直接どのハードウェアのリソースを参照すべきかを指定できない場合には、このような処理が困難であるという問題点があった。   In the conventional program debug support processing apparatus, means for receiving, interpreting, executing and responding to a debug command is built in the firmware in advance, and information necessary for debugging the program body is obtained (output) In order to do so, it is necessary to directly specify hardware resources such as a register and a specific address value in the memory. Therefore, such a process is difficult when it is not possible to directly specify which hardware resource should be referred to, such as reference to a variable value such as a program written in a high-level language. There was a point.

また、デバッグ支援処理に係る各手段の機能が固定され、変更が容易でないため、例えば、デバッグコマンドについても、プログラム本体の処理に係るコマンド等のデータに応じて変更することが困難である。このため、プログラム本体の受信インタフェース(受信部)と、デバッグ用の手段の受信インタフェースが共有されている場合、インタフェースの違いにより特定できないため、プログラム本体の処理に係るデータ(コマンド等の制御信号)とデバッグコマンドとが(データの内容として)重ならないように通信しなければならないが、その設定が容易に行えないという問題点があった。   Further, since the functions of the respective units related to the debug support process are fixed and cannot be easily changed, for example, it is difficult to change the debug command according to the data such as the command related to the process of the program body. For this reason, when the reception interface (reception unit) of the program main body and the reception interface of the debugging means are shared, the data related to the processing of the program main body (control signal such as a command) cannot be specified due to the difference in interface. However, there is a problem that the setting cannot be easily performed.

この発明は、上記のような問題点を解決するためになされたもので、エミュレータ等の高価な装置を利用しなくても、機器に組み込まれた高級言語で記述されたプログラム、主としてインタプリタで解釈されるスクリプト言語のプログラムについてもデバッグ支援処理を可能にするプログラムデバッグ支援処理装置を得るものである。   The present invention has been made to solve the above-described problems, and can be interpreted by a program written in a high-level language embedded in a device, mainly by an interpreter, without using an expensive device such as an emulator. A program debugging support processing apparatus that enables debugging support processing for a script language program to be obtained is also obtained.

さらに、プログラムの処理に係るコマンドが拡張されたり書き換えられたりしたとき、プログラム本体の受信インタフェースとデバッグ用の手段の受信インタフェースが共有されている場合でも、デバッグコマンドに関する定義の設定を容易に変えることができ、プログラムの処理に係るデータとデバッグコマンドとが重ならないようにするプログラムデバッグ支援処理装置を得るものである。   Furthermore, when a command related to program processing is expanded or rewritten, even if the reception interface of the program main body and the reception interface of the debugging means are shared, the definition settings for debug commands can be easily changed. Thus, a program debug support processing apparatus is provided which prevents data related to program processing and debug commands from overlapping.

この発明に係るプログラムデバッグ支援装置は、データを含む信号の送受信処理を実行する通信処理部と、デバッグ対象となる本体プログラム及び少なくともデバッグ支援処理に係るデバッグコマンドに関するデータを含み、本体プログラムの誤りを検出するデバッグ支援処理のためのデバッグプログラムを記憶する、データ変更可能な記憶部に記憶されたデバッグプログラムに基づき、本体プログラムに基づく処理を実行中に通信処理部が受信した信号に係るデータがデバッグコマンドであるかどうかを判定するコマンド判定部を有し、コマンド判定部の判定に基づいて本体プログラム又はデバッグプログラムに基づく処理を行う記述プログラム解釈部とを備える。   A program debug support apparatus according to the present invention includes a communication processing unit that executes transmission / reception processing of a signal including data, a main body program to be debugged, and at least data related to a debug command related to the debug support processing. Based on the debug program stored in the data changeable storage unit that stores the debug program for debugging support processing to be detected, the data related to the signal received by the communication processing unit during execution of the process based on the main body program is debugged. A command determination unit that determines whether the command is a command, and a description program interpretation unit that performs processing based on the main program or the debug program based on the determination of the command determination unit.

この発明によれば、本体プログラムだけでなく、デバッグプログラムについてもデータ変更可能な記憶部にデータとして記憶するようにしたので、本体プログラムのプログラム記述形式等に対応したデバッグプログラムを容易に記憶させ、記述プログラム解釈部に実行させることが可能になり、エミュレータ等の高価な装置を用いなくても、例えば、高級言語により記述されたプログラムに対応したデバッグプログラムに基づいてデバッグ支援処理を行うことができる。   According to the present invention, since not only the main body program but also the debug program is stored as data in the storage unit where data can be changed, the debug program corresponding to the program description format of the main body program can be easily stored, It is possible to execute the description program interpretation unit, and for example, debug support processing can be performed based on a debug program corresponding to a program described in a high-level language without using an expensive device such as an emulator. .

実施の形態1.
図1はこの発明の実施の形態1によるプログラムデバッグ支援装置を中心とする構成を示すブロック図である。本実施の形態では、家電機器とホームネットワークとを接続するための通信用アダプタ100(以下、アダプタ100という)の機能を実現するために組み込まれるプログラム(以下、本体プログラムという)をデバッグ対象のプログラムとして説明する。したがってアダプタ100が、本体プログラムの処理を実行する装置であるとともに、実行装置自体が本体プログラムに係るデバッグを支援するためのプログラムデバッグ支援装置の役割を果たす。さらに具体的には、家電機器であるエアコンの制御を行うプロトコルと、家電機器同士を連携させつつ制御を行うホームネットワークの規格であるECHONET (ECHONET はECHONET コンソーシアムの商標)で規定されたプロトコルとの相互変換を行う本体プログラムのデバッグを支援する装置を例に説明する。
Embodiment 1 FIG.
1 is a block diagram showing a configuration centering on a program debugging support apparatus according to Embodiment 1 of the present invention. In the present embodiment, a program to be debugged (hereinafter referred to as a main body program) that is incorporated to realize the function of a communication adapter 100 (hereinafter referred to as adapter 100) for connecting a home appliance to a home network is a program to be debugged. Will be described. Therefore, the adapter 100 is a device that executes processing of the main body program, and the execution device itself serves as a program debugging support device for supporting debugging related to the main body program. More specifically, a protocol for controlling an air conditioner, which is a home appliance, and a protocol defined by ECHONET (ECHONET is a trademark of the ECHONET Consortium), a home network standard that controls home appliances in cooperation with each other. An apparatus that supports debugging of a main body program that performs mutual conversion will be described as an example.

図2はアダプタ100を利用して家電機器をECHONET に接続したホームネットワークの構成を示す図である。例えば、家電機器では、機種ごとの独自のプロトコルに従って動作の制御を行い、一方で、ECHONET では、規格化されたプロトコルに従って電文(各種データ等を含む信号)の送受信を行う。そのため、家電機器をホームネットワークに接続するアダプタ機能を実現する場合等において、プロトコル変換処理が必要になる。ここで、各家電機器のプロトコルに対応してプロトコル変換処理の手順をプロトコル変換プログラムとしておけば、プロトコル変換プログラムのみを書き換えて記憶手段に記憶させることで、(例えば物理的構成が)同じアダプタであれば異なる種類の家電機器に対応させることができ、ホームネットワークに各家電機器を接続することができる。そのため、プロトコル変換プログラムは、家電機器本体や、パーソナルコンピュータ、インターネット上に公開されたサーバなどの外部装置110からダウンロードできるようにし、アダプタ100を外部装置110と接続すると、記憶部101の書き換え可能な記憶領域に書き込まれるようにする。   FIG. 2 is a diagram illustrating a configuration of a home network in which home appliances are connected to ECHONET using the adapter 100. For example, household appliances control operations according to their own protocol for each model, while ECHONET transmits and receives messages (signals containing various data) according to a standardized protocol. For this reason, protocol conversion processing is required when realizing an adapter function for connecting a home appliance to a home network. Here, if the protocol conversion processing procedure is set as a protocol conversion program corresponding to the protocol of each home appliance, only the protocol conversion program is rewritten and stored in the storage means, so that the same adapter (for example, the physical configuration) is used. If it exists, it can be made to correspond to a different kind of household appliance, and each household appliance can be connected to a home network. Therefore, the protocol conversion program can be downloaded from an external device 110 such as a home appliance main body, a personal computer, or a server published on the Internet, and when the adapter 100 is connected to the external device 110, the storage unit 101 can be rewritten. Write to the storage area.

また、本実施の形態で例とするプロトコル変換プログラムは、アダプタ100を構成するハードウェア(特に記述プログラム解釈部105等の機能を実現するCPU(Central Processing Unit )等のデータ処理手段)に依存しないスクリプト言語(高級言語)で記述されているものとする。そのため、アダプタ100がハードウェア的に異なっても同じプログラムで対応させることができる。   Further, the protocol conversion program exemplified in the present embodiment does not depend on hardware (particularly, data processing means such as a CPU (Central Processing Unit) that implements the function of the description program interpretation unit 105 and the like) constituting the adapter 100. It is assumed that it is written in a script language (high-level language). Therefore, even if the adapter 100 is different in hardware, it can be handled by the same program.

図1において、アダプタ100は、プログラムを記憶する記憶部101、そのプログラムを外部装置110からダウンロード処理するプログラムダウンロード管理部102、記憶部101に記憶されたプログラムに記述された内容に基づいて処理を実行する記述プログラム解釈部105、及び、記述プログラム解釈部105と、電文中のデータを一時的に家電機器シミュレータ112(家電機器)、ECHONET のコントローラ116とが電文を送受信するための処理を行う通信処理部106から構成される。   In FIG. 1, the adapter 100 performs processing based on the contents described in the storage unit 101 that stores the program, the program download management unit 102 that downloads the program from the external device 110, and the program stored in the storage unit 101. Description program interpreter 105 to be executed, description program interpreter 105, communication for temporarily transmitting / receiving data in the electronic message between home appliance simulator 112 (home appliance) and ECHONET controller 116. The processing unit 106 is configured.

ここで、アダプタ100内の各部(特にプログラムダウンロード管理部102、記述プログラム解釈部105)に関しては、機器(ハードウェア)として独立して構成することもできるが、例えば、CPU(Central Processing Unit )を中心とするデータ処理手段(コンピュータ)でハードウェアを構成し、後述する各部によるフローチャートの手順(本体プログラム、デバッグプログラムに従って処理を行うための前段階としての手順)をあらかじめプログラム化してソフトウェア、ファームウェア等としてアダプタ100内に記憶し、コンピュータに処理させることもできる。   Here, each unit (especially the program download management unit 102 and the description program interpretation unit 105) in the adapter 100 can be configured independently as a device (hardware). For example, a CPU (Central Processing Unit) is provided. The hardware consists of a central data processing means (computer), and the procedures of flowcharts (procedures as a pre-stage for performing processing according to the main program and debug program) by each unit to be described later are pre-programmed into software, firmware, etc. Can be stored in the adapter 100 and processed by the computer.

記憶部101には、前述した本体プログラムが例えばファイル形式のデータとして記憶される(以下、記憶された本体プログラムの記述内容を本体プログラム記述部103という)。また、本体プログラムをデバッグするためのデバッグプログラムも同様にファイル形式のデータとして記憶される(以下、記憶されたデバッグプログラムの記述内容をデバッグプログラム記述部104という)。そして、デバッグプログラム記述部104は、さらに、デバッグコマンドの定義や処理に基づいて出力すべきデバッグ情報の指定に係る記述がなされたデバッグコマンド設定記述部107と、デバッグ情報を出力する実行手順が記述されたデバッグコマンド実行記述部108とからなる。後述するように、デバッグコマンド設定記述部107に記述された内容は、記述プログラム解釈部105が行う処理により、デバッグに係る処理を行う際に参照とするデータとしてデバッグ情報格納部109に登録され、格納される。そして、デバッグ情報格納部109は、通信処理部106が受信した電文内のデバッグコマンドに関して、その定義等に関するデータをデバッグコマンドデータとして登録したデバッグコマンド登録部116と、出力すべきデバッグ情報の指定等に関するデータをデバッグデータとして登録したデバッグデータ登録部117から構成される。これらについては後述する。   The storage unit 101 stores the above-described main body program as, for example, data in a file format (hereinafter, the description content of the stored main body program is referred to as a main body program description unit 103). Similarly, a debug program for debugging the main body program is also stored as data in a file format (hereinafter, the description content of the stored debug program is referred to as a debug program description unit 104). The debug program description unit 104 further includes a debug command setting description unit 107 in which a description relating to the designation of debug information to be output based on the definition and processing of the debug command and an execution procedure for outputting the debug information are described. The debug command execution description unit 108 is provided. As will be described later, the content described in the debug command setting description unit 107 is registered in the debug information storage unit 109 as data to be referred to when performing processing related to debugging by the processing performed by the description program interpretation unit 105, Stored. The debug information storage unit 109 includes a debug command registration unit 116 that registers data related to the definition of the debug command in the message received by the communication processing unit 106 as debug command data, designation of debug information to be output, and the like. This is composed of a debug data registration unit 117 that registers data related to debug data as debug data. These will be described later.

電文送受信部114から送信された電文を、アダプタ100の通信処理部106が受信する。記述プログラム解釈部105のデバッグコマンド判定部105aは、デバッグコマンド登録部116に登録したデバッグコマンドデータを参照して、電文中のデータがデバッグコマンドであるか否かを判定する。デバッグコマンドであると判定すると、デバッグプログラムによる処理を行うものと判定して、記述プログラム解釈部105は、デバッグコマンド実行記述部108の記述に従った処理を実行する。一方、デバッグコマンドでないと判定すると、本体プログラム記述部103の記述に従った処理を実行する。ここで、記述プログラム解釈部105が各プログラムの記述に基づく処理を行う際、後述するように辞書を参照して処理を行う。辞書記憶部105cは、この辞書に関するデータが登録され、記憶されている。また、記述プログラム解釈部105には、例えば、処理を実行中に、その処理に係る指示命令、データを例えば一時的に記憶しておくキャッシュメモリ(RAM)、レジスタ等の処理記憶部105bを有するものとする。デバッグ支援処理においては、特に本体プログラムに基づく処理実行時における処理記憶部105bに記憶された変数、配列(バッファ等)の値をデバッグ情報として出力する等の処理が行われる。   The communication processing unit 106 of the adapter 100 receives the message transmitted from the message transmission / reception unit 114. The debug command determination unit 105a of the description program interpretation unit 105 refers to the debug command data registered in the debug command registration unit 116, and determines whether or not the data in the message is a debug command. If it is determined that the command is a debug command, it is determined that processing by the debug program is to be performed, and the description program interpretation unit 105 executes processing according to the description of the debug command execution description unit 108. On the other hand, if it is determined that the command is not a debug command, processing according to the description in the main body program description unit 103 is executed. Here, when the description program interpretation unit 105 performs a process based on the description of each program, the process is performed with reference to a dictionary as will be described later. In the dictionary storage unit 105c, data related to this dictionary is registered and stored. In addition, the description program interpretation unit 105 includes, for example, a processing storage unit 105b such as a cache memory (RAM) or a register for temporarily storing instruction commands and data related to the processing during the processing. Shall. In the debug support process, a process of outputting a value of a variable or an array (buffer or the like) stored in the process storage unit 105b at the time of executing a process based on the main program as debug information is performed.

家電機器シミュレータ112は、実際の家電機器の代わりに、デバッグ段階において、その家電機器に対応した通信電文、デバッグコマンド等のデータを含む電文を送受信するための装置であり、例えばパーソナルコンピュータ等によって構成される。ここで、家電機器シミュレータ112は、アダプタ100に送信する電文を作成する電文作成部113と、アダプタ100との間で電文の送受信電文を行う電文送受信部114及びアダプタ100との間で送受信を行った電文内容を表示する電文表示部118から構成される。   The home appliance simulator 112 is a device for transmitting and receiving a telegram including data such as a communication telegram and a debug command corresponding to the home appliance in the debugging stage instead of an actual home appliance, and is configured by, for example, a personal computer Is done. Here, the home appliance simulator 112 performs transmission / reception between the message generation unit 113 that generates a message to be transmitted to the adapter 100, the message transmission / reception unit 114 that transmits / receives a message to / from the adapter 100, and the adapter 100. The message display unit 118 displays the message contents.

コントローラ115は、ECHONET の電文を送受信する装置である。特に限定はしないが、家電機器シミュレータ112と同様に、パーソナルコンピュータ等によって構成されるシミュレータでも良い。以下、家電機器シミュレータ112とアダプタ100(通信処理部106)との間を家電機器側とし、コントローラ115とアダプタ100との間をECHONET 側とする。   The controller 115 is a device that transmits and receives ECHONET messages. Although not particularly limited, a simulator constituted by a personal computer or the like may be used in the same manner as the home appliance simulator 112. Hereinafter, the portion between the home appliance simulator 112 and the adapter 100 (communication processing unit 106) is the home appliance side, and the space between the controller 115 and the adapter 100 is the ECHONET side.

図3は、プログラムダウンロード管理部102の処理動作を表すフローチャートを示す図である。接続端子(図示せず)等を介して、プログラムを保持した外部装置110にアダプタ100が接続されると、ステップST301において、プログラムダウンロード管理部102は、例えば電圧の変化等により外部装置110との接続を検知する。接続により、プログラムダウンロード管理部102(アダプタ100)とプログラム保持部(外部装置110)との間で通信が可能となる。次に、ステップST302で、プログラム保持部111に保持されたプログラムをダウンロード処理する。本体プログラム及び/又はデバッグプログラムは、それぞれ例えばファイル形式のデータとしてアダプタ100の記憶部101に記憶される。そして、ステップST303において、記述プログラム解釈部105に処理を引き継ぎ実行させる。   FIG. 3 is a flowchart illustrating the processing operation of the program download management unit 102. When the adapter 100 is connected to the external device 110 that holds the program via a connection terminal (not shown) or the like, in step ST301, the program download management unit 102 communicates with the external device 110 due to, for example, a change in voltage. Detect connection. The connection enables communication between the program download management unit 102 (adapter 100) and the program holding unit (external device 110). Next, in step ST302, the program held in the program holding unit 111 is downloaded. The main body program and / or the debug program are stored in the storage unit 101 of the adapter 100, for example, as file format data. In step ST303, the description program interpretation unit 105 is caused to take over and execute the process.

図4は、アダプタ100のプロトコル変換と通信処理における動作を記述した本体プログラムの例を示す図である。ここで、プログラムは1又は複数の実行コードで構成される。実行コードは、記述プログラム解釈部105においてインタプリタにより逐次に実行処理を行う際の単位となる。本実施の形態においては、プログラムを記述する言語としてForth を用いる。Forth はスタック(LIFO(Last In First Out)によるデータ構造)を利用した逆ポーランド記法に基づく言語であり、構文解析が不要なため、処理系が小さく、省資源(記憶容量を必要としない)でインタプリタが動作するという特徴を持つ。このため、家電機器に接続する通信用のアダプタのように、低コストで実現することが要求される機器に搭載するインタプリタとしては最適な言語である。   FIG. 4 is a diagram illustrating an example of a main body program describing operations in the protocol conversion and communication processing of the adapter 100. Here, the program is composed of one or a plurality of execution codes. The execution code is a unit when the description program interpreter 105 sequentially executes the execution process by the interpreter. In the present embodiment, Forth is used as a language for describing a program. Forth is a language based on reverse Polish notation using the stack (data structure by LIFO (Last In First Out)) and requires no parsing, so the processing system is small, saving resources (does not require storage capacity) It has the feature that the interpreter operates. For this reason, it is an optimal language as an interpreter mounted on a device that is required to be realized at a low cost, such as a communication adapter connected to a home appliance.

Forth では、実行すべき処理を表すデータをWordと呼ぶ。実行コードは、Wordと、Wordに基づく処理のためのデータとで構成され、データ、Wordの順に記述される。各Wordについては、その処理内容のデータとあらかじめ定義づけられて(関連づけられて)、辞書として辞書記憶部105cに登録され、管理されている。実行コードに記述された文字列等のデータにおいて、辞書として登録されていればWordであり、登録されていなければ処理のためのデータとなる。また、Wordはあらかじめ決められたものだけではなく、さらに処理内容を定義して辞書として辞書記憶部105cにデータとして登録することで、新たな処理機能を追加できる。プログラムの解釈・実行において、記述プログラム解釈部105は、プログラムを処理する際、読み込んだ文字列が辞書に存在しない場合は処理のためのデータとみなしてスタックに積み、辞書に存在する場合は、Wordとみなして(その時点において)スタックに積まれた各データに対して処理を実行する。   In Forth, data representing the process to be executed is called Word. The execution code includes Word and data for processing based on Word, and is described in the order of data and Word. Each word is defined (associated) with the data of the processing contents in advance and is registered and managed as a dictionary in the dictionary storage unit 105c. In data such as a character string described in the execution code, if it is registered as a dictionary, it is Word, and if it is not registered, it is data for processing. In addition, not only predetermined words but also new processing functions can be added by defining processing contents and registering them as data in the dictionary storage unit 105c as a dictionary. In the interpretation / execution of the program, when the program is processed, the description program interpretation unit 105 regards the read character string as data for processing if it does not exist in the dictionary, loads it in the stack, and if it exists in the dictionary, Treats each piece of data on the stack as if it were a Word (at that time).

例えば、図4では、ANS規格で規定されたForthのWord(Programming Languages-Forth X3J14 dpANS-6 -June 30,1993)に加え、プロトコル変換用の拡張Wordとして、「SET_SEND_EPC」、「GET_EPC 」、「FROM_ECHONET」、「TO_EQUIPMENT」、及び「FROM_EQUIPMENT 」というWordを定義し、登録して用いるものとする。   For example, in FIG. 4, in addition to Forth Word (Programming Languages-Forth X3J14 dpANS-6 -June 30,1993) defined in the ANS standard, extended words for protocol conversion include “SET_SEND_EPC”, “GET_EPC”, “GET_EPC”, “ Words “FROM_ECHONET”, “TO_EQUIPMENT”, and “FROM_EQUIPMENT” are defined, registered, and used.

「SET_SEND_EPC」は、ECHONET プロパティとその値のデータを、ECHONET 規格の電文に変換してECHONET 側に送信する処理を記述プログラム解釈部105に行わせるためのWordである。「GET_EPC 」は、ECHONET 側からの受信からECHONET プロパティの値を取得する処理を行わせるためのWordである。ここで、ECHONET プロパティとは、例えば、エアコンにおける風量設定状態等、家電機器に応じて設定可能なプロパティのコードを表すものとする。そして、そのコードに対する値はそれぞれECHONET の規格で定められている。   “SET_SEND_EPC” is a word for causing the description program interpreter 105 to perform processing for converting ECHONET property and data of its value into an ECHONET standard message and transmitting it to the ECHONET side. “GET_EPC” is a word for performing processing to obtain the value of the ECHONET property from reception from the ECHONET side. Here, the ECHONET property represents, for example, a property code that can be set according to the home appliance, such as an air volume setting state in an air conditioner. Each value for that code is defined by the ECHONET standard.

「FROM_ECHONET」は、ECHONET 側からの電文の受信の有無をチェックする処理を行わせるWordである。「TO_EQUIPMENT」は、送信バッファに格納されたデータを含む電文を家電機器側に送信処理させるWordである。「FROM_EQUIPMENT」は、家電機器側から受信した電文中のデータ(コマンド等。以下、受信データという)を受信バッファに格納させる処理を行わせる、受信処理を行うためのWordである。   “FROM_ECHONET” is a word that performs processing to check whether or not a message has been received from the ECHONET side. “TO_EQUIPMENT” is a word that causes a home appliance to transmit a message including data stored in a transmission buffer. “FROM_EQUIPMENT” is a word for performing a reception process for causing a reception buffer to store data (commands, etc., hereinafter referred to as reception data) in a message received from the home appliance side.

次に、記述プログラム解釈部105が行う処理内容について図4の本体プログラムに基づいて説明する。ここで、アダプタ100と接続する家電機器がエアコン(空気調和装置)であるものとして説明する。1行目は、このプログラムで扱う数値が16進数であることを示している。2行目と3行目は、受信バッファとなる「RV_BUF」と送信バッファとなる「TR_BUF」とがそれぞれ22バイトの配列であることを宣言している。4行目と5行目は、「IDT 」と「EDT 」がそれぞれ整数型の変数であることを宣言している。   Next, the processing contents performed by the description program interpretation unit 105 will be described based on the main body program of FIG. Here, the home appliance connected to the adapter 100 will be described as an air conditioner (air conditioner). The first line indicates that the numerical value handled by this program is a hexadecimal number. The second and third lines declare that “RV_BUF” serving as a reception buffer and “TR_BUF” serving as a transmission buffer are 22-byte arrays, respectively. The fourth and fifth lines declare that “IDT” and “EDT” are integer type variables, respectively.

7行目から14行目は、エアコン(家電機器)側からの受信電文を解釈するWord「PROC_RV_DATA」の処理内容を定義している。9行目から12行目は、エアコン側からの受信電文が格納された受信バッファ「RV_BUF」の8バイト目の値が、電源ON/OFFの状態を示すことを仮定して記述したコードである。例えば「RV_BUF」の8バイト目の値が「0 」のときはエアコンの電源がOFFであり、「1 」のときはエアコンの電源がONを表すものとする。9行目で、受信バッファ「RV_BUF」の8バイト目を取り出し、変数「IDT 」に代入処理する。10行目で、「IDT 」の値が「0 」であれば、変数「EDT 」に「31」を代入処理し、11行目で、「IDT 」の値が「1 」であれば、変数「EDT 」に「30」を代入処理する。12行目で、Word「SET_SEND_EPC」を実行処理し、「EDT 」の値を電文に含み、ECHONET 側に送信する処理を行う。ここで、12行目の「80」はECHONET 規格で規定された電源ON/OFFを表すECHONET プロパティである。ECHONET 規格では、ECHONET プロパティ「80」における値が「31」のときは電源OFFを、「30」のときは電源ONを表すことが規定されている。つまり、12行目は、ECHONET 規格の仕様に変換されたプロパティの値をデータとして送信電文に含み、ECHONET 側に送信する処理を行うことになる。   The 7th to 14th lines define the processing content of the word “PROC_RV_DATA” that interprets the received message from the air conditioner (home appliance) side. The 9th to 12th lines are code written assuming that the value of the 8th byte of the reception buffer “RV_BUF” storing the received message from the air conditioner indicates the power ON / OFF state. . For example, when the value of the eighth byte of “RV_BUF” is “0”, the power supply of the air conditioner is OFF, and when it is “1”, the power supply of the air conditioner is ON. In the ninth line, the eighth byte of the reception buffer “RV_BUF” is extracted and assigned to the variable “IDT”. In the 10th line, if the value of “IDT” is “0”, “31” is assigned to the variable “EDT”, and if the value of “IDT” is “1” in the 11th line, the variable Substitute “30” into “EDT”. On line 12, the word “SET_SEND_EPC” is executed, the value of “EDT” is included in the message, and it is sent to the ECHONET side. Here, “80” on the 12th line is an ECHONET property indicating power ON / OFF defined by the ECHONET standard. The ECHONET standard stipulates that when the value in the ECHONET property “80” is “31”, the power is turned off, and when it is “30”, the power is turned on. In other words, on line 12, the property value converted to the ECHONET standard specification is included in the transmission message as data, and the transmission is performed to the ECHONET side.

16行目から25行目は、エアコン側に送信する電文を設定する処理を行うWord「PROC_TR_DATA」の処理内容を定義している。17行目では、エアコンに送信する電文を格納する送信バッファ「TR_BUF」の0バイト目に値「FC」を代入処理する。18行目では「TR_BUF」の1バイト目に値「41」を代入処理する。20行目から23行目は「TR_BUF」の8バイト目の値が、エアコンの電源ON/OFFの状態を示すことを仮定して記述したコードである。「TR_BUF」の8バイト目の値が「0 」のときはエアコンの電源をOFFに設定し、「1 」のときはエアコンの電源をONに設定するものとする。20行目で、Word「GET_EPC 」によって、ECHONET 側から受信したECHONET プロパティ「80」に対する値を取得して、変数「EDT 」に代入処理する。21行目で、「EDT 」の値が「31」であれば、変数「IDT 」に「0 」を代入処理し、22行目で、「EDT 」の値が「30」であれば、変数「IDT 」に「1 」を代入処理する。23行目で、「IDT 」の値を送信バッファ「TR_BUF」の8バイト目に代入処理する。   The 16th to 25th lines define the processing content of the word “PROC_TR_DATA” that performs processing for setting a message to be transmitted to the air conditioner side. In the 17th line, the value “FC” is assigned to the 0th byte of the transmission buffer “TR_BUF” for storing the message to be transmitted to the air conditioner. In the 18th line, the value “41” is assigned to the first byte of “TR_BUF”. The 20th to 23rd lines are codes described assuming that the value of the eighth byte of “TR_BUF” indicates the power ON / OFF state of the air conditioner. When the value of the eighth byte of “TR_BUF” is “0”, the power supply of the air conditioner is set to OFF, and when the value is “1”, the power supply of the air conditioner is set to ON. On line 20, the value for ECHONET property “80” received from ECHONET side is acquired by Word “GET_EPC” and assigned to variable “EDT”. In the 21st line, if the value of “EDT” is “31”, “0” is assigned to the variable “IDT”, and if the value of “EDT” is “30” in the 22nd line, the variable Substitute “1” into “IDT”. In the 23rd line, the value of “IDT” is substituted into the eighth byte of the transmission buffer “TR_BUF”.

27行目から39行目のメイン処理は、無限ループになっており、ECHONET 側から電文を受信したら、ECHONET プロパティ及びその値をエアコン側に送信する電文に変換してエアコン側に送信し、エアコン側から電文を受信したら、ECHONET プロパティに変換して電文をECHONET 側に送信する、という処理を行う。   The main processing from the 27th line to the 39th line is an infinite loop. When a message is received from the ECHONET side, the ECHONET property and its value are converted into a message to be sent to the air conditioner side, and sent to the air conditioner side. When a message is received from the side, the ECHONET property is converted and the message is sent to the ECHONET side.

30行目では、Word「FROM_ECHONET」によって、ECHONET 側からの受信をチェックしている。「FROM_ECHONET」は、受信があった場合は値「1 」をスタックに積み、受信がなかった場合は値「0 」をスタックに積む。31行目から34行目は、ECHONET 側から受信があった場合の処理内容を表す。32行目でWord「PROC_TR_DATA」を呼び出して、16行目から25行目に記述された内容に基づく処理を実行し、エアコン側への送信電文の内容を送信バッファ「TR_BUF」に格納する。33行目で、Word「TO_EQUIPMENT」によって、「TR_BUF」の内容を送信電文としてエアコン側に送信処理する。   On line 30, the reception from ECHONET side is checked by Word “FROM_ECHONET”. “FROM_ECHONET” loads the value “1” on the stack when received, and loads the value “0” on the stack when not received. The 31st to 34th lines represent the processing contents when there is a reception from the ECHONET side. The word “PROC_TR_DATA” is called in the 32nd line, processing based on the contents described in the 16th to 25th lines is executed, and the contents of the transmission message to the air conditioner are stored in the transmission buffer “TR_BUF”. In line 33, the word “TO_EQUIPMENT” is used to transmit the content of “TR_BUF” to the air conditioner as a transmission message.

一方、35行目では、受信処理のためのWord「FROM_EQUIPMENT」によって、エアコン側からの受信をチェックする。「FROM_EQUIPMENT」は、受信があった場合は受信電文を受信バッファ「RV_BUF」に格納して値「1 」をスタックに積み、受信がなかった場合は値「0 」をスタックに積む。36行目から38行目は、エアコン側から受信があった場合の処理を表す。37行目でWord「PROC_TR_DATA」を呼び出して、7行目から14行目に記述された内容に基づく処理を実行し、送信バッファ「RV_BUF」の各バイトの値をECHONET プロパティに変換してECHONET 側に送信電文として送信する。   On the other hand, on the 35th line, reception from the air conditioner side is checked by the word “FROM_EQUIPMENT” for reception processing. “FROM_EQUIPMENT” stores the received message in the reception buffer “RV_BUF” when receiving, and stacks the value “1” on the stack, and stacks the value “0” on the stack when there is no reception. The 36th line to the 38th line represent processing when receiving from the air conditioner side. The word "PROC_TR_DATA" is called on the 37th line, the processing based on the contents described in the 7th to 14th lines is executed, the value of each byte of the transmission buffer "RV_BUF" is converted into the ECHONET property, and the ECHONET side As a transmission message.

図5は本体プログラムの別例を表す図である。図4では、説明のために、本体プログラムにコメントを付与してインデントを施したが、実際にダウンロードされる本体プログラムの記述としては、図5のように、コメントや余分な空白を削除した形式であっても良い。   FIG. 5 shows another example of the main body program. In FIG. 4, for the sake of explanation, a comment is given to the main body program and indented. However, as a description of the main program that is actually downloaded, a form in which comments and extra blanks are deleted as shown in FIG. It may be.

図6は、デバッグプログラムの例を示す図である。本実施の形態では、デバッグプログラムについても、本体プログラム同様、プログラムの記述をForth によって行い、デバッグ用の拡張Wordを加えた言語を用いて記述している。本例で用いる「SET_DBG_CMD 」は、本体プログラム上の指定された位置で受信するデバッグコマンドに関するデータをデバッグコマンド登録部116に登録する処理を記述プログラム解釈部105に行わせるためのWordである。また、「SET_DBG_DATA」は、本体プログラム上の指定された位置におけるデータの値を記録する処理を行わせるため、デバッグデータをデバッグデータ登録部118に登録処理するためのWordである。「GET_DBG_CMD 」は、アダプタ100が受信した電文がデバッグコマンドであった場合に、デバッグコマンドを取得する処理を行わせるためのWordである。「DUMP_DATA 」は、デバッグ情報に係るデータの内容を出力する処理を行わせるためのWordである。   FIG. 6 is a diagram illustrating an example of a debug program. In the present embodiment, the debugging program is also described using Forth in the same manner as the main body program, with a description of the program written in Forth and the extended Word for debugging. “SET_DBG_CMD” used in this example is a word for causing the description program interpretation unit 105 to perform processing for registering data related to the debug command received at a specified position on the main body program in the debug command registration unit 116. “SET_DBG_DATA” is a word for registering debug data in the debug data registration unit 118 in order to perform a process of recording a data value at a designated position on the main body program. “GET_DBG_CMD” is a Word for performing processing for obtaining a debug command when the message received by the adapter 100 is a debug command. “DUMP_DATA” is a Word for performing a process of outputting the contents of data related to debug information.

次に、記述プログラム解釈部105が行うデバッグ処理内容について図6のデバッグプログラムの記述に基づいて説明する。1行目は、このプログラムで扱う数値が16進数であることを示している。2行目は、「CODE」が整数型の変数であることを示している。   Next, the contents of debug processing performed by the description program interpretation unit 105 will be described based on the description of the debug program of FIG. The first line indicates that the numerical value handled by this program is a hexadecimal number. The second line indicates that “CODE” is an integer type variable.

3行目から11行目は、デバッグコマンド設定記述部107であることを示すWordである「RGST_DBG_CMD」の処理内容を定義している。4行目の「SET_DBG_CMD 」の1つ右のデータ「1 」は、デバッグコマンド情報を識別するコマンドIDのデータである。2つ右の「64」は、本体プログラム上において、デバッグコマンドの受信を確認(チェック)する位置(ポイント)を表すデータである。本実施の形態では、本体プログラム上の位置を、先頭から何番目のシンボル(名前)であるかという値で示すものとする。ここでは、「64」は図4のLOC401の位置を示すものとする。3つ右の「2 」は、デバッグコマンドの長さを表すものとする。5つ右と4つ右の「FF 1」は、デバッグコマンドのバイト列を示すものとする。4行目の記述は、図4のLOC401の位置における受信チェックによって得られるバイト列「FF 1」のデバッグコマンドのコマンドIDを「1 」と定義したことを示す。   The third to eleventh lines define the processing content of “RGST_DBG_CMD”, which is a Word indicating that it is the debug command setting description unit 107. Data “1” to the right of “SET_DBG_CMD” on the fourth line is data of a command ID for identifying debug command information. “64” on the right is data representing a position (point) in the main body program for confirming (checking) reception of the debug command. In this embodiment, the position on the main body program is indicated by a value indicating what number symbol (name) is from the top. Here, “64” indicates the position of the LOC 401 in FIG. “2” on the right of 3 represents the length of the debug command. “FF 1” on the 5th right and 4th right indicates the byte string of the debug command. The description on the fourth line indicates that the command ID of the debug command of the byte string “FF 1” obtained by the reception check at the position of the LOC 401 in FIG. 4 is defined as “1”.

同様に、5行目の記述は、図4のLOC402の位置における受信チェックによって得られるバイト列「FF 2」のデバッグコマンドのコマンドIDを「2 」と定義したことを示す。6行目の記述は、図4のLOC403の位置における受信チェックによって得られるバイト列「FF 3」のデバッグコマンドのコマンドIDを「3 」と定義したことを示す。   Similarly, the description on the fifth line indicates that the command ID of the debug command of the byte string “FF 2” obtained by the reception check at the position of the LOC 402 in FIG. 4 is defined as “2”. The description on the sixth line indicates that the command ID of the debug command of the byte string “FF 3” obtained by the reception check at the position of the LOC 403 in FIG. 4 is defined as “3”.

7行目において、Word「SET_DBG_DATA」の1つ右の「1 」は、出力すべきデバッグ情報のデバッグデータを識別するデータIDである。2つ右の「1 」は記録すべきデータのタイプを表す値である。「1 」のときは変数の値を、「2 」のときは配列の値を、「3 」のときはスタックの状態を記録するものとする。3つ右の「78」は、本体プログラム上でデバッグ情報を記録する位置である。本実施の形態では、プログラム上の位置を、先頭から何番目のシンボルであるかという値で示すものとする。ここでは、「78」は図4のLOC402の位置を示すものとする。5つ右と4つ右の「C"EDT"」は「EDT 」というシンボルを表す記述である。7行目の記述は、図4のLOC402の位置における変数「EDT 」の値の記録をデータID「1 」と定義したことを示す。   In the seventh line, “1” to the right of the word “SET_DBG_DATA” is a data ID for identifying debug data of debug information to be output. “1” on the right is a value indicating the type of data to be recorded. When “1”, the value of the variable is recorded, when “2”, the value of the array is recorded, and when “3”, the state of the stack is recorded. “78” to the right of three is a position where debug information is recorded on the main body program. In the present embodiment, the position on the program is indicated by a value indicating what number symbol is from the beginning. Here, “78” indicates the position of the LOC 402 in FIG. "C" EDT "" on the 5th right and 4th right are descriptions representing the symbol "EDT". The description on the seventh line indicates that the record of the value of the variable “EDT” at the position of the LOC 402 in FIG. 4 is defined as the data ID “1”.

8行目は、記録するデータが配列の場合の記述である。「SET_DBG_DATA」の4つ右の「16」は、配列長(10進数では22バイト)を示す。8行目の記述は、図4のLOC401の位置における22バイトの配列「RV_BUF」の値の記録をデータID「2 」と定義したことを示す。9行目と10行目は、記録するデータがスタックの場合の記述である。本体プログラムがスタックを利用した逆ポーランド記法に基づいた言語で記述されている場合、スタックの内容を確認する機能を設けることにより、スタックのオーバーフローなど、入出力される電文内容の確認だけでは検出しにくいバグも検出可能となる。スタックの状態を記録する場合は、シンボルの指定は不要である。9行目の記述は、図4のLOC403の位置におけるスタックの状態の記録をデータID「3 」と定義し、10行目の記述は、図4のLOC404の位置におけるスタックの状態の記録をデータID「4 」と定義したことを示す。   The eighth line is a description when the data to be recorded is an array. “16” to the right of “SET_DBG_DATA” indicates the array length (22 bytes in decimal). The description on the eighth line indicates that the recording of the value of the 22-byte array “RV_BUF” at the position of the LOC 401 in FIG. 4 is defined as the data ID “2”. The ninth and tenth lines are descriptions when the data to be recorded is a stack. When the main program is written in a language based on the reverse Polish notation using the stack, a function to check the contents of the stack is provided to detect only by checking the contents of input / output messages such as stack overflow. Difficult bugs can be detected. When recording the stack status, it is not necessary to specify a symbol. The description in the ninth line defines the record of the stack state at the position of the LOC 403 in FIG. 4 as the data ID “3”, and the description in the tenth line describes the record of the stack state at the position of the LOC 404 in FIG. Indicates that the ID is defined as “4”.

13行目から25行目は、デバッグコマンド実行記述部108であることを示すWordである「EXEC_DBG_CMD」の処理内容を定義している。このデバッグコマンド実行記述部108の記載に基づいて記述プログラム解釈部105が行う処理内容については後述する。   The 13th to 25th lines define the processing content of “EXEC_DBG_CMD”, which is a Word indicating that it is the debug command execution description part 108. The processing contents performed by the description program interpretation unit 105 based on the description of the debug command execution description unit will be described later.

なお、プログラム保持部111は、必ずしも本体プログラムとデバッグプログラムの両方を保持している必要はない。例えば本体プログラムのデータのみ保持している場合は、そのデータを記憶部101に記憶させてもよい。このときは本体プログラム記述部103の記述内容が変更される。また、同様に、デバッグプログラムのデータのみ保持している場合は、デバッグプログラム記述部104の記述内容が変更される。また、本体プログラム記述記憶部103とデバッグプログラム記述記憶部104を、物理的に別の記憶手段で記憶させるようにしてもよい(この場合、プログラムダウンロード管理部102は、ダウンロードしたプログラムが本体プログラムであるかデバッグプログラムであるかを判断してそれぞれの記憶手段に記憶させる必要がある)。また、本体プログラムとデバッグプログラムとをそれぞれ別のファイル形式のデータとして記憶させているが、別のファイルである必要は無く、同一のファイル中に記述してもよい(この場合、記述プログラム解釈部105は、Wordによって機能実行の処理かデバッグに係る処理かの区別を行う)。   Note that the program holding unit 111 does not necessarily have to hold both the main body program and the debug program. For example, when only the data of the main body program is held, the data may be stored in the storage unit 101. At this time, the description content of the main body program description unit 103 is changed. Similarly, when only the debug program data is held, the description content of the debug program description unit 104 is changed. Further, the main body program description storage unit 103 and the debug program description storage unit 104 may be physically stored in different storage means (in this case, the program download management unit 102 may download the downloaded program as a main body program). It is necessary to determine whether it is a debug program or not and store it in each storage means). In addition, the main body program and the debug program are stored as data in different file formats, but they need not be separate files, and may be described in the same file (in this case, the description program interpretation unit) 105 distinguishes between function execution processing and processing related to debugging according to Word).

プログラムダウンロード管理部102により、上記のような本体プログラムとデバッグプログラムが、それぞれ本体プログラム記述記憶部103とデバッグプログラム記述記憶部104に格納された後、ステップST303によって、記述プログラム解釈部105が処理を実行する。   After the main program and the debug program as described above are stored in the main program description storage unit 103 and the debug program description storage unit 104 by the program download management unit 102, the description program interpretation unit 105 performs processing in step ST303. Execute.

図7は、記述プログラム解釈部105の処理動作のフローチャートを表す図である。まず、ステップST701において、記述プログラム解釈部105は、例えば、ファイル名等により、デバッグプログラムが記述された部分のデータを記憶部101から検索し、デバッグプログラムに記述された処理を開始する。記述プログラム解釈部105は、Word「RGST_DBG_CMD」に基づいて、そのWordに係る実行コードに記述されたデータを、デバッグコマンドデータとしてデバッグコマンド登録部116に登録させる。また、Word「SET_DBG_DATA」が記述されていると判断すると、そのWordに係る実行コードに記述されたデータを、デバッグデータとしてデバッグデータ登録部117に登録させる。   FIG. 7 is a diagram illustrating a flowchart of the processing operation of the description program interpretation unit 105. First, in step ST701, the description program interpretation unit 105 searches the storage unit 101 for data of a part in which a debug program is described using, for example, a file name, and starts processing described in the debug program. The description program interpretation unit 105 causes the debug command registration unit 116 to register the data described in the execution code related to the word based on the word “RGST_DBG_CMD” as debug command data. If it is determined that the word “SET_DBG_DATA” is described, the data described in the execution code related to the word is registered in the debug data registration unit 117 as debug data.

図8は、図6のデバッグコマンド設定記述部107の記述に基づいて登録処理されたデバッグコマンド登録部116の内容を示す図である。ここで、各データについてはテーブル形式で登録されるものとする。コマンドID格納欄801は、各デバッグコマンドを識別するコマンドIDのデータを格納する欄である。デバッグコマンド受信ポイント格納欄802は、デバッグコマンドの受信確認をする本体プログラム上のポイント(位置)のデータを格納する欄である。コマンド長格納欄803は、登録されるデバッグコマンドの長さのデータを格納する欄である。デバッグコマンドバイト列格納欄804は、デバッグコマンドのバイト列のデータを格納する欄である。   FIG. 8 is a diagram showing the contents of the debug command registration unit 116 that has been registered based on the description of the debug command setting description unit 107 of FIG. Here, each data is registered in a table format. The command ID storage column 801 is a column for storing command ID data for identifying each debug command. The debug command reception point storage column 802 is a column for storing point (position) data on the main body program for confirming reception of the debug command. The command length storage column 803 is a column for storing data of the length of the debug command to be registered. The debug command byte string storage column 804 is a column for storing byte string data of a debug command.

図9は、図6のデバッグコマンド設定記述部107の記述に基づいて登録処理されたデバッグデータ登録部117の内容を示す図である。ここでも、各データについてテーブル形式で登録されているものとする。データID格納欄901は、出力すべき各デバッグ情報のデバッグデータを識別するデータIDのデータを格納する欄である。デバッグ情報設定ポイント格納欄902は、デバッグ情報を記録する処理を行う本体プログラム上の位置のデータを格納する欄である。データ種別格納欄903は、デバッグ情報が、変数であるか、シンボルであるか、スタックであるかの種別を表すデータを格納する欄である。デバッグシンボル格納欄904は、デバッグ種別が変数または配列のときに設定され、変数または配列のシンボルを格納する欄である。型格納欄905は、デバッグ種別が変数または配列のときに設定され、変数または配列のデータ型(type)のデータを格納する欄である。配列サイズ格納欄906は、デバッグ種別が配列のときに設定され、配列のサイズのデータを格納する欄である。データ内容格納欄907は、デバッグ情報の内容のデータを格納する欄である。   FIG. 9 is a diagram showing the contents of the debug data registration unit 117 that has been registered based on the description of the debug command setting description unit 107 of FIG. Again, it is assumed that each data is registered in a table format. The data ID storage column 901 is a column that stores data ID data for identifying debug data of each debug information to be output. The debug information setting point storage column 902 is a column for storing data at a position on the main body program that performs processing for recording debug information. The data type storage column 903 is a column for storing data representing the type of whether the debug information is a variable, a symbol, or a stack. The debug symbol storage column 904 is a column that is set when the debug type is a variable or an array and stores a symbol of the variable or the array. The type storage column 905 is a column that is set when the debug type is a variable or an array, and stores data of the data type (type) of the variable or the array. The array size storage column 906 is a column that is set when the debug type is array, and stores array size data. The data content storage column 907 is a column for storing data of the contents of debug information.

図10は、ST702を詳細化した、記述プログラム解釈部105が行うデバッグ支援に係る本体プログラムの実行処理時に行う処理動作を示したフローチャートを表す図である。ST701によってデバッグを行う際に参照するデータをデバッグ情報格納部109に登録処理した後、ST702によって、デバッグ支援のために本体プログラムの処理を実行する。まず、デバッグ支援処理段階を実行する。ステップST1001で、本体プログラムの読み込み位置を更新(設定)する。登録処理の直後であれば、読み込み位置は本体プログラム記述記憶部103の先頭に設定し、その他の場合であれば、処理を実行したシンボルの次のシンボルに更新する。   FIG. 10 is a detailed flowchart of ST702 showing processing operations performed during the execution processing of the main body program related to debugging support performed by the description program interpretation unit 105. After registering the data to be referred to when performing debugging in ST701 in the debug information storage unit 109, processing of the main body program is executed for debugging support in ST702. First, the debug support processing stage is executed. In step ST1001, the reading position of the main body program is updated (set). If it is immediately after the registration process, the reading position is set at the head of the main body program description storage unit 103, and in other cases, it is updated to the next symbol after the symbol for which the process was executed.

次に、ステップST1002で、読み込み位置がデバッグ情報設定ポイントであるか否かを判定する。デバッグ情報設定ポイントは、デバッグデータ登録部117のデバッグ情報設定ポイント格納部902に格納されているため、記述プログラム解釈部105は、判定の際にデバッグ情報設定ポイント格納欄902に登録されたデータを参照する。   Next, in step ST1002, it is determined whether or not the reading position is a debug information setting point. Since the debug information setting point is stored in the debug information setting point storage unit 902 of the debug data registration unit 117, the description program interpretation unit 105 uses the data registered in the debug information setting point storage column 902 at the time of determination. refer.

「YES 」と判定すれば、ステップST1003で処理記憶部105bに記憶されたデータのうち、対応するデバッグ情報を記録する処理を行う。例えば図9のデバッグデータ登録部117に従うと、読み込み位置が「64」(図4のLOC401)であれば配列「RV_BUF」の値を、読み込み位置が「78」(図4のLOC402)であれば変数「EDT 」の値を、読み込み位置が「12C 」(図4のLOC403)であればスタックの状態を、読み込み位置が「134 」(図4のLOC404)であればスタックの状態を、デバッグデータ登録部117のデータ内容格納欄907にデバッグ情報として記録する。   If “YES” is determined, processing for recording corresponding debugging information among the data stored in the processing storage unit 105b in step ST1003 is performed. For example, according to the debug data registration unit 117 in FIG. 9, if the reading position is “64” (LOC 401 in FIG. 4), the value of the array “RV_BUF” is set, and if the reading position is “78” (LOC 402 in FIG. 4). If the reading position is “12C” (LOC403 in FIG. 4), the stack state is displayed if the value of the variable “EDT” is “12C” (FIG. 4 LOC403), and the stack state is displayed if the reading position is “134” (LOC404 in FIG. 4). It is recorded as debug information in the data content storage field 907 of the registration unit 117.

図11はデバッグ情報設定ポイントにおける最新の値が、データ内容格納欄907にデータとして記録されたデバッグデータ登録部117の例を示す図である。ST1003の処理を行った結果、デバッグデータ登録部117のデータ内容格納欄907には、常に各デバッグ情報について、デバッグ情報設定ポイントにおける最新の値がデータとして記録された状態となる。   FIG. 11 is a diagram showing an example of the debug data registration unit 117 in which the latest value at the debug information setting point is recorded as data in the data content storage field 907. As a result of performing the processing of ST1003, the data content storage column 907 of the debug data registration unit 117 is always in a state where the latest value at the debug information setting point is recorded as data for each debug information.

次に、ステップST1004で、読み込み位置がデバッグコマンド受信ポイントであるか否かを判定する。デバッグコマンド受信ポイントのデータは、デバッグコマンド登録部116のデバッグコマンド受信ポイント格納欄802に格納されており、判定の際には登録されたデバッグコマンドデータを参照する。   Next, in step ST1004, it is determined whether or not the reading position is a debug command reception point. The debug command reception point data is stored in the debug command reception point storage column 802 of the debug command registration unit 116, and the registered debug command data is referred to in the determination.

「YES 」と判定すれば、ステップST1005で、デバッグコマンド判定部105aが、受信電文に基づく未処理の受信データをチェック処理する。ステップST1006において、デバッグコマンド判定部105aは、デバッグコマンド登録部116に登録されているデバッグコマンド受信ポイント欄802とデバッグコマンドバイト列欄804のデータを参照し、未処理の受信データと比較する。そして、受信データがデバッグコマンド登録部116に登録されているデバッグコマンドと合致したかどうかを条件にして判定を行う。「YES 」と判定すれば、ステップST1007において、デバッグプログラム中のデバッグコマンド実行記述部108に記述された実行コードに基づいて処理を実行する。   If “YES” is determined, in step ST1005, the debug command determination unit 105a checks unprocessed received data based on the received message. In step ST1006, the debug command determination unit 105a refers to the data in the debug command reception point column 802 and the debug command byte string column 804 registered in the debug command registration unit 116, and compares the data with unprocessed received data. Then, the determination is made on the condition that the received data matches the debug command registered in the debug command registration unit 116. If "YES" is determined, in step ST1007, the process is executed based on the execution code described in the debug command execution description section 108 in the debug program.

図6の13行目から25行目は、デバッグコマンド実行記述部108を示すWordである「EXEC_DBG_CMD」の処理内容を定義している。まず、Word「GET_DBG_CODE」によって、デバッグコマンド登録部116を参照して、受信データに基づくコマンドIDのデータを返す処理を実行する。「DUMP_DATA 」は、データID901に対応するデータを出力するWordである。図6のデバッグコマンド実行記述部108の記述に従うと、受信したデバッグコマンドのコマンドIDが「1 」のときは、データIDが「2 」に対応するデータである読み込み位置が図4のLOC401のときの配列「RV_BUF」の値(データ内容格納欄907に記録されたデバッグ情報のデータ。以下同じ)をデータとして出力する。コマンドIDが「2 」のときは、データIDが「1 」に対応するデータである読み込み位置が図4のLOC402のときの変数「EDT 」の値をデータとして出力する。コマンドIDが「3 」のときは、データIDが「3 」に対応するデータである図4の読み込み位置がLOC403のときのスタックの状態と、データIDが4に対応するデータである図4の読み込み位置がLOC404のときのスタックの状態をデータとして出力する。通信処理部106は、出力したデータを含む信号を送信電文として家電機器シミュレータ112(家電機器側)に送信する。   The 13th to 25th lines in FIG. 6 define the processing contents of “EXEC_DBG_CMD” which is a Word indicating the debug command execution description part 108. First, referring to the debug command registration unit 116 by using the word “GET_DBG_CODE”, a process of returning data of a command ID based on the received data is executed. “DUMP_DATA” is a Word that outputs data corresponding to the data ID 901. According to the description of the debug command execution description unit 108 in FIG. 6, when the command ID of the received debug command is “1”, the read position corresponding to the data ID “2” is the LOC 401 in FIG. The value of the array “RV_BUF” (debug information data recorded in the data content storage column 907, the same applies hereinafter) is output as data. When the command ID is “2”, the value of the variable “EDT” when the read position corresponding to the data ID “1” is the LOC 402 in FIG. 4 is output as data. When the command ID is “3”, the stack state when the reading position in FIG. 4 which is data corresponding to the data ID “3” is LOC 403 and the data corresponding to data ID 4 is shown in FIG. The stack state when the reading position is LOC 404 is output as data. The communication processing unit 106 transmits a signal including the output data to the home appliance simulator 112 (home appliance side) as a transmission message.

図12は電文表示部118に表示された電文の内容を示す図である。アダプタ100へ送信する電文内容と、アダプタ100から受信した電文内容を表示する。図12は本実施の形態において、デバッグデータ登録部117の状態が図11である状態で、電文「FF 03 」を送信したときにアダプタ100から送信された電文を受信し、電文表示部118に表示した状態の例を示したものである。ここで、読み込み位置が「12C 」(図4のLOC403)及び「134 」(図4のLOC404)のスタックの状態「00」「01」が電文として送信されるが、スタックの要素のサイズは2バイトのリトルエンディアンで、スタックデータの始まりには、「FFFF」が付与されるものとする。また、Word「DUNP_DATA 」によって、アダプタ100から出力する電文は、データの内容そのままではなく、データの区切りや、データの種別となる情報を付与した形式であってもよい。   FIG. 12 is a diagram showing the contents of the message displayed on the message display unit 118. The message content to be transmitted to the adapter 100 and the message content received from the adapter 100 are displayed. FIG. 12 shows that the electronic message “FF 03” is transmitted from the adapter 100 when the debug data registration unit 117 is in the state shown in FIG. 11 in the present embodiment, and the electronic message display unit 118 receives the message. An example of the displayed state is shown. Here, the stack states “00” and “01” with the reading positions “12C” (LOC403 in FIG. 4) and “134” (LOC404 in FIG. 4) are transmitted as messages, but the size of the elements of the stack is 2 Assume that “FFFF” is added to the beginning of the stack data in a little endian byte. In addition, the message output from the adapter 100 using the word “DUNP_DATA” may be in a format in which information that is a data delimiter or data type is added instead of the data contents as they are.

一方、ステップST1006において「NO」と判定すると、受信データを未処理にしたままステップST1008に進む。これにより、デバッグ支援処理段階は終了する。   On the other hand, if “NO” is determined in step ST1006, the process proceeds to step ST1008 while the received data remains unprocessed. As a result, the debug support processing stage is completed.

次に、本体プログラム処理段階を実行する。ステップST1008で、本体プログラムの読み込み位置におけるシンボル(文字列)を読み込む。次にステップST1009で、シンボルが受信処理用のWordであるか否かを判定する。本実施の形態では、家電機器側の受信インタフェースからデバッグコマンドを受信する可能性があるので、ST1009の判定が「YES」となるのは、読み込んだ文字列が「FROM_EQUIPMENT」の場合である。   Next, the main body program processing stage is executed. In step ST1008, a symbol (character string) at the reading position of the main body program is read. Next, in step ST1009, it is determined whether the symbol is a word for reception processing. In this embodiment, there is a possibility that a debug command may be received from the reception interface on the home appliance side, so the determination in ST1009 is “YES” when the read character string is “FROM_EQUIPMENT”.

ステップST1009において「YES 」と判定すると、ステップST1010で、受信データがデバッグコマンド登録部116に登録されているデバッグコマンドであるか否かをデバッグコマンド判定部105aがチェックする。デバッグコマンドの場合はステップST1011の判定が「YES 」となる。ここは本体プログラム処理段階であるため、デバッグコマンドに基づいて処理を行わない。そこで、以後の読み込み位置におけるデバッグ支援処理段階で処理させるため、ステップ1014で受信データなしとみなし、受信データを未処理のままにする。   If “YES” is determined in step ST1009, the debug command determination unit 105a checks whether or not the received data is a debug command registered in the debug command registration unit 116 in step ST1010. In the case of a debug command, the determination in step ST1011 is “YES”. Since this is the main body program processing stage, no processing is performed based on the debug command. Therefore, in order to perform processing in the debugging support processing stage at the subsequent reading position, it is assumed that there is no reception data in step 1014, and the reception data is left unprocessed.

一方、ステップST1011において「NO」と判定すれば、受信データは本体プログラムに基づく処理を行うために用いられるデータであるため、ステップST1013で、本体プログラムに従って受信データの処理等を行う。   On the other hand, if “NO” is determined in step ST 1011, the received data is data used for processing based on the main body program. Therefore, in step ST 1013, the received data is processed according to the main body program.

また、ステップST1008で読み込んだ文字列が「FROM_EQUIPMENT」以外の場合は、ステップST1009において「NO」と判定することになる。ステップST1012で、シンボルに対する通常の処理を行う。次に、ステップST1015で本体プログラムが終了したか否かを判定し、終了していない場合は、ステップ1001に戻って、本体プログラムの読み込み位置を更新する。以上のようにして、デバッグ支援処理を行い、例えば、電文表示部118に表示された電文の内容に基づいて本体プログラムのバグを発見することによりデバッグが行われる。   If the character string read in step ST1008 is other than “FROM_EQUIPMENT”, it is determined as “NO” in step ST1009. In step ST1012, normal processing for symbols is performed. Next, it is determined in step ST1015 whether or not the main body program has ended. If not, the flow returns to step 1001 to update the reading position of the main body program. As described above, debugging support processing is performed, and for example, debugging is performed by finding a bug in the main body program based on the contents of the message displayed on the message display unit 118.

このようなデバッグの段階を経て、バグのない本体プログラムに基づくアダプタ100の機能を実用段階で用いる場合、例えば、デバッグ情報格納部109に格納するデータを空にしたり、デバッグプログラム自体を記憶部101から消去したりすれば、記述プログラム解釈部105は、デバッグ支援処理を実行することなく、本体プログラムだけに基づいた処理を実行することができる。   When the functions of the adapter 100 based on the bug-free main body program are used in the practical stage after such a debugging stage, for example, the data stored in the debugging information storage unit 109 is emptied, or the debugging program itself is stored in the storage unit 101. If it is deleted from the program, the description program interpretation unit 105 can execute processing based only on the main body program without executing debug support processing.

以上のように、本実施の形態の装置(アダプタ100)では、プログラムダウンロード管理部102により、本体プログラムだけでなく、デバッグプログラムについても外部装置110からダウンロード可能にし、従来のようなファームウェア形式ではなく、データ変更(書き換え)可能な記憶部101に記憶するようにしたので、本体プログラムのプログラム記述形式等に対応したデバッグプログラムを容易に記憶させ、記述プログラム解釈部105に実行させることが可能になり、エミュレータ等の高価な装置を用いなくても、例えば、高級言語により記述された本体プログラムに対応したデバッグプログラムに基づいてデバッグ支援処理を行うことができる。また、デバッグ情報格納部109にデバッグ支援処理に関するデータを格納することで、デバッグコマンドの判断、デバッグ情報を取得する本体プログラムの実行位置をデバッグプログラムに基づいて容易に設定することができる。さらに、プログラムダウンロード管理部102により、例えば、家電機器、サーバ等に接続することにより、機能実行、デバッグ支援処理等に必要なプログラムをダウンロードすることができる。   As described above, in the apparatus (adapter 100) of the present embodiment, the program download management unit 102 allows not only the main body program but also the debug program to be downloaded from the external apparatus 110, so that it does not have a conventional firmware format. Since the data can be changed (rewritten) in the storage unit 101, a debug program corresponding to the program description format of the main body program can be easily stored and can be executed by the description program interpretation unit 105. For example, debugging support processing can be performed based on a debugging program corresponding to a main body program described in a high-level language without using an expensive device such as an emulator. Further, by storing data related to the debug support process in the debug information storage unit 109, it is possible to easily set the execution position of the main body program for determining the debug command and acquiring the debug information based on the debug program. Furthermore, the program download management unit 102 can download a program necessary for function execution, debugging support processing, and the like by connecting to a home appliance, a server, or the like.

また、デバッグプログラムのデータ内容の変更が容易に行えるので、デバッグコマンド設定記述部107の記述に基づいて、デバッグ支援処理を行うためのデバッグコマンドの設定(定義)変更も容易に行うことができる。そのため、例えば通信処理部106において受信インタフェースが共有され、本体プログラムの処理に係るコマンド等の受信データとデバッグコマンドとの内容に重なりが認められない場合でも、重ならないように振り分けできる設定を容易に行うことができる。このため、特にデバッグ支援処理の対象装置が通信用のアダプタ100のような場合、搭載する本体プログラムを実機で動作検証可能となる。   Further, since the data contents of the debug program can be easily changed, the setting (definition) of the debug command for performing the debug support process can be easily performed based on the description of the debug command setting description unit 107. Therefore, for example, even when the communication processing unit 106 shares a reception interface, and there is no overlap between the received data such as a command related to the processing of the main body program and the contents of the debug command, it is easy to make a setting that can be distributed so as not to overlap. It can be carried out. For this reason, particularly when the target device of the debugging support processing is the communication adapter 100, it is possible to verify the operation of the installed main body program with the actual device.

さらに、処理記憶部105bに記憶された変数や配列の値をデバッグ情報として出力するだけでなく、本体プログラムを記述する言語がスタックを利用した逆ポーランド記法に基づいた言語の場合には、スタックの状態もデバッグ情報として出力できるようにしたので、例えば、スタックのオーバーフローなど、入出力の信号を確認しただけでは検出しにくいバグも検出可能となる。   In addition to outputting variables and array values stored in the processing storage unit 105b as debug information, if the language describing the main body program is a language based on reverse Polish notation using a stack, Since the status can also be output as debug information, for example, it is possible to detect bugs that are difficult to detect just by checking the input / output signal, such as stack overflow.

実施の形態2.
上述の実施の形態では、外部装置110から本体プログラム、デバッグプログラムをダウンロードし、記憶部101に記憶させるようにしたが、これに限定するものではない。例えば、装置から着脱可能なメモリカード等の記憶手段を記憶部101として、別の装置で各プログラムを記憶させることもできる。
Embodiment 2. FIG.
In the above-described embodiment, the main body program and the debug program are downloaded from the external device 110 and stored in the storage unit 101. However, the present invention is not limited to this. For example, each program can be stored in another device using a storage unit 101 such as a memory card that can be detached from the device as the storage unit 101.

以上のように、この発明に係るアダプタ(変換装置)は、小型軽量化、省スペース化、低コストを図るのに、さらに製品の品質向上するのに有用である。   As described above, the adapter (conversion device) according to the present invention is useful for reducing the size and weight, saving the space, and reducing the cost, and further improving the quality of the product.

この発明のプログラムデバッグ支援装置を中心とするブロック図である。It is a block diagram centering on the program debugging support apparatus of this invention. アダプタ100を利用したホームネットワークの構成を示す図である。2 is a diagram illustrating a configuration of a home network using an adapter 100. FIG. プログラムダウンロード管理部102の処理動作のフローチャートである。5 is a flowchart of processing operations of a program download management unit 102. この発明の実施の形態の本体プログラムの例である。It is an example of the main body program of the embodiment of the present invention. コメントや余分な空白を削除した本体プログラムの例である。This is an example of the main program with comments and extra white space removed. この発明の実施の形態のデバッグプログラムの例である。It is an example of the debug program of embodiment of this invention. 記述プログラム解釈部105の処理動作のフローチャートである。5 is a flowchart of processing operations of a description program interpretation unit 105. この発明の実施の形態のデバッグコマンド登録部116の例である。It is an example of the debug command registration part 116 of embodiment of this invention. この発明の実施の形態のデバッグデータ登録部117の例である。It is an example of the debug data registration part 117 of embodiment of this invention. 本体プログラムの処理時における処理動作のフローチャートである。It is a flowchart of the processing operation at the time of processing of the main body program. 最新の値が記録されたデバッグデータ登録部117の例を示す図である。It is a figure which shows the example of the debug data registration part 117 in which the newest value was recorded. 電文表示部118に表示された画面の例である。It is an example of the screen displayed on the message | telegram display part 118. FIG.

符号の説明Explanation of symbols

100 アダプタ、101 記憶部、102 プログラムダウンロード管理部、103 本体プログラム記述部、104 デバッグプログラム記述部、105 記述プログラム解釈部、105a デバッグコマンド判定部、105b 処理記憶部、105c 辞書記憶部、106 通信処理部、107 デバッグコマンド設定記述部、108 デバッグコマンド実行記述部、109 デバッグ情報格納部、110 外部装置、111 プログラム保持部、112 家電機器シミュレータ、113 電文作成部、114 電文送受信部、115 コントローラ、116 デバッグコマンド登録部、117 デバッグデータ登録部、118 電文表示部、801 コマンドID格納欄、802 デバッグコマンド受信ポイント格納欄、803 コマンド長格納欄、804 デバッグコマンドバイト列格納欄、901 データID格納欄、902 デバッグ情報設定ポイント格納欄、903 データ種別格納欄、904 デバッグシンボル格納欄、905 型格納欄、906 配列サイズ格納欄、907 データ内容格納欄。
DESCRIPTION OF SYMBOLS 100 Adapter, 101 Memory | storage part, 102 Program download management part, 103 Main body program description part, 104 Debug program description part, 105 Description program interpretation part, 105a Debug command determination part, 105b Processing storage part, 105c Dictionary storage part, 106 Communication processing , 107 Debug command setting description section, 108 Debug command execution description section, 109 Debug information storage section, 110 External device, 111 Program holding section, 112 Home appliance simulator, 113 Message creation section, 114 Message transmission / reception section, 115 Controller, 116 Debug command registration unit, 117 debug data registration unit, 118 message display unit, 801 command ID storage column, 802 debug command reception point storage column, 803 command length storage column, 804 debug command Byte data storage field, 901 Data ID storage field, 902 Debug information setting point storage field, 903 Data type storage field, 904 Debug symbol storage field, 905 type storage field, 906 Array size storage field, 907 Data content storage field.

Claims (8)

データを含む信号の送受信処理を実行する通信処理部と、
デバッグ対象となる本体プログラム及び少なくとも前記デバッグ支援処理に係るデバッグコマンドに関するデータを含み、前記本体プログラムの誤りを検出するデバッグ支援処理のためのデバッグプログラムを記憶する、データ変更可能な記憶部に記憶された前記デバッグプログラムに基づき、前記本体プログラムに基づく処理を実行中に前記通信処理部が受信した信号に係るデータが前記デバッグコマンドであるかどうかを判定するコマンド判定部を有し、前記コマンド判定部の判定に基づいて前記本体プログラム又は前記デバッグプログラムに基づく処理を行う記述プログラム解釈部と
を備えることを特徴とするプログラムデバッグ支援装置。
A communication processing unit that executes transmission / reception processing of a signal including data;
Stored in a data-changeable storage unit, which includes a main program to be debugged and data related to at least a debug command related to the debug support process, and stores a debug program for a debug support process for detecting an error in the main program. A command determination unit for determining whether data related to a signal received by the communication processing unit during execution of processing based on the main body program is the debug command based on the debug program; And a description program interpretation unit that performs processing based on the main program or the debug program based on the determination.
デバッグ対象となる本体プログラム及び少なくとも前記デバッグ支援処理に係るデバッグコマンドに関するデータを含み、前記本体プログラムの誤りを検出するデバッグ支援処理のためのデバッグプログラムをデータとして記憶する、データ変更可能な記憶部と、
データを含む信号の送受信処理を実行する通信処理部と、
前記記憶部に記憶された前記デバッグプログラムに基づき、前記本体プログラムに基づく処理を実行中に前記通信処理部が受信した信号に係るデータが前記デバッグコマンドであるかどうかを判定するコマンド判定部を有し、前記コマンド判定部の判定に基づいて前記本体プログラム又は前記デバッグプログラムに基づく処理を行う記述プログラム解釈部と
を備えることを特徴とするプログラムデバッグ支援装置。
A data-changeable storage unit that stores data related to a debugging program for debugging support processing for detecting an error in the body program, including data related to a debugging program related to the debugging program and at least a debugging command related to the debugging support processing; ,
A communication processing unit that executes transmission / reception processing of a signal including data;
Based on the debug program stored in the storage unit, there is a command determination unit that determines whether the data related to the signal received by the communication processing unit during execution of the process based on the main body program is the debug command. And a description program interpretation unit that performs processing based on the main body program or the debug program based on the determination of the command determination unit.
前記通信処理部は、前記本体プログラムの処理に係るデータを含む信号と前記デバッグコマンドのデータを含む信号とを共通の入力インタフェースを介して受信することを特徴とする請求項1又は2記載のプログラムデバッグ支援装置。   3. The program according to claim 1, wherein the communication processing unit receives a signal including data related to processing of the main body program and a signal including data of the debug command via a common input interface. Debugging support device. 前記記述プログラム解釈部は、前記デバッグコマンドに関するデータ及び前記本体プログラムの所定実行位置におけるデバッグ情報のデータを検出して記録するためのデータを登録するデバッグ情報格納部をさらに有し、
前記本体プログラムに基づく処理を実行中に、前記デバッグ情報格納部のデータに基づいて前記所定実行位置における前記デバッグ情報のデータを検出して記録し、
前記コマンド判定部が、前記受信した信号に係るデータを前記デバッグコマンドであると判定すると、そのデバッグコマンドに対応する前記デバッグ情報のデータを含む信号を前記通信処理部に送信させることを特徴とする請求項1〜3のいずれかに記載のプログラムデバッグ支援装置。
The description program interpretation unit further includes a debug information storage unit for registering data relating to the debug command and data for detecting and recording debug information data at a predetermined execution position of the main body program,
During execution of the process based on the main body program, the data of the debug information at the predetermined execution position is detected and recorded based on the data of the debug information storage unit,
When the command determination unit determines that the data related to the received signal is the debug command, the command determination unit causes the communication processing unit to transmit a signal including the debug information data corresponding to the debug command. The program debugging support device according to claim 1.
前記本体プログラムは、スタックによるデータ構造を利用する逆ポーランド記法に基づく言語で記述されたデータで構成され、
前記記述プログラム解釈部は、前記本体プログラムの所定位置における記述の処理を実行する際に、前記スタックに基づくデータをデバッグ情報のデータとして検出して記録し、前記デバッグコマンドに基づいて、前記検出したデバッグ情報のデータを含む信号を通信処理部に送信させることを特徴とする請求項1〜4のいずれかに記載のプログラムデバッグ支援装置。
The main body program is composed of data written in a language based on reverse Polish notation using a data structure by a stack,
The description program interpretation unit detects and records data based on the stack as debug information data when executing a description process at a predetermined position of the main body program, and detects the detection based on the debug command. The program debugging support apparatus according to claim 1, wherein a signal including debug information data is transmitted to the communication processing unit.
前記本体プログラム及び/又はデバッグプログラムをダウンロード処理して前記記憶部にプログラムを記憶させるダウンロード管理部をさらに備えることを特徴とする請求項1〜5のいずれかに記載のプログラムデバッグ支援装置。   The program debugging support apparatus according to claim 1, further comprising a download management unit that downloads the main body program and / or debug program and stores the program in the storage unit. 請求項1〜6のいずれかに記載のプログラムデバッグ支援装置を有し、前記本体プログラムに基づいて、前記通信処理部に接続される2以上の通信回線の間のプロトコル変換処理を行うことを特徴とする通信用アダプタ。   7. The program debugging support apparatus according to claim 1, wherein protocol conversion processing between two or more communication lines connected to the communication processing unit is performed based on the main body program. Communication adapter. データ変更可能な記憶部に記憶され、少なくとも前記デバッグ支援処理に係るデバッグコマンドに関するデータを含み、デバッグ対象となる本体プログラムの誤りを検出するデバッグ支援処理のためのデバッグプログラムに基づいて、前記本体プログラムに基づく処理を実行中に、通信処理部が受信した信号に係るデータが前記デバッグコマンドであるかどうかを判定する工程と、
前記判定に基づいて前記通信処理部による信号及び記憶部に記憶されたプログラムに基づく処理を実行する工程と
を有することを特徴とするプログラムデバッグ支援処理プログラム。
The main body program based on a debug program for debugging support processing that is stored in a data changeable storage unit and includes at least data related to a debug command related to the debugging support processing, and detects an error in the main program to be debugged Determining whether the data related to the signal received by the communication processing unit is the debug command while executing the processing based on
And a step of executing a process based on a signal stored in the storage unit and a signal stored in the storage unit based on the determination.
JP2006158482A 2006-06-07 2006-06-07 Program debug support processing apparatus, communication adapter, and program debug support processing program Active JP4716929B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006158482A JP4716929B2 (en) 2006-06-07 2006-06-07 Program debug support processing apparatus, communication adapter, and program debug support processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006158482A JP4716929B2 (en) 2006-06-07 2006-06-07 Program debug support processing apparatus, communication adapter, and program debug support processing program

Publications (2)

Publication Number Publication Date
JP2007328501A true JP2007328501A (en) 2007-12-20
JP4716929B2 JP4716929B2 (en) 2011-07-06

Family

ID=38928938

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006158482A Active JP4716929B2 (en) 2006-06-07 2006-06-07 Program debug support processing apparatus, communication adapter, and program debug support processing program

Country Status (1)

Country Link
JP (1) JP4716929B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62267841A (en) * 1986-05-16 1987-11-20 Omron Tateisi Electronics Co Program debug device
JPS63189948A (en) * 1987-02-03 1988-08-05 Fujitsu Ltd Batch type debugging system in interactive debugger
JPH08221297A (en) * 1995-02-16 1996-08-30 Chiyoufu Seisakusho:Kk Program debugging device
JPH09319727A (en) * 1996-05-31 1997-12-12 Hitachi Ltd Data processor and data processing system
JPH11167501A (en) * 1997-12-04 1999-06-22 Oki Tsushin System Kk Program debugging system and program debugging method
JP2003323317A (en) * 2002-05-08 2003-11-14 Nec Corp System, method, and program for system debugging in network monitoring system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62267841A (en) * 1986-05-16 1987-11-20 Omron Tateisi Electronics Co Program debug device
JPS63189948A (en) * 1987-02-03 1988-08-05 Fujitsu Ltd Batch type debugging system in interactive debugger
JPH08221297A (en) * 1995-02-16 1996-08-30 Chiyoufu Seisakusho:Kk Program debugging device
JPH09319727A (en) * 1996-05-31 1997-12-12 Hitachi Ltd Data processor and data processing system
JPH11167501A (en) * 1997-12-04 1999-06-22 Oki Tsushin System Kk Program debugging system and program debugging method
JP2003323317A (en) * 2002-05-08 2003-11-14 Nec Corp System, method, and program for system debugging in network monitoring system

Also Published As

Publication number Publication date
JP4716929B2 (en) 2011-07-06

Similar Documents

Publication Publication Date Title
US8898638B1 (en) Method and system for remote software debugging
JP5423830B2 (en) Update data transmission method, firmware update system, and host device
CN111414325B (en) Method for converting Avalon bus into Axi4 bus
US7895376B2 (en) Hardware configuration information system, method, and computer program product
EP1635255A2 (en) Information processing system
CN100489777C (en) Intelligent platform management interface firmware architecture and method of building the same
CN109426511B (en) Soft core updating method and system
US20120011490A1 (en) Development system
JP2008293076A (en) Error decision program, error decision method, and electronic equipment
US8291270B2 (en) Request processing device, request processing system, and access testing method
JP4716929B2 (en) Program debug support processing apparatus, communication adapter, and program debug support processing program
US20060080636A1 (en) Method of building intelligent platform management interface firmware architecture
JP2010086318A (en) Debugging system
WO2020129324A1 (en) Module, information processing device equipped with same, and program data updating method for updating program data of module
CN101562007A (en) Display control device capable of automatically updating firmware and update method thereof
US9779012B1 (en) Dynamic and global in-system debugger
JP2010218083A (en) Method and support program for developing communication device, and communication device
JP2010020416A (en) Data transfer method and data transfer unit
JP2005115440A (en) Computer program for making computer perform uninstallation
JP2007219843A (en) Node management system and method, and program
JP2005010912A (en) Program and computer
US11714608B2 (en) Device and method for handling programming language function
CN116069349A (en) Board parameter modification method, device and system
CN114416444A (en) Method, system, equipment and storage medium for debugging PCIe board firmware
JP2008071107A (en) Flash rom update method of dsp card, and flash rom update device of dsp card

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080718

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100423

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100518

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100706

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110322

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110329

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140408

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250