Pumpkin, Inc.

Pumpkin User Forums

message Queues

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

message Queues

Postby eh1_24 » Sun Jun 25, 2006 1:39 am

i have trouble grasping the technique of message queues... can any1 provide me.. with a simple coding.. that reads or stores message queues..
eh1_24
 
Posts: 2
Joined: Sat Jun 24, 2006 11:00 pm
Location: delahey

Re: message Queues

Postby fil323 » Sun Jun 25, 2006 1:56 am

i have the same query
hi
fil323
 
Posts: 14
Joined: Sat Jun 24, 2006 11:00 pm

Re: message Queues

Postby Code_Nerd » Sun Jun 25, 2006 3:39 am

Check out my code in this thread..

It just reads in 10 values from PORTB and adds them to MsgQ, another task then reads back the 10 values and totals them..

Code_Nerd
 
Posts: 24
Joined: Sun Apr 23, 2006 11:00 pm

Re: message Queues

Postby eh1_24 » Sun Jun 25, 2006 4:36 am

thanks alot many thanks ...Code_Nerd
eh1_24
 
Posts: 2
Joined: Sat Jun 24, 2006 11:00 pm
Location: delahey

Re: message Queues

Postby fil323 » Sun Jun 25, 2006 4:51 am

hey Code_nerd, thanks for the help man, i just seem to always get stuck with this error though.

I compiled your code and got the following:

Errors and 1 warning:

C:Uni Year 3DigitalResearch topiccodenerd.c:49:Error [1105] symbol 'OSmqcbArea' has not been defined

49:Error [1129] [] operator requires a pointer and an integer as operands

49:Error [1101] lvalue required

49:Warning [2054] suspicious pointer conversion


All the errors pointed to:

OSCreateMsgQ(MSGQ_P, MSGQCB_P, MsgQBuff, SIZE_OF_MSGQ);

thats located in your main().

Any help would be appreciated

hi
fil323
 
Posts: 14
Joined: Sat Jun 24, 2006 11:00 pm

Re: message Queues

Postby fil323 » Sun Jun 25, 2006 5:47 am

cool that seems to have done the trick...BUT now i get this error when compiled:

Error - could not find definition of symbol 'OSmqcbArea' in file 'C:Uni Year 3DigitalTraffic LightLAB4final lab 4codenerd.o'.
Errors : 1

hi
fil323
 
Posts: 14
Joined: Sat Jun 24, 2006 11:00 pm

Re: message Queues

Postby aek » Sun Jun 25, 2006 6:56 am

Have you set OSMESSAGE_QUEUES to a non-zero number in your salvocfg.h?

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: message Queues

Postby aek » Sun Jun 25, 2006 7:35 am

Is Salvo's mem.c present in your project?

Full build results (and the complete salvocfg.h) plus the actual code are what are needed to get a "complete picture" to be able to help you.

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: message Queues

Postby fil323 » Sun Jun 25, 2006 10:59 am

yea man i have added mem.c, I still get that error though.

I use the actual file name.c and mem.c as added sources...but still the same error

hi
fil323
 
Posts: 14
Joined: Sat Jun 24, 2006 11:00 pm

Re: message Queues

Postby aek » Tue Jun 27, 2006 7:10 am

quote:
Full build results (and the complete salvocfg.h) plus the actual code are what are needed to get a "complete picture" to be able to help you.

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Next

Return to Coding

Who is online

Users browsing this forum: No registered users and 5 guests

cron