Package LICOS.tests.lib.fileTools


Classes

class  FswFile
 Functional interface to a generic file in FSW. More...
class  FswFileFromData
 A memory resident FSW file interface. More...
class  FswFileFromDisk
 A disk resident FSW file interface. More...
class  FswFileID
 Define a Flight Software File ID. More...
class  FswDirectoryItem
 Representation of an item in an FSW directory. More...
class  FswDirectory
 Representation of a FSW directory. More...

Functions

def arbitraryFileID
 Retrieve a semi-arbitrary FSW file Number to be used as input for FswFileID().
def arbitraryFmxID
 Retrieve a semi-arbitrary FMX id to be used in creating an FMX header on the fly.
def addFmxHeader
 Add an fmx header to a file.
def downloadFile
 Download a file from the LAT.
def downloadFileToSSR
 Download a file from the LAT.
def uploadFileFromDisk
 Upload a disk resident file with an FMX header.
def uploadFileFromData
 Upload a memory resident file with an FMX header (Typically received from MOOT).
def cancelUpload
 cancel any in process uploads
def uploadFile
 Upload a memory resident fsw file object.
def __uploadChunk
def dumpDirectory
 Download a directory listing from the LAT.
def createDirectory
 create a directory on a LAT file system
def deleteDirectory
 Delete a directory on a LAT filesystem.
def deleteFile
 Delete a file on a LAT filesystem.
def copyFile
 Copy a file on any LAT unit.
def __checkLastCommandStatus

Variables

string __facility__ = "Online"
string __abstract__ = "File tools for ScriptEngine classes"
string __author__ = "J. Panetta <panetta@SLAC.Stanford.edu> SLAC - GLAST LAT I&T/Online"
string __date__ = "2005/11/1 00:08:27"
string __updated__ = "$Date: 2006/04/27 02:06:03 $"
string __version__ = "$Revision: 1.5 $"
string __release__ = "$Name: HEAD $"
string __credits__ = "SLAC"
int FSW_DEVICE_BOOT = 0
int FSW_DEVICE_RAM = 1
int FSW_DEVICE_EE0 = 2
int FSW_DEVICE_EE1 = 3
int FSW_DEVICE_TMP = 4
int FSW_DEVICE_USR0 = 5
int FSW_DEVICE_USR1 = 6
list FSW_DEVICE_NAMES = ["boot", "ram", "ee0", "ee1", "tmp", "usr0", "usr1" ]
int FSW_UNIT_SIU = 0
int FSW_UNIT_EPU0 = 1
int FSW_UNIT_EPU1 = 2
int FSW_UNIT_EPU2 = 3
int FSW_UNIT_EPU3 = 4
list FSW_UNIT_NAMES = [ 'SIU ', 'EPU0', 'EPU1', 'EPU2', 'EPU3' ]
int INT_DIR_LATC = 10
int INT_DIR_LCI = 11
int FILETOOL_STANDARD_TIMEOUT = 60
string FILETOOL_TMP_PATH = "/tmp"
tuple FILETOOL_TMP_PATH = os.path.normpath(os.path.join('C:/', 'TEMP'))
 FILETOOL_HDR_ALLOW = True
string FSW_ADD_HEADER_CMD = 'file_hdr_prefix'
string FSW_COMPRESS_CMD = 'zcompress'
 FILETOOL_HDR_ALLOW = False
 FSW_ADD_HEADER_CMD = None
 FSW_COMPRESS_CMD = None
int FILETOOL_ARBITRARY_FILENUMBER = 0
int FILETOOL_ARBITRARY_FMXID = 0x20000000L


Function Documentation

def LICOS.tests.lib.fileTools.__checkLastCommandStatus   app  ) 
 

Definition at line 778 of file fileTools.py.

def LICOS.tests.lib.fileTools.__uploadChunk   app,
  uplChunk,
  offset,
  nDataBytes
 

Definition at line 629 of file fileTools.py.

def LICOS.tests.lib.fileTools.addFmxHeader   inFile,
  doCompress = False,
  preCompressed = False,
  name = None,
  type = None,
  key = None,
  timestamp = None
 

Add an fmx header to a file.

compressing on the fly if requested

Parameters:
inFile An FswFile object
doCompress True/False to compress on fly/not
preCompressed True/False if already compressed
name 
type 
key 
timestamp 
Returns:
An FswFile object with proper headers for upload

Definition at line 375 of file fileTools.py.

def LICOS.tests.lib.fileTools.arbitraryFileID   seed = None  ) 
 

Retrieve a semi-arbitrary FSW file Number to be used as input for FswFileID().

Returns:
an integer

Definition at line 87 of file fileTools.py.

def LICOS.tests.lib.fileTools.arbitraryFmxID   seed = None  ) 
 

Retrieve a semi-arbitrary FMX id to be used in creating an FMX header on the fly.

Returns:
an integer

Definition at line 102 of file fileTools.py.

def LICOS.tests.lib.fileTools.cancelUpload   app,
  unit
 

cancel any in process uploads

Parameters:
app A testAppBase object (your user application...)
fswFile FswFile object
unit LAT unit id to upload to
Returns:
status

Definition at line 547 of file fileTools.py.

def LICOS.tests.lib.fileTools.copyFile   app,
  unit,
  source,
  dest
 

Copy a file on any LAT unit.

Parameters:
app A testAppBase object (your user application...)
unit LAT unit id to upload to
source An FswFileID object corresponding to the source file
dest An FswFileID object corresponding to the destination file
Returns:
status True if success, False if failure

Definition at line 760 of file fileTools.py.

def LICOS.tests.lib.fileTools.createDirectory   app,
  unit,
  directoryID
 

create a directory on a LAT file system

Parameters:
app A testAppBase object (your user application...)
unit LAT unit id
fileID An FswFileID object with the correct directory set.
Returns:
status True if it worked, False if not.

Definition at line 708 of file fileTools.py.

def LICOS.tests.lib.fileTools.deleteDirectory   app,
  unit,
  directoryID,
  force = False
 

Delete a directory on a LAT filesystem.

Parameters:
app A testAppBase object (your user application...)
unit LAT unit id to upload to
directoryID An FswFileID object with the correct directory set.
Returns:
status True if success, False if failure

Definition at line 722 of file fileTools.py.

def LICOS.tests.lib.fileTools.deleteFile   app,
  unit,
  fileID
 

Delete a file on a LAT filesystem.

Parameters:
app A testAppBase object (your user application...)
unit LAT unit id to upload to
fileID An FswFileID object
Returns:
status True if success, False if failure

Definition at line 746 of file fileTools.py.

def LICOS.tests.lib.fileTools.downloadFile   app,
  unit,
  fileID
 

Download a file from the LAT.

Parameters:
app A testAppBase object (your user application...)
unit LAT unit id to upload to
fileID An FswFileID object
Returns:
An FswFile object containing the data uploaded

Definition at line 437 of file fileTools.py.

def LICOS.tests.lib.fileTools.downloadFileToSSR   app,
  unit,
  fileID
 

Download a file from the LAT.

Parameters:
app A testAppBase object (your user application...)
unit LAT unit id to upload to
fileID An FswFileID object
Returns:
status

Definition at line 498 of file fileTools.py.

def LICOS.tests.lib.fileTools.dumpDirectory   app,
  unit,
  directoryID,
  root = False
 

Download a directory listing from the LAT.

Parameters:
app A testAppBase object (your user application...)
unit LAT unit id to upload to
fileID An FswFileID object with the correct directory set.
Returns:
An FswFile object containing the data uploaded

Definition at line 641 of file fileTools.py.

def LICOS.tests.lib.fileTools.uploadFile   app,
  fswFile,
  unit
 

Upload a memory resident fsw file object.

Parameters:
app A testAppBase object (your user application...)
fswFile FswFile object
unit LAT unit id to upload to

Definition at line 559 of file fileTools.py.

def LICOS.tests.lib.fileTools.uploadFileFromData   app,
  fileData,
  unit,
  fileID
 

Upload a memory resident file with an FMX header (Typically received from MOOT).

Parameters:
app A testAppBase object (your user application...)
fileData Binary representation of an FMX file
unit LAT unit id to upload to
fileID An FswFileID object
Returns:
An FswFile object containing the data uploaded

Definition at line 529 of file fileTools.py.

def LICOS.tests.lib.fileTools.uploadFileFromDisk   app,
  fileName,
  unit,
  fileID
 

Upload a disk resident file with an FMX header.

Parameters:
app A testAppBase object (your user application...)
fileName Fully qualified file name
unit LAT unit id to upload to
fileID An FswFileID object
Returns:
An FswFile object containing the data uploaded

Definition at line 511 of file fileTools.py.


Variable Documentation

string __abstract__ = "File tools for ScriptEngine classes" [static]
 

Definition at line 17 of file fileTools.py.

string __author__ = "J. Panetta <panetta@SLAC.Stanford.edu> SLAC - GLAST LAT I&T/Online" [static]
 

Definition at line 18 of file fileTools.py.

string __credits__ = "SLAC" [static]
 

Definition at line 23 of file fileTools.py.

string __date__ = "2005/11/1 00:08:27" [static]
 

Definition at line 19 of file fileTools.py.

string __facility__ = "Online" [static]
 

Definition at line 16 of file fileTools.py.

string __release__ = "$Name: HEAD $" [static]
 

Definition at line 22 of file fileTools.py.

string __updated__ = "$Date: 2006/04/27 02:06:03 $" [static]
 

Definition at line 20 of file fileTools.py.

string __version__ = "$Revision: 1.5 $" [static]
 

Definition at line 21 of file fileTools.py.

int FILETOOL_ARBITRARY_FILENUMBER = 0 [static]
 

Definition at line 82 of file fileTools.py.

int FILETOOL_ARBITRARY_FMXID = 0x20000000L [static]
 

Definition at line 84 of file fileTools.py.

FILETOOL_HDR_ALLOW = False [static]
 

Definition at line 77 of file fileTools.py.

FILETOOL_HDR_ALLOW = True [static]
 

Definition at line 73 of file fileTools.py.

int FILETOOL_STANDARD_TIMEOUT = 60 [static]
 

Definition at line 63 of file fileTools.py.

tuple FILETOOL_TMP_PATH = os.path.normpath(os.path.join('C:/', 'TEMP')) [static]
 

Definition at line 69 of file fileTools.py.

string FILETOOL_TMP_PATH = "/tmp" [static]
 

Definition at line 67 of file fileTools.py.

FSW_ADD_HEADER_CMD = None [static]
 

Definition at line 78 of file fileTools.py.

string FSW_ADD_HEADER_CMD = 'file_hdr_prefix' [static]
 

Definition at line 74 of file fileTools.py.

FSW_COMPRESS_CMD = None [static]
 

Definition at line 79 of file fileTools.py.

string FSW_COMPRESS_CMD = 'zcompress' [static]
 

Definition at line 75 of file fileTools.py.

int FSW_DEVICE_BOOT = 0 [static]
 

Definition at line 41 of file fileTools.py.

int FSW_DEVICE_EE0 = 2 [static]
 

Definition at line 43 of file fileTools.py.

int FSW_DEVICE_EE1 = 3 [static]
 

Definition at line 44 of file fileTools.py.

list FSW_DEVICE_NAMES = ["boot", "ram", "ee0", "ee1", "tmp", "usr0", "usr1" ] [static]
 

Definition at line 48 of file fileTools.py.

int FSW_DEVICE_RAM = 1 [static]
 

Definition at line 42 of file fileTools.py.

int FSW_DEVICE_TMP = 4 [static]
 

Definition at line 45 of file fileTools.py.

int FSW_DEVICE_USR0 = 5 [static]
 

Definition at line 46 of file fileTools.py.

int FSW_DEVICE_USR1 = 6 [static]
 

Definition at line 47 of file fileTools.py.

int FSW_UNIT_EPU0 = 1 [static]
 

Definition at line 51 of file fileTools.py.

int FSW_UNIT_EPU1 = 2 [static]
 

Definition at line 52 of file fileTools.py.

int FSW_UNIT_EPU2 = 3 [static]
 

Definition at line 53 of file fileTools.py.

int FSW_UNIT_EPU3 = 4 [static]
 

Definition at line 54 of file fileTools.py.

list FSW_UNIT_NAMES = [ 'SIU ', 'EPU0', 'EPU1', 'EPU2', 'EPU3' ] [static]
 

Definition at line 55 of file fileTools.py.

int FSW_UNIT_SIU = 0 [static]
 

Definition at line 50 of file fileTools.py.

int INT_DIR_LATC = 10 [static]
 

Definition at line 60 of file fileTools.py.

int INT_DIR_LCI = 11 [static]
 

Definition at line 61 of file fileTools.py.


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