Following [1], every process and every process network must reside in a separate file. The same name is used for the process (network) and the corresponding .cc and .h files, although the file names use lower case only:
Port names are standardized as shown in Figure 1 - Figure 3. From these so-called "base names" which are repeated in the table below, the names of the actual parameters, formal parameters and variables of a process or process network are derived. Table 4 shows this for a port called baseName. Variables may be given more appropriate names where applicable.
|
|
The number of print statements in VYA code should be kept to a minimum. Print statements inserted for debugging purposes during module development should be removed prior to acceptance into a library. Two techniques are used for signalling errors caused by improper application of a VYA module in a larger system. Errors in low-rate control parameters are signalled with unconditional print statements, e.g. as in the VYAcheckSize and VYAcheckPrecicion functions. Errors in pixel-rate video data are optionally checked with the assert function, for instance
assert(!((Yin[i] < 0) || (Yin[i] > Ymax))); |
To preserve simulation speed, assert should by default be turned off by defining compiler directive -DNDEBUG in the makefile. For diagnostic purposes, the makefile can also enable a verbose mode through optional compiler directive -DVERBOSE, to be used for instance as follows:
#ifdef VERBOSE cout << fullName() << ": input line length = " << lineLengthIn << endl; #endif |
The fullName function should always be included to identify the issuing process.