Pumpkin, Inc.

Pumpkin User Forums

Message Queue

If you can't make Salvo do what you want it to do, post it here.

Message Queue

Postby Salvo Tech Support » Tue Feb 13, 2001 6:50 am

Hi ChrisV.

Did I answer your question at http://www.pumpkininc.com/ubb/Forum7/HTML/000048.html?

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am

Re: Message Queue

Postby ChrisV » Tue Feb 13, 2001 10:21 am

On Page 247
OSSignalmsgQ(MSGQ5, (OStypeMsgQ) &commands[2]);
OSSignalMsgQ(MSGQ5, (OStypeMsgQ) &commands[3]);

In my program :
void task_convert

OSSignalMsgQ(ALARM,(OStypeMsgQ) &temp1);
OSSignalMsgQ(ALARM,(OStypeMsgQ) &al_zone[0]);

void task_alarm

unsigned char alarm_temp;
unsigned char alarm_zone;
OS_WaitMsgQ(ALARM, &tempP, task_alarm_on1);
alarm_temp = *(char*) tempP;
OS_WaitMsgQ(ALARM, &al_zoneP,task_alarm_on2);
alarm_zone = *(char*) al_zoneP;

This is not working for me, the fisrt message(tempP) is passed to the alarm task, but the next message(al_zoneP) does not pass the correct data.

#define OSMESSAGE QUEUE 1
const char al_zone[4] = {1,2,3,4};

ChrisV
 
Posts: 10
Joined: Wed Jan 24, 2001 12:00 am
Location: Chandler, AZ

Re: Message Queue

Postby luben » Tue Feb 13, 2001 11:45 am

Hello,

Excuse me, but from the first view I see mistake.

quote:

void task_convert

OSSignalMsgQ(ALARM,(OStypeMsgQ) &temp1);
OSSignalMsgQ(ALARM,(OStypeMsgQ) &al_zone[0]);

void task_alarm


(OStyeMsgQ) is incorrect typecasting - you should use (OStypeMsgP)

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: Message Queue

Postby ChrisV » Tue Feb 13, 2001 12:14 pm

Your right, that was a mistake on my part, but in my code it is correct
quote:
Originally posted by luben:
Hello,

Excuse me, but from the first view I see mistake.

(OStyeMsgQ) is incorrect typecasting - you should use (OStypeMsgP)

Regards
Luben


ChrisV
 
Posts: 10
Joined: Wed Jan 24, 2001 12:00 am
Location: Chandler, AZ

Re: Message Queue

Postby ChrisV » Wed Feb 14, 2001 8:07 am

Thank you , you have answered my question.
quote:
Originally posted by Salvo Tech Support:
Hi ChrisV.

Did I answer your question at http://www.pumpkininc.com/ubb/Forum7/HTML/000048.html?


ChrisV
 
Posts: 10
Joined: Wed Jan 24, 2001 12:00 am
Location: Chandler, AZ


Return to Coding

Who is online

Users browsing this forum: No registered users and 2 guests

cron