PBC.py

Go to the documentation of this file.
00001 #!/usr/local/bin/python
00002 #
00003 #                               Copyright 2005
00004 #                                     by
00005 #                        The Board of Trustees of the
00006 #                     Leland Stanford Junior University.
00007 #                            All rights reserved.
00008 #
00009 
00010 __facility__ = "Online"
00011 __abstract__ = "PBC related mnemonics"
00012 __author__   = "Selim Tuvi <stuvi@slac.stanford.edu> SLAC - GLAST LAT I&T/Online"
00013 __date__     = "2005/07/23 00:08:27"
00014 __updated__  = "$Date: 2006/01/06 23:00:15 $"
00015 __version__  = "$Revision: 1.9 $"
00016 __release__  = "$Name: HEAD $"
00017 __credits__  = "SLAC"
00018 
00019 import LICOS.copyright_SLAC
00020 
00021 from cmdTlmDb import CmdPkg
00022 
00023 class PBC(CmdPkg):
00024   """!\brief PBC telecommand package class
00025 
00026   Provides access to PBC telecommands.
00027   """
00028 
00029   ## Boot Type Codes (received from LBTHKP.LPBCBOOTTYPE)
00030   (BOOT_START_VXW,
00031    BOOT_START_COLD,
00032    BOOT_START_WDOG,
00033    BOOT_START_PANIC,
00034    BOOT_START_EXCEPTION,
00035    BOOT_START_COMMAND   ) = range(6)
00036 
00037   BOOT_TYPES = {
00038     BOOT_START_VXW      : "VxWorks Start",
00039     BOOT_START_COLD     : "Cold Start",
00040     BOOT_START_WDOG     : "Watchdog Start",
00041     BOOT_START_PANIC    : "Panic Start",
00042     BOOT_START_EXCEPTION: "Exception Start",
00043     BOOT_START_COMMAND  : "Commanded Start"
00044   }
00045   ## Primary Boot Code Modes (received from LBTHKP.LPBCBOOTSTAT)
00046   (BOOT_MODE_INIT,
00047    BOOT_MODE_TIMEOUT,
00048    BOOT_MODE_COMMAND,
00049    BOOT_MODE_FILE_LOAD,
00050    BOOT_MODE_COMMIT,
00051    RESERVED,
00052    BOOT_MODE_BOOT      ) = range(7)
00053 
00054   BOOT_CODE_MODES = {
00055     BOOT_MODE_INIT: "CPU has powered and is initializing",
00056     BOOT_MODE_TIMEOUT: "<No longer used>",
00057     BOOT_MODE_COMMAND: "Interactive mode and awaiting commands",
00058     BOOT_MODE_FILE_LOAD: "Received File Upload Start command",
00059     BOOT_MODE_COMMIT: "received a File Upload Commit command",
00060     BOOT_MODE_BOOT: "Booting the RTOS"
00061   }
00062 
00063   ## Boot Diagnostics Address
00064   DIAG_MEM_ADDRESS = 0x0000ff80
00065 
00066   ## Watchdog Timer Address
00067   WATCHDOG_TIMER_ADDRESS = 0xBF880058
00068 
00069   ## Boot Diagnostics Masks
00070   DIAGS_PBF_APP_RESET = 0x00002000
00071 
00072   ## Watchdog timer seconds per clock cycle
00073   WATCHDOG_TIMER_SECS_PER_CLK = 70.0*60/0xFFFFFFFFL
00074 
00075   def __init__(self, db):
00076     """!\brief PBC constructor.
00077 
00078     \param db  Wrapper database object for the generated module
00079               containing command and telemetry database classes.
00080     """
00081     CmdPkg.__init__(self, db)

Generated on Thu Apr 27 20:52:42 2006 for LICOS L02-01-00 by doxygen 1.4.6-NO