Answer the question
In order to leave comments, you need to log in
What is the difference between C and C++ memory handling?
In general, communication takes place between the PC and the Microcontroller, on both devices the structure is defined
struct typeDateTimeSend{
int hh;
int mm;
int ss;
int dm;
int mh;
int yy;
};
unsigned char *pdata = (unsigned char *)&dateTime //struct typeDateTimeSend{ ;
DateTime = *((struct typeDateTimeSend*)&OutReport[1]); // [0] занят под номер команды
Answer the question
In order to leave comments, you need to log in
Read about serialization. Here, according to the same principle, you need to convert the structure into an unambiguous byte stream, transfer it, and then convert the byte stream back into a structure. So your structures can be arranged differently, but at the same time they will be filled in the same way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question