Classes | Functions | Variables
rosbridge_library.util.cbor Namespace Reference

Classes

class  Tag
 

Functions

def _bytes_to_biguint (bs)
 
def _dumps_bignum_to_bytearray (val)
 
def _encode_type_num (cbor_type, val)
 
def _is_intish (x)
 
def _is_stringish (x)
 
def _is_unicode (val)
 
def _loads (fp, limit=None, depth=0, returntags=False)
 
def _loads_array (fp, limit, depth, returntags, aux, bytes_read)
 
def _loads_map (fp, limit, depth, returntags, aux, bytes_read)
 
def _loads_tb (fp, tb, limit=None, depth=0, returntags=False)
 
def _loads_var_array (fp, limit, depth, returntags, bytes_read)
 
def _loads_var_map (fp, limit, depth, returntags, bytes_read)
 
def _read_byte (fp)
 
def _tag_aux (fp, tb)
 
def dump (obj, fp, sort_keys=False)
 
def dumps (ob, sort_keys=False)
 
def dumps_array (arr, sort_keys=False)
 
def dumps_bool (b)
 
def dumps_dict (d, sort_keys=False)
 
def dumps_float (val)
 
def dumps_int (val)
 
def dumps_string (val, is_text=None, is_bytes=None)
 
def dumps_tag (t, sort_keys=False)
 
def load (fp)
 
def loads (data)
 
def loads_bytes (fp, aux, btag=CBOR_BYTES)
 
def tagify (ob, aux)
 

Variables

 _CBOR_TAG_BIGNUM_BYTES = struct.pack('B', CBOR_TAG | CBOR_TAG_BIGNUM)
 
 _CBOR_TAG_NEGBIGNUM_BYTES = struct.pack('B', CBOR_TAG | CBOR_TAG_NEGBIGNUM)
 
int _IS_PY3 = 3
 
int _MAX_DEPTH = 100
 
int CBOR_7 = 0xE0
 
int CBOR_ARRAY = 0x80
 
int CBOR_BREAK = 0xFF
 
int CBOR_BYTES = 0x40
 
tuple CBOR_FALSE = (CBOR_7 | 20)
 
tuple CBOR_FLOAT16 = (CBOR_7 | 25)
 
tuple CBOR_FLOAT32 = (CBOR_7 | 26)
 
tuple CBOR_FLOAT64 = (CBOR_7 | 27)
 
int CBOR_INFO_BITS = 0x1F
 
int CBOR_MAP = 0xA0
 
int CBOR_NEGINT = 0x20
 
tuple CBOR_NULL = (CBOR_7 | 22)
 
int CBOR_TAG = 0xC0
 
int CBOR_TAG_BASE16 = 23
 
int CBOR_TAG_BASE64 = 22
 
int CBOR_TAG_BASE64URL = 21
 
int CBOR_TAG_BIGFLOAT = 5
 
int CBOR_TAG_BIGNUM = 2
 
int CBOR_TAG_CBOR = 24
 
int CBOR_TAG_CBOR_FILEHEADER = 55799
 
int CBOR_TAG_DATE_ARRAY = 1
 
int CBOR_TAG_DATE_STRING = 0
 
int CBOR_TAG_DECIMAL = 4
 
int CBOR_TAG_MIME = 36
 
int CBOR_TAG_NEGBIGNUM = 3
 
int CBOR_TAG_REGEX = 35
 
int CBOR_TAG_URI = 32
 
int CBOR_TEXT = 0x60
 
tuple CBOR_TRUE = (CBOR_7 | 21)
 
int CBOR_TYPE_MASK = 0xE0
 
int CBOR_UINT = 0x00
 
int CBOR_UINT16_FOLLOWS = 25
 
int CBOR_UINT32_FOLLOWS = 26
 
int CBOR_UINT64_FOLLOWS = 27
 
int CBOR_UINT8_FOLLOWS = 24
 
tuple CBOR_UNDEFINED = (CBOR_7 | 23)
 
int CBOR_VAR_FOLLOWS = 31
 

Function Documentation

def rosbridge_library.util.cbor._bytes_to_biguint (   bs)
private

Definition at line 492 of file cbor.py.

def rosbridge_library.util.cbor._dumps_bignum_to_bytearray (   val)
private

Definition at line 105 of file cbor.py.

def rosbridge_library.util.cbor._encode_type_num (   cbor_type,
  val 
)
private
For some CBOR primary type [0..7] and an auxiliary unsigned number, return CBOR encoded bytes

Definition at line 127 of file cbor.py.

def rosbridge_library.util.cbor._is_intish (   x)
private

Definition at line 214 of file cbor.py.

def rosbridge_library.util.cbor._is_stringish (   x)
private

Definition at line 212 of file cbor.py.

def rosbridge_library.util.cbor._is_unicode (   val)
private

Definition at line 148 of file cbor.py.

def rosbridge_library.util.cbor._loads (   fp,
  limit = None,
  depth = 0,
  returntags = False 
)
private

Definition at line 387 of file cbor.py.

def rosbridge_library.util.cbor._loads_array (   fp,
  limit,
  depth,
  returntags,
  aux,
  bytes_read 
)
private

Definition at line 352 of file cbor.py.

def rosbridge_library.util.cbor._loads_map (   fp,
  limit,
  depth,
  returntags,
  aux,
  bytes_read 
)
private

Definition at line 359 of file cbor.py.

def rosbridge_library.util.cbor._loads_tb (   fp,
  tb,
  limit = None,
  depth = 0,
  returntags = False 
)
private

Definition at line 396 of file cbor.py.

def rosbridge_library.util.cbor._loads_var_array (   fp,
  limit,
  depth,
  returntags,
  bytes_read 
)
private

Definition at line 327 of file cbor.py.

def rosbridge_library.util.cbor._loads_var_map (   fp,
  limit,
  depth,
  returntags,
  bytes_read 
)
private

Definition at line 338 of file cbor.py.

def rosbridge_library.util.cbor._read_byte (   fp)
private

Definition at line 319 of file cbor.py.

def rosbridge_library.util.cbor._tag_aux (   fp,
  tb 
)
private

Definition at line 290 of file cbor.py.

def rosbridge_library.util.cbor.dump (   obj,
  fp,
  sort_keys = False 
)
obj: Python object to serialize
fp: file-like object capable of .write(bytes)

Definition at line 245 of file cbor.py.

def rosbridge_library.util.cbor.dumps (   ob,
  sort_keys = False 
)

Definition at line 223 of file cbor.py.

def rosbridge_library.util.cbor.dumps_array (   arr,
  sort_keys = False 
)

Definition at line 165 of file cbor.py.

def rosbridge_library.util.cbor.dumps_bool (   b)

Definition at line 201 of file cbor.py.

def rosbridge_library.util.cbor.dumps_dict (   d,
  sort_keys = False 
)

Definition at line 172 of file cbor.py.

def rosbridge_library.util.cbor.dumps_float (   val)

Definition at line 120 of file cbor.py.

def rosbridge_library.util.cbor.dumps_int (   val)

Definition at line 84 of file cbor.py.

def rosbridge_library.util.cbor.dumps_string (   val,
  is_text = None,
  is_bytes = None 
)

Definition at line 155 of file cbor.py.

def rosbridge_library.util.cbor.dumps_tag (   t,
  sort_keys = False 
)

Definition at line 207 of file cbor.py.

def rosbridge_library.util.cbor.load (   fp)
Parse and return object from fp, a file-like object supporting .read(n)

Definition at line 280 of file cbor.py.

def rosbridge_library.util.cbor.loads (   data)
Parse CBOR bytes and return Python objects.

Definition at line 270 of file cbor.py.

def rosbridge_library.util.cbor.loads_bytes (   fp,
  aux,
  btag = CBOR_BYTES 
)

Definition at line 467 of file cbor.py.

def rosbridge_library.util.cbor.tagify (   ob,
  aux 
)

Definition at line 507 of file cbor.py.

Variable Documentation

rosbridge_library.util.cbor._CBOR_TAG_BIGNUM_BYTES = struct.pack('B', CBOR_TAG | CBOR_TAG_BIGNUM)
private

Definition at line 81 of file cbor.py.

rosbridge_library.util.cbor._CBOR_TAG_NEGBIGNUM_BYTES = struct.pack('B', CBOR_TAG | CBOR_TAG_NEGBIGNUM)
private

Definition at line 124 of file cbor.py.

int rosbridge_library.util.cbor._IS_PY3 = 3
private

Definition at line 22 of file cbor.py.

int rosbridge_library.util.cbor._MAX_DEPTH = 100
private

Definition at line 287 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_7 = 0xE0

Definition at line 44 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_ARRAY = 0x80

Definition at line 41 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_BREAK = 0xFF

Definition at line 52 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_BYTES = 0x40

Definition at line 39 of file cbor.py.

tuple rosbridge_library.util.cbor.CBOR_FALSE = (CBOR_7 | 20)

Definition at line 54 of file cbor.py.

tuple rosbridge_library.util.cbor.CBOR_FLOAT16 = (CBOR_7 | 25)

Definition at line 59 of file cbor.py.

tuple rosbridge_library.util.cbor.CBOR_FLOAT32 = (CBOR_7 | 26)

Definition at line 60 of file cbor.py.

tuple rosbridge_library.util.cbor.CBOR_FLOAT64 = (CBOR_7 | 27)

Definition at line 61 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_INFO_BITS = 0x1F

Definition at line 34 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_MAP = 0xA0

Definition at line 42 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_NEGINT = 0x20

Definition at line 38 of file cbor.py.

tuple rosbridge_library.util.cbor.CBOR_NULL = (CBOR_7 | 22)

Definition at line 56 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG = 0xC0

Definition at line 43 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_BASE16 = 23

Definition at line 71 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_BASE64 = 22

Definition at line 70 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_BASE64URL = 21

Definition at line 69 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_BIGFLOAT = 5

Definition at line 68 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_BIGNUM = 2

Definition at line 65 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_CBOR = 24

Definition at line 72 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_CBOR_FILEHEADER = 55799

Definition at line 79 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_DATE_ARRAY = 1

Definition at line 64 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_DATE_STRING = 0

Definition at line 63 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_DECIMAL = 4

Definition at line 67 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_MIME = 36

Definition at line 78 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_NEGBIGNUM = 3

Definition at line 66 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_REGEX = 35

Definition at line 77 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TAG_URI = 32

Definition at line 74 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TEXT = 0x60

Definition at line 40 of file cbor.py.

tuple rosbridge_library.util.cbor.CBOR_TRUE = (CBOR_7 | 21)

Definition at line 55 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_TYPE_MASK = 0xE0

Definition at line 33 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_UINT = 0x00

Definition at line 37 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_UINT16_FOLLOWS = 25

Definition at line 47 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_UINT32_FOLLOWS = 26

Definition at line 48 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_UINT64_FOLLOWS = 27

Definition at line 49 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_UINT8_FOLLOWS = 24

Definition at line 46 of file cbor.py.

tuple rosbridge_library.util.cbor.CBOR_UNDEFINED = (CBOR_7 | 23)

Definition at line 57 of file cbor.py.

int rosbridge_library.util.cbor.CBOR_VAR_FOLLOWS = 31

Definition at line 50 of file cbor.py.



rosbridge_library
Author(s): Jonathan Mace
autogenerated on Fri May 10 2019 02:17:02