ts-7000
[Top] [All Lists]

[ts-7000] Re: decode can massage - TSCAN1

To:
Subject: [ts-7000] Re: decode can massage - TSCAN1
From: Joel Morgan <>
Date: Wed, 14 Dec 2011 09:48:31 -0600



On Dec 14, 2011 2:40 AM, "Zhang Jing" <> wrote:
>
>  
>
> hi, Joel,
>  
> I have read the read() and write() API, meanwhile I read readburst.c. If I wanna read the message from the userspace, I must call read() like:
> struct canmsg_t &readmsg;
> ret=read(fd,&readmsg,sizeof(can_msg));
> if(readmsg.id==0x305){
>     for(i=0;i<readmsg.length,i++)
>        can_data[i] = readmsg.data[i];}
>  
> My destination is: you know a model is running in the EP9302, then I wanna transfer the 8 byte data to the model and then make some computations, after that, send some data back to the can bus. Is my saying write?
>  

Rod said it much better than I could have.

Just one thing to add: Be careful about queue overflows on the sja1100. It has 8 receive and send buffers I think. First, design (or use) a good higher protocol that doesn't flood the bus with useless messages and fill the queues before you can empty them. Second, use the filters on the sja1100 if possible. Lastly, in busoff you can still write() and eventually fill the transmit buffer.

Regards,
-joel



__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU