C.4.1 Function Pointers for Customization
Each major mode is characterized by a set of function pointers or methods, which define
how certain critical operations are to be carried out.
The main RVP threads are governed by the following methods:
struct rvp9MainMajorMode { /* Customized processing routines */
privateData_t*privateData ;
exitMajorMode_f *exitMajorMode ;
initProcSection_f *initProcSection ;
exitProcSection_f *exitProcSection ;
rtCtrlCBF_f *rtCtrlCBF ;
iNominalTrigSequence_f *iNominalTrigSequence ;
iCustomTrigSequence_f *iCustomTrigSequence ;
customUserOpcode_f*customUserOpcode ;
cwpulseMatchedFilter_f *cwpulseMatchedFilter ;
iTxWaveformDesign_f *iTxWaveformDesign ;
rawPulseCorrections_f *rawPulseCorrections ;
rawPulseCorrections_f *targetSimulator ;
lConfigError_f *lConfigError ;
lFindNextCPI_f*lFindNextCPI ;
lCheckupCPI_f*lCheckupCPI ;
lAssignProcsInCPI_f *lAssignProcsInCPI ;
setupProcBins_f *setupProcBins ;
lAnalyzeBurstPhseq_f *lAnalyzeBurstPhseq ;
getAzElPosBtime_f *getAzElPosBtime ;
sampleLiveAzElPos_f *sampleLiveAzElPos ;
insertLiveAzElPos_f *insertLiveAzElPos ;
frontPanelDisplay_f *frontPanelDisplay ;
} ;
This structure allows new objects to inherit existing properties of old objects, while still
permitting individual personality to enter as needed. RVP is written in standard C, and uses
function pointer replacement to accomplish customization.
The initMajorMode() routine, which creates each major mode in the first place, is not
part of this list because it is separately invoked (see C.4 Creating New Major Modes from Old
Ones (page 382)) in order to
first establish the list.
For descriptions of the methods, see rvp9main.h and rvp9proc.h.
Table 114 Summary of Customization Methods
Method Description
privateData_t
Each major mode can allocate a private data area for whatever memory resources are
required during the operation of that mode.
This private area is created and prepared by the initMajorMode() routine as part
of its filling in the entire list ofmethods at the start of each major mode.
The exitMajorMode() handler is responsible for releasing all private memory
resources.
Appendix C – RVP900 Developer Notes
383