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

Jump to navigation Jump to search
m
mNo edit summary
Line 3: Line 3:
= Introduction =
= Introduction =


You can't really directly 'access' a device from nasal. What you'll most likely want to do is define a [[Generic Protocol]] for the properties you're interested in sending between fgfs and your device. You can configure FlightGear to use that protocol directly with your serial device, through network to secondary program which handles serial, etc.  
You can't really 'access' a device from nasal directly. What you'll most likely want to do is define a [[Generic Protocol]] for the properties you're interested in sending between fgfs and your device. You can configure FlightGear to use that protocol directly with your serial device, through network to secondary program which handles serial, etc.  
Of course, in flightgear, you can then use nasal to handle and modify the properties being sent/received by whatever logic you desire.
 
Of course, in FlightGear, you can then use nasal to handle and modify the properties being sent/received by whatever logic you desire.


So just because there's no low level "function" available to do something from Nasal, that doesn't necessarily mean it cannot be done. This doesn't just apply to networking I/O or serial port access: There's also no dedicated Nasal command to play sounds, control AI traffic, place clouds etc - yet, we can do all of these things, by leveraging dedicated subsystems which are invoked/interfaced to via the property tree.
So just because there's no low level "function" available to do something from Nasal, that doesn't necessarily mean it cannot be done. This doesn't just apply to networking I/O or serial port access: There's also no dedicated Nasal command to play sounds, control AI traffic, place clouds etc - yet, we can do all of these things, by leveraging dedicated subsystems which are invoked/interfaced to via the property tree.

Navigation menu