[go: up one dir, main page]

JP2008146480A - Object-oriented vehicle control system and program loading support system - Google Patents

Object-oriented vehicle control system and program loading support system Download PDF

Info

Publication number
JP2008146480A
JP2008146480A JP2006334833A JP2006334833A JP2008146480A JP 2008146480 A JP2008146480 A JP 2008146480A JP 2006334833 A JP2006334833 A JP 2006334833A JP 2006334833 A JP2006334833 A JP 2006334833A JP 2008146480 A JP2008146480 A JP 2008146480A
Authority
JP
Japan
Prior art keywords
event
listener
list
notification
program
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
JP2006334833A
Other languages
Japanese (ja)
Other versions
JP4618240B2 (en
Inventor
Yuji Kojima
裕次 小島
Jiro Sato
二郎 佐藤
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2006334833A priority Critical patent/JP4618240B2/en
Publication of JP2008146480A publication Critical patent/JP2008146480A/en
Application granted granted Critical
Publication of JP4618240B2 publication Critical patent/JP4618240B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

【課題】リスナー登録リストに割り当てられるRAM領域のサイズを、ROM内の補助リストの占有サイズに応じて適正化する。
【解決手段】搭載先となる車両に対応する補助リスト203の補助リストのデータサイズに基づいてリスナー登録リストのRAM上の割当領域サイズ221を決定し、決定された割当領域サイズ221をプログラム搭載先となる車両のRAMに対して設定する。
【選択図】図1D
The size of a RAM area allocated to a listener registration list is optimized according to the occupied size of an auxiliary list in a ROM.
An allocation area size on a RAM of a listener registration list is determined based on a data size of an auxiliary list of an auxiliary list corresponding to a vehicle to be mounted, and the determined allocation area size is set as a program mounting destination. Is set for the vehicle RAM.
[Selection] Figure 1D

Description

この発明は、オブジェクト指向型車両用制御システム及びプログラム搭載支援システムに関する。   The present invention relates to an object-oriented vehicle control system and a program loading support system.

特開2001−270399号公報JP 2001-270399 A

近年、自動車に搭載される電子機器の制御は、ECUと呼ばれるマイコン(MPU)を含んだハードウェアユニットを用いて行なうのが主流となっている。特許文献1に例示するごとく、この制御を、オブジェクト指向により設計されたコンピュータシステム(以下、「オブジェクト指向システム」ともいう)により実現する方式も普及している(特許文献1)。オブジェクト指向システムの採用により、制御に関与する機器のハードウェア構成の相違を、ソフトウェアを構成するオブジェクトの内部に隠蔽することができ、制御対象毎に各制御プログラムの独立性を高めることができる。オブジェクト指向型のプログラミング言語としては、例えばJava(登録商標)やC++が知られ、いずれもオブジェクトを単位として、プログラムの記述を行なう。オブジェクトは自律性をもつ有機的なプログラムの単位であり、データと手続きを一体化した形で記述される。プログラム全体としての仕事は、オブジェクト間のメッセージ交換により進められる。メッセージを受信することにより起動される手続きはメソッドと呼ばれる。オブジェクトへの仕事の依頼は、メソッドを介してのみ行なうことができ、オブジェクト内のデータへの直接のアクセスは禁止される。   2. Description of the Related Art In recent years, electronic devices mounted on automobiles are mainly controlled using a hardware unit including a microcomputer (MPU) called an ECU. As exemplified in Patent Document 1, a method of realizing this control by a computer system designed by object orientation (hereinafter, also referred to as “object-oriented system”) has become widespread (Patent Document 1). By adopting the object-oriented system, it is possible to conceal the difference in the hardware configuration of the devices involved in the control inside the object constituting the software, and to increase the independence of each control program for each control target. As an object-oriented programming language, for example, Java (registered trademark) or C ++ is known, and both describe a program in units of objects. An object is a unit of an organic program with autonomy, and is described in an integrated form of data and procedures. Work as a whole program is advanced by exchanging messages between objects. A procedure that is started by receiving a message is called a method. Requests for work on objects can only be made via methods, and direct access to the data in the objects is prohibited.

オブジェクト指向システムにおいては、各オブジェクトが、自身に組み込まれているメソッドを呼び出すメッセージを他のオブジェクトから受け、そのメソッドによる実行結果をメッセージ元へ返す形で処理が実行されてゆく。ここで、オブジェクトは、クラス(クラスオブジェクト)と、そのクラスを用いて作成されるインスタンス(インスタンスオブジェクト)とに大別できる。クラスには、データが格納される変数の定義や、機能処理を記述したメソッドなどが記述されている。クラスはオブジェクトのテンプレートに相当するものであり、汎用的なメソッドの集合と変数の定義を有するのみで、このままでは具体的な処理を直接実行することができない。そこで、実際の処理内容を規定するオブジェクトであるインスタンスが、クラスに含まれる変数に具体的な値を代入し、また、クラスに記述されているメソッドのうち、実際に使用するものへのリンクを張るためのポインタを記述する、等の手続を経て作成される。なお、インスタンスは、あくまでクラスをテンプレートとして新たに作成されるものであり、元のクラスが書き換えられるのではない。また、実際の処理は、対応するクラスから作成された個々のインスタンスがメッセージを受け取り、該対応するクラスのメソッドへ制御を受け渡たす形で進んでゆく。   In an object-oriented system, each object receives a message for calling a method incorporated in the object from another object, and processing is executed in such a manner that an execution result of the method is returned to the message source. Here, objects can be broadly classified into classes (class objects) and instances (instance objects) created using the classes. The class describes the definition of variables that store data and methods that describe functional processing. A class corresponds to a template of an object, and has only a general-purpose method set and variable definition, and a specific process cannot be directly executed as it is. Therefore, an instance, which is an object that defines the actual processing contents, assigns a specific value to a variable included in the class, and links to the method actually used among the methods described in the class. It is created through a procedure such as describing a pointer for extension. Note that an instance is newly created using a class as a template, and the original class is not rewritten. Further, the actual processing proceeds in such a manner that each instance created from the corresponding class receives a message and passes control to a method of the corresponding class.

次に、オブジェクト指向システムにおいては、イベントシステムと称される概念が確立されている。「イベント」は、制御処理に関与する特定のオブジェクトが、ある定められた処理状態となることを条件として、他のオブジェクトに対応する操作や処理を要求するために発行されるものであり、発行されたイベントを対応するオブジェクトが受け、前述の操作や処理を実行する。この場合、イベント発行側のオブジェクトには、そのイベントに対応する処理を行なうためのメソッド(イベントハンドラ)が組み込まれていなければならない。しかし、該メソッドは必ずしも当該のオブジェクト内に存在しているとは限らず、むしろ、他のクラスからの継承により実装しているケースの方が圧倒的に多い。この場合、イベント発行側のオブジェクトは、イベントハンドラが直接組み込まれている継承先のクラスが見つかるまで検索を行なうことになる。しかし、イベントの発行数が増大し、また、同種のイベントに関与するクラスの数や関連分岐が多くなるにつれ、イベント処理の全体把握が非常に困難になり、システムが複雑化して、エラーあるいは誤処理の発生リスクが高くなる問題がある。   Next, in the object-oriented system, a concept called an event system has been established. An “event” is issued to request an operation or process corresponding to another object on condition that a specific object involved in the control process is in a predetermined processing state. The corresponding object is received by the event, and the above-described operations and processes are executed. In this case, a method (event handler) for performing processing corresponding to the event must be incorporated in the event issuing object. However, the method does not necessarily exist in the object, but rather it is overwhelmingly implemented in inheritance from other classes. In this case, the event issuing side object is searched until an inheritance class in which the event handler is directly incorporated is found. However, as the number of events issued increases and the number of classes and related branches involved in the same type of event increase, it becomes very difficult to understand the entire event processing, and the system becomes complicated, resulting in errors or errors. There is a problem that the risk of processing increases.

そこで、これを解決するために、代理イベントモデルと称されるシステムが考案され、実用に供されている。代理イベントモデルの概念では、イベント処理のためにイベントリスナーという専用クラスがインターフェースとして用意され、これを、受け側のオブジェクトに組み込んで使用する。イベントリスナー内には、そのイベントで使用するイベントハンドラのメソッドが用意されており、受け側のオブジェクトに代行してイベント処理を待ち受ける。その結果、発行されたイベントは全て一旦イベントリスナーに送られ、そこでイベント処理が実行され、結果が受け側のオブジェクト(つまり、最終的なイベント通知先となるオブジェクト)に受け渡される。これにより、発行されたイベントの処理のため、何処に存在するかわからないイベントハンドラを求めて継承先のクラス(スーパークラス)を探し回る問題が回避される。   In order to solve this problem, a system called a proxy event model has been devised and put into practical use. In the concept of the proxy event model, a dedicated class called an event listener is prepared as an interface for event processing, and this is incorporated into a receiving object and used. In the event listener, an event handler method used for the event is prepared and waits for event processing on behalf of the receiving object. As a result, all issued events are once sent to the event listener, where event processing is executed, and the results are passed to the receiving object (that is, the final event notification destination object). This avoids the problem of searching for an inheritance destination class (super class) by searching for an event handler that does not know where it exists to process the issued event.

しかしながら、イベント処理がイベントリスナーにクラス分離されることで、同種のイベントに対して、複数のインスタンス(アプリケーションプログラム)がイベントリスナーとなりうる場合、実際に通知を行なうイベントリスナーの特定や、その通知順あるいは通知タイミング処理に問題を生ずることがある。具体例を図12に示す。   However, by classifying event processing into event listeners, when multiple instances (application programs) can be event listeners for the same type of event, it is possible to specify event listeners that actually perform notifications and the order of notifications. Or there may be a problem in the notification timing processing. A specific example is shown in FIG.

すなわち、イベントの発行元インスタンス101J(アプリケーションプログラム1:以下、アプリケーションプログラムのことを「アプリ」とも略記する)において、イベント通知先インスタンス102J〜102L(アプリ2〜アプリ4)にイベントクラス103のイベントリスナーが組み込まれているものとする。発行元インスタンス101Jにおいてイベント発生条件が成立し、イベントが発行されると、イベントクラス103のイベントリスナーを組み込んだインスタンスであるアプリ2〜アプリ4に自動的に順次受け渡す(通知)ことになる。   That is, in the event issuing instance 101J (application program 1: hereinafter, the application program is also abbreviated as “app”), the event listener of the event class 103 is sent to the event notification destination instances 102J to 102L (application 2 to application 4). Is incorporated. When an event generation condition is satisfied in the issuing source instance 101J and an event is issued, the event is automatically delivered (notified) sequentially to the applications 2 to 4, which are instances incorporating event listeners of the event class 103.

しかし、実際に欲する動作が、最初に発行されたイベントに対してはアプリ2にのみ通知を行い、そこからある時間遅れて同じイベントが再度発行されたときに、今度はアプリ3に対してのみ通知を行ないたい、といったような場合、図12の方式では明らかに問題がある。つまり、最初のイベント発行でアプリ2だけでなくアプリ3(及びアプリ4)にも通知がなされ、本来望まれないタイミングであるにも拘わらずアプリ3(及びアプリ4)でイベントハンドラが動作して、システム全体としては誤動作につながってしまうのである。このような不具合を招く要因は、組み込まれたイベントリスナーにおいて、対象となるイベントの通知先(リスナー)が固定的(静的)に登録されており、登録されたリスナーに対して無条件にイベント通知を行なうようになっている点にある。   However, when the first action is issued, only the app 2 is notified, and when the same event is issued again after a certain delay, only the app 3 is now activated. When it is desired to make a notification, the method of FIG. 12 clearly has a problem. In other words, not only the app 2 but also the app 3 (and the app 4) are notified when the first event is issued, and the event handler operates in the app 3 (and the app 4) regardless of the timing that is not originally desired. As a result, the entire system will malfunction. The cause of this problem is that the notification destination (listener) of the target event is registered fixedly (static) in the built-in event listener, and the event is unconditionally registered to the registered listener. The point is that notification is made.

本発明の課題は、同種のイベントに対するリスナーの特定と、複数リスナーへの通知順序の制御を簡便かつ的確に行なうことができ、本来望まれないタイミングや意図しないリスナーに対してイベント通知がなされてしまう不具合を効果的に解消できるオブジェクト指向型車両用制御システムとそれに用いるプログラム搭載支援システムとを提供することにある。   It is an object of the present invention to specify a listener for the same type of event and to control the order of notification to a plurality of listeners simply and accurately, and to notify an event to an undesired or unintended listener. Another object of the present invention is to provide an object-oriented vehicle control system that can effectively eliminate such problems and a program loading support system used therefor.

課題を解決するための手段及び発明の効果Means for Solving the Problems and Effects of the Invention

本発明のオブジェクト指向型車両用制御システムは、 CPU、ROM及びRAMを有するマイコンを含んで構成され、車載用電子機器をCPUにより、ROMに格納されたオブジェクト指向のプログラムを、RAMを作業領域として実行することにより動作制御する制御主体を有した車両用制御システムであって、プログラムが、
イベント生成オブジェクトが予め定められた実行状態となった場合に生成するイベントを取得して、これを現在有効なイベントとして発行するイベント管理オブジェクトと、
イベントの通知先候補オブジェクトからイベント通知要求を受け付けるイベント通知要求受付オブジェクトと、
イベント通知要求が受け付けられる毎に、当該イベント通知要求を行なった通知先候補オブジェクトをリスナーとして、RAM上に領域確保されるリスナー登録リストにその都度動的に登録するとともに、該リスナー登録リストに登録されているリスナーに対してのみ、発行されたイベントの通知を行なうイベント処理オブジェクトとを備え、
かつ、ROMには、リスナー登録リストへ登録可能な全ての通知先候補オブジェクトが、リスナー登録リストとは別の補助リストにイベントの発行と無関係に静的に登録されてなり、
リスナー登録リストに割り当てられるRAM上の領域サイズが、ROM内における補助リストの占有サイズに対応した値に定められてなることを特徴とする。
An object-oriented vehicle control system according to the present invention includes a microcomputer having a CPU, a ROM, and a RAM. An in-vehicle electronic device is executed by a CPU, an object-oriented program stored in the ROM is used as a work area. A vehicle control system having a control body that controls operation by executing a program,
An event management object that obtains an event that is generated when the event generation object is in a predetermined execution state and issues this as a currently valid event;
An event notification request receiving object that receives an event notification request from an event notification destination candidate object;
Each time an event notification request is accepted, the notification destination candidate object that made the event notification request is registered as a listener dynamically in the listener registration list that is allocated in the RAM and registered in the listener registration list. An event processing object that notifies the published event only to the listener that has been
In addition, in the ROM, all notification destination candidate objects that can be registered in the listener registration list are statically registered in an auxiliary list different from the listener registration list regardless of the issue of the event,
The area size on the RAM allocated to the listener registration list is determined to be a value corresponding to the occupied size of the auxiliary list in the ROM.

上記構成によると、イベント通知要求が受け付けられる毎に、当該イベント通知要求を行なった通知先候補オブジェクトをリスナーとして、リスナー登録リストにその都度動的に登録するとともに、該リスナー登録リストに登録されているリスナーに対してのみ、発行されたイベントの通知が行なわれる。すなわち、リスナー登録リストを参照することにより、通知を欲する申し出(イベント通知要求)を行なった通知先候補オブジェクトにのみ、選択的にイベント通知を行なうことが可能となるので、同じイベントに対して通知先候補オブジェクトが複数存在している場合においても、意図しない通知先候補オブジェクトにまで無作為にイベント通知がなされてしまう不具合を効果的に解消できる。   According to the above configuration, every time an event notification request is accepted, the notification destination candidate object that has made the event notification request is registered as a listener dynamically in the listener registration list each time and registered in the listener registration list. Only the listeners who are present are notified of the issued event. In other words, by referring to the listener registration list, it is possible to selectively notify the event only to the notification destination candidate object that has made a request for notification (event notification request). Even when there are a plurality of destination candidate objects, it is possible to effectively eliminate the problem that event notifications are randomly made up to unintended notification destination candidate objects.

また、リスナー登録リストへ登録可能な通知先候補オブジェクトの総数は、搭載先となる車種によって相違する。他方、イベント通知を司るプログラムは車種間で共有する方が製造上も能率がよいが、この場合、リスナー登録リストに割り当てられるRAM上の領域のサイズも、上記共有化の流れから、通知先候補オブジェクトの総数の多い車種に合わせて一定に設定することが一見望ましいと思われる。しかし、自動車用のECUは、コスト削減の観点からメモリ資源が限られており、容量の小さいRAMを目一杯有効活用することが求められている。従って、通知先候補オブジェクトの総数が少ない車種では、リスナー登録リストに割り当てられるRAM領域が過剰となり、RAM容量を有効活用する観点からは非常に好ましくない。さらに、車両開発の進展やモデルチェンジなどによる設計変更により、通知先候補オブジェクトの数が増減することもありえ、リスナー登録リストに割り当てられるRAM領域が固定では柔軟に対応できない問題がある。   In addition, the total number of notification destination candidate objects that can be registered in the listener registration list varies depending on the vehicle type that is the mounting destination. On the other hand, it is more efficient in manufacturing to share the program that manages the event notification among vehicle types. In this case, the size of the area on the RAM allocated to the listener registration list is also determined from the above sharing flow. At first glance, it seems desirable to set a constant value according to the vehicle type with a large total number of objects. However, the ECU for automobiles has limited memory resources from the viewpoint of cost reduction, and is required to make full use of a small-capacity RAM. Therefore, in a vehicle type in which the total number of notification destination candidate objects is small, the RAM area allocated to the listener registration list becomes excessive, which is very undesirable from the viewpoint of effectively using the RAM capacity. Furthermore, the number of notification destination candidate objects may increase or decrease due to design changes such as vehicle development progress or model changes, and there is a problem that the RAM area allocated to the listener registration list cannot be flexibly handled.

しかしながら、本発明では、リスナー登録リストへ登録可能な全ての通知先候補オブジェクトが、ROM内の静的な補助リスト(この補助リストの内容は、例えば車種毎に固有の内容を有している)として登録してあり、リスナー登録リストに割り当てられるRAM領域のサイズを、この補助リストの占有サイズに対応した値に定めるようにしたから、リスナー登録リストのRAM割当サイズを、例えば車種毎に適正化することが可能となり、RAM領域が無駄に消費されることがない。また、車両開発の進展やモデルチェンジなどによる設計変更にも柔軟に対応できる。   However, in the present invention, all notification destination candidate objects that can be registered in the listener registration list are static auxiliary lists in the ROM (the contents of this auxiliary list have specific contents for each vehicle type, for example). Since the size of the RAM area allocated to the listener registration list is set to a value corresponding to the occupied size of the auxiliary list, the RAM allocation size of the listener registration list is optimized for each vehicle type, for example. Thus, the RAM area is not wasted. In addition, it can flexibly handle design changes due to vehicle development progress and model changes.

イベント処理オブジェクトは、リスナー登録リストの登録内容を監視するとともに、イベント管理オブジェクトからの当該イベントの発行タイミングと、イベント通知要求受付オブジェクトによる通知先候補オブジェクトからのイベント通知要求の受け付けタイミングとに基づいてイベントの通知タイミングを決定し、リスナー登録リスト上の対応するリスナーに通知を行なうものとすることができる。つまり、固定的なリスナーリストにのみ頼った従来のイベント通知方式では、その通知タイミングがイベント発行タイミングにより一律に支配されてしまい、的確なタイミングでイベントを通知できない要因となっていた。しかし、本発明では、受け側となる通知先候補オブジェクトが自立的にイベント通知要求を出し、リスナーとして動的登録されるので、上記の方式により、通知先候補オブジェクトがイベント通知要求を出したタイミングも考慮して、どの通知先候補オブジェクトにいつイベントを通知するかを的確に把握でき、本来望まれないタイミングでイベント通知がなされてしまう不具合を効果的に解消できる。   The event processing object monitors the registration contents of the listener registration list, and based on the issue timing of the event from the event management object and the reception timing of the event notification request from the notification destination candidate object by the event notification request reception object It is possible to determine the event notification timing and notify the corresponding listener on the listener registration list. In other words, in the conventional event notification method that relies only on the fixed listener list, the notification timing is uniformly governed by the event issuance timing, and the event cannot be notified at an appropriate timing. However, in the present invention, the notification destination candidate object that is the receiving side autonomously issues an event notification request and is dynamically registered as a listener, so the timing at which the notification destination candidate object issues an event notification request by the above method In consideration of this, it is possible to accurately grasp which notification destination candidate object is notified of the event, and effectively eliminate the problem of event notification being made at an undesired timing.

イベント処理オブジェクトは、イベント管理オブジェクトが発行したイベントに対応するリスナーを、リスナー登録リストから該リスナー登録リストとは別に用意された通知実行用リストに複写し、当該通知実行用リスト上で通知実行対象となるリスナーを検索するように構築できる。そして、検索されたリスナーに対し、発行されたイベントの通知を順次実行するとともに、通知が完了したイベントに対応するリスナーを通知実行用リストから削除するものとできる。   The event processing object copies the listener corresponding to the event issued by the event management object from the listener registration list to the notification execution list prepared separately from the listener registration list, and the notification execution target on the notification execution list Can be constructed to search for listeners Then, notification of issued events is sequentially executed for the searched listeners, and the listener corresponding to the event for which notification has been completed can be deleted from the notification execution list.

このようにすると、イベント発行中に新たに登録されるリスナーは、通知実行用リスト上のリスナーに対するイベント通知が完了するまでリスナー登録リスト上に保留され、本来通知を受けるべきタイミングで次のイベントが発行されて、はじめて通知実行用リストに移ってイベント通知を受けることができるので、矛盾のないタイミングでのイベント通知が可能となる。   In this way, the listener newly registered during the event issuance is held on the listener registration list until the event notification to the listener on the notification execution list is completed, and the next event is sent at the timing when the notification should be received. The event notification can be received by moving to the notification execution list for the first time after being issued, so that the event notification can be performed at a consistent timing.

イベント処理オブジェクトは、リスナー登録リストに登録されたリスナーが、前述の補助リスト上のいずれかの通知先候補オブジェクトと一致する場合にのみ、該リスナーに対し発行されたイベントの通知を実行するものとして構築することができる。リスナー登録リストへのリスナーの登録は、上記のごとく、通知要求が発生するたびに動的に実施されるので、リスナー登録リスト自体は書換え可能なメモリ(EEPROMやフラッシュメモリも概念的には利用可能であるが、書換え速度が遅いのでRAMであることが望ましい)上に作成する必要がある。上記のように構成すると、リスナー登録リストが書き込まれるメモリの記憶内容がバグや暴走等により破壊された場合も、固定的な補助リストを併用することで、イベント通知先のリスナーが正規のものであるか否かを容易に確認することができる。   The event processing object performs notification of an event issued to the listener only when the listener registered in the listener registration list matches any of the notification destination candidate objects on the auxiliary list described above. Can be built. As described above, the registration of the listener to the listener registration list is dynamically performed every time a notification request is generated. Therefore, the listener registration list itself is rewritable memory (EEPROM and flash memory can also be used conceptually). However, since the rewriting speed is slow, it is desirable to use a RAM). With the above configuration, even if the memory contents of the memory to which the listener registration list is written are destroyed due to bugs, runaway, etc., the event notification listener can be a regular one by using a fixed auxiliary list together. It can be easily confirmed whether or not there is.

次に、本発明のプログラム搭載支援システムは、上記本発明のオブジェクト指向型車両用制御システムを機能実現するオブジェクト指向のプログラムの、車両への搭載支援を行なうシステムであって、
搭載先となる車両毎に個別に用意された補助リストを記憶する補助リスト記憶手段と、
搭載すべき車両の補助リストを補助リスト記憶手段上にて特定し、その補助リストのデータサイズに基づいてリスナー登録リストのRAM上の割当領域サイズを決定する割当領域サイズ決定手段と、
決定された割当領域サイズをプログラム搭載先となる車両のRAMに対して設定する割当領域サイズ設定手段と、を備えたことを特徴とする。
Next, the program mounting support system of the present invention is a system for supporting mounting of an object-oriented program for realizing the function of the object-oriented vehicle control system of the present invention on a vehicle,
Auxiliary list storage means for storing an auxiliary list prepared individually for each vehicle to be mounted;
An allocation area size determining means for specifying an auxiliary list of vehicles to be mounted on the auxiliary list storage means and determining an allocation area size on the RAM of the listener registration list based on the data size of the auxiliary list;
And an allocation area size setting means for setting the determined allocation area size in the RAM of the vehicle as a program mounting destination.

上記本発明のプログラム搭載支援システムを用いると、搭載先となる車両に対応する補助リストのデータサイズに基づいてリスナー登録リストのRAM上の割当領域サイズを決定し、決定された割当領域サイズをプログラム搭載先となる車両のRAMに対して設定するようにしたから、リスナー登録リストに割り当てられるRAM領域のサイズを、ROM内の補助リストの占有サイズに応じて適正化した本発明のオブジェクト指向型車両用制御システムを容易に得ることができる。   When the program loading support system of the present invention is used, the allocation area size on the RAM of the listener registration list is determined based on the data size of the auxiliary list corresponding to the vehicle to be mounted, and the determined allocation area size is programmed. Since the setting is made for the RAM of the vehicle as the mounting destination, the size of the RAM area allocated to the listener registration list is optimized in accordance with the occupied size of the auxiliary list in the ROM. Control system can be easily obtained.

割当領域サイズ設定手段は、搭載すべきプログラムの、リスナー登録リストのRAM上の割当領域サイズを未定とした雛型プログラムを記憶する雛型プログラム記憶手段と、割当領域サイズ決定手段が決定した割当領域サイズを雛型プログラムに補完して搭載対象プログラムとする割当領域サイズ補完手段と、該搭載対象プログラムを車両側に転送する搭載対象プログラム転送手段と、を有するものとして構成することができる。リスナー登録リストのRAM上の割当領域サイズを未定とした雛型プログラムを用意しておき、割当領域サイズが決定される毎に雛型プログラムにこれを補完することで、リスナー登録リストに割り当てられるRAM領域のサイズ適正化を極めて簡便に実行することができる。   The allocation area size setting means includes a template program storage means for storing a template program in which the allocation area size on the RAM of the listener registration list of the program to be installed is undetermined, and the allocation area determined by the allocation area size determination means An allocation area size complementing unit that complements the size with the template program to be a mounting target program, and a mounting target program transfer unit that transfers the mounting target program to the vehicle can be configured. A RAM program allocated to the listener registration list is prepared by preparing a template program in which the allocation area size on the RAM of the listener registration list is undetermined and supplementing the template program every time the allocation area size is determined. The size optimization of the area can be executed very simply.

この場合、雛型プログラム記憶手段において雛型プログラムは、コンパイル型言語により、割当領域サイズを未定義定数として含んだ形で記述されたものとすることができる。 割当領域サイズ補完手段は、雛型プログラムの割当領域サイズを示す未定義定数を、決定された割当領域サイズにより書き換える未定義定数書換え手段と、その書き換えられた雛型プログラムを搭載対象プログラムとしてコンパイルする搭載対象プログラムコンパイル手段とを有するものとして構築できる。そして、搭載対象プログラム転送手段は、そのコンパイル済みの搭載対象プログラムを車両側に転送するものとして構成できる。コンパイル型の言語を採用することで、制御用のプログラムも補助リストも全て機械語にコンパイルしてから実車搭載することができ、実車側のプログラム(アプリケーション)動作環境を軽量化することができる。そして、本発明のプログラム搭載支援システムの上記構成を採用することで、コンパイル前の雛型プログラムの状態で割当領域サイズを容易に書き換えることができる。   In this case, the template program in the template program storage means may be described in a form including an allocation area size as an undefined constant by a compiled language. The allocation area size complementing means compiles the undefined constant rewriting means for rewriting the undefined constant indicating the allocation area size of the template program with the determined allocation area size, and the rewritten template program as the installation target program. It can be constructed as having a target program compiling means. The mounting target program transfer means can be configured to transfer the compiled mounting target program to the vehicle side. By adopting a compiled language, the control program and the auxiliary list can all be compiled into machine language and then installed in the actual vehicle, and the program (application) operating environment on the actual vehicle can be reduced in weight. By adopting the above configuration of the program loading support system of the present invention, the allocation area size can be easily rewritten in the state of the template program before compilation.

オブジェクト指向プログラミングに向くプログラミング言語としては、C、C++、Javaなどが知られているが、実車搭載時に機械語にコンパイルした形で搭載可能な点を考慮すると、特にCやC++を採用することが望ましい(Javaの場合は、実車側にJavaの動作環境を構築する仮想マシンを搭載しておく必要がある)。   As programming languages suitable for object-oriented programming, C, C ++, Java, and the like are known, but in consideration of the fact that they can be installed in machine language when installed in an actual vehicle, C or C ++ can be used in particular. Desirable (in the case of Java, it is necessary to mount a virtual machine for constructing a Java operating environment on the actual vehicle side).

この場合、割当領域サイズ決定手段は、補助リスト記憶手段に記憶されている非コンパイル状態の補助リストのソースコードを解析することにより、コンパイル後の補助リストのメモリ占有サイズを算出し、その算出値に基づいてリスナー登録リストのRAM上の割当領域サイズを決定するものとして構築できる。非コンパイル状態の補助リストのソースコード解析により算出される補助リストのメモリ占有サイズを用いることで、リスナー登録リストのRAM割当領域サイズをより適正に決定できる。Cを採用する場合、プリプロセッサが未定義定数書換え手段の役割を果たし、該プリプロセッサは、算出された割当領域サイズの値を記述したヘッダファイルを生成し、これを用いてコンパイル前の雛型プログラムの割当領域サイズに該当する未定義定数の書換え処理を行なう。   In this case, the allocation area size determination unit calculates the memory occupation size of the auxiliary list after compilation by analyzing the source code of the auxiliary list in the non-compiled state stored in the auxiliary list storage unit, and the calculated value The allocation area size on the RAM of the listener registration list can be determined based on the above. By using the memory occupancy size of the auxiliary list calculated by the source code analysis of the non-compiled auxiliary list, the RAM allocation area size of the listener registration list can be determined more appropriately. In the case of adopting C, the preprocessor serves as an undefined constant rewriting means, and the preprocessor generates a header file in which the calculated allocation area size value is described, and uses this to generate a pre-compiled template program. Rewrite the undefined constant corresponding to the allocated area size.

以下、本発明の実施の形態を、図面を参照して説明する。
図1は、本発明のオブジェクト指向型車両用制御システムにおける制御主体40の構成を、オブジェクト指向プラットフォームの観点から概念的に示す図である。本実施形態では、制御主体40は、C言語で記述されたプログラムに基づく情報処理を実行する演算処理装置(ECU:以下、ECU40ともいう)として構成されている。プログラム実行装置1は、C言語によるバイトコードを実行する回路が組み込まれたCPUであり、プログラム実行部3、メソッド検索部4、メモリコントローラ5などを具備する。メモリ2は、ROMまたはRAM、あるいは両者を包括した記憶領域を示しており、プログラムデータ領域6や検索用テーブル領域7などの記憶領域が設定される(なお、図1では、プログラム実行装置1を便宜上単一のCPUとして扱っているが、構成はこれに限られるものではなく、例えば、CAN(Controller Area Network)等の車載ネットワークにより接続されたCPU群であってもよい)。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram conceptually showing the configuration of a control subject 40 in the object-oriented vehicle control system of the present invention from the viewpoint of an object-oriented platform. In the present embodiment, the control subject 40 is configured as an arithmetic processing unit (ECU: hereinafter also referred to as ECU 40) that executes information processing based on a program written in C language. The program execution device 1 is a CPU in which a circuit that executes byte codes in C language is incorporated, and includes a program execution unit 3, a method search unit 4, a memory controller 5, and the like. The memory 2 is a ROM or RAM, or a storage area including both, and storage areas such as a program data area 6 and a search table area 7 are set (in FIG. 1, the program execution device 1 is shown). Although it is handled as a single CPU for convenience, the configuration is not limited to this. For example, a CPU group connected by an in-vehicle network such as a CAN (Controller Area Network) may be used.

前記プログラムデータ領域6には、C言語のソースプログラムよりコンパイルされたバイトコードの実行プログラムが格納される(以下、1アドレス分のプログラムを「プログラムデータ」という)。検索用テーブル領域7には、メソッドの呼出し時に、呼び出されたメソッドが格納されている場所を検索するために、図示しないクラステーブルやメソッドテーブルなどが格納される。   The program data area 6 stores a bytecode execution program compiled from a C language source program (hereinafter, a program for one address is referred to as “program data”). The search table area 7 stores a class table, a method table, etc. (not shown) in order to search a place where the called method is stored when the method is called.

プログラム実行装置1におけるメモリアクセスは、メモリコントローラ5により制御される。プログラム実行部3は、メモリコントローラ5に、読み出すべきプログラムデータの格納先を示すプログラムアドレスを与えることにより、前記プログラムデータ領域6から該当するプログラムデータを得て実行する。特にそのプログラムデータがメソッド呼出しを示すメッセージであったとき、プログラム実行部3は、そのメッセージをメソッド検索部4に送信して、メソッドの格納先の検索を要請する。   Memory access in the program execution device 1 is controlled by the memory controller 5. The program execution unit 3 obtains the program data from the program data area 6 and executes it by giving the memory controller 5 a program address indicating the storage location of the program data to be read. In particular, when the program data is a message indicating a method call, the program execution unit 3 sends the message to the method search unit 4 to request a method storage location search.

メッセージには、メッセージの対象となるオブジェクトの所属するクラス名、実行すべきメソッドのメソッド名、引数、戻り値の有無やその型を示すデータが含まれる。メソッド検索部4は、このメッセージにより、メッセージの対象となるオブジェクトが所属するクラスや指定されたメソッドを認識した後、前記検索用テーブルを用いてメソッドの格納場所を検索する。この検索処理は、メモリコントローラ5に、検索用テーブル領域7内で必要な検索用情報の格納先のアドレス(図中、「テーブルアドレス」と示す)を指定して情報の読出しを行なわせることにより実現する。なおテーブルアドレスは、各検索用テーブルのエントリ位置を示すポインタ、またはメモリ2において前記エントリ位置に該当する領域のアドレスを示す値により与えられる。   The message includes data indicating the name of the class to which the object that is the object of the message belongs, the method name of the method to be executed, the arguments, the presence / absence of a return value, and its type. Based on this message, the method search unit 4 recognizes the class to which the object that is the message belongs and the specified method, and then searches the storage location of the method using the search table. This search processing is performed by causing the memory controller 5 to read out information by designating an address (indicated as “table address” in the figure) of a storage location of search information required in the search table area 7. Realize. The table address is given by a pointer indicating the entry position of each search table or a value indicating the address of the area corresponding to the entry position in the memory 2.

メソッド検索部4は、検索結果として、指定されたメソッドの格納場所の先頭アドレス(以下「プログラム先頭アドレス」という)を取得し、このプログラム先頭アドレスを、プログラムカウンタとしてプログラム実行部3に送信する。プログラム実行部3は、図示しないスタック用のメモリ領域に前記メソッドのための作業領域を設定するとともに、前記プログラムカウンタが示すアドレスを起点としてプログラムデータ領域6から前記メソッドを構成する各プログラムデータを順次読み出して、各プログラムデータに応じた処理を実行する。   The method search unit 4 acquires the start address (hereinafter referred to as “program start address”) of the storage location of the designated method as a search result, and transmits this program start address to the program execution unit 3 as a program counter. The program execution unit 3 sets a work area for the method in a memory area for a stack (not shown), and sequentially transmits each program data constituting the method from the program data area 6 starting from an address indicated by the program counter. Read and execute processing corresponding to each program data.

図1Bに、制御主体40を、マイコンを主体とするECU40にて構成した例を示す。プログラム実行装置1はCPU1であり、メモリ2はRAM2A及びROM2Bとからなる。RAM1Aには後述のリスナー登録リスト201と通知実行用リスト202とが形成されている。また、ROM2Bには、上記のプログラムデータ6と検索用データテーブル7及び補助リスト203が格納されている。上記のCPU1、RAM2A、ROM2B及び入出力部102が内部バスにより相互接続されている。   FIG. 1B shows an example in which the control main body 40 is configured by an ECU 40 mainly including a microcomputer. The program execution device 1 is a CPU 1, and the memory 2 includes a RAM 2A and a ROM 2B. In the RAM 1A, a listener registration list 201 and a notification execution list 202 described later are formed. The ROM 2B stores the program data 6, the search data table 7, and the auxiliary list 203. The CPU 1, RAM 2A, ROM 2B and input / output unit 102 are interconnected by an internal bus.

該ECU40は、車載ネットワーク(通信プロトコル:例えばCAN(Controller Area Network))を構築するシリアル通信バス30により、各々シリアルインターフェース107及び受信バッファ107aを介して、車両上の他のECU群と接続されている。シリアル通信バス30には外部機器接続用のコネクタ109も接続され、該コネクタ109に調整ツール10が接続される。   The ECU 40 is connected to other ECU groups on the vehicle via a serial interface 107 and a reception buffer 107a via a serial communication bus 30 that constructs an in-vehicle network (communication protocol: CAN (Controller Area Network), for example). Yes. A connector 109 for connecting an external device is also connected to the serial communication bus 30, and the adjustment tool 10 is connected to the connector 109.

この調整ツール10は、本発明のプログラム搭載支援システムの要部を構成するものである。図1Cは、調整ツール10の電気的構成を示すブロック図である。調整ツール10は、CPU113、RAM114、ROM115(フラッシュメモリ等の不揮発性メモリからなる)、入出力部112が内部バスにて接続されたマイコンを主体とする。入出力部112には、キーボード116と液晶パネル等からなるモニタ117とが接続されている。ROM115には、C言語用のコンパイラ121、プリプロセッサ122、リスナー登録リスト201のRAM2A上の割当領域サイズを解析するための解析ファームフェア123、前述の実行プログラムの、リスナー登録リスト201の上記割当領域サイズを未定とした雛型プログラム123及び各種車種にて使用する補助リスト124がライブラリ化された形で格納されている。また、RAM114には、解析ファームフェア123の作業領域131、その解析結果が記述されたヘッダファイルを格納するためのヘッダファイル格納領域132、プリプロセッサ122の作業領域133及びコンパイル用領域134が各々形成されている。モニタ41に表示される指示内容に従いキーボード116からオペレーターが適宜コマンド入力を行なうことで、調整ツール10は、解析ファームフェア123により、対象車種の補助リストの内容を解析してリスナー登録リスト201の割当領域サイズを決定する割当領域サイズ処理と、プリプロセッサ122により、割当領域サイズを(コンパイル前の)雛型プログラムに補完して搭載対象プログラムとする処理と、搭載対象プログラムを機械語にコンパイルしてECU40のROM2Bに転送する処理を順次行なう。   The adjustment tool 10 constitutes a main part of the program loading support system of the present invention. FIG. 1C is a block diagram showing an electrical configuration of the adjustment tool 10. The adjustment tool 10 is mainly a microcomputer in which a CPU 113, a RAM 114, a ROM 115 (consisting of a non-volatile memory such as a flash memory), and an input / output unit 112 are connected via an internal bus. A keyboard 116 and a monitor 117 including a liquid crystal panel are connected to the input / output unit 112. The ROM 115 includes a C language compiler 121, a preprocessor 122, an analysis firmware 123 for analyzing the allocation area size of the listener registration list 201 on the RAM 2A, and the allocation area size of the execution program described above in the listener registration list 201. Is stored in a library form. The template program 123 and the auxiliary list 124 used in various vehicle types are stored. In addition, the RAM 114 includes a work area 131 of the analysis firmware 123, a header file storage area 132 for storing a header file in which the analysis result is described, a work area 133 of the preprocessor 122, and a compilation area 134. ing. When the operator appropriately inputs a command from the keyboard 116 according to the instruction content displayed on the monitor 41, the adjustment tool 10 analyzes the content of the auxiliary list of the target vehicle model by the analysis firmware 123 and assigns the listener registration list 201. The allocation area size process for determining the area size, the preprocessor 122 complementing the allocation area size with the template program (before compilation) to make the installation target program, the installation target program compiled into machine language, and the ECU 40 The process of transferring to the ROM 2B is sequentially performed.

次に実行プログラムは、上記オブジェクト指向プラットフォーム上に構築されるものである。図2は、そのプログラムの構成を示すUML(Unified Modeling Language)表記に従ったクラス図である。該プログラムは、次のようなオブジェクトによって構成されている。
・イベント管理オブジェクト101C:イベント生成オブジェクト101Jが予め定められた実行状態となった場合に生成するイベントを取得して、これを現在有効なイベントとして発行する。
・イベント通知要求受付オブジェクト102C:イベントの通知先候補オブジェクト102J,102K,102Lからイベント通知要求を受け付ける。
・イベント処理オブジェクト103C:イベント通知要求が受け付けられる毎に、当該イベント通知要求を行なった通知先候補オブジェクト102J,102K,102Lをリスナーとして、リスナー登録リスト201にその都度動的に登録するとともに、該リスナー登録リスト201に登録されているリスナーに対してのみ、発行されたイベントの通知を行なう。
Next, the execution program is constructed on the object-oriented platform. FIG. 2 is a class diagram according to the UML (Unified Modeling Language) notation showing the configuration of the program. The program is composed of the following objects.
Event management object 101C: An event generated when the event generation object 101J enters a predetermined execution state is acquired and issued as a currently valid event.
Event notification request receiving object 102C: Receives an event notification request from event notification destination candidate objects 102J, 102K, and 102L.
Event processing object 103C: Every time an event notification request is accepted, the notification destination candidate objects 102J, 102K, and 102L that have made the event notification request are registered as listeners dynamically in the listener registration list 201 each time. Only the listener registered in the listener registration list 201 is notified of the issued event.

イベント管理オブジェクト101Cは、イベント発生元となるアプリケーションプログラム(図2では、アプリ1を表示)に対応したインスタンスオブジェクトをイベント生成オブジェクト101Jとして作成可能なクラスオブジェクトである。アプリケーションプログラム側にてイベントが生成されるに伴い、当該インスタンスオブジェクトを作成するとともに生成した該イベントを発行して、イベント処理オブジェクト103Cに受け渡すよう動作する。   The event management object 101C is a class object that can create an instance object corresponding to an application program (app 1 is displayed in FIG. 2) that is an event generation source as the event generation object 101J. As an event is generated on the application program side, the instance object is created and the generated event is issued and delivered to the event processing object 103C.

イベント通知要求受付オブジェクト102Cは、イベント通知先となるアプリケーションプログラムに対応したインスタンスオブジェクトを通知先候補オブジェクト102J,102K,102Lとして作成可能であり、かつ、通知対象となるイベントに対応したイベントリスナークラス104Iをインターフェースとして実装したクラスオブジェクトである。そして、該イベントリスナークラス104Iに呼び出された通知先候補オブジェクト102J,102K,102Lがリスナーとして、イベント処理オブジェクト103Cのリスナー登録リスト201(及び、後述の通知実行用リスト202と補助リスト203)に組み込まれている。なお、図2では、リスナー登録リスト201を「動的に登録されたリスナーリスト」、通知実行用リスト202を「イベント発行中のリスナーリスト」と、及び補助リスト203を「静的に登録されているリスナーリスト」と表記している。   The event notification request receiving object 102C can create an instance object corresponding to an application program as an event notification destination as notification destination candidate objects 102J, 102K, and 102L, and an event listener class 104I corresponding to an event to be notified. Is a class object implemented as an interface. Then, the notification destination candidate objects 102J, 102K, and 102L called by the event listener class 104I are incorporated into the listener registration list 201 (and the notification execution list 202 and the auxiliary list 203 described later) of the event processing object 103C as listeners. It is. In FIG. 2, the listener registration list 201 is “dynamically registered listener list”, the notification execution list 202 is “event issuing listener list”, and the auxiliary list 203 is “statically registered”. "List of listeners".

そして、イベント処理オブジェクト103Cは、リスナー登録リスト201の登録内容を監視するとともに、イベント管理オブジェクト101Cからの当該イベントの発行タイミングと、イベント通知要求受付オブジェクト102Cによる通知先候補オブジェクト102J,102K,102Lからのイベント通知要求の受け付けタイミングとに基づいてイベントの通知タイミングを決定し、リスナー登録リスト201上の対応するリスナーに通知を行なう。   Then, the event processing object 103C monitors the registered contents of the listener registration list 201, and also issues the event issuance timing from the event management object 101C and the notification destination candidate objects 102J, 102K, and 102L by the event notification request receiving object 102C. The event notification timing is determined based on the reception timing of the event notification request, and the corresponding listener on the listener registration list 201 is notified.

図3は、図1のクラス図に対応するシーケンス図である。すなわち、通知先候補オブジェクト102J,102K,102Lは、そのどれかがイベント通知要求を行なうたびに、イベント通知を受けるリスナーとして、図4Aのリスナー登録リスト201にその都度動的に登録される。そして、該リスナー登録リスト201に登録されているリスナーに対してのみ、発行されたイベントの通知が行なわれる。すなわち、リスナー登録リスト201を参照することにより、通知を欲する申し出(イベント通知要求)を行なった通知先候補オブジェクトにのみ、選択的にイベント通知を行なうことが可能となる。その結果、同じイベントに対して通知先候補オブジェクト102J,102K,102Lが複数存在している場合においても、受け側となる通知先候補オブジェクト102J,102K,102Lが自立的にイベント通知要求を出し、その都度リスナーとして動的登録され、登録されているリスナーについてのみイベント通知がなされる。従って。図12のように、意図しない通知先候補オブジェクト102J,102K,102Lにまで無作為にイベント通知がなされてしまう不具合が生じず、通知先候補オブジェクト102J,102K,102L毎に適正なタイミングでイベント通知が可能となる。この場合、1つの通知に付き、その都度個別にイベントを発行する形となる。   FIG. 3 is a sequence diagram corresponding to the class diagram of FIG. That is, each of the notification destination candidate objects 102J, 102K, and 102L is dynamically registered in the listener registration list 201 of FIG. 4A as a listener that receives an event notification each time an event notification request is made. The issued event is notified only to the listeners registered in the listener registration list 201. In other words, by referring to the listener registration list 201, it is possible to selectively perform event notification only to a notification destination candidate object that has made an offer for requesting (event notification request). As a result, even when there are a plurality of notification destination candidate objects 102J, 102K, and 102L for the same event, the notification destination candidate objects 102J, 102K, and 102L on the receiving side independently issue an event notification request, Each time it is dynamically registered as a listener, event notification is made only for the registered listener. Therefore. As shown in FIG. 12, there is no problem that event notifications are randomly made to unintended notification destination candidate objects 102J, 102K, and 102L, and event notification is performed at appropriate timing for each notification destination candidate object 102J, 102K, and 102L. Is possible. In this case, an event is issued separately for each notification.

図4Aは、リスナー登録リスト201を概念的に示すものである。リスナー登録リスト201は常時新しいリスナーの登録を受け付け可能な状態になっており、あるイベントの発行中に、同じイベントに対するリスナーが追加登録されることがある。このリスナーは、発行中のイベントに関与するリスナーと同じであってもよいし、異なるリスナーであってもよい。前者の場合は、発行中のイベントの通知がなされた後、同種のイベントが次回に発行されたときも同じリスナーに通知されることになるし、後者の場合は、次回に発行されるイベントが別のリスナーに通知される形になる。いずれにしろ、登録されるリスナーは、イベントの種別毎に通知要求のあった時系列順に順次登録され、先頭のものから順に対応するイベントの通知を受けることになる。   FIG. 4A conceptually shows the listener registration list 201. The listener registration list 201 is always in a state in which registration of a new listener can be accepted, and a listener for the same event may be additionally registered while a certain event is issued. This listener may be the same as the listener involved in the event being published, or may be a different listener. In the former case, after the event being issued is notified, the same listener will be notified the next time the same type of event is issued. In the latter case, the event to be issued next time Another listener is notified. In any case, registered listeners are sequentially registered in order of time series in which notification is requested for each event type, and receive notification of corresponding events in order from the top one.

ここで、リスナー登録リスト201上でリスナーを直接サーチしてイベント通知を実行する処理とした場合、あるイベントの発行途中に、そのイベントに対する新たなリスナーが追加されると、後で追加されたリスナーに対して、次回以降のイベントループ周期で本来通知したかったイベントが、現在発行中のイベントをカバーするイベントループのサーチ周期に偶然引っかかってしまい、望みのタイミングよりも早くイベント通知されてしまう不具合を生じうる。   Here, in the case of processing for performing event notification by directly searching for listeners on the listener registration list 201, if a new listener for the event is added in the middle of issuing an event, the listener added later On the other hand, the event that was originally intended to be notified in the event loop cycle after the next time is accidentally caught in the search cycle of the event loop that covers the currently issued event, and the event notification is made earlier than desired. Can occur.

これを解決するために、本実施形態では、次のような方式が採用されている。すなわち、イベント処理オブジェクト103Cにおいて、図4Aに示すように、イベント管理オブジェクト101Cが発行したイベントに対応するリスナーを、リスナー登録リスト201から該リスナー登録リスト201とは別に用意された通知実行用リスト202に複写し、当該通知実行用リスト202上で通知実行対象となるリスナーを検索するようにする。そして、検索されたリスナーに対し、発行されたイベントの通知を順次実行する。なお、通知が完了したイベントに対応するリスナーは通知実行用リスト202から削除される。   In order to solve this, in the present embodiment, the following method is adopted. That is, in the event processing object 103C, as shown in FIG. 4A, a listener corresponding to the event issued by the event management object 101C is prepared from the listener registration list 201 separately from the listener registration list 201. And the listener to be a notification execution target is searched for on the notification execution list 202. And notification of the issued event is sequentially performed with respect to the searched listener. Note that the listener corresponding to the event for which the notification has been completed is deleted from the notification execution list 202.

あるイベントの発行中に、他のイベントに対するイベント通知要求がなされた場合、当該イベント通知要求を行なった通知先候補オブジェクト102J,102K,102L(アプリ2〜アプリ4)がリスナーとしてリスナー登録リスト201に登録されるとともに、該リスナーは、対応するイベントの発行がなされるまでリスナー登録リスト201上に保持されることになる。イベント発行中に新たに登録されるリスナーは、通知実行用リスト202上のリスナーに対するイベント通知が完了するまで、リスナー登録リスト201上に保留され、本来通知を受けるべきタイミングで次のイベントが発行されると、はじめて通知実行用リスト202に移ってイベント通知を受けることができる。これにより、上記のような不具合が解消される。なお、イベント通知タイミングの精度を向上するため、イベント処理オブジェクト103Cにおいては、イベント管理オブジェクト101Cがイベントを発行するに伴い、該イベントに対応するリスナーを、リスナー登録リスト201から通知実行用リスト202に直ちに複写するようになっている(図2からも明らかな通り、各リスト201〜203は、リスナー登録数が0以上であって上限を設けない形で定義されている(0..*))。   When an event notification request for another event is made while an event is issued, the notification destination candidate objects 102J, 102K, and 102L (application 2 to application 4) that have made the event notification request are added to the listener registration list 201 as listeners. In addition to being registered, the listener is held on the listener registration list 201 until a corresponding event is issued. The listener newly registered during the event issuance is suspended on the listener registration list 201 until the event notification to the listener on the notification execution list 202 is completed, and the next event is issued at the timing when the notification should be received. Then, it is possible to receive the event notification by moving to the notification execution list 202 for the first time. Thereby, the above problems are eliminated. In order to improve the accuracy of event notification timing, in the event processing object 103C, as the event management object 101C issues an event, the listener corresponding to the event is transferred from the listener registration list 201 to the notification execution list 202. The list 201-203 is defined in such a way that the number of registered listeners is 0 or more and no upper limit is set (0 .. *) as is clear from FIG. .

なお、インスタンス(種別)の異なるイベントが順次発行される場合でも、対応するリスナーへスムーズにイベント通知を行なうことができるようにするために、図4Aに示すように、インスタンスの異なる複数のイベント(α、β、γ‥)のそれぞれについてリスナー登録リスト201は個別に用意されている。イベント処理オブジェクト103Cは、イベントが発行された場合に、該イベントに対応するリスナー登録リスト201からリスナーを通知実行用リスト202に順次複写する。   Note that even when events of different instances (types) are sequentially issued, in order to be able to smoothly notify the corresponding listener of events, as shown in FIG. Listener registration list 201 is prepared individually for each of α, β, γ. When an event is issued, the event processing object 103C sequentially copies the listener from the listener registration list 201 corresponding to the event to the notification execution list 202.

図4Aにおいては、イベントβに対し、アプリ2から通知要求が出された場合を例示している。リスナー登録リスト201のイベントβの割当領域には、アプリ2(番号「2」で識別している)がリスナーとして既に登録されている。そして、イベントβが実際に発行されると、リスナー登録リスト201のリスナーであるアプリ2を、通知実行用リスト202に複写する(T1)。そして、その通知実行用リスト202をサーチすることで、その複写された「アプリ2」が検索され、イベントβが通知される(T2)。   FIG. 4A illustrates a case where a notification request is issued from the application 2 for the event β. Application 2 (identified by the number “2”) is already registered as a listener in the event β allocation area of the listener registration list 201. When the event β is actually issued, the application 2 that is the listener in the listener registration list 201 is copied to the notification execution list 202 (T1). Then, by searching the notification execution list 202, the copied “application 2” is searched, and the event β is notified (T2).

なお、通知が完了したイベントに対応するリスナーは、通知実行用リスト202からは必ず削除(あるいは無効化)する必要がある(そうでなければ、発行されたイベントに通知が重複して実行されることにつながる)。また、リスナー登録リスト201上のリスナーの扱いについても、リスナーの登録タイミングがイベント通知のタイミング支配要因の一つとなっているので、基本的には、イベント処理オブジェクト103Cは、発行されたイベントに対応するリスナーをリスナー登録リスト201から通知実行用リスト202に複写するに伴い、当該リスナーを複写元となるリスナー登録リスト201から削除するように構成しておく必要がある。   Note that the listener corresponding to the event for which the notification has been completed must be deleted (or invalidated) from the notification execution list 202 (otherwise, the notification is executed redundantly on the issued event). Leads to that). In addition, with regard to the handling of listeners on the listener registration list 201, the event registration object 103C basically corresponds to the issued event because the listener registration timing is one of the dominant factors of event notification timing. As the listener to be copied is copied from the listener registration list 201 to the notification execution list 202, it is necessary to delete the listener from the listener registration list 201 as a copy source.

しかし、あるイベントの同じリスナーへの通知頻度が高い場合については、その特定のリスナーを必要な期間だけ(あるいは永続的に)リスナー登録リスト201上に留保できるようにしたほうが、通知先候補オブジェクト102J,102K,102Lがいちいち通知要求を出す必要がなくなるので、便利なことがある。この場合、イベント処理オブジェクト103Cは、予め定められたリスナーについて、発行されたイベントに対応するリスナーをリスナー登録リスト201から通知実行用リスト202に複写するに伴い、当該リスナーを複写元となるリスナー登録リスト201上に保持しつづけるものとして構築される。リスナー登録リスト201上でのリスナー登録状態の保持は、一部の特定のリスナーについては永続的に設定することもできるが、期間限定的に保持を行ないたい場合は、イベント処理オブジェクト103Cは、予め定められたリスナーのうち特定のものについて、他のオブジェクトからの削除依頼を受けた場合に当該リスナーを複写元となるリスナー登録リスト201から削除するものとして構築すればよい。いずれにしろ、リスナー登録リスト201上に保持され続けるリスナーについては、イベントの通知タイミングは、該イベントの発行タイミングに支配されることになる。   However, when the notification frequency of the same event to the same listener is high, the notification destination candidate object 102J is more likely to retain the specific listener on the listener registration list 201 for a necessary period (or permanently). , 102K, and 102L do not need to issue notification requests one by one. In this case, the event processing object 103C, for a predetermined listener, copies the listener corresponding to the issued event from the listener registration list 201 to the notification execution list 202, and registers the listener as a copy source. It is constructed so as to be kept on the list 201. The listener registration state on the listener registration list 201 can be permanently set for some specific listeners. However, if it is desired to hold the listener registration state for a limited time, the event processing object 103C is set in advance. A specific listener among the defined listeners may be constructed so as to be deleted from the listener registration list 201 as a copy source when a deletion request from another object is received. In any case, for listeners kept on the listener registration list 201, the event notification timing is governed by the event issuance timing.

次に、本実施形態では、リスナー登録リスト201へ登録可能な全ての通知先候補オブジェクト102J,102K,102Lが、リスナー登録リスト201とは別の補助リスト203にイベントの発行と無関係に静的(固定的)に登録されている。図4Bに示すように、イベント処理オブジェクト103Cは、イベント発行要求を受けるに伴い(T51),リスナー登録リスト201に登録されたリスナーが、補助リスト203上のいずれかの通知先候補オブジェクト102J,102K,102Lと一致するか否かにより正規のリスナーであるか否かが判定され(T52)、正規のリスナーであった場合にのみ、該リスナーに対し発行されたイベントの通知を実行する(T53,T54)。リスナー登録リスト201へのリスナーの登録は、上記のごとく、通知要求が発生するたびに動的に実施されるので、リスナー登録リスト201自体は書換え可能なメモリ上に作成する必要がある。このメモリは、具体的には図1のメモリ2であり、RAMで構成されるが、バグや暴走等により記憶内容が失われるリスクは常に存在する。しかし、上記のように、固定的な補助リスト203を併用することで、リスナー登録リスト201が書き込まれるメモリの記憶内容がバグや暴走等により破壊された場合も、イベント通知先のリスナーが正規のものであるか否かを容易に確認することができる。   Next, in the present embodiment, all notification destination candidate objects 102J, 102K, and 102L that can be registered in the listener registration list 201 are statically transferred to the auxiliary list 203 different from the listener registration list 201 regardless of the issuance of the event ( Registered). As shown in FIG. 4B, when the event processing object 103C receives the event issuance request (T51), the listener registered in the listener registration list 201 makes one of the notification destination candidate objects 102J and 102K on the auxiliary list 203. , 102L, whether or not it is a regular listener is determined (T52), and only when it is a regular listener, notification of an event issued to the listener is executed (T53, T54). As described above, the registration of the listener in the listener registration list 201 is dynamically performed every time a notification request is generated. Therefore, the listener registration list 201 itself needs to be created on a rewritable memory. Specifically, this memory is the memory 2 of FIG. 1 and is composed of a RAM, but there is always a risk that the stored contents are lost due to bugs, runaway or the like. However, as described above, by using the fixed auxiliary list 203 in combination, even if the stored contents of the memory in which the listener registration list 201 is written are destroyed due to a bug or runaway, the event notification destination listener can be It can be easily confirmed whether or not it is a thing.

以下、調整ツール10を用いて実行プログラムを車両側に搭載する処理について説明する。該調整ツール10をコネクタ109により、図1Bに示す車両側のシリアル通信バス30に接続する。次いで、図1Cの調整ツール10のキーボード116から、実行プログラム搭載対象となる車両の特定情報を入力する。これにより、ROM115上にて当該車種に対応する補助リストが特定される。   Hereinafter, the process of mounting the execution program on the vehicle side using the adjustment tool 10 will be described. The adjustment tool 10 is connected to the serial communication bus 30 on the vehicle side shown in FIG. Next, the specific information of the vehicle to be mounted with the execution program is input from the keyboard 116 of the adjustment tool 10 in FIG. 1C. Thereby, the auxiliary list corresponding to the vehicle type is specified on the ROM 115.

続いて解析ファームウェア123が立ち上がり、特定された補助リストのデータサイズに基づいてリスナー登録リストのRAM上の割当領域サイズが決定される。具体的には、図1Dに示すように、非コンパイル状態の補助リスト203上にてソースコードを解析することにより(図1Cの解析用作業領域131を利用する)、イベントリスナーの特定情報を示すデータ(Object 1、Object 2、‥)を抽出する。そして、抽出されたソースコードのコンパイル後のバイト数(つまり、補助リストのメモリ占有サイズ)を算出し、その算出値をリスナー登録リスト201のRAM上の割当領域サイズ(定数名:Rom Table Size)として決定する。   Subsequently, the analysis firmware 123 starts up, and the allocation area size on the RAM of the listener registration list is determined based on the data size of the specified auxiliary list. Specifically, as shown in FIG. 1D, by analyzing the source code on the auxiliary list 203 in a non-compiled state (using the analysis work area 131 in FIG. 1C), the event listener specific information is shown. Extract data (Object 1, Object 2, ...). Then, the number of bytes after compilation of the extracted source code (that is, the memory occupation size of the auxiliary list) is calculated, and the calculated value is assigned to the allocation area size on the RAM of the listener registration list 201 (constant name: Rom Table Size). Determine as.

決定された割当領域サイズは、定数Rom Table Sizeの定義値として、ヘッダファイル221に書き出され、図1Cのヘッダファイル格納領域132に保存される。続いてプリプロセッサ122が立ち上がり、雛型プログラム123のソースコードをオープンする(プリプロセッサ作業領域133を利用する)。この雛型プログラム123は車種間で共通であり、リスナー登録リスト201のRAM上の割当領域サイズ(Rom Table Size)が定数未定義の形で記述されている。プリプロセッサ122は、ヘッダファイル221から定数Rom Table Sizeの定義値を読出し、雛型プログラム123の未定義定数にこれを書き込んで補完する。   The determined allocation area size is written in the header file 221 as a definition value of the constant Rom Table Size and stored in the header file storage area 132 of FIG. 1C. Subsequently, the preprocessor 122 starts up and opens the source code of the template program 123 (using the preprocessor work area 133). This template program 123 is common among vehicle types, and the allocation area size (Rom Table Size) on the RAM of the listener registration list 201 is described in a form in which no constant is defined. The preprocessor 122 reads the definition value of the constant Rom Table Size from the header file 221 and writes it in the undefined constant of the template program 123 to complement it.

上記割当領域サイズの定義値が補完されることで、雛型プログラム123は対応する車種の実行プログラムとなる。次いでコンパイラ121を立ち上げ、コンパイル用領域134を用いて、該実行プログラムを機械語にコンパイルする。コンパイル済みの実行プログラムは、図1Bのシリアル通信バスを介して、対象となるECU40のフラッシュROM2Bに書き込まれ、実車搭載処理が終了する。   By complementing the definition value of the allocation area size, the template program 123 becomes an execution program for the corresponding vehicle type. Next, the compiler 121 is started up, and the execution program is compiled into a machine language using the compilation area 134. The compiled execution program is written into the flash ROM 2B of the target ECU 40 via the serial communication bus of FIG. 1B, and the actual vehicle mounting process is completed.

以下、本発明を車載用のセキュリティシステムに適用・展開した事例について説明する。図5は、オブジェクト指向型車両用制御システムの一具体化例であるセキュリティシステム100の、概略ハードウェア構成を示すブロック図である。セキュリティシステム100は、マイコン制御される侵入検知装置42と、該侵入検知装置42からの検知情報を受け、アラームを動作させたり、監視カメラによる車内画像撮影等のセキュリティ処理をマイコン制御により実行したりするセキュリティ制御部41とが通信ネットワークにより接続されたシステムとして構成されている(以下、「セキュリティシステム40」とも記載する)。また、セキュリティ制御部41はユーザーが所持する携帯電話や、外部の警備センターなどと無線通信可能とされており、異常発生した場合の報知情報や、撮影画像等を無線送信することができる。   Hereinafter, examples in which the present invention is applied to and deployed in an in-vehicle security system will be described. FIG. 5 is a block diagram showing a schematic hardware configuration of the security system 100 which is a specific example of the object-oriented vehicle control system. The security system 100 receives a microcomputer-controlled intrusion detection device 42 and detection information from the intrusion detection device 42, activates an alarm, and executes security processing such as in-vehicle image capturing by a surveillance camera by microcomputer control. The security control unit 41 is configured as a system connected by a communication network (hereinafter also referred to as “security system 40”). Further, the security control unit 41 can wirelessly communicate with a mobile phone possessed by the user, an external security center, and the like, and can wirelessly transmit notification information, a captured image, and the like when an abnormality occurs.

図6に示すごとく、ユーザーが携帯電話43でセキュリティ制御部41に電話をかけ、セキュリティセットを指令した場合を考える。セキュリティ制御部41が侵入検知装置42にセキュリティセットを指示し、そのセット完了のステータスを侵入検知装置42から受け、これをユーザー(の携帯電話43)にセット完了通知する動作を第一動作とする。また、セキュリティセット状態の侵入検知装置42が車両への侵入を検知し、これをユーザー(の携帯電話43)にアラーム通知する第2動作とする。イベント発行元となるアプリ1と、セキュリティ制御部41に実装され、その通知先候補となるアプリ2(及び3,4)が侵入検知装置42に実装されているものとする。   As shown in FIG. 6, consider a case where the user calls the security control unit 41 with the mobile phone 43 and instructs the security set. The security control unit 41 instructs the intrusion detection device 42 to set the security, receives the set completion status from the intrusion detection device 42, and notifies the user (the mobile phone 43) of the completion of the setting as the first operation. . The intrusion detection device 42 in the security set state detects the intrusion into the vehicle, and this is a second operation for notifying the user (the mobile phone 43) of an alarm. It is assumed that the app 1 that is the event issuer and the app 2 (and 3 and 4) that are candidates for the notification destination are installed in the intrusion detection device 42.

図12の従来例に対応するパターンとして、第一動作では、セット完了のステータスを侵入検知装置42から受けることを条件として「通知完了」を返すイベントが発行されるものとし、そして、第二動作では、侵入検知を侵入検知装置42から受けることを条件として「通知完了」を返すイベントが発行されるものとする。また、リスナーはアプリ2(及び3,4)に固定的に登録されているのみとする。   As a pattern corresponding to the conventional example of FIG. 12, in the first operation, an event that returns “notification completed” is issued on the condition that a set completion status is received from the intrusion detection device 42. Then, it is assumed that an event that returns “notification completion” is issued on condition that intrusion detection is received from the intrusion detection device 42. In addition, it is assumed that the listener is fixedly registered in the application 2 (and 3, 4).

セキュリティセットが完了して、十分な時間をおいて侵入検知がなされ、かつ、ユーザーの携帯電話43への通知もいずれもうまくいった場合は、図6に示すように、イベントリスナーは矛盾なく動作し、いずれのイベント通知(セット完了あるいは侵入検知通知完了)も適正なタイミングでなされていることがわかる。   When security set is completed, intrusion detection is made after a sufficient amount of time, and both notifications to the user's mobile phone 43 are successful, as shown in FIG. It can be seen that any event notification (set completion or intrusion detection notification completion) is made at an appropriate timing.

ところが、ユーザーの携帯電話43は、電源が切れていたり、話中であったり、あるいは電波の届かない場所にあった場合は無線接続不可であるから、これを用いたユーザーへの通知が失敗することがある。また、ユーザーが携帯電話43によりセキュリティセットした時点で、既に車両に賊が侵入していることもありえる。すると、図7に示すような不具合動作を生ずる。   However, when the user's mobile phone 43 is turned off, busy, or in a place where radio waves do not reach, wireless connection is impossible, so notification to the user using this fails. Sometimes. It is also possible that a bandit has already invaded the vehicle when the user sets security with the mobile phone 43. Then, a malfunction operation as shown in FIG. 7 occurs.

つまり、侵入検知装置42は、セキュリティセットされた時点で既に侵入検知も能動化されている状態にあるので、第一動作でのイベント通知は矛盾なく実行されるのに対し、そのあと切れ目なく侵入検知通知が侵入検知装置42から返ってくることになる。このとき、ユーザーの携帯電話43は、セキュリティセットのために車両側と電話がつながっている状態にあるから、車両側から侵入報知のためにユーザーに電話をかけようとしても「つながらない」状態となり、通知に失敗することになる。しかし、上記のイベントリスナーは、侵入検知を侵入検知装置42から受ければ、直ちに「通知完了」のイベント通知を行なってしまうので、ユーザーへの通知が実際には失敗していることと矛盾する。   In other words, since the intrusion detection device 42 is already in the state where the intrusion detection is activated when the security is set, the event notification in the first operation is executed without contradiction, and then the intrusion is performed without interruption. A detection notification is returned from the intrusion detection device 42. At this time, since the mobile phone 43 of the user is in a state where the vehicle side and the phone are connected for the security set, even if an attempt is made to call the user for intrusion notification from the vehicle side, the user's mobile phone 43 is in a “not connected” state, Notification will fail. However, if the event listener receives the intrusion detection from the intrusion detection device 42, the event listener immediately performs the “notification completion” event notification, which contradicts that the notification to the user has actually failed.

しかし、上記本実施形態の方式を採用することで、この問題は以下のように解消される(図9は、オブジェクト間の情報の流れを示し、図8は、イベント通知処理全体にかかるセキュリティ制御部41内の処理の流れを示す)。図9に示すごとく、侵入検知装置42側のアプリ2(3,4)側では、侵入検知するとイベント通知要求を行い(図8:S1)、リスナーとして動的に登録される(図9:応答先設定(b)/図8:S2)。一方、イベント管理オブジェクト101Cでは、ユーザーへの通知処理を行い(図9:(c)/図8:S3)、この通知が正常に完了した場合に限りイベントを有効化し、これをイベント処理オブジェクト103Cに発行する(図9:(e)/図8:S4→S5)。   However, by adopting the method of the present embodiment, this problem is solved as follows (FIG. 9 shows the flow of information between objects, and FIG. 8 shows security control related to the entire event notification processing. The flow of processing in the unit 41 is shown). As shown in FIG. 9, the application 2 (3, 4) side on the intrusion detection device 42 side makes an event notification request when an intrusion is detected (FIG. 8: S1), and is dynamically registered as a listener (FIG. 9: response). Prior setting (b) / FIG. 8: S2). On the other hand, the event management object 101C performs notification processing to the user (FIG. 9: (c) / FIG. 8: S3), and the event is validated only when this notification is completed normally. (FIG. 9: (e) / FIG. 8: S4 → S5).

図10に示すように、イベント処理オブジェクト103Cでは、前述のごとく、発行されたイベントに対応するリスナーを、リスナー登録リスト201から通知実行用リスト202に複写し、さらに、その通知実行用リスト202に複写されたリスナーが、補助リスト203に固定的に登録されているリスナーのどれかと一致した場合に、はじめて完了通知(イベント通知)を侵入検知装置42に返す(図9:(f)/図8:S6)。   As shown in FIG. 10, in the event processing object 103C, as described above, the listener corresponding to the issued event is copied from the listener registration list 201 to the notification execution list 202, and further to the notification execution list 202. When the copied listener matches one of the listeners fixedly registered in the auxiliary list 203, a completion notification (event notification) is returned to the intrusion detection device 42 for the first time (FIG. 9: (f) / FIG. 8). : S6).

その結果を示すシーケンス図が図11である。つまり、前述のごとく、ユーザー側の携帯電話43がセキュリティセットのために通話中の間は、ユーザー通知が失敗するが、この場合は、イベントが発行されないので、完了通知(イベント通知)が侵入検知装置42に返っていない。侵入検知装置42はイベント通知を受け取れないので、やむなく侵入検知通知の再送を行なう。このとき、ユーザーの携帯電話43が通話終了し、呼び待ちの状態になっていれば、今度はユーザー通知が成功するので、ここではじめて通知完了を返すイベントが発行され、矛盾のない処理が実現する。   FIG. 11 is a sequence diagram showing the result. That is, as described above, the user notification fails while the mobile phone 43 on the user side is in a call due to the security set. However, in this case, since an event is not issued, a completion notification (event notification) is sent to the intrusion detection device 42. Has not returned. Since the intrusion detection device 42 cannot receive the event notification, the intrusion detection notification is unavoidably retransmitted. At this time, if the user's mobile phone 43 is in a call waiting state and is in a call waiting state, the user notification will succeed, so an event that returns notification completion is issued for the first time, thereby realizing consistent processing. To do.

本発明のオブジェクト指向型車両用制御システムにおける制御主体の構成を、オブジェクト指向プラットフォームの観点から概念的に示す図。The figure which shows notionally the structure of the control main body in the object-oriented vehicle control system of this invention from a viewpoint of an object-oriented platform. 制御主体のマイコンハードウェア構成の一例を示すブロック図。The block diagram which shows an example of the microcomputer hardware structure of a control main body. 調整ツールの構成の一例を示すブロック図。The block diagram which shows an example of a structure of an adjustment tool. 本発明のプログラム搭載支援システムの作用説明図。The operation explanatory view of the program loading support system of the present invention. 図1の制御主体が実行するプログラムの構成を示すUML表記に従ったクラス図。The class diagram according to the UML notation which shows the structure of the program which the control main body of FIG. 1 performs. 図1のクラス図に対応するシーケンス図。The sequence diagram corresponding to the class diagram of FIG. リスナー登録リストをその使用方法とともに概念的に示す図。The figure which shows notionally a listener registration list with the usage. 補助リストの使用方法を示すフローチャート。The flowchart which shows the usage method of an auxiliary | assistant list. オブジェクト指向型車両用制御システムの一具体化例であるセキュリティシステムの、概略ハードウェア構成を示すブロック図。1 is a block diagram showing a schematic hardware configuration of a security system which is a specific example of an object-oriented vehicle control system. 従来のセキュリティシステムにおける正常時の動作を示すシーケンス図。The sequence diagram which shows the operation | movement at the time of normal in the conventional security system. 同じく不具合時の動作を示すシーケンス図。The sequence diagram which similarly shows the operation | movement at the time of a malfunction. イベント通知処理全体にかかるセキュリティ制御部内の処理の流れを示すフローチャート。The flowchart which shows the flow of the process in the security control part concerning the whole event notification process. 図8に対応するオブジェクト間の情報の流れを示す概念ブロック図。The conceptual block diagram which shows the flow of the information between the objects corresponding to FIG. 図9のイベント処理部の詳細を示す概念ブロック図。The conceptual block diagram which shows the detail of the event process part of FIG. 図8に対応するシーケンス図。FIG. 9 is a sequence diagram corresponding to FIG. 8. 従来のシステムの問題点を示す図。The figure which shows the problem of the conventional system.

符号の説明Explanation of symbols

1 プログラム実行装置(CPU)
10 調整ツール(プログラム搭載支援システム)
40 制御主体
101C イベント管理オブジェクト
101J イベント生成オブジェクト
102C イベント通知要求受付オブジェクト
102J,102K,102L 通知先候補オブジェクト
103C イベント処理オブジェクト
115 ROM(補助リスト記憶手段)
121 コンパイラ(搭載対象プログラムコンパイル手段)
122 プリプロセッサ(割当領域サイズ設定手段、未定義定数書換え手段)
123 解析ファームウェア(割当領域サイズ決定手段)
201 リスナー登録リスト
202 通知実行用リスト
203 補助リスト
1 Program execution device (CPU)
10 Adjustment tool (Program installation support system)
40 Control subject
101C Event management object 101J Event generation object 102C Event notification request reception object 102J, 102K, 102L Notification destination candidate object 103C Event processing object 115 ROM (auxiliary list storage means)
121 Compiler (on-board program compilation means)
122 Preprocessor (allocation area size setting means, undefined constant rewriting means)
123 Analysis firmware (assignment area size determination means)
201 Listener registration list 202 Notification execution list 203 Auxiliary list

Claims (13)

CPU、ROM及びRAMを有するマイコンを含んで構成され、車載用電子機器を前記CPUにより、前記ROMに格納されたオブジェクト指向のプログラムを、前記RAMを作業領域として実行することにより動作制御する制御主体を有した車両用制御システムであって、前記プログラムが、
イベント生成オブジェクトが予め定められた実行状態となった場合に生成するイベントを取得して、これを現在有効なイベントとして発行するイベント管理オブジェクトと、
前記イベントの通知先候補オブジェクトからイベント通知要求を受け付けるイベント通知要求受付オブジェクトと、
前記イベント通知要求が受け付けられる毎に、当該イベント通知要求を行なった通知先候補オブジェクトをリスナーとして、前記RAM上に領域確保されるリスナー登録リストにその都度動的に登録するとともに、該リスナー登録リストに登録されているリスナーに対してのみ、発行された前記イベントの通知を行なうイベント処理オブジェクトとを備え、
かつ、前記ROMには、前記リスナー登録リストへ登録可能な全ての前記通知先候補オブジェクトが、前記リスナー登録リストとは別の補助リストに前記イベントの発行と無関係に静的に登録されてなり、
前記リスナー登録リストに割り当てられる前記RAM上の領域サイズが、前記ROM内における前記補助リストの占有サイズに対応した値に定められてなることを特徴とするオブジェクト指向型車両用制御システム。
A control entity configured to include a microcomputer having a CPU, a ROM, and a RAM, and to control the operation of an in-vehicle electronic device by executing the object-oriented program stored in the ROM using the RAM as a work area. A vehicle control system comprising:
An event management object that obtains an event that is generated when the event generation object is in a predetermined execution state and issues this as a currently valid event;
An event notification request receiving object that receives an event notification request from the event notification destination candidate object;
Each time the event notification request is accepted, the notification destination candidate object that has made the event notification request is registered as a listener dynamically in the listener registration list in which an area is secured on the RAM, and the listener registration list An event processing object for notifying the issued event only to listeners registered in
And in the ROM, all the notification destination candidate objects that can be registered in the listener registration list are statically registered in an auxiliary list different from the listener registration list regardless of the issue of the event,
An object-oriented vehicle control system, wherein an area size on the RAM allocated to the listener registration list is set to a value corresponding to an occupied size of the auxiliary list in the ROM.
前記イベント処理オブジェクトは、前記リスナー登録リストに登録された前記リスナーが、前記補助リスト上のいずれかの通知先候補オブジェクトと一致する場合にのみ、該リスナーに対し発行された前記イベントの通知を実行する請求項1記載のオブジェクト指向型車両用制御システム。   The event processing object performs notification of the event issued to the listener only when the listener registered in the listener registration list matches any notification destination candidate object on the auxiliary list. The object-oriented vehicle control system according to claim 1. 前記イベント処理オブジェクトは、前記リスナー登録リストの登録内容を監視するとともに、前記イベント管理オブジェクトからの当該イベントの発行タイミングと、前記イベント通知要求受付オブジェクトによる前記通知先候補オブジェクトからのイベント通知要求の受け付けタイミングとに基づいて前記イベントの通知タイミングを決定し、前記リスナー登録リスト上の対応するリスナーに通知を行なう請求項1又は請求項2に記載のオブジェクト指向型車両用制御システム。   The event processing object monitors registration contents of the listener registration list, and issues an event notification request from the notification destination candidate object by the event notification request reception object and an issue timing of the event from the event management object. The object-oriented vehicle control system according to claim 1 or 2, wherein notification timing of the event is determined based on timing and notification is made to a corresponding listener on the listener registration list. 前記イベント処理オブジェクトは、前記イベント管理オブジェクトが発行したイベントに対応するリスナーを、前記リスナー登録リストから該リスナー登録リストとは別に用意された通知実行用リストに複写し、当該通知実行用リスト上で通知実行対象となるリスナーを検索し、検索されたリスナーに対し、前記発行されたイベントの通知を順次実行するとともに、通知が完了したイベントに対応するリスナーを前記通知実行用リストから削除する請求項1ないし請求項3のいずれか1項に記載のオブジェクト指向型車両用制御システム。   The event processing object copies a listener corresponding to an event issued by the event management object from the listener registration list to a notification execution list prepared separately from the listener registration list, and on the notification execution list, A listener that is a notification execution target is searched, notifications of the issued events are sequentially executed for the searched listeners, and a listener corresponding to the event for which the notification is completed is deleted from the notification execution list. The object-oriented vehicle control system according to any one of claims 1 to 3. 前記イベント処理オブジェクトは、前記イベント管理オブジェクトが前記イベントを発行するに伴い、該イベントに対応するリスナーを、前記リスナー登録リストから前記通知実行用リストに直ちに複写する請求項4記載のオブジェクト指向型車両用制御システム。   5. The object-oriented vehicle according to claim 4, wherein the event processing object immediately copies a listener corresponding to the event from the listener registration list to the notification execution list as the event management object issues the event. Control system. インスタンスの異なる複数のイベントのそれぞれについて前記リスナー登録リストが個別に用意され、前記イベント処理オブジェクトは、前記イベントが発行された場合に、該イベントに対応するリスナー登録リストから前記リスナーを前記通知実行用リストに順次複写するものである請求項4又は請求項5に記載のオブジェクト指向型車両用制御システム。   The listener registration list is individually prepared for each of a plurality of events of different instances, and when the event is issued, the event processing object sends the listener from the listener registration list corresponding to the event for the notification execution. 6. The object-oriented vehicle control system according to claim 4, wherein the object-oriented vehicle control system is one that is sequentially copied to a list. 前記イベント処理オブジェクトは、発行された前記イベントに対応する前記リスナーを前記リスナー登録リストから前記通知実行用リストに複写するに伴い、当該リスナーを複写元となる前記リスナー登録リストから削除する請求項4ないし請求項6のいずれか1項に記載のオブジェクト指向型車両用制御システム。   5. The event processing object deletes the listener from the listener registration list as a copy source as the listener corresponding to the issued event is copied from the listener registration list to the notification execution list. The object-oriented vehicle control system according to any one of claims 6 to 6. 前記イベント処理オブジェクトは、予め定められたリスナーについて、発行された前記イベントに対応する前記リスナーを前記リスナー登録リストから前記通知実行用リストに複写するに伴い、当該リスナーを複写元となる前記リスナー登録リスト上に保持しつづける請求項4ないし請求項6のいずれか1項に記載のオブジェクト指向型車両用制御システム。   The event processing object, for a predetermined listener, copies the listener corresponding to the issued event from the listener registration list to the notification execution list, and registers the listener as a copy source. The object-oriented vehicle control system according to any one of claims 4 to 6, wherein the object-oriented vehicle control system is kept on the list. 前記イベント処理オブジェクトは、前記予め定められたリスナーのうち特定のものについて、他のオブジェクトからの削除依頼を受けた場合に当該リスナーを複写元となる前記リスナー登録リストから削除する請求項4ないし請求項6のいずれか1項に記載のオブジェクト指向型車両用制御システム。   5. The event processing object deletes the listener from the listener registration list as a copy source when receiving a deletion request from another object for a specific one of the predetermined listeners. Item 7. The object-oriented vehicle control system according to any one of Items6. 請求項1ないし請求項9のいずれか1項に記載のオブジェクト指向型車両用制御システムを機能実現する前記オブジェクト指向のプログラムの、前記車両への搭載支援を行なうシステムであって、
搭載先となる車両毎に個別に用意された前記補助リストを記憶する補助リスト記憶手段と、
搭載すべき車両の前記補助リストを前記補助リスト記憶手段上にて特定し、その補助リストのデータサイズに基づいて前記リスナー登録リストの前記RAM上の割当領域サイズを決定する割当領域サイズ決定手段と、
決定された前記割当領域サイズをプログラム搭載先となる車両の前記RAMに対して設定する割当領域サイズ設定手段と、
を備えたことを特徴とするプログラム搭載支援システム。
A system for supporting the mounting of the object-oriented program for realizing the function of the object-oriented vehicle control system according to any one of claims 1 to 9 on the vehicle,
Auxiliary list storage means for storing the auxiliary list prepared individually for each vehicle to be mounted;
Allocation area size determining means for specifying the auxiliary list of vehicles to be mounted on the auxiliary list storage means and determining an allocation area size on the RAM of the listener registration list based on the data size of the auxiliary list; ,
An allocation area size setting means for setting the determined allocation area size in the RAM of the vehicle as a program mounting destination;
A program loading support system characterized by comprising:
前記割当領域サイズ設定手段は、
搭載すべき前記プログラムの、前記リスナー登録リストの前記RAM上の割当領域サイズを未定とした雛型プログラムを記憶する雛型プログラム記憶手段と、
前記割当領域サイズ決定手段が決定した前記割当領域サイズを前記雛型プログラムに補完して搭載対象プログラムとする割当領域サイズ補完手段と、
該搭載対象プログラムを前記車両側に転送する搭載対象プログラム転送手段と、
を有する請求項10記載のプログラム搭載支援システム。
The allocation area size setting means includes:
A template program storage means for storing a template program in which the allocation area size on the RAM of the listener registration list of the program to be installed is undetermined;
An allocation area size complementing means that complements the allocation area size determined by the allocation area size determination means to the template program to be an installation target program;
Mounting target program transfer means for transferring the mounting target program to the vehicle;
The program mounting support system according to claim 10, comprising:
前記雛型プログラム記憶手段において前記雛型プログラムは、コンパイル型言語により、前記割当領域サイズを未定義定数として含んだ形で記述され、
前記割当領域サイズ補完手段は、前記雛型プログラムの割当領域サイズを示す前記未定義定数を、決定された前記割当領域サイズにより書き換える未定義定数書換え手段と、
その書き換えられた雛型プログラムを前記搭載対象プログラムとしてコンパイルする搭載対象プログラムコンパイル手段とを有し、
前記搭載対象プログラム転送手段は、そのコンパイル済みの搭載対象プログラムを前記車両側に転送する請求項11記載のプログラム搭載支援システム。
In the template program storage means, the template program is described by a compiled language in a form including the allocation area size as an undefined constant,
The allocation area size complementing means includes: an undefined constant rewriting means for rewriting the undefined constant indicating the allocation area size of the template program with the determined allocation area size;
Mounting target program compiling means for compiling the rewritten template program as the mounting target program;
12. The program loading support system according to claim 11, wherein the loading target program transfer means transfers the compiled mounting target program to the vehicle side.
前記割当領域サイズ決定手段は、前記補助リスト記憶手段に記憶されている非コンパイル状態の前記補助リストのソースコードを解析することにより、コンパイル後の補助リストのメモリ占有サイズを算出し、その算出値に基づいて前記リスナー登録リストの前記RAM上の割当領域サイズを決定するものである請求項12に記載のプログラム搭載支援システム。   The allocation area size determination means calculates the memory occupation size of the auxiliary list after compilation by analyzing the source code of the auxiliary list in the non-compiled state stored in the auxiliary list storage means, and the calculated value 13. The program loading support system according to claim 12, wherein an allocation area size on the RAM of the listener registration list is determined based on the program.
JP2006334833A 2006-12-12 2006-12-12 Object-oriented vehicle control system and program loading support system Expired - Fee Related JP4618240B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006334833A JP4618240B2 (en) 2006-12-12 2006-12-12 Object-oriented vehicle control system and program loading support system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006334833A JP4618240B2 (en) 2006-12-12 2006-12-12 Object-oriented vehicle control system and program loading support system

Publications (2)

Publication Number Publication Date
JP2008146480A true JP2008146480A (en) 2008-06-26
JP4618240B2 JP4618240B2 (en) 2011-01-26

Family

ID=39606568

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006334833A Expired - Fee Related JP4618240B2 (en) 2006-12-12 2006-12-12 Object-oriented vehicle control system and program loading support system

Country Status (1)

Country Link
JP (1) JP4618240B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9596145B2 (en) 2012-07-02 2017-03-14 Mitsubishi Electric Corporation Communication system, GUI apparatus, and service apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002091762A (en) * 2000-09-14 2002-03-29 Denso Corp Program generator
JP2004026083A (en) * 2002-06-27 2004-01-29 Fujitsu Ten Ltd Vehicle control program development system, vehicle control device and memory medium
JP2004227500A (en) * 2003-01-27 2004-08-12 Denso Corp Code generation device, code generation program, simulator, simulation program, model generation device, and model generation program
JP2004532479A (en) * 2001-05-18 2004-10-21 クゥアルコム・インコーポレイテッド Extensible event notification mechanism
JP2006146789A (en) * 2004-11-24 2006-06-08 Denso Corp Electronic controller, its control method, and program
JP2006178859A (en) * 2004-12-24 2006-07-06 Denso Corp Controller

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002091762A (en) * 2000-09-14 2002-03-29 Denso Corp Program generator
JP2004532479A (en) * 2001-05-18 2004-10-21 クゥアルコム・インコーポレイテッド Extensible event notification mechanism
JP2004026083A (en) * 2002-06-27 2004-01-29 Fujitsu Ten Ltd Vehicle control program development system, vehicle control device and memory medium
JP2004227500A (en) * 2003-01-27 2004-08-12 Denso Corp Code generation device, code generation program, simulator, simulation program, model generation device, and model generation program
JP2006146789A (en) * 2004-11-24 2006-06-08 Denso Corp Electronic controller, its control method, and program
JP2006178859A (en) * 2004-12-24 2006-07-06 Denso Corp Controller

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9596145B2 (en) 2012-07-02 2017-03-14 Mitsubishi Electric Corporation Communication system, GUI apparatus, and service apparatus

Also Published As

Publication number Publication date
JP4618240B2 (en) 2011-01-26

Similar Documents

Publication Publication Date Title
US9996401B2 (en) Task processing method and virtual machine
CN106325847B (en) Method and device for acquiring application program function based on iOS platform
CN111552508A (en) Application version construction method, apparatus, and electronic device
CN114296871A (en) Container-based continuous integration method, device, system, working node and medium
CN114764331A (en) Code generation method and device, electronic equipment and computer readable storage medium
CN104412230B (en) The method and apparatus for calling wireless communication function from firmware module using supervisor call instruction
EP4242846A2 (en) Peer-to-peer distributed computing system for heterogeneous device types
JPWO2009057762A1 (en) Multiprocessor and cache synchronization control method and program thereof
JP4618240B2 (en) Object-oriented vehicle control system and program loading support system
CN107168719A (en) Application program running method and device, terminal and computer readable storage medium
JP4618224B2 (en) Object-oriented vehicle control system
JP6495290B2 (en) IC wireless device
CN113760347B (en) Data processing
US20160062801A1 (en) Image forming apparatus and resource management method
KR100803290B1 (en) Scalable virtual machine and program reprogramming method for changing program in wireless sensor network environment
JP2003108513A (en) Hardware chain pull
JP4594889B2 (en) Method for tracing program executed on a system including a plurality of processing devices, and system including a plurality of processing devices
JP7344109B2 (en) Resource allocation system, server, computing device
JP2004252508A (en) Method for converting software program for single processor into software program for multiprocessor
US20250224983A1 (en) Task Scheduling Method and Electronic Apparatus
CN114296749B (en) Interface interaction system and method based on Qt framework, storage medium and electronic equipment
CN111857886A (en) Software running method, system, computing equipment and storage medium
CN110879747B (en) Resource management method and device
JP2019008437A (en) Data access device and access error notification method
CN119271538A (en) Test case generation method, device, electronic device, storage medium and product

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090119

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100707

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100713

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100903

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100928

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

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

Free format text: PAYMENT UNTIL: 20131105

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 4618240

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20131105

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

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

LAPS Cancellation because of no payment of annual fees