Restructorizing
Posted: Thu Jul 12, 2012 12:28 pm
Hello Folks,
I was afraid that this day will come, but it must be done now.
As you all might know, the library needs to be completely over worked.
One of the main problems is the memory usage. As Giovanni supposed, I guess the best solution is to make a wrapper / server. Every function which needs to access the LCD (write or read it's RAM) will communicate to that server. The server will then queue all the requests and do the job. This does not only solve memory problems, but also helps to make everything threadsafe.
Another problem is that many of the functions calls do have to many arguments and would need even more in the future. I was thinking of using configurations struct, which would be passed to the functions. I never liked that kind of configuration, but I guess is a good solution here and it would meet the ChibiOS standard.
The next problem is the GUI abstraction layer. We all want a very nice GUI. The current implementation is just a part of the library because I needed a quick solution for some real project. The GUI abstratction layer should become more 'objective' like Qt and similar library do it:
Or something like that.
But I guess before we can start thinking about the GUI, we need to fix the two points above.
So, heres the main problem: I never did such a big thing. I don't have any knowlege how to design all the server stuff etc. Please help me
I've no problem to give write access to the repository to some co-maintainer or whatever, if anybody got enough time and interests to work on the library.
I am open for any kind of other critism and ideas too.
~ Tectu
I was afraid that this day will come, but it must be done now.
As you all might know, the library needs to be completely over worked.
One of the main problems is the memory usage. As Giovanni supposed, I guess the best solution is to make a wrapper / server. Every function which needs to access the LCD (write or read it's RAM) will communicate to that server. The server will then queue all the requests and do the job. This does not only solve memory problems, but also helps to make everything threadsafe.
Another problem is that many of the functions calls do have to many arguments and would need even more in the future. I was thinking of using configurations struct, which would be passed to the functions. I never liked that kind of configuration, but I guess is a good solution here and it would meet the ChibiOS standard.
The next problem is the GUI abstraction layer. We all want a very nice GUI. The current implementation is just a part of the library because I needed a quick solution for some real project. The GUI abstratction layer should become more 'objective' like Qt and similar library do it:
Code: Select all
Button b = createButton(x,y,text,name);
SetEventHandler(b, CLICK, buttonClickedFunc);
Or something like that.
But I guess before we can start thinking about the GUI, we need to fix the two points above.
So, heres the main problem: I never did such a big thing. I don't have any knowlege how to design all the server stuff etc. Please help me
I've no problem to give write access to the repository to some co-maintainer or whatever, if anybody got enough time and interests to work on the library.
I am open for any kind of other critism and ideas too.
~ Tectu