Hi to all!
I have done an actor based framework in c++. My intent is to use it to programming the avr microcontrollers and in general to programm the embedded systems.
Actually, i have tested it on an Arduino Mega2560 and it seem to work, but i have some proble and i need some other tests.
I have some problems and some doubts about this framework. Let me tell you about my problem.
This framework use a message exchange system to communicate between the actors, so in the message class i have a property that I called data.
I have choose to use a void pointer type for this class property. The problem is that when i put some data in a message (example a unsigned char),
the actor that receive this message doesn't read correctly this data. For example if i put a unsigned char of value of 5, the actor that receive the message read a value of 33.
I think to use correctly the semantic of the void type, but i don't know why the actor receive a wrong value. Can suggest me some solution or test about this problem? Arduino framework can play a role about this error?
The second problem is that i have organized the code in some folders. Now if i would to use my framework, i have to do a copy of this folders in every project.
I have read about the static library, so i have create a solution in Atmel Studio 7 to make a static library. I'm able to compile this solution and i obtain a .a file.
The problem is that i'm unable to use this static library in a new project. I think that i import this file correctly in the Atmel studio 7, but when i try to compile the solution i obtain an error.
I don't know if this error is due to linker that don't find the file .a or if the error is due to my mistake to include this library in my file.
I have tryed to import the library using #include "ClassHeader.h", #include"folderStructure/ClassHeader.h" but i'm not was lucky.
Can you suggest me the correct procedure on how i make a static library and how i include it in a new project?
What do you thinks about this framework? Is this a correct framework to work with the embedded system? Can you suggest me some alternative or some other solution like this?