DE10141799A1 - Operation of a computer system on which a control program runs that calls at least one COM (common object module) in a manner that does not require compilation of the control program - Google Patents

Operation of a computer system on which a control program runs that calls at least one COM (common object module) in a manner that does not require compilation of the control program

Info

Publication number
DE10141799A1
DE10141799A1 DE10141799A DE10141799A DE10141799A1 DE 10141799 A1 DE10141799 A1 DE 10141799A1 DE 10141799 A DE10141799 A DE 10141799A DE 10141799 A DE10141799 A DE 10141799A DE 10141799 A1 DE10141799 A1 DE 10141799A1
Authority
DE
Germany
Prior art keywords
procedure
control program
stack
interface
call
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.)
Withdrawn
Application number
DE10141799A
Other languages
German (de)
Inventor
Mathias Helm
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.)
Siemens AG
Original Assignee
Siemens AG
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 Siemens AG filed Critical Siemens AG
Priority to DE10141799A priority Critical patent/DE10141799A1/en
Publication of DE10141799A1 publication Critical patent/DE10141799A1/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45508Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

Method for operation of a computer system on which a control program runs that calls at least one COM (common object module) with a procedure and procedure interface via a custom interface to the COM. Accordingly a data record corresponding to a the procedure interface of a procedure is written to a buffer memory, the data record is copied to the stack and the procedure is called when the control program banches to the procedure start address.

Description

Die Erfindung betrifft ein Verfahren zum Betrieb eines Rechnersystems mit einem darauf ablaufenden Steuerprogramm, wobei das Programm mindestens eine COM-Komponente instanziiert. The invention relates to a method for operating a Computer system with a control program running there, wherein the program instantiates at least one COM component.

Zur Erstellung von grundsätzlich beliebigen Softwareprogrammen sind so genannte Compiler vorgesehen und allgemein bekannt. Derartige Compiler erzeugen aus einem so genannten Source Code ein auf einem Rechnersystem ablauffähiges Steuerprogramm, wobei der Source Code in ein Format transformiert wird, welches das Rechnersystem, genauer dessen Prozessor, interpretieren und abarbeiten kann. Der Source Code stellt eine Beschreibung der Funktionalität des jeweiligen Steuerprogramms dar. Die syntaktischen und semantischen Rahmenbedingungen, die bei dieser Beschreibung einzuhalten sind, werden durch eine Programmiersprache vorgegeben. Als Programmiersprachen sind heute so genannte höhere Programmiersprachen wie z. B. C, C++, Pascal, Java, etc. gebräuchlich. To create basically any So-called compilers are intended and general software programs known. Such compilers generate from a so-called Source code is executable on a computer system Control program, whereby the source code is transformed into a format which the computer system, more precisely its processor, interpret and work through. The source code provides a description of the functionality of each Control program. The syntactic and semantic Framework conditions to be observed in this description are specified by a programming language. As Programming languages are so-called higher today Programming languages such as B. C, C ++, Pascal, Java, etc. in use.

Bei Verwendung einer so genannten prozeduralen Programmiersprache wie z. B. Pascal und C wird das mit dem Steuerprogramm zu lösende bzw. zu bearbeitende Problem in sinnvolle kleinere und kleinste Einheiten, die so genannten Prozeduren oder Routinen, aufgeteilt, wobei jeweils eine Prozedur zur Behandlung einer Funktionalität oder einer Teilfunktionalität vorgesehen ist. When using a so-called procedural Programming language such as B. Pascal and C with the control program problem to be solved or worked on into meaningful smaller ones and smallest units, the so-called procedures or Routines, divided, each with a procedure for treatment a functionality or a partial functionality provided is.

Ein Programm zur Regelung der Raumtemperatur in einem Büroraum würde danach z. B. eine Prozedur zum Aufnehmen der Raumtemperatur, eine Prozedur, mit der die Vorwahl der gewünschten Raumtemperatur möglich ist, und eine Prozedur zum Ansteuern einer Heizvorrichtung umfassen. Die gewünschte Funktionalität des Steuerprogramms bestimmt die Reihenfolge und gegebenenfalls auch die Zeitpunkte der Aufrufe der einzelnen Routinen. Für das oben genannte Beispiel wird zunächst die Prozedur zur Vorwahl der gewünschten Raumtemperatur aufgerufen und dann kontinuierlich die Prozedur zur Ausgabe der vorgewählten Temperatur an die Heizvorrichtung aufgerufen, wobei diese Routine z. B. eine Regelungsfunktion umfasst, innerhalb derer kontinuierlich die Prozedur zur Aufnahme der aktuellen Raumtemperatur vorgesehen ist. A program for controlling the room temperature in one Office space would then z. B. a procedure for taking the Room temperature, a procedure by which the preselection of the desired room temperature is possible, and a procedure for Control a heater include. The desired Functionality of the control program determines the order and possibly also the times of the calls of the individual Routines. For the example above, the Procedure for preselecting the desired room temperature and then continuously the procedure for issuing the selected temperature to the heater, where this routine e.g. B. includes a control function within who continuously follow the procedure to record the current one Room temperature is provided.

Um eine Prozedur aufzurufen, d. h. in einem Programm verwenden zu können, ist zunächst deren Definition entsprechend den Vorschriften der Programmiersprache erforderlich. Durch diese Definition wird zumindest ein eindeutiger Bezeichner der Prozedur, ein Name, festgelegt. Darüber hinaus umfasst ein Prozeduraufruf üblicherweise Eingabeparameter und/oder Ausgabeparameter. Dabei ist ein Eingabeparameter ein Parameter, der an die Prozedur übergeben und innerhalb der Prozedur verarbeitet wird, und ein Ausgabeparameter ein Parameter, dessen Wert die Prozedur, z. B. durch interne Verarbeitung, ermittelt. To call a procedure, i. H. use in a program The first step is to be able to define them according to the Programming language regulations required. Through this At least it becomes a unique identifier of the definition Procedure, a name, set. It also includes a Procedure call usually input parameters and / or Output parameters. An input parameter is a parameter that passed to the procedure and within the procedure is processed, and an output parameter is a parameter whose Worth the procedure, e.g. B. through internal processing, determined.

Beim Aufruf einer Prozedur wird stets der so genannte Stack verwendet. Dabei handelt es sich um Speicher der auf besondere Art vom Prozessor angesprochen werden kann. In einem speziellen Register, dem so genannten Stack Pointer, wird die Position des Stacks festgehalten. Der Stack dient zur Übergabe von Parametern an die Prozedur bzw. von Parametern aus der Prozedur. Ein an eine Prozedur zu übergebender Parameter wird auf den Stack gelegt, d. h. an diejenige Adresse im Speicher kopiert, an welcher der Stack ausweislich des Inhalts des Registers "Stack Pointer" momentan beginnt. Damit die Prozedur den Parameter verwenden kann, liest sie zunächst den Inhalt des Registers "Stack Pointer" und darauf ab der entsprechenden Position - gegebenenfalls unter Berücksichtigung bestimmter Formatinformationen - den Speicher aus. When a procedure is called, the so-called stack is always used used. This is memory on the special type can be addressed by the processor. In one special register, the so-called stack pointer, is the Position of the stack recorded. The stack is used for Passing parameters to the procedure or parameters from the Procedure. A parameter to be passed to a procedure is put on the stack, d. H. to the address in the memory copied to which the stack shows the content of the Stack Pointer tab is currently starting. So the procedure can use the parameter, it first reads the content of the "Stack Pointer" tab and then from the appropriate position - taking into account if necessary certain format information - the memory.

Der Stack ist dabei - wie der Name schon ausdrückt - ein so genannter Stapelspeicher, bei dem stets nur auf das "oberste" Element des Stapels zugegriffen wird, indem entweder ein neues Element auf dem Stapel abgelegt wird oder das oberste Element vom Stapel entfernt wird. The stack is - as the name expresses - such a thing named stack memory, in which only the "top" Element of the stack is accessed by either one new item is placed on the stack or the top one Element is removed from the stack.

Wenn mittels einer Prozedur zwei Zahlen zu addieren sind und deren Summe als Ergebnis zurück zu geben ist, ist es erforderlich, die beiden Summanden sowie einen Platzhalter für die Rückgabe des Additionsergebnisses auf dem Stack abzulegen. When two numbers have to be added using a procedure and the sum of which is to be returned as a result, it is required, the two summands and a placeholder for the Return the addition result on the stack.

Eine bestimmte Standardisierung für Prozeduraufrufe hat Microsoft im Rahmen des Component Object Model (COM) festgelegt. COM soll im wesentlichen die Wiederverwendbarkeit von Software ermöglichen. Man spricht in diesem Zusammenhang von so genannten COM-Objekten. Jedes COM-Objekt umfasst eine bestimmte Funktionalität. Auf ein COM-Objekt kann mittels einer Software-Schnittstelle von beliebigen Steuerprogrammen aus zugegriffen werden. Jede Software-Schnittstelle umfasst dabei mindestens einen Prozeduraufruf. Has a certain standardization for procedure calls Microsoft as part of the Component Object Model (COM) established. COM is essentially intended to reuse Enable software. In this context one speaks of so-called COM objects. Each COM object includes one certain functionality. A COM object can be accessed using a Software interface from any control program be accessed. Every software interface includes at least one procedure call.

Ein "Objekt" stellt eine so genannte Instanz eines so genannten Objekttyps dar. Ein Objekttyp kombiniert Daten und Methoden zur Manipulation dieser Daten. Während häufig ein direkter Zugriff auf die Daten eines Objekttyps unerwünscht ist, ist der Zugriff auf zumindest eine Methode des Objekttyps notwendig, um eine Manipulation der ansonsten durch den Objekttyp gleichsam gekapselten Daten zu ermöglichen. Diese Methode bildet damit zusammen mit evtl. weiteren Methoden eine Software-Schnittstelle des Objekttyps. Ein Objekttyp ist damit ein benutzerdefinierbarer Datentyp, dem mindestens eine Prozedur zur Manipulation von Daten dieses Datentyps implizit zugeordnet ist. Die Verwendung eines Objekttyps erfolgt im Wege der Erzeugung mindestens einer Instanz dieses Objekttyps. An "object" represents a so-called instance of such a object type. An object type combines data and Methods of manipulating this data. While often a direct access to the data of an object type is undesirable, is access to at least one method of the object type necessary to manipulate the otherwise by the To enable object type encapsulated data. This Method, together with any other methods, forms one Software interface of the object type. An object type is a user-definable data type with at least one Procedure for manipulating data of this data type implicitly assigned. An object type is used in Ways of creating at least one instance of this Object type.

Bei COM-Objekten wird unterschieden zwischen den Schnittstellentypen: "custom interfaces", "dual interfaces" und "dispinterfaces". Die letzten beiden Schnittstellentypen sind so konzipiert, dass Skriptinterpreter zur Laufzeit ohne vorheriges Compilieren eines Programmcodes auf diese zugreifen können. Sie sollen in den weiteren Ausführungen nicht weiter betrachtet werden. A distinction is made between COM objects Interface types: "custom interfaces", "dual interfaces" and "Dispinterfaces". The last two interface types are like this designed that script interpreter at runtime without access it before compiling a program code can. They should not go any further in the further explanations to be viewed as.

Um auf "custom interfaces" zugreifen zu können, musste bisher jeweils individuell ein entsprechender Programmcode compiliert werden. Dies beruht darauf, dass nur zum Compilier- Zeitpunkt die jeweils benötigten Informationen zum Aufruf der Prozedur oder einer der Prozeduren der Software-Schnittstelle, wie z. B. die Aufrufadresse oder der Stack-Aufbau der Prozedur zur Verfügung stehen, denn die benötigten Informationen sind z. B. in so genannten Header- oder Typinformations- Dateien enthalten, die durch den Compiler gelesen werden. Until now, in order to be able to access "custom interfaces" each has a corresponding program code be compiled. This is due to the fact that only for compiling Time the information required to call the Procedure or one of the procedures of Software interface, such as B. the call address or the stack structure of the Procedure are available because the needed Information is e.g. B. in so-called header or type information Contain files that are read by the compiler.

Die Erfindung hat ein Verfahren zum Gegenstand, mit dem es möglich ist, auf Schnittstellen vom Typ "custom interface" zugreifen zu können, ohne den Programmcode eines Steuerprogramms compilieren zu müssen. Dieses Verfahren ist im Patentanspruch 1 angegeben. Vorteilhafte Weiterbildungen der Erfindung sind Gegenstand der abhängigen Ansprüche. The invention relates to a method with which it is possible on interfaces of the type "custom interface" to be able to access it without the program code Need to compile the control program. This procedure is in Claim 1 specified. Advantageous further developments of Invention are the subject of the dependent claims.

Die Erfindung kann vorteilhaft zum automatischen Testen von COM-Komponenten eingesetzt werden. Dazu enthält die Skriptdatei Folgen von Aufrufen zu testender Prozeduren mit Parametern entsprechend vorgegebener oder vorgebbarer Testmuster. The invention can be advantageous for automatic testing of COM components are used. In addition, the Script file sequence of calls to procedures to be tested with Parameters according to predefined or predefinable test patterns.

Gemäß der Erfindung ist vorgesehen, Prozeduraufrufe beliebiger "custom interfaces" in einer Skriptdatei, z. B. in einer Textdatei, zu formulieren, die dann interpretiert wird. Neben der Skriptdatei wird eine separate Typinformationsdatei ausgewertet, aus der die für die in der Skriptdatei ausgewählte Prozedur notwendige Definitionsinformation gelesen werden. According to the invention, procedure calls are provided any "custom interfaces" in a script file, e.g. B. in one Text file to be formulated, which is then interpreted. Next the script file becomes a separate type information file evaluated, from which the one selected in the script file Procedure necessary definition information can be read.

Mit diesen Definitionsinformationen wird in einem Zwischenspeicher ein Datensatz erzeugt. Der Datensatz entspricht der Schnittstelle der ausgewählten Prozedur, indem er diese durch eine der Schnittstelle entsprechende Abfolge von Ein- und Ausgabeparametern abbildet. Der Datensatz enthält damit die Eingabeparameter sowie Speicherplatz für die Ausgabeparameter. Das Layout des Datensatzes ermöglicht es, dass dessen Daten beim Aufruf der Prozedur als Parameter dieser Prozedur verwendbar sind. With this definition information is in one Cache creates a record. The record corresponds to the Interface the selected procedure by going through it a sequence of input and output corresponding to the interface Maps output parameters. The data record thus contains the Input parameters and storage space for the Output parameters. The layout of the record allows it to be Data when the procedure is called as a parameter of this procedure are usable.

Der Datensatz wird daraufhin, z. B. mittels einer entsprechenden Assembler-Routine, auf den Stack kopiert. Damit kann dann die ausgewählte Prozedur aufgerufen werden, indem ein so genannter "call" auf die jeweilige Adresse der ausgewählten Prozedur erzeugt wird. Der "call" ist eine interne Funktion üblicher Prozessoren und bewirkt neben dem Sprung an die als Parameter übergebene Zieladresse die Auswertung des Stacks. Die Einsprungsadresse wird den Definitionsinformationen der Prozedur entnommen. The data record is then, for. B. by means of a corresponding assembler routine, copied to the stack. With that, then the selected procedure can be called by such a called "call" to the address of the selected one Procedure is generated. The "call" is an internal function usual processors and causes in addition to the jump to the as The parameter passed to the destination address evaluates the stack. The entry address is the definition information of the Procedure removed.

Die Erfindung lässt sich auch zum Aufruf beliebiger Prozeduren in einem bereits compilierten, d. h. für den jeweiligen Anwender nicht mehr als Source-Code zur Verfügung stehenden Steuerprogramm anwenden. Bei den Prozeduren gemäß der obigen Beschreibung war stets von Prozeduren ausgegangen, die Bestandteil der Schnittstelle einer COM-Komponente waren. Ganz analog ist die Erfindung auch auf Prozeduren, die Bestandteil der Schnittstelle anderer, insbesondere benutzerdefinierter Objekte sind, anwendbar. The invention can also be used to call any Procedures in an already compiled, i.e. H. for each Users no longer available as source code Apply control program. In the procedures according to the above Description was always based on procedures that Were part of the interface of a COM component. All The invention is also analogous to procedures that are a constituent the interface of others, especially user-defined Objects are applicable.

Tatsächlich ist es nicht einmal erforderlich, dass die aufzurufenden Prozeduren Bestandteil einer Schnittstelle eines Objektes sind. Durch die Erfindung wird auch ein Verfahren gelehrt, wie gewöhnliche Prozeduren eines ersten, bereits compilierten Steuerprogramms aus einem anderen Programm aufrufbar sind. In fact, it doesn't even require that procedures to be called part of an interface of a Object. The invention also provides a method taught how ordinary procedures of a first, already compiled control program from another program are available.

Stets wird in der Skriptdatei zumindest eine Prozedur zum Aufruf ausgewählt. Dabei werden die Parameter, die der Prozedur als Eingabeparameter übergeben werden sollen, in einer bestimmten, vorgegeben Syntax angegeben. Insbesondere werden die Parameter dabei bereits in einer Reihenfolge notiert, wie sie der durch die Schnittstelle der Prozedur vorgegebenen Reihenfolge entspricht. At least one procedure is always used in the script file Call selected. The parameters that the Procedure to be passed as input parameters in a specified, specified syntax. In particular the parameters are already noted in an order, such as the one specified by the interface of the procedure Order corresponds.

Wenn das Kopieren des Datensatzes auf den Stack durch ein Assembler-Programm erfolgt, werden die Daten auf dem Stack besonders schnell bereit gestellt, so dass der Aufruf der Prozedur quasi "sofort" nach dem Lesen der Skript- und Typinformationsdatei erfolgen kann. If copying the record to the stack by one Assembler program is done, the data on the stack provided particularly quickly, so that the call of the Procedure quasi "immediately" after reading the script and Type information file can be done.

Vorteilhaft werden die Schritte a) bis e) des Anspruchs 1 von einem Aufrufprogramm ausgeführt. Dann stehen die aus der Skriptdatei und aus der Typinformationsdatei gelesen Daten unmittelbar in einem Programm, dem Aufrufprogramm zur Verfügung, so dass durch dieses direkt der Datensatz erzeugt und in den Zwischenspeicher geschrieben werden kann, ohne dass noch eine Übergabe der jeweils relevanten Parameter an ein oder mehrere separate Programme erforderlich wäre. Steps a) to e) of claim 1 are advantageous executed by a call program. Then they stand out Script file and data read from the type information file directly in a program, the call program for Available so that the data record is generated directly through this can be written to the buffer without another transfer of the relevant parameters to or several separate programs would be required.

Wenn das Aufrufprogramm nach Beendigung der Prozedur die auf dem Stack abgelegten Ausgabeparameter der Prozedur interpretiert, ist es nicht nur möglich, eine Prozedur in einem bestehenden Steuerprogramm aufzurufen und damit bestimmte Aktionen in dem Steuerprogramm oder durch das Steuerprogramm zu veranlassen sondern auch auf Ergebnisse des Aufrufs der betreffenden Prozedur individuelle zu reagieren. If the caller ends the procedure after the procedure output parameters of the procedure stored in the stack interpreted, it is not only possible to have one procedure in one call existing control program and thus certain Actions in the control program or by the control program cause but also on results of the call of the to respond to the procedure in question.

Vorteilhaft ist die Skriptdatei eine Textdatei, denn eine Textdatei kann auch mit einem einfachen so genannten Editor bearbeitet werden. Einfache Editoren stehen auf nahezu jedem Rechnersystem standardmäßig zur Verfügung, so dass der Anwender die Skriptdatei jederzeit den jeweiligen Erfordernissen anpassen kann. The script file is advantageously a text file, because one Text file can also be created with a simple so-called editor to be edited. Simple editors are on almost everyone Computer system available by default, so the Users of the script file at any time according to the respective requirements can adjust.

Nachfolgend wird ein Ausführungsbeispiel der Erfindung anhand der Zeichnung näher erläutert. Darin zeigen An exemplary embodiment of the invention is described below the drawing explained in more detail. Show in it

Fig. 1 ein Rechnersystem Fig. 1 is a computer system

Fig. 2 eine COM-Komponente Fig. 2 shows a COM component

Fig. 3 einen Zwischenspeicher und Fig. 3 shows a buffer and

Fig. 4 ein Ablaufschema. Fig. 4 is a flow chart.

Fig. 1 zeigt die Struktur eines an sich bekannten Rechnersystem 1 mit einem Prozessor 2 und einem Speicher 3. Im Speicher 3 ist ein Steuerprogramm 4 gespeichert. Das Steuerprogramm 4 instanziiert mindestens eine COM-Komponente 5. Fig. 1 shows the structure of a known computer system 1 having a processor 2 and a memory 3. A control program 4 is stored in the memory 3 . The control program 4 instantiates at least one COM component 5 .

Ferner befindet sich im Speicher 3 eine Skriptdatei 6. Die Skriptdatei 6 wird von einem Aufrufprogramm 7 interpretiert. Das Aufrufprogramm 7 greift ferner auf eine Typinformationsdatei 8 zu und schreibt Ergebnisse in einen Zwischenspeicher 9. There is also a script file 6 in memory 3 . The script file 6 is interpreted by a call program 7 . The call program 7 also accesses a type information file 8 and writes results to a buffer 9 .

Fig. 2 zeigt Details der COM-Komponente 5. Die COM-Komponente 5 ist - wie oben bereit beschrieben - eine Instanz eines Objekttyps. Damit weist sie, wie jedes Objekt, eine Schnittstelle 10 auf, die hier jeweils mindestens einen Eingabeparameter 11, eine Prozedur 12 mit einer Prozedurschnittstelle 13 sowie einen Ausgabeparameter 14 umfasst. Fig. 2 shows details of the COM Component 5. As already described above, the COM component 5 is an instance of an object type. Thus, like every object, it has an interface 10 , which here in each case comprises at least one input parameter 11 , a procedure 12 with a procedure interface 13 and an output parameter 14 .

In der Skriptdatei 6 wird ein Aufruf einer Prozedur 12 der Schnittstelle 10 einer der COM-Komponenten 5 formuliert. Die Skriptdatei ist dabei z. B. eine Textdatei, da derartige Dateien auch mit einfachen so genannten Editoren bearbeitbar und änderbar sind. A call to a procedure 12 of the interface 10 of one of the COM components 5 is formulated in the script file 6 . The script file is z. B. a text file, since such files can also be edited and changed with simple so-called editors.

Die Skriptdatei wird vom Aufrufprogramm 7 interpretiert. Das Aufrufprogramm 7 liest neben der Skriptdatei 6 aus einer separaten Typinformationsdatei 8 die für die in der Skriptdatei 6 ausgewählte Prozedur 12 notwendigen Definitionsinformationen. The script file is interpreted by the call program 7 . In addition to the script file 6, the call program 7 reads from a separate type information file 8 the definition information necessary for the procedure 12 selected in the script file 6 .

Beispielhaft soll für die weitere Beschreibung davon ausgegangen werden, dass die Skriptdatei 6 zumindest den nachfolgenden Inhalt hat:

foo (12, 17)
As an example, it should be assumed for the further description that the script file 6 has at least the following content:

foo (12, 17)

Des weiteren habe die Typinformationsdatei 8 zumindest den folgenden Inhalt:

foo (double, double)
Furthermore, the type information file 8 has at least the following content:

foo (double, double)

Nachdem durch die Interpretation des Skriptdatei 6 feststeht, dass zumindest die Prozedur 12 mit dem Namen "foo" aufgerufen werden soll, werden aus den Definitionsinformationen, die aus der Typinformationsdatei 8 gewonnen werden, zumindest die für den Aufruf der Prozedur (12) notwendige Definitionsinformation ausgelesen. Diese Definitionsinformation beschreiben das Layout der Prozedurschnittstelle 13. Gemäß dem obigen Beispiel für die Prozedurschnittstelle 13 durch zwei Parameter vom Typ "double" gebildet. Ein Datum des Typs double belegt im Speicher sechs Byte. After it has been established by the interpretation of the script file 6 that at least the procedure 12 with the name "foo" is to be called, at least the definition information necessary for calling the procedure ( 12 ) is read from the definition information which is obtained from the type information file 8 , This definition information describes the layout of the procedure interface 13 . According to the example above for the procedure interface 13 formed by two parameters of the "double" type. A double date occupies six bytes in memory.

Mit diesen Definitionsinformationen erzeugt das Aufrufprogramm im Zwischenspeicher 9 einen Datensatz 15. Fig. 3 zeigt den Zwischenspeicher 9 mit dem Datensatz 15. Der Datensatz 15 umfasst ein erstes Datum 16 und ein zweites Datum 17. Jedes Datum 16, 17 hat eine Größe von sechs Byte (angedeutet durch die sechs Blöcke). With this definition information, the call program generates a data record 15 in the buffer 9 . Fig. 3 shows the buffer 9 with the record 15th The data record 15 comprises a first date 16 and a second date 17 . Each data 16 , 17 has a size of six bytes (indicated by the six blocks).

Das erste Datum 16 wird mit dem Wert "12" - dem ersten Parameter der Prozedur 12 gemäß der Skriptdatei 6 - in der Darstellung gemäß dem Typ double belegt. Das zweite Datum 17 wird entsprechend mit dem Wert "17" - dem zweiten Parameter der Prozedur 12 gemäß der Skriptdatei 6 - in der Darstellung gemäß dem Typ double belegt. The first date 16 is assigned the value "12" - the first parameter of the procedure 12 according to the script file 6 - in the representation according to the double type. The second date 17 is accordingly assigned the value "17" - the second parameter of the procedure 12 according to the script file 6 - in the representation according to the double type.

Der Datensatz 15 entspricht damit schließlich den Aufrufparametern der ausgewählten Prozedur 12. Er enthält die Eingabeparameter sowie ggf. (nicht dargestellt) Speicherplatz für die Ausgabeparameter. Das Layout des Datensatzes 15 ermöglicht es, dass der Datensatz 15 auf den so genannten Stack kopiert werden kann. The data record 15 thus finally corresponds to the call parameters of the selected procedure 12 . It contains the input parameters and possibly (not shown) storage space for the output parameters. The layout of the data record 15 enables the data record 15 to be copied onto the so-called stack.

Der Datensatz wird daraufhin, z. B. mittels einem entsprechenden Assembler-Programm oder einer Assembler-Routine, auf den Stack kopiert. Das Kopieren auf den Stack mittels einer Assembler-Routine hat den Vorteil, dass das Kopieren damit besonders schnell erfolgt. The data record is then, for. B. by means of a corresponding assembler program or an assembler routine to which Stack copied. Copying to the stack using a Assembler routine has the advantage of copying with it takes place particularly quickly.

Damit kann schließlich die ausgewählte Prozedur aufgerufen werden, indem ein so genannter "call" auf die jeweilige Adresse der ausgewählten Prozedur erzeugt wird. Der "call" ist eine interne Funktion üblicher Prozessoren und bewirkt neben dem Sprung an die als Parameter übergebene Zieladresse die Auswertung des Stacks. Die übergebene Zieladresse ist die Startadresse der aufzurufenden Prozedur. Diese wird den Definitionsinformationen der Prozedur entnommen. The selected procedure can then be called up by placing a so called "call" on the respective Address of the selected procedure is generated. The "call" is an internal function of common processors and also causes the jump to the target address passed as a parameter Evaluation of the stack. The transferred destination address is the Start address of the procedure to be called. This will be the Definition information taken from the procedure.

Fig. 4 zeigt ein Ablaufschema des erfindungsgemäßen Verfahrens. Zunächst wird im Schritt 100 eine Skriptdatei 6 eingelesen. Im Schritt 105 wird eine Typinformationsdatei 8 eingelesen. In der Skriptdatei 6 ist mindestens eine Prozedur 12 einer Schnittstelle 10 einer COM-Komponente 5 angegeben. Aus der Typinformationsdatei 8 wird zumindest diejenige Definitionsinformation ausgewählt, die sich auf die in der Skriptdatei 6 angegebene Prozedur 12 bezieht. Fig. 4 shows a flowchart of the inventive method. First, a script file 6 is read in step 100 . In step 105 , a type information file 8 is read. At least one procedure 12 of an interface 10 of a COM component 5 is specified in the script file 6 . At least that definition information is selected from the type information file 8 that relates to the procedure 12 specified in the script file 6 .

Mit diesen Daten wird im Schritt 110 im Zwischenspeicher 9 ein Datensatz 15 erzeugt, welcher der Prozedurschnittstelle 13 der ausgewählten Prozedur 12 entspricht. With this data, in step 110 a data record 15 is generated in the buffer 9 , which corresponds to the procedure interface 13 of the selected procedure 12 .

Im Schritt 115 wird der so erzeugt Datensatz 15 aus dem Zwischenspeicher 9 auf den Stack kopiert. Dies geschieht vorzugsweise mittels einer Assembler-Routine. In step 115 , the data record 15 generated in this way is copied from the buffer 9 onto the stack. This is preferably done using an assembler routine.

Im Schritt 120 wird schließlich die Prozedur 12 aufgerufen, indem mit einem geeigneten Prozessorbefehl, insbesondere dem so genannten CALL-Befehl, zur Startadresse der Prozedur 12 verzweigt wird. Finally, in step 120 , procedure 12 is called by branching to the start address of procedure 12 using a suitable processor command, in particular the so-called CALL command.

Im optionalen Schritt 125 erfolgt abschließend eine Auswertung der von der Prozedur 12 ggf. zurückgegeben Ausgabeparameter 14. Finally, in optional step 125 , an evaluation of the output parameters 14 possibly returned by the procedure 12 takes place.

Dieser Ablauf kann zyklisch fortgesetzt werden. Wenn in der Skriptdatei stets dieselbe Prozedur 12 angegeben ist, kann das Einlesen der Skript- und Typdefinitionsdatei 6, 8 - Schritte 100, 105 - entfallen. This process can be continued cyclically. If the same procedure 12 is always specified in the script file, reading in the script and type definition file 6 , 8 — steps 100 , 105 — can be omitted.

Zusammenfassend lässt sich die Erfindung damit wie folgt beschreiben:
Es wird ein Verfahren zum Betrieb eines Rechnersystems mit einem darauf ablaufenden Steuerprogramm angegeben, wobei das Programm mindestens eine Komponente (Prozedur, Funktion, Unterprogramm, Instanz eines Objekttyps) umfasst, die eine Schnittstelle aufweist
wobei gemäß einer Skriptdatei ein Aufruf der Komponente vorgesehene ist, mit den folgenden Schritten

  • a) die Skriptdatei wird interpretiert,
  • b) aus einer Typinformationsdatei werden Definitionsinformationen der in dem Steuerprogramm enthaltenen Komponenten gelesen und aus diesen die für die in der Skriptdatei ausgewählte Komponente notwendige Definitionsinformation ausgewählt,
  • c) mit den Definitionsinformationen wird in einem Zwischenspeicher ein Datensatz erzeugt, welcher der Schnittstelle der ausgewählten Komponente entspricht,
  • d) der Datensatz wird auf den Stack kopiert und
  • e) mit einem geeigneten Prozessorbefehl wird zur Startadresse der Komponente verzweigt und diese damit aufgerufen.
In summary, the invention can be described as follows:
A method for operating a computer system with a control program running on it is specified, the program comprising at least one component (procedure, function, subroutine, instance of an object type) which has an interface
whereby according to a script file a call of the component is provided with the following steps
  • a) the script file is interpreted,
  • b) definition information of the components contained in the control program is read from a type information file and from this the definition information required for the component selected in the script file is selected,
  • c) with the definition information, a data record is generated in a buffer which corresponds to the interface of the selected component,
  • d) the data record is copied onto the stack and
  • e) with a suitable processor command, a branch is made to the start address of the component and the component is thus called.

Es sei abschließend darauf hingewiesen, dass sich die Erfindung auch für den Zugriff auf Daten und Datenstrukturen in einem bereits compilierten Steuerprogramm eignet. Wenn zum Aufruf einer Prozedur o. ä. gemäß der Erfindung der erzeugte Datensatz auf den Stack kopiert wurde, wird zum Verändern von Daten in einem bestehenden Steuerprogramm der erzeugt Datensatz die entsprechende Position der zu verändernden Daten geschrieben. In conclusion, it should be noted that the Invention also for access to data and data structures in an already compiled control program. If at Calling a procedure or the like according to the invention of the generated Record copied to the stack is used to change Data in an existing control program that generates Record the corresponding position of the data to be changed written.

Ein Beispiel mag dies mit Bezug auf das eingangs genannte Beispiel der Raumtemperaturregelung verdeutlichen: Wenn man annimmt, dass in dem Steuerprogramm zur Raumtemperaturregelung keine Möglichkeit zur Anzeige der gemessenen Raumtemperatur vorgesehen ist, kann dennoch durch ein anderes Programm auf die Variable, in der die gemessene Raumtemperatur gespeichert ist, zugegriffen werden und die Anzeige der gemessenen Raumtemperatur durch ein anderes Programm vorgenommen werden. An example of this may refer to the above Clarify example of room temperature control: If one assumes that in the control program for Room temperature control no possibility to display the measured Room temperature is provided, but can be done by another program to the variable in which the measured room temperature is stored, accessed and displaying the measured Room temperature can be made by another program.

Der Zugriff auf das Datum "Raumtemperatur erfolgt, indem dessen Position innerhalb des Datenbereiches des Steuerprogramms und eine zugehörige Typinformation ermittelt wird. Wenn damit feststeht, dass das Datum an der Adresse #107 im Format "Gleitkommazahl (PASCAL: real, C/C++: double) gespeichert ist, kann der Speicher ab dieser Adresse in dem durch den Datentyp festgelegten Umfang ausgelesen werden und die gelesenen Daten gemäß den Konventionen des Datentyps ausgegeben werden. Access to the date "room temperature is done by whose position within the data area of the Control program and an associated type information is determined. If it is certain that the date at address # 107 in the Format "floating point number (PASCAL: real, C / C ++: double) is stored, the memory from this address can be saved in the the data type specified scope can be read and the read data according to the conventions of the data type be issued.

Claims (5)

1. Verfahren zum Betrieb eines Rechnersystems (1) mit einem darauf ablaufenden Steuerprogramm (4), das mindestens eine COM-Komponente (5) instanziiert, die eine Schnittstelle (9) vom Typ "custom interface" mit mindestens einer Prozedur (12) mit einer Prozedurschnittstelle (13) aufweist,
wobei gemäß einer Skriptdatei (6) ein Aufruf der Prozedur (12) vorgesehen ist, mit den folgenden Schritten a) die Skriptdatei (6) wird interpretiert, b) aus einer Typinformationsdatei (8) wird die für den Aufruf der Prozedur (12) notwendige Definitionsinformation ausgelesen, c) anhand der Definitionsinformation wird in einen Zwischenspeicher (9) ein Datensatz geschrieben, welcher der Prozedurschnittstelle (13) der Prozedur (12) entspricht, d) der Datensatz wird auf den Stack kopiert, e) die Prozedur (12) wird aufgerufen, indem mit einem geeigneten Prozessorbefehl zur Startadresse der Prozedur (12) verzweigt wird.
1. Method for operating a computer system ( 1 ) with a control program ( 4 ) running thereon, which instantiates at least one COM component ( 5 ), which has an interface ( 9 ) of the "custom interface" type with at least one procedure ( 12 ) has a procedure interface ( 13 ),
wherein according to a script file ( 6 ) a call to the procedure ( 12 ) is provided, with the following steps a) the script file ( 6 ) is interpreted, b) the definition information necessary for calling the procedure ( 12 ) is read from a type information file ( 8 ), c) on the basis of the definition information, a data record is written into a buffer ( 9 ), which corresponds to the procedure interface ( 13 ) of the procedure ( 12 ), d) the data record is copied onto the stack, e) the procedure ( 12 ) is called by branching to the start address of the procedure ( 12 ) with a suitable processor command.
2. Verfahren nach Anspruch 1, wobei das Kopieren des Datensatzes auf den Stack im Schritt d) durch ein Assembler- Programm erfolgt. 2. The method of claim 1, wherein copying the Data set on the stack in step d) by an assembler Program is done. 3. Verfahren nach Anspruch 1 oder 2, wobei die Schritte a) bis e) von einem Aufrufprogramm (7) ausgeführt werden. 3. The method according to claim 1 or 2, wherein steps a) to e) are carried out by a call program ( 7 ). 4. Verfahren nach Anspruch 3, wobei das Aufrufprogramm (7) nach Beendigung der Prozedur (12) die auf dem Stack abgelegten Ausgabeparameter () der Prozedur (12) interpretiert. 4. The method according to claim 3, wherein the call program ( 7 ) interprets the output parameters () of the procedure ( 12 ) stored on the stack after the completion of the procedure ( 12 ). 5. Verfahren nach Anspruch 1, wobei die Skriptdatei eine Textdatei ist. 5. The method of claim 1, wherein the script file is a Text file is.
DE10141799A 2001-08-27 2001-08-27 Operation of a computer system on which a control program runs that calls at least one COM (common object module) in a manner that does not require compilation of the control program Withdrawn DE10141799A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE10141799A DE10141799A1 (en) 2001-08-27 2001-08-27 Operation of a computer system on which a control program runs that calls at least one COM (common object module) in a manner that does not require compilation of the control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE10141799A DE10141799A1 (en) 2001-08-27 2001-08-27 Operation of a computer system on which a control program runs that calls at least one COM (common object module) in a manner that does not require compilation of the control program

Publications (1)

Publication Number Publication Date
DE10141799A1 true DE10141799A1 (en) 2003-03-20

Family

ID=7696672

Family Applications (1)

Application Number Title Priority Date Filing Date
DE10141799A Withdrawn DE10141799A1 (en) 2001-08-27 2001-08-27 Operation of a computer system on which a control program runs that calls at least one COM (common object module) in a manner that does not require compilation of the control program

Country Status (1)

Country Link
DE (1) DE10141799A1 (en)

Similar Documents

Publication Publication Date Title
DE60010420T2 (en) Automatic regression testing of workstation software
EP0689694B1 (en) Process for the machine-generation of parallel processable command groups from a program for super-scalar microprocessors
EP1723513B1 (en) Method for configuring a computer program
EP1738257B1 (en) Method for preventing data inconsistency between accesses of different functions of an application to a global variable in a data processing installation
DE102004061597A1 (en) Operating system that enables the running of real-time programs, control methods and methods for loading DLLs
EP3543844B1 (en) Method for carrying out changes to a software application
DE19535519C2 (en) Processes for reducing the size of computer programs
DE112018002316T5 (en) CODE COVERAGE TRACKING FOR A MICROCONTROLLER PROGRAM
DE10041072A1 (en) Automatic generation of program code involves forming symbol for component with interfaces in graphical editor, offering selection, generating code combining components
DE2458286A1 (en) DATA PROCESSING SYSTEM FOR MOVING DATA FIELDS WITH DIFFERENT STRUCTURES
DE19924702A1 (en) Determining global register conflicts in a computer program uses unitary data structure to evaluate the global registers
DE10141799A1 (en) Operation of a computer system on which a control program runs that calls at least one COM (common object module) in a manner that does not require compilation of the control program
EP0990203B1 (en) Method for controlling a data processing system
DE19924437A1 (en) Global register initialization method in network, by using global variable information contained in object file
EP1505399B1 (en) Method for Generating Test Data for functional test of data processing circuits
DE2613703C2 (en) Circuit arrangement for translating program texts
DE19915135A1 (en) Logic combining data generation method for microcomputer program development
DE19637883B4 (en) Data processing system for executing large program systems
EP0560342B1 (en) Method for debugging HDL-programs
DE68927051T2 (en) Dynamic selection of a logical element data format
EP4055473B1 (en) Method for updating a control program of an automation system with data migration for a program state of the control program
EP2682866B1 (en) Methods for the implementation of data formats
DE10300541A1 (en) Workable data file generation method, involves dividing target name into parts at given points
DE19828611C2 (en) Data processing device and associated method
DE10308867B4 (en) Method for addressing address spaces when emulating a program created for an emulated processor on an emulating processor

Legal Events

Date Code Title Description
8141 Disposal/no request for examination