The Device Server Signal Interface
But, today the HDB signal library still needs for dynamic loading one module for each device class. It is just a question of copy and paste to install such a module for a device class using the signal interface, but it implies recompilation of the HDB signal library. Studies are going on to change this to avoid recompilation and reinstallation of the HDB signal library in the future.
Here is an example module for the HDB signal library. This can be copied, but the function names must be changed to the class name the new module will be used for.
#include <API.h> #include <siggen.h> /* * function prototypes */ long RF_FOCUS_load_type (long *error); long RF_FOCUS_signal_list_init (char *device_name, SigDefEntry **signal_list_ptr, long *n_signal, long *error); extern long signal_list_init (char *device_name, SigDefEntry **signal_list_ptr, long *n_signal, long *error); /* * The load type function */ long RF_FOCUS_load_type (long *error) { return (DS_OK); } /* * Dynamic signal initialisation function. * Uses signals defined on the device server level. */ long RF_FOCUS_signal_list_init (char *device_name, SigDefEntry **signal_list_ptr, long *n_signal, long *error) { /* * calls the general signal init function, which is * used for all classes which implement signals on * the device server level. */ if ( signal_list_init (device_name, signal_list_ptr, n_signal, error) == DS_NOTOK ) { return (DS_NOTOK); } return (DS_OK); }
Generated with Harlequin WebMaker