Merge lp:~epics-documenters/epics-appdev/ioc-shutdown into lp:~epics-documenters/epics-appdev/3.16

Proposed by Ralph Lange
Status: Merged
Merged at revision: 60
Proposed branch: lp:~epics-documenters/epics-appdev/ioc-shutdown
Merge into: lp:~epics-documenters/epics-appdev/3.16
Diff against target: 60 lines (+24/-1)
2 files modified
tex/generalPurposeTasks.tex (+4/-1)
tex/libCom.tex (+20/-0)
To merge this branch: bzr merge lp:~epics-documenters/epics-appdev/ioc-shutdown
Reviewer Review Type Date Requested Status
Andrew Johnson Needs Fixing
Review via email: mp+190513@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Andrew Johnson (anj) wrote :

Docs need revising to cover the ioc-shutdown2 changes.

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tex/generalPurposeTasks.tex'
--- tex/generalPurposeTasks.tex 2010-11-15 18:16:16 +0000
+++ tex/generalPurposeTasks.tex 2013-10-11 00:45:39 +0000
@@ -127,6 +127,7 @@
127The following calls are provided:127The following calls are provided:
128128
129\index{callbackInit}129\index{callbackInit}
130\index{callbackShutdown}
130\index{callbackSetCallback}131\index{callbackSetCallback}
131\index{callbackSetPriority}132\index{callbackSetPriority}
132\index{callbackSetUser}133\index{callbackSetUser}
@@ -141,6 +142,7 @@
141Notes:142Notes:
142\begin{verbatim}143\begin{verbatim}
143void callbackInit(void);144void callbackInit(void);
145void callbackShutdown(void);
144146
145void callbackSetCallback(void *pcallbackFunction,147void callbackSetCallback(void *pcallbackFunction,
146 CALLBACK *pcallback);148 CALLBACK *pcallback);
@@ -160,7 +162,8 @@
160\end{verbatim}162\end{verbatim}
161163
162\begin{itemize}164\begin{itemize}
163\item \verb|callbackInit| is performed automatically at IOC initialization, thus user code never calls this function.165\item \verb|callbackInit| and \verb|callbackShutdown| are performed automatically at IOC initialization or shutdown,
166thus user code never calls these functions.
164167
165\item \verb|callbackSetCallback|, \verb|callbackSetPriority|, \verb|callbackSetUser|, and \verb|callbackGetUser| are 168\item \verb|callbackSetCallback|, \verb|callbackSetPriority|, \verb|callbackSetUser|, and \verb|callbackGetUser| are
166actually macros.169actually macros.
167170
=== modified file 'tex/libCom.tex'
--- tex/libCom.tex 2012-01-17 18:04:20 +0000
+++ tex/libCom.tex 2013-10-11 00:45:39 +0000
@@ -1567,6 +1567,26 @@
1567call to the runTestFunc() routine.1567call to the runTestFunc() routine.
1568The last test program or the harness program itself must finish by calling epicsExit() which triggers the test summary mechanism to generate its result outputs (from an epicsAtExit callback routine).1568The last test program or the harness program itself must finish by calling epicsExit() which triggers the test summary mechanism to generate its result outputs (from an epicsAtExit callback routine).
15691569
1570Some tests require the context of an IOC to be run. This conflicts with the idea of running multiple tests within a test harness, as iocInit() is only allowed to be called once, and some parts of the full IOC (e.g., the rsrv CA server) can not be shut down cleanly.
1571The function iocBuildNoCA() allows to start an IOC without its Channel Access parts, so that it can be shutdown quite cleany using iocShutdown(). This feature is only intended to be used from test programs. Do not use it on productional IOCs. After building the IOC using iocBuildNoCA() or iocBuild(), it has to be started by calling iocRun(). The suggested call sequence in a test program that needs to run the IOC without Channel Access is:
1572
1573\begin{verbatim}
1574#include "iocInit.h"
1575
1576MAIN(iocTest)
1577{
1578 iocBuildNoCA() || iocRun();
1579
1580[... test code ...]
1581
1582 iocShutdown();
1583 dbFreeBase(pdbbase);
1584 registryFree();
1585 pdbbase = NULL;
1586 return testDone();
1587}
1588\end{verbatim}
1589
1570To make it easier to create a single test program that can be built for both the embedded and workstation operating system harnesses, the header file \verb|testMain.h| provides a convenience macro MAIN() that adjusts the name of the test program according to the platform it is running on: main() on workstations and a regular function name on embedded systems.1590To make it easier to create a single test program that can be built for both the embedded and workstation operating system harnesses, the header file \verb|testMain.h| provides a convenience macro MAIN() that adjusts the name of the test program according to the platform it is running on: main() on workstations and a regular function name on embedded systems.
15711591
1572\index{testMain.h}1592\index{testMain.h}

Subscribers

People subscribed via source and target branches

to all changes: