Table of Contents

Class: Field sam/Field.py

Holds all the data about a Field, which is a data type to analyse.

Purpose: Holds all the data produced by parsing a NETLOG file about a particular field.

Used By: NetLogInput, Logger

Uses: None

Attributes: None

SRS Refs: 3.2.1.2, 3.2.1.9, 5.2.3

Author: mayadm

Date: 24/7/02

Methods   
__init__
canDisableItems
getId
getName
isFieldStream
isFieldTime
isIPField
isSelected
isTCPField
setSelected
  __init__ 
__init__ (
        self,
        name,
        id,
        is_per_stream_only=0,
        )

Purpose: Creates a new instance of the Field class, given the field's name, id number and whether the field is applicable per stream only or also with the aggregate. The default for a Field being per stream only is set to no (0).

Used by: NetLogInput

Uses: None

Input: name : string, id : integer, is_per_stream_only : integer (0 or 1)

Output: New instance of the class Table

Preconditions: None

Postconditions: The created class will be a valid Stream object.

SRS Refs: 3.2.1.2

Author: mayadm

Date: 24/7/02

Exceptions   
CustomError, "id must be a integer"
CustomError, "is_per_stream_only must be either 0 or 1"
CustomError, "name must be a String"
  canDisableItems 
canDisableItems ( self )

Purpose: Needed by Selector class to tell it if this Field can cause other items to be disabled. Returns 1 if the Field object is valid per stream only (ie, can disable items), 0 if the Field object is also valid for aggregate streams (ie, cannot disable items). This is an interface needed by Selector.

Used by: None

Uses: None

Input: None

Output: canDisableItems : 0 or 1

Preconditions: None

Postconditions: None

SRS Refs: 3.2.1.2

Author: mayadm

Date: 24/7/02

  getId 
getId ( self )

Purpose: Returns the Field's id number (an integer).

Used by: Selector

Uses: None

Input: None

Output: getId : integer

Preconditions: None

Postconditions: None

SRS Refs: 3.2.1.2

Author: mayadm

Date: 24/7/02

  getName 
getName ( self )

Purpose: Returns the name of the Field to be displayed to the user in an understandable form.

Used by: Selector

Uses: None

Input: None

Output: getName : string

Preconditions: None

Postconditions: None

SRS Refs: 3.2.1.2, 5.2.3

Author: mayadm

Date: 24/7/02

  isFieldStream 
isFieldStream ( self )

Purpose: Returns 1 if the Field object is the stream data type, 0 if not.

Used by: Model, NetLogInput

Uses: None

Input: None

Output: isFieldStream : 0 or 1

Preconditions: None

Postconditions: None

SRS Refs: 3.2.1.2

Author: mayadm

Date: 24/7/02

  isFieldTime 
isFieldTime ( self )

Purpose: Returns 1 if the Field object is the time data type, 0 if not.

Used by: Model

Uses: None

Input: None

Output: isFieldStream : 0 or 1

Preconditions: None

Postconditions: None

SRS Refs: 3.2.1.2

Author: mayadm

Date: 24/7/02

  isIPField 
isIPField ( self )

Purpose: Returns 1 if the field is an IP field, returning 0 otherwise.

Used by: Logger

Uses: None

Input: None

Output: 0 or 1

Preconditions: None

Postconditions: None

Author: lljy

SRS Refs: 3.2.1.9

Date: 28/7/02

  isSelected 
isSelected ( self )

Purpose: Returns whether the field is selected (1) or not selected (0) on screen. This is an interface needed by Selector.

Used by: Selector

Uses: None

Input: None

Output: isSelected : integer (0 or 1)

Preconditions: None

Postconditions: None

SRS Refs: 5.2.3

Author: mayadm

Date: 28/10/02

  isTCPField 
isTCPField ( self )

Purpose: Returns 1 if the field is an TCP field, returning 0 otherwise.

Used by: Logger

Uses: None

Input: None

Output: 0 or 1

Preconditions: None

Postconditions: None

Author: lljy

SRS Refs: 3.2.1.9

Date: 28/7/02

  setSelected 
setSelected ( self,  sel )

Purpose: Sets whether the field is selected (1) or not selected (0) on screen. This is an interface needed by Selector.

Used by: Selector

Uses: None

Input: sel : integer (0 or 1)

Output: None

Preconditions: None

Postconditions: None

SRS Refs: 5.2.3

Author: mayadm

Date: 28/10/02


Table of Contents

This document was automatically generated on Wed Oct 30 23:04:21 2002 by HappyDoc version 2.0