My approach. The core is the engine. - page 82

 
Andrey Barinov:

Global variables? Files?

No. Global variables are only of type double. Files - load the disk. Resources - only of int type. If you put a drawn panel into tester, information will go to the table cells, but OnChartEvent() won't work...

In short, there is a deadlock everywhere. Only communication objects give a normal output.

 
Реter Konow:

Resources - int type only.

Peter, I've already told you - learn union.

Then the fact that resources are uint will not matter.

 
Nikolai Semko:

Peter, I've already told you - master union.

Then the fact that resources are uint will not matter.

Well, if with union you can use resources to pass string type, I will gladly do it. I don't learn anything for nothing. It's silly. Only if there is a practical benefit. I didn't see any benefit in this union. What's the point if you don't need it? But if it can be used to solve the problem... That's cool. I just don't think so...

 
Nikolai Semko:

Peter, I've already told you - master union.

Then the fact that resources are uint will not matter.

It's not clear from that example how to write a string of 640 characters (on average, - message size to transfer table data from EA to engine) to a resource, using union.


ZS. I don't mean a simple conversion. But how to turn this "234345238904fkjhflqqwerqowjkefh10348rfh0348fgh2iofgh10348rf7ty1034f8gh12034fg7812034f82gh0f78h" into uint and write it to a resource using union.

 
Реter Konow:

I just don't think...

Well - keep doubting.

Konow tag:

Show me an example of uint to string conversion. (If it's not an idle talk about importance of things you don't need...).

If you're too lazy to open the reference, I'll do it for you. There's nothing to learn here:

Объединение (union)

Объединение – это особый тип данных, который состоит из нескольких переменных, разделяющих одну и ту же область памяти.  
Следовательно, объединение обеспечивает возможность интерпретации одной и той же последовательности битов двумя (или более) различными способами. 
Объявление объединения подобно объявлению структуры и начинается с ключевого слова union.

Only girls use thongs.

Normal guys use the uchar array.

The CharArrayToString andStringToCharArray functions were invented for normal guys.

 
Nikolai Semko:

Well - hesitate further.

If you're too lazy to open help, I'll do it for you. There's nothing to learn here:

Only girls use thongs.

Normal guys use an array of uchar.

The CharArrayToString and StringToCharArray functions were invented for normal guys.


So, normal guys work like sheep. They translate from char to string and then back again, in program communication flow, when they have to transfer hundreds of characters from one program to another on a timer event (25ms)... Well, well...))

I haven't tested this solution for speed, but I think it will slow down a lot...

 
Реter Konow:

I mean, normal guys work like sheep. Transferring from char to string and then back again, in the flow of program communication, when you need to transfer hundreds of characters from one program to another on a timer event (25ms)... Well, well...))

I haven't tested this solution for speed, but I think it would be very slow...

What does timer have to do with it? It's about transferring arrays of different types of data through a resource.
 
Nikolai Semko:
What's the timer got to do with it? It's about transferring arrays of different types of data through a resource.

This is about solving a specific problem. This is not an academic discussion about the usefulness of African flower pollen to South American butterflies. We need a concrete and efficient solution for transferring strings of hundreds of characters between programs, with a minimum of packing/unpacking.

If union can help, cool. But, I doubt it...

 
The engine and the advisor work in a communication flow. Each cell in the table is a number of simovalves. On top of that, there are a lot of other elements that pass their values, states, and so on. We need to exchange rows quickly and not to load OnChartEvent() event queue.
 
Реter Konow:

This is about solving a specific problem. This is not an academic discussion about the usefulness of African flower pollen to South American butterflies. We need a concrete and efficient solution for transferring strings of hundreds of characters between programs with minimal packing/unpacking.

If union can help, cool. But I doubt it...

Are you telling me you have no idea how to do this with resources and union?
I assure you this is the quickest solution.
Let's get your head around it.
Reason: