ts-7000
[Top] [All Lists]

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

To:
Subject: [ts-7000] Re: decode can massage - TSCAN1
From: Rod Nussbaumer <>
Date: Wed, 14 Dec 2011 07:02:57 -0800
ZAHNG Jing:

The code you show does exactly what you state as your objective. If 
there is something more that you want to do, then I don't understand; 
perhaps restate your requirements in some different terminology.

The read() call gets one message, with the data field populated with the 
data read from the CAN bus. You can copy that data to 
application-specific variables, and use the data in whatever way is 
appropriate to your application. Sending data on the CAN bus is 
essentially the opposite. Populate the data (and other) fields of the 
canmsg_t structure, and pass the structure to the write() function.

This is pretty much the standard way of using character device drivers 
in Linux. Devices are abstracted as files, and we open(), read(), 
write() and close() them. The data we read and write is the data from 
the device or that we send to the device. The driver makes it easy to 
access the device by treating it like a file. This is all done in 
userspace code. The driver runs in kernel space, and the read() and 
write() functions perform the work of transferring the data between the 
application and the kernel driver. Nothing in this paragraph describes 
anything that is TS-73xx, ARM, or CANbus specific.

    ---   rod.



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

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/

<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