JP2008146480A - Object-oriented vehicle control system and program loading support system - Google Patents
Object-oriented vehicle control system and program loading support system Download PDFInfo
- 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
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
【課題】リスナー登録リストに割り当てられるRAM領域のサイズを、ROM内の補助リストの占有サイズに応じて適正化する。
【解決手段】搭載先となる車両に対応する補助リスト203の補助リストのデータサイズに基づいてリスナー登録リストのRAM上の割当領域サイズ221を決定し、決定された割当領域サイズ221をプログラム搭載先となる車両のRAMに対して設定する。
【選択図】図1DThe 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.
近年、自動車に搭載される電子機器の制御は、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
しかし、実際に欲する動作が、最初に発行されたイベントに対してはアプリ2にのみ通知を行い、そこからある時間遅れて同じイベントが再度発行されたときに、今度はアプリ3に対してのみ通知を行ないたい、といったような場合、図12の方式では明らかに問題がある。つまり、最初のイベント発行でアプリ2だけでなくアプリ3(及びアプリ4)にも通知がなされ、本来望まれないタイミングであるにも拘わらずアプリ3(及びアプリ4)でイベントハンドラが動作して、システム全体としては誤動作につながってしまうのである。このような不具合を招く要因は、組み込まれたイベントリスナーにおいて、対象となるイベントの通知先(リスナー)が固定的(静的)に登録されており、登録されたリスナーに対して無条件にイベント通知を行なうようになっている点にある。
However, when the first action is issued, only the
本発明の課題は、同種のイベントに対するリスナーの特定と、複数リスナーへの通知順序の制御を簡便かつ的確に行なうことができ、本来望まれないタイミングや意図しないリスナーに対してイベント通知がなされてしまう不具合を効果的に解消できるオブジェクト指向型車両用制御システムとそれに用いるプログラム搭載支援システムとを提供することにある。 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.
本発明のオブジェクト指向型車両用制御システムは、 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
前記プログラムデータ領域6には、C言語のソースプログラムよりコンパイルされたバイトコードの実行プログラムが格納される(以下、1アドレス分のプログラムを「プログラムデータ」という)。検索用テーブル領域7には、メソッドの呼出し時に、呼び出されたメソッドが格納されている場所を検索するために、図示しないクラステーブルやメソッドテーブルなどが格納される。
The
プログラム実行装置1におけるメモリアクセスは、メモリコントローラ5により制御される。プログラム実行部3は、メモリコントローラ5に、読み出すべきプログラムデータの格納先を示すプログラムアドレスを与えることにより、前記プログラムデータ領域6から該当するプログラムデータを得て実行する。特にそのプログラムデータがメソッド呼出しを示すメッセージであったとき、プログラム実行部3は、そのメッセージをメソッド検索部4に送信して、メソッドの格納先の検索を要請する。
Memory access in the program execution device 1 is controlled by the
メッセージには、メッセージの対象となるオブジェクトの所属するクラス名、実行すべきメソッドのメソッド名、引数、戻り値の有無やその型を示すデータが含まれる。メソッド検索部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
メソッド検索部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
図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
該ECU40は、車載ネットワーク(通信プロトコル:例えばCAN(Controller Area Network))を構築するシリアル通信バス30により、各々シリアルインターフェース107及び受信バッファ107aを介して、車両上の他のECU群と接続されている。シリアル通信バス30には外部機器接続用のコネクタ109も接続され、該コネクタ109に調整ツール10が接続される。
The
この調整ツール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
次に実行プログラムは、上記オブジェクト指向プラットフォーム上に構築されるものである。図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 notification
イベント管理オブジェクト101Cは、イベント発生元となるアプリケーションプログラム(図2では、アプリ1を表示)に対応したインスタンスオブジェクトをイベント生成オブジェクト101Jとして作成可能なクラスオブジェクトである。アプリケーションプログラム側にてイベントが生成されるに伴い、当該インスタンスオブジェクトを作成するとともに生成した該イベントを発行して、イベント処理オブジェクト103Cに受け渡すよう動作する。
The
イベント通知要求受付オブジェクト102Cは、イベント通知先となるアプリケーションプログラムに対応したインスタンスオブジェクトを通知先候補オブジェクト102J,102K,102Lとして作成可能であり、かつ、通知対象となるイベントに対応したイベントリスナークラス104Iをインターフェースとして実装したクラスオブジェクトである。そして、該イベントリスナークラス104Iに呼び出された通知先候補オブジェクト102J,102K,102Lがリスナーとして、イベント処理オブジェクト103Cのリスナー登録リスト201(及び、後述の通知実行用リスト202と補助リスト203)に組み込まれている。なお、図2では、リスナー登録リスト201を「動的に登録されたリスナーリスト」、通知実行用リスト202を「イベント発行中のリスナーリスト」と、及び補助リスト203を「静的に登録されているリスナーリスト」と表記している。
The event notification
そして、イベント処理オブジェクト103Cは、リスナー登録リスト201の登録内容を監視するとともに、イベント管理オブジェクト101Cからの当該イベントの発行タイミングと、イベント通知要求受付オブジェクト102Cによる通知先候補オブジェクト102J,102K,102Lからのイベント通知要求の受け付けタイミングとに基づいてイベントの通知タイミングを決定し、リスナー登録リスト201上の対応するリスナーに通知を行なう。
Then, the
図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
図4Aは、リスナー登録リスト201を概念的に示すものである。リスナー登録リスト201は常時新しいリスナーの登録を受け付け可能な状態になっており、あるイベントの発行中に、同じイベントに対するリスナーが追加登録されることがある。このリスナーは、発行中のイベントに関与するリスナーと同じであってもよいし、異なるリスナーであってもよい。前者の場合は、発行中のイベントの通知がなされた後、同種のイベントが次回に発行されたときも同じリスナーに通知されることになるし、後者の場合は、次回に発行されるイベントが別のリスナーに通知される形になる。いずれにしろ、登録されるリスナーは、イベントの種別毎に通知要求のあった時系列順に順次登録され、先頭のものから順に対応するイベントの通知を受けることになる。
FIG. 4A conceptually shows the
ここで、リスナー登録リスト201上でリスナーを直接サーチしてイベント通知を実行する処理とした場合、あるイベントの発行途中に、そのイベントに対する新たなリスナーが追加されると、後で追加されたリスナーに対して、次回以降のイベントループ周期で本来通知したかったイベントが、現在発行中のイベントをカバーするイベントループのサーチ周期に偶然引っかかってしまい、望みのタイミングよりも早くイベント通知されてしまう不具合を生じうる。
Here, in the case of processing for performing event notification by directly searching for listeners on the
これを解決するために、本実施形態では、次のような方式が採用されている。すなわち、イベント処理オブジェクト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
あるイベントの発行中に、他のイベントに対するイベント通知要求がなされた場合、当該イベント通知要求を行なった通知先候補オブジェクト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 (
なお、インスタンス(種別)の異なるイベントが順次発行される場合でも、対応するリスナーへスムーズにイベント通知を行なうことができるようにするために、図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.
図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
なお、通知が完了したイベントに対応するリスナーは、通知実行用リスト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
しかし、あるイベントの同じリスナーへの通知頻度が高い場合については、その特定のリスナーを必要な期間だけ(あるいは永続的に)リスナー登録リスト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
次に、本実施形態では、リスナー登録リスト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
以下、調整ツール10を用いて実行プログラムを車両側に搭載する処理について説明する。該調整ツール10をコネクタ109により、図1Bに示す車両側のシリアル通信バス30に接続する。次いで、図1Cの調整ツール10のキーボード116から、実行プログラム搭載対象となる車両の特定情報を入力する。これにより、ROM115上にて当該車種に対応する補助リストが特定される。
Hereinafter, the process of mounting the execution program on the vehicle side using the
続いて解析ファームウェア123が立ち上がり、特定された補助リストのデータサイズに基づいてリスナー登録リストのRAM上の割当領域サイズが決定される。具体的には、図1Dに示すように、非コンパイル状態の補助リスト203上にてソースコードを解析することにより(図1Cの解析用作業領域131を利用する)、イベントリスナーの特定情報を示すデータ(Object 1、Object 2、‥)を抽出する。そして、抽出されたソースコードのコンパイル後のバイト数(つまり、補助リストのメモリ占有サイズ)を算出し、その算出値をリスナー登録リスト201のRAM上の割当領域サイズ(定数名:Rom Table Size)として決定する。
Subsequently, the
決定された割当領域サイズは、定数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
上記割当領域サイズの定義値が補完されることで、雛型プログラム123は対応する車種の実行プログラムとなる。次いでコンパイラ121を立ち上げ、コンパイル用領域134を用いて、該実行プログラムを機械語にコンパイルする。コンパイル済みの実行プログラムは、図1Bのシリアル通信バスを介して、対象となるECU40のフラッシュROM2Bに書き込まれ、実車搭載処理が終了する。
By complementing the definition value of the allocation area size, the
以下、本発明を車載用のセキュリティシステムに適用・展開した事例について説明する。図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
図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
図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
セキュリティセットが完了して、十分な時間をおいて侵入検知がなされ、かつ、ユーザーの携帯電話43への通知もいずれもうまくいった場合は、図6に示すように、イベントリスナーは矛盾なく動作し、いずれのイベント通知(セット完了あるいは侵入検知通知完了)も適正なタイミングでなされていることがわかる。
When security set is completed, intrusion detection is made after a sufficient amount of time, and both notifications to the user's
ところが、ユーザーの携帯電話43は、電源が切れていたり、話中であったり、あるいは電波の届かない場所にあった場合は無線接続不可であるから、これを用いたユーザーへの通知が失敗することがある。また、ユーザーが携帯電話43によりセキュリティセットした時点で、既に車両に賊が侵入していることもありえる。すると、図7に示すような不具合動作を生ずる。
However, when the user's
つまり、侵入検知装置42は、セキュリティセットされた時点で既に侵入検知も能動化されている状態にあるので、第一動作でのイベント通知は矛盾なく実行されるのに対し、そのあと切れ目なく侵入検知通知が侵入検知装置42から返ってくることになる。このとき、ユーザーの携帯電話43は、セキュリティセットのために車両側と電話がつながっている状態にあるから、車両側から侵入報知のためにユーザーに電話をかけようとしても「つながらない」状態となり、通知に失敗することになる。しかし、上記のイベントリスナーは、侵入検知を侵入検知装置42から受ければ、直ちに「通知完了」のイベント通知を行なってしまうので、ユーザーへの通知が実際には失敗していることと矛盾する。
In other words, since the
しかし、上記本実施形態の方式を採用することで、この問題は以下のように解消される(図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
図10に示すように、イベント処理オブジェクト103Cでは、前述のごとく、発行されたイベントに対応するリスナーを、リスナー登録リスト201から通知実行用リスト202に複写し、さらに、その通知実行用リスト202に複写されたリスナーが、補助リスト203に固定的に登録されているリスナーのどれかと一致した場合に、はじめて完了通知(イベント通知)を侵入検知装置42に返す(図9:(f)/図8:S6)。
As shown in FIG. 10, in the
その結果を示すシーケンス図が図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
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
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
Claims (13)
イベント生成オブジェクトが予め定められた実行状態となった場合に生成するイベントを取得して、これを現在有効なイベントとして発行するイベント管理オブジェクトと、
前記イベントの通知先候補オブジェクトからイベント通知要求を受け付けるイベント通知要求受付オブジェクトと、
前記イベント通知要求が受け付けられる毎に、当該イベント通知要求を行なった通知先候補オブジェクトをリスナーとして、前記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.
搭載先となる車両毎に個別に用意された前記補助リストを記憶する補助リスト記憶手段と、
搭載すべき車両の前記補助リストを前記補助リスト記憶手段上にて特定し、その補助リストのデータサイズに基づいて前記リスナー登録リストの前記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.
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)
| 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)
| 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 |
-
2006
- 2006-12-12 JP JP2006334833A patent/JP4618240B2/en not_active Expired - Fee Related
Patent Citations (6)
| 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)
| 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 |