Changeset 3536 for pykocard

Show
Ignore:
Timestamp:
04/21/10 01:08:25 (14 years ago)
Author:
jerome
Message:

Added the card's structure.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykocard/trunk/pykocard/cartadistcrs.py

    r3535 r3536  
    3838        self.serialport = None 
    3939 
     40        self.tcrsprompt = chr(13) + chr(10) + '$' # the prompt 
     41        self.eoc = chr(13) # end of command 
     42 
     43        # Each Cartadis vending card contain the following informations : 
     44        # 
     45        # the card can only be read on readers for which this group number 
     46        # was specifically allowed. 
     47        self.group = None 
     48        # the number of credits on the card. 
     49        self.value = None 
     50        # the two following fields allow the card 
     51        # to be assigned to a particular individual. 
     52        # only plastic cards can use such attributes, 
     53        # for throw-away cards, these values should both be set to 0 
     54        self.department = None 
     55        self.account = None 
     56        # transaction number. Max 3000 for plastic cards, else 500. 
     57        self.trnum = None 
     58 
    4059    def __del__(self) : 
    4160        """Ensures the serial link is closed on deletion.""" 
     
    5473            sys.stderr.flush() 
    5574 
     75