[SLAC Controls Software Group [SLAC Controls Department] [SLAC Home Page]

Go to bottom of page



13.1 FUNCTIONAL REQUIREMENTS. . . . . . . . . . . . . 13-1

13.1.1 The Cable Video Touch Panel. . . . . . . . . . 13-1

13.1.2 The Cable Video Database Records. . . . . . . 13-2

13.1.3 The Software Source Files. . . . . . . . . . . 13-3

13.2 SOFTWARE FUNCTIONAL DESIGN . . . . . . . . . . . 13-4

13.2.1 CAVMINIT . . . . . . . . . . . . . . . . . . . 13-4

13.2.2 CAVMBUTN . . . . . . . . . . . . . . . . . . . 13-4

13.2.2.1 Entry CAVMCHNS - Channel Select. . . . . . . 13-5

13.2.2.2 Entry CAVMMODS - Module Select. . . . . . . 13-5

13.2.2.3 Entry CAVMINPS - Input Select (Implicit Turn

13.2.2.4 Entry CAVMOFFC - Turn Off Channel. . . . . . 13-7

13.2.2.5 Entry CAVMOFFM - Turn Off Module. . . . . . 13-8

13.2.3 CAVMCAMAC . . . . . . . . . . . . . . . . . . 13-9

13.2.4 CAVMCAMER . . . . . . . . . . . . . . . . . . 13-10

13.2.5 CAVMUPDAT . . . . . . . . . . . . . . . . . . 13-12

13.2.6 CAVMDBUPD . . . . . . . . . . . . . . . . . . 13-13 CHAPTER 13 THE CABLE VIDEO SOFTWARE.

13.1 FUNCTIONAL REQUIREMENTS. The Cable Video software enables users to turn on and off Cable Video transmitter modules and to select a Video Channel to broadcast the Input signal. Presently, there are 4 Channels (54, 55, 56 and 58) which are reserved for the Cable Video system. There are currently 10 transmitter modules each with 8 Inputs, although many Inputs are not physically connected to any Video signal. Users communicate their desires to the Cable Video software via the Cable Video touch panel.

13.1.1 The Cable Video Touch Panel. The touch panel consists of 4 sets of buttons, namely :- - The Channel Select Buttons. There is one button for each Channel allowing the user to select the Channel on which he wants to broadcast.


THE CABLE VIDEO SOFTWARE. Page 13-2 - The Module Select Buttons. There is one button for each transmitter allowing the user to select on which module he wants to operate. - The Input Select Buttons. There are 8 of these buttons for each module. Each Input button may have a legend describing the Video input physically connected - if there is no Video input, then there should be no legend on the button. This set of buttons allows the user to select an Input, and implicitly turn ON the selected transmitter. - The Turn Off Buttons. There are 2 of these, namely Turn Off Channel and Turn Off Module. These allow the use to turn off the selected Channel or Module.

13.1.2 The Cable Video Database Records. In order that different users may control the Cable Video System from different Cows or Calfs at the same time, a current description of the state of the system is kept in the Database. The relevent Database entries are :- - TVCH:MODL - The name of the Module currently transmitting on this Channel. - TVCH:HSTA - The Channel hardware status.


THE CABLE VIDEO SOFTWARE. Page 13-3 - TVCH:INPT - The legend of the Input currently being broadcast on this Channel. - TVMD:CTLW - The Camac address of the transmitter Module. - TVMD:DATA - A copy of the data last written to Camac for this transmitter. - TVMD:HSTA - The Module hardware status. - TVMD:INPT - Eight Input legends for this Module. The above Database entries are written and read whenever necessary to ensure both that the DB and the touch panel buttons truly reflect the current Cable Video state as far as is possible.

13.1.3 The Software Source Files. The source files which make up the Cable Video package are :- - CAVMBUTN - the panel button handler - CAVMCAMAC - the Camac access routine - CAVMCAMER - the Camac error processor - CAVMDBUPD - the (partial) Database update routine - CAVMINIT - the initialisation routine and - CAVMUPDAT - the panel and internal array update procedure.


THE CABLE VIDEO SOFTWARE. Page 13-4

13.2 SOFTWARE FUNCTIONAL DESIGN

13.2.1 CAVMINIT This module is called by a shadow button when the Cable Video button is pressed on the Index panel. 1. Set up as nothing yet selected. 2. Read DB for Channel and Module status ( TVCH:HSTA and TVMD:HSTA ) 3. First time the SCP is called (or if software is set as inconsistent) :- i. Set up DB Clists for future DB accesses ii. Read DB for Camac hardware addresses (TVMD:CTLW) iii. Get all the transmitter modules' names (DB_MICROUNITS) iv. Write 'Disabled' onto unavailable channel and module buttons 4. Call CAVMUPDAT to update touch panels and internal arrays.

13.2.2 CAVMBUTN CAVMBUTN is the collection of modules which handle the various Cable Video touch panel buttons. There are four collections of buttons in order to enable Channel selection, Module selection, Input selection (which is also implicitly a turn on function) and Turn Off function


THE CABLE VIDEO SOFTWARE. Page 13-5 buttons. Note that each time a button is pressed, a check is made on the software consistency. The consistency state is set inconsistent when the software detects a fatal condition after which it would be at the best pointless, and at the worst dangerous, to allow further Cable Video operations. Such a condition would be a bad Database call resulting in the software not knowing the Transmitter Module names for example. This allows controlled processing of SCP internal software inconsistencies. The entries and software design of CAVMBUTN is as follows :-

13.2.2.1 Entry CAVMCHNS - Channel Select. 1. If the software is inconsistent, then O/P error message and exit. 2. Set no Input selected. 3. If the Channel button name is not recognised, send an error and exit . 4. If the Channel is not available (off-line), O/P an error, set no Channel selected and exit. 5. Call CAVMUPDAT to update touch panels and internal arrays.

13.2.2.2 Entry CAVMMODS - Module Select.


THE CABLE VIDEO SOFTWARE. Page 13-6 1. If the software is inconsistent, then O/P error message and exit. 2. Set no Input selected. 3. If the Module button name is not recognised, send an error and exit . 4. If the Module is not available (off-line), O/P an error, set no Module selected and exit. 5. Call CAVMUPDAT to update touch panels and internal arrays.

13.2.2.3 Entry CAVMINPS - Input Select (Implicit Turn On). 1. If the software is inconsistent, then O/P error message and exit. 2. Call CAVMUPDAT to update touch panels and internal arrays (another COW may also be using this software at the same time). 3. If no Channel or no Module has been slected yet, O/P an error, set no Input selected and exit. 4. If the Input name is not recognised, then send an error and exit. 5. If the selected Channel is currently broadcasting, then :-


THE CABLE VIDEO SOFTWARE. Page 13-7 i. Call CAVMCAMAC in order to turn OFF the module transmitting on the selected Channel. ii. Call CAVMDBUPD to update the Database to the new situation. iii. Call CAVMUPDAT to update the internal arrays and touch panel. 6. If the selected Module is currently transmitting, then :- i. Call CAVMCAMAC in order to turn OFF the selected module. ii. Call CAVMDBUPD to update the Database to the new situation. iii. Call CAVMUPDAT to update the internal arrays and touch panel. 7. Call CAVMCAMAC in order to turn ON the selected transmitter module with the selected Input to broadcast on the selected Channel. 8. Call CAVMDBUPD to update the Database to the new situation. 9. Set no Input selected. 10. Call CAVMUPDAT to update the internal arrays and touch panel.

13.2.2.4 Entry CAVMOFFC - Turn Off Channel.


THE CABLE VIDEO SOFTWARE. Page 13-8 1. If the software is inconsistent, then O/P error message and exit. 2. Call CAVMUPDAT to update touch panels and internal arrays (another COW may also be using this software at the same time). 3. Set no Input selected. 4. If a Channel has not yet been selected, O/P a message to the user and exit. 5. If the selected Channel is not broadcasting, O/P a message to the user and exit. 6. Call CAVMCAMAC in order to turn OFF the module which is transmitting on selected Channel. 7. Call CAVMDBUPD to update the Database to the new situation. 8. Call CAVMUPDAT to update the internal arrays and touch panel.

13.2.2.5 Entry CAVMOFFM - Turn Off Module. 1. If the software is inconsistent, then O/P error message and exit. 2. Call CAVMUPDAT to update touch panels and internal arrays (another COW may also be using this software at the same time).


THE CABLE VIDEO SOFTWARE. Page 13-9 3. Set no Input selected. 4. If a Channel has not yet been selected, O/P a message to the user and exit. 5. If the selected Module is not transmitting, O/P a message to the user and exit. 6. Call CAVMCAMAC in order to turn OFF the selected module. 7. Call CAVMDBUPD to update the Database to the new situation. 8. Call CAVMUPDAT to update the internal arrays and touch panel.

13.2.3 CAVMCAMAC All Camac accesses for the Cable Video package are made via this CAVMCAMAC routine. As you shall see, as well as doing the Camac commands necessary for the requested function, CAVMCAMAC initiates other Camac accesses to check on the Database/Camac consistency. 1. Call CAMIO in order to read the last data written to relevent Camac module. 2. If the above call was bad for any reason, then call CAVMCAMER to process the error, and then exit. 3. If the Camac data and the Database data don't agree, and if there has been no reset of the Camac module, then send an error message to inform the user (and log it).


THE CABLE VIDEO SOFTWARE. Page 13-10 4. Call CAMIO in order to write a data word to the Camac module which will then execute the required action. 5. If the above call was bad for any reason, then call CAVMCAMER to process the error, and then exit. 6. Call CAMIO to read back the data which has just been written. 7. If the above call was bad for any reason, then call CAVMCAMER to process the error, and then exit. 8. If the Camac write data and the Camac read-back data don't agree, then :- i. Send and log an error message. ii. Call CAMIO in order to attempt to turn the relevent transmitter OFF. iii. If the above call was bad for any reason, then call CAVMCAMER to process the error. ( Note that we do not exit this time! ) iv. Call CAVMDBUPD to update the Database to show that the module is no longer transmitting. 9. Update the Database with the last written Camac data (TVMD:DATA).

13.2.4 CAVMCAMER This module is the Camac error processor - it is entered only if a


THE CABLE VIDEO SOFTWARE. Page 13-11 previous call to CAMIO resulted in a bad return code. It is only called from CAVMCAMAC. 1. If the return code is a message service error, then send and log an error such as 'Can't talk to micro LIXX', and then exit. 2. If the return code is no Camac X response, then :- i. Send and log an error message. ii. Call CAVMDBUPD to update the Database to show that the module is not transmitting. iii. Update the Database with the last written Camac data set to HEX 7F. (This is the data in the Camac module after a reset is made, and a reset must be made to the Camac module before we can use it again).(TVMD:DATA). iv. Exit. 3. If the return indicates a crate timeout, then :- i. Send and log an error message. ii. Call CAVMDBUPD to update the Database to show that the module is not transmitting. iii. Update the Database with the last written Camac data set to HEX 7F. (This is the data in the Camac module after a reset is made, and a reset must be made to the Camac module before we can use it again).(TVMD:DATA).
THE CABLE VIDEO SOFTWARE. Page 13-12 iv. Exit. 4. Send and log a Camac error message. 5. Set no Module and no Input selected.

13.2.5 CAVMUPDAT This routine is called at least once every time any Cable Video touch panel button is pressed. Its function is to read the Database to get all the latest CAVM information and to update the touch panel buttons accordingly. 1. Read the DB to get the currently transmitting Modules (TVCH:MODL). 2. Read the DB to get the Inputs connected to the transmitting Modules (TVCH:INP). 3. Read the DB to get the last written Camac data (TVMD:DATA). 4. Set up an array of the Channels broadcasting the transmitting modules. 5. Write the Module name of the transmitting Module on each Channel button ( or blanks if none ). 6. Write the Input name of the connected Input on each Channel button ( or blanks if none ).


THE CABLE VIDEO SOFTWARE. Page 13-13 7. If no Channel has been selected, then clear any bars on the Channel buttons. 8. Write the broadcasting Channel name on each transmitting module button. 9. If no module has been selected, then clear any bars on the Module buttons, and clear all the Input buttons. 10. If a module has been selected, then :- i. Read the DB to get the transmitter's Input names (TVMD:INPT). ii. Write out the Input names on the Input buttons. iii. Clear the Input buttons of any '*ON*' messages. iv. If no Input has been selected, then clear any bars on the Input buttons. v. If the selected module is currently transmitting, then write '*ON*' onto the connected Input button.

13.2.6 CAVMDBUPD This little routine simply updates a couple of things in the Database. It is called whenever a successful Camac operation has taken place which has turned on or off a transmitter, or whenever it has been deduced that a particular transmitter cannot be transmitting (e.g. if there is no power to a particular Camac crate).


THE CABLE VIDEO SOFTWARE. Page 13-14 1. Write out the current Modules being broadcast on the Channels (TVCH:MODL). 2. Write out the current Inputs connected to transmitting modules (TVCH:INPT).
 
Go to top of page
Contact (until Aug. 15, 1996): Jeffrey Miller
Owner: Bob Sass

Converted from VAX Runoff output using doc2webset.pl