hello Joel,
how kind of you to give me these suggestions, thank you, maybe I can write my
application code in light of readburst.c. Meanwhile I come up with 2 new
questions, so could you please give your opinions about them. Thank you in
advance
regards
ZHANG Jing
--- In Joel Morgan <> wrote:
>
> 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
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|