freenode/#clasp - IRC Chatlog
Search
10:17:28
frgo
Here goes: Say I need to describe the capabilities and functionality of a physical device - in my case a "transceiver" (= receiver and transmitter).
10:18:53
frgo
A transceiver may have capabilities, such as "receiving from 10 kHz to 30 MHz", "J3E Single Side Band Modulation/ Demodulation",
10:20:03
frgo
and components, such as "Automated Antenna Tuner", "Antenna Selector with 4 Antenna Connectors".
10:21:24
frgo
How would you describe this in a lispy way? I mean, how would one describe this in a config file that is read by the device's controller software?
10:25:06
frgo
(define-component antenna-tuner (transceiver-component) :name "ATU" :id :atu-1 :capabilities (:frequency-range 10 :kHz 30 :MHz))
11:17:11
Shinmera
I don't know what your program does, but it seems to me like having a class describing each capability, and then using multiple inheritance to combine the caps into a device class would fit.
11:21:36
frgo
ah yes, sure. I see my question wasn't phrased correctly. I was looking for a DSL or another way of describing the configuration. The program is a front end to the device - it let's the user control the device. Approach is to dynamically create the user interface based on the device's capabilities and installed components.