Page 1 of 2

message Queues

PostPosted: Sun Jun 25, 2006 1:39 am
by eh1_24
i have trouble grasping the technique of message queues... can any1 provide me.. with a simple coding.. that reads or stores message queues..

Re: message Queues

PostPosted: Sun Jun 25, 2006 1:56 am
by fil323
i have the same query

Re: message Queues

PostPosted: Sun Jun 25, 2006 3:39 am
by Code_Nerd
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..


Re: message Queues

PostPosted: Sun Jun 25, 2006 4:36 am
by eh1_24
thanks alot many thanks ...Code_Nerd

Re: message Queues

PostPosted: Sun Jun 25, 2006 4:51 am
by fil323
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


Re: message Queues

PostPosted: Sun Jun 25, 2006 5:47 am
by fil323
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


Re: message Queues

PostPosted: Sun Jun 25, 2006 6:56 am
by aek
Have you set OSMESSAGE_QUEUES to a non-zero number in your salvocfg.h?

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


Re: message Queues

PostPosted: Sun Jun 25, 2006 7:35 am
by aek
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.

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


Re: message Queues

PostPosted: Sun Jun 25, 2006 10:59 am
by fil323
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


Re: message Queues

PostPosted: Tue Jun 27, 2006 7:10 am
by aek
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.

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