Functions | Variables
include::genpy::generate_struct Namespace Reference

Functions

def add_pattern
def clear_patterns
def compute_struct_pattern
def get_patterns
def int32_pack
def int32_unpack
def pack
def pack2
def reduce_pattern
def serialize
 :param expr str: string python expression that is evaluated for serialization :returns str: python call to write value returned by expr to serialization buffer
def unpack
def unpack2

Variables

list _context_patterns = []

Function Documentation

Record struct pattern that's been used for (de)serialization

Definition at line 36 of file generate_struct.py.

Clear record of struct pattern that have been used for (de)serialization

Definition at line 41 of file generate_struct.py.

:param types: type names, ``[str]``
:returns: format string for struct if types are all simple. Otherwise, return None, ``str``

Definition at line 52 of file generate_struct.py.

:returns: record of struct pattern that have been used for (de)serialization

Definition at line 46 of file generate_struct.py.

:param var: variable name, ``str``
:returns: struct packing code for an int32

Definition at line 98 of file generate_struct.py.

def include.genpy.generate_struct.int32_unpack (   var,
  buff 
)
:param var: variable name, ``str``
:returns: struct unpacking code for an int32

Definition at line 106 of file generate_struct.py.

def include.genpy.generate_struct.pack (   pattern,
  vars 
)
create struct.pack call for when pattern is a string pattern
:param pattern: pattern for pack, ``str``
:param vars: name of variables to pack, ``str``

Definition at line 114 of file generate_struct.py.

def include.genpy.generate_struct.pack2 (   pattern,
  vars 
)
create struct.pack call for when pattern is the name of a variable
:param pattern: name of variable storing string pattern, ``struct``
:param vars: name of variables to pack, ``str``

Definition at line 124 of file generate_struct.py.

Optimize the struct format pattern.
:param pattern: struct pattern, ``str``
:returns: optimized struct pattern, ``str``

Definition at line 64 of file generate_struct.py.

:param expr str: string python expression that is evaluated for serialization :returns str: python call to write value returned by expr to serialization buffer

Definition at line 94 of file generate_struct.py.

def include.genpy.generate_struct.unpack (   var,
  pattern,
  buff 
)
create struct.unpack call for when pattern is a string pattern
:param var: name of variable to unpack, ``str``
:param pattern: pattern for pack, ``str``
:param buff: buffer to unpack from, ``str``

Definition at line 132 of file generate_struct.py.

def include.genpy.generate_struct.unpack2 (   var,
  pattern,
  buff 
)
Create struct.unpack call for when pattern refers to variable
:param var: variable the stores the result of unpack call, ``str``
:param pattern: name of variable that unpack will read from, ``str``
:param buff: buffer that the unpack reads from, ``StringIO``

Definition at line 144 of file generate_struct.py.


Variable Documentation

Definition at line 35 of file generate_struct.py.



firos
Author(s): IƱigo Gonzalez, igonzalez@ikergune.com
autogenerated on Thu Jun 6 2019 17:51:04