next up previous contents
Next: The device destroy Up: Methods Previous: The method finder

The device create function

The convenience function ds__create() is used to create an device of a given device class. The create function serves a special function. A device class is accessed via its devices and not directly. Each device therefore contains a pointer to its class structure. In order for this to be true each device needs to be created and initialised first. A dedicated method exists in each class for doing this (DevMethodCreate). The ds__create() function finds and execute this method for a given class. ds__create() is a special version of the ds__method_finder() which finds and executes the DevMethodCreate for a class. It takes a device class pointer (e.g. aGPowerSupplyClass) and the device's name as parameters and returns a pointer to the created device.

The device create function has following calling syntax -

long ds__create (char *name, void *ptr_ds_class, void *ptr_ds_ptr, long *error)



Andy Goetz
Tue Jan 28 13:58:13 MET 1997