Merge lp:~ralph-lange/epics-appdev/new-promptgroups into lp:~epics-documenters/epics-appdev/3.16

Proposed by Ralph Lange
Status: Superseded
Proposed branch: lp:~ralph-lange/epics-appdev/new-promptgroups
Merge into: lp:~epics-documenters/epics-appdev/3.16
Diff against target: 156 lines (+58/-42)
2 files modified
tex/databaseDefinition.tex (+44/-39)
tex/staticDatabaseAccess.tex (+14/-3)
To merge this branch: bzr merge lp:~ralph-lange/epics-appdev/new-promptgroups
Reviewer Review Type Date Requested Status
EPICS Documentation Team Pending
Review via email: mp+292919@code.launchpad.net

This proposal has been superseded by a proposal from 2016-04-26.

Description of the change

To post a comment you must log in.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tex/databaseDefinition.tex'
2--- tex/databaseDefinition.tex 2016-01-08 17:17:05 +0000
3+++ tex/databaseDefinition.tex 2016-04-26 11:53:58 +0000
4@@ -58,7 +58,7 @@
5 field(field_name, field_type) {
6 asl(asl_level)
7 initial("init_value")
8- promptgroup(gui_group)
9+ promptgroup("gui_group")
10 prompt("prompt_value")
11 special(special_value)
12 pp(pp_value)
13@@ -356,7 +356,7 @@
14 field(field_name, field_type) {
15 asl(as_level)
16 initial("init_value")
17- promptgroup(gui_group)
18+ promptgroup("gui_group")
19 prompt("prompt_value")
20 special(special_value)
21 pp(pp_value)
22@@ -389,7 +389,9 @@
23 \item [initial] Provides an initial (default) value for the field.
24
25 \index{promptgroup -- field descriptor rules}
26-\item [promptgroup] The group to which the field belongs, for database configuration tools.
27+\item [promptgroup] The gui group to which the field belongs, for database configuration tools (DCTs).
28+To support DCTs in sorting the gui groups, the names used in Base start with a two-digit number,
29+followed by a space-dash-space sequence.
30
31 \index{prompt -- field descriptor rules}
32 \item [prompt] A prompt string for database configuration tools.
33@@ -469,42 +471,45 @@
34 \item [prompt\_value] A prompt value for database configuration tools.
35
36 \index{gui\_group -- field definition}
37-\item [gui\_group] This must be one of the following:
38-
39-\begin{itemize}
40-\item \verb|GUI_COMMON|
41-\item \verb|GUI_ALARMS|
42-\item \verb|GUI_BITS1|
43-\item \verb|GUI_BITS2|
44-\item \verb|GUI_CALC|
45-\item \verb|GUI_CLOCK|
46-\item \verb|GUI_COMPRESS|
47-\item \verb|GUI_CONVERT|
48-\item \verb|GUI_DISPLAY|
49-\item \verb|GUI_HIST|
50-\item \verb|GUI_INPUTS|
51-\item \verb|GUI_LINKS|
52-\item \verb|GUI_MBB|
53-\item \verb|GUI_MOTOR|
54-\item \verb|GUI_OUTPUT|
55-\item \verb|GUI_PID|
56-\item \verb|GUI_PULSE|
57-\item \verb|GUI_SELECT|
58-\item \verb|GUI_SEQ1|
59-\item \verb|GUI_SEQ2|
60-\item \verb|GUI_SEQ3|
61-\item \verb|GUI_SUB|
62-\item \verb|GUI_TIMER|
63-\item \verb|GUI_WAVE|
64-\item \verb|GUI_SCAN|
65-
66-This information is for use by Database Configuration Tools.
67-This is defined only for fields that can be given values by database configuration tools.
68-File \verb|guigroup.h| contains all possible definitions.
69-This allows database configuration tools to group fields together by functionality, not just order them by name.
70-This feature has seldom been used, so many record types do not have appropriate values assigned to some fields.
71-
72-\end{itemize}
73+\item [gui\_group] The gui group to which the field belongs, for database configuration tools (DCTs).
74+Gui groups allow DCTs to group fields of a record by functionality, for convenient user access.
75+
76+The gui group is defined only for fields that can be set by DCTs.
77+
78+There is no limited fixed set of allowed groups.
79+Instead, gui group tags are collected when parsing the DBD information, and used to populate a global list.
80+To support sorting and handling of groups, the names used in Base use the following conventions:
81+
82+\begin{itemize}
83+\item Names start with a two-digit number followed by a space-dash-space sequence.
84+This allows consistent sorting of groups.
85+\item In many-of-the-same-kind cases (e.g. 21 similar inputs) fields are distributed over multiple groups.
86+Once-only fields appear in the group that starts with a "major" number (\verb|<n>|0 or \verb|<n>|5).
87+The groups with the multiple instances follow in +1 increments.
88+This allows more sophisticated treatment, e.g. showing the first group open and the other groups collapsed.
89+\end{itemize}
90+
91+Record types may define their specific gui groups.
92+However, to improve consistency, records should use the following groups from Base if possible.
93+(This set also shows an alternative group sharing an existing sorting number.)
94+
95+\begin{itemize}
96+\item [10 - Common] General fields that are common to all or many record types
97+\item [20 - Scan] Scanning mechanism, priority and related properties
98+\item [30 - Action] Record type specific behavior and processing action
99+\item [40 - Link] Links and related properties
100+\item [40 - Input] Input links and properties
101+\item [50 - Output] Output links and properties
102+\item [60 - Convert] Conversion between raw and engineering values
103+\item [70 - Alarm] Alarm related properties, severities and thresholds
104+\item [80 - Display] Client related configuration, strings, deadbands
105+\item [90 - Simulate] Simulation mode related properties
106+\end{itemize}
107+
108+NOTE: Older versions of Base contained a header file \verb|guigroup.h| defining a fixed set of gui groups strings
109+and their matching index numbers.
110+This file has been removed. Instead, the static database access library provides functions to convert between
111+numerical codes and string tags. See \ref{subsec:Get Field Prompt} for details.
112
113 \index{special\_value -- field definition}
114 \item [special\_value] Must be one of the following:
115
116=== modified file 'tex/staticDatabaseAccess.tex'
117--- tex/staticDatabaseAccess.tex 2015-01-28 23:44:33 +0000
118+++ tex/staticDatabaseAccess.tex 2016-04-26 11:53:58 +0000
119@@ -6,7 +6,7 @@
120 EPICS provides two sets of database access routines:
121 Static Database Access and Runtime Database Access.
122 Static database access can be used on Unix or IOC database files.
123-Runtime database requires an initialized IOC databases.
124+Runtime database requires an initialized IOC database.
125 Static database access is described in this chapter, runtime database access in the next chapter.
126
127 Static database access provides a simplified interface to a database, i.e. much of the complexity is hidden.
128@@ -408,16 +408,27 @@
129 does not point to a field or if the default value is NULL.
130
131 \subsection{Get Field Prompt}
132+\label{subsec:Get Field Prompt}
133
134 \begin{verbatim}
135 char *dbGetPrompt(DBENTRY *pdbentry);
136-int dbGetPromptGroup(DBENTRY *pdbentry);
137+int dbGetPromptGroup(DBENTRY *pdbentry);
138+char *dbGetPromptGroupNameFromKey(DBBASE *pdbbase, const short key);
139+short dbGetPromptGroupKeyFromName(DBBASE *pdbbase, const char *name);
140 \end{verbatim}
141
142 \index{dbGetPrompt}
143 \index{dbGetPromptGroup}
144+\index{dbGetPromptGroupNameFromKey}
145+\index{dbGetPromptGroupKeyFromName}
146 The \verb|dbGetPrompt| routine returns the character string prompt value, which provides a short description of the field.
147-\verb|dbGetPromptGroup| returns the field group as described in guigroup.h.
148+\verb|dbGetPromptGroup| returns the field's gui group key.
149+
150+Conversion between the gui group key and the gui group name is provided by two conversion functions.
151+\verb|dbGetPromptGroupNameFromKey| returns a pointer to a static string containing the name of the gui group,
152+\verb|NULL| for an invalid key.
153+\verb|dbGetPromptGroupKeyFromName| returns the numerical key related to the specified gui group string,
154+\verb|0| if the string is not a valid gui group.
155
156 \section{Manipulating Record Attributes}
157

Subscribers

People subscribed via source and target branches