JP4973844B2 - Object-oriented vehicle control device - Google Patents

Object-oriented vehicle control device Download PDF

Info

Publication number
JP4973844B2
JP4973844B2 JP2006253334A JP2006253334A JP4973844B2 JP 4973844 B2 JP4973844 B2 JP 4973844B2 JP 2006253334 A JP2006253334 A JP 2006253334A JP 2006253334 A JP2006253334 A JP 2006253334A JP 4973844 B2 JP4973844 B2 JP 4973844B2
Authority
JP
Japan
Prior art keywords
data
storage
class
medium
persistence
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.)
Expired - Fee Related
Application number
JP2006253334A
Other languages
Japanese (ja)
Other versions
JP2008077220A (en
Inventor
二郎 佐藤
裕次 小島
圭一 吉野
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 JP2006253334A priority Critical patent/JP4973844B2/en
Publication of JP2008077220A publication Critical patent/JP2008077220A/en
Application granted granted Critical
Publication of JP4973844B2 publication Critical patent/JP4973844B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明は、オブジェクト指向型車両用制御装置に関する。   The present invention relates to an object-oriented vehicle control device.

特開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, the difference in the hardware configuration of the devices involved in the control can be concealed inside the object constituting the software, and the independence of each control program can be enhanced 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 attributes for storing 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 content, assigns a specific value to the attribute, and a pointer to link to the method actually used among the methods described in the class It is created through procedures such as describing. 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.

オブジェクト指向システムでは、全ての情報がオブジェクトとしてモデリングされ、クラスとして記述される。そして、プログラムはそのクラスの集合体であり、各クラスから生成される多数のインスタンスが情報の実体を有することになる。この場合、問題になるのは、インスタンスは通常、ワークメモリ(RAM)上に生成されるものであり、プログラムが終了するとメモリ上からは消去されてしまう点である。そこで、作成したインスタンスが後に再利用できるよう、インスタンスの内容をファイル等の保存形式に変換して(不揮発性の)記憶媒体に保存することにより、プログラムが終了しても、必要なときにそのインスタンスをいつでも復元できるようにする機能が考え出されている。この機能のことを、インスタンスの永続化という。   In an object-oriented system, all information is modeled as an object and described as a class. A program is an aggregate of the classes, and a large number of instances generated from each class have information entities. In this case, the problem is that the instance is normally generated on the work memory (RAM) and is erased from the memory when the program ends. Therefore, by converting the contents of the instance into a storage format such as a file and saving it to a (non-volatile) storage medium so that the created instance can be reused later, even if the program ends, it can be A feature has been devised that allows an instance to be restored at any time. This function is called instance persistence.

前述のごとく、インスタンスの作成元となるクラスは、データが格納される属性の定義(「フィールド」という)と、その属性を使って実現する機能処理を記述したメソッドとより構築される。そして、このクラスのオブジェクトとしての状態を、フィールド上の変数に実際の値を格納する形で特定することによりインスタンスが作成される。「インスタンスの永続化」とは、そのオブジェクトとしての状態、すなわち属性のデータを保存することに他ならない。   As described above, the class from which the instance is created is constructed from the definition of the attribute in which data is stored (referred to as “field”) and the method describing the functional processing realized using the attribute. Then, an instance is created by specifying the state of this class as an object in the form of storing an actual value in a variable on the field. “Instance persistence” is nothing but saving an object state, that is, attribute data.

なお、属性は、例えば制御に使用するパラメータ等であって、そのパラメータ値が属性のデータの実体として把握される。しかし、画像や音声のデータファイル、データベースを構築するテキスト列、あるいはログデータなど、表示装置や印刷装置あるいは音声出力部などからなる出力デバイスへの出力処理対象となる受動的なデータ群についても、記憶媒体に書き込んで保存したり、あるいは出力のために読み出したりする処理は、基本的には、保存や書込といった媒体へのアクセスを司るクラスを用いて、オブジェクト指向的に実行される。従って、その保存ないし読出し処理のために、該データを組み込んだインスタンスが作成される点に変わりはなく、保存の実行によりインスタンスの永続化が行なわれているのである。   The attribute is, for example, a parameter used for control, and the parameter value is grasped as the substance of the attribute data. However, for passive data groups that are the target of output processing to output devices such as display devices, printing devices or audio output units, such as image data and audio data files, text strings that construct databases, or log data, The process of writing to and storing in a storage medium or reading out for output is basically executed in an object-oriented manner using a class that controls access to the medium such as storage and writing. Therefore, an instance in which the data is incorporated is created for the saving or reading process, and the instance is made permanent by executing the saving.

近年、自動車用の制御システムでは、記憶媒体として多数の不揮発性メモリが使用され、また、データの種類によってEEPROMやフラッシュメモリなど、種別の異なる不揮発性メモリが混在して使用されることも多くなってきている。例えば、EEPROMは比較的小容量であるがバイト単位で消去/書込の双方が可能であるのに対し、フラッシュメモリでは大容量ではあるもののバイト単位での書込みのみが可能であって、消去はそれより大きいブロック(セクタ)単位でしか実行できない、という違いがある。従って、例えば、前者は書換えが頻繁に生ずる制御パラメータの保存用に使用し、後者は画像データや大容量テキストデータの保存用に使用するなどの使い分けがなされていたのであるが、フラッシュメモリはアクセス速度がEEPROMよりも大きく、また価格の低廉化も進んでいるので、これまでEEPROMを使用していた分野においても、これをフラッシュメモリに転換する設計変更が実施される場合がある。他方、RAMの電源バックアップを考慮することにより、不揮発性メモリへのデータ格納を、RAM上でのデータ退避に変更したり、その逆を行なうような設計変更事例も考えられる。さらに、信頼性向上のため、1つのデータを複数の記憶媒体に冗長化して記憶する方式へ設計変更することも考えられる。   In recent years, many non-volatile memories are used as storage media in automobile control systems, and different types of non-volatile memories such as EEPROM and flash memory are often used depending on the type of data. It is coming. For example, an EEPROM has a relatively small capacity but can be erased / written in units of bytes, whereas a flash memory has a large capacity, but can only be written in units of bytes. There is a difference that it can only be executed in units of larger blocks (sectors). Therefore, for example, the former is used for storing control parameters that are frequently rewritten, and the latter is used for storing image data and large-capacity text data. Since the speed is higher than that of the EEPROM and the price is being reduced, a design change may be implemented in the field where the EEPROM has been used so far. On the other hand, considering the power backup of the RAM, there may be a design change example in which data storage in the nonvolatile memory is changed to data saving on the RAM or vice versa. Furthermore, it is conceivable to change the design to a system in which one data is stored redundantly in a plurality of storage media in order to improve reliability.

データ(インスタンス)の永続化を行なう場合、その保存先となる記憶媒体を指定しなければならないが、この保存先は従来、保存要求を行なうアプリケーション(以下、「アプリ」とも略記する)側で指定するようになっていた。そして、アプリケーション側では、図8に示すように、保存対象となるデータを自立的に取得して、自ら保存先となる媒体を決定し、各媒体に記憶依頼する形で対象となるデータを転送することとなる。しかし、この方式はアプリと記憶媒体とが密接に関係しているため、上記のように保存先の記憶媒体の種別が変更されると、その影響を非常に受けやすく、アプリの大幅な書換えが余儀なくされる場合がある。特に、不揮発性メモリが関与する設計変更の場合、記憶できるデータサイズや、消去可能単位が相違するために影響が特に大きい問題がある。   When persisting data (instance), it is necessary to specify the storage medium that is the storage destination, but this storage destination is conventionally specified by the application that makes the storage request (hereinafter also abbreviated as “app”). I was supposed to. Then, on the application side, as shown in FIG. 8, the data to be stored is acquired autonomously, the medium to be stored is determined by itself, and the data to be stored is transferred to each medium in the form of a storage request. Will be. However, since this method is closely related to the application and the storage medium, if the type of the storage medium is changed as described above, it will be very susceptible to significant changes in the application. You may be forced to do so. In particular, in the case of a design change involving a nonvolatile memory, there is a problem that the influence is particularly great because the data size that can be stored and the erasable unit are different.

本発明の課題は、記憶媒体の設計変更がなされた場合も、アプリケーションやデータへの影響を最小限に留めることができるオブジェクト指向型車両用制御システムを提供することにある。   An object of the present invention is to provide an object-oriented vehicle control system capable of minimizing the influence on applications and data even when the design of a storage medium is changed.

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

本発明のオブジェクト指向型車両用制御システムは、CPUを含んで構成され、CPUオブジェクト指向のプログラムを実行することにより、車載用電子機器を動作制御する車両用制御装置であって、上記の課題を解決するために該プログラムが、
動作制御に関与するアプリケーションクラスからの保存要求対象となるデータを自身のインスタンスとし、該自身のインスタンスを永続化保存するための保存要求をアプリケーションクラスから受け付けるための永続化インターフェースを実装し、保存要求を受けることにより、保存先となる記憶媒体を特定するために参照すべき情報である媒体特定参照情報を付与した形で、上記自身のインスタンスを保存用データに変換するための永続化対応データクラスと、
保存用データの保存先候補となる記憶媒体又は記憶媒体群に個別に対応する形で設けられ、保存要求を受けた保存用データを対応する記憶媒体に保存するための個別媒体管理クラスと、
永続化対応データクラスから受け渡される保存用データを、これに付与された媒体特定参照情報を参照することにより、データ保存先となる記憶媒体に対応する個別媒体管理クラスを選択し、その選択された個別媒体管理クラスに保存用データを受け渡すための永続化管理クラスと、を有することを特徴とする。
An object-oriented vehicle control system according to the present invention includes a CPU, and is a vehicle control device that controls the operation of an in-vehicle electronic device when the CPU executes an object-oriented program. The program to solve
Implement the persistence interface for accepting from the application class a save request for persisting and saving the instance of the data that is the target of the save request from the application class involved in operation control. Persistence-compatible data class for converting the above-mentioned instance into storage data in a form to which medium-specific reference information, which is information to be referred to in order to specify the storage medium that is the storage destination, is added. When,
An individual medium management class that is provided in a form that individually corresponds to a storage medium or storage medium group that is a storage destination candidate of storage data, and that stores storage data that has received a storage request in the corresponding storage medium;
Select the individual medium management class corresponding to the storage medium that is the data storage destination by referring to the medium specific reference information given to the storage data passed from the persistence-compatible data class. It was a persistent management class for passing data for storage in a separate media management class, and having a.

上記の構成によると、記憶媒体への保存処理に係るメソッドを、記憶媒体に個別に対応する個別媒体管理クラスに組み込み、他方、データを、その保存形態である保存用データに変換するメソッドを永続化対応データクラスに組み込んで、該永続化対応データクラスにアプリからのデータ保存依頼を受け付けるようにした。そして、変換された保存用データは、永続化管理クラスにより、保存用データに付与された媒体特定参照情報を参照して、対応する記憶媒体の個別媒体管理クラスに受け渡されるようにしたので、アプリから見てデータ保存先となる記憶媒体を、永続化対応データクラスにより隠蔽することができる。このことは、図8の従来方式と比較して、図7のごとく、アプリからみて記憶媒体と処理すべきデータとの関係が入れ替わることを意味する。その結果、アプリやデータ構造の影響をほとんど受けることなく、記憶媒体の仕様変更や交換に係る設計変更を実施することが可能となる。   According to the above configuration, the method related to the storage processing in the storage medium is incorporated into the individual medium management class individually corresponding to the storage medium, and on the other hand, the method for converting the data into the storage data that is the storage form is permanent. The data storage request from the application is received in the persistence-compatible data class. The converted storage data is transferred to the individual medium management class of the corresponding storage medium by referring to the medium specific reference information given to the storage data by the persistence management class. The storage medium that is the data storage destination when viewed from the application can be hidden by the persistence-compatible data class. This means that, as shown in FIG. 7, the relationship between the storage medium and data to be processed is switched as compared with the conventional method of FIG. As a result, it is possible to carry out design changes related to the specification change and exchange of the storage medium with almost no influence from the application or the data structure.

上記プログラムには、永続化管理クラスから保存用データの記憶媒体への書込要求を受け付けるためのデータ保存インターフェースを実装するとともに、個々の記憶媒体へのデータ保存メソッドを搭載したデータ管理クラスを設けることができる。この場合、各個別媒体管理クラスは、該データ管理クラスを継承するサブクラスとして構築することができる。記憶媒体の設計変更があった場合、このデータ管理クラスのメソッドを変更するだけでシステム変更に容易に対応することができる。 The above program, as well as implement the data storage interface for accepting a write request to the storage medium store data from the persistent management class, providing data management class equipped with data storage method to individual storage medium be able to. In this case, each individual medium management class can be constructed as a subclass that inherits the data management class. When there is a design change of the storage medium, it is possible to easily cope with a system change only by changing the method of this data management class.

次に、媒体特定参照情報はデータの種別を特定するデータ種別特定情報とすることができる。そして、データ種別特定情報が特定するデータ種別と個別媒体管理クラスとの対応関係を示す媒体/データ種別対応関係情報を予め用意し、永続化管理クラスを、該媒体/データ種別対応関係情報を参照することにより、保存用データの種別に対応した個別媒体管理クラスを選択して、これに保存用データを受け渡すためのものとして構築することができる。 Next, the medium specific reference information may be a data type specifying information specifying a type of data. Then, media / data type correspondence information indicating the correspondence between the data type specified by the data type identification information and the individual medium management class is prepared in advance, and the persistence management class is referred to the medium / data type correspondence information. by can select individual media management class corresponding to the type of data for storage, constructed as for passing stored data thereto.

上記の構成は、データの種別に応じて記憶先となる媒体の種別を間接的に特定することを意味する。記憶媒体種別を直接特定するものとして媒体特定参照情報を記述すると、記憶媒体種別の設計変更があったとき、この媒体特定参照情報の内容も変更しなければならないから、アプリ上でも最低限、該媒体特定参照情報を書き直す設計変更作業が必要となる。しかし、上記のごとく、媒体特定参照情報をデータ種別特定情報とすることで、記憶媒体種別の設計変更が生じた場合は、永続化管理クラス内で参照する媒体/データ種別対応関係を修正すればこと足り、アプリ側で取り扱うデータの種別に変更がない限り、媒体変更の影響がアプリに一切及ばなくなる。   The above configuration means that the type of the storage medium is indirectly specified according to the type of data. If the medium specific reference information is described as directly specifying the storage medium type, the contents of the medium specific reference information must be changed when there is a design change of the storage medium type. A design change work is required to rewrite the medium specific reference information. However, as described above, if the design change of the storage medium type occurs by using the medium specific reference information as the data type specific information, the medium / data type correspondence relationship referred to in the persistence management class should be corrected. As long as there is no change in the type of data handled by the app, the media change will not affect the app at all.

他方、永続化管理クラスは、媒体特定参照情報としてデータサイズ情報を参照し、データサイズ情報に応じてデータ保存先となる記憶媒体に対応する個別媒体管理クラスを選択し、保存用データをこれに受け渡すためのものとすることもできる。この方式でも、記憶先となる媒体の種別がデータのサイズに応じて間接的に特定される形になるので、媒体変更の影響が同様にアプリに及ばない。この方式は、もちろん、データの種別に応じて記憶先となる媒体の種別を間接的に特定する方式と併用することが可能である。 On the other hand, the persistence management class refers to the data size information as the medium specific reference information, selects the individual medium management class corresponding to the storage medium as the data storage destination according to the data size information, and sets the storage data to this. It can also be for delivery. Even in this method, since the type of the storage medium is indirectly specified according to the data size, the influence of the medium change does not affect the application as well. Of course, this method can also be used in combination with a method for indirectly specifying the type of the storage medium according to the type of data.

前述のごとく、記憶媒体として、仕様の互いに異なる不揮発性メモリが指定されている場合に本発明の効果発現の寄与が大である。永続化管理クラスは、例えば、データが、アプリケーションクラスの状態を示す変数の設定値を含んだ状態データである場合に、不揮発性メモリの一つであるEEPROMに対応づけられた個別媒体管理クラスを選択し、データが画像データである場合に、不揮発性メモリの一つであるフラッシュメモリに対応付けられた個別媒体管理クラスを選択するためのものとすることができる。属性は多くの場合パラメータ値であり、容量が比較的小さく、また高頻度の書換えに柔軟に対応できるEEPROMへの保存が好適である。 As described above, when non-volatile memories having different specifications are designated as the storage medium, the contribution of the effects of the present invention is significant. For example, when the data is state data including a setting value of a variable indicating the state of the application class, the persistent management class is an individual medium management class associated with an EEPROM which is one of the nonvolatile memories. selected, when data is image data, can be used to select individual media management class associated with the flash memory which is one of the non-volatile memory. In many cases, the attribute is a parameter value, the capacity is relatively small, and it is preferable that the attribute is stored in an EEPROM that can flexibly cope with frequent rewriting.

この場合、永続化管理クラスは、データが、予め定められた重要データである場合に、状態データ用のEEPROMとは別のEEPROMを選択するためのものとしておくと、重要データを独立したEEPROMに保存できるので、異なるセキュリティレベルの設定にも柔軟に対応できる。また、データが、通信ログ又は機器の動作ログからなるログデータである場合には、時系列的な多量のデータ保存要求がなされるので、画像データ用のフラッシュメモリとは別のフラッシュメモリを選択するためのものとしておけば便利である。 In this case, persistence management class data, if it is important predetermined data, when the EEPROM for status data previously assumed to select another EEPROM, a separate EEPROM important data Since it can be saved, it can flexibly support different security level settings. Also, if the data is log data consisting of communication logs or device operation logs, a large amount of data storage requests are made in time series, so select a flash memory that is different from the image data flash memory. it is convenient if you and meant to be.

永続化対応データクラスは、保存用データを一義的に特定するための識別IDを、自身のインスタンスを格納するアドレスから生成し、当該識別IDを付与した形で該保存用データを永続化管理クラスに受け渡すためのものとすることができる。また、個別媒体管理クラスは、該永続化管理クラスから受け渡された保存用データを、識別IDを付与した形で対応する記憶媒体に書き込むためのものとすることができる。 The persistence-compatible data class generates an identification ID for uniquely specifying storage data from an address storing its own instance, and stores the storage data in a form to which the identification ID is assigned. Can be for delivery to . Further, the individual medium management class can be used for writing the storage data transferred from the permanent management class to the corresponding storage medium with an identification ID.

上記のごとく、永続化対応データクラスの、保存要求対象となるデータを含んだインスタンスの格納先を示すアドレスから、保存用データの識別IDを一義的に作成し、その識別IDを付けて対応する記憶媒体に保存することで、復元時にも、そのアドレス(これは、プログラムが終了しても消滅することがない)から、復元すべき保存用データの識別IDを容易に特定でき、データ読出し・復元時の便宜を図ることができる。   As described above, the storage data identification ID is uniquely created from the address indicating the storage destination of the instance including the data to be saved in the persistence-compatible data class, and the identification ID is added to correspond. By saving the data in the storage medium, the identification ID of the data to be restored to be restored can be easily specified from the address (this does not disappear even when the program is terminated) at the time of restoration. Convenience at the time of restoration can be achieved.

次に、永続化対応データクラスは、自身のインスタンスをシリアライズするためのシリアライズインターフェースを実装し、そのシリアライズされたデータを保存用データとして永続化管理クラスに受け渡すためのものとして構成できる。これにより、比較的複雑な構造のデータであってもシリアライズにより単純なバイト列構造を有したデータに変換でき、記憶媒体上での保存処理を大幅に簡略化することができる。シリアライズに特に適したデータは、アプリケーションクラスの状態を示す変数の設定値を含んだ状態データである。 Next, persistent corresponding data class implements the serialization interface for serializing an instance of itself, it can be configured as for passing the persistence management class the serialized data as save data. As a result, even data with a relatively complicated structure can be converted into data having a simple byte string structure by serialization, and the storage process on the storage medium can be greatly simplified. Data that is particularly suitable for serialization is state data that includes a setting value of a variable indicating the state of the application class.

なお、データが予め定められたサイズを超過しているか、又は、予めシリアライズが完了しているデータは、永続化対応データクラスにおいて、シリアライズインターフェースによるシリアライズ処理を実行せずに保存用データに変換することが効率的である。特に、画像データは、元からバイト列データとして記述されており、シリアライズが完了しているデータに該当し、サイズも大きいので、一律なシリアライズ処理を回避してそのまま保存用データとすることで、処理効率を高めることができる。   Data that exceeds the predetermined size or has already been serialized is converted to data for storage in the persistence-compatible data class without executing serialization processing by the serialization interface. Is efficient. In particular, the image data is originally described as byte string data, corresponds to data that has been serialized, and has a large size, so by avoiding uniform serialization processing as it is as storage data, Processing efficiency can be increased.

次に、データ読出し(復元時)を考慮した構成として、次のようなものが可能である。すなわち、永続化インターフェースは、既に保存されている保存用データを読み出してインスタンスに復元する復元要求を、前記自身のインスタンスを特定可能な形でアプリケーションクラスから受け付けるためのものとすることができる。永続化管理クラスは、保存されている保存用データを特定する識別IDの一覧を、保存先となる記憶媒体が特定可能な形で記憶する保存リストを有するとともに、受け付けた復元要求が特定する上記アドレスに基づいて識別IDを特定し、さらに、当該識別IDを保存リスト上で検索して保存先の記憶媒体を特定し、特定された記憶媒体に対応する個別媒体管理クラスに該識別IDを受け渡すためのものとすることができる。各個別媒体管理クラスは、受け取った識別IDに対応する保存用データを対応する記憶媒体から読み出して、永続化管理クラスを経て永続化対応データクラスに該保存用データを受け渡すためのものとすることができる。永続化対応データクラスは該保存用データを自身のインスタンスに復元するためのものとすることができる。 Next, as a configuration considering data reading (restoring), the following is possible. In other words, persistence interface, already a restoring request for restoring the instance reads the storage data stored can be made to accept the application class instance of the own identifiable form. The persistence management class has a save list for storing a list of identification IDs for specifying saved save data in a form that can be specified by a storage medium as a save destination, and the above-described restoration request specifies The identification ID is specified based on the address, and further, the storage ID of the storage destination is specified by searching the identification list on the storage list, and the identification ID is received by the individual medium management class corresponding to the specified storage medium. Can be for passing. Each individual media management class, the saved data corresponding to the identification ID received is read from the corresponding storage medium, and intended for passing the saved data to the persistent corresponding data classes through persistence management class be able to. Persistence corresponding data classes can be used to recover the data for the storage in its own instance.

永続化管理クラスに設ける保存リストは、保存先となる記憶媒体を直接特定する形で作成してもよいし、前述のごとく、記憶媒体(又は記憶媒体群)と一義的に対応付けられたデータ種別により、間接特定する形で作成してもよい。例えば、後者の場合、データ復元時には、保存要求対象データのインスタンスを格納するアドレスとデータ種別の特定情報とをアプリ側から取得し、対応する保存リストにて、そのアドレスから作られた識別IDを検索する。これにより、その識別IDにて保存されている記憶媒体を速やかに特定することができ、保存用データの読出し及び復元をスムーズに実施することが可能となる。なお、シリアライズされた保存用データを復元するために、シリアライズインターフェースは、復元時にシリアライズされた保存用データをデシリアライズするためのものとして構成しておく必要がある。 The storage list provided in the persistence management class may be created by directly specifying the storage medium that is the storage destination, or as described above, data uniquely associated with the storage medium (or storage medium group). Depending on the type, it may be created indirectly. For example, in the latter case, at the time of data restoration, an address for storing an instance of the storage request target data and specific information of the data type are acquired from the application side, and an identification ID created from the address in the corresponding storage list is obtained. Search for. As a result, the storage medium stored with the identification ID can be quickly identified, and the storage data can be read and restored smoothly. In order to recover the serialized storage data, serialized interface, it is necessary to structure as to deserialize data for storage that is serialized during a restore.

以下、本発明の実施の形態を、図面を参照して説明する。
図1は、本発明のオブジェクト指向型車両用制御システムにおける制御主体40の構成を、オブジェクト指向プラットフォームの観点から概念的に示す図である。本実施形態では、制御主体40は、Javaで記述されたプログラムに基づく情報処理を実行する演算処理装置として構成されている。プログラム実行装置1は、Javaによるバイトコードを実行する回路が組み込まれた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 this embodiment, the control subject 40 is configured as an arithmetic processing device that executes information processing based on a program described in Java. The program execution device 1 is a CPU in which a circuit for executing bytecode by Java 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, and for example, a CPU group connected by an in-vehicle network such as a CAN (Controller Area Network) may be used.

前記プログラムデータ領域6には、Javaのソースプログラムよりコンパイルされたバイトコードのプログラムが格納される(以下、1アドレス分のプログラムを「プログラムデータ」という)。検索用テーブル領域7には、メソッドの呼出し時に、呼び出されたメソッドが格納されている場所を検索するために、図示しないクラステーブルやメソッドテーブルなどが格納される。   The program data area 6 stores a byte code program compiled from a Java 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.

制御主体40の実行プログラムは、上記オブジェクト指向プラットフォーム上に構築されるものである。図2は、そのプログラムの構成を示すUML(Unified Modeling Language)表記に従ったクラス図である。該プログラムは、次のようなオブジェクトによって構成されている。
・永続化対応データクラス101C:動作制御に関与するアプリケーションクラス106Cからの保存要求対象となるデータを自身のインスタンスとし、該自身のインスタンスを永続化保存するための保存要求をアプリケーションクラス106Cから受け付ける永続化インターフェース101Kを実装し、上記保存要求を受けることにより、保存先となる記憶媒体を特定するために参照すべき情報である媒体特定参照情報を付与した形で、データを保存用データに変換する。
・個別媒体管理クラス103C,104C:保存用データの保存先候補となる記憶媒体又は記憶媒体群に個別に対応する形で設けられ、保存要求を受けた保存用データを対応する記憶媒体に保存する。
・永続化管理クラス102C:続化対応データ変換処理クラス101Cから受け渡される保存用データを、これに付与された媒体特定参照情報を参照することにより、データ保存先となる記憶媒体に対応する個別媒体管理クラス103C,104Cを選択し、その選択された個別媒体管理クラス103C,104Cに保存用データを受け渡す。
The execution program of the control subject 40 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.
Persistence-compatible data class 101C: Persistence for accepting a storage request for persisting and saving the instance from the application class 106C as data to be saved from the application class 106C involved in operation control. When the storage interface 101K is implemented and the above storage request is received, the data is converted into the storage data in a form to which the medium specifying reference information that is the information to be referred to in order to specify the storage medium as the storage destination is added. .
Individual medium management classes 103C and 104C: provided in a form that individually corresponds to a storage medium or storage medium group that is a storage destination candidate for storage data, and stores storage data that has received a storage request in the corresponding storage medium .
Persistence management class 102C: individual data corresponding to a storage medium serving as a data storage destination by referring to the medium-specific reference information attached to the storage data delivered from the continuation correspondence data conversion processing class 101C The medium management classes 103C and 104C are selected, and the storage data is transferred to the selected individual medium management classes 103C and 104C.

・データ管理クラス105C:永続化管理クラス102Cから保存用データの記憶媒体への書込要求を受け付けるデータ保存インターフェース105Iを実装するとともに、個々の記憶媒体へのデータ保存メソッドを搭載する。各個別媒体管理クラス103C,104Cは、該データ管理クラス105Cを継承するサブクラスとして構築されている。 Data management class 105C: A data storage interface 105I that accepts a write request to the storage medium for storage data from the persistence management class 102C is mounted, and a data storage method for each storage medium is mounted. Each of the individual medium management classes 103C and 104C is constructed as a subclass that inherits the data management class 105C.

上記構成において、記憶媒体への保存処理に係るメソッドは、記憶媒体に個別に対応する個別媒体管理クラス103C,104Cに組み込まれている。また、データを、その保存形態である保存用データに変換するメソッドは、永続化対応データクラス101Cに組み込まれている。そして、該永続化対応データクラス101Cがアプリからのデータ保存依頼を受け付ける。変換された保存用データは、永続化管理クラス102Cにより、保存用データに付与された媒体特定参照情報を参照して、対応する記憶媒体の個別媒体管理クラス103C,104Cに受け渡される。その結果、アプリから見てデータ保存先となる記憶媒体は、永続化対応データクラス101Cにより隠蔽される。   In the above configuration, the method related to the storage processing in the storage medium is incorporated in the individual medium management classes 103C and 104C individually corresponding to the storage medium. In addition, a method for converting data into storage data that is a storage form is incorporated in the persistence-compatible data class 101C. Then, the persistence-compatible data class 101C accepts a data storage request from the application. The converted storage data is transferred to the individual medium management classes 103C and 104C of the corresponding storage medium by referring to the medium specifying reference information given to the storage data by the persistence management class 102C. As a result, the storage medium that is the data storage destination when viewed from the application is hidden by the persistence-compatible data class 101C.

その結果、アプリやデータ構造の影響をほとんど受けることなく、記憶媒体の仕様変更や交換に係る設計変更を実施することが可能となる(例えば、EEPROM、フラッシュメモリ、RAM及び通信接続された他の制御主体(ECU)の間での相互転換など)。また、副次的な効果として、記憶媒体の二重化(例えば、フラッシュメモリの記憶領域を二重化したり、RAM上にバックアップ領域を追加するなど)など、データ信頼性向上のための冗長化に係る設計変更にも容易に対応することができる。   As a result, it is possible to carry out design changes related to specification changes and exchanges of storage media with little influence from applications or data structures (for example, EEPROM, flash memory, RAM and other communication-connected other devices). Mutual conversion between control bodies (ECUs)). In addition, as a secondary effect, design related to redundancy for improving data reliability, such as duplication of storage media (for example, duplication of storage area of flash memory, addition of backup area on RAM, etc.) Changes can be easily accommodated.

媒体特定参照情報は、具体的には、図3に示すごとく、データの種別を特定するデータ種別特定情報とされている。そして、データ種別特定情報が特定するデータ種別と個別媒体管理クラス103C,104Cとの対応関係を示す媒体/データ種別対応関係情報が用意されている。図2の永続化管理クラス102Cは、該媒体/データ種別対応関係情報を参照することにより、保存用データの種別に対応した個別媒体管理クラス103C,104Cを選択して、これに保存用データを受け渡すものとして構築されている。なお、データ種別は、例えば、アプリ側でデータの保存/復元に使用するクラスの属性等から特定できるが、これに限られるものではない。例えば、保存要求対象データのインスタンスを格納するアドレスを、永続化管理クラスが有する、該当するデータ種別に対応付けられた配列(後述の保存リスト保存リスト200A〜200D:例えば、画像データリストあるいは通常データリスト)に登録することによって、データの種別を特定するように構成することも可能である。   Specifically, the medium specifying reference information is data type specifying information for specifying the type of data as shown in FIG. Then, medium / data type correspondence information indicating the correspondence between the data type specified by the data type specifying information and the individual medium management classes 103C and 104C is prepared. The persistent management class 102C in FIG. 2 selects the individual medium management classes 103C and 104C corresponding to the type of the storage data by referring to the medium / data type correspondence relationship information, and stores the storage data in this. It is built to be handed over. Note that the data type can be specified from, for example, an attribute of a class used for saving / restoring data on the application side, but is not limited thereto. For example, an array for storing an instance of the storage request target data corresponding to the corresponding data type of the persistence management class (a storage list storage list 200A to 200D described later: for example, an image data list or normal data) It is also possible to configure so as to specify the type of data by registering in the list.

記憶媒体としては、仕様の互いに異なる不揮発性メモリ、具体的にはEEPROM(記憶媒体α、記憶媒体γ)とフラッシュメモリ(記憶媒体δ、記憶媒体ε:図では「flash」と表示している)、及び補助的にRAM(記憶媒体β)が使用されている。永続化管理クラス102Cは、データが、アプリケーションクラス106Cの状態を示す変数の設定値を含んだ状態データ(以下、通常データという)である場合に、EEPROM2に対応づけられた個別媒体管理クラス104C(具体的には、図2において、そのインスタンス104J(図3のデータ管理2))を選択する。また、データが画像データである場合は、フラッシュメモリ2に対応付けられた個別媒体管理クラス103C(具体的には、図2において、そのインスタンス103J(図3のデータ管理4))を選択する。   As the storage medium, nonvolatile memories having different specifications, specifically, EEPROM (storage medium α, storage medium γ) and flash memory (storage medium δ, storage medium ε: indicated as “flash” in the figure) In addition, an auxiliary RAM (storage medium β) is used. The persistent management class 102C is an individual medium management class 104C (corresponding to the EEPROM 2) when the data is state data including a setting value of a variable indicating the state of the application class 106C (hereinafter referred to as normal data). Specifically, in FIG. 2, the instance 104J (data management 2 in FIG. 3)) is selected. If the data is image data, the individual medium management class 103C (specifically, the instance 103J (data management 4 in FIG. 3) in FIG. 2) associated with the flash memory 2 is selected.

データが、セキュリティ保護対象として定められた重要データ(本実施形態では、個人情報等を含む契約データ)である場合には、状態データ用のEEPROM1とは別のEEPROM2に対応づけられた個別媒体管理クラス103C(具体的には、図2において、そのインスタンス104J(図3のデータ管理1))を選択するまた、データが、通信ログ又は機器の動作ログからなるログデータである場合には、画像データ用のフラッシュメモリ2とは別のフラッシュメモリ1に対応付けられた個別媒体管理クラス103C(具体的には、図2において、そのインスタンス103J(図3のデータ管理3))を選択する。   When the data is important data defined as a security protection target (in this embodiment, contract data including personal information, etc.), individual medium management associated with an EEPROM 2 different from the status data EEPROM 1 The class 103C (specifically, the instance 104J (data management 1 in FIG. 3) in FIG. 2) is selected. If the data is log data including a communication log or an operation log of the device, an image is displayed. The individual medium management class 103C (specifically, the instance 103J (data management 3 in FIG. 3) in FIG. 2) associated with the flash memory 1 different from the data flash memory 2 is selected.

永続化対応データクラス101Cは、図4に示すように、保存用データを一義的に特定するための識別IDを、自身のインスタンスを格納するアドレス(図では、「永続化データ格納アドレス」と表示している)から生成する。識別IDは、例えば上記アドレスと一致させることもできるし、元のアドレスへの一義的な復元が可能なデータ加工処理(演算あるいは識別ビット付加など)を施したりする形で作成することができる。いずれにしろ、該アドレスを参照すれば識別IDを、また識別IDを参照すればアドレスをそれぞれ特定できる。   As shown in FIG. 4, the persistence-compatible data class 101C displays an identification ID for uniquely specifying storage data as an address for storing its own instance (in the figure, “persistent data storage address”). Is generated). The identification ID can be made to coincide with, for example, the above address, or can be created in such a manner that data processing (such as calculation or addition of an identification bit) that can be uniquely restored to the original address is performed. In any case, the identification ID can be specified by referring to the address, and the address can be specified by referring to the identification ID.

そして、その識別IDを付与した形で該保存用データを永続化管理クラス102Cに受け渡す。また、個別媒体管理クラス103C,104Cは、該永続化管理クラス102Cから受け渡された保存用データを、識別IDを付与した形で対応する記憶媒体の開いているアドレスに書き込む。   Then, the storage data is transferred to the persistence management class 102C with the identification ID. Further, the individual medium management classes 103C and 104C write the storage data transferred from the permanent management class 102C to the open address of the corresponding storage medium in a form to which the identification ID is given.

図2に戻り、永続化対応データクラス101Cは、自身のインスタンスをシリアライズするためのシリアライズインターフェース101Iを実装し、図3に示すごとく、そのシリアライズされたデータを保存用データとして永続化管理クラス102Cに受け渡す。シリアライズインターフェース101Iは、シリアライズ時のデータサイズを取得するメソッド、及びシリアライズされた保存用データをデシリアライズするメソッドも有する。   Returning to FIG. 2, the persistence-supporting data class 101C implements the serialization interface 101I for serializing its own instance, and the serialized data is stored in the persistence management class 102C as storage data as shown in FIG. Deliver. The serialization interface 101I also has a method for acquiring the data size at the time of serialization and a method for deserializing the serialized storage data.

シリアライズに特に適したデータは、アプリケーションクラス106Cの状態を示す変数の設定値を含んだ状態データ(通常データ)である。ただし、データが予め定められたサイズを超過しているか、又は、予めシリアライズが完了しているデータ、具体的には、本実施形態における画像データは、元からバイト列データとして記述されており、シリアライズが完了しているので、永続化対応データクラス101Cにおいて、シリアライズインターフェース101Iによるシリアライズ処理は実行されない。   Data particularly suitable for serialization is state data (normal data) including a setting value of a variable indicating the state of the application class 106C. However, data that exceeds a predetermined size or data that has been serialized in advance, specifically, the image data in the present embodiment is originally described as byte string data, Since serialization has been completed, serialization processing by the serialization interface 101I is not executed in the persistence-compatible data class 101C.

図2に示すごとく、画像データの保存処理自体も、永続化対応データクラスから作成され当該画像データを組み込んだインスタンスに従って実行され、該画像データもまた、そのインスタンスの格納アドレスから作成された識別IDを付与されて保存用データに変換される。上記のごとく、永続化インターフェースにおいて該画像データへの参照を渡すことにより、シリアライズインターフェース101Iを使用せずに対応する記憶媒体へ保存することが可能となる。   As shown in FIG. 2, the image data saving process itself is also executed according to the instance created from the persistence-compatible data class and incorporating the image data, and the image data is also created from the storage address of the instance. Is given and converted to data for storage. As described above, by passing a reference to the image data in the permanent interface, it is possible to save the image data in a corresponding storage medium without using the serialized interface 101I.

永続化インターフェース101Kは、既に保存されている保存用データを読み出してインスタンスに復元する復元要求を、対応するインスタンスの格納アドレスを特定可能な形でアプリケーションクラス106Cから受け付ける(この他、保存用データの削除要求も受付可能である)。永続化管理クラス102Cは、図6に示すように、保存されている保存用データを特定する識別IDの一覧を、保存先となる記憶媒体が特定可能な形で記憶する保存リスト200A〜200Dを有する。ここでは、記憶媒体種別は、データ種別により間接的に特定可能となっている(図2では、保存リストとして、画像データリスト(200D)と通常データリスト(200B)のみ示し、他を省略して描いている)。   The persistence interface 101K receives from the application class 106C a restore request for reading the saved data that has already been saved and restoring it to the instance from the application class 106C in such a manner that the storage address of the corresponding instance can be specified (in addition, the save data Delete requests can also be accepted). As illustrated in FIG. 6, the persistence management class 102 </ b> C stores save lists 200 </ b> A to 200 </ b> D that store a list of identification IDs that specify stored data for storage in a form that can be specified by a storage medium that is a storage destination. Have. Here, the storage medium type can be indirectly specified by the data type (in FIG. 2, only the image data list (200D) and the normal data list (200B) are shown as the save list, and others are omitted. Drawing).

そして、受け付けた復元要求が特定する上記アドレスに基づいて識別IDを特定し、さらに、当該識別IDを図6の保存リスト200A〜200D上で検索してデータ種別を特定して、その特定されたデータ種別に対応する個別媒体管理クラス103C,104Cに該識別IDを受け渡す。このとき、識別IDとともにデータ種別の特定情報も受け渡すことで、図6の対応するデータ種別の保存リスト上で検索を行なえばよい。   Then, an identification ID is specified based on the address specified by the received restoration request, and further, the identification ID is searched on the storage lists 200A to 200D in FIG. The identification ID is transferred to the individual medium management classes 103C and 104C corresponding to the data type. At this time, it is only necessary to perform a search on the corresponding data type storage list in FIG. 6 by passing the identification information together with the identification ID.

各個別媒体管理クラス103C,104Cは、受け取った識別IDに対応する保存用データを、自身に対応する記憶媒体から読み出して、永続化管理クラス102Cを経て永続化対応データクラス101Cに該保存用データを受け渡す。永続化対応データクラス101Cは、該保存用データ(例えば、シリアライズ処理されたデータ)を元のインスタンスに復元する(なお、シリアライズ処理が実施されていないデータは、復元時のデシリアライズは当然省略される)。   Each of the individual medium management classes 103C and 104C reads storage data corresponding to the received identification ID from the storage medium corresponding to the individual medium management class 103C and 104C, and stores the storage data in the persistence support data class 101C via the persistence management class 102C. Hand over. The persistence-compatible data class 101C restores the storage data (for example, serialized data) to the original instance (note that deserialization at the time of restoration is naturally omitted for data that has not been serialized) )

図5は、データ保存時及び復元時の各シーケンスを示すものである。まず、アプリケーションクラス106Cは、永続化インターフェース101Kを介して永続化対応データクラス101C(ここでは、自身のインスタンスとして画像データのインスタンスが作成されているものとする)にデータ保存又は復元の要求を出す。永続化対応データクラス101Cは、永続化管理クラス102Cにそのインスタンスの保存ないし復元の処理を要求する。永続化管理クラス102Cは、データのシリアライズ化が必要かどうかを判定し、必要な場合はシリアライズ又はデシリアライズを永続化対応データクラス101Cに要求し、対応するデータ変換を実施させ、さらに対応する記憶媒体への書込ないし読出しを要求する。   FIG. 5 shows each sequence at the time of data storage and restoration. First, the application class 106C issues a data storage or restoration request to the persistence-compatible data class 101C (here, an instance of image data is created as its own instance) via the persistence interface 101K. . The persistence corresponding data class 101C requests the persistence management class 102C to save or restore the instance. The persistence management class 102C determines whether data serialization is necessary. If necessary, the persistence management class 102C requests serialization or deserialization from the persistence-compatible data class 101C, causes corresponding data conversion to be performed, and corresponding memory Request to write to or read from the medium.

本発明のオブジェクト指向型車両用制御システムにおける制御主体の構成を、オブジェクト指向プラットフォームの観点から概念的に示す図。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. 図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. システムのソフトウェアとハードウェアとの関係を示す概念ブロック図。The conceptual block diagram which shows the relationship between the software of a system, and hardware. データシリアライズと記憶媒体保存/読出しの流れを示す概念図。The conceptual diagram which shows the flow of data serialization and storage medium preservation | save / reading. 図2に対応するシーケンス図。FIG. 3 is a sequence diagram corresponding to FIG. 2. 保存リストの概念図。The conceptual diagram of a preservation | save list. 本発明におけるオブジェクト間の情報の流れを示す概念ブロック図。The conceptual block diagram which shows the flow of the information between the objects in this invention. 従来例におけるオブジェクト間の情報の流れを示す概念ブロック図。The conceptual block diagram which shows the flow of the information between the objects in a prior art example.

符号の説明Explanation of symbols

1 プログラム実行装置(CPU)
40 制御主体
101C 永続化対応データクラス
101K 永続化インターフェース
101I シリアライズインターフェース
102C 永続化管理クラス
103C,104C 個別媒体管理クラス
105I データ保存インターフェース
106C アプリケーションクラス
1 Program execution device (CPU)
40 Control subject
101C Persistence compatible data class 101K Persistence interface 101I Serialization interface 102C Persistence management class 103C, 104C Individual media management class 105I Data storage interface 106C Application class

Claims (14)

CPUを含んで構成され、前記CPUオブジェクト指向のプログラムを実行することにより、車載用電子機器を動作制御する車両用制御装置であって、前記プログラムが、
前記動作制御に関与するアプリケーションクラスからの保存要求対象となるデータを自身のインスタンスとし、該自身のインスタンスを永続化保存するための保存要求を前記アプリケーションクラスから受け付けるための永続化インターフェースを実装し、前記保存要求を受けることにより、保存先となる記憶媒体を特定するために参照すべき情報である媒体特定参照情報を付与した形で、前記自身のインスタンスを保存用データに変換するための永続化対応データクラスと、
前記保存用データの保存先候補となる記憶媒体又は記憶媒体群に個別に対応する形で設けられ、保存要求を受けた前記保存用データを対応する記憶媒体に保存するための個別媒体管理クラスと、
前記永続化対応データクラスから受け渡される前記保存用データを、これに付与された前記媒体特定参照情報を参照することにより、データ保存先となる記憶媒体に対応する前記個別媒体管理クラスを選択し、その選択された個別媒体管理クラスに前記保存用データを受け渡すための永続化管理クラスと、
有することを特徴とするオブジェクト指向型車両用制御装置。
Is configured to include a CPU, the CPU executes the object-oriented program, a vehicle control device that controls the operation of in-vehicle electronics, said program,
Implementing a persistence interface for accepting from the application class a storage request for persistently storing the instance of the data as a target of the storage request from the application class involved in the operation control, Persistence for converting the own instance into storage data in a form to which medium specifying reference information, which is information to be referred to in order to specify a storage medium as a storage destination, is given by receiving the storage request Corresponding data class,
An individual medium management class provided to individually correspond to a storage medium or a storage medium group that is a storage destination candidate of the storage data, and for storing the storage data that has received a storage request in the corresponding storage medium; ,
Select the individual medium management class corresponding to the storage medium that is the data storage destination by referring to the medium specific reference information given to the storage data delivered from the persistence-compatible data class. A persistent management class for passing the storage data to the selected individual medium management class;
An object-oriented vehicle control device comprising:
前記プログラムは、前記永続化管理クラスから前記保存用データの前記記憶媒体への書込要求を受け付けるためのデータ保存インターフェースを実装するとともに、個々の記憶媒体へのデータ保存メソッドを搭載したデータ管理クラスを有し、
各前記個別媒体管理クラスは、該データ管理クラスを継承するサブクラスとして構築されている請求項1記載のオブジェクト指向型車両用制御装置。
The program implements a data storage interface for accepting a write request to the storage medium from the persistence management class and stores a data storage method for each storage medium. Have
Each said individual media management class, object-oriented vehicle control device according to claim 1, wherein is built as a subclass to inherit the data management class.
前記媒体特定参照情報は前記データの種別を特定するデータ種別特定情報であり、
前記データ種別特定情報が特定するデータ種別と前記個別媒体管理クラスとの対応関係を示す媒体/データ種別対応関係情報が予め用意されており、
前記永続化管理クラスは、該媒体/データ種別対応関係情報を参照することにより、前記保存用データの種別に対応した個別媒体管理クラスを選択して、これに前記保存用データを受け渡すためのものである請求項1又は請求項2に記載のオブジェクト指向型車両用制御装置。
The medium specific reference information is a data type specifying information for specifying a type of the data,
Medium / data type correspondence information indicating the correspondence between the data type specified by the data type specifying information and the individual medium management class is prepared in advance.
The persistence management class, by reference to the medium / data category correspondence information, said select individual media management class corresponding to the type of data for storage, the storage data received passes for thereto object-oriented vehicle control device according to claim 1 or claim 2 is intended.
前記永続化管理クラスは、前記媒体特定参照情報としてデータサイズ情報を参照し、前記データサイズ情報に応じてデータ保存先となる記憶媒体に対応する前記個別媒体管理クラスを選択し、前記保存用データをこれに受け渡すためのものである請求項1ないし請求項3のいずれか1項に記載のオブジェクト指向型車両用制御装置。 The persistence management class refers to data size information as the medium specifying reference information, selects the individual medium management class corresponding to a storage medium serving as a data storage destination according to the data size information , and stores the storage data object-oriented vehicle control apparatus according to any one of claims 1 to 3 is intended for passing on this. 前記記憶媒体として、仕様の互いに異なる不揮発性メモリが指定されている請求項1ないし請求項4のいずれか1項に記載のオブジェクト指向型車両用制御装置。   The object-oriented vehicle control device according to any one of claims 1 to 4, wherein non-volatile memories having different specifications are designated as the storage medium. 前記永続化管理クラスは、前記データが、前記アプリケーションクラスの状態を示す変数の設定値を含んだ状態データである場合に、前記不揮発性メモリの一つであるEEPROMに対応づけられた前記個別媒体管理クラスを選択し、前記データが画像データである場合に、前記不揮発性メモリの一つであるフラッシュメモリに対応付けられた前記個別媒体管理クラスを選択するためのものである請求項5記載のオブジェクト指向型車両用制御装置。 When the data is state data including a setting value of a variable indicating the state of the application class, the persistent management class is the individual medium associated with an EEPROM which is one of the nonvolatile memories. select a management class, the data in the case of image data, according to claim 5, wherein is used for selecting the individual media management class associated with the flash memory which is one of the non-volatile memory An object-oriented vehicle control device. 前記永続化管理クラスは、前記データが、予め定められた重要データである場合に、前記状態データ用のEEPROMとは別のEEPROMを選択するためのものである請求項6記載のオブジェクト指向型車両用制御装置。 The persistence management class, the data previously in the case of important data defined, the state object oriented vehicle according to claim 6, wherein the EEPROM of the data is for selecting a different EEPROM Control device. 前記永続化管理クラスは、前記データが、通信ログ又は機器の動作ログからなるログデータである場合に、前記画像データ用のフラッシュメモリとは別のフラッシュメモリを選択するためのものである請求項6又は請求項7に記載のオブジェクト指向型車両用制御装置。 The persistence management class, the data is, if a log data consisting of operation logs of the communication log or equipment, according to claim flash memory for the image data is for selecting a different flash memory The object-oriented vehicle control device according to claim 6 or 7. 前記永続化対応データクラスは、前記保存用データを一義的に特定するための識別IDを、前記自身のインスタンスを格納するアドレスから生成し、当該識別IDを付与した形で該保存用データを前記永続化管理クラスに受け渡すためのものであり、
前記個別媒体管理クラスは、該永続化管理クラスから受け渡された保存用データを、前記識別IDを付与した形で対応する記憶媒体に書き込むためのものである請求項1ないし請求項8のいずれか1項に記載のオブジェクト指向型車両用制御装置。
The persistence-compatible data class generates an identification ID for uniquely identifying the storage data from an address storing the instance, and stores the storage data in a form to which the identification ID is assigned. For passing to the persistence management class,
Any the individual media management classes, the saved data passed received from the persistence management class, of the identification ID is for writing to a corresponding storage medium applied to form the claims 1 to 8 The object-oriented vehicle control device according to claim 1.
前記永続化対応データクラスは、前記自身のインスタンスをシリアライズするためのシリアライズインターフェースを実装し、そのシリアライズされたデータを前記保存用データとして前記永続化管理クラスに受け渡すためのものである請求項9記載のオブジェクト指向型車両用制御装置。 The persistent corresponding data class implements the serialization interface for serializing an instance of the own claim 9 is intended for passing the persistence management class the serialized data as the stored data The control apparatus for object-oriented vehicles as described. 前記永続化対応データクラスは、前記自身のインスタンスが予め定められたサイズを超過しているか、又は、予めシリアライズが完了しているデータである場合に、前記シリアライズインターフェースによるシリアライズ処理を実行せずに、該データを前記保存用データとするためのものである請求項10記載のオブジェクト指向型車両用制御装置。 The persistence-compatible data class does not execute serialization processing by the serialization interface when the instance exceeds the predetermined size or is serialized in advance. , object-oriented vehicle control device according to claim 10 is provided for with the saved data the data. 前記シリアライズが完了しているデータが画像データである請求項11記載のオブジェクト指向型車両用制御装置。   The object-oriented vehicle control device according to claim 11, wherein the serialized data is image data. 前記永続化インターフェースは、既に保存されている前記保存用データを読み出して前記インスタンスに復元する復元要求を、該保存用データに対応するインスタンスを格納する前記アドレスを特定可能な形で前記アプリケーションクラスから受け付けるためのものであり、
前記永続化管理クラスは、保存されている前記保存用データを特定する識別IDの一覧を、保存先となる記憶媒体が特定可能な形で記憶する保存リストを有するとともに、受け付けた前記復元要求が特定する前記アドレスに基づいて前記識別IDを特定し、さらに、当該識別IDを前記保存リスト上で検索して保存先の記憶媒体を特定し、特定された記憶媒体に対応する前記個別媒体管理クラスに該識別IDを受け渡すためのものであり、
各前記個別媒体管理クラスは、受け取った前記識別IDに対応する保存用データを対応する記憶媒体から読み出して、前記永続化管理クラスを経て前記永続化対応データクラスに該保存用データを受け渡すためのものであり、
前記永続化対応データクラスは該保存用データを前記自身のインスタンスに復元するためのものである請求項9ないし請求項12のいずれか1項に記載のオブジェクト指向型車両用制御装置。
The persistence interface reads out the saved data that has already been saved and restores it to the instance from the application class in a form that can specify the address that stores the instance corresponding to the saved data. It is intended for accepting,
The persistence management class has a save list for storing a list of identification IDs that specify the saved data for saving in a form that can be specified by a storage medium as a save destination, and the received restore request is The identification ID is specified based on the specified address, and further, the storage medium is specified by searching the identification list for the identification ID, and the individual medium management class corresponding to the specified storage medium in is intended for passing the identification ID,
Each said individual media management classes, said received reads saved data corresponding to the identification ID from the corresponding storage medium, for transferring the stored data to the persistent corresponding data classes through the persistence management class And
The persistent corresponding data class object-oriented vehicle control device according to any one of claims 9 to 12 is used to recover the data for the storage in the instance of the own.
前記シリアライズインターフェースは、前記復元時にシリアライズされた前記保存用データをデシリアライズするためのものである請求項10を引用する請求項13に記載のオブジェクト指向型車両用制御装置。 The serialization interface, object-oriented vehicle control device according to claim 13 quoting claim 10 is intended to deserialize serialized the saved data was at the time of the restoration.
JP2006253334A 2006-09-19 2006-09-19 Object-oriented vehicle control device Expired - Fee Related JP4973844B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006253334A JP4973844B2 (en) 2006-09-19 2006-09-19 Object-oriented vehicle control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006253334A JP4973844B2 (en) 2006-09-19 2006-09-19 Object-oriented vehicle control device

Publications (2)

Publication Number Publication Date
JP2008077220A JP2008077220A (en) 2008-04-03
JP4973844B2 true JP4973844B2 (en) 2012-07-11

Family

ID=39349233

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006253334A Expired - Fee Related JP4973844B2 (en) 2006-09-19 2006-09-19 Object-oriented vehicle control device

Country Status (1)

Country Link
JP (1) JP4973844B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010149537A (en) 2008-12-23 2010-07-08 Autonetworks Technologies Ltd Control apparatus, control method, and computer program
JP5540537B2 (en) 2009-03-24 2014-07-02 株式会社オートネットワーク技術研究所 Control device, control method, and computer program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003162413A (en) * 2001-11-26 2003-06-06 Hitachi Software Eng Co Ltd Programming support apparatus
US7383290B2 (en) * 2004-03-09 2008-06-03 Hewlett-Packard Development Company, L.P. Transaction processing systems and methods utilizing non-disk persistent memory

Also Published As

Publication number Publication date
JP2008077220A (en) 2008-04-03

Similar Documents

Publication Publication Date Title
CN103164342B (en) Coordinate during the carry of availability of data
JP4418439B2 (en) Nonvolatile storage device and data writing method thereof
US6477616B1 (en) Storage device, storage system, memory management method, recording medium, and computer data signal
US6976221B2 (en) System and method for flexible software linking
US8176009B2 (en) Performing a pre-update on a non volatile memory
JP4745465B1 (en) Semiconductor memory device and method for controlling semiconductor memory device
JP5057887B2 (en) Data update device, data update method, and data update program
JP4973844B2 (en) Object-oriented vehicle control device
US7185140B2 (en) Method for storing in nonvolatile memory and storage unit
JP6030485B2 (en) Electronic control unit
CN101894024B (en) Model bank-based model element consistency ensuring method
CN1906559B (en) Method for controlling a data processing device
TW583582B (en) Microcomputer and associated method for reducing memory usage of the microcomputer
CN103339603A (en) Computer reprogramming method, data storage medium and motor vehicle computer
US9916103B2 (en) Memory control device, memory device, and memory control method
JP2008047155A (en) Batch erasable nonvolatile memory and mobile phone
JP4452158B2 (en) Nonvolatile memory system
US8200611B2 (en) File system and data management method
JP4031693B2 (en) Nonvolatile memory and data storage device having the same
CN101464817B (en) Data recovery method
US20220343034A1 (en) System on a chip and method guaranteeing the freshness of the data stored in an external memory
JP2007199846A (en) Memory control device and memory control method
JP2005339450A (en) Data management method for flash memory
TWI291636B (en) Basic input/output system information acquiring and editing method and system
JP3730684B2 (en) Display device for programmable controller and display information writing method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081007

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111227

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120221

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

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

R151 Written notification of patent or utility model registration

Ref document number: 4973844

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

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