Howto:Port I/O from Nasal: Difference between revisions

Jump to navigation Jump to search
m
Line 33: Line 33:
On the pc side of things I would strongly suggest forgetting about C/C++ unless you really, really prefer it and/or have no choice. It is going to be much more complex doing serial and/or network programming in straight C/C++. Using a serial device properly requires more than just 'fopen'ing it, except in the most simple of cases, and can be quite tedious and complex using straight C system calls...networking as well. Personally I recommend using a higher level language (I use Python) that will make your life so much easier and allow you to get things done quickly and easily without hassles of low level details.
On the pc side of things I would strongly suggest forgetting about C/C++ unless you really, really prefer it and/or have no choice. It is going to be much more complex doing serial and/or network programming in straight C/C++. Using a serial device properly requires more than just 'fopen'ing it, except in the most simple of cases, and can be quite tedious and complex using straight C system calls...networking as well. Personally I recommend using a higher level language (I use Python) that will make your life so much easier and allow you to get things done quickly and easily without hassles of low level details.


For your data processing needs (formatting, conversion, marshalling, compression etc), you can use a combination of the sprintf() library function, and the bits.nas module in $FG_ROOT/bits.nas
For your data processing needs (formatting, conversion, marshalling, compression etc), you can use a combination of the sprintf() library function, and the [http://gitorious.org/fg/fgdata/blobs/master/Nasal/bits.nas bits.nas module in $FG_ROOT/bits.nas].


<syntaxhighlight lang="php">
<syntaxhighlight lang="php">

Navigation menu