Next: Private (P.h) include
Up: Objects In C
Previous: ESRF devices
Every software project needs a naming convention.
The naming convention adopted for the DSM follows the X Toolkit Intrinsics
naming convention for Widgets.
The main reason for adopting the Xt naming convention is
to be able to use classes in C as they are used in Widgets.
The following guidelines should be followed when writing device servers :
-
Type and procedure names start with uppercase and use capitalization
for compound words.
-
Local procedures (i.e. static in C) are in lowercase and use underscores
for compound words.
-
Variable names are in lower case and can use underscores for compound
words, but don't have to.
-
Structure component names are all in lowercase and
use underscores for compound words.
-
Predefined symbols and constants are in upper case.
-
New device classes start with a capital letter and use uppercase
for compound words.
-
Each device class has a number of C structures associated with it.
Given a new class name AGPowerSupply the following structures and pointers
to structures must be defined:
-
Partial device instance structure AGPowerSupplyPart
-
Complete device instance structure names AGPowerSupplyRec and
_AGPowerSupplyRec
-
Device instance pointer type name AGPowerSupply
-
Partial Class structure name AGPowerSupplyClassPart
-
Complete Class structure names AGPowerSupplyClassRec and
_AGPowerSupplyClassRec
-
Class structure variable aGPowerSupplyClassRec
-
Class pointer variable aGPowerSupplyClass
Andy Goetz
Tue Jan 28 13:58:13 MET 1997