External control system

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

External control system

#1 Post by Eugene Lutsenko »

Hello everybody!

I am developing a larger system, in which hundreds of different functions that run from the main menu. I ask whether these functions are run from an external program possible. Using libraries is not suitable, since ak external program written in another language.

I on this occasion such thoughts. I think it's possible. To do this, you need to have the ability to enable and disable the special mode "External control". If this mode is enabled, the timer control is transferred to a special function. This function checks whether the database was updated for external commands (if the size and the date changed). If refreshed, it is necessary to take from it the name of the function with the specified parameters and execute. Then reset the database and close. And external management program must wait until this database will become available, and write in the name of the database functions with the parameters which have to fulfill. The database can be opened exclusively.

Can anyone demonstrate this capability in the form of a program with source code?

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: External control system

#2 Post by Eugene Lutsenko »

The idea is to be able to realize the interaction with the user interface in a single executable in any programming language, and the execution of the program user instructions - in another executable in Alaska.

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: External control system

#3 Post by rdonnay »

You cannot make calls to Xbase++ DLLs from other languages, therefore you would need to write an interface that would have the entry point to your functions as an Xbase++ .EXE. The calling program would need to pass the parameters to the .EXE as command line parameters. It really depends on what these functions do whether or not this is practical. If they are simply to display information on a screen, then this seems viable, however if they are to return a lot of data, an EXE is not a good methodology.

Web servers use an interface called CGI (common gateway interface) to talk to applications written in different languages. It sounds to me like you are trying to create something like this.

Please tell me what are these functions?
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: External control system

#4 Post by Eugene Lutsenko »

There are people who want to use the executable Eidos system: http://lc.kubagro.ru/aidos/_Aidos-X.htm almost like a library. They would be arranged, if they could just give Eidos assignment system through a common database, ie invoke its functions and their parameters. I Eidos system provided for a special regime for this purpose. The principle of operation of such a regime. When this mode is running, the timer system periodically checks the size of a special database. When its amount is increased compared with a blank, the system opens and starts its run queue for all functions defined in it with the specified parameters. When the function finishes its execution it erases from the database. When the database becomes empty it is closed and made available for recording in her new job program external control. When this program records all functions (program type), then it closes the base. After this database is available for reading system Eidos and she starts to perform functions, etc. I've already done a lot in the system for this mode. But for some reason, the desired function is not triggered by macro substitution. That is a problem. On this I stalled. A small working example would be very helpful. In the first stage, I tried to run the same functions as the main system menu.

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: External control system

#5 Post by rdonnay »

But for some reason, the desired function is not triggered by macro substitution.
Try adding EXTERNAL statements to your code so those functions will be added to the symbol table.

EXTERNAL myFunc1, myFunc2, myFunc3
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: External control system

#6 Post by Eugene Lutsenko »

It is difficult for me. I make a simple

Code: Select all

DO CASE
     CASE f=1
          function1
     CASE f=2
          function2
..........................
     CASE f=N
          functionN
     OTHERWISE
          Mess()
ENDCASE
A f define easily

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: External control system

#7 Post by rdonnay »

I don't understand what you mean by macro problems. Please clarify.
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: External control system

#8 Post by Eugene Lutsenko »

I just do not want to list all the features of an CASE. I thought shorter, prettier and versatile paste function name with the parameters in the text of the program and execute it. To do this, I assign a text value to a variable function parameters and use macrosubstitutions. But something did not happen. Now I think that just using CASE and I was quite satisfied

Post Reply