20,741
edits
mNo edit summary |
m (→Introduction) |
||
| Line 9: | Line 9: | ||
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. | 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]] scripting to handle and modify the properties being sent/received by whatever logic you desire. | Of course, in FlightGear, you can then use [[Nasal]] scripting to handle and modify the properties being sent/received by whatever logic you desire. | ||
This feature alone makes it possible to circumvent many restrictions of the [[Generic Protocol]], so that the protocol spec itself just boils down to transmitting and receiving a single "string" property, which in turn is entirely controlled and modified from scripting space. | |||
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. | ||