Table of Contents Previous Chapter ACIS

17.0 Command Packet Handler Classes (36-53214 A)

17.1 Purpose

The purpose of the command handler classes are to interpret the contents of received command packets and execute the operations mandated by the command packet operation code. This section describes the command handler class design. The details of the command packet formats are shown in the "ACIS Instrument Program and Command List," MIT 36-01410 (IP&CL).

17.2 Uses

  1. Execute Parameter Block Load Commands

  2. Initiate Memory Server Actions

  3. Initiate DEA Housekeeping and Science Actions

  4. Execute Patch Commands

  5. Execute System Configuration Commands

The commands used during boot to load an image from uplink and execute the loaded image are not described in this section. Refer to the IP&CL for a description of these particular command formats and their scenarios. NOTE: Command handlers cannot assume that unused bits within command packet words are zero, and shall mask off bits within words that they do not use.

17.3 Organization

All command handlers are a subclass of Protocols::CmdHandler (see Section 16.0). Each subclass of CmdHandler implements its own processCmd() member function. Given the large number of command handler classes, the following figures illustrate the class relationships involved in each of the use-cases listed above.

17.3.1 Parameter Block Command Handler

FIGURE 63. Parameter Block Command Handler Classes


ChLoadBlk- This class is a subclass of CmdHandler and represents all command handlers which load either Science or DEA parameter blocks into the instrument. The constructor for this handler class requires a command opcode and a reference to a parameter block list (PblockList). The constructed instance associated with the opcode is then responsible for loading parameter blocks from incoming commands into its parameter block list. This class uses the PblockList class to store the loaded parameter block. The ChLoadBlk class has knowledge about the common header format all parameter blocks, but leaves the interpretation of the body of the parameter block up to the specific parameter block type maintained by the targeted parameter block list.

PblockList- This class is responsible for providing the top-level interface to all types of parameter blocks within the instrument. The top level functions provided by this class are used by the command handler class to install parameter blocks, and by Science and DEA Housekeeping to retrieve loaded parameter blocks. This class is described in detail in Section TBD.

17.3.2 Memory Server Command Handlers

FIGURE 64. Memory Server Command Handler Classes


ChReadBep- This is a subclass of CmdHandler and is responsible for handling commands to read and telemeter data and/or code from the Back End Processor's RAM. This class uses the MemoryServer class to perform the actual operation.

ChWriteBep- This is a subclass of CmdHandler and is responsible for handling commands to write data (and possibly code) to the Back End Processor's RAM. This class uses the MemoryServer class to perform the actual operation.

ChExecBep- This is a subclass of CmdHandler and is responsible for handling commands instructing the instrument to call a subroutine located within the Back End Processor's RAM. This class uses the MemoryServer class to perform the actual operation.

ChReadFep- This is a subclass of CmdHandler and is responsible for handling commands to read and telemeter data (and possibly code) from one of the Front End Processors' RAM. This class uses the MemoryServer class to perform the actual operation.

ChWriteFep- This is a subclass of CmdHandler and is responsible for handling commands to write data (and possibly code) to one of the Front End Processors' RAM. This class uses the MemoryServer class to perform the actual operation.

ChExecFep- This is a subclass of CmdHandler and is responsible for handling commands instructing the instrument to call a subroutine located within one of the Front End Processors' RAM. This class uses the MemoryServer class to perform the actual operation.

ChReadPram- This is a subclass of CmdHandler and is responsible for handling commands to read and telemeter data from one of the Detector Electronics Assembly (DEA) CCD Controller's Program RAM (PRAM). This class uses the MemoryServer class to perform the actual operation.

ChWritePram- This is a subclass of CmdHandler and is responsible for handling commands to write data to one of the DEA CCD Controller's Program RAM. This class uses the MemoryServer class to perform the actual operation.

ChReadSram- This is a subclass of CmdHandler and is responsible for handling commands to read and telemeter data from one of the DEA CCD Controller's Sequencer RAM (SRAM). This class uses the MemoryServer class to perform the actual operation.

ChWriteSram- This is a subclass of CmdHandler and is responsible for handling commands to write data to one of the DEA CCD Controller's Sequencer RAM. This class uses the MemoryServer class to perform the actual operation.

MemoryServer- This class is a subclass of Executive::Task (not shown), and is responsible for performing or initiating all memory loads, dumps and executes within ACIS. This class is described in detail in Section 27.0.

17.3.3 Science Run and DEA Housekeeping Command Handlers

FIGURE 65. Science Run and DEA Housekeeping Command Handler Classes


ChStartSciRun- This class is a subclass of CmdHandler, and is responsible for handling commands initiating a science run. Upon construction, each instance of this class is passed a command opcode, a reference to a ScienceMode instance, and a flag indicating whether or not the command requests only a bias computation, with no subsequent data processing. Once a command is received, the handler instance associated with the command's opcode uses installed ScienceMode and bias-only flag to instruct the ScienceManager what type of science run was requested.

ChStopSciRun- This class is a subclass of CmdHandler, and is responsible for terminating an active science run. There is one instance of this class for each type of science run. This class uses the ScienceManager to terminate the run. NOTE: If a science command is running, but the stop request is of the wrong type or specifies the wrong parameter block slot id, the current run will be stopped anyway, and a software housekeeping error statistic will be reported. When a run is stopped, it finishes its current exposure. The run's telemetry packets remain in the telemetry queue until they are sent out of the instrument by the telemetry manager.

ChStartDeaRun- This class is a subclass of CmdHandler, and is responsible for handling commands that initiate acquisition of DEA Housekeeping data. This class uses the DeaHousekeeper to perform the operation.

ChStopDeaRun- This class is a subclass of CmdHandler, and is responsible for handling commands that request the termination of DEA housekeeping acquisition. This class uses the DeaHousekeeper class to terminate the operation. NOTE: If the stop request specifies the wrong parameter block slot id, the current run will be stopped anyway, and a software housekeeping error statistic will be reported. When a run is stopped, it finishes its current housekeeping packet. The run's telemetry packets remain in the telemetry queue until they are sent out of the instrument by the telemetry manager.

ScienceManager- This class is a subclass of Executive::Task (not shown).This class is responsible for coordinating science bias computations and data runs. See Section 33.0 for a more detailed description of this class.

ScienceMode- This class is responsible for implementing the detailed setup, parameter dump, bias computation, data processing, and cleanup operations of a particular science mode. This class operates under the direction of the ScienceManager class. This class is described in more detail in Section 33.0.

DeaHousekeeper- This class is a subclass of Executive::Task (not shown), and is responsible for periodically acquiring and telemetering DEA housekeeping information. This class is described in more detail in Section TBD.

17.3.4 Patch Command Handlers

FIGURE 66. Patch Command Handler Classes


ChAddPatch- This class is a subclass of CmdHandler and is responsible for handling commands which install new patches into the ACIS patch list. This class uses the PatchList class to add the requested patch to the system. The installed patch will not take effect until the next commanded reset.

ChRemovePatch- This class is a subclass of CmdHandler and is responsible for removing a patch from the ACIS software patch list. This class uses the PatchList class to remove the patch from the system. The code or data affected by the removed patch will not be restored until the next commanded reset.

PatchList- This class is responsible for maintaining the ACIS software patch list. It is described in more detail in Section TBD.

17.3.5 System Configuration Command Handlers

FIGURE 67. System Configuration Command Handler Classes


Within ACIS, there is one bad pixel map, for use with Timed Exposure Mode, and two bad column maps, one for Timed Exposure Mode, and one for use with Continuous Clocking Mode.

ChAddBadPixel- This class is a subclass of CmdHandler and is responsible for handling commands which install one or more bad pixels in the system's bad pixel list. This class uses the BadPixelMap class to maintain the current list of bad pixels.

ChRemoveBadPixel- This class is a subclass of CmdHandler, and is responsible for handling commands which remove pixels from the system's bad pixel list, or which clear the entire list. This class uses the BadPixelMap class to maintain the current list of bad pixels.

ChDumpBadPixels- This class is a subclass of CmdHandler, and is responsible for dumping the contents of the bad pixel map to telemetry. This class uses the BadPixelMap class to obtain access to the address and current length of the bad pixel map buffer. This class then uses the MemoryServer class to iteratively format and send memory dump packets of the bad pixel map.

ChAddBadCol- This class is a subclass of CmdHandler, and is responsible for adding one or more bad columns to a bad column map. Upon construction, each instance of this handler is associated with a command opcode and a BadColumnMap instance. Each handler instance uses its associated BadColumnMap instance to maintain the list of bad columns.

ChRemoveBadCol- This class is a subclass of CmdHandler, and is responsible for removing one or more bad columns from a bad column map, or clear all bad columns from the corresponding map. Upon construction, each instance of this handler is associated with a command opcode and a BadColumnMap instance. Each handler instance uses its associated BadColumnMap instance to maintain the list of bad columns.

ChDumpBadCol- This class is a subclass of CmdHandler, and is responsible for dumping the contents of the bad pixel map to telemetry. Upon construction, each instance of this handler is associated with a command opcode and a BadColumnMap instance. Each handler instance uses its associated BadColumnMap instance to obtain the address and current length of a given bad column map. The handler uses the MemoryServer class to iteratively format and dump the contents of the map to telemetry.

ChChangeSysEntry- This class is a subclass of CmdHandler, and is responsible for handling commands which change one or more values of the System Configuration Table. This class uses the SysConfigTable class to maintain the current system settings.

ChDumpSysConfig- This class is a subclass of CmdHandler, and is responsible for handling commands which request a dump of the current System Configuration Table entries. The handler class uses the SysConfigTable class to obtain the address and length of the table, and uses the MemoryServer to format and dump the table to telemetry.

17.4 Command Packet Handling Restrictions

17.4.1 Handling Restrictions

All command packet header information is accessed via the CmdPkt class (see Section 16.0). Unless otherwise specified, all command handler processCmd() member functions are required to execute in under 200ms. If a command takes longer than 200ms to execute, the handler should consider forwarding the request onto a lower priority task to execute.

In order to make interpretation of command packets easier, all packets must align long word data elements on long word boundaries. All command packet buffers will start on a long word boundary, and the command packet header will always be an odd number of 16-bit words in length.

See Section 4.6 for a detailed description of all command packet formats defined by ACIS.

17.4.2 Command Handler Object Map

The following table maps each command packet type to a specific object name and class.

TABLE 20. Command Packet to Handler Object Map

------------------------------------------------------------------------------------------------
Command                              Opcode Symbol            Object Name       Class Name        
------------------------------------------------------------------------------------------------
Load Timed Exposure Parameter Block  CMDOP_LOAD_TE            chLoadTimedExp    ChLoadBlk         
Load Cont. Clocking Parameter Block  CMDOP_LOAD_CC            chLoadContClock   ChLoadBlk         
Load 2-D Window List                 CMDOP_LOAD_2D            chLoad2dWindow    ChLoadBlk         
Load 1-D Window List                 CMDOP_LOAD_1D            chLoad1dWindow    ChLoadBlk         
Load DEA House.Parameter Block       CMDOP_LOAD_DEA           chLoadDeaHouse    ChLoadBlk         
Read BEP Memory                      CMDOP_READ_BEP           chReadBep         ChReadBep         
Write BEP Memory                     CMDOP_WRITE_BEP          chWriteBep        ChWriteBep        
Execute BEP Memory                   CMDOP_EXEC_BEP           chExecBep         ChExecBep         
Read FEP Memory                      CMDOP_READ_FEP           chReadFep         ChReadFep         
Write FEP Memory                     CMDOP_WRITE_FEP          chWriteFep        ChWriteFep        
Execute FEP Memory                   CMDOP_EXEC_FEP           chExecFep         ChExecFep         
Read PRAM                            CMDOP_READ_PRAM          chReadPram        ChReadPram        
Write PRAM                           CMDOP_WRITE_PRAM         chWritePram       ChWritePram       
Read SRAM                            CMDOP_READ_SRAM          chReadSram        ChReadSram        
Write SRAM                           CMDOP_WRITE_SRAM         chWriteSram       ChWriteSram       
Start Timed Exposure                 CMDOP_START_TE           chStartTimedExp   ChStartSciRun     
Start Timed Exposure Bias Only       CMDOP_BIAS_TE            chBiasTimedExp    ChStartSciRun     
Stop Timed Exposure                  CMDOP_STOP_TE            chStopTimedExp    ChStopSciRun      
Start Continuous Clocking            CMDOP_START_CC           chStartCc         ChStartSciRun     
Start Continuous Clocking Bias Only  CMDOP_BIAS_CC            chBiasCc          ChStartSciRun     
Stop Continuous Clocking             CMDOP_STOP_CC            chStopCc          ChStopSciRun      
Start DEA Housekeeping               CMDOP_START_DEA          chStartDeaRun     ChStartDeaRun     
Stop DEA Housekeeping                CMDOP_STOP_DEA           chStopDeaRun      ChStopDeaRun      
Add Patch                            CMDOP_ADD_PATCH          chAddPatch        ChAddPatch        
Remove Patch                         CMDOP_REMOVE_PATCH       chRemovePatch     ChRemovePatch     
Add Bad Pixel                        CMDOP_ADD_BAD_PIXEL      chAddBadPixel     ChAddBadPixel     
Remove Bad Pixel                     CMDOP_REMOVE_BAD_PIXEL   chRemoveBadPixel  ChRemoveBadPixel  
Dump Bad Pixels                      CMDOP_DUMP_BAD_PIXELS    chDumpBadPixels   ChDumpBadPixels   
Add Bad Timed Exposure Column        CMDOP_ADD_BAD_TE_COL     chAddBadTeCol     ChAddBadCol       
Remove Bad Timed Exposure Column     CMDOP_REMOVE_BAD_TE_COL  chRemoveBadTeCol  ChRemoveBadCol    
Dump Bad Timed Exposure Columns      CMDOP_DUMP_BAD_TE_COL    chDumpBadTeCol    ChDumpBadCol      
Add Bad Continuous Clocking Column   CMDOP_ADD_BAD_CC_COL     chAddBadCcCol     ChAddBadCol       
Remove Bad Cont. Clocking Column     CMDOP_REMOVE_BAD_CC_COL  chRemoveBadCcCol  ChRemoveBadCol    
Dump Bad Cont. Clocking Columns      CMDOP_DUMP_BAD_CC_COL    chDumpBadCcCol    ChDumpBadCol      
Change System Configuration Entry    CMDOP_CHANGE_SYS_ENTRY   chChangeSysEntry  ChChangeSysEntry  
Dump System Configuration Entries    CMDOP_DUMP_SYS_CONFIG    chDumpSysConfig   ChDumpSysConfig   
------------------------------------------------------------------------------------------------

17.5 Scenarios

17.5.1 Use 1:: Load Parameter Blocks

17.5.1.1 Handler Object Construction

Each of the command handler objects are created during system initialization, and are registered with the Command Manager at that time. Figure 68 illustrates the overall initialization procedure used to construct command handlers which store parameter blocks within ACIS. The following scenario details the actions taken when constructing the "Load Timed Exposure Parameter Block" command handler. The scenario applies to all of the remaining constructors, by varying only the command operation codes and parameter block list references for each distinct command handler object.

FIGURE 68. Parameter Block Command Handler Initialization


  1. The global constructor list invokes the constructor for chLoadTimedExp, passing CMDOP_LOAD_TE as the command opcode, and a reference to pblTimedExp as the parameter block list affected by chLoadTimedExp.

  2. chLoadTimedExp's constructor then invokes its parent constructor, CmdHandler::CmdHandler, passing the supplied command operation code. Once its parent is initialized, chLoadTimedExp initializes its parameter block list pointer with the passed reference to pblTimedExp.

  3. The CmdHandler constructor invokes the CmdManager function, setHandler(), to install itself as the handler for the supplied command operation code.
17.5.1.2 Execution of Load Parameter Block Commands

Figure 69 illustrates the overall execution of a "Load Timed Exposure Parameter Block Command." Other types of "Load Parameter Block" commands operate in the same fashion, only using different command handler instances and destination parameter block lists.

FIGURE 69. Load Timed Exposure Parameter Block Command Execution


  1. The cmdManager receives a command, and uses the packet's opcode to select the appropriate handler (see Section 16.0 for more detail). The cmdManager then invokes the selected objects's (in this case, chLoadTimedExp) processCmd() member function, passing the received command packet instance, cmdPkt.

  2. chLoadTimedExp.processCmd() then obtains the packet's data buffer and length by calling getPktInfo(), which is inherited from CmdHandler.

  3. CmdHandler::getPktInfo() uses the command packet functions, cmdPkt.getDataAddress() and cmdPkt.getDataLength() to acquire the packet's data buffer address and length.

  4. chLoadTimedExp.processCmd() then attempts to obtain exclusive access to the Timed Exposure Parameter Block List by invoking pblTimedExp.waitForLock(). If the wait time -out expires, processCmd() returns a CMDRESULT_BUSY status to the Command Manager.

  5. If processCmd() succeeds in locking the parameter block list, it instructs the list to copy the command packet parameters into the appropriate parameter block slot, using pblTimedExp.replaceBlock(). Once replaceBlock() returns, processCmd() relinquishes access to the parameter block list, using pblTimedExp.releaseLock(). If the earlier call to replaceBlock() succeeded, processCmd() returns CMDRESULT_OK. If it failed, it returns CMDRESULT_BAD_ARGUMENT.

17.5.2 Use 2:: Initiate Memory Dumps, Loads and Execution

Figure 70 illustrates the behaviors of the three commands directed toward the MemoryServer. Steps 1 - 5 illustrate the overall scenario for a "Read BEP Memory" command, from the point at which the cmdManager dispatches control of the chReadBep command handler instance, to the point at which the MemoryServer dispatches control to its private function, rdBep() to actually perform the memory read (NOTE: In order to clarify the overall behavior of the command handlers in association with the MemoryServer, this example violates strict encapsulation rules, and peeks a little bit into the internal implementation of the MemoryServer). The remaining objects in the diagram are not described step-by-step, but the overall behavior of each of the command handlers is the same at that for the "Read BEP Memory" example. They are shown in the diagram to illustrate the mapping each command handler instance to the corresponding binding function provided by the MemoryServer.

FIGURE 70. Memory Server Command Handling


  1. The cmdManager receives a "Read BEP Memory" command, indexes chReadBep and invokes its processCmd() function.

  2. ChReadBep::processCmd() then reads the command packet's buffer address and length, using the inherited function, CmdHander::getPktInfo(). It then extracts source address and read length from the packet data buffer.

  3. processCmd() invokes the MemoryServer's memoryServer.readBep() function, passing the command identifier, the read source address and the number of 32-bit words to read.

  4. The MemoryServer then attempts to gain exclusive access of its request buffer (not shown). If it succeeds, it stores the passed information and uses notify() to tell its task to execute the command, and immediately returns with CMDRESULT_OK. If memoryServer is busy, the request is dropped, and readBep() returns CMDRESULT_BUSY, which is then returned by chReadBep.processCmd(). If the arguments passed to the MemoryServer are invalid, it will return CMDRESULT_BAD_ARGUMENT.

  5. At some later time, the waiting task portion of the MemoryServer will be scheduled to run and will eventually invoke its private rdBep() function to read the memory, format and send the read data to telemetry.

17.5.3 Use 3:: Start and Stop Science and DEA Housekeeping Runs

17.5.3.1 Handler Object Construction

Different types of "Start Science Run" and "Stop Science Run" command handlers are discriminated only by their command operation code and parameter block list reference. Figure 71 illustrates the overall initialization procedure used to construct command handlers which start and stop science runs within ACIS. The scenario description details the actions taken when constructing the "Start Timed Exposure Run" command handler. The scenario applies all of the remaining constructors, by varying only the command operation codes and science mode references for each distinct command handler object. Since "Start DEA Housekeeping Run" and "Stop DEA Housekeeping Run" command handlers each have only one instance, their construction is shown in the diagram, but is not directly explained in the accompanying scenario description.

FIGURE 71. Start and Stop Run Command Handler Initialization


  1. The global constructor list invokes the constructor for chStartTimedExp, passing CMDOP_START_TE as the command opcode, and a reference to smTimedExp as the science mode associated with chStartTimedExp.

  2. chStartTimedExp's constructor then invokes its parent constructor, CmdHandler::CmdHandler, passing the supplied command operation code. Once its parent is initialized, chStartTimedExp initializes its parameter block list pointer with the passed reference to smTimedExp.

  3. The CmdHandler constructor invokes the CmdManager function, setHandler(), to install itself as the handler for the supplied command operation code.
17.5.3.2 Execution of Start and Stop Science Commands

Figure 72 illustrates the overall operation of a "Start Timed Exposure" and "Stop Timed Exposure" command sequence. The scenario for starting and stopping a Continuous Clocking Run is the same except the chStartTimedExp, smTimedExp, and pblTimedExp objects are replaced with the chStartCc, smContClocking, and pblContClock objects, respectively.

FIGURE 72. Start and Stop Timed Exposure Science Run


  1. The scienceManager is initially idle, waiting for a command notification via Task::waitForEvent().

  2. The cmdManager receives a "Start Timed Exposure Science Run" command packet, indexes and invokes chStartTimedExp.processCmd(), passing the command packet as an argument (not shown).

  3. chStartTimedExp.processCmd() uses the inherited function, CmdHandler::getPktInfo() to get the address and length of the data portion of the packet. It then reads the parameter block id from the packets data area.

  4. processCmd() then invokes mode->checkBlock() (effectively calling smTimedExp.checkBlock()) to verify the validity of the parameter block id and the integrity of the selected parameter block.

  5. smTimeExp.checkBlock() calls pblTimedExp.getBlock() to retrieve a reference to the indexed parameter block.

  6. If the block id is valid, smTimedExp.checkBlock() invokes the parameter block's checkCrc() function to ensure that it has not been corrupted. See TBD for a detailed description of the error behavior if either the parameter block id is invalid, or if the parameter block is corrupt.

  7. If the return value from smTimedExp.checkBlock() indicates that the block exists and is not corrupted, processCmd() invokes the ScienceManager's startRun() function to initiate the science run. If there is a problem with the parameter block, the handler logs the occurrence in software housekeeping (not shown), and uses the alternate supplied by smTimedExp.checkBlock(). If no alternate is specified, processCmd() does not call the ScienceManager. In either case, processCmd() returns the appropriate CmdResult (TBD), indicating the chosen action.

  8. scienceManager.startRun() logs the passed parameter block identifier and science mode, and uses notify() to inform its task that a command is being requested.

  9. Later, the task portion of the ScienceManager wakes up from waitForEvent() (due to the earlier notify()), and proceeds to start the science run, using the stored mode's setup(), dumpParameters(), computeBias(), processData() member functions.

  10. The cmdManager receives a "Stop Timed Exposure Run" command, and invokes the indexed chStopTimedExp.processCmd() function.

  11. chStopTimedExp.processCmd() then invokes scienceManager.stopRun(), which logs the stop request and notifies its task (not shown).

  12. At some later time, the scienceManager task notices the state change request, and invokes the active mode's terminate() function. The scienceManager task then returns to its top loop, which calls waitForEvent() (see Step 1).
17.5.3.3 Execution of Start and Stop DEA Housekeeping Commands

Figure 73 illustrates the behavior of a Start and Stop DEA Run command sequence. The scenario is similar to that for science runs, except that the scenario invokes the DeaHousekeeper and that the housekeeper is responsible for interacting with the DEA Housekeeping Parameter Block List.

FIGURE 73. Start and Stop DEA Housekeeping


  1. The deaHousekeeper is initially idle, waiting for notification of a command request, using waitForEvent().

  2. The cmdManager receives a "Start DEA Housekeeping" command, and indexes and dispatches chStartDeaHouse.processCmd(), passing the received command packet (not shown).

  3. chStartDeaHouse.processCmd() invokes the inherited function CmdHandler::getPktInfo() to obtain the packet's data buffer and length (not shown). processCmd() then reads the parameter block id from the data area of the packet and invokes DEA housekeeper function, deaHousekeeper.checkBlock().

  4. checkBlock() then invokes pblDeaHouse.getBlock() to obtain a reference to the identified parameter block. If the parameter block id is invalid, checkBlock() returns an error to processCmd() which then returns the appropriate error result to the cmdManager.

  5. If the parameter block id is valid, checkBlock() invokes checkCrc() on the supplied parameter block, and returns whether or not the block is corrupted to processCmd().

  6. If the parameter block is intact, processCmd() calls deaHousekeeper.startRun(). If the parameter block id is invalid, or of the block is corrupted, processCmd() returns the appropriate CmdResult (TBD), indicating the chosen action to its caller, but does not call deaHousekeeper.

  7. deaHousekeeper.startRun() then logs the request information, and calls the inherited function, Task::notify() to wake up its task portion.

  8. Eventually, the task portion of deaHousekeeper wakes up from its waitForEvent() call, and invokes its private doHousekeeping() function to start acquiring and sending DEA Housekeeping information.

  9. Sometime later, the cmdManager receives a "Stop DEA Housekeeping" command, and indexes and invokes chStopDeaRun.processCmd().

  10. chStopDeaRun.processCmd() then invokes deaHousekeeper.stopRun(). stopRun() then logs the request and notifies the housekeeper's task (not shown). Later on, the task detects the stop request and returns to its top task loop, which calls waitForEvent() (see Step 1).

17.5.4 Use 4:: Load and Remove Patches

Figure 74 illustrates the handling of "Add Patch" and "Remove Patch" commands.

FIGURE 74. Add and Remove Patch Command Handling


  1. The cmdManager receives an "Add Patch" command. It indexes and dispatches chAddPatch.processCmd(), passing the command packet.

  2. chAddPatch.processCmd() uses the inherited CmdHandler::getPktInfo() (not shown) to get the packet's data address and length. It passes the obtained patch information to patchList.addPatch(), which then installs the patch in the system's patch list.

  3. The instrument receives a hardware reset command, reloads its code and data from ROM into RAM and invokes the loaded start-up procedure. The start-up procedure then invokes patchList.isValid() to verify the integrity of the patch list. If the list is intact, it invokes patchList.applyPatches(), which uses information in the list to modify the code and data in RAM. Once this is complete, start-up proceeds to continue its initialization and eventually brings up the now temporarily modified instrument software.

  4. The cmdManager receives a command to remove a patch. It indexes and invokes chRemovePatch.processCmd().

  5. chRemovePatch.processCmd() uses CmdHandler::getPktInfo() to obtain the patch identification information, and calls patchList.removePatch() to eliminate the identified patch from the list. When a subsequent hardware reset is sent, the original code and data are reloaded from ROM into RAM, and the start-up code installs its patches, minus the one(s) just removed by the previous command.

17.5.5 Use 5:: Modify and Dump System Configuration Settings

Figure 75 illustrates the operations used to add, remove and dump bad pixels within ACIS. The illustration also shows how the system configuration settings are modified and dumped, but this is not described in the detailed scenario description. Not shown are the operations to add, remove and dump bad columns from either the Timed Exposure Bad Column Map, nor the Continuous Clocking Bad Column Map. The overall sequences for these two maps are the same as the sequence from Bad Pixels, just with different objects participating. Not shown is that the Timed Exposure and Continuous Clocking Bad Column map commands use different instances of the same class, which are discriminated during construction by a passed command opcode and a reference to their respective Bad Column Maps.

NOTE: Since some structures, including the bad pixel map, may be larger than will fit into a single telemetry packet, a design decision has been made to use the MemoryServer to dump the system configuration data structures. The effect is that the information will reach the ground without specific format information contained with the telemetry packet. It is assumed that the ground can use the dump address and memory map, or can use the command packet identifier to determine what was dumped and why.

FIGURE 75. System Configuration Command Handling


  1. The cmdManager receives a "Add Bad Pixel" command, and calls chAddBadPixel.processCmd(), passing the received command packet.

  2. chAddBadPixel.processCmd() uses CmdHandler::getPktInfo() to read the data portion of the packet (not shown). It then passes the bad pixel information onto badPixelMap.addPixel(), which stores the information.

  3. The cmdManager later receives a "Remove Bad Pixel" command, and invokes chRemoveBadPixel.processCmd().

  4. chRemoveBadPixel.processCmd() extracts the pixel identification information, and passes it onto badPixelMap.removePixel(), to eliminate the identified pixel from the system's list.

  5. The cmdManager receives a "Dump Bad Pixel" command, and invokes chDumpBadPixel.processCmd().

  6. chDumpBadPixel.processCmd() calls badPixelMap.getMapInfo() to obtain the base address and length of the current bad pixel map.

  7. chDumpBadPixel.processCmd() then calls memoryServer.readBep(), passing the address and length of the map. If the memoryServer is not busy, it will register a request, and proceed to dump the indicated region into telemetry once its task portion is scheduled to run. If the memoryServer is busy (or if the arguments were invalid), it will return an error, which processCmd() passes back to the cmdManager.

17.6 Class ChAddBadCol

Documentation:
This class handles commands which add columns to one of the system's bad column maps, either the Timed Exposure Bad Column Map, or the Continuous Clocking Bad Column Map. Each instance of this class is associated to a single bad column map and command operation code when it is constructed. There is one instance of this class for use with the Timed Exposure Bad Column Map, and another instance which modifies the Continuous Clocking Bad Column Map.
Export Control:
Public
Cardinality:
2

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

BadColumnMap

Public Interface:

Operations:

ChAddBadCol()
processCmd()

Private Interface:

Has-A Relationships:


BadColumnMap& map:: This is a reference to the bad column map maintained by this instance. It is initialized upon construction by the passed badColMap constructor argument.
Concurrency:
Synchronous
Persistence:
Persistent

17.6.1 ChAddBadCol()

Public member of:
ChAddBadCol

Arguments:

CmdOpcode opcode
BadColumnMap& badColMap
Documentation:
This constructor initializes an instance of this class, passing opcode to its parent CmdHandler() constructor, which associates the instance with the particular opcode, and initializing its bad column map to the passed badColMap.
Concurrency:
Sequential

17.6.2 processCmd()

Public member of:
ChAddBadCol
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function adds bad columns to the instance's bad column map, map. pkt points to the command packet containing the columns to add to the list. This function returns one of the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_TABLE_FULL
Semantics:
Use CmdHandler::getPktInfo() to get access to pkt's data buffer and length, cast the retrieved pointer to the bad pixel info structure. For each pixel contained within the buffer, call map.addColumn().
Concurrency:
Synchronous

17.7 Class ChAddBadPixel

Documentation:
This class is responsible for handling commands which add pixels to the instrument's bad pixel map.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

BadPixelMap

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.7.1 processCmd()

Public member of:
ChAddBadPixel
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function handles requests to add pixels to the bad pixel map. pkt points to the command packet containing the pixels to add to the list. This function returns one of the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_TABLE_FULL
Semantics:
Use CmdHandler::getPktInfo() to get access to pkt's data buffer and length, cast the retrieved pointer to the bad pixel info structure. For each pixel contained within the buffer, call badPixelMap.addPixel().
Concurrency:
Synchronous

17.8 Class ChAddPatch

Documentation:
This command handles commands which add patches to the system's patch list.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

PatchList

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.8.1 processCmd()

Public member of:
ChAddPatch
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function handles commands to add patches to the system patch list. pkt is a pointer to the command packet containing the patch to add. This function returns one of the following:
CMDRESULT_OK CMDRESULT_TABLE_FULL
Semantics:
Use CmdHandler::getPktInfo() to get pkt's data buffer and length, and cast to a patch info structure. For each patch in the packet, call patchList.addPatch() to install the patch into the list.
Postconditions:
The patch will be applied to code/data loaded from ROM to RAM during start-up after the next commanded reset (watchdog resets do not apply patches).
Concurrency:
Synchronous

17.9 Class ChChangeSysEntry

Documentation:
This class is responsible for handling commands which modify one or more system configuration entries.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

SysConfigTable

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.9.1 processCmd()

Public member of:
ChChangeSysEntry
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function handles commands which modify system configuration entry values. pkt points to the requesting command packet, and contains the entry modifications. This function returns one of the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT
Semantics:
Use CmdHandler::getPktInfo() to get the pkt's data buffer and length, cast the result to entry info. For each entry in the packet, call sysConfigTable.changeEntry() to modify the value associated with the specified entry.
Concurrency:
Synchronous

17.10 Class ChDumpBadCol

Documentation:
This class handles commands to dump the contents of one of the system's bad column maps to telemetry. A given instance of this class is associated to a command operation code and a given bad column map by the class's constructor.
Export Control:
Public
Cardinality:
2

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

MemoryServer
BadColumnMap

Public Interface:

Operations:

ChDumpBadCol()
processCmd()

Private Interface:

Has-A Relationships:


BadColumnMap& map:: This is a reference to the bad column map maintained by this handler instance. It is initialized by the class constructor using the passed badColMap reference.
Concurrency:
Synchronous
Persistence:
Persistent

17.10.1 ChDumpBadCol()

Public member of:
ChDumpBadCol

Arguments:

CmdOpcode opcode
BadColumnMap& badColMap
Documentation:
This constructor initializes an instance of this class, passing opcode to its parent CmdHandler() constructor, which associates the instance with the particular opcode, and initializing its bad column map to the passed badColMap.
Concurrency:
Sequential

17.10.2 processCmd()

Public member of:
ChDumpBadCol
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function initiates a dump of the contents of the instance's bad column map. pkt is a pointer to the command packet requesting the dump, and is not used by this function. This function relies on the MemoryServer to perform the actual dump. This function returns one of the following:
CMDRESULT_OK CMDRESULT_TABLE_EMPTY CMDRESULT_BUSY
Semantics:
Call map.getTableInfo() to get the bad column map's address and length. If the length is not zero, call memoryServer.readBep() to initiate a dump of the map.
Postconditions:
If successful, the memoryServer will have logged a request to read and telemeter the region of memory containing the bad column map. Once the memoryServer's task is scheduled to run, the dump will start. The memoryServer will remain busy until the dump completes.
Concurrency:
Synchronous

17.11 Class ChDumpBadPixels

Documentation:
This class handles commands which request a dump of the bad pixel map to telemetry.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

MemoryServer
BadPixelMap

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.11.1 processCmd()

Public member of:
ChDumpBadPixels
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function initiates a dump of the bad pixel map to telemetry. pkt is a pointer to the command packet requesting the dump, and is not used by this function. This function relies on the MemoryServer to perform the actual dump. This function returns one of the following:
CMDRESULT_OK CMDRESULT_TABLE_EMPTY CMDRESULT_BUSY
Semantics:
Call badPixelMap.getTableInfo() to get the bad pixel map's address and length. If the length is not zero, call memoryServer.readBep() to initiate a dump of the map.
Postconditions:
If successful, the memoryServer will have logged a request to read and telemeter the region of memory containing the bad pixel map. Once the memoryServer's task is scheduled to run, the dump will start. The memoryServer will remain busy until the dump completes.
Concurrency:
Synchronous

17.12 Class ChDumpSysConfig

Documentation:
This class is responsible for handling commands which request a dump of the entire system configuration table.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

SysConfigTable
MemoryServer

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.12.1 processCmd()

Public member of:
ChDumpSysConfig
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function handles commands which request a dump of the system configuration entries to telemetry. pkt points to the command packet making the request, but is unused by this function. This function relies on the MemoryServer to perform the actual dump. This function returns one of the following:
CMDRESULT_OK CMDRESULT_BUSY
Semantics:
Call sysConfigTable.getTableInfo() to get the entry table's address and length. Call memoryServer.readBep() to initiate a dump of the map.
Postconditions:
If successful, the memoryServer will have logged a request to read and telemeter the region of memory containing the system configuration. Once the memoryServer's task is scheduled to run, the dump will start. The memoryServer will remain busy until the dump completes.
Concurrency:
Synchronous

17.13 Class ChExecBep

Documentation:
This class is responsible for handling commands which request the execution of a subroutine located within the Back End Processor's memory.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

MemoryServer

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.13.1 processCmd()

Public member of:
ChExecBep
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function interprets the contents of the command packet, pkt, and passes the extracted parameters to the MemoryServer's executeBep() binding function. This function returns the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_BUSY
Semantics:
Call CmdHandler::getPktInfo() to get pkt's data buffer and length. Cast to execute BEP information structure, and call memoryServer.executeBep().
Postconditions:
If successful, the memoryServer will have logged a request to execute the function and telemeter the result. Once the memoryServer's task is scheduled to run, the function will be called and the memoryServer will remain busy until the call completes. Once the call returns, the memoryServer will telemeter the returned value.
Concurrency:
Synchronous

17.14 Class ChExecFep

Documentation:
This class handles commands to execute a function located in one of the Front End Processor's memory, and telemeter the return value.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

MemoryServer

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.14.1 processCmd()

Public member of:
ChExecFep
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function interprets the contents of the command packet, pkt, and passes the extracted parameters to the MemoryServer's executeFep() binding function. This function returns the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_BUSY
Semantics:
Call CmdHandler::getPktInfo() to get pkt's data buffer and length. Cast to execute FEP information structure, and call memoryServer.executeFep().
Postconditions:
If successful, the memoryServer will have logged a request to execute the function on the specified Front End Processor, and telemeter the result. Once the memoryServer's task is scheduled to run, it will dispatch the request to the Front End and the memoryServer will remain busy until the request completes. Once the request completes, the memoryServer will telemeter the returned value.
Concurrency:
Synchronous

17.15 Class ChLoadBlk

Documentation:
This class provides the command handler for all "load parameter block" commands. The association between a given type of block and the command opcode is determined by the constructor for this class.
Export Control:
Public
Cardinality:
n

Hierarchy:

Superclasses:

CmdHandler

Public Interface:

Operations:

ChLoadBlk()
processCmd()

Private Interface:

Has-A Relationships:


PblockList& pblockList: This is a reference to the parameter block list managed by the instance.

const unsigned loadTimeout: This constant determines the timeout period, in clock ticks (1/10 second), that the command handler uses to wait for access to the parameter block list. This value must be less than 200ms to ensure that the handler returns in time to process the next command.
Concurrency:
Synchronous
Persistence:
Persistent

17.15.1 ChLoadBlk()

Public member of:
ChLoadBlk

Arguments:

CmdOpcode opcode
PblockList& blocklist
Documentation:
This is the constructor for all Load Parameter Block command handlers. opcode specifies the command packet opcode used for the command, and blocklist is a reference to the parameter block list modified by the handler.
Concurrency:
Sequential

17.15.2 processCmd()

Public member of:
ChLoadBlk
Return Class:
CmdResult

Arguments:

const CmdPkt* cmdpkt
Documentation:
This function processes all "load parameter block" commands, installing the parameter block contained in cmdpkt. If the load is successful, this function returns CMDRESULT_OK. If the command cannot obtain access to the parameter block, it returns CMDRESULT_BUSY. If the parameter block contained within the command has been corrupted, it returns CMDRESULT_CORRUPT.
Concurrency:
Guarded

17.16 Class ChReadBep

Documentation:
This class handles commands to read and telemeter the contents of the Back End Processor's memory.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

MemoryServer

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.16.1 processCmd()

Public member of:
ChReadBep
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function interprets the contents of the command packet, pkt, and passes the extracted parameters to the MemoryServer's readBep() binding function. This function returns the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_BUSY
Semantics:
Call CmdHandler::getPktInfo() to get pkt's data buffer and length. Cast to read BEP memory information structure, and call memoryServer.readBep().
Postconditions:
If successful, the memoryServer will have logged a request to read and telemeter the specified region of memory. Once the memoryServer's task is scheduled to run, the dump will start. The memoryServer will remain busy until the dump completes.
Concurrency:
Synchronous

17.17 Class ChReadFep

Documentation:
This class handles commands to read and telemeter the contents of one the Front End Processor's memory.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

MemoryServer

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.17.1 processCmd()

Public member of:
ChReadFep
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function interprets the contents of the command packet, pkt, and passes the extracted parameters to the MemoryServer's readFep() binding function. This function returns the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_BUSY
Semantics:
Call CmdHandler::getPktInfo() to get pkt's data buffer and length. Cast to read FEP memory information structure, and call memoryServer.readFep().
Postconditions:
If successful, the memoryServer will have logged a request to read and telemeter the specified region of memory from the specified Front End Processor. Once the memoryServer's task is scheduled to run, it will start performing the dump. The memoryServer will remain busy until the dump completes.
Concurrency:
Synchronous

17.18 Class ChReadPram

Documentation:
This class handles commands to read and telemeter the contents of the one of the DEA CCD Controller's Program RAM (PRAM).
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

MemoryServer

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.18.1 processCmd()

Public member of:
ChReadPram
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function interprets the contents of the command packet, pkt, and passes the extracted parameters to the MemoryServer's readPram() binding function. This function returns the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_BUSY
Semantics:
Call CmdHandler::getPktInfo() to get pkt's data buffer and length. Cast to read PRAM memory information structure, and call memoryServer.readPram().
Postconditions:
If successful, the memoryServer will have logged a request to read and telemeter the specified region of memory from the specified DEA CCD controller board's Program RAM. Once the memoryServer's task is scheduled to run, it will start performing the dump. The memoryServer will remain busy until the dump completes.
Concurrency:
Synchronous

17.19 Class ChReadSram

Documentation:
This class handles commands to read and telemeter the contents of the one of the DEA CCD Controller's Sequencer RAM (SRAM).
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

MemoryServer

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.19.1 processCmd()

Public member of:
ChReadSram
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function interprets the contents of the command packet, pkt, and passes the extracted parameters to the MemoryServer's readSram() binding function. This function returns the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_BUSY
Semantics:
Call CmdHandler::getPktInfo() to get pkt's data buffer and length. Cast to read SRAM memory information structure, and call memoryServer.readSram().
Postconditions:
If successful, the memoryServer will have logged a request to read and telemeter the specified region of memory from the specified DEA CCD controller board's Sequencer RAM. Once the memoryServer's task is scheduled to run, it will start performing the dump. The memoryServer will remain busy until the dump completes.
Concurrency:
Synchronous

17.20 Class ChRemoveBadCol

Documentation:
This class handles commands to remove pixels from one of the system's bad column maps. A given instance of this class is associated to a command operation code and a given bad column map by the class's constructor.
Export Control:
Public
Cardinality:
2

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

BadColumnMap

Public Interface:

Operations:

ChRemoveBadCol()
processCmd()

Private Interface:

Has-A Relationships:


BadColumnMap& map:: This is a reference to the bad column map associated with this handler instance. It is initialized during construction using the badColMap argument.
Concurrency:
Synchronous
Persistence:
Persistent

17.20.1 ChRemoveBadCol()

Public member of:
ChRemoveBadCol

Arguments:

CmdOpcode opcode
BadColumnMap& badColMap
Documentation:
This constructor initializes the handler instance, passing opcode to the parent constructor CmdHandler() which associates the instance with the command, and initializing map with the passed badColMap argument.
Concurrency:
Sequential

17.20.2 processCmd()

Public member of:
ChRemoveBadCol
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function removes pixels from the bad column map managed by this instance, map. pkt is the command packet containing a list of columns to remove. This function returns one of the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT
Semantics:
Use CmdHandler::getPktInfo() to get pkt's data buffer and length, cast to the bad column list info type. For each column listed, call map.removeColumn() to eliminate the column from the list.
Concurrency:
Synchronous

17.21 Class ChRemoveBadPixel

Documentation:
This class handles commands to remove pixels from the bad pixel map.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

BadPixelMap

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.21.1 processCmd()

Public member of:
ChRemoveBadPixel
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function removes pixels from the system's bad pixel map. pkt is the command packet containing a list of pixels to remove. This function returns one of the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT
Semantics:
Use CmdHandler::getPktInfo() to get pkt's data buffer and length, cast to the bad pixel list info type. For each pixel listed, call badPixelMap.removePixel() to eliminate the pixel from the list.
Concurrency:
Synchronous

17.22 Class ChRemovePatch

Documentation:
This class handles commands which remove patches from the system patch list.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

PatchList

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.22.1 processCmd()

Public member of:
ChRemovePatch
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function removes patches from the system patch list. pkt points to the command packet containing the patch identifiers to be removed. This function returns one of the following:
CMDRESULT_OK CMDRESULT_INVALID_DATAPTR CMDRESULT_INVALID_DATACNT CMDRESULT_BAD_ARGUMENT
Semantics:
Call CmdHandler::getPktInfo() to get pkt's data pointer and length, cast to remove patch info structure. For each patch identifier in the list, call patchList.removePatch() to remove the patch from the list.
Postconditions:
Upon the next commanded reset, the code and data are reloaded from ROM to RAM, and the remaining patches in the patch list are applied (sans the removed patches).
Concurrency:
Synchronous

17.23 Class ChStartDeaRun

Documentation:
This class is responsible for handling commands which start DEA Housekeeping runs.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

DeaHousekeeper

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.23.1 processCmd()

Public member of:
ChStartDeaRun
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function processes requests to start a DEA Housekeeping run. cmdpkt points to the requesting command packet, and contains the block id to use for the run. This function returns one of the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_CORRUPT_DEFAULT CMDRESULT_CORRUPT_IDLE
Semantics:
Use CmdHandler::getPktInfo() to get data buffer and length, cast to DEA Info structure and get block id. Pass block id to deaHousekeeper.checkBlock(). If it succeeds, call deaHousekeeper.startRun() and return CMDRESULT_OK. If it fails, but alternate is valid, still call deaManager.startRun() but return CMDRESULT_CORRUPT_DEFAULT. If the alternate is invalid, just return CMDRESULT_CORRUPT_IDLE without starting a run.
Postconditions:
If the parameters are ok, or a default was selected, the deaHousekeeper will have logged the request information. Once its task portion is scheduled to run (and after it cleans up any pending operations), the housekeeper will start acquiring and sending the housekeeping information to telemetry.
Concurrency:
Synchronous

17.24 Class ChStartSciRun

Documentation:
This class handles all Start Science Run commands. The constructor for this class provides the association between the start command for a particular mode, and the science mode within the instrument.
Export Control:
Public
Cardinality:
4

Hierarchy:

Superclasses:

CmdHandler

Public Uses:

ScienceMode

Implementation Uses:

ScienceManager

Public Interface:

Operations:

ChStartSciRun()
processCmd()

Private Interface:

Has-A Relationships:


ScienceMode& mode:: This is reference to the science mode started by this command handler instance. mode is assigned during construction of the handler. When starting a run, mode is passed to the ScienceManager to instruct it which science mode to run.

const Boolean biasonly:: This flag indicates whether or not this command handler starts complete science runs, or bias only runs. If this flag is BoolFalse, complete science runs are dispatched. If this flag is BoolTrue, bias-only runs are initiated. This flag is initialized by the constructor.
Concurrency:
Synchronous
Persistence:
Persistent

17.24.1 ChStartSciRun()

Public member of:
ChStartSciRun

Arguments:

CmdOpcode opcode
ScienceMode& mode
Boolean biasOnly
Documentation:
This is the constructor for a science run command handler. opcode is the command operation handled by the instance being constructed, scienceMode is a reference to the science mode started by this handler, and biasOnly is a flag indicating if this command is handling compute bias requests (rather than full science runs). If biasOnly is BoolFalse, the handler will initiate complete science runs. If biasOnly is BoolTrue, then the handler will initiate bias computations only.
Semantics:
Initialize parent CmdManager, passing opcode. Set local variable, mode, to point to the passed scienceMode, and copy biasOnly to the private variable, biasonly.
Concurrency:
Sequential

17.24.2 processCmd()

Public member of:
ChStartSciRun
Return Class:
CmdResult

Arguments:

CmdPkt* cmdpkt
Documentation:
This function handles commands which initiate science runs. cmdpkt is a pointer to the requesting command packet, and contains the parameter block id to use for the science run. This function returns one of the following:
CMDRESULT_OK CMDRESULT_BAD_DATACNT CMDRESULT_BAD_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_CORRUPT_DEFAULT CMDRESULT_CORRUPT_IDLE
Semantics:
Use CmdHandler::getPktInfo() to get data buffer, cast to run info structure and extract block id. Pass block id to mode.checkBlock(). If checkBlock() returns BoolTrue, invoke scienceManager.startRun(), and return CMDRESULT_OK. If checkBlock() returns BoolFalse, but alternate is valid, pass alternate to scienceManager but return CMDRESULT_CORRUPT_DEFAULT. If the supplied alternate is invalid, do not invoke scienceManager, just return CMDRESULT_CORRUPT_IDLE.
Postconditions:
If parameters are ok, or if a default mode was selected, scienceManager will have recorded a request to perform a science run. Once its task is scheduled (and it cleans up from its previous operations), the requested run will be started. If the parameters are invalid, and no default is supplied, the scienceManager is left alone.
Concurrency:
Synchronous

17.25 Class ChStopDeaRun

Documentation:
This class is responsible for handling command requesting that DEA Housekeeping operations stop.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

DeaHousekeeper

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.25.1 processCmd()

Public member of:
ChStopDeaRun
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function processes requests to stop a DEA housekeeping run. pkt points to the requesting command packet. This function checks the passed command, reports discrepencies to software housekeeping, and then stops the run. This function always returns CMDRESULT_OK.
Semantics:
Call deaHousekeeping.stopRun().
Concurrency:
Synchronous

17.26 Class ChStopSciRun

Documentation:
This class handles all science stop run commands. Each instance is used to handle a particular "stop science run" request.
Export Control:
Public
Cardinality:
2

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

ScienceManager

Public Interface:

Operations:

ChStopSciRun()
processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.26.1 ChStopSciRun()

Public member of:
ChStopSciRun

Arguments:

CmdOpcode opcode
Documentation:
This constructor initializes the state of the handler instance, and using its parents constructor, CmdHandler(), associates the instance with the command opcode used to terminate a particular science mode.
Semantics:
Initializer calls CmdHandler() passing opcode to associate this instance with a particular "stop run" operation code.
Concurrency:
Sequential

17.26.2 processCmd()

Public member of:
ChStopSciRun
Return Class:
CmdResult

Arguments:

const CmdPkt* cmdpkt
Documentation:
This function handles requests to stop a running science mode. cmdpkt points to the requesting command packet. This function checks the contents of cmdpkt with the current science state, reports discrepencies to software housekeeping, and stops the run. This function always returns CMDRESULT_OK.
Semantics:
Call scienceManager.stopRun().
Concurrency:
Synchronous

17.27 Class ChWriteBep

Documentation:
This class handles commands to write the contents of the Back End Processor's memory.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

MemoryServer

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.27.1 processCmd()

Public member of:
ChWriteBep
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function interprets the contents of the command packet, pkt, and passes the extracted parameters to the MemoryServer's writeBep() binding function. This function returns the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_BUSY
Semantics:
Call CmdHandler::getPktInfo() to get pkt's data buffer and length. Cast to write BEP memory information structure, and call memoryServer.writeBep().
Postconditions:
If successful, the memoryServer will have logged a request to write the specified region of memory. Once the memoryServer's task is scheduled to run, it will copy the registered data (or code) to the specified memory address. The memoryServer will remain busy until the write completes.
Concurrency:
Synchronous

17.28 Class ChWriteFep

Documentation:
This class handles commands to write the contents of one of the Front End Processors' memory.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

MemoryServer

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.28.1 processCmd()

Public member of:
ChWriteFep
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function interprets the contents of the command packet, pkt, and passes the extracted parameters to the MemoryServer's writeFep() binding function. This function returns the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_BUSY
Semantics:
Call CmdHandler::getPktInfo() to get pkt's data buffer and length. Cast to write FEP memory information structure, and call memoryServer.writeFep().
Postconditions:
If successful, the memoryServer will have logged a request to write the specified region of memory of the identified Front End Processor. Once the memoryServer's task is scheduled to run, it will request that the registered data (or code) to be copied to the specified memory address on the FEP. The memoryServer will remain busy until the write completes.
Concurrency:
Synchronous

17.29 Class ChWritePram

Documentation:
This class handles commands to write the contents of one of the DEA CCD Controllers' Program RAM (PRAM).
Export Control:
Public
Cardinality:
n

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

MemoryServer

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.29.1 processCmd()

Public member of:
ChWritePram
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function interprets the contents of the command packet, pkt, and passes the extracted parameters to the MemoryServer's writePram() binding function. This function returns the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_BUSY
Semantics:
Call CmdHandler::getPktInfo() to get pkt's data buffer and length. Cast to write PRAM memory information structure, and call memoryServer.writePram().
Postconditions:
If successful, the memoryServer will have logged a request to write the specified region of memory of the identified DEA CCD Controller's Program RAM. Once the memoryServer's task is scheduled to run, it will request that the registered data (or code) to be copied to the specified memory location within in the DEA controller's PRAM. The memoryServer will remain busy until the write completes.
Concurrency:
Synchronous

17.30 Class ChWriteSram

Documentation:
This class handles commands to write the contents of one of the DEA CCD Controllers' Sequencer RAM (SRAM).
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

CmdHandler

Implementation Uses:

MemoryServer

Public Interface:

Operations:

processCmd()
Concurrency:
Synchronous
Persistence:
Persistent

17.30.1 processCmd()

Public member of:
ChWriteSram
Return Class:
CmdResult

Arguments:

const CmdPkt* pkt
Documentation:
This function interprets the contents of the command packet, pkt, and passes the extracted parameters to the MemoryServer's writeSram() binding function. This function returns the following:
CMDRESULT_OK CMDRESULT_INVALID_DATACNT CMDRESULT_INVALID_DATAPTR CMDRESULT_BAD_ARGUMENT CMDRESULT_BUSY
Semantics:
Call CmdHandler::getPktInfo() to get pkt's data buffer and length. Cast to write SRAM memory information structure, and call memoryServer.writeSram().
Postconditions:
If successful, the memoryServer will have logged a request to write the specified region of memory of the identified DEA CCD Controller's Sequencer RAM. Once the memoryServer's task is scheduled to run, it will request that the registered data (or code) to be copied to the specified memory location within in the DEA controller's SRAM. The memoryServer will remain busy until the write completes.
Concurrency:
Synchronous

Table of Contents Next Chapter