Click here to Skip to main content
14,774,665 members
Home » Discussions » ATL / WTL / STL
   

ATL / WTL / STL

 
PinnedHOW TO ANSWER A QUESTION PinPopular
Chris Maunder16-Jul-09 4:09
cofounderChris Maunder16-Jul-09 4:09 
PinnedHow to get an answer to your question PinPopular
Chris Maunder16-Jul-09 4:05
cofounderChris Maunder16-Jul-09 4:05 
QuestionHow can I get access to CXXView variables from a Parent Class in MFC Pin
Member 1503370419-Jan-21 8:34
MemberMember 1503370419-Jan-21 8:34 
AnswerRe: How can I get access to CXXView variables from a Parent Class in MFC Pin
Victor Nijegorodov19-Jan-21 21:52
MemberVictor Nijegorodov19-Jan-21 21:52 
GeneralRe: How can I get access to CXXView variables from a Parent Class in MFC Pin
Member 1503370420-Jan-21 0:13
MemberMember 1503370420-Jan-21 0:13 
GeneralRe: How can I get access to CXXView variables from a Parent Class in MFC Pin
Victor Nijegorodov20-Jan-21 9:10
MemberVictor Nijegorodov20-Jan-21 9:10 
GeneralRe: How can I get access to CXXView variables from a Parent Class in MFC Pin
Member 1503370421-Jan-21 6:58
MemberMember 1503370421-Jan-21 6:58 
Questioncode of this question Pin
avadhnaresh kushwaha12-Aug-20 9:17
Memberavadhnaresh kushwaha12-Aug-20 9:17 
AnswerRe: code of this question Pin
Richard MacCutchan12-Aug-20 9:19
mveRichard MacCutchan12-Aug-20 9:19 
QuestionKeypad locks Pin
Member 79891227-Mar-20 14:23
MemberMember 79891227-Mar-20 14:23 
QuestionTo insert a node at the back of a XOR doubly linked list Pin
Tarun Jha17-Oct-19 10:38
MemberTarun Jha17-Oct-19 10:38 
AnswerRe: To insert a node at the back of a XOR doubly linked list Pin
ZurdoDev10-Jan-20 2:02
professionalZurdoDev10-Jan-20 2:02 
QuestionWhy non-template function does not compile where as template function compiles? Pin
PBMBJoshi3-May-19 0:23
MemberPBMBJoshi3-May-19 0:23 
AnswerRe: Why non-template function does not compile where as template function compiles? Pin
Richard MacCutchan3-May-19 0:29
mveRichard MacCutchan3-May-19 0:29 
AnswerRe: Why non-template function does not compile where as template function compiles? Pin
k505410-Oct-19 9:53
mvek505410-Oct-19 9:53 
QuestionAdvice on interdependent asynchronous functions and task queuing? Pin
arnold_w8-Feb-19 0:07
Memberarnold_w8-Feb-19 0:07 
AnswerRe: Advice on interdependent asynchronous functions and task queuing? Pin
arnold_w8-Feb-19 0:34
Memberarnold_w8-Feb-19 0:34 
QuestionRecommended way to deal with queues and pointers to buffers Pin
arnold_w3-Feb-19 10:09
Memberarnold_w3-Feb-19 10:09 
I am working with embedded programming in standard C and there are 2 microcontrollers communication with each other using a home-made protocol. The scheduler and task queues are also home-made so no realtime operating system is used. My tasks look like this:
void (*task_t)(uint8_t* taskData, uint16_t sizeOfTaskDataInBytes);
My add-task-to-queue-function looks like this:
Bool_t addTaskToQueue(queueSelector_e, task_t, uint8_t* taskData, uint16_t sizeOfTaskDataInBytes);
Please note that the taskData is also inserted into the queue (in an area called task data pool area) so it's not just a pointer to taskData that is being queued. The task data to write data from microcontroller 1 to microcontroller 2 needs to look something like this:
struct writeRegTaskData_s {
    uint32_t startAddr;
    uint16_t numRegsToWrite;
    uint8_t dataToWrite[numRegsToWrite]; // When I want the data to be put inside the queue as well
or
    uint8_t* dataToWrite // When I have a big static buffer that I don't want to put inside the queue
}
The problem is with the dataToWrite parameter. Sometimes a lot of data will be written, for example, during a firmware upgrade, and then it's overkill to put all the dataToWrite into the queue, it's perfectly fine to have one static buffer. At other times, for example when reacting to different push button events, I want to put my dataToWrite on the stack and then add it into my task queue. However, when I do this, I must make sure dataToWrite points to the proper location inside my task queue data pool and not on the original buffer on the stack. What's the recommended way to solve this issue in a clean way?
AnswerRe: Recommended way to deal with queues and pointers to buffers Pin
Richard MacCutchan3-Feb-19 23:19
mveRichard MacCutchan3-Feb-19 23:19 
GeneralRe: Recommended way to deal with queues and pointers to buffers Pin
arnold_w4-Feb-19 0:40
Memberarnold_w4-Feb-19 0:40 
GeneralRe: Recommended way to deal with queues and pointers to buffers Pin
Richard MacCutchan4-Feb-19 0:48
mveRichard MacCutchan4-Feb-19 0:48 
GeneralRe: Recommended way to deal with queues and pointers to buffers Pin
arnold_w4-Feb-19 4:15
Memberarnold_w4-Feb-19 4:15 
GeneralRe: Recommended way to deal with queues and pointers to buffers Pin
Richard MacCutchan4-Feb-19 4:46
mveRichard MacCutchan4-Feb-19 4:46 
GeneralRe: Recommended way to deal with queues and pointers to buffers Pin
arnold_w4-Feb-19 4:55
Memberarnold_w4-Feb-19 4:55 
GeneralRe: Recommended way to deal with queues and pointers to buffers Pin
Richard MacCutchan4-Feb-19 5:04
mveRichard MacCutchan4-Feb-19 5:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.