Package ais :: Module translators
[hide private]
[frames] | no frames]

Module translators

source code

Codecs to handle encoding to and from BitVectors


Requires:

Bugs:

To Do: maybe decorators?

Author: Kurt Schwehr

Version: 2068

Copyright: 2006

Functions [hide private]
BitVector unsigned_int_enc(val, bitSize)
int unsigned_int_dec(bv)
BitVector int_enc(val, bitSize)
int int_dec(bv)
BitVector bool_enc(val, bitSize)
bool bool_dec(bv)
BitVector unsigned_decimal_enc(val, bitSize)
Decimal unsigned_decimal_dec(bv)
BitVector decimal_enc(val, bitSize)
Decimal decimal_dec(bv)
BitVector float_enc(val, bitSize)
float float_dec(bv)

Variables [hide private]
  __date__ = '2006-05-02'
Date of last svn commit
  encode = {'string': <function encode at 0x20abd70>, 'int': <f...
use this table to get the functions to go from usable values in python to bitvectors
  decode = {'string': <function decode at 0x20abd30>, 'int': <f...
use this table to get the functions to go from bitvectors to usable values in python
  success = False

Function Details [hide private]

unsigned_int_enc(val, bitSize)

source code 
Returns: BitVector

unsigned_int_dec(bv)

source code 
Returns: int

int_enc(val, bitSize)

source code 
Returns: BitVector

int_dec(bv)

source code 
Returns: int

bool_enc(val, bitSize)

source code 
Returns: BitVector

bool_dec(bv)

source code 
Returns: bool

unsigned_decimal_enc(val, bitSize)

source code 
Returns: BitVector

unsigned_decimal_dec(bv)

source code 
Returns: Decimal

decimal_enc(val, bitSize)

source code 
Returns: BitVector

decimal_dec(bv)

source code 
Returns: Decimal

float_enc(val, bitSize)

source code 
Returns: BitVector

float_dec(bv)

source code 
Returns: float

Variables Details [hide private]

__date__

Date of last svn commit
Value:
'2006-05-02'                                                           
      

encode

use this table to get the functions to go from usable values in python to bitvectors
Value:
{'bool': <function bool_enc at 0x2bb86f0>,
 'decimal': <function decimal_enc at 0x2bb87f0>,
 'float': <function float_enc at 0x2bb8870>,
 'int': <function int_enc at 0x2bb8670>,
 'string': <function encode at 0x20abd70>,
 'unsigned decimal': <function unsigned_decimal_enc at 0x2bb8770>,
 'unsigned int': <function unsigned_int_enc at 0x2bb85f0>}             
      

decode

use this table to get the functions to go from bitvectors to usable values in python
Value:
{'bool': <function bool_dec at 0x2bb8730>,
 'decimal': <function decimal_dec at 0x2bb8830>,
 'float': <function float_dec at 0x2bb88b0>,
 'int': <function int_dec at 0x2bb86b0>,
 'string': <function decode at 0x20abd30>,
 'unsigned decimal': <function unsigned_decimal_dec at 0x2bb87b0>,
 'unsigned int': <function unsigned_int_dec at 0x2bb8630>}             
      

success

None
Value:
False