code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from __future__ import absolute_import, division, unicode_literals from collections import OrderedDict import re from pip._vendor.six import string_types from . import base from .._utils import moduleFactoryFactory tag_regexp = re.compile("{([^}]*)}(.*)") def getETreeBuilder(ElementTreeImplementation): ElementTree = ElementTreeImplementation ElementTreeCommentType = ElementTree.Comment("asd").tag class TreeWalker(base.NonRecursiveTreeWalker): # pylint:disable=unused-variable """Given the particular ElementTree representation, this implementation, to avoid using recursion, returns "nodes" as tuples with the following content: 1. The current element 2. The index of the element relative to its parent 3. A stack of ancestor elements 4. A flag "text", "tail" or None to indicate if the current node is a text node; either the text or tail of the current element (1) """ def getNodeDetails(self, node): if isinstance(node, tuple): # It might be the root Element elt, _, _, flag = node if flag in ("text", "tail"): return base.TEXT, getattr(elt, flag) else: node = elt if not(hasattr(node, "tag")): node = node.getroot() if node.tag in ("DOCUMENT_ROOT", "DOCUMENT_FRAGMENT"): return (base.DOCUMENT,) elif node.tag == "<!DOCTYPE>": return (base.DOCTYPE, node.text, node.get("publicId"), node.get("systemId")) elif node.tag == ElementTreeCommentType: return base.COMMENT, node.text else: assert isinstance(node.tag, string_types), type(node.tag) # This is assumed to be an ordinary element match = tag_regexp.match(node.tag) if match: namespace, tag = match.groups() else: namespace = None tag = node.tag attrs = OrderedDict() for name, value in list(node.attrib.items()): match = tag_regexp.match(name) if match: attrs[(match.group(1), match.group(2))] = value else: attrs[(None, name)] = value return (base.ELEMENT, namespace, tag, attrs, len(node) or node.text) def getFirstChild(self, node): if isinstance(node, tuple): element, key, parents, flag = node else: element, key, parents, flag = node, None, [], None if flag in ("text", "tail"): return None else: if element.text: return element, key, parents, "text" elif len(element): parents.append(element) return element[0], 0, parents, None else: return None def getNextSibling(self, node): if isinstance(node, tuple): element, key, parents, flag = node else: return None if flag == "text": if len(element): parents.append(element) return element[0], 0, parents, None else: return None else: if element.tail and flag != "tail": return element, key, parents, "tail" elif key < len(parents[-1]) - 1: return parents[-1][key + 1], key + 1, parents, None else: return None def getParentNode(self, node): if isinstance(node, tuple): element, key, parents, flag = node else: return None if flag == "text": if not parents: return element else: return element, key, parents, None else: parent = parents.pop() if not parents: return parent else: assert list(parents[-1]).count(parent) == 1 return parent, list(parents[-1]).index(parent), parents, None return locals() getETreeModule = moduleFactoryFactory(getETreeBuilder)
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ''' Copyright (C) 2010 Aurelio A. Heckert, aurium (a) gmail dot com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ''' # standard library import os import sys import tempfile # local library from webslicer_effect import * import inkex inkex.localize() class WebSlicer_Export(WebSlicer_Effect): def __init__(self): WebSlicer_Effect.__init__(self) self.OptionParser.add_option("--tab") self.OptionParser.add_option("--dir", action="store", type="string", dest="dir", help="") self.OptionParser.add_option("--create-dir", action="store", type="inkbool", default=False, dest="create_dir", help="") self.OptionParser.add_option("--with-code", action="store", type="inkbool", default=False, dest="with_code", help="") svgNS = '{http://www.w3.org/2000/svg}' def validate_inputs(self): # The user must supply a directory to export: if is_empty( self.options.dir ): inkex.errormsg(_('You must give a directory to export the slices.')) return {'error':'You must give a directory to export the slices.'} # No directory separator at the path end: if self.options.dir[-1] == '/' or self.options.dir[-1] == '\\': self.options.dir = self.options.dir[0:-1] # Test if the directory exists: if not os.path.exists( self.options.dir ): if self.options.create_dir: # Try to create it: try: os.makedirs( self.options.dir ) except Exception, e: inkex.errormsg( _('Can\'t create "%s".') % self.options.dir ) inkex.errormsg( _('Error: %s') % e ) return {'error':'Can\'t create the directory to export.'} else: inkex.errormsg(_('The directory "%s" does not exists.') % self.options.dir) return self.unique_html_id( self.get_slicer_layer() ) return None def get_cmd_output(self, cmd): # This solution comes from Andrew Reedick <jr9445 at ATT.COM> # http://mail.python.org/pipermail/python-win32/2008-January/006606.html # This method replaces the commands.getstatusoutput() usage, with the # hope to correct the windows exporting bug: # https://bugs.launchpad.net/inkscape/+bug/563722 if sys.platform != "win32": cmd = '{ '+ cmd +'; }' pipe = os.popen(cmd +' 2>&1', 'r') text = pipe.read() sts = pipe.close() if sts is None: sts = 0 if text[-1:] == '\n': text = text[:-1] return sts, text _html_ids = [] def unique_html_id(self, el): for child in el.getchildren(): if child.tag in [ self.svgNS+'rect', self.svgNS+'path', self.svgNS+'circle', self.svgNS+'g' ]: conf = self.get_el_conf(child) if conf['html-id'] in self._html_ids: inkex.errormsg( _('You have more than one element with "%s" html-id.') % conf['html-id'] ) n = 2 while (conf['html-id']+"-"+str(n)) in self._html_ids: n += 1 conf['html-id'] += "-"+str(n) self._html_ids.append( conf['html-id'] ) self.save_conf( conf, child ) self.unique_html_id( child ) def test_if_has_imagemagick(self): (status, output) = self.get_cmd_output('convert --version') self.has_magick = ( status == 0 and 'ImageMagick' in output ) def effect(self): self.test_if_has_imagemagick() error = self.validate_inputs() if error: return error # Register the basic CSS code: self.reg_css( 'body', 'text-align', 'center' ) # Create the temporary SVG with invisible Slicer layer to export image pieces self.create_the_temporary_svg() # Start what we really want! self.export_chids_of( self.get_slicer_layer() ) # Write the HTML and CSS files if asked for: if self.options.with_code: self.make_html_file() self.make_css_file() # Delete the temporary SVG with invisible Slicer layer self.delete_the_temporary_svg() #TODO: prevent inkex to return svg code to update Inkscape def make_html_file(self): f = open(os.path.join(self.options.dir,'layout.html'), 'w') f.write( '<html>\n<head>\n' +\ ' <title>Web Layout Testing</title>\n' +\ ' <style type="text/css" media="screen">\n' +\ ' @import url("style.css")\n' +\ ' </style>\n' +\ '</head>\n<body>\n' +\ self.html_code() +\ ' <p style="position:absolute; bottom:10px">\n' +\ ' This HTML code is not done to the web. <br/>\n' +\ ' The automatic HTML and CSS code are only a helper.' +\ '</p>\n</body>\n</html>' ) f.close() def make_css_file(self): f = open(os.path.join(self.options.dir,'style.css'), 'w') f.write( '/*\n' +\ '** This CSS code is not done to the web.\n' +\ '** The automatic HTML and CSS code are only a helper.\n' +\ '*/\n' +\ self.css_code() ) f.close() def create_the_temporary_svg(self): (ref, self.tmp_svg) = tempfile.mkstemp('.svg') layer = self.get_slicer_layer() current_style = ('style' in layer.attrib) and layer.attrib['style'] or '' layer.attrib['style'] = 'display:none' self.document.write( self.tmp_svg ); layer.attrib['style'] = current_style def delete_the_temporary_svg(self): os.remove( self.tmp_svg ) noid_element_count = 0 def get_el_conf(self, el): desc = el.find(self.svgNS+'desc') conf = {} if desc is None: desc = inkex.etree.SubElement(el, 'desc') if desc.text is None: desc.text = '' for line in desc.text.split("\n"): if line.find(':') > 0: line = line.split(':') conf[line[0].strip()] = line[1].strip() if not 'html-id' in conf: if el == self.get_slicer_layer(): return {'html-id':'#body#'} else: self.noid_element_count += 1 conf['html-id'] = 'element-'+str(self.noid_element_count) desc.text += "\nhtml-id:"+conf['html-id'] return conf def save_conf(self, conf, el): desc = el.find('{http://www.w3.org/2000/svg}desc') if desc is not None: conf_a = [] for k in conf: conf_a.append( k+' : '+conf[k] ) desc.text = "\n".join(conf_a) def export_chids_of(self, parent): parent_id = self.get_el_conf( parent )['html-id'] for el in parent.getchildren(): el_conf = self.get_el_conf( el ) if el.tag == self.svgNS+'g': if self.options.with_code: self.register_group_code( el, el_conf ) else: self.export_chids_of( el ) if el.tag in [ self.svgNS+'rect', self.svgNS+'path', self.svgNS+'circle' ]: if self.options.with_code: self.register_unity_code( el, el_conf, parent_id ) self.export_img( el, el_conf ) def register_group_code(self, group, conf): self.reg_html('div', group) selec = '#'+conf['html-id'] self.reg_css( selec, 'position', 'absolute' ) geometry = self.get_relative_el_geometry(group) self.reg_css( selec, 'top', str(int(geometry['y']))+'px' ) self.reg_css( selec, 'left', str(int(geometry['x']))+'px' ) self.reg_css( selec, 'width', str(int(geometry['w']))+'px' ) self.reg_css( selec, 'height', str(int(geometry['h']))+'px' ) self.export_chids_of( group ) def __validate_slice_conf(self, conf): if not 'layout-disposition' in conf: conf['layout-disposition'] = 'bg-el-norepeat' if not 'layout-position-anchor' in conf: conf['layout-position-anchor'] = 'mc' return conf def register_unity_code(self, el, conf, parent_id): conf = self.__validate_slice_conf(conf) css_selector = '#'+conf['html-id'] bg_repeat = 'no-repeat' img_name = self.img_name(el, conf) if conf['layout-disposition'][0:2] == 'bg': if conf['layout-disposition'][0:9] == 'bg-parent': if parent_id == '#body#': css_selector = 'body' else: css_selector = '#'+parent_id if conf['layout-disposition'] == 'bg-parent-repeat': bg_repeat = 'repeat' if conf['layout-disposition'] == 'bg-parent-repeat-x': bg_repeat = 'repeat-x' if conf['layout-disposition'] == 'bg-parent-repeat-y': bg_repeat = 'repeat-y' lay_anchor = conf['layout-position-anchor'] if lay_anchor == 'tl': lay_anchor = 'top left' if lay_anchor == 'tc': lay_anchor = 'top center' if lay_anchor == 'tr': lay_anchor = 'top right' if lay_anchor == 'ml': lay_anchor = 'middle left' if lay_anchor == 'mc': lay_anchor = 'middle center' if lay_anchor == 'mr': lay_anchor = 'middle right' if lay_anchor == 'bl': lay_anchor = 'bottom left' if lay_anchor == 'bc': lay_anchor = 'bottom center' if lay_anchor == 'br': lay_anchor = 'bottom right' self.reg_css( css_selector, 'background', 'url("%s") %s %s' % (img_name, bg_repeat, lay_anchor) ) else: # conf['layout-disposition'][0:9] == 'bg-el...' self.reg_html('div', el) self.reg_css( css_selector, 'background', 'url("%s") %s' % (img_name, 'no-repeat') ) self.reg_css( css_selector, 'position', 'absolute' ) geo = self.get_relative_el_geometry(el,True) self.reg_css( css_selector, 'top', geo['y'] ) self.reg_css( css_selector, 'left', geo['x'] ) self.reg_css( css_selector, 'width', geo['w'] ) self.reg_css( css_selector, 'height', geo['h'] ) else: # conf['layout-disposition'] == 'img...' self.reg_html('img', el) if conf['layout-disposition'] == 'img-pos': self.reg_css( css_selector, 'position', 'absolute' ) geo = self.get_relative_el_geometry(el) self.reg_css( css_selector, 'left', str(geo['x'])+'px' ) self.reg_css( css_selector, 'top', str(geo['y'])+'px' ) if conf['layout-disposition'] == 'img-float-left': self.reg_css( css_selector, 'float', 'right' ) if conf['layout-disposition'] == 'img-float-right': self.reg_css( css_selector, 'float', 'right' ) el_geo = { } def register_all_els_geometry(self): ink_cmm = 'inkscape --query-all '+self.tmp_svg (status, output) = self.get_cmd_output( ink_cmm ) self.el_geo = { } if status == 0: for el in output.split('\n'): el = el.split(',') if len(el) == 5: self.el_geo[el[0]] = { 'x':float(el[1]), 'y':float(el[2]), 'w':float(el[3]), 'h':float(el[4]) } doc_w = self.unittouu( self.document.getroot().get('width') ) doc_h = self.unittouu( self.document.getroot().get('height') ) self.el_geo['webslicer-layer'] = { 'x':0, 'y':0, 'w':doc_w, 'h':doc_h } def get_relative_el_geometry(self, el, value_to_css=False): # This method return a dictionary with x, y, w and h keys. # All values are float, if value_to_css is False, otherwise # that is a string ended with "px". The x and y values are # relative to parent position. if not self.el_geo: self.register_all_els_geometry() parent = self.getParentNode(el) geometry = self.el_geo[el.attrib['id']] geometry['x'] -= self.el_geo[parent.attrib['id']]['x'] geometry['y'] -= self.el_geo[parent.attrib['id']]['y'] if value_to_css: for k in geometry: geometry[k] = str(int(geometry[k]))+'px' return geometry def img_name(self, el, conf): return el.attrib['id']+'.'+conf['format'] def export_img(self, el, conf): if not self.has_magick: inkex.errormsg(_('You must install the ImageMagick to get JPG and GIF.')) conf['format'] = 'png' img_name = os.path.join( self.options.dir, self.img_name(el, conf) ) img_name_png = img_name if conf['format'] != 'png': img_name_png = img_name+'.png' opts = '' if 'bg-color' in conf: opts += ' -b "'+conf['bg-color']+'" -y 1' if 'dpi' in conf: opts += ' -d '+conf['dpi'] if 'dimension' in conf: dim = conf['dimension'].split('x') opts += ' -w '+dim[0]+' -h '+dim[1] (status, output) = self.get_cmd_output( 'inkscape %s -i "%s" -e "%s" "%s"' % ( opts, el.attrib['id'], img_name_png, self.tmp_svg ) ) if conf['format'] != 'png': opts = '' if conf['format'] == 'jpg': opts += ' -quality '+str(conf['quality']) if conf['format'] == 'gif': if conf['gif-type'] == 'grayscale': opts += ' -type Grayscale' else: opts += ' -type Palette' if conf['palette-size'] < 256: opts += ' -colors '+str(conf['palette-size']) (status, output) = self.get_cmd_output( 'convert "%s" %s "%s"' % ( img_name_png, opts, img_name ) ) if status != 0: inkex.errormsg('Upss... ImageMagick error: '+output) os.remove(img_name_png) _html = {} def reg_html(self, el_tag, el): parent = self.getParentNode( el ) parent_id = self.get_el_conf( parent )['html-id'] if parent == self.get_slicer_layer(): parent_id = 'body' conf = self.get_el_conf( el ) el_id = conf['html-id'] if 'html-class' in conf: el_class = conf['html-class'] else: el_class = '' if not parent_id in self._html: self._html[parent_id] = [] self._html[parent_id].append({ 'tag':el_tag, 'id':el_id, 'class':el_class }) def html_code(self, parent='body', ident=' '): #inkex.errormsg( self._html ) if not parent in self._html: return '' code = '' for el in self._html[parent]: child_code = self.html_code(el['id'], ident+' ') tag_class = '' if el['class'] != '': tag_class = ' class="'+el['class']+'"' if el['tag'] == 'img': code += ident+'<img id="'+el['id']+'"'+tag_class+\ ' src="'+self.img_name(el, self.get_el_conf(el))+'"/>\n' else: code += ident+'<'+el['tag']+' id="'+el['id']+'"'+tag_class+'>\n' if child_code: code += child_code else: code += ident+' Element '+el['id']+'\n' code += ident+'</'+el['tag']+'><!-- id="'+el['id']+'" -->\n' return code _css = [] def reg_css(self, selector, att, val): pos = i = -1 for s in self._css: i += 1 if s['selector'] == selector: pos = i if pos == -1: pos = i + 1 self._css.append({ 'selector':selector, 'atts':{} }) if not att in self._css[pos]['atts']: self._css[pos]['atts'][att] = [] self._css[pos]['atts'][att].append( val ) def css_code(self): code = '' for s in self._css: code += '\n'+s['selector']+' {\n' for att in s['atts']: val = s['atts'][att] if att == 'background' and len(val) > 1: code += ' /* the next attribute needs a CSS3 enabled browser */\n' code += ' '+ att +': '+ (', '.join(val)) +';\n' code += '}\n' return code def output(self): # Cancel document serialization to stdout pass if __name__ == '__main__': e = WebSlicer_Export() e.affect()
unknown
codeparrot/codeparrot-clean
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. """ Base for Atmel AVR series of microcontrollers """ from SCons.Script import Builder, DefaultEnvironment env = DefaultEnvironment() env.Replace( AR="avr-ar", AS="avr-as", CC="avr-gcc", CXX="avr-g++", OBJCOPY="avr-objcopy", RANLIB="avr-ranlib", SIZETOOL="avr-size", ARFLAGS=["rcs"], ASPPFLAGS=["-x", "assembler-with-cpp"], CPPFLAGS=[ "-g", # include debugging info (so errors include line numbers) "-Os", # optimize for size "-Wall", # show warnings "-ffunction-sections", # place each function in its own section "-fdata-sections", "-MMD", # output dependency info "-mmcu=$BOARD_MCU" ], CPPDEFINES=[ "F_CPU=$BOARD_F_CPU" ], CXXFLAGS=[ "-fno-exceptions", "-fno-threadsafe-statics" ], LINKFLAGS=[ "-Os", "-mmcu=$BOARD_MCU", "-Wl,--gc-sections,--relax" ], LIBS=["m"], SIZEPRINTCMD='"$SIZETOOL" --mcu=$BOARD_MCU -C -d $SOURCES', PROGNAME="firmware", PROGSUFFIX=".elf" ) env.Append( BUILDERS=dict( ElfToEep=Builder( action=" ".join([ "$OBJCOPY", "-O", "ihex", "-j", ".eeprom", '--set-section-flags=.eeprom="alloc,load"', "--no-change-warnings", "--change-section-lma", ".eeprom=0", "$SOURCES", "$TARGET"]), suffix=".eep" ), ElfToHex=Builder( action=" ".join([ "$OBJCOPY", "-O", "ihex", "-R", ".eeprom", "$SOURCES", "$TARGET"]), suffix=".hex" ) ) )
unknown
codeparrot/codeparrot-clean
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import webob.exc from nova.api.openstack import extensions from nova.api.openstack import wsgi class FoxInSocksController(object): def index(self, req): return "Try to say this Mr. Knox, sir..." class FoxInSocksServerControllerExtension(wsgi.Controller): @wsgi.action('add_tweedle') def _add_tweedle(self, req, id, body): return "Tweedle Beetle Added." @wsgi.action('delete_tweedle') def _delete_tweedle(self, req, id, body): return "Tweedle Beetle Deleted." @wsgi.action('fail') def _fail(self, req, id, body): raise webob.exc.HTTPBadRequest(explanation='Tweedle fail') class FoxInSocksFlavorGooseControllerExtension(wsgi.Controller): @wsgi.extends def show(self, req, resp_obj, id): # NOTE: This only handles JSON responses. # You can use content type header to test for XML. resp_obj.obj['flavor']['googoose'] = req.GET.get('chewing') class FoxInSocksFlavorBandsControllerExtension(wsgi.Controller): @wsgi.extends def show(self, req, resp_obj, id): # NOTE: This only handles JSON responses. # You can use content type header to test for XML. resp_obj.obj['big_bands'] = 'Pig Bands!' class Foxinsocks(extensions.ExtensionDescriptor): """The Fox In Socks Extension.""" name = "Fox In Socks" alias = "FOXNSOX" namespace = "http://www.fox.in.socks/api/ext/pie/v1.0" updated = "2011-01-22T13:25:27-06:00" def __init__(self, ext_mgr): ext_mgr.register(self) def get_resources(self): resources = [] resource = extensions.ResourceExtension('foxnsocks', FoxInSocksController()) resources.append(resource) return resources def get_controller_extensions(self): extension_list = [] extension_set = [ (FoxInSocksServerControllerExtension, 'servers'), (FoxInSocksFlavorGooseControllerExtension, 'flavors'), (FoxInSocksFlavorBandsControllerExtension, 'flavors'), ] for klass, collection in extension_set: controller = klass() ext = extensions.ControllerExtension(self, collection, controller) extension_list.append(ext) return extension_list
unknown
codeparrot/codeparrot-clean
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Contains test utilities.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np from tensorflow.core.example import example_pb2 from tensorflow.core.example import feature_pb2 from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.lib.io import tf_record from tensorflow.python.ops import image_ops def _encoded_int64_feature(ndarray): return feature_pb2.Feature(int64_list=feature_pb2.Int64List( value=ndarray.flatten().tolist())) def _encoded_bytes_feature(tf_encoded): encoded = tf_encoded.eval() def string_to_bytes(value): return feature_pb2.BytesList(value=[value]) return feature_pb2.Feature(bytes_list=string_to_bytes(encoded)) def _string_feature(value): value = value.encode('utf-8') return feature_pb2.Feature(bytes_list=feature_pb2.BytesList(value=[value])) def _encoder(image, image_format): assert image_format in ['jpeg', 'png'] if image_format == 'jpeg': tf_image = constant_op.constant(image, dtype=dtypes.uint8) return image_ops.encode_jpeg(tf_image) if image_format == 'png': tf_image = constant_op.constant(image, dtype=dtypes.uint8) return image_ops.encode_png(tf_image) def generate_image(image_shape, image_format='jpeg', label=0): """Generates an image and an example containing the encoded image. GenerateImage must be called within an active session. Args: image_shape: the shape of the image to generate. image_format: the encoding format of the image. label: the int64 labels for the image. Returns: image: the generated image. example: a TF-example with a feature key 'image/encoded' set to the serialized image and a feature key 'image/format' set to the image encoding format ['jpeg', 'png']. """ image = np.random.random_integers(0, 255, size=image_shape) tf_encoded = _encoder(image, image_format) example = example_pb2.Example(features=feature_pb2.Features(feature={ 'image/encoded': _encoded_bytes_feature(tf_encoded), 'image/format': _string_feature(image_format), 'image/class/label': _encoded_int64_feature(np.array(label)), })) return image, example.SerializeToString() def create_tfrecord_files(output_dir, num_files=3, num_records_per_file=10): """Creates TFRecords files. The method must be called within an active session. Args: output_dir: The directory where the files are stored. num_files: The number of files to create. num_records_per_file: The number of records per file. Returns: A list of the paths to the TFRecord files. """ tfrecord_paths = [] for i in range(num_files): path = os.path.join(output_dir, 'flowers.tfrecord-%d-of-%s' % (i, num_files)) tfrecord_paths.append(path) writer = tf_record.TFRecordWriter(path) for _ in range(num_records_per_file): _, example = generate_image(image_shape=(10, 10, 3)) writer.write(example) writer.close() return tfrecord_paths
unknown
codeparrot/codeparrot-clean
from mongoengine.errors import OperationError from mongoengine.queryset.base import (BaseQuerySet, DO_NOTHING, NULLIFY, CASCADE, DENY, PULL) __all__ = ('QuerySet', 'QuerySetNoCache', 'DO_NOTHING', 'NULLIFY', 'CASCADE', 'DENY', 'PULL') # The maximum number of items to display in a QuerySet.__repr__ REPR_OUTPUT_SIZE = 20 ITER_CHUNK_SIZE = 100 class QuerySet(BaseQuerySet): """The default queryset, that builds queries and handles a set of results returned from a query. Wraps a MongoDB cursor, providing :class:`~mongoengine.Document` objects as the results. """ _has_more = True _len = None _result_cache = None def __iter__(self): """Iteration utilises a results cache which iterates the cursor in batches of ``ITER_CHUNK_SIZE``. If ``self._has_more`` the cursor hasn't been exhausted so cache then batch. Otherwise iterate the result_cache. """ self._iter = True if self._has_more: return self._iter_results() # iterating over the cache. return iter(self._result_cache) def __len__(self): """Since __len__ is called quite frequently (for example, as part of list(qs) we populate the result cache and cache the length. """ if self._len is not None: return self._len if self._has_more: # populate the cache list(self._iter_results()) self._len = len(self._result_cache) return self._len def __repr__(self): """Provides the string representation of the QuerySet """ if self._iter: return '.. queryset mid-iteration ..' self._populate_cache() data = self._result_cache[:REPR_OUTPUT_SIZE + 1] if len(data) > REPR_OUTPUT_SIZE: data[-1] = "...(remaining elements truncated)..." return repr(data) def _iter_results(self): """A generator for iterating over the result cache. Also populates the cache if there are more possible results to yield. Raises StopIteration when there are no more results""" if self._result_cache is None: self._result_cache = [] pos = 0 while True: upper = len(self._result_cache) while pos < upper: yield self._result_cache[pos] pos += 1 if not self._has_more: raise StopIteration if len(self._result_cache) <= pos: self._populate_cache() def _populate_cache(self): """ Populates the result cache with ``ITER_CHUNK_SIZE`` more entries (until the cursor is exhausted). """ if self._result_cache is None: self._result_cache = [] if self._has_more: try: for i in range(ITER_CHUNK_SIZE): self._result_cache.append(next(self)) except StopIteration: self._has_more = False def count(self, with_limit_and_skip=False): """Count the selected elements in the query. :param with_limit_and_skip (optional): take any :meth:`limit` or :meth:`skip` that has been applied to this cursor into account when getting the count """ if with_limit_and_skip is False: return super(QuerySet, self).count(with_limit_and_skip) if self._len is None: self._len = super(QuerySet, self).count(with_limit_and_skip) return self._len def no_cache(self): """Convert to a non_caching queryset .. versionadded:: 0.8.3 Convert to non caching queryset """ if self._result_cache is not None: raise OperationError("QuerySet already cached") return self.clone_into(QuerySetNoCache(self._document, self._collection)) class QuerySetNoCache(BaseQuerySet): """A non caching QuerySet""" def cache(self): """Convert to a caching queryset .. versionadded:: 0.8.3 Convert to caching queryset """ return self.clone_into(QuerySet(self._document, self._collection)) def __repr__(self): """Provides the string representation of the QuerySet .. versionchanged:: 0.6.13 Now doesnt modify the cursor """ if self._iter: return '.. queryset mid-iteration ..' data = [] for i in range(REPR_OUTPUT_SIZE + 1): try: data.append(next(self)) except StopIteration: break if len(data) > REPR_OUTPUT_SIZE: data[-1] = "...(remaining elements truncated)..." self.rewind() return repr(data) def __iter__(self): queryset = self if queryset._iter: queryset = self.clone() queryset.rewind() return queryset class QuerySetNoDeRef(QuerySet): """Special no_dereference QuerySet""" def __dereference(items, max_depth=1, instance=None, name=None): return items
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # HyperSpy is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with HyperSpy. If not, see <http://www.gnu.org/licenses/>. import os import logging import numpy as np _logger = logging.getLogger(__name__) no_netcdf = False try: from netCDF4 import Dataset which_netcdf = 'netCDF4' except BaseException: try: from netCDF3 import Dataset which_netcdf = 'netCDF3' except BaseException: try: from Scientific.IO.NetCDF import NetCDFFile as Dataset which_netcdf = 'Scientific Python' except BaseException: no_netcdf = True # Plugin characteristics # ---------------------- format_name = 'netCDF' description = '' full_support = True file_extensions = ('nc', 'NC') default_extension = 0 # Writing features writes = False # ---------------------- attrib2netcdf = \ { 'energyorigin': 'energy_origin', 'energyscale': 'energy_scale', 'energyunits': 'energy_units', 'xorigin': 'x_origin', 'xscale': 'x_scale', 'xunits': 'x_units', 'yorigin': 'y_origin', 'yscale': 'y_scale', 'yunits': 'y_units', 'zorigin': 'z_origin', 'zscale': 'z_scale', 'zunits': 'z_units', 'exposure': 'exposure', 'title': 'title', 'binning': 'binning', 'readout_frequency': 'readout_frequency', 'ccd_height': 'ccd_height', 'blanking': 'blanking' } acquisition2netcdf = \ { 'exposure': 'exposure', 'binning': 'binning', 'readout_frequency': 'readout_frequency', 'ccd_height': 'ccd_height', 'blanking': 'blanking', 'gain': 'gain', 'pppc': 'pppc', } treatments2netcdf = \ { 'dark_current': 'dark_current', 'readout': 'readout', } def file_reader(filename, *args, **kwds): if no_netcdf is True: raise ImportError("No netCDF library installed. " "To read EELSLab netcdf files install " "one of the following packages:" "netCDF4, netCDF3, netcdf, scientific") ncfile = Dataset(filename, 'r') if hasattr(ncfile, 'file_format_version'): if ncfile.file_format_version == 'EELSLab 0.1': dictionary = nc_hyperspy_reader_0dot1( ncfile, filename, *args, **kwds) else: ncfile.close() raise IOError('Unsupported netCDF file') return dictionary, def nc_hyperspy_reader_0dot1(ncfile, filename, *args, **kwds): calibration_dict, acquisition_dict, treatments_dict = {}, {}, {} dc = ncfile.variables['data_cube'] data = dc[:] if 'history' in calibration_dict: calibration_dict['history'] = eval(ncfile.history) for attrib in attrib2netcdf.items(): if hasattr(dc, attrib[1]): value = eval('dc.' + attrib[1]) if isinstance(value, np.ndarray): calibration_dict[attrib[0]] = value[0] else: calibration_dict[attrib[0]] = value else: _logger.warning("Warning: the attribute '%s' is not defined in " "the file '%s'", attrib[0], filename) for attrib in acquisition2netcdf.items(): if hasattr(dc, attrib[1]): value = eval('dc.' + attrib[1]) if isinstance(value, np.ndarray): acquisition_dict[attrib[0]] = value[0] else: acquisition_dict[attrib[0]] = value else: _logger.warning("Warning: the attribute '%s' is not defined in " "the file '%s'", attrib[0], filename) for attrib in treatments2netcdf.items(): if hasattr(dc, attrib[1]): treatments_dict[attrib[0]] = eval('dc.' + attrib[1]) else: _logger.warning("Warning: the attribute '%s' is not defined in " "the file '%s'", attrib[0], filename) original_metadata = {'record_by': ncfile.type, 'calibration': calibration_dict, 'acquisition': acquisition_dict, 'treatments': treatments_dict} ncfile.close() # Now we'll map some parameters record_by = 'image' if original_metadata[ 'record_by'] == 'image' else 'spectrum' if record_by == 'image': dim = len(data.shape) names = ['Z', 'Y', 'X'][3 - dim:] scaleskeys = ['zscale', 'yscale', 'xscale'] originskeys = ['zorigin', 'yorigin', 'xorigin'] unitskeys = ['zunits', 'yunits', 'xunits'] elif record_by == 'spectrum': dim = len(data.shape) names = ['Y', 'X', 'Energy'][3 - dim:] scaleskeys = ['yscale', 'xscale', 'energyscale'] originskeys = ['yorigin', 'xorigin', 'energyorigin'] unitskeys = ['yunits', 'xunits', 'energyunits'] # The images are recorded in the Fortran order data = data.T.copy() try: scales = [calibration_dict[key] for key in scaleskeys[3 - dim:]] except KeyError: scales = [1, 1, 1][3 - dim:] try: origins = [calibration_dict[key] for key in originskeys[3 - dim:]] except KeyError: origins = [0, 0, 0][3 - dim:] try: units = [calibration_dict[key] for key in unitskeys[3 - dim:]] except KeyError: units = ['', '', ''] axes = [ { 'size': int(data.shape[i]), 'index_in_array': i, 'name': names[i], 'scale': scales[i], 'offset': origins[i], 'units': units[i], } for i in range(dim)] metadata = {'General': {}, 'Signal': {}} metadata['General']['original_filename'] = os.path.split(filename)[1] metadata["Signal"]['record_by'] = record_by metadata["General"]['signal_type'] = "" dictionary = { 'data': data, 'axes': axes, 'metadata': metadata, 'original_metadata': original_metadata, } return dictionary
unknown
codeparrot/codeparrot-clean
import os import re from typing import Optional, Set MONGO_DOCUMENT_SOURCE_DIR = "src/mongo/db/pipeline" # Regex to find bool requiresAuthzChecks() const override { return false; } AUTHZ_OPT_OUT_PATTERN = re.compile( r"bool\s+requiresAuthzChecks\s*\(\s*\)\s*const\s*override\s*\{\s*return\s+false;\s*\}", re.DOTALL, ) # Regex to find the registration macro and capture the stage name STAGE_NAME_PATTERN = re.compile( r"REGISTER(?:_INTERNAL|_TEST)?_DOCUMENT_SOURCE(?:_WITH_FEATURE_FLAG)?\(" r"\s*(\w+)", # Capture the stage name (e.g., "listSessions") re.IGNORECASE, ) def read_file(filepath: str) -> Optional[str]: try: if os.path.exists(filepath): with open(filepath, "r", encoding="utf-8", errors="ignore") as f: return f.read() except IOError as e: print(f"Could not read {filepath}: {e}") return None def check_file_pair(base_path: str) -> Optional[str]: """ Check a .h/.cpp file pair for opt-out pattern and stage name. Returns the stage name if found, None otherwise. """ header_path = f"{base_path}.h" cpp_path = f"{base_path}.cpp" header_content = read_file(header_path) cpp_content = read_file(cpp_path) opt_out_found = False if (header_content and AUTHZ_OPT_OUT_PATTERN.search(header_content)) or ( cpp_content and AUTHZ_OPT_OUT_PATTERN.search(cpp_content) ): opt_out_found = True if not opt_out_found: return None for content in [cpp_content, header_content]: if content: match = STAGE_NAME_PATTERN.search(content) if match: return f"${match.group(1)}" # Opt-out found but no stage name print( f"Opt-out found in '{os.path.basename(base_path)}' " "but registration macro not found in .h or .cpp file." ) return None def find_authz_opt_out_stages() -> Set[str]: """ Scans the pipeline directory to find aggregation stages that opted out of authorization checks. Returns a set of stage names that opted out. """ if not os.path.isdir(MONGO_DOCUMENT_SOURCE_DIR): print(f"Error: Directory '{MONGO_DOCUMENT_SOURCE_DIR}' does not exist") return set() print(f"Scanning for aggregation stages in '{MONGO_DOCUMENT_SOURCE_DIR}'") found_stages: Set[str] = set() processed_bases: Set[str] = set() # Walk through directory for root, _, files in os.walk(MONGO_DOCUMENT_SOURCE_DIR): for filename in files: if not filename.endswith((".h", ".cpp")): continue filepath = os.path.join(root, filename) base_path = os.path.splitext(filepath)[0] # Skip if already processed this file pair if base_path in processed_bases: continue processed_bases.add(base_path) stage_name = check_file_pair(base_path) if stage_name: found_stages.add(stage_name) return found_stages def main(): found_stages = find_authz_opt_out_stages() if found_stages: print(f"\nFound {len(found_stages)} stage(s) that opted out of authz checks:") for stage in sorted(found_stages): print(f" - {stage}") else: print("\nNo aggregation stages found that explicitly opted out.") if __name__ == "__main__": main()
python
github
https://github.com/mongodb/mongo
buildscripts/get_agg_stages_no_authz.py
// Basic functions on sparse tensors #define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/InitialTensorOptions.h> #include <ATen/Layout.h> #include <ATen/Parallel.h> #include <ATen/SparseCsrTensorImpl.h> #include <ATen/SparseCsrTensorUtils.h> #include <ATen/SparseTensorImpl.h> #include <ATen/native/LinearAlgebraUtils.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/_convert_indices_from_csr_to_coo.h> #include <ATen/ops/_nnz_native.h> #include <ATen/ops/_pin_memory_native.h> #include <ATen/ops/_sparse_compressed_tensor_unsafe_native.h> #include <ATen/ops/_sparse_csr_tensor_unsafe_native.h> #include <ATen/ops/_sparse_csc_tensor_unsafe_native.h> #include <ATen/ops/_sparse_bsr_tensor_unsafe_native.h> #include <ATen/ops/_sparse_bsc_tensor_unsafe_native.h> #include <ATen/ops/_sparse_compressed_tensor_with_dims_native.h> #include <ATen/ops/_sparse_coo_tensor_unsafe_native.h> #include <ATen/ops/_sparse_coo_tensor_unsafe.h> #include <ATen/ops/_validate_sparse_compressed_tensor_args_native.h> #include <ATen/ops/_validate_sparse_csr_tensor_args_native.h> #include <ATen/ops/_validate_sparse_csc_tensor_args_native.h> #include <ATen/ops/_validate_sparse_bsr_tensor_args_native.h> #include <ATen/ops/_validate_sparse_bsc_tensor_args_native.h> #include <ATen/ops/aminmax.h> #include <ATen/ops/ccol_indices_native.h> #include <ATen/ops/clone_native.h> #include <ATen/ops/col_indices_native.h> #include <ATen/ops/copy_native.h> #include <ATen/ops/crow_indices_native.h> #include <ATen/ops/dense_dim_native.h> #include <ATen/ops/empty.h> #include <ATen/ops/empty_like_native.h> #include <ATen/ops/empty_native.h> #include <ATen/ops/is_pinned_native.h> #include <ATen/ops/resize_as_sparse_native.h> #include <ATen/ops/resize_native.h> #include <ATen/ops/row_indices_native.h> #include <ATen/ops/select_native.h> #include <ATen/ops/select_copy.h> #include <ATen/ops/select_copy_native.h> #include <ATen/ops/sparse_compressed_tensor_native.h> #include <ATen/ops/sparse_csr_tensor_native.h> #include <ATen/ops/sparse_csc_tensor_native.h> #include <ATen/ops/sparse_bsr_tensor_native.h> #include <ATen/ops/sparse_bsc_tensor_native.h> #include <ATen/ops/sparse_dim_native.h> #include <ATen/ops/values_native.h> #include <ATen/ops/_validate_compressed_sparse_indices.h> #include <ATen/ops/where.h> #endif namespace at::native { using namespace at::sparse_csr; namespace { bool solve_arange(const Tensor& input, int64_t& start, int64_t& end, int64_t& step) { /* This function solves the equation input == arange(start, end, step) for integers start, end, and step, if possible. If the solution exists, returns true. */ int64_t n = input.numel(); if (n == 0) { // a trivial solution start = end = 0; step = 1; } else if (n == 1) { // a simple solution start = input[0].item<int64_t>(); end = start + 1; step = 1; } else { Tensor first_last = input.slice(0, 0, n, n - 1).cpu(); int64_t start_candidate = first_last[0].item<int64_t>(); int64_t end_candidate = first_last[1].item<int64_t>() + 1; if (end_candidate - start_candidate == n) { // a special solution start = start_candidate; end = end_candidate; step = 1; } else { // detect if general solution exists Tensor possible_steps = input.slice(0, 1).sub(input.slice(0, 0, n - 1)); Tensor possible_step = possible_steps[0]; if ((possible_steps.eq(possible_step)).all().item<bool>()) { start = start_candidate; end = end_candidate; step = possible_step.item<int64_t>(); } else { // no solution return false; } } } return true; } } // end anonymous namespace /* Validate the arguments to sparse compressed (CSR, CSC, BSR, and BSC) tensor factory functions. The CSR and BSR invariants for PyTorch are outlined in https://pearu.github.io/csr_tensor_invariants.html https://pearu.github.io/bsr_tensor_invariants.html that in what follows are generalized for all sparse compressed formats with support to batched and dense dimensions. */ static void _validate_sparse_compressed_tensor_args_worker(const Tensor& compressed_indices, const Tensor& plain_indices, const Tensor& values, const IntArrayRef size, const Layout& layout, std::optional<bool> check_pinning_) { // Layout must be Sparse Compressed, 2.4 AT_DISPATCH_ALL_SPARSE_COMPRESSED_LAYOUTS(layout, "validate_sparse_compressed_tensor_args", [&]{}); const std::string layout_name = layoutToString(layout, /*upper=*/ true); const std::string compressed_indices_name = compressedIndicesName(layout); const std::string plain_indices_name = plainIndicesName(layout); const std::string compressed_dim_name = compressedDimName(layout); const std::string plain_dim_name = plainDimName(layout); const bool check_pinning = check_pinning_.value_or(true); // Layout Invariants // Re 3.5 and 3.6: in the case of compressed/plain indices tensors, // we require contiguity per-patch basis, that is, the last stride // of these indices must be 1. The reasoning for this is that // indices tensors within a patch are "atomic" in the sense that // sliced compressed/plain indices would not represent the indices // of any sparse compressed tensor as the slicing would break the // description of the tensor index structure. // 2.1 TORCH_CHECK(plain_indices.layout() == kStrided, "expected ", plain_indices_name, " to be a strided tensor but got ", plain_indices.layout(), " tensor"); // 2.2 TORCH_CHECK(compressed_indices.layout() == kStrided, "expected ", compressed_indices_name, " to be a strided tensor but got ", compressed_indices.layout(), " tensor"); const int base_ndim = 2; // corresponds to compressed and plain indices const auto batch_ndim = compressed_indices.dim() - 1; const int block_ndim = AT_DISPATCH_PLAIN_SPARSE_COMPRESSED_LAYOUTS( layout, "validate_sparse_compressed_tensor_args", [&] { return 0; }, [&] { return 2; }); const auto dense_ndim = values.dim() - batch_ndim - block_ndim - 1; // 2.3 TORCH_CHECK(values.layout() == kStrided, "expected values to be a strided tensor but got ", values.layout(), " tensor"); // 3.7 is dropped, that is, values tensor does not need to be // contiguous, in general. Particular algorithms on sparse // compressed tensors may require contiguity though. // Shape and Strides invariants // 3.2 TORCH_CHECK( batch_ndim >= 0, compressed_indices_name, " must have dimensionality >= 1 but got ", compressed_indices.dim()); // 3.3 TORCH_CHECK( compressed_indices.dim() == plain_indices.dim(), compressed_indices_name, " and ", plain_indices_name, " dimensionalities must be equal but got ", compressed_indices.dim(), " and ", plain_indices.dim(), ", respectively"); // 3.4 TORCH_CHECK( dense_ndim >= 0, "values must have dimensionality > sum of batch and block dimensionalities (=", batch_ndim, " + ", block_ndim, ") but got ", values.dim()); // 3.5 TORCH_CHECK(plain_indices.stride(-1) == 1, "expected ", plain_indices_name, " to be a contiguous tensor per batch"); // 3.6 TORCH_CHECK(compressed_indices.stride(-1) == 1, "expected ", compressed_indices_name, " to be a contiguous tensor per batch"); // 3.1 TORCH_CHECK( static_cast<int>(size.size()) == batch_ndim + base_ndim + dense_ndim, "tensor dimensionality must be sum of batch, base, and dense dimensionalities (=", batch_ndim, " + ", base_ndim, " + ", dense_ndim, ") but got ", size.size()); // For CSR/CSC formats, we define blocksize=(1, 1) so that checking // the sparse compressed tensor invariants can be unified with the // BSR/BSC invariants. // 3.10 DimVector blocksize{ (block_ndim == 2 ? std::max<int64_t>(1, values.size(batch_ndim + 1)) : 1), (block_ndim == 2 ? std::max<int64_t>(1, values.size(batch_ndim + 2)) : 1), }; TORCH_INTERNAL_ASSERT(blocksize.size() == 2 && blocksize[0] > 0 && blocksize[1] > 0); // All batch sizes must be the same and consistent with tensor batchsize, 3.1, 3.8, 3.9, 3.10 DimVector batchsize = DimVector(size.slice(0, batch_ndim)); DimVector compressed_indices_batchsize = DimVector(compressed_indices.sizes().slice(0, batch_ndim)); DimVector plain_indices_batchsize = DimVector(plain_indices.sizes().slice(0, batch_ndim)); DimVector values_batchsize = DimVector(values.sizes().slice(0, batch_ndim)); const int64_t values_nnz = values.size(batch_ndim); DimVector values_blocksize = DimVector(values.sizes().slice(batch_ndim + 1, block_ndim)); DimVector values_densesize = DimVector(values.sizes().slice(batch_ndim + 1 + block_ndim, dense_ndim)); TORCH_CHECK( batchsize == compressed_indices_batchsize && batchsize == plain_indices_batchsize && batchsize == values_batchsize, "all batch dimensions of ", compressed_indices_name," (=", compressed_indices_batchsize, "), ", plain_indices_name," (=", plain_indices_batchsize, "), and values (=", values_batchsize, ") must be equal to tensor batch dimensions (=", batchsize, ")"); // A tensor constitutes of full blocks, 3.1 for (int i=0; i<block_ndim; i++) { TORCH_CHECK(size[batch_ndim + i] % blocksize[i] == 0, "tensor shape[", batch_ndim + i, "] (=", size[batch_ndim + i], ") must be divisible with blocksize[", i, "] (=", blocksize[i], ") as defined by values shape"); } const int64_t nrows = size[batch_ndim] / blocksize[0]; const int64_t ncols = size[batch_ndim + 1] / blocksize[1]; auto [compressed_dim_size, plain_dim_size] = AT_DISPATCH_ROW_SPARSE_COMPRESSED_LAYOUTS(layout, "validate_sparse_compressed_tensor_args", [&] { return std::make_tuple(nrows, ncols); }, [&] { return std::make_tuple(ncols, nrows); }); // 3.8 TORCH_CHECK( compressed_indices.size(-1) == compressed_dim_size + 1, compressed_indices_name, ".shape[-1] must be equal to the number of ", compressed_dim_name, "s + 1 (=", compressed_dim_size + 1, "), but got ", compressed_indices.size(-1)); // 3.9, 3.10 TORCH_CHECK( plain_indices.size(-1) == values_nnz, plain_indices_name, ".shape[-1] must be equal to nnz (=", values_nnz, ") as defined by values.shape[", batch_ndim, "], but got ", plain_indices.size(-1)); // Type Invariants auto compressed_indices_type = compressed_indices.scalar_type(); auto plain_indices_type = plain_indices.scalar_type(); // 1.1, 1.2, 1.3 TORCH_CHECK( compressed_indices_type == plain_indices_type, compressed_indices_name, " and ", plain_indices_name, " must have the same dtype, bot got ", compressed_indices_type, " and ", plain_indices_type, ", respectively"); TORCH_CHECK( compressed_indices_type == kInt || compressed_indices_type == kLong, compressed_indices_name, " and ", plain_indices_name, " dtype must be Int or Long, but got ", compressed_indices_type); if (compressed_indices.is_meta()) { TORCH_CHECK(values_nnz == 0, "expected nnz to be 0 for sparse ", layout_name, " meta tensor but got ", values_nnz); } else { // Indices invariants at::_validate_compressed_sparse_indices( /*is_crow = */layout == kSparseCsr || layout == kSparseBsr, compressed_indices, plain_indices, compressed_dim_size, plain_dim_size, values_nnz); } // Device Invariants // 4.1 TORCH_CHECK( values.device().type() == kCPU || values.device().type() == kCUDA || values.device().type() == kXPU || values.device().type() == kMeta || values.device().type() == kPrivateUse1, "device type of values (", values.device().type(), ") must be one of CPU, CUDA, XPU, Meta or PrivateUse1") // 4.2, 4.3, 4.4 TORCH_CHECK( compressed_indices.get_device() == values.get_device(), "device of ", compressed_indices_name, " (=", compressed_indices.device(), ") must match device of values (=", values.device(), ")"); TORCH_CHECK( compressed_indices.get_device() == plain_indices.get_device(), "device of ", compressed_indices_name, " (=", compressed_indices.device(), ") must match device of ", plain_indices_name, " (=", plain_indices.device(), ")"); if (check_pinning) { TORCH_CHECK( compressed_indices.is_pinned() == values.is_pinned(), "memory pinning of ", compressed_indices_name, " (=", compressed_indices.is_pinned(), ") must match memory pinning of values (=", values.is_pinned(), ")"); TORCH_CHECK( compressed_indices.is_pinned() == plain_indices.is_pinned(), "memory pinning of ", compressed_indices_name, " (=", compressed_indices.is_pinned(), ") must match memory pinning of ", plain_indices_name, " (=", plain_indices.is_pinned(), ")"); } // Autograd Invariants // // These are internal asserts because users should not be able to // create non-floating point dtype tensors with requires_grad flag // set to true. TORCH_INTERNAL_ASSERT(!compressed_indices.requires_grad()); TORCH_INTERNAL_ASSERT(!plain_indices.requires_grad()); } void _validate_sparse_compressed_tensor_args(const Tensor& compressed_indices, const Tensor& plain_indices, const Tensor& values, IntArrayRef size, Layout layout, std::optional<bool> check_pinning) { _validate_sparse_compressed_tensor_args_worker(compressed_indices, plain_indices, values, size, layout, check_pinning); } void _validate_sparse_csr_tensor_args(const Tensor& crow_indices, const Tensor& col_indices, const Tensor& values, IntArrayRef size, std::optional<bool> check_pinning) { _validate_sparse_compressed_tensor_args_worker(crow_indices, col_indices, values, size, kSparseCsr, check_pinning); } void _validate_sparse_csc_tensor_args(const Tensor& ccol_indices, const Tensor& row_indices, const Tensor& values, IntArrayRef size, std::optional<bool> check_pinning) { _validate_sparse_compressed_tensor_args_worker(ccol_indices, row_indices, values, size, kSparseCsc, check_pinning); } void _validate_sparse_bsr_tensor_args(const Tensor& crow_indices, const Tensor& col_indices, const Tensor& values, IntArrayRef size, std::optional<bool> check_pinning) { _validate_sparse_compressed_tensor_args_worker(crow_indices, col_indices, values, size, kSparseBsr, check_pinning); } void _validate_sparse_bsc_tensor_args(const Tensor& ccol_indices, const Tensor& row_indices, const Tensor& values, IntArrayRef size, std::optional<bool> check_pinning) { _validate_sparse_compressed_tensor_args_worker(ccol_indices, row_indices, values, size, kSparseBsc, check_pinning); } // Construction of CSR, CSC, BSR, and BSC tensors. // Note: The usage of "Csr" in names like SparseCsrTensor, // SparseCsrCPU, SparseCsrCUDA, and SparseCsrTensorImpl exists because // of historical reasons (that ought to be removed in future) and does // not mean that the corresponding functionality would be CSR layout // only specific. static SparseCsrTensor new_compressed_tensor(const TensorOptions& options) { // TODO: remove this comment after enabling autograd support for CSR tensor // constructor. // TORCH_INTERNAL_ASSERT(impl::variable_excluded_from_dispatch()); Layout layout = AT_DISPATCH_ALL_SPARSE_COMPRESSED_LAYOUTS(options.layout(), "new_compressed_tensor", [&] { return the_layout; }); DispatchKey dispatch_key = DispatchKey::Undefined; switch(options.device().type()) { case kCPU: dispatch_key = DispatchKey::SparseCsrCPU; break; case kCUDA: dispatch_key = DispatchKey::SparseCsrCUDA; break; case kXPU: dispatch_key = DispatchKey::SparseCsrXPU; break; case kMeta: dispatch_key = DispatchKey::SparseCsrMeta; break; case kPrivateUse1: dispatch_key = DispatchKey::SparseCsrPrivateUse1; break; default: TORCH_CHECK_NOT_IMPLEMENTED(false, "Could not run 'new_compressed_tensor' from the '", options.device(), "' device.)"); } return detail::make_tensor<SparseCsrTensorImpl>(DispatchKeySet(dispatch_key), options.device(), layout, options.dtype()); } Tensor sparse_compressed_tensor_with_dims( int64_t nnz, int64_t dense_dim, c10::IntArrayRef size, c10::IntArrayRef blocksize, ScalarType index_dtype, std::optional<ScalarType> dtype, std::optional<Layout> layout, std::optional<Device> device, std::optional<bool> pin_memory) { // sparse_compressed_tensor_with_dims is a generalization of empty // that enables the specification of nnz, dense_dim, blocksize, and // index_dtype for sparse compressed tensors. // // sparse_compressed_tensor_with_dims indices and values tensors are // created as empty tensors, so the returned sparse compressed // tensor will not satisfy the sparse compressed tensor // invariants. The caller is responsible for initializing the // indices tensors properly. TORCH_CHECK(layout, "sparse_compressed_tensor_with_dims: expected sparse compressed tensor layout but got none"); Layout layout_ = layout.value(); AT_DISPATCH_ALL_SPARSE_COMPRESSED_LAYOUTS(layout_, "sparse_compressed_tensor_with_dims", [&]{}); constexpr int64_t sparse_dim = 2; int64_t batch_dim = size.size() - dense_dim - sparse_dim; TORCH_CHECK(batch_dim >= 0, "sparse_compressed_tensor_with_dims: dimensionality must be at least dense_dim(=", dense_dim, ") + sparse_dim(=", sparse_dim, "), but got ", size.size()); TORCH_CHECK(nnz >= 0, "sparse_compressed_tensor_with_dims: nnz must be non-negative, got ", nnz); auto plain_indices_size = DimVector(size.slice(0, batch_dim)); auto compressed_indices_size = DimVector(size.slice(0, batch_dim)); auto values_size = DimVector(size.slice(0, batch_dim)); plain_indices_size.push_back(nnz); values_size.push_back(nnz); if (layout_ == kSparseBsr || layout_ == kSparseBsc) { TORCH_CHECK(blocksize.size() == (size_t)sparse_dim, "sparse_compressed_tensor_with_dims: blocksize needs to be a tuple of size ", sparse_dim, ", but got ", blocksize.size()); auto d0 = (layout_ == kSparseBsr ? 0 : 1); auto d1 = (layout_ == kSparseBsr ? 1 : 0); TORCH_CHECK(blocksize[0] > 0 && blocksize[1] > 0, "sparse_compressed_tensor_with_dims: blocksize needs to be positive, but got ", blocksize); auto compressed_size = size[compressedDimension(layout_, size, dense_dim)]; auto plain_size = size[plainDimension(layout_, size, dense_dim)]; TORCH_CHECK(compressed_size % blocksize[d0] == 0, "sparse_compressed_tensor_with_dims: dimension ", compressedDimension(layout_, size, dense_dim), " must be multiple of blocksize[", d0, "](=", blocksize[d0], ") but got ", compressed_size); TORCH_CHECK(plain_size % blocksize[d1] == 0, "sparse_compressed_tensor_with_dims: dimension ", plainDimension(layout_, size, dense_dim), " must be multiple of blocksize[", d1, "](=", blocksize[d1], ") but got ", plain_size); compressed_indices_size.push_back(compressed_size / blocksize[d0] + 1); values_size.append(DimVector(blocksize)); } else { TORCH_CHECK(blocksize.empty(), "sparse_compressed_tensor_with_dims: blocksize cannot be specified for non-block layout ", layout_); compressed_indices_size.push_back(size[compressedDimension(layout_, size, dense_dim)] + 1); } values_size.append(DimVector(size.slice(batch_dim + sparse_dim, dense_dim))); TORCH_CHECK( index_dtype == ScalarType::Int || index_dtype == ScalarType::Long, "indices dtype must be Int or Long, but got ", index_dtype); TensorOptions options_ = TensorOptions().layout(Layout::Strided).device(device).pinned_memory(pin_memory); auto compressed_indices = at::empty(compressed_indices_size, options_.dtype(index_dtype)); auto plain_indices = at::empty(plain_indices_size, options_.dtype(index_dtype)); auto values = at::empty(values_size, options_.dtype(dtype)); TensorOptions options = TensorOptions().dtype(dtype).layout(layout_).device(device).pinned_memory(pin_memory); SparseCsrTensor self = new_compressed_tensor(options); if (pin_memory.value_or(false) && !values.is_pinned()) { get_sparse_csr_impl(self)->set_member_tensors(compressed_indices.pin_memory(), plain_indices.pin_memory(), values.pin_memory(), size); } else { get_sparse_csr_impl(self)->set_member_tensors(compressed_indices, plain_indices, values, size); } return self; } Tensor _sparse_compressed_tensor_unsafe_symint( const Tensor& compressed_indices, const Tensor& plain_indices, const Tensor& values, c10::SymIntArrayRef size, std::optional<ScalarType> dtype, std::optional<Layout> layout, std::optional<Device> device, std::optional<bool> pin_memory) { if (!layout) { TORCH_CHECK(false, "sparse_compressed_tensor_unsafe expected sparse compressed tensor layout but got none"); } Layout layout_ = layout.value(); AT_DISPATCH_ALL_SPARSE_COMPRESSED_LAYOUTS(layout_, "sparse_compressed_tensor_unsafe", [&]{}); if (at::globalContext().checkSparseTensorInvariants().value_or(false)) { _validate_sparse_compressed_tensor_args_worker(compressed_indices, plain_indices, values, C10_AS_INTARRAYREF_SLOW(size), layout_, true); } TensorOptions options = TensorOptions().dtype(dtype).layout(layout_).device(device).pinned_memory(pin_memory); SparseCsrTensor self = new_compressed_tensor(options); if (pin_memory.value_or(false) && !values.is_pinned()) { get_sparse_csr_impl(self)->set_member_tensors(compressed_indices.pin_memory(), plain_indices.pin_memory(), values.pin_memory(), size); } else { get_sparse_csr_impl(self)->set_member_tensors(compressed_indices, plain_indices, values, size); } return self; } template <Layout required_layout> static Tensor _sparse_compressed_tensor_unsafe_template(const Tensor& compressed_indices, const Tensor& plain_indices, const Tensor& values, IntArrayRef size, std::optional<ScalarType> dtype, std::optional<Layout> layout, std::optional<Device> device, std::optional<bool> pin_memory) { Layout layout_ = layout.value_or(required_layout); TORCH_CHECK(layout_ == required_layout, "sparse compressed layout must be ",required_layout, " but got ", layout_); if (at::globalContext().checkSparseTensorInvariants().value_or(false)) { _validate_sparse_compressed_tensor_args_worker(compressed_indices, plain_indices, values, size, layout_, true); } TensorOptions options = TensorOptions().dtype(dtype).layout(layout_).device(device).pinned_memory(pin_memory); SparseCsrTensor self = new_compressed_tensor(options); if (pin_memory.value_or(false) && !values.is_pinned()) { get_sparse_csr_impl(self)->set_member_tensors(compressed_indices.pin_memory(), plain_indices.pin_memory(), values.pin_memory(), size); } else { get_sparse_csr_impl(self)->set_member_tensors(compressed_indices, plain_indices, values, size); } return self; } #define SPARSE_COMPRESSED_TENSOR_UNSAFE(KIND, REQUIRED_LAYOUT) \ Tensor _sparse_##KIND##_tensor_unsafe(const Tensor& compressed_indices, \ const Tensor& plain_indices, \ const Tensor& values, \ IntArrayRef size, \ std::optional<ScalarType> dtype, \ std::optional<Layout> layout, \ std::optional<Device> device, \ std::optional<bool> pin_memory) { \ return _sparse_compressed_tensor_unsafe_template<REQUIRED_LAYOUT>(compressed_indices, plain_indices, values, size, dtype, layout, device, pin_memory); \ } SPARSE_COMPRESSED_TENSOR_UNSAFE(csr, kSparseCsr) SPARSE_COMPRESSED_TENSOR_UNSAFE(csc, kSparseCsc) SPARSE_COMPRESSED_TENSOR_UNSAFE(bsr, kSparseBsr) SPARSE_COMPRESSED_TENSOR_UNSAFE(bsc, kSparseBsc) static DimVector _estimate_sparse_compressed_tensor_size( const Tensor& compressed_indices, const Tensor& plain_indices, const Tensor& values, Layout layout) { const int block_ndim = AT_DISPATCH_PLAIN_SPARSE_COMPRESSED_LAYOUTS(layout, "estimate_sparse_compressed_tensor_size", [&] { return 0; }, [&] { return 2; }); const int base_ndim = 2; // corresponds to compressed and plain indices const auto batch_ndim = compressed_indices.dim() - 1; const std::string compressed_indices_name = compressedIndicesName(layout); const std::string plain_indices_name = plainIndicesName(layout); TORCH_CHECK( batch_ndim >= 0, compressed_indices_name, " must have dimensionality >= 1 but got ", compressed_indices.dim()); TORCH_CHECK( compressed_indices.dim() == plain_indices.dim(), compressed_indices_name, " and ", plain_indices_name, " dimensionalities must be equal but got ", compressed_indices.dim(), " and ", plain_indices.dim(), ", respectively"); const int64_t dense_ndim = values.dim() - batch_ndim - block_ndim - 1; TORCH_CHECK( dense_ndim >= 0, "values must have dimensionality > sum of batch and block dimensionalities (=", batch_ndim, " + ", block_ndim, ") but got ", values.dim()); DimVector blocksize{ (block_ndim == 2 ? std::max<int64_t>(1, values.size(batch_ndim + 1)) : 1), (block_ndim == 2 ? std::max<int64_t>(1, values.size(batch_ndim + 2)) : 1) }; DimVector size = DimVector(compressed_indices.sizes().slice(0, batch_ndim)); int64_t compressed_dim_size = (compressed_indices.dim() > 0 && compressed_indices.size(-1) > 0 ? compressed_indices.size(-1) - 1 : 0); int64_t plain_dim_size = AT_DISPATCH_INTEGRAL_TYPES(plain_indices.scalar_type(), "estimate_sparse_compressed_tensor_size", [&]() -> int64_t { if (plain_indices.numel() > 0) { return plain_indices.max().item<scalar_t>() + 1; } else { return 0; } }); AT_DISPATCH_ROW_SPARSE_COMPRESSED_LAYOUTS(layout, "estimate_sparse_compressed_tensor_size", [&]{ size.push_back(compressed_dim_size * blocksize[0]); size.push_back(plain_dim_size * blocksize[1]); }, [&]{ size.push_back(plain_dim_size * blocksize[0]); size.push_back(compressed_dim_size * blocksize[1]); }); for (int i=0; i<dense_ndim; i++) { int64_t j = batch_ndim + 1 + block_ndim + i; size.push_back((j < values.dim() ? values.size(j) : 1)); } TORCH_CHECK( static_cast<int>(size.size()) == batch_ndim + base_ndim + dense_ndim, "tensor dimensionality must be sum of batch, base, and dense dimensionalities (=", batch_ndim, " + ", base_ndim, " + ", dense_ndim, ") but got ", size.size()); return size; } // TODO: This constructor should probably use an ATen abstract method in order // to make autograd dispatch available for the CSR constructor. See the relevant // note in native_functions.yaml. Tensor sparse_compressed_tensor( const Tensor& compressed_indices, const Tensor& plain_indices, const Tensor& values, IntArrayRef size, std::optional<ScalarType> dtype, std::optional<Layout> layout, std::optional<Device> device, std::optional<bool> pin_memory) { if (!layout) { TORCH_CHECK(false, "sparse_compressed_tensor expected sparse compressed tensor layout but got none"); } Layout layout_ = layout.value(); AT_DISPATCH_ALL_SPARSE_COMPRESSED_LAYOUTS(layout_, "sparse_compressed_tensor", [&]{}); // See [Note: hacky wrapper removal for TensorOptions] TensorOptions options = TensorOptions().dtype(dtype).layout(layout_).device(device).pinned_memory(pin_memory); return at::_sparse_compressed_tensor_unsafe( compressed_indices, plain_indices, values, size, optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt()); } Tensor sparse_compressed_tensor( const Tensor& compressed_indices, const Tensor& plain_indices, const Tensor& values, std::optional<ScalarType> dtype, std::optional<Layout> layout, std::optional<Device> device, std::optional<bool> pin_memory) { if (!layout) { TORCH_CHECK(false, "sparse_compressed_tensor expected sparse compressed tensor layout but got none"); } Layout layout_ = layout.value(); AT_DISPATCH_ALL_SPARSE_COMPRESSED_LAYOUTS(layout_, "sparse_compressed_tensor", [&]{}); DimVector size = _estimate_sparse_compressed_tensor_size(compressed_indices, plain_indices, values, layout_); // See [Note: hacky wrapper removal for TensorOptions] TensorOptions options = TensorOptions().dtype(dtype).layout(layout_).device(device).pinned_memory(pin_memory); return at::_sparse_compressed_tensor_unsafe( compressed_indices, plain_indices, values, size, optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt()); } #define SPARSE_COMPRESSED_TENSOR(KIND, REQUIRED_LAYOUT) \ Tensor sparse_##KIND##_tensor(const Tensor& compressed_indices, \ const Tensor& plain_indices, \ const Tensor& values, \ std::optional<ScalarType> dtype, \ std::optional<Layout> layout, \ std::optional<Device> device, \ std::optional<bool> pin_memory) { \ if (layout) { \ TORCH_CHECK(layout.value() == REQUIRED_LAYOUT, "sparse " # KIND " layout must be ", REQUIRED_LAYOUT, " but got ", layout.value()); \ } \ std::optional<Layout> layout_(REQUIRED_LAYOUT); \ return at::native::sparse_compressed_tensor(compressed_indices, plain_indices, values, dtype, layout_, device, pin_memory); \ } \ Tensor sparse_##KIND##_tensor(const Tensor& compressed_indices, \ const Tensor& plain_indices, \ const Tensor& values, \ IntArrayRef size, \ std::optional<ScalarType> dtype, \ std::optional<Layout> layout, \ std::optional<Device> device, \ std::optional<bool> pin_memory) { \ if (layout) { \ TORCH_CHECK(layout.value() == REQUIRED_LAYOUT, "sparse " # KIND " layout must be ", REQUIRED_LAYOUT, " but got ", layout.value()); \ } \ std::optional<Layout> layout_(REQUIRED_LAYOUT); \ return at::native::sparse_compressed_tensor(compressed_indices, plain_indices, values, size, dtype, layout_, device, pin_memory); \ } SPARSE_COMPRESSED_TENSOR(csr, kSparseCsr) SPARSE_COMPRESSED_TENSOR(csc, kSparseCsc) SPARSE_COMPRESSED_TENSOR(bsr, kSparseBsr) SPARSE_COMPRESSED_TENSOR(bsc, kSparseBsc) Tensor empty_sparse_compressed_symint( SymIntArrayRef size, std::optional<ScalarType> dtype, std::optional<Layout> layout, std::optional<Device> device, std::optional<bool> pin_memory, std::optional<MemoryFormat> optional_memory_format) { // TODO: Don't specialize return empty_sparse_compressed(C10_AS_INTARRAYREF_SLOW_ALLOC(size), dtype, layout, device, pin_memory, optional_memory_format); } // Warning: ideally, torch.empty(..., layout=<sparse compressed // format>) ought to be unsupported because it does not return a valid // sparse compressed tensor without initialization of compressed // indices. The implementation below is kept for BC. Tensor empty_sparse_compressed( IntArrayRef size, std::optional<ScalarType> dtype, std::optional<Layout> layout, std::optional<Device> device, std::optional<bool> pin_memory, std::optional<MemoryFormat> optional_memory_format) { check_size_nonnegative(size); TORCH_CHECK(size.size() >= 2, "torch.empty: Only batched sparse compressed (non-block) tensors are supported, but got size ", size); // Strided is the default layout for torch.empty. Layout layout_ = layout.value_or(Layout::Strided); // torch.empty cannot be used to create blocked tensors because its // API lacks a method to specify the block size. AT_DISPATCH_SPARSE_COMPRESSED_NONBLOCK_LAYOUTS(layout_, "empty_sparse_compressed", [&]{}); int64_t nnz = 0; auto compressed_indices_size = DimVector(size.slice(0, size.size() - 2)); auto plain_indices_and_values_size = DimVector(size.slice(0, size.size() - 2)); compressed_indices_size.push_back(size[compressedDimension(layout_, size)] + 1); plain_indices_and_values_size.push_back(nnz); TensorOptions options = TensorOptions().dtype(ScalarType::Long).layout(Layout::Strided).device(device).pinned_memory(pin_memory); auto compressed_indices = at::empty(compressed_indices_size, options); auto plain_indices = at::empty(plain_indices_and_values_size, options); auto values = at::empty(plain_indices_and_values_size, options.dtype(dtype)); // torch.empty on produces garbage so that the resulting empty // sparse compressed tensor may fail to satisfy the following // compressed sparse tensor invariants: // // compressed_indices[..., 0] == 0 // compressed_indices[..., -1] == nnz. // compressed_indices must be non-decreasing sequence // // Therefore, avoid using empty to create sparse compressed // tensors. Instead, use compressed sparse constructors directly or // other factory functions such as torch.zeros, etc. return at::_sparse_compressed_tensor_unsafe(compressed_indices, plain_indices, values, size, dtype, layout, device, pin_memory); } const Tensor& resize_sparse_csr_( const Tensor& self, IntArrayRef size, std::optional<MemoryFormat> optional_memory_format) { check_size_nonnegative(size); TORCH_CHECK(size.size() >= 2, "torch.resize_: Only batched sparse CSR matrices are supported, but got size ", size); TORCH_CHECK( self.size(-1) <= size[size.size() - 1], "torch.resize_: Resizing columns of sparse CSR tensors to a smaller value is not supported. ", "The original number of columns is ", self.size(-1), " while the requested new number of columns is ", size[size.size() - 1], "."); get_sparse_csr_impl(self)->resize_(self._nnz(), size); return self; } Tensor& copy_sparse_compressed_(Tensor& self, const Tensor& src, bool non_blocking) { AT_DISPATCH_ALL_SPARSE_COMPRESSED_LAYOUTS(self.layout(), "copy_sparse_compressed_", [&]{}); TORCH_CHECK( self.layout() == src.layout(), "torch.copy_: copy of sparse compressed tensors having different layouts is not supported.", " self layout is ", self.layout(), " and src layout is ", src.layout()); TORCH_CHECK( self._nnz() == src._nnz(), // actually, values copy allows different shapes as long as operands are broadcastable "torch.copy_: only sparse compressed tensors with the same number of specified elements are supported."); auto self_compressed_dim = compressedDimension(self.layout(), self.sizes()); auto src_compressed_dim = compressedDimension(src.layout(), src.sizes()); auto self_compressed_dims = self.size(self_compressed_dim); auto src_compressed_dims = src.size(compressedDimension(src.layout(), src.sizes())); if (self_compressed_dim == src_compressed_dim) { TORCH_CHECK(self_compressed_dims == src_compressed_dims, "torch.copy_: expected shapes of self and src to match along dimension ", self_compressed_dim, " for ", self.layout(), " layout but the corresponding dimensions of self and src are ", self_compressed_dims, " and ", src_compressed_dims, ", respectively."); } else { TORCH_CHECK(self_compressed_dims == src_compressed_dims, "torch.copy_: expected shapes of self and src to match along dimensions ", self_compressed_dim, " and ", src_compressed_dim, ", respectively, for ", self.layout(), " layout but the corresponding dimensions of self and src are ", self_compressed_dims, " and ", src_compressed_dims, ", respectively."); } AT_DISPATCH_PLAIN_SPARSE_COMPRESSED_LAYOUTS(self.layout(), "copy_sparse_compressed_", [&]{}, [&]{ auto self_values = self.values(); auto src_values = src.values(); auto self_blocksize = DimVector(self_values.sizes().slice(self_values.dim()-2, 2)); auto src_blocksize = DimVector(src_values.sizes().slice(src_values.dim()-2, 2)); TORCH_CHECK(self_blocksize == src_blocksize, "torch.copy_: copy of sparse compressed tensors having different block sizes is not supported.", " self and src block sizes are ", self_blocksize, " and ", src_blocksize, ", respectively."); }); AT_DISPATCH_ROW_SPARSE_COMPRESSED_LAYOUTS(self.layout(), "copy_sparse_compressed_", [&]{ self.crow_indices().copy_(src.crow_indices(), non_blocking); self.col_indices().copy_(src.col_indices(), non_blocking); }, [&]{ self.ccol_indices().copy_(src.ccol_indices(), non_blocking); self.row_indices().copy_(src.row_indices(), non_blocking); }); self.values().copy_(src.values(), non_blocking); return self; } // Access members of CSR tensors. int64_t _nnz_sparse_csr(const SparseCsrTensor& self) { return get_sparse_csr_impl(self)->nnz(); } Tensor values_sparse_csr(const Tensor& self) { return get_sparse_csr_impl(self)->values().alias(); } Tensor crow_indices_sparse_csr(const Tensor& self) { return AT_DISPATCH_SPARSE_ROW_COMPRESSED_LAYOUTS(self.layout(), "crow_indices", [&]{ return get_sparse_csr_impl(self)->compressed_indices().alias(); }); } Tensor col_indices_sparse_csr(const Tensor& self) { return AT_DISPATCH_SPARSE_ROW_COMPRESSED_LAYOUTS(self.layout(), "col_indices", [&]{ return get_sparse_csr_impl(self)->plain_indices().alias(); }); } Tensor ccol_indices_sparse_csr(const Tensor& self) { return AT_DISPATCH_SPARSE_COL_COMPRESSED_LAYOUTS(self.layout(), "ccol_indices", [&]{ return get_sparse_csr_impl(self)->compressed_indices().alias(); }); } Tensor row_indices_sparse_csr(const Tensor& self) { return AT_DISPATCH_SPARSE_COL_COMPRESSED_LAYOUTS(self.layout(), "row_indices", [&]{ return get_sparse_csr_impl(self)->plain_indices().alias(); }); } Tensor crow_indices_default(const Tensor& self) { TORCH_CHECK(false, "crow_indices expected sparse row compressed tensor layout but got ", self.layout()); } Tensor col_indices_default(const Tensor& self) { TORCH_CHECK(false, "col_indices expected sparse row compressed tensor layout but got ", self.layout()); } Tensor ccol_indices_default(const Tensor& self) { TORCH_CHECK(false, "ccol_indices expected sparse column compressed tensor layout but got ", self.layout()); } Tensor row_indices_default(const Tensor& self) { TORCH_CHECK(false, "row_indices expected sparse column compressed tensor layout but got ", self.layout()); } int64_t sparse_dim_sparse_csr(const SparseCsrTensor& self) { return get_sparse_csr_impl(self)->sparse_dim(); } int64_t dense_dim_sparse_csr(const SparseCsrTensor& self) { return get_sparse_csr_impl(self)->dense_dim(); } const SparseCsrTensor& resize_as_sparse_compressed_( const SparseCsrTensor& self, const SparseCsrTensor& src) { auto src_layout = src.layout(); auto self_layout = self.layout(); AT_DISPATCH_ALL_SPARSE_COMPRESSED_LAYOUTS( src_layout, "resize_as_sparse_compressed_: src ", []() {}); AT_DISPATCH_ALL_SPARSE_COMPRESSED_LAYOUTS( self_layout, "resize_as_sparse_compressed_: self ", []() {}); // Note: The impl method does all required checking to see if resize/data copy // on member tensors is required. get_sparse_csr_impl(self)->resize_as_sparse_compressed_tensor_(src); return self; } SparseCsrTensor clone_sparse_compressed( const SparseCsrTensor& self, std::optional<c10::MemoryFormat> optional_memory_format) { TORCH_CHECK( !optional_memory_format.has_value(), "unsupported memory format option ", optional_memory_format.value()); TensorOptions options = self.options(); auto compressed_indices = AT_DISPATCH_ROW_SPARSE_COMPRESSED_LAYOUTS(self.layout(), "clone_sparse_compressed", [&]{ return self.crow_indices(); }, [&]{ return self.ccol_indices(); }); auto plain_indices = AT_DISPATCH_ROW_SPARSE_COMPRESSED_LAYOUTS(self.layout(), "clone_sparse_compressed", [&]{ return self.col_indices(); }, [&]{ return self.row_indices(); }); return at::_sparse_compressed_tensor_unsafe( compressed_indices.clone(), plain_indices.clone(), self.values().clone(), self.sizes(), optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt()); } Tensor empty_like_sparse_csr( const Tensor& self, std::optional<ScalarType> dtype, std::optional<Layout> layout, std::optional<Device> device, std::optional<bool> pin_memory, std::optional<c10::MemoryFormat> optional_memory_format) { TensorOptions options_ = TensorOptions().dtype(dtype).layout(layout).device(device).pinned_memory(pin_memory); TensorOptions options = self.options() .merge_in(options_) .merge_memory_format(optional_memory_format); TORCH_CHECK(options.layout() == self.layout(), "empty_like with different sparse layout is not supported (self is ", self.layout(), " but you requested ", options.layout(), ")"); if (options.layout() == kSparseCsr) { auto result = at::native::_sparse_csr_tensor_unsafe( self.crow_indices().to(options.device(), self.crow_indices().dtype(), false, true), self.col_indices().to(options.device(), self.col_indices().dtype(), false, true), at::empty(self.values().sizes(), options.layout(kStrided)), self.sizes(), optTypeMetaToScalarType(options.dtype()), self.layout(), options.device()); return result; } else if (options.layout() == kSparseCsc) { auto result = at::native::_sparse_csc_tensor_unsafe( self.ccol_indices().to(options.device(), self.ccol_indices().dtype(), false, true), self.row_indices().to(options.device(), self.row_indices().dtype(), false, true), at::empty(self.values().sizes(), options.layout(kStrided)), self.sizes(), optTypeMetaToScalarType(options.dtype()), self.layout(), options.device()); return result; } else if (options.layout() == kSparseBsr) { auto result = at::native::_sparse_bsr_tensor_unsafe( self.crow_indices().to(options.device(), self.crow_indices().dtype(), false, true), self.col_indices().to(options.device(), self.col_indices().dtype(), false, true), at::empty(self.values().sizes(), options.layout(kStrided)), self.sizes(), optTypeMetaToScalarType(options.dtype()), self.layout(), options.device()); return result; } else if (options.layout() == kSparseBsc) { auto result = at::native::_sparse_bsc_tensor_unsafe( self.ccol_indices().to(options.device(), self.ccol_indices().dtype(), false, true), self.row_indices().to(options.device(), self.row_indices().dtype(), false, true), at::empty(self.values().sizes(), options.layout(kStrided)), self.sizes(), optTypeMetaToScalarType(options.dtype()), self.layout(), options.device()); return result; } else if (options.layout() == kStrided) { return at::native::empty_like(self, dtype, layout, device, pin_memory, optional_memory_format); } else { TORCH_CHECK(false, "Layout ", options.layout(), " is not supported"); } } template <bool require_view, bool require_copy> static Tensor select_sparse_csr_worker(const Tensor& self, int64_t dim, int64_t index) { #ifndef STRIP_ERROR_MESSAGES constexpr const char* select_name = (require_view ? "select()" : "select_copy()"); #endif AT_DISPATCH_ALL_SPARSE_COMPRESSED_LAYOUTS( self.layout(), "select", []() { return; }); TORCH_CHECK_INDEX( self.dim() != 0, select_name, " cannot be applied to a 0-dim tensor."); dim = maybe_wrap_dim(dim, self.dim()); auto size = self.size(dim); if (index < -size || index >= size) { TORCH_CHECK_INDEX( false, select_name, ": index ", index, " out of range for tensor of size ", self.sizes(), " at dimension ", dim); } if (index < 0) { index += size; } auto select_strided = [](const Tensor& self, int64_t dim, int64_t index) { if (require_copy) { return at::select_copy(self, dim, index); } else { return self.select(dim, index); } }; TORCH_INTERNAL_ASSERT(dim >= 0 && dim < self.dim()); auto new_sizes = DimVector(self.sizes()); new_sizes.erase(new_sizes.begin() + dim); auto options = self.options(); auto [compressed_indices, plain_indices] = AT_DISPATCH_ROW_SPARSE_COMPRESSED_LAYOUTS( self.layout(), "select", [&]() { return std::make_pair(self.crow_indices(), self.col_indices()); }, [&]() { return std::make_pair(self.ccol_indices(), self.row_indices()); }); auto n_batch = compressed_indices.dim() - 1; if (dim < n_batch) { // Selecting batch dimension return at::_sparse_compressed_tensor_unsafe( compressed_indices.select(dim, index), plain_indices.select(dim, index), select_strided(self.values(), dim, index), new_sizes, optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt()); } else if (dim < n_batch + 2) { // Selecting sparse dimension TORCH_CHECK( n_batch == 0, select_name, ": selecting sparse dimensions is not supported for batched sparse compressed tensors.") TORCH_INTERNAL_ASSERT(dim == 0 || dim == 1); DimVector blocksize{1, 1}; AT_DISPATCH_PLAIN_SPARSE_COMPRESSED_LAYOUTS(self.layout(), "select", [&] {}, [&] { blocksize[0] = std::max<int64_t>(1, self.values().size(n_batch + 1)); blocksize[1] = std::max<int64_t>(1, self.values().size(n_batch + 2)); }); auto indices_options = compressed_indices.options(); int64_t fast_dim = AT_DISPATCH_ROW_SPARSE_COMPRESSED_LAYOUTS(self.layout(), "select", [&]() { return 0; }, [&]() { return 1; }); int64_t other_dim = (dim == 0 ? 1 : 0); Tensor indices; Tensor values; bool is_view = dim == fast_dim; if (is_view) { // select is always a view operation Tensor start_end = compressed_indices.narrow(0, index / blocksize[dim], 2).cpu(); int64_t start = start_end[0].item<int64_t>(); int64_t end = start_end[1].item<int64_t>(); indices = plain_indices.slice(0, start, end); values = self.values().slice(0, start, end); } else { Tensor decompressed_indices = at::_convert_indices_from_csr_to_coo(compressed_indices, plain_indices) .select(0, 0); Tensor dim_indices = at::where(plain_indices.eq(index / blocksize[dim]))[0]; // Notice that dim_indices is a sorted sequence of non-negative // distinct integers. Below we'll try to solve `dim_indices == // arange(start, stop, step)`. If the solution exists then the // select will be a view operation also for the `dim != // fast_dim` case. int64_t start{}, end{}, step{}; if (solve_arange(dim_indices, start, end, step)) { indices = decompressed_indices.slice(0, start, end, step); values = self.values().slice(0, start, end, step); is_view = true; } else { // select will be a copy operation due to index_select! indices = decompressed_indices.index_select(0, dim_indices); values = self.values().index_select(0, dim_indices); } } AT_DISPATCH_PLAIN_SPARSE_COMPRESSED_LAYOUTS(self.layout(), "select", [&]() {}, [&]() { /* The formula for select indices and values below are best explained by an example. Consider a BSR tensor with a block size (2, 3) having four blocks (the other two blocks contain all zeros and hence will not be specified): [ 1 2 3] | [ 7 8 9] [ 4 5 6] | [10 11 12] --------------------- [13 14 15] | [ 0 0 0] [16 17 18] | [ 0 0 0] ----------------------- [ 0 0 0] | [19 20 21] [ 0 0 0] | [22 23 24] that represents a 6 x 6 tensor: [ 1 2 3 7 8 9 ] [ 4 5 6 10 11 12 ] [ 13 14 15 0 0 0 ] [ 16 17 18 0 0 0 ] [ 0 0 0 19 20 21 ] [ 0 0 0 22 23 24 ] The corresponding data for the BSR representation is: crow_indices = [0 2 3 4] col_indices = [0 1 0 1] values = [ [[1 2 3], [4 5 6]], [[7 8 9], [10 11 12]], [[13 14 15], [16 17 18]], [[19 20 21], [22 23 24]] ] shape = (6, 6) From crow_indices, we can find that row_indices = [0 0 1 2] In the following, we'll illustrate the details of computing the result of torch.select_copy(input, dim, index) where dim is 0 or 1, and index is in range(shape[dim]). Select a row of a BSR tensor ---------------------------- We will consider first the dim=0 case that corresponds to selecting a index-th row of the tensor. For instance, for dim=0 and index=1, the expected result would represent a 1D tensor: [ 4 5 6 10 11 12 ] that is a concatenated tensor of certain slices from the first and the second block that is computed as follows: values[dim_indices].select(1 + dim, index % blocksize[dim]).flatten(0, 1) -> values[[0, 1]][:, 1 % 2].flatten(0, 1) -> [ [[1 2 3], [4 5 6]], [[7 8 9], [10 11 12]] ][:, 1].flatten(0, 1) -> [ [4 5 6], [10 11 12]].flatten(0, 1) -> [ 4 5 6 10 11 12] where dim_indices is found as where(row_indices == index//blocksize[dim]) -> where([0 0 1 2] == 1//2) -> [0 1] The corresponding column indices are computed as (col_indices[dim_indices].mul(blocksize[other_dim]).unsqueeze(1) + arange(blocksize[other_dim]).unsqueeze(0)).flatten(0, 1) where other_dim is 1 if dim is 0, and 0 if dim is 1. Let's expand the above expression with the data in the example: -> (col_indices[[0, 1]].mul(3).unsqueeze(1) + arange(3).unsqueeze(0)).flatten(0, 1) -> ([[0 1].mul(3).unsqueeze(1) + [[0 1 2]]).flatten(0, 1) -> ([[[0], [3]] + [[0 1 2]]).flatten(0, 1) <- here addition will use broadcasting rules! -> ([[[0 1 2], [3 4 5]]).flatten(0, 1) -> [0 1 2 3 4 5] Finally, the select(dim=0, index=1) op on the given sparse compressed tensors will return a COO tensor: sparse_coo_tensor([0 1 2 3 4 5].unsqueeze(0), [4 5 6 10 11 12], (6,)) that represents the expected result: [ 4 5 6 10 11 12 ] Select a column of a BSR tensor ------------------------------- Next, we'll consider the dim=1 case that corresponds to selecting the index-th column of the tensor. For instance, for dim=1 and index=4, the expected result would represent a 1D tensor: [ 8 11 0 0 20 23] that is a concatenated tensor of certain slices from the second and the last block: values[dim_indices].select(1 + dim, index % blocksize[dim]).flatten(0, 1) -> values[[1, 3]][:, :, 4 % 3 ].flatten(0, 1) -> [ [[7 8 9], [10 11 12]], [[19 20 21], [22 23 24]] ][:, 1, 1].flatten(0, 1) -> [ [8 11], [20 23]].flatten(0, 1) -> [ 8 11 20 23 ] The corresponding row indices are computed as (row_indices[dim_indices].mul(blocksize[other_dim]).unsqueeze(1) + arange(blocksize[other_dim]).unsqueeze(0)).flatten(0, 1) where dim_indices is where(col_indices == index//blocksize[dim]) -> where([0 1 0 1] == 4//3) -> [1 3] and we have (row_indices[dim_indices].mul(blocksize[other_dim]).unsqueeze(1) + arange(blocksize[other_dim]).unsqueeze(0)).flatten(0, 1) -> (row_indices[[1 3]].mul(2).unsqueeze(1) + arange(2).unsqueeze(0)).flatten(0, 1) -> ([0 4].unsqueeze(1) + [0 1].unsqueeze(0)).flatten(0, 1) -> ([[0], [4]] + [[0 1]]).flatten(0, 1) <- here addition will use broadcasting rules! -> ([[0 1], [4 5]]).flatten(0, 1) -> [ 0 1 4 5 ] Finally, the select(dim=1, index=4) op on the given sparse compressed tensors will return a COO tensor: sparse_coo_tensor([0 1 4 5].unsqueeze(0), [8 11 20 23], (6,)) that represents the expected result: [ 8 11 0 0 20 23 ] */ Tensor subblock_indices = at::arange(0, blocksize[other_dim], indices_options); indices = indices.mul(blocksize[other_dim]).unsqueeze(1).add(subblock_indices.unsqueeze(0)).flatten(0, 1); values = values.select(dim + 1, index % blocksize[dim]).flatten(0, 1); // flatten(0, 1) can be a view or a copy operation. If view // is required, it will be checked below via is_alias_of, // otherwise, we'll check if copy is made here to avoid // unnecessary clone below: if (require_copy) { is_view = values.is_alias_of(self.values()); } }); if (require_view) { TORCH_CHECK(values.is_alias_of(self.values()), select_name, ": no view exists for the given input, consider using torch.select_copy."); } indices = indices.unsqueeze(0).to(kLong); if (require_copy && is_view) { values = values.clone(); } return at::_sparse_coo_tensor_unsafe(indices, values, new_sizes)._coalesced_(true); } else { // Selecting dense dimension Tensor new_values = AT_DISPATCH_PLAIN_SPARSE_COMPRESSED_LAYOUTS( self.layout(), "select", // Non blocked layout (2 sparse dims become 1 nnz dim in values, so dim // is found one position to the left) [&]() { return select_strided(self.values(), dim - 1, index); }, // Block layout (2 sparse dims become 1 nnz dim + 2 block-shape dims in // values, so dim is found 1 position to the right) [&]() { return select_strided(self.values(), dim + 1, index); }); return at::_sparse_compressed_tensor_unsafe( compressed_indices, plain_indices, new_values, new_sizes, optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt()); } } Tensor select_sparse_csr(const Tensor& self, int64_t dim, int64_t index) { return select_sparse_csr_worker<true, false>(self, dim, index); } Tensor select_copy_sparse_csr(const Tensor& self, int64_t dim, int64_t index) { return select_sparse_csr_worker<false, true>(self, dim, index); } bool is_pinned_sparse_compressed(const Tensor& self, std::optional<Device> device) { // Assuming that compressed/plain_indices has the same pin memory state as values return self.values().is_pinned(device); } Tensor _pin_memory_sparse_compressed(const Tensor& self, std::optional<Device> device) { TORCH_INTERNAL_ASSERT_DEBUG_ONLY(!device.has_value() || device->is_cuda()); // pinning of sparse tensor is equivalent to cloning indices and // values that will not change the sparse tensor invariants. Hence, // we can skip checking the sparse tensor invariants for efficiency. CheckSparseTensorInvariants _(false); TensorOptions options = self.options().pinned_memory(true); auto impl = get_sparse_csr_impl(self); return at::_sparse_compressed_tensor_unsafe( impl->compressed_indices().pin_memory(device), impl->plain_indices().pin_memory(device), impl->values().pin_memory(device), self.sizes(), optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt()); } } // namespace at::native
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/sparse/SparseCsrTensor.cpp
"""Support for file notification.""" import os import voluptuous as vol from homeassistant.components.notify import ( ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA, BaseNotificationService, ) from homeassistant.const import CONF_FILENAME import homeassistant.helpers.config_validation as cv import homeassistant.util.dt as dt_util CONF_TIMESTAMP = "timestamp" PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( { vol.Required(CONF_FILENAME): cv.string, vol.Optional(CONF_TIMESTAMP, default=False): cv.boolean, } ) def get_service(hass, config, discovery_info=None): """Get the file notification service.""" filename = config[CONF_FILENAME] timestamp = config[CONF_TIMESTAMP] return FileNotificationService(hass, filename, timestamp) class FileNotificationService(BaseNotificationService): """Implement the notification service for the File service.""" def __init__(self, hass, filename, add_timestamp): """Initialize the service.""" self.filepath = os.path.join(hass.config.config_dir, filename) self.add_timestamp = add_timestamp def send_message(self, message="", **kwargs): """Send a message to a file.""" with open(self.filepath, "a") as file: if os.stat(self.filepath).st_size == 0: title = f"{kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT)} notifications (Log started: {dt_util.utcnow().isoformat()})\n{'-' * 80}\n" file.write(title) if self.add_timestamp: text = f"{dt_util.utcnow().isoformat()} {message}\n" else: text = f"{message}\n" file.write(text)
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. """ This module allows you to bring up and tear down keyspaces. """ import cgi import json import subprocess import sys import threading import time from vtdb import vtgatev3 def exec_query(cursor, title, query, response): try: if not query or query == "undefined": return if query.startswith("select"): cursor.execute(query, {}) else: cursor.begin() cursor.execute(query, {}) cursor.commit() response[title] = { "title": title, "description": cursor.description, "rowcount": cursor.rowcount, "lastrowid": cursor.lastrowid, "results": cursor.results, } except Exception as e: response[title] = { "title": title, "error": str(e), } def capture_log(port, queries): p = subprocess.Popen(["curl", "-s", "-N", "http://localhost:%d/debug/querylog" % port], stdout=subprocess.PIPE) def collect(): for line in iter(p.stdout.readline, ''): query = line.split("\t")[12].strip('"') if not query: continue queries.append(query) t = threading.Thread(target=collect) t.daemon = True t.start() return p def main(): print "Content-Type: application/json\n" try: conn = vtgatev3.connect("localhost:12345", 10.0) cursor = conn.cursor("master") args = cgi.FieldStorage() query = args.getvalue("query") response = {} try: queries = [] stats = capture_log(12345, queries) time.sleep(0.25) exec_query(cursor, "result", query, response) finally: stats.terminate() time.sleep(0.25) response["queries"] = queries exec_query(cursor, "user0", "select * from user where keyrange('','\x80')", response) exec_query(cursor, "user1", "select * from user where keyrange('\x80', '')", response) exec_query(cursor, "user_extra0", "select * from user_extra where keyrange('','\x80')", response) exec_query(cursor, "user_extra1", "select * from user_extra where keyrange('\x80', '')", response) exec_query(cursor, "music0", "select * from music where keyrange('','\x80')", response) exec_query(cursor, "music1", "select * from music where keyrange('\x80', '')", response) exec_query(cursor, "music_extra0", "select * from music_extra where keyrange('','\x80')", response) exec_query(cursor, "music_extra1", "select * from music_extra where keyrange('\x80', '')", response) exec_query(cursor, "user_idx", "select * from user_idx", response) exec_query(cursor, "name_user_idx", "select * from name_user_idx", response) exec_query(cursor, "music_user_idx", "select * from music_user_idx", response) print json.dumps(response) except Exception as e: print json.dumps({"error": str(e)}) if __name__ == '__main__': main()
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import tempfile import subprocess import pymongo import shutil import time import sys from camomile import Camomile URL = 'http://localhost:3000' CLIENT = Camomile(URL, debug=False) MONGO_DIR = None MONGO_PROCESS = None NODE_PROCESS = None ROOT_USERNAME = 'root' ROOT_PASSWORD = 'password' def setup(): global MONGO_DIR global MONGO_PROCESS global NODE_PROCESS global CLIENT # create MONGO_DIR MONGO_DIR = tempfile.mkdtemp() print(MONGO_DIR) # launch MongoDB sys.stdout.write('Running MongoDB instance... ') sys.stdout.flush() cmd = ['mongod', '--dbpath={dbpath:s}'.format(dbpath=MONGO_DIR)] MONGO_PROCESS = subprocess.Popen(cmd, stdout=subprocess.PIPE) # testing MongoDB client = pymongo.MongoClient('localhost', 27017) try: # will block until MongoDB is ready client.database_names() except Exception: MONGO_PROCESS.kill() assert False, 'Cannot connect to the MongoDB instance.' sys.stdout.write('DONE\n') sys.stdout.flush() # launch API sys.stdout.write('Running Camomile test instance... ') sys.stdout.flush() cmd = ['node', 'app.js', '--root-password', ROOT_PASSWORD, '--mongodb-host', 'localhost', '--mongodb-port', '27017'] NODE_PROCESS = subprocess.Popen(cmd, stdout=subprocess.PIPE) # testing if server is running for i in range(15): time.sleep(1) try: Camomile(URL, username=ROOT_USERNAME, password=ROOT_PASSWORD) except Exception: continue else: break else: NODE_PROCESS.kill() assert False, 'Cannot connect to the Camomile test instance.' sys.stdout.write('DONE\n') sys.stdout.flush() def teardown(): global MONGO_DIR global MONGO_PROCESS global NODE_PROCESS # stop API sys.stdout.write('\nKilling Camomile test instance... ') sys.stdout.flush() NODE_PROCESS.kill() sys.stdout.write('DONE\n') sys.stdout.flush() # stop MongoDB sys.stdout.write('Killing MongoDB instance... ') sys.stdout.flush() MONGO_PROCESS.kill() sys.stdout.write('DONE\n') sys.stdout.flush() # delete MONGO_DIR shutil.rmtree(MONGO_DIR)
unknown
codeparrot/codeparrot-clean
//////////////////////////////////////////////////////////////////////////// // // Copyright 2015 Realm Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////// import XCTest import RealmSwift import class Realm.Private.RLMRealmConfiguration class RealmConfigurationTests: TestCase { func testDefaultConfiguration() { let defaultConfiguration = Realm.Configuration.defaultConfiguration XCTAssertEqual(defaultConfiguration.fileURL, try! Realm().configuration.fileURL) XCTAssertNil(defaultConfiguration.inMemoryIdentifier) XCTAssertNil(defaultConfiguration.encryptionKey) XCTAssertFalse(defaultConfiguration.readOnly) XCTAssertEqual(defaultConfiguration.schemaVersion, 0) XCTAssert(defaultConfiguration.migrationBlock == nil) } func testSetDefaultConfiguration() { let fileURL = Realm.Configuration.defaultConfiguration.fileURL let configuration = Realm.Configuration(fileURL: URL(fileURLWithPath: "/dev/null")) Realm.Configuration.defaultConfiguration = configuration XCTAssertEqual(Realm.Configuration.defaultConfiguration.fileURL, URL(fileURLWithPath: "/dev/null")) Realm.Configuration.defaultConfiguration.fileURL = fileURL } func testCannotSetMutuallyExclusiveProperties() { var configuration = Realm.Configuration() configuration.readOnly = true configuration.deleteRealmIfMigrationNeeded = true assertThrows(try! Realm(configuration: configuration), reason: "Cannot set `deleteRealmIfMigrationNeeded` when `readOnly` is set.") } }
swift
github
https://github.com/realm/realm-swift
RealmSwift/Tests/RealmConfigurationTests.swift
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. """ This script updates website files with the new release information. (How to run) python update_website <reef_home> <reef_version> <sha512> <release_notes_link> You can also see how to run the script with "python update_website.py -h" (Example) python update_website ~/reef 0.14.0 8f542ae...c4fed7 https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12315820&version=12333768 """ import os import re import sys import argparse import datetime """ pom.xml """ def update_pom(file, new_version): changed_str = "" f = open(file, 'r') while True: line = f.readline() if not line: break if "<currentStableVersion>" in line: r = re.compile('>(.*?)<') m = r.search(line) old_version = m.group(1) line = line.replace(old_version, new_version) changed_str += line f.close() f = open(file, 'w') f.write(changed_str) f.close() print file """ doap.rdf """ def update_doap(file, new_version): changed_str = "" after_release_tag = False f = open(file, 'r') # keep the part of the file before <release> tag as is # necessary because name and created tags appear several times in the file while True: line = f.readline() if not line: break if "<release>" in line: after_release_tag = True # update <name>, <revision> and <created> tags if (("<name>" in line) or ("<revision>" in line)) and after_release_tag: r = re.compile('>(.*?)<') m = r.search(line) old_version = m.group(1) line = line.replace(old_version, new_version) if "<created>" in line and after_release_tag: r = re.compile('<created>(.*?)</created>') m = r.search(line) old_date = m.group(1) new_date = datetime.date.today().strftime('%Y-%m-%d') line = line.replace(old_date, new_date) changed_str += line f.close() f = open(file, 'w') f.write(changed_str) f.close() print file """ downloads.md: replace all release information with new one """ def update_downloads(file, new_version, sha512, notes_link): changed_str = "" old_version = "" f = open(file, 'r') while True: line = f.readline() if not line: break # figure out old version if "selected" in line: r = re.compile('>(.*?)<') m = r.search(line) old_version = m.group(1) if old_version != "" and old_version in line: line = line.replace(old_version, new_version) if "selected" in line: # write this line and construct new one changed_str += line line = ' <option value="' + old_version + '">' + old_version + '</option>\n' if "sha512Text" in line: r = re.compile('<span id="sha512Text">(.*?)</span>') m = r.search(line) line = line.replace(m.group(1), sha512) if "releaseNotesLink" in line: r = re.compile('href="(.*?)"') m = r.search(line) url = re.sub('&(?!amp;)', '&amp;', notes_link) # '&' should be replaced to prevent parsing error line = line.replace(m.group(1), url) if "dotnetApiLink" in line: r = re.compile('<span id="dotnetApiLink">(.*?)</span>') m = r.search(line) line = line.replace(m.group(1), '<a href="apidoc_net/' + new_version + '/index.html">.NET API</a>') changed_str += line f.close() f = open(file, 'w') f.write(changed_str) f.close() print file """ release.js: add releaseSha512 and releaseNotes for new version """ def update_release_js(file, new_version, sha512, notes_link): changed_str = "" f = open(file, 'r') while True: line = f.readline() if not line: break if "var releaseSha512" in line: changed_str += line changed_str += ' "' + new_version + '": "' + sha512 + '",\n' continue if "var releaseNotes" in line: changed_str += line changed_str += ' "' + new_version + '": "' + notes_link + '",\n' continue changed_str += line f.close() f = open(file, 'w') f.write(changed_str) f.close() print file if __name__ == "__main__": parser = argparse.ArgumentParser(description="Script for updating REEF website with information about new release.") parser.add_argument("reef_home", type=str, help="REEF home") parser.add_argument("reef_version", type=str, help="REEF version") parser.add_argument("sha512", type=str, help="SHA512 of .tar.gz file") parser.add_argument("notes_link", type=str, help="Link to release notes for the version") args = parser.parse_args() reef_home = os.path.abspath(args.reef_home) update_pom(reef_home + "/pom.xml", args.reef_version) update_doap(reef_home + "/website/src/site/resources/doap.rdf", args.reef_version) update_release_js(reef_home + "/website/src/site/resources/js/release.js", args.reef_version, args.sha512, args.notes_link) update_downloads(reef_home + "/website/src/site/markdown/downloads.md", args.reef_version, args.sha512, args.notes_link)
unknown
codeparrot/codeparrot-clean
# FILE: autoload/conque_term/conque_sole_shared_memory.py # AUTHOR: Nico Raffo <nicoraffo@gmail.com> # WEBSITE: http://conque.googlecode.com # MODIFIED: 2011-08-12 # VERSION: 2.2, for Vim 7.0 # LICENSE: # Conque - Vim terminal/console emulator # Copyright (C) 2009-__YEAR__ Nico Raffo # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. """ Wrapper class for shared memory between Windows python processes Adds a small amount of functionality to the standard mmap module. """ import mmap import sys # PYTHON VERSION CONQUE_PYTHON_VERSION = sys.version_info[0] if CONQUE_PYTHON_VERSION == 2: import cPickle as pickle else: import pickle class ConqueSoleSharedMemory(): # is the data being stored not fixed length fixed_length = False # maximum number of bytes per character, for fixed width blocks char_width = 1 # fill memory with this character when clearing and fixed_length is true FILL_CHAR = None # serialize and unserialize data automatically serialize = False # size of shared memory, in bytes / chars mem_size = None # size of shared memory, in bytes / chars mem_type = None # unique key, so multiple console instances are possible mem_key = None # mmap instance shm = None # character encoding, dammit encoding = 'utf-8' # pickle terminator TERMINATOR = None def __init__(self, mem_size, mem_type, mem_key, fixed_length=False, fill_char=' ', serialize=False, encoding='utf-8'): """ Initialize new shared memory block instance Arguments: mem_size -- Memory size in characters, depends on encoding argument to calcuate byte size mem_type -- Label to identify what will be stored mem_key -- Unique, probably random key to identify this block fixed_length -- If set to true, assume the data stored will always fill the memory size fill_char -- Initialize memory block with this character, only really helpful with fixed_length blocks serialize -- Automatically serialize data passed to write. Allows storing non-byte data encoding -- Character encoding to use when storing character data """ self.mem_size = mem_size self.mem_type = mem_type self.mem_key = mem_key self.fixed_length = fixed_length self.fill_char = fill_char self.serialize = serialize self.encoding = encoding self.TERMINATOR = str(chr(0)).encode(self.encoding) if CONQUE_PYTHON_VERSION == 3: self.FILL_CHAR = fill_char else: self.FILL_CHAR = unicode(fill_char) if fixed_length and encoding == 'utf-8': self.char_width = 4 def create(self, access='write'): """ Create a new block of shared memory using the mmap module. """ if access == 'write': mmap_access = mmap.ACCESS_WRITE else: mmap_access = mmap.ACCESS_READ name = "conque_%s_%s" % (self.mem_type, self.mem_key) self.shm = mmap.mmap(0, self.mem_size * self.char_width, name, mmap_access) if not self.shm: return False else: return True def read(self, chars=1, start=0): """ Read data from shared memory. If this is a fixed length block, read 'chars' characters from memory. Otherwise read up until the TERMINATOR character (null byte). If this memory is serialized, unserialize it automatically. """ # go to start position self.shm.seek(start * self.char_width) if self.fixed_length: chars = chars * self.char_width else: chars = self.shm.find(self.TERMINATOR) if chars == 0: return '' shm_str = self.shm.read(chars) # return unpickled byte object if self.serialize: return pickle.loads(shm_str) # decode byes in python 3 if CONQUE_PYTHON_VERSION == 3: return str(shm_str, self.encoding) # encoding if self.encoding != 'ascii': shm_str = unicode(shm_str, self.encoding) return shm_str def write(self, text, start=0): """ Write data to memory. If memory is fixed length, simply write the 'text' characters at 'start' position. Otherwise write 'text' characters and append a null character. If memory is serializable, do so first. """ # simple scenario, let pickle create bytes if self.serialize: if CONQUE_PYTHON_VERSION == 3: tb = pickle.dumps(text, 0) else: tb = pickle.dumps(text, 0).encode(self.encoding) else: tb = text.encode(self.encoding, 'replace') # write to memory self.shm.seek(start * self.char_width) if self.fixed_length: self.shm.write(tb) else: self.shm.write(tb + self.TERMINATOR) def clear(self, start=0): """ Clear memory block using self.fill_char. """ self.shm.seek(start) if self.fixed_length: self.shm.write(str(self.fill_char * self.mem_size * self.char_width).encode(self.encoding)) else: self.shm.write(self.TERMINATOR) def close(self): """ Close/destroy memory block. """ self.shm.close()
unknown
codeparrot/codeparrot-clean
#saks from bs4 import BeautifulSoup import urllib2 import sys from urlparse import urljoin #import lxml sys.path.append("/Users/fcolombo/Documents/gilt"); import defaultparser import crawler #import html5lib class SaksCrawler: def getProductParser(self): def findBrand(soup): brandTag = soup.find('h1', class_="brand") if brandTag is not None: brand = brandTag.text return brand return "" def findPrice(soup): priceTag = soup.find('span', class_="product-price") if priceTag is not None: price = priceTag.text return crawler.removeSymbols(price) def findProductName(soup): h = soup.find('h2', class_="description") name = h.text print name return crawler.removeSymbols(name) def findImageLink(soup): t = soup.find("object", attrs={"type":"application/x-shockwave-flash"}) thumbnail = t.find('img') if thumbnail is not None: image = thumbnail['src'] if image is not None: return image return "" productParser = crawler.ProductParser(findImageLink, findProductName, findBrand, findPrice) productParser.findBrand = findBrand productParser.findPrice = findPrice productParser.findProductName = findProductName productParser.findImageLink = findImageLink return productParser def getParser(self): def findProductUrls(soup, base_url): urls = [] productCells = soup.find_all("div", class_= "product-text") for cell in productCells: a = cell.find('a') if a is not None: url = a['href'] print "Found product url", url urls.append(url) return urls parser = crawler.Parser(self.getProductParser(), findProductUrls) return parser def __init__(self): print "Creating Saks Crawler" self.crawler = crawler.Crawler( #dresses ['http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=180', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=360', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=540', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=720', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=900', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=1080', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=1260', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=1440', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=1620', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=1800', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=1980', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=2160', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=2340', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=2520', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=2700', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=2880', 'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=3060'] #'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=3240', #'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=3420', #'http://www.saksfifthavenue.com/Women-s-Apparel/Dresses/shop/_/N-52flor/Ne-6lvnb5?Nao=3600', #tops #'http://www.saksfifthavenue.com/Women-s-Apparel/Tops/shop/_/N-52floo/Ne-6lvnb5', #'http://www.saksfifthavenue.com/Women-s-Apparel/Tops/shop/_/N-52floo/Ne-6lvnb5?Nao=180', #'http://www.saksfifthavenue.com/Women-s-Apparel/Tops/shop/_/N-52floo/Ne-6lvnb5?Nao=360', #'http://www.saksfifthavenue.com/Women-s-Apparel/Tops/shop/_/N-52floo/Ne-6lvnb5?Nao=540', #'http://www.saksfifthavenue.com/Women-s-Apparel/Tops/shop/_/N-52floo/Ne-6lvnb5?Nao=720', #skirts #'http://www.saksfifthavenue.com/Women-s-Apparel/Skirts/shop/_/N-52flos/Ne-6lvnb5', #'http://www.saksfifthavenue.com/Women-s-Apparel/Skirts/shop/_/N-52flos/Ne-6lvnb5?Nao=180', #'http://www.saksfifthavenue.com/Women-s-Apparel/Skirts/shop/_/N-52flos/Ne-6lvnb5?Nao=360', #'http://www.saksfifthavenue.com/Women-s-Apparel/Skirts/shop/_/N-52flos/Ne-6lvnb5?Nao=540', #'http://www.saksfifthavenue.com/Women-s-Apparel/Skirts/shop/_/N-52flos/Ne-6lvnb5?Nao=720'] , self.getParser()) def crawl(self): self.crawler.crawl() def main(): crawler = SaksCrawler() crawler.crawl() #main()
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2010 Patrick Crews # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA """ test_management: code related to the gathering / analysis / management of the test cases ie - collecting the list of tests in each suite, then gathering additional, relevant information for the test-runner's dtr mode. (traditional diff-based testing) """ # imports import os import re import sys import thread class testManager(object): """Deals with scanning test directories, gathering test cases, and collecting per-test information (opt files, etc) for use by the test-runner """ def __init__( self, variables, system_manager): self.system_manager = system_manager self.time_manager = system_manager.time_manager self.logging = system_manager.logging if variables['verbose']: self.logging.verbose("Initializing test manager...") self.skip_keys = [ 'system_manager' , 'verbose' , 'debug' ] self.test_list = [] self.first_test = 1 self.total_test_count = 0 self.executed_tests = {} # We have a hash of 'status':[test_name..] self.executing_tests = {} self.verbose = variables['verbose'] self.debug = variables['debug'] self.default_engine = variables['defaultengine'] self.dotest = variables['dotest'] if self.dotest: self.dotest = self.dotest.strip() self.skiptest = variables['skiptest'] if self.skiptest: self.skiptest = self.skiptest.strip() self.reorder = variables['reorder'] self.suitelist = variables['suitelist'] self.mode = variables['mode'] self.suitepaths = variables['suitepaths'] self.testdir = variables['testdir'] self.desired_tests = variables['test_cases'] self.logging.debug_class(self) def add_test(self, new_test_case): """ Add a new testCase to our self.test_list """ self.test_list.append(new_test_case) def gather_tests(self): self.logging.info("Processing test suites...") # BEGIN terrible hack to accomodate the fact that # our 'main' suite is also our testdir : / if self.suitelist is None and self.mode=='dtr': self.suitepaths = [self.testdir] self.suitelist = ['main'] # END horrible hack for suite in self.suitelist: suite_path = self.find_suite_path(suite) if suite_path: self.process_suite(suite_path) else: self.logging.error("Could not find suite: %s in any of paths: %s" %(suite, ", ".join(self.suitepaths))) self.process_gathered_tests() def process_gathered_tests(self): """ We do some post-gathering analysis and whatnot Report an error if there were desired_tests but no tests were found. Otherwise just report what we found """ # See if we need to reorder our test cases if self.reorder: self.sort_testcases() if self.desired_tests and not self.test_list: # We wanted tests, but found none # Probably need to make this smarter at some point # To maybe make sure that we found all of the desired tests... # However, this is a start / placeholder code self.logging.error("Unable to locate any of the desired tests: %s" %(" ,".join(self.desired_tests))) self.total_test_count = len(self.test_list) self.logging.info("Found %d test(s) for execution" %(self.total_test_count)) self.logging.debug("Found tests:") self.logging.debug("%s" %(self.print_test_list())) def find_suite_path(self, suitename): """ We have a suitename, we need to locate the path to the juicy suitedir in one of our suitepaths. Theoretically, we could have multiple matches, but such things should never be allowed, so we don't code for it. We return the first match. testdir can either be suitepath/suitename or suitepath/suitename/tests. We test and return the existing path. Return None if no match found """ # BEGIN horrible hack to accomodate bad location of main suite if self.mode == 'dtr': if self.suitepaths == [self.testdir] or suitename == 'main': # We treat this as the 'main' suite return self.testdir # END horrible hack for suitepath in self.suitepaths: suite_path = self.system_manager.find_path([ os.path.join(suitepath,suitename,'tests'), os.path.join(suitepath,suitename) ], required = 0 ) if suite_path: return suite_path return suite_path def process_suite(self,suite_dir): """Process a test suite. This includes searching for tests in test_list and only working with the named tests (all tests in suite is the default) Further processing includes reading the disabled.def file to know which tests to skip, processing the suite.opt file, and processing the individual test cases for data relevant to the rest of the test-runner """ self.logging.verbose("Processing suite: %s" %(suite)) def has_tests(self): """Return 1 if we have tests in our testlist, 0 otherwise""" return len(self.test_list) def get_testCase(self, requester): """return a testCase """ if self.first_test: # we start our timer self.time_manager.start('total_time','total_time') self.first_test = 0 test_case = None if self.has_tests(): test_case = self.test_list.pop(0) self.record_test_executor(requester, test_case.fullname) return test_case def record_test_executor(self, requester, test_name): """ We record the test case and executor name as this could be useful We don't *know* this is needed, but we can always change this later """ self.executing_tests[test_name] = requester def record_test_result(self, test_case, test_status, output, exec_time): """ Accept the results of an executed testCase for further processing. """ if test_status not in self.executed_tests: self.executed_tests[test_status] = [test_case] else: self.executed_tests[test_status].append(test_case) # report. If the test failed, we print any additional # output returned by the test executor # We may want to report additional output at other times if test_status != 'pass': report_output = True else: report_output = False self.logging.test_report( test_case.fullname, test_status , exec_time, output, report_output) def print_test_list(self): test_names = [] for test in self.test_list: test_names.append(test.fullname) return "[ %s ]" %(", ".join(test_names)) def statistical_report(self): """ Report out various testing statistics: Failed/Passed %success list of failed test cases """ # This is probably hacky, but I'll think of a better # location later. When we are ready to see our # statistical report, we know to stop the total time timer if not self.first_test: total_exec_time = self.time_manager.stop('total_time') self.logging.write_thick_line() self.logging.info("Test execution complete in %d seconds" %(total_exec_time)) self.logging.info("Summary report:") self.report_executed_tests() self.report_test_statuses() if not self.first_test: self.time_manager.summary_report() def report_test_statuses(self): """ Method to report out various test statuses we care about """ test_statuses = [ 'fail' , 'timeout' , 'skipped' , 'disabled' ] for test_status in test_statuses: self.report_tests_by_status(test_status) def get_executed_test_count(self): """ Return how many tests were executed """ total_count = 0 for test_list in self.executed_tests.values(): total_count = total_count + len(test_list) return total_count def report_executed_tests(self): """ Report out tests by status """ total_executed_count = self.get_executed_test_count() if self.total_test_count: executed_ratio = (float(total_executed_count)/float(self.total_test_count)) executed_percent = executed_ratio * 100 else: # We prevent division by 0 if we didn't find any tests to execute executed_ratio = 0 executed_percent = 0 self.logging.info("Executed %s/%s test cases, %.2f percent" %( total_executed_count , self.total_test_count , executed_percent)) for test_status in self.executed_tests.keys(): status_count = self.get_count_by_status(test_status) test_percent = (float(status_count)/float(total_executed_count))*100 self.logging.info("STATUS: %s, %d/%d test cases, %.2f percent executed" %( test_status.upper() , status_count , total_executed_count , test_percent )) def report_tests_by_status(self, status): matching_tests = [] if status in self.executed_tests: for testcase in self.executed_tests[status]: matching_tests.append(testcase.fullname) self.logging.info("%s tests: %s" %(status.upper(), ", ".join(matching_tests))) def get_count_by_status(self, test_status): """ Return how many tests are in a given test_status """ if test_status in self.executed_tests: return len(self.executed_tests[test_status]) else: return 0 def sort_testcases(self): """ Sort testcases to optimize test execution. This can be very mode-specific """ self.logging.verbose("Reordering testcases to optimize test execution...") def has_failing_tests(self): return (self.get_count_by_status('fail') + self.get_count_by_status('timeout'))
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './pyqtgraph/flowchart/FlowchartCtrlTemplate.ui' # # Created: Mon Dec 23 10:10:50 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig, _encoding) except AttributeError: def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig) class Ui_Form(object): def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(217, 499) self.gridLayout = QtGui.QGridLayout(Form) self.gridLayout.setMargin(0) self.gridLayout.setVerticalSpacing(0) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.loadBtn = QtGui.QPushButton(Form) self.loadBtn.setObjectName(_fromUtf8("loadBtn")) self.gridLayout.addWidget(self.loadBtn, 1, 0, 1, 1) self.saveBtn = FeedbackButton(Form) self.saveBtn.setObjectName(_fromUtf8("saveBtn")) self.gridLayout.addWidget(self.saveBtn, 1, 1, 1, 2) self.saveAsBtn = FeedbackButton(Form) self.saveAsBtn.setObjectName(_fromUtf8("saveAsBtn")) self.gridLayout.addWidget(self.saveAsBtn, 1, 3, 1, 1) self.reloadBtn = FeedbackButton(Form) self.reloadBtn.setCheckable(False) self.reloadBtn.setFlat(False) self.reloadBtn.setObjectName(_fromUtf8("reloadBtn")) self.gridLayout.addWidget(self.reloadBtn, 4, 0, 1, 2) self.showChartBtn = QtGui.QPushButton(Form) self.showChartBtn.setCheckable(True) self.showChartBtn.setObjectName(_fromUtf8("showChartBtn")) self.gridLayout.addWidget(self.showChartBtn, 4, 2, 1, 2) self.ctrlList = TreeWidget(Form) self.ctrlList.setObjectName(_fromUtf8("ctrlList")) self.ctrlList.headerItem().setText(0, _fromUtf8("1")) self.ctrlList.header().setVisible(False) self.ctrlList.header().setStretchLastSection(False) self.gridLayout.addWidget(self.ctrlList, 3, 0, 1, 4) self.fileNameLabel = QtGui.QLabel(Form) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.fileNameLabel.setFont(font) self.fileNameLabel.setText(_fromUtf8("")) self.fileNameLabel.setAlignment(QtCore.Qt.AlignCenter) self.fileNameLabel.setObjectName(_fromUtf8("fileNameLabel")) self.gridLayout.addWidget(self.fileNameLabel, 0, 1, 1, 1) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form) def retranslateUi(self, Form): Form.setWindowTitle(_translate("Form", "Form", None)) self.loadBtn.setText(_translate("Form", "Load..", None)) self.saveBtn.setText(_translate("Form", "Save", None)) self.saveAsBtn.setText(_translate("Form", "As..", None)) self.reloadBtn.setText(_translate("Form", "Reload Libs", None)) self.showChartBtn.setText(_translate("Form", "Flowchart", None)) from ..widgets.TreeWidget import TreeWidget from ..widgets.FeedbackButton import FeedbackButton
unknown
codeparrot/codeparrot-clean
import functools from urlparse import urlunparse from django.conf import settings from django.contrib.sites.models import Site from django.core.urlresolvers import reverse as simple_reverse def current_site_domain(): domain = Site.objects.get_current().domain prefix = 'www.' if getattr(settings, 'REMOVE_WWW_FROM_DOMAIN', False) \ and domain.startswith(prefix): domain = domain.replace(prefix, '', 1) return domain get_domain = current_site_domain def urljoin(domain, path=None, scheme=None): """ Joins a domain, path and scheme part together, returning a full URL. :param domain: the domain, e.g. ``example.com`` :param path: the path part of the URL, e.g. ``/example/`` :param scheme: the scheme part of the URL, e.g. ``http``, defaulting to the value of ``settings.DEFAULT_URL_SCHEME`` :returns: a full URL """ if scheme is None: scheme = getattr(settings, 'DEFAULT_URL_SCHEME', 'http') return urlunparse((scheme, domain, path or '', None, None, None)) def reverse(viewname, subdomain=None, scheme=None, args=None, kwargs=None, current_app=None): """ Reverses a URL from the given parameters, in a similar fashion to :meth:`django.core.urlresolvers.reverse`. :param viewname: the name of URL :param subdomain: the subdomain to use for URL reversing :param scheme: the scheme to use when generating the full URL :param args: positional arguments used for URL reversing :param kwargs: named arguments used for URL reversing :param current_app: hint for the currently executing application """ urlconf = settings.SUBDOMAIN_URLCONFS.get(subdomain, settings.ROOT_URLCONF) domain = get_domain() if subdomain is not None: domain = '%s.%s' % (subdomain, domain) path = simple_reverse(viewname, urlconf=urlconf, args=args, kwargs=kwargs, current_app=current_app) return urljoin(domain, path, scheme=scheme) #: :func:`reverse` bound to insecure (non-HTTPS) URLs scheme insecure_reverse = functools.partial(reverse, scheme='http') #: :func:`reverse` bound to secure (HTTPS) URLs scheme secure_reverse = functools.partial(reverse, scheme='https') #: :func:`reverse` bound to be relative to the current scheme relative_reverse = functools.partial(reverse, scheme='')
unknown
codeparrot/codeparrot-clean
#include "test/jemalloc_test.h" #define INVALID_ARENA_IND ((1U << MALLOCX_ARENA_BITS) - 1) TEST_BEGIN(test_arena_slab_regind) { szind_t binind; for (binind = 0; binind < SC_NBINS; binind++) { size_t regind; edata_t slab; const bin_info_t *bin_info = &bin_infos[binind]; edata_init(&slab, INVALID_ARENA_IND, mallocx(bin_info->slab_size, MALLOCX_LG_ALIGN(LG_PAGE)), bin_info->slab_size, true, binind, 0, extent_state_active, false, true, EXTENT_PAI_PAC, EXTENT_NOT_HEAD); expect_ptr_not_null(edata_addr_get(&slab), "Unexpected malloc() failure"); arena_dalloc_bin_locked_info_t dalloc_info; arena_dalloc_bin_locked_begin(&dalloc_info, binind); for (regind = 0; regind < bin_info->nregs; regind++) { void *reg = (void *)((uintptr_t)edata_addr_get(&slab) + (bin_info->reg_size * regind)); expect_zu_eq(arena_slab_regind(&dalloc_info, binind, &slab, reg), regind, "Incorrect region index computed for size %zu", bin_info->reg_size); } free(edata_addr_get(&slab)); } } TEST_END int main(void) { return test( test_arena_slab_regind); }
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/slab.c
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.system; import org.jspecify.annotations.Nullable; /** * Access to system properties. * * @author Phillip Webb * @since 2.0.0 */ public final class SystemProperties { private SystemProperties() { } public static @Nullable String get(String... properties) { for (String property : properties) { try { String override = System.getProperty(property); override = (override != null) ? override : System.getenv(property); if (override != null) { return override; } } catch (Throwable ex) { System.err.println("Could not resolve '" + property + "' as system property: " + ex); } } return null; } }
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot/src/main/java/org/springframework/boot/system/SystemProperties.java
# -*- coding: utf-8 -*- """ Exodus Add-on This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ import re, urllib, urlparse, json from resources.lib.modules import cleantitle from resources.lib.modules import client class source: def __init__(self): self.priority = 1 self.language = ['fr'] self.domains = ['streamay.ws'] self.base_link = 'http://streamay.ws' self.search_link = '/search' def movie(self, imdb, title, localtitle, aliases, year): return self.__search(title, localtitle, year, 'Film') def tvshow(self, imdb, tvdb, tvshowtitle, localtvshowtitle, aliases, year): return self.__search(tvshowtitle, localtvshowtitle, year, 'Série') def episode(self, url, imdb, tvdb, title, premiered, season, episode): try: if not url: return r = client.request(urlparse.urljoin(self.base_link, url)) r = client.parseDOM(r, 'a', attrs={'class': 'item', 'href': '[^\'"]*/saison-%s/episode-%s[^\'"]*' % (season, episode)}, ret='href')[0] url = re.findall('(?://.+?|)(/.+)', r)[0] url = client.replaceHTMLCodes(url) url = url.encode('utf-8') return url except: return def sources(self, url, hostDict, hostprDict): sources = [] try: if not url: return hostDict = [(i.rsplit('.', 1)[0], i) for i in hostDict] hostDict.append(['okru', 'ok.ru']) locDict = [i[0] for i in hostDict] url = urlparse.urljoin(self.base_link, url) r = client.request(url) r = client.parseDOM(r, 'ul', attrs={'class': '[^\'"]*lecteurs nop[^\'"]*'}) r = client.parseDOM(r, 'li') r = [(client.parseDOM(i, 'a', ret='data-streamer'), client.parseDOM(i, 'a', ret='data-id')) for i in r] r = [(i[0][0], i[1][0], re.search('([a-zA-Z]+)(?:_([a-zA-Z]+))?', i[0][0]), ) for i in r if i[0] and i[1]] r = [(i[0], i[1], i[2].group(1), i[2].group(2)) for i in r if i[2]] for streamer, id, host, info in r: if host not in locDict: continue host = [x[1] for x in hostDict if x[0] == host][0] link = urlparse.urljoin(self.base_link, '/%s/%s/%s' % (('streamerSerie' if '/series/' in url else 'streamer'), id, streamer)) sources.append({'source': host, 'quality': 'SD', 'url': link, 'language': 'FR', 'info': info if info else '', 'direct': False, 'debridonly': False}) return sources except: return sources def resolve(self, url): try: url = json.loads(client.request(url)).get('code') url = url.replace('\/', '/') url = client.replaceHTMLCodes(url).encode('utf-8') if url.startswith('/'): url = 'http:%s' % url return url except: return def __search(self, title, localtitle, year, content_type): try: t = cleantitle.get(title) tq = cleantitle.get(localtitle) y = ['%s' % str(year), '%s' % str(int(year) + 1), '%s' % str(int(year) - 1), '0'] query = urlparse.urljoin(self.base_link, self.search_link) post = urllib.urlencode({'k': "%s"}) % tq r = client.request(query, post=post) r = json.loads(r) r = [i.get('result') for i in r if i.get('type', '').encode('utf-8') == content_type] r = [(i.get('url'), i.get('originalTitle'), i.get('title'), i.get('anneeProduction', 0), i.get('dateStart', 0)) for i in r] r = [(i[0], re.sub('<.+?>|</.+?>', '', i[1] if i[1] else ''), re.sub('<.+?>|</.+?>', '', i[2] if i[2] else ''), i[3] if i[3] else re.findall('(\d{4})', i[4])[0]) for i in r if i[3] or i[4]] r = sorted(r, key=lambda i: int(i[3]), reverse=True) # with year > no year r = [i[0] for i in r if i[3] in y and (t.lower() == cleantitle.get(i[1].lower()) or tq.lower() == cleantitle.query(i[2].lower()))][0] url = re.findall('(?://.+?|)(/.+)', r)[0] url = client.replaceHTMLCodes(url) url = url.encode('utf-8') return url except: return
unknown
codeparrot/codeparrot-clean
from sympy import var, sqrt, exp, simplify, S, integrate, oo, Symbol from sympy.physics.hydrogen import R_nl, E_nl, E_nl_dirac from sympy.utilities.pytest import raises var("r Z") def feq(a, b, max_relative_error=1e-12, max_absolute_error=1e-12): a = float(a) b = float(b) # if the numbers are close enough (absolutely), then they are equal if abs(a-b) < max_absolute_error: return True # if not, they can still be equal if their relative error is small if abs(b) > abs(a): relative_error = abs((a-b)/b) else: relative_error = abs((a-b)/a) return relative_error <= max_relative_error def test_wavefunction(): a = 1/Z R = { (1, 0): 2*sqrt(1/a**3) * exp(-r/a), (2, 0): sqrt(1/(2*a**3)) * exp(-r/(2*a)) * (1-r/(2*a)), (2, 1): S(1)/2 * sqrt(1/(6*a**3)) * exp(-r/(2*a)) * r/a, (3, 0): S(2)/3 * sqrt(1/(3*a**3)) * exp(-r/(3*a)) * \ (1-2*r/(3*a) + S(2)/27 * (r/a)**2), (3, 1): S(4)/27 * sqrt(2/(3*a**3)) * exp(-r/(3*a)) * \ (1-r/(6*a)) * r/a, (3, 2): S(2)/81 * sqrt(2/(15*a**3)) * exp(-r/(3*a)) * (r/a)**2, (4, 0): S(1)/4 * sqrt(1/a**3) * exp(-r/(4*a)) * \ (1-3*r/(4*a)+S(1)/8 * (r/a)**2-S(1)/192 * (r/a)**3), (4, 1): S(1)/16 * sqrt(5/(3*a**3)) * exp(-r/(4*a)) * \ (1-r/(4*a)+S(1)/80 * (r/a)**2) * (r/a), (4, 2): S(1)/64 * sqrt(1/(5*a**3)) * exp(-r/(4*a)) * \ (1-r/(12*a)) * (r/a)**2, (4, 3): S(1)/768 * sqrt(1/(35*a**3)) * exp(-r/(4*a)) * (r/a)**3, } for n, l in R: assert simplify(R_nl(n, l, r, Z) - R[(n, l)]) == 0 def test_norm(): # Maximum "n" which is tested: n_max = 2 # you can test any n and it works, but it's slow, so it's commented out: #n_max = 4 for n in range(n_max+1): for l in range(n): assert integrate(R_nl(n, l, r)**2 * r**2, (r, 0, oo)) == 1 def test_hydrogen_energies(): n = Symbol("n") assert E_nl(n, Z) == -Z**2/(2*n**2) assert E_nl(n) == -1/(2*n**2) assert E_nl(1, 47) == -S(47)**2/(2*1**2) assert E_nl(2, 47) == -S(47)**2/(2*2**2) assert E_nl(1) == -S(1)/(2*1**2) assert E_nl(2) == -S(1)/(2*2**2) assert E_nl(3) == -S(1)/(2*3**2) assert E_nl(4) == -S(1)/(2*4**2) assert E_nl(100) == -S(1)/(2*100**2) raises(ValueError, "E_nl(0)") def test_hydrogen_energies_relat(): # First test exact formulas for small "c" so that we get nice expressions: assert E_nl_dirac(2, 0, Z=1, c=1) == 1/sqrt(2) - 1 assert simplify(E_nl_dirac(2, 0, Z=1, c=2) - ( (8*sqrt(3) + 16) \ / sqrt(16*sqrt(3) + 32) - 4)) == 0 assert simplify(E_nl_dirac(2, 0, Z=1, c=3) - ( (54*sqrt(2) + 81) \ / sqrt(108*sqrt(2) + 162) - 9)) == 0 # Now test for almost the correct speed of light, without floating point # numbers: assert simplify(E_nl_dirac(2, 0, Z=1, c=137) - ( (352275361 + 10285412 * \ sqrt(1173)) / sqrt(704550722 + 20570824 * sqrt(1173)) - \ 18769)) == 0 assert simplify(E_nl_dirac(2, 0, Z=82, c=137) - ( (352275361 + \ 2571353*sqrt(12045)) / sqrt(704550722 + 5142706*sqrt(12045)) \ - 18769)) == 0 # Test using exact speed of light, and compare against the nonrelativistic # energies: for n in range(1, 5): for l in range(n): assert feq(E_nl_dirac(n, l), E_nl(n), 1e-5, 1e-5) if l > 0: assert feq(E_nl_dirac(n, l, False), E_nl(n), 1e-5, 1e-5) Z = 2 for n in range(1, 5): for l in range(n): assert feq(E_nl_dirac(n, l, Z=Z), E_nl(n, Z), 1e-4, 1e-4) if l > 0: assert feq(E_nl_dirac(n, l, False, Z), E_nl(n, Z), 1e-4, 1e-4) Z = 3 for n in range(1, 5): for l in range(n): assert feq(E_nl_dirac(n, l, Z=Z), E_nl(n, Z), 1e-3, 1e-3) if l > 0: assert feq(E_nl_dirac(n, l, False, Z), E_nl(n, Z), 1e-3, 1e-3) # Test the exceptions: raises(ValueError, "E_nl_dirac(0, 0)") raises(ValueError, "E_nl_dirac(1, -1)") raises(ValueError, "E_nl_dirac(1, 0, False)")
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Netflix, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ .. module: security_monkey.watchers.s3 :platform: Unix .. version:: $$VERSION$$ .. moduleauthor:: Patrick Kelley <pkelley@netflix.com> @monkeysecurity """ from security_monkey.watcher import Watcher from security_monkey.watcher import ChangeItem from security_monkey.exceptions import BotoConnectionIssue from security_monkey.exceptions import S3PermissionsIssue from security_monkey.exceptions import S3ACLReturnedNoneDisplayName from security_monkey import app from boto.s3.connection import OrdinaryCallingFormat import boto import json def get_lifecycle_rules(bhandle): lifecycle = [] try: lc = bhandle.get_lifecycle_config() except: # throws an exception (404) when bucket has no lifecycle configurations return lifecycle for rule in lc: lc_rule = { 'id': rule.id, 'status': rule.status, 'prefix': rule.prefix, } if rule.transition: lc_rule['transition'] = { 'days': rule.transition.days, 'date': rule.transition.date, 'storage_class': rule.transition.storage_class } if rule.expiration: lc_rule['expiration'] = { 'days': rule.expiration.days, 'date': rule.expiration.date } lifecycle.append(lc_rule) return lifecycle class S3(Watcher): index = 's3' i_am_singular = 'S3 Bucket' i_am_plural = 'S3 Buckets' region_mappings = dict(APNortheast='ap-northeast-1', APSoutheast='ap-southeast-1', APSoutheast2='ap-southeast-2', DEFAULT='', EU='eu-west-1', SAEast='sa-east-1', USWest='us-west-1', USWest2='us-west-2') def __init__(self, accounts=None, debug=False): super(S3, self).__init__(accounts=accounts, debug=debug) def slurp(self): """ :returns: item_list - list of S3 Buckets. :returns: exception_map - A dict where the keys are a tuple containing the location of the exception and the value is the actual exception """ self.prep_for_slurp() item_list = [] exception_map = {} from security_monkey.common.sts_connect import connect for account in self.accounts: try: s3conn = connect(account, 's3', calling_format=OrdinaryCallingFormat()) all_buckets = self.wrap_aws_rate_limited_call( s3conn.get_all_buckets ) except Exception as e: exc = BotoConnectionIssue(str(e), 's3', account, None) self.slurp_exception((self.index, account), exc, exception_map) continue for bucket in all_buckets: app.logger.debug("Slurping %s (%s) from %s" % (self.i_am_singular, bucket.name, account)) if self.check_ignore_list(bucket.name): continue try: loc = self.wrap_aws_rate_limited_call(bucket.get_location) region = self.translate_location_to_region(loc) if region == '': s3regionconn = self.wrap_aws_rate_limited_call( connect, account, 's3', calling_format=OrdinaryCallingFormat() ) region = 'us-east-1' else: s3regionconn = self.wrap_aws_rate_limited_call( connect, account, 's3', region=region, calling_format=OrdinaryCallingFormat() ) bhandle = self.wrap_aws_rate_limited_call( s3regionconn.get_bucket, bucket, validate=False ) s3regionconn.close() except Exception as e: exc = S3PermissionsIssue(bucket.name) # Unfortunately, we can't get the region, so the entire account # will be skipped in find_changes, not just the bad bucket. self.slurp_exception((self.index, account), exc, exception_map) continue app.logger.debug("Slurping %s (%s) from %s/%s" % (self.i_am_singular, bucket.name, account, region)) bucket_dict = self.conv_bucket_to_dict(bhandle, account, region, bucket.name, exception_map) item = S3Item(account=account, region=region, name=bucket.name, config=bucket_dict) item_list.append(item) return item_list, exception_map def translate_location_to_region(self, location): if location in self.region_mappings: return self.region_mappings[location] else: return location def conv_bucket_to_dict(self, bhandle, account, region, bucket_name, exception_map): """ Converts the bucket ACL and Policy information into a python dict that we can save. """ bucket_dict = {} grantees = {} acl = self.wrap_aws_rate_limited_call( bhandle.get_acl ) aclxml = self.wrap_aws_rate_limited_call( acl.to_xml ) if '<DisplayName>None</DisplayName>' in aclxml: # Boto sometimes returns XML with strings like: # <DisplayName>None</DisplayName> # Wait a little while, and it will return the real DisplayName # The console will display "Me" as the Grantee when we see these None # DisplayNames in boto. exc = S3ACLReturnedNoneDisplayName(bucket_name) self.slurp_exception((self.index, account, region, bucket_name), exc, exception_map) else: for grant in acl.acl.grants: if grant.display_name == 'None' or grant.display_name == 'null': app.logger.info("Received a bad display name: %s" % grant.display_name) if grant.display_name is None: gname = grant.uri else: gname = grant.display_name if gname in grantees: grantees[gname].append(grant.permission) grantees[gname] = sorted(grantees[gname]) else: grantees[gname] = [grant.permission] bucket_dict['grants'] = grantees try: policy = self.wrap_aws_rate_limited_call( bhandle.get_policy ) policy = json.loads(policy) bucket_dict['policy'] = policy except boto.exception.S3ResponseError as e: # S3ResponseError is raised if there is no policy. # Simply ignore. pass # {} or {'Versioning': 'Enabled'} or {'MfaDelete': 'Disabled', 'Versioning': 'Enabled'} bucket_dict['versioning'] = self.wrap_aws_rate_limited_call( bhandle.get_versioning_status ) bucket_dict['lifecycle_rules'] = get_lifecycle_rules(bhandle) return bucket_dict class S3Item(ChangeItem): def __init__(self, account=None, region=None, name=None, config={}): super(S3Item, self).__init__( index=S3.index, region=region, account=account, name=name, new_config=config)
unknown
codeparrot/codeparrot-clean
# Copyright 2007 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY MATT CHAPUT ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL MATT CHAPUT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # The views and conclusions contained in the software and documentation are # those of the authors and should not be interpreted as representing official # policies, either expressed or implied, of Matt Chaput. from array import array from whoosh.compat import array_tobytes, xrange # Varint cache # Build a cache of the varint byte sequences for the first N integers, so we # don't have to constantly recalculate them on the fly. This makes a small but # noticeable difference. def _varint(i): a = array("B") while (i & ~0x7F) != 0: a.append((i & 0x7F) | 0x80) i = i >> 7 a.append(i) return array_tobytes(a) _varint_cache_size = 512 _varint_cache = [] for i in xrange(0, _varint_cache_size): _varint_cache.append(_varint(i)) _varint_cache = tuple(_varint_cache) def varint(i): """Encodes the given integer into a string of the minimum number of bytes. """ if i < len(_varint_cache): return _varint_cache[i] return _varint(i) def varint_to_int(vi): b = ord(vi[0]) p = 1 i = b & 0x7f shift = 7 while b & 0x80 != 0: b = ord(vi[p]) p += 1 i |= (b & 0x7F) << shift shift += 7 return i def signed_varint(i): """Zig-zag encodes a signed integer into a varint. """ if i >= 0: return varint(i << 1) return varint((i << 1) ^ (~0)) def decode_signed_varint(i): """Zig-zag decodes an integer value. """ if not i & 1: return i >> 1 return (i >> 1) ^ (~0) def read_varint(readfn): """ Reads a variable-length encoded integer. :param readfn: a callable that reads a given number of bytes, like file.read(). """ b = ord(readfn(1)) i = b & 0x7F shift = 7 while b & 0x80 != 0: b = ord(readfn(1)) i |= (b & 0x7F) << shift shift += 7 return i
unknown
codeparrot/codeparrot-clean
""" soap2_wrapper.py A wrapper script for SOAP2 Copyright Peter Li peter@gigasciencejournal.com """ import sys, optparse, os, tempfile, shutil, subprocess def stop_err(msg): sys.stderr.write('%s\n' % msg) sys.exit() def cleanup_before_exit(tmp_dir): if tmp_dir and os.path.exists(tmp_dir): shutil.rmtree(tmp_dir) def __main__(): # Parse command line parser = optparse.OptionParser() # Generic input params parser.add_option("", "--ref", dest="ref") parser.add_option("", "--analysis_settings_type", dest="analysis_settings_type") parser.add_option("", "--default_full_settings_type", dest="default_full_settings_type") # Single-end params parser.add_option("-a", "--forward_set", dest="forward_set", help="Forward set of reads") # Paired-end params parser.add_option("-b", "--reverse_set", dest="reverse_set") parser.add_option("-m", "--min_insert_size", dest="min_insert_size") parser.add_option("-x", "--max_insert_size", dest="max_insert_size") # Custom params parser.add_option("-n", "--filter", dest="filter") parser.add_option("-t", "--read_id", dest="read_id") parser.add_option("-r", "--report_repeats", dest="report_repeats") parser.add_option("-R", "--long_insert_align", dest="long_insert_align") parser.add_option("-l", "--high_error_rate", dest="high_error_rate") parser.add_option("-v", "--allow_all_mismatches", dest="allow_all_mismatches") parser.add_option("-M", "--match_mode", dest="match_mode") parser.add_option("-p", "--num_threads", dest="num_threads") # Outputs parser.add_option("-o", "--alignment_out", dest="alignment_out") parser.add_option("-2", "--unpaired_alignment_out", dest="unpaired_alignment_out") opts, args = parser.parse_args() # Create temp directory tmp_dir = tempfile.mkdtemp(prefix="tmp-soap2-") # Get reference index directory ref_index_filename = opts.ref ref_index_filename += ".index" # Set up command line call if opts.analysis_settings_type == "single" and opts.default_full_settings_type == "default": cmd = "soap -a %s -D " % opts.forward_set + ref_index_filename + " -o %s" % (opts.alignment_out) elif opts.analysis_settings_type == "paired" and opts.default_full_settings_type == "default": cmd = "soap -a %s -b %s -D " % (opts.forward_set, opts.reverse_set) + ref_index_filename + " -o %s -2 %s -m %s -x %s" % (opts.alignment_out, opts.unpaired_alignment_out, opts.min_insert_size, opts.max_insert_size) elif opts.analysis_settings_type == "single" and opts.default_full_settings_type == "full": cmd = "soap -a %s -D " % opts.forward_set + ref_index_filename + " -o %s -n %s -t %s -r %s -v %s -M %s -p %s" % (opts.alignment_out, opts.filter, opts.read_id, opts.report_repeats, opts.allow_all_mismatches, opts.match_mode, opts.num_threads) elif opts.analysis_settings_type == "paired" and opts.default_full_settings_type == "full": cmd = "soap -a %s -b %s -D " % (opts.forward_set, opts.reverse_set) + ref_index_filename + " -o %s -2 %s -m %s -x %s -n %s -t %s -r %s -v %s -M %s -p %s" % (opts.alignment_out, opts.unpaired_alignment_out, opts.min_insert_size, opts.max_insert_size, opts.filter, opts.read_id, opts.report_repeats, opts.allow_all_mismatches, opts.match_mode, opts.num_threads) # Run try: # Stdout from SOAP2 is being written into this file! tmp_err_file = tempfile.NamedTemporaryFile(dir=tmp_dir).name tmp_stderr = open(tmp_err_file, 'w') # Perform SOAP2 call proc = subprocess.Popen(args=cmd, shell=True, cwd=tmp_dir, stderr=tmp_stderr.fileno()) returncode = proc.wait() # Get stderr, allowing for case where it's very large tmp_stderr = open(tmp_err_file, 'r') stderr = '' buffsize = 1048576 try: while True: stderr += tmp_stderr.read(buffsize) if not stderr or len(stderr) % buffsize != 0: break except OverflowError: pass tmp_stderr.close() if returncode != 0: raise Exception, stderr # Read tool stderr into galaxy stdout f = open(tmp_err_file) lines = f.readlines() for line in lines: sys.stdout.write(line) f.close() except Exception, e: stop_err('Error in running soap2 from (%s), %s' % (opts.alignment_out, str(e))) # Clean up temp files cleanup_before_exit(tmp_dir) # Check results in output file if os.path.getsize(opts.alignment_out) > 0: sys.stdout.write('Status complete') else: stop_err("The output is empty") if __name__ == "__main__": __main__()
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import logging from django.utils.translation import ugettext_lazy as _ # noqa from horizon import tables from openstack_dashboard.dashboards.project.networks.ports \ import tables as networks_tables from openstack_dashboard.dashboards.project.routers.ports \ import tables as routers_tables LOG = logging.getLogger(__name__) class PortsTable(tables.DataTable): name = tables.Column("name", verbose_name=_("Name"), link="horizon:admin:networks:ports:detail") fixed_ips = tables.Column(networks_tables.get_fixed_ips, verbose_name=_("Fixed IPs")) status = tables.Column("status", verbose_name=_("Status")) device_owner = tables.Column(routers_tables.get_device_owner, verbose_name=_("Type")) admin_state = tables.Column("admin_state", verbose_name=_("Admin State")) def get_object_display(self, port): return port.id class Meta: name = "interfaces" verbose_name = _("Interfaces")
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\AssetMapper; use Symfony\Component\AssetMapper\ImportMap\JavaScriptImport; /** * Represents a single asset in the asset mapper system. * * @author Ryan Weaver <ryan@symfonycasts.com> */ final class MappedAsset { public readonly string $sourcePath; public readonly string $publicPath; public readonly string $publicPathWithoutDigest; public readonly string $publicExtension; /** * The final content of this asset if different from the sourcePath. * * If null, the content should be read from the sourcePath. */ public readonly ?string $content; public readonly string $digest; public readonly bool $isPredigested; /** * @param MappedAsset[] $dependencies assets that the content of this asset depends on * @param string[] $fileDependencies files that the content of this asset depends on * @param JavaScriptImport[] $javaScriptImports */ public function __construct( public readonly string $logicalPath, ?string $sourcePath = null, ?string $publicPathWithoutDigest = null, ?string $publicPath = null, ?string $content = null, ?string $digest = null, ?bool $isPredigested = null, public readonly bool $isVendor = false, private array $dependencies = [], private array $fileDependencies = [], private array $javaScriptImports = [], ) { if (null !== $sourcePath) { $this->sourcePath = $sourcePath; } if (null !== $publicPath) { $this->publicPath = $publicPath; } if (null !== $publicPathWithoutDigest) { $this->publicPathWithoutDigest = $publicPathWithoutDigest; $this->publicExtension = pathinfo($publicPathWithoutDigest, \PATHINFO_EXTENSION); } $this->content = $content; if (null !== $digest) { $this->digest = $digest; } if (null !== $isPredigested) { $this->isPredigested = $isPredigested; } } /** * Assets that the content of this asset depends on - for internal caching. * * @return MappedAsset[] */ public function getDependencies(): array { return $this->dependencies; } public function addDependency(self $asset): void { $this->dependencies[] = $asset; } /** * @return string[] */ public function getFileDependencies(): array { return $this->fileDependencies; } public function addFileDependency(string $sourcePath): void { $this->fileDependencies[] = $sourcePath; } /** * @return JavaScriptImport[] */ public function getJavaScriptImports(): array { return $this->javaScriptImports; } public function addJavaScriptImport(JavaScriptImport $import): void { $this->javaScriptImports[] = $import; } }
php
github
https://github.com/symfony/symfony
src/Symfony/Component/AssetMapper/MappedAsset.php
//! Essentials helper functions and types for application registration. //! //! # Request Extractors //! - [`Data`]: Application data item //! - [`ThinData`]: Cheap-to-clone application data item //! - [`ReqData`]: Request-local data item //! - [`Path`]: URL path parameters / dynamic segments //! - [`Query`]: URL query parameters //! - [`Header`]: Typed header //! - [`Json`]: JSON payload //! - [`Form`]: URL-encoded payload //! - [`Bytes`]: Raw payload //! //! # Responders //! - [`Json`]: JSON response //! - [`Form`]: URL-encoded response //! - [`Bytes`]: Raw bytes response //! - [`Redirect`](Redirect::to): Convenient redirect responses use std::{borrow::Cow, future::Future}; use actix_router::IntoPatterns; pub use bytes::{Buf, BufMut, Bytes, BytesMut}; pub use crate::{ config::ServiceConfig, data::Data, redirect::Redirect, request_data::ReqData, thin_data::ThinData, types::*, }; use crate::{ error::BlockingError, http::Method, service::WebService, FromRequest, Handler, Resource, Responder, Route, Scope, }; /// Creates a new resource for a specific path. /// /// Resources may have dynamic path segments. For example, a resource with the path `/a/{name}/c` /// would match all incoming requests with paths such as `/a/b/c`, `/a/1/c`, or `/a/etc/c`. /// /// A dynamic segment is specified in the form `{identifier}`, where the identifier can be used /// later in a request handler to access the matched value for that segment. This is done by looking /// up the identifier in the `Path` object returned by [`HttpRequest::match_info()`](crate::HttpRequest::match_info) method. /// /// By default, each segment matches the regular expression `[^{}/]+`. /// /// You can also specify a custom regex in the form `{identifier:regex}`: /// /// For instance, to route `GET`-requests on any route matching `/users/{userid}/{friend}` and store /// `userid` and `friend` in the exposed `Path` object: /// /// # Examples /// ``` /// use actix_web::{web, App, HttpResponse}; /// /// let app = App::new().service( /// web::resource("/users/{userid}/{friend}") /// .route(web::get().to(|| HttpResponse::Ok())) /// .route(web::head().to(|| HttpResponse::MethodNotAllowed())) /// ); /// ``` pub fn resource<T: IntoPatterns>(path: T) -> Resource { Resource::new(path) } /// Creates scope for common path prefix. /// /// Scopes collect multiple paths under a common path prefix. The scope's path can contain dynamic /// path segments. /// /// # Avoid Trailing Slashes /// Avoid using trailing slashes in the scope prefix (e.g., `web::scope("/scope/")`). It will almost /// certainly not have the expected behavior. See the [documentation on resource definitions][pat] /// to understand why this is the case and how to correctly construct scope/prefix definitions. /// /// # Examples /// In this example, three routes are set up (and will handle any method): /// - `/{project_id}/path1` /// - `/{project_id}/path2` /// - `/{project_id}/path3` /// /// # Examples /// ``` /// use actix_web::{web, App, HttpResponse}; /// /// let app = App::new().service( /// web::scope("/{project_id}") /// .service(web::resource("/path1").to(|| HttpResponse::Ok())) /// .service(web::resource("/path2").to(|| HttpResponse::Ok())) /// .service(web::resource("/path3").to(|| HttpResponse::MethodNotAllowed())) /// ); /// ``` /// /// [pat]: crate::dev::ResourceDef#prefix-resources pub fn scope(path: &str) -> Scope { Scope::new(path) } /// Creates a new un-configured route. pub fn route() -> Route { Route::new() } macro_rules! method_route { ($method_fn:ident, $method_const:ident) => { #[doc = concat!(" Creates a new route with `", stringify!($method_const), "` method guard.")] /// /// # Examples #[doc = concat!(" In this example, one `", stringify!($method_const), " /{project_id}` route is set up:")] /// ``` /// use actix_web::{web, App, HttpResponse}; /// /// let app = App::new().service( /// web::resource("/{project_id}") #[doc = concat!(" .route(web::", stringify!($method_fn), "().to(|| HttpResponse::Ok()))")] /// /// ); /// ``` pub fn $method_fn() -> Route { method(Method::$method_const) } }; } method_route!(get, GET); method_route!(post, POST); method_route!(put, PUT); method_route!(patch, PATCH); method_route!(delete, DELETE); method_route!(head, HEAD); method_route!(trace, TRACE); /// Creates a new route with specified method guard. /// /// # Examples /// In this example, one `GET /{project_id}` route is set up: /// /// ``` /// use actix_web::{web, http, App, HttpResponse}; /// /// let app = App::new().service( /// web::resource("/{project_id}") /// .route(web::method(http::Method::GET).to(|| HttpResponse::Ok())) /// ); /// ``` pub fn method(method: Method) -> Route { Route::new().method(method) } /// Creates a new any-method route with handler. /// /// ``` /// use actix_web::{web, App, HttpResponse, Responder}; /// /// async fn index() -> impl Responder { /// HttpResponse::Ok() /// } /// /// App::new().service( /// web::resource("/").route( /// web::to(index)) /// ); /// ``` pub fn to<F, Args>(handler: F) -> Route where F: Handler<Args>, Args: FromRequest + 'static, F::Output: Responder + 'static, { Route::new().to(handler) } /// Creates a raw service for a specific path. /// /// ``` /// use actix_web::{dev, web, guard, App, Error, HttpResponse}; /// /// async fn my_service(req: dev::ServiceRequest) -> Result<dev::ServiceResponse, Error> { /// Ok(req.into_response(HttpResponse::Ok().finish())) /// } /// /// let app = App::new().service( /// web::service("/users/*") /// .guard(guard::Header("content-type", "text/plain")) /// .finish(my_service) /// ); /// ``` pub fn service<T: IntoPatterns>(path: T) -> WebService { WebService::new(path) } /// Create a relative or absolute redirect. /// /// See [`Redirect`] docs for usage details. /// /// # Examples /// ``` /// use actix_web::{web, App}; /// /// let app = App::new() /// // the client will resolve this redirect to /api/to-path /// .service(web::redirect("/api/from-path", "to-path")); /// ``` pub fn redirect(from: impl Into<Cow<'static, str>>, to: impl Into<Cow<'static, str>>) -> Redirect { Redirect::new(from, to) } /// Executes blocking function on a thread pool, returns future that resolves to result of the /// function execution. pub fn block<F, R>(f: F) -> impl Future<Output = Result<R, BlockingError>> where F: FnOnce() -> R + Send + 'static, R: Send + 'static, { let fut = actix_rt::task::spawn_blocking(f); async { fut.await.map_err(|_| BlockingError) } }
rust
github
https://github.com/actix/actix-web
actix-web/src/web.rs
#!/usr/bin/env python # See LICENSE.txt for license details. # Author: # Yonggang Luo(luoyonggang@gmail.com) # Trent Mick(TrentM@ActiveState.com) r"""Find the full path to commands. which(command, path=None, verbose=0, exts=None) Return the full path to the first match of the given command on the path. whichall(command, path=None, verbose=0, exts=None) Return a list of full paths to all matches of the given command on the path. whichgen(command, path=None, verbose=0, exts=None) Return a generator which will yield full paths to all matches of the given command on the path. By default the PATH environment variable is searched (as well as, on Windows, the AppPaths key in the registry), but a specific 'path' list to search may be specified as well. On Windows, the PATHEXT environment variable is applied as appropriate. If "verbose" is true then a tuple of the form (<fullpath>, <matched-where-description>) is returned for each match. The latter element is a textual description of where the match was found. For example: from PATH element 0 from HKLM\SOFTWARE\...\perl.exe """ _cmdlnUsage = """ Show the full path of commands. Usage: which [<options>...] [<command-name>...] Options: -h, --help Print this help and exit. -V, --version Print the version info and exit. -a, --all Print *all* matching paths. -v, --verbose Print out how matches were located and show near misses on stderr. -q, --quiet Just print out matches. I.e., do not print out near misses. -p <altpath>, --path=<altpath> An alternative path (list of directories) may be specified for searching. -e <exts>, --exts=<exts> Specify a list of extensions to consider instead of the usual list (';'-separate list, Windows only). Show the full path to the program that would be run for each given command name, if any. Which, like GNU's which, returns the number of failed arguments, or -1 when no <command-name> was given. Near misses include duplicates, non-regular files and (on Un*x) files without executable access. """ __revision__ = "$Id: which.py 430 2014-08-10 03:11:58Z lygstate $" __version_info__ = (2, 0, 0) __version__ = '.'.join(map(str, __version_info__)) import os import sys import getopt import stat #---- exceptions class WhichError(Exception): pass #---- internal support stuff def _getRegisteredExecutable(exeName): """Windows allow application paths to be registered in the registry.""" registered = None if sys.platform.startswith('win'): if os.path.splitext(exeName)[1].lower() != '.exe': exeName += '.exe' import _winreg try: key = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\" +\ exeName value = _winreg.QueryValue(_winreg.HKEY_LOCAL_MACHINE, key) registered = (value, "from HKLM\\"+key) except _winreg.error: pass if registered and not os.path.exists(registered[0]): registered = None return registered def _samefile(fname1, fname2): if sys.platform.startswith('win'): return ( os.path.normpath(os.path.normcase(fname1)) ==\ os.path.normpath(os.path.normcase(fname2)) ) else: return os.path.samefile(fname1, fname2) def _cull(potential, matches, verbose=0): """Cull inappropriate matches. Possible reasons: - a duplicate of a previous match - not a disk file - not executable (non-Windows) If 'potential' is approved it is returned and added to 'matches'. Otherwise, None is returned. """ for match in matches: # don't yield duplicates if _samefile(potential[0], match[0]): if verbose: sys.stderr.write("duplicate: %s (%s)\n" % potential) return None else: if not stat.S_ISREG(os.stat(potential[0]).st_mode): if verbose: sys.stderr.write("not a regular file: %s (%s)\n" % potential) elif not os.access(potential[0], os.X_OK): if verbose: sys.stderr.write("no executable access: %s (%s)\n"\ % potential) else: matches.append(potential) return potential #---- module API def whichgen(command, path=None, verbose=0, exts=None): """Return a generator of full paths to the given command. "command" is a the name of the executable to search for. "path" is an optional alternate path list to search. The default it to use the PATH environment variable. "verbose", if true, will cause a 2-tuple to be returned for each match. The second element is a textual description of where the match was found. "exts" optionally allows one to specify a list of extensions to use instead of the standard list for this system. This can effectively be used as an optimization to, for example, avoid stat's of "foo.vbs" when searching for "foo" and you know it is not a VisualBasic script but ".vbs" is on PATHEXT. This option is only supported on Windows. This method returns a generator which yields either full paths to the given command or, if verbose, tuples of the form (<path to command>, <where path found>). """ matches = [] if path is None: usingGivenPath = 0 path = os.environ.get("PATH", "").split(os.pathsep) if sys.platform.startswith("win"): path.insert(0, os.curdir) # implied by Windows shell else: usingGivenPath = 1 # Windows has the concept of a list of extensions (PATHEXT env var). if sys.platform.startswith("win"): if exts is None: exts = os.environ.get("PATHEXT", "").split(os.pathsep) # If '.exe' is not in exts then obviously this is Win9x and # or a bogus PATHEXT, then use a reasonable default. for ext in exts: if ext.lower() == ".exe": break else: exts = ['.COM', '.EXE', '.BAT'] elif not isinstance(exts, list): raise TypeError("'exts' argument must be a list or None") else: if exts is not None: raise WhichError("'exts' argument is not supported on "\ "platform '%s'" % sys.platform) exts = [] # File name cannot have path separators because PATH lookup does not # work that way. if os.sep in command or os.altsep and os.altsep in command: pass else: for i in range(len(path)): dirName = path[i] # On windows the dirName *could* be quoted, drop the quotes if sys.platform.startswith("win") and len(dirName) >= 2\ and dirName[0] == '"' and dirName[-1] == '"': dirName = dirName[1:-1] for ext in ['']+exts: absName = os.path.abspath( os.path.normpath(os.path.join(dirName, command+ext))) if os.path.isfile(absName): if usingGivenPath: fromWhere = "from given path element %d" % i elif not sys.platform.startswith("win"): fromWhere = "from PATH element %d" % i elif i == 0: fromWhere = "from current directory" else: fromWhere = "from PATH element %d" % (i-1) match = _cull((absName, fromWhere), matches, verbose) if match: if verbose: yield match else: yield match[0] match = _getRegisteredExecutable(command) if match is not None: match = _cull(match, matches, verbose) if match: if verbose: yield match else: yield match[0] def which(command, path=None, verbose=0, exts=None): """Return the full path to the first match of the given command on the path. "command" is a the name of the executable to search for. "path" is an optional alternate path list to search. The default it to use the PATH environment variable. "verbose", if true, will cause a 2-tuple to be returned. The second element is a textual description of where the match was found. "exts" optionally allows one to specify a list of extensions to use instead of the standard list for this system. This can effectively be used as an optimization to, for example, avoid stat's of "foo.vbs" when searching for "foo" and you know it is not a VisualBasic script but ".vbs" is on PATHEXT. This option is only supported on Windows. If no match is found for the command, a WhichError is raised. """ try: match = whichgen(command, path, verbose, exts).next() except StopIteration: raise WhichError("Could not find '%s' on the path." % command) return match def whichall(command, path=None, verbose=0, exts=None): """Return a list of full paths to all matches of the given command on the path. "command" is a the name of the executable to search for. "path" is an optional alternate path list to search. The default it to use the PATH environment variable. "verbose", if true, will cause a 2-tuple to be returned for each match. The second element is a textual description of where the match was found. "exts" optionally allows one to specify a list of extensions to use instead of the standard list for this system. This can effectively be used as an optimization to, for example, avoid stat's of "foo.vbs" when searching for "foo" and you know it is not a VisualBasic script but ".vbs" is on PATHEXT. This option is only supported on Windows. """ return list( whichgen(command, path, verbose, exts) ) #---- mainline def main(argv): all = 0 verbose = 0 altpath = None exts = None try: optlist, args = getopt.getopt(argv[1:], 'haVvqp:e:', ['help', 'all', 'version', 'verbose', 'quiet', 'path=', 'exts=']) except getopt.GetoptError, msg: sys.stderr.write("which: error: %s. Your invocation was: %s\n"\ % (msg, argv)) sys.stderr.write("Try 'which --help'.\n") return 1 for opt, optarg in optlist: if opt in ('-h', '--help'): print _cmdlnUsage return 0 elif opt in ('-V', '--version'): print "which %s" % __version__ return 0 elif opt in ('-a', '--all'): all = 1 elif opt in ('-v', '--verbose'): verbose = 1 elif opt in ('-q', '--quiet'): verbose = 0 elif opt in ('-p', '--path'): if optarg: altpath = optarg.split(os.pathsep) else: altpath = [] elif opt in ('-e', '--exts'): if optarg: exts = optarg.split(os.pathsep) else: exts = [] if len(args) == 0: return -1 failures = 0 for arg in args: #print "debug: search for %r" % arg nmatches = 0 for match in whichgen(arg, path=altpath, verbose=verbose, exts=exts): if verbose: print "%s (%s)" % match else: print match nmatches += 1 if not all: break if not nmatches: failures += 1 return failures if __name__ == "__main__": sys.exit( main(sys.argv) )
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2023 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. PLATFORM=darwin-arm64 ./build/teamcity/internal/release/process/make-and-publish-build-artifacts-per-platform.sh
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity/internal/release/process/make-and-publish-build-artifacts-darwin-arm64.sh
--- navigation_title: "Release notes" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/8.18/es-connectors-release-notes.html --- # Connector release notes :::{admonition} Enterprise Search is discontinued in Elastic 9.0.0 Please note that Enterprise Search is not available in Elastic 9.0+, including App Search, Workplace Search, the Elastic Web Crawler, and Elastic managed connectors. If you are an Enterprise Search user and want to upgrade to Elastic 9.0, refer to [our Enterprise Search FAQ](https://www.elastic.co/resources/search/enterprise-search-faq#what-features-are-impacted-by-this-announcement). It includes detailed steps, tooling, and resources to help you transition to supported alternatives in 9.x, such as Elasticsearch, the Open Web Crawler, and self-managed connectors. ::: ## 9.3.0 [connectors-9.3.0-release-notes] ### Fixes [connectors-9.3.0-fixes] * Fixed a bug in the Network Drive connector that caused connections to SMB servers to close prematurely, leading to errors when multiple connections were made to the same host. [#3868](https://github.com/elastic/connectors/pull/3868), [#3873](https://github.com/elastic/connectors/pull/3873) * Fixed a serialization error in the PostgreSQL connector when handling `INET`, `CIDR`, `UUID`, and geometric types.[#3900](https://github.com/elastic/connectors/pull/3900), [#3879](https://github.com/elastic/connectors/issues/3879) ### Features and enhancements [connectors-9.3.0-features-enhancements] * Added a new GitLab connector to sync Projects, Issues, Epics, Merge Requests, Releases, and README files. [#3770](https://github.com/elastic/connectors/pull/3770) [#11093](https://github.com/elastic/search-team/issues/11093) ## 9.2.5 [connectors-9.2.5-release-notes] ### Fixes [connectors-9.2.5-fixes] * Fixed a serialization error in the PostgreSQL connector when handling `INET`, `CIDR`, `UUID`, and geometric types. [#3900](https://github.com/elastic/connectors/pull/3900), [#3879](https://github.com/elastic/connectors/issues/3879) ## 9.2.4 [connectors-9.2.4-release-notes] There are no new features, enhancements, fixes, known issues, or deprecations associated with this release. ## 9.2.3 [connectors-9.2.3-release-notes] ### Fixes [connectors-9.2.3-fixes] * Fixed a bug in the Network Drive connector that caused connections to SMB servers to close prematurely, leading to errors when multiple connections were made to the same host. [#3868](https://github.com/elastic/connectors/pull/3868), [#3873](https://github.com/elastic/connectors/pull/3873) ## 9.2.2 [connectors-9.2.2-release-notes] There are no new features, enhancements, fixes, known issues, or deprecations associated with this release. ## 9.2.1 [connectors-9.2.1-release-notes] There are no new features, enhancements, fixes, known issues, or deprecations associated with this release. ## 9.2.0 [connectors-9.2.0-release-notes] ### Features and enhancements [connectors-9.2.0-features-enhancements] * Refactored pagination from OFFSET-based to keyset (primary-key) pagination in the MySQL connector. This delivers 3×+ faster syncs on large tables and modest gains on smaller ones. [#3719](https://github.com/elastic/connectors/pull/3719). * Updated the Jira connector to use the new `/rest/api/3/search/jql` endpoint, ensuring compatibility with Jira’s latest API. [#3710](https://github.com/elastic/connectors/pull/3710). ## 9.1.10 [connectors-9.1.10-release-notes] There are no new features, enhancements, fixes, known issues, or deprecations associated with this release. ## 9.1.9 [connectors-9.1.9-release-notes] ### Fixes [connectors-9.1.9-fixes] * Fixed a bug in the Network Drive connector that caused connections to SMB servers to close prematurely, leading to errors when multiple connections were made to the same host. [#3868](https://github.com/elastic/connectors/pull/3868), [#3873](https://github.com/elastic/connectors/pull/3873) ## 9.1.8 [connectors-9.1.8-release-notes] There are no new features, enhancements, fixes, known issues, or deprecations associated with this release. ## 9.1.7 [connectors-9.1.7-release-notes] There are no new features, enhancements, fixes, known issues, or deprecations associated with this release. ## 9.1.6 [connectors-9.1.6-release-notes] ### Features and enhancements [connectors-9.1.6-features-enhancements] * Idle Github connectors no longer excessively query set-up repositories, which reduces the number of calls to GitHub each connector makes and makes users less likely to hit GitHub API quotas. [#3708](https://github.com/elastic/connectors/pull/3708) * In the Sharepoint Online connector, /contentstorage/ URLs are no longer synced. [#3630](https://github.com/elastic/connectors/pull/3630) ## 9.1.5 [connectors-9.1.5-release-notes] ### Features and enhancements [connectors-9.1.5-features-enhancements] * Refactored pagination from OFFSET-based to keyset (primary-key) pagination in the MySQL connector. This delivers 3×+ faster syncs on large tables and modest gains on smaller ones. [#3719](https://github.com/elastic/connectors/pull/3719). * Updated the Jira connector to use the new `/rest/api/3/search/jql` endpoint, ensuring compatibility with Jira’s latest API. [#3710](https://github.com/elastic/connectors/pull/3710). ## 9.1.4 [connectors-9.1.4-release-notes] ### Features and enhancements [connectors-9.1.4-features-enhancements] * Reduced API calls during field validation with caching, improving sync performance in Salesforce connector. [#3668](https://github.com/elastic/connectors/pull/3668). ## 9.1.3 [connectors-9.1.3-release-notes] There are no new features, enhancements, fixes, known issues, or deprecations associated with this release. ## 9.1.2 [connectors-9.1.2-release-notes] There are no new features, enhancements, fixes, known issues, or deprecations associated with this release. ## 9.1.1 [connectors-9.1.1-release-notes] ### Fixes [connectors-9.1.1-fixes] :::{dropdown} Resolves missing access control for “Everyone Except External Users” in SharePoint connector Permissions granted to the `Everyone Except External Users` group were previously ignored, causing incomplete access control metadata in documents. This occurred because the connector did not recognize the group’s login name format. [#3577](https://github.com/elastic/connectors/pull/3577) resolves this issue by recognizing the group’s login format and correctly applying its permissions to document access control metadata. ::: ## 9.1.0 [connectors-9.1.0-release-notes] There are no new features, enhancements, fixes, known issues, or deprecations associated with this release. ## 9.0.8 [connectors-9.0.8-release-notes] ### Features and enhancements [connectors-9.0.8-features-enhancements] * Refactored pagination from OFFSET-based to keyset (primary-key) pagination in the MySQL connector. This delivers 3×+ faster syncs on large tables and modest gains on smaller ones. [#3719](https://github.com/elastic/connectors/pull/3719). * Updated the Jira connector to use the new `/rest/api/3/search/jql` endpoint, ensuring compatibility with Jira’s latest API. [#3710](https://github.com/elastic/connectors/pull/3710). ## 9.0.7 [connectors-9.0.7-release-notes] ### Features and enhancements [connectors-9.0.7-features-enhancements] * Reduced API calls during field validation with caching, improving sync performance in Salesforce connector. [#3668](https://github.com/elastic/connectors/pull/3668). ## 9.0.6 [connectors-9.0.6-release-notes] No changes since 9.0.5 ## 9.0.5 [connectors-9.0.5-release-notes] ### Fixes [connectors-9.0.5-fixes] :::{dropdown} Resolves missing access control for `Everyone Except External Users` in SharePoint connector Permissions granted to the `Everyone Except External Users` group were previously ignored, causing incomplete access control metadata in documents. This occurred because the connector did not recognize the group’s login name format. [#3577](https://github.com/elastic/connectors/pull/3577) resolves this issue by recognizing the group’s login format and correctly applying its permissions to document access control metadata. ::: ## 9.0.4 [connectors-9.0.4-release-notes] No changes since 9.0.3 ## 9.0.3 [connectors-9.0.3-release-notes] ### Features and enhancements [connectors-9.0.3-features-enhancements] Improve UUID handling by correctly parsing type 4 UUIDs and skipping unsupported type 3 with a warning. See [#3459](https://github.com/elastic/connectors/pull/3459). ## 9.0.2 [connectors-9.0.2-release-notes] No changes since 9.0.1 ## 9.0.1 [connectors-9.0.1-release-notes] No changes since 9.0.0 ## 9.0.0 [connectors-9.0.0-release-notes] ### Features and enhancements [connectors-9.0.0-features-enhancements] * Switched the default ingestion pipeline from `ent-search-generic-ingestion` to `search-default-ingestion`. The pipelines are functionally identical; only the name has changed to align with the deprecation of Enterprise Search. [#3049](https://github.com/elastic/connectors/pull/3049) * Removed opinionated index mappings and settings from Connectors. Going forward, indices will use Elastic’s default mappings and settings, rather than legacy App Search–optimized ones. To retain the previous behavior, create the index manually before pointing a connector to it. [#3013](https://github.com/elastic/connectors/pull/3013) ### Fixes [connectors-9.0.0-fixes] * Fixed an issue where full syncs could delete newly ingested documents if the document ID from the third-party source was numeric. [#3031](https://github.com/elastic/connectors/pull/3031) * Fixed a bug where the Confluence connector failed to download some blog post documents due to unexpected response formats. [#2984](https://github.com/elastic/connectors/pull/2984) * Fixed a bug in the Outlook connector where deactivated users could cause syncs to fail. [#2967](https://github.com/elastic/connectors/pull/2967) * Resolved an issue where Network Drive connectors had trouble connecting to SMB 3.1.1 shares. [#2852](https://github.com/elastic/connectors/pull/2852) % ## Breaking changes [connectors-9.0.0-breaking-changes] % ## Deprications [connectorsch-9.0.0-deprecations] % ## Known issues [connectors-9.0.0-known-issues]
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/search-connectors/release-notes.md
"""feather-format compat""" from __future__ import annotations from typing import ( TYPE_CHECKING, Any, ) import warnings import numpy as np from pandas._config import using_string_dtype from pandas._libs import lib from pandas.compat._optional import import_optional_dependency from pandas.errors import Pandas4Warning from pandas.util._decorators import set_module from pandas.util._validators import check_dtype_backend from pandas.core.api import DataFrame from pandas.core.arrays.string_ import StringDtype from pandas.io._util import arrow_table_to_pandas from pandas.io.common import get_handle if TYPE_CHECKING: from collections.abc import ( Hashable, Sequence, ) from pandas._typing import ( DtypeBackend, FilePath, ReadBuffer, StorageOptions, WriteBuffer, ) def to_feather( df: DataFrame, path: FilePath | WriteBuffer[bytes], storage_options: StorageOptions | None = None, **kwargs: Any, ) -> None: """ Write a DataFrame to the binary Feather format. Parameters ---------- df : DataFrame path : str, path object, or file-like object storage_options : dict, optional Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc. For HTTP(S) URLs the key-value pairs are forwarded to ``urllib.request.Request`` as header options. For other URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more details, and for more examples on storage options refer `here <https://pandas.pydata.org/docs/user_guide/io.html? highlight=storage_options#reading-writing-remote-files>`_. **kwargs : Additional keywords passed to `pyarrow.feather.write_feather`. """ import_optional_dependency("pyarrow") from pyarrow import feather if not isinstance(df, DataFrame): raise ValueError("feather only support IO with DataFrames") with get_handle( path, "wb", storage_options=storage_options, is_text=False ) as handles: feather.write_feather(df, handles.handle, **kwargs) @set_module("pandas") def read_feather( path: FilePath | ReadBuffer[bytes], columns: Sequence[Hashable] | None = None, use_threads: bool = True, storage_options: StorageOptions | None = None, dtype_backend: DtypeBackend | lib.NoDefault = lib.no_default, ) -> DataFrame: """ Load a feather-format object from the file path. Feather is particularly useful for scenarios that require efficient serialization and deserialization of tabular data. It supports schema preservation, making it a reliable choice for use cases such as sharing data between Python and R, or persisting intermediate results during data processing pipelines. This method provides additional flexibility with options for selective column reading, thread parallelism, and choosing the backend for data types. Parameters ---------- path : str, path object, or file-like object String, path object (implementing ``os.PathLike[str]``), or file-like object implementing a binary ``read()`` function. The string could be a URL. Valid URL schemes include http, ftp, s3, gs and file. For file URLs, a host is expected. A local file could be: ``file://localhost/path/to/table.feather``. columns : sequence, default None If not provided, all columns are read. use_threads : bool, default True Whether to parallelize reading using multiple threads. storage_options : dict, optional Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc. For HTTP(S) URLs the key-value pairs are forwarded to ``urllib.request.Request`` as header options. For other URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more details, and for more examples on storage options refer `here <https://pandas.pydata.org/docs/user_guide/io.html? highlight=storage_options#reading-writing-remote-files>`_. dtype_backend : {{'numpy_nullable', 'pyarrow'}} Back-end data type applied to the resultant :class:`DataFrame` (still experimental). If not specified, the default behavior is to not use nullable data types. If specified, the behavior is as follows: * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`. * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` :class:`DataFrame` .. versionadded:: 2.0 Returns ------- type of object stored in file DataFrame object stored in the file. See Also -------- read_csv : Read a comma-separated values (csv) file into a pandas DataFrame. read_excel : Read an Excel file into a pandas DataFrame. read_spss : Read an SPSS file into a pandas DataFrame. read_orc : Load an ORC object into a pandas DataFrame. read_sas : Read SAS file into a pandas DataFrame. Examples -------- >>> df = pd.read_feather("path/to/file.feather") # doctest: +SKIP """ import_optional_dependency("pyarrow") from pyarrow import feather # import utils to register the pyarrow extension types import pandas.core.arrays.arrow.extension_types # pyright: ignore[reportUnusedImport] # noqa: F401 check_dtype_backend(dtype_backend) with get_handle( path, "rb", storage_options=storage_options, is_text=False ) as handles: if dtype_backend is lib.no_default and not using_string_dtype(): with warnings.catch_warnings(): warnings.filterwarnings( "ignore", "make_block is deprecated", Pandas4Warning, ) df = feather.read_feather( handles.handle, columns=columns, use_threads=bool(use_threads) ) # Convert any StringDtype columns to object dtype (pyarrow always # uses string dtype even when the infer_string option is False) for col, dtype in zip(df.columns, df.dtypes, strict=True): if isinstance(dtype, StringDtype) and dtype.na_value is np.nan: df[col] = df[col].astype("object") return df pa_table = feather.read_table( handles.handle, columns=columns, use_threads=bool(use_threads) ) return arrow_table_to_pandas(pa_table, dtype_backend=dtype_backend)
python
github
https://github.com/pandas-dev/pandas
pandas/io/feather_format.py
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.aop.support; import java.lang.reflect.Method; import org.jspecify.annotations.Nullable; import org.junit.jupiter.api.Test; import org.springframework.aop.ClassFilter; import org.springframework.aop.Pointcut; import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; /** * @author Rod Johnson * @author Chris Beams */ class PointcutsTests { public static Method TEST_BEAN_SET_AGE; public static Method TEST_BEAN_GET_AGE; public static Method TEST_BEAN_GET_NAME; public static Method TEST_BEAN_ABSQUATULATE; static { try { TEST_BEAN_SET_AGE = TestBean.class.getMethod("setAge", int.class); TEST_BEAN_GET_AGE = TestBean.class.getMethod("getAge"); TEST_BEAN_GET_NAME = TestBean.class.getMethod("getName"); TEST_BEAN_ABSQUATULATE = TestBean.class.getMethod("absquatulate"); } catch (Exception ex) { throw new RuntimeException("Shouldn't happen: error in test suite"); } } /** * Matches only TestBean class, not subclasses */ public static Pointcut allTestBeanMethodsPointcut = new StaticMethodMatcherPointcut() { @Override public ClassFilter getClassFilter() { return type -> type.equals(TestBean.class); } @Override public boolean matches(Method m, @Nullable Class<?> targetClass) { return true; } }; public static Pointcut allClassSetterPointcut = Pointcuts.SETTERS; // Subclass used for matching public static class MyTestBean extends TestBean { } public static Pointcut myTestBeanSetterPointcut = new StaticMethodMatcherPointcut() { @Override public ClassFilter getClassFilter() { return new RootClassFilter(MyTestBean.class); } @Override public boolean matches(Method m, @Nullable Class<?> targetClass) { return m.getName().startsWith("set"); } }; // Will match MyTestBeanSubclass public static Pointcut myTestBeanGetterPointcut = new StaticMethodMatcherPointcut() { @Override public ClassFilter getClassFilter() { return new RootClassFilter(MyTestBean.class); } @Override public boolean matches(Method m, @Nullable Class<?> targetClass) { return m.getName().startsWith("get"); } }; // Still more specific class public static class MyTestBeanSubclass extends MyTestBean { } public static Pointcut myTestBeanSubclassGetterPointcut = new StaticMethodMatcherPointcut() { @Override public ClassFilter getClassFilter() { return new RootClassFilter(MyTestBeanSubclass.class); } @Override public boolean matches(Method m, @Nullable Class<?> targetClass) { return m.getName().startsWith("get"); } }; public static Pointcut allClassGetterPointcut = Pointcuts.GETTERS; public static Pointcut allClassGetAgePointcut = new NameMatchMethodPointcut().addMethodName("getAge"); public static Pointcut allClassGetNamePointcut = new NameMatchMethodPointcut().addMethodName("getName"); @Test void testTrue() { assertThat(Pointcuts.matches(Pointcut.TRUE, TEST_BEAN_SET_AGE, TestBean.class, 6)).isTrue(); assertThat(Pointcuts.matches(Pointcut.TRUE, TEST_BEAN_GET_AGE, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(Pointcut.TRUE, TEST_BEAN_ABSQUATULATE, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(Pointcut.TRUE, TEST_BEAN_SET_AGE, TestBean.class, 6)).isTrue(); assertThat(Pointcuts.matches(Pointcut.TRUE, TEST_BEAN_GET_AGE, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(Pointcut.TRUE, TEST_BEAN_ABSQUATULATE, TestBean.class)).isTrue(); } @Test void testMatches() { assertThat(Pointcuts.matches(allClassSetterPointcut, TEST_BEAN_SET_AGE, TestBean.class, 6)).isTrue(); assertThat(Pointcuts.matches(allClassSetterPointcut, TEST_BEAN_GET_AGE, TestBean.class)).isFalse(); assertThat(Pointcuts.matches(allClassSetterPointcut, TEST_BEAN_ABSQUATULATE, TestBean.class)).isFalse(); assertThat(Pointcuts.matches(allClassGetterPointcut, TEST_BEAN_SET_AGE, TestBean.class, 6)).isFalse(); assertThat(Pointcuts.matches(allClassGetterPointcut, TEST_BEAN_GET_AGE, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(allClassGetterPointcut, TEST_BEAN_ABSQUATULATE, TestBean.class)).isFalse(); } /** * Should match all setters and getters on any class */ @Test void testUnionOfSettersAndGetters() { Pointcut union = Pointcuts.union(allClassGetterPointcut, allClassSetterPointcut); assertThat(Pointcuts.matches(union, TEST_BEAN_SET_AGE, TestBean.class, 6)).isTrue(); assertThat(Pointcuts.matches(union, TEST_BEAN_GET_AGE, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(union, TEST_BEAN_ABSQUATULATE, TestBean.class)).isFalse(); } @Test void testUnionOfSpecificGetters() { Pointcut union = Pointcuts.union(allClassGetAgePointcut, allClassGetNamePointcut); assertThat(Pointcuts.matches(union, TEST_BEAN_SET_AGE, TestBean.class, 6)).isFalse(); assertThat(Pointcuts.matches(union, TEST_BEAN_GET_AGE, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(allClassGetAgePointcut, TEST_BEAN_GET_NAME, TestBean.class)).isFalse(); assertThat(Pointcuts.matches(union, TEST_BEAN_GET_NAME, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(union, TEST_BEAN_ABSQUATULATE, TestBean.class)).isFalse(); // Union with all setters union = Pointcuts.union(union, allClassSetterPointcut); assertThat(Pointcuts.matches(union, TEST_BEAN_SET_AGE, TestBean.class, 6)).isTrue(); assertThat(Pointcuts.matches(union, TEST_BEAN_GET_AGE, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(allClassGetAgePointcut, TEST_BEAN_GET_NAME, TestBean.class)).isFalse(); assertThat(Pointcuts.matches(union, TEST_BEAN_GET_NAME, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(union, TEST_BEAN_ABSQUATULATE, TestBean.class)).isFalse(); assertThat(Pointcuts.matches(union, TEST_BEAN_SET_AGE, TestBean.class, 6)).isTrue(); } /** * Tests vertical composition. First pointcut matches all setters. * Second one matches all getters in the MyTestBean class. TestBean getters shouldn't pass. */ @Test void testUnionOfAllSettersAndSubclassSetters() { assertThat(Pointcuts.matches(myTestBeanSetterPointcut, TEST_BEAN_SET_AGE, TestBean.class, 6)).isFalse(); assertThat(Pointcuts.matches(myTestBeanSetterPointcut, TEST_BEAN_SET_AGE, MyTestBean.class, 6)).isTrue(); assertThat(Pointcuts.matches(myTestBeanSetterPointcut, TEST_BEAN_GET_AGE, TestBean.class)).isFalse(); Pointcut union = Pointcuts.union(myTestBeanSetterPointcut, allClassGetterPointcut); assertThat(Pointcuts.matches(union, TEST_BEAN_GET_AGE, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(union, TEST_BEAN_GET_AGE, MyTestBean.class)).isTrue(); // Still doesn't match superclass setter assertThat(Pointcuts.matches(union, TEST_BEAN_SET_AGE, MyTestBean.class, 6)).isTrue(); assertThat(Pointcuts.matches(union, TEST_BEAN_SET_AGE, TestBean.class, 6)).isFalse(); } /** * Intersection should be MyTestBean getAge() only: * it's the union of allClassGetAge and subclass getters */ @Test void testIntersectionOfSpecificGettersAndSubclassGetters() { assertThat(Pointcuts.matches(allClassGetAgePointcut, TEST_BEAN_GET_AGE, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(allClassGetAgePointcut, TEST_BEAN_GET_AGE, MyTestBean.class)).isTrue(); assertThat(Pointcuts.matches(myTestBeanGetterPointcut, TEST_BEAN_GET_NAME, TestBean.class)).isFalse(); assertThat(Pointcuts.matches(myTestBeanGetterPointcut, TEST_BEAN_GET_AGE, TestBean.class)).isFalse(); assertThat(Pointcuts.matches(myTestBeanGetterPointcut, TEST_BEAN_GET_NAME, MyTestBean.class)).isTrue(); assertThat(Pointcuts.matches(myTestBeanGetterPointcut, TEST_BEAN_GET_AGE, MyTestBean.class)).isTrue(); Pointcut intersection = Pointcuts.intersection(allClassGetAgePointcut, myTestBeanGetterPointcut); assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_NAME, TestBean.class)).isFalse(); assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_AGE, TestBean.class)).isFalse(); assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_NAME, MyTestBean.class)).isFalse(); assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_AGE, MyTestBean.class)).isTrue(); // Matches subclass of MyTestBean assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_NAME, MyTestBeanSubclass.class)).isFalse(); assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_AGE, MyTestBeanSubclass.class)).isTrue(); // Now intersection with MyTestBeanSubclass getters should eliminate MyTestBean target intersection = Pointcuts.intersection(intersection, myTestBeanSubclassGetterPointcut); assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_NAME, TestBean.class)).isFalse(); assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_AGE, TestBean.class)).isFalse(); assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_NAME, MyTestBean.class)).isFalse(); assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_AGE, MyTestBean.class)).isFalse(); // Still matches subclass of MyTestBean assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_NAME, MyTestBeanSubclass.class)).isFalse(); assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_AGE, MyTestBeanSubclass.class)).isTrue(); // Now union with all TestBean methods Pointcut union = Pointcuts.union(intersection, allTestBeanMethodsPointcut); assertThat(Pointcuts.matches(union, TEST_BEAN_GET_NAME, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(union, TEST_BEAN_GET_AGE, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(union, TEST_BEAN_GET_NAME, MyTestBean.class)).isFalse(); assertThat(Pointcuts.matches(union, TEST_BEAN_GET_AGE, MyTestBean.class)).isFalse(); // Still matches subclass of MyTestBean assertThat(Pointcuts.matches(union, TEST_BEAN_GET_NAME, MyTestBeanSubclass.class)).isFalse(); assertThat(Pointcuts.matches(union, TEST_BEAN_GET_AGE, MyTestBeanSubclass.class)).isTrue(); assertThat(Pointcuts.matches(union, TEST_BEAN_ABSQUATULATE, TestBean.class)).isTrue(); assertThat(Pointcuts.matches(union, TEST_BEAN_ABSQUATULATE, MyTestBean.class)).isFalse(); } /** * The intersection of these two pointcuts leaves nothing. */ @Test void testSimpleIntersection() { Pointcut intersection = Pointcuts.intersection(allClassGetterPointcut, allClassSetterPointcut); assertThat(Pointcuts.matches(intersection, TEST_BEAN_SET_AGE, TestBean.class, 6)).isFalse(); assertThat(Pointcuts.matches(intersection, TEST_BEAN_GET_AGE, TestBean.class)).isFalse(); assertThat(Pointcuts.matches(intersection, TEST_BEAN_ABSQUATULATE, TestBean.class)).isFalse(); } }
java
github
https://github.com/spring-projects/spring-framework
spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java
#! /usr/bin/env python # -*- coding: UTF-8 -*- import os import sys import setuptools try: # work-around to avoid "setup.py test" error # see: http://bugs.python.org/issue15881#msg170215 import multiprocessing assert multiprocessing except ImportError: pass py_version = sys.version_info with open(os.path.join(os.getcwd(), 'asynx_core/version.txt')) as fp: VERSION = fp.read().strip() def strip_comments(l): return l.split('#', 1)[0].strip() def reqs(*filename): requires = set([]) for fname in filename: with open(os.path.join(os.getcwd(), fname)) as fp: requires |= set(filter(None, [strip_comments(l) for l in fp.readlines()])) return list(requires) if py_version[0:2] == (2, 6): install_requires = reqs('requirements.txt', 'py26-requirements.txt') else: install_requires = reqs('requirements.txt') setup_params = dict( name="asynx-core", version=VERSION, url="https://github.com/guokr/asynx", author='Guokr', author_email="bug@guokr.com", description=('Core of the open source, distributed, and ' 'web / HTTP oriented taskqueue & scheduler service ' 'inspired by Google App Engine'), packages=['asynx_core'], install_requires=install_requires, tests_require=reqs('test-requirements.txt'), include_package_data=True, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Topic :: Software Development :: Libraries :: Python Modules'], test_suite="nose.collector", zip_safe=True) if __name__ == '__main__': setuptools.setup(**setup_params)
unknown
codeparrot/codeparrot-clean
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, at * your election, the "Elastic License 2.0", the "GNU Affero General Public * License v3.0 only", or the "Server Side Public License, v 1". */ package org.elasticsearch.server.cli; import java.util.List; /** * A {@link SystemMemoryInfo} implementation that reduces the reported available system memory by a set amount. This is intended to account * for overhead cost of other bundled Elasticsearch processes, such as the CLI tool launcher. By default, this is * {@link org.elasticsearch.server.cli.OverheadSystemMemoryInfo#SERVER_CLI_OVERHEAD } but can be overridden via the * {@code es.total_memory_overhead_bytes} system property. */ public class OverheadSystemMemoryInfo extends JvmArgumentParsingSystemMemoryInfo { static final long SERVER_CLI_OVERHEAD = 100 * 1024L * 1024L; private final SystemMemoryInfo delegate; public OverheadSystemMemoryInfo(List<String> userDefinedJvmOptions, SystemMemoryInfo delegate) { super(userDefinedJvmOptions); this.delegate = delegate; } @Override public long availableSystemMemory() { long overheadBytes = getBytesFromSystemProperty("es.total_memory_overhead_bytes", SERVER_CLI_OVERHEAD); return delegate.availableSystemMemory() - overheadBytes; } }
java
github
https://github.com/elastic/elasticsearch
distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/OverheadSystemMemoryInfo.java
[ { "@level": "info", "@message": "tfcoremock_nested_list.nested_list: Plan to update", "@module": "terraform.ui", "change": { "action": "update", "resource": { "addr": "tfcoremock_nested_list.nested_list", "implied_provider": "tfcoremock", "module": "", "resource": "tfcoremock_nested_list.nested_list", "resource_key": null, "resource_name": "nested_list", "resource_type": "tfcoremock_nested_list" } }, "type": "planned_change" }, { "@level": "info", "@message": "tfcoremock_nested_list.nested_list: Modifying... [id=DA051126-BAD6-4EB2-92E5-F0250DAF0B92]", "@module": "terraform.ui", "hook": { "action": "update", "id_key": "id", "id_value": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92", "resource": { "addr": "tfcoremock_nested_list.nested_list", "implied_provider": "tfcoremock", "module": "", "resource": "tfcoremock_nested_list.nested_list", "resource_key": null, "resource_name": "nested_list", "resource_type": "tfcoremock_nested_list" } }, "type": "apply_start" }, { "@level": "info", "@module": "terraform.ui", "hook": { "action": "update", "id_key": "id", "id_value": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92", "resource": { "addr": "tfcoremock_nested_list.nested_list", "implied_provider": "tfcoremock", "module": "", "resource": "tfcoremock_nested_list.nested_list", "resource_key": null, "resource_name": "nested_list", "resource_type": "tfcoremock_nested_list" } }, "type": "apply_complete" }, { "@level": "info", "@message": "Apply complete! Resources: 0 added, 1 changed, 0 destroyed.", "@module": "terraform.ui", "changes": { "action_invocation": 0, "add": 0, "change": 1, "import": 0, "operation": "apply", "remove": 0 }, "type": "change_summary" }, { "@level": "info", "@message": "Outputs: 0", "@module": "terraform.ui", "outputs": {}, "type": "outputs" } ]
json
github
https://github.com/hashicorp/terraform
testing/equivalence-tests/outputs/nested_list_update/apply.json
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/mtd/mediatek,nand-ecc-engine.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: MediaTek(MTK) SoCs NAND ECC engine maintainers: - Xiangsheng Hou <xiangsheng.hou@mediatek.com> description: | MTK NAND ECC engine can cowork with MTK raw NAND and SPI NAND controller. properties: compatible: enum: - mediatek,mt2701-ecc - mediatek,mt2712-ecc - mediatek,mt7622-ecc - mediatek,mt7986-ecc reg: items: - description: Base physical address and size of ECC. interrupts: items: - description: ECC interrupt clocks: maxItems: 1 clock-names: const: nfiecc_clk required: - compatible - reg - interrupts - clocks - clock-names additionalProperties: false examples: - | #include <dt-bindings/clock/mt2701-clk.h> #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/interrupt-controller/irq.h> soc { #address-cells = <2>; #size-cells = <2>; bch: ecc@1100e000 { compatible = "mediatek,mt2701-ecc"; reg = <0 0x1100e000 0 0x1000>; interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_LOW>; clocks = <&pericfg CLK_PERI_NFI_ECC>; clock-names = "nfiecc_clk"; }; };
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mtd/mediatek,nand-ecc-engine.yaml
# Copyright 2012 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from oslo.config import cfg import webob.exc from cinder.api import extensions from cinder.api.openstack import wsgi from cinder.api import xmlutil from cinder import db from cinder import exception from cinder.openstack.common import log as logging from cinder.openstack.common import timeutils from cinder import utils CONF = cfg.CONF LOG = logging.getLogger(__name__) authorize = extensions.extension_authorizer('volume', 'services') class ServicesIndexTemplate(xmlutil.TemplateBuilder): def construct(self): root = xmlutil.TemplateElement('services') elem = xmlutil.SubTemplateElement(root, 'service', selector='services') elem.set('binary') elem.set('host') elem.set('zone') elem.set('status') elem.set('state') elem.set('update_at') elem.set('disabled_reason') return xmlutil.MasterTemplate(root, 1) class ServicesUpdateTemplate(xmlutil.TemplateBuilder): def construct(self): # TODO(uni): template elements of 'host', 'service' and 'disabled' # should be deprecated to make ServicesUpdateTemplate consistent # with ServicesIndexTemplate. Still keeping it here for API # compatibility sake. root = xmlutil.TemplateElement('host') root.set('host') root.set('service') root.set('disabled') root.set('binary') root.set('status') root.set('disabled_reason') return xmlutil.MasterTemplate(root, 1) class ServiceController(wsgi.Controller): def __init__(self, ext_mgr=None): self.ext_mgr = ext_mgr super(ServiceController, self).__init__() @wsgi.serializers(xml=ServicesIndexTemplate) def index(self, req): """Return a list of all running services. Filter by host & service name. """ context = req.environ['cinder.context'] authorize(context) detailed = self.ext_mgr.is_loaded('os-extended-services') now = timeutils.utcnow() services = db.service_get_all(context) host = '' if 'host' in req.GET: host = req.GET['host'] service = '' if 'service' in req.GET: service = req.GET['service'] LOG.deprecated(_("Query by service parameter is deprecated. " "Please use binary parameter instead.")) binary = '' if 'binary' in req.GET: binary = req.GET['binary'] if host: services = [s for s in services if s['host'] == host] # NOTE(uni): deprecating service request key, binary takes precedence binary_key = binary or service if binary_key: services = [s for s in services if s['binary'] == binary_key] svcs = [] for svc in services: delta = now - (svc['updated_at'] or svc['created_at']) alive = abs(utils.total_seconds(delta)) <= CONF.service_down_time art = (alive and "up") or "down" active = 'enabled' if svc['disabled']: active = 'disabled' ret_fields = {'binary': svc['binary'], 'host': svc['host'], 'zone': svc['availability_zone'], 'status': active, 'state': art, 'updated_at': svc['updated_at']} if detailed: ret_fields['disabled_reason'] = svc['disabled_reason'] svcs.append(ret_fields) return {'services': svcs} def _is_valid_as_reason(self, reason): if not reason: return False try: utils.check_string_length(reason.strip(), 'Disabled reason', min_length=1, max_length=255) except exception.InvalidInput: return False return True @wsgi.serializers(xml=ServicesUpdateTemplate) def update(self, req, id, body): """Enable/Disable scheduling for a service.""" context = req.environ['cinder.context'] authorize(context) ext_loaded = self.ext_mgr.is_loaded('os-extended-services') ret_val = {} if id == "enable": disabled = False status = "enabled" if ext_loaded: ret_val['disabled_reason'] = None elif (id == "disable" or (id == "disable-log-reason" and ext_loaded)): disabled = True status = "disabled" else: raise webob.exc.HTTPNotFound("Unknown action") try: host = body['host'] except (TypeError, KeyError): raise webob.exc.HTTPBadRequest() ret_val['disabled'] = disabled if id == "disable-log-reason" and ext_loaded: reason = body.get('disabled_reason') if not self._is_valid_as_reason(reason): msg = _('Disabled reason contains invalid characters ' 'or is too long') raise webob.exc.HTTPBadRequest(explanation=msg) ret_val['disabled_reason'] = reason # NOTE(uni): deprecating service request key, binary takes precedence # Still keeping service key here for API compatibility sake. service = body.get('service', '') binary = body.get('binary', '') binary_key = binary or service if not binary_key: raise webob.exc.HTTPBadRequest() try: svc = db.service_get_by_args(context, host, binary_key) if not svc: raise webob.exc.HTTPNotFound('Unknown service') db.service_update(context, svc['id'], ret_val) except exception.ServiceNotFound: raise webob.exc.HTTPNotFound("service not found") ret_val.update({'host': host, 'service': service, 'binary': binary, 'status': status}) return ret_val class Services(extensions.ExtensionDescriptor): """Services support.""" name = "Services" alias = "os-services" namespace = "http://docs.openstack.org/volume/ext/services/api/v2" updated = "2012-10-28T00:00:00-00:00" def get_resources(self): resources = [] controller = ServiceController(self.ext_mgr) resource = extensions.ResourceExtension('os-services', controller) resources.append(resource) return resources
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package oci import ( "crypto/rsa" "crypto/tls" "crypto/x509" "fmt" "net" "net/http" "os" "path" "path/filepath" "regexp" "runtime" "strconv" "strings" "github.com/hashicorp/terraform/version" "github.com/oracle/oci-go-sdk/v65/common" "github.com/oracle/oci-go-sdk/v65/common/auth" "github.com/oracle/oci-go-sdk/v65/objectstorage" "github.com/zclconf/go-cty/cty" ) var ApiKeyConfigAttributes = [5]string{UserOcidAttrName, FingerprintAttrName, PrivateKeyAttrName, PrivateKeyPathAttrName, PrivateKeyPasswordAttrName} type ociAuthConfigProvider struct { authType string configFileProfile string region string tenancyOcid string userOcid string fingerprint string privateKey string privateKeyPath string privateKeyPassword string } func newOciAuthConfigProvider(obj cty.Value) ociAuthConfigProvider { p := ociAuthConfigProvider{} if authVal, ok := getBackendAttrWithDefault(obj, AuthAttrName, AuthAPIKeySetting); ok { p.authType = authVal.AsString() } if configFileProfileVal, ok := getBackendAttr(obj, ConfigFileProfileAttrName); ok { p.configFileProfile = configFileProfileVal.AsString() } if regionVal, ok := getBackendAttr(obj, RegionAttrName); ok { p.region = regionVal.AsString() } if tenancyOcidVal, ok := getBackendAttr(obj, TenancyOcidAttrName); ok { p.tenancyOcid = tenancyOcidVal.AsString() } if userOcidVal, ok := getBackendAttr(obj, UserOcidAttrName); ok { p.userOcid = userOcidVal.AsString() } if fingerprintVal, ok := getBackendAttr(obj, FingerprintAttrName); ok { p.fingerprint = fingerprintVal.AsString() } if privateKeyVal, ok := getBackendAttr(obj, PrivateKeyAttrName); ok { p.privateKey = privateKeyVal.AsString() } if privateKeyPathVal, ok := getBackendAttr(obj, PrivateKeyPathAttrName); ok { p.privateKeyPath = privateKeyPathVal.AsString() } if privateKeyPasswordVal, ok := getBackendAttr(obj, PrivateKeyPasswordAttrName); ok { p.privateKeyPassword = privateKeyPasswordVal.AsString() } return p } func (p ociAuthConfigProvider) AuthType() (common.AuthConfig, error) { return common.AuthConfig{ AuthType: common.UnknownAuthenticationType, IsFromConfigFile: false, OboToken: nil, }, fmt.Errorf("unsupported, keep the interface") } func (p ociAuthConfigProvider) TenancyOCID() (string, error) { if p.tenancyOcid != "" { return p.tenancyOcid, nil } return "", fmt.Errorf("can not get %s from Terraform backend configuration", TenancyOcidAttrName) } func (p ociAuthConfigProvider) UserOCID() (string, error) { if p.userOcid != "" { return p.userOcid, nil } return "", fmt.Errorf("can not get %s from Terraform backend configuration", UserOcidAttrName) } func (p ociAuthConfigProvider) KeyFingerprint() (string, error) { if p.fingerprint != "" { return p.fingerprint, nil } return "", fmt.Errorf("can not get %s from Terraform backend configuration", FingerprintAttrName) } func (p ociAuthConfigProvider) Region() (string, error) { if p.region != "" { return p.region, nil } return "", fmt.Errorf("can not get %s from Terraform backend configuration", RegionAttrName) } func (p ociAuthConfigProvider) KeyID() (string, error) { tenancy, err := p.TenancyOCID() if err != nil { return "", err } user, err := p.UserOCID() if err != nil { return "", err } fingerprint, err := p.KeyFingerprint() if err != nil { return "", err } return fmt.Sprintf("%s/%s/%s", tenancy, user, fingerprint), nil } func (p ociAuthConfigProvider) PrivateRSAKey() (key *rsa.PrivateKey, err error) { if p.privateKey != "" { keyData := strings.ReplaceAll(p.privateKey, "\\n", "\n") // Ensure \n is replaced by actual newlines return common.PrivateKeyFromBytesWithPassword([]byte(keyData), []byte(p.privateKeyPassword)) } if p.privateKeyPath != "" { resolvedPath := expandPath(p.privateKeyPath) pemFileContent, readFileErr := os.ReadFile(resolvedPath) if readFileErr != nil { return nil, fmt.Errorf("can not read private key from: '%s', Error: %q", p.privateKeyPath, readFileErr) } return common.PrivateKeyFromBytesWithPassword(pemFileContent, []byte(p.privateKeyPassword)) } return nil, fmt.Errorf("can not get private_key or private_key_path from Terraform configuration") } func (p ociAuthConfigProvider) getConfigProviders() ([]common.ConfigurationProvider, error) { var configProviders []common.ConfigurationProvider logger := logWithOperation("AuthConfigProvider") logger.Debug(fmt.Sprintf("Using %s authentication", p.authType)) switch strings.ToLower(p.authType) { case strings.ToLower(AuthAPIKeySetting): // No additional config providers needed case strings.ToLower(AuthInstancePrincipalSetting): logger.Info("Attempting to authenticate using instance principal credentials") if p.region == "" { return nil, fmt.Errorf("unable to determine region from Terraform backend configuration while using Instance Principal") } // Used to modify InstancePrincipal auth clients so that `accept_local_certs` is honored for auth clients as well instancePrincipalAuthClientModifier := func(client common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error) { if acceptLocalCerts := getEnvSettingWithBlankDefault(AcceptLocalCerts); acceptLocalCerts != "" { if value, err := strconv.ParseBool(acceptLocalCerts); err == nil { modifiedClient := buildHttpClient() modifiedClient.Transport.(*http.Transport).TLSClientConfig.InsecureSkipVerify = value return modifiedClient, nil } } return client, nil } cfg, err := auth.InstancePrincipalConfigurationForRegionWithCustomClient(common.StringToRegion(p.region), instancePrincipalAuthClientModifier) if err != nil { return nil, err } logger.Debug(" Configuration provided by: %s", cfg) configProviders = append(configProviders, cfg) case strings.ToLower(AuthInstancePrincipalWithCertsSetting): logger.Info("Attempting to authenticate using instance principal with certificates") if p.region == "" { return nil, fmt.Errorf("unable to determine region from Terraform backend configuration while using Instance Principal with certificates") } defaultCertsDir, err := os.Getwd() if err != nil { return nil, fmt.Errorf("can not get working directory for current os platform") } certsDir := filepath.Clean(getEnvSettingWithDefault("test_certificates_location", defaultCertsDir)) leafCertificateBytes, err := getCertificateFileBytes(filepath.Join(certsDir, "ip_cert.pem")) if err != nil { return nil, fmt.Errorf("can not read leaf certificate from %s", filepath.Join(certsDir, "ip_cert.pem")) } leafPrivateKeyBytes, err := getCertificateFileBytes(filepath.Join(certsDir, "ip_key.pem")) if err != nil { return nil, fmt.Errorf("can not read leaf private key from %s", filepath.Join(certsDir, "ip_key.pem")) } leafPassphraseBytes := []byte{} if _, err := os.Stat(certsDir + "/leaf_passphrase"); !os.IsNotExist(err) { leafPassphraseBytes, err = getCertificateFileBytes(filepath.Join(certsDir + "leaf_passphrase")) if err != nil { return nil, fmt.Errorf("can not read leafPassphraseBytes from %s", filepath.Join(certsDir+"leaf_passphrase")) } } intermediateCertificateBytes, err := getCertificateFileBytes(filepath.Join(certsDir, "intermediate.pem")) if err != nil { return nil, fmt.Errorf("can not read intermediate certificate from %s", filepath.Join(certsDir, "intermediate.pem")) } intermediateCertificatesBytes := [][]byte{ intermediateCertificateBytes, } cfg, err := auth.InstancePrincipalConfigurationWithCerts(common.StringToRegion(p.region), leafCertificateBytes, leafPassphraseBytes, leafPrivateKeyBytes, intermediateCertificatesBytes) if err != nil { return nil, err } logger.Debug(" Configuration provided by: %s", cfg) configProviders = append(configProviders, cfg) case strings.ToLower(AuthSecurityToken): logger.Info("Attempting to authenticate using security token") if p.region == "" { return nil, fmt.Errorf("can not get %s from Terraform configuration (SecurityToken)", RegionAttrName) } // if region is part of the provider block make sure it is part of the final configuration too, and overwrites the region in the profile. + regionProvider := common.NewRawConfigurationProvider("", "", p.region, "", "", nil) configProviders = append(configProviders, regionProvider) if p.configFileProfile == "" { return nil, fmt.Errorf("missing profile in provider block %v", ConfigFileProfileAttrName) } defaultPath := path.Join(getHomeFolder(), DefaultConfigDirName, DefaultConfigFileName) if err := checkProfile(p.configFileProfile, defaultPath); err != nil { return nil, err } securityTokenBasedAuthConfigProvider, err := common.ConfigurationProviderForSessionTokenWithProfile(defaultPath, p.configFileProfile, p.privateKeyPassword) if err != nil { return nil, fmt.Errorf("could not create security token based auth config provider %v", err) } configProviders = append(configProviders, securityTokenBasedAuthConfigProvider) case strings.ToLower(ResourcePrincipal): logger.Info("Attempting to authenticate using resource principal credentials") var err error var resourcePrincipalAuthConfigProvider auth.ConfigurationProviderWithClaimAccess if p.region == "" { logger.Debug("did not get %s from Terraform configuration (ResourcePrincipal), falling back to environment variable", RegionAttrName) resourcePrincipalAuthConfigProvider, err = auth.ResourcePrincipalConfigurationProvider() } else { resourcePrincipalAuthConfigProvider, err = auth.ResourcePrincipalConfigurationProviderForRegion(common.StringToRegion(p.region)) } if err != nil { return nil, err } configProviders = append(configProviders, resourcePrincipalAuthConfigProvider) case strings.ToLower(AuthOKEWorkloadIdentity): logger.Info("Attempting to authenticate using OKE workload identity") okeWorkloadIdentityConfigProvider, err := auth.OkeWorkloadIdentityConfigurationProvider() if err != nil { return nil, fmt.Errorf("can not get oke workload indentity based auth config provider %v", err) } configProviders = append(configProviders, okeWorkloadIdentityConfigProvider) default: return nil, fmt.Errorf("auth must be one of '%s' or '%s' or '%s' or '%s' or '%s' or '%s'", AuthAPIKeySetting, AuthInstancePrincipalSetting, AuthInstancePrincipalWithCertsSetting, AuthSecurityToken, ResourcePrincipal, AuthOKEWorkloadIdentity) } return configProviders, nil } func (p ociAuthConfigProvider) getSdkConfigProvider() (common.ConfigurationProvider, error) { configProviders, err := p.getConfigProviders() if err != nil { return nil, err } configProviders = append(configProviders, p) //In GoSDK, the first step is to check if AuthType exists, //for composite provider, we only check the first provider in the list for the AuthType. //Then SDK will based on the AuthType to Create the actual provider if it's a valid value. //If not, then SDK will base on the order in the composite provider list to check for necessary info (tenancyid, userID, fingerprint, region, keyID). if p.configFileProfile == "" { configProviders = append(configProviders, common.DefaultConfigProvider()) } else { defaultPath := path.Join(getHomeFolder(), DefaultConfigDirName, DefaultConfigFileName) err := checkProfile(p.configFileProfile, defaultPath) if err != nil { return nil, err } configProviders = append(configProviders, common.CustomProfileConfigProvider(defaultPath, p.configFileProfile)) } sdkConfigProvider, err := common.ComposingConfigurationProvider(configProviders) if err != nil { return nil, err } return sdkConfigProvider, nil } func buildHttpClient() (httpClient *http.Client) { httpClient = &http.Client{ Timeout: getDurationFromEnvVar(HTTPRequestTimeOut, DefaultRequestTimeout), Transport: &http.Transport{ DialContext: (&net.Dialer{ Timeout: getDurationFromEnvVar(DialContextConnectionTimeout, DefaultConnectionTimeout), }).DialContext, TLSHandshakeTimeout: getDurationFromEnvVar(TLSHandshakeTimeout, DefaultTLSHandshakeTimeout), TLSClientConfig: &tls.Config{MinVersion: tls.VersionTLS12}, Proxy: http.ProxyFromEnvironment, }, } return } func getCertificateFileBytes(certificateFileFullPath string) (pemRaw []byte, err error) { absFile, err := filepath.Abs(certificateFileFullPath) if err != nil { return nil, fmt.Errorf("can't form absolute path of %s: %v", certificateFileFullPath, err) } if pemRaw, err = os.ReadFile(absFile); err != nil { return nil, fmt.Errorf("can't read %s: %v", certificateFileFullPath, err) } return } func UserAgentFromEnv() string { userAgentFromEnv := getEnvSettingWithBlankDefault(UserAgentSDKNameEnv) if userAgentFromEnv == "" { userAgentFromEnv = getEnvSettingWithBlankDefault(UserAgentTerraformNameEnv) } if userAgentFromEnv == "" { userAgentFromEnv = DefaultUserAgentBackendName } return userAgentFromEnv } // OboTokenProvider interface that wraps information about auth tokens so the sdk client can make calls // on behalf of a different authorized user type OboTokenProvider interface { OboToken() (string, error) } // EmptyOboTokenProvider always provides an empty obo token type emptyOboTokenProvider struct{} // OboToken provides the obo token func (provider emptyOboTokenProvider) OboToken() (string, error) { return "", nil } type oboTokenProviderFromEnv struct{} func (p oboTokenProviderFromEnv) OboToken() (string, error) { // priority token from path than token from environment if tokenPath := getEnvSettingWithBlankDefault(OboTokenPath); tokenPath != "" { tokenByte, err := os.ReadFile(tokenPath) if err != nil { return "", err } return string(tokenByte), nil } return getEnvSettingWithBlankDefault(OboTokenAttrName), nil } func buildConfigureClient(configProvider common.ConfigurationProvider, httpClient *http.Client) (*objectstorage.ObjectStorageClient, error) { userAgentName := UserAgentFromEnv() userAgent := fmt.Sprintf(UserAgentFormatter, common.Version(), runtime.Version(), runtime.GOOS, runtime.GOARCH, version.String(), userAgentName) useOboToken, err := strconv.ParseBool(getEnvSettingWithDefault("use_obo_token", "false")) if err != nil { return nil, err } setSDKLogger() client, err := objectstorage.NewObjectStorageClientWithConfigurationProvider(configProvider) if err != nil { return nil, err } if hostOverride := getClientHostOverride(); hostOverride != "" { client.Host = hostOverride } requestSigner := common.DefaultRequestSigner(configProvider) var oboTokenProvider OboTokenProvider oboTokenProvider = emptyOboTokenProvider{} if useOboToken { // Add Obo token to the default list and Update the signer httpHeadersToSign := append(common.DefaultGenericHeaders(), RequestHeaderOpcOboToken) requestSigner = common.RequestSigner(configProvider, httpHeadersToSign, common.DefaultBodyHeaders()) oboTokenProvider = oboTokenProviderFromEnv{} } client.HTTPClient = httpClient client.UserAgent = userAgent client.Signer = requestSigner client.Interceptor = func(r *http.Request) error { if oboToken, err := oboTokenProvider.OboToken(); err == nil && oboToken != "" { r.Header.Set(RequestHeaderOpcOboToken, oboToken) } return nil } domainNameOverride := getEnvSettingWithBlankDefault(DomainNameOverrideEnv) if domainNameOverride != "" { hasCorrectDomainName := getEnvSettingWithBlankDefault(HasCorrectDomainNameEnv) re := regexp.MustCompile(`(.*?)[-\w]+\.\w+$`) // (capture: preamble) match: d0main-name . tld end-of-string if hasCorrectDomainName == "" || !strings.HasSuffix(client.Host, hasCorrectDomainName) { client.Host = re.ReplaceAllString(client.Host, "${1}"+domainNameOverride) // non-match conveniently returns original string } } customCertLoc := getEnvSettingWithBlankDefault(CustomCertLocationEnv) if customCertLoc != "" { cert, err := os.ReadFile(customCertLoc) if err != nil { return &client, err } pool := x509.NewCertPool() if ok := pool.AppendCertsFromPEM(cert); !ok { return nil, fmt.Errorf("failed to append custom cert to the pool") } // install the certificates in the client httpClient.Transport.(*http.Transport).TLSClientConfig.RootCAs = pool } if acceptLocalCerts := getEnvSettingWithBlankDefault(AcceptLocalCerts); acceptLocalCerts != "" { if boolVal, err := strconv.ParseBool(acceptLocalCerts); err == nil { httpClient.Transport.(*http.Transport).TLSClientConfig.InsecureSkipVerify = boolVal } } return &client, nil } func getClientHostOverride() string { // Get the host URL override for clients clientHostOverridesString := getEnvSettingWithBlankDefault(ClientHostOverridesEnv) if clientHostOverridesString == "" { return "" } clientHostFlags := strings.Split(clientHostOverridesString, ColonDelimiter) for _, item := range clientHostFlags { clientNameHost := strings.Split(item, EqualToOperatorDelimiter) if clientNameHost == nil || len(clientNameHost) != 2 { continue } if clientNameHost[0] == ObjectStorageClientName { return clientNameHost[1] } } return "" }
go
github
https://github.com/hashicorp/terraform
internal/backend/remote-state/oci/auth.go
# Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # SickRage is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with SickRage. If not, see <http://www.gnu.org/licenses/>. from __future__ import with_statement import time import re import urllib, urllib2, urlparse import sys import os import traceback import datetime import sickbeard import generic from sickbeard.common import Quality, cpu_presets from sickbeard.name_parser.parser import NameParser, InvalidNameException, InvalidShowException from sickbeard import db from sickbeard import classes from sickbeard import logger from sickbeard import tvcache from sickbeard import helpers from sickbeard import clients from sickbeard.show_name_helpers import allPossibleShowNames, sanitizeSceneName from sickbeard.bs4_parser import BS4Parser from sickbeard.common import Overview from sickbeard.exceptions import ex from sickbeard import encodingKludge as ek from lib import requests from lib.requests import exceptions from lib.unidecode import unidecode class OldPirateBayProvider(generic.TorrentProvider): def __init__(self): generic.TorrentProvider.__init__(self, "OldPirateBay") self.supportsBacklog = True self.supportsFrench = True self.enabled = False self.ratio = None self.confirmed = False self.minseed = None self.minleech = None self.cache = OldPirateBayCache(self) self.urls = {'base_url': 'https://oldpiratebay.org/'} self.url = self.urls['base_url'] self.searchurl = self.url + 'search.php?q=%s&Torrent_sort=seeders.desc' # order by seed self.re_title_url = '/torrent/(?P<id>\d+)/(?P<title>.*?)//1".+?(?P<url>magnet.*?)//1".+?(?P<seeders>\d+)</td>.+?(?P<leechers>\d+)</td>' def isEnabled(self): return self.enabled def imageName(self): return 'oldpiratebay.png' def getQuality(self, item, anime=False): quality = Quality.sceneQuality(item[0], anime) return quality def _reverseQuality(self, quality): quality_string = '' if quality == Quality.SDTV: quality_string = 'HDTV x264' if quality == Quality.SDDVD: quality_string = 'DVDRIP' elif quality == Quality.HDTV: quality_string = '720p HDTV x264' elif quality == Quality.FULLHDTV: quality_string = '1080p HDTV x264' elif quality == Quality.RAWHDTV: quality_string = '1080i HDTV mpeg2' elif quality == Quality.HDWEBDL: quality_string = '720p WEB-DL h264' elif quality == Quality.FULLHDWEBDL: quality_string = '1080p WEB-DL h264' elif quality == Quality.HDBLURAY: quality_string = '720p Bluray x264' elif quality == Quality.FULLHDBLURAY: quality_string = '1080p Bluray x264' return quality_string def _find_season_quality(self, title, torrent_id, ep_number): """ Return the modified title of a Season Torrent with the quality found inspecting torrent file list """ mediaExtensions = ['avi', 'mkv', 'wmv', 'divx', 'vob', 'dvr-ms', 'wtv', 'ts' 'ogv', 'rar', 'zip', 'mp4'] quality = Quality.UNKNOWN fileName = None fileURL = self.url + 'torrent/' + str(torrent_id) data = self.getURL(fileURL) if not data: return None try: with BS4Parser(data, features=["html5lib", "permissive"]) as soup: files_tbody = soup.find('div', attrs={'class': 'description-files'}).find('tbody') if (not files_tbody): return None files = [] rows = files_tbody.find_all('tr') for row in rows: files.append(row.find_all('td')[1].text) videoFiles = filter(lambda x: x.rpartition(".")[2].lower() in mediaExtensions, files) #Filtering SingleEpisode/MultiSeason Torrent if len(videoFiles) < ep_number or len(videoFiles) > float(ep_number * 1.1): logger.log(u"Result " + title + " have " + str( ep_number) + " episode and episodes retrived in torrent are " + str(len(videoFiles)), logger.DEBUG) logger.log( u"Result " + title + " Seem to be a Single Episode or MultiSeason torrent, skipping result...", logger.DEBUG) return None if Quality.sceneQuality(title) != Quality.UNKNOWN: return title for fileName in videoFiles: quality = Quality.sceneQuality(os.path.basename(fileName)) if quality != Quality.UNKNOWN: break if fileName is not None and quality == Quality.UNKNOWN: quality = Quality.assumeQuality(os.path.basename(fileName)) if quality == Quality.UNKNOWN: logger.log(u"Unable to obtain a Season Quality for " + title, logger.DEBUG) return None try: myParser = NameParser(showObj=self.show) parse_result = myParser.parse(fileName) except (InvalidNameException, InvalidShowException): return None logger.log(u"Season quality for " + title + " is " + Quality.qualityStrings[quality], logger.DEBUG) if parse_result.series_name and parse_result.season_number: title = parse_result.series_name + ' S%02d' % int( parse_result.season_number) + ' ' + self._reverseQuality(quality) return title except Exception, e: logger.log(u"Failed parsing " + self.name + " Traceback: " + traceback.format_exc(), logger.ERROR) def _get_season_search_strings(self, ep_obj): search_string = {'Season': [], 'Langcat' : ''} if ep_obj.show.audio_lang=='fr': langtext=' french' else: langtext='' for show_name in set(allPossibleShowNames(self.show)): if ep_obj.show.air_by_date or ep_obj.show.sports: ep_string = show_name + ' ' + str(ep_obj.airdate).split('-')[0] search_string['Season'].append(ep_string) ep_string = show_name + ' Season ' + str(ep_obj.airdate).split('-')[0]+langtext search_string['Season'].append(ep_string) elif ep_obj.show.anime: ep_string = show_name + ' ' + "%02d" % ep_obj.scene_absolute_number+langtext search_string['Season'].append(ep_string) else: ep_string = show_name + ' S%02d' % int(ep_obj.scene_season) search_string['Season'].append(ep_string) ep_string = show_name + ' Season ' + str(ep_obj.scene_season) + ' -Ep*'+langtext search_string['Season'].append(ep_string) search_string['Season'].append(ep_string) search_string['Langcat']=ep_obj.show.audio_lang return [search_string] def _get_episode_search_strings(self, ep_obj, add_string=''): search_string = {'Episode': [],'Langcat': ''} if ep_obj.show.audio_lang=='fr': langtext=' french' else: langtext='' if self.show.air_by_date: for show_name in set(allPossibleShowNames(self.show)): ep_string = sanitizeSceneName(show_name) + ' ' + \ str(ep_obj.airdate).replace('-', ' ')+langtext search_string['Episode'].append(ep_string) elif self.show.sports: for show_name in set(allPossibleShowNames(self.show)): ep_string = sanitizeSceneName(show_name) + ' ' + \ str(ep_obj.airdate).replace('-', '|') + '|' + \ ep_obj.airdate.strftime('%b')+langtext search_string['Episode'].append(ep_string) elif self.show.anime: for show_name in set(allPossibleShowNames(self.show)): ep_string = sanitizeSceneName(show_name) + ' ' + \ "%02i" % int(ep_obj.scene_absolute_number)+langtext search_string['Episode'].append(ep_string) else: for show_name in set(allPossibleShowNames(self.show)): ep_string = sanitizeSceneName(show_name) + ' ' + \ sickbeard.config.naming_ep_type[2] % {'seasonnumber': ep_obj.scene_season, 'episodenumber': ep_obj.scene_episode} + '|' + \ sickbeard.config.naming_ep_type[0] % {'seasonnumber': ep_obj.scene_season, 'episodenumber': ep_obj.scene_episode} + ' %s' % add_string+langtext search_string['Episode'].append(re.sub('\s+', ' ', ep_string)) search_string['Langcat']=ep_obj.show.audio_lang return [search_string] def _doSearch(self, search_params, search_mode='eponly', epcount=0, age=0): results = [] langcat=search_params['Langcat'] items = {'Season': [], 'Episode': [], 'RSS': []} for mode in search_params.keys(): if mode=='Langcat': continue for search_string in search_params[mode]: if isinstance(search_string, unicode): search_string = unidecode(search_string) if mode != 'RSS': searchURL = self.searchurl % (urllib.quote(search_string)) else: searchURL = self.url + 'search?iht=8&sort=-created_at' logger.log(u"Search string: " + searchURL, logger.DEBUG) data = self.getURL(searchURL) if not data: continue re_title_url = self.proxy._buildRE(self.re_title_url) match = re.compile(re_title_url, re.DOTALL).finditer(urllib.unquote(data)) for torrent in match: title = torrent.group('title').replace('_', '.') #Do not know why but SickBeard skip release with '_' in name url = torrent.group('url') id = int(torrent.group('id')) seeders = int(torrent.group('seeders')) leechers = int(torrent.group('leechers')) #Filter unseeded torrent if mode != 'RSS' and (seeders < self.minseed or leechers < self.minleech): continue #Accept Torrent only from Good People for every Episode Search if self.confirmed and re.search('(VIP|Trusted|Helper|Moderator)', torrent.group(0)) is None: logger.log(u"OldPirateBay Provider found result " + torrent.group( 'title') + " but that doesn't seem like a trusted result so I'm ignoring it", logger.DEBUG) continue #Check number video files = episode in season and find the real Quality for full season torrent analyzing files in torrent if mode == 'Season' and search_mode == 'sponly': ep_number = int(epcount / len(set(allPossibleShowNames(self.show)))) title = self._find_season_quality(title, id, ep_number) if not title or not url: continue if langcat=='fr' and 'french' not in title.lower(): continue item = title, url, id, seeders, leechers, langcat items[mode].append(item) #For each search mode sort all the items by seeders items[mode].sort(key=lambda tup: tup[3], reverse=True) results += items[mode] return results def _get_title_and_url(self, item): title, url, id, seeders, leechers, lang = item if title: title = u'' + title.replace(' ', '.') if url: url = url.replace('&amp;', '&') return (title, url, lang) def findPropers(self, search_date=datetime.datetime.today()): results = [] myDB = db.DBConnection() sqlResults = myDB.select( 'SELECT s.show_name, e.showid, e.season, e.episode, e.status, e.airdate FROM tv_episodes AS e' + ' INNER JOIN tv_shows AS s ON (e.showid = s.indexer_id)' + ' WHERE e.airdate >= ' + str(search_date.toordinal()) + ' AND (e.status IN (' + ','.join([str(x) for x in Quality.DOWNLOADED]) + ')' + ' OR (e.status IN (' + ','.join([str(x) for x in Quality.SNATCHED]) + ')))' ) if not sqlResults: return [] for sqlshow in sqlResults: self.show = helpers.findCertainShow(sickbeard.showList, int(sqlshow["showid"])) if self.show: curEp = self.show.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"])) searchString = self._get_episode_search_strings(curEp, add_string='PROPER|REPACK') for item in self._doSearch(searchString[0]): title, url = self._get_title_and_url(item) results.append(classes.Proper(title, url, datetime.datetime.today(), self.show)) return results def seedRatio(self): return self.ratio class OldPirateBayCache(tvcache.TVCache): def __init__(self, provider): tvcache.TVCache.__init__(self, provider) # only poll OldPirateBay every 10 minutes max self.minTime = 20 def _getRSSData(self): search_params = {'RSS': ['rss'],'Langcat' : ""} return {'entries': self.provider._doSearch(search_params)} provider = OldPirateBayProvider()
unknown
codeparrot/codeparrot-clean
<svg width="6" height="10" viewBox="0 0 6 10" fill="none" xmlns="http://www.w3.org/2000/svg" {{ $attributes }}> <path d="M0.875 9.25L5.125 5L0.875 0.75" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg>
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/chevron-right.blade.php
use std::io::Error; use std::path::{Path, PathBuf}; use rustc_errors::codes::*; use rustc_errors::{ Applicability, Diag, DiagCtxtHandle, DiagSymbolList, Diagnostic, EmissionGuarantee, Level, MultiSpan, inline_fluent, }; use rustc_hir::Target; use rustc_hir::attrs::{MirDialect, MirPhase}; use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic}; use rustc_middle::ty::{MainDefinition, Ty}; use rustc_span::{DUMMY_SP, Span, Symbol}; use crate::check_attr::ProcMacroKind; use crate::lang_items::Duplicate; #[derive(LintDiagnostic)] #[diag("`#[diagnostic::do_not_recommend]` can only be placed on trait implementations")] pub(crate) struct IncorrectDoNotRecommendLocation; #[derive(Diagnostic)] #[diag("`#[autodiff]` should be applied to a function")] pub(crate) struct AutoDiffAttr { #[primary_span] #[label("not a function")] pub attr_span: Span, } #[derive(Diagnostic)] #[diag("`#[loop_match]` should be applied to a loop")] pub(crate) struct LoopMatchAttr { #[primary_span] pub attr_span: Span, #[label("not a loop")] pub node_span: Span, } #[derive(Diagnostic)] #[diag("`#[const_continue]` should be applied to a break expression")] pub(crate) struct ConstContinueAttr { #[primary_span] pub attr_span: Span, #[label("not a break expression")] pub node_span: Span, } #[derive(LintDiagnostic)] #[diag("`{$no_mangle_attr}` attribute may not be used in combination with `{$export_name_attr}`")] pub(crate) struct MixedExportNameAndNoMangle { #[label("`{$no_mangle_attr}` is ignored")] #[suggestion( "remove the `{$no_mangle_attr}` attribute", style = "verbose", code = "", applicability = "machine-applicable" )] pub no_mangle_span: Span, #[note("`{$export_name_attr}` takes precedence")] pub export_name_span: Span, pub no_mangle_attr: &'static str, pub export_name_attr: &'static str, } #[derive(LintDiagnostic)] #[diag("crate-level attribute should be an inner attribute")] pub(crate) struct OuterCrateLevelAttr { #[subdiagnostic] pub suggestion: OuterCrateLevelAttrSuggestion, } #[derive(Subdiagnostic)] #[multipart_suggestion("add a `!`", style = "verbose")] pub(crate) struct OuterCrateLevelAttrSuggestion { #[suggestion_part(code = "!")] pub bang_position: Span, } #[derive(LintDiagnostic)] #[diag("crate-level attribute should be in the root module")] pub(crate) struct InnerCrateLevelAttr; #[derive(Diagnostic)] #[diag("`#[non_exhaustive]` can't be used to annotate items with default field values")] pub(crate) struct NonExhaustiveWithDefaultFieldValues { #[primary_span] pub attr_span: Span, #[label("this struct has default field values")] pub defn_span: Span, } #[derive(Diagnostic)] #[diag("`#[doc(alias = \"...\")]` isn't allowed on {$location}")] pub(crate) struct DocAliasBadLocation<'a> { #[primary_span] pub span: Span, pub location: &'a str, } #[derive(Diagnostic)] #[diag("`#[doc(alias = \"{$attr_str}\"]` is the same as the item's name")] pub(crate) struct DocAliasNotAnAlias { #[primary_span] pub span: Span, pub attr_str: Symbol, } #[derive(Diagnostic)] #[diag("`#[doc({$attr_name} = \"...\")]` should be used on empty modules")] pub(crate) struct DocKeywordAttributeEmptyMod { #[primary_span] pub span: Span, pub attr_name: &'static str, } #[derive(Diagnostic)] #[diag("`#[doc({$attr_name} = \"...\")]` should be used on modules")] pub(crate) struct DocKeywordAttributeNotMod { #[primary_span] pub span: Span, pub attr_name: &'static str, } #[derive(Diagnostic)] #[diag( "`#[doc(fake_variadic)]` must be used on the first of a set of tuple or fn pointer trait impls with varying arity" )] pub(crate) struct DocFakeVariadicNotValid { #[primary_span] pub span: Span, } #[derive(Diagnostic)] #[diag("`#[doc(keyword = \"...\")]` should be used on impl blocks")] pub(crate) struct DocKeywordOnlyImpl { #[primary_span] pub span: Span, } #[derive(Diagnostic)] #[diag("`#[doc(search_unbox)]` should be used on generic structs and enums")] pub(crate) struct DocSearchUnboxInvalid { #[primary_span] pub span: Span, } #[derive(Diagnostic)] #[diag("conflicting doc inlining attributes")] #[help("remove one of the conflicting attributes")] pub(crate) struct DocInlineConflict { #[primary_span] pub spans: MultiSpan, } #[derive(LintDiagnostic)] #[diag("this attribute can only be applied to a `use` item")] #[note( "read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#inline-and-no_inline> for more information" )] pub(crate) struct DocInlineOnlyUse { #[label("only applicable on `use` items")] pub attr_span: Span, #[label("not a `use` item")] pub item_span: Span, } #[derive(LintDiagnostic)] #[diag("this attribute can only be applied to an `extern crate` item")] #[note( "read <https://doc.rust-lang.org/unstable-book/language-features/doc-masked.html> for more information" )] pub(crate) struct DocMaskedOnlyExternCrate { #[label("only applicable on `extern crate` items")] pub attr_span: Span, #[label("not an `extern crate` item")] pub item_span: Span, } #[derive(LintDiagnostic)] #[diag("this attribute cannot be applied to an `extern crate self` item")] pub(crate) struct DocMaskedNotExternCrateSelf { #[label("not applicable on `extern crate self` items")] pub attr_span: Span, #[label("`extern crate self` defined here")] pub item_span: Span, } #[derive(Diagnostic)] #[diag("`#[ffi_const]` function cannot be `#[ffi_pure]`", code = E0757)] pub(crate) struct BothFfiConstAndPure { #[primary_span] pub attr_span: Span, } #[derive(LintDiagnostic)] #[diag("attribute should be applied to an `extern` block with non-Rust ABI")] #[warning( "this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!" )] pub(crate) struct Link { #[label("not an `extern` block")] pub span: Option<Span>, } #[derive(Diagnostic)] #[diag("#[rustc_legacy_const_generics] functions must only have const generics")] pub(crate) struct RustcLegacyConstGenericsOnly { #[primary_span] pub attr_span: Span, #[label("non-const generic parameter")] pub param_span: Span, } #[derive(Diagnostic)] #[diag("#[rustc_legacy_const_generics] must have one index for each generic parameter")] pub(crate) struct RustcLegacyConstGenericsIndex { #[primary_span] pub attr_span: Span, #[label("generic parameters")] pub generics_span: Span, } #[derive(Diagnostic)] #[diag("index exceeds number of arguments")] pub(crate) struct RustcLegacyConstGenericsIndexExceed { #[primary_span] #[label( "there {$arg_count -> [one] is *[other] are } only {$arg_count} {$arg_count -> [one] argument *[other] arguments }" )] pub span: Span, pub arg_count: usize, } #[derive(Diagnostic)] #[diag("conflicting representation hints", code = E0566)] pub(crate) struct ReprConflicting { #[primary_span] pub hint_spans: Vec<Span>, } #[derive(Diagnostic)] #[diag("alignment must not be greater than `isize::MAX` bytes", code = E0589)] #[note("`isize::MAX` is {$size} for the current target")] pub(crate) struct InvalidReprAlignForTarget { #[primary_span] pub span: Span, pub size: u64, } #[derive(LintDiagnostic)] #[diag("conflicting representation hints", code = E0566)] pub(crate) struct ReprConflictingLint; #[derive(Diagnostic)] #[diag("attribute should be applied to a macro")] pub(crate) struct MacroOnlyAttribute { #[primary_span] pub attr_span: Span, #[label("not a macro")] pub span: Span, } #[derive(Diagnostic)] #[diag("couldn't read {$file}: {$error}")] pub(crate) struct DebugVisualizerUnreadable<'a> { #[primary_span] pub span: Span, pub file: &'a Path, pub error: Error, } #[derive(Diagnostic)] #[diag("attribute should be applied to `const fn`")] pub(crate) struct RustcAllowConstFnUnstable { #[primary_span] pub attr_span: Span, #[label("not a `const fn`")] pub span: Span, } #[derive(Diagnostic)] #[diag("attribute should be applied to `#[repr(transparent)]` types")] pub(crate) struct RustcPubTransparent { #[primary_span] pub attr_span: Span, #[label("not a `#[repr(transparent)]` type")] pub span: Span, } #[derive(Diagnostic)] #[diag("attribute cannot be applied to a `async`, `gen` or `async gen` function")] pub(crate) struct RustcForceInlineCoro { #[primary_span] pub attr_span: Span, #[label("`async`, `gen` or `async gen` function")] pub span: Span, } #[derive(LintDiagnostic)] pub(crate) enum MacroExport { #[diag("`#[macro_export]` has no effect on declarative macro definitions")] #[note("declarative macros follow the same exporting rules as regular items")] OnDeclMacro, } #[derive(Subdiagnostic)] pub(crate) enum UnusedNote { #[note("attribute `{$name}` with an empty list has no effect")] EmptyList { name: Symbol }, #[note("attribute `{$name}` without any lints has no effect")] NoLints { name: Symbol }, #[note("`default_method_body_is_const` has been replaced with `const` on traits")] DefaultMethodBodyConst, #[note( "the `linker_messages` lint can only be controlled at the root of a crate that needs to be linked" )] LinkerMessagesBinaryCrateOnly, } #[derive(LintDiagnostic)] #[diag("unused attribute")] pub(crate) struct Unused { #[suggestion("remove this attribute", code = "", applicability = "machine-applicable")] pub attr_span: Span, #[subdiagnostic] pub note: UnusedNote, } #[derive(Diagnostic)] #[diag("attribute should be applied to function or closure", code = E0518)] pub(crate) struct NonExportedMacroInvalidAttrs { #[primary_span] #[label("not a function or closure")] pub attr_span: Span, } #[derive(Diagnostic)] #[diag("`#[may_dangle]` must be applied to a lifetime or type generic parameter in `Drop` impl")] pub(crate) struct InvalidMayDangle { #[primary_span] pub attr_span: Span, } #[derive(LintDiagnostic)] #[diag("unused attribute")] pub(crate) struct UnusedDuplicate { #[suggestion("remove this attribute", code = "", applicability = "machine-applicable")] pub this: Span, #[note("attribute also specified here")] pub other: Span, #[warning( "this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!" )] pub warning: bool, } #[derive(Diagnostic)] #[diag("multiple `{$name}` attributes")] pub(crate) struct UnusedMultiple { #[primary_span] #[suggestion("remove this attribute", code = "", applicability = "machine-applicable")] pub this: Span, #[note("attribute also specified here")] pub other: Span, pub name: Symbol, } #[derive(LintDiagnostic)] #[diag("this `#[deprecated]` annotation has no effect")] pub(crate) struct DeprecatedAnnotationHasNoEffect { #[suggestion( "remove the unnecessary deprecation attribute", applicability = "machine-applicable", code = "" )] pub span: Span, } #[derive(Diagnostic)] #[diag("unknown external lang item: `{$lang_item}`", code = E0264)] pub(crate) struct UnknownExternLangItem { #[primary_span] pub span: Span, pub lang_item: Symbol, } #[derive(Diagnostic)] #[diag("`#[panic_handler]` function required, but not found")] pub(crate) struct MissingPanicHandler; #[derive(Diagnostic)] #[diag("unwinding panics are not supported without std")] #[help("using nightly cargo, use -Zbuild-std with panic=\"abort\" to avoid unwinding")] #[note( "since the core library is usually precompiled with panic=\"unwind\", rebuilding your crate with panic=\"abort\" may not be enough to fix the problem" )] pub(crate) struct PanicUnwindWithoutStd; #[derive(Diagnostic)] #[diag("lang item required, but not found: `{$name}`")] #[note( "this can occur when a binary crate with `#![no_std]` is compiled for a target where `{$name}` is defined in the standard library" )] #[help( "you may be able to compile for a target that doesn't need `{$name}`, specify a target with `--target` or in `.cargo/config`" )] pub(crate) struct MissingLangItem { pub name: Symbol, } #[derive(Diagnostic)] #[diag( "{$name -> [panic_impl] `#[panic_handler]` *[other] `{$name}` lang item } function is not allowed to have `#[track_caller]`" )] pub(crate) struct LangItemWithTrackCaller { #[primary_span] pub attr_span: Span, pub name: Symbol, #[label( "{$name -> [panic_impl] `#[panic_handler]` *[other] `{$name}` lang item } function is not allowed to have `#[track_caller]`" )] pub sig_span: Span, } #[derive(Diagnostic)] #[diag( "{$name -> [panic_impl] `#[panic_handler]` *[other] `{$name}` lang item } function is not allowed to have `#[target_feature]`" )] pub(crate) struct LangItemWithTargetFeature { #[primary_span] pub attr_span: Span, pub name: Symbol, #[label( "{$name -> [panic_impl] `#[panic_handler]` *[other] `{$name}` lang item } function is not allowed to have `#[target_feature]`" )] pub sig_span: Span, } #[derive(Diagnostic)] #[diag("`{$name}` lang item must be applied to a {$expected_target}", code = E0718)] pub(crate) struct LangItemOnIncorrectTarget { #[primary_span] #[label("attribute should be applied to a {$expected_target}, not a {$actual_target}")] pub span: Span, pub name: Symbol, pub expected_target: Target, pub actual_target: Target, } #[derive(Diagnostic)] #[diag("definition of an unknown lang item: `{$name}`", code = E0522)] pub(crate) struct UnknownLangItem { #[primary_span] #[label("definition of unknown lang item `{$name}`")] pub span: Span, pub name: Symbol, } pub(crate) struct InvalidAttrAtCrateLevel { pub span: Span, pub sugg_span: Option<Span>, pub name: Symbol, pub item: Option<ItemFollowingInnerAttr>, } #[derive(Clone, Copy)] pub(crate) struct ItemFollowingInnerAttr { pub span: Span, pub kind: &'static str, } impl<G: EmissionGuarantee> Diagnostic<'_, G> for InvalidAttrAtCrateLevel { #[track_caller] fn into_diag(self, dcx: DiagCtxtHandle<'_>, level: Level) -> Diag<'_, G> { let mut diag = Diag::new( dcx, level, inline_fluent!("`{$name}` attribute cannot be used at crate level"), ); diag.span(self.span); diag.arg("name", self.name); // Only emit an error with a suggestion if we can create a string out // of the attribute span if let Some(span) = self.sugg_span { diag.span_suggestion_verbose( span, inline_fluent!("perhaps you meant to use an outer attribute"), String::new(), Applicability::MachineApplicable, ); } if let Some(item) = self.item { diag.arg("kind", item.kind); diag.span_label( item.span, inline_fluent!("the inner attribute doesn't annotate this {$kind}"), ); } diag } } #[derive(Diagnostic)] #[diag("duplicate diagnostic item in crate `{$crate_name}`: `{$name}`")] pub(crate) struct DuplicateDiagnosticItemInCrate { #[primary_span] pub duplicate_span: Option<Span>, #[note("the diagnostic item is first defined here")] pub orig_span: Option<Span>, #[note("the diagnostic item is first defined in crate `{$orig_crate_name}`")] pub different_crates: bool, pub crate_name: Symbol, pub orig_crate_name: Symbol, pub name: Symbol, } #[derive(Diagnostic)] #[diag("abi: {$abi}")] pub(crate) struct LayoutAbi { #[primary_span] pub span: Span, pub abi: String, } #[derive(Diagnostic)] #[diag("align: {$align}")] pub(crate) struct LayoutAlign { #[primary_span] pub span: Span, pub align: String, } #[derive(Diagnostic)] #[diag("size: {$size}")] pub(crate) struct LayoutSize { #[primary_span] pub span: Span, pub size: String, } #[derive(Diagnostic)] #[diag("homogeneous_aggregate: {$homogeneous_aggregate}")] pub(crate) struct LayoutHomogeneousAggregate { #[primary_span] pub span: Span, pub homogeneous_aggregate: String, } #[derive(Diagnostic)] #[diag("layout_of({$normalized_ty}) = {$ty_layout}")] pub(crate) struct LayoutOf<'tcx> { #[primary_span] pub span: Span, pub normalized_ty: Ty<'tcx>, pub ty_layout: String, } #[derive(Diagnostic)] #[diag("fn_abi_of({$fn_name}) = {$fn_abi}")] pub(crate) struct AbiOf { #[primary_span] pub span: Span, pub fn_name: Symbol, pub fn_abi: String, } #[derive(Diagnostic)] #[diag( "ABIs are not compatible left ABI = {$left} right ABI = {$right}" )] pub(crate) struct AbiNe { #[primary_span] pub span: Span, pub left: String, pub right: String, } #[derive(Diagnostic)] #[diag( "`#[rustc_abi]` can only be applied to function items, type aliases, and associated functions" )] pub(crate) struct AbiInvalidAttribute { #[primary_span] pub span: Span, } #[derive(Diagnostic)] #[diag("unrecognized argument")] pub(crate) struct UnrecognizedArgument { #[primary_span] pub span: Span, } #[derive(Diagnostic)] #[diag("feature `{$feature}` is declared stable since {$since}, but was previously declared stable since {$prev_since}", code = E0711)] pub(crate) struct FeatureStableTwice { #[primary_span] pub span: Span, pub feature: Symbol, pub since: Symbol, pub prev_since: Symbol, } #[derive(Diagnostic)] #[diag("feature `{$feature}` is declared {$declared}, but was previously declared {$prev_declared}", code = E0711)] pub(crate) struct FeaturePreviouslyDeclared<'a> { #[primary_span] pub span: Span, pub feature: Symbol, pub declared: &'a str, pub prev_declared: &'a str, } #[derive(Diagnostic)] #[diag("multiple functions with a `#[rustc_main]` attribute", code = E0137)] pub(crate) struct MultipleRustcMain { #[primary_span] pub span: Span, #[label("first `#[rustc_main]` function")] pub first: Span, #[label("additional `#[rustc_main]` function")] pub additional: Span, } #[derive(Diagnostic)] #[diag("the `main` function cannot be declared in an `extern` block")] pub(crate) struct ExternMain { #[primary_span] pub span: Span, } pub(crate) struct NoMainErr { pub sp: Span, pub crate_name: Symbol, pub has_filename: bool, pub filename: PathBuf, pub file_empty: bool, pub non_main_fns: Vec<Span>, pub main_def_opt: Option<MainDefinition>, pub add_teach_note: bool, } impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for NoMainErr { #[track_caller] fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, G> { let mut diag = Diag::new( dcx, level, inline_fluent!("`main` function not found in crate `{$crate_name}`"), ); diag.span(DUMMY_SP); diag.code(E0601); diag.arg("crate_name", self.crate_name); diag.arg("filename", self.filename); diag.arg("has_filename", self.has_filename); let note = if !self.non_main_fns.is_empty() { for &span in &self.non_main_fns { diag.span_note(span, inline_fluent!("here is a function named `main`")); } diag.note(inline_fluent!( "you have one or more functions named `main` not defined at the crate level" )); diag.help(inline_fluent!("consider moving the `main` function definitions")); // There were some functions named `main` though. Try to give the user a hint. inline_fluent!( "the main function must be defined at the crate level{$has_filename -> [true] {\" \"}(in `{$filename}`) *[false] {\"\"} }" ) } else if self.has_filename { inline_fluent!("consider adding a `main` function to `{$filename}`") } else { inline_fluent!("consider adding a `main` function at the crate level") }; if self.file_empty { diag.note(note); } else { diag.span(self.sp.shrink_to_hi()); diag.span_label(self.sp.shrink_to_hi(), note); } if let Some(main_def) = self.main_def_opt && main_def.opt_fn_def_id().is_none() { // There is something at `crate::main`, but it is not a function definition. diag.span_label( main_def.span, inline_fluent!("non-function item at `crate::main` is found"), ); } if self.add_teach_note { diag.note(inline_fluent!("if you don't know the basics of Rust, you can go look to the Rust Book to get started: https://doc.rust-lang.org/book/")); } diag } } pub(crate) struct DuplicateLangItem { pub local_span: Option<Span>, pub lang_item_name: Symbol, pub crate_name: Symbol, pub dependency_of: Option<Symbol>, pub is_local: bool, pub path: String, pub first_defined_span: Option<Span>, pub orig_crate_name: Option<Symbol>, pub orig_dependency_of: Option<Symbol>, pub orig_is_local: bool, pub orig_path: String, pub(crate) duplicate: Duplicate, } impl<G: EmissionGuarantee> Diagnostic<'_, G> for DuplicateLangItem { #[track_caller] fn into_diag(self, dcx: DiagCtxtHandle<'_>, level: Level) -> Diag<'_, G> { let mut diag = Diag::new( dcx, level, match self.duplicate { Duplicate::Plain => inline_fluent!("found duplicate lang item `{$lang_item_name}`"), Duplicate::Crate => inline_fluent!( "duplicate lang item in crate `{$crate_name}`: `{$lang_item_name}`" ), Duplicate::CrateDepends => inline_fluent!( "duplicate lang item in crate `{$crate_name}` (which `{$dependency_of}` depends on): `{$lang_item_name}`" ), }, ); diag.code(E0152); diag.arg("lang_item_name", self.lang_item_name); diag.arg("crate_name", self.crate_name); if let Some(dependency_of) = self.dependency_of { diag.arg("dependency_of", dependency_of); } diag.arg("path", self.path); if let Some(orig_crate_name) = self.orig_crate_name { diag.arg("orig_crate_name", orig_crate_name); } if let Some(orig_dependency_of) = self.orig_dependency_of { diag.arg("orig_dependency_of", orig_dependency_of); } diag.arg("orig_path", self.orig_path); if let Some(span) = self.local_span { diag.span(span); } if let Some(span) = self.first_defined_span { diag.span_note(span, inline_fluent!("the lang item is first defined here")); } else { if self.orig_dependency_of.is_none() { diag.note(inline_fluent!( "the lang item is first defined in crate `{$orig_crate_name}`" )); } else { diag.note(inline_fluent!("the lang item is first defined in crate `{$orig_crate_name}` (which `{$orig_dependency_of}` depends on)")); } if self.orig_is_local { diag.note(inline_fluent!( "first definition in the local crate (`{$orig_crate_name}`)" )); } else { diag.note(inline_fluent!( "first definition in `{$orig_crate_name}` loaded from {$orig_path}" )); } if self.is_local { diag.note(inline_fluent!("second definition in the local crate (`{$crate_name}`)")); } else { diag.note(inline_fluent!( "second definition in `{$crate_name}` loaded from {$path}" )); } } diag } } #[derive(Diagnostic)] #[diag("`{$name}` lang item must be applied to a {$kind} with {$at_least -> [true] at least {$num} *[false] {$num} } generic {$num -> [one] argument *[other] arguments }", code = E0718)] pub(crate) struct IncorrectTarget<'a> { #[primary_span] pub span: Span, #[label( "this {$kind} has {$actual_num} generic {$actual_num -> [one] argument *[other] arguments }" )] pub generics_span: Span, pub name: &'a str, // cannot be symbol because it renders e.g. `r#fn` instead of `fn` pub kind: &'static str, pub num: usize, pub actual_num: usize, pub at_least: bool, } #[derive(Diagnostic)] #[diag("lang items are not allowed in stable dylibs")] pub(crate) struct IncorrectCrateType { #[primary_span] pub span: Span, } #[derive(LintDiagnostic)] #[diag( "useless assignment of {$is_field_assign -> [true] field *[false] variable } of type `{$ty}` to itself" )] pub(crate) struct UselessAssignment<'a> { pub is_field_assign: bool, pub ty: Ty<'a>, } #[derive(LintDiagnostic)] #[diag("`#[inline]` is ignored on externally exported functions")] #[help( "externally exported functions are functions with `#[no_mangle]`, `#[export_name]`, or `#[linkage]`" )] pub(crate) struct InlineIgnoredForExported {} #[derive(Diagnostic)] #[diag("{$repr}")] pub(crate) struct ObjectLifetimeErr { #[primary_span] pub span: Span, pub repr: String, } #[derive(Diagnostic)] pub(crate) enum AttrApplication { #[diag("attribute should be applied to an enum", code = E0517)] Enum { #[primary_span] hint_span: Span, #[label("not an enum")] span: Span, }, #[diag("attribute should be applied to a struct", code = E0517)] Struct { #[primary_span] hint_span: Span, #[label("not a struct")] span: Span, }, #[diag("attribute should be applied to a struct or union", code = E0517)] StructUnion { #[primary_span] hint_span: Span, #[label("not a struct or union")] span: Span, }, #[diag("attribute should be applied to a struct, enum, or union", code = E0517)] StructEnumUnion { #[primary_span] hint_span: Span, #[label("not a struct, enum, or union")] span: Span, }, } #[derive(Diagnostic)] #[diag("transparent {$target} cannot have other repr hints", code = E0692)] pub(crate) struct TransparentIncompatible { #[primary_span] pub hint_spans: Vec<Span>, pub target: String, } #[derive(Diagnostic)] #[diag("deprecated attribute must be paired with either stable or unstable attribute", code = E0549)] pub(crate) struct DeprecatedAttribute { #[primary_span] pub span: Span, } #[derive(Diagnostic)] #[diag("this stability annotation is useless")] pub(crate) struct UselessStability { #[primary_span] #[label("useless stability annotation")] pub span: Span, #[label("the stability attribute annotates this item")] pub item_sp: Span, } #[derive(Diagnostic)] #[diag("an API can't be stabilized after it is deprecated")] pub(crate) struct CannotStabilizeDeprecated { #[primary_span] #[label("invalid version")] pub span: Span, #[label("the stability attribute annotates this item")] pub item_sp: Span, } #[derive(Diagnostic)] #[diag("can't mark as unstable using an already stable feature")] pub(crate) struct UnstableAttrForAlreadyStableFeature { #[primary_span] #[label("this feature is already stable")] #[help("consider removing the attribute")] pub attr_span: Span, #[label("the stability attribute annotates this item")] pub item_span: Span, } #[derive(Diagnostic)] #[diag("{$descr} has missing stability attribute")] pub(crate) struct MissingStabilityAttr<'a> { #[primary_span] pub span: Span, pub descr: &'a str, } #[derive(Diagnostic)] #[diag("{$descr} has missing const stability attribute")] pub(crate) struct MissingConstStabAttr<'a> { #[primary_span] pub span: Span, pub descr: &'a str, } #[derive(Diagnostic)] #[diag("trait implementations cannot be const stable yet")] #[note("see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information")] pub(crate) struct TraitImplConstStable { #[primary_span] pub span: Span, } #[derive(Diagnostic)] #[diag("const stability on the impl does not match the const stability on the trait")] pub(crate) struct TraitImplConstStabilityMismatch { #[primary_span] pub span: Span, #[subdiagnostic] pub impl_stability: ImplConstStability, #[subdiagnostic] pub trait_stability: TraitConstStability, } #[derive(Subdiagnostic)] pub(crate) enum TraitConstStability { #[note("...but the trait is stable")] Stable { #[primary_span] span: Span, }, #[note("...but the trait is unstable")] Unstable { #[primary_span] span: Span, }, } #[derive(Subdiagnostic)] pub(crate) enum ImplConstStability { #[note("this impl is (implicitly) stable...")] Stable { #[primary_span] span: Span, }, #[note("this impl is unstable...")] Unstable { #[primary_span] span: Span, }, } #[derive(Diagnostic)] #[diag("unknown feature `{$feature}`", code = E0635)] pub(crate) struct UnknownFeature { #[primary_span] pub span: Span, pub feature: Symbol, #[subdiagnostic] pub suggestion: Option<MisspelledFeature>, } #[derive(Subdiagnostic)] #[suggestion( "there is a feature with a similar name: `{$actual_name}`", style = "verbose", code = "{actual_name}", applicability = "maybe-incorrect" )] pub(crate) struct MisspelledFeature { #[primary_span] pub span: Span, pub actual_name: Symbol, } #[derive(Diagnostic)] #[diag("feature `{$alias}` has been renamed to `{$feature}`", code = E0635)] pub(crate) struct RenamedFeature { #[primary_span] pub span: Span, pub feature: Symbol, pub alias: Symbol, } #[derive(Diagnostic)] #[diag("feature `{$implied_by}` implying `{$feature}` does not exist")] pub(crate) struct ImpliedFeatureNotExist { #[primary_span] pub span: Span, pub feature: Symbol, pub implied_by: Symbol, } #[derive(Diagnostic)] #[diag("the feature `{$feature}` has already been enabled", code = E0636)] pub(crate) struct DuplicateFeatureErr { #[primary_span] pub span: Span, pub feature: Symbol, } #[derive(Diagnostic)] #[diag( "attributes `#[rustc_const_unstable]`, `#[rustc_const_stable]` and `#[rustc_const_stable_indirect]` require the function or method to be `const`" )] pub(crate) struct MissingConstErr { #[primary_span] #[help("make the function or method const")] pub fn_sig_span: Span, } #[derive(Diagnostic)] #[diag( "attribute `#[rustc_const_stable]` can only be applied to functions that are declared `#[stable]`" )] pub(crate) struct ConstStableNotStable { #[primary_span] pub fn_sig_span: Span, #[label("attribute specified here")] pub const_span: Span, } #[derive(LintDiagnostic)] pub(crate) enum MultipleDeadCodes<'tcx> { #[diag( "{ $multiple -> *[true] multiple {$descr}s are [false] { $num -> [one] {$descr} {$name_list} is *[other] {$descr}s {$name_list} are } } never {$participle}" )] DeadCodes { multiple: bool, num: usize, descr: &'tcx str, participle: &'tcx str, name_list: DiagSymbolList, #[subdiagnostic] // only on DeadCodes since it's never a problem for tuple struct fields enum_variants_with_same_name: Vec<EnumVariantSameName<'tcx>>, #[subdiagnostic] parent_info: Option<ParentInfo<'tcx>>, #[subdiagnostic] ignored_derived_impls: Option<IgnoredDerivedImpls>, }, #[diag( "{ $multiple -> *[true] multiple {$descr}s are [false] { $num -> [one] {$descr} {$name_list} is *[other] {$descr}s {$name_list} are } } never {$participle}" )] UnusedTupleStructFields { multiple: bool, num: usize, descr: &'tcx str, participle: &'tcx str, name_list: DiagSymbolList, #[subdiagnostic] change_fields_suggestion: ChangeFields, #[subdiagnostic] parent_info: Option<ParentInfo<'tcx>>, #[subdiagnostic] ignored_derived_impls: Option<IgnoredDerivedImpls>, }, } #[derive(Subdiagnostic)] #[note( "it is impossible to refer to the {$dead_descr} `{$dead_name}` because it is shadowed by this enum variant with the same name" )] pub(crate) struct EnumVariantSameName<'tcx> { #[primary_span] pub variant_span: Span, pub dead_name: Symbol, pub dead_descr: &'tcx str, } #[derive(Subdiagnostic)] #[label( "{$num -> [one] {$descr} *[other] {$descr}s } in this {$parent_descr}" )] pub(crate) struct ParentInfo<'tcx> { pub num: usize, pub descr: &'tcx str, pub parent_descr: &'tcx str, #[primary_span] pub span: Span, } #[derive(Subdiagnostic)] #[note( "`{$name}` has {$trait_list_len -> [one] a derived impl *[other] derived impls } for the {$trait_list_len -> [one] trait {$trait_list}, but this is *[other] traits {$trait_list}, but these are } intentionally ignored during dead code analysis" )] pub(crate) struct IgnoredDerivedImpls { pub name: Symbol, pub trait_list: DiagSymbolList, pub trait_list_len: usize, } #[derive(Subdiagnostic)] pub(crate) enum ChangeFields { #[multipart_suggestion( "consider changing the { $num -> [one] field *[other] fields } to be of unit type to suppress this warning while preserving the field numbering, or remove the { $num -> [one] field *[other] fields }", applicability = "has-placeholders" )] ChangeToUnitTypeOrRemove { num: usize, #[suggestion_part(code = "()")] spans: Vec<Span>, }, #[help( "consider removing { $num -> [one] this *[other] these } { $num -> [one] field *[other] fields }" )] Remove { num: usize }, } #[derive(Diagnostic)] #[diag("{$kind} has incorrect signature")] pub(crate) struct ProcMacroBadSig { #[primary_span] pub span: Span, pub kind: ProcMacroKind, } #[derive(LintDiagnostic)] #[diag( "the feature `{$feature}` has been stable since {$since} and no longer requires an attribute to enable" )] pub(crate) struct UnnecessaryStableFeature { pub feature: Symbol, pub since: Symbol, } #[derive(LintDiagnostic)] #[diag( "the feature `{$feature}` has been partially stabilized since {$since} and is succeeded by the feature `{$implies}`" )] pub(crate) struct UnnecessaryPartialStableFeature { #[suggestion( "if you are using features which are still unstable, change to using `{$implies}`", code = "{implies}", applicability = "maybe-incorrect" )] pub span: Span, #[suggestion( "if you are using features which are now stable, remove this line", code = "", applicability = "maybe-incorrect" )] pub line: Span, pub feature: Symbol, pub since: Symbol, pub implies: Symbol, } #[derive(LintDiagnostic)] #[diag("an `#[unstable]` annotation here has no effect")] #[note("see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information")] pub(crate) struct IneffectiveUnstableImpl; #[derive(Diagnostic)] #[diag("sanitize attribute not allowed here")] pub(crate) struct SanitizeAttributeNotAllowed { #[primary_span] pub attr_span: Span, #[label("not a function, impl block, or module")] pub not_fn_impl_mod: Option<Span>, #[label("function has no body")] pub no_body: Option<Span>, #[help("sanitize attribute can be applied to a function (with body), impl block, or module")] pub help: (), } // FIXME(jdonszelmann): move back to rustc_attr #[derive(Diagnostic)] #[diag( "`const_stable_indirect` attribute does not make sense on `rustc_const_stable` function, its behavior is already implied" )] pub(crate) struct RustcConstStableIndirectPairing { #[primary_span] pub span: Span, } #[derive(Diagnostic)] #[diag("most attributes are not supported in `where` clauses")] #[help("only `#[cfg]` and `#[cfg_attr]` are supported")] pub(crate) struct UnsupportedAttributesInWhere { #[primary_span] pub span: MultiSpan, } #[derive(Diagnostic)] pub(crate) enum UnexportableItem<'a> { #[diag("{$descr}'s are not exportable")] Item { #[primary_span] span: Span, descr: &'a str, }, #[diag("generic functions are not exportable")] GenericFn(#[primary_span] Span), #[diag("only functions with \"C\" ABI are exportable")] FnAbi(#[primary_span] Span), #[diag("types with unstable layout are not exportable")] TypeRepr(#[primary_span] Span), #[diag("{$desc} with `#[export_stable]` attribute uses type `{$ty}`, which is not exportable")] TypeInInterface { #[primary_span] span: Span, desc: &'a str, ty: &'a str, #[label("not exportable")] ty_span: Span, }, #[diag("private items are not exportable")] PrivItem { #[primary_span] span: Span, #[note("is only usable at visibility `{$vis_descr}`")] vis_note: Span, vis_descr: &'a str, }, #[diag("ADT types with private fields are not exportable")] AdtWithPrivFields { #[primary_span] span: Span, #[note("`{$field_name}` is private")] vis_note: Span, field_name: &'a str, }, } #[derive(Diagnostic)] #[diag("`#[repr(align(...))]` is not supported on {$item}")] pub(crate) struct ReprAlignShouldBeAlign { #[primary_span] #[help("use `#[rustc_align(...)]` instead")] pub span: Span, pub item: &'static str, } #[derive(Diagnostic)] #[diag("`#[repr(align(...))]` is not supported on {$item}")] pub(crate) struct ReprAlignShouldBeAlignStatic { #[primary_span] #[help("use `#[rustc_align_static(...)]` instead")] pub span: Span, pub item: &'static str, } #[derive(Diagnostic)] #[diag("`dialect` key required")] pub(crate) struct CustomMirPhaseRequiresDialect { #[primary_span] pub attr_span: Span, #[label("`phase` argument requires a `dialect` argument")] pub phase_span: Span, } #[derive(Diagnostic)] #[diag("the {$dialect} dialect is not compatible with the {$phase} phase")] pub(crate) struct CustomMirIncompatibleDialectAndPhase { pub dialect: MirDialect, pub phase: MirPhase, #[primary_span] pub attr_span: Span, #[label("this dialect...")] pub dialect_span: Span, #[label("... is not compatible with this phase")] pub phase_span: Span, } #[derive(Diagnostic)] #[diag("`eii_macro_for` is only valid on functions")] pub(crate) struct EiiImplNotFunction { #[primary_span] pub span: Span, } #[derive(Diagnostic)] #[diag("`#[{$name}]` is unsafe to implement")] pub(crate) struct EiiImplRequiresUnsafe { #[primary_span] pub span: Span, pub name: Symbol, #[subdiagnostic] pub suggestion: EiiImplRequiresUnsafeSuggestion, } #[derive(Subdiagnostic)] #[multipart_suggestion("wrap the attribute in `unsafe(...)`", applicability = "machine-applicable")] pub(crate) struct EiiImplRequiresUnsafeSuggestion { #[suggestion_part(code = "unsafe(")] pub left: Span, #[suggestion_part(code = ")")] pub right: Span, } #[derive(Diagnostic)] #[diag("`#[{$name}]` is not allowed to have `#[track_caller]`")] pub(crate) struct EiiWithTrackCaller { #[primary_span] pub attr_span: Span, pub name: Symbol, #[label("`#[{$name}]` is not allowed to have `#[track_caller]`")] pub sig_span: Span, } #[derive(Diagnostic)] #[diag("`#[{$name}]` required, but not found")] pub(crate) struct EiiWithoutImpl { #[primary_span] #[label("expected because `#[{$name}]` was declared here in crate `{$decl_crate_name}`")] pub span: Span, pub name: Symbol, pub current_crate_name: Symbol, pub decl_crate_name: Symbol, #[help( "expected at least one implementation in crate `{$current_crate_name}` or any of its dependencies" )] pub help: (), } #[derive(Diagnostic)] #[diag("multiple implementations of `#[{$name}]`")] pub(crate) struct DuplicateEiiImpls { pub name: Symbol, #[primary_span] #[label("first implemented here in crate `{$first_crate}`")] pub first_span: Span, pub first_crate: Symbol, #[label("also implemented here in crate `{$second_crate}`")] pub second_span: Span, pub second_crate: Symbol, #[note("in addition to these two, { $num_additional_crates -> [one] another implementation was found in crate {$additional_crate_names} *[other] more implementations were also found in the following crates: {$additional_crate_names} }")] pub additional_crates: Option<()>, pub num_additional_crates: usize, pub additional_crate_names: String, #[help( "an \"externally implementable item\" can only have a single implementation in the final artifact. When multiple implementations are found, also in different crates, they conflict" )] pub help: (), } #[derive(Diagnostic)] #[diag("function doesn't have a default implementation")] pub(crate) struct FunctionNotHaveDefaultImplementation { #[primary_span] pub span: Span, #[note("required by this annotation")] pub note_span: Span, } #[derive(Diagnostic)] #[diag("not a function")] pub(crate) struct MustImplementNotFunction { #[primary_span] pub span: Span, #[subdiagnostic] pub span_note: MustImplementNotFunctionSpanNote, #[subdiagnostic] pub note: MustImplementNotFunctionNote, } #[derive(Subdiagnostic)] #[note("required by this annotation")] pub(crate) struct MustImplementNotFunctionSpanNote { #[primary_span] pub span: Span, } #[derive(Subdiagnostic)] #[note("all `#[rustc_must_implement_one_of]` arguments must be associated function names")] pub(crate) struct MustImplementNotFunctionNote {} #[derive(Diagnostic)] #[diag("function not found in this trait")] pub(crate) struct FunctionNotFoundInTrait { #[primary_span] pub span: Span, } #[derive(Diagnostic)] #[diag("functions names are duplicated")] #[note("all `#[rustc_must_implement_one_of]` arguments must be unique")] pub(crate) struct FunctionNamesDuplicated { #[primary_span] pub spans: Vec<Span>, }
rust
github
https://github.com/rust-lang/rust
compiler/rustc_passes/src/errors.rs
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging from cStringIO import StringIO import posixpath import traceback from zipfile import ZipFile import appengine_blobstore as blobstore from appengine_url_fetcher import AppEngineUrlFetcher from appengine_wrappers import urlfetch from docs_server_utils import StringIdentity from file_system import FileNotFoundError, FileSystem, FileSystemError, StatInfo from future import Future from object_store_creator import ObjectStoreCreator from path_util import AssertIsDirectory, IsDirectory import url_constants _GITHUB_REPOS_NAMESPACE = 'GithubRepos' def _LoadCredentials(object_store_creator): '''Returns (username, password) from |password_store|. ''' password_store = object_store_creator.Create( GithubFileSystem, app_version=None, category='password', start_empty=False) password_data = password_store.GetMulti(('username', 'password')).Get() return password_data.get('username'), password_data.get('password') class _GithubZipFile(object): '''A view of a ZipFile with a more convenient interface which ignores the 'zipball' prefix that all paths have. The zip files that come straight from GitHub have paths like ['zipball/foo.txt', 'zipball/bar.txt'] but we only care about ['foo.txt', 'bar.txt']. ''' @classmethod def Create(cls, repo_name, blob): try: zipball = ZipFile(StringIO(blob)) except: logging.warning('zipball "%s" is not a valid zip' % repo_name) return None if not zipball.namelist(): logging.warning('zipball "%s" is empty' % repo_name) return None name_prefix = None # probably 'zipball' paths = [] for name in zipball.namelist(): prefix, path = name.split('/', 1) if name_prefix and prefix != name_prefix: logging.warning('zipball "%s" has names with inconsistent prefix: %s' % (repo_name, zipball.namelist())) return None name_prefix = prefix paths.append(path) return cls(zipball, name_prefix, paths) def __init__(self, zipball, name_prefix, paths): self._zipball = zipball self._name_prefix = name_prefix self._paths = paths def Paths(self): '''Return all file paths in this zip file. ''' return self._paths def List(self, path): '''Returns all files within a directory at |path|. Not recursive. Paths are returned relative to |path|. ''' AssertIsDirectory(path) return [p[len(path):] for p in self._paths if p != path and p.startswith(path) and '/' not in p[len(path):].rstrip('/')] def Read(self, path): '''Returns the contents of |path|. Raises a KeyError if it doesn't exist. ''' return self._zipball.read(posixpath.join(self._name_prefix, path)) class GithubFileSystem(FileSystem): '''Allows reading from a github.com repository. ''' @staticmethod def Create(owner, repo, object_store_creator): '''Creates a GithubFileSystem that corresponds to a single github repository specified by |owner| and |repo|. ''' return GithubFileSystem( url_constants.GITHUB_REPOS, owner, repo, object_store_creator, AppEngineUrlFetcher) @staticmethod def ForTest(repo, fake_fetcher, path=None, object_store_creator=None): '''Creates a GithubFileSystem that can be used for testing. It reads zip files and commit data from server2/test_data/github_file_system/test_owner instead of github.com. It reads from files specified by |repo|. ''' return GithubFileSystem( path if path is not None else 'test_data/github_file_system', 'test_owner', repo, object_store_creator or ObjectStoreCreator.ForTest(), fake_fetcher) def __init__(self, base_url, owner, repo, object_store_creator, Fetcher): self._repo_key = posixpath.join(owner, repo) self._repo_url = posixpath.join(base_url, owner, repo) self._username, self._password = _LoadCredentials(object_store_creator) self._blobstore = blobstore.AppEngineBlobstore() self._fetcher = Fetcher(self._repo_url) # Stores whether the github is up-to-date. This will either be True or # empty, the emptiness most likely due to this being a cron run. self._up_to_date_cache = object_store_creator.Create( GithubFileSystem, category='up-to-date') # Caches the zip file's stat. Overrides start_empty=False and use # |self._up_to_date_cache| to determine whether we need to refresh. self._stat_cache = object_store_creator.Create( GithubFileSystem, category='stat-cache', start_empty=False) # Created lazily in |_EnsureRepoZip|. self._repo_zip = None def _EnsureRepoZip(self): '''Initializes |self._repo_zip| if it hasn't already been (i.e. if _EnsureRepoZip has never been called before). In that case |self._repo_zip| will be set to a Future of _GithubZipFile and the fetch process started, whether that be from a blobstore or if necessary all the way from GitHub. ''' if self._repo_zip is not None: return repo_key, repo_url, username, password = ( self._repo_key, self._repo_url, self._username, self._password) def fetch_from_blobstore(version): '''Returns a Future which resolves to the _GithubZipFile for this repo fetched from blobstore. ''' blob = None try: blob = self._blobstore.Get(repo_url, _GITHUB_REPOS_NAMESPACE) except blobstore.BlobNotFoundError: pass if blob is None: logging.warning('No blob for %s found in datastore' % repo_key) return fetch_from_github(version) repo_zip = _GithubZipFile.Create(repo_key, blob) if repo_zip is None: logging.warning('Blob for %s was corrupted in blobstore!?' % repo_key) return fetch_from_github(version) return Future(value=repo_zip) def fetch_from_github(version): '''Returns a Future which resolves to the _GithubZipFile for this repo fetched new from GitHub, then writes it to blobstore and |version| to the stat caches. ''' def get_zip(github_zip): try: blob = github_zip.content except urlfetch.DownloadError: raise FileSystemError('Failed to download repo %s file from %s' % (repo_key, repo_url)) repo_zip = _GithubZipFile.Create(repo_key, blob) if repo_zip is None: raise FileSystemError('Blob for %s was fetched corrupted from %s' % (repo_key, repo_url)) self._blobstore.Set(self._repo_url, blob, _GITHUB_REPOS_NAMESPACE) self._up_to_date_cache.Set(repo_key, True) self._stat_cache.Set(repo_key, version) return repo_zip return self._fetcher.FetchAsync( 'zipball', username=username, password=password).Then(get_zip) # To decide whether we need to re-stat, and from there whether to re-fetch, # make use of ObjectStore's start-empty configuration. If # |object_store_creator| is configured to start empty then our creator # wants to refresh (e.g. running a cron), so fetch the live stat from # GitHub. If the stat hasn't changed since last time then no reason to # re-fetch from GitHub, just take from blobstore. cached_version = self._stat_cache.Get(repo_key).Get() if self._up_to_date_cache.Get(repo_key).Get() is None: # This is either a cron or an instance where a cron has never been run. live_version = self._FetchLiveVersion(username, password) if cached_version != live_version: # Note: branch intentionally triggered if |cached_version| is None. logging.info('%s has changed, fetching from GitHub.' % repo_url) self._repo_zip = fetch_from_github(live_version) else: # Already up to date. Fetch from blobstore. No need to set up-to-date # to True here since it'll already be set for instances, and it'll # never be set for crons. logging.info('%s is up to date.' % repo_url) self._repo_zip = fetch_from_blobstore(cached_version) else: # Instance where cron has been run. It should be in blobstore. self._repo_zip = fetch_from_blobstore(cached_version) assert self._repo_zip is not None def _FetchLiveVersion(self, username, password): '''Fetches the current repository version from github.com and returns it. The version is a 'sha' hash value. ''' # TODO(kalman): Do this asynchronously (use FetchAsync). result = self._fetcher.Fetch( 'commits/HEAD', username=username, password=password) try: return json.loads(result.content)['sha'] except (KeyError, ValueError): raise FileSystemError('Error parsing JSON from repo %s: %s' % (self._repo_url, traceback.format_exc())) def Refresh(self): return self.ReadSingle('') def Read(self, paths, skip_not_found=False): '''Returns a directory mapping |paths| to the contents of the file at each path. If path ends with a '/', it is treated as a directory and is mapped to a list of filenames in that directory. ''' self._EnsureRepoZip() def read(repo_zip): reads = {} for path in paths: if path not in repo_zip.Paths(): raise FileNotFoundError('"%s": %s not found' % (self._repo_key, path)) if IsDirectory(path): reads[path] = repo_zip.List(path) else: reads[path] = repo_zip.Read(path) return reads return self._repo_zip.Then(read) def Stat(self, path): '''Stats |path| returning its version as as StatInfo object. If |path| ends with a '/', it is assumed to be a directory and the StatInfo object returned includes child_versions for all paths in the directory. File paths do not include the name of the zip file, which is arbitrary and useless to consumers. Because the repository will only be downloaded once per server version, all stat versions are always 0. ''' self._EnsureRepoZip() repo_zip = self._repo_zip.Get() if path not in repo_zip.Paths(): raise FileNotFoundError('"%s" does not contain file "%s"' % (self._repo_key, path)) version = self._stat_cache.Get(self._repo_key).Get() assert version is not None, ('There was a zipball in datastore; there ' 'should be a version cached for it') stat_info = StatInfo(version) if IsDirectory(path): stat_info.child_versions = dict((p, StatInfo(version)) for p in repo_zip.List(path)) return stat_info def GetIdentity(self): return '%s' % StringIdentity(self.__class__.__name__ + self._repo_key) def __repr__(self): return '%s(key=%s, url=%s)' % (type(self).__name__, self._repo_key, self._repo_url)
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0-only /* * fs/fs-writeback.c * * Copyright (C) 2002, Linus Torvalds. * * Contains all the functions related to writing back and waiting * upon dirty inodes against superblocks, and writing back dirty * pages against inodes. ie: data writeback. Writeout of the * inode itself is not handled here. * * 10Apr2002 Andrew Morton * Split out of fs/inode.c * Additions for address_space-based writeback */ #include <linux/sched/sysctl.h> #include <linux/kernel.h> #include <linux/export.h> #include <linux/spinlock.h> #include <linux/slab.h> #include <linux/sched.h> #include <linux/fs.h> #include <linux/mm.h> #include <linux/pagemap.h> #include <linux/kthread.h> #include <linux/writeback.h> #include <linux/blkdev.h> #include <linux/backing-dev.h> #include <linux/tracepoint.h> #include <linux/device.h> #include <linux/memcontrol.h> #include "internal.h" /* * Passed into wb_writeback(), essentially a subset of writeback_control */ struct wb_writeback_work { long nr_pages; struct super_block *sb; enum writeback_sync_modes sync_mode; unsigned int tagged_writepages:1; unsigned int for_kupdate:1; unsigned int range_cyclic:1; unsigned int for_background:1; unsigned int for_sync:1; /* sync(2) WB_SYNC_ALL writeback */ unsigned int auto_free:1; /* free on completion */ enum wb_reason reason; /* why was writeback initiated? */ struct list_head list; /* pending work list */ struct wb_completion *done; /* set if the caller waits */ }; /* * If an inode is constantly having its pages dirtied, but then the * updates stop dirtytime_expire_interval seconds in the past, it's * possible for the worst case time between when an inode has its * timestamps updated and when they finally get written out to be two * dirtytime_expire_intervals. We set the default to 12 hours (in * seconds), which means most of the time inodes will have their * timestamps written to disk after 12 hours, but in the worst case a * few inodes might not their timestamps updated for 24 hours. */ static unsigned int dirtytime_expire_interval = 12 * 60 * 60; static inline struct inode *wb_inode(struct list_head *head) { return list_entry(head, struct inode, i_io_list); } /* * Include the creation of the trace points after defining the * wb_writeback_work structure and inline functions so that the definition * remains local to this file. */ #define CREATE_TRACE_POINTS #include <trace/events/writeback.h> EXPORT_TRACEPOINT_SYMBOL_GPL(wbc_writepage); static bool wb_io_lists_populated(struct bdi_writeback *wb) { if (wb_has_dirty_io(wb)) { return false; } else { set_bit(WB_has_dirty_io, &wb->state); WARN_ON_ONCE(!wb->avg_write_bandwidth); atomic_long_add(wb->avg_write_bandwidth, &wb->bdi->tot_write_bandwidth); return true; } } static void wb_io_lists_depopulated(struct bdi_writeback *wb) { if (wb_has_dirty_io(wb) && list_empty(&wb->b_dirty) && list_empty(&wb->b_io) && list_empty(&wb->b_more_io)) { clear_bit(WB_has_dirty_io, &wb->state); WARN_ON_ONCE(atomic_long_sub_return(wb->avg_write_bandwidth, &wb->bdi->tot_write_bandwidth) < 0); } } /** * inode_io_list_move_locked - move an inode onto a bdi_writeback IO list * @inode: inode to be moved * @wb: target bdi_writeback * @head: one of @wb->b_{dirty|io|more_io|dirty_time} * * Move @inode->i_io_list to @list of @wb and set %WB_has_dirty_io. * Returns %true if @inode is the first occupant of the !dirty_time IO * lists; otherwise, %false. */ static bool inode_io_list_move_locked(struct inode *inode, struct bdi_writeback *wb, struct list_head *head) { assert_spin_locked(&wb->list_lock); assert_spin_locked(&inode->i_lock); WARN_ON_ONCE(inode_state_read(inode) & I_FREEING); list_move(&inode->i_io_list, head); /* dirty_time doesn't count as dirty_io until expiration */ if (head != &wb->b_dirty_time) return wb_io_lists_populated(wb); wb_io_lists_depopulated(wb); return false; } static void wb_wakeup(struct bdi_writeback *wb) { spin_lock_irq(&wb->work_lock); if (test_bit(WB_registered, &wb->state)) mod_delayed_work(bdi_wq, &wb->dwork, 0); spin_unlock_irq(&wb->work_lock); } /* * This function is used when the first inode for this wb is marked dirty. It * wakes-up the corresponding bdi thread which should then take care of the * periodic background write-out of dirty inodes. Since the write-out would * starts only 'dirty_writeback_interval' centisecs from now anyway, we just * set up a timer which wakes the bdi thread up later. * * Note, we wouldn't bother setting up the timer, but this function is on the * fast-path (used by '__mark_inode_dirty()'), so we save few context switches * by delaying the wake-up. * * We have to be careful not to postpone flush work if it is scheduled for * earlier. Thus we use queue_delayed_work(). */ static void wb_wakeup_delayed(struct bdi_writeback *wb) { unsigned long timeout; timeout = msecs_to_jiffies(dirty_writeback_interval * 10); spin_lock_irq(&wb->work_lock); if (test_bit(WB_registered, &wb->state)) queue_delayed_work(bdi_wq, &wb->dwork, timeout); spin_unlock_irq(&wb->work_lock); } static void finish_writeback_work(struct wb_writeback_work *work) { struct wb_completion *done = work->done; if (work->auto_free) kfree(work); if (done) { wait_queue_head_t *waitq = done->waitq; /* @done can't be accessed after the following dec */ if (atomic_dec_and_test(&done->cnt)) wake_up_all(waitq); } } static void wb_queue_work(struct bdi_writeback *wb, struct wb_writeback_work *work) { trace_writeback_queue(wb, work); if (work->done) atomic_inc(&work->done->cnt); spin_lock_irq(&wb->work_lock); if (test_bit(WB_registered, &wb->state)) { list_add_tail(&work->list, &wb->work_list); mod_delayed_work(bdi_wq, &wb->dwork, 0); } else finish_writeback_work(work); spin_unlock_irq(&wb->work_lock); } static bool wb_wait_for_completion_cb(struct wb_completion *done) { unsigned long waited_secs = (jiffies - done->wait_start) / HZ; done->progress_stamp = jiffies; if (waited_secs > sysctl_hung_task_timeout_secs) pr_info("INFO: The task %s:%d has been waiting for writeback " "completion for more than %lu seconds.", current->comm, current->pid, waited_secs); return !atomic_read(&done->cnt); } /** * wb_wait_for_completion - wait for completion of bdi_writeback_works * @done: target wb_completion * * Wait for one or more work items issued to @bdi with their ->done field * set to @done, which should have been initialized with * DEFINE_WB_COMPLETION(). This function returns after all such work items * are completed. Work items which are waited upon aren't freed * automatically on completion. */ void wb_wait_for_completion(struct wb_completion *done) { done->wait_start = jiffies; atomic_dec(&done->cnt); /* put down the initial count */ wait_event(*done->waitq, wb_wait_for_completion_cb(done)); } #ifdef CONFIG_CGROUP_WRITEBACK /* * Parameters for foreign inode detection, see wbc_detach_inode() to see * how they're used. * * These paramters are inherently heuristical as the detection target * itself is fuzzy. All we want to do is detaching an inode from the * current owner if it's being written to by some other cgroups too much. * * The current cgroup writeback is built on the assumption that multiple * cgroups writing to the same inode concurrently is very rare and a mode * of operation which isn't well supported. As such, the goal is not * taking too long when a different cgroup takes over an inode while * avoiding too aggressive flip-flops from occasional foreign writes. * * We record, very roughly, 2s worth of IO time history and if more than * half of that is foreign, trigger the switch. The recording is quantized * to 16 slots. To avoid tiny writes from swinging the decision too much, * writes smaller than 1/8 of avg size are ignored. */ #define WB_FRN_TIME_SHIFT 13 /* 1s = 2^13, upto 8 secs w/ 16bit */ #define WB_FRN_TIME_AVG_SHIFT 3 /* avg = avg * 7/8 + new * 1/8 */ #define WB_FRN_TIME_CUT_DIV 8 /* ignore rounds < avg / 8 */ #define WB_FRN_TIME_PERIOD (2 * (1 << WB_FRN_TIME_SHIFT)) /* 2s */ #define WB_FRN_HIST_SLOTS 16 /* inode->i_wb_frn_history is 16bit */ #define WB_FRN_HIST_UNIT (WB_FRN_TIME_PERIOD / WB_FRN_HIST_SLOTS) /* each slot's duration is 2s / 16 */ #define WB_FRN_HIST_THR_SLOTS (WB_FRN_HIST_SLOTS / 2) /* if foreign slots >= 8, switch */ #define WB_FRN_HIST_MAX_SLOTS (WB_FRN_HIST_THR_SLOTS / 2 + 1) /* one round can affect upto 5 slots */ #define WB_FRN_MAX_IN_FLIGHT 1024 /* don't queue too many concurrently */ /* * Maximum inodes per isw. A specific value has been chosen to make * struct inode_switch_wbs_context fit into 1024 bytes kmalloc. */ #define WB_MAX_INODES_PER_ISW ((1024UL - sizeof(struct inode_switch_wbs_context)) \ / sizeof(struct inode *)) static atomic_t isw_nr_in_flight = ATOMIC_INIT(0); static struct workqueue_struct *isw_wq; void __inode_attach_wb(struct inode *inode, struct folio *folio) { struct backing_dev_info *bdi = inode_to_bdi(inode); struct bdi_writeback *wb = NULL; if (inode_cgwb_enabled(inode)) { struct cgroup_subsys_state *memcg_css; if (folio) { memcg_css = mem_cgroup_css_from_folio(folio); wb = wb_get_create(bdi, memcg_css, GFP_ATOMIC); } else { /* must pin memcg_css, see wb_get_create() */ memcg_css = task_get_css(current, memory_cgrp_id); wb = wb_get_create(bdi, memcg_css, GFP_ATOMIC); css_put(memcg_css); } } if (!wb) wb = &bdi->wb; /* * There may be multiple instances of this function racing to * update the same inode. Use cmpxchg() to tell the winner. */ if (unlikely(cmpxchg(&inode->i_wb, NULL, wb))) wb_put(wb); } /** * inode_cgwb_move_to_attached - put the inode onto wb->b_attached list * @inode: inode of interest with i_lock held * @wb: target bdi_writeback * * Remove the inode from wb's io lists and if necessarily put onto b_attached * list. Only inodes attached to cgwb's are kept on this list. */ static void inode_cgwb_move_to_attached(struct inode *inode, struct bdi_writeback *wb) { assert_spin_locked(&wb->list_lock); assert_spin_locked(&inode->i_lock); WARN_ON_ONCE(inode_state_read(inode) & I_FREEING); inode_state_clear(inode, I_SYNC_QUEUED); if (wb != &wb->bdi->wb) list_move(&inode->i_io_list, &wb->b_attached); else list_del_init(&inode->i_io_list); wb_io_lists_depopulated(wb); } /** * locked_inode_to_wb_and_lock_list - determine a locked inode's wb and lock it * @inode: inode of interest with i_lock held * * Returns @inode's wb with its list_lock held. @inode->i_lock must be * held on entry and is released on return. The returned wb is guaranteed * to stay @inode's associated wb until its list_lock is released. */ static struct bdi_writeback * locked_inode_to_wb_and_lock_list(struct inode *inode) __releases(&inode->i_lock) __acquires(&wb->list_lock) { while (true) { struct bdi_writeback *wb = inode_to_wb(inode); /* * inode_to_wb() association is protected by both * @inode->i_lock and @wb->list_lock but list_lock nests * outside i_lock. Drop i_lock and verify that the * association hasn't changed after acquiring list_lock. */ wb_get(wb); spin_unlock(&inode->i_lock); spin_lock(&wb->list_lock); /* i_wb may have changed inbetween, can't use inode_to_wb() */ if (likely(wb == inode->i_wb)) { wb_put(wb); /* @inode already has ref */ return wb; } spin_unlock(&wb->list_lock); wb_put(wb); cpu_relax(); spin_lock(&inode->i_lock); } } /** * inode_to_wb_and_lock_list - determine an inode's wb and lock it * @inode: inode of interest * * Same as locked_inode_to_wb_and_lock_list() but @inode->i_lock isn't held * on entry. */ static struct bdi_writeback *inode_to_wb_and_lock_list(struct inode *inode) __acquires(&wb->list_lock) { spin_lock(&inode->i_lock); return locked_inode_to_wb_and_lock_list(inode); } struct inode_switch_wbs_context { /* List of queued switching contexts for the wb */ struct llist_node list; /* * Multiple inodes can be switched at once. The switching procedure * consists of two parts, separated by a RCU grace period. To make * sure that the second part is executed for each inode gone through * the first part, all inode pointers are placed into a NULL-terminated * array embedded into struct inode_switch_wbs_context. Otherwise * an inode could be left in a non-consistent state. */ struct inode *inodes[]; }; static void bdi_down_write_wb_switch_rwsem(struct backing_dev_info *bdi) { down_write(&bdi->wb_switch_rwsem); } static void bdi_up_write_wb_switch_rwsem(struct backing_dev_info *bdi) { up_write(&bdi->wb_switch_rwsem); } static bool inode_do_switch_wbs(struct inode *inode, struct bdi_writeback *old_wb, struct bdi_writeback *new_wb) { struct address_space *mapping = inode->i_mapping; XA_STATE(xas, &mapping->i_pages, 0); struct folio *folio; bool switched = false; spin_lock(&inode->i_lock); xa_lock_irq(&mapping->i_pages); /* * Once I_FREEING or I_WILL_FREE are visible under i_lock, the eviction * path owns the inode and we shouldn't modify ->i_io_list. */ if (unlikely(inode_state_read(inode) & (I_FREEING | I_WILL_FREE))) goto skip_switch; trace_inode_switch_wbs(inode, old_wb, new_wb); /* * Count and transfer stats. Note that PAGECACHE_TAG_DIRTY points * to possibly dirty folios while PAGECACHE_TAG_WRITEBACK points to * folios actually under writeback. */ xas_for_each_marked(&xas, folio, ULONG_MAX, PAGECACHE_TAG_DIRTY) { if (folio_test_dirty(folio)) { long nr = folio_nr_pages(folio); wb_stat_mod(old_wb, WB_RECLAIMABLE, -nr); wb_stat_mod(new_wb, WB_RECLAIMABLE, nr); } } xas_set(&xas, 0); xas_for_each_marked(&xas, folio, ULONG_MAX, PAGECACHE_TAG_WRITEBACK) { long nr = folio_nr_pages(folio); WARN_ON_ONCE(!folio_test_writeback(folio)); wb_stat_mod(old_wb, WB_WRITEBACK, -nr); wb_stat_mod(new_wb, WB_WRITEBACK, nr); } if (mapping_tagged(mapping, PAGECACHE_TAG_WRITEBACK)) { atomic_dec(&old_wb->writeback_inodes); atomic_inc(&new_wb->writeback_inodes); } wb_get(new_wb); /* * Transfer to @new_wb's IO list if necessary. If the @inode is dirty, * the specific list @inode was on is ignored and the @inode is put on * ->b_dirty which is always correct including from ->b_dirty_time. * If the @inode was clean, it means it was on the b_attached list, so * move it onto the b_attached list of @new_wb. */ if (!list_empty(&inode->i_io_list)) { inode->i_wb = new_wb; if (inode_state_read(inode) & I_DIRTY_ALL) { /* * We need to keep b_dirty list sorted by * dirtied_time_when. However properly sorting the * inode in the list gets too expensive when switching * many inodes. So just attach inode at the end of the * dirty list and clobber the dirtied_time_when. */ inode->dirtied_time_when = jiffies; inode_io_list_move_locked(inode, new_wb, &new_wb->b_dirty); } else { inode_cgwb_move_to_attached(inode, new_wb); } } else { inode->i_wb = new_wb; } /* ->i_wb_frn updates may race wbc_detach_inode() but doesn't matter */ inode->i_wb_frn_winner = 0; inode->i_wb_frn_avg_time = 0; inode->i_wb_frn_history = 0; switched = true; skip_switch: /* * Paired with an acquire fence in unlocked_inode_to_wb_begin() and * ensures that the new wb is visible if they see !I_WB_SWITCH. */ smp_wmb(); inode_state_clear(inode, I_WB_SWITCH); xa_unlock_irq(&mapping->i_pages); spin_unlock(&inode->i_lock); return switched; } static void process_inode_switch_wbs(struct bdi_writeback *new_wb, struct inode_switch_wbs_context *isw) { struct backing_dev_info *bdi = inode_to_bdi(isw->inodes[0]); struct bdi_writeback *old_wb = isw->inodes[0]->i_wb; unsigned long nr_switched = 0; struct inode **inodep; /* * If @inode switches cgwb membership while sync_inodes_sb() is * being issued, sync_inodes_sb() might miss it. Synchronize. */ down_read(&bdi->wb_switch_rwsem); inodep = isw->inodes; /* * By the time control reaches here, RCU grace period has passed * since I_WB_SWITCH assertion and all wb stat update transactions * between unlocked_inode_to_wb_begin/end() are guaranteed to be * synchronizing against the i_pages lock. * * Grabbing old_wb->list_lock, inode->i_lock and the i_pages lock * gives us exclusion against all wb related operations on @inode * including IO list manipulations and stat updates. */ relock: if (old_wb < new_wb) { spin_lock(&old_wb->list_lock); spin_lock_nested(&new_wb->list_lock, SINGLE_DEPTH_NESTING); } else { spin_lock(&new_wb->list_lock); spin_lock_nested(&old_wb->list_lock, SINGLE_DEPTH_NESTING); } while (*inodep) { WARN_ON_ONCE((*inodep)->i_wb != old_wb); if (inode_do_switch_wbs(*inodep, old_wb, new_wb)) nr_switched++; inodep++; if (*inodep && need_resched()) { spin_unlock(&new_wb->list_lock); spin_unlock(&old_wb->list_lock); cond_resched(); goto relock; } } spin_unlock(&new_wb->list_lock); spin_unlock(&old_wb->list_lock); up_read(&bdi->wb_switch_rwsem); if (nr_switched) { wb_wakeup(new_wb); wb_put_many(old_wb, nr_switched); } for (inodep = isw->inodes; *inodep; inodep++) iput(*inodep); wb_put(new_wb); kfree(isw); atomic_dec(&isw_nr_in_flight); } void inode_switch_wbs_work_fn(struct work_struct *work) { struct bdi_writeback *new_wb = container_of(work, struct bdi_writeback, switch_work); struct inode_switch_wbs_context *isw, *next_isw; struct llist_node *list; /* * Grab out reference to wb so that it cannot get freed under us * after we process all the isw items. */ wb_get(new_wb); while (1) { list = llist_del_all(&new_wb->switch_wbs_ctxs); /* Nothing to do? */ if (!list) break; /* * In addition to synchronizing among switchers, I_WB_SWITCH * tells the RCU protected stat update paths to grab the i_page * lock so that stat transfer can synchronize against them. * Let's continue after I_WB_SWITCH is guaranteed to be * visible. */ synchronize_rcu(); llist_for_each_entry_safe(isw, next_isw, list, list) process_inode_switch_wbs(new_wb, isw); } wb_put(new_wb); } static bool inode_prepare_wbs_switch(struct inode *inode, struct bdi_writeback *new_wb) { /* * Paired with smp_mb() in cgroup_writeback_umount(). * isw_nr_in_flight must be increased before checking SB_ACTIVE and * grabbing an inode, otherwise isw_nr_in_flight can be observed as 0 * in cgroup_writeback_umount() and the isw_wq will be not flushed. */ smp_mb(); if (IS_DAX(inode)) return false; /* while holding I_WB_SWITCH, no one else can update the association */ spin_lock(&inode->i_lock); if (!(inode->i_sb->s_flags & SB_ACTIVE) || inode_state_read(inode) & (I_WB_SWITCH | I_FREEING | I_WILL_FREE) || inode_to_wb(inode) == new_wb) { spin_unlock(&inode->i_lock); return false; } inode_state_set(inode, I_WB_SWITCH); __iget(inode); spin_unlock(&inode->i_lock); return true; } static void wb_queue_isw(struct bdi_writeback *wb, struct inode_switch_wbs_context *isw) { if (llist_add(&isw->list, &wb->switch_wbs_ctxs)) queue_work(isw_wq, &wb->switch_work); } /** * inode_switch_wbs - change the wb association of an inode * @inode: target inode * @new_wb_id: ID of the new wb * * Switch @inode's wb association to the wb identified by @new_wb_id. The * switching is performed asynchronously and may fail silently. */ static void inode_switch_wbs(struct inode *inode, int new_wb_id) { struct backing_dev_info *bdi = inode_to_bdi(inode); struct cgroup_subsys_state *memcg_css; struct inode_switch_wbs_context *isw; struct bdi_writeback *new_wb = NULL; /* noop if seems to be already in progress */ if (inode_state_read_once(inode) & I_WB_SWITCH) return; /* avoid queueing a new switch if too many are already in flight */ if (atomic_read(&isw_nr_in_flight) > WB_FRN_MAX_IN_FLIGHT) return; isw = kzalloc(struct_size(isw, inodes, 2), GFP_ATOMIC); if (!isw) return; atomic_inc(&isw_nr_in_flight); /* find and pin the new wb */ rcu_read_lock(); memcg_css = css_from_id(new_wb_id, &memory_cgrp_subsys); if (memcg_css && !css_tryget(memcg_css)) memcg_css = NULL; rcu_read_unlock(); if (!memcg_css) goto out_free; new_wb = wb_get_create(bdi, memcg_css, GFP_ATOMIC); css_put(memcg_css); if (!new_wb) goto out_free; if (!inode_prepare_wbs_switch(inode, new_wb)) goto out_free; isw->inodes[0] = inode; trace_inode_switch_wbs_queue(inode->i_wb, new_wb, 1); wb_queue_isw(new_wb, isw); return; out_free: atomic_dec(&isw_nr_in_flight); if (new_wb) wb_put(new_wb); kfree(isw); } static bool isw_prepare_wbs_switch(struct bdi_writeback *new_wb, struct inode_switch_wbs_context *isw, struct list_head *list, int *nr) { struct inode *inode; list_for_each_entry(inode, list, i_io_list) { if (!inode_prepare_wbs_switch(inode, new_wb)) continue; isw->inodes[*nr] = inode; (*nr)++; if (*nr >= WB_MAX_INODES_PER_ISW - 1) return true; } return false; } /** * cleanup_offline_cgwb - detach associated inodes * @wb: target wb * * Switch all inodes attached to @wb to a nearest living ancestor's wb in order * to eventually release the dying @wb. Returns %true if not all inodes were * switched and the function has to be restarted. */ bool cleanup_offline_cgwb(struct bdi_writeback *wb) { struct cgroup_subsys_state *memcg_css; struct inode_switch_wbs_context *isw; struct bdi_writeback *new_wb; int nr; bool restart = false; isw = kzalloc(struct_size(isw, inodes, WB_MAX_INODES_PER_ISW), GFP_KERNEL); if (!isw) return restart; atomic_inc(&isw_nr_in_flight); for (memcg_css = wb->memcg_css->parent; memcg_css; memcg_css = memcg_css->parent) { new_wb = wb_get_create(wb->bdi, memcg_css, GFP_KERNEL); if (new_wb) break; } if (unlikely(!new_wb)) new_wb = &wb->bdi->wb; /* wb_get() is noop for bdi's wb */ nr = 0; spin_lock(&wb->list_lock); /* * In addition to the inodes that have completed writeback, also switch * cgwbs for those inodes only with dirty timestamps. Otherwise, those * inodes won't be written back for a long time when lazytime is * enabled, and thus pinning the dying cgwbs. It won't break the * bandwidth restrictions, as writeback of inode metadata is not * accounted for. */ restart = isw_prepare_wbs_switch(new_wb, isw, &wb->b_attached, &nr); if (!restart) restart = isw_prepare_wbs_switch(new_wb, isw, &wb->b_dirty_time, &nr); spin_unlock(&wb->list_lock); /* no attached inodes? bail out */ if (nr == 0) { atomic_dec(&isw_nr_in_flight); wb_put(new_wb); kfree(isw); return restart; } trace_inode_switch_wbs_queue(wb, new_wb, nr); wb_queue_isw(new_wb, isw); return restart; } /** * wbc_attach_and_unlock_inode - associate wbc with target inode and unlock it * @wbc: writeback_control of interest * @inode: target inode * * @inode is locked and about to be written back under the control of @wbc. * Record @inode's writeback context into @wbc and unlock the i_lock. On * writeback completion, wbc_detach_inode() should be called. This is used * to track the cgroup writeback context. */ static void wbc_attach_and_unlock_inode(struct writeback_control *wbc, struct inode *inode) __releases(&inode->i_lock) { if (!inode_cgwb_enabled(inode)) { spin_unlock(&inode->i_lock); return; } wbc->wb = inode_to_wb(inode); wbc->inode = inode; wbc->wb_id = wbc->wb->memcg_css->id; wbc->wb_lcand_id = inode->i_wb_frn_winner; wbc->wb_tcand_id = 0; wbc->wb_bytes = 0; wbc->wb_lcand_bytes = 0; wbc->wb_tcand_bytes = 0; wb_get(wbc->wb); spin_unlock(&inode->i_lock); /* * A dying wb indicates that either the blkcg associated with the * memcg changed or the associated memcg is dying. In the first * case, a replacement wb should already be available and we should * refresh the wb immediately. In the second case, trying to * refresh will keep failing. */ if (unlikely(wb_dying(wbc->wb) && !css_is_dying(wbc->wb->memcg_css))) inode_switch_wbs(inode, wbc->wb_id); } /** * wbc_attach_fdatawrite_inode - associate wbc and inode for fdatawrite * @wbc: writeback_control of interest * @inode: target inode * * This function is to be used by filemap_writeback(), which is an alternative * entry point into writeback code, and first ensures @inode is associated with * a bdi_writeback and attaches it to @wbc. */ void wbc_attach_fdatawrite_inode(struct writeback_control *wbc, struct inode *inode) { spin_lock(&inode->i_lock); inode_attach_wb(inode, NULL); wbc_attach_and_unlock_inode(wbc, inode); } EXPORT_SYMBOL_GPL(wbc_attach_fdatawrite_inode); /** * wbc_detach_inode - disassociate wbc from inode and perform foreign detection * @wbc: writeback_control of the just finished writeback * * To be called after a writeback attempt of an inode finishes and undoes * wbc_attach_and_unlock_inode(). Can be called under any context. * * As concurrent write sharing of an inode is expected to be very rare and * memcg only tracks page ownership on first-use basis severely confining * the usefulness of such sharing, cgroup writeback tracks ownership * per-inode. While the support for concurrent write sharing of an inode * is deemed unnecessary, an inode being written to by different cgroups at * different points in time is a lot more common, and, more importantly, * charging only by first-use can too readily lead to grossly incorrect * behaviors (single foreign page can lead to gigabytes of writeback to be * incorrectly attributed). * * To resolve this issue, cgroup writeback detects the majority dirtier of * an inode and transfers the ownership to it. To avoid unnecessary * oscillation, the detection mechanism keeps track of history and gives * out the switch verdict only if the foreign usage pattern is stable over * a certain amount of time and/or writeback attempts. * * On each writeback attempt, @wbc tries to detect the majority writer * using Boyer-Moore majority vote algorithm. In addition to the byte * count from the majority voting, it also counts the bytes written for the * current wb and the last round's winner wb (max of last round's current * wb, the winner from two rounds ago, and the last round's majority * candidate). Keeping track of the historical winner helps the algorithm * to semi-reliably detect the most active writer even when it's not the * absolute majority. * * Once the winner of the round is determined, whether the winner is * foreign or not and how much IO time the round consumed is recorded in * inode->i_wb_frn_history. If the amount of recorded foreign IO time is * over a certain threshold, the switch verdict is given. */ void wbc_detach_inode(struct writeback_control *wbc) { struct bdi_writeback *wb = wbc->wb; struct inode *inode = wbc->inode; unsigned long avg_time, max_bytes, max_time; u16 history; int max_id; if (!wb) return; history = inode->i_wb_frn_history; avg_time = inode->i_wb_frn_avg_time; /* pick the winner of this round */ if (wbc->wb_bytes >= wbc->wb_lcand_bytes && wbc->wb_bytes >= wbc->wb_tcand_bytes) { max_id = wbc->wb_id; max_bytes = wbc->wb_bytes; } else if (wbc->wb_lcand_bytes >= wbc->wb_tcand_bytes) { max_id = wbc->wb_lcand_id; max_bytes = wbc->wb_lcand_bytes; } else { max_id = wbc->wb_tcand_id; max_bytes = wbc->wb_tcand_bytes; } /* * Calculate the amount of IO time the winner consumed and fold it * into the running average kept per inode. If the consumed IO * time is lower than avag / WB_FRN_TIME_CUT_DIV, ignore it for * deciding whether to switch or not. This is to prevent one-off * small dirtiers from skewing the verdict. */ max_time = DIV_ROUND_UP((max_bytes >> PAGE_SHIFT) << WB_FRN_TIME_SHIFT, wb->avg_write_bandwidth); if (avg_time) avg_time += (max_time >> WB_FRN_TIME_AVG_SHIFT) - (avg_time >> WB_FRN_TIME_AVG_SHIFT); else avg_time = max_time; /* immediate catch up on first run */ if (max_time >= avg_time / WB_FRN_TIME_CUT_DIV) { int slots; /* * The switch verdict is reached if foreign wb's consume * more than a certain proportion of IO time in a * WB_FRN_TIME_PERIOD. This is loosely tracked by 16 slot * history mask where each bit represents one sixteenth of * the period. Determine the number of slots to shift into * history from @max_time. */ slots = min(DIV_ROUND_UP(max_time, WB_FRN_HIST_UNIT), (unsigned long)WB_FRN_HIST_MAX_SLOTS); history <<= slots; if (wbc->wb_id != max_id) history |= (1U << slots) - 1; if (history) trace_inode_foreign_history(inode, wbc, history); /* * Switch if the current wb isn't the consistent winner. * If there are multiple closely competing dirtiers, the * inode may switch across them repeatedly over time, which * is okay. The main goal is avoiding keeping an inode on * the wrong wb for an extended period of time. */ if (hweight16(history) > WB_FRN_HIST_THR_SLOTS) inode_switch_wbs(inode, max_id); } /* * Multiple instances of this function may race to update the * following fields but we don't mind occassional inaccuracies. */ inode->i_wb_frn_winner = max_id; inode->i_wb_frn_avg_time = min(avg_time, (unsigned long)U16_MAX); inode->i_wb_frn_history = history; wb_put(wbc->wb); wbc->wb = NULL; } EXPORT_SYMBOL_GPL(wbc_detach_inode); /** * wbc_account_cgroup_owner - account writeback to update inode cgroup ownership * @wbc: writeback_control of the writeback in progress * @folio: folio being written out * @bytes: number of bytes being written out * * @bytes from @folio are about to written out during the writeback * controlled by @wbc. Keep the book for foreign inode detection. See * wbc_detach_inode(). */ void wbc_account_cgroup_owner(struct writeback_control *wbc, struct folio *folio, size_t bytes) { struct cgroup_subsys_state *css; int id; /* * pageout() path doesn't attach @wbc to the inode being written * out. This is intentional as we don't want the function to block * behind a slow cgroup. Ultimately, we want pageout() to kick off * regular writeback instead of writing things out itself. */ if (!wbc->wb || wbc->no_cgroup_owner) return; css = mem_cgroup_css_from_folio(folio); /* dead cgroups shouldn't contribute to inode ownership arbitration */ if (!css_is_online(css)) return; id = css->id; if (id == wbc->wb_id) { wbc->wb_bytes += bytes; return; } if (id == wbc->wb_lcand_id) wbc->wb_lcand_bytes += bytes; /* Boyer-Moore majority vote algorithm */ if (!wbc->wb_tcand_bytes) wbc->wb_tcand_id = id; if (id == wbc->wb_tcand_id) wbc->wb_tcand_bytes += bytes; else wbc->wb_tcand_bytes -= min(bytes, wbc->wb_tcand_bytes); } EXPORT_SYMBOL_GPL(wbc_account_cgroup_owner); /** * wb_split_bdi_pages - split nr_pages to write according to bandwidth * @wb: target bdi_writeback to split @nr_pages to * @nr_pages: number of pages to write for the whole bdi * * Split @wb's portion of @nr_pages according to @wb's write bandwidth in * relation to the total write bandwidth of all wb's w/ dirty inodes on * @wb->bdi. */ static long wb_split_bdi_pages(struct bdi_writeback *wb, long nr_pages) { unsigned long this_bw = wb->avg_write_bandwidth; unsigned long tot_bw = atomic_long_read(&wb->bdi->tot_write_bandwidth); if (nr_pages == LONG_MAX) return LONG_MAX; /* * This may be called on clean wb's and proportional distribution * may not make sense, just use the original @nr_pages in those * cases. In general, we wanna err on the side of writing more. */ if (!tot_bw || this_bw >= tot_bw) return nr_pages; else return DIV_ROUND_UP_ULL((u64)nr_pages * this_bw, tot_bw); } /** * bdi_split_work_to_wbs - split a wb_writeback_work to all wb's of a bdi * @bdi: target backing_dev_info * @base_work: wb_writeback_work to issue * @skip_if_busy: skip wb's which already have writeback in progress * * Split and issue @base_work to all wb's (bdi_writeback's) of @bdi which * have dirty inodes. If @base_work->nr_page isn't %LONG_MAX, it's * distributed to the busy wbs according to each wb's proportion in the * total active write bandwidth of @bdi. */ static void bdi_split_work_to_wbs(struct backing_dev_info *bdi, struct wb_writeback_work *base_work, bool skip_if_busy) { struct bdi_writeback *last_wb = NULL; struct bdi_writeback *wb = list_entry(&bdi->wb_list, struct bdi_writeback, bdi_node); might_sleep(); restart: rcu_read_lock(); list_for_each_entry_continue_rcu(wb, &bdi->wb_list, bdi_node) { DEFINE_WB_COMPLETION(fallback_work_done, bdi); struct wb_writeback_work fallback_work; struct wb_writeback_work *work; long nr_pages; if (last_wb) { wb_put(last_wb); last_wb = NULL; } /* SYNC_ALL writes out I_DIRTY_TIME too */ if (!wb_has_dirty_io(wb) && (base_work->sync_mode == WB_SYNC_NONE || list_empty(&wb->b_dirty_time))) continue; if (skip_if_busy && writeback_in_progress(wb)) continue; nr_pages = wb_split_bdi_pages(wb, base_work->nr_pages); work = kmalloc(sizeof(*work), GFP_ATOMIC); if (work) { *work = *base_work; work->nr_pages = nr_pages; work->auto_free = 1; wb_queue_work(wb, work); continue; } /* * If wb_tryget fails, the wb has been shutdown, skip it. * * Pin @wb so that it stays on @bdi->wb_list. This allows * continuing iteration from @wb after dropping and * regrabbing rcu read lock. */ if (!wb_tryget(wb)) continue; /* alloc failed, execute synchronously using on-stack fallback */ work = &fallback_work; *work = *base_work; work->nr_pages = nr_pages; work->auto_free = 0; work->done = &fallback_work_done; wb_queue_work(wb, work); last_wb = wb; rcu_read_unlock(); wb_wait_for_completion(&fallback_work_done); goto restart; } rcu_read_unlock(); if (last_wb) wb_put(last_wb); } /** * cgroup_writeback_by_id - initiate cgroup writeback from bdi and memcg IDs * @bdi_id: target bdi id * @memcg_id: target memcg css id * @reason: reason why some writeback work initiated * @done: target wb_completion * * Initiate flush of the bdi_writeback identified by @bdi_id and @memcg_id * with the specified parameters. */ int cgroup_writeback_by_id(u64 bdi_id, int memcg_id, enum wb_reason reason, struct wb_completion *done) { struct backing_dev_info *bdi; struct cgroup_subsys_state *memcg_css; struct bdi_writeback *wb; struct wb_writeback_work *work; unsigned long dirty; int ret; /* lookup bdi and memcg */ bdi = bdi_get_by_id(bdi_id); if (!bdi) return -ENOENT; rcu_read_lock(); memcg_css = css_from_id(memcg_id, &memory_cgrp_subsys); if (memcg_css && !css_tryget(memcg_css)) memcg_css = NULL; rcu_read_unlock(); if (!memcg_css) { ret = -ENOENT; goto out_bdi_put; } /* * And find the associated wb. If the wb isn't there already * there's nothing to flush, don't create one. */ wb = wb_get_lookup(bdi, memcg_css); if (!wb) { ret = -ENOENT; goto out_css_put; } /* * The caller is attempting to write out most of * the currently dirty pages. Let's take the current dirty page * count and inflate it by 25% which should be large enough to * flush out most dirty pages while avoiding getting livelocked by * concurrent dirtiers. * * BTW the memcg stats are flushed periodically and this is best-effort * estimation, so some potential error is ok. */ dirty = memcg_page_state(mem_cgroup_from_css(memcg_css), NR_FILE_DIRTY); dirty = dirty * 10 / 8; /* issue the writeback work */ work = kzalloc(sizeof(*work), GFP_NOWAIT); if (work) { work->nr_pages = dirty; work->sync_mode = WB_SYNC_NONE; work->range_cyclic = 1; work->reason = reason; work->done = done; work->auto_free = 1; wb_queue_work(wb, work); ret = 0; } else { ret = -ENOMEM; } wb_put(wb); out_css_put: css_put(memcg_css); out_bdi_put: bdi_put(bdi); return ret; } /** * cgroup_writeback_umount - flush inode wb switches for umount * @sb: target super_block * * This function is called when a super_block is about to be destroyed and * flushes in-flight inode wb switches. An inode wb switch goes through * RCU and then workqueue, so the two need to be flushed in order to ensure * that all previously scheduled switches are finished. As wb switches are * rare occurrences and synchronize_rcu() can take a while, perform * flushing iff wb switches are in flight. */ void cgroup_writeback_umount(struct super_block *sb) { if (!(sb->s_bdi->capabilities & BDI_CAP_WRITEBACK)) return; /* * SB_ACTIVE should be reliably cleared before checking * isw_nr_in_flight, see generic_shutdown_super(). */ smp_mb(); if (atomic_read(&isw_nr_in_flight)) { /* * Use rcu_barrier() to wait for all pending callbacks to * ensure that all in-flight wb switches are in the workqueue. */ rcu_barrier(); flush_workqueue(isw_wq); } } static int __init cgroup_writeback_init(void) { isw_wq = alloc_workqueue("inode_switch_wbs", WQ_PERCPU, 0); if (!isw_wq) return -ENOMEM; return 0; } fs_initcall(cgroup_writeback_init); #else /* CONFIG_CGROUP_WRITEBACK */ static void bdi_down_write_wb_switch_rwsem(struct backing_dev_info *bdi) { } static void bdi_up_write_wb_switch_rwsem(struct backing_dev_info *bdi) { } static void inode_cgwb_move_to_attached(struct inode *inode, struct bdi_writeback *wb) { assert_spin_locked(&wb->list_lock); assert_spin_locked(&inode->i_lock); WARN_ON_ONCE(inode_state_read(inode) & I_FREEING); inode_state_clear(inode, I_SYNC_QUEUED); list_del_init(&inode->i_io_list); wb_io_lists_depopulated(wb); } static struct bdi_writeback * locked_inode_to_wb_and_lock_list(struct inode *inode) __releases(&inode->i_lock) __acquires(&wb->list_lock) { struct bdi_writeback *wb = inode_to_wb(inode); spin_unlock(&inode->i_lock); spin_lock(&wb->list_lock); return wb; } static struct bdi_writeback *inode_to_wb_and_lock_list(struct inode *inode) __acquires(&wb->list_lock) { struct bdi_writeback *wb = inode_to_wb(inode); spin_lock(&wb->list_lock); return wb; } static long wb_split_bdi_pages(struct bdi_writeback *wb, long nr_pages) { return nr_pages; } static void bdi_split_work_to_wbs(struct backing_dev_info *bdi, struct wb_writeback_work *base_work, bool skip_if_busy) { might_sleep(); if (!skip_if_busy || !writeback_in_progress(&bdi->wb)) { base_work->auto_free = 0; wb_queue_work(&bdi->wb, base_work); } } static inline void wbc_attach_and_unlock_inode(struct writeback_control *wbc, struct inode *inode) __releases(&inode->i_lock) { spin_unlock(&inode->i_lock); } #endif /* CONFIG_CGROUP_WRITEBACK */ /* * Add in the number of potentially dirty inodes, because each inode * write can dirty pagecache in the underlying blockdev. */ static unsigned long get_nr_dirty_pages(void) { return global_node_page_state(NR_FILE_DIRTY) + get_nr_dirty_inodes(); } static void wb_start_writeback(struct bdi_writeback *wb, enum wb_reason reason) { if (!wb_has_dirty_io(wb)) return; /* * All callers of this function want to start writeback of all * dirty pages. Places like vmscan can call this at a very * high frequency, causing pointless allocations of tons of * work items and keeping the flusher threads busy retrieving * that work. Ensure that we only allow one of them pending and * inflight at the time. */ if (test_bit(WB_start_all, &wb->state) || test_and_set_bit(WB_start_all, &wb->state)) return; wb->start_all_reason = reason; wb_wakeup(wb); } /** * wb_start_background_writeback - start background writeback * @wb: bdi_writback to write from * * Description: * This makes sure WB_SYNC_NONE background writeback happens. When * this function returns, it is only guaranteed that for given wb * some IO is happening if we are over background dirty threshold. * Caller need not hold sb s_umount semaphore. */ void wb_start_background_writeback(struct bdi_writeback *wb) { /* * We just wake up the flusher thread. It will perform background * writeback as soon as there is no other work to do. */ trace_writeback_wake_background(wb); wb_wakeup(wb); } /* * Remove the inode from the writeback list it is on. */ void inode_io_list_del(struct inode *inode) { struct bdi_writeback *wb; /* * FIXME: ext4 can call here from ext4_evict_inode() after evict() already * unlinked the inode. */ if (list_empty_careful(&inode->i_io_list)) return; wb = inode_to_wb_and_lock_list(inode); spin_lock(&inode->i_lock); inode_state_clear(inode, I_SYNC_QUEUED); list_del_init(&inode->i_io_list); wb_io_lists_depopulated(wb); spin_unlock(&inode->i_lock); spin_unlock(&wb->list_lock); } EXPORT_SYMBOL(inode_io_list_del); /* * mark an inode as under writeback on the sb */ void sb_mark_inode_writeback(struct inode *inode) { struct super_block *sb = inode->i_sb; unsigned long flags; if (list_empty(&inode->i_wb_list)) { spin_lock_irqsave(&sb->s_inode_wblist_lock, flags); if (list_empty(&inode->i_wb_list)) { list_add_tail(&inode->i_wb_list, &sb->s_inodes_wb); trace_sb_mark_inode_writeback(inode); } spin_unlock_irqrestore(&sb->s_inode_wblist_lock, flags); } } /* * clear an inode as under writeback on the sb */ void sb_clear_inode_writeback(struct inode *inode) { struct super_block *sb = inode->i_sb; unsigned long flags; if (!list_empty(&inode->i_wb_list)) { spin_lock_irqsave(&sb->s_inode_wblist_lock, flags); if (!list_empty(&inode->i_wb_list)) { list_del_init(&inode->i_wb_list); trace_sb_clear_inode_writeback(inode); } spin_unlock_irqrestore(&sb->s_inode_wblist_lock, flags); } } /* * Redirty an inode: set its when-it-was dirtied timestamp and move it to the * furthest end of its superblock's dirty-inode list. * * Before stamping the inode's ->dirtied_when, we check to see whether it is * already the most-recently-dirtied inode on the b_dirty list. If that is * the case then the inode must have been redirtied while it was being written * out and we don't reset its dirtied_when. */ static void redirty_tail_locked(struct inode *inode, struct bdi_writeback *wb) { assert_spin_locked(&inode->i_lock); inode_state_clear(inode, I_SYNC_QUEUED); /* * When the inode is being freed just don't bother with dirty list * tracking. Flush worker will ignore this inode anyway and it will * trigger assertions in inode_io_list_move_locked(). */ if (inode_state_read(inode) & I_FREEING) { list_del_init(&inode->i_io_list); wb_io_lists_depopulated(wb); return; } if (!list_empty(&wb->b_dirty)) { struct inode *tail; tail = wb_inode(wb->b_dirty.next); if (time_before(inode->dirtied_when, tail->dirtied_when)) inode->dirtied_when = jiffies; } inode_io_list_move_locked(inode, wb, &wb->b_dirty); } static void redirty_tail(struct inode *inode, struct bdi_writeback *wb) { spin_lock(&inode->i_lock); redirty_tail_locked(inode, wb); spin_unlock(&inode->i_lock); } /* * requeue inode for re-scanning after bdi->b_io list is exhausted. */ static void requeue_io(struct inode *inode, struct bdi_writeback *wb) { inode_io_list_move_locked(inode, wb, &wb->b_more_io); } static void inode_sync_complete(struct inode *inode) { assert_spin_locked(&inode->i_lock); inode_state_clear(inode, I_SYNC); /* If inode is clean an unused, put it into LRU now... */ inode_lru_list_add(inode); /* Called with inode->i_lock which ensures memory ordering. */ inode_wake_up_bit(inode, __I_SYNC); } static bool inode_dirtied_after(struct inode *inode, unsigned long t) { bool ret = time_after(inode->dirtied_when, t); #ifndef CONFIG_64BIT /* * For inodes being constantly redirtied, dirtied_when can get stuck. * It _appears_ to be in the future, but is actually in distant past. * This test is necessary to prevent such wrapped-around relative times * from permanently stopping the whole bdi writeback. */ ret = ret && time_before_eq(inode->dirtied_when, jiffies); #endif return ret; } /* * Move expired (dirtied before dirtied_before) dirty inodes from * @delaying_queue to @dispatch_queue. */ static int move_expired_inodes(struct list_head *delaying_queue, struct list_head *dispatch_queue, unsigned long dirtied_before) { LIST_HEAD(tmp); struct list_head *pos, *node; struct super_block *sb = NULL; struct inode *inode; int do_sb_sort = 0; int moved = 0; while (!list_empty(delaying_queue)) { inode = wb_inode(delaying_queue->prev); if (inode_dirtied_after(inode, dirtied_before)) break; spin_lock(&inode->i_lock); list_move(&inode->i_io_list, &tmp); moved++; inode_state_set(inode, I_SYNC_QUEUED); spin_unlock(&inode->i_lock); if (sb_is_blkdev_sb(inode->i_sb)) continue; if (sb && sb != inode->i_sb) do_sb_sort = 1; sb = inode->i_sb; } /* just one sb in list, splice to dispatch_queue and we're done */ if (!do_sb_sort) { list_splice(&tmp, dispatch_queue); goto out; } /* * Although inode's i_io_list is moved from 'tmp' to 'dispatch_queue', * we don't take inode->i_lock here because it is just a pointless overhead. * Inode is already marked as I_SYNC_QUEUED so writeback list handling is * fully under our control. */ while (!list_empty(&tmp)) { sb = wb_inode(tmp.prev)->i_sb; list_for_each_prev_safe(pos, node, &tmp) { inode = wb_inode(pos); if (inode->i_sb == sb) list_move(&inode->i_io_list, dispatch_queue); } } out: return moved; } /* * Queue all expired dirty inodes for io, eldest first. * Before * newly dirtied b_dirty b_io b_more_io * =============> gf edc BA * After * newly dirtied b_dirty b_io b_more_io * =============> g fBAedc * | * +--> dequeue for IO */ static void queue_io(struct bdi_writeback *wb, struct wb_writeback_work *work, unsigned long dirtied_before) { int moved; unsigned long time_expire_jif = dirtied_before; assert_spin_locked(&wb->list_lock); list_splice_init(&wb->b_more_io, &wb->b_io); moved = move_expired_inodes(&wb->b_dirty, &wb->b_io, dirtied_before); if (!work->for_sync) time_expire_jif = jiffies - dirtytime_expire_interval * HZ; moved += move_expired_inodes(&wb->b_dirty_time, &wb->b_io, time_expire_jif); if (moved) wb_io_lists_populated(wb); trace_writeback_queue_io(wb, work, dirtied_before, moved); } static int write_inode(struct inode *inode, struct writeback_control *wbc) { int ret; if (inode->i_sb->s_op->write_inode && !is_bad_inode(inode)) { trace_writeback_write_inode_start(inode, wbc); ret = inode->i_sb->s_op->write_inode(inode, wbc); trace_writeback_write_inode(inode, wbc); return ret; } return 0; } /* * Wait for writeback on an inode to complete. Called with i_lock held. * Caller must make sure inode cannot go away when we drop i_lock. */ void inode_wait_for_writeback(struct inode *inode) { struct wait_bit_queue_entry wqe; struct wait_queue_head *wq_head; assert_spin_locked(&inode->i_lock); if (!(inode_state_read(inode) & I_SYNC)) return; wq_head = inode_bit_waitqueue(&wqe, inode, __I_SYNC); for (;;) { prepare_to_wait_event(wq_head, &wqe.wq_entry, TASK_UNINTERRUPTIBLE); /* Checking I_SYNC with inode->i_lock guarantees memory ordering. */ if (!(inode_state_read(inode) & I_SYNC)) break; spin_unlock(&inode->i_lock); schedule(); spin_lock(&inode->i_lock); } finish_wait(wq_head, &wqe.wq_entry); } /* * Sleep until I_SYNC is cleared. This function must be called with i_lock * held and drops it. It is aimed for callers not holding any inode reference * so once i_lock is dropped, inode can go away. */ static void inode_sleep_on_writeback(struct inode *inode) __releases(inode->i_lock) { struct wait_bit_queue_entry wqe; struct wait_queue_head *wq_head; bool sleep; assert_spin_locked(&inode->i_lock); wq_head = inode_bit_waitqueue(&wqe, inode, __I_SYNC); prepare_to_wait_event(wq_head, &wqe.wq_entry, TASK_UNINTERRUPTIBLE); /* Checking I_SYNC with inode->i_lock guarantees memory ordering. */ sleep = !!(inode_state_read(inode) & I_SYNC); spin_unlock(&inode->i_lock); if (sleep) schedule(); finish_wait(wq_head, &wqe.wq_entry); } /* * Find proper writeback list for the inode depending on its current state and * possibly also change of its state while we were doing writeback. Here we * handle things such as livelock prevention or fairness of writeback among * inodes. This function can be called only by flusher thread - noone else * processes all inodes in writeback lists and requeueing inodes behind flusher * thread's back can have unexpected consequences. */ static void requeue_inode(struct inode *inode, struct bdi_writeback *wb, struct writeback_control *wbc, unsigned long dirtied_before) { if (inode_state_read(inode) & I_FREEING) return; /* * Sync livelock prevention. Each inode is tagged and synced in one * shot. If still dirty, it will be redirty_tail()'ed below. Update * the dirty time to prevent enqueue and sync it again. */ if ((inode_state_read(inode) & I_DIRTY) && (wbc->sync_mode == WB_SYNC_ALL || wbc->tagged_writepages)) inode->dirtied_when = jiffies; if (wbc->pages_skipped) { /* * Writeback is not making progress due to locked buffers. * Skip this inode for now. Although having skipped pages * is odd for clean inodes, it can happen for some * filesystems so handle that gracefully. */ if (inode_state_read(inode) & I_DIRTY_ALL) redirty_tail_locked(inode, wb); else inode_cgwb_move_to_attached(inode, wb); return; } if (mapping_tagged(inode->i_mapping, PAGECACHE_TAG_DIRTY)) { /* * We didn't write back all the pages. nfs_writepages() * sometimes bales out without doing anything. */ if (wbc->nr_to_write <= 0 && !inode_dirtied_after(inode, dirtied_before)) { /* Slice used up. Queue for next turn. */ requeue_io(inode, wb); } else { /* * Writeback blocked by something other than * congestion. Delay the inode for some time to * avoid spinning on the CPU (100% iowait) * retrying writeback of the dirty page/inode * that cannot be performed immediately. */ redirty_tail_locked(inode, wb); } } else if (inode_state_read(inode) & I_DIRTY) { /* * Filesystems can dirty the inode during writeback operations, * such as delayed allocation during submission or metadata * updates after data IO completion. */ redirty_tail_locked(inode, wb); } else if (inode_state_read(inode) & I_DIRTY_TIME) { inode->dirtied_when = jiffies; inode_io_list_move_locked(inode, wb, &wb->b_dirty_time); inode_state_clear(inode, I_SYNC_QUEUED); } else { /* The inode is clean. Remove from writeback lists. */ inode_cgwb_move_to_attached(inode, wb); } } bool sync_lazytime(struct inode *inode) { if (!(inode_state_read_once(inode) & I_DIRTY_TIME)) return false; trace_writeback_lazytime(inode); if (inode->i_op->sync_lazytime) inode->i_op->sync_lazytime(inode); else mark_inode_dirty_sync(inode); return true; } /* * Write out an inode and its dirty pages (or some of its dirty pages, depending * on @wbc->nr_to_write), and clear the relevant dirty flags from i_state. * * This doesn't remove the inode from the writeback list it is on, except * potentially to move it from b_dirty_time to b_dirty due to timestamp * expiration. The caller is otherwise responsible for writeback list handling. * * The caller is also responsible for setting the I_SYNC flag beforehand and * calling inode_sync_complete() to clear it afterwards. */ static int __writeback_single_inode(struct inode *inode, struct writeback_control *wbc) { struct address_space *mapping = inode->i_mapping; long nr_to_write = wbc->nr_to_write; unsigned dirty; int ret; WARN_ON(!(inode_state_read_once(inode) & I_SYNC)); trace_writeback_single_inode_start(inode, wbc, nr_to_write); ret = do_writepages(mapping, wbc); /* * Make sure to wait on the data before writing out the metadata. * This is important for filesystems that modify metadata on data * I/O completion. We don't do it for sync(2) writeback because it has a * separate, external IO completion path and ->sync_fs for guaranteeing * inode metadata is written back correctly. */ if (wbc->sync_mode == WB_SYNC_ALL && !wbc->for_sync) { int err = filemap_fdatawait(mapping); if (ret == 0) ret = err; } /* * For data integrity writeback, or when the dirty interval expired, * ask the file system to propagata lazy timestamp updates into real * dirty state. */ if ((inode_state_read_once(inode) & I_DIRTY_TIME) && (wbc->sync_mode == WB_SYNC_ALL || time_after(jiffies, inode->dirtied_time_when + dirtytime_expire_interval * HZ))) sync_lazytime(inode); /* * Get and clear the dirty flags from i_state. This needs to be done * after calling writepages because some filesystems may redirty the * inode during writepages due to delalloc. It also needs to be done * after handling timestamp expiration, as that may dirty the inode too. */ spin_lock(&inode->i_lock); dirty = inode_state_read(inode) & I_DIRTY; inode_state_clear(inode, dirty); /* * Paired with smp_mb() in __mark_inode_dirty(). This allows * __mark_inode_dirty() to test i_state without grabbing i_lock - * either they see the I_DIRTY bits cleared or we see the dirtied * inode. * * I_DIRTY_PAGES is always cleared together above even if @mapping * still has dirty pages. The flag is reinstated after smp_mb() if * necessary. This guarantees that either __mark_inode_dirty() * sees clear I_DIRTY_PAGES or we see PAGECACHE_TAG_DIRTY. */ smp_mb(); if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) inode_state_set(inode, I_DIRTY_PAGES); else if (unlikely(inode_state_read(inode) & I_PINNING_NETFS_WB)) { if (!(inode_state_read(inode) & I_DIRTY_PAGES)) { inode_state_clear(inode, I_PINNING_NETFS_WB); wbc->unpinned_netfs_wb = true; dirty |= I_PINNING_NETFS_WB; /* Cause write_inode */ } } spin_unlock(&inode->i_lock); /* Don't write the inode if only I_DIRTY_PAGES was set */ if (dirty & ~I_DIRTY_PAGES) { int err = write_inode(inode, wbc); if (ret == 0) ret = err; } wbc->unpinned_netfs_wb = false; trace_writeback_single_inode(inode, wbc, nr_to_write); return ret; } /* * Write out an inode's dirty data and metadata on-demand, i.e. separately from * the regular batched writeback done by the flusher threads in * writeback_sb_inodes(). @wbc controls various aspects of the write, such as * whether it is a data-integrity sync (%WB_SYNC_ALL) or not (%WB_SYNC_NONE). * * To prevent the inode from going away, either the caller must have a reference * to the inode, or the inode must have I_WILL_FREE or I_FREEING set. */ static int writeback_single_inode(struct inode *inode, struct writeback_control *wbc) { struct bdi_writeback *wb; int ret = 0; spin_lock(&inode->i_lock); if (!icount_read(inode)) WARN_ON(!(inode_state_read(inode) & (I_WILL_FREE | I_FREEING))); else WARN_ON(inode_state_read(inode) & I_WILL_FREE); if (inode_state_read(inode) & I_SYNC) { /* * Writeback is already running on the inode. For WB_SYNC_NONE, * that's enough and we can just return. For WB_SYNC_ALL, we * must wait for the existing writeback to complete, then do * writeback again if there's anything left. */ if (wbc->sync_mode != WB_SYNC_ALL) goto out; inode_wait_for_writeback(inode); } WARN_ON(inode_state_read(inode) & I_SYNC); /* * If the inode is already fully clean, then there's nothing to do. * * For data-integrity syncs we also need to check whether any pages are * still under writeback, e.g. due to prior WB_SYNC_NONE writeback. If * there are any such pages, we'll need to wait for them. */ if (!(inode_state_read(inode) & I_DIRTY_ALL) && (wbc->sync_mode != WB_SYNC_ALL || !mapping_tagged(inode->i_mapping, PAGECACHE_TAG_WRITEBACK))) goto out; inode_state_set(inode, I_SYNC); wbc_attach_and_unlock_inode(wbc, inode); ret = __writeback_single_inode(inode, wbc); wbc_detach_inode(wbc); wb = inode_to_wb_and_lock_list(inode); spin_lock(&inode->i_lock); /* * If the inode is freeing, its i_io_list shoudn't be updated * as it can be finally deleted at this moment. */ if (!(inode_state_read(inode) & I_FREEING)) { /* * If the inode is now fully clean, then it can be safely * removed from its writeback list (if any). Otherwise the * flusher threads are responsible for the writeback lists. */ if (!(inode_state_read(inode) & I_DIRTY_ALL)) inode_cgwb_move_to_attached(inode, wb); else if (!(inode_state_read(inode) & I_SYNC_QUEUED)) { if ((inode_state_read(inode) & I_DIRTY)) redirty_tail_locked(inode, wb); else if (inode_state_read(inode) & I_DIRTY_TIME) { inode->dirtied_when = jiffies; inode_io_list_move_locked(inode, wb, &wb->b_dirty_time); } } } spin_unlock(&wb->list_lock); inode_sync_complete(inode); out: spin_unlock(&inode->i_lock); return ret; } static long writeback_chunk_size(struct super_block *sb, struct bdi_writeback *wb, struct wb_writeback_work *work) { long pages; /* * WB_SYNC_ALL mode does livelock avoidance by syncing dirty * inodes/pages in one big loop. Setting wbc.nr_to_write=LONG_MAX * here avoids calling into writeback_inodes_wb() more than once. * * The intended call sequence for WB_SYNC_ALL writeback is: * * wb_writeback() * writeback_sb_inodes() <== called only once * write_cache_pages() <== called once for each inode * (quickly) tag currently dirty pages * (maybe slowly) sync all tagged pages */ if (work->sync_mode == WB_SYNC_ALL || work->tagged_writepages) return LONG_MAX; pages = min(wb->avg_write_bandwidth / 2, global_wb_domain.dirty_limit / DIRTY_SCOPE); pages = min(pages, work->nr_pages); return round_down(pages + sb->s_min_writeback_pages, sb->s_min_writeback_pages); } /* * Write a portion of b_io inodes which belong to @sb. * * Return the number of pages and/or inodes written. * * NOTE! This is called with wb->list_lock held, and will * unlock and relock that for each inode it ends up doing * IO for. */ static long writeback_sb_inodes(struct super_block *sb, struct bdi_writeback *wb, struct wb_writeback_work *work) { struct writeback_control wbc = { .sync_mode = work->sync_mode, .tagged_writepages = work->tagged_writepages, .for_kupdate = work->for_kupdate, .for_background = work->for_background, .for_sync = work->for_sync, .range_cyclic = work->range_cyclic, .range_start = 0, .range_end = LLONG_MAX, }; unsigned long start_time = jiffies; long write_chunk; long total_wrote = 0; /* count both pages and inodes */ unsigned long dirtied_before = jiffies; if (work->for_kupdate) dirtied_before = jiffies - msecs_to_jiffies(dirty_expire_interval * 10); while (!list_empty(&wb->b_io)) { struct inode *inode = wb_inode(wb->b_io.prev); struct bdi_writeback *tmp_wb; long wrote; if (inode->i_sb != sb) { if (work->sb) { /* * We only want to write back data for this * superblock, move all inodes not belonging * to it back onto the dirty list. */ redirty_tail(inode, wb); continue; } /* * The inode belongs to a different superblock. * Bounce back to the caller to unpin this and * pin the next superblock. */ break; } /* * Don't bother with new inodes or inodes being freed, first * kind does not need periodic writeout yet, and for the latter * kind writeout is handled by the freer. */ spin_lock(&inode->i_lock); if (inode_state_read(inode) & (I_NEW | I_FREEING | I_WILL_FREE)) { redirty_tail_locked(inode, wb); spin_unlock(&inode->i_lock); continue; } if ((inode_state_read(inode) & I_SYNC) && wbc.sync_mode != WB_SYNC_ALL) { /* * If this inode is locked for writeback and we are not * doing writeback-for-data-integrity, move it to * b_more_io so that writeback can proceed with the * other inodes on s_io. * * We'll have another go at writing back this inode * when we completed a full scan of b_io. */ requeue_io(inode, wb); spin_unlock(&inode->i_lock); trace_writeback_sb_inodes_requeue(inode); continue; } spin_unlock(&wb->list_lock); /* * We already requeued the inode if it had I_SYNC set and we * are doing WB_SYNC_NONE writeback. So this catches only the * WB_SYNC_ALL case. */ if (inode_state_read(inode) & I_SYNC) { /* Wait for I_SYNC. This function drops i_lock... */ inode_sleep_on_writeback(inode); /* Inode may be gone, start again */ spin_lock(&wb->list_lock); continue; } inode_state_set(inode, I_SYNC); wbc_attach_and_unlock_inode(&wbc, inode); write_chunk = writeback_chunk_size(inode->i_sb, wb, work); wbc.nr_to_write = write_chunk; wbc.pages_skipped = 0; /* * We use I_SYNC to pin the inode in memory. While it is set * evict_inode() will wait so the inode cannot be freed. */ __writeback_single_inode(inode, &wbc); /* Report progress to inform the hung task detector of the progress. */ if (work->done && work->done->progress_stamp && (jiffies - work->done->progress_stamp) > HZ * sysctl_hung_task_timeout_secs / 2) wake_up_all(work->done->waitq); wbc_detach_inode(&wbc); work->nr_pages -= write_chunk - wbc.nr_to_write; wrote = write_chunk - wbc.nr_to_write - wbc.pages_skipped; wrote = wrote < 0 ? 0 : wrote; total_wrote += wrote; if (need_resched()) { /* * We're trying to balance between building up a nice * long list of IOs to improve our merge rate, and * getting those IOs out quickly for anyone throttling * in balance_dirty_pages(). cond_resched() doesn't * unplug, so get our IOs out the door before we * give up the CPU. */ blk_flush_plug(current->plug, false); cond_resched(); } /* * Requeue @inode if still dirty. Be careful as @inode may * have been switched to another wb in the meantime. */ tmp_wb = inode_to_wb_and_lock_list(inode); spin_lock(&inode->i_lock); if (!(inode_state_read(inode) & I_DIRTY_ALL)) total_wrote++; requeue_inode(inode, tmp_wb, &wbc, dirtied_before); inode_sync_complete(inode); spin_unlock(&inode->i_lock); if (unlikely(tmp_wb != wb)) { spin_unlock(&tmp_wb->list_lock); spin_lock(&wb->list_lock); } /* * bail out to wb_writeback() often enough to check * background threshold and other termination conditions. */ if (total_wrote) { if (time_is_before_jiffies(start_time + HZ / 10UL)) break; if (work->nr_pages <= 0) break; } } return total_wrote; } static long __writeback_inodes_wb(struct bdi_writeback *wb, struct wb_writeback_work *work) { unsigned long start_time = jiffies; long wrote = 0; while (!list_empty(&wb->b_io)) { struct inode *inode = wb_inode(wb->b_io.prev); struct super_block *sb = inode->i_sb; if (!super_trylock_shared(sb)) { /* * super_trylock_shared() may fail consistently due to * s_umount being grabbed by someone else. Don't use * requeue_io() to avoid busy retrying the inode/sb. */ redirty_tail(inode, wb); continue; } wrote += writeback_sb_inodes(sb, wb, work); up_read(&sb->s_umount); /* refer to the same tests at the end of writeback_sb_inodes */ if (wrote) { if (time_is_before_jiffies(start_time + HZ / 10UL)) break; if (work->nr_pages <= 0) break; } } /* Leave any unwritten inodes on b_io */ return wrote; } static long writeback_inodes_wb(struct bdi_writeback *wb, long nr_pages, enum wb_reason reason) { struct wb_writeback_work work = { .nr_pages = nr_pages, .sync_mode = WB_SYNC_NONE, .range_cyclic = 1, .reason = reason, }; struct blk_plug plug; blk_start_plug(&plug); spin_lock(&wb->list_lock); if (list_empty(&wb->b_io)) queue_io(wb, &work, jiffies); __writeback_inodes_wb(wb, &work); spin_unlock(&wb->list_lock); blk_finish_plug(&plug); return nr_pages - work.nr_pages; } /* * Explicit flushing or periodic writeback of "old" data. * * Define "old": the first time one of an inode's pages is dirtied, we mark the * dirtying-time in the inode's address_space. So this periodic writeback code * just walks the superblock inode list, writing back any inodes which are * older than a specific point in time. * * Try to run once per dirty_writeback_interval. But if a writeback event * takes longer than a dirty_writeback_interval interval, then leave a * one-second gap. * * dirtied_before takes precedence over nr_to_write. So we'll only write back * all dirty pages if they are all attached to "old" mappings. */ static long wb_writeback(struct bdi_writeback *wb, struct wb_writeback_work *work) { long nr_pages = work->nr_pages; unsigned long dirtied_before = jiffies; struct inode *inode; long progress; struct blk_plug plug; bool queued = false; blk_start_plug(&plug); for (;;) { /* * Stop writeback when nr_pages has been consumed */ if (work->nr_pages <= 0) break; /* * Background writeout and kupdate-style writeback may * run forever. Stop them if there is other work to do * so that e.g. sync can proceed. They'll be restarted * after the other works are all done. */ if ((work->for_background || work->for_kupdate) && !list_empty(&wb->work_list)) break; /* * For background writeout, stop when we are below the * background dirty threshold */ if (work->for_background && !wb_over_bg_thresh(wb)) break; spin_lock(&wb->list_lock); trace_writeback_start(wb, work); if (list_empty(&wb->b_io)) { /* * Kupdate and background works are special and we want * to include all inodes that need writing. Livelock * avoidance is handled by these works yielding to any * other work so we are safe. */ if (work->for_kupdate) { dirtied_before = jiffies - msecs_to_jiffies(dirty_expire_interval * 10); } else if (work->for_background) dirtied_before = jiffies; queue_io(wb, work, dirtied_before); queued = true; } if (work->sb) progress = writeback_sb_inodes(work->sb, wb, work); else progress = __writeback_inodes_wb(wb, work); trace_writeback_written(wb, work); /* * Did we write something? Try for more * * Dirty inodes are moved to b_io for writeback in batches. * The completion of the current batch does not necessarily * mean the overall work is done. So we keep looping as long * as made some progress on cleaning pages or inodes. */ if (progress || !queued) { spin_unlock(&wb->list_lock); continue; } /* * No more inodes for IO, bail */ if (list_empty(&wb->b_more_io)) { spin_unlock(&wb->list_lock); break; } /* * Nothing written. Wait for some inode to * become available for writeback. Otherwise * we'll just busyloop. */ trace_writeback_wait(wb, work); inode = wb_inode(wb->b_more_io.prev); spin_lock(&inode->i_lock); spin_unlock(&wb->list_lock); /* This function drops i_lock... */ inode_sleep_on_writeback(inode); } blk_finish_plug(&plug); return nr_pages - work->nr_pages; } /* * Return the next wb_writeback_work struct that hasn't been processed yet. */ static struct wb_writeback_work *get_next_work_item(struct bdi_writeback *wb) { struct wb_writeback_work *work = NULL; spin_lock_irq(&wb->work_lock); if (!list_empty(&wb->work_list)) { work = list_entry(wb->work_list.next, struct wb_writeback_work, list); list_del_init(&work->list); } spin_unlock_irq(&wb->work_lock); return work; } static long wb_check_background_flush(struct bdi_writeback *wb) { if (wb_over_bg_thresh(wb)) { struct wb_writeback_work work = { .nr_pages = LONG_MAX, .sync_mode = WB_SYNC_NONE, .for_background = 1, .range_cyclic = 1, .reason = WB_REASON_BACKGROUND, }; return wb_writeback(wb, &work); } return 0; } static long wb_check_old_data_flush(struct bdi_writeback *wb) { unsigned long expired; long nr_pages; /* * When set to zero, disable periodic writeback */ if (!dirty_writeback_interval) return 0; expired = wb->last_old_flush + msecs_to_jiffies(dirty_writeback_interval * 10); if (time_before(jiffies, expired)) return 0; wb->last_old_flush = jiffies; nr_pages = get_nr_dirty_pages(); if (nr_pages) { struct wb_writeback_work work = { .nr_pages = nr_pages, .sync_mode = WB_SYNC_NONE, .for_kupdate = 1, .range_cyclic = 1, .reason = WB_REASON_PERIODIC, }; return wb_writeback(wb, &work); } return 0; } static long wb_check_start_all(struct bdi_writeback *wb) { long nr_pages; if (!test_bit(WB_start_all, &wb->state)) return 0; nr_pages = get_nr_dirty_pages(); if (nr_pages) { struct wb_writeback_work work = { .nr_pages = wb_split_bdi_pages(wb, nr_pages), .sync_mode = WB_SYNC_NONE, .range_cyclic = 1, .reason = wb->start_all_reason, }; nr_pages = wb_writeback(wb, &work); } clear_bit(WB_start_all, &wb->state); return nr_pages; } /* * Retrieve work items and do the writeback they describe */ static long wb_do_writeback(struct bdi_writeback *wb) { struct wb_writeback_work *work; long wrote = 0; set_bit(WB_writeback_running, &wb->state); while ((work = get_next_work_item(wb)) != NULL) { trace_writeback_exec(wb, work); wrote += wb_writeback(wb, work); finish_writeback_work(work); } /* * Check for a flush-everything request */ wrote += wb_check_start_all(wb); /* * Check for periodic writeback, kupdated() style */ wrote += wb_check_old_data_flush(wb); wrote += wb_check_background_flush(wb); clear_bit(WB_writeback_running, &wb->state); return wrote; } /* * Handle writeback of dirty data for the device backed by this bdi. Also * reschedules periodically and does kupdated style flushing. */ void wb_workfn(struct work_struct *work) { struct bdi_writeback *wb = container_of(to_delayed_work(work), struct bdi_writeback, dwork); long pages_written; set_worker_desc("flush-%s", bdi_dev_name(wb->bdi)); if (likely(!current_is_workqueue_rescuer() || !test_bit(WB_registered, &wb->state))) { /* * The normal path. Keep writing back @wb until its * work_list is empty. Note that this path is also taken * if @wb is shutting down even when we're running off the * rescuer as work_list needs to be drained. */ do { pages_written = wb_do_writeback(wb); trace_writeback_pages_written(pages_written); } while (!list_empty(&wb->work_list)); } else { /* * bdi_wq can't get enough workers and we're running off * the emergency worker. Don't hog it. Hopefully, 1024 is * enough for efficient IO. */ pages_written = writeback_inodes_wb(wb, 1024, WB_REASON_FORKER_THREAD); trace_writeback_pages_written(pages_written); } if (!list_empty(&wb->work_list)) wb_wakeup(wb); else if (wb_has_dirty_io(wb) && dirty_writeback_interval) wb_wakeup_delayed(wb); } /* * Start writeback of all dirty pages on this bdi. */ static void __wakeup_flusher_threads_bdi(struct backing_dev_info *bdi, enum wb_reason reason) { struct bdi_writeback *wb; if (!bdi_has_dirty_io(bdi)) return; list_for_each_entry_rcu(wb, &bdi->wb_list, bdi_node) wb_start_writeback(wb, reason); } void wakeup_flusher_threads_bdi(struct backing_dev_info *bdi, enum wb_reason reason) { rcu_read_lock(); __wakeup_flusher_threads_bdi(bdi, reason); rcu_read_unlock(); } /* * Wakeup the flusher threads to start writeback of all currently dirty pages */ void wakeup_flusher_threads(enum wb_reason reason) { struct backing_dev_info *bdi; /* * If we are expecting writeback progress we must submit plugged IO. */ blk_flush_plug(current->plug, true); rcu_read_lock(); list_for_each_entry_rcu(bdi, &bdi_list, bdi_list) __wakeup_flusher_threads_bdi(bdi, reason); rcu_read_unlock(); } /* * Wake up bdi's periodically to make sure dirtytime inodes gets * written back periodically. We deliberately do *not* check the * b_dirtytime list in wb_has_dirty_io(), since this would cause the * kernel to be constantly waking up once there are any dirtytime * inodes on the system. So instead we define a separate delayed work * function which gets called much more rarely. (By default, only * once every 12 hours.) * * If there is any other write activity going on in the file system, * this function won't be necessary. But if the only thing that has * happened on the file system is a dirtytime inode caused by an atime * update, we need this infrastructure below to make sure that inode * eventually gets pushed out to disk. */ static void wakeup_dirtytime_writeback(struct work_struct *w); static DECLARE_DELAYED_WORK(dirtytime_work, wakeup_dirtytime_writeback); static void wakeup_dirtytime_writeback(struct work_struct *w) { struct backing_dev_info *bdi; rcu_read_lock(); list_for_each_entry_rcu(bdi, &bdi_list, bdi_list) { struct bdi_writeback *wb; list_for_each_entry_rcu(wb, &bdi->wb_list, bdi_node) if (!list_empty(&wb->b_dirty_time)) wb_wakeup(wb); } rcu_read_unlock(); if (dirtytime_expire_interval) schedule_delayed_work(&dirtytime_work, round_jiffies_relative(dirtytime_expire_interval * HZ)); } static int dirtytime_interval_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret; ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); if (ret == 0 && write) { if (dirtytime_expire_interval) mod_delayed_work(system_percpu_wq, &dirtytime_work, 0); else cancel_delayed_work_sync(&dirtytime_work); } return ret; } static const struct ctl_table vm_fs_writeback_table[] = { { .procname = "dirtytime_expire_seconds", .data = &dirtytime_expire_interval, .maxlen = sizeof(dirtytime_expire_interval), .mode = 0644, .proc_handler = dirtytime_interval_handler, .extra1 = SYSCTL_ZERO, }, }; static int __init start_dirtytime_writeback(void) { if (dirtytime_expire_interval) schedule_delayed_work(&dirtytime_work, round_jiffies_relative(dirtytime_expire_interval * HZ)); register_sysctl_init("vm", vm_fs_writeback_table); return 0; } __initcall(start_dirtytime_writeback); /** * __mark_inode_dirty - internal function to mark an inode dirty * * @inode: inode to mark * @flags: what kind of dirty, e.g. I_DIRTY_SYNC. This can be a combination of * multiple I_DIRTY_* flags, except that I_DIRTY_TIME can't be combined * with I_DIRTY_PAGES. * * Mark an inode as dirty. We notify the filesystem, then update the inode's * dirty flags. Then, if needed we add the inode to the appropriate dirty list. * * Most callers should use mark_inode_dirty() or mark_inode_dirty_sync() * instead of calling this directly. * * CAREFUL! We only add the inode to the dirty list if it is hashed or if it * refers to a blockdev. Unhashed inodes will never be added to the dirty list * even if they are later hashed, as they will have been marked dirty already. * * In short, ensure you hash any inodes _before_ you start marking them dirty. * * Note that for blockdevs, inode->dirtied_when represents the dirtying time of * the block-special inode (/dev/hda1) itself. And the ->dirtied_when field of * the kernel-internal blockdev inode represents the dirtying time of the * blockdev's pages. This is why for I_DIRTY_PAGES we always use * page->mapping->host, so the page-dirtying time is recorded in the internal * blockdev inode. */ void __mark_inode_dirty(struct inode *inode, int flags) { struct super_block *sb = inode->i_sb; int dirtytime = 0; struct bdi_writeback *wb = NULL; trace_writeback_mark_inode_dirty(inode, flags); if (flags & I_DIRTY_INODE) { bool was_dirty_time = false; /* * Inode timestamp update will piggback on this dirtying. * We tell ->dirty_inode callback that timestamps need to * be updated by setting I_DIRTY_TIME in flags. */ if (inode_state_read_once(inode) & I_DIRTY_TIME) { spin_lock(&inode->i_lock); if (inode_state_read(inode) & I_DIRTY_TIME) { inode_state_clear(inode, I_DIRTY_TIME); flags |= I_DIRTY_TIME; was_dirty_time = true; } spin_unlock(&inode->i_lock); } /* * Notify the filesystem about the inode being dirtied, so that * (if needed) it can update on-disk fields and journal the * inode. This is only needed when the inode itself is being * dirtied now. I.e. it's only needed for I_DIRTY_INODE, not * for just I_DIRTY_PAGES or I_DIRTY_TIME. */ trace_writeback_dirty_inode_start(inode, flags); if (sb->s_op->dirty_inode) { sb->s_op->dirty_inode(inode, flags & (I_DIRTY_INODE | I_DIRTY_TIME)); } else if (was_dirty_time && inode->i_op->sync_lazytime) { inode->i_op->sync_lazytime(inode); } trace_writeback_dirty_inode(inode, flags); /* I_DIRTY_INODE supersedes I_DIRTY_TIME. */ flags &= ~I_DIRTY_TIME; } else { /* * Else it's either I_DIRTY_PAGES, I_DIRTY_TIME, or nothing. * (We don't support setting both I_DIRTY_PAGES and I_DIRTY_TIME * in one call to __mark_inode_dirty().) */ dirtytime = flags & I_DIRTY_TIME; WARN_ON_ONCE(dirtytime && flags != I_DIRTY_TIME); } /* * Paired with smp_mb() in __writeback_single_inode() for the * following lockless i_state test. See there for details. */ smp_mb(); if ((inode_state_read_once(inode) & flags) == flags) return; spin_lock(&inode->i_lock); if ((inode_state_read(inode) & flags) != flags) { const int was_dirty = inode_state_read(inode) & I_DIRTY; inode_attach_wb(inode, NULL); inode_state_set(inode, flags); /* * Grab inode's wb early because it requires dropping i_lock and we * need to make sure following checks happen atomically with dirty * list handling so that we don't move inodes under flush worker's * hands. */ if (!was_dirty) { wb = locked_inode_to_wb_and_lock_list(inode); spin_lock(&inode->i_lock); } /* * If the inode is queued for writeback by flush worker, just * update its dirty state. Once the flush worker is done with * the inode it will place it on the appropriate superblock * list, based upon its state. */ if (inode_state_read(inode) & I_SYNC_QUEUED) goto out_unlock; /* * Only add valid (hashed) inodes to the superblock's * dirty list. Add blockdev inodes as well. */ if (!S_ISBLK(inode->i_mode)) { if (inode_unhashed(inode)) goto out_unlock; } if (inode_state_read(inode) & I_FREEING) goto out_unlock; /* * If the inode was already on b_dirty/b_io/b_more_io, don't * reposition it (that would break b_dirty time-ordering). */ if (!was_dirty) { struct list_head *dirty_list; bool wakeup_bdi = false; inode->dirtied_when = jiffies; if (dirtytime) inode->dirtied_time_when = jiffies; if (inode_state_read(inode) & I_DIRTY) dirty_list = &wb->b_dirty; else dirty_list = &wb->b_dirty_time; wakeup_bdi = inode_io_list_move_locked(inode, wb, dirty_list); /* * If this is the first dirty inode for this bdi, * we have to wake-up the corresponding bdi thread * to make sure background write-back happens * later. */ if (wakeup_bdi && (wb->bdi->capabilities & BDI_CAP_WRITEBACK)) wb_wakeup_delayed(wb); spin_unlock(&wb->list_lock); spin_unlock(&inode->i_lock); trace_writeback_dirty_inode_enqueue(inode); return; } } out_unlock: if (wb) spin_unlock(&wb->list_lock); spin_unlock(&inode->i_lock); } EXPORT_SYMBOL(__mark_inode_dirty); /* * The @s_sync_lock is used to serialise concurrent sync operations * to avoid lock contention problems with concurrent wait_sb_inodes() calls. * Concurrent callers will block on the s_sync_lock rather than doing contending * walks. The queueing maintains sync(2) required behaviour as all the IO that * has been issued up to the time this function is enter is guaranteed to be * completed by the time we have gained the lock and waited for all IO that is * in progress regardless of the order callers are granted the lock. */ static void wait_sb_inodes(struct super_block *sb) { LIST_HEAD(sync_list); /* * We need to be protected against the filesystem going from * r/o to r/w or vice versa. */ WARN_ON(!rwsem_is_locked(&sb->s_umount)); mutex_lock(&sb->s_sync_lock); /* * Splice the writeback list onto a temporary list to avoid waiting on * inodes that have started writeback after this point. * * Use rcu_read_lock() to keep the inodes around until we have a * reference. s_inode_wblist_lock protects sb->s_inodes_wb as well as * the local list because inodes can be dropped from either by writeback * completion. */ rcu_read_lock(); spin_lock_irq(&sb->s_inode_wblist_lock); list_splice_init(&sb->s_inodes_wb, &sync_list); /* * Data integrity sync. Must wait for all pages under writeback, because * there may have been pages dirtied before our sync call, but which had * writeout started before we write it out. In which case, the inode * may not be on the dirty list, but we still have to wait for that * writeout. */ while (!list_empty(&sync_list)) { struct inode *inode = list_first_entry(&sync_list, struct inode, i_wb_list); struct address_space *mapping = inode->i_mapping; /* * Move each inode back to the wb list before we drop the lock * to preserve consistency between i_wb_list and the mapping * writeback tag. Writeback completion is responsible to remove * the inode from either list once the writeback tag is cleared. */ list_move_tail(&inode->i_wb_list, &sb->s_inodes_wb); /* * The mapping can appear untagged while still on-list since we * do not have the mapping lock. Skip it here, wb completion * will remove it. * * If the mapping does not have data integrity semantics, * there's no need to wait for the writeout to complete, as the * mapping cannot guarantee that data is persistently stored. */ if (!mapping_tagged(mapping, PAGECACHE_TAG_WRITEBACK) || mapping_no_data_integrity(mapping)) continue; spin_unlock_irq(&sb->s_inode_wblist_lock); spin_lock(&inode->i_lock); if (inode_state_read(inode) & (I_FREEING | I_WILL_FREE | I_NEW)) { spin_unlock(&inode->i_lock); spin_lock_irq(&sb->s_inode_wblist_lock); continue; } __iget(inode); spin_unlock(&inode->i_lock); rcu_read_unlock(); /* * We keep the error status of individual mapping so that * applications can catch the writeback error using fsync(2). * See filemap_fdatawait_keep_errors() for details. */ filemap_fdatawait_keep_errors(mapping); cond_resched(); iput(inode); rcu_read_lock(); spin_lock_irq(&sb->s_inode_wblist_lock); } spin_unlock_irq(&sb->s_inode_wblist_lock); rcu_read_unlock(); mutex_unlock(&sb->s_sync_lock); } static void __writeback_inodes_sb_nr(struct super_block *sb, unsigned long nr, enum wb_reason reason, bool skip_if_busy) { struct backing_dev_info *bdi = sb->s_bdi; DEFINE_WB_COMPLETION(done, bdi); struct wb_writeback_work work = { .sb = sb, .sync_mode = WB_SYNC_NONE, .tagged_writepages = 1, .done = &done, .nr_pages = nr, .reason = reason, }; if (!bdi_has_dirty_io(bdi) || bdi == &noop_backing_dev_info) return; WARN_ON(!rwsem_is_locked(&sb->s_umount)); bdi_split_work_to_wbs(sb->s_bdi, &work, skip_if_busy); wb_wait_for_completion(&done); } /** * writeback_inodes_sb_nr - writeback dirty inodes from given super_block * @sb: the superblock * @nr: the number of pages to write * @reason: reason why some writeback work initiated * * Start writeback on some inodes on this super_block. No guarantees are made * on how many (if any) will be written, and this function does not wait * for IO completion of submitted IO. */ void writeback_inodes_sb_nr(struct super_block *sb, unsigned long nr, enum wb_reason reason) { __writeback_inodes_sb_nr(sb, nr, reason, false); } EXPORT_SYMBOL(writeback_inodes_sb_nr); /** * writeback_inodes_sb - writeback dirty inodes from given super_block * @sb: the superblock * @reason: reason why some writeback work was initiated * * Start writeback on some inodes on this super_block. No guarantees are made * on how many (if any) will be written, and this function does not wait * for IO completion of submitted IO. */ void writeback_inodes_sb(struct super_block *sb, enum wb_reason reason) { writeback_inodes_sb_nr(sb, get_nr_dirty_pages(), reason); } EXPORT_SYMBOL(writeback_inodes_sb); /** * try_to_writeback_inodes_sb - try to start writeback if none underway * @sb: the superblock * @reason: reason why some writeback work was initiated * * Invoke __writeback_inodes_sb_nr if no writeback is currently underway. */ void try_to_writeback_inodes_sb(struct super_block *sb, enum wb_reason reason) { if (!down_read_trylock(&sb->s_umount)) return; __writeback_inodes_sb_nr(sb, get_nr_dirty_pages(), reason, true); up_read(&sb->s_umount); } EXPORT_SYMBOL(try_to_writeback_inodes_sb); /** * sync_inodes_sb - sync sb inode pages * @sb: the superblock * * This function writes and waits on any dirty inode belonging to this * super_block. */ void sync_inodes_sb(struct super_block *sb) { struct backing_dev_info *bdi = sb->s_bdi; DEFINE_WB_COMPLETION(done, bdi); struct wb_writeback_work work = { .sb = sb, .sync_mode = WB_SYNC_ALL, .nr_pages = LONG_MAX, .range_cyclic = 0, .done = &done, .reason = WB_REASON_SYNC, .for_sync = 1, }; /* * Can't skip on !bdi_has_dirty() because we should wait for !dirty * inodes under writeback and I_DIRTY_TIME inodes ignored by * bdi_has_dirty() need to be written out too. */ if (bdi == &noop_backing_dev_info) return; WARN_ON(!rwsem_is_locked(&sb->s_umount)); /* protect against inode wb switch, see inode_switch_wbs_work_fn() */ bdi_down_write_wb_switch_rwsem(bdi); bdi_split_work_to_wbs(bdi, &work, false); wb_wait_for_completion(&done); bdi_up_write_wb_switch_rwsem(bdi); wait_sb_inodes(sb); } EXPORT_SYMBOL(sync_inodes_sb); /** * write_inode_now - write an inode to disk * @inode: inode to write to disk * @sync: whether the write should be synchronous or not * * This function commits an inode to disk immediately if it is dirty. This is * primarily needed by knfsd. * * The caller must either have a ref on the inode or must have set I_WILL_FREE. */ int write_inode_now(struct inode *inode, int sync) { struct writeback_control wbc = { .nr_to_write = LONG_MAX, .sync_mode = sync ? WB_SYNC_ALL : WB_SYNC_NONE, .range_start = 0, .range_end = LLONG_MAX, }; if (!mapping_can_writeback(inode->i_mapping)) wbc.nr_to_write = 0; might_sleep(); return writeback_single_inode(inode, &wbc); } EXPORT_SYMBOL(write_inode_now); /** * sync_inode_metadata - write an inode to disk * @inode: the inode to sync * @wait: wait for I/O to complete. * * Write an inode to disk and adjust its dirty state after completion. * * Note: only writes the actual inode, no associated data or other metadata. */ int sync_inode_metadata(struct inode *inode, int wait) { struct writeback_control wbc = { .sync_mode = wait ? WB_SYNC_ALL : WB_SYNC_NONE, .nr_to_write = 0, /* metadata-only */ }; return writeback_single_inode(inode, &wbc); } EXPORT_SYMBOL(sync_inode_metadata);
c
github
https://github.com/torvalds/linux
fs/fs-writeback.c
{ "ZSCAN": { "summary": "Iterates over members and scores of a sorted set.", "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.", "group": "sorted_set", "since": "2.8.0", "arity": -3, "function": "zscanCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "cursor", "type": "integer" }, { "token": "MATCH", "name": "pattern", "type": "pattern", "optional": true }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true } ], "reply_schema": { "description": "cursor and scan response in array form", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "cursor", "type": "string" }, { "description": "list of elements of the sorted set, where each even element is the member, and each odd value is its associated score", "type": "array", "items": { "type": "string" } } ] } } }
json
github
https://github.com/redis/redis
src/commands/zscan.json
import BaseComponent from '../../../src/base-component.js' import { enableDismissTrigger } from '../../../src/util/component-functions.js' import { clearFixture, createEvent, getFixture } from '../../helpers/fixture.js' class DummyClass2 extends BaseComponent { static get NAME() { return 'test' } hide() { return true } testMethod() { return true } } describe('Plugin functions', () => { let fixtureEl beforeAll(() => { fixtureEl = getFixture() }) afterEach(() => { clearFixture() }) describe('data-bs-dismiss functionality', () => { it('should get Plugin and execute the given method, when a click occurred on data-bs-dismiss="PluginName"', () => { fixtureEl.innerHTML = [ '<div id="foo" class="test">', ' <button type="button" data-bs-dismiss="test" data-bs-target="#foo"></button>', '</div>' ].join('') const spyGet = spyOn(DummyClass2, 'getOrCreateInstance').and.callThrough() const spyTest = spyOn(DummyClass2.prototype, 'testMethod') const componentWrapper = fixtureEl.querySelector('#foo') const btnClose = fixtureEl.querySelector('[data-bs-dismiss="test"]') const event = createEvent('click') enableDismissTrigger(DummyClass2, 'testMethod') btnClose.dispatchEvent(event) expect(spyGet).toHaveBeenCalledWith(componentWrapper) expect(spyTest).toHaveBeenCalled() }) it('if data-bs-dismiss="PluginName" hasn\'t got "data-bs-target", "getOrCreateInstance" has to be initialized by closest "plugin.Name" class', () => { fixtureEl.innerHTML = [ '<div id="foo" class="test">', ' <button type="button" data-bs-dismiss="test"></button>', '</div>' ].join('') const spyGet = spyOn(DummyClass2, 'getOrCreateInstance').and.callThrough() const spyHide = spyOn(DummyClass2.prototype, 'hide') const componentWrapper = fixtureEl.querySelector('#foo') const btnClose = fixtureEl.querySelector('[data-bs-dismiss="test"]') const event = createEvent('click') enableDismissTrigger(DummyClass2) btnClose.dispatchEvent(event) expect(spyGet).toHaveBeenCalledWith(componentWrapper) expect(spyHide).toHaveBeenCalled() }) it('if data-bs-dismiss="PluginName" is disabled, must not trigger function', () => { fixtureEl.innerHTML = [ '<div id="foo" class="test">', ' <button type="button" disabled data-bs-dismiss="test"></button>', '</div>' ].join('') const spy = spyOn(DummyClass2, 'getOrCreateInstance').and.callThrough() const btnClose = fixtureEl.querySelector('[data-bs-dismiss="test"]') const event = createEvent('click') enableDismissTrigger(DummyClass2) btnClose.dispatchEvent(event) expect(spy).not.toHaveBeenCalled() }) it('should prevent default when the trigger is <a> or <area>', () => { fixtureEl.innerHTML = [ '<div id="foo" class="test">', ' <a type="button" data-bs-dismiss="test"></a>', '</div>' ].join('') const btnClose = fixtureEl.querySelector('[data-bs-dismiss="test"]') const event = createEvent('click') enableDismissTrigger(DummyClass2) const spy = spyOn(Event.prototype, 'preventDefault').and.callThrough() btnClose.dispatchEvent(event) expect(spy).toHaveBeenCalled() }) }) })
javascript
github
https://github.com/twbs/bootstrap
js/tests/unit/util/component-functions.spec.js
# python # This file is generated by a program (mib2py). Any edits will be lost. from pycopia.aid import Enum import pycopia.SMI.Basetypes Range = pycopia.SMI.Basetypes.Range Ranges = pycopia.SMI.Basetypes.Ranges from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, NodeObject, ModuleObject, GroupObject # imports from SNMPv2_SMI import MODULE_IDENTITY, OBJECT_TYPE, Unsigned32, Counter32 from SNMPv2_CONF import MODULE_COMPLIANCE, OBJECT_GROUP from TUBS_SMI import ibr from SNMPv2_TC import TEXTUAL_CONVENTION from SNMP_FRAMEWORK_MIB import SnmpAdminString class TUBS_IBR_XEN_MIB(ModuleObject): path = '/usr/share/snmp/mibs/tubs/TUBS-IBR-XEN-MIB' name = 'TUBS-IBR-XEN-MIB' language = 2 description = 'Experimental MIB module for Xen Virtual Hosting.' # nodes class xenMIB(NodeObject): status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14]) name = 'xenMIB' class xenObjects(NodeObject): OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1]) name = 'xenObjects' class xenHost(NodeObject): OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1]) name = 'xenHost' class xenTraps(NodeObject): OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 2]) name = 'xenTraps' class xenConformance(NodeObject): OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 3]) name = 'xenConformance' class xenCompliances(NodeObject): OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 3, 1]) name = 'xenCompliances' class xenGroups(NodeObject): OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 3, 2]) name = 'xenGroups' # macros # types class XenDomainState(pycopia.SMI.Basetypes.Enumeration): status = 1 enumerations = [Enum(1, 'unknown'), Enum(2, 'running'), Enum(3, 'blocked'), Enum(4, 'paused'), Enum(5, 'crashed'), Enum(6, 'dying'), Enum(7, 'shutdown')] # scalars class xenHostXenVersion(ScalarObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1, 1]) syntaxobject = SnmpAdminString class xenHostTotalMemKBytes(ScalarObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1, 2]) syntaxobject = pycopia.SMI.Basetypes.Unsigned32 class xenHostCPUs(ScalarObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1, 3]) syntaxobject = pycopia.SMI.Basetypes.Unsigned32 class xenHostCPUMHz(ScalarObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1, 4]) syntaxobject = pycopia.SMI.Basetypes.Unsigned32 # columns class xenDomainName(ColumnObject): access = 2 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1, 1]) syntaxobject = SnmpAdminString class xenDomainState(ColumnObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1, 2]) syntaxobject = XenDomainState class xenDomainMemKBytes(ColumnObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1, 3]) syntaxobject = pycopia.SMI.Basetypes.Unsigned32 class xenDomainMaxMemKBytes(ColumnObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1, 4]) syntaxobject = pycopia.SMI.Basetypes.Unsigned32 class xenVCPUIndex(ColumnObject): access = 2 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 3, 1, 1]) syntaxobject = pycopia.SMI.Basetypes.Unsigned32 class xenVCPUMilliseconds(ColumnObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 3, 1, 2]) syntaxobject = pycopia.SMI.Basetypes.Counter32 class xenNetworkIndex(ColumnObject): access = 2 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 1]) syntaxobject = pycopia.SMI.Basetypes.Unsigned32 class xenNetworkInKBytes(ColumnObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 2]) syntaxobject = pycopia.SMI.Basetypes.Counter32 class xenNetworkInPkts(ColumnObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 3]) syntaxobject = pycopia.SMI.Basetypes.Counter32 class xenNetworkInErrors(ColumnObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 4]) syntaxobject = pycopia.SMI.Basetypes.Counter32 class xenNetworkInDiscards(ColumnObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 5]) syntaxobject = pycopia.SMI.Basetypes.Counter32 class xenNetworkOutKBytes(ColumnObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 6]) syntaxobject = pycopia.SMI.Basetypes.Counter32 class xenNetworkOutPkts(ColumnObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 7]) syntaxobject = pycopia.SMI.Basetypes.Counter32 class xenNetworkOutErrors(ColumnObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 8]) syntaxobject = pycopia.SMI.Basetypes.Counter32 class xenNetworkOutDiscards(ColumnObject): access = 4 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 9]) syntaxobject = pycopia.SMI.Basetypes.Counter32 # rows class xenDomainEntry(RowObject): status = 1 index = pycopia.SMI.Objects.IndexObjects([xenDomainName], False) OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1]) access = 2 columns = {'xenDomainName': xenDomainName, 'xenDomainState': xenDomainState, 'xenDomainMemKBytes': xenDomainMemKBytes, 'xenDomainMaxMemKBytes': xenDomainMaxMemKBytes} class xenVCPUEntry(RowObject): status = 1 index = pycopia.SMI.Objects.IndexObjects([xenDomainName, xenVCPUIndex], False) OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 3, 1]) access = 2 columns = {'xenVCPUIndex': xenVCPUIndex, 'xenVCPUMilliseconds': xenVCPUMilliseconds} class xenNetworkEntry(RowObject): status = 1 index = pycopia.SMI.Objects.IndexObjects([xenDomainName, xenNetworkIndex], False) OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1]) access = 2 columns = {'xenNetworkIndex': xenNetworkIndex, 'xenNetworkInKBytes': xenNetworkInKBytes, 'xenNetworkInPkts': xenNetworkInPkts, 'xenNetworkInErrors': xenNetworkInErrors, 'xenNetworkInDiscards': xenNetworkInDiscards, 'xenNetworkOutKBytes': xenNetworkOutKBytes, 'xenNetworkOutPkts': xenNetworkOutPkts, 'xenNetworkOutErrors': xenNetworkOutErrors, 'xenNetworkOutDiscards': xenNetworkOutDiscards} # notifications (traps) # groups class xenGeneralGroup(GroupObject): access = 2 status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 4, 1, 1575, 1, 14, 3, 2, 1]) group = [xenHostXenVersion, xenHostTotalMemKBytes, xenHostCPUs, xenHostCPUMHz, xenDomainState, xenDomainMemKBytes, xenDomainMaxMemKBytes, xenVCPUMilliseconds, xenNetworkInKBytes, xenNetworkInPkts, xenNetworkInErrors, xenNetworkInDiscards, xenNetworkOutKBytes, xenNetworkOutPkts, xenNetworkOutErrors, xenNetworkOutDiscards] # capabilities # special additions # Add to master OIDMAP. from pycopia import SMI SMI.update_oidmap(__name__)
unknown
codeparrot/codeparrot-clean
/* crc32_fold_vpclmulqdq_tpl.h -- VPCMULQDQ-based CRC32 folding template. * Copyright Wangyang Guo (wangyang.guo@intel.com) * For conditions of distribution and use, see copyright notice in zlib.h */ #ifdef COPY static size_t fold_16_vpclmulqdq_copy(__m128i *xmm_crc0, __m128i *xmm_crc1, __m128i *xmm_crc2, __m128i *xmm_crc3, uint8_t *dst, const uint8_t *src, size_t len) { #else static size_t fold_16_vpclmulqdq(__m128i *xmm_crc0, __m128i *xmm_crc1, __m128i *xmm_crc2, __m128i *xmm_crc3, const uint8_t *src, size_t len, __m128i init_crc, int32_t first) { __m512i zmm_initial = _mm512_zextsi128_si512(init_crc); #endif __m512i zmm_t0, zmm_t1, zmm_t2, zmm_t3; __m512i zmm_crc0, zmm_crc1, zmm_crc2, zmm_crc3; __m512i z0, z1, z2, z3; size_t len_tmp = len; const __m512i zmm_fold4 = _mm512_set4_epi32( 0x00000001, 0x54442bd4, 0x00000001, 0xc6e41596); const __m512i zmm_fold16 = _mm512_set4_epi32( 0x00000001, 0x1542778a, 0x00000001, 0x322d1430); // zmm register init zmm_crc0 = _mm512_setzero_si512(); zmm_t0 = _mm512_loadu_si512((__m512i *)src); #ifndef COPY XOR_INITIAL512(zmm_t0); #endif zmm_crc1 = _mm512_loadu_si512((__m512i *)src + 1); zmm_crc2 = _mm512_loadu_si512((__m512i *)src + 2); zmm_crc3 = _mm512_loadu_si512((__m512i *)src + 3); /* already have intermediate CRC in xmm registers * fold4 with 4 xmm_crc to get zmm_crc0 */ zmm_crc0 = _mm512_inserti32x4(zmm_crc0, *xmm_crc0, 0); zmm_crc0 = _mm512_inserti32x4(zmm_crc0, *xmm_crc1, 1); zmm_crc0 = _mm512_inserti32x4(zmm_crc0, *xmm_crc2, 2); zmm_crc0 = _mm512_inserti32x4(zmm_crc0, *xmm_crc3, 3); z0 = _mm512_clmulepi64_epi128(zmm_crc0, zmm_fold4, 0x01); zmm_crc0 = _mm512_clmulepi64_epi128(zmm_crc0, zmm_fold4, 0x10); zmm_crc0 = _mm512_ternarylogic_epi32(zmm_crc0, z0, zmm_t0, 0x96); #ifdef COPY _mm512_storeu_si512((__m512i *)dst, zmm_t0); _mm512_storeu_si512((__m512i *)dst + 1, zmm_crc1); _mm512_storeu_si512((__m512i *)dst + 2, zmm_crc2); _mm512_storeu_si512((__m512i *)dst + 3, zmm_crc3); dst += 256; #endif len -= 256; src += 256; // fold-16 loops while (len >= 256) { zmm_t0 = _mm512_loadu_si512((__m512i *)src); zmm_t1 = _mm512_loadu_si512((__m512i *)src + 1); zmm_t2 = _mm512_loadu_si512((__m512i *)src + 2); zmm_t3 = _mm512_loadu_si512((__m512i *)src + 3); z0 = _mm512_clmulepi64_epi128(zmm_crc0, zmm_fold16, 0x01); z1 = _mm512_clmulepi64_epi128(zmm_crc1, zmm_fold16, 0x01); z2 = _mm512_clmulepi64_epi128(zmm_crc2, zmm_fold16, 0x01); z3 = _mm512_clmulepi64_epi128(zmm_crc3, zmm_fold16, 0x01); zmm_crc0 = _mm512_clmulepi64_epi128(zmm_crc0, zmm_fold16, 0x10); zmm_crc1 = _mm512_clmulepi64_epi128(zmm_crc1, zmm_fold16, 0x10); zmm_crc2 = _mm512_clmulepi64_epi128(zmm_crc2, zmm_fold16, 0x10); zmm_crc3 = _mm512_clmulepi64_epi128(zmm_crc3, zmm_fold16, 0x10); zmm_crc0 = _mm512_ternarylogic_epi32(zmm_crc0, z0, zmm_t0, 0x96); zmm_crc1 = _mm512_ternarylogic_epi32(zmm_crc1, z1, zmm_t1, 0x96); zmm_crc2 = _mm512_ternarylogic_epi32(zmm_crc2, z2, zmm_t2, 0x96); zmm_crc3 = _mm512_ternarylogic_epi32(zmm_crc3, z3, zmm_t3, 0x96); #ifdef COPY _mm512_storeu_si512((__m512i *)dst, zmm_t0); _mm512_storeu_si512((__m512i *)dst + 1, zmm_t1); _mm512_storeu_si512((__m512i *)dst + 2, zmm_t2); _mm512_storeu_si512((__m512i *)dst + 3, zmm_t3); dst += 256; #endif len -= 256; src += 256; } // zmm_crc[0,1,2,3] -> zmm_crc0 z0 = _mm512_clmulepi64_epi128(zmm_crc0, zmm_fold4, 0x01); zmm_crc0 = _mm512_clmulepi64_epi128(zmm_crc0, zmm_fold4, 0x10); zmm_crc0 = _mm512_ternarylogic_epi32(zmm_crc0, z0, zmm_crc1, 0x96); z0 = _mm512_clmulepi64_epi128(zmm_crc0, zmm_fold4, 0x01); zmm_crc0 = _mm512_clmulepi64_epi128(zmm_crc0, zmm_fold4, 0x10); zmm_crc0 = _mm512_ternarylogic_epi32(zmm_crc0, z0, zmm_crc2, 0x96); z0 = _mm512_clmulepi64_epi128(zmm_crc0, zmm_fold4, 0x01); zmm_crc0 = _mm512_clmulepi64_epi128(zmm_crc0, zmm_fold4, 0x10); zmm_crc0 = _mm512_ternarylogic_epi32(zmm_crc0, z0, zmm_crc3, 0x96); // zmm_crc0 -> xmm_crc[0, 1, 2, 3] *xmm_crc0 = _mm512_extracti32x4_epi32(zmm_crc0, 0); *xmm_crc1 = _mm512_extracti32x4_epi32(zmm_crc0, 1); *xmm_crc2 = _mm512_extracti32x4_epi32(zmm_crc0, 2); *xmm_crc3 = _mm512_extracti32x4_epi32(zmm_crc0, 3); return (len_tmp - len); // return n bytes processed }
c
github
https://github.com/opencv/opencv
3rdparty/zlib-ng/arch/x86/crc32_fold_vpclmulqdq_tpl.h
# Copyright 2010 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """GDB Pretty printers and convenience functions for Go's runtime structures. This script is loaded by GDB when it finds a .debug_gdb_scripts section in the compiled binary. The [68]l linkers emit this with a path to this file based on the path to the runtime package. """ # Known issues: # - pretty printing only works for the 'native' strings. E.g. 'type # foo string' will make foo a plain struct in the eyes of gdb, # circumventing the pretty print triggering. from __future__ import print_function import re import sys print("Loading Go Runtime support.", file=sys.stderr) #http://python3porting.com/differences.html if sys.version > '3': xrange = range # allow to manually reload while developing goobjfile = gdb.current_objfile() or gdb.objfiles()[0] goobjfile.pretty_printers = [] # # Value wrappers # class SliceValue: "Wrapper for slice values." def __init__(self, val): self.val = val @property def len(self): return int(self.val['len']) @property def cap(self): return int(self.val['cap']) def __getitem__(self, i): if i < 0 or i >= self.len: raise IndexError(i) ptr = self.val["array"] return (ptr + i).dereference() # # Pretty Printers # class StringTypePrinter: "Pretty print Go strings." pattern = re.compile(r'^struct string( \*)?$') def __init__(self, val): self.val = val def display_hint(self): return 'string' def to_string(self): l = int(self.val['len']) return self.val['str'].string("utf-8", "ignore", l) class SliceTypePrinter: "Pretty print slices." pattern = re.compile(r'^struct \[\]') def __init__(self, val): self.val = val def display_hint(self): return 'array' def to_string(self): return str(self.val.type)[6:] # skip 'struct ' def children(self): sval = SliceValue(self.val) if sval.len > sval.cap: return for idx, item in enumerate(sval): yield ('[{0}]'.format(idx), item) class MapTypePrinter: """Pretty print map[K]V types. Map-typed go variables are really pointers. dereference them in gdb to inspect their contents with this pretty printer. """ pattern = re.compile(r'^map\[.*\].*$') def __init__(self, val): self.val = val def display_hint(self): return 'map' def to_string(self): return str(self.val.type) def children(self): B = self.val['B'] buckets = self.val['buckets'] oldbuckets = self.val['oldbuckets'] flags = self.val['flags'] inttype = self.val['hash0'].type cnt = 0 for bucket in xrange(2 ** int(B)): bp = buckets + bucket if oldbuckets: oldbucket = bucket & (2 ** (B - 1) - 1) oldbp = oldbuckets + oldbucket oldb = oldbp.dereference() if (oldb['overflow'].cast(inttype) & 1) == 0: # old bucket not evacuated yet if bucket >= 2 ** (B - 1): continue # already did old bucket bp = oldbp while bp: b = bp.dereference() for i in xrange(8): if b['tophash'][i] != 0: k = b['keys'][i] v = b['values'][i] if flags & 1: k = k.dereference() if flags & 2: v = v.dereference() yield str(cnt), k yield str(cnt + 1), v cnt += 2 bp = b['overflow'] class ChanTypePrinter: """Pretty print chan[T] types. Chan-typed go variables are really pointers. dereference them in gdb to inspect their contents with this pretty printer. """ pattern = re.compile(r'^struct hchan<.*>$') def __init__(self, val): self.val = val def display_hint(self): return 'array' def to_string(self): return str(self.val.type) def children(self): # see chan.c chanbuf(). et is the type stolen from hchan<T>::recvq->first->elem et = [x.type for x in self.val['recvq']['first'].type.target().fields() if x.name == 'elem'][0] ptr = (self.val.address + 1).cast(et.pointer()) for i in range(self.val["qcount"]): j = (self.val["recvx"] + i) % self.val["dataqsiz"] yield ('[{0}]'.format(i), (ptr + j).dereference()) # # Register all the *Printer classes above. # def makematcher(klass): def matcher(val): try: if klass.pattern.match(str(val.type)): return klass(val) except Exception: pass return matcher goobjfile.pretty_printers.extend([makematcher(var) for var in vars().values() if hasattr(var, 'pattern')]) # # For reference, this is what we're trying to do: # eface: p *(*(struct 'runtime.rtype'*)'main.e'->type_->data)->string # iface: p *(*(struct 'runtime.rtype'*)'main.s'->tab->Type->data)->string # # interface types can't be recognized by their name, instead we check # if they have the expected fields. Unfortunately the mapping of # fields to python attributes in gdb.py isn't complete: you can't test # for presence other than by trapping. def is_iface(val): try: return str(val['tab'].type) == "struct runtime.itab *" and str(val['data'].type) == "void *" except gdb.error: pass def is_eface(val): try: return str(val['_type'].type) == "struct runtime._type *" and str(val['data'].type) == "void *" except gdb.error: pass def lookup_type(name): try: return gdb.lookup_type(name) except gdb.error: pass try: return gdb.lookup_type('struct ' + name) except gdb.error: pass try: return gdb.lookup_type('struct ' + name[1:]).pointer() except gdb.error: pass def iface_commontype(obj): if is_iface(obj): go_type_ptr = obj['tab']['_type'] elif is_eface(obj): go_type_ptr = obj['_type'] else: return return go_type_ptr.cast(gdb.lookup_type("struct reflect.rtype").pointer()).dereference() def iface_dtype(obj): "Decode type of the data field of an eface or iface struct." # known issue: dtype_name decoded from runtime.rtype is "nested.Foo" # but the dwarf table lists it as "full/path/to/nested.Foo" dynamic_go_type = iface_commontype(obj) if dynamic_go_type is None: return dtype_name = dynamic_go_type['string'].dereference()['str'].string() dynamic_gdb_type = lookup_type(dtype_name) if dynamic_gdb_type is None: return type_size = int(dynamic_go_type['size']) uintptr_size = int(dynamic_go_type['size'].type.sizeof) # size is itself an uintptr if type_size > uintptr_size: dynamic_gdb_type = dynamic_gdb_type.pointer() return dynamic_gdb_type def iface_dtype_name(obj): "Decode type name of the data field of an eface or iface struct." dynamic_go_type = iface_commontype(obj) if dynamic_go_type is None: return return dynamic_go_type['string'].dereference()['str'].string() class IfacePrinter: """Pretty print interface values Casts the data field to the appropriate dynamic type.""" def __init__(self, val): self.val = val def display_hint(self): return 'string' def to_string(self): if self.val['data'] == 0: return 0x0 try: dtype = iface_dtype(self.val) except Exception: return "<bad dynamic type>" if dtype is None: # trouble looking up, print something reasonable return "({0}){0}".format(iface_dtype_name(self.val), self.val['data']) try: return self.val['data'].cast(dtype).dereference() except Exception: pass return self.val['data'].cast(dtype) def ifacematcher(val): if is_iface(val) or is_eface(val): return IfacePrinter(val) goobjfile.pretty_printers.append(ifacematcher) # # Convenience Functions # class GoLenFunc(gdb.Function): "Length of strings, slices, maps or channels" how = ((StringTypePrinter, 'len'), (SliceTypePrinter, 'len'), (MapTypePrinter, 'count'), (ChanTypePrinter, 'qcount')) def __init__(self): gdb.Function.__init__(self, "len") def invoke(self, obj): typename = str(obj.type) for klass, fld in self.how: if klass.pattern.match(typename): return obj[fld] class GoCapFunc(gdb.Function): "Capacity of slices or channels" how = ((SliceTypePrinter, 'cap'), (ChanTypePrinter, 'dataqsiz')) def __init__(self): gdb.Function.__init__(self, "cap") def invoke(self, obj): typename = str(obj.type) for klass, fld in self.how: if klass.pattern.match(typename): return obj[fld] class DTypeFunc(gdb.Function): """Cast Interface values to their dynamic type. For non-interface types this behaves as the identity operation. """ def __init__(self): gdb.Function.__init__(self, "dtype") def invoke(self, obj): try: return obj['data'].cast(iface_dtype(obj)) except gdb.error: pass return obj # # Commands # sts = ('idle', 'runnable', 'running', 'syscall', 'waiting', 'moribund', 'dead', 'recovery') def linked_list(ptr, linkfield): while ptr: yield ptr ptr = ptr[linkfield] class GoroutinesCmd(gdb.Command): "List all goroutines." def __init__(self): gdb.Command.__init__(self, "info goroutines", gdb.COMMAND_STACK, gdb.COMPLETE_NONE) def invoke(self, _arg, _from_tty): # args = gdb.string_to_argv(arg) vp = gdb.lookup_type('void').pointer() for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")): if ptr['atomicstatus'] == 6: # 'gdead' continue s = ' ' if ptr['m']: s = '*' pc = ptr['sched']['pc'].cast(vp) # python2 will not cast pc (type void*) to an int cleanly # instead python2 and python3 work with the hex string representation # of the void pointer which we can parse back into an int. # int(pc) will not work. try: #python3 / newer versions of gdb pc = int(pc) except gdb.error: # str(pc) can return things like # "0x429d6c <runtime.gopark+284>", so # chop at first space. pc = int(str(pc).split(None, 1)[0], 16) blk = gdb.block_for_pc(pc) print(s, ptr['goid'], "{0:8s}".format(sts[int(ptr['atomicstatus'])]), blk.function) def find_goroutine(goid): """ find_goroutine attempts to find the goroutine identified by goid. It returns a touple of gdv.Value's representing the stack pointer and program counter pointer for the goroutine. @param int goid @return tuple (gdb.Value, gdb.Value) """ vp = gdb.lookup_type('void').pointer() for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")): if ptr['atomicstatus'] == 6: # 'gdead' continue if ptr['goid'] == goid: return (ptr['sched'][x].cast(vp) for x in ('pc', 'sp')) return None, None class GoroutineCmd(gdb.Command): """Execute gdb command in the context of goroutine <goid>. Switch PC and SP to the ones in the goroutine's G structure, execute an arbitrary gdb command, and restore PC and SP. Usage: (gdb) goroutine <goid> <gdbcmd> Note that it is ill-defined to modify state in the context of a goroutine. Restrict yourself to inspecting values. """ def __init__(self): gdb.Command.__init__(self, "goroutine", gdb.COMMAND_STACK, gdb.COMPLETE_NONE) def invoke(self, arg, _from_tty): goid, cmd = arg.split(None, 1) goid = gdb.parse_and_eval(goid) pc, sp = find_goroutine(int(goid)) if not pc: print("No such goroutine: ", goid) return try: #python3 / newer versions of gdb pc = int(pc) except gdb.error: pc = int(str(pc).split(None, 1)[0], 16) save_frame = gdb.selected_frame() gdb.parse_and_eval('$save_sp = $sp') gdb.parse_and_eval('$save_pc = $pc') gdb.parse_and_eval('$sp = {0}'.format(str(sp))) gdb.parse_and_eval('$pc = {0}'.format(str(pc))) try: gdb.execute(cmd) finally: gdb.parse_and_eval('$sp = $save_sp') gdb.parse_and_eval('$pc = $save_pc') save_frame.select() class GoIfaceCmd(gdb.Command): "Print Static and dynamic interface types" def __init__(self): gdb.Command.__init__(self, "iface", gdb.COMMAND_DATA, gdb.COMPLETE_SYMBOL) def invoke(self, arg, _from_tty): for obj in gdb.string_to_argv(arg): try: #TODO fix quoting for qualified variable names obj = gdb.parse_and_eval(str(obj)) except Exception as e: print("Can't parse ", obj, ": ", e) continue if obj['data'] == 0: dtype = "nil" else: dtype = iface_dtype(obj) if dtype is None: print("Not an interface: ", obj.type) continue print("{0}: {1}".format(obj.type, dtype)) # TODO: print interface's methods and dynamic type's func pointers thereof. #rsc: "to find the number of entries in the itab's Fn field look at # itab.inter->numMethods # i am sure i have the names wrong but look at the interface type # and its method count" # so Itype will start with a commontype which has kind = interface # # Register all convenience functions and CLI commands # GoLenFunc() GoCapFunc() DTypeFunc() GoroutinesCmd() GoroutineCmd() GoIfaceCmd()
unknown
codeparrot/codeparrot-clean
import re import sys def negate(condition): """ Returns a CPP conditional that is the opposite of the conditional passed in. """ if condition.startswith('!'): return condition[1:] return "!" + condition class Monitor: """ A simple C preprocessor that scans C source and computes, line by line, what the current C preprocessor #if state is. Doesn't handle everything--for example, if you have /* inside a C string, without a matching */ (also inside a C string), or with a */ inside a C string but on another line and with preprocessor macros in between... the parser will get lost. Anyway this implementation seems to work well enough for the CPython sources. """ is_a_simple_defined = re.compile(r'^defined\s*\(\s*[A-Za-z0-9_]+\s*\)$').match def __init__(self, filename=None, *, verbose=False): self.stack = [] self.in_comment = False self.continuation = None self.line_number = 0 self.filename = filename self.verbose = verbose def __repr__(self): return ''.join(( '<Monitor ', str(id(self)), " line=", str(self.line_number), " condition=", repr(self.condition()), ">")) def status(self): return str(self.line_number).rjust(4) + ": " + self.condition() def condition(self): """ Returns the current preprocessor state, as a single #if condition. """ return " && ".join(condition for token, condition in self.stack) def fail(self, *a): if self.filename: filename = " " + self.filename else: filename = '' print("Error at" + filename, "line", self.line_number, ":") print(" ", ' '.join(str(x) for x in a)) sys.exit(-1) def close(self): if self.stack: self.fail("Ended file while still in a preprocessor conditional block!") def write(self, s): for line in s.split("\n"): self.writeline(line) def writeline(self, line): self.line_number += 1 line = line.strip() def pop_stack(): if not self.stack: self.fail("#" + token + " without matching #if / #ifdef / #ifndef!") return self.stack.pop() if self.continuation: line = self.continuation + line self.continuation = None if not line: return if line.endswith('\\'): self.continuation = line[:-1].rstrip() + " " return # we have to ignore preprocessor commands inside comments # # we also have to handle this: # /* start # ... # */ /* <-- tricky! # ... # */ # and this: # /* start # ... # */ /* also tricky! */ if self.in_comment: if '*/' in line: # snip out the comment and continue # # GCC allows # /* comment # */ #include <stdio.h> # maybe other compilers too? _, _, line = line.partition('*/') self.in_comment = False while True: if '/*' in line: if self.in_comment: self.fail("Nested block comment!") before, _, remainder = line.partition('/*') comment, comment_ends, after = remainder.partition('*/') if comment_ends: # snip out the comment line = before.rstrip() + ' ' + after.lstrip() continue # comment continues to eol self.in_comment = True line = before.rstrip() break # we actually have some // comments # (but block comments take precedence) before, line_comment, comment = line.partition('//') if line_comment: line = before.rstrip() if not line.startswith('#'): return line = line[1:].lstrip() assert line fields = line.split() token = fields[0].lower() condition = ' '.join(fields[1:]).strip() if_tokens = {'if', 'ifdef', 'ifndef'} all_tokens = if_tokens | {'elif', 'else', 'endif'} if token not in all_tokens: return # cheat a little here, to reuse the implementation of if if token == 'elif': pop_stack() token = 'if' if token in if_tokens: if not condition: self.fail("Invalid format for #" + token + " line: no argument!") if token == 'if': if not self.is_a_simple_defined(condition): condition = "(" + condition + ")" else: fields = condition.split() if len(fields) != 1: self.fail("Invalid format for #" + token + " line: should be exactly one argument!") symbol = fields[0] condition = 'defined(' + symbol + ')' if token == 'ifndef': condition = '!' + condition self.stack.append(("if", condition)) if self.verbose: print(self.status()) return previous_token, previous_condition = pop_stack() if token == 'else': self.stack.append(('else', negate(previous_condition))) elif token == 'endif': pass if self.verbose: print(self.status()) if __name__ == '__main__': for filename in sys.argv[1:]: with open(filename, "rt") as f: cpp = Monitor(filename, verbose=True) print() print(filename) for line_number, line in enumerate(f.read().split('\n'), 1): cpp.writeline(line)
unknown
codeparrot/codeparrot-clean
//===--- LetPropertyLowering.swift -----------------------------------------==// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// import SIL /// Lowers let property accesses of classes. /// /// Lowering consists of two tasks: /// /// * In class initializers, insert `end_init_let_ref` instructions at places where all let-fields are initialized. /// This strictly separates the life-range of the class into a region where let fields are still written during /// initialization and a region where let fields are truly immutable. /// /// * Add the `[immutable]` flag to all `ref_element_addr` instructions (for let-fields) which are in the "immutable" /// region. This includes the region after an inserted `end_init_let_ref` in an class initializer, but also all /// let-field accesses in other functions than the initializer and the destructor. /// /// This pass should run after DefiniteInitialization but before RawSILInstLowering (because it relies on /// `mark_uninitialized` still present in the class initializer). /// /// Note that it's not mandatory to run this pass. If it doesn't run, SIL is still correct. /// /// Simplified example (after lowering): /// /// bb0(%0 : @owned C): // = self of the class initializer /// %1 = mark_uninitialized %0 /// %2 = ref_element_addr %1, #C.l // a let-field /// store %init_value to %2 /// %3 = end_init_let_ref %1 // inserted by lowering /// %4 = ref_element_addr [immutable] %3, #C.l // set to immutable by lowering /// %5 = load %4 /// let letPropertyLowering = FunctionPass(name: "let-property-lowering") { (function: Function, context: FunctionPassContext) in assert(context.silStage == .raw, "let-property-lowering must run before RawSILInstLowering") if context.hadError { // If DefiniteInitialization (or other passes) already reported an error, we cannot assume valid SIL anymore. return } if function.isDestructor { // Let-fields are not immutable in the class destructor. return } for inst in function.instructions { switch inst { // First task of lowering: insert `end_init_let_ref` instructions in class initializers. case let markUninitialized as MarkUninitializedInst where markUninitialized.type.isClass && // TODO: support move-only classes !markUninitialized.type.isMoveOnly && // We only have to do that for root classes because derived classes call the super-initializer // _after_ all fields in the derived class are already initialized. markUninitialized.kind == .rootSelf: insertEndInitInstructions(for: markUninitialized, context) // Second task of lowering: set the `immutable` flags. case let rea as RefElementAddrInst where rea.fieldIsLet && !rea.isInUninitializedRegion && // TODO: support move-only classes !rea.instance.type.isMoveOnly: rea.set(isImmutable: true, context) default: break } } } private func insertEndInitInstructions(for markUninitialized: MarkUninitializedInst, _ context: FunctionPassContext) { assert(!markUninitialized.type.isAddress, "self of class should not be an address") // The region which contains all let-field initializations, including any partial // let-field de-initializations (in case of a fail-able or throwing initializer). var initRegion = InstructionRange(begin: markUninitialized, context) defer { initRegion.deinitialize() } constructLetInitRegion(of: markUninitialized, result: &initRegion, context) insertEndInitInstructions(for: markUninitialized, atEndOf: initRegion, context) } private func insertEndInitInstructions( for markUninitialized: MarkUninitializedInst, atEndOf initRegion: InstructionRange, _ context: FunctionPassContext ) { var ssaUpdater = SSAUpdater(function: markUninitialized.parentFunction, type: markUninitialized.type, ownership: .owned, context) ssaUpdater.addAvailableValue(markUninitialized, in: markUninitialized.parentBlock) for endInst in initRegion.ends { let builder = Builder(after: endInst, context) let newValue = builder.createEndInitLetRef(operand: markUninitialized) ssaUpdater.addAvailableValue(newValue, in: endInst.parentBlock) } for exitInst in initRegion.exits { let builder = Builder(before: exitInst, context) let newValue = builder.createEndInitLetRef(operand: markUninitialized) ssaUpdater.addAvailableValue(newValue, in: exitInst.parentBlock) } for use in markUninitialized.uses { if !initRegion.inclusiveRangeContains(use.instruction) && !(use.instruction is EndInitLetRefInst) { use.set(to: ssaUpdater.getValue(atEndOf: use.instruction.parentBlock), context) } } // This peephole optimization is required to avoid ownership errors. replacePhisWithIncomingValues(phis: ssaUpdater.insertedPhis, context) } private func constructLetInitRegion( of markUninitialized: MarkUninitializedInst, result initRegion: inout InstructionRange, _ context: FunctionPassContext ) { // Adding the initial `mark_uninitialized` ensures that a single `end_init_let_ref` is inserted (after the // `mark_uninitialized`) in case there are no let-field accesses at all. // Note that we have to insert an `end_init_let_ref` even if there are no let-field initializations, because // derived classes could have let-field initializations in their initializers (which eventually call the // root-class initializer). initRegion.insert(markUninitialized) var borrows = Stack<BeginBorrowInstruction>(context) defer { borrows.deinitialize() } for inst in markUninitialized.parentFunction.instructions { switch inst { case let assign as AssignInst where assign.destination.isLetFieldAddress(of: markUninitialized): assert(assign.assignOwnership == .initialize) initRegion.insert(inst) case let store as StoreInst where store.destination.isLetFieldAddress(of: markUninitialized): assert(store.storeOwnership != .assign) initRegion.insert(inst) case let copy as CopyAddrInst where copy.destination.isLetFieldAddress(of: markUninitialized): assert(copy.isInitializationOfDestination) initRegion.insert(inst) case let beginAccess as BeginAccessInst where beginAccess.accessKind == .deinit && beginAccess.address.isLetFieldAddress(of: markUninitialized): // Include let-field partial de-initializations in the region. initRegion.insert(inst) case let beginBorrow as BeginBorrowInst where beginBorrow.borrowedValue.isReferenceDerived(from: markUninitialized): borrows.append(beginBorrow) case let storeBorrow as StoreBorrowInst where storeBorrow.source.isReferenceDerived(from: markUninitialized): borrows.append(storeBorrow) default: break } } // Extend the region to whole borrow scopes to avoid that we insert an `end_init_let_ref` in the // middle of a borrow scope. for borrow in borrows where initRegion.contains(borrow) { initRegion.insert(borrowScopeOf: borrow, context) } } private extension RefElementAddrInst { var isInUninitializedRegion: Bool { var root = self.instance while true { switch root { case let beginBorrow as BeginBorrowInst: root = beginBorrow.borrowedValue case let loadBorrow as LoadBorrowInst: // Initializers of derived classes store `self` into a stack location from where // it's loaded via a `load_borrow`. root = loadBorrow.address case is MarkUninitializedInst: return true default: return false } } } } private extension Value { func isReferenceDerived(from root: Value) -> Bool { var parent: Value = self while true { if parent == root { return true } if let operand = parent.forwardingInstruction?.singleForwardedOperand { parent = operand.value continue } if let transition = parent.definingInstruction as? OwnershipTransitionInstruction { parent = transition.operand.value continue } return false } } func isLetFieldAddress(of markUninitialized: MarkUninitializedInst) -> Bool { if case .class(let rea) = self.accessBase, rea.fieldIsLet, rea.instance.isReferenceDerived(from: markUninitialized) { return true } return false } }
swift
github
https://github.com/apple/swift
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LetPropertyLowering.swift
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """A canned Estimator for k-means clustering.""" # TODO(ccolby): Move clustering_ops.py into this file and streamline the code. from __future__ import absolute_import from __future__ import division from __future__ import print_function import time from tensorflow.contrib.factorization.python.ops import clustering_ops from tensorflow.python.estimator import estimator from tensorflow.python.estimator import model_fn as model_fn_lib from tensorflow.python.estimator.export import export_output from tensorflow.python.feature_column import feature_column_lib as fc from tensorflow.python.framework import ops from tensorflow.python.ops import array_ops from tensorflow.python.ops import control_flow_ops from tensorflow.python.ops import math_ops from tensorflow.python.ops import metrics from tensorflow.python.ops import state_ops from tensorflow.python.platform import tf_logging as logging from tensorflow.python.saved_model import signature_constants from tensorflow.python.summary import summary from tensorflow.python.training import session_run_hook from tensorflow.python.training import training_util class _LossRelativeChangeHook(session_run_hook.SessionRunHook): """Stops when the change in loss goes below a tolerance.""" def __init__(self, loss_tensor, tolerance): """Creates a _LossRelativeChangeHook. Args: loss_tensor: A scalar tensor of the loss value. tolerance: A relative tolerance of loss change between iterations. """ self._loss_tensor = loss_tensor self._tolerance = tolerance self._prev_loss = None def before_run(self, run_context): del run_context # unused return session_run_hook.SessionRunArgs(self._loss_tensor) def after_run(self, run_context, run_values): loss = run_values.results assert loss is not None if self._prev_loss: relative_change = ( abs(loss - self._prev_loss) / (1 + abs(self._prev_loss))) if relative_change < self._tolerance: run_context.request_stop() self._prev_loss = loss class _InitializeClustersHook(session_run_hook.SessionRunHook): """Initializes the cluster centers. The chief repeatedly invokes an initialization op until all cluster centers are initialized. The workers wait for the initialization phase to complete. """ def __init__(self, init_op, is_initialized_var, is_chief): """Creates an _InitializeClustersHook. Args: init_op: An op that, when run, will choose some initial cluster centers. This op may need to be run multiple times to choose all the centers. is_initialized_var: A boolean variable reporting whether all initial centers have been chosen. is_chief: A boolean specifying whether this task is the chief. """ self._init_op = init_op self._is_initialized_var = is_initialized_var self._is_chief = is_chief def after_create_session(self, session, coord): del coord # unused assert self._init_op.graph is ops.get_default_graph() assert self._is_initialized_var.graph is self._init_op.graph while True: try: if session.run(self._is_initialized_var): break elif self._is_chief: session.run(self._init_op) else: time.sleep(1) except RuntimeError as e: logging.info(e) def _parse_features_if_necessary(features, feature_columns): """Helper function to convert the input points into a usable format. Args: features: The input features. feature_columns: An optionable iterable containing all the feature columns used by the model. All items in the set should be feature column instances that can be passed to `tf.feature_column.input_layer`. If this is None, all features will be used. Returns: If `features` is a dict of `k` features (optionally filtered by `feature_columns`), each of which is a vector of `n` scalars, the return value is a Tensor of shape `(n, k)` representing `n` input points, where the items in the `k` dimension are sorted lexicographically by `features` key. If `features` is not a dict, it is returned unmodified. """ if not isinstance(features, dict): return features if feature_columns: return fc.input_layer(features, feature_columns) keys = sorted(features.keys()) with ops.colocate_with(features[keys[0]]): return array_ops.concat([features[k] for k in keys], axis=1) class _ModelFn(object): """Model function for the estimator.""" def __init__(self, num_clusters, initial_clusters, distance_metric, random_seed, use_mini_batch, mini_batch_steps_per_iteration, kmeans_plus_plus_num_retries, relative_tolerance, feature_columns): self._num_clusters = num_clusters self._initial_clusters = initial_clusters self._distance_metric = distance_metric self._random_seed = random_seed self._use_mini_batch = use_mini_batch self._mini_batch_steps_per_iteration = mini_batch_steps_per_iteration self._kmeans_plus_plus_num_retries = kmeans_plus_plus_num_retries self._relative_tolerance = relative_tolerance self._feature_columns = feature_columns def model_fn(self, features, mode, config): """Model function for the estimator. Note that this does not take a `labels` arg. This works, but `input_fn` must return either `features` or, equivalently, `(features, None)`. Args: features: The input points. See `tf.estimator.Estimator`. mode: See `tf.estimator.Estimator`. config: See `tf.estimator.Estimator`. Returns: A `tf.estimator.EstimatorSpec` (see `tf.estimator.Estimator`) specifying this behavior: * `train_op`: Execute one mini-batch or full-batch run of Lloyd's algorithm. * `loss`: The sum of the squared distances from each input point to its closest center. * `eval_metric_ops`: Maps `SCORE` to `loss`. * `predictions`: Maps `ALL_DISTANCES` to the distance from each input point to each cluster center; maps `CLUSTER_INDEX` to the index of the closest cluster center for each input point. """ # input_points is a single Tensor. Therefore, the sharding functionality # in clustering_ops is unused, and some of the values below are lists of a # single item. input_points = _parse_features_if_necessary(features, self._feature_columns) # Let N = the number of input_points. # all_distances: A list of one matrix of shape (N, num_clusters). Each value # is the distance from an input point to a cluster center. # model_predictions: A list of one vector of shape (N). Each value is the # cluster id of an input point. # losses: Similar to cluster_idx but provides the distance to the cluster # center. # is_initialized: scalar indicating whether the initial cluster centers # have been chosen; see init_op. # init_op: an op to choose the initial cluster centers. A single worker # repeatedly executes init_op until is_initialized becomes True. # training_op: an op that runs an iteration of training, either an entire # Lloyd iteration or a mini-batch of a Lloyd iteration. Multiple workers # may execute this op, but only after is_initialized becomes True. (all_distances, model_predictions, losses, is_initialized, init_op, training_op) = clustering_ops.KMeans( inputs=input_points, num_clusters=self._num_clusters, initial_clusters=self._initial_clusters, distance_metric=self._distance_metric, use_mini_batch=self._use_mini_batch, mini_batch_steps_per_iteration=self._mini_batch_steps_per_iteration, random_seed=self._random_seed, kmeans_plus_plus_num_retries=self._kmeans_plus_plus_num_retries ).training_graph() loss = math_ops.reduce_sum(losses) summary.scalar('loss/raw', loss) incr_step = state_ops.assign_add(training_util.get_global_step(), 1) training_op = control_flow_ops.with_dependencies([training_op, incr_step], loss) training_hooks = [ _InitializeClustersHook(init_op, is_initialized, config.is_chief) ] if self._relative_tolerance is not None: training_hooks.append( _LossRelativeChangeHook(loss, self._relative_tolerance)) export_outputs = { KMeansClustering.ALL_DISTANCES: export_output.PredictOutput(all_distances[0]), KMeansClustering.CLUSTER_INDEX: export_output.PredictOutput(model_predictions[0]), signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: export_output.PredictOutput(model_predictions[0]) } return model_fn_lib.EstimatorSpec( mode=mode, predictions={ KMeansClustering.ALL_DISTANCES: all_distances[0], KMeansClustering.CLUSTER_INDEX: model_predictions[0], }, loss=loss, train_op=training_op, eval_metric_ops={KMeansClustering.SCORE: metrics.mean(loss)}, training_hooks=training_hooks, export_outputs=export_outputs) # TODO(agarwal,ands): support sharded input. class KMeansClustering(estimator.Estimator): """An Estimator for K-Means clustering. Example: ``` import numpy as np import tensorflow as tf num_points = 100 dimensions = 2 points = np.random.uniform(0, 1000, [num_points, dimensions]) def input_fn(): return tf.train.limit_epochs( tf.convert_to_tensor(points, dtype=tf.float32), num_epochs=1) num_clusters = 5 kmeans = tf.contrib.factorization.KMeansClustering( num_clusters=num_clusters, use_mini_batch=False) # train num_iterations = 10 previous_centers = None for _ in xrange(num_iterations): kmeans.train(input_fn) cluster_centers = kmeans.cluster_centers() if previous_centers is not None: print 'delta:', cluster_centers - previous_centers previous_centers = cluster_centers print 'score:', kmeans.score(input_fn) print 'cluster centers:', cluster_centers # map the input points to their clusters cluster_indices = list(kmeans.predict_cluster_index(input_fn)) for i, point in enumerate(points): cluster_index = cluster_indices[i] center = cluster_centers[cluster_index] print 'point:', point, 'is in cluster', cluster_index, 'centered at', center ``` The `SavedModel` saved by the `export_savedmodel` method does not include the cluster centers. However, the cluster centers may be retrieved by the latest checkpoint saved during training. Specifically, ``` kmeans.cluster_centers() ``` is equivalent to ``` tf.train.load_variable( kmeans.model_dir, KMeansClustering.CLUSTER_CENTERS_VAR_NAME) ``` """ # Valid values for the distance_metric constructor argument. SQUARED_EUCLIDEAN_DISTANCE = clustering_ops.SQUARED_EUCLIDEAN_DISTANCE COSINE_DISTANCE = clustering_ops.COSINE_DISTANCE # Values for initial_clusters constructor argument. RANDOM_INIT = clustering_ops.RANDOM_INIT KMEANS_PLUS_PLUS_INIT = clustering_ops.KMEANS_PLUS_PLUS_INIT # Metric returned by evaluate(): The sum of the squared distances from each # input point to its closest center. SCORE = 'score' # Keys returned by predict(). # ALL_DISTANCES: The distance from each input point to each cluster center. # CLUSTER_INDEX: The index of the closest cluster center for each input point. CLUSTER_INDEX = 'cluster_index' ALL_DISTANCES = 'all_distances' # Variable name used by cluster_centers(). CLUSTER_CENTERS_VAR_NAME = clustering_ops.CLUSTERS_VAR_NAME def __init__(self, num_clusters, model_dir=None, initial_clusters=RANDOM_INIT, distance_metric=SQUARED_EUCLIDEAN_DISTANCE, random_seed=0, use_mini_batch=True, mini_batch_steps_per_iteration=1, kmeans_plus_plus_num_retries=2, relative_tolerance=None, config=None, feature_columns=None): """Creates an Estimator for running KMeans training and inference. This Estimator implements the following variants of the K-means algorithm: If `use_mini_batch` is False, it runs standard full batch K-means. Each training step runs a single iteration of K-Means and must process the full input at once. To run in this mode, the `input_fn` passed to `train` must return the entire input dataset. If `use_mini_batch` is True, it runs a generalization of the mini-batch K-means algorithm. It runs multiple iterations, where each iteration is composed of `mini_batch_steps_per_iteration` steps. Each training step accumulates the contribution from one mini-batch into temporary storage. Every `mini_batch_steps_per_iteration` steps, the cluster centers are updated and the temporary storage cleared for the next iteration. Note that: * If `mini_batch_steps_per_iteration=1`, the algorithm reduces to the standard K-means mini-batch algorithm. * If `mini_batch_steps_per_iteration = num_inputs / batch_size`, the algorithm becomes an asynchronous version of the full-batch algorithm. However, there is no guarantee by this implementation that each input is seen exactly once per iteration. Also, different updates are applied asynchronously without locking. So this asynchronous version may not behave exactly like a full-batch version. Args: num_clusters: An integer tensor specifying the number of clusters. This argument is ignored if `initial_clusters` is a tensor or numpy array. model_dir: The directory to save the model results and log files. initial_clusters: Specifies how the initial cluster centers are chosen. One of the following: * a tensor or numpy array with the initial cluster centers. * a callable `f(inputs, k)` that selects and returns up to `k` centers from an input batch. `f` is free to return any number of centers from `0` to `k`. It will be invoked on successive input batches as necessary until all `num_clusters` centers are chosen. * `KMeansClustering.RANDOM_INIT`: Choose centers randomly from an input batch. If the batch size is less than `num_clusters` then the entire batch is chosen to be initial cluster centers and the remaining centers are chosen from successive input batches. * `KMeansClustering.KMEANS_PLUS_PLUS_INIT`: Use kmeans++ to choose centers from the first input batch. If the batch size is less than `num_clusters`, a TensorFlow runtime error occurs. distance_metric: The distance metric used for clustering. One of: * `KMeansClustering.SQUARED_EUCLIDEAN_DISTANCE`: Euclidean distance between vectors `u` and `v` is defined as \\(||u - v||_2\\) which is the square root of the sum of the absolute squares of the elements' difference. * `KMeansClustering.COSINE_DISTANCE`: Cosine distance between vectors `u` and `v` is defined as \\(1 - (u . v) / (||u||_2 ||v||_2)\\). random_seed: Python integer. Seed for PRNG used to initialize centers. use_mini_batch: A boolean specifying whether to use the mini-batch k-means algorithm. See explanation above. mini_batch_steps_per_iteration: The number of steps after which the updated cluster centers are synced back to a master copy. Used only if `use_mini_batch=True`. See explanation above. kmeans_plus_plus_num_retries: For each point that is sampled during kmeans++ initialization, this parameter specifies the number of additional points to draw from the current distribution before selecting the best. If a negative value is specified, a heuristic is used to sample `O(log(num_to_sample))` additional points. Used only if `initial_clusters=KMeansClustering.KMEANS_PLUS_PLUS_INIT`. relative_tolerance: A relative tolerance of change in the loss between iterations. Stops learning if the loss changes less than this amount. This may not work correctly if `use_mini_batch=True`. config: See `tf.estimator.Estimator`. feature_columns: An optionable iterable containing all the feature columns used by the model. All items in the set should be feature column instances that can be passed to `tf.feature_column.input_layer`. If this is None, all features will be used. Raises: ValueError: An invalid argument was passed to `initial_clusters` or `distance_metric`. """ if isinstance(initial_clusters, str) and initial_clusters not in [ KMeansClustering.RANDOM_INIT, KMeansClustering.KMEANS_PLUS_PLUS_INIT ]: raise ValueError( "Unsupported initialization algorithm '%s'" % initial_clusters) if distance_metric not in [ KMeansClustering.SQUARED_EUCLIDEAN_DISTANCE, KMeansClustering.COSINE_DISTANCE ]: raise ValueError("Unsupported distance metric '%s'" % distance_metric) super(KMeansClustering, self).__init__( model_fn=_ModelFn( num_clusters, initial_clusters, distance_metric, random_seed, use_mini_batch, mini_batch_steps_per_iteration, kmeans_plus_plus_num_retries, relative_tolerance, feature_columns).model_fn, model_dir=model_dir, config=config) def _predict_one_key(self, input_fn, predict_key): for result in self.predict(input_fn=input_fn, predict_keys=[predict_key]): yield result[predict_key] def predict_cluster_index(self, input_fn): """Finds the index of the closest cluster center to each input point. Args: input_fn: Input points. See `tf.estimator.Estimator.predict`. Yields: The index of the closest cluster center for each input point. """ for index in self._predict_one_key(input_fn, KMeansClustering.CLUSTER_INDEX): yield index def score(self, input_fn): """Returns the sum of squared distances to nearest clusters. Note that this function is different from the corresponding one in sklearn which returns the negative sum. Args: input_fn: Input points. See `tf.estimator.Estimator.evaluate`. Only one batch is retrieved. Returns: The sum of the squared distance from each point in the first batch of inputs to its nearest cluster center. """ return self.evaluate(input_fn=input_fn, steps=1)[KMeansClustering.SCORE] def transform(self, input_fn): """Transforms each input point to its distances to all cluster centers. Note that if `distance_metric=KMeansClustering.SQUARED_EUCLIDEAN_DISTANCE`, this function returns the squared Euclidean distance while the corresponding sklearn function returns the Euclidean distance. Args: input_fn: Input points. See `tf.estimator.Estimator.predict`. Yields: The distances from each input point to each cluster center. """ for distances in self._predict_one_key(input_fn, KMeansClustering.ALL_DISTANCES): yield distances def cluster_centers(self): """Returns the cluster centers.""" return self.get_variable_value(KMeansClustering.CLUSTER_CENTERS_VAR_NAME)
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # # # Copyright (c) 2008 University of Dundee. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # Author: Aleksandra Tarkowska <A(dot)Tarkowska(at)dundee(dot)ac(dot)uk>, 2008. # # Version: 1.0 # import sys import platform import traceback import logging import urllib import urllib2 import urlparse from omero_version import omero_version from django.conf import settings logger = logging.getLogger(__name__) class SendFeedback(object): conn = None def __init__(self, feedback_url): self.url = urlparse.urljoin(feedback_url, "/qa/initial/") def send_feedback(self, error=None, comment=None, email=None, user_agent=""): try: p = { "app_name": settings.FEEDBACK_APP, "app_version": omero_version, "extra": "", "error": (error or ""), "email": (email or ""), "comment": comment } try: p['python_classpath'] = sys.path except: pass try: p['python_version'] = platform.python_version() except: pass try: p['os_name'] = platform.platform() except: pass try: p['os_arch'] = platform.machine() except: pass try: p['os_version'] = platform.release() except: pass data = urllib.urlencode(p) headers = { "Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain", "User-Agent": user_agent} request = urllib2.Request(self.url, data, headers) response = None try: response = urllib2.urlopen(request) if response.code == 200: logger.info(response.read()) else: logger.error( "Feedback server error: %s" % response.reason) raise Exception( "Feedback server error: %s" % response.reason) except urllib2.HTTPError, e: logger.error(traceback.format_exc()) raise Exception( "Feedback server error: %s" % e.code) except urllib2.URLError, e: logger.error(traceback.format_exc()) raise Exception( "Feedback server error: %s" % e.reason) finally: if response: response.close() except Exception, x: logger.error(traceback.format_exc()) raise Exception("Feedback server error: %s" % x.message)
unknown
codeparrot/codeparrot-clean
import os import sys import inspect import core.plugin def load_plugins(dir, instantiate = False, shell = None): plugins = {} for root, dirs, files in os.walk(dir): sys.path.append(root) # make forward slashes on windows module_root = root.replace(dir, "").replace("\\", "/") #if (module_root.startswith("/")): #module_root = module_root[1:] #print root for file in files: if not file.endswith(".py"): continue if file in ["__init__.py"]: continue file = file.rsplit(".py", 1)[0] pname = module_root + "/" + file if (pname.startswith("/")): pname = pname[1:] if instantiate: if pname in sys.modules: del sys.modules[pname] env = __import__(file, ) for name, obj in inspect.getmembers(env): if inspect.isclass(obj) and issubclass(obj, core.plugin.Plugin): plugins[pname] = obj(shell) break else: plugins[pname] = __import__(file) sys.path.remove(root) return plugins def load_script(path, options = None, minimize = True): with open(path, "rb") as f: script = f.read().strip() #script = self.linter.prepend_stdlib(script) #if minimize: #script = self.linter.minimize_script(script) script = apply_options(script, options) return script def apply_options(script, options = None): if options is not None: for option in options.options: name = "~%s~" % option.name val = str(option.value).encode() script = script.replace(name.encode(), val) script = script.replace(name.lower().encode(), val) return script
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # # Author: Nicolas Bessi # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # import datetime from openerp.osv import orm from openerp.tools import (DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT) class sale_order_line(orm.Model): """Adds two exception functions to be called by the sale_exceptions module. The first one will ensure that an order line can be delivered on the delivery date, if the related product is in MTS. Validation is done by using the shop related to the sales order line location and using the line delay. The second one will raise a sales exception if the current SO will break an order already placed in future """ _inherit = "sale.order.line" def _compute_line_delivery_date(self, line_br, context=None): date_order = line_br.order_id.date_order date_order = datetime.datetime.strptime(date_order, DEFAULT_SERVER_DATE_FORMAT) # delay is a float, that is perfectly supported by timedelta return date_order + datetime.timedelta(days=line_br.delay) def _get_line_location(self, line_br, context=None): return line_br.order_id.shop_id.warehouse_id.lot_stock_id.id def can_command_at_delivery_date(self, cr, uid, l_id, context=None): """Predicate that checks whether a SO line can be delivered at delivery date. Delivery date is computed using date of the order + line delay. Location is taken from the shop linked to the line :return: True if line can be delivered on time """ if context is None: context = {} prod_obj = self.pool['product.product'] if isinstance(l_id, (tuple, list)): assert len(l_id) == 1, "Only one id supported" l_id = l_id[0] line = self.browse(cr, uid, l_id, context=context) if not line.product_id or line.type != 'make_to_stock': return True delivery_date = self._compute_line_delivery_date(line, context=context) ctx = context.copy() ctx['to_date'] = delivery_date.strftime(DEFAULT_SERVER_DATETIME_FORMAT) ctx['location'] = self._get_line_location(line, context=context) ctx['compute_child'] = True # Virtual qty is made on all childs of chosen location prod_for_virtual_qty = prod_obj.read(cr, uid, line.product_id.id, ['virtual_available'], context=ctx) if prod_for_virtual_qty['virtual_available'] < line.product_uom_qty: return False return True def _get_states(self): return ('waiting', 'confirmed', 'assigned') def _get_affected_dates( self, cr, location_id, product_id, delivery_date, context=None ): """Determine future dates where virtual stock has to be checked. It will only look for stock move that pass by location_id. If your stock location have children or you have configured automated stock action they must pass by the location related to SO line, else the will be ignored :param location_id: location id to be checked :param product_id: product id te be checked :return: list of dates to be checked """ sql = ("SELECT date FROM stock_move" " WHERE state IN %s" " AND date > %s" " AND product_id = %s" " AND location_id = %s") cr.execute(sql, (self._get_states(), delivery_date, product_id, location_id)) return (row[0] for row in cr.fetchall()) def future_orders_are_affected(self, cr, uid, l_id, context=None): """Predicate function that is a naive workaround for the lack of stock reservation. This can be a performance killer, you should not use it if you have constantly a lot of running Orders :return: True if future order are affected by current command line """ if context is None: context = {} prod_obj = self.pool['product.product'] if isinstance(l_id, (tuple, list)): assert len(l_id) == 1, "Only one id supported" l_id = l_id[0] line = self.browse(cr, uid, l_id, context=context) if not line.product_id or not line.type == 'make_to_stock': return False delivery_date = self._compute_line_delivery_date(line, context=context) ctx = context.copy() location_id = self._get_line_location(line, context=context) ctx['location'] = location_id ctx['compute_child'] = True # Virtual qty is made on all childs of chosen location dates = self._get_affected_dates(cr, location_id, line.product_id.id, delivery_date, context=context) for aff_date in dates: ctx['to_date'] = aff_date prod_for_virtual_qty = prod_obj.read(cr, uid, line.product_id.id, ['virtual_available'], context=ctx) if prod_for_virtual_qty[ 'virtual_available' ] < line.product_uom_qty: return True return False
unknown
codeparrot/codeparrot-clean
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) return True pybindgen.settings.error_handler = ErrorHandler() import sys def module_init(): root_module = Module('ns.wimax', cpp_namespace='::ns3') return root_module def register_types(module): root_module = module.get_root() ## ul-job.h (module 'wimax'): ns3::ReqType [enumeration] module.add_enum('ReqType', ['DATA', 'UNICAST_POLLING']) ## log.h (module 'core'): ns3::LogLevel [enumeration] module.add_enum('LogLevel', ['LOG_NONE', 'LOG_ERROR', 'LOG_LEVEL_ERROR', 'LOG_WARN', 'LOG_LEVEL_WARN', 'LOG_DEBUG', 'LOG_LEVEL_DEBUG', 'LOG_INFO', 'LOG_LEVEL_INFO', 'LOG_FUNCTION', 'LOG_LEVEL_FUNCTION', 'LOG_LOGIC', 'LOG_LEVEL_LOGIC', 'LOG_ALL', 'LOG_LEVEL_ALL', 'LOG_PREFIX_FUNC', 'LOG_PREFIX_TIME', 'LOG_PREFIX_NODE', 'LOG_PREFIX_LEVEL', 'LOG_PREFIX_ALL'], import_from_module='ns.core') ## address.h (module 'network'): ns3::Address [class] module.add_class('Address', import_from_module='ns.network') ## address.h (module 'network'): ns3::Address::MaxSize_e [enumeration] module.add_enum('MaxSize_e', ['MAX_SIZE'], outer_class=root_module['ns3::Address'], import_from_module='ns.network') ## trace-helper.h (module 'network'): ns3::AsciiTraceHelper [class] module.add_class('AsciiTraceHelper', import_from_module='ns.network') ## trace-helper.h (module 'network'): ns3::AsciiTraceHelperForDevice [class] module.add_class('AsciiTraceHelperForDevice', allow_subclassing=True, import_from_module='ns.network') ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList [class] module.add_class('AttributeConstructionList', import_from_module='ns.core') ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item [struct] module.add_class('Item', import_from_module='ns.core', outer_class=root_module['ns3::AttributeConstructionList']) ## buffer.h (module 'network'): ns3::Buffer [class] module.add_class('Buffer', import_from_module='ns.network') ## buffer.h (module 'network'): ns3::Buffer::Iterator [class] module.add_class('Iterator', import_from_module='ns.network', outer_class=root_module['ns3::Buffer']) ## packet.h (module 'network'): ns3::ByteTagIterator [class] module.add_class('ByteTagIterator', import_from_module='ns.network') ## packet.h (module 'network'): ns3::ByteTagIterator::Item [class] module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagIterator']) ## byte-tag-list.h (module 'network'): ns3::ByteTagList [class] module.add_class('ByteTagList', import_from_module='ns.network') ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator [class] module.add_class('Iterator', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagList']) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item [struct] module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagList::Iterator']) ## callback.h (module 'core'): ns3::CallbackBase [class] module.add_class('CallbackBase', import_from_module='ns.core') ## cid.h (module 'wimax'): ns3::Cid [class] module.add_class('Cid') ## cid.h (module 'wimax'): ns3::Cid::Type [enumeration] module.add_enum('Type', ['BROADCAST', 'INITIAL_RANGING', 'BASIC', 'PRIMARY', 'TRANSPORT', 'MULTICAST', 'PADDING'], outer_class=root_module['ns3::Cid']) ## cid-factory.h (module 'wimax'): ns3::CidFactory [class] module.add_class('CidFactory') ## cs-parameters.h (module 'wimax'): ns3::CsParameters [class] module.add_class('CsParameters') ## cs-parameters.h (module 'wimax'): ns3::CsParameters::Action [enumeration] module.add_enum('Action', ['ADD', 'REPLACE', 'DELETE'], outer_class=root_module['ns3::CsParameters']) ## dl-mac-messages.h (module 'wimax'): ns3::DcdChannelEncodings [class] module.add_class('DcdChannelEncodings', allow_subclassing=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): ns3::DlFramePrefixIe [class] module.add_class('DlFramePrefixIe') ## event-id.h (module 'core'): ns3::EventId [class] module.add_class('EventId', import_from_module='ns.core') ## hash.h (module 'core'): ns3::Hasher [class] module.add_class('Hasher', import_from_module='ns.core') ## ipcs-classifier-record.h (module 'wimax'): ns3::IpcsClassifierRecord [class] module.add_class('IpcsClassifierRecord') ## ipv4-address.h (module 'network'): ns3::Ipv4Address [class] module.add_class('Ipv4Address', import_from_module='ns.network') ## ipv4-address.h (module 'network'): ns3::Ipv4Address [class] root_module['ns3::Ipv4Address'].implicitly_converts_to(root_module['ns3::Address']) ## ipv4-address.h (module 'network'): ns3::Ipv4Mask [class] module.add_class('Ipv4Mask', import_from_module='ns.network') ## ipv6-address.h (module 'network'): ns3::Ipv6Address [class] module.add_class('Ipv6Address', import_from_module='ns.network') ## ipv6-address.h (module 'network'): ns3::Ipv6Address [class] root_module['ns3::Ipv6Address'].implicitly_converts_to(root_module['ns3::Address']) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix [class] module.add_class('Ipv6Prefix', import_from_module='ns.network') ## log.h (module 'core'): ns3::LogComponent [class] module.add_class('LogComponent', import_from_module='ns.core') ## mac48-address.h (module 'network'): ns3::Mac48Address [class] module.add_class('Mac48Address', import_from_module='ns.network') ## mac48-address.h (module 'network'): ns3::Mac48Address [class] root_module['ns3::Mac48Address'].implicitly_converts_to(root_module['ns3::Address']) ## net-device-container.h (module 'network'): ns3::NetDeviceContainer [class] module.add_class('NetDeviceContainer', import_from_module='ns.network') ## node-container.h (module 'network'): ns3::NodeContainer [class] module.add_class('NodeContainer', import_from_module='ns.network') ## object-base.h (module 'core'): ns3::ObjectBase [class] module.add_class('ObjectBase', allow_subclassing=True, import_from_module='ns.core') ## object.h (module 'core'): ns3::ObjectDeleter [struct] module.add_class('ObjectDeleter', import_from_module='ns.core') ## object-factory.h (module 'core'): ns3::ObjectFactory [class] module.add_class('ObjectFactory', import_from_module='ns.core') ## dl-mac-messages.h (module 'wimax'): ns3::OfdmDcdChannelEncodings [class] module.add_class('OfdmDcdChannelEncodings', parent=root_module['ns3::DcdChannelEncodings']) ## dl-mac-messages.h (module 'wimax'): ns3::OfdmDlBurstProfile [class] module.add_class('OfdmDlBurstProfile') ## dl-mac-messages.h (module 'wimax'): ns3::OfdmDlBurstProfile::Diuc [enumeration] module.add_enum('Diuc', ['DIUC_STC_ZONE', 'DIUC_BURST_PROFILE_1', 'DIUC_BURST_PROFILE_2', 'DIUC_BURST_PROFILE_3', 'DIUC_BURST_PROFILE_4', 'DIUC_BURST_PROFILE_5', 'DIUC_BURST_PROFILE_6', 'DIUC_BURST_PROFILE_7', 'DIUC_BURST_PROFILE_8', 'DIUC_BURST_PROFILE_9', 'DIUC_BURST_PROFILE_10', 'DIUC_BURST_PROFILE_11', 'DIUC_GAP', 'DIUC_END_OF_MAP'], outer_class=root_module['ns3::OfdmDlBurstProfile']) ## dl-mac-messages.h (module 'wimax'): ns3::OfdmDlMapIe [class] module.add_class('OfdmDlMapIe') ## ul-mac-messages.h (module 'wimax'): ns3::OfdmUlBurstProfile [class] module.add_class('OfdmUlBurstProfile') ## ul-mac-messages.h (module 'wimax'): ns3::OfdmUlBurstProfile::Uiuc [enumeration] module.add_enum('Uiuc', ['UIUC_INITIAL_RANGING', 'UIUC_REQ_REGION_FULL', 'UIUC_REQ_REGION_FOCUSED', 'UIUC_FOCUSED_CONTENTION_IE', 'UIUC_BURST_PROFILE_5', 'UIUC_BURST_PROFILE_6', 'UIUC_BURST_PROFILE_7', 'UIUC_BURST_PROFILE_8', 'UIUC_BURST_PROFILE_9', 'UIUC_BURST_PROFILE_10', 'UIUC_BURST_PROFILE_11', 'UIUC_BURST_PROFILE_12', 'UIUC_SUBCH_NETWORK_ENTRY', 'UIUC_END_OF_MAP'], outer_class=root_module['ns3::OfdmUlBurstProfile']) ## ul-mac-messages.h (module 'wimax'): ns3::OfdmUlMapIe [class] module.add_class('OfdmUlMapIe') ## packet-metadata.h (module 'network'): ns3::PacketMetadata [class] module.add_class('PacketMetadata', import_from_module='ns.network') ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item [struct] module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata']) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item [enumeration] module.add_enum('', ['PAYLOAD', 'HEADER', 'TRAILER'], outer_class=root_module['ns3::PacketMetadata::Item'], import_from_module='ns.network') ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator [class] module.add_class('ItemIterator', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata']) ## packet.h (module 'network'): ns3::PacketTagIterator [class] module.add_class('PacketTagIterator', import_from_module='ns.network') ## packet.h (module 'network'): ns3::PacketTagIterator::Item [class] module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagIterator']) ## packet-tag-list.h (module 'network'): ns3::PacketTagList [class] module.add_class('PacketTagList', import_from_module='ns.network') ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct] module.add_class('TagData', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagList']) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData_e [enumeration] module.add_enum('TagData_e', ['MAX_SIZE'], outer_class=root_module['ns3::PacketTagList::TagData'], import_from_module='ns.network') ## log.h (module 'core'): ns3::ParameterLogger [class] module.add_class('ParameterLogger', import_from_module='ns.core') ## pcap-file.h (module 'network'): ns3::PcapFile [class] module.add_class('PcapFile', import_from_module='ns.network') ## trace-helper.h (module 'network'): ns3::PcapHelper [class] module.add_class('PcapHelper', import_from_module='ns.network') ## trace-helper.h (module 'network'): ns3::PcapHelper [enumeration] module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_LINUX_SSL', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4', 'DLT_NETLINK'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network') ## trace-helper.h (module 'network'): ns3::PcapHelperForDevice [class] module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network') ## snr-to-block-error-rate-manager.h (module 'wimax'): ns3::SNRToBlockErrorRateManager [class] module.add_class('SNRToBlockErrorRateManager') ## snr-to-block-error-rate-record.h (module 'wimax'): ns3::SNRToBlockErrorRateRecord [class] module.add_class('SNRToBlockErrorRateRecord') ## ss-record.h (module 'wimax'): ns3::SSRecord [class] module.add_class('SSRecord') ## send-params.h (module 'wimax'): ns3::SendParams [class] module.add_class('SendParams') ## service-flow.h (module 'wimax'): ns3::ServiceFlow [class] module.add_class('ServiceFlow') ## service-flow.h (module 'wimax'): ns3::ServiceFlow::Direction [enumeration] module.add_enum('Direction', ['SF_DIRECTION_DOWN', 'SF_DIRECTION_UP'], outer_class=root_module['ns3::ServiceFlow']) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::Type [enumeration] module.add_enum('Type', ['SF_TYPE_PROVISIONED', 'SF_TYPE_ADMITTED', 'SF_TYPE_ACTIVE'], outer_class=root_module['ns3::ServiceFlow']) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::SchedulingType [enumeration] module.add_enum('SchedulingType', ['SF_TYPE_NONE', 'SF_TYPE_UNDEF', 'SF_TYPE_BE', 'SF_TYPE_NRTPS', 'SF_TYPE_RTPS', 'SF_TYPE_UGS', 'SF_TYPE_ALL'], outer_class=root_module['ns3::ServiceFlow']) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::CsSpecification [enumeration] module.add_enum('CsSpecification', ['ATM', 'IPV4', 'IPV6', 'ETHERNET', 'VLAN', 'IPV4_OVER_ETHERNET', 'IPV6_OVER_ETHERNET', 'IPV4_OVER_VLAN', 'IPV6_OVER_VLAN'], outer_class=root_module['ns3::ServiceFlow']) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::ModulationType [enumeration] module.add_enum('ModulationType', ['MODULATION_TYPE_BPSK_12', 'MODULATION_TYPE_QPSK_12', 'MODULATION_TYPE_QPSK_34', 'MODULATION_TYPE_QAM16_12', 'MODULATION_TYPE_QAM16_34', 'MODULATION_TYPE_QAM64_23', 'MODULATION_TYPE_QAM64_34'], outer_class=root_module['ns3::ServiceFlow']) ## service-flow-record.h (module 'wimax'): ns3::ServiceFlowRecord [class] module.add_class('ServiceFlowRecord') ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simulator.h (module 'core'): ns3::Simulator [class] module.add_class('Simulator', destructor_visibility='private', import_from_module='ns.core') ## tag.h (module 'network'): ns3::Tag [class] module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase']) ## tag-buffer.h (module 'network'): ns3::TagBuffer [class] module.add_class('TagBuffer', import_from_module='ns.network') ## nstime.h (module 'core'): ns3::TimeWithUnit [class] module.add_class('TimeWithUnit', import_from_module='ns.core') ## wimax-tlv.h (module 'wimax'): ns3::TlvValue [class] module.add_class('TlvValue', allow_subclassing=True) ## wimax-tlv.h (module 'wimax'): ns3::TosTlvValue [class] module.add_class('TosTlvValue', parent=root_module['ns3::TlvValue']) ## type-id.h (module 'core'): ns3::TypeId [class] module.add_class('TypeId', import_from_module='ns.core') ## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration] module.add_enum('AttributeFlag', ['ATTR_GET', 'ATTR_SET', 'ATTR_CONSTRUCT', 'ATTR_SGC'], outer_class=root_module['ns3::TypeId'], import_from_module='ns.core') ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation [struct] module.add_class('AttributeInformation', import_from_module='ns.core', outer_class=root_module['ns3::TypeId']) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation [struct] module.add_class('TraceSourceInformation', import_from_module='ns.core', outer_class=root_module['ns3::TypeId']) ## wimax-tlv.h (module 'wimax'): ns3::U16TlvValue [class] module.add_class('U16TlvValue', parent=root_module['ns3::TlvValue']) ## wimax-tlv.h (module 'wimax'): ns3::U32TlvValue [class] module.add_class('U32TlvValue', parent=root_module['ns3::TlvValue']) ## wimax-tlv.h (module 'wimax'): ns3::U8TlvValue [class] module.add_class('U8TlvValue', parent=root_module['ns3::TlvValue']) ## ul-mac-messages.h (module 'wimax'): ns3::UcdChannelEncodings [class] module.add_class('UcdChannelEncodings', allow_subclassing=True) ## wimax-tlv.h (module 'wimax'): ns3::VectorTlvValue [class] module.add_class('VectorTlvValue', parent=root_module['ns3::TlvValue']) ## wimax-helper.h (module 'wimax'): ns3::WimaxHelper [class] module.add_class('WimaxHelper', parent=[root_module['ns3::PcapHelperForDevice'], root_module['ns3::AsciiTraceHelperForDevice']]) ## wimax-helper.h (module 'wimax'): ns3::WimaxHelper::NetDeviceType [enumeration] module.add_enum('NetDeviceType', ['DEVICE_TYPE_SUBSCRIBER_STATION', 'DEVICE_TYPE_BASE_STATION'], outer_class=root_module['ns3::WimaxHelper']) ## wimax-helper.h (module 'wimax'): ns3::WimaxHelper::PhyType [enumeration] module.add_enum('PhyType', ['SIMPLE_PHY_TYPE_OFDM'], outer_class=root_module['ns3::WimaxHelper']) ## wimax-helper.h (module 'wimax'): ns3::WimaxHelper::SchedulerType [enumeration] module.add_enum('SchedulerType', ['SCHED_TYPE_SIMPLE', 'SCHED_TYPE_RTPS', 'SCHED_TYPE_MBQOS'], outer_class=root_module['ns3::WimaxHelper']) ## empty.h (module 'core'): ns3::empty [class] module.add_class('empty', import_from_module='ns.core') ## int64x64-double.h (module 'core'): ns3::int64x64_t [class] module.add_class('int64x64_t', import_from_module='ns.core') ## int64x64-double.h (module 'core'): ns3::int64x64_t::impl_type [enumeration] module.add_enum('impl_type', ['int128_impl', 'cairo_impl', 'ld_impl'], outer_class=root_module['ns3::int64x64_t'], import_from_module='ns.core') ## simple-ofdm-send-param.h (module 'wimax'): ns3::simpleOfdmSendParam [class] module.add_class('simpleOfdmSendParam') ## chunk.h (module 'network'): ns3::Chunk [class] module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase']) ## wimax-tlv.h (module 'wimax'): ns3::ClassificationRuleVectorTlvValue [class] module.add_class('ClassificationRuleVectorTlvValue', parent=root_module['ns3::VectorTlvValue']) ## wimax-tlv.h (module 'wimax'): ns3::ClassificationRuleVectorTlvValue::ClassificationRuleTlvType [enumeration] module.add_enum('ClassificationRuleTlvType', ['Priority', 'ToS', 'Protocol', 'IP_src', 'IP_dst', 'Port_src', 'Port_dst', 'Index'], outer_class=root_module['ns3::ClassificationRuleVectorTlvValue']) ## wimax-tlv.h (module 'wimax'): ns3::CsParamVectorTlvValue [class] module.add_class('CsParamVectorTlvValue', parent=root_module['ns3::VectorTlvValue']) ## wimax-tlv.h (module 'wimax'): ns3::CsParamVectorTlvValue::Type [enumeration] module.add_enum('Type', ['Classifier_DSC_Action', 'Packet_Classification_Rule'], outer_class=root_module['ns3::CsParamVectorTlvValue']) ## header.h (module 'network'): ns3::Header [class] module.add_class('Header', import_from_module='ns.network', parent=root_module['ns3::Chunk']) ## wimax-tlv.h (module 'wimax'): ns3::Ipv4AddressTlvValue [class] module.add_class('Ipv4AddressTlvValue', parent=root_module['ns3::TlvValue']) ## wimax-tlv.h (module 'wimax'): ns3::Ipv4AddressTlvValue::ipv4Addr [struct] module.add_class('ipv4Addr', outer_class=root_module['ns3::Ipv4AddressTlvValue']) ## wimax-mac-header.h (module 'wimax'): ns3::MacHeaderType [class] module.add_class('MacHeaderType', parent=root_module['ns3::Header']) ## wimax-mac-header.h (module 'wimax'): ns3::MacHeaderType::HeaderType [enumeration] module.add_enum('HeaderType', ['HEADER_TYPE_GENERIC', 'HEADER_TYPE_BANDWIDTH'], outer_class=root_module['ns3::MacHeaderType']) ## mac-messages.h (module 'wimax'): ns3::ManagementMessageType [class] module.add_class('ManagementMessageType', parent=root_module['ns3::Header']) ## mac-messages.h (module 'wimax'): ns3::ManagementMessageType::MessageType [enumeration] module.add_enum('MessageType', ['MESSAGE_TYPE_UCD', 'MESSAGE_TYPE_DCD', 'MESSAGE_TYPE_DL_MAP', 'MESSAGE_TYPE_UL_MAP', 'MESSAGE_TYPE_RNG_REQ', 'MESSAGE_TYPE_RNG_RSP', 'MESSAGE_TYPE_REG_REQ', 'MESSAGE_TYPE_REG_RSP', 'MESSAGE_TYPE_DSA_REQ', 'MESSAGE_TYPE_DSA_RSP', 'MESSAGE_TYPE_DSA_ACK'], outer_class=root_module['ns3::ManagementMessageType']) ## object.h (module 'core'): ns3::Object [class] module.add_class('Object', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >']) ## object.h (module 'core'): ns3::Object::AggregateIterator [class] module.add_class('AggregateIterator', import_from_module='ns.core', outer_class=root_module['ns3::Object']) ## ofdm-downlink-frame-prefix.h (module 'wimax'): ns3::OfdmDownlinkFramePrefix [class] module.add_class('OfdmDownlinkFramePrefix', parent=root_module['ns3::Header']) ## send-params.h (module 'wimax'): ns3::OfdmSendParams [class] module.add_class('OfdmSendParams', parent=root_module['ns3::SendParams']) ## ul-mac-messages.h (module 'wimax'): ns3::OfdmUcdChannelEncodings [class] module.add_class('OfdmUcdChannelEncodings', parent=root_module['ns3::UcdChannelEncodings']) ## packet-burst.h (module 'network'): ns3::PacketBurst [class] module.add_class('PacketBurst', import_from_module='ns.network', parent=root_module['ns3::Object']) ## pcap-file-wrapper.h (module 'network'): ns3::PcapFileWrapper [class] module.add_class('PcapFileWrapper', import_from_module='ns.network', parent=root_module['ns3::Object']) ## wimax-tlv.h (module 'wimax'): ns3::PortRangeTlvValue [class] module.add_class('PortRangeTlvValue', parent=root_module['ns3::TlvValue']) ## wimax-tlv.h (module 'wimax'): ns3::PortRangeTlvValue::PortRange [struct] module.add_class('PortRange', outer_class=root_module['ns3::PortRangeTlvValue']) ## ul-job.h (module 'wimax'): ns3::PriorityUlJob [class] module.add_class('PriorityUlJob', parent=root_module['ns3::Object']) ## propagation-loss-model.h (module 'propagation'): ns3::PropagationLossModel [class] module.add_class('PropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::Object']) ## wimax-tlv.h (module 'wimax'): ns3::ProtocolTlvValue [class] module.add_class('ProtocolTlvValue', parent=root_module['ns3::TlvValue']) ## propagation-loss-model.h (module 'propagation'): ns3::RandomPropagationLossModel [class] module.add_class('RandomPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## random-variable-stream.h (module 'core'): ns3::RandomVariableStream [class] module.add_class('RandomVariableStream', import_from_module='ns.core', parent=root_module['ns3::Object']) ## propagation-loss-model.h (module 'propagation'): ns3::RangePropagationLossModel [class] module.add_class('RangePropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## mac-messages.h (module 'wimax'): ns3::RngReq [class] module.add_class('RngReq', parent=root_module['ns3::Header']) ## mac-messages.h (module 'wimax'): ns3::RngRsp [class] module.add_class('RngRsp', parent=root_module['ns3::Header']) ## ss-manager.h (module 'wimax'): ns3::SSManager [class] module.add_class('SSManager', parent=root_module['ns3::Object']) ## random-variable-stream.h (module 'core'): ns3::SequentialRandomVariable [class] module.add_class('SequentialRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## service-flow-manager.h (module 'wimax'): ns3::ServiceFlowManager [class] module.add_class('ServiceFlowManager', parent=root_module['ns3::Object']) ## service-flow-manager.h (module 'wimax'): ns3::ServiceFlowManager::ConfirmationCode [enumeration] module.add_enum('ConfirmationCode', ['CONFIRMATION_CODE_SUCCESS', 'CONFIRMATION_CODE_REJECT'], outer_class=root_module['ns3::ServiceFlowManager']) ## wimax-tlv.h (module 'wimax'): ns3::SfVectorTlvValue [class] module.add_class('SfVectorTlvValue', parent=root_module['ns3::VectorTlvValue']) ## wimax-tlv.h (module 'wimax'): ns3::SfVectorTlvValue::Type [enumeration] module.add_enum('Type', ['SFID', 'CID', 'Service_Class_Name', 'reserved1', 'QoS_Parameter_Set_Type', 'Traffic_Priority', 'Maximum_Sustained_Traffic_Rate', 'Maximum_Traffic_Burst', 'Minimum_Reserved_Traffic_Rate', 'Minimum_Tolerable_Traffic_Rate', 'Service_Flow_Scheduling_Type', 'Request_Transmission_Policy', 'Tolerated_Jitter', 'Maximum_Latency', 'Fixed_length_versus_Variable_length_SDU_Indicator', 'SDU_Size', 'Target_SAID', 'ARQ_Enable', 'ARQ_WINDOW_SIZE', 'ARQ_RETRY_TIMEOUT_Transmitter_Delay', 'ARQ_RETRY_TIMEOUT_Receiver_Delay', 'ARQ_BLOCK_LIFETIME', 'ARQ_SYNC_LOSS', 'ARQ_DELIVER_IN_ORDER', 'ARQ_PURGE_TIMEOUT', 'ARQ_BLOCK_SIZE', 'reserved2', 'CS_Specification', 'IPV4_CS_Parameters'], outer_class=root_module['ns3::SfVectorTlvValue']) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeAccessor', 'ns3::empty', 'ns3::DefaultDeleter<ns3::AttributeAccessor>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeChecker', 'ns3::empty', 'ns3::DefaultDeleter<ns3::AttributeChecker>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter<ns3::AttributeValue>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter<ns3::CallbackImplBase>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter<ns3::EventImpl>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter<ns3::Hash::Implementation>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::NixVector', 'ns3::empty', 'ns3::DefaultDeleter<ns3::NixVector>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::OutputStreamWrapper', 'ns3::empty', 'ns3::DefaultDeleter<ns3::OutputStreamWrapper>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Packet', 'ns3::empty', 'ns3::DefaultDeleter<ns3::Packet>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::TraceSourceAccessor', 'ns3::empty', 'ns3::DefaultDeleter<ns3::TraceSourceAccessor>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## ss-service-flow-manager.h (module 'wimax'): ns3::SsServiceFlowManager [class] module.add_class('SsServiceFlowManager', parent=root_module['ns3::ServiceFlowManager']) ## ss-service-flow-manager.h (module 'wimax'): ns3::SsServiceFlowManager::ConfirmationCode [enumeration] module.add_enum('ConfirmationCode', ['CONFIRMATION_CODE_SUCCESS', 'CONFIRMATION_CODE_REJECT'], outer_class=root_module['ns3::SsServiceFlowManager']) ## propagation-loss-model.h (module 'propagation'): ns3::ThreeLogDistancePropagationLossModel [class] module.add_class('ThreeLogDistancePropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## nstime.h (module 'core'): ns3::Time [class] module.add_class('Time', import_from_module='ns.core') ## nstime.h (module 'core'): ns3::Time::Unit [enumeration] module.add_enum('Unit', ['Y', 'D', 'H', 'MIN', 'S', 'MS', 'US', 'NS', 'PS', 'FS', 'LAST'], outer_class=root_module['ns3::Time'], import_from_module='ns.core') ## nstime.h (module 'core'): ns3::Time [class] root_module['ns3::Time'].implicitly_converts_to(root_module['ns3::int64x64_t']) ## wimax-tlv.h (module 'wimax'): ns3::Tlv [class] module.add_class('Tlv', parent=root_module['ns3::Header']) ## wimax-tlv.h (module 'wimax'): ns3::Tlv::CommonTypes [enumeration] module.add_enum('CommonTypes', ['HMAC_TUPLE', 'MAC_VERSION_ENCODING', 'CURRENT_TRANSMIT_POWER', 'DOWNLINK_SERVICE_FLOW', 'UPLINK_SERVICE_FLOW', 'VENDOR_ID_EMCODING', 'VENDOR_SPECIFIC_INFORMATION'], outer_class=root_module['ns3::Tlv']) ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor [class] module.add_class('TraceSourceAccessor', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >']) ## trailer.h (module 'network'): ns3::Trailer [class] module.add_class('Trailer', import_from_module='ns.network', parent=root_module['ns3::Chunk']) ## random-variable-stream.h (module 'core'): ns3::TriangularRandomVariable [class] module.add_class('TriangularRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## propagation-loss-model.h (module 'propagation'): ns3::TwoRayGroundPropagationLossModel [class] module.add_class('TwoRayGroundPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## ul-mac-messages.h (module 'wimax'): ns3::Ucd [class] module.add_class('Ucd', parent=root_module['ns3::Header']) ## ul-job.h (module 'wimax'): ns3::UlJob [class] module.add_class('UlJob', parent=root_module['ns3::Object']) ## ul-job.h (module 'wimax'): ns3::UlJob::JobPriority [enumeration] module.add_enum('JobPriority', ['LOW', 'INTERMEDIATE', 'HIGH'], outer_class=root_module['ns3::UlJob']) ## ul-mac-messages.h (module 'wimax'): ns3::UlMap [class] module.add_class('UlMap', parent=root_module['ns3::Header']) ## random-variable-stream.h (module 'core'): ns3::UniformRandomVariable [class] module.add_class('UniformRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## bs-uplink-scheduler.h (module 'wimax'): ns3::UplinkScheduler [class] module.add_class('UplinkScheduler', parent=root_module['ns3::Object']) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): ns3::UplinkSchedulerMBQoS [class] module.add_class('UplinkSchedulerMBQoS', parent=root_module['ns3::UplinkScheduler']) ## bs-uplink-scheduler-rtps.h (module 'wimax'): ns3::UplinkSchedulerRtps [class] module.add_class('UplinkSchedulerRtps', parent=root_module['ns3::UplinkScheduler']) ## bs-uplink-scheduler-simple.h (module 'wimax'): ns3::UplinkSchedulerSimple [class] module.add_class('UplinkSchedulerSimple', parent=root_module['ns3::UplinkScheduler']) ## random-variable-stream.h (module 'core'): ns3::WeibullRandomVariable [class] module.add_class('WeibullRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## wimax-connection.h (module 'wimax'): ns3::WimaxConnection [class] module.add_class('WimaxConnection', parent=root_module['ns3::Object']) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue [class] module.add_class('WimaxMacQueue', parent=root_module['ns3::Object']) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::QueueElement [struct] module.add_class('QueueElement', outer_class=root_module['ns3::WimaxMacQueue']) ## wimax-mac-to-mac-header.h (module 'wimax'): ns3::WimaxMacToMacHeader [class] module.add_class('WimaxMacToMacHeader', parent=root_module['ns3::Header']) ## wimax-phy.h (module 'wimax'): ns3::WimaxPhy [class] module.add_class('WimaxPhy', parent=root_module['ns3::Object']) ## wimax-phy.h (module 'wimax'): ns3::WimaxPhy::ModulationType [enumeration] module.add_enum('ModulationType', ['MODULATION_TYPE_BPSK_12', 'MODULATION_TYPE_QPSK_12', 'MODULATION_TYPE_QPSK_34', 'MODULATION_TYPE_QAM16_12', 'MODULATION_TYPE_QAM16_34', 'MODULATION_TYPE_QAM64_23', 'MODULATION_TYPE_QAM64_34'], outer_class=root_module['ns3::WimaxPhy']) ## wimax-phy.h (module 'wimax'): ns3::WimaxPhy::PhyState [enumeration] module.add_enum('PhyState', ['PHY_STATE_IDLE', 'PHY_STATE_SCANNING', 'PHY_STATE_TX', 'PHY_STATE_RX'], outer_class=root_module['ns3::WimaxPhy']) ## wimax-phy.h (module 'wimax'): ns3::WimaxPhy::PhyType [enumeration] module.add_enum('PhyType', ['SimpleWimaxPhy', 'simpleOfdmWimaxPhy'], outer_class=root_module['ns3::WimaxPhy']) ## random-variable-stream.h (module 'core'): ns3::ZetaRandomVariable [class] module.add_class('ZetaRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## random-variable-stream.h (module 'core'): ns3::ZipfRandomVariable [class] module.add_class('ZipfRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## attribute.h (module 'core'): ns3::AttributeAccessor [class] module.add_class('AttributeAccessor', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >']) ## attribute.h (module 'core'): ns3::AttributeChecker [class] module.add_class('AttributeChecker', allow_subclassing=False, automatic_type_narrowing=True, import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >']) ## attribute.h (module 'core'): ns3::AttributeValue [class] module.add_class('AttributeValue', allow_subclassing=False, automatic_type_narrowing=True, import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >']) ## bs-scheduler.h (module 'wimax'): ns3::BSScheduler [class] module.add_class('BSScheduler', parent=root_module['ns3::Object']) ## bs-scheduler-rtps.h (module 'wimax'): ns3::BSSchedulerRtps [class] module.add_class('BSSchedulerRtps', parent=root_module['ns3::BSScheduler']) ## bs-scheduler-simple.h (module 'wimax'): ns3::BSSchedulerSimple [class] module.add_class('BSSchedulerSimple', parent=root_module['ns3::BSScheduler']) ## wimax-mac-header.h (module 'wimax'): ns3::BandwidthRequestHeader [class] module.add_class('BandwidthRequestHeader', parent=root_module['ns3::Header']) ## wimax-mac-header.h (module 'wimax'): ns3::BandwidthRequestHeader::HeaderType [enumeration] module.add_enum('HeaderType', ['HEADER_TYPE_INCREMENTAL', 'HEADER_TYPE_AGGREGATE'], outer_class=root_module['ns3::BandwidthRequestHeader']) ## bs-service-flow-manager.h (module 'wimax'): ns3::BsServiceFlowManager [class] module.add_class('BsServiceFlowManager', parent=root_module['ns3::ServiceFlowManager']) ## bs-service-flow-manager.h (module 'wimax'): ns3::BsServiceFlowManager::ConfirmationCode [enumeration] module.add_enum('ConfirmationCode', ['CONFIRMATION_CODE_SUCCESS', 'CONFIRMATION_CODE_REJECT'], outer_class=root_module['ns3::BsServiceFlowManager']) ## callback.h (module 'core'): ns3::CallbackChecker [class] module.add_class('CallbackChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## callback.h (module 'core'): ns3::CallbackImplBase [class] module.add_class('CallbackImplBase', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >']) ## callback.h (module 'core'): ns3::CallbackValue [class] module.add_class('CallbackValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## channel.h (module 'network'): ns3::Channel [class] module.add_class('Channel', import_from_module='ns.network', parent=root_module['ns3::Object']) ## connection-manager.h (module 'wimax'): ns3::ConnectionManager [class] module.add_class('ConnectionManager', parent=root_module['ns3::Object']) ## random-variable-stream.h (module 'core'): ns3::ConstantRandomVariable [class] module.add_class('ConstantRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## dl-mac-messages.h (module 'wimax'): ns3::Dcd [class] module.add_class('Dcd', parent=root_module['ns3::Header']) ## random-variable-stream.h (module 'core'): ns3::DeterministicRandomVariable [class] module.add_class('DeterministicRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## dl-mac-messages.h (module 'wimax'): ns3::DlMap [class] module.add_class('DlMap', parent=root_module['ns3::Header']) ## mac-messages.h (module 'wimax'): ns3::DsaAck [class] module.add_class('DsaAck', parent=root_module['ns3::Header']) ## mac-messages.h (module 'wimax'): ns3::DsaReq [class] module.add_class('DsaReq', parent=root_module['ns3::Header']) ## mac-messages.h (module 'wimax'): ns3::DsaRsp [class] module.add_class('DsaRsp', parent=root_module['ns3::Header']) ## random-variable-stream.h (module 'core'): ns3::EmpiricalRandomVariable [class] module.add_class('EmpiricalRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## attribute.h (module 'core'): ns3::EmptyAttributeValue [class] module.add_class('EmptyAttributeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## random-variable-stream.h (module 'core'): ns3::ErlangRandomVariable [class] module.add_class('ErlangRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## event-impl.h (module 'core'): ns3::EventImpl [class] module.add_class('EventImpl', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >']) ## random-variable-stream.h (module 'core'): ns3::ExponentialRandomVariable [class] module.add_class('ExponentialRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## propagation-loss-model.h (module 'propagation'): ns3::FixedRssLossModel [class] module.add_class('FixedRssLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## wimax-mac-header.h (module 'wimax'): ns3::FragmentationSubheader [class] module.add_class('FragmentationSubheader', parent=root_module['ns3::Header']) ## propagation-loss-model.h (module 'propagation'): ns3::FriisPropagationLossModel [class] module.add_class('FriisPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## random-variable-stream.h (module 'core'): ns3::GammaRandomVariable [class] module.add_class('GammaRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## wimax-mac-header.h (module 'wimax'): ns3::GenericMacHeader [class] module.add_class('GenericMacHeader', parent=root_module['ns3::Header']) ## wimax-mac-header.h (module 'wimax'): ns3::GrantManagementSubheader [class] module.add_class('GrantManagementSubheader', parent=root_module['ns3::Header']) ## ipcs-classifier.h (module 'wimax'): ns3::IpcsClassifier [class] module.add_class('IpcsClassifier', parent=root_module['ns3::Object']) ## ipv4-address.h (module 'network'): ns3::Ipv4AddressChecker [class] module.add_class('Ipv4AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## ipv4-address.h (module 'network'): ns3::Ipv4AddressValue [class] module.add_class('Ipv4AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## ipv4-address.h (module 'network'): ns3::Ipv4MaskChecker [class] module.add_class('Ipv4MaskChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## ipv4-address.h (module 'network'): ns3::Ipv4MaskValue [class] module.add_class('Ipv4MaskValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## ipv6-address.h (module 'network'): ns3::Ipv6AddressChecker [class] module.add_class('Ipv6AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## ipv6-address.h (module 'network'): ns3::Ipv6AddressValue [class] module.add_class('Ipv6AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## ipv6-address.h (module 'network'): ns3::Ipv6PrefixChecker [class] module.add_class('Ipv6PrefixChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## ipv6-address.h (module 'network'): ns3::Ipv6PrefixValue [class] module.add_class('Ipv6PrefixValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## propagation-loss-model.h (module 'propagation'): ns3::LogDistancePropagationLossModel [class] module.add_class('LogDistancePropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## random-variable-stream.h (module 'core'): ns3::LogNormalRandomVariable [class] module.add_class('LogNormalRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## mac48-address.h (module 'network'): ns3::Mac48AddressChecker [class] module.add_class('Mac48AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## mac48-address.h (module 'network'): ns3::Mac48AddressValue [class] module.add_class('Mac48AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## propagation-loss-model.h (module 'propagation'): ns3::MatrixPropagationLossModel [class] module.add_class('MatrixPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## propagation-loss-model.h (module 'propagation'): ns3::NakagamiPropagationLossModel [class] module.add_class('NakagamiPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## net-device.h (module 'network'): ns3::NetDevice [class] module.add_class('NetDevice', import_from_module='ns.network', parent=root_module['ns3::Object']) ## net-device.h (module 'network'): ns3::NetDevice::PacketType [enumeration] module.add_enum('PacketType', ['PACKET_HOST', 'NS3_PACKET_HOST', 'PACKET_BROADCAST', 'NS3_PACKET_BROADCAST', 'PACKET_MULTICAST', 'NS3_PACKET_MULTICAST', 'PACKET_OTHERHOST', 'NS3_PACKET_OTHERHOST'], outer_class=root_module['ns3::NetDevice'], import_from_module='ns.network') ## nix-vector.h (module 'network'): ns3::NixVector [class] module.add_class('NixVector', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >']) ## node.h (module 'network'): ns3::Node [class] module.add_class('Node', import_from_module='ns.network', parent=root_module['ns3::Object']) ## random-variable-stream.h (module 'core'): ns3::NormalRandomVariable [class] module.add_class('NormalRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker [class] module.add_class('ObjectFactoryChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## object-factory.h (module 'core'): ns3::ObjectFactoryValue [class] module.add_class('ObjectFactoryValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## output-stream-wrapper.h (module 'network'): ns3::OutputStreamWrapper [class] module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >']) ## packet.h (module 'network'): ns3::Packet [class] module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >']) ## random-variable-stream.h (module 'core'): ns3::ParetoRandomVariable [class] module.add_class('ParetoRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## simple-ofdm-wimax-phy.h (module 'wimax'): ns3::SimpleOfdmWimaxPhy [class] module.add_class('SimpleOfdmWimaxPhy', parent=root_module['ns3::WimaxPhy']) ## simple-ofdm-wimax-phy.h (module 'wimax'): ns3::SimpleOfdmWimaxPhy::FrameDurationCode [enumeration] module.add_enum('FrameDurationCode', ['FRAME_DURATION_2_POINT_5_MS', 'FRAME_DURATION_4_MS', 'FRAME_DURATION_5_MS', 'FRAME_DURATION_8_MS', 'FRAME_DURATION_10_MS', 'FRAME_DURATION_12_POINT_5_MS', 'FRAME_DURATION_20_MS'], outer_class=root_module['ns3::SimpleOfdmWimaxPhy']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] module.add_class('TypeIdChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## type-id.h (module 'core'): ns3::TypeIdValue [class] module.add_class('TypeIdValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## uinteger.h (module 'core'): ns3::UintegerValue [class] module.add_class('UintegerValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## wimax-channel.h (module 'wimax'): ns3::WimaxChannel [class] module.add_class('WimaxChannel', parent=root_module['ns3::Channel']) ## wimax-net-device.h (module 'wimax'): ns3::WimaxNetDevice [class] module.add_class('WimaxNetDevice', parent=root_module['ns3::NetDevice']) ## wimax-net-device.h (module 'wimax'): ns3::WimaxNetDevice::Direction [enumeration] module.add_enum('Direction', ['DIRECTION_DOWNLINK', 'DIRECTION_UPLINK'], outer_class=root_module['ns3::WimaxNetDevice']) ## wimax-net-device.h (module 'wimax'): ns3::WimaxNetDevice::RangingStatus [enumeration] module.add_enum('RangingStatus', ['RANGING_STATUS_EXPIRED', 'RANGING_STATUS_CONTINUE', 'RANGING_STATUS_ABORT', 'RANGING_STATUS_SUCCESS'], outer_class=root_module['ns3::WimaxNetDevice']) ## address.h (module 'network'): ns3::AddressChecker [class] module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## address.h (module 'network'): ns3::AddressValue [class] module.add_class('AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## bs-net-device.h (module 'wimax'): ns3::BaseStationNetDevice [class] module.add_class('BaseStationNetDevice', parent=root_module['ns3::WimaxNetDevice']) ## bs-net-device.h (module 'wimax'): ns3::BaseStationNetDevice::State [enumeration] module.add_enum('State', ['BS_STATE_DL_SUB_FRAME', 'BS_STATE_UL_SUB_FRAME', 'BS_STATE_TTG', 'BS_STATE_RTG'], outer_class=root_module['ns3::BaseStationNetDevice']) ## bs-net-device.h (module 'wimax'): ns3::BaseStationNetDevice::MacPreamble [enumeration] module.add_enum('MacPreamble', ['SHORT_PREAMBLE', 'LONG_PREAMBLE'], outer_class=root_module['ns3::BaseStationNetDevice']) ## simple-ofdm-wimax-channel.h (module 'wimax'): ns3::SimpleOfdmWimaxChannel [class] module.add_class('SimpleOfdmWimaxChannel', parent=root_module['ns3::WimaxChannel']) ## simple-ofdm-wimax-channel.h (module 'wimax'): ns3::SimpleOfdmWimaxChannel::PropModel [enumeration] module.add_enum('PropModel', ['RANDOM_PROPAGATION', 'FRIIS_PROPAGATION', 'LOG_DISTANCE_PROPAGATION', 'COST231_PROPAGATION'], outer_class=root_module['ns3::SimpleOfdmWimaxChannel']) ## ss-net-device.h (module 'wimax'): ns3::SubscriberStationNetDevice [class] module.add_class('SubscriberStationNetDevice', parent=root_module['ns3::WimaxNetDevice']) ## ss-net-device.h (module 'wimax'): ns3::SubscriberStationNetDevice::State [enumeration] module.add_enum('State', ['SS_STATE_IDLE', 'SS_STATE_SCANNING', 'SS_STATE_SYNCHRONIZING', 'SS_STATE_ACQUIRING_PARAMETERS', 'SS_STATE_WAITING_REG_RANG_INTRVL', 'SS_STATE_WAITING_INV_RANG_INTRVL', 'SS_STATE_WAITING_RNG_RSP', 'SS_STATE_ADJUSTING_PARAMETERS', 'SS_STATE_REGISTERED', 'SS_STATE_TRANSMITTING', 'SS_STATE_STOPPED'], outer_class=root_module['ns3::SubscriberStationNetDevice']) ## ss-net-device.h (module 'wimax'): ns3::SubscriberStationNetDevice::EventType [enumeration] module.add_enum('EventType', ['EVENT_NONE', 'EVENT_WAIT_FOR_RNG_RSP', 'EVENT_DL_MAP_SYNC_TIMEOUT', 'EVENT_LOST_DL_MAP', 'EVENT_LOST_UL_MAP', 'EVENT_DCD_WAIT_TIMEOUT', 'EVENT_UCD_WAIT_TIMEOUT', 'EVENT_RANG_OPP_WAIT_TIMEOUT'], outer_class=root_module['ns3::SubscriberStationNetDevice']) module.add_container('std::map< std::string, ns3::LogComponent * >', ('std::string', 'ns3::LogComponent *'), container_type=u'map') module.add_container('std::vector< ns3::ServiceFlow * >', 'ns3::ServiceFlow *', container_type=u'vector') module.add_container('std::vector< bool >', 'bool', container_type=u'vector') module.add_container('ns3::bvec', 'bool', container_type=u'vector') module.add_container('std::vector< ns3::DlFramePrefixIe >', 'ns3::DlFramePrefixIe', container_type=u'vector') module.add_container('std::list< ns3::Ptr< ns3::Packet > >', 'ns3::Ptr< ns3::Packet >', container_type=u'list') module.add_container('std::vector< ns3::SSRecord * >', 'ns3::SSRecord *', container_type=u'vector') module.add_container('std::vector< ns3::OfdmUlBurstProfile >', 'ns3::OfdmUlBurstProfile', container_type=u'vector') module.add_container('std::list< ns3::OfdmUlMapIe >', 'ns3::OfdmUlMapIe', container_type=u'list') module.add_container('std::list< ns3::Ptr< ns3::UlJob > >', 'ns3::Ptr< ns3::UlJob >', container_type=u'list') module.add_container('std::list< ns3::Ptr< ns3::Packet const > >', 'ns3::Ptr< ns3::Packet const >', container_type=u'list') module.add_container('std::deque< ns3::WimaxMacQueue::QueueElement >', 'ns3::WimaxMacQueue::QueueElement', container_type=u'dequeue') module.add_container('std::list< std::pair< ns3::OfdmDlMapIe *, ns3::Ptr< ns3::PacketBurst > > >', 'std::pair< ns3::OfdmDlMapIe *, ns3::Ptr< ns3::PacketBurst > >', container_type=u'list') module.add_container('std::vector< ns3::Ptr< ns3::WimaxConnection > >', 'ns3::Ptr< ns3::WimaxConnection >', container_type=u'vector') module.add_container('std::vector< ns3::OfdmDlBurstProfile >', 'ns3::OfdmDlBurstProfile', container_type=u'vector') module.add_container('std::list< ns3::OfdmDlMapIe >', 'ns3::OfdmDlMapIe', container_type=u'list') typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) *', u'ns3::LogNodePrinter') typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) **', u'ns3::LogNodePrinter*') typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) *&', u'ns3::LogNodePrinter&') typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) *', u'ns3::LogTimePrinter') typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) **', u'ns3::LogTimePrinter*') typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) *&', u'ns3::LogTimePrinter&') typehandlers.add_type_alias(u'std::vector< bool, std::allocator< bool > >', u'ns3::bvec') typehandlers.add_type_alias(u'std::vector< bool, std::allocator< bool > >*', u'ns3::bvec*') typehandlers.add_type_alias(u'std::vector< bool, std::allocator< bool > >&', u'ns3::bvec&') ## Register a nested module for the namespace FatalImpl nested_module = module.add_cpp_namespace('FatalImpl') register_types_ns3_FatalImpl(nested_module) ## Register a nested module for the namespace Hash nested_module = module.add_cpp_namespace('Hash') register_types_ns3_Hash(nested_module) ## Register a nested module for the namespace TracedValueCallback nested_module = module.add_cpp_namespace('TracedValueCallback') register_types_ns3_TracedValueCallback(nested_module) ## Register a nested module for the namespace internal nested_module = module.add_cpp_namespace('internal') register_types_ns3_internal(nested_module) def register_types_ns3_FatalImpl(module): root_module = module.get_root() def register_types_ns3_Hash(module): root_module = module.get_root() ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >']) typehandlers.add_type_alias(u'uint32_t ( * ) ( char const *, size_t ) *', u'ns3::Hash::Hash32Function_ptr') typehandlers.add_type_alias(u'uint32_t ( * ) ( char const *, size_t ) **', u'ns3::Hash::Hash32Function_ptr*') typehandlers.add_type_alias(u'uint32_t ( * ) ( char const *, size_t ) *&', u'ns3::Hash::Hash32Function_ptr&') typehandlers.add_type_alias(u'uint64_t ( * ) ( char const *, size_t ) *', u'ns3::Hash::Hash64Function_ptr') typehandlers.add_type_alias(u'uint64_t ( * ) ( char const *, size_t ) **', u'ns3::Hash::Hash64Function_ptr*') typehandlers.add_type_alias(u'uint64_t ( * ) ( char const *, size_t ) *&', u'ns3::Hash::Hash64Function_ptr&') ## Register a nested module for the namespace Function nested_module = module.add_cpp_namespace('Function') register_types_ns3_Hash_Function(nested_module) def register_types_ns3_Hash_Function(module): root_module = module.get_root() ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) def register_types_ns3_TracedValueCallback(module): root_module = module.get_root() typehandlers.add_type_alias(u'void ( * ) ( ns3::Time, ns3::Time ) *', u'ns3::TracedValueCallback::Time') typehandlers.add_type_alias(u'void ( * ) ( ns3::Time, ns3::Time ) **', u'ns3::TracedValueCallback::Time*') typehandlers.add_type_alias(u'void ( * ) ( ns3::Time, ns3::Time ) *&', u'ns3::TracedValueCallback::Time&') def register_types_ns3_internal(module): root_module = module.get_root() def register_methods(root_module): register_Ns3Address_methods(root_module, root_module['ns3::Address']) register_Ns3AsciiTraceHelper_methods(root_module, root_module['ns3::AsciiTraceHelper']) register_Ns3AsciiTraceHelperForDevice_methods(root_module, root_module['ns3::AsciiTraceHelperForDevice']) register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList']) register_Ns3AttributeConstructionListItem_methods(root_module, root_module['ns3::AttributeConstructionList::Item']) register_Ns3Buffer_methods(root_module, root_module['ns3::Buffer']) register_Ns3BufferIterator_methods(root_module, root_module['ns3::Buffer::Iterator']) register_Ns3ByteTagIterator_methods(root_module, root_module['ns3::ByteTagIterator']) register_Ns3ByteTagIteratorItem_methods(root_module, root_module['ns3::ByteTagIterator::Item']) register_Ns3ByteTagList_methods(root_module, root_module['ns3::ByteTagList']) register_Ns3ByteTagListIterator_methods(root_module, root_module['ns3::ByteTagList::Iterator']) register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item']) register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) register_Ns3Cid_methods(root_module, root_module['ns3::Cid']) register_Ns3CidFactory_methods(root_module, root_module['ns3::CidFactory']) register_Ns3CsParameters_methods(root_module, root_module['ns3::CsParameters']) register_Ns3DcdChannelEncodings_methods(root_module, root_module['ns3::DcdChannelEncodings']) register_Ns3DlFramePrefixIe_methods(root_module, root_module['ns3::DlFramePrefixIe']) register_Ns3EventId_methods(root_module, root_module['ns3::EventId']) register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3IpcsClassifierRecord_methods(root_module, root_module['ns3::IpcsClassifierRecord']) register_Ns3Ipv4Address_methods(root_module, root_module['ns3::Ipv4Address']) register_Ns3Ipv4Mask_methods(root_module, root_module['ns3::Ipv4Mask']) register_Ns3Ipv6Address_methods(root_module, root_module['ns3::Ipv6Address']) register_Ns3Ipv6Prefix_methods(root_module, root_module['ns3::Ipv6Prefix']) register_Ns3LogComponent_methods(root_module, root_module['ns3::LogComponent']) register_Ns3Mac48Address_methods(root_module, root_module['ns3::Mac48Address']) register_Ns3NetDeviceContainer_methods(root_module, root_module['ns3::NetDeviceContainer']) register_Ns3NodeContainer_methods(root_module, root_module['ns3::NodeContainer']) register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase']) register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter']) register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory']) register_Ns3OfdmDcdChannelEncodings_methods(root_module, root_module['ns3::OfdmDcdChannelEncodings']) register_Ns3OfdmDlBurstProfile_methods(root_module, root_module['ns3::OfdmDlBurstProfile']) register_Ns3OfdmDlMapIe_methods(root_module, root_module['ns3::OfdmDlMapIe']) register_Ns3OfdmUlBurstProfile_methods(root_module, root_module['ns3::OfdmUlBurstProfile']) register_Ns3OfdmUlMapIe_methods(root_module, root_module['ns3::OfdmUlMapIe']) register_Ns3PacketMetadata_methods(root_module, root_module['ns3::PacketMetadata']) register_Ns3PacketMetadataItem_methods(root_module, root_module['ns3::PacketMetadata::Item']) register_Ns3PacketMetadataItemIterator_methods(root_module, root_module['ns3::PacketMetadata::ItemIterator']) register_Ns3PacketTagIterator_methods(root_module, root_module['ns3::PacketTagIterator']) register_Ns3PacketTagIteratorItem_methods(root_module, root_module['ns3::PacketTagIterator::Item']) register_Ns3PacketTagList_methods(root_module, root_module['ns3::PacketTagList']) register_Ns3PacketTagListTagData_methods(root_module, root_module['ns3::PacketTagList::TagData']) register_Ns3ParameterLogger_methods(root_module, root_module['ns3::ParameterLogger']) register_Ns3PcapFile_methods(root_module, root_module['ns3::PcapFile']) register_Ns3PcapHelper_methods(root_module, root_module['ns3::PcapHelper']) register_Ns3PcapHelperForDevice_methods(root_module, root_module['ns3::PcapHelperForDevice']) register_Ns3SNRToBlockErrorRateManager_methods(root_module, root_module['ns3::SNRToBlockErrorRateManager']) register_Ns3SNRToBlockErrorRateRecord_methods(root_module, root_module['ns3::SNRToBlockErrorRateRecord']) register_Ns3SSRecord_methods(root_module, root_module['ns3::SSRecord']) register_Ns3SendParams_methods(root_module, root_module['ns3::SendParams']) register_Ns3ServiceFlow_methods(root_module, root_module['ns3::ServiceFlow']) register_Ns3ServiceFlowRecord_methods(root_module, root_module['ns3::ServiceFlowRecord']) register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >']) register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator']) register_Ns3Tag_methods(root_module, root_module['ns3::Tag']) register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer']) register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit']) register_Ns3TlvValue_methods(root_module, root_module['ns3::TlvValue']) register_Ns3TosTlvValue_methods(root_module, root_module['ns3::TosTlvValue']) register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId']) register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation']) register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation']) register_Ns3U16TlvValue_methods(root_module, root_module['ns3::U16TlvValue']) register_Ns3U32TlvValue_methods(root_module, root_module['ns3::U32TlvValue']) register_Ns3U8TlvValue_methods(root_module, root_module['ns3::U8TlvValue']) register_Ns3UcdChannelEncodings_methods(root_module, root_module['ns3::UcdChannelEncodings']) register_Ns3VectorTlvValue_methods(root_module, root_module['ns3::VectorTlvValue']) register_Ns3WimaxHelper_methods(root_module, root_module['ns3::WimaxHelper']) register_Ns3Empty_methods(root_module, root_module['ns3::empty']) register_Ns3Int64x64_t_methods(root_module, root_module['ns3::int64x64_t']) register_Ns3SimpleOfdmSendParam_methods(root_module, root_module['ns3::simpleOfdmSendParam']) register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk']) register_Ns3ClassificationRuleVectorTlvValue_methods(root_module, root_module['ns3::ClassificationRuleVectorTlvValue']) register_Ns3CsParamVectorTlvValue_methods(root_module, root_module['ns3::CsParamVectorTlvValue']) register_Ns3Header_methods(root_module, root_module['ns3::Header']) register_Ns3Ipv4AddressTlvValue_methods(root_module, root_module['ns3::Ipv4AddressTlvValue']) register_Ns3Ipv4AddressTlvValueIpv4Addr_methods(root_module, root_module['ns3::Ipv4AddressTlvValue::ipv4Addr']) register_Ns3MacHeaderType_methods(root_module, root_module['ns3::MacHeaderType']) register_Ns3ManagementMessageType_methods(root_module, root_module['ns3::ManagementMessageType']) register_Ns3Object_methods(root_module, root_module['ns3::Object']) register_Ns3ObjectAggregateIterator_methods(root_module, root_module['ns3::Object::AggregateIterator']) register_Ns3OfdmDownlinkFramePrefix_methods(root_module, root_module['ns3::OfdmDownlinkFramePrefix']) register_Ns3OfdmSendParams_methods(root_module, root_module['ns3::OfdmSendParams']) register_Ns3OfdmUcdChannelEncodings_methods(root_module, root_module['ns3::OfdmUcdChannelEncodings']) register_Ns3PacketBurst_methods(root_module, root_module['ns3::PacketBurst']) register_Ns3PcapFileWrapper_methods(root_module, root_module['ns3::PcapFileWrapper']) register_Ns3PortRangeTlvValue_methods(root_module, root_module['ns3::PortRangeTlvValue']) register_Ns3PortRangeTlvValuePortRange_methods(root_module, root_module['ns3::PortRangeTlvValue::PortRange']) register_Ns3PriorityUlJob_methods(root_module, root_module['ns3::PriorityUlJob']) register_Ns3PropagationLossModel_methods(root_module, root_module['ns3::PropagationLossModel']) register_Ns3ProtocolTlvValue_methods(root_module, root_module['ns3::ProtocolTlvValue']) register_Ns3RandomPropagationLossModel_methods(root_module, root_module['ns3::RandomPropagationLossModel']) register_Ns3RandomVariableStream_methods(root_module, root_module['ns3::RandomVariableStream']) register_Ns3RangePropagationLossModel_methods(root_module, root_module['ns3::RangePropagationLossModel']) register_Ns3RngReq_methods(root_module, root_module['ns3::RngReq']) register_Ns3RngRsp_methods(root_module, root_module['ns3::RngRsp']) register_Ns3SSManager_methods(root_module, root_module['ns3::SSManager']) register_Ns3SequentialRandomVariable_methods(root_module, root_module['ns3::SequentialRandomVariable']) register_Ns3ServiceFlowManager_methods(root_module, root_module['ns3::ServiceFlowManager']) register_Ns3SfVectorTlvValue_methods(root_module, root_module['ns3::SfVectorTlvValue']) register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >']) register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >']) register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >']) register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >']) register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >']) register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >']) register_Ns3SimpleRefCount__Ns3OutputStreamWrapper_Ns3Empty_Ns3DefaultDeleter__lt__ns3OutputStreamWrapper__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >']) register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >']) register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >']) register_Ns3SsServiceFlowManager_methods(root_module, root_module['ns3::SsServiceFlowManager']) register_Ns3ThreeLogDistancePropagationLossModel_methods(root_module, root_module['ns3::ThreeLogDistancePropagationLossModel']) register_Ns3Time_methods(root_module, root_module['ns3::Time']) register_Ns3Tlv_methods(root_module, root_module['ns3::Tlv']) register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor']) register_Ns3Trailer_methods(root_module, root_module['ns3::Trailer']) register_Ns3TriangularRandomVariable_methods(root_module, root_module['ns3::TriangularRandomVariable']) register_Ns3TwoRayGroundPropagationLossModel_methods(root_module, root_module['ns3::TwoRayGroundPropagationLossModel']) register_Ns3Ucd_methods(root_module, root_module['ns3::Ucd']) register_Ns3UlJob_methods(root_module, root_module['ns3::UlJob']) register_Ns3UlMap_methods(root_module, root_module['ns3::UlMap']) register_Ns3UniformRandomVariable_methods(root_module, root_module['ns3::UniformRandomVariable']) register_Ns3UplinkScheduler_methods(root_module, root_module['ns3::UplinkScheduler']) register_Ns3UplinkSchedulerMBQoS_methods(root_module, root_module['ns3::UplinkSchedulerMBQoS']) register_Ns3UplinkSchedulerRtps_methods(root_module, root_module['ns3::UplinkSchedulerRtps']) register_Ns3UplinkSchedulerSimple_methods(root_module, root_module['ns3::UplinkSchedulerSimple']) register_Ns3WeibullRandomVariable_methods(root_module, root_module['ns3::WeibullRandomVariable']) register_Ns3WimaxConnection_methods(root_module, root_module['ns3::WimaxConnection']) register_Ns3WimaxMacQueue_methods(root_module, root_module['ns3::WimaxMacQueue']) register_Ns3WimaxMacQueueQueueElement_methods(root_module, root_module['ns3::WimaxMacQueue::QueueElement']) register_Ns3WimaxMacToMacHeader_methods(root_module, root_module['ns3::WimaxMacToMacHeader']) register_Ns3WimaxPhy_methods(root_module, root_module['ns3::WimaxPhy']) register_Ns3ZetaRandomVariable_methods(root_module, root_module['ns3::ZetaRandomVariable']) register_Ns3ZipfRandomVariable_methods(root_module, root_module['ns3::ZipfRandomVariable']) register_Ns3AttributeAccessor_methods(root_module, root_module['ns3::AttributeAccessor']) register_Ns3AttributeChecker_methods(root_module, root_module['ns3::AttributeChecker']) register_Ns3AttributeValue_methods(root_module, root_module['ns3::AttributeValue']) register_Ns3BSScheduler_methods(root_module, root_module['ns3::BSScheduler']) register_Ns3BSSchedulerRtps_methods(root_module, root_module['ns3::BSSchedulerRtps']) register_Ns3BSSchedulerSimple_methods(root_module, root_module['ns3::BSSchedulerSimple']) register_Ns3BandwidthRequestHeader_methods(root_module, root_module['ns3::BandwidthRequestHeader']) register_Ns3BsServiceFlowManager_methods(root_module, root_module['ns3::BsServiceFlowManager']) register_Ns3CallbackChecker_methods(root_module, root_module['ns3::CallbackChecker']) register_Ns3CallbackImplBase_methods(root_module, root_module['ns3::CallbackImplBase']) register_Ns3CallbackValue_methods(root_module, root_module['ns3::CallbackValue']) register_Ns3Channel_methods(root_module, root_module['ns3::Channel']) register_Ns3ConnectionManager_methods(root_module, root_module['ns3::ConnectionManager']) register_Ns3ConstantRandomVariable_methods(root_module, root_module['ns3::ConstantRandomVariable']) register_Ns3Dcd_methods(root_module, root_module['ns3::Dcd']) register_Ns3DeterministicRandomVariable_methods(root_module, root_module['ns3::DeterministicRandomVariable']) register_Ns3DlMap_methods(root_module, root_module['ns3::DlMap']) register_Ns3DsaAck_methods(root_module, root_module['ns3::DsaAck']) register_Ns3DsaReq_methods(root_module, root_module['ns3::DsaReq']) register_Ns3DsaRsp_methods(root_module, root_module['ns3::DsaRsp']) register_Ns3EmpiricalRandomVariable_methods(root_module, root_module['ns3::EmpiricalRandomVariable']) register_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue']) register_Ns3ErlangRandomVariable_methods(root_module, root_module['ns3::ErlangRandomVariable']) register_Ns3EventImpl_methods(root_module, root_module['ns3::EventImpl']) register_Ns3ExponentialRandomVariable_methods(root_module, root_module['ns3::ExponentialRandomVariable']) register_Ns3FixedRssLossModel_methods(root_module, root_module['ns3::FixedRssLossModel']) register_Ns3FragmentationSubheader_methods(root_module, root_module['ns3::FragmentationSubheader']) register_Ns3FriisPropagationLossModel_methods(root_module, root_module['ns3::FriisPropagationLossModel']) register_Ns3GammaRandomVariable_methods(root_module, root_module['ns3::GammaRandomVariable']) register_Ns3GenericMacHeader_methods(root_module, root_module['ns3::GenericMacHeader']) register_Ns3GrantManagementSubheader_methods(root_module, root_module['ns3::GrantManagementSubheader']) register_Ns3IpcsClassifier_methods(root_module, root_module['ns3::IpcsClassifier']) register_Ns3Ipv4AddressChecker_methods(root_module, root_module['ns3::Ipv4AddressChecker']) register_Ns3Ipv4AddressValue_methods(root_module, root_module['ns3::Ipv4AddressValue']) register_Ns3Ipv4MaskChecker_methods(root_module, root_module['ns3::Ipv4MaskChecker']) register_Ns3Ipv4MaskValue_methods(root_module, root_module['ns3::Ipv4MaskValue']) register_Ns3Ipv6AddressChecker_methods(root_module, root_module['ns3::Ipv6AddressChecker']) register_Ns3Ipv6AddressValue_methods(root_module, root_module['ns3::Ipv6AddressValue']) register_Ns3Ipv6PrefixChecker_methods(root_module, root_module['ns3::Ipv6PrefixChecker']) register_Ns3Ipv6PrefixValue_methods(root_module, root_module['ns3::Ipv6PrefixValue']) register_Ns3LogDistancePropagationLossModel_methods(root_module, root_module['ns3::LogDistancePropagationLossModel']) register_Ns3LogNormalRandomVariable_methods(root_module, root_module['ns3::LogNormalRandomVariable']) register_Ns3Mac48AddressChecker_methods(root_module, root_module['ns3::Mac48AddressChecker']) register_Ns3Mac48AddressValue_methods(root_module, root_module['ns3::Mac48AddressValue']) register_Ns3MatrixPropagationLossModel_methods(root_module, root_module['ns3::MatrixPropagationLossModel']) register_Ns3NakagamiPropagationLossModel_methods(root_module, root_module['ns3::NakagamiPropagationLossModel']) register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice']) register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector']) register_Ns3Node_methods(root_module, root_module['ns3::Node']) register_Ns3NormalRandomVariable_methods(root_module, root_module['ns3::NormalRandomVariable']) register_Ns3ObjectFactoryChecker_methods(root_module, root_module['ns3::ObjectFactoryChecker']) register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue']) register_Ns3OutputStreamWrapper_methods(root_module, root_module['ns3::OutputStreamWrapper']) register_Ns3Packet_methods(root_module, root_module['ns3::Packet']) register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable']) register_Ns3SimpleOfdmWimaxPhy_methods(root_module, root_module['ns3::SimpleOfdmWimaxPhy']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) register_Ns3UintegerValue_methods(root_module, root_module['ns3::UintegerValue']) register_Ns3WimaxChannel_methods(root_module, root_module['ns3::WimaxChannel']) register_Ns3WimaxNetDevice_methods(root_module, root_module['ns3::WimaxNetDevice']) register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker']) register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue']) register_Ns3BaseStationNetDevice_methods(root_module, root_module['ns3::BaseStationNetDevice']) register_Ns3SimpleOfdmWimaxChannel_methods(root_module, root_module['ns3::SimpleOfdmWimaxChannel']) register_Ns3SubscriberStationNetDevice_methods(root_module, root_module['ns3::SubscriberStationNetDevice']) register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3Address_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('<') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## address.h (module 'network'): ns3::Address::Address() [constructor] cls.add_constructor([]) ## address.h (module 'network'): ns3::Address::Address(uint8_t type, uint8_t const * buffer, uint8_t len) [constructor] cls.add_constructor([param('uint8_t', 'type'), param('uint8_t const *', 'buffer'), param('uint8_t', 'len')]) ## address.h (module 'network'): ns3::Address::Address(ns3::Address const & address) [copy constructor] cls.add_constructor([param('ns3::Address const &', 'address')]) ## address.h (module 'network'): bool ns3::Address::CheckCompatible(uint8_t type, uint8_t len) const [member function] cls.add_method('CheckCompatible', 'bool', [param('uint8_t', 'type'), param('uint8_t', 'len')], is_const=True) ## address.h (module 'network'): uint32_t ns3::Address::CopyAllFrom(uint8_t const * buffer, uint8_t len) [member function] cls.add_method('CopyAllFrom', 'uint32_t', [param('uint8_t const *', 'buffer'), param('uint8_t', 'len')]) ## address.h (module 'network'): uint32_t ns3::Address::CopyAllTo(uint8_t * buffer, uint8_t len) const [member function] cls.add_method('CopyAllTo', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint8_t', 'len')], is_const=True) ## address.h (module 'network'): uint32_t ns3::Address::CopyFrom(uint8_t const * buffer, uint8_t len) [member function] cls.add_method('CopyFrom', 'uint32_t', [param('uint8_t const *', 'buffer'), param('uint8_t', 'len')]) ## address.h (module 'network'): uint32_t ns3::Address::CopyTo(uint8_t * buffer) const [member function] cls.add_method('CopyTo', 'uint32_t', [param('uint8_t *', 'buffer')], is_const=True) ## address.h (module 'network'): void ns3::Address::Deserialize(ns3::TagBuffer buffer) [member function] cls.add_method('Deserialize', 'void', [param('ns3::TagBuffer', 'buffer')]) ## address.h (module 'network'): uint8_t ns3::Address::GetLength() const [member function] cls.add_method('GetLength', 'uint8_t', [], is_const=True) ## address.h (module 'network'): uint32_t ns3::Address::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## address.h (module 'network'): bool ns3::Address::IsInvalid() const [member function] cls.add_method('IsInvalid', 'bool', [], is_const=True) ## address.h (module 'network'): bool ns3::Address::IsMatchingType(uint8_t type) const [member function] cls.add_method('IsMatchingType', 'bool', [param('uint8_t', 'type')], is_const=True) ## address.h (module 'network'): static uint8_t ns3::Address::Register() [member function] cls.add_method('Register', 'uint8_t', [], is_static=True) ## address.h (module 'network'): void ns3::Address::Serialize(ns3::TagBuffer buffer) const [member function] cls.add_method('Serialize', 'void', [param('ns3::TagBuffer', 'buffer')], is_const=True) return def register_Ns3AsciiTraceHelper_methods(root_module, cls): ## trace-helper.h (module 'network'): ns3::AsciiTraceHelper::AsciiTraceHelper(ns3::AsciiTraceHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::AsciiTraceHelper const &', 'arg0')]) ## trace-helper.h (module 'network'): ns3::AsciiTraceHelper::AsciiTraceHelper() [constructor] cls.add_constructor([]) ## trace-helper.h (module 'network'): ns3::Ptr<ns3::OutputStreamWrapper> ns3::AsciiTraceHelper::CreateFileStream(std::string filename, std::_Ios_Openmode filemode=std::ios_base::out) [member function] cls.add_method('CreateFileStream', 'ns3::Ptr< ns3::OutputStreamWrapper >', [param('std::string', 'filename'), param('std::_Ios_Openmode', 'filemode', default_value='std::ios_base::out')]) ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDequeueSinkWithContext(ns3::Ptr<ns3::OutputStreamWrapper> file, std::string context, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('DefaultDequeueSinkWithContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDequeueSinkWithoutContext(ns3::Ptr<ns3::OutputStreamWrapper> file, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('DefaultDequeueSinkWithoutContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDropSinkWithContext(ns3::Ptr<ns3::OutputStreamWrapper> file, std::string context, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('DefaultDropSinkWithContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDropSinkWithoutContext(ns3::Ptr<ns3::OutputStreamWrapper> file, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('DefaultDropSinkWithoutContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultEnqueueSinkWithContext(ns3::Ptr<ns3::OutputStreamWrapper> file, std::string context, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('DefaultEnqueueSinkWithContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultEnqueueSinkWithoutContext(ns3::Ptr<ns3::OutputStreamWrapper> file, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('DefaultEnqueueSinkWithoutContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultReceiveSinkWithContext(ns3::Ptr<ns3::OutputStreamWrapper> file, std::string context, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('DefaultReceiveSinkWithContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultReceiveSinkWithoutContext(ns3::Ptr<ns3::OutputStreamWrapper> file, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('DefaultReceiveSinkWithoutContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) ## trace-helper.h (module 'network'): std::string ns3::AsciiTraceHelper::GetFilenameFromDevice(std::string prefix, ns3::Ptr<ns3::NetDevice> device, bool useObjectNames=true) [member function] cls.add_method('GetFilenameFromDevice', 'std::string', [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('bool', 'useObjectNames', default_value='true')]) ## trace-helper.h (module 'network'): std::string ns3::AsciiTraceHelper::GetFilenameFromInterfacePair(std::string prefix, ns3::Ptr<ns3::Object> object, uint32_t interface, bool useObjectNames=true) [member function] cls.add_method('GetFilenameFromInterfacePair', 'std::string', [param('std::string', 'prefix'), param('ns3::Ptr< ns3::Object >', 'object'), param('uint32_t', 'interface'), param('bool', 'useObjectNames', default_value='true')]) return def register_Ns3AsciiTraceHelperForDevice_methods(root_module, cls): ## trace-helper.h (module 'network'): ns3::AsciiTraceHelperForDevice::AsciiTraceHelperForDevice(ns3::AsciiTraceHelperForDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::AsciiTraceHelperForDevice const &', 'arg0')]) ## trace-helper.h (module 'network'): ns3::AsciiTraceHelperForDevice::AsciiTraceHelperForDevice() [constructor] cls.add_constructor([]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAscii(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename=false) [member function] cls.add_method('EnableAscii', 'void', [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAscii(ns3::Ptr<ns3::OutputStreamWrapper> stream, ns3::Ptr<ns3::NetDevice> nd) [member function] cls.add_method('EnableAscii', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('ns3::Ptr< ns3::NetDevice >', 'nd')]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAscii(std::string prefix, std::string ndName, bool explicitFilename=false) [member function] cls.add_method('EnableAscii', 'void', [param('std::string', 'prefix'), param('std::string', 'ndName'), param('bool', 'explicitFilename', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAscii(ns3::Ptr<ns3::OutputStreamWrapper> stream, std::string ndName) [member function] cls.add_method('EnableAscii', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('std::string', 'ndName')]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAscii(std::string prefix, ns3::NetDeviceContainer d) [member function] cls.add_method('EnableAscii', 'void', [param('std::string', 'prefix'), param('ns3::NetDeviceContainer', 'd')]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAscii(ns3::Ptr<ns3::OutputStreamWrapper> stream, ns3::NetDeviceContainer d) [member function] cls.add_method('EnableAscii', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('ns3::NetDeviceContainer', 'd')]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAscii(std::string prefix, ns3::NodeContainer n) [member function] cls.add_method('EnableAscii', 'void', [param('std::string', 'prefix'), param('ns3::NodeContainer', 'n')]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAscii(ns3::Ptr<ns3::OutputStreamWrapper> stream, ns3::NodeContainer n) [member function] cls.add_method('EnableAscii', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('ns3::NodeContainer', 'n')]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAscii(std::string prefix, uint32_t nodeid, uint32_t deviceid, bool explicitFilename) [member function] cls.add_method('EnableAscii', 'void', [param('std::string', 'prefix'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid'), param('bool', 'explicitFilename')]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAscii(ns3::Ptr<ns3::OutputStreamWrapper> stream, uint32_t nodeid, uint32_t deviceid) [member function] cls.add_method('EnableAscii', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAsciiAll(std::string prefix) [member function] cls.add_method('EnableAsciiAll', 'void', [param('std::string', 'prefix')]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAsciiAll(ns3::Ptr<ns3::OutputStreamWrapper> stream) [member function] cls.add_method('EnableAsciiAll', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')]) ## trace-helper.h (module 'network'): void ns3::AsciiTraceHelperForDevice::EnableAsciiInternal(ns3::Ptr<ns3::OutputStreamWrapper> stream, std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename) [member function] cls.add_method('EnableAsciiInternal', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename')], is_pure_virtual=True, is_virtual=True) return def register_Ns3AttributeConstructionList_methods(root_module, cls): ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::AttributeConstructionList(ns3::AttributeConstructionList const & arg0) [copy constructor] cls.add_constructor([param('ns3::AttributeConstructionList const &', 'arg0')]) ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::AttributeConstructionList() [constructor] cls.add_constructor([]) ## attribute-construction-list.h (module 'core'): void ns3::AttributeConstructionList::Add(std::string name, ns3::Ptr<ns3::AttributeChecker const> checker, ns3::Ptr<ns3::AttributeValue> value) [member function] cls.add_method('Add', 'void', [param('std::string', 'name'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker'), param('ns3::Ptr< ns3::AttributeValue >', 'value')]) ## attribute-construction-list.h (module 'core'): std::_List_const_iterator<ns3::AttributeConstructionList::Item> ns3::AttributeConstructionList::Begin() const [member function] cls.add_method('Begin', 'std::_List_const_iterator< ns3::AttributeConstructionList::Item >', [], is_const=True) ## attribute-construction-list.h (module 'core'): std::_List_const_iterator<ns3::AttributeConstructionList::Item> ns3::AttributeConstructionList::End() const [member function] cls.add_method('End', 'std::_List_const_iterator< ns3::AttributeConstructionList::Item >', [], is_const=True) ## attribute-construction-list.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::AttributeConstructionList::Find(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('Find', 'ns3::Ptr< ns3::AttributeValue >', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True) return def register_Ns3AttributeConstructionListItem_methods(root_module, cls): ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::Item() [constructor] cls.add_constructor([]) ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::Item(ns3::AttributeConstructionList::Item const & arg0) [copy constructor] cls.add_constructor([param('ns3::AttributeConstructionList::Item const &', 'arg0')]) ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::checker [variable] cls.add_instance_attribute('checker', 'ns3::Ptr< ns3::AttributeChecker const >', is_const=False) ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::name [variable] cls.add_instance_attribute('name', 'std::string', is_const=False) ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::value [variable] cls.add_instance_attribute('value', 'ns3::Ptr< ns3::AttributeValue >', is_const=False) return def register_Ns3Buffer_methods(root_module, cls): ## buffer.h (module 'network'): ns3::Buffer::Buffer() [constructor] cls.add_constructor([]) ## buffer.h (module 'network'): ns3::Buffer::Buffer(uint32_t dataSize) [constructor] cls.add_constructor([param('uint32_t', 'dataSize')]) ## buffer.h (module 'network'): ns3::Buffer::Buffer(uint32_t dataSize, bool initialize) [constructor] cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')]) ## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor] cls.add_constructor([param('ns3::Buffer const &', 'o')]) ## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(uint32_t end) [member function] cls.add_method('AddAtEnd', 'void', [param('uint32_t', 'end')]) ## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function] cls.add_method('AddAtEnd', 'void', [param('ns3::Buffer const &', 'o')]) ## buffer.h (module 'network'): void ns3::Buffer::AddAtStart(uint32_t start) [member function] cls.add_method('AddAtStart', 'void', [param('uint32_t', 'start')]) ## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function] cls.add_method('Begin', 'ns3::Buffer::Iterator', [], is_const=True) ## buffer.h (module 'network'): void ns3::Buffer::CopyData(std::ostream * os, uint32_t size) const [member function] cls.add_method('CopyData', 'void', [param('std::ostream *', 'os'), param('uint32_t', 'size')], is_const=True) ## buffer.h (module 'network'): uint32_t ns3::Buffer::CopyData(uint8_t * buffer, uint32_t size) const [member function] cls.add_method('CopyData', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint32_t', 'size')], is_const=True) ## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFragment(uint32_t start, uint32_t length) const [member function] cls.add_method('CreateFragment', 'ns3::Buffer', [param('uint32_t', 'start'), param('uint32_t', 'length')], is_const=True) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function] cls.add_method('Deserialize', 'uint32_t', [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) ## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::End() const [member function] cls.add_method('End', 'ns3::Buffer::Iterator', [], is_const=True) ## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSize() const [member function] cls.add_method('GetSize', 'uint32_t', [], is_const=True) ## buffer.h (module 'network'): uint8_t const * ns3::Buffer::PeekData() const [member function] cls.add_method('PeekData', 'uint8_t const *', [], is_const=True) ## buffer.h (module 'network'): void ns3::Buffer::RemoveAtEnd(uint32_t end) [member function] cls.add_method('RemoveAtEnd', 'void', [param('uint32_t', 'end')]) ## buffer.h (module 'network'): void ns3::Buffer::RemoveAtStart(uint32_t start) [member function] cls.add_method('RemoveAtStart', 'void', [param('uint32_t', 'start')]) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], is_const=True) return def register_Ns3BufferIterator_methods(root_module, cls): ## buffer.h (module 'network'): ns3::Buffer::Iterator::Iterator(ns3::Buffer::Iterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::Buffer::Iterator const &', 'arg0')]) ## buffer.h (module 'network'): ns3::Buffer::Iterator::Iterator() [constructor] cls.add_constructor([]) ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size) [member function] cls.add_method('CalculateIpChecksum', 'uint16_t', [param('uint16_t', 'size')]) ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size, uint32_t initialChecksum) [member function] cls.add_method('CalculateIpChecksum', 'uint16_t', [param('uint16_t', 'size'), param('uint32_t', 'initialChecksum')]) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::GetDistanceFrom(ns3::Buffer::Iterator const & o) const [member function] cls.add_method('GetDistanceFrom', 'uint32_t', [param('ns3::Buffer::Iterator const &', 'o')], is_const=True) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::GetSize() const [member function] cls.add_method('GetSize', 'uint32_t', [], is_const=True) ## buffer.h (module 'network'): bool ns3::Buffer::Iterator::IsEnd() const [member function] cls.add_method('IsEnd', 'bool', [], is_const=True) ## buffer.h (module 'network'): bool ns3::Buffer::Iterator::IsStart() const [member function] cls.add_method('IsStart', 'bool', [], is_const=True) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Next() [member function] cls.add_method('Next', 'void', []) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Next(uint32_t delta) [member function] cls.add_method('Next', 'void', [param('uint32_t', 'delta')]) ## buffer.h (module 'network'): uint8_t ns3::Buffer::Iterator::PeekU8() [member function] cls.add_method('PeekU8', 'uint8_t', []) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev() [member function] cls.add_method('Prev', 'void', []) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev(uint32_t delta) [member function] cls.add_method('Prev', 'void', [param('uint32_t', 'delta')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Read(uint8_t * buffer, uint32_t size) [member function] cls.add_method('Read', 'void', [param('uint8_t *', 'buffer'), param('uint32_t', 'size')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Read(ns3::Buffer::Iterator start, uint32_t size) [member function] cls.add_method('Read', 'void', [param('ns3::Buffer::Iterator', 'start'), param('uint32_t', 'size')]) ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadLsbtohU16() [member function] cls.add_method('ReadLsbtohU16', 'uint16_t', []) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadLsbtohU32() [member function] cls.add_method('ReadLsbtohU32', 'uint32_t', []) ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadLsbtohU64() [member function] cls.add_method('ReadLsbtohU64', 'uint64_t', []) ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadNtohU16() [member function] cls.add_method('ReadNtohU16', 'uint16_t', []) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadNtohU32() [member function] cls.add_method('ReadNtohU32', 'uint32_t', []) ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadNtohU64() [member function] cls.add_method('ReadNtohU64', 'uint64_t', []) ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadU16() [member function] cls.add_method('ReadU16', 'uint16_t', []) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadU32() [member function] cls.add_method('ReadU32', 'uint32_t', []) ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadU64() [member function] cls.add_method('ReadU64', 'uint64_t', []) ## buffer.h (module 'network'): uint8_t ns3::Buffer::Iterator::ReadU8() [member function] cls.add_method('ReadU8', 'uint8_t', []) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Write(uint8_t const * buffer, uint32_t size) [member function] cls.add_method('Write', 'void', [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Write(ns3::Buffer::Iterator start, ns3::Buffer::Iterator end) [member function] cls.add_method('Write', 'void', [param('ns3::Buffer::Iterator', 'start'), param('ns3::Buffer::Iterator', 'end')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU16(uint16_t data) [member function] cls.add_method('WriteHtolsbU16', 'void', [param('uint16_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU32(uint32_t data) [member function] cls.add_method('WriteHtolsbU32', 'void', [param('uint32_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU64(uint64_t data) [member function] cls.add_method('WriteHtolsbU64', 'void', [param('uint64_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU16(uint16_t data) [member function] cls.add_method('WriteHtonU16', 'void', [param('uint16_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU32(uint32_t data) [member function] cls.add_method('WriteHtonU32', 'void', [param('uint32_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU64(uint64_t data) [member function] cls.add_method('WriteHtonU64', 'void', [param('uint64_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU16(uint16_t data) [member function] cls.add_method('WriteU16', 'void', [param('uint16_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU32(uint32_t data) [member function] cls.add_method('WriteU32', 'void', [param('uint32_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU64(uint64_t data) [member function] cls.add_method('WriteU64', 'void', [param('uint64_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU8(uint8_t data) [member function] cls.add_method('WriteU8', 'void', [param('uint8_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU8(uint8_t data, uint32_t len) [member function] cls.add_method('WriteU8', 'void', [param('uint8_t', 'data'), param('uint32_t', 'len')]) return def register_Ns3ByteTagIterator_methods(root_module, cls): ## packet.h (module 'network'): ns3::ByteTagIterator::ByteTagIterator(ns3::ByteTagIterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::ByteTagIterator const &', 'arg0')]) ## packet.h (module 'network'): bool ns3::ByteTagIterator::HasNext() const [member function] cls.add_method('HasNext', 'bool', [], is_const=True) ## packet.h (module 'network'): ns3::ByteTagIterator::Item ns3::ByteTagIterator::Next() [member function] cls.add_method('Next', 'ns3::ByteTagIterator::Item', []) return def register_Ns3ByteTagIteratorItem_methods(root_module, cls): ## packet.h (module 'network'): ns3::ByteTagIterator::Item::Item(ns3::ByteTagIterator::Item const & arg0) [copy constructor] cls.add_constructor([param('ns3::ByteTagIterator::Item const &', 'arg0')]) ## packet.h (module 'network'): uint32_t ns3::ByteTagIterator::Item::GetEnd() const [member function] cls.add_method('GetEnd', 'uint32_t', [], is_const=True) ## packet.h (module 'network'): uint32_t ns3::ByteTagIterator::Item::GetStart() const [member function] cls.add_method('GetStart', 'uint32_t', [], is_const=True) ## packet.h (module 'network'): void ns3::ByteTagIterator::Item::GetTag(ns3::Tag & tag) const [member function] cls.add_method('GetTag', 'void', [param('ns3::Tag &', 'tag')], is_const=True) ## packet.h (module 'network'): ns3::TypeId ns3::ByteTagIterator::Item::GetTypeId() const [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_const=True) return def register_Ns3ByteTagList_methods(root_module, cls): ## byte-tag-list.h (module 'network'): ns3::ByteTagList::ByteTagList() [constructor] cls.add_constructor([]) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::ByteTagList(ns3::ByteTagList const & o) [copy constructor] cls.add_constructor([param('ns3::ByteTagList const &', 'o')]) ## byte-tag-list.h (module 'network'): ns3::TagBuffer ns3::ByteTagList::Add(ns3::TypeId tid, uint32_t bufferSize, int32_t start, int32_t end) [member function] cls.add_method('Add', 'ns3::TagBuffer', [param('ns3::TypeId', 'tid'), param('uint32_t', 'bufferSize'), param('int32_t', 'start'), param('int32_t', 'end')]) ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Add(ns3::ByteTagList const & o) [member function] cls.add_method('Add', 'void', [param('ns3::ByteTagList const &', 'o')]) ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t appendOffset) [member function] cls.add_method('AddAtEnd', 'void', [param('int32_t', 'appendOffset')]) ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t prependOffset) [member function] cls.add_method('AddAtStart', 'void', [param('int32_t', 'prependOffset')]) ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Adjust(int32_t adjustment) [member function] cls.add_method('Adjust', 'void', [param('int32_t', 'adjustment')]) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function] cls.add_method('Begin', 'ns3::ByteTagList::Iterator', [param('int32_t', 'offsetStart'), param('int32_t', 'offsetEnd')], is_const=True) ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::RemoveAll() [member function] cls.add_method('RemoveAll', 'void', []) return def register_Ns3ByteTagListIterator_methods(root_module, cls): ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Iterator(ns3::ByteTagList::Iterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::ByteTagList::Iterator const &', 'arg0')]) ## byte-tag-list.h (module 'network'): uint32_t ns3::ByteTagList::Iterator::GetOffsetStart() const [member function] cls.add_method('GetOffsetStart', 'uint32_t', [], is_const=True) ## byte-tag-list.h (module 'network'): bool ns3::ByteTagList::Iterator::HasNext() const [member function] cls.add_method('HasNext', 'bool', [], is_const=True) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item ns3::ByteTagList::Iterator::Next() [member function] cls.add_method('Next', 'ns3::ByteTagList::Iterator::Item', []) return def register_Ns3ByteTagListIteratorItem_methods(root_module, cls): ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::Item(ns3::ByteTagList::Iterator::Item const & arg0) [copy constructor] cls.add_constructor([param('ns3::ByteTagList::Iterator::Item const &', 'arg0')]) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::Item(ns3::TagBuffer buf) [constructor] cls.add_constructor([param('ns3::TagBuffer', 'buf')]) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::buf [variable] cls.add_instance_attribute('buf', 'ns3::TagBuffer', is_const=False) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::end [variable] cls.add_instance_attribute('end', 'int32_t', is_const=False) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::size [variable] cls.add_instance_attribute('size', 'uint32_t', is_const=False) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::start [variable] cls.add_instance_attribute('start', 'int32_t', is_const=False) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::tid [variable] cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) return def register_Ns3CallbackBase_methods(root_module, cls): ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase(ns3::CallbackBase const & arg0) [copy constructor] cls.add_constructor([param('ns3::CallbackBase const &', 'arg0')]) ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase() [constructor] cls.add_constructor([]) ## callback.h (module 'core'): ns3::Ptr<ns3::CallbackImplBase> ns3::CallbackBase::GetImpl() const [member function] cls.add_method('GetImpl', 'ns3::Ptr< ns3::CallbackImplBase >', [], is_const=True) ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase(ns3::Ptr<ns3::CallbackImplBase> impl) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::CallbackImplBase >', 'impl')], visibility='protected') return def register_Ns3Cid_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## cid.h (module 'wimax'): ns3::Cid::Cid(ns3::Cid const & arg0) [copy constructor] cls.add_constructor([param('ns3::Cid const &', 'arg0')]) ## cid.h (module 'wimax'): ns3::Cid::Cid() [constructor] cls.add_constructor([]) ## cid.h (module 'wimax'): ns3::Cid::Cid(uint16_t cid) [constructor] cls.add_constructor([param('uint16_t', 'cid')]) ## cid.h (module 'wimax'): static ns3::Cid ns3::Cid::Broadcast() [member function] cls.add_method('Broadcast', 'ns3::Cid', [], is_static=True) ## cid.h (module 'wimax'): uint16_t ns3::Cid::GetIdentifier() const [member function] cls.add_method('GetIdentifier', 'uint16_t', [], is_const=True) ## cid.h (module 'wimax'): static ns3::Cid ns3::Cid::InitialRanging() [member function] cls.add_method('InitialRanging', 'ns3::Cid', [], is_static=True) ## cid.h (module 'wimax'): bool ns3::Cid::IsBroadcast() const [member function] cls.add_method('IsBroadcast', 'bool', [], is_const=True) ## cid.h (module 'wimax'): bool ns3::Cid::IsInitialRanging() const [member function] cls.add_method('IsInitialRanging', 'bool', [], is_const=True) ## cid.h (module 'wimax'): bool ns3::Cid::IsMulticast() const [member function] cls.add_method('IsMulticast', 'bool', [], is_const=True) ## cid.h (module 'wimax'): bool ns3::Cid::IsPadding() const [member function] cls.add_method('IsPadding', 'bool', [], is_const=True) ## cid.h (module 'wimax'): static ns3::Cid ns3::Cid::Padding() [member function] cls.add_method('Padding', 'ns3::Cid', [], is_static=True) return def register_Ns3CidFactory_methods(root_module, cls): ## cid-factory.h (module 'wimax'): ns3::CidFactory::CidFactory(ns3::CidFactory const & arg0) [copy constructor] cls.add_constructor([param('ns3::CidFactory const &', 'arg0')]) ## cid-factory.h (module 'wimax'): ns3::CidFactory::CidFactory() [constructor] cls.add_constructor([]) ## cid-factory.h (module 'wimax'): ns3::Cid ns3::CidFactory::Allocate(ns3::Cid::Type type) [member function] cls.add_method('Allocate', 'ns3::Cid', [param('ns3::Cid::Type', 'type')]) ## cid-factory.h (module 'wimax'): ns3::Cid ns3::CidFactory::AllocateBasic() [member function] cls.add_method('AllocateBasic', 'ns3::Cid', []) ## cid-factory.h (module 'wimax'): ns3::Cid ns3::CidFactory::AllocateMulticast() [member function] cls.add_method('AllocateMulticast', 'ns3::Cid', []) ## cid-factory.h (module 'wimax'): ns3::Cid ns3::CidFactory::AllocatePrimary() [member function] cls.add_method('AllocatePrimary', 'ns3::Cid', []) ## cid-factory.h (module 'wimax'): ns3::Cid ns3::CidFactory::AllocateTransportOrSecondary() [member function] cls.add_method('AllocateTransportOrSecondary', 'ns3::Cid', []) ## cid-factory.h (module 'wimax'): void ns3::CidFactory::FreeCid(ns3::Cid cid) [member function] cls.add_method('FreeCid', 'void', [param('ns3::Cid', 'cid')]) ## cid-factory.h (module 'wimax'): bool ns3::CidFactory::IsBasic(ns3::Cid cid) const [member function] cls.add_method('IsBasic', 'bool', [param('ns3::Cid', 'cid')], is_const=True) ## cid-factory.h (module 'wimax'): bool ns3::CidFactory::IsPrimary(ns3::Cid cid) const [member function] cls.add_method('IsPrimary', 'bool', [param('ns3::Cid', 'cid')], is_const=True) ## cid-factory.h (module 'wimax'): bool ns3::CidFactory::IsTransport(ns3::Cid cid) const [member function] cls.add_method('IsTransport', 'bool', [param('ns3::Cid', 'cid')], is_const=True) return def register_Ns3CsParameters_methods(root_module, cls): ## cs-parameters.h (module 'wimax'): ns3::CsParameters::CsParameters(ns3::CsParameters const & arg0) [copy constructor] cls.add_constructor([param('ns3::CsParameters const &', 'arg0')]) ## cs-parameters.h (module 'wimax'): ns3::CsParameters::CsParameters() [constructor] cls.add_constructor([]) ## cs-parameters.h (module 'wimax'): ns3::CsParameters::CsParameters(ns3::Tlv tlv) [constructor] cls.add_constructor([param('ns3::Tlv', 'tlv')]) ## cs-parameters.h (module 'wimax'): ns3::CsParameters::CsParameters(ns3::CsParameters::Action classifierDscAction, ns3::IpcsClassifierRecord classifier) [constructor] cls.add_constructor([param('ns3::CsParameters::Action', 'classifierDscAction'), param('ns3::IpcsClassifierRecord', 'classifier')]) ## cs-parameters.h (module 'wimax'): ns3::CsParameters::Action ns3::CsParameters::GetClassifierDscAction() const [member function] cls.add_method('GetClassifierDscAction', 'ns3::CsParameters::Action', [], is_const=True) ## cs-parameters.h (module 'wimax'): ns3::IpcsClassifierRecord ns3::CsParameters::GetPacketClassifierRule() const [member function] cls.add_method('GetPacketClassifierRule', 'ns3::IpcsClassifierRecord', [], is_const=True) ## cs-parameters.h (module 'wimax'): void ns3::CsParameters::SetClassifierDscAction(ns3::CsParameters::Action action) [member function] cls.add_method('SetClassifierDscAction', 'void', [param('ns3::CsParameters::Action', 'action')]) ## cs-parameters.h (module 'wimax'): void ns3::CsParameters::SetPacketClassifierRule(ns3::IpcsClassifierRecord packetClassifierRule) [member function] cls.add_method('SetPacketClassifierRule', 'void', [param('ns3::IpcsClassifierRecord', 'packetClassifierRule')]) ## cs-parameters.h (module 'wimax'): ns3::Tlv ns3::CsParameters::ToTlv() const [member function] cls.add_method('ToTlv', 'ns3::Tlv', [], is_const=True) return def register_Ns3DcdChannelEncodings_methods(root_module, cls): ## dl-mac-messages.h (module 'wimax'): ns3::DcdChannelEncodings::DcdChannelEncodings(ns3::DcdChannelEncodings const & arg0) [copy constructor] cls.add_constructor([param('ns3::DcdChannelEncodings const &', 'arg0')]) ## dl-mac-messages.h (module 'wimax'): ns3::DcdChannelEncodings::DcdChannelEncodings() [constructor] cls.add_constructor([]) ## dl-mac-messages.h (module 'wimax'): uint16_t ns3::DcdChannelEncodings::GetBsEirp() const [member function] cls.add_method('GetBsEirp', 'uint16_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint16_t ns3::DcdChannelEncodings::GetEirxPIrMax() const [member function] cls.add_method('GetEirxPIrMax', 'uint16_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint32_t ns3::DcdChannelEncodings::GetFrequency() const [member function] cls.add_method('GetFrequency', 'uint32_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint16_t ns3::DcdChannelEncodings::GetSize() const [member function] cls.add_method('GetSize', 'uint16_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::DcdChannelEncodings::Read(ns3::Buffer::Iterator start) [member function] cls.add_method('Read', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')]) ## dl-mac-messages.h (module 'wimax'): void ns3::DcdChannelEncodings::SetBsEirp(uint16_t bs_eirp) [member function] cls.add_method('SetBsEirp', 'void', [param('uint16_t', 'bs_eirp')]) ## dl-mac-messages.h (module 'wimax'): void ns3::DcdChannelEncodings::SetEirxPIrMax(uint16_t rss_ir_max) [member function] cls.add_method('SetEirxPIrMax', 'void', [param('uint16_t', 'rss_ir_max')]) ## dl-mac-messages.h (module 'wimax'): void ns3::DcdChannelEncodings::SetFrequency(uint32_t frequency) [member function] cls.add_method('SetFrequency', 'void', [param('uint32_t', 'frequency')]) ## dl-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::DcdChannelEncodings::Write(ns3::Buffer::Iterator start) const [member function] cls.add_method('Write', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True) ## dl-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::DcdChannelEncodings::DoRead(ns3::Buffer::Iterator start) [member function] cls.add_method('DoRead', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, visibility='private', is_virtual=True) ## dl-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::DcdChannelEncodings::DoWrite(ns3::Buffer::Iterator start) const [member function] cls.add_method('DoWrite', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) return def register_Ns3DlFramePrefixIe_methods(root_module, cls): ## ofdm-downlink-frame-prefix.h (module 'wimax'): ns3::DlFramePrefixIe::DlFramePrefixIe(ns3::DlFramePrefixIe const & arg0) [copy constructor] cls.add_constructor([param('ns3::DlFramePrefixIe const &', 'arg0')]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): ns3::DlFramePrefixIe::DlFramePrefixIe() [constructor] cls.add_constructor([]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): uint8_t ns3::DlFramePrefixIe::GetDiuc() const [member function] cls.add_method('GetDiuc', 'uint8_t', [], is_const=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): uint16_t ns3::DlFramePrefixIe::GetLength() const [member function] cls.add_method('GetLength', 'uint16_t', [], is_const=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): uint8_t ns3::DlFramePrefixIe::GetPreamblePresent() const [member function] cls.add_method('GetPreamblePresent', 'uint8_t', [], is_const=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): uint8_t ns3::DlFramePrefixIe::GetRateId() const [member function] cls.add_method('GetRateId', 'uint8_t', [], is_const=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): uint16_t ns3::DlFramePrefixIe::GetSize() const [member function] cls.add_method('GetSize', 'uint16_t', [], is_const=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): uint16_t ns3::DlFramePrefixIe::GetStartTime() const [member function] cls.add_method('GetStartTime', 'uint16_t', [], is_const=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): ns3::Buffer::Iterator ns3::DlFramePrefixIe::Read(ns3::Buffer::Iterator start) [member function] cls.add_method('Read', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): void ns3::DlFramePrefixIe::SetDiuc(uint8_t diuc) [member function] cls.add_method('SetDiuc', 'void', [param('uint8_t', 'diuc')]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): void ns3::DlFramePrefixIe::SetLength(uint16_t length) [member function] cls.add_method('SetLength', 'void', [param('uint16_t', 'length')]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): void ns3::DlFramePrefixIe::SetPreamblePresent(uint8_t preamblePresent) [member function] cls.add_method('SetPreamblePresent', 'void', [param('uint8_t', 'preamblePresent')]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): void ns3::DlFramePrefixIe::SetRateId(uint8_t rateId) [member function] cls.add_method('SetRateId', 'void', [param('uint8_t', 'rateId')]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): void ns3::DlFramePrefixIe::SetStartTime(uint16_t startTime) [member function] cls.add_method('SetStartTime', 'void', [param('uint16_t', 'startTime')]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): ns3::Buffer::Iterator ns3::DlFramePrefixIe::Write(ns3::Buffer::Iterator start) const [member function] cls.add_method('Write', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True) return def register_Ns3EventId_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('==') ## event-id.h (module 'core'): ns3::EventId::EventId(ns3::EventId const & arg0) [copy constructor] cls.add_constructor([param('ns3::EventId const &', 'arg0')]) ## event-id.h (module 'core'): ns3::EventId::EventId() [constructor] cls.add_constructor([]) ## event-id.h (module 'core'): ns3::EventId::EventId(ns3::Ptr<ns3::EventImpl> const & impl, uint64_t ts, uint32_t context, uint32_t uid) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::EventImpl > const &', 'impl'), param('uint64_t', 'ts'), param('uint32_t', 'context'), param('uint32_t', 'uid')]) ## event-id.h (module 'core'): void ns3::EventId::Cancel() [member function] cls.add_method('Cancel', 'void', []) ## event-id.h (module 'core'): uint32_t ns3::EventId::GetContext() const [member function] cls.add_method('GetContext', 'uint32_t', [], is_const=True) ## event-id.h (module 'core'): uint64_t ns3::EventId::GetTs() const [member function] cls.add_method('GetTs', 'uint64_t', [], is_const=True) ## event-id.h (module 'core'): uint32_t ns3::EventId::GetUid() const [member function] cls.add_method('GetUid', 'uint32_t', [], is_const=True) ## event-id.h (module 'core'): bool ns3::EventId::IsExpired() const [member function] cls.add_method('IsExpired', 'bool', [], is_const=True) ## event-id.h (module 'core'): bool ns3::EventId::IsRunning() const [member function] cls.add_method('IsRunning', 'bool', [], is_const=True) ## event-id.h (module 'core'): ns3::EventImpl * ns3::EventId::PeekEventImpl() const [member function] cls.add_method('PeekEventImpl', 'ns3::EventImpl *', [], is_const=True) return def register_Ns3Hasher_methods(root_module, cls): ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] cls.add_constructor([]) ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr<ns3::Hash::Implementation> hp) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')]) ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] cls.add_method('GetHash32', 'uint32_t', [param('std::string const', 's')]) ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')]) ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] cls.add_method('GetHash64', 'uint64_t', [param('std::string const', 's')]) ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] cls.add_method('clear', 'ns3::Hasher &', []) return def register_Ns3IpcsClassifierRecord_methods(root_module, cls): ## ipcs-classifier-record.h (module 'wimax'): ns3::IpcsClassifierRecord::IpcsClassifierRecord(ns3::IpcsClassifierRecord const & arg0) [copy constructor] cls.add_constructor([param('ns3::IpcsClassifierRecord const &', 'arg0')]) ## ipcs-classifier-record.h (module 'wimax'): ns3::IpcsClassifierRecord::IpcsClassifierRecord() [constructor] cls.add_constructor([]) ## ipcs-classifier-record.h (module 'wimax'): ns3::IpcsClassifierRecord::IpcsClassifierRecord(ns3::Ipv4Address srcAddress, ns3::Ipv4Mask srcMask, ns3::Ipv4Address dstAddress, ns3::Ipv4Mask dstMask, uint16_t srcPortLow, uint16_t srcPortHigh, uint16_t dstPortLow, uint16_t dstPortHigh, uint8_t protocol, uint8_t priority) [constructor] cls.add_constructor([param('ns3::Ipv4Address', 'srcAddress'), param('ns3::Ipv4Mask', 'srcMask'), param('ns3::Ipv4Address', 'dstAddress'), param('ns3::Ipv4Mask', 'dstMask'), param('uint16_t', 'srcPortLow'), param('uint16_t', 'srcPortHigh'), param('uint16_t', 'dstPortLow'), param('uint16_t', 'dstPortHigh'), param('uint8_t', 'protocol'), param('uint8_t', 'priority')]) ## ipcs-classifier-record.h (module 'wimax'): ns3::IpcsClassifierRecord::IpcsClassifierRecord(ns3::Tlv tlv) [constructor] cls.add_constructor([param('ns3::Tlv', 'tlv')]) ## ipcs-classifier-record.h (module 'wimax'): void ns3::IpcsClassifierRecord::AddDstAddr(ns3::Ipv4Address dstAddress, ns3::Ipv4Mask dstMask) [member function] cls.add_method('AddDstAddr', 'void', [param('ns3::Ipv4Address', 'dstAddress'), param('ns3::Ipv4Mask', 'dstMask')]) ## ipcs-classifier-record.h (module 'wimax'): void ns3::IpcsClassifierRecord::AddDstPortRange(uint16_t dstPortLow, uint16_t dstPortHigh) [member function] cls.add_method('AddDstPortRange', 'void', [param('uint16_t', 'dstPortLow'), param('uint16_t', 'dstPortHigh')]) ## ipcs-classifier-record.h (module 'wimax'): void ns3::IpcsClassifierRecord::AddProtocol(uint8_t proto) [member function] cls.add_method('AddProtocol', 'void', [param('uint8_t', 'proto')]) ## ipcs-classifier-record.h (module 'wimax'): void ns3::IpcsClassifierRecord::AddSrcAddr(ns3::Ipv4Address srcAddress, ns3::Ipv4Mask srcMask) [member function] cls.add_method('AddSrcAddr', 'void', [param('ns3::Ipv4Address', 'srcAddress'), param('ns3::Ipv4Mask', 'srcMask')]) ## ipcs-classifier-record.h (module 'wimax'): void ns3::IpcsClassifierRecord::AddSrcPortRange(uint16_t srcPortLow, uint16_t srcPortHigh) [member function] cls.add_method('AddSrcPortRange', 'void', [param('uint16_t', 'srcPortLow'), param('uint16_t', 'srcPortHigh')]) ## ipcs-classifier-record.h (module 'wimax'): bool ns3::IpcsClassifierRecord::CheckMatch(ns3::Ipv4Address srcAddress, ns3::Ipv4Address dstAddress, uint16_t srcPort, uint16_t dstPort, uint8_t proto) const [member function] cls.add_method('CheckMatch', 'bool', [param('ns3::Ipv4Address', 'srcAddress'), param('ns3::Ipv4Address', 'dstAddress'), param('uint16_t', 'srcPort'), param('uint16_t', 'dstPort'), param('uint8_t', 'proto')], is_const=True) ## ipcs-classifier-record.h (module 'wimax'): uint16_t ns3::IpcsClassifierRecord::GetCid() const [member function] cls.add_method('GetCid', 'uint16_t', [], is_const=True) ## ipcs-classifier-record.h (module 'wimax'): uint16_t ns3::IpcsClassifierRecord::GetIndex() const [member function] cls.add_method('GetIndex', 'uint16_t', [], is_const=True) ## ipcs-classifier-record.h (module 'wimax'): uint8_t ns3::IpcsClassifierRecord::GetPriority() const [member function] cls.add_method('GetPriority', 'uint8_t', [], is_const=True) ## ipcs-classifier-record.h (module 'wimax'): void ns3::IpcsClassifierRecord::SetCid(uint16_t cid) [member function] cls.add_method('SetCid', 'void', [param('uint16_t', 'cid')]) ## ipcs-classifier-record.h (module 'wimax'): void ns3::IpcsClassifierRecord::SetIndex(uint16_t index) [member function] cls.add_method('SetIndex', 'void', [param('uint16_t', 'index')]) ## ipcs-classifier-record.h (module 'wimax'): void ns3::IpcsClassifierRecord::SetPriority(uint8_t prio) [member function] cls.add_method('SetPriority', 'void', [param('uint8_t', 'prio')]) ## ipcs-classifier-record.h (module 'wimax'): ns3::Tlv ns3::IpcsClassifierRecord::ToTlv() const [member function] cls.add_method('ToTlv', 'ns3::Tlv', [], is_const=True) return def register_Ns3Ipv4Address_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('<') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## ipv4-address.h (module 'network'): ns3::Ipv4Address::Ipv4Address(ns3::Ipv4Address const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4Address const &', 'arg0')]) ## ipv4-address.h (module 'network'): ns3::Ipv4Address::Ipv4Address() [constructor] cls.add_constructor([]) ## ipv4-address.h (module 'network'): ns3::Ipv4Address::Ipv4Address(uint32_t address) [constructor] cls.add_constructor([param('uint32_t', 'address')]) ## ipv4-address.h (module 'network'): ns3::Ipv4Address::Ipv4Address(char const * address) [constructor] cls.add_constructor([param('char const *', 'address')]) ## ipv4-address.h (module 'network'): ns3::Ipv4Address ns3::Ipv4Address::CombineMask(ns3::Ipv4Mask const & mask) const [member function] cls.add_method('CombineMask', 'ns3::Ipv4Address', [param('ns3::Ipv4Mask const &', 'mask')], is_const=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::ConvertFrom(ns3::Address const & address) [member function] cls.add_method('ConvertFrom', 'ns3::Ipv4Address', [param('ns3::Address const &', 'address')], is_static=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::Deserialize(uint8_t const * buf) [member function] cls.add_method('Deserialize', 'ns3::Ipv4Address', [param('uint8_t const *', 'buf')], is_static=True) ## ipv4-address.h (module 'network'): uint32_t ns3::Ipv4Address::Get() const [member function] cls.add_method('Get', 'uint32_t', [], is_const=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::GetAny() [member function] cls.add_method('GetAny', 'ns3::Ipv4Address', [], is_static=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::GetBroadcast() [member function] cls.add_method('GetBroadcast', 'ns3::Ipv4Address', [], is_static=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::GetLoopback() [member function] cls.add_method('GetLoopback', 'ns3::Ipv4Address', [], is_static=True) ## ipv4-address.h (module 'network'): ns3::Ipv4Address ns3::Ipv4Address::GetSubnetDirectedBroadcast(ns3::Ipv4Mask const & mask) const [member function] cls.add_method('GetSubnetDirectedBroadcast', 'ns3::Ipv4Address', [param('ns3::Ipv4Mask const &', 'mask')], is_const=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::GetZero() [member function] cls.add_method('GetZero', 'ns3::Ipv4Address', [], is_static=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Address::IsBroadcast() const [member function] cls.add_method('IsBroadcast', 'bool', [], is_const=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Address::IsEqual(ns3::Ipv4Address const & other) const [member function] cls.add_method('IsEqual', 'bool', [param('ns3::Ipv4Address const &', 'other')], is_const=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Address::IsLocalMulticast() const [member function] cls.add_method('IsLocalMulticast', 'bool', [], is_const=True) ## ipv4-address.h (module 'network'): static bool ns3::Ipv4Address::IsMatchingType(ns3::Address const & address) [member function] cls.add_method('IsMatchingType', 'bool', [param('ns3::Address const &', 'address')], is_static=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Address::IsMulticast() const [member function] cls.add_method('IsMulticast', 'bool', [], is_const=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Address::IsSubnetDirectedBroadcast(ns3::Ipv4Mask const & mask) const [member function] cls.add_method('IsSubnetDirectedBroadcast', 'bool', [param('ns3::Ipv4Mask const &', 'mask')], is_const=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4Address::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4Address::Serialize(uint8_t * buf) const [member function] cls.add_method('Serialize', 'void', [param('uint8_t *', 'buf')], is_const=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4Address::Set(uint32_t address) [member function] cls.add_method('Set', 'void', [param('uint32_t', 'address')]) ## ipv4-address.h (module 'network'): void ns3::Ipv4Address::Set(char const * address) [member function] cls.add_method('Set', 'void', [param('char const *', 'address')]) return def register_Ns3Ipv4Mask_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## ipv4-address.h (module 'network'): ns3::Ipv4Mask::Ipv4Mask(ns3::Ipv4Mask const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4Mask const &', 'arg0')]) ## ipv4-address.h (module 'network'): ns3::Ipv4Mask::Ipv4Mask() [constructor] cls.add_constructor([]) ## ipv4-address.h (module 'network'): ns3::Ipv4Mask::Ipv4Mask(uint32_t mask) [constructor] cls.add_constructor([param('uint32_t', 'mask')]) ## ipv4-address.h (module 'network'): ns3::Ipv4Mask::Ipv4Mask(char const * mask) [constructor] cls.add_constructor([param('char const *', 'mask')]) ## ipv4-address.h (module 'network'): uint32_t ns3::Ipv4Mask::Get() const [member function] cls.add_method('Get', 'uint32_t', [], is_const=True) ## ipv4-address.h (module 'network'): uint32_t ns3::Ipv4Mask::GetInverse() const [member function] cls.add_method('GetInverse', 'uint32_t', [], is_const=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Mask ns3::Ipv4Mask::GetLoopback() [member function] cls.add_method('GetLoopback', 'ns3::Ipv4Mask', [], is_static=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Mask ns3::Ipv4Mask::GetOnes() [member function] cls.add_method('GetOnes', 'ns3::Ipv4Mask', [], is_static=True) ## ipv4-address.h (module 'network'): uint16_t ns3::Ipv4Mask::GetPrefixLength() const [member function] cls.add_method('GetPrefixLength', 'uint16_t', [], is_const=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Mask ns3::Ipv4Mask::GetZero() [member function] cls.add_method('GetZero', 'ns3::Ipv4Mask', [], is_static=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Mask::IsEqual(ns3::Ipv4Mask other) const [member function] cls.add_method('IsEqual', 'bool', [param('ns3::Ipv4Mask', 'other')], is_const=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Mask::IsMatch(ns3::Ipv4Address a, ns3::Ipv4Address b) const [member function] cls.add_method('IsMatch', 'bool', [param('ns3::Ipv4Address', 'a'), param('ns3::Ipv4Address', 'b')], is_const=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4Mask::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4Mask::Set(uint32_t mask) [member function] cls.add_method('Set', 'void', [param('uint32_t', 'mask')]) return def register_Ns3Ipv6Address_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('<') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address() [constructor] cls.add_constructor([]) ## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address(char const * address) [constructor] cls.add_constructor([param('char const *', 'address')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address(uint8_t * address) [constructor] cls.add_constructor([param('uint8_t *', 'address')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address(ns3::Ipv6Address const & addr) [copy constructor] cls.add_constructor([param('ns3::Ipv6Address const &', 'addr')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address(ns3::Ipv6Address const * addr) [constructor] cls.add_constructor([param('ns3::Ipv6Address const *', 'addr')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Address ns3::Ipv6Address::CombinePrefix(ns3::Ipv6Prefix const & prefix) [member function] cls.add_method('CombinePrefix', 'ns3::Ipv6Address', [param('ns3::Ipv6Prefix const &', 'prefix')]) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::ConvertFrom(ns3::Address const & address) [member function] cls.add_method('ConvertFrom', 'ns3::Ipv6Address', [param('ns3::Address const &', 'address')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::Deserialize(uint8_t const * buf) [member function] cls.add_method('Deserialize', 'ns3::Ipv6Address', [param('uint8_t const *', 'buf')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetAllHostsMulticast() [member function] cls.add_method('GetAllHostsMulticast', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetAllNodesMulticast() [member function] cls.add_method('GetAllNodesMulticast', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetAllRoutersMulticast() [member function] cls.add_method('GetAllRoutersMulticast', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetAny() [member function] cls.add_method('GetAny', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6Address::GetBytes(uint8_t * buf) const [member function] cls.add_method('GetBytes', 'void', [param('uint8_t *', 'buf')], is_const=True) ## ipv6-address.h (module 'network'): ns3::Ipv4Address ns3::Ipv6Address::GetIpv4MappedAddress() const [member function] cls.add_method('GetIpv4MappedAddress', 'ns3::Ipv4Address', [], is_const=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetLoopback() [member function] cls.add_method('GetLoopback', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetOnes() [member function] cls.add_method('GetOnes', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetZero() [member function] cls.add_method('GetZero', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsAllHostsMulticast() const [member function] cls.add_method('IsAllHostsMulticast', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsAllNodesMulticast() const [member function] cls.add_method('IsAllNodesMulticast', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsAllRoutersMulticast() const [member function] cls.add_method('IsAllRoutersMulticast', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsAny() const [member function] cls.add_method('IsAny', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsDocumentation() const [member function] cls.add_method('IsDocumentation', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function] cls.add_method('IsEqual', 'bool', [param('ns3::Ipv6Address const &', 'other')], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsIpv4MappedAddress() const [member function] cls.add_method('IsIpv4MappedAddress', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsLinkLocal() const [member function] cls.add_method('IsLinkLocal', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsLinkLocalMulticast() const [member function] cls.add_method('IsLinkLocalMulticast', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsLocalhost() const [member function] cls.add_method('IsLocalhost', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): static bool ns3::Ipv6Address::IsMatchingType(ns3::Address const & address) [member function] cls.add_method('IsMatchingType', 'bool', [param('ns3::Address const &', 'address')], is_static=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsMulticast() const [member function] cls.add_method('IsMulticast', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsSolicitedMulticast() const [member function] cls.add_method('IsSolicitedMulticast', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac16Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac16Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac64Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac64Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac16Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac16Address', 'mac')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'mac')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac64Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac64Address', 'mac')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress(ns3::Ipv4Address addr) [member function] cls.add_method('MakeIpv4MappedAddress', 'ns3::Ipv6Address', [param('ns3::Ipv4Address', 'addr')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeSolicitedAddress(ns3::Ipv6Address addr) [member function] cls.add_method('MakeSolicitedAddress', 'ns3::Ipv6Address', [param('ns3::Ipv6Address', 'addr')], is_static=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6Address::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6Address::Serialize(uint8_t * buf) const [member function] cls.add_method('Serialize', 'void', [param('uint8_t *', 'buf')], is_const=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6Address::Set(char const * address) [member function] cls.add_method('Set', 'void', [param('char const *', 'address')]) ## ipv6-address.h (module 'network'): void ns3::Ipv6Address::Set(uint8_t * address) [member function] cls.add_method('Set', 'void', [param('uint8_t *', 'address')]) return def register_Ns3Ipv6Prefix_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix::Ipv6Prefix() [constructor] cls.add_constructor([]) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix::Ipv6Prefix(uint8_t * prefix) [constructor] cls.add_constructor([param('uint8_t *', 'prefix')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix::Ipv6Prefix(char const * prefix) [constructor] cls.add_constructor([param('char const *', 'prefix')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix::Ipv6Prefix(uint8_t prefix) [constructor] cls.add_constructor([param('uint8_t', 'prefix')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix::Ipv6Prefix(ns3::Ipv6Prefix const & prefix) [copy constructor] cls.add_constructor([param('ns3::Ipv6Prefix const &', 'prefix')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix::Ipv6Prefix(ns3::Ipv6Prefix const * prefix) [constructor] cls.add_constructor([param('ns3::Ipv6Prefix const *', 'prefix')]) ## ipv6-address.h (module 'network'): void ns3::Ipv6Prefix::GetBytes(uint8_t * buf) const [member function] cls.add_method('GetBytes', 'void', [param('uint8_t *', 'buf')], is_const=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Prefix ns3::Ipv6Prefix::GetLoopback() [member function] cls.add_method('GetLoopback', 'ns3::Ipv6Prefix', [], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Prefix ns3::Ipv6Prefix::GetOnes() [member function] cls.add_method('GetOnes', 'ns3::Ipv6Prefix', [], is_static=True) ## ipv6-address.h (module 'network'): uint8_t ns3::Ipv6Prefix::GetPrefixLength() const [member function] cls.add_method('GetPrefixLength', 'uint8_t', [], is_const=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Prefix ns3::Ipv6Prefix::GetZero() [member function] cls.add_method('GetZero', 'ns3::Ipv6Prefix', [], is_static=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Prefix::IsEqual(ns3::Ipv6Prefix const & other) const [member function] cls.add_method('IsEqual', 'bool', [param('ns3::Ipv6Prefix const &', 'other')], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Prefix::IsMatch(ns3::Ipv6Address a, ns3::Ipv6Address b) const [member function] cls.add_method('IsMatch', 'bool', [param('ns3::Ipv6Address', 'a'), param('ns3::Ipv6Address', 'b')], is_const=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6Prefix::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True) return def register_Ns3LogComponent_methods(root_module, cls): ## log.h (module 'core'): ns3::LogComponent::LogComponent(ns3::LogComponent const & arg0) [copy constructor] cls.add_constructor([param('ns3::LogComponent const &', 'arg0')]) ## log.h (module 'core'): ns3::LogComponent::LogComponent(std::string const & name, std::string const & file, ns3::LogLevel const mask=::ns3::LOG_NONE) [constructor] cls.add_constructor([param('std::string const &', 'name'), param('std::string const &', 'file'), param('ns3::LogLevel const', 'mask', default_value='::ns3::LOG_NONE')]) ## log.h (module 'core'): void ns3::LogComponent::Disable(ns3::LogLevel const level) [member function] cls.add_method('Disable', 'void', [param('ns3::LogLevel const', 'level')]) ## log.h (module 'core'): void ns3::LogComponent::Enable(ns3::LogLevel const level) [member function] cls.add_method('Enable', 'void', [param('ns3::LogLevel const', 'level')]) ## log.h (module 'core'): std::string ns3::LogComponent::File() const [member function] cls.add_method('File', 'std::string', [], is_const=True) ## log.h (module 'core'): static std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,ns3::LogComponent*,std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >,std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::LogComponent*> > > * ns3::LogComponent::GetComponentList() [member function] cls.add_method('GetComponentList', 'std::map< std::string, ns3::LogComponent * > *', [], is_static=True) ## log.h (module 'core'): static std::string ns3::LogComponent::GetLevelLabel(ns3::LogLevel const level) [member function] cls.add_method('GetLevelLabel', 'std::string', [param('ns3::LogLevel const', 'level')], is_static=True) ## log.h (module 'core'): bool ns3::LogComponent::IsEnabled(ns3::LogLevel const level) const [member function] cls.add_method('IsEnabled', 'bool', [param('ns3::LogLevel const', 'level')], is_const=True) ## log.h (module 'core'): bool ns3::LogComponent::IsNoneEnabled() const [member function] cls.add_method('IsNoneEnabled', 'bool', [], is_const=True) ## log.h (module 'core'): char const * ns3::LogComponent::Name() const [member function] cls.add_method('Name', 'char const *', [], is_const=True) ## log.h (module 'core'): void ns3::LogComponent::SetMask(ns3::LogLevel const level) [member function] cls.add_method('SetMask', 'void', [param('ns3::LogLevel const', 'level')]) return def register_Ns3Mac48Address_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('<') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## mac48-address.h (module 'network'): ns3::Mac48Address::Mac48Address(ns3::Mac48Address const & arg0) [copy constructor] cls.add_constructor([param('ns3::Mac48Address const &', 'arg0')]) ## mac48-address.h (module 'network'): ns3::Mac48Address::Mac48Address() [constructor] cls.add_constructor([]) ## mac48-address.h (module 'network'): ns3::Mac48Address::Mac48Address(char const * str) [constructor] cls.add_constructor([param('char const *', 'str')]) ## mac48-address.h (module 'network'): static ns3::Mac48Address ns3::Mac48Address::Allocate() [member function] cls.add_method('Allocate', 'ns3::Mac48Address', [], is_static=True) ## mac48-address.h (module 'network'): static ns3::Mac48Address ns3::Mac48Address::ConvertFrom(ns3::Address const & address) [member function] cls.add_method('ConvertFrom', 'ns3::Mac48Address', [param('ns3::Address const &', 'address')], is_static=True) ## mac48-address.h (module 'network'): void ns3::Mac48Address::CopyFrom(uint8_t const * buffer) [member function] cls.add_method('CopyFrom', 'void', [param('uint8_t const *', 'buffer')]) ## mac48-address.h (module 'network'): void ns3::Mac48Address::CopyTo(uint8_t * buffer) const [member function] cls.add_method('CopyTo', 'void', [param('uint8_t *', 'buffer')], is_const=True) ## mac48-address.h (module 'network'): static ns3::Mac48Address ns3::Mac48Address::GetBroadcast() [member function] cls.add_method('GetBroadcast', 'ns3::Mac48Address', [], is_static=True) ## mac48-address.h (module 'network'): static ns3::Mac48Address ns3::Mac48Address::GetMulticast(ns3::Ipv4Address address) [member function] cls.add_method('GetMulticast', 'ns3::Mac48Address', [param('ns3::Ipv4Address', 'address')], is_static=True) ## mac48-address.h (module 'network'): static ns3::Mac48Address ns3::Mac48Address::GetMulticast(ns3::Ipv6Address address) [member function] cls.add_method('GetMulticast', 'ns3::Mac48Address', [param('ns3::Ipv6Address', 'address')], is_static=True) ## mac48-address.h (module 'network'): static ns3::Mac48Address ns3::Mac48Address::GetMulticast6Prefix() [member function] cls.add_method('GetMulticast6Prefix', 'ns3::Mac48Address', [], is_static=True) ## mac48-address.h (module 'network'): static ns3::Mac48Address ns3::Mac48Address::GetMulticastPrefix() [member function] cls.add_method('GetMulticastPrefix', 'ns3::Mac48Address', [], is_static=True) ## mac48-address.h (module 'network'): bool ns3::Mac48Address::IsBroadcast() const [member function] cls.add_method('IsBroadcast', 'bool', [], is_const=True) ## mac48-address.h (module 'network'): bool ns3::Mac48Address::IsGroup() const [member function] cls.add_method('IsGroup', 'bool', [], is_const=True) ## mac48-address.h (module 'network'): static bool ns3::Mac48Address::IsMatchingType(ns3::Address const & address) [member function] cls.add_method('IsMatchingType', 'bool', [param('ns3::Address const &', 'address')], is_static=True) return def register_Ns3NetDeviceContainer_methods(root_module, cls): ## net-device-container.h (module 'network'): ns3::NetDeviceContainer::NetDeviceContainer(ns3::NetDeviceContainer const & arg0) [copy constructor] cls.add_constructor([param('ns3::NetDeviceContainer const &', 'arg0')]) ## net-device-container.h (module 'network'): ns3::NetDeviceContainer::NetDeviceContainer() [constructor] cls.add_constructor([]) ## net-device-container.h (module 'network'): ns3::NetDeviceContainer::NetDeviceContainer(ns3::Ptr<ns3::NetDevice> dev) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::NetDevice >', 'dev')]) ## net-device-container.h (module 'network'): ns3::NetDeviceContainer::NetDeviceContainer(std::string devName) [constructor] cls.add_constructor([param('std::string', 'devName')]) ## net-device-container.h (module 'network'): ns3::NetDeviceContainer::NetDeviceContainer(ns3::NetDeviceContainer const & a, ns3::NetDeviceContainer const & b) [constructor] cls.add_constructor([param('ns3::NetDeviceContainer const &', 'a'), param('ns3::NetDeviceContainer const &', 'b')]) ## net-device-container.h (module 'network'): void ns3::NetDeviceContainer::Add(ns3::NetDeviceContainer other) [member function] cls.add_method('Add', 'void', [param('ns3::NetDeviceContainer', 'other')]) ## net-device-container.h (module 'network'): void ns3::NetDeviceContainer::Add(ns3::Ptr<ns3::NetDevice> device) [member function] cls.add_method('Add', 'void', [param('ns3::Ptr< ns3::NetDevice >', 'device')]) ## net-device-container.h (module 'network'): void ns3::NetDeviceContainer::Add(std::string deviceName) [member function] cls.add_method('Add', 'void', [param('std::string', 'deviceName')]) ## net-device-container.h (module 'network'): __gnu_cxx::__normal_iterator<const ns3::Ptr<ns3::NetDevice>*,std::vector<ns3::Ptr<ns3::NetDevice>, std::allocator<ns3::Ptr<ns3::NetDevice> > > > ns3::NetDeviceContainer::Begin() const [member function] cls.add_method('Begin', '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::NetDevice > const, std::vector< ns3::Ptr< ns3::NetDevice > > >', [], is_const=True) ## net-device-container.h (module 'network'): __gnu_cxx::__normal_iterator<const ns3::Ptr<ns3::NetDevice>*,std::vector<ns3::Ptr<ns3::NetDevice>, std::allocator<ns3::Ptr<ns3::NetDevice> > > > ns3::NetDeviceContainer::End() const [member function] cls.add_method('End', '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::NetDevice > const, std::vector< ns3::Ptr< ns3::NetDevice > > >', [], is_const=True) ## net-device-container.h (module 'network'): ns3::Ptr<ns3::NetDevice> ns3::NetDeviceContainer::Get(uint32_t i) const [member function] cls.add_method('Get', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_const=True) ## net-device-container.h (module 'network'): uint32_t ns3::NetDeviceContainer::GetN() const [member function] cls.add_method('GetN', 'uint32_t', [], is_const=True) return def register_Ns3NodeContainer_methods(root_module, cls): ## node-container.h (module 'network'): ns3::NodeContainer::NodeContainer(ns3::NodeContainer const & arg0) [copy constructor] cls.add_constructor([param('ns3::NodeContainer const &', 'arg0')]) ## node-container.h (module 'network'): ns3::NodeContainer::NodeContainer() [constructor] cls.add_constructor([]) ## node-container.h (module 'network'): ns3::NodeContainer::NodeContainer(ns3::Ptr<ns3::Node> node) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::Node >', 'node')]) ## node-container.h (module 'network'): ns3::NodeContainer::NodeContainer(std::string nodeName) [constructor] cls.add_constructor([param('std::string', 'nodeName')]) ## node-container.h (module 'network'): ns3::NodeContainer::NodeContainer(ns3::NodeContainer const & a, ns3::NodeContainer const & b) [constructor] cls.add_constructor([param('ns3::NodeContainer const &', 'a'), param('ns3::NodeContainer const &', 'b')]) ## node-container.h (module 'network'): ns3::NodeContainer::NodeContainer(ns3::NodeContainer const & a, ns3::NodeContainer const & b, ns3::NodeContainer const & c) [constructor] cls.add_constructor([param('ns3::NodeContainer const &', 'a'), param('ns3::NodeContainer const &', 'b'), param('ns3::NodeContainer const &', 'c')]) ## node-container.h (module 'network'): ns3::NodeContainer::NodeContainer(ns3::NodeContainer const & a, ns3::NodeContainer const & b, ns3::NodeContainer const & c, ns3::NodeContainer const & d) [constructor] cls.add_constructor([param('ns3::NodeContainer const &', 'a'), param('ns3::NodeContainer const &', 'b'), param('ns3::NodeContainer const &', 'c'), param('ns3::NodeContainer const &', 'd')]) ## node-container.h (module 'network'): ns3::NodeContainer::NodeContainer(ns3::NodeContainer const & a, ns3::NodeContainer const & b, ns3::NodeContainer const & c, ns3::NodeContainer const & d, ns3::NodeContainer const & e) [constructor] cls.add_constructor([param('ns3::NodeContainer const &', 'a'), param('ns3::NodeContainer const &', 'b'), param('ns3::NodeContainer const &', 'c'), param('ns3::NodeContainer const &', 'd'), param('ns3::NodeContainer const &', 'e')]) ## node-container.h (module 'network'): void ns3::NodeContainer::Add(ns3::NodeContainer other) [member function] cls.add_method('Add', 'void', [param('ns3::NodeContainer', 'other')]) ## node-container.h (module 'network'): void ns3::NodeContainer::Add(ns3::Ptr<ns3::Node> node) [member function] cls.add_method('Add', 'void', [param('ns3::Ptr< ns3::Node >', 'node')]) ## node-container.h (module 'network'): void ns3::NodeContainer::Add(std::string nodeName) [member function] cls.add_method('Add', 'void', [param('std::string', 'nodeName')]) ## node-container.h (module 'network'): __gnu_cxx::__normal_iterator<const ns3::Ptr<ns3::Node>*,std::vector<ns3::Ptr<ns3::Node>, std::allocator<ns3::Ptr<ns3::Node> > > > ns3::NodeContainer::Begin() const [member function] cls.add_method('Begin', '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Node > const, std::vector< ns3::Ptr< ns3::Node > > >', [], is_const=True) ## node-container.h (module 'network'): void ns3::NodeContainer::Create(uint32_t n) [member function] cls.add_method('Create', 'void', [param('uint32_t', 'n')]) ## node-container.h (module 'network'): void ns3::NodeContainer::Create(uint32_t n, uint32_t systemId) [member function] cls.add_method('Create', 'void', [param('uint32_t', 'n'), param('uint32_t', 'systemId')]) ## node-container.h (module 'network'): __gnu_cxx::__normal_iterator<const ns3::Ptr<ns3::Node>*,std::vector<ns3::Ptr<ns3::Node>, std::allocator<ns3::Ptr<ns3::Node> > > > ns3::NodeContainer::End() const [member function] cls.add_method('End', '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Node > const, std::vector< ns3::Ptr< ns3::Node > > >', [], is_const=True) ## node-container.h (module 'network'): ns3::Ptr<ns3::Node> ns3::NodeContainer::Get(uint32_t i) const [member function] cls.add_method('Get', 'ns3::Ptr< ns3::Node >', [param('uint32_t', 'i')], is_const=True) ## node-container.h (module 'network'): static ns3::NodeContainer ns3::NodeContainer::GetGlobal() [member function] cls.add_method('GetGlobal', 'ns3::NodeContainer', [], is_static=True) ## node-container.h (module 'network'): uint32_t ns3::NodeContainer::GetN() const [member function] cls.add_method('GetN', 'uint32_t', [], is_const=True) return def register_Ns3ObjectBase_methods(root_module, cls): ## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase() [constructor] cls.add_constructor([]) ## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase(ns3::ObjectBase const & arg0) [copy constructor] cls.add_constructor([param('ns3::ObjectBase const &', 'arg0')]) ## object-base.h (module 'core'): void ns3::ObjectBase::GetAttribute(std::string name, ns3::AttributeValue & value) const [member function] cls.add_method('GetAttribute', 'void', [param('std::string', 'name'), param('ns3::AttributeValue &', 'value')], is_const=True) ## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & value) const [member function] cls.add_method('GetAttributeFailSafe', 'bool', [param('std::string', 'name'), param('ns3::AttributeValue &', 'value')], is_const=True) ## object-base.h (module 'core'): ns3::TypeId ns3::ObjectBase::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## object-base.h (module 'core'): static ns3::TypeId ns3::ObjectBase::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## object-base.h (module 'core'): void ns3::ObjectBase::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] cls.add_method('SetAttribute', 'void', [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) ## object-base.h (module 'core'): bool ns3::ObjectBase::SetAttributeFailSafe(std::string name, ns3::AttributeValue const & value) [member function] cls.add_method('SetAttributeFailSafe', 'bool', [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceConnect(std::string name, std::string context, ns3::CallbackBase const & cb) [member function] cls.add_method('TraceConnect', 'bool', [param('std::string', 'name'), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')]) ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceConnectWithoutContext(std::string name, ns3::CallbackBase const & cb) [member function] cls.add_method('TraceConnectWithoutContext', 'bool', [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')]) ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceDisconnect(std::string name, std::string context, ns3::CallbackBase const & cb) [member function] cls.add_method('TraceDisconnect', 'bool', [param('std::string', 'name'), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')]) ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceDisconnectWithoutContext(std::string name, ns3::CallbackBase const & cb) [member function] cls.add_method('TraceDisconnectWithoutContext', 'bool', [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')]) ## object-base.h (module 'core'): void ns3::ObjectBase::ConstructSelf(ns3::AttributeConstructionList const & attributes) [member function] cls.add_method('ConstructSelf', 'void', [param('ns3::AttributeConstructionList const &', 'attributes')], visibility='protected') ## object-base.h (module 'core'): void ns3::ObjectBase::NotifyConstructionCompleted() [member function] cls.add_method('NotifyConstructionCompleted', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3ObjectDeleter_methods(root_module, cls): ## object.h (module 'core'): ns3::ObjectDeleter::ObjectDeleter() [constructor] cls.add_constructor([]) ## object.h (module 'core'): ns3::ObjectDeleter::ObjectDeleter(ns3::ObjectDeleter const & arg0) [copy constructor] cls.add_constructor([param('ns3::ObjectDeleter const &', 'arg0')]) ## object.h (module 'core'): static void ns3::ObjectDeleter::Delete(ns3::Object * object) [member function] cls.add_method('Delete', 'void', [param('ns3::Object *', 'object')], is_static=True) return def register_Ns3ObjectFactory_methods(root_module, cls): cls.add_output_stream_operator() ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory(ns3::ObjectFactory const & arg0) [copy constructor] cls.add_constructor([param('ns3::ObjectFactory const &', 'arg0')]) ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory() [constructor] cls.add_constructor([]) ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory(std::string typeId) [constructor] cls.add_constructor([param('std::string', 'typeId')]) ## object-factory.h (module 'core'): ns3::Ptr<ns3::Object> ns3::ObjectFactory::Create() const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::Object >', [], is_const=True) ## object-factory.h (module 'core'): ns3::TypeId ns3::ObjectFactory::GetTypeId() const [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_const=True) ## object-factory.h (module 'core'): void ns3::ObjectFactory::Set(std::string name, ns3::AttributeValue const & value) [member function] cls.add_method('Set', 'void', [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(ns3::TypeId tid) [member function] cls.add_method('SetTypeId', 'void', [param('ns3::TypeId', 'tid')]) ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(char const * tid) [member function] cls.add_method('SetTypeId', 'void', [param('char const *', 'tid')]) ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(std::string tid) [member function] cls.add_method('SetTypeId', 'void', [param('std::string', 'tid')]) return def register_Ns3OfdmDcdChannelEncodings_methods(root_module, cls): ## dl-mac-messages.h (module 'wimax'): ns3::OfdmDcdChannelEncodings::OfdmDcdChannelEncodings(ns3::OfdmDcdChannelEncodings const & arg0) [copy constructor] cls.add_constructor([param('ns3::OfdmDcdChannelEncodings const &', 'arg0')]) ## dl-mac-messages.h (module 'wimax'): ns3::OfdmDcdChannelEncodings::OfdmDcdChannelEncodings() [constructor] cls.add_constructor([]) ## dl-mac-messages.h (module 'wimax'): ns3::Mac48Address ns3::OfdmDcdChannelEncodings::GetBaseStationId() const [member function] cls.add_method('GetBaseStationId', 'ns3::Mac48Address', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmDcdChannelEncodings::GetChannelNr() const [member function] cls.add_method('GetChannelNr', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmDcdChannelEncodings::GetFrameDurationCode() const [member function] cls.add_method('GetFrameDurationCode', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint32_t ns3::OfdmDcdChannelEncodings::GetFrameNumber() const [member function] cls.add_method('GetFrameNumber', 'uint32_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmDcdChannelEncodings::GetRtg() const [member function] cls.add_method('GetRtg', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint16_t ns3::OfdmDcdChannelEncodings::GetSize() const [member function] cls.add_method('GetSize', 'uint16_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmDcdChannelEncodings::GetTtg() const [member function] cls.add_method('GetTtg', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDcdChannelEncodings::SetBaseStationId(ns3::Mac48Address baseStationId) [member function] cls.add_method('SetBaseStationId', 'void', [param('ns3::Mac48Address', 'baseStationId')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDcdChannelEncodings::SetChannelNr(uint8_t channelNr) [member function] cls.add_method('SetChannelNr', 'void', [param('uint8_t', 'channelNr')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDcdChannelEncodings::SetFrameDurationCode(uint8_t frameDurationCode) [member function] cls.add_method('SetFrameDurationCode', 'void', [param('uint8_t', 'frameDurationCode')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDcdChannelEncodings::SetFrameNumber(uint32_t frameNumber) [member function] cls.add_method('SetFrameNumber', 'void', [param('uint32_t', 'frameNumber')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDcdChannelEncodings::SetRtg(uint8_t rtg) [member function] cls.add_method('SetRtg', 'void', [param('uint8_t', 'rtg')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDcdChannelEncodings::SetTtg(uint8_t ttg) [member function] cls.add_method('SetTtg', 'void', [param('uint8_t', 'ttg')]) ## dl-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::OfdmDcdChannelEncodings::DoRead(ns3::Buffer::Iterator start) [member function] cls.add_method('DoRead', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], visibility='private', is_virtual=True) ## dl-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::OfdmDcdChannelEncodings::DoWrite(ns3::Buffer::Iterator start) const [member function] cls.add_method('DoWrite', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True, visibility='private', is_virtual=True) return def register_Ns3OfdmDlBurstProfile_methods(root_module, cls): ## dl-mac-messages.h (module 'wimax'): ns3::OfdmDlBurstProfile::OfdmDlBurstProfile(ns3::OfdmDlBurstProfile const & arg0) [copy constructor] cls.add_constructor([param('ns3::OfdmDlBurstProfile const &', 'arg0')]) ## dl-mac-messages.h (module 'wimax'): ns3::OfdmDlBurstProfile::OfdmDlBurstProfile() [constructor] cls.add_constructor([]) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmDlBurstProfile::GetDiuc() const [member function] cls.add_method('GetDiuc', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmDlBurstProfile::GetFecCodeType() const [member function] cls.add_method('GetFecCodeType', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmDlBurstProfile::GetLength() const [member function] cls.add_method('GetLength', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint16_t ns3::OfdmDlBurstProfile::GetSize() const [member function] cls.add_method('GetSize', 'uint16_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmDlBurstProfile::GetType() const [member function] cls.add_method('GetType', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::OfdmDlBurstProfile::Read(ns3::Buffer::Iterator start) [member function] cls.add_method('Read', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDlBurstProfile::SetDiuc(uint8_t diuc) [member function] cls.add_method('SetDiuc', 'void', [param('uint8_t', 'diuc')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDlBurstProfile::SetFecCodeType(uint8_t fecCodeType) [member function] cls.add_method('SetFecCodeType', 'void', [param('uint8_t', 'fecCodeType')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDlBurstProfile::SetLength(uint8_t length) [member function] cls.add_method('SetLength', 'void', [param('uint8_t', 'length')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDlBurstProfile::SetType(uint8_t type) [member function] cls.add_method('SetType', 'void', [param('uint8_t', 'type')]) ## dl-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::OfdmDlBurstProfile::Write(ns3::Buffer::Iterator start) const [member function] cls.add_method('Write', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True) return def register_Ns3OfdmDlMapIe_methods(root_module, cls): ## dl-mac-messages.h (module 'wimax'): ns3::OfdmDlMapIe::OfdmDlMapIe(ns3::OfdmDlMapIe const & arg0) [copy constructor] cls.add_constructor([param('ns3::OfdmDlMapIe const &', 'arg0')]) ## dl-mac-messages.h (module 'wimax'): ns3::OfdmDlMapIe::OfdmDlMapIe() [constructor] cls.add_constructor([]) ## dl-mac-messages.h (module 'wimax'): ns3::Cid ns3::OfdmDlMapIe::GetCid() const [member function] cls.add_method('GetCid', 'ns3::Cid', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmDlMapIe::GetDiuc() const [member function] cls.add_method('GetDiuc', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmDlMapIe::GetPreamblePresent() const [member function] cls.add_method('GetPreamblePresent', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint16_t ns3::OfdmDlMapIe::GetSize() const [member function] cls.add_method('GetSize', 'uint16_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint16_t ns3::OfdmDlMapIe::GetStartTime() const [member function] cls.add_method('GetStartTime', 'uint16_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::OfdmDlMapIe::Read(ns3::Buffer::Iterator start) [member function] cls.add_method('Read', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDlMapIe::SetCid(ns3::Cid cid) [member function] cls.add_method('SetCid', 'void', [param('ns3::Cid', 'cid')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDlMapIe::SetDiuc(uint8_t diuc) [member function] cls.add_method('SetDiuc', 'void', [param('uint8_t', 'diuc')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDlMapIe::SetPreamblePresent(uint8_t preamblePresent) [member function] cls.add_method('SetPreamblePresent', 'void', [param('uint8_t', 'preamblePresent')]) ## dl-mac-messages.h (module 'wimax'): void ns3::OfdmDlMapIe::SetStartTime(uint16_t startTime) [member function] cls.add_method('SetStartTime', 'void', [param('uint16_t', 'startTime')]) ## dl-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::OfdmDlMapIe::Write(ns3::Buffer::Iterator start) const [member function] cls.add_method('Write', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True) return def register_Ns3OfdmUlBurstProfile_methods(root_module, cls): ## ul-mac-messages.h (module 'wimax'): ns3::OfdmUlBurstProfile::OfdmUlBurstProfile(ns3::OfdmUlBurstProfile const & arg0) [copy constructor] cls.add_constructor([param('ns3::OfdmUlBurstProfile const &', 'arg0')]) ## ul-mac-messages.h (module 'wimax'): ns3::OfdmUlBurstProfile::OfdmUlBurstProfile() [constructor] cls.add_constructor([]) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmUlBurstProfile::GetFecCodeType() const [member function] cls.add_method('GetFecCodeType', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmUlBurstProfile::GetLength() const [member function] cls.add_method('GetLength', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint16_t ns3::OfdmUlBurstProfile::GetSize() const [member function] cls.add_method('GetSize', 'uint16_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmUlBurstProfile::GetType() const [member function] cls.add_method('GetType', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmUlBurstProfile::GetUiuc() const [member function] cls.add_method('GetUiuc', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::OfdmUlBurstProfile::Read(ns3::Buffer::Iterator start) [member function] cls.add_method('Read', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')]) ## ul-mac-messages.h (module 'wimax'): void ns3::OfdmUlBurstProfile::SetFecCodeType(uint8_t fecCodeType) [member function] cls.add_method('SetFecCodeType', 'void', [param('uint8_t', 'fecCodeType')]) ## ul-mac-messages.h (module 'wimax'): void ns3::OfdmUlBurstProfile::SetLength(uint8_t length) [member function] cls.add_method('SetLength', 'void', [param('uint8_t', 'length')]) ## ul-mac-messages.h (module 'wimax'): void ns3::OfdmUlBurstProfile::SetType(uint8_t type) [member function] cls.add_method('SetType', 'void', [param('uint8_t', 'type')]) ## ul-mac-messages.h (module 'wimax'): void ns3::OfdmUlBurstProfile::SetUiuc(uint8_t uiuc) [member function] cls.add_method('SetUiuc', 'void', [param('uint8_t', 'uiuc')]) ## ul-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::OfdmUlBurstProfile::Write(ns3::Buffer::Iterator start) const [member function] cls.add_method('Write', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True) return def register_Ns3OfdmUlMapIe_methods(root_module, cls): ## ul-mac-messages.h (module 'wimax'): ns3::OfdmUlMapIe::OfdmUlMapIe(ns3::OfdmUlMapIe const & arg0) [copy constructor] cls.add_constructor([param('ns3::OfdmUlMapIe const &', 'arg0')]) ## ul-mac-messages.h (module 'wimax'): ns3::OfdmUlMapIe::OfdmUlMapIe() [constructor] cls.add_constructor([]) ## ul-mac-messages.h (module 'wimax'): ns3::Cid ns3::OfdmUlMapIe::GetCid() const [member function] cls.add_method('GetCid', 'ns3::Cid', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint16_t ns3::OfdmUlMapIe::GetDuration() const [member function] cls.add_method('GetDuration', 'uint16_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmUlMapIe::GetMidambleRepetitionInterval() const [member function] cls.add_method('GetMidambleRepetitionInterval', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint16_t ns3::OfdmUlMapIe::GetSize() const [member function] cls.add_method('GetSize', 'uint16_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint16_t ns3::OfdmUlMapIe::GetStartTime() const [member function] cls.add_method('GetStartTime', 'uint16_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmUlMapIe::GetSubchannelIndex() const [member function] cls.add_method('GetSubchannelIndex', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmUlMapIe::GetUiuc() const [member function] cls.add_method('GetUiuc', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::OfdmUlMapIe::Read(ns3::Buffer::Iterator start) [member function] cls.add_method('Read', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')]) ## ul-mac-messages.h (module 'wimax'): void ns3::OfdmUlMapIe::SetCid(ns3::Cid cid) [member function] cls.add_method('SetCid', 'void', [param('ns3::Cid', 'cid')]) ## ul-mac-messages.h (module 'wimax'): void ns3::OfdmUlMapIe::SetDuration(uint16_t duration) [member function] cls.add_method('SetDuration', 'void', [param('uint16_t', 'duration')]) ## ul-mac-messages.h (module 'wimax'): void ns3::OfdmUlMapIe::SetMidambleRepetitionInterval(uint8_t midambleRepetitionInterval) [member function] cls.add_method('SetMidambleRepetitionInterval', 'void', [param('uint8_t', 'midambleRepetitionInterval')]) ## ul-mac-messages.h (module 'wimax'): void ns3::OfdmUlMapIe::SetStartTime(uint16_t startTime) [member function] cls.add_method('SetStartTime', 'void', [param('uint16_t', 'startTime')]) ## ul-mac-messages.h (module 'wimax'): void ns3::OfdmUlMapIe::SetSubchannelIndex(uint8_t subchannelIndex) [member function] cls.add_method('SetSubchannelIndex', 'void', [param('uint8_t', 'subchannelIndex')]) ## ul-mac-messages.h (module 'wimax'): void ns3::OfdmUlMapIe::SetUiuc(uint8_t uiuc) [member function] cls.add_method('SetUiuc', 'void', [param('uint8_t', 'uiuc')]) ## ul-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::OfdmUlMapIe::Write(ns3::Buffer::Iterator start) const [member function] cls.add_method('Write', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True) return def register_Ns3PacketMetadata_methods(root_module, cls): ## packet-metadata.h (module 'network'): ns3::PacketMetadata::PacketMetadata(uint64_t uid, uint32_t size) [constructor] cls.add_constructor([param('uint64_t', 'uid'), param('uint32_t', 'size')]) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::PacketMetadata(ns3::PacketMetadata const & o) [copy constructor] cls.add_constructor([param('ns3::PacketMetadata const &', 'o')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddAtEnd(ns3::PacketMetadata const & o) [member function] cls.add_method('AddAtEnd', 'void', [param('ns3::PacketMetadata const &', 'o')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddHeader(ns3::Header const & header, uint32_t size) [member function] cls.add_method('AddHeader', 'void', [param('ns3::Header const &', 'header'), param('uint32_t', 'size')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddPaddingAtEnd(uint32_t end) [member function] cls.add_method('AddPaddingAtEnd', 'void', [param('uint32_t', 'end')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddTrailer(ns3::Trailer const & trailer, uint32_t size) [member function] cls.add_method('AddTrailer', 'void', [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')]) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator ns3::PacketMetadata::BeginItem(ns3::Buffer buffer) const [member function] cls.add_method('BeginItem', 'ns3::PacketMetadata::ItemIterator', [param('ns3::Buffer', 'buffer')], is_const=True) ## packet-metadata.h (module 'network'): ns3::PacketMetadata ns3::PacketMetadata::CreateFragment(uint32_t start, uint32_t end) const [member function] cls.add_method('CreateFragment', 'ns3::PacketMetadata', [param('uint32_t', 'start'), param('uint32_t', 'end')], is_const=True) ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::Deserialize(uint8_t const * buffer, uint32_t size) [member function] cls.add_method('Deserialize', 'uint32_t', [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) ## packet-metadata.h (module 'network'): static void ns3::PacketMetadata::Enable() [member function] cls.add_method('Enable', 'void', [], is_static=True) ## packet-metadata.h (module 'network'): static void ns3::PacketMetadata::EnableChecking() [member function] cls.add_method('EnableChecking', 'void', [], is_static=True) ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## packet-metadata.h (module 'network'): uint64_t ns3::PacketMetadata::GetUid() const [member function] cls.add_method('GetUid', 'uint64_t', [], is_const=True) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveAtEnd(uint32_t end) [member function] cls.add_method('RemoveAtEnd', 'void', [param('uint32_t', 'end')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveAtStart(uint32_t start) [member function] cls.add_method('RemoveAtStart', 'void', [param('uint32_t', 'start')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveHeader(ns3::Header const & header, uint32_t size) [member function] cls.add_method('RemoveHeader', 'void', [param('ns3::Header const &', 'header'), param('uint32_t', 'size')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveTrailer(ns3::Trailer const & trailer, uint32_t size) [member function] cls.add_method('RemoveTrailer', 'void', [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')]) ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], is_const=True) return def register_Ns3PacketMetadataItem_methods(root_module, cls): ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::Item() [constructor] cls.add_constructor([]) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::Item(ns3::PacketMetadata::Item const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketMetadata::Item const &', 'arg0')]) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::current [variable] cls.add_instance_attribute('current', 'ns3::Buffer::Iterator', is_const=False) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentSize [variable] cls.add_instance_attribute('currentSize', 'uint32_t', is_const=False) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentTrimedFromEnd [variable] cls.add_instance_attribute('currentTrimedFromEnd', 'uint32_t', is_const=False) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentTrimedFromStart [variable] cls.add_instance_attribute('currentTrimedFromStart', 'uint32_t', is_const=False) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::isFragment [variable] cls.add_instance_attribute('isFragment', 'bool', is_const=False) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::tid [variable] cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) return def register_Ns3PacketMetadataItemIterator_methods(root_module, cls): ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata::ItemIterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketMetadata::ItemIterator const &', 'arg0')]) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata const * metadata, ns3::Buffer buffer) [constructor] cls.add_constructor([param('ns3::PacketMetadata const *', 'metadata'), param('ns3::Buffer', 'buffer')]) ## packet-metadata.h (module 'network'): bool ns3::PacketMetadata::ItemIterator::HasNext() const [member function] cls.add_method('HasNext', 'bool', [], is_const=True) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item ns3::PacketMetadata::ItemIterator::Next() [member function] cls.add_method('Next', 'ns3::PacketMetadata::Item', []) return def register_Ns3PacketTagIterator_methods(root_module, cls): ## packet.h (module 'network'): ns3::PacketTagIterator::PacketTagIterator(ns3::PacketTagIterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketTagIterator const &', 'arg0')]) ## packet.h (module 'network'): bool ns3::PacketTagIterator::HasNext() const [member function] cls.add_method('HasNext', 'bool', [], is_const=True) ## packet.h (module 'network'): ns3::PacketTagIterator::Item ns3::PacketTagIterator::Next() [member function] cls.add_method('Next', 'ns3::PacketTagIterator::Item', []) return def register_Ns3PacketTagIteratorItem_methods(root_module, cls): ## packet.h (module 'network'): ns3::PacketTagIterator::Item::Item(ns3::PacketTagIterator::Item const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketTagIterator::Item const &', 'arg0')]) ## packet.h (module 'network'): void ns3::PacketTagIterator::Item::GetTag(ns3::Tag & tag) const [member function] cls.add_method('GetTag', 'void', [param('ns3::Tag &', 'tag')], is_const=True) ## packet.h (module 'network'): ns3::TypeId ns3::PacketTagIterator::Item::GetTypeId() const [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_const=True) return def register_Ns3PacketTagList_methods(root_module, cls): ## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList() [constructor] cls.add_constructor([]) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList(ns3::PacketTagList const & o) [copy constructor] cls.add_constructor([param('ns3::PacketTagList const &', 'o')]) ## packet-tag-list.h (module 'network'): void ns3::PacketTagList::Add(ns3::Tag const & tag) const [member function] cls.add_method('Add', 'void', [param('ns3::Tag const &', 'tag')], is_const=True) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData const * ns3::PacketTagList::Head() const [member function] cls.add_method('Head', 'ns3::PacketTagList::TagData const *', [], is_const=True) ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Peek(ns3::Tag & tag) const [member function] cls.add_method('Peek', 'bool', [param('ns3::Tag &', 'tag')], is_const=True) ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Remove(ns3::Tag & tag) [member function] cls.add_method('Remove', 'bool', [param('ns3::Tag &', 'tag')]) ## packet-tag-list.h (module 'network'): void ns3::PacketTagList::RemoveAll() [member function] cls.add_method('RemoveAll', 'void', []) ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Replace(ns3::Tag & tag) [member function] cls.add_method('Replace', 'bool', [param('ns3::Tag &', 'tag')]) return def register_Ns3PacketTagListTagData_methods(root_module, cls): ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData() [constructor] cls.add_constructor([]) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData(ns3::PacketTagList::TagData const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketTagList::TagData const &', 'arg0')]) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::count [variable] cls.add_instance_attribute('count', 'uint32_t', is_const=False) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::data [variable] cls.add_instance_attribute('data', 'uint8_t [ 21 ]', is_const=False) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::next [variable] cls.add_instance_attribute('next', 'ns3::PacketTagList::TagData *', is_const=False) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::tid [variable] cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) return def register_Ns3ParameterLogger_methods(root_module, cls): ## log.h (module 'core'): ns3::ParameterLogger::ParameterLogger(ns3::ParameterLogger const & arg0) [copy constructor] cls.add_constructor([param('ns3::ParameterLogger const &', 'arg0')]) ## log.h (module 'core'): ns3::ParameterLogger::ParameterLogger(std::ostream & os) [constructor] cls.add_constructor([param('std::ostream &', 'os')]) return def register_Ns3PcapFile_methods(root_module, cls): ## pcap-file.h (module 'network'): ns3::PcapFile::PcapFile() [constructor] cls.add_constructor([]) ## pcap-file.h (module 'network'): void ns3::PcapFile::Clear() [member function] cls.add_method('Clear', 'void', []) ## pcap-file.h (module 'network'): void ns3::PcapFile::Close() [member function] cls.add_method('Close', 'void', []) ## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t & packets, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function] cls.add_method('Diff', 'bool', [param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t &', 'packets'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')], is_static=True) ## pcap-file.h (module 'network'): bool ns3::PcapFile::Eof() const [member function] cls.add_method('Eof', 'bool', [], is_const=True) ## pcap-file.h (module 'network'): bool ns3::PcapFile::Fail() const [member function] cls.add_method('Fail', 'bool', [], is_const=True) ## pcap-file.h (module 'network'): uint32_t ns3::PcapFile::GetDataLinkType() [member function] cls.add_method('GetDataLinkType', 'uint32_t', []) ## pcap-file.h (module 'network'): uint32_t ns3::PcapFile::GetMagic() [member function] cls.add_method('GetMagic', 'uint32_t', []) ## pcap-file.h (module 'network'): uint32_t ns3::PcapFile::GetSigFigs() [member function] cls.add_method('GetSigFigs', 'uint32_t', []) ## pcap-file.h (module 'network'): uint32_t ns3::PcapFile::GetSnapLen() [member function] cls.add_method('GetSnapLen', 'uint32_t', []) ## pcap-file.h (module 'network'): bool ns3::PcapFile::GetSwapMode() [member function] cls.add_method('GetSwapMode', 'bool', []) ## pcap-file.h (module 'network'): int32_t ns3::PcapFile::GetTimeZoneOffset() [member function] cls.add_method('GetTimeZoneOffset', 'int32_t', []) ## pcap-file.h (module 'network'): uint16_t ns3::PcapFile::GetVersionMajor() [member function] cls.add_method('GetVersionMajor', 'uint16_t', []) ## pcap-file.h (module 'network'): uint16_t ns3::PcapFile::GetVersionMinor() [member function] cls.add_method('GetVersionMinor', 'uint16_t', []) ## pcap-file.h (module 'network'): void ns3::PcapFile::Init(uint32_t dataLinkType, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT, int32_t timeZoneCorrection=ns3::PcapFile::ZONE_DEFAULT, bool swapMode=false) [member function] cls.add_method('Init', 'void', [param('uint32_t', 'dataLinkType'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT'), param('int32_t', 'timeZoneCorrection', default_value='ns3::PcapFile::ZONE_DEFAULT'), param('bool', 'swapMode', default_value='false')]) ## pcap-file.h (module 'network'): void ns3::PcapFile::Open(std::string const & filename, std::_Ios_Openmode mode) [member function] cls.add_method('Open', 'void', [param('std::string const &', 'filename'), param('std::_Ios_Openmode', 'mode')]) ## pcap-file.h (module 'network'): void ns3::PcapFile::Read(uint8_t * const data, uint32_t maxBytes, uint32_t & tsSec, uint32_t & tsUsec, uint32_t & inclLen, uint32_t & origLen, uint32_t & readLen) [member function] cls.add_method('Read', 'void', [param('uint8_t * const', 'data'), param('uint32_t', 'maxBytes'), param('uint32_t &', 'tsSec'), param('uint32_t &', 'tsUsec'), param('uint32_t &', 'inclLen'), param('uint32_t &', 'origLen'), param('uint32_t &', 'readLen')]) ## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, uint8_t const * const data, uint32_t totalLen) [member function] cls.add_method('Write', 'void', [param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('uint8_t const * const', 'data'), param('uint32_t', 'totalLen')]) ## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('Write', 'void', [param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Ptr< ns3::Packet const >', 'p')]) ## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Header const & header, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('Write', 'void', [param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Header const &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')]) ## pcap-file.h (module 'network'): ns3::PcapFile::SNAPLEN_DEFAULT [variable] cls.add_static_attribute('SNAPLEN_DEFAULT', 'uint32_t const', is_const=True) ## pcap-file.h (module 'network'): ns3::PcapFile::ZONE_DEFAULT [variable] cls.add_static_attribute('ZONE_DEFAULT', 'int32_t const', is_const=True) return def register_Ns3PcapHelper_methods(root_module, cls): ## trace-helper.h (module 'network'): ns3::PcapHelper::PcapHelper(ns3::PcapHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::PcapHelper const &', 'arg0')]) ## trace-helper.h (module 'network'): ns3::PcapHelper::PcapHelper() [constructor] cls.add_constructor([]) ## trace-helper.h (module 'network'): ns3::Ptr<ns3::PcapFileWrapper> ns3::PcapHelper::CreateFile(std::string filename, std::_Ios_Openmode filemode, uint32_t dataLinkType, uint32_t snapLen=std::numeric_limits<unsigned int>::max(), int32_t tzCorrection=0) [member function] cls.add_method('CreateFile', 'ns3::Ptr< ns3::PcapFileWrapper >', [param('std::string', 'filename'), param('std::_Ios_Openmode', 'filemode'), param('uint32_t', 'dataLinkType'), param('uint32_t', 'snapLen', default_value='std::numeric_limits<unsigned int>::max()'), param('int32_t', 'tzCorrection', default_value='0')]) ## trace-helper.h (module 'network'): std::string ns3::PcapHelper::GetFilenameFromDevice(std::string prefix, ns3::Ptr<ns3::NetDevice> device, bool useObjectNames=true) [member function] cls.add_method('GetFilenameFromDevice', 'std::string', [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('bool', 'useObjectNames', default_value='true')]) ## trace-helper.h (module 'network'): std::string ns3::PcapHelper::GetFilenameFromInterfacePair(std::string prefix, ns3::Ptr<ns3::Object> object, uint32_t interface, bool useObjectNames=true) [member function] cls.add_method('GetFilenameFromInterfacePair', 'std::string', [param('std::string', 'prefix'), param('ns3::Ptr< ns3::Object >', 'object'), param('uint32_t', 'interface'), param('bool', 'useObjectNames', default_value='true')]) return def register_Ns3PcapHelperForDevice_methods(root_module, cls): ## trace-helper.h (module 'network'): ns3::PcapHelperForDevice::PcapHelperForDevice(ns3::PcapHelperForDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::PcapHelperForDevice const &', 'arg0')]) ## trace-helper.h (module 'network'): ns3::PcapHelperForDevice::PcapHelperForDevice() [constructor] cls.add_constructor([]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false, bool explicitFilename=false) [member function] cls.add_method('EnablePcap', 'void', [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false'), param('bool', 'explicitFilename', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, std::string ndName, bool promiscuous=false, bool explicitFilename=false) [member function] cls.add_method('EnablePcap', 'void', [param('std::string', 'prefix'), param('std::string', 'ndName'), param('bool', 'promiscuous', default_value='false'), param('bool', 'explicitFilename', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::NetDeviceContainer d, bool promiscuous=false) [member function] cls.add_method('EnablePcap', 'void', [param('std::string', 'prefix'), param('ns3::NetDeviceContainer', 'd'), param('bool', 'promiscuous', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::NodeContainer n, bool promiscuous=false) [member function] cls.add_method('EnablePcap', 'void', [param('std::string', 'prefix'), param('ns3::NodeContainer', 'n'), param('bool', 'promiscuous', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, uint32_t nodeid, uint32_t deviceid, bool promiscuous=false) [member function] cls.add_method('EnablePcap', 'void', [param('std::string', 'prefix'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid'), param('bool', 'promiscuous', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcapAll(std::string prefix, bool promiscuous=false) [member function] cls.add_method('EnablePcapAll', 'void', [param('std::string', 'prefix'), param('bool', 'promiscuous', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous, bool explicitFilename) [member function] cls.add_method('EnablePcapInternal', 'void', [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous'), param('bool', 'explicitFilename')], is_pure_virtual=True, is_virtual=True) return def register_Ns3SNRToBlockErrorRateManager_methods(root_module, cls): ## snr-to-block-error-rate-manager.h (module 'wimax'): ns3::SNRToBlockErrorRateManager::SNRToBlockErrorRateManager(ns3::SNRToBlockErrorRateManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::SNRToBlockErrorRateManager const &', 'arg0')]) ## snr-to-block-error-rate-manager.h (module 'wimax'): ns3::SNRToBlockErrorRateManager::SNRToBlockErrorRateManager() [constructor] cls.add_constructor([]) ## snr-to-block-error-rate-manager.h (module 'wimax'): void ns3::SNRToBlockErrorRateManager::ActivateLoss(bool loss) [member function] cls.add_method('ActivateLoss', 'void', [param('bool', 'loss')]) ## snr-to-block-error-rate-manager.h (module 'wimax'): double ns3::SNRToBlockErrorRateManager::GetBlockErrorRate(double SNR, uint8_t modulation) [member function] cls.add_method('GetBlockErrorRate', 'double', [param('double', 'SNR'), param('uint8_t', 'modulation')]) ## snr-to-block-error-rate-manager.h (module 'wimax'): ns3::SNRToBlockErrorRateRecord * ns3::SNRToBlockErrorRateManager::GetSNRToBlockErrorRateRecord(double SNR, uint8_t modulation) [member function] cls.add_method('GetSNRToBlockErrorRateRecord', 'ns3::SNRToBlockErrorRateRecord *', [param('double', 'SNR'), param('uint8_t', 'modulation')]) ## snr-to-block-error-rate-manager.h (module 'wimax'): std::string ns3::SNRToBlockErrorRateManager::GetTraceFilePath() [member function] cls.add_method('GetTraceFilePath', 'std::string', []) ## snr-to-block-error-rate-manager.h (module 'wimax'): void ns3::SNRToBlockErrorRateManager::LoadDefaultTraces() [member function] cls.add_method('LoadDefaultTraces', 'void', []) ## snr-to-block-error-rate-manager.h (module 'wimax'): void ns3::SNRToBlockErrorRateManager::LoadTraces() [member function] cls.add_method('LoadTraces', 'void', []) ## snr-to-block-error-rate-manager.h (module 'wimax'): void ns3::SNRToBlockErrorRateManager::ReLoadTraces() [member function] cls.add_method('ReLoadTraces', 'void', []) ## snr-to-block-error-rate-manager.h (module 'wimax'): void ns3::SNRToBlockErrorRateManager::SetTraceFilePath(char * traceFilePath) [member function] cls.add_method('SetTraceFilePath', 'void', [param('char *', 'traceFilePath')]) return def register_Ns3SNRToBlockErrorRateRecord_methods(root_module, cls): ## snr-to-block-error-rate-record.h (module 'wimax'): ns3::SNRToBlockErrorRateRecord::SNRToBlockErrorRateRecord(ns3::SNRToBlockErrorRateRecord const & arg0) [copy constructor] cls.add_constructor([param('ns3::SNRToBlockErrorRateRecord const &', 'arg0')]) ## snr-to-block-error-rate-record.h (module 'wimax'): ns3::SNRToBlockErrorRateRecord::SNRToBlockErrorRateRecord(double snrValue, double bitErrorRate, double BlockErrorRate, double sigma2, double I1, double I2) [constructor] cls.add_constructor([param('double', 'snrValue'), param('double', 'bitErrorRate'), param('double', 'BlockErrorRate'), param('double', 'sigma2'), param('double', 'I1'), param('double', 'I2')]) ## snr-to-block-error-rate-record.h (module 'wimax'): ns3::SNRToBlockErrorRateRecord * ns3::SNRToBlockErrorRateRecord::Copy() [member function] cls.add_method('Copy', 'ns3::SNRToBlockErrorRateRecord *', []) ## snr-to-block-error-rate-record.h (module 'wimax'): double ns3::SNRToBlockErrorRateRecord::GetBitErrorRate() [member function] cls.add_method('GetBitErrorRate', 'double', []) ## snr-to-block-error-rate-record.h (module 'wimax'): double ns3::SNRToBlockErrorRateRecord::GetBlockErrorRate() [member function] cls.add_method('GetBlockErrorRate', 'double', []) ## snr-to-block-error-rate-record.h (module 'wimax'): double ns3::SNRToBlockErrorRateRecord::GetI1() [member function] cls.add_method('GetI1', 'double', []) ## snr-to-block-error-rate-record.h (module 'wimax'): double ns3::SNRToBlockErrorRateRecord::GetI2() [member function] cls.add_method('GetI2', 'double', []) ## snr-to-block-error-rate-record.h (module 'wimax'): double ns3::SNRToBlockErrorRateRecord::GetSNRValue() [member function] cls.add_method('GetSNRValue', 'double', []) ## snr-to-block-error-rate-record.h (module 'wimax'): double ns3::SNRToBlockErrorRateRecord::GetSigma2() [member function] cls.add_method('GetSigma2', 'double', []) ## snr-to-block-error-rate-record.h (module 'wimax'): void ns3::SNRToBlockErrorRateRecord::SetBitErrorRate(double arg0) [member function] cls.add_method('SetBitErrorRate', 'void', [param('double', 'arg0')]) ## snr-to-block-error-rate-record.h (module 'wimax'): void ns3::SNRToBlockErrorRateRecord::SetBlockErrorRate(double arg0) [member function] cls.add_method('SetBlockErrorRate', 'void', [param('double', 'arg0')]) ## snr-to-block-error-rate-record.h (module 'wimax'): void ns3::SNRToBlockErrorRateRecord::SetI1(double arg0) [member function] cls.add_method('SetI1', 'void', [param('double', 'arg0')]) ## snr-to-block-error-rate-record.h (module 'wimax'): void ns3::SNRToBlockErrorRateRecord::SetI2(double arg0) [member function] cls.add_method('SetI2', 'void', [param('double', 'arg0')]) ## snr-to-block-error-rate-record.h (module 'wimax'): void ns3::SNRToBlockErrorRateRecord::SetSNRValue(double arg0) [member function] cls.add_method('SetSNRValue', 'void', [param('double', 'arg0')]) return def register_Ns3SSRecord_methods(root_module, cls): ## ss-record.h (module 'wimax'): ns3::SSRecord::SSRecord(ns3::SSRecord const & arg0) [copy constructor] cls.add_constructor([param('ns3::SSRecord const &', 'arg0')]) ## ss-record.h (module 'wimax'): ns3::SSRecord::SSRecord() [constructor] cls.add_constructor([]) ## ss-record.h (module 'wimax'): ns3::SSRecord::SSRecord(ns3::Mac48Address macAddress) [constructor] cls.add_constructor([param('ns3::Mac48Address', 'macAddress')]) ## ss-record.h (module 'wimax'): ns3::SSRecord::SSRecord(ns3::Mac48Address macAddress, ns3::Ipv4Address IPaddress) [constructor] cls.add_constructor([param('ns3::Mac48Address', 'macAddress'), param('ns3::Ipv4Address', 'IPaddress')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::AddServiceFlow(ns3::ServiceFlow * serviceFlow) [member function] cls.add_method('AddServiceFlow', 'void', [param('ns3::ServiceFlow *', 'serviceFlow')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::DisablePollForRanging() [member function] cls.add_method('DisablePollForRanging', 'void', []) ## ss-record.h (module 'wimax'): void ns3::SSRecord::EnablePollForRanging() [member function] cls.add_method('EnablePollForRanging', 'void', []) ## ss-record.h (module 'wimax'): bool ns3::SSRecord::GetAreServiceFlowsAllocated() const [member function] cls.add_method('GetAreServiceFlowsAllocated', 'bool', [], is_const=True) ## ss-record.h (module 'wimax'): ns3::Cid ns3::SSRecord::GetBasicCid() const [member function] cls.add_method('GetBasicCid', 'ns3::Cid', [], is_const=True) ## ss-record.h (module 'wimax'): ns3::DsaRsp ns3::SSRecord::GetDsaRsp() const [member function] cls.add_method('GetDsaRsp', 'ns3::DsaRsp', [], is_const=True) ## ss-record.h (module 'wimax'): uint8_t ns3::SSRecord::GetDsaRspRetries() const [member function] cls.add_method('GetDsaRspRetries', 'uint8_t', [], is_const=True) ## ss-record.h (module 'wimax'): bool ns3::SSRecord::GetHasServiceFlowBe() const [member function] cls.add_method('GetHasServiceFlowBe', 'bool', [], is_const=True) ## ss-record.h (module 'wimax'): bool ns3::SSRecord::GetHasServiceFlowNrtps() const [member function] cls.add_method('GetHasServiceFlowNrtps', 'bool', [], is_const=True) ## ss-record.h (module 'wimax'): bool ns3::SSRecord::GetHasServiceFlowRtps() const [member function] cls.add_method('GetHasServiceFlowRtps', 'bool', [], is_const=True) ## ss-record.h (module 'wimax'): bool ns3::SSRecord::GetHasServiceFlowUgs() const [member function] cls.add_method('GetHasServiceFlowUgs', 'bool', [], is_const=True) ## ss-record.h (module 'wimax'): ns3::Ipv4Address ns3::SSRecord::GetIPAddress() [member function] cls.add_method('GetIPAddress', 'ns3::Ipv4Address', []) ## ss-record.h (module 'wimax'): uint8_t ns3::SSRecord::GetInvitedRangRetries() const [member function] cls.add_method('GetInvitedRangRetries', 'uint8_t', [], is_const=True) ## ss-record.h (module 'wimax'): bool ns3::SSRecord::GetIsBroadcastSS() [member function] cls.add_method('GetIsBroadcastSS', 'bool', []) ## ss-record.h (module 'wimax'): ns3::Mac48Address ns3::SSRecord::GetMacAddress() const [member function] cls.add_method('GetMacAddress', 'ns3::Mac48Address', [], is_const=True) ## ss-record.h (module 'wimax'): ns3::WimaxPhy::ModulationType ns3::SSRecord::GetModulationType() const [member function] cls.add_method('GetModulationType', 'ns3::WimaxPhy::ModulationType', [], is_const=True) ## ss-record.h (module 'wimax'): bool ns3::SSRecord::GetPollForRanging() const [member function] cls.add_method('GetPollForRanging', 'bool', [], is_const=True) ## ss-record.h (module 'wimax'): bool ns3::SSRecord::GetPollMeBit() const [member function] cls.add_method('GetPollMeBit', 'bool', [], is_const=True) ## ss-record.h (module 'wimax'): ns3::Cid ns3::SSRecord::GetPrimaryCid() const [member function] cls.add_method('GetPrimaryCid', 'ns3::Cid', [], is_const=True) ## ss-record.h (module 'wimax'): uint8_t ns3::SSRecord::GetRangingCorrectionRetries() const [member function] cls.add_method('GetRangingCorrectionRetries', 'uint8_t', [], is_const=True) ## ss-record.h (module 'wimax'): ns3::WimaxNetDevice::RangingStatus ns3::SSRecord::GetRangingStatus() const [member function] cls.add_method('GetRangingStatus', 'ns3::WimaxNetDevice::RangingStatus', [], is_const=True) ## ss-record.h (module 'wimax'): std::vector<ns3::ServiceFlow*,std::allocator<ns3::ServiceFlow*> > ns3::SSRecord::GetServiceFlows(ns3::ServiceFlow::SchedulingType schedulingType) const [member function] cls.add_method('GetServiceFlows', 'std::vector< ns3::ServiceFlow * >', [param('ns3::ServiceFlow::SchedulingType', 'schedulingType')], is_const=True) ## ss-record.h (module 'wimax'): uint16_t ns3::SSRecord::GetSfTransactionId() const [member function] cls.add_method('GetSfTransactionId', 'uint16_t', [], is_const=True) ## ss-record.h (module 'wimax'): void ns3::SSRecord::IncrementDsaRspRetries() [member function] cls.add_method('IncrementDsaRspRetries', 'void', []) ## ss-record.h (module 'wimax'): void ns3::SSRecord::IncrementInvitedRangingRetries() [member function] cls.add_method('IncrementInvitedRangingRetries', 'void', []) ## ss-record.h (module 'wimax'): void ns3::SSRecord::IncrementRangingCorrectionRetries() [member function] cls.add_method('IncrementRangingCorrectionRetries', 'void', []) ## ss-record.h (module 'wimax'): void ns3::SSRecord::ResetInvitedRangingRetries() [member function] cls.add_method('ResetInvitedRangingRetries', 'void', []) ## ss-record.h (module 'wimax'): void ns3::SSRecord::ResetRangingCorrectionRetries() [member function] cls.add_method('ResetRangingCorrectionRetries', 'void', []) ## ss-record.h (module 'wimax'): void ns3::SSRecord::SetAreServiceFlowsAllocated(bool val) [member function] cls.add_method('SetAreServiceFlowsAllocated', 'void', [param('bool', 'val')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::SetBasicCid(ns3::Cid basicCid) [member function] cls.add_method('SetBasicCid', 'void', [param('ns3::Cid', 'basicCid')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::SetDsaRsp(ns3::DsaRsp dsaRsp) [member function] cls.add_method('SetDsaRsp', 'void', [param('ns3::DsaRsp', 'dsaRsp')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::SetDsaRspRetries(uint8_t dsaRspRetries) [member function] cls.add_method('SetDsaRspRetries', 'void', [param('uint8_t', 'dsaRspRetries')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::SetIPAddress(ns3::Ipv4Address IPaddress) [member function] cls.add_method('SetIPAddress', 'void', [param('ns3::Ipv4Address', 'IPaddress')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::SetIsBroadcastSS(bool arg0) [member function] cls.add_method('SetIsBroadcastSS', 'void', [param('bool', 'arg0')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::SetMacAddress(ns3::Mac48Address macAddress) [member function] cls.add_method('SetMacAddress', 'void', [param('ns3::Mac48Address', 'macAddress')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::SetModulationType(ns3::WimaxPhy::ModulationType modulationType) [member function] cls.add_method('SetModulationType', 'void', [param('ns3::WimaxPhy::ModulationType', 'modulationType')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::SetPollMeBit(bool pollMeBit) [member function] cls.add_method('SetPollMeBit', 'void', [param('bool', 'pollMeBit')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::SetPrimaryCid(ns3::Cid primaryCid) [member function] cls.add_method('SetPrimaryCid', 'void', [param('ns3::Cid', 'primaryCid')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::SetRangingStatus(ns3::WimaxNetDevice::RangingStatus rangingStatus) [member function] cls.add_method('SetRangingStatus', 'void', [param('ns3::WimaxNetDevice::RangingStatus', 'rangingStatus')]) ## ss-record.h (module 'wimax'): void ns3::SSRecord::SetSfTransactionId(uint16_t sfTransactionId) [member function] cls.add_method('SetSfTransactionId', 'void', [param('uint16_t', 'sfTransactionId')]) return def register_Ns3SendParams_methods(root_module, cls): ## send-params.h (module 'wimax'): ns3::SendParams::SendParams(ns3::SendParams const & arg0) [copy constructor] cls.add_constructor([param('ns3::SendParams const &', 'arg0')]) ## send-params.h (module 'wimax'): ns3::SendParams::SendParams() [constructor] cls.add_constructor([]) return def register_Ns3ServiceFlow_methods(root_module, cls): ## service-flow.h (module 'wimax'): ns3::ServiceFlow::ServiceFlow(ns3::Tlv tlv) [constructor] cls.add_constructor([param('ns3::Tlv', 'tlv')]) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::ServiceFlow(ns3::ServiceFlow::Direction direction) [constructor] cls.add_constructor([param('ns3::ServiceFlow::Direction', 'direction')]) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::ServiceFlow() [constructor] cls.add_constructor([]) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::ServiceFlow(ns3::ServiceFlow const & sf) [copy constructor] cls.add_constructor([param('ns3::ServiceFlow const &', 'sf')]) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::ServiceFlow(uint32_t sfid, ns3::ServiceFlow::Direction direction, ns3::Ptr<ns3::WimaxConnection> connection) [constructor] cls.add_constructor([param('uint32_t', 'sfid'), param('ns3::ServiceFlow::Direction', 'direction'), param('ns3::Ptr< ns3::WimaxConnection >', 'connection')]) ## service-flow.h (module 'wimax'): bool ns3::ServiceFlow::CheckClassifierMatch(ns3::Ipv4Address srcAddress, ns3::Ipv4Address dstAddress, uint16_t srcPort, uint16_t dstPort, uint8_t proto) const [member function] cls.add_method('CheckClassifierMatch', 'bool', [param('ns3::Ipv4Address', 'srcAddress'), param('ns3::Ipv4Address', 'dstAddress'), param('uint16_t', 'srcPort'), param('uint16_t', 'dstPort'), param('uint8_t', 'proto')], is_const=True) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::CleanUpQueue() [member function] cls.add_method('CleanUpQueue', 'void', []) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::CopyParametersFrom(ns3::ServiceFlow sf) [member function] cls.add_method('CopyParametersFrom', 'void', [param('ns3::ServiceFlow', 'sf')]) ## service-flow.h (module 'wimax'): uint16_t ns3::ServiceFlow::GetArqBlockLifeTime() const [member function] cls.add_method('GetArqBlockLifeTime', 'uint16_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint16_t ns3::ServiceFlow::GetArqBlockSize() const [member function] cls.add_method('GetArqBlockSize', 'uint16_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint8_t ns3::ServiceFlow::GetArqDeliverInOrder() const [member function] cls.add_method('GetArqDeliverInOrder', 'uint8_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint8_t ns3::ServiceFlow::GetArqEnable() const [member function] cls.add_method('GetArqEnable', 'uint8_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint16_t ns3::ServiceFlow::GetArqPurgeTimeout() const [member function] cls.add_method('GetArqPurgeTimeout', 'uint16_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint16_t ns3::ServiceFlow::GetArqRetryTimeoutRx() const [member function] cls.add_method('GetArqRetryTimeoutRx', 'uint16_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint16_t ns3::ServiceFlow::GetArqRetryTimeoutTx() const [member function] cls.add_method('GetArqRetryTimeoutTx', 'uint16_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint16_t ns3::ServiceFlow::GetArqSyncLoss() const [member function] cls.add_method('GetArqSyncLoss', 'uint16_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint16_t ns3::ServiceFlow::GetArqWindowSize() const [member function] cls.add_method('GetArqWindowSize', 'uint16_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint16_t ns3::ServiceFlow::GetCid() const [member function] cls.add_method('GetCid', 'uint16_t', [], is_const=True) ## service-flow.h (module 'wimax'): ns3::Ptr<ns3::WimaxConnection> ns3::ServiceFlow::GetConnection() const [member function] cls.add_method('GetConnection', 'ns3::Ptr< ns3::WimaxConnection >', [], is_const=True) ## service-flow.h (module 'wimax'): ns3::CsParameters ns3::ServiceFlow::GetConvergenceSublayerParam() const [member function] cls.add_method('GetConvergenceSublayerParam', 'ns3::CsParameters', [], is_const=True) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::CsSpecification ns3::ServiceFlow::GetCsSpecification() const [member function] cls.add_method('GetCsSpecification', 'ns3::ServiceFlow::CsSpecification', [], is_const=True) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::Direction ns3::ServiceFlow::GetDirection() const [member function] cls.add_method('GetDirection', 'ns3::ServiceFlow::Direction', [], is_const=True) ## service-flow.h (module 'wimax'): uint8_t ns3::ServiceFlow::GetFixedversusVariableSduIndicator() const [member function] cls.add_method('GetFixedversusVariableSduIndicator', 'uint8_t', [], is_const=True) ## service-flow.h (module 'wimax'): bool ns3::ServiceFlow::GetIsEnabled() const [member function] cls.add_method('GetIsEnabled', 'bool', [], is_const=True) ## service-flow.h (module 'wimax'): bool ns3::ServiceFlow::GetIsMulticast() const [member function] cls.add_method('GetIsMulticast', 'bool', [], is_const=True) ## service-flow.h (module 'wimax'): uint32_t ns3::ServiceFlow::GetMaxSustainedTrafficRate() const [member function] cls.add_method('GetMaxSustainedTrafficRate', 'uint32_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint32_t ns3::ServiceFlow::GetMaxTrafficBurst() const [member function] cls.add_method('GetMaxTrafficBurst', 'uint32_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint32_t ns3::ServiceFlow::GetMaximumLatency() const [member function] cls.add_method('GetMaximumLatency', 'uint32_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint32_t ns3::ServiceFlow::GetMinReservedTrafficRate() const [member function] cls.add_method('GetMinReservedTrafficRate', 'uint32_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint32_t ns3::ServiceFlow::GetMinTolerableTrafficRate() const [member function] cls.add_method('GetMinTolerableTrafficRate', 'uint32_t', [], is_const=True) ## service-flow.h (module 'wimax'): ns3::WimaxPhy::ModulationType ns3::ServiceFlow::GetModulation() const [member function] cls.add_method('GetModulation', 'ns3::WimaxPhy::ModulationType', [], is_const=True) ## service-flow.h (module 'wimax'): uint8_t ns3::ServiceFlow::GetQosParamSetType() const [member function] cls.add_method('GetQosParamSetType', 'uint8_t', [], is_const=True) ## service-flow.h (module 'wimax'): ns3::Ptr<ns3::WimaxMacQueue> ns3::ServiceFlow::GetQueue() const [member function] cls.add_method('GetQueue', 'ns3::Ptr< ns3::WimaxMacQueue >', [], is_const=True) ## service-flow.h (module 'wimax'): ns3::ServiceFlowRecord * ns3::ServiceFlow::GetRecord() const [member function] cls.add_method('GetRecord', 'ns3::ServiceFlowRecord *', [], is_const=True) ## service-flow.h (module 'wimax'): uint32_t ns3::ServiceFlow::GetRequestTransmissionPolicy() const [member function] cls.add_method('GetRequestTransmissionPolicy', 'uint32_t', [], is_const=True) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::SchedulingType ns3::ServiceFlow::GetSchedulingType() const [member function] cls.add_method('GetSchedulingType', 'ns3::ServiceFlow::SchedulingType', [], is_const=True) ## service-flow.h (module 'wimax'): char * ns3::ServiceFlow::GetSchedulingTypeStr() const [member function] cls.add_method('GetSchedulingTypeStr', 'char *', [], is_const=True) ## service-flow.h (module 'wimax'): uint8_t ns3::ServiceFlow::GetSduSize() const [member function] cls.add_method('GetSduSize', 'uint8_t', [], is_const=True) ## service-flow.h (module 'wimax'): std::string ns3::ServiceFlow::GetServiceClassName() const [member function] cls.add_method('GetServiceClassName', 'std::string', [], is_const=True) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::SchedulingType ns3::ServiceFlow::GetServiceSchedulingType() const [member function] cls.add_method('GetServiceSchedulingType', 'ns3::ServiceFlow::SchedulingType', [], is_const=True) ## service-flow.h (module 'wimax'): uint32_t ns3::ServiceFlow::GetSfid() const [member function] cls.add_method('GetSfid', 'uint32_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint16_t ns3::ServiceFlow::GetTargetSAID() const [member function] cls.add_method('GetTargetSAID', 'uint16_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint32_t ns3::ServiceFlow::GetToleratedJitter() const [member function] cls.add_method('GetToleratedJitter', 'uint32_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint8_t ns3::ServiceFlow::GetTrafficPriority() const [member function] cls.add_method('GetTrafficPriority', 'uint8_t', [], is_const=True) ## service-flow.h (module 'wimax'): ns3::ServiceFlow::Type ns3::ServiceFlow::GetType() const [member function] cls.add_method('GetType', 'ns3::ServiceFlow::Type', [], is_const=True) ## service-flow.h (module 'wimax'): uint16_t ns3::ServiceFlow::GetUnsolicitedGrantInterval() const [member function] cls.add_method('GetUnsolicitedGrantInterval', 'uint16_t', [], is_const=True) ## service-flow.h (module 'wimax'): uint16_t ns3::ServiceFlow::GetUnsolicitedPollingInterval() const [member function] cls.add_method('GetUnsolicitedPollingInterval', 'uint16_t', [], is_const=True) ## service-flow.h (module 'wimax'): bool ns3::ServiceFlow::HasPackets() const [member function] cls.add_method('HasPackets', 'bool', [], is_const=True) ## service-flow.h (module 'wimax'): bool ns3::ServiceFlow::HasPackets(ns3::MacHeaderType::HeaderType packetType) const [member function] cls.add_method('HasPackets', 'bool', [param('ns3::MacHeaderType::HeaderType', 'packetType')], is_const=True) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::InitValues() [member function] cls.add_method('InitValues', 'void', []) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::PrintQoSParameters() const [member function] cls.add_method('PrintQoSParameters', 'void', [], is_const=True) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetArqBlockLifeTime(uint16_t arg0) [member function] cls.add_method('SetArqBlockLifeTime', 'void', [param('uint16_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetArqBlockSize(uint16_t arg0) [member function] cls.add_method('SetArqBlockSize', 'void', [param('uint16_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetArqDeliverInOrder(uint8_t arg0) [member function] cls.add_method('SetArqDeliverInOrder', 'void', [param('uint8_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetArqEnable(uint8_t arg0) [member function] cls.add_method('SetArqEnable', 'void', [param('uint8_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetArqPurgeTimeout(uint16_t arg0) [member function] cls.add_method('SetArqPurgeTimeout', 'void', [param('uint16_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetArqRetryTimeoutRx(uint16_t arg0) [member function] cls.add_method('SetArqRetryTimeoutRx', 'void', [param('uint16_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetArqRetryTimeoutTx(uint16_t arg0) [member function] cls.add_method('SetArqRetryTimeoutTx', 'void', [param('uint16_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetArqSyncLoss(uint16_t arg0) [member function] cls.add_method('SetArqSyncLoss', 'void', [param('uint16_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetArqWindowSize(uint16_t arg0) [member function] cls.add_method('SetArqWindowSize', 'void', [param('uint16_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetConnection(ns3::Ptr<ns3::WimaxConnection> connection) [member function] cls.add_method('SetConnection', 'void', [param('ns3::Ptr< ns3::WimaxConnection >', 'connection')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetConvergenceSublayerParam(ns3::CsParameters arg0) [member function] cls.add_method('SetConvergenceSublayerParam', 'void', [param('ns3::CsParameters', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetCsSpecification(ns3::ServiceFlow::CsSpecification arg0) [member function] cls.add_method('SetCsSpecification', 'void', [param('ns3::ServiceFlow::CsSpecification', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetDirection(ns3::ServiceFlow::Direction direction) [member function] cls.add_method('SetDirection', 'void', [param('ns3::ServiceFlow::Direction', 'direction')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetFixedversusVariableSduIndicator(uint8_t arg0) [member function] cls.add_method('SetFixedversusVariableSduIndicator', 'void', [param('uint8_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetIsEnabled(bool isEnabled) [member function] cls.add_method('SetIsEnabled', 'void', [param('bool', 'isEnabled')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetIsMulticast(bool isMulticast) [member function] cls.add_method('SetIsMulticast', 'void', [param('bool', 'isMulticast')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetMaxSustainedTrafficRate(uint32_t arg0) [member function] cls.add_method('SetMaxSustainedTrafficRate', 'void', [param('uint32_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetMaxTrafficBurst(uint32_t arg0) [member function] cls.add_method('SetMaxTrafficBurst', 'void', [param('uint32_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetMaximumLatency(uint32_t arg0) [member function] cls.add_method('SetMaximumLatency', 'void', [param('uint32_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetMinReservedTrafficRate(uint32_t arg0) [member function] cls.add_method('SetMinReservedTrafficRate', 'void', [param('uint32_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetMinTolerableTrafficRate(uint32_t arg0) [member function] cls.add_method('SetMinTolerableTrafficRate', 'void', [param('uint32_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetModulation(ns3::WimaxPhy::ModulationType modulationType) [member function] cls.add_method('SetModulation', 'void', [param('ns3::WimaxPhy::ModulationType', 'modulationType')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetQosParamSetType(uint8_t arg0) [member function] cls.add_method('SetQosParamSetType', 'void', [param('uint8_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetRecord(ns3::ServiceFlowRecord * record) [member function] cls.add_method('SetRecord', 'void', [param('ns3::ServiceFlowRecord *', 'record')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetRequestTransmissionPolicy(uint32_t arg0) [member function] cls.add_method('SetRequestTransmissionPolicy', 'void', [param('uint32_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetSduSize(uint8_t arg0) [member function] cls.add_method('SetSduSize', 'void', [param('uint8_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetServiceClassName(std::string arg0) [member function] cls.add_method('SetServiceClassName', 'void', [param('std::string', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetServiceSchedulingType(ns3::ServiceFlow::SchedulingType arg0) [member function] cls.add_method('SetServiceSchedulingType', 'void', [param('ns3::ServiceFlow::SchedulingType', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetSfid(uint32_t arg0) [member function] cls.add_method('SetSfid', 'void', [param('uint32_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetTargetSAID(uint16_t arg0) [member function] cls.add_method('SetTargetSAID', 'void', [param('uint16_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetToleratedJitter(uint32_t arg0) [member function] cls.add_method('SetToleratedJitter', 'void', [param('uint32_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetTrafficPriority(uint8_t arg0) [member function] cls.add_method('SetTrafficPriority', 'void', [param('uint8_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetType(ns3::ServiceFlow::Type type) [member function] cls.add_method('SetType', 'void', [param('ns3::ServiceFlow::Type', 'type')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetUnsolicitedGrantInterval(uint16_t arg0) [member function] cls.add_method('SetUnsolicitedGrantInterval', 'void', [param('uint16_t', 'arg0')]) ## service-flow.h (module 'wimax'): void ns3::ServiceFlow::SetUnsolicitedPollingInterval(uint16_t arg0) [member function] cls.add_method('SetUnsolicitedPollingInterval', 'void', [param('uint16_t', 'arg0')]) ## service-flow.h (module 'wimax'): ns3::Tlv ns3::ServiceFlow::ToTlv() const [member function] cls.add_method('ToTlv', 'ns3::Tlv', [], is_const=True) return def register_Ns3ServiceFlowRecord_methods(root_module, cls): ## service-flow-record.h (module 'wimax'): ns3::ServiceFlowRecord::ServiceFlowRecord(ns3::ServiceFlowRecord const & arg0) [copy constructor] cls.add_constructor([param('ns3::ServiceFlowRecord const &', 'arg0')]) ## service-flow-record.h (module 'wimax'): ns3::ServiceFlowRecord::ServiceFlowRecord() [constructor] cls.add_constructor([]) ## service-flow-record.h (module 'wimax'): uint32_t ns3::ServiceFlowRecord::GetBacklogged() const [member function] cls.add_method('GetBacklogged', 'uint32_t', [], is_const=True) ## service-flow-record.h (module 'wimax'): uint32_t ns3::ServiceFlowRecord::GetBackloggedTemp() const [member function] cls.add_method('GetBackloggedTemp', 'uint32_t', [], is_const=True) ## service-flow-record.h (module 'wimax'): uint32_t ns3::ServiceFlowRecord::GetBwSinceLastExpiry() [member function] cls.add_method('GetBwSinceLastExpiry', 'uint32_t', []) ## service-flow-record.h (module 'wimax'): uint32_t ns3::ServiceFlowRecord::GetBytesRcvd() const [member function] cls.add_method('GetBytesRcvd', 'uint32_t', [], is_const=True) ## service-flow-record.h (module 'wimax'): uint32_t ns3::ServiceFlowRecord::GetBytesSent() const [member function] cls.add_method('GetBytesSent', 'uint32_t', [], is_const=True) ## service-flow-record.h (module 'wimax'): ns3::Time ns3::ServiceFlowRecord::GetDlTimeStamp() const [member function] cls.add_method('GetDlTimeStamp', 'ns3::Time', [], is_const=True) ## service-flow-record.h (module 'wimax'): uint32_t ns3::ServiceFlowRecord::GetGrantSize() const [member function] cls.add_method('GetGrantSize', 'uint32_t', [], is_const=True) ## service-flow-record.h (module 'wimax'): ns3::Time ns3::ServiceFlowRecord::GetGrantTimeStamp() const [member function] cls.add_method('GetGrantTimeStamp', 'ns3::Time', [], is_const=True) ## service-flow-record.h (module 'wimax'): uint32_t ns3::ServiceFlowRecord::GetGrantedBandwidth() [member function] cls.add_method('GetGrantedBandwidth', 'uint32_t', []) ## service-flow-record.h (module 'wimax'): uint32_t ns3::ServiceFlowRecord::GetGrantedBandwidthTemp() [member function] cls.add_method('GetGrantedBandwidthTemp', 'uint32_t', []) ## service-flow-record.h (module 'wimax'): ns3::Time ns3::ServiceFlowRecord::GetLastGrantTime() const [member function] cls.add_method('GetLastGrantTime', 'ns3::Time', [], is_const=True) ## service-flow-record.h (module 'wimax'): uint32_t ns3::ServiceFlowRecord::GetPktsRcvd() const [member function] cls.add_method('GetPktsRcvd', 'uint32_t', [], is_const=True) ## service-flow-record.h (module 'wimax'): uint32_t ns3::ServiceFlowRecord::GetPktsSent() const [member function] cls.add_method('GetPktsSent', 'uint32_t', [], is_const=True) ## service-flow-record.h (module 'wimax'): uint32_t ns3::ServiceFlowRecord::GetRequestedBandwidth() [member function] cls.add_method('GetRequestedBandwidth', 'uint32_t', []) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::IncreaseBacklogged(uint32_t backlogged) [member function] cls.add_method('IncreaseBacklogged', 'void', [param('uint32_t', 'backlogged')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::IncreaseBackloggedTemp(uint32_t backloggedTemp) [member function] cls.add_method('IncreaseBackloggedTemp', 'void', [param('uint32_t', 'backloggedTemp')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetBacklogged(uint32_t backlogged) [member function] cls.add_method('SetBacklogged', 'void', [param('uint32_t', 'backlogged')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetBackloggedTemp(uint32_t backloggedTemp) [member function] cls.add_method('SetBackloggedTemp', 'void', [param('uint32_t', 'backloggedTemp')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetBwSinceLastExpiry(uint32_t bwSinceLastExpiry) [member function] cls.add_method('SetBwSinceLastExpiry', 'void', [param('uint32_t', 'bwSinceLastExpiry')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetBytesRcvd(uint32_t bytesRcvd) [member function] cls.add_method('SetBytesRcvd', 'void', [param('uint32_t', 'bytesRcvd')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetBytesSent(uint32_t bytesSent) [member function] cls.add_method('SetBytesSent', 'void', [param('uint32_t', 'bytesSent')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetDlTimeStamp(ns3::Time dlTimeStamp) [member function] cls.add_method('SetDlTimeStamp', 'void', [param('ns3::Time', 'dlTimeStamp')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetGrantSize(uint32_t grantSize) [member function] cls.add_method('SetGrantSize', 'void', [param('uint32_t', 'grantSize')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetGrantTimeStamp(ns3::Time grantTimeStamp) [member function] cls.add_method('SetGrantTimeStamp', 'void', [param('ns3::Time', 'grantTimeStamp')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetGrantedBandwidth(uint32_t grantedBandwidth) [member function] cls.add_method('SetGrantedBandwidth', 'void', [param('uint32_t', 'grantedBandwidth')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetGrantedBandwidthTemp(uint32_t grantedBandwidthTemp) [member function] cls.add_method('SetGrantedBandwidthTemp', 'void', [param('uint32_t', 'grantedBandwidthTemp')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetLastGrantTime(ns3::Time grantTime) [member function] cls.add_method('SetLastGrantTime', 'void', [param('ns3::Time', 'grantTime')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetPktsRcvd(uint32_t pktsRcvd) [member function] cls.add_method('SetPktsRcvd', 'void', [param('uint32_t', 'pktsRcvd')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetPktsSent(uint32_t pktsSent) [member function] cls.add_method('SetPktsSent', 'void', [param('uint32_t', 'pktsSent')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::SetRequestedBandwidth(uint32_t requestedBandwidth) [member function] cls.add_method('SetRequestedBandwidth', 'void', [param('uint32_t', 'requestedBandwidth')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::UpdateBwSinceLastExpiry(uint32_t bwSinceLastExpiry) [member function] cls.add_method('UpdateBwSinceLastExpiry', 'void', [param('uint32_t', 'bwSinceLastExpiry')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::UpdateBytesRcvd(uint32_t bytesRcvd) [member function] cls.add_method('UpdateBytesRcvd', 'void', [param('uint32_t', 'bytesRcvd')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::UpdateBytesSent(uint32_t bytesSent) [member function] cls.add_method('UpdateBytesSent', 'void', [param('uint32_t', 'bytesSent')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::UpdateGrantedBandwidth(uint32_t grantedBandwidth) [member function] cls.add_method('UpdateGrantedBandwidth', 'void', [param('uint32_t', 'grantedBandwidth')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::UpdateGrantedBandwidthTemp(uint32_t grantedBandwidthTemp) [member function] cls.add_method('UpdateGrantedBandwidthTemp', 'void', [param('uint32_t', 'grantedBandwidthTemp')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::UpdatePktsRcvd(uint32_t pktsRcvd) [member function] cls.add_method('UpdatePktsRcvd', 'void', [param('uint32_t', 'pktsRcvd')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::UpdatePktsSent(uint32_t pktsSent) [member function] cls.add_method('UpdatePktsSent', 'void', [param('uint32_t', 'pktsSent')]) ## service-flow-record.h (module 'wimax'): void ns3::ServiceFlowRecord::UpdateRequestedBandwidth(uint32_t requestedBandwidth) [member function] cls.add_method('UpdateRequestedBandwidth', 'void', [param('uint32_t', 'requestedBandwidth')]) return def register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::SimpleRefCount(ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3Simulator_methods(root_module, cls): ## simulator.h (module 'core'): ns3::Simulator::Simulator(ns3::Simulator const & arg0) [copy constructor] cls.add_constructor([param('ns3::Simulator const &', 'arg0')]) ## simulator.h (module 'core'): static void ns3::Simulator::Cancel(ns3::EventId const & id) [member function] cls.add_method('Cancel', 'void', [param('ns3::EventId const &', 'id')], is_static=True) ## simulator.h (module 'core'): static void ns3::Simulator::Destroy() [member function] cls.add_method('Destroy', 'void', [], is_static=True) ## simulator.h (module 'core'): static uint32_t ns3::Simulator::GetContext() [member function] cls.add_method('GetContext', 'uint32_t', [], is_static=True) ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::GetDelayLeft(ns3::EventId const & id) [member function] cls.add_method('GetDelayLeft', 'ns3::Time', [param('ns3::EventId const &', 'id')], is_static=True) ## simulator.h (module 'core'): static ns3::Ptr<ns3::SimulatorImpl> ns3::Simulator::GetImplementation() [member function] cls.add_method('GetImplementation', 'ns3::Ptr< ns3::SimulatorImpl >', [], is_static=True) ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::GetMaximumSimulationTime() [member function] cls.add_method('GetMaximumSimulationTime', 'ns3::Time', [], is_static=True) ## simulator.h (module 'core'): static uint32_t ns3::Simulator::GetSystemId() [member function] cls.add_method('GetSystemId', 'uint32_t', [], is_static=True) ## simulator.h (module 'core'): static bool ns3::Simulator::IsExpired(ns3::EventId const & id) [member function] cls.add_method('IsExpired', 'bool', [param('ns3::EventId const &', 'id')], is_static=True) ## simulator.h (module 'core'): static bool ns3::Simulator::IsFinished() [member function] cls.add_method('IsFinished', 'bool', [], is_static=True) ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::Now() [member function] cls.add_method('Now', 'ns3::Time', [], is_static=True) ## simulator.h (module 'core'): static void ns3::Simulator::Remove(ns3::EventId const & id) [member function] cls.add_method('Remove', 'void', [param('ns3::EventId const &', 'id')], is_static=True) ## simulator.h (module 'core'): static void ns3::Simulator::SetImplementation(ns3::Ptr<ns3::SimulatorImpl> impl) [member function] cls.add_method('SetImplementation', 'void', [param('ns3::Ptr< ns3::SimulatorImpl >', 'impl')], is_static=True) ## simulator.h (module 'core'): static void ns3::Simulator::SetScheduler(ns3::ObjectFactory schedulerFactory) [member function] cls.add_method('SetScheduler', 'void', [param('ns3::ObjectFactory', 'schedulerFactory')], is_static=True) ## simulator.h (module 'core'): static void ns3::Simulator::Stop() [member function] cls.add_method('Stop', 'void', [], is_static=True) ## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & delay) [member function] cls.add_method('Stop', 'void', [param('ns3::Time const &', 'delay')], is_static=True) return def register_Ns3Tag_methods(root_module, cls): ## tag.h (module 'network'): ns3::Tag::Tag() [constructor] cls.add_constructor([]) ## tag.h (module 'network'): ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor] cls.add_constructor([param('ns3::Tag const &', 'arg0')]) ## tag.h (module 'network'): void ns3::Tag::Deserialize(ns3::TagBuffer i) [member function] cls.add_method('Deserialize', 'void', [param('ns3::TagBuffer', 'i')], is_pure_virtual=True, is_virtual=True) ## tag.h (module 'network'): uint32_t ns3::Tag::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## tag.h (module 'network'): static ns3::TypeId ns3::Tag::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## tag.h (module 'network'): void ns3::Tag::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_pure_virtual=True, is_const=True, is_virtual=True) ## tag.h (module 'network'): void ns3::Tag::Serialize(ns3::TagBuffer i) const [member function] cls.add_method('Serialize', 'void', [param('ns3::TagBuffer', 'i')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3TagBuffer_methods(root_module, cls): ## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(ns3::TagBuffer const & arg0) [copy constructor] cls.add_constructor([param('ns3::TagBuffer const &', 'arg0')]) ## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(uint8_t * start, uint8_t * end) [constructor] cls.add_constructor([param('uint8_t *', 'start'), param('uint8_t *', 'end')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::CopyFrom(ns3::TagBuffer o) [member function] cls.add_method('CopyFrom', 'void', [param('ns3::TagBuffer', 'o')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::Read(uint8_t * buffer, uint32_t size) [member function] cls.add_method('Read', 'void', [param('uint8_t *', 'buffer'), param('uint32_t', 'size')]) ## tag-buffer.h (module 'network'): double ns3::TagBuffer::ReadDouble() [member function] cls.add_method('ReadDouble', 'double', []) ## tag-buffer.h (module 'network'): uint16_t ns3::TagBuffer::ReadU16() [member function] cls.add_method('ReadU16', 'uint16_t', []) ## tag-buffer.h (module 'network'): uint32_t ns3::TagBuffer::ReadU32() [member function] cls.add_method('ReadU32', 'uint32_t', []) ## tag-buffer.h (module 'network'): uint64_t ns3::TagBuffer::ReadU64() [member function] cls.add_method('ReadU64', 'uint64_t', []) ## tag-buffer.h (module 'network'): uint8_t ns3::TagBuffer::ReadU8() [member function] cls.add_method('ReadU8', 'uint8_t', []) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::TrimAtEnd(uint32_t trim) [member function] cls.add_method('TrimAtEnd', 'void', [param('uint32_t', 'trim')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::Write(uint8_t const * buffer, uint32_t size) [member function] cls.add_method('Write', 'void', [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteDouble(double v) [member function] cls.add_method('WriteDouble', 'void', [param('double', 'v')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU16(uint16_t data) [member function] cls.add_method('WriteU16', 'void', [param('uint16_t', 'data')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU32(uint32_t data) [member function] cls.add_method('WriteU32', 'void', [param('uint32_t', 'data')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU64(uint64_t v) [member function] cls.add_method('WriteU64', 'void', [param('uint64_t', 'v')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU8(uint8_t v) [member function] cls.add_method('WriteU8', 'void', [param('uint8_t', 'v')]) return def register_Ns3TimeWithUnit_methods(root_module, cls): cls.add_output_stream_operator() ## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor] cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')]) ## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor] cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')]) return def register_Ns3TlvValue_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::TlvValue::TlvValue() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): ns3::TlvValue::TlvValue(ns3::TlvValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::TlvValue const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::TlvValue * ns3::TlvValue::Copy() const [member function] cls.add_method('Copy', 'ns3::TlvValue *', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::TlvValue::Deserialize(ns3::Buffer::Iterator start, uint64_t valueLen) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start'), param('uint64_t', 'valueLen')], is_pure_virtual=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::TlvValue::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): void ns3::TlvValue::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3TosTlvValue_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::TosTlvValue::TosTlvValue(ns3::TosTlvValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::TosTlvValue const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::TosTlvValue::TosTlvValue() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): ns3::TosTlvValue::TosTlvValue(uint8_t arg0, uint8_t arg1, uint8_t arg2) [constructor] cls.add_constructor([param('uint8_t', 'arg0'), param('uint8_t', 'arg1'), param('uint8_t', 'arg2')]) ## wimax-tlv.h (module 'wimax'): ns3::TosTlvValue * ns3::TosTlvValue::Copy() const [member function] cls.add_method('Copy', 'ns3::TosTlvValue *', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::TosTlvValue::Deserialize(ns3::Buffer::Iterator start, uint64_t valueLength) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start'), param('uint64_t', 'valueLength')], is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint8_t ns3::TosTlvValue::GetHigh() const [member function] cls.add_method('GetHigh', 'uint8_t', [], is_const=True) ## wimax-tlv.h (module 'wimax'): uint8_t ns3::TosTlvValue::GetLow() const [member function] cls.add_method('GetLow', 'uint8_t', [], is_const=True) ## wimax-tlv.h (module 'wimax'): uint8_t ns3::TosTlvValue::GetMask() const [member function] cls.add_method('GetMask', 'uint8_t', [], is_const=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::TosTlvValue::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): void ns3::TosTlvValue::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) return def register_Ns3TypeId_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('<') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## type-id.h (module 'core'): ns3::TypeId::TypeId(char const * name) [constructor] cls.add_constructor([param('char const *', 'name')]) ## type-id.h (module 'core'): ns3::TypeId::TypeId() [constructor] cls.add_constructor([]) ## type-id.h (module 'core'): ns3::TypeId::TypeId(ns3::TypeId const & o) [copy constructor] cls.add_constructor([param('ns3::TypeId const &', 'o')]) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddAttribute(std::string name, std::string help, ns3::AttributeValue const & initialValue, ns3::Ptr<ns3::AttributeAccessor const> accessor, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('AddAttribute', 'ns3::TypeId', [param('std::string', 'name'), param('std::string', 'help'), param('ns3::AttributeValue const &', 'initialValue'), param('ns3::Ptr< ns3::AttributeAccessor const >', 'accessor'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')]) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddAttribute(std::string name, std::string help, uint32_t flags, ns3::AttributeValue const & initialValue, ns3::Ptr<ns3::AttributeAccessor const> accessor, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('AddAttribute', 'ns3::TypeId', [param('std::string', 'name'), param('std::string', 'help'), param('uint32_t', 'flags'), param('ns3::AttributeValue const &', 'initialValue'), param('ns3::Ptr< ns3::AttributeAccessor const >', 'accessor'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')]) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr<ns3::TraceSourceAccessor const> accessor) [member function] cls.add_method('AddTraceSource', 'ns3::TypeId', [param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')], deprecated=True) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr<ns3::TraceSourceAccessor const> accessor, std::string callback) [member function] cls.add_method('AddTraceSource', 'ns3::TypeId', [param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor'), param('std::string', 'callback')]) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation ns3::TypeId::GetAttribute(uint32_t i) const [member function] cls.add_method('GetAttribute', 'ns3::TypeId::AttributeInformation', [param('uint32_t', 'i')], is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetAttributeFullName(uint32_t i) const [member function] cls.add_method('GetAttributeFullName', 'std::string', [param('uint32_t', 'i')], is_const=True) ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetAttributeN() const [member function] cls.add_method('GetAttributeN', 'uint32_t', [], is_const=True) ## type-id.h (module 'core'): ns3::Callback<ns3::ObjectBase*,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ns3::TypeId::GetConstructor() const [member function] cls.add_method('GetConstructor', 'ns3::Callback< ns3::ObjectBase *, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', [], is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetGroupName() const [member function] cls.add_method('GetGroupName', 'std::string', [], is_const=True) ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] cls.add_method('GetHash', 'uint32_t', [], is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::GetParent() const [member function] cls.add_method('GetParent', 'ns3::TypeId', [], is_const=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::GetRegistered(uint32_t i) [member function] cls.add_method('GetRegistered', 'ns3::TypeId', [param('uint32_t', 'i')], is_static=True) ## type-id.h (module 'core'): static uint32_t ns3::TypeId::GetRegisteredN() [member function] cls.add_method('GetRegisteredN', 'uint32_t', [], is_static=True) ## type-id.h (module 'core'): std::size_t ns3::TypeId::GetSize() const [member function] cls.add_method('GetSize', 'std::size_t', [], is_const=True) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation ns3::TypeId::GetTraceSource(uint32_t i) const [member function] cls.add_method('GetTraceSource', 'ns3::TypeId::TraceSourceInformation', [param('uint32_t', 'i')], is_const=True) ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetTraceSourceN() const [member function] cls.add_method('GetTraceSourceN', 'uint32_t', [], is_const=True) ## type-id.h (module 'core'): uint16_t ns3::TypeId::GetUid() const [member function] cls.add_method('GetUid', 'uint16_t', [], is_const=True) ## type-id.h (module 'core'): bool ns3::TypeId::HasConstructor() const [member function] cls.add_method('HasConstructor', 'bool', [], is_const=True) ## type-id.h (module 'core'): bool ns3::TypeId::HasParent() const [member function] cls.add_method('HasParent', 'bool', [], is_const=True) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::HideFromDocumentation() [member function] cls.add_method('HideFromDocumentation', 'ns3::TypeId', []) ## type-id.h (module 'core'): bool ns3::TypeId::IsChildOf(ns3::TypeId other) const [member function] cls.add_method('IsChildOf', 'bool', [param('ns3::TypeId', 'other')], is_const=True) ## type-id.h (module 'core'): bool ns3::TypeId::LookupAttributeByName(std::string name, ns3::TypeId::AttributeInformation * info) const [member function] cls.add_method('LookupAttributeByName', 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] cls.add_method('LookupByHash', 'ns3::TypeId', [param('uint32_t', 'hash')], is_static=True) ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] cls.add_method('LookupByHashFailSafe', 'bool', [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', [param('std::string', 'name')], is_static=True) ## type-id.h (module 'core'): ns3::Ptr<ns3::TraceSourceAccessor const> ns3::TypeId::LookupTraceSourceByName(std::string name) const [member function] cls.add_method('LookupTraceSourceByName', 'ns3::Ptr< ns3::TraceSourceAccessor const >', [param('std::string', 'name')], is_const=True) ## type-id.h (module 'core'): bool ns3::TypeId::MustHideFromDocumentation() const [member function] cls.add_method('MustHideFromDocumentation', 'bool', [], is_const=True) ## type-id.h (module 'core'): bool ns3::TypeId::SetAttributeInitialValue(uint32_t i, ns3::Ptr<ns3::AttributeValue const> initialValue) [member function] cls.add_method('SetAttributeInitialValue', 'bool', [param('uint32_t', 'i'), param('ns3::Ptr< ns3::AttributeValue const >', 'initialValue')]) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetGroupName(std::string groupName) [member function] cls.add_method('SetGroupName', 'ns3::TypeId', [param('std::string', 'groupName')]) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetParent(ns3::TypeId tid) [member function] cls.add_method('SetParent', 'ns3::TypeId', [param('ns3::TypeId', 'tid')]) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetSize(std::size_t size) [member function] cls.add_method('SetSize', 'ns3::TypeId', [param('std::size_t', 'size')]) ## type-id.h (module 'core'): void ns3::TypeId::SetUid(uint16_t tid) [member function] cls.add_method('SetUid', 'void', [param('uint16_t', 'tid')]) return def register_Ns3TypeIdAttributeInformation_methods(root_module, cls): ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::AttributeInformation() [constructor] cls.add_constructor([]) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::AttributeInformation(ns3::TypeId::AttributeInformation const & arg0) [copy constructor] cls.add_constructor([param('ns3::TypeId::AttributeInformation const &', 'arg0')]) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::accessor [variable] cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::AttributeAccessor const >', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::checker [variable] cls.add_instance_attribute('checker', 'ns3::Ptr< ns3::AttributeChecker const >', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::flags [variable] cls.add_instance_attribute('flags', 'uint32_t', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::help [variable] cls.add_instance_attribute('help', 'std::string', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::initialValue [variable] cls.add_instance_attribute('initialValue', 'ns3::Ptr< ns3::AttributeValue const >', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::name [variable] cls.add_instance_attribute('name', 'std::string', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::originalInitialValue [variable] cls.add_instance_attribute('originalInitialValue', 'ns3::Ptr< ns3::AttributeValue const >', is_const=False) return def register_Ns3TypeIdTraceSourceInformation_methods(root_module, cls): ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::TraceSourceInformation() [constructor] cls.add_constructor([]) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::TraceSourceInformation(ns3::TypeId::TraceSourceInformation const & arg0) [copy constructor] cls.add_constructor([param('ns3::TypeId::TraceSourceInformation const &', 'arg0')]) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::accessor [variable] cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::TraceSourceAccessor const >', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::callback [variable] cls.add_instance_attribute('callback', 'std::string', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::help [variable] cls.add_instance_attribute('help', 'std::string', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::name [variable] cls.add_instance_attribute('name', 'std::string', is_const=False) return def register_Ns3U16TlvValue_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::U16TlvValue::U16TlvValue(ns3::U16TlvValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::U16TlvValue const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::U16TlvValue::U16TlvValue(uint16_t value) [constructor] cls.add_constructor([param('uint16_t', 'value')]) ## wimax-tlv.h (module 'wimax'): ns3::U16TlvValue::U16TlvValue() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): ns3::U16TlvValue * ns3::U16TlvValue::Copy() const [member function] cls.add_method('Copy', 'ns3::U16TlvValue *', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::U16TlvValue::Deserialize(ns3::Buffer::Iterator start, uint64_t valueLen) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start'), param('uint64_t', 'valueLen')], is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::U16TlvValue::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')]) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::U16TlvValue::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint16_t ns3::U16TlvValue::GetValue() const [member function] cls.add_method('GetValue', 'uint16_t', [], is_const=True) ## wimax-tlv.h (module 'wimax'): void ns3::U16TlvValue::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) return def register_Ns3U32TlvValue_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::U32TlvValue::U32TlvValue(ns3::U32TlvValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::U32TlvValue const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::U32TlvValue::U32TlvValue(uint32_t value) [constructor] cls.add_constructor([param('uint32_t', 'value')]) ## wimax-tlv.h (module 'wimax'): ns3::U32TlvValue::U32TlvValue() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): ns3::U32TlvValue * ns3::U32TlvValue::Copy() const [member function] cls.add_method('Copy', 'ns3::U32TlvValue *', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::U32TlvValue::Deserialize(ns3::Buffer::Iterator start, uint64_t valueLen) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start'), param('uint64_t', 'valueLen')], is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::U32TlvValue::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')]) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::U32TlvValue::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::U32TlvValue::GetValue() const [member function] cls.add_method('GetValue', 'uint32_t', [], is_const=True) ## wimax-tlv.h (module 'wimax'): void ns3::U32TlvValue::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) return def register_Ns3U8TlvValue_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::U8TlvValue::U8TlvValue(ns3::U8TlvValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::U8TlvValue const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::U8TlvValue::U8TlvValue(uint8_t value) [constructor] cls.add_constructor([param('uint8_t', 'value')]) ## wimax-tlv.h (module 'wimax'): ns3::U8TlvValue::U8TlvValue() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): ns3::U8TlvValue * ns3::U8TlvValue::Copy() const [member function] cls.add_method('Copy', 'ns3::U8TlvValue *', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::U8TlvValue::Deserialize(ns3::Buffer::Iterator start, uint64_t valueLen) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start'), param('uint64_t', 'valueLen')], is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::U8TlvValue::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')]) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::U8TlvValue::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint8_t ns3::U8TlvValue::GetValue() const [member function] cls.add_method('GetValue', 'uint8_t', [], is_const=True) ## wimax-tlv.h (module 'wimax'): void ns3::U8TlvValue::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) return def register_Ns3UcdChannelEncodings_methods(root_module, cls): ## ul-mac-messages.h (module 'wimax'): ns3::UcdChannelEncodings::UcdChannelEncodings(ns3::UcdChannelEncodings const & arg0) [copy constructor] cls.add_constructor([param('ns3::UcdChannelEncodings const &', 'arg0')]) ## ul-mac-messages.h (module 'wimax'): ns3::UcdChannelEncodings::UcdChannelEncodings() [constructor] cls.add_constructor([]) ## ul-mac-messages.h (module 'wimax'): uint16_t ns3::UcdChannelEncodings::GetBwReqOppSize() const [member function] cls.add_method('GetBwReqOppSize', 'uint16_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint32_t ns3::UcdChannelEncodings::GetFrequency() const [member function] cls.add_method('GetFrequency', 'uint32_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint16_t ns3::UcdChannelEncodings::GetRangReqOppSize() const [member function] cls.add_method('GetRangReqOppSize', 'uint16_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint16_t ns3::UcdChannelEncodings::GetSize() const [member function] cls.add_method('GetSize', 'uint16_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::UcdChannelEncodings::Read(ns3::Buffer::Iterator start) [member function] cls.add_method('Read', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')]) ## ul-mac-messages.h (module 'wimax'): void ns3::UcdChannelEncodings::SetBwReqOppSize(uint16_t bwReqOppSize) [member function] cls.add_method('SetBwReqOppSize', 'void', [param('uint16_t', 'bwReqOppSize')]) ## ul-mac-messages.h (module 'wimax'): void ns3::UcdChannelEncodings::SetFrequency(uint32_t frequency) [member function] cls.add_method('SetFrequency', 'void', [param('uint32_t', 'frequency')]) ## ul-mac-messages.h (module 'wimax'): void ns3::UcdChannelEncodings::SetRangReqOppSize(uint16_t rangReqOppSize) [member function] cls.add_method('SetRangReqOppSize', 'void', [param('uint16_t', 'rangReqOppSize')]) ## ul-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::UcdChannelEncodings::Write(ns3::Buffer::Iterator start) const [member function] cls.add_method('Write', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True) ## ul-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::UcdChannelEncodings::DoRead(ns3::Buffer::Iterator start) [member function] cls.add_method('DoRead', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, visibility='private', is_virtual=True) ## ul-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::UcdChannelEncodings::DoWrite(ns3::Buffer::Iterator start) const [member function] cls.add_method('DoWrite', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) return def register_Ns3VectorTlvValue_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::VectorTlvValue::VectorTlvValue(ns3::VectorTlvValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::VectorTlvValue const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::VectorTlvValue::VectorTlvValue() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): void ns3::VectorTlvValue::Add(ns3::Tlv const & val) [member function] cls.add_method('Add', 'void', [param('ns3::Tlv const &', 'val')]) ## wimax-tlv.h (module 'wimax'): __gnu_cxx::__normal_iterator<ns3::Tlv* const*,std::vector<ns3::Tlv*, std::allocator<ns3::Tlv*> > > ns3::VectorTlvValue::Begin() const [member function] cls.add_method('Begin', '__gnu_cxx::__normal_iterator< ns3::Tlv * const *, std::vector< ns3::Tlv * > >', [], is_const=True) ## wimax-tlv.h (module 'wimax'): ns3::VectorTlvValue * ns3::VectorTlvValue::Copy() const [member function] cls.add_method('Copy', 'ns3::VectorTlvValue *', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::VectorTlvValue::Deserialize(ns3::Buffer::Iterator start, uint64_t valueLength) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start'), param('uint64_t', 'valueLength')], is_pure_virtual=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): __gnu_cxx::__normal_iterator<ns3::Tlv* const*,std::vector<ns3::Tlv*, std::allocator<ns3::Tlv*> > > ns3::VectorTlvValue::End() const [member function] cls.add_method('End', '__gnu_cxx::__normal_iterator< ns3::Tlv * const *, std::vector< ns3::Tlv * > >', [], is_const=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::VectorTlvValue::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): void ns3::VectorTlvValue::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) return def register_Ns3WimaxHelper_methods(root_module, cls): ## wimax-helper.h (module 'wimax'): ns3::WimaxHelper::WimaxHelper(ns3::WimaxHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::WimaxHelper const &', 'arg0')]) ## wimax-helper.h (module 'wimax'): ns3::WimaxHelper::WimaxHelper() [constructor] cls.add_constructor([]) ## wimax-helper.h (module 'wimax'): int64_t ns3::WimaxHelper::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')]) ## wimax-helper.h (module 'wimax'): int64_t ns3::WimaxHelper::AssignStreams(ns3::NetDeviceContainer c, int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('ns3::NetDeviceContainer', 'c'), param('int64_t', 'stream')]) ## wimax-helper.h (module 'wimax'): ns3::Ptr<ns3::BSScheduler> ns3::WimaxHelper::CreateBSScheduler(ns3::WimaxHelper::SchedulerType schedulerType) [member function] cls.add_method('CreateBSScheduler', 'ns3::Ptr< ns3::BSScheduler >', [param('ns3::WimaxHelper::SchedulerType', 'schedulerType')]) ## wimax-helper.h (module 'wimax'): ns3::Ptr<ns3::WimaxPhy> ns3::WimaxHelper::CreatePhy(ns3::WimaxHelper::PhyType phyType) [member function] cls.add_method('CreatePhy', 'ns3::Ptr< ns3::WimaxPhy >', [param('ns3::WimaxHelper::PhyType', 'phyType')]) ## wimax-helper.h (module 'wimax'): ns3::Ptr<ns3::WimaxPhy> ns3::WimaxHelper::CreatePhy(ns3::WimaxHelper::PhyType phyType, char * SNRTraceFilePath, bool activateLoss) [member function] cls.add_method('CreatePhy', 'ns3::Ptr< ns3::WimaxPhy >', [param('ns3::WimaxHelper::PhyType', 'phyType'), param('char *', 'SNRTraceFilePath'), param('bool', 'activateLoss')]) ## wimax-helper.h (module 'wimax'): ns3::Ptr<ns3::WimaxPhy> ns3::WimaxHelper::CreatePhyWithoutChannel(ns3::WimaxHelper::PhyType phyType) [member function] cls.add_method('CreatePhyWithoutChannel', 'ns3::Ptr< ns3::WimaxPhy >', [param('ns3::WimaxHelper::PhyType', 'phyType')]) ## wimax-helper.h (module 'wimax'): ns3::Ptr<ns3::WimaxPhy> ns3::WimaxHelper::CreatePhyWithoutChannel(ns3::WimaxHelper::PhyType phyType, char * SNRTraceFilePath, bool activateLoss) [member function] cls.add_method('CreatePhyWithoutChannel', 'ns3::Ptr< ns3::WimaxPhy >', [param('ns3::WimaxHelper::PhyType', 'phyType'), param('char *', 'SNRTraceFilePath'), param('bool', 'activateLoss')]) ## wimax-helper.h (module 'wimax'): ns3::ServiceFlow ns3::WimaxHelper::CreateServiceFlow(ns3::ServiceFlow::Direction direction, ns3::ServiceFlow::SchedulingType schedulinType, ns3::IpcsClassifierRecord classifier) [member function] cls.add_method('CreateServiceFlow', 'ns3::ServiceFlow', [param('ns3::ServiceFlow::Direction', 'direction'), param('ns3::ServiceFlow::SchedulingType', 'schedulinType'), param('ns3::IpcsClassifierRecord', 'classifier')]) ## wimax-helper.h (module 'wimax'): ns3::Ptr<ns3::UplinkScheduler> ns3::WimaxHelper::CreateUplinkScheduler(ns3::WimaxHelper::SchedulerType schedulerType) [member function] cls.add_method('CreateUplinkScheduler', 'ns3::Ptr< ns3::UplinkScheduler >', [param('ns3::WimaxHelper::SchedulerType', 'schedulerType')]) ## wimax-helper.h (module 'wimax'): static void ns3::WimaxHelper::EnableAsciiForConnection(ns3::Ptr<ns3::OutputStreamWrapper> oss, uint32_t nodeid, uint32_t deviceid, char * netdevice, char * connection) [member function] cls.add_method('EnableAsciiForConnection', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'oss'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid'), param('char *', 'netdevice'), param('char *', 'connection')], is_static=True) ## wimax-helper.h (module 'wimax'): static void ns3::WimaxHelper::EnableLogComponents() [member function] cls.add_method('EnableLogComponents', 'void', [], is_static=True) ## wimax-helper.h (module 'wimax'): ns3::NetDeviceContainer ns3::WimaxHelper::Install(ns3::NodeContainer c, ns3::WimaxHelper::NetDeviceType type, ns3::WimaxHelper::PhyType phyType, ns3::WimaxHelper::SchedulerType schedulerType) [member function] cls.add_method('Install', 'ns3::NetDeviceContainer', [param('ns3::NodeContainer', 'c'), param('ns3::WimaxHelper::NetDeviceType', 'type'), param('ns3::WimaxHelper::PhyType', 'phyType'), param('ns3::WimaxHelper::SchedulerType', 'schedulerType')]) ## wimax-helper.h (module 'wimax'): ns3::NetDeviceContainer ns3::WimaxHelper::Install(ns3::NodeContainer c, ns3::WimaxHelper::NetDeviceType deviceType, ns3::WimaxHelper::PhyType phyType, ns3::Ptr<ns3::WimaxChannel> channel, ns3::WimaxHelper::SchedulerType schedulerType) [member function] cls.add_method('Install', 'ns3::NetDeviceContainer', [param('ns3::NodeContainer', 'c'), param('ns3::WimaxHelper::NetDeviceType', 'deviceType'), param('ns3::WimaxHelper::PhyType', 'phyType'), param('ns3::Ptr< ns3::WimaxChannel >', 'channel'), param('ns3::WimaxHelper::SchedulerType', 'schedulerType')]) ## wimax-helper.h (module 'wimax'): ns3::NetDeviceContainer ns3::WimaxHelper::Install(ns3::NodeContainer c, ns3::WimaxHelper::NetDeviceType deviceType, ns3::WimaxHelper::PhyType phyType, ns3::WimaxHelper::SchedulerType schedulerType, double frameDuration) [member function] cls.add_method('Install', 'ns3::NetDeviceContainer', [param('ns3::NodeContainer', 'c'), param('ns3::WimaxHelper::NetDeviceType', 'deviceType'), param('ns3::WimaxHelper::PhyType', 'phyType'), param('ns3::WimaxHelper::SchedulerType', 'schedulerType'), param('double', 'frameDuration')]) ## wimax-helper.h (module 'wimax'): ns3::Ptr<ns3::WimaxNetDevice> ns3::WimaxHelper::Install(ns3::Ptr<ns3::Node> node, ns3::WimaxHelper::NetDeviceType deviceType, ns3::WimaxHelper::PhyType phyType, ns3::Ptr<ns3::WimaxChannel> channel, ns3::WimaxHelper::SchedulerType schedulerType) [member function] cls.add_method('Install', 'ns3::Ptr< ns3::WimaxNetDevice >', [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::WimaxHelper::NetDeviceType', 'deviceType'), param('ns3::WimaxHelper::PhyType', 'phyType'), param('ns3::Ptr< ns3::WimaxChannel >', 'channel'), param('ns3::WimaxHelper::SchedulerType', 'schedulerType')]) ## wimax-helper.h (module 'wimax'): void ns3::WimaxHelper::SetPropagationLossModel(ns3::SimpleOfdmWimaxChannel::PropModel propagationModel) [member function] cls.add_method('SetPropagationLossModel', 'void', [param('ns3::SimpleOfdmWimaxChannel::PropModel', 'propagationModel')]) ## wimax-helper.h (module 'wimax'): void ns3::WimaxHelper::EnableAsciiInternal(ns3::Ptr<ns3::OutputStreamWrapper> stream, std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename) [member function] cls.add_method('EnableAsciiInternal', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename')], visibility='private', is_virtual=True) ## wimax-helper.h (module 'wimax'): void ns3::WimaxHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename, bool promiscuous) [member function] cls.add_method('EnablePcapInternal', 'void', [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename'), param('bool', 'promiscuous')], visibility='private', is_virtual=True) return def register_Ns3Empty_methods(root_module, cls): ## empty.h (module 'core'): ns3::empty::empty() [constructor] cls.add_constructor([]) ## empty.h (module 'core'): ns3::empty::empty(ns3::empty const & arg0) [copy constructor] cls.add_constructor([param('ns3::empty const &', 'arg0')]) return def register_Ns3Int64x64_t_methods(root_module, cls): cls.add_binary_comparison_operator('<=') cls.add_binary_comparison_operator('!=') cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', u'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', u'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', u'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', u'right')) cls.add_unary_numeric_operator('-') cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', u'right')) cls.add_binary_comparison_operator('<') cls.add_binary_comparison_operator('>') cls.add_inplace_numeric_operator('*=', param('ns3::int64x64_t const &', u'right')) cls.add_inplace_numeric_operator('-=', param('ns3::int64x64_t const &', u'right')) cls.add_inplace_numeric_operator('/=', param('ns3::int64x64_t const &', u'right')) cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') cls.add_binary_comparison_operator('>=') ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t() [constructor] cls.add_constructor([]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(double v) [constructor] cls.add_constructor([param('double', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long double v) [constructor] cls.add_constructor([param('long double', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(int v) [constructor] cls.add_constructor([param('int', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long int v) [constructor] cls.add_constructor([param('long int', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long long int v) [constructor] cls.add_constructor([param('long long int', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(unsigned int v) [constructor] cls.add_constructor([param('unsigned int', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long unsigned int v) [constructor] cls.add_constructor([param('long unsigned int', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long long unsigned int v) [constructor] cls.add_constructor([param('long long unsigned int', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(int64_t hi, uint64_t lo) [constructor] cls.add_constructor([param('int64_t', 'hi'), param('uint64_t', 'lo')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(ns3::int64x64_t const & o) [copy constructor] cls.add_constructor([param('ns3::int64x64_t const &', 'o')]) ## int64x64-double.h (module 'core'): double ns3::int64x64_t::GetDouble() const [member function] cls.add_method('GetDouble', 'double', [], is_const=True) ## int64x64-double.h (module 'core'): int64_t ns3::int64x64_t::GetHigh() const [member function] cls.add_method('GetHigh', 'int64_t', [], is_const=True) ## int64x64-double.h (module 'core'): uint64_t ns3::int64x64_t::GetLow() const [member function] cls.add_method('GetLow', 'uint64_t', [], is_const=True) ## int64x64-double.h (module 'core'): static ns3::int64x64_t ns3::int64x64_t::Invert(uint64_t v) [member function] cls.add_method('Invert', 'ns3::int64x64_t', [param('uint64_t', 'v')], is_static=True) ## int64x64-double.h (module 'core'): void ns3::int64x64_t::MulByInvert(ns3::int64x64_t const & o) [member function] cls.add_method('MulByInvert', 'void', [param('ns3::int64x64_t const &', 'o')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::implementation [variable] cls.add_static_attribute('implementation', 'ns3::int64x64_t::impl_type const', is_const=True) return def register_Ns3SimpleOfdmSendParam_methods(root_module, cls): ## simple-ofdm-send-param.h (module 'wimax'): ns3::simpleOfdmSendParam::simpleOfdmSendParam(ns3::simpleOfdmSendParam const & arg0) [copy constructor] cls.add_constructor([param('ns3::simpleOfdmSendParam const &', 'arg0')]) ## simple-ofdm-send-param.h (module 'wimax'): ns3::simpleOfdmSendParam::simpleOfdmSendParam() [constructor] cls.add_constructor([]) ## simple-ofdm-send-param.h (module 'wimax'): ns3::simpleOfdmSendParam::simpleOfdmSendParam(ns3::bvec const & fecBlock, uint32_t burstSize, bool isFirstBlock, uint64_t Frequency, ns3::WimaxPhy::ModulationType modulationType, uint8_t direction, double rxPowerDbm) [constructor] cls.add_constructor([param('ns3::bvec const &', 'fecBlock'), param('uint32_t', 'burstSize'), param('bool', 'isFirstBlock'), param('uint64_t', 'Frequency'), param('ns3::WimaxPhy::ModulationType', 'modulationType'), param('uint8_t', 'direction'), param('double', 'rxPowerDbm')]) ## simple-ofdm-send-param.h (module 'wimax'): ns3::simpleOfdmSendParam::simpleOfdmSendParam(uint32_t burstSize, bool isFirstBlock, uint64_t Frequency, ns3::WimaxPhy::ModulationType modulationType, uint8_t direction, double rxPowerDbm, ns3::Ptr<ns3::PacketBurst> burst) [constructor] cls.add_constructor([param('uint32_t', 'burstSize'), param('bool', 'isFirstBlock'), param('uint64_t', 'Frequency'), param('ns3::WimaxPhy::ModulationType', 'modulationType'), param('uint8_t', 'direction'), param('double', 'rxPowerDbm'), param('ns3::Ptr< ns3::PacketBurst >', 'burst')]) ## simple-ofdm-send-param.h (module 'wimax'): ns3::Ptr<ns3::PacketBurst> ns3::simpleOfdmSendParam::GetBurst() [member function] cls.add_method('GetBurst', 'ns3::Ptr< ns3::PacketBurst >', []) ## simple-ofdm-send-param.h (module 'wimax'): uint32_t ns3::simpleOfdmSendParam::GetBurstSize() [member function] cls.add_method('GetBurstSize', 'uint32_t', []) ## simple-ofdm-send-param.h (module 'wimax'): uint8_t ns3::simpleOfdmSendParam::GetDirection() [member function] cls.add_method('GetDirection', 'uint8_t', []) ## simple-ofdm-send-param.h (module 'wimax'): ns3::bvec ns3::simpleOfdmSendParam::GetFecBlock() [member function] cls.add_method('GetFecBlock', 'ns3::bvec', []) ## simple-ofdm-send-param.h (module 'wimax'): uint64_t ns3::simpleOfdmSendParam::GetFrequency() [member function] cls.add_method('GetFrequency', 'uint64_t', []) ## simple-ofdm-send-param.h (module 'wimax'): bool ns3::simpleOfdmSendParam::GetIsFirstBlock() [member function] cls.add_method('GetIsFirstBlock', 'bool', []) ## simple-ofdm-send-param.h (module 'wimax'): ns3::WimaxPhy::ModulationType ns3::simpleOfdmSendParam::GetModulationType() [member function] cls.add_method('GetModulationType', 'ns3::WimaxPhy::ModulationType', []) ## simple-ofdm-send-param.h (module 'wimax'): double ns3::simpleOfdmSendParam::GetRxPowerDbm() [member function] cls.add_method('GetRxPowerDbm', 'double', []) ## simple-ofdm-send-param.h (module 'wimax'): void ns3::simpleOfdmSendParam::SetBurstSize(uint32_t burstSize) [member function] cls.add_method('SetBurstSize', 'void', [param('uint32_t', 'burstSize')]) ## simple-ofdm-send-param.h (module 'wimax'): void ns3::simpleOfdmSendParam::SetDirection(uint8_t direction) [member function] cls.add_method('SetDirection', 'void', [param('uint8_t', 'direction')]) ## simple-ofdm-send-param.h (module 'wimax'): void ns3::simpleOfdmSendParam::SetFecBlock(ns3::bvec const & fecBlock) [member function] cls.add_method('SetFecBlock', 'void', [param('ns3::bvec const &', 'fecBlock')]) ## simple-ofdm-send-param.h (module 'wimax'): void ns3::simpleOfdmSendParam::SetFrequency(uint64_t Frequency) [member function] cls.add_method('SetFrequency', 'void', [param('uint64_t', 'Frequency')]) ## simple-ofdm-send-param.h (module 'wimax'): void ns3::simpleOfdmSendParam::SetIsFirstBlock(bool isFirstBlock) [member function] cls.add_method('SetIsFirstBlock', 'void', [param('bool', 'isFirstBlock')]) ## simple-ofdm-send-param.h (module 'wimax'): void ns3::simpleOfdmSendParam::SetModulationType(ns3::WimaxPhy::ModulationType modulationType) [member function] cls.add_method('SetModulationType', 'void', [param('ns3::WimaxPhy::ModulationType', 'modulationType')]) ## simple-ofdm-send-param.h (module 'wimax'): void ns3::simpleOfdmSendParam::SetRxPowerDbm(double rxPowerDbm) [member function] cls.add_method('SetRxPowerDbm', 'void', [param('double', 'rxPowerDbm')]) return def register_Ns3Chunk_methods(root_module, cls): ## chunk.h (module 'network'): ns3::Chunk::Chunk() [constructor] cls.add_constructor([]) ## chunk.h (module 'network'): ns3::Chunk::Chunk(ns3::Chunk const & arg0) [copy constructor] cls.add_constructor([param('ns3::Chunk const &', 'arg0')]) ## chunk.h (module 'network'): uint32_t ns3::Chunk::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, is_virtual=True) ## chunk.h (module 'network'): static ns3::TypeId ns3::Chunk::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## chunk.h (module 'network'): void ns3::Chunk::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3ClassificationRuleVectorTlvValue_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::ClassificationRuleVectorTlvValue::ClassificationRuleVectorTlvValue(ns3::ClassificationRuleVectorTlvValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::ClassificationRuleVectorTlvValue const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::ClassificationRuleVectorTlvValue::ClassificationRuleVectorTlvValue() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): ns3::ClassificationRuleVectorTlvValue * ns3::ClassificationRuleVectorTlvValue::Copy() const [member function] cls.add_method('Copy', 'ns3::ClassificationRuleVectorTlvValue *', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::ClassificationRuleVectorTlvValue::Deserialize(ns3::Buffer::Iterator start, uint64_t valueLength) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start'), param('uint64_t', 'valueLength')], is_virtual=True) return def register_Ns3CsParamVectorTlvValue_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::CsParamVectorTlvValue::CsParamVectorTlvValue(ns3::CsParamVectorTlvValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::CsParamVectorTlvValue const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::CsParamVectorTlvValue::CsParamVectorTlvValue() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): ns3::CsParamVectorTlvValue * ns3::CsParamVectorTlvValue::Copy() const [member function] cls.add_method('Copy', 'ns3::CsParamVectorTlvValue *', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::CsParamVectorTlvValue::Deserialize(ns3::Buffer::Iterator start, uint64_t valueLength) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start'), param('uint64_t', 'valueLength')], is_virtual=True) return def register_Ns3Header_methods(root_module, cls): cls.add_output_stream_operator() ## header.h (module 'network'): ns3::Header::Header() [constructor] cls.add_constructor([]) ## header.h (module 'network'): ns3::Header::Header(ns3::Header const & arg0) [copy constructor] cls.add_constructor([param('ns3::Header const &', 'arg0')]) ## header.h (module 'network'): uint32_t ns3::Header::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, is_virtual=True) ## header.h (module 'network'): uint32_t ns3::Header::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## header.h (module 'network'): static ns3::TypeId ns3::Header::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## header.h (module 'network'): void ns3::Header::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_pure_virtual=True, is_const=True, is_virtual=True) ## header.h (module 'network'): void ns3::Header::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3Ipv4AddressTlvValue_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::Ipv4AddressTlvValue::Ipv4AddressTlvValue(ns3::Ipv4AddressTlvValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4AddressTlvValue const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::Ipv4AddressTlvValue::Ipv4AddressTlvValue() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): void ns3::Ipv4AddressTlvValue::Add(ns3::Ipv4Address address, ns3::Ipv4Mask Mask) [member function] cls.add_method('Add', 'void', [param('ns3::Ipv4Address', 'address'), param('ns3::Ipv4Mask', 'Mask')]) ## wimax-tlv.h (module 'wimax'): __gnu_cxx::__normal_iterator<const ns3::Ipv4AddressTlvValue::ipv4Addr*,std::vector<ns3::Ipv4AddressTlvValue::ipv4Addr, std::allocator<ns3::Ipv4AddressTlvValue::ipv4Addr> > > ns3::Ipv4AddressTlvValue::Begin() const [member function] cls.add_method('Begin', '__gnu_cxx::__normal_iterator< ns3::Ipv4AddressTlvValue::ipv4Addr const *, std::vector< ns3::Ipv4AddressTlvValue::ipv4Addr > >', [], is_const=True) ## wimax-tlv.h (module 'wimax'): ns3::Ipv4AddressTlvValue * ns3::Ipv4AddressTlvValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ipv4AddressTlvValue *', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::Ipv4AddressTlvValue::Deserialize(ns3::Buffer::Iterator start, uint64_t valueLength) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start'), param('uint64_t', 'valueLength')], is_virtual=True) ## wimax-tlv.h (module 'wimax'): __gnu_cxx::__normal_iterator<const ns3::Ipv4AddressTlvValue::ipv4Addr*,std::vector<ns3::Ipv4AddressTlvValue::ipv4Addr, std::allocator<ns3::Ipv4AddressTlvValue::ipv4Addr> > > ns3::Ipv4AddressTlvValue::End() const [member function] cls.add_method('End', '__gnu_cxx::__normal_iterator< ns3::Ipv4AddressTlvValue::ipv4Addr const *, std::vector< ns3::Ipv4AddressTlvValue::ipv4Addr > >', [], is_const=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::Ipv4AddressTlvValue::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): void ns3::Ipv4AddressTlvValue::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) return def register_Ns3Ipv4AddressTlvValueIpv4Addr_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::Ipv4AddressTlvValue::ipv4Addr::ipv4Addr() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): ns3::Ipv4AddressTlvValue::ipv4Addr::ipv4Addr(ns3::Ipv4AddressTlvValue::ipv4Addr const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4AddressTlvValue::ipv4Addr const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::Ipv4AddressTlvValue::ipv4Addr::Address [variable] cls.add_instance_attribute('Address', 'ns3::Ipv4Address', is_const=False) ## wimax-tlv.h (module 'wimax'): ns3::Ipv4AddressTlvValue::ipv4Addr::Mask [variable] cls.add_instance_attribute('Mask', 'ns3::Ipv4Mask', is_const=False) return def register_Ns3MacHeaderType_methods(root_module, cls): ## wimax-mac-header.h (module 'wimax'): ns3::MacHeaderType::MacHeaderType(ns3::MacHeaderType const & arg0) [copy constructor] cls.add_constructor([param('ns3::MacHeaderType const &', 'arg0')]) ## wimax-mac-header.h (module 'wimax'): ns3::MacHeaderType::MacHeaderType() [constructor] cls.add_constructor([]) ## wimax-mac-header.h (module 'wimax'): ns3::MacHeaderType::MacHeaderType(uint8_t type) [constructor] cls.add_constructor([param('uint8_t', 'type')]) ## wimax-mac-header.h (module 'wimax'): uint32_t ns3::MacHeaderType::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## wimax-mac-header.h (module 'wimax'): ns3::TypeId ns3::MacHeaderType::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): std::string ns3::MacHeaderType::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint32_t ns3::MacHeaderType::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::MacHeaderType::GetType() const [member function] cls.add_method('GetType', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): static ns3::TypeId ns3::MacHeaderType::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wimax-mac-header.h (module 'wimax'): void ns3::MacHeaderType::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): void ns3::MacHeaderType::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): void ns3::MacHeaderType::SetType(uint8_t type) [member function] cls.add_method('SetType', 'void', [param('uint8_t', 'type')]) return def register_Ns3ManagementMessageType_methods(root_module, cls): ## mac-messages.h (module 'wimax'): ns3::ManagementMessageType::ManagementMessageType(ns3::ManagementMessageType const & arg0) [copy constructor] cls.add_constructor([param('ns3::ManagementMessageType const &', 'arg0')]) ## mac-messages.h (module 'wimax'): ns3::ManagementMessageType::ManagementMessageType() [constructor] cls.add_constructor([]) ## mac-messages.h (module 'wimax'): ns3::ManagementMessageType::ManagementMessageType(uint8_t type) [constructor] cls.add_constructor([param('uint8_t', 'type')]) ## mac-messages.h (module 'wimax'): uint32_t ns3::ManagementMessageType::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mac-messages.h (module 'wimax'): ns3::TypeId ns3::ManagementMessageType::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): std::string ns3::ManagementMessageType::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## mac-messages.h (module 'wimax'): uint32_t ns3::ManagementMessageType::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): uint8_t ns3::ManagementMessageType::GetType() const [member function] cls.add_method('GetType', 'uint8_t', [], is_const=True) ## mac-messages.h (module 'wimax'): static ns3::TypeId ns3::ManagementMessageType::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mac-messages.h (module 'wimax'): void ns3::ManagementMessageType::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): void ns3::ManagementMessageType::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): void ns3::ManagementMessageType::SetType(uint8_t type) [member function] cls.add_method('SetType', 'void', [param('uint8_t', 'type')]) return def register_Ns3Object_methods(root_module, cls): ## object.h (module 'core'): ns3::Object::Object() [constructor] cls.add_constructor([]) ## object.h (module 'core'): void ns3::Object::AggregateObject(ns3::Ptr<ns3::Object> other) [member function] cls.add_method('AggregateObject', 'void', [param('ns3::Ptr< ns3::Object >', 'other')]) ## object.h (module 'core'): void ns3::Object::Dispose() [member function] cls.add_method('Dispose', 'void', []) ## object.h (module 'core'): ns3::Object::AggregateIterator ns3::Object::GetAggregateIterator() const [member function] cls.add_method('GetAggregateIterator', 'ns3::Object::AggregateIterator', [], is_const=True) ## object.h (module 'core'): ns3::TypeId ns3::Object::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## object.h (module 'core'): static ns3::TypeId ns3::Object::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## object.h (module 'core'): void ns3::Object::Initialize() [member function] cls.add_method('Initialize', 'void', []) ## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor] cls.add_constructor([param('ns3::Object const &', 'o')], visibility='protected') ## object.h (module 'core'): void ns3::Object::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function] cls.add_method('DoInitialize', 'void', [], visibility='protected', is_virtual=True) ## object.h (module 'core'): void ns3::Object::NotifyNewAggregate() [member function] cls.add_method('NotifyNewAggregate', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3ObjectAggregateIterator_methods(root_module, cls): ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator(ns3::Object::AggregateIterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::Object::AggregateIterator const &', 'arg0')]) ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator() [constructor] cls.add_constructor([]) ## object.h (module 'core'): bool ns3::Object::AggregateIterator::HasNext() const [member function] cls.add_method('HasNext', 'bool', [], is_const=True) ## object.h (module 'core'): ns3::Ptr<ns3::Object const> ns3::Object::AggregateIterator::Next() [member function] cls.add_method('Next', 'ns3::Ptr< ns3::Object const >', []) return def register_Ns3OfdmDownlinkFramePrefix_methods(root_module, cls): ## ofdm-downlink-frame-prefix.h (module 'wimax'): ns3::OfdmDownlinkFramePrefix::OfdmDownlinkFramePrefix(ns3::OfdmDownlinkFramePrefix const & arg0) [copy constructor] cls.add_constructor([param('ns3::OfdmDownlinkFramePrefix const &', 'arg0')]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): ns3::OfdmDownlinkFramePrefix::OfdmDownlinkFramePrefix() [constructor] cls.add_constructor([]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): void ns3::OfdmDownlinkFramePrefix::AddDlFramePrefixElement(ns3::DlFramePrefixIe dlFramePrefixElement) [member function] cls.add_method('AddDlFramePrefixElement', 'void', [param('ns3::DlFramePrefixIe', 'dlFramePrefixElement')]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): uint32_t ns3::OfdmDownlinkFramePrefix::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): ns3::Mac48Address ns3::OfdmDownlinkFramePrefix::GetBaseStationId() const [member function] cls.add_method('GetBaseStationId', 'ns3::Mac48Address', [], is_const=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): uint8_t ns3::OfdmDownlinkFramePrefix::GetConfigurationChangeCount() const [member function] cls.add_method('GetConfigurationChangeCount', 'uint8_t', [], is_const=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): std::vector<ns3::DlFramePrefixIe, std::allocator<ns3::DlFramePrefixIe> > ns3::OfdmDownlinkFramePrefix::GetDlFramePrefixElements() const [member function] cls.add_method('GetDlFramePrefixElements', 'std::vector< ns3::DlFramePrefixIe >', [], is_const=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): uint32_t ns3::OfdmDownlinkFramePrefix::GetFrameNumber() const [member function] cls.add_method('GetFrameNumber', 'uint32_t', [], is_const=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): uint8_t ns3::OfdmDownlinkFramePrefix::GetHcs() const [member function] cls.add_method('GetHcs', 'uint8_t', [], is_const=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): std::string ns3::OfdmDownlinkFramePrefix::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): uint32_t ns3::OfdmDownlinkFramePrefix::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): static ns3::TypeId ns3::OfdmDownlinkFramePrefix::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): void ns3::OfdmDownlinkFramePrefix::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): void ns3::OfdmDownlinkFramePrefix::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## ofdm-downlink-frame-prefix.h (module 'wimax'): void ns3::OfdmDownlinkFramePrefix::SetBaseStationId(ns3::Mac48Address baseStationId) [member function] cls.add_method('SetBaseStationId', 'void', [param('ns3::Mac48Address', 'baseStationId')]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): void ns3::OfdmDownlinkFramePrefix::SetConfigurationChangeCount(uint8_t configurationChangeCount) [member function] cls.add_method('SetConfigurationChangeCount', 'void', [param('uint8_t', 'configurationChangeCount')]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): void ns3::OfdmDownlinkFramePrefix::SetFrameNumber(uint32_t frameNumber) [member function] cls.add_method('SetFrameNumber', 'void', [param('uint32_t', 'frameNumber')]) ## ofdm-downlink-frame-prefix.h (module 'wimax'): void ns3::OfdmDownlinkFramePrefix::SetHcs(uint8_t hcs) [member function] cls.add_method('SetHcs', 'void', [param('uint8_t', 'hcs')]) return def register_Ns3OfdmSendParams_methods(root_module, cls): ## send-params.h (module 'wimax'): ns3::OfdmSendParams::OfdmSendParams(ns3::OfdmSendParams const & arg0) [copy constructor] cls.add_constructor([param('ns3::OfdmSendParams const &', 'arg0')]) ## send-params.h (module 'wimax'): ns3::OfdmSendParams::OfdmSendParams(ns3::Ptr<ns3::PacketBurst> burst, uint8_t modulationType, uint8_t direction) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::PacketBurst >', 'burst'), param('uint8_t', 'modulationType'), param('uint8_t', 'direction')]) ## send-params.h (module 'wimax'): ns3::Ptr<ns3::PacketBurst> ns3::OfdmSendParams::GetBurst() const [member function] cls.add_method('GetBurst', 'ns3::Ptr< ns3::PacketBurst >', [], is_const=True) ## send-params.h (module 'wimax'): uint8_t ns3::OfdmSendParams::GetDirection() const [member function] cls.add_method('GetDirection', 'uint8_t', [], is_const=True) ## send-params.h (module 'wimax'): uint8_t ns3::OfdmSendParams::GetModulationType() const [member function] cls.add_method('GetModulationType', 'uint8_t', [], is_const=True) return def register_Ns3OfdmUcdChannelEncodings_methods(root_module, cls): ## ul-mac-messages.h (module 'wimax'): ns3::OfdmUcdChannelEncodings::OfdmUcdChannelEncodings(ns3::OfdmUcdChannelEncodings const & arg0) [copy constructor] cls.add_constructor([param('ns3::OfdmUcdChannelEncodings const &', 'arg0')]) ## ul-mac-messages.h (module 'wimax'): ns3::OfdmUcdChannelEncodings::OfdmUcdChannelEncodings() [constructor] cls.add_constructor([]) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmUcdChannelEncodings::GetSbchnlFocContCodes() const [member function] cls.add_method('GetSbchnlFocContCodes', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::OfdmUcdChannelEncodings::GetSbchnlReqRegionFullParams() const [member function] cls.add_method('GetSbchnlReqRegionFullParams', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint16_t ns3::OfdmUcdChannelEncodings::GetSize() const [member function] cls.add_method('GetSize', 'uint16_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): void ns3::OfdmUcdChannelEncodings::SetSbchnlFocContCodes(uint8_t sbchnlFocContCodes) [member function] cls.add_method('SetSbchnlFocContCodes', 'void', [param('uint8_t', 'sbchnlFocContCodes')]) ## ul-mac-messages.h (module 'wimax'): void ns3::OfdmUcdChannelEncodings::SetSbchnlReqRegionFullParams(uint8_t sbchnlReqRegionFullParams) [member function] cls.add_method('SetSbchnlReqRegionFullParams', 'void', [param('uint8_t', 'sbchnlReqRegionFullParams')]) ## ul-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::OfdmUcdChannelEncodings::DoRead(ns3::Buffer::Iterator start) [member function] cls.add_method('DoRead', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], visibility='private', is_virtual=True) ## ul-mac-messages.h (module 'wimax'): ns3::Buffer::Iterator ns3::OfdmUcdChannelEncodings::DoWrite(ns3::Buffer::Iterator start) const [member function] cls.add_method('DoWrite', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True, visibility='private', is_virtual=True) return def register_Ns3PacketBurst_methods(root_module, cls): ## packet-burst.h (module 'network'): ns3::PacketBurst::PacketBurst(ns3::PacketBurst const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketBurst const &', 'arg0')]) ## packet-burst.h (module 'network'): ns3::PacketBurst::PacketBurst() [constructor] cls.add_constructor([]) ## packet-burst.h (module 'network'): void ns3::PacketBurst::AddPacket(ns3::Ptr<ns3::Packet> packet) [member function] cls.add_method('AddPacket', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet')]) ## packet-burst.h (module 'network'): std::_List_const_iterator<ns3::Ptr<ns3::Packet> > ns3::PacketBurst::Begin() const [member function] cls.add_method('Begin', 'std::_List_const_iterator< ns3::Ptr< ns3::Packet > >', [], is_const=True) ## packet-burst.h (module 'network'): ns3::Ptr<ns3::PacketBurst> ns3::PacketBurst::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::PacketBurst >', [], is_const=True) ## packet-burst.h (module 'network'): std::_List_const_iterator<ns3::Ptr<ns3::Packet> > ns3::PacketBurst::End() const [member function] cls.add_method('End', 'std::_List_const_iterator< ns3::Ptr< ns3::Packet > >', [], is_const=True) ## packet-burst.h (module 'network'): uint32_t ns3::PacketBurst::GetNPackets() const [member function] cls.add_method('GetNPackets', 'uint32_t', [], is_const=True) ## packet-burst.h (module 'network'): std::list<ns3::Ptr<ns3::Packet>, std::allocator<ns3::Ptr<ns3::Packet> > > ns3::PacketBurst::GetPackets() const [member function] cls.add_method('GetPackets', 'std::list< ns3::Ptr< ns3::Packet > >', [], is_const=True) ## packet-burst.h (module 'network'): uint32_t ns3::PacketBurst::GetSize() const [member function] cls.add_method('GetSize', 'uint32_t', [], is_const=True) ## packet-burst.h (module 'network'): static ns3::TypeId ns3::PacketBurst::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## packet-burst.h (module 'network'): void ns3::PacketBurst::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) return def register_Ns3PcapFileWrapper_methods(root_module, cls): ## pcap-file-wrapper.h (module 'network'): static ns3::TypeId ns3::PcapFileWrapper::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## pcap-file-wrapper.h (module 'network'): ns3::PcapFileWrapper::PcapFileWrapper() [constructor] cls.add_constructor([]) ## pcap-file-wrapper.h (module 'network'): bool ns3::PcapFileWrapper::Fail() const [member function] cls.add_method('Fail', 'bool', [], is_const=True) ## pcap-file-wrapper.h (module 'network'): bool ns3::PcapFileWrapper::Eof() const [member function] cls.add_method('Eof', 'bool', [], is_const=True) ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Clear() [member function] cls.add_method('Clear', 'void', []) ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Open(std::string const & filename, std::_Ios_Openmode mode) [member function] cls.add_method('Open', 'void', [param('std::string const &', 'filename'), param('std::_Ios_Openmode', 'mode')]) ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Close() [member function] cls.add_method('Close', 'void', []) ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Init(uint32_t dataLinkType, uint32_t snapLen=std::numeric_limits<unsigned int>::max(), int32_t tzCorrection=ns3::PcapFile::ZONE_DEFAULT) [member function] cls.add_method('Init', 'void', [param('uint32_t', 'dataLinkType'), param('uint32_t', 'snapLen', default_value='std::numeric_limits<unsigned int>::max()'), param('int32_t', 'tzCorrection', default_value='ns3::PcapFile::ZONE_DEFAULT')]) ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('Write', 'void', [param('ns3::Time', 't'), param('ns3::Ptr< ns3::Packet const >', 'p')]) ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Header const & header, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('Write', 'void', [param('ns3::Time', 't'), param('ns3::Header const &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')]) ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, uint8_t const * buffer, uint32_t length) [member function] cls.add_method('Write', 'void', [param('ns3::Time', 't'), param('uint8_t const *', 'buffer'), param('uint32_t', 'length')]) ## pcap-file-wrapper.h (module 'network'): uint32_t ns3::PcapFileWrapper::GetMagic() [member function] cls.add_method('GetMagic', 'uint32_t', []) ## pcap-file-wrapper.h (module 'network'): uint16_t ns3::PcapFileWrapper::GetVersionMajor() [member function] cls.add_method('GetVersionMajor', 'uint16_t', []) ## pcap-file-wrapper.h (module 'network'): uint16_t ns3::PcapFileWrapper::GetVersionMinor() [member function] cls.add_method('GetVersionMinor', 'uint16_t', []) ## pcap-file-wrapper.h (module 'network'): int32_t ns3::PcapFileWrapper::GetTimeZoneOffset() [member function] cls.add_method('GetTimeZoneOffset', 'int32_t', []) ## pcap-file-wrapper.h (module 'network'): uint32_t ns3::PcapFileWrapper::GetSigFigs() [member function] cls.add_method('GetSigFigs', 'uint32_t', []) ## pcap-file-wrapper.h (module 'network'): uint32_t ns3::PcapFileWrapper::GetSnapLen() [member function] cls.add_method('GetSnapLen', 'uint32_t', []) ## pcap-file-wrapper.h (module 'network'): uint32_t ns3::PcapFileWrapper::GetDataLinkType() [member function] cls.add_method('GetDataLinkType', 'uint32_t', []) return def register_Ns3PortRangeTlvValue_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::PortRangeTlvValue::PortRangeTlvValue(ns3::PortRangeTlvValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::PortRangeTlvValue const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::PortRangeTlvValue::PortRangeTlvValue() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): void ns3::PortRangeTlvValue::Add(uint16_t portLow, uint16_t portHigh) [member function] cls.add_method('Add', 'void', [param('uint16_t', 'portLow'), param('uint16_t', 'portHigh')]) ## wimax-tlv.h (module 'wimax'): __gnu_cxx::__normal_iterator<const ns3::PortRangeTlvValue::PortRange*,std::vector<ns3::PortRangeTlvValue::PortRange, std::allocator<ns3::PortRangeTlvValue::PortRange> > > ns3::PortRangeTlvValue::Begin() const [member function] cls.add_method('Begin', '__gnu_cxx::__normal_iterator< ns3::PortRangeTlvValue::PortRange const *, std::vector< ns3::PortRangeTlvValue::PortRange > >', [], is_const=True) ## wimax-tlv.h (module 'wimax'): ns3::PortRangeTlvValue * ns3::PortRangeTlvValue::Copy() const [member function] cls.add_method('Copy', 'ns3::PortRangeTlvValue *', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::PortRangeTlvValue::Deserialize(ns3::Buffer::Iterator start, uint64_t valueLength) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start'), param('uint64_t', 'valueLength')], is_virtual=True) ## wimax-tlv.h (module 'wimax'): __gnu_cxx::__normal_iterator<const ns3::PortRangeTlvValue::PortRange*,std::vector<ns3::PortRangeTlvValue::PortRange, std::allocator<ns3::PortRangeTlvValue::PortRange> > > ns3::PortRangeTlvValue::End() const [member function] cls.add_method('End', '__gnu_cxx::__normal_iterator< ns3::PortRangeTlvValue::PortRange const *, std::vector< ns3::PortRangeTlvValue::PortRange > >', [], is_const=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::PortRangeTlvValue::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): void ns3::PortRangeTlvValue::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) return def register_Ns3PortRangeTlvValuePortRange_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::PortRangeTlvValue::PortRange::PortRange() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): ns3::PortRangeTlvValue::PortRange::PortRange(ns3::PortRangeTlvValue::PortRange const & arg0) [copy constructor] cls.add_constructor([param('ns3::PortRangeTlvValue::PortRange const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::PortRangeTlvValue::PortRange::PortHigh [variable] cls.add_instance_attribute('PortHigh', 'uint16_t', is_const=False) ## wimax-tlv.h (module 'wimax'): ns3::PortRangeTlvValue::PortRange::PortLow [variable] cls.add_instance_attribute('PortLow', 'uint16_t', is_const=False) return def register_Ns3PriorityUlJob_methods(root_module, cls): ## ul-job.h (module 'wimax'): ns3::PriorityUlJob::PriorityUlJob(ns3::PriorityUlJob const & arg0) [copy constructor] cls.add_constructor([param('ns3::PriorityUlJob const &', 'arg0')]) ## ul-job.h (module 'wimax'): ns3::PriorityUlJob::PriorityUlJob() [constructor] cls.add_constructor([]) ## ul-job.h (module 'wimax'): int ns3::PriorityUlJob::GetPriority() [member function] cls.add_method('GetPriority', 'int', []) ## ul-job.h (module 'wimax'): ns3::Ptr<ns3::UlJob> ns3::PriorityUlJob::GetUlJob() [member function] cls.add_method('GetUlJob', 'ns3::Ptr< ns3::UlJob >', []) ## ul-job.h (module 'wimax'): void ns3::PriorityUlJob::SetPriority(int priority) [member function] cls.add_method('SetPriority', 'void', [param('int', 'priority')]) ## ul-job.h (module 'wimax'): void ns3::PriorityUlJob::SetUlJob(ns3::Ptr<ns3::UlJob> job) [member function] cls.add_method('SetUlJob', 'void', [param('ns3::Ptr< ns3::UlJob >', 'job')]) return def register_Ns3PropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::PropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::PropagationLossModel::PropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): void ns3::PropagationLossModel::SetNext(ns3::Ptr<ns3::PropagationLossModel> next) [member function] cls.add_method('SetNext', 'void', [param('ns3::Ptr< ns3::PropagationLossModel >', 'next')]) ## propagation-loss-model.h (module 'propagation'): ns3::Ptr<ns3::PropagationLossModel> ns3::PropagationLossModel::GetNext() [member function] cls.add_method('GetNext', 'ns3::Ptr< ns3::PropagationLossModel >', []) ## propagation-loss-model.h (module 'propagation'): double ns3::PropagationLossModel::CalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('CalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::PropagationLossModel::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')]) ## propagation-loss-model.h (module 'propagation'): double ns3::PropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::PropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], is_pure_virtual=True, visibility='private', is_virtual=True) return def register_Ns3ProtocolTlvValue_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::ProtocolTlvValue::ProtocolTlvValue(ns3::ProtocolTlvValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::ProtocolTlvValue const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::ProtocolTlvValue::ProtocolTlvValue() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): void ns3::ProtocolTlvValue::Add(uint8_t protiocol) [member function] cls.add_method('Add', 'void', [param('uint8_t', 'protiocol')]) ## wimax-tlv.h (module 'wimax'): __gnu_cxx::__normal_iterator<const unsigned char*,std::vector<unsigned char, std::allocator<unsigned char> > > ns3::ProtocolTlvValue::Begin() const [member function] cls.add_method('Begin', '__gnu_cxx::__normal_iterator< unsigned char const *, std::vector< unsigned char > >', [], is_const=True) ## wimax-tlv.h (module 'wimax'): ns3::ProtocolTlvValue * ns3::ProtocolTlvValue::Copy() const [member function] cls.add_method('Copy', 'ns3::ProtocolTlvValue *', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::ProtocolTlvValue::Deserialize(ns3::Buffer::Iterator start, uint64_t valueLength) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start'), param('uint64_t', 'valueLength')], is_virtual=True) ## wimax-tlv.h (module 'wimax'): __gnu_cxx::__normal_iterator<const unsigned char*,std::vector<unsigned char, std::allocator<unsigned char> > > ns3::ProtocolTlvValue::End() const [member function] cls.add_method('End', '__gnu_cxx::__normal_iterator< unsigned char const *, std::vector< unsigned char > >', [], is_const=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::ProtocolTlvValue::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): void ns3::ProtocolTlvValue::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) return def register_Ns3RandomPropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::RandomPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::RandomPropagationLossModel::RandomPropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): double ns3::RandomPropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::RandomPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3RandomVariableStream_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::RandomVariableStream::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::RandomVariableStream::RandomVariableStream() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): void ns3::RandomVariableStream::SetStream(int64_t stream) [member function] cls.add_method('SetStream', 'void', [param('int64_t', 'stream')]) ## random-variable-stream.h (module 'core'): int64_t ns3::RandomVariableStream::GetStream() const [member function] cls.add_method('GetStream', 'int64_t', [], is_const=True) ## random-variable-stream.h (module 'core'): void ns3::RandomVariableStream::SetAntithetic(bool isAntithetic) [member function] cls.add_method('SetAntithetic', 'void', [param('bool', 'isAntithetic')]) ## random-variable-stream.h (module 'core'): bool ns3::RandomVariableStream::IsAntithetic() const [member function] cls.add_method('IsAntithetic', 'bool', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::RandomVariableStream::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_pure_virtual=True, is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::RandomVariableStream::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_pure_virtual=True, is_virtual=True) ## random-variable-stream.h (module 'core'): ns3::RngStream * ns3::RandomVariableStream::Peek() const [member function] cls.add_method('Peek', 'ns3::RngStream *', [], is_const=True, visibility='protected') return def register_Ns3RangePropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::RangePropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::RangePropagationLossModel::RangePropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): double ns3::RangePropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::RangePropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3RngReq_methods(root_module, cls): ## mac-messages.h (module 'wimax'): ns3::RngReq::RngReq(ns3::RngReq const & arg0) [copy constructor] cls.add_constructor([param('ns3::RngReq const &', 'arg0')]) ## mac-messages.h (module 'wimax'): ns3::RngReq::RngReq() [constructor] cls.add_constructor([]) ## mac-messages.h (module 'wimax'): uint32_t ns3::RngReq::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mac-messages.h (module 'wimax'): ns3::TypeId ns3::RngReq::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): ns3::Mac48Address ns3::RngReq::GetMacAddress() const [member function] cls.add_method('GetMacAddress', 'ns3::Mac48Address', [], is_const=True) ## mac-messages.h (module 'wimax'): std::string ns3::RngReq::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## mac-messages.h (module 'wimax'): uint8_t ns3::RngReq::GetRangingAnomalies() const [member function] cls.add_method('GetRangingAnomalies', 'uint8_t', [], is_const=True) ## mac-messages.h (module 'wimax'): uint8_t ns3::RngReq::GetReqDlBurstProfile() const [member function] cls.add_method('GetReqDlBurstProfile', 'uint8_t', [], is_const=True) ## mac-messages.h (module 'wimax'): uint32_t ns3::RngReq::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): static ns3::TypeId ns3::RngReq::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mac-messages.h (module 'wimax'): void ns3::RngReq::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): void ns3::RngReq::PrintDebug() const [member function] cls.add_method('PrintDebug', 'void', [], is_const=True) ## mac-messages.h (module 'wimax'): void ns3::RngReq::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): void ns3::RngReq::SetMacAddress(ns3::Mac48Address macAddress) [member function] cls.add_method('SetMacAddress', 'void', [param('ns3::Mac48Address', 'macAddress')]) ## mac-messages.h (module 'wimax'): void ns3::RngReq::SetRangingAnomalies(uint8_t rangingAnomalies) [member function] cls.add_method('SetRangingAnomalies', 'void', [param('uint8_t', 'rangingAnomalies')]) ## mac-messages.h (module 'wimax'): void ns3::RngReq::SetReqDlBurstProfile(uint8_t reqDlBurstProfile) [member function] cls.add_method('SetReqDlBurstProfile', 'void', [param('uint8_t', 'reqDlBurstProfile')]) return def register_Ns3RngRsp_methods(root_module, cls): ## mac-messages.h (module 'wimax'): ns3::RngRsp::RngRsp(ns3::RngRsp const & arg0) [copy constructor] cls.add_constructor([param('ns3::RngRsp const &', 'arg0')]) ## mac-messages.h (module 'wimax'): ns3::RngRsp::RngRsp() [constructor] cls.add_constructor([]) ## mac-messages.h (module 'wimax'): uint32_t ns3::RngRsp::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mac-messages.h (module 'wimax'): uint8_t ns3::RngRsp::GetAasBdcastPermission() const [member function] cls.add_method('GetAasBdcastPermission', 'uint8_t', [], is_const=True) ## mac-messages.h (module 'wimax'): ns3::Cid ns3::RngRsp::GetBasicCid() const [member function] cls.add_method('GetBasicCid', 'ns3::Cid', [], is_const=True) ## mac-messages.h (module 'wimax'): uint32_t ns3::RngRsp::GetDlFreqOverride() const [member function] cls.add_method('GetDlFreqOverride', 'uint32_t', [], is_const=True) ## mac-messages.h (module 'wimax'): uint16_t ns3::RngRsp::GetDlOperBurstProfile() const [member function] cls.add_method('GetDlOperBurstProfile', 'uint16_t', [], is_const=True) ## mac-messages.h (module 'wimax'): uint32_t ns3::RngRsp::GetFrameNumber() const [member function] cls.add_method('GetFrameNumber', 'uint32_t', [], is_const=True) ## mac-messages.h (module 'wimax'): uint8_t ns3::RngRsp::GetInitRangOppNumber() const [member function] cls.add_method('GetInitRangOppNumber', 'uint8_t', [], is_const=True) ## mac-messages.h (module 'wimax'): ns3::TypeId ns3::RngRsp::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): ns3::Mac48Address ns3::RngRsp::GetMacAddress() const [member function] cls.add_method('GetMacAddress', 'ns3::Mac48Address', [], is_const=True) ## mac-messages.h (module 'wimax'): std::string ns3::RngRsp::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## mac-messages.h (module 'wimax'): uint32_t ns3::RngRsp::GetOffsetFreqAdjust() const [member function] cls.add_method('GetOffsetFreqAdjust', 'uint32_t', [], is_const=True) ## mac-messages.h (module 'wimax'): uint8_t ns3::RngRsp::GetPowerLevelAdjust() const [member function] cls.add_method('GetPowerLevelAdjust', 'uint8_t', [], is_const=True) ## mac-messages.h (module 'wimax'): ns3::Cid ns3::RngRsp::GetPrimaryCid() const [member function] cls.add_method('GetPrimaryCid', 'ns3::Cid', [], is_const=True) ## mac-messages.h (module 'wimax'): uint8_t ns3::RngRsp::GetRangStatus() const [member function] cls.add_method('GetRangStatus', 'uint8_t', [], is_const=True) ## mac-messages.h (module 'wimax'): uint8_t ns3::RngRsp::GetRangSubchnl() const [member function] cls.add_method('GetRangSubchnl', 'uint8_t', [], is_const=True) ## mac-messages.h (module 'wimax'): uint32_t ns3::RngRsp::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): uint32_t ns3::RngRsp::GetTimingAdjust() const [member function] cls.add_method('GetTimingAdjust', 'uint32_t', [], is_const=True) ## mac-messages.h (module 'wimax'): static ns3::TypeId ns3::RngRsp::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mac-messages.h (module 'wimax'): uint8_t ns3::RngRsp::GetUlChnlIdOverride() const [member function] cls.add_method('GetUlChnlIdOverride', 'uint8_t', [], is_const=True) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetAasBdcastPermission(uint8_t aasBdcastPermission) [member function] cls.add_method('SetAasBdcastPermission', 'void', [param('uint8_t', 'aasBdcastPermission')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetBasicCid(ns3::Cid basicCid) [member function] cls.add_method('SetBasicCid', 'void', [param('ns3::Cid', 'basicCid')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetDlFreqOverride(uint32_t dlFreqOverride) [member function] cls.add_method('SetDlFreqOverride', 'void', [param('uint32_t', 'dlFreqOverride')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetDlOperBurstProfile(uint16_t dlOperBurstProfile) [member function] cls.add_method('SetDlOperBurstProfile', 'void', [param('uint16_t', 'dlOperBurstProfile')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetFrameNumber(uint32_t frameNumber) [member function] cls.add_method('SetFrameNumber', 'void', [param('uint32_t', 'frameNumber')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetInitRangOppNumber(uint8_t initRangOppNumber) [member function] cls.add_method('SetInitRangOppNumber', 'void', [param('uint8_t', 'initRangOppNumber')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetMacAddress(ns3::Mac48Address macAddress) [member function] cls.add_method('SetMacAddress', 'void', [param('ns3::Mac48Address', 'macAddress')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetOffsetFreqAdjust(uint32_t offsetFreqAdjust) [member function] cls.add_method('SetOffsetFreqAdjust', 'void', [param('uint32_t', 'offsetFreqAdjust')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetPowerLevelAdjust(uint8_t powerLevelAdjust) [member function] cls.add_method('SetPowerLevelAdjust', 'void', [param('uint8_t', 'powerLevelAdjust')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetPrimaryCid(ns3::Cid primaryCid) [member function] cls.add_method('SetPrimaryCid', 'void', [param('ns3::Cid', 'primaryCid')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetRangStatus(uint8_t rangStatus) [member function] cls.add_method('SetRangStatus', 'void', [param('uint8_t', 'rangStatus')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetRangSubchnl(uint8_t rangSubchnl) [member function] cls.add_method('SetRangSubchnl', 'void', [param('uint8_t', 'rangSubchnl')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetTimingAdjust(uint32_t timingAdjust) [member function] cls.add_method('SetTimingAdjust', 'void', [param('uint32_t', 'timingAdjust')]) ## mac-messages.h (module 'wimax'): void ns3::RngRsp::SetUlChnlIdOverride(uint8_t ulChnlIdOverride) [member function] cls.add_method('SetUlChnlIdOverride', 'void', [param('uint8_t', 'ulChnlIdOverride')]) return def register_Ns3SSManager_methods(root_module, cls): ## ss-manager.h (module 'wimax'): ns3::SSManager::SSManager(ns3::SSManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::SSManager const &', 'arg0')]) ## ss-manager.h (module 'wimax'): ns3::SSManager::SSManager() [constructor] cls.add_constructor([]) ## ss-manager.h (module 'wimax'): ns3::SSRecord * ns3::SSManager::CreateSSRecord(ns3::Mac48Address const & macAddress) [member function] cls.add_method('CreateSSRecord', 'ns3::SSRecord *', [param('ns3::Mac48Address const &', 'macAddress')]) ## ss-manager.h (module 'wimax'): void ns3::SSManager::DeleteSSRecord(ns3::Cid cid) [member function] cls.add_method('DeleteSSRecord', 'void', [param('ns3::Cid', 'cid')]) ## ss-manager.h (module 'wimax'): ns3::Mac48Address ns3::SSManager::GetMacAddress(ns3::Cid cid) const [member function] cls.add_method('GetMacAddress', 'ns3::Mac48Address', [param('ns3::Cid', 'cid')], is_const=True) ## ss-manager.h (module 'wimax'): uint32_t ns3::SSManager::GetNRegisteredSSs() const [member function] cls.add_method('GetNRegisteredSSs', 'uint32_t', [], is_const=True) ## ss-manager.h (module 'wimax'): uint32_t ns3::SSManager::GetNSSs() const [member function] cls.add_method('GetNSSs', 'uint32_t', [], is_const=True) ## ss-manager.h (module 'wimax'): ns3::SSRecord * ns3::SSManager::GetSSRecord(ns3::Mac48Address const & macAddress) const [member function] cls.add_method('GetSSRecord', 'ns3::SSRecord *', [param('ns3::Mac48Address const &', 'macAddress')], is_const=True) ## ss-manager.h (module 'wimax'): ns3::SSRecord * ns3::SSManager::GetSSRecord(ns3::Cid cid) const [member function] cls.add_method('GetSSRecord', 'ns3::SSRecord *', [param('ns3::Cid', 'cid')], is_const=True) ## ss-manager.h (module 'wimax'): std::vector<ns3::SSRecord*,std::allocator<ns3::SSRecord*> > * ns3::SSManager::GetSSRecords() const [member function] cls.add_method('GetSSRecords', 'std::vector< ns3::SSRecord * > *', [], is_const=True) ## ss-manager.h (module 'wimax'): static ns3::TypeId ns3::SSManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## ss-manager.h (module 'wimax'): bool ns3::SSManager::IsInRecord(ns3::Mac48Address const & macAddress) const [member function] cls.add_method('IsInRecord', 'bool', [param('ns3::Mac48Address const &', 'macAddress')], is_const=True) ## ss-manager.h (module 'wimax'): bool ns3::SSManager::IsRegistered(ns3::Mac48Address const & macAddress) const [member function] cls.add_method('IsRegistered', 'bool', [param('ns3::Mac48Address const &', 'macAddress')], is_const=True) return def register_Ns3SequentialRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::SequentialRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::SequentialRandomVariable::SequentialRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::SequentialRandomVariable::GetMin() const [member function] cls.add_method('GetMin', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::SequentialRandomVariable::GetMax() const [member function] cls.add_method('GetMax', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): ns3::Ptr<ns3::RandomVariableStream> ns3::SequentialRandomVariable::GetIncrement() const [member function] cls.add_method('GetIncrement', 'ns3::Ptr< ns3::RandomVariableStream >', [], is_const=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::SequentialRandomVariable::GetConsecutive() const [member function] cls.add_method('GetConsecutive', 'uint32_t', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::SequentialRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::SequentialRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3ServiceFlowManager_methods(root_module, cls): ## service-flow-manager.h (module 'wimax'): ns3::ServiceFlowManager::ServiceFlowManager(ns3::ServiceFlowManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::ServiceFlowManager const &', 'arg0')]) ## service-flow-manager.h (module 'wimax'): ns3::ServiceFlowManager::ServiceFlowManager() [constructor] cls.add_constructor([]) ## service-flow-manager.h (module 'wimax'): void ns3::ServiceFlowManager::AddServiceFlow(ns3::ServiceFlow * serviceFlow) [member function] cls.add_method('AddServiceFlow', 'void', [param('ns3::ServiceFlow *', 'serviceFlow')]) ## service-flow-manager.h (module 'wimax'): bool ns3::ServiceFlowManager::AreServiceFlowsAllocated() [member function] cls.add_method('AreServiceFlowsAllocated', 'bool', []) ## service-flow-manager.h (module 'wimax'): bool ns3::ServiceFlowManager::AreServiceFlowsAllocated(std::vector<ns3::ServiceFlow*,std::allocator<ns3::ServiceFlow*> > * serviceFlows) [member function] cls.add_method('AreServiceFlowsAllocated', 'bool', [param('std::vector< ns3::ServiceFlow * > *', 'serviceFlows')]) ## service-flow-manager.h (module 'wimax'): bool ns3::ServiceFlowManager::AreServiceFlowsAllocated(std::vector<ns3::ServiceFlow*,std::allocator<ns3::ServiceFlow*> > serviceFlows) [member function] cls.add_method('AreServiceFlowsAllocated', 'bool', [param('std::vector< ns3::ServiceFlow * >', 'serviceFlows')]) ## service-flow-manager.h (module 'wimax'): ns3::ServiceFlow * ns3::ServiceFlowManager::DoClassify(ns3::Ipv4Address SrcAddress, ns3::Ipv4Address DstAddress, uint16_t SrcPort, uint16_t DstPort, uint8_t Proto, ns3::ServiceFlow::Direction dir) const [member function] cls.add_method('DoClassify', 'ns3::ServiceFlow *', [param('ns3::Ipv4Address', 'SrcAddress'), param('ns3::Ipv4Address', 'DstAddress'), param('uint16_t', 'SrcPort'), param('uint16_t', 'DstPort'), param('uint8_t', 'Proto'), param('ns3::ServiceFlow::Direction', 'dir')], is_const=True) ## service-flow-manager.h (module 'wimax'): void ns3::ServiceFlowManager::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], is_virtual=True) ## service-flow-manager.h (module 'wimax'): ns3::ServiceFlow * ns3::ServiceFlowManager::GetNextServiceFlowToAllocate() [member function] cls.add_method('GetNextServiceFlowToAllocate', 'ns3::ServiceFlow *', []) ## service-flow-manager.h (module 'wimax'): uint32_t ns3::ServiceFlowManager::GetNrServiceFlows() const [member function] cls.add_method('GetNrServiceFlows', 'uint32_t', [], is_const=True) ## service-flow-manager.h (module 'wimax'): ns3::ServiceFlow * ns3::ServiceFlowManager::GetServiceFlow(uint32_t sfid) const [member function] cls.add_method('GetServiceFlow', 'ns3::ServiceFlow *', [param('uint32_t', 'sfid')], is_const=True) ## service-flow-manager.h (module 'wimax'): ns3::ServiceFlow * ns3::ServiceFlowManager::GetServiceFlow(ns3::Cid cid) const [member function] cls.add_method('GetServiceFlow', 'ns3::ServiceFlow *', [param('ns3::Cid', 'cid')], is_const=True) ## service-flow-manager.h (module 'wimax'): std::vector<ns3::ServiceFlow*,std::allocator<ns3::ServiceFlow*> > ns3::ServiceFlowManager::GetServiceFlows(ns3::ServiceFlow::SchedulingType schedulingType) const [member function] cls.add_method('GetServiceFlows', 'std::vector< ns3::ServiceFlow * >', [param('ns3::ServiceFlow::SchedulingType', 'schedulingType')], is_const=True) ## service-flow-manager.h (module 'wimax'): static ns3::TypeId ns3::ServiceFlowManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3SfVectorTlvValue_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::SfVectorTlvValue::SfVectorTlvValue(ns3::SfVectorTlvValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::SfVectorTlvValue const &', 'arg0')]) ## wimax-tlv.h (module 'wimax'): ns3::SfVectorTlvValue::SfVectorTlvValue() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): ns3::SfVectorTlvValue * ns3::SfVectorTlvValue::Copy() const [member function] cls.add_method('Copy', 'ns3::SfVectorTlvValue *', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::SfVectorTlvValue::Deserialize(ns3::Buffer::Iterator start, uint64_t valueLength) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start'), param('uint64_t', 'valueLength')], is_virtual=True) return def register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >::SimpleRefCount(ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter< ns3::AttributeAccessor > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >::SimpleRefCount(ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter< ns3::AttributeChecker > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >::SimpleRefCount(ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter< ns3::AttributeValue > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >::SimpleRefCount(ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter< ns3::CallbackImplBase > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >::SimpleRefCount(ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter< ns3::EventImpl > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >::SimpleRefCount(ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >::SimpleRefCount(ns3::SimpleRefCount<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter< ns3::NixVector > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3OutputStreamWrapper_Ns3Empty_Ns3DefaultDeleter__lt__ns3OutputStreamWrapper__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >::SimpleRefCount(ns3::SimpleRefCount<ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter< ns3::OutputStreamWrapper > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >::SimpleRefCount(ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter< ns3::Packet > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >::SimpleRefCount(ns3::SimpleRefCount<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter< ns3::TraceSourceAccessor > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SsServiceFlowManager_methods(root_module, cls): ## ss-service-flow-manager.h (module 'wimax'): ns3::SsServiceFlowManager::SsServiceFlowManager(ns3::SsServiceFlowManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::SsServiceFlowManager const &', 'arg0')]) ## ss-service-flow-manager.h (module 'wimax'): ns3::SsServiceFlowManager::SsServiceFlowManager(ns3::Ptr<ns3::SubscriberStationNetDevice> device) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::SubscriberStationNetDevice >', 'device')]) ## ss-service-flow-manager.h (module 'wimax'): void ns3::SsServiceFlowManager::AddServiceFlow(ns3::ServiceFlow * serviceFlow) [member function] cls.add_method('AddServiceFlow', 'void', [param('ns3::ServiceFlow *', 'serviceFlow')]) ## ss-service-flow-manager.h (module 'wimax'): void ns3::SsServiceFlowManager::AddServiceFlow(ns3::ServiceFlow serviceFlow) [member function] cls.add_method('AddServiceFlow', 'void', [param('ns3::ServiceFlow', 'serviceFlow')]) ## ss-service-flow-manager.h (module 'wimax'): ns3::Ptr<ns3::Packet> ns3::SsServiceFlowManager::CreateDsaAck() [member function] cls.add_method('CreateDsaAck', 'ns3::Ptr< ns3::Packet >', []) ## ss-service-flow-manager.h (module 'wimax'): ns3::DsaReq ns3::SsServiceFlowManager::CreateDsaReq(ns3::ServiceFlow const * serviceFlow) [member function] cls.add_method('CreateDsaReq', 'ns3::DsaReq', [param('ns3::ServiceFlow const *', 'serviceFlow')]) ## ss-service-flow-manager.h (module 'wimax'): void ns3::SsServiceFlowManager::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], is_virtual=True) ## ss-service-flow-manager.h (module 'wimax'): ns3::EventId ns3::SsServiceFlowManager::GetDsaAckTimeoutEvent() const [member function] cls.add_method('GetDsaAckTimeoutEvent', 'ns3::EventId', [], is_const=True) ## ss-service-flow-manager.h (module 'wimax'): ns3::EventId ns3::SsServiceFlowManager::GetDsaRspTimeoutEvent() const [member function] cls.add_method('GetDsaRspTimeoutEvent', 'ns3::EventId', [], is_const=True) ## ss-service-flow-manager.h (module 'wimax'): uint8_t ns3::SsServiceFlowManager::GetMaxDsaReqRetries() const [member function] cls.add_method('GetMaxDsaReqRetries', 'uint8_t', [], is_const=True) ## ss-service-flow-manager.h (module 'wimax'): static ns3::TypeId ns3::SsServiceFlowManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## ss-service-flow-manager.h (module 'wimax'): void ns3::SsServiceFlowManager::InitiateServiceFlows() [member function] cls.add_method('InitiateServiceFlows', 'void', []) ## ss-service-flow-manager.h (module 'wimax'): void ns3::SsServiceFlowManager::ProcessDsaRsp(ns3::DsaRsp const & dsaRsp) [member function] cls.add_method('ProcessDsaRsp', 'void', [param('ns3::DsaRsp const &', 'dsaRsp')]) ## ss-service-flow-manager.h (module 'wimax'): void ns3::SsServiceFlowManager::ScheduleDsaReq(ns3::ServiceFlow const * serviceFlow) [member function] cls.add_method('ScheduleDsaReq', 'void', [param('ns3::ServiceFlow const *', 'serviceFlow')]) ## ss-service-flow-manager.h (module 'wimax'): void ns3::SsServiceFlowManager::SetMaxDsaReqRetries(uint8_t maxDsaReqRetries) [member function] cls.add_method('SetMaxDsaReqRetries', 'void', [param('uint8_t', 'maxDsaReqRetries')]) return def register_Ns3ThreeLogDistancePropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::ThreeLogDistancePropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::ThreeLogDistancePropagationLossModel::ThreeLogDistancePropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): double ns3::ThreeLogDistancePropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::ThreeLogDistancePropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3Time_methods(root_module, cls): cls.add_binary_comparison_operator('<=') cls.add_binary_comparison_operator('!=') cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', u'right')) cls.add_binary_numeric_operator('*', root_module['ns3::Time'], root_module['ns3::Time'], param('int64_t const &', u'right')) cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', u'right')) cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', u'right')) cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::Time'], param('int64_t const &', u'right')) cls.add_binary_comparison_operator('<') cls.add_binary_comparison_operator('>') cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', u'right')) cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') cls.add_binary_comparison_operator('>=') ## nstime.h (module 'core'): ns3::Time::Time() [constructor] cls.add_constructor([]) ## nstime.h (module 'core'): ns3::Time::Time(ns3::Time const & o) [copy constructor] cls.add_constructor([param('ns3::Time const &', 'o')]) ## nstime.h (module 'core'): ns3::Time::Time(double v) [constructor] cls.add_constructor([param('double', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(int v) [constructor] cls.add_constructor([param('int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(long int v) [constructor] cls.add_constructor([param('long int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(long long int v) [constructor] cls.add_constructor([param('long long int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(unsigned int v) [constructor] cls.add_constructor([param('unsigned int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(long unsigned int v) [constructor] cls.add_constructor([param('long unsigned int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor] cls.add_constructor([param('long long unsigned int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor] cls.add_constructor([param('ns3::int64x64_t const &', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor] cls.add_constructor([param('std::string const &', 's')]) ## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function] cls.add_method('As', 'ns3::TimeWithUnit', [param('ns3::Time::Unit const', 'unit')], is_const=True) ## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function] cls.add_method('Compare', 'int', [param('ns3::Time const &', 'o')], is_const=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function] cls.add_method('From', 'ns3::Time', [param('ns3::int64x64_t const &', 'value')], is_static=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function] cls.add_method('From', 'ns3::Time', [param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')], is_static=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function] cls.add_method('FromDouble', 'ns3::Time', [param('double', 'value'), param('ns3::Time::Unit', 'unit')], is_static=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function] cls.add_method('FromInteger', 'ns3::Time', [param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')], is_static=True) ## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function] cls.add_method('GetDays', 'double', [], is_const=True) ## nstime.h (module 'core'): double ns3::Time::GetDouble() const [member function] cls.add_method('GetDouble', 'double', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetFemtoSeconds() const [member function] cls.add_method('GetFemtoSeconds', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): double ns3::Time::GetHours() const [member function] cls.add_method('GetHours', 'double', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetInteger() const [member function] cls.add_method('GetInteger', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetMicroSeconds() const [member function] cls.add_method('GetMicroSeconds', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetMilliSeconds() const [member function] cls.add_method('GetMilliSeconds', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): double ns3::Time::GetMinutes() const [member function] cls.add_method('GetMinutes', 'double', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetNanoSeconds() const [member function] cls.add_method('GetNanoSeconds', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetPicoSeconds() const [member function] cls.add_method('GetPicoSeconds', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): static ns3::Time::Unit ns3::Time::GetResolution() [member function] cls.add_method('GetResolution', 'ns3::Time::Unit', [], is_static=True) ## nstime.h (module 'core'): double ns3::Time::GetSeconds() const [member function] cls.add_method('GetSeconds', 'double', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetTimeStep() const [member function] cls.add_method('GetTimeStep', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): double ns3::Time::GetYears() const [member function] cls.add_method('GetYears', 'double', [], is_const=True) ## nstime.h (module 'core'): bool ns3::Time::IsNegative() const [member function] cls.add_method('IsNegative', 'bool', [], is_const=True) ## nstime.h (module 'core'): bool ns3::Time::IsPositive() const [member function] cls.add_method('IsPositive', 'bool', [], is_const=True) ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyNegative() const [member function] cls.add_method('IsStrictlyNegative', 'bool', [], is_const=True) ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyPositive() const [member function] cls.add_method('IsStrictlyPositive', 'bool', [], is_const=True) ## nstime.h (module 'core'): bool ns3::Time::IsZero() const [member function] cls.add_method('IsZero', 'bool', [], is_const=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] cls.add_method('Max', 'ns3::Time', [], is_static=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] cls.add_method('Min', 'ns3::Time', [], is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] cls.add_method('StaticInit', 'bool', [], is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function] cls.add_method('To', 'ns3::int64x64_t', [param('ns3::Time::Unit', 'unit')], is_const=True) ## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function] cls.add_method('ToDouble', 'double', [param('ns3::Time::Unit', 'unit')], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function] cls.add_method('ToInteger', 'int64_t', [param('ns3::Time::Unit', 'unit')], is_const=True) return def register_Ns3Tlv_methods(root_module, cls): ## wimax-tlv.h (module 'wimax'): ns3::Tlv::Tlv(uint8_t type, uint64_t length, ns3::TlvValue const & value) [constructor] cls.add_constructor([param('uint8_t', 'type'), param('uint64_t', 'length'), param('ns3::TlvValue const &', 'value')]) ## wimax-tlv.h (module 'wimax'): ns3::Tlv::Tlv() [constructor] cls.add_constructor([]) ## wimax-tlv.h (module 'wimax'): ns3::Tlv::Tlv(ns3::Tlv const & tlv) [copy constructor] cls.add_constructor([param('ns3::Tlv const &', 'tlv')]) ## wimax-tlv.h (module 'wimax'): ns3::Tlv * ns3::Tlv::Copy() const [member function] cls.add_method('Copy', 'ns3::Tlv *', [], is_const=True) ## wimax-tlv.h (module 'wimax'): ns3::TlvValue * ns3::Tlv::CopyValue() const [member function] cls.add_method('CopyValue', 'ns3::TlvValue *', [], is_const=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::Tlv::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## wimax-tlv.h (module 'wimax'): ns3::TypeId ns3::Tlv::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint64_t ns3::Tlv::GetLength() const [member function] cls.add_method('GetLength', 'uint64_t', [], is_const=True) ## wimax-tlv.h (module 'wimax'): uint32_t ns3::Tlv::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): uint8_t ns3::Tlv::GetSizeOfLen() const [member function] cls.add_method('GetSizeOfLen', 'uint8_t', [], is_const=True) ## wimax-tlv.h (module 'wimax'): uint8_t ns3::Tlv::GetType() const [member function] cls.add_method('GetType', 'uint8_t', [], is_const=True) ## wimax-tlv.h (module 'wimax'): static ns3::TypeId ns3::Tlv::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wimax-tlv.h (module 'wimax'): ns3::TlvValue * ns3::Tlv::PeekValue() [member function] cls.add_method('PeekValue', 'ns3::TlvValue *', []) ## wimax-tlv.h (module 'wimax'): void ns3::Tlv::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## wimax-tlv.h (module 'wimax'): void ns3::Tlv::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) return def register_Ns3TraceSourceAccessor_methods(root_module, cls): ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor::TraceSourceAccessor(ns3::TraceSourceAccessor const & arg0) [copy constructor] cls.add_constructor([param('ns3::TraceSourceAccessor const &', 'arg0')]) ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor::TraceSourceAccessor() [constructor] cls.add_constructor([]) ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::Connect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function] cls.add_method('Connect', 'bool', [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')], is_pure_virtual=True, is_const=True, is_virtual=True) ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::ConnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function] cls.add_method('ConnectWithoutContext', 'bool', [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')], is_pure_virtual=True, is_const=True, is_virtual=True) ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::Disconnect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function] cls.add_method('Disconnect', 'bool', [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')], is_pure_virtual=True, is_const=True, is_virtual=True) ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::DisconnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function] cls.add_method('DisconnectWithoutContext', 'bool', [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3Trailer_methods(root_module, cls): cls.add_output_stream_operator() ## trailer.h (module 'network'): ns3::Trailer::Trailer() [constructor] cls.add_constructor([]) ## trailer.h (module 'network'): ns3::Trailer::Trailer(ns3::Trailer const & arg0) [copy constructor] cls.add_constructor([param('ns3::Trailer const &', 'arg0')]) ## trailer.h (module 'network'): uint32_t ns3::Trailer::Deserialize(ns3::Buffer::Iterator end) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'end')], is_pure_virtual=True, is_virtual=True) ## trailer.h (module 'network'): uint32_t ns3::Trailer::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## trailer.h (module 'network'): static ns3::TypeId ns3::Trailer::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## trailer.h (module 'network'): void ns3::Trailer::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_pure_virtual=True, is_const=True, is_virtual=True) ## trailer.h (module 'network'): void ns3::Trailer::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3TriangularRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::TriangularRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::TriangularRandomVariable::TriangularRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetMean() const [member function] cls.add_method('GetMean', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetMin() const [member function] cls.add_method('GetMin', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetMax() const [member function] cls.add_method('GetMax', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetValue(double mean, double min, double max) [member function] cls.add_method('GetValue', 'double', [param('double', 'mean'), param('double', 'min'), param('double', 'max')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::TriangularRandomVariable::GetInteger(uint32_t mean, uint32_t min, uint32_t max) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mean'), param('uint32_t', 'min'), param('uint32_t', 'max')]) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::TriangularRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3TwoRayGroundPropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::TwoRayGroundPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::TwoRayGroundPropagationLossModel::TwoRayGroundPropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function] cls.add_method('SetFrequency', 'void', [param('double', 'frequency')]) ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetSystemLoss(double systemLoss) [member function] cls.add_method('SetSystemLoss', 'void', [param('double', 'systemLoss')]) ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetMinDistance(double minDistance) [member function] cls.add_method('SetMinDistance', 'void', [param('double', 'minDistance')]) ## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetMinDistance() const [member function] cls.add_method('GetMinDistance', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetFrequency() const [member function] cls.add_method('GetFrequency', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetSystemLoss() const [member function] cls.add_method('GetSystemLoss', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetHeightAboveZ(double heightAboveZ) [member function] cls.add_method('SetHeightAboveZ', 'void', [param('double', 'heightAboveZ')]) ## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::TwoRayGroundPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3Ucd_methods(root_module, cls): ## ul-mac-messages.h (module 'wimax'): ns3::Ucd::Ucd(ns3::Ucd const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ucd const &', 'arg0')]) ## ul-mac-messages.h (module 'wimax'): ns3::Ucd::Ucd() [constructor] cls.add_constructor([]) ## ul-mac-messages.h (module 'wimax'): void ns3::Ucd::AddUlBurstProfile(ns3::OfdmUlBurstProfile ulBurstProfile) [member function] cls.add_method('AddUlBurstProfile', 'void', [param('ns3::OfdmUlBurstProfile', 'ulBurstProfile')]) ## ul-mac-messages.h (module 'wimax'): uint32_t ns3::Ucd::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## ul-mac-messages.h (module 'wimax'): ns3::OfdmUcdChannelEncodings ns3::Ucd::GetChannelEncodings() const [member function] cls.add_method('GetChannelEncodings', 'ns3::OfdmUcdChannelEncodings', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::Ucd::GetConfigurationChangeCount() const [member function] cls.add_method('GetConfigurationChangeCount', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): ns3::TypeId ns3::Ucd::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## ul-mac-messages.h (module 'wimax'): std::string ns3::Ucd::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::Ucd::GetNrUlBurstProfiles() const [member function] cls.add_method('GetNrUlBurstProfiles', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::Ucd::GetRangingBackoffEnd() const [member function] cls.add_method('GetRangingBackoffEnd', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::Ucd::GetRangingBackoffStart() const [member function] cls.add_method('GetRangingBackoffStart', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::Ucd::GetRequestBackoffEnd() const [member function] cls.add_method('GetRequestBackoffEnd', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::Ucd::GetRequestBackoffStart() const [member function] cls.add_method('GetRequestBackoffStart', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint32_t ns3::Ucd::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## ul-mac-messages.h (module 'wimax'): static ns3::TypeId ns3::Ucd::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## ul-mac-messages.h (module 'wimax'): std::vector<ns3::OfdmUlBurstProfile, std::allocator<ns3::OfdmUlBurstProfile> > ns3::Ucd::GetUlBurstProfiles() const [member function] cls.add_method('GetUlBurstProfiles', 'std::vector< ns3::OfdmUlBurstProfile >', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): void ns3::Ucd::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## ul-mac-messages.h (module 'wimax'): void ns3::Ucd::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## ul-mac-messages.h (module 'wimax'): void ns3::Ucd::SetChannelEncodings(ns3::OfdmUcdChannelEncodings channelEncodings) [member function] cls.add_method('SetChannelEncodings', 'void', [param('ns3::OfdmUcdChannelEncodings', 'channelEncodings')]) ## ul-mac-messages.h (module 'wimax'): void ns3::Ucd::SetConfigurationChangeCount(uint8_t ucdCount) [member function] cls.add_method('SetConfigurationChangeCount', 'void', [param('uint8_t', 'ucdCount')]) ## ul-mac-messages.h (module 'wimax'): void ns3::Ucd::SetNrUlBurstProfiles(uint8_t nrUlBurstProfiles) [member function] cls.add_method('SetNrUlBurstProfiles', 'void', [param('uint8_t', 'nrUlBurstProfiles')]) ## ul-mac-messages.h (module 'wimax'): void ns3::Ucd::SetRangingBackoffEnd(uint8_t rangingBackoffEnd) [member function] cls.add_method('SetRangingBackoffEnd', 'void', [param('uint8_t', 'rangingBackoffEnd')]) ## ul-mac-messages.h (module 'wimax'): void ns3::Ucd::SetRangingBackoffStart(uint8_t rangingBackoffStart) [member function] cls.add_method('SetRangingBackoffStart', 'void', [param('uint8_t', 'rangingBackoffStart')]) ## ul-mac-messages.h (module 'wimax'): void ns3::Ucd::SetRequestBackoffEnd(uint8_t requestBackoffEnd) [member function] cls.add_method('SetRequestBackoffEnd', 'void', [param('uint8_t', 'requestBackoffEnd')]) ## ul-mac-messages.h (module 'wimax'): void ns3::Ucd::SetRequestBackoffStart(uint8_t requestBackoffStart) [member function] cls.add_method('SetRequestBackoffStart', 'void', [param('uint8_t', 'requestBackoffStart')]) return def register_Ns3UlJob_methods(root_module, cls): cls.add_binary_comparison_operator('==') ## ul-job.h (module 'wimax'): ns3::UlJob::UlJob(ns3::UlJob const & arg0) [copy constructor] cls.add_constructor([param('ns3::UlJob const &', 'arg0')]) ## ul-job.h (module 'wimax'): ns3::UlJob::UlJob() [constructor] cls.add_constructor([]) ## ul-job.h (module 'wimax'): ns3::Time ns3::UlJob::GetDeadline() [member function] cls.add_method('GetDeadline', 'ns3::Time', []) ## ul-job.h (module 'wimax'): ns3::Time ns3::UlJob::GetPeriod() [member function] cls.add_method('GetPeriod', 'ns3::Time', []) ## ul-job.h (module 'wimax'): ns3::Time ns3::UlJob::GetReleaseTime() [member function] cls.add_method('GetReleaseTime', 'ns3::Time', []) ## ul-job.h (module 'wimax'): ns3::ServiceFlow::SchedulingType ns3::UlJob::GetSchedulingType() [member function] cls.add_method('GetSchedulingType', 'ns3::ServiceFlow::SchedulingType', []) ## ul-job.h (module 'wimax'): ns3::ServiceFlow * ns3::UlJob::GetServiceFlow() [member function] cls.add_method('GetServiceFlow', 'ns3::ServiceFlow *', []) ## ul-job.h (module 'wimax'): uint32_t ns3::UlJob::GetSize() [member function] cls.add_method('GetSize', 'uint32_t', []) ## ul-job.h (module 'wimax'): ns3::SSRecord * ns3::UlJob::GetSsRecord() [member function] cls.add_method('GetSsRecord', 'ns3::SSRecord *', []) ## ul-job.h (module 'wimax'): ns3::ReqType ns3::UlJob::GetType() [member function] cls.add_method('GetType', 'ns3::ReqType', []) ## ul-job.h (module 'wimax'): void ns3::UlJob::SetDeadline(ns3::Time deadline) [member function] cls.add_method('SetDeadline', 'void', [param('ns3::Time', 'deadline')]) ## ul-job.h (module 'wimax'): void ns3::UlJob::SetPeriod(ns3::Time period) [member function] cls.add_method('SetPeriod', 'void', [param('ns3::Time', 'period')]) ## ul-job.h (module 'wimax'): void ns3::UlJob::SetReleaseTime(ns3::Time releaseTime) [member function] cls.add_method('SetReleaseTime', 'void', [param('ns3::Time', 'releaseTime')]) ## ul-job.h (module 'wimax'): void ns3::UlJob::SetSchedulingType(ns3::ServiceFlow::SchedulingType schedulingType) [member function] cls.add_method('SetSchedulingType', 'void', [param('ns3::ServiceFlow::SchedulingType', 'schedulingType')]) ## ul-job.h (module 'wimax'): void ns3::UlJob::SetServiceFlow(ns3::ServiceFlow * serviceFlow) [member function] cls.add_method('SetServiceFlow', 'void', [param('ns3::ServiceFlow *', 'serviceFlow')]) ## ul-job.h (module 'wimax'): void ns3::UlJob::SetSize(uint32_t size) [member function] cls.add_method('SetSize', 'void', [param('uint32_t', 'size')]) ## ul-job.h (module 'wimax'): void ns3::UlJob::SetSsRecord(ns3::SSRecord * ssRecord) [member function] cls.add_method('SetSsRecord', 'void', [param('ns3::SSRecord *', 'ssRecord')]) ## ul-job.h (module 'wimax'): void ns3::UlJob::SetType(ns3::ReqType type) [member function] cls.add_method('SetType', 'void', [param('ns3::ReqType', 'type')]) return def register_Ns3UlMap_methods(root_module, cls): ## ul-mac-messages.h (module 'wimax'): ns3::UlMap::UlMap(ns3::UlMap const & arg0) [copy constructor] cls.add_constructor([param('ns3::UlMap const &', 'arg0')]) ## ul-mac-messages.h (module 'wimax'): ns3::UlMap::UlMap() [constructor] cls.add_constructor([]) ## ul-mac-messages.h (module 'wimax'): void ns3::UlMap::AddUlMapElement(ns3::OfdmUlMapIe ulMapElement) [member function] cls.add_method('AddUlMapElement', 'void', [param('ns3::OfdmUlMapIe', 'ulMapElement')]) ## ul-mac-messages.h (module 'wimax'): uint32_t ns3::UlMap::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## ul-mac-messages.h (module 'wimax'): uint32_t ns3::UlMap::GetAllocationStartTime() const [member function] cls.add_method('GetAllocationStartTime', 'uint32_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): ns3::TypeId ns3::UlMap::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## ul-mac-messages.h (module 'wimax'): std::string ns3::UlMap::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): uint32_t ns3::UlMap::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## ul-mac-messages.h (module 'wimax'): static ns3::TypeId ns3::UlMap::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## ul-mac-messages.h (module 'wimax'): uint8_t ns3::UlMap::GetUcdCount() const [member function] cls.add_method('GetUcdCount', 'uint8_t', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): std::list<ns3::OfdmUlMapIe, std::allocator<ns3::OfdmUlMapIe> > ns3::UlMap::GetUlMapElements() const [member function] cls.add_method('GetUlMapElements', 'std::list< ns3::OfdmUlMapIe >', [], is_const=True) ## ul-mac-messages.h (module 'wimax'): void ns3::UlMap::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## ul-mac-messages.h (module 'wimax'): void ns3::UlMap::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## ul-mac-messages.h (module 'wimax'): void ns3::UlMap::SetAllocationStartTime(uint32_t allocationStartTime) [member function] cls.add_method('SetAllocationStartTime', 'void', [param('uint32_t', 'allocationStartTime')]) ## ul-mac-messages.h (module 'wimax'): void ns3::UlMap::SetUcdCount(uint8_t ucdCount) [member function] cls.add_method('SetUcdCount', 'void', [param('uint8_t', 'ucdCount')]) return def register_Ns3UniformRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::UniformRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::UniformRandomVariable::UniformRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::UniformRandomVariable::GetMin() const [member function] cls.add_method('GetMin', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::UniformRandomVariable::GetMax() const [member function] cls.add_method('GetMax', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::UniformRandomVariable::GetValue(double min, double max) [member function] cls.add_method('GetValue', 'double', [param('double', 'min'), param('double', 'max')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::UniformRandomVariable::GetInteger(uint32_t min, uint32_t max) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'min'), param('uint32_t', 'max')]) ## random-variable-stream.h (module 'core'): double ns3::UniformRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::UniformRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3UplinkScheduler_methods(root_module, cls): ## bs-uplink-scheduler.h (module 'wimax'): ns3::UplinkScheduler::UplinkScheduler(ns3::UplinkScheduler const & arg0) [copy constructor] cls.add_constructor([param('ns3::UplinkScheduler const &', 'arg0')]) ## bs-uplink-scheduler.h (module 'wimax'): ns3::UplinkScheduler::UplinkScheduler() [constructor] cls.add_constructor([]) ## bs-uplink-scheduler.h (module 'wimax'): ns3::UplinkScheduler::UplinkScheduler(ns3::Ptr<ns3::BaseStationNetDevice> bs) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::BaseStationNetDevice >', 'bs')]) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::AddUplinkAllocation(ns3::OfdmUlMapIe & ulMapIe, uint32_t const & allocationSize, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('AddUplinkAllocation', 'void', [param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('uint32_t const &', 'allocationSize'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_pure_virtual=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::AllocateInitialRangingInterval(uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('AllocateInitialRangingInterval', 'void', [param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_pure_virtual=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): uint32_t ns3::UplinkScheduler::CalculateAllocationStartTime() [member function] cls.add_method('CalculateAllocationStartTime', 'uint32_t', [], is_pure_virtual=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): ns3::Ptr<ns3::BaseStationNetDevice> ns3::UplinkScheduler::GetBs() [member function] cls.add_method('GetBs', 'ns3::Ptr< ns3::BaseStationNetDevice >', [], is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::GetChannelDescriptorsToUpdate(bool & arg0, bool & arg1, bool & arg2, bool & arg3) [member function] cls.add_method('GetChannelDescriptorsToUpdate', 'void', [param('bool &', 'arg0'), param('bool &', 'arg1'), param('bool &', 'arg2'), param('bool &', 'arg3')], is_pure_virtual=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): ns3::Time ns3::UplinkScheduler::GetDcdTimeStamp() const [member function] cls.add_method('GetDcdTimeStamp', 'ns3::Time', [], is_const=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): bool ns3::UplinkScheduler::GetIsInvIrIntrvlAllocated() const [member function] cls.add_method('GetIsInvIrIntrvlAllocated', 'bool', [], is_const=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): bool ns3::UplinkScheduler::GetIsIrIntrvlAllocated() const [member function] cls.add_method('GetIsIrIntrvlAllocated', 'bool', [], is_const=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): uint8_t ns3::UplinkScheduler::GetNrIrOppsAllocated() const [member function] cls.add_method('GetNrIrOppsAllocated', 'uint8_t', [], is_const=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): ns3::Time ns3::UplinkScheduler::GetTimeStampIrInterval() [member function] cls.add_method('GetTimeStampIrInterval', 'ns3::Time', [], is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): static ns3::TypeId ns3::UplinkScheduler::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## bs-uplink-scheduler.h (module 'wimax'): ns3::Time ns3::UplinkScheduler::GetUcdTimeStamp() const [member function] cls.add_method('GetUcdTimeStamp', 'ns3::Time', [], is_const=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): std::list<ns3::OfdmUlMapIe, std::allocator<ns3::OfdmUlMapIe> > ns3::UplinkScheduler::GetUplinkAllocations() const [member function] cls.add_method('GetUplinkAllocations', 'std::list< ns3::OfdmUlMapIe >', [], is_const=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::InitOnce() [member function] cls.add_method('InitOnce', 'void', [], is_pure_virtual=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::OnSetRequestedBandwidth(ns3::ServiceFlowRecord * sfr) [member function] cls.add_method('OnSetRequestedBandwidth', 'void', [param('ns3::ServiceFlowRecord *', 'sfr')], is_pure_virtual=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::ProcessBandwidthRequest(ns3::BandwidthRequestHeader const & bwRequestHdr) [member function] cls.add_method('ProcessBandwidthRequest', 'void', [param('ns3::BandwidthRequestHeader const &', 'bwRequestHdr')], is_pure_virtual=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::Schedule() [member function] cls.add_method('Schedule', 'void', [], is_pure_virtual=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::ServiceBandwidthRequests(ns3::SSRecord const * ssRecord, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ServiceBandwidthRequests', 'void', [param('ns3::SSRecord const *', 'ssRecord'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_pure_virtual=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): bool ns3::UplinkScheduler::ServiceBandwidthRequests(ns3::ServiceFlow * serviceFlow, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ServiceBandwidthRequests', 'bool', [param('ns3::ServiceFlow *', 'serviceFlow'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_pure_virtual=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::ServiceUnsolicitedGrants(ns3::SSRecord const * ssRecord, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ServiceUnsolicitedGrants', 'void', [param('ns3::SSRecord const *', 'ssRecord'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_pure_virtual=True, is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::SetBs(ns3::Ptr<ns3::BaseStationNetDevice> bs) [member function] cls.add_method('SetBs', 'void', [param('ns3::Ptr< ns3::BaseStationNetDevice >', 'bs')], is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::SetDcdTimeStamp(ns3::Time dcdTimeStamp) [member function] cls.add_method('SetDcdTimeStamp', 'void', [param('ns3::Time', 'dcdTimeStamp')], is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::SetIsInvIrIntrvlAllocated(bool isInvIrIntrvlAllocated) [member function] cls.add_method('SetIsInvIrIntrvlAllocated', 'void', [param('bool', 'isInvIrIntrvlAllocated')], is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::SetIsIrIntrvlAllocated(bool isIrIntrvlAllocated) [member function] cls.add_method('SetIsIrIntrvlAllocated', 'void', [param('bool', 'isIrIntrvlAllocated')], is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::SetNrIrOppsAllocated(uint8_t nrIrOppsAllocated) [member function] cls.add_method('SetNrIrOppsAllocated', 'void', [param('uint8_t', 'nrIrOppsAllocated')], is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::SetTimeStampIrInterval(ns3::Time timeStampIrInterval) [member function] cls.add_method('SetTimeStampIrInterval', 'void', [param('ns3::Time', 'timeStampIrInterval')], is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::SetUcdTimeStamp(ns3::Time ucdTimeStamp) [member function] cls.add_method('SetUcdTimeStamp', 'void', [param('ns3::Time', 'ucdTimeStamp')], is_virtual=True) ## bs-uplink-scheduler.h (module 'wimax'): void ns3::UplinkScheduler::SetupServiceFlow(ns3::SSRecord * ssRecord, ns3::ServiceFlow * serviceFlow) [member function] cls.add_method('SetupServiceFlow', 'void', [param('ns3::SSRecord *', 'ssRecord'), param('ns3::ServiceFlow *', 'serviceFlow')], is_pure_virtual=True, is_virtual=True) return def register_Ns3UplinkSchedulerMBQoS_methods(root_module, cls): ## bs-uplink-scheduler-mbqos.h (module 'wimax'): ns3::UplinkSchedulerMBQoS::UplinkSchedulerMBQoS(ns3::UplinkSchedulerMBQoS const & arg0) [copy constructor] cls.add_constructor([param('ns3::UplinkSchedulerMBQoS const &', 'arg0')]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): ns3::UplinkSchedulerMBQoS::UplinkSchedulerMBQoS() [constructor] cls.add_constructor([]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): ns3::UplinkSchedulerMBQoS::UplinkSchedulerMBQoS(ns3::Time time) [constructor] cls.add_constructor([param('ns3::Time', 'time')]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::AddUplinkAllocation(ns3::OfdmUlMapIe & ulMapIe, uint32_t const & allocationSize, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('AddUplinkAllocation', 'void', [param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('uint32_t const &', 'allocationSize'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::AllocateInitialRangingInterval(uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('AllocateInitialRangingInterval', 'void', [param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): uint32_t ns3::UplinkSchedulerMBQoS::CalculateAllocationStartTime() [member function] cls.add_method('CalculateAllocationStartTime', 'uint32_t', [], is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::CheckDeadline(uint32_t & availableSymbols) [member function] cls.add_method('CheckDeadline', 'void', [param('uint32_t &', 'availableSymbols')]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::CheckMinimumBandwidth(uint32_t & availableSymbols) [member function] cls.add_method('CheckMinimumBandwidth', 'void', [param('uint32_t &', 'availableSymbols')]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): uint32_t ns3::UplinkSchedulerMBQoS::CountSymbolsJobs(ns3::Ptr<ns3::UlJob> job) [member function] cls.add_method('CountSymbolsJobs', 'uint32_t', [param('ns3::Ptr< ns3::UlJob >', 'job')]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): uint32_t ns3::UplinkSchedulerMBQoS::CountSymbolsQueue(std::list<ns3::Ptr<ns3::UlJob>, std::allocator<ns3::Ptr<ns3::UlJob> > > jobs) [member function] cls.add_method('CountSymbolsQueue', 'uint32_t', [param('std::list< ns3::Ptr< ns3::UlJob > >', 'jobs')]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): ns3::Ptr<ns3::UlJob> ns3::UplinkSchedulerMBQoS::CreateUlJob(ns3::SSRecord * ssRecord, ns3::ServiceFlow::SchedulingType schedType, ns3::ReqType reqType) [member function] cls.add_method('CreateUlJob', 'ns3::Ptr< ns3::UlJob >', [param('ns3::SSRecord *', 'ssRecord'), param('ns3::ServiceFlow::SchedulingType', 'schedType'), param('ns3::ReqType', 'reqType')]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): ns3::Ptr<ns3::UlJob> ns3::UplinkSchedulerMBQoS::DequeueJob(ns3::UlJob::JobPriority priority) [member function] cls.add_method('DequeueJob', 'ns3::Ptr< ns3::UlJob >', [param('ns3::UlJob::JobPriority', 'priority')]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): ns3::Time ns3::UplinkSchedulerMBQoS::DetermineDeadline(ns3::ServiceFlow * serviceFlow) [member function] cls.add_method('DetermineDeadline', 'ns3::Time', [param('ns3::ServiceFlow *', 'serviceFlow')]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::EnqueueJob(ns3::UlJob::JobPriority priority, ns3::Ptr<ns3::UlJob> job) [member function] cls.add_method('EnqueueJob', 'void', [param('ns3::UlJob::JobPriority', 'priority'), param('ns3::Ptr< ns3::UlJob >', 'job')]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::GetChannelDescriptorsToUpdate(bool & arg0, bool & arg1, bool & arg2, bool & arg3) [member function] cls.add_method('GetChannelDescriptorsToUpdate', 'void', [param('bool &', 'arg0'), param('bool &', 'arg1'), param('bool &', 'arg2'), param('bool &', 'arg3')], is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): uint32_t ns3::UplinkSchedulerMBQoS::GetPendingSize(ns3::ServiceFlow * serviceFlow) [member function] cls.add_method('GetPendingSize', 'uint32_t', [param('ns3::ServiceFlow *', 'serviceFlow')]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): static ns3::TypeId ns3::UplinkSchedulerMBQoS::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): std::list<ns3::OfdmUlMapIe, std::allocator<ns3::OfdmUlMapIe> > ns3::UplinkSchedulerMBQoS::GetUplinkAllocations() const [member function] cls.add_method('GetUplinkAllocations', 'std::list< ns3::OfdmUlMapIe >', [], is_const=True, is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::InitOnce() [member function] cls.add_method('InitOnce', 'void', [], is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::OnSetRequestedBandwidth(ns3::ServiceFlowRecord * sfr) [member function] cls.add_method('OnSetRequestedBandwidth', 'void', [param('ns3::ServiceFlowRecord *', 'sfr')], is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::ProcessBandwidthRequest(ns3::BandwidthRequestHeader const & bwRequestHdr) [member function] cls.add_method('ProcessBandwidthRequest', 'void', [param('ns3::BandwidthRequestHeader const &', 'bwRequestHdr')], is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::Schedule() [member function] cls.add_method('Schedule', 'void', [], is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::ServiceBandwidthRequests(ns3::SSRecord const * ssRecord, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ServiceBandwidthRequests', 'void', [param('ns3::SSRecord const *', 'ssRecord'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): bool ns3::UplinkSchedulerMBQoS::ServiceBandwidthRequests(ns3::ServiceFlow * serviceFlow, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ServiceBandwidthRequests', 'bool', [param('ns3::ServiceFlow *', 'serviceFlow'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): bool ns3::UplinkSchedulerMBQoS::ServiceBandwidthRequestsBytes(ns3::ServiceFlow * serviceFlow, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols, uint32_t allocationSizeBytes) [member function] cls.add_method('ServiceBandwidthRequestsBytes', 'bool', [param('ns3::ServiceFlow *', 'serviceFlow'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols'), param('uint32_t', 'allocationSizeBytes')]) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::ServiceUnsolicitedGrants(ns3::SSRecord const * ssRecord, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ServiceUnsolicitedGrants', 'void', [param('ns3::SSRecord const *', 'ssRecord'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::SetupServiceFlow(ns3::SSRecord * ssRecord, ns3::ServiceFlow * serviceFlow) [member function] cls.add_method('SetupServiceFlow', 'void', [param('ns3::SSRecord *', 'ssRecord'), param('ns3::ServiceFlow *', 'serviceFlow')], is_virtual=True) ## bs-uplink-scheduler-mbqos.h (module 'wimax'): void ns3::UplinkSchedulerMBQoS::UplinkSchedWindowTimer() [member function] cls.add_method('UplinkSchedWindowTimer', 'void', []) return def register_Ns3UplinkSchedulerRtps_methods(root_module, cls): ## bs-uplink-scheduler-rtps.h (module 'wimax'): ns3::UplinkSchedulerRtps::UplinkSchedulerRtps(ns3::UplinkSchedulerRtps const & arg0) [copy constructor] cls.add_constructor([param('ns3::UplinkSchedulerRtps const &', 'arg0')]) ## bs-uplink-scheduler-rtps.h (module 'wimax'): ns3::UplinkSchedulerRtps::UplinkSchedulerRtps() [constructor] cls.add_constructor([]) ## bs-uplink-scheduler-rtps.h (module 'wimax'): ns3::UplinkSchedulerRtps::UplinkSchedulerRtps(ns3::Ptr<ns3::BaseStationNetDevice> bs) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::BaseStationNetDevice >', 'bs')]) ## bs-uplink-scheduler-rtps.h (module 'wimax'): void ns3::UplinkSchedulerRtps::AddUplinkAllocation(ns3::OfdmUlMapIe & ulMapIe, uint32_t const & allocationSize, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('AddUplinkAllocation', 'void', [param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('uint32_t const &', 'allocationSize'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): void ns3::UplinkSchedulerRtps::AllocateInitialRangingInterval(uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('AllocateInitialRangingInterval', 'void', [param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): uint32_t ns3::UplinkSchedulerRtps::CalculateAllocationStartTime() [member function] cls.add_method('CalculateAllocationStartTime', 'uint32_t', [], is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): void ns3::UplinkSchedulerRtps::GetChannelDescriptorsToUpdate(bool & arg0, bool & arg1, bool & arg2, bool & arg3) [member function] cls.add_method('GetChannelDescriptorsToUpdate', 'void', [param('bool &', 'arg0'), param('bool &', 'arg1'), param('bool &', 'arg2'), param('bool &', 'arg3')], is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): static ns3::TypeId ns3::UplinkSchedulerRtps::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): std::list<ns3::OfdmUlMapIe, std::allocator<ns3::OfdmUlMapIe> > ns3::UplinkSchedulerRtps::GetUplinkAllocations() const [member function] cls.add_method('GetUplinkAllocations', 'std::list< ns3::OfdmUlMapIe >', [], is_const=True, is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): void ns3::UplinkSchedulerRtps::InitOnce() [member function] cls.add_method('InitOnce', 'void', [], is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): void ns3::UplinkSchedulerRtps::OnSetRequestedBandwidth(ns3::ServiceFlowRecord * sfr) [member function] cls.add_method('OnSetRequestedBandwidth', 'void', [param('ns3::ServiceFlowRecord *', 'sfr')], is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): void ns3::UplinkSchedulerRtps::ProcessBandwidthRequest(ns3::BandwidthRequestHeader const & bwRequestHdr) [member function] cls.add_method('ProcessBandwidthRequest', 'void', [param('ns3::BandwidthRequestHeader const &', 'bwRequestHdr')], is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): void ns3::UplinkSchedulerRtps::Schedule() [member function] cls.add_method('Schedule', 'void', [], is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): void ns3::UplinkSchedulerRtps::ServiceBandwidthRequests(ns3::SSRecord const * ssRecord, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ServiceBandwidthRequests', 'void', [param('ns3::SSRecord const *', 'ssRecord'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): bool ns3::UplinkSchedulerRtps::ServiceBandwidthRequests(ns3::ServiceFlow * serviceFlow, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ServiceBandwidthRequests', 'bool', [param('ns3::ServiceFlow *', 'serviceFlow'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): void ns3::UplinkSchedulerRtps::ServiceUnsolicitedGrants(ns3::SSRecord const * ssRecord, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ServiceUnsolicitedGrants', 'void', [param('ns3::SSRecord const *', 'ssRecord'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): void ns3::UplinkSchedulerRtps::SetupServiceFlow(ns3::SSRecord * ssRecord, ns3::ServiceFlow * serviceFlow) [member function] cls.add_method('SetupServiceFlow', 'void', [param('ns3::SSRecord *', 'ssRecord'), param('ns3::ServiceFlow *', 'serviceFlow')], is_virtual=True) ## bs-uplink-scheduler-rtps.h (module 'wimax'): void ns3::UplinkSchedulerRtps::ULSchedulerRTPSConnection(uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ULSchedulerRTPSConnection', 'void', [param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')]) return def register_Ns3UplinkSchedulerSimple_methods(root_module, cls): ## bs-uplink-scheduler-simple.h (module 'wimax'): ns3::UplinkSchedulerSimple::UplinkSchedulerSimple(ns3::UplinkSchedulerSimple const & arg0) [copy constructor] cls.add_constructor([param('ns3::UplinkSchedulerSimple const &', 'arg0')]) ## bs-uplink-scheduler-simple.h (module 'wimax'): ns3::UplinkSchedulerSimple::UplinkSchedulerSimple() [constructor] cls.add_constructor([]) ## bs-uplink-scheduler-simple.h (module 'wimax'): ns3::UplinkSchedulerSimple::UplinkSchedulerSimple(ns3::Ptr<ns3::BaseStationNetDevice> bs) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::BaseStationNetDevice >', 'bs')]) ## bs-uplink-scheduler-simple.h (module 'wimax'): void ns3::UplinkSchedulerSimple::AddUplinkAllocation(ns3::OfdmUlMapIe & ulMapIe, uint32_t const & allocationSize, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('AddUplinkAllocation', 'void', [param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('uint32_t const &', 'allocationSize'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): void ns3::UplinkSchedulerSimple::AllocateInitialRangingInterval(uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('AllocateInitialRangingInterval', 'void', [param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): uint32_t ns3::UplinkSchedulerSimple::CalculateAllocationStartTime() [member function] cls.add_method('CalculateAllocationStartTime', 'uint32_t', [], is_virtual=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): void ns3::UplinkSchedulerSimple::GetChannelDescriptorsToUpdate(bool & arg0, bool & arg1, bool & arg2, bool & arg3) [member function] cls.add_method('GetChannelDescriptorsToUpdate', 'void', [param('bool &', 'arg0'), param('bool &', 'arg1'), param('bool &', 'arg2'), param('bool &', 'arg3')], is_virtual=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): static ns3::TypeId ns3::UplinkSchedulerSimple::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): std::list<ns3::OfdmUlMapIe, std::allocator<ns3::OfdmUlMapIe> > ns3::UplinkSchedulerSimple::GetUplinkAllocations() const [member function] cls.add_method('GetUplinkAllocations', 'std::list< ns3::OfdmUlMapIe >', [], is_const=True, is_virtual=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): void ns3::UplinkSchedulerSimple::InitOnce() [member function] cls.add_method('InitOnce', 'void', [], is_virtual=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): void ns3::UplinkSchedulerSimple::OnSetRequestedBandwidth(ns3::ServiceFlowRecord * sfr) [member function] cls.add_method('OnSetRequestedBandwidth', 'void', [param('ns3::ServiceFlowRecord *', 'sfr')], is_virtual=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): void ns3::UplinkSchedulerSimple::ProcessBandwidthRequest(ns3::BandwidthRequestHeader const & bwRequestHdr) [member function] cls.add_method('ProcessBandwidthRequest', 'void', [param('ns3::BandwidthRequestHeader const &', 'bwRequestHdr')], is_virtual=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): void ns3::UplinkSchedulerSimple::Schedule() [member function] cls.add_method('Schedule', 'void', [], is_virtual=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): void ns3::UplinkSchedulerSimple::ServiceBandwidthRequests(ns3::SSRecord const * ssRecord, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ServiceBandwidthRequests', 'void', [param('ns3::SSRecord const *', 'ssRecord'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): bool ns3::UplinkSchedulerSimple::ServiceBandwidthRequests(ns3::ServiceFlow * serviceFlow, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ServiceBandwidthRequests', 'bool', [param('ns3::ServiceFlow *', 'serviceFlow'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): void ns3::UplinkSchedulerSimple::ServiceUnsolicitedGrants(ns3::SSRecord const * ssRecord, ns3::ServiceFlow::SchedulingType schedulingType, ns3::OfdmUlMapIe & ulMapIe, ns3::WimaxPhy::ModulationType const modulationType, uint32_t & symbolsToAllocation, uint32_t & availableSymbols) [member function] cls.add_method('ServiceUnsolicitedGrants', 'void', [param('ns3::SSRecord const *', 'ssRecord'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType'), param('ns3::OfdmUlMapIe &', 'ulMapIe'), param('ns3::WimaxPhy::ModulationType const', 'modulationType'), param('uint32_t &', 'symbolsToAllocation'), param('uint32_t &', 'availableSymbols')], is_virtual=True) ## bs-uplink-scheduler-simple.h (module 'wimax'): void ns3::UplinkSchedulerSimple::SetupServiceFlow(ns3::SSRecord * ssRecord, ns3::ServiceFlow * serviceFlow) [member function] cls.add_method('SetupServiceFlow', 'void', [param('ns3::SSRecord *', 'ssRecord'), param('ns3::ServiceFlow *', 'serviceFlow')], is_virtual=True) return def register_Ns3WeibullRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::WeibullRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::WeibullRandomVariable::WeibullRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetScale() const [member function] cls.add_method('GetScale', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetShape() const [member function] cls.add_method('GetShape', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetBound() const [member function] cls.add_method('GetBound', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetValue(double scale, double shape, double bound) [member function] cls.add_method('GetValue', 'double', [param('double', 'scale'), param('double', 'shape'), param('double', 'bound')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::WeibullRandomVariable::GetInteger(uint32_t scale, uint32_t shape, uint32_t bound) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'scale'), param('uint32_t', 'shape'), param('uint32_t', 'bound')]) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::WeibullRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3WimaxConnection_methods(root_module, cls): ## wimax-connection.h (module 'wimax'): ns3::WimaxConnection::WimaxConnection(ns3::WimaxConnection const & arg0) [copy constructor] cls.add_constructor([param('ns3::WimaxConnection const &', 'arg0')]) ## wimax-connection.h (module 'wimax'): ns3::WimaxConnection::WimaxConnection(ns3::Cid cid, ns3::Cid::Type type) [constructor] cls.add_constructor([param('ns3::Cid', 'cid'), param('ns3::Cid::Type', 'type')]) ## wimax-connection.h (module 'wimax'): void ns3::WimaxConnection::ClearFragmentsQueue() [member function] cls.add_method('ClearFragmentsQueue', 'void', []) ## wimax-connection.h (module 'wimax'): ns3::Ptr<ns3::Packet> ns3::WimaxConnection::Dequeue(ns3::MacHeaderType::HeaderType packetType=::ns3::MacHeaderType::HEADER_TYPE_GENERIC) [member function] cls.add_method('Dequeue', 'ns3::Ptr< ns3::Packet >', [param('ns3::MacHeaderType::HeaderType', 'packetType', default_value='::ns3::MacHeaderType::HEADER_TYPE_GENERIC')]) ## wimax-connection.h (module 'wimax'): ns3::Ptr<ns3::Packet> ns3::WimaxConnection::Dequeue(ns3::MacHeaderType::HeaderType packetType, uint32_t availableByte) [member function] cls.add_method('Dequeue', 'ns3::Ptr< ns3::Packet >', [param('ns3::MacHeaderType::HeaderType', 'packetType'), param('uint32_t', 'availableByte')]) ## wimax-connection.h (module 'wimax'): bool ns3::WimaxConnection::Enqueue(ns3::Ptr<ns3::Packet> packet, ns3::MacHeaderType const & hdrType, ns3::GenericMacHeader const & hdr) [member function] cls.add_method('Enqueue', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::MacHeaderType const &', 'hdrType'), param('ns3::GenericMacHeader const &', 'hdr')]) ## wimax-connection.h (module 'wimax'): void ns3::WimaxConnection::FragmentEnqueue(ns3::Ptr<const ns3::Packet> fragment) [member function] cls.add_method('FragmentEnqueue', 'void', [param('ns3::Ptr< ns3::Packet const >', 'fragment')]) ## wimax-connection.h (module 'wimax'): ns3::Cid ns3::WimaxConnection::GetCid() const [member function] cls.add_method('GetCid', 'ns3::Cid', [], is_const=True) ## wimax-connection.h (module 'wimax'): std::list<ns3::Ptr<ns3::Packet const>, std::allocator<ns3::Ptr<ns3::Packet const> > > const ns3::WimaxConnection::GetFragmentsQueue() const [member function] cls.add_method('GetFragmentsQueue', 'std::list< ns3::Ptr< ns3::Packet const > > const', [], is_const=True) ## wimax-connection.h (module 'wimax'): ns3::Ptr<ns3::WimaxMacQueue> ns3::WimaxConnection::GetQueue() const [member function] cls.add_method('GetQueue', 'ns3::Ptr< ns3::WimaxMacQueue >', [], is_const=True) ## wimax-connection.h (module 'wimax'): uint8_t ns3::WimaxConnection::GetSchedulingType() const [member function] cls.add_method('GetSchedulingType', 'uint8_t', [], is_const=True) ## wimax-connection.h (module 'wimax'): ns3::ServiceFlow * ns3::WimaxConnection::GetServiceFlow() const [member function] cls.add_method('GetServiceFlow', 'ns3::ServiceFlow *', [], is_const=True) ## wimax-connection.h (module 'wimax'): ns3::Cid::Type ns3::WimaxConnection::GetType() const [member function] cls.add_method('GetType', 'ns3::Cid::Type', [], is_const=True) ## wimax-connection.h (module 'wimax'): static ns3::TypeId ns3::WimaxConnection::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wimax-connection.h (module 'wimax'): std::string ns3::WimaxConnection::GetTypeStr() const [member function] cls.add_method('GetTypeStr', 'std::string', [], is_const=True) ## wimax-connection.h (module 'wimax'): bool ns3::WimaxConnection::HasPackets() const [member function] cls.add_method('HasPackets', 'bool', [], is_const=True) ## wimax-connection.h (module 'wimax'): bool ns3::WimaxConnection::HasPackets(ns3::MacHeaderType::HeaderType packetType) const [member function] cls.add_method('HasPackets', 'bool', [param('ns3::MacHeaderType::HeaderType', 'packetType')], is_const=True) ## wimax-connection.h (module 'wimax'): void ns3::WimaxConnection::SetServiceFlow(ns3::ServiceFlow * serviceFlow) [member function] cls.add_method('SetServiceFlow', 'void', [param('ns3::ServiceFlow *', 'serviceFlow')]) ## wimax-connection.h (module 'wimax'): void ns3::WimaxConnection::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) return def register_Ns3WimaxMacQueue_methods(root_module, cls): ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::WimaxMacQueue(ns3::WimaxMacQueue const & arg0) [copy constructor] cls.add_constructor([param('ns3::WimaxMacQueue const &', 'arg0')]) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::WimaxMacQueue() [constructor] cls.add_constructor([]) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::WimaxMacQueue(uint32_t maxSize) [constructor] cls.add_constructor([param('uint32_t', 'maxSize')]) ## wimax-mac-queue.h (module 'wimax'): bool ns3::WimaxMacQueue::CheckForFragmentation(ns3::MacHeaderType::HeaderType packetType) [member function] cls.add_method('CheckForFragmentation', 'bool', [param('ns3::MacHeaderType::HeaderType', 'packetType')]) ## wimax-mac-queue.h (module 'wimax'): ns3::Ptr<ns3::Packet> ns3::WimaxMacQueue::Dequeue(ns3::MacHeaderType::HeaderType packetType) [member function] cls.add_method('Dequeue', 'ns3::Ptr< ns3::Packet >', [param('ns3::MacHeaderType::HeaderType', 'packetType')]) ## wimax-mac-queue.h (module 'wimax'): ns3::Ptr<ns3::Packet> ns3::WimaxMacQueue::Dequeue(ns3::MacHeaderType::HeaderType packetType, uint32_t availableByte) [member function] cls.add_method('Dequeue', 'ns3::Ptr< ns3::Packet >', [param('ns3::MacHeaderType::HeaderType', 'packetType'), param('uint32_t', 'availableByte')]) ## wimax-mac-queue.h (module 'wimax'): bool ns3::WimaxMacQueue::Enqueue(ns3::Ptr<ns3::Packet> packet, ns3::MacHeaderType const & hdrType, ns3::GenericMacHeader const & hdr) [member function] cls.add_method('Enqueue', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::MacHeaderType const &', 'hdrType'), param('ns3::GenericMacHeader const &', 'hdr')]) ## wimax-mac-queue.h (module 'wimax'): uint32_t ns3::WimaxMacQueue::GetFirstPacketHdrSize(ns3::MacHeaderType::HeaderType packetType) [member function] cls.add_method('GetFirstPacketHdrSize', 'uint32_t', [param('ns3::MacHeaderType::HeaderType', 'packetType')]) ## wimax-mac-queue.h (module 'wimax'): uint32_t ns3::WimaxMacQueue::GetFirstPacketPayloadSize(ns3::MacHeaderType::HeaderType packetType) [member function] cls.add_method('GetFirstPacketPayloadSize', 'uint32_t', [param('ns3::MacHeaderType::HeaderType', 'packetType')]) ## wimax-mac-queue.h (module 'wimax'): uint32_t ns3::WimaxMacQueue::GetFirstPacketRequiredByte(ns3::MacHeaderType::HeaderType packetType) [member function] cls.add_method('GetFirstPacketRequiredByte', 'uint32_t', [param('ns3::MacHeaderType::HeaderType', 'packetType')]) ## wimax-mac-queue.h (module 'wimax'): uint32_t ns3::WimaxMacQueue::GetMaxSize() const [member function] cls.add_method('GetMaxSize', 'uint32_t', [], is_const=True) ## wimax-mac-queue.h (module 'wimax'): uint32_t ns3::WimaxMacQueue::GetNBytes() const [member function] cls.add_method('GetNBytes', 'uint32_t', [], is_const=True) ## wimax-mac-queue.h (module 'wimax'): std::deque<ns3::WimaxMacQueue::QueueElement, std::allocator<ns3::WimaxMacQueue::QueueElement> > const & ns3::WimaxMacQueue::GetPacketQueue() const [member function] cls.add_method('GetPacketQueue', 'std::deque< ns3::WimaxMacQueue::QueueElement > const &', [], is_const=True) ## wimax-mac-queue.h (module 'wimax'): uint32_t ns3::WimaxMacQueue::GetQueueLengthWithMACOverhead() [member function] cls.add_method('GetQueueLengthWithMACOverhead', 'uint32_t', []) ## wimax-mac-queue.h (module 'wimax'): uint32_t ns3::WimaxMacQueue::GetSize() const [member function] cls.add_method('GetSize', 'uint32_t', [], is_const=True) ## wimax-mac-queue.h (module 'wimax'): static ns3::TypeId ns3::WimaxMacQueue::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wimax-mac-queue.h (module 'wimax'): bool ns3::WimaxMacQueue::IsEmpty() const [member function] cls.add_method('IsEmpty', 'bool', [], is_const=True) ## wimax-mac-queue.h (module 'wimax'): bool ns3::WimaxMacQueue::IsEmpty(ns3::MacHeaderType::HeaderType packetType) const [member function] cls.add_method('IsEmpty', 'bool', [param('ns3::MacHeaderType::HeaderType', 'packetType')], is_const=True) ## wimax-mac-queue.h (module 'wimax'): ns3::Ptr<ns3::Packet> ns3::WimaxMacQueue::Peek(ns3::GenericMacHeader & hdr) const [member function] cls.add_method('Peek', 'ns3::Ptr< ns3::Packet >', [param('ns3::GenericMacHeader &', 'hdr')], is_const=True) ## wimax-mac-queue.h (module 'wimax'): ns3::Ptr<ns3::Packet> ns3::WimaxMacQueue::Peek(ns3::GenericMacHeader & hdr, ns3::Time & timeStamp) const [member function] cls.add_method('Peek', 'ns3::Ptr< ns3::Packet >', [param('ns3::GenericMacHeader &', 'hdr'), param('ns3::Time &', 'timeStamp')], is_const=True) ## wimax-mac-queue.h (module 'wimax'): ns3::Ptr<ns3::Packet> ns3::WimaxMacQueue::Peek(ns3::MacHeaderType::HeaderType packetType) const [member function] cls.add_method('Peek', 'ns3::Ptr< ns3::Packet >', [param('ns3::MacHeaderType::HeaderType', 'packetType')], is_const=True) ## wimax-mac-queue.h (module 'wimax'): ns3::Ptr<ns3::Packet> ns3::WimaxMacQueue::Peek(ns3::MacHeaderType::HeaderType packetType, ns3::Time & timeStamp) const [member function] cls.add_method('Peek', 'ns3::Ptr< ns3::Packet >', [param('ns3::MacHeaderType::HeaderType', 'packetType'), param('ns3::Time &', 'timeStamp')], is_const=True) ## wimax-mac-queue.h (module 'wimax'): void ns3::WimaxMacQueue::SetFragmentNumber(ns3::MacHeaderType::HeaderType packetType) [member function] cls.add_method('SetFragmentNumber', 'void', [param('ns3::MacHeaderType::HeaderType', 'packetType')]) ## wimax-mac-queue.h (module 'wimax'): void ns3::WimaxMacQueue::SetFragmentOffset(ns3::MacHeaderType::HeaderType packetType, uint32_t offset) [member function] cls.add_method('SetFragmentOffset', 'void', [param('ns3::MacHeaderType::HeaderType', 'packetType'), param('uint32_t', 'offset')]) ## wimax-mac-queue.h (module 'wimax'): void ns3::WimaxMacQueue::SetFragmentation(ns3::MacHeaderType::HeaderType packetType) [member function] cls.add_method('SetFragmentation', 'void', [param('ns3::MacHeaderType::HeaderType', 'packetType')]) ## wimax-mac-queue.h (module 'wimax'): void ns3::WimaxMacQueue::SetMaxSize(uint32_t maxSize) [member function] cls.add_method('SetMaxSize', 'void', [param('uint32_t', 'maxSize')]) return def register_Ns3WimaxMacQueueQueueElement_methods(root_module, cls): ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::QueueElement::QueueElement(ns3::WimaxMacQueue::QueueElement const & arg0) [copy constructor] cls.add_constructor([param('ns3::WimaxMacQueue::QueueElement const &', 'arg0')]) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::QueueElement::QueueElement() [constructor] cls.add_constructor([]) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::QueueElement::QueueElement(ns3::Ptr<ns3::Packet> packet, ns3::MacHeaderType const & hdrType, ns3::GenericMacHeader const & hdr, ns3::Time timeStamp) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::MacHeaderType const &', 'hdrType'), param('ns3::GenericMacHeader const &', 'hdr'), param('ns3::Time', 'timeStamp')]) ## wimax-mac-queue.h (module 'wimax'): uint32_t ns3::WimaxMacQueue::QueueElement::GetSize() const [member function] cls.add_method('GetSize', 'uint32_t', [], is_const=True) ## wimax-mac-queue.h (module 'wimax'): void ns3::WimaxMacQueue::QueueElement::SetFragmentNumber() [member function] cls.add_method('SetFragmentNumber', 'void', []) ## wimax-mac-queue.h (module 'wimax'): void ns3::WimaxMacQueue::QueueElement::SetFragmentOffset(uint32_t offset) [member function] cls.add_method('SetFragmentOffset', 'void', [param('uint32_t', 'offset')]) ## wimax-mac-queue.h (module 'wimax'): void ns3::WimaxMacQueue::QueueElement::SetFragmentation() [member function] cls.add_method('SetFragmentation', 'void', []) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::QueueElement::m_fragmentNumber [variable] cls.add_instance_attribute('m_fragmentNumber', 'uint32_t', is_const=False) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::QueueElement::m_fragmentOffset [variable] cls.add_instance_attribute('m_fragmentOffset', 'uint32_t', is_const=False) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::QueueElement::m_fragmentation [variable] cls.add_instance_attribute('m_fragmentation', 'bool', is_const=False) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::QueueElement::m_hdr [variable] cls.add_instance_attribute('m_hdr', 'ns3::GenericMacHeader', is_const=False) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::QueueElement::m_hdrType [variable] cls.add_instance_attribute('m_hdrType', 'ns3::MacHeaderType', is_const=False) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::QueueElement::m_packet [variable] cls.add_instance_attribute('m_packet', 'ns3::Ptr< ns3::Packet >', is_const=False) ## wimax-mac-queue.h (module 'wimax'): ns3::WimaxMacQueue::QueueElement::m_timeStamp [variable] cls.add_instance_attribute('m_timeStamp', 'ns3::Time', is_const=False) return def register_Ns3WimaxMacToMacHeader_methods(root_module, cls): ## wimax-mac-to-mac-header.h (module 'wimax'): ns3::WimaxMacToMacHeader::WimaxMacToMacHeader(ns3::WimaxMacToMacHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::WimaxMacToMacHeader const &', 'arg0')]) ## wimax-mac-to-mac-header.h (module 'wimax'): ns3::WimaxMacToMacHeader::WimaxMacToMacHeader() [constructor] cls.add_constructor([]) ## wimax-mac-to-mac-header.h (module 'wimax'): ns3::WimaxMacToMacHeader::WimaxMacToMacHeader(uint32_t len) [constructor] cls.add_constructor([param('uint32_t', 'len')]) ## wimax-mac-to-mac-header.h (module 'wimax'): uint32_t ns3::WimaxMacToMacHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## wimax-mac-to-mac-header.h (module 'wimax'): ns3::TypeId ns3::WimaxMacToMacHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## wimax-mac-to-mac-header.h (module 'wimax'): uint32_t ns3::WimaxMacToMacHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-mac-to-mac-header.h (module 'wimax'): uint8_t ns3::WimaxMacToMacHeader::GetSizeOfLen() const [member function] cls.add_method('GetSizeOfLen', 'uint8_t', [], is_const=True) ## wimax-mac-to-mac-header.h (module 'wimax'): static ns3::TypeId ns3::WimaxMacToMacHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wimax-mac-to-mac-header.h (module 'wimax'): void ns3::WimaxMacToMacHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## wimax-mac-to-mac-header.h (module 'wimax'): void ns3::WimaxMacToMacHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) return def register_Ns3WimaxPhy_methods(root_module, cls): ## wimax-phy.h (module 'wimax'): ns3::WimaxPhy::WimaxPhy(ns3::WimaxPhy const & arg0) [copy constructor] cls.add_constructor([param('ns3::WimaxPhy const &', 'arg0')]) ## wimax-phy.h (module 'wimax'): ns3::WimaxPhy::WimaxPhy() [constructor] cls.add_constructor([]) ## wimax-phy.h (module 'wimax'): int64_t ns3::WimaxPhy::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_pure_virtual=True, is_virtual=True) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::Attach(ns3::Ptr<ns3::WimaxChannel> channel) [member function] cls.add_method('Attach', 'void', [param('ns3::Ptr< ns3::WimaxChannel >', 'channel')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], is_virtual=True) ## wimax-phy.h (module 'wimax'): ns3::Ptr<ns3::WimaxChannel> ns3::WimaxPhy::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::WimaxChannel >', [], is_const=True) ## wimax-phy.h (module 'wimax'): uint32_t ns3::WimaxPhy::GetChannelBandwidth() const [member function] cls.add_method('GetChannelBandwidth', 'uint32_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): ns3::EventId ns3::WimaxPhy::GetChnlSrchTimeoutEvent() const [member function] cls.add_method('GetChnlSrchTimeoutEvent', 'ns3::EventId', [], is_const=True) ## wimax-phy.h (module 'wimax'): uint32_t ns3::WimaxPhy::GetDataRate(ns3::WimaxPhy::ModulationType modulationType) const [member function] cls.add_method('GetDataRate', 'uint32_t', [param('ns3::WimaxPhy::ModulationType', 'modulationType')], is_const=True) ## wimax-phy.h (module 'wimax'): ns3::Ptr<ns3::NetDevice> ns3::WimaxPhy::GetDevice() const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [], is_const=True) ## wimax-phy.h (module 'wimax'): ns3::Time ns3::WimaxPhy::GetFrameDuration() const [member function] cls.add_method('GetFrameDuration', 'ns3::Time', [], is_const=True) ## wimax-phy.h (module 'wimax'): ns3::Time ns3::WimaxPhy::GetFrameDuration(uint8_t frameDurationCode) const [member function] cls.add_method('GetFrameDuration', 'ns3::Time', [param('uint8_t', 'frameDurationCode')], is_const=True) ## wimax-phy.h (module 'wimax'): uint8_t ns3::WimaxPhy::GetFrameDurationCode() const [member function] cls.add_method('GetFrameDurationCode', 'uint8_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): ns3::Time ns3::WimaxPhy::GetFrameDurationSec() const [member function] cls.add_method('GetFrameDurationSec', 'ns3::Time', [], is_const=True) ## wimax-phy.h (module 'wimax'): uint32_t ns3::WimaxPhy::GetFrequency() const [member function] cls.add_method('GetFrequency', 'uint32_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): double ns3::WimaxPhy::GetGValue() const [member function] cls.add_method('GetGValue', 'double', [], is_const=True) ## wimax-phy.h (module 'wimax'): ns3::Ptr<ns3::Object> ns3::WimaxPhy::GetMobility() [member function] cls.add_method('GetMobility', 'ns3::Ptr< ns3::Object >', [], is_virtual=True) ## wimax-phy.h (module 'wimax'): uint16_t ns3::WimaxPhy::GetNfft() const [member function] cls.add_method('GetNfft', 'uint16_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): uint64_t ns3::WimaxPhy::GetNrBytes(uint32_t symbols, ns3::WimaxPhy::ModulationType modulationType) const [member function] cls.add_method('GetNrBytes', 'uint64_t', [param('uint32_t', 'symbols'), param('ns3::WimaxPhy::ModulationType', 'modulationType')], is_const=True) ## wimax-phy.h (module 'wimax'): uint8_t ns3::WimaxPhy::GetNrCarriers() const [member function] cls.add_method('GetNrCarriers', 'uint8_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): uint64_t ns3::WimaxPhy::GetNrSymbols(uint32_t size, ns3::WimaxPhy::ModulationType modulationType) const [member function] cls.add_method('GetNrSymbols', 'uint64_t', [param('uint32_t', 'size'), param('ns3::WimaxPhy::ModulationType', 'modulationType')], is_const=True) ## wimax-phy.h (module 'wimax'): ns3::WimaxPhy::PhyType ns3::WimaxPhy::GetPhyType() const [member function] cls.add_method('GetPhyType', 'ns3::WimaxPhy::PhyType', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wimax-phy.h (module 'wimax'): ns3::Time ns3::WimaxPhy::GetPsDuration() const [member function] cls.add_method('GetPsDuration', 'ns3::Time', [], is_const=True) ## wimax-phy.h (module 'wimax'): uint16_t ns3::WimaxPhy::GetPsPerFrame() const [member function] cls.add_method('GetPsPerFrame', 'uint16_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): uint16_t ns3::WimaxPhy::GetPsPerSymbol() const [member function] cls.add_method('GetPsPerSymbol', 'uint16_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): ns3::Callback<void, ns3::Ptr<ns3::PacketBurst const>, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ns3::WimaxPhy::GetReceiveCallback() const [member function] cls.add_method('GetReceiveCallback', 'ns3::Callback< void, ns3::Ptr< ns3::PacketBurst const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', [], is_const=True) ## wimax-phy.h (module 'wimax'): uint16_t ns3::WimaxPhy::GetRtg() const [member function] cls.add_method('GetRtg', 'uint16_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): uint64_t ns3::WimaxPhy::GetRxFrequency() const [member function] cls.add_method('GetRxFrequency', 'uint64_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): double ns3::WimaxPhy::GetSamplingFactor() const [member function] cls.add_method('GetSamplingFactor', 'double', [], is_const=True) ## wimax-phy.h (module 'wimax'): double ns3::WimaxPhy::GetSamplingFrequency() const [member function] cls.add_method('GetSamplingFrequency', 'double', [], is_const=True) ## wimax-phy.h (module 'wimax'): uint64_t ns3::WimaxPhy::GetScanningFrequency() const [member function] cls.add_method('GetScanningFrequency', 'uint64_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): ns3::WimaxPhy::PhyState ns3::WimaxPhy::GetState() const [member function] cls.add_method('GetState', 'ns3::WimaxPhy::PhyState', [], is_const=True) ## wimax-phy.h (module 'wimax'): ns3::Time ns3::WimaxPhy::GetSymbolDuration() const [member function] cls.add_method('GetSymbolDuration', 'ns3::Time', [], is_const=True) ## wimax-phy.h (module 'wimax'): uint32_t ns3::WimaxPhy::GetSymbolsPerFrame() const [member function] cls.add_method('GetSymbolsPerFrame', 'uint32_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): ns3::Time ns3::WimaxPhy::GetTransmissionTime(uint32_t size, ns3::WimaxPhy::ModulationType modulationType) const [member function] cls.add_method('GetTransmissionTime', 'ns3::Time', [param('uint32_t', 'size'), param('ns3::WimaxPhy::ModulationType', 'modulationType')], is_const=True) ## wimax-phy.h (module 'wimax'): uint16_t ns3::WimaxPhy::GetTtg() const [member function] cls.add_method('GetTtg', 'uint16_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): uint64_t ns3::WimaxPhy::GetTxFrequency() const [member function] cls.add_method('GetTxFrequency', 'uint64_t', [], is_const=True) ## wimax-phy.h (module 'wimax'): static ns3::TypeId ns3::WimaxPhy::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wimax-phy.h (module 'wimax'): bool ns3::WimaxPhy::IsDuplex() const [member function] cls.add_method('IsDuplex', 'bool', [], is_const=True) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::Send(ns3::SendParams * params) [member function] cls.add_method('Send', 'void', [param('ns3::SendParams *', 'params')], is_pure_virtual=True, is_virtual=True) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetChannelBandwidth(uint32_t channelBandwidth) [member function] cls.add_method('SetChannelBandwidth', 'void', [param('uint32_t', 'channelBandwidth')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetDataRates() [member function] cls.add_method('SetDataRates', 'void', []) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetDevice(ns3::Ptr<ns3::WimaxNetDevice> device) [member function] cls.add_method('SetDevice', 'void', [param('ns3::Ptr< ns3::WimaxNetDevice >', 'device')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetDuplex(uint64_t rxFrequency, uint64_t txFrequency) [member function] cls.add_method('SetDuplex', 'void', [param('uint64_t', 'rxFrequency'), param('uint64_t', 'txFrequency')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetFrameDuration(ns3::Time frameDuration) [member function] cls.add_method('SetFrameDuration', 'void', [param('ns3::Time', 'frameDuration')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetFrequency(uint32_t frequency) [member function] cls.add_method('SetFrequency', 'void', [param('uint32_t', 'frequency')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetMobility(ns3::Ptr<ns3::Object> mobility) [member function] cls.add_method('SetMobility', 'void', [param('ns3::Ptr< ns3::Object >', 'mobility')], is_virtual=True) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetNrCarriers(uint8_t nrCarriers) [member function] cls.add_method('SetNrCarriers', 'void', [param('uint8_t', 'nrCarriers')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetPhyParameters() [member function] cls.add_method('SetPhyParameters', 'void', []) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetPsDuration(ns3::Time psDuration) [member function] cls.add_method('SetPsDuration', 'void', [param('ns3::Time', 'psDuration')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetPsPerFrame(uint16_t psPerFrame) [member function] cls.add_method('SetPsPerFrame', 'void', [param('uint16_t', 'psPerFrame')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetPsPerSymbol(uint16_t psPerSymbol) [member function] cls.add_method('SetPsPerSymbol', 'void', [param('uint16_t', 'psPerSymbol')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetReceiveCallback(ns3::Callback<void, ns3::Ptr<ns3::PacketBurst const>, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::PacketBurst const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetScanningCallback() const [member function] cls.add_method('SetScanningCallback', 'void', [], is_const=True) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetSimplex(uint64_t frequency) [member function] cls.add_method('SetSimplex', 'void', [param('uint64_t', 'frequency')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetState(ns3::WimaxPhy::PhyState state) [member function] cls.add_method('SetState', 'void', [param('ns3::WimaxPhy::PhyState', 'state')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetSymbolDuration(ns3::Time symbolDuration) [member function] cls.add_method('SetSymbolDuration', 'void', [param('ns3::Time', 'symbolDuration')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::SetSymbolsPerFrame(uint32_t symbolsPerFrame) [member function] cls.add_method('SetSymbolsPerFrame', 'void', [param('uint32_t', 'symbolsPerFrame')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::StartScanning(uint64_t frequency, ns3::Time timeout, ns3::Callback<void, bool, unsigned long, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('StartScanning', 'void', [param('uint64_t', 'frequency'), param('ns3::Time', 'timeout'), param('ns3::Callback< void, bool, unsigned long, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::DoAttach(ns3::Ptr<ns3::WimaxChannel> channel) [member function] cls.add_method('DoAttach', 'void', [param('ns3::Ptr< ns3::WimaxChannel >', 'channel')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): uint32_t ns3::WimaxPhy::DoGetDataRate(ns3::WimaxPhy::ModulationType modulationType) const [member function] cls.add_method('DoGetDataRate', 'uint32_t', [param('ns3::WimaxPhy::ModulationType', 'modulationType')], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): ns3::Time ns3::WimaxPhy::DoGetFrameDuration(uint8_t frameDurationCode) const [member function] cls.add_method('DoGetFrameDuration', 'ns3::Time', [param('uint8_t', 'frameDurationCode')], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): uint8_t ns3::WimaxPhy::DoGetFrameDurationCode() const [member function] cls.add_method('DoGetFrameDurationCode', 'uint8_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): double ns3::WimaxPhy::DoGetGValue() const [member function] cls.add_method('DoGetGValue', 'double', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): uint16_t ns3::WimaxPhy::DoGetNfft() const [member function] cls.add_method('DoGetNfft', 'uint16_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): uint64_t ns3::WimaxPhy::DoGetNrBytes(uint32_t symbols, ns3::WimaxPhy::ModulationType modulationType) const [member function] cls.add_method('DoGetNrBytes', 'uint64_t', [param('uint32_t', 'symbols'), param('ns3::WimaxPhy::ModulationType', 'modulationType')], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): uint64_t ns3::WimaxPhy::DoGetNrSymbols(uint32_t size, ns3::WimaxPhy::ModulationType modulationType) const [member function] cls.add_method('DoGetNrSymbols', 'uint64_t', [param('uint32_t', 'size'), param('ns3::WimaxPhy::ModulationType', 'modulationType')], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): uint16_t ns3::WimaxPhy::DoGetRtg() const [member function] cls.add_method('DoGetRtg', 'uint16_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): double ns3::WimaxPhy::DoGetSamplingFactor() const [member function] cls.add_method('DoGetSamplingFactor', 'double', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): double ns3::WimaxPhy::DoGetSamplingFrequency() const [member function] cls.add_method('DoGetSamplingFrequency', 'double', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): ns3::Time ns3::WimaxPhy::DoGetTransmissionTime(uint32_t size, ns3::WimaxPhy::ModulationType modulationType) const [member function] cls.add_method('DoGetTransmissionTime', 'ns3::Time', [param('uint32_t', 'size'), param('ns3::WimaxPhy::ModulationType', 'modulationType')], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): uint16_t ns3::WimaxPhy::DoGetTtg() const [member function] cls.add_method('DoGetTtg', 'uint16_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::DoSetDataRates() [member function] cls.add_method('DoSetDataRates', 'void', [], is_pure_virtual=True, visibility='private', is_virtual=True) ## wimax-phy.h (module 'wimax'): void ns3::WimaxPhy::DoSetPhyParameters() [member function] cls.add_method('DoSetPhyParameters', 'void', [], is_pure_virtual=True, visibility='private', is_virtual=True) return def register_Ns3ZetaRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ZetaRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ZetaRandomVariable::ZetaRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::ZetaRandomVariable::GetAlpha() const [member function] cls.add_method('GetAlpha', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ZetaRandomVariable::GetValue(double alpha) [member function] cls.add_method('GetValue', 'double', [param('double', 'alpha')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZetaRandomVariable::GetInteger(uint32_t alpha) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'alpha')]) ## random-variable-stream.h (module 'core'): double ns3::ZetaRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZetaRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3ZipfRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ZipfRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ZipfRandomVariable::ZipfRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZipfRandomVariable::GetN() const [member function] cls.add_method('GetN', 'uint32_t', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ZipfRandomVariable::GetAlpha() const [member function] cls.add_method('GetAlpha', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ZipfRandomVariable::GetValue(uint32_t n, double alpha) [member function] cls.add_method('GetValue', 'double', [param('uint32_t', 'n'), param('double', 'alpha')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZipfRandomVariable::GetInteger(uint32_t n, uint32_t alpha) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'n'), param('uint32_t', 'alpha')]) ## random-variable-stream.h (module 'core'): double ns3::ZipfRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZipfRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3AttributeAccessor_methods(root_module, cls): ## attribute.h (module 'core'): ns3::AttributeAccessor::AttributeAccessor(ns3::AttributeAccessor const & arg0) [copy constructor] cls.add_constructor([param('ns3::AttributeAccessor const &', 'arg0')]) ## attribute.h (module 'core'): ns3::AttributeAccessor::AttributeAccessor() [constructor] cls.add_constructor([]) ## attribute.h (module 'core'): bool ns3::AttributeAccessor::Get(ns3::ObjectBase const * object, ns3::AttributeValue & attribute) const [member function] cls.add_method('Get', 'bool', [param('ns3::ObjectBase const *', 'object'), param('ns3::AttributeValue &', 'attribute')], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): bool ns3::AttributeAccessor::HasGetter() const [member function] cls.add_method('HasGetter', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): bool ns3::AttributeAccessor::HasSetter() const [member function] cls.add_method('HasSetter', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): bool ns3::AttributeAccessor::Set(ns3::ObjectBase * object, ns3::AttributeValue const & value) const [member function] cls.add_method('Set', 'bool', [param('ns3::ObjectBase *', 'object', transfer_ownership=False), param('ns3::AttributeValue const &', 'value')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3AttributeChecker_methods(root_module, cls): ## attribute.h (module 'core'): ns3::AttributeChecker::AttributeChecker(ns3::AttributeChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::AttributeChecker const &', 'arg0')]) ## attribute.h (module 'core'): ns3::AttributeChecker::AttributeChecker() [constructor] cls.add_constructor([]) ## attribute.h (module 'core'): bool ns3::AttributeChecker::Check(ns3::AttributeValue const & value) const [member function] cls.add_method('Check', 'bool', [param('ns3::AttributeValue const &', 'value')], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): bool ns3::AttributeChecker::Copy(ns3::AttributeValue const & source, ns3::AttributeValue & destination) const [member function] cls.add_method('Copy', 'bool', [param('ns3::AttributeValue const &', 'source'), param('ns3::AttributeValue &', 'destination')], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::AttributeChecker::Create() const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::AttributeValue >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::AttributeChecker::CreateValidValue(ns3::AttributeValue const & value) const [member function] cls.add_method('CreateValidValue', 'ns3::Ptr< ns3::AttributeValue >', [param('ns3::AttributeValue const &', 'value')], is_const=True) ## attribute.h (module 'core'): std::string ns3::AttributeChecker::GetUnderlyingTypeInformation() const [member function] cls.add_method('GetUnderlyingTypeInformation', 'std::string', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): std::string ns3::AttributeChecker::GetValueTypeName() const [member function] cls.add_method('GetValueTypeName', 'std::string', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): bool ns3::AttributeChecker::HasUnderlyingTypeInformation() const [member function] cls.add_method('HasUnderlyingTypeInformation', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3AttributeValue_methods(root_module, cls): ## attribute.h (module 'core'): ns3::AttributeValue::AttributeValue(ns3::AttributeValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::AttributeValue const &', 'arg0')]) ## attribute.h (module 'core'): ns3::AttributeValue::AttributeValue() [constructor] cls.add_constructor([]) ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::AttributeValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): bool ns3::AttributeValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_pure_virtual=True, is_virtual=True) ## attribute.h (module 'core'): std::string ns3::AttributeValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3BSScheduler_methods(root_module, cls): ## bs-scheduler.h (module 'wimax'): ns3::BSScheduler::BSScheduler(ns3::BSScheduler const & arg0) [copy constructor] cls.add_constructor([param('ns3::BSScheduler const &', 'arg0')]) ## bs-scheduler.h (module 'wimax'): ns3::BSScheduler::BSScheduler() [constructor] cls.add_constructor([]) ## bs-scheduler.h (module 'wimax'): ns3::BSScheduler::BSScheduler(ns3::Ptr<ns3::BaseStationNetDevice> bs) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::BaseStationNetDevice >', 'bs')]) ## bs-scheduler.h (module 'wimax'): void ns3::BSScheduler::AddDownlinkBurst(ns3::Ptr<const ns3::WimaxConnection> connection, uint8_t diuc, ns3::WimaxPhy::ModulationType modulationType, ns3::Ptr<ns3::PacketBurst> burst) [member function] cls.add_method('AddDownlinkBurst', 'void', [param('ns3::Ptr< ns3::WimaxConnection const >', 'connection'), param('uint8_t', 'diuc'), param('ns3::WimaxPhy::ModulationType', 'modulationType'), param('ns3::Ptr< ns3::PacketBurst >', 'burst')], is_pure_virtual=True, is_virtual=True) ## bs-scheduler.h (module 'wimax'): bool ns3::BSScheduler::CheckForFragmentation(ns3::Ptr<ns3::WimaxConnection> connection, int availableSymbols, ns3::WimaxPhy::ModulationType modulationType) [member function] cls.add_method('CheckForFragmentation', 'bool', [param('ns3::Ptr< ns3::WimaxConnection >', 'connection'), param('int', 'availableSymbols'), param('ns3::WimaxPhy::ModulationType', 'modulationType')]) ## bs-scheduler.h (module 'wimax'): ns3::Ptr<ns3::PacketBurst> ns3::BSScheduler::CreateUgsBurst(ns3::ServiceFlow * serviceFlow, ns3::WimaxPhy::ModulationType modulationType, uint32_t availableSymbols) [member function] cls.add_method('CreateUgsBurst', 'ns3::Ptr< ns3::PacketBurst >', [param('ns3::ServiceFlow *', 'serviceFlow'), param('ns3::WimaxPhy::ModulationType', 'modulationType'), param('uint32_t', 'availableSymbols')], is_pure_virtual=True, is_virtual=True) ## bs-scheduler.h (module 'wimax'): ns3::Ptr<ns3::BaseStationNetDevice> ns3::BSScheduler::GetBs() [member function] cls.add_method('GetBs', 'ns3::Ptr< ns3::BaseStationNetDevice >', [], is_virtual=True) ## bs-scheduler.h (module 'wimax'): std::list<std::pair<ns3::OfdmDlMapIe*, ns3::Ptr<ns3::PacketBurst> >,std::allocator<std::pair<ns3::OfdmDlMapIe*, ns3::Ptr<ns3::PacketBurst> > > > * ns3::BSScheduler::GetDownlinkBursts() const [member function] cls.add_method('GetDownlinkBursts', 'std::list< std::pair< ns3::OfdmDlMapIe *, ns3::Ptr< ns3::PacketBurst > > > *', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## bs-scheduler.h (module 'wimax'): static ns3::TypeId ns3::BSScheduler::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## bs-scheduler.h (module 'wimax'): void ns3::BSScheduler::Schedule() [member function] cls.add_method('Schedule', 'void', [], is_pure_virtual=True, is_virtual=True) ## bs-scheduler.h (module 'wimax'): bool ns3::BSScheduler::SelectConnection(ns3::Ptr<ns3::WimaxConnection> & connection) [member function] cls.add_method('SelectConnection', 'bool', [param('ns3::Ptr< ns3::WimaxConnection > &', 'connection')], is_pure_virtual=True, is_virtual=True) ## bs-scheduler.h (module 'wimax'): void ns3::BSScheduler::SetBs(ns3::Ptr<ns3::BaseStationNetDevice> bs) [member function] cls.add_method('SetBs', 'void', [param('ns3::Ptr< ns3::BaseStationNetDevice >', 'bs')], is_virtual=True) return def register_Ns3BSSchedulerRtps_methods(root_module, cls): ## bs-scheduler-rtps.h (module 'wimax'): ns3::BSSchedulerRtps::BSSchedulerRtps(ns3::BSSchedulerRtps const & arg0) [copy constructor] cls.add_constructor([param('ns3::BSSchedulerRtps const &', 'arg0')]) ## bs-scheduler-rtps.h (module 'wimax'): ns3::BSSchedulerRtps::BSSchedulerRtps() [constructor] cls.add_constructor([]) ## bs-scheduler-rtps.h (module 'wimax'): ns3::BSSchedulerRtps::BSSchedulerRtps(ns3::Ptr<ns3::BaseStationNetDevice> bs) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::BaseStationNetDevice >', 'bs')]) ## bs-scheduler-rtps.h (module 'wimax'): void ns3::BSSchedulerRtps::AddDownlinkBurst(ns3::Ptr<const ns3::WimaxConnection> connection, uint8_t diuc, ns3::WimaxPhy::ModulationType modulationType, ns3::Ptr<ns3::PacketBurst> burst) [member function] cls.add_method('AddDownlinkBurst', 'void', [param('ns3::Ptr< ns3::WimaxConnection const >', 'connection'), param('uint8_t', 'diuc'), param('ns3::WimaxPhy::ModulationType', 'modulationType'), param('ns3::Ptr< ns3::PacketBurst >', 'burst')], is_virtual=True) ## bs-scheduler-rtps.h (module 'wimax'): void ns3::BSSchedulerRtps::BSSchedulerBEConnection(uint32_t & availableSymbols) [member function] cls.add_method('BSSchedulerBEConnection', 'void', [param('uint32_t &', 'availableSymbols')]) ## bs-scheduler-rtps.h (module 'wimax'): void ns3::BSSchedulerRtps::BSSchedulerBasicConnection(uint32_t & availableSymbols) [member function] cls.add_method('BSSchedulerBasicConnection', 'void', [param('uint32_t &', 'availableSymbols')]) ## bs-scheduler-rtps.h (module 'wimax'): void ns3::BSSchedulerRtps::BSSchedulerBroadcastConnection(uint32_t & availableSymbols) [member function] cls.add_method('BSSchedulerBroadcastConnection', 'void', [param('uint32_t &', 'availableSymbols')]) ## bs-scheduler-rtps.h (module 'wimax'): void ns3::BSSchedulerRtps::BSSchedulerInitialRangingConnection(uint32_t & availableSymbols) [member function] cls.add_method('BSSchedulerInitialRangingConnection', 'void', [param('uint32_t &', 'availableSymbols')]) ## bs-scheduler-rtps.h (module 'wimax'): void ns3::BSSchedulerRtps::BSSchedulerNRTPSConnection(uint32_t & availableSymbols) [member function] cls.add_method('BSSchedulerNRTPSConnection', 'void', [param('uint32_t &', 'availableSymbols')]) ## bs-scheduler-rtps.h (module 'wimax'): void ns3::BSSchedulerRtps::BSSchedulerPrimaryConnection(uint32_t & availableSymbols) [member function] cls.add_method('BSSchedulerPrimaryConnection', 'void', [param('uint32_t &', 'availableSymbols')]) ## bs-scheduler-rtps.h (module 'wimax'): void ns3::BSSchedulerRtps::BSSchedulerRTPSConnection(uint32_t & availableSymbols) [member function] cls.add_method('BSSchedulerRTPSConnection', 'void', [param('uint32_t &', 'availableSymbols')]) ## bs-scheduler-rtps.h (module 'wimax'): void ns3::BSSchedulerRtps::BSSchedulerUGSConnection(uint32_t & availableSymbols) [member function] cls.add_method('BSSchedulerUGSConnection', 'void', [param('uint32_t &', 'availableSymbols')]) ## bs-scheduler-rtps.h (module 'wimax'): ns3::Ptr<ns3::PacketBurst> ns3::BSSchedulerRtps::CreateUgsBurst(ns3::ServiceFlow * serviceFlow, ns3::WimaxPhy::ModulationType modulationType, uint32_t availableSymbols) [member function] cls.add_method('CreateUgsBurst', 'ns3::Ptr< ns3::PacketBurst >', [param('ns3::ServiceFlow *', 'serviceFlow'), param('ns3::WimaxPhy::ModulationType', 'modulationType'), param('uint32_t', 'availableSymbols')], is_virtual=True) ## bs-scheduler-rtps.h (module 'wimax'): std::list<std::pair<ns3::OfdmDlMapIe*, ns3::Ptr<ns3::PacketBurst> >,std::allocator<std::pair<ns3::OfdmDlMapIe*, ns3::Ptr<ns3::PacketBurst> > > > * ns3::BSSchedulerRtps::GetDownlinkBursts() const [member function] cls.add_method('GetDownlinkBursts', 'std::list< std::pair< ns3::OfdmDlMapIe *, ns3::Ptr< ns3::PacketBurst > > > *', [], is_const=True, is_virtual=True) ## bs-scheduler-rtps.h (module 'wimax'): static ns3::TypeId ns3::BSSchedulerRtps::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## bs-scheduler-rtps.h (module 'wimax'): void ns3::BSSchedulerRtps::Schedule() [member function] cls.add_method('Schedule', 'void', [], is_virtual=True) ## bs-scheduler-rtps.h (module 'wimax'): bool ns3::BSSchedulerRtps::SelectBEConnection(ns3::Ptr<ns3::WimaxConnection> & connection) [member function] cls.add_method('SelectBEConnection', 'bool', [param('ns3::Ptr< ns3::WimaxConnection > &', 'connection')]) ## bs-scheduler-rtps.h (module 'wimax'): bool ns3::BSSchedulerRtps::SelectConnection(ns3::Ptr<ns3::WimaxConnection> & connection) [member function] cls.add_method('SelectConnection', 'bool', [param('ns3::Ptr< ns3::WimaxConnection > &', 'connection')], is_virtual=True) ## bs-scheduler-rtps.h (module 'wimax'): bool ns3::BSSchedulerRtps::SelectIRandBCConnection(ns3::Ptr<ns3::WimaxConnection> & connection) [member function] cls.add_method('SelectIRandBCConnection', 'bool', [param('ns3::Ptr< ns3::WimaxConnection > &', 'connection')]) ## bs-scheduler-rtps.h (module 'wimax'): bool ns3::BSSchedulerRtps::SelectMenagementConnection(ns3::Ptr<ns3::WimaxConnection> & connection) [member function] cls.add_method('SelectMenagementConnection', 'bool', [param('ns3::Ptr< ns3::WimaxConnection > &', 'connection')]) ## bs-scheduler-rtps.h (module 'wimax'): bool ns3::BSSchedulerRtps::SelectNRTPSConnection(ns3::Ptr<ns3::WimaxConnection> & connection) [member function] cls.add_method('SelectNRTPSConnection', 'bool', [param('ns3::Ptr< ns3::WimaxConnection > &', 'connection')]) ## bs-scheduler-rtps.h (module 'wimax'): bool ns3::BSSchedulerRtps::SelectRTPSConnection(ns3::Ptr<ns3::WimaxConnection> & connection) [member function] cls.add_method('SelectRTPSConnection', 'bool', [param('ns3::Ptr< ns3::WimaxConnection > &', 'connection')]) ## bs-scheduler-rtps.h (module 'wimax'): bool ns3::BSSchedulerRtps::SelectUGSConnection(ns3::Ptr<ns3::WimaxConnection> & connection) [member function] cls.add_method('SelectUGSConnection', 'bool', [param('ns3::Ptr< ns3::WimaxConnection > &', 'connection')]) return def register_Ns3BSSchedulerSimple_methods(root_module, cls): ## bs-scheduler-simple.h (module 'wimax'): ns3::BSSchedulerSimple::BSSchedulerSimple(ns3::BSSchedulerSimple const & arg0) [copy constructor] cls.add_constructor([param('ns3::BSSchedulerSimple const &', 'arg0')]) ## bs-scheduler-simple.h (module 'wimax'): ns3::BSSchedulerSimple::BSSchedulerSimple() [constructor] cls.add_constructor([]) ## bs-scheduler-simple.h (module 'wimax'): ns3::BSSchedulerSimple::BSSchedulerSimple(ns3::Ptr<ns3::BaseStationNetDevice> bs) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::BaseStationNetDevice >', 'bs')]) ## bs-scheduler-simple.h (module 'wimax'): void ns3::BSSchedulerSimple::AddDownlinkBurst(ns3::Ptr<const ns3::WimaxConnection> connection, uint8_t diuc, ns3::WimaxPhy::ModulationType modulationType, ns3::Ptr<ns3::PacketBurst> burst) [member function] cls.add_method('AddDownlinkBurst', 'void', [param('ns3::Ptr< ns3::WimaxConnection const >', 'connection'), param('uint8_t', 'diuc'), param('ns3::WimaxPhy::ModulationType', 'modulationType'), param('ns3::Ptr< ns3::PacketBurst >', 'burst')], is_virtual=True) ## bs-scheduler-simple.h (module 'wimax'): ns3::Ptr<ns3::PacketBurst> ns3::BSSchedulerSimple::CreateUgsBurst(ns3::ServiceFlow * serviceFlow, ns3::WimaxPhy::ModulationType modulationType, uint32_t availableSymbols) [member function] cls.add_method('CreateUgsBurst', 'ns3::Ptr< ns3::PacketBurst >', [param('ns3::ServiceFlow *', 'serviceFlow'), param('ns3::WimaxPhy::ModulationType', 'modulationType'), param('uint32_t', 'availableSymbols')], is_virtual=True) ## bs-scheduler-simple.h (module 'wimax'): std::list<std::pair<ns3::OfdmDlMapIe*, ns3::Ptr<ns3::PacketBurst> >,std::allocator<std::pair<ns3::OfdmDlMapIe*, ns3::Ptr<ns3::PacketBurst> > > > * ns3::BSSchedulerSimple::GetDownlinkBursts() const [member function] cls.add_method('GetDownlinkBursts', 'std::list< std::pair< ns3::OfdmDlMapIe *, ns3::Ptr< ns3::PacketBurst > > > *', [], is_const=True, is_virtual=True) ## bs-scheduler-simple.h (module 'wimax'): static ns3::TypeId ns3::BSSchedulerSimple::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## bs-scheduler-simple.h (module 'wimax'): void ns3::BSSchedulerSimple::Schedule() [member function] cls.add_method('Schedule', 'void', [], is_virtual=True) ## bs-scheduler-simple.h (module 'wimax'): bool ns3::BSSchedulerSimple::SelectConnection(ns3::Ptr<ns3::WimaxConnection> & connection) [member function] cls.add_method('SelectConnection', 'bool', [param('ns3::Ptr< ns3::WimaxConnection > &', 'connection')], is_virtual=True) return def register_Ns3BandwidthRequestHeader_methods(root_module, cls): ## wimax-mac-header.h (module 'wimax'): ns3::BandwidthRequestHeader::BandwidthRequestHeader(ns3::BandwidthRequestHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::BandwidthRequestHeader const &', 'arg0')]) ## wimax-mac-header.h (module 'wimax'): ns3::BandwidthRequestHeader::BandwidthRequestHeader() [constructor] cls.add_constructor([]) ## wimax-mac-header.h (module 'wimax'): uint32_t ns3::BandwidthRequestHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## wimax-mac-header.h (module 'wimax'): uint32_t ns3::BandwidthRequestHeader::GetBr() const [member function] cls.add_method('GetBr', 'uint32_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): ns3::Cid ns3::BandwidthRequestHeader::GetCid() const [member function] cls.add_method('GetCid', 'ns3::Cid', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::BandwidthRequestHeader::GetEc() const [member function] cls.add_method('GetEc', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::BandwidthRequestHeader::GetHcs() const [member function] cls.add_method('GetHcs', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::BandwidthRequestHeader::GetHt() const [member function] cls.add_method('GetHt', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): ns3::TypeId ns3::BandwidthRequestHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): std::string ns3::BandwidthRequestHeader::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint32_t ns3::BandwidthRequestHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::BandwidthRequestHeader::GetType() const [member function] cls.add_method('GetType', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): static ns3::TypeId ns3::BandwidthRequestHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wimax-mac-header.h (module 'wimax'): void ns3::BandwidthRequestHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): void ns3::BandwidthRequestHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): void ns3::BandwidthRequestHeader::SetBr(uint32_t br) [member function] cls.add_method('SetBr', 'void', [param('uint32_t', 'br')]) ## wimax-mac-header.h (module 'wimax'): void ns3::BandwidthRequestHeader::SetCid(ns3::Cid cid) [member function] cls.add_method('SetCid', 'void', [param('ns3::Cid', 'cid')]) ## wimax-mac-header.h (module 'wimax'): void ns3::BandwidthRequestHeader::SetEc(uint8_t ec) [member function] cls.add_method('SetEc', 'void', [param('uint8_t', 'ec')]) ## wimax-mac-header.h (module 'wimax'): void ns3::BandwidthRequestHeader::SetHcs(uint8_t hcs) [member function] cls.add_method('SetHcs', 'void', [param('uint8_t', 'hcs')]) ## wimax-mac-header.h (module 'wimax'): void ns3::BandwidthRequestHeader::SetHt(uint8_t HT) [member function] cls.add_method('SetHt', 'void', [param('uint8_t', 'HT')]) ## wimax-mac-header.h (module 'wimax'): void ns3::BandwidthRequestHeader::SetType(uint8_t type) [member function] cls.add_method('SetType', 'void', [param('uint8_t', 'type')]) ## wimax-mac-header.h (module 'wimax'): bool ns3::BandwidthRequestHeader::check_hcs() const [member function] cls.add_method('check_hcs', 'bool', [], is_const=True) return def register_Ns3BsServiceFlowManager_methods(root_module, cls): ## bs-service-flow-manager.h (module 'wimax'): ns3::BsServiceFlowManager::BsServiceFlowManager(ns3::BsServiceFlowManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::BsServiceFlowManager const &', 'arg0')]) ## bs-service-flow-manager.h (module 'wimax'): ns3::BsServiceFlowManager::BsServiceFlowManager(ns3::Ptr<ns3::BaseStationNetDevice> device) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::BaseStationNetDevice >', 'device')]) ## bs-service-flow-manager.h (module 'wimax'): void ns3::BsServiceFlowManager::AddMulticastServiceFlow(ns3::ServiceFlow sf, ns3::WimaxPhy::ModulationType modulation) [member function] cls.add_method('AddMulticastServiceFlow', 'void', [param('ns3::ServiceFlow', 'sf'), param('ns3::WimaxPhy::ModulationType', 'modulation')]) ## bs-service-flow-manager.h (module 'wimax'): void ns3::BsServiceFlowManager::AddServiceFlow(ns3::ServiceFlow * serviceFlow) [member function] cls.add_method('AddServiceFlow', 'void', [param('ns3::ServiceFlow *', 'serviceFlow')]) ## bs-service-flow-manager.h (module 'wimax'): void ns3::BsServiceFlowManager::AllocateServiceFlows(ns3::DsaReq const & dsaReq, ns3::Cid cid) [member function] cls.add_method('AllocateServiceFlows', 'void', [param('ns3::DsaReq const &', 'dsaReq'), param('ns3::Cid', 'cid')]) ## bs-service-flow-manager.h (module 'wimax'): void ns3::BsServiceFlowManager::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], is_virtual=True) ## bs-service-flow-manager.h (module 'wimax'): ns3::EventId ns3::BsServiceFlowManager::GetDsaAckTimeoutEvent() const [member function] cls.add_method('GetDsaAckTimeoutEvent', 'ns3::EventId', [], is_const=True) ## bs-service-flow-manager.h (module 'wimax'): ns3::ServiceFlow * ns3::BsServiceFlowManager::GetServiceFlow(uint32_t sfid) const [member function] cls.add_method('GetServiceFlow', 'ns3::ServiceFlow *', [param('uint32_t', 'sfid')], is_const=True) ## bs-service-flow-manager.h (module 'wimax'): ns3::ServiceFlow * ns3::BsServiceFlowManager::GetServiceFlow(ns3::Cid cid) const [member function] cls.add_method('GetServiceFlow', 'ns3::ServiceFlow *', [param('ns3::Cid', 'cid')], is_const=True) ## bs-service-flow-manager.h (module 'wimax'): std::vector<ns3::ServiceFlow*,std::allocator<ns3::ServiceFlow*> > ns3::BsServiceFlowManager::GetServiceFlows(ns3::ServiceFlow::SchedulingType schedulingType) const [member function] cls.add_method('GetServiceFlows', 'std::vector< ns3::ServiceFlow * >', [param('ns3::ServiceFlow::SchedulingType', 'schedulingType')], is_const=True) ## bs-service-flow-manager.h (module 'wimax'): static ns3::TypeId ns3::BsServiceFlowManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## bs-service-flow-manager.h (module 'wimax'): void ns3::BsServiceFlowManager::ProcessDsaAck(ns3::DsaAck const & dsaAck, ns3::Cid cid) [member function] cls.add_method('ProcessDsaAck', 'void', [param('ns3::DsaAck const &', 'dsaAck'), param('ns3::Cid', 'cid')]) ## bs-service-flow-manager.h (module 'wimax'): ns3::ServiceFlow * ns3::BsServiceFlowManager::ProcessDsaReq(ns3::DsaReq const & dsaReq, ns3::Cid cid) [member function] cls.add_method('ProcessDsaReq', 'ns3::ServiceFlow *', [param('ns3::DsaReq const &', 'dsaReq'), param('ns3::Cid', 'cid')]) ## bs-service-flow-manager.h (module 'wimax'): void ns3::BsServiceFlowManager::SetMaxDsaRspRetries(uint8_t maxDsaRspRetries) [member function] cls.add_method('SetMaxDsaRspRetries', 'void', [param('uint8_t', 'maxDsaRspRetries')]) return def register_Ns3CallbackChecker_methods(root_module, cls): ## callback.h (module 'core'): ns3::CallbackChecker::CallbackChecker() [constructor] cls.add_constructor([]) ## callback.h (module 'core'): ns3::CallbackChecker::CallbackChecker(ns3::CallbackChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::CallbackChecker const &', 'arg0')]) return def register_Ns3CallbackImplBase_methods(root_module, cls): ## callback.h (module 'core'): ns3::CallbackImplBase::CallbackImplBase() [constructor] cls.add_constructor([]) ## callback.h (module 'core'): ns3::CallbackImplBase::CallbackImplBase(ns3::CallbackImplBase const & arg0) [copy constructor] cls.add_constructor([param('ns3::CallbackImplBase const &', 'arg0')]) ## callback.h (module 'core'): std::string ns3::CallbackImplBase::GetTypeid() const [member function] cls.add_method('GetTypeid', 'std::string', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## callback.h (module 'core'): bool ns3::CallbackImplBase::IsEqual(ns3::Ptr<ns3::CallbackImplBase const> other) const [member function] cls.add_method('IsEqual', 'bool', [param('ns3::Ptr< ns3::CallbackImplBase const >', 'other')], is_pure_virtual=True, is_const=True, is_virtual=True) ## callback.h (module 'core'): static std::string ns3::CallbackImplBase::Demangle(std::string const & mangled) [member function] cls.add_method('Demangle', 'std::string', [param('std::string const &', 'mangled')], is_static=True, visibility='protected') return def register_Ns3CallbackValue_methods(root_module, cls): ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue(ns3::CallbackValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::CallbackValue const &', 'arg0')]) ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue() [constructor] cls.add_constructor([]) ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue(ns3::CallbackBase const & base) [constructor] cls.add_constructor([param('ns3::CallbackBase const &', 'base')]) ## callback.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::CallbackValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## callback.h (module 'core'): bool ns3::CallbackValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## callback.h (module 'core'): std::string ns3::CallbackValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## callback.h (module 'core'): void ns3::CallbackValue::Set(ns3::CallbackBase base) [member function] cls.add_method('Set', 'void', [param('ns3::CallbackBase', 'base')]) return def register_Ns3Channel_methods(root_module, cls): ## channel.h (module 'network'): ns3::Channel::Channel(ns3::Channel const & arg0) [copy constructor] cls.add_constructor([param('ns3::Channel const &', 'arg0')]) ## channel.h (module 'network'): ns3::Channel::Channel() [constructor] cls.add_constructor([]) ## channel.h (module 'network'): ns3::Ptr<ns3::NetDevice> ns3::Channel::GetDevice(uint32_t i) const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_pure_virtual=True, is_const=True, is_virtual=True) ## channel.h (module 'network'): uint32_t ns3::Channel::GetId() const [member function] cls.add_method('GetId', 'uint32_t', [], is_const=True) ## channel.h (module 'network'): uint32_t ns3::Channel::GetNDevices() const [member function] cls.add_method('GetNDevices', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## channel.h (module 'network'): static ns3::TypeId ns3::Channel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3ConnectionManager_methods(root_module, cls): ## connection-manager.h (module 'wimax'): ns3::ConnectionManager::ConnectionManager(ns3::ConnectionManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::ConnectionManager const &', 'arg0')]) ## connection-manager.h (module 'wimax'): ns3::ConnectionManager::ConnectionManager() [constructor] cls.add_constructor([]) ## connection-manager.h (module 'wimax'): void ns3::ConnectionManager::AddConnection(ns3::Ptr<ns3::WimaxConnection> connection, ns3::Cid::Type type) [member function] cls.add_method('AddConnection', 'void', [param('ns3::Ptr< ns3::WimaxConnection >', 'connection'), param('ns3::Cid::Type', 'type')]) ## connection-manager.h (module 'wimax'): void ns3::ConnectionManager::AllocateManagementConnections(ns3::SSRecord * ssRecord, ns3::RngRsp * rngrsp) [member function] cls.add_method('AllocateManagementConnections', 'void', [param('ns3::SSRecord *', 'ssRecord'), param('ns3::RngRsp *', 'rngrsp')]) ## connection-manager.h (module 'wimax'): ns3::Ptr<ns3::WimaxConnection> ns3::ConnectionManager::CreateConnection(ns3::Cid::Type type) [member function] cls.add_method('CreateConnection', 'ns3::Ptr< ns3::WimaxConnection >', [param('ns3::Cid::Type', 'type')]) ## connection-manager.h (module 'wimax'): void ns3::ConnectionManager::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], is_virtual=True) ## connection-manager.h (module 'wimax'): ns3::Ptr<ns3::WimaxConnection> ns3::ConnectionManager::GetConnection(ns3::Cid cid) [member function] cls.add_method('GetConnection', 'ns3::Ptr< ns3::WimaxConnection >', [param('ns3::Cid', 'cid')]) ## connection-manager.h (module 'wimax'): std::vector<ns3::Ptr<ns3::WimaxConnection>, std::allocator<ns3::Ptr<ns3::WimaxConnection> > > ns3::ConnectionManager::GetConnections(ns3::Cid::Type type) const [member function] cls.add_method('GetConnections', 'std::vector< ns3::Ptr< ns3::WimaxConnection > >', [param('ns3::Cid::Type', 'type')], is_const=True) ## connection-manager.h (module 'wimax'): uint32_t ns3::ConnectionManager::GetNPackets(ns3::Cid::Type type, ns3::ServiceFlow::SchedulingType schedulingType) const [member function] cls.add_method('GetNPackets', 'uint32_t', [param('ns3::Cid::Type', 'type'), param('ns3::ServiceFlow::SchedulingType', 'schedulingType')], is_const=True) ## connection-manager.h (module 'wimax'): static ns3::TypeId ns3::ConnectionManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## connection-manager.h (module 'wimax'): bool ns3::ConnectionManager::HasPackets() const [member function] cls.add_method('HasPackets', 'bool', [], is_const=True) ## connection-manager.h (module 'wimax'): void ns3::ConnectionManager::SetCidFactory(ns3::CidFactory * cidFactory) [member function] cls.add_method('SetCidFactory', 'void', [param('ns3::CidFactory *', 'cidFactory')]) return def register_Ns3ConstantRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ConstantRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ConstantRandomVariable::ConstantRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::ConstantRandomVariable::GetConstant() const [member function] cls.add_method('GetConstant', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ConstantRandomVariable::GetValue(double constant) [member function] cls.add_method('GetValue', 'double', [param('double', 'constant')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ConstantRandomVariable::GetInteger(uint32_t constant) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'constant')]) ## random-variable-stream.h (module 'core'): double ns3::ConstantRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ConstantRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3Dcd_methods(root_module, cls): ## dl-mac-messages.h (module 'wimax'): ns3::Dcd::Dcd(ns3::Dcd const & arg0) [copy constructor] cls.add_constructor([param('ns3::Dcd const &', 'arg0')]) ## dl-mac-messages.h (module 'wimax'): ns3::Dcd::Dcd() [constructor] cls.add_constructor([]) ## dl-mac-messages.h (module 'wimax'): void ns3::Dcd::AddDlBurstProfile(ns3::OfdmDlBurstProfile dlBurstProfile) [member function] cls.add_method('AddDlBurstProfile', 'void', [param('ns3::OfdmDlBurstProfile', 'dlBurstProfile')]) ## dl-mac-messages.h (module 'wimax'): uint32_t ns3::Dcd::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## dl-mac-messages.h (module 'wimax'): ns3::OfdmDcdChannelEncodings ns3::Dcd::GetChannelEncodings() const [member function] cls.add_method('GetChannelEncodings', 'ns3::OfdmDcdChannelEncodings', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::Dcd::GetConfigurationChangeCount() const [member function] cls.add_method('GetConfigurationChangeCount', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): std::vector<ns3::OfdmDlBurstProfile, std::allocator<ns3::OfdmDlBurstProfile> > ns3::Dcd::GetDlBurstProfiles() const [member function] cls.add_method('GetDlBurstProfiles', 'std::vector< ns3::OfdmDlBurstProfile >', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): ns3::TypeId ns3::Dcd::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## dl-mac-messages.h (module 'wimax'): std::string ns3::Dcd::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::Dcd::GetNrDlBurstProfiles() const [member function] cls.add_method('GetNrDlBurstProfiles', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint32_t ns3::Dcd::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## dl-mac-messages.h (module 'wimax'): static ns3::TypeId ns3::Dcd::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## dl-mac-messages.h (module 'wimax'): void ns3::Dcd::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## dl-mac-messages.h (module 'wimax'): void ns3::Dcd::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## dl-mac-messages.h (module 'wimax'): void ns3::Dcd::SetChannelEncodings(ns3::OfdmDcdChannelEncodings channelEncodings) [member function] cls.add_method('SetChannelEncodings', 'void', [param('ns3::OfdmDcdChannelEncodings', 'channelEncodings')]) ## dl-mac-messages.h (module 'wimax'): void ns3::Dcd::SetConfigurationChangeCount(uint8_t configurationChangeCount) [member function] cls.add_method('SetConfigurationChangeCount', 'void', [param('uint8_t', 'configurationChangeCount')]) ## dl-mac-messages.h (module 'wimax'): void ns3::Dcd::SetNrDlBurstProfiles(uint8_t nrDlBurstProfiles) [member function] cls.add_method('SetNrDlBurstProfiles', 'void', [param('uint8_t', 'nrDlBurstProfiles')]) return def register_Ns3DeterministicRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::DeterministicRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::DeterministicRandomVariable::DeterministicRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): void ns3::DeterministicRandomVariable::SetValueArray(double * values, uint64_t length) [member function] cls.add_method('SetValueArray', 'void', [param('double *', 'values'), param('uint64_t', 'length')]) ## random-variable-stream.h (module 'core'): double ns3::DeterministicRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::DeterministicRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3DlMap_methods(root_module, cls): ## dl-mac-messages.h (module 'wimax'): ns3::DlMap::DlMap(ns3::DlMap const & arg0) [copy constructor] cls.add_constructor([param('ns3::DlMap const &', 'arg0')]) ## dl-mac-messages.h (module 'wimax'): ns3::DlMap::DlMap() [constructor] cls.add_constructor([]) ## dl-mac-messages.h (module 'wimax'): void ns3::DlMap::AddDlMapElement(ns3::OfdmDlMapIe dlMapElement) [member function] cls.add_method('AddDlMapElement', 'void', [param('ns3::OfdmDlMapIe', 'dlMapElement')]) ## dl-mac-messages.h (module 'wimax'): uint32_t ns3::DlMap::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## dl-mac-messages.h (module 'wimax'): ns3::Mac48Address ns3::DlMap::GetBaseStationId() const [member function] cls.add_method('GetBaseStationId', 'ns3::Mac48Address', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint8_t ns3::DlMap::GetDcdCount() const [member function] cls.add_method('GetDcdCount', 'uint8_t', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): std::list<ns3::OfdmDlMapIe, std::allocator<ns3::OfdmDlMapIe> > ns3::DlMap::GetDlMapElements() const [member function] cls.add_method('GetDlMapElements', 'std::list< ns3::OfdmDlMapIe >', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): ns3::TypeId ns3::DlMap::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## dl-mac-messages.h (module 'wimax'): std::string ns3::DlMap::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## dl-mac-messages.h (module 'wimax'): uint32_t ns3::DlMap::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## dl-mac-messages.h (module 'wimax'): static ns3::TypeId ns3::DlMap::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## dl-mac-messages.h (module 'wimax'): void ns3::DlMap::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## dl-mac-messages.h (module 'wimax'): void ns3::DlMap::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## dl-mac-messages.h (module 'wimax'): void ns3::DlMap::SetBaseStationId(ns3::Mac48Address baseStationID) [member function] cls.add_method('SetBaseStationId', 'void', [param('ns3::Mac48Address', 'baseStationID')]) ## dl-mac-messages.h (module 'wimax'): void ns3::DlMap::SetDcdCount(uint8_t dcdCount) [member function] cls.add_method('SetDcdCount', 'void', [param('uint8_t', 'dcdCount')]) return def register_Ns3DsaAck_methods(root_module, cls): ## mac-messages.h (module 'wimax'): ns3::DsaAck::DsaAck(ns3::DsaAck const & arg0) [copy constructor] cls.add_constructor([param('ns3::DsaAck const &', 'arg0')]) ## mac-messages.h (module 'wimax'): ns3::DsaAck::DsaAck() [constructor] cls.add_constructor([]) ## mac-messages.h (module 'wimax'): uint32_t ns3::DsaAck::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mac-messages.h (module 'wimax'): uint16_t ns3::DsaAck::GetConfirmationCode() const [member function] cls.add_method('GetConfirmationCode', 'uint16_t', [], is_const=True) ## mac-messages.h (module 'wimax'): ns3::TypeId ns3::DsaAck::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): std::string ns3::DsaAck::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## mac-messages.h (module 'wimax'): uint32_t ns3::DsaAck::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): uint16_t ns3::DsaAck::GetTransactionId() const [member function] cls.add_method('GetTransactionId', 'uint16_t', [], is_const=True) ## mac-messages.h (module 'wimax'): static ns3::TypeId ns3::DsaAck::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mac-messages.h (module 'wimax'): void ns3::DsaAck::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): void ns3::DsaAck::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): void ns3::DsaAck::SetConfirmationCode(uint16_t confirmationCode) [member function] cls.add_method('SetConfirmationCode', 'void', [param('uint16_t', 'confirmationCode')]) ## mac-messages.h (module 'wimax'): void ns3::DsaAck::SetTransactionId(uint16_t transactionId) [member function] cls.add_method('SetTransactionId', 'void', [param('uint16_t', 'transactionId')]) return def register_Ns3DsaReq_methods(root_module, cls): ## mac-messages.h (module 'wimax'): ns3::DsaReq::DsaReq(ns3::DsaReq const & arg0) [copy constructor] cls.add_constructor([param('ns3::DsaReq const &', 'arg0')]) ## mac-messages.h (module 'wimax'): ns3::DsaReq::DsaReq() [constructor] cls.add_constructor([]) ## mac-messages.h (module 'wimax'): ns3::DsaReq::DsaReq(ns3::ServiceFlow sf) [constructor] cls.add_constructor([param('ns3::ServiceFlow', 'sf')]) ## mac-messages.h (module 'wimax'): uint32_t ns3::DsaReq::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mac-messages.h (module 'wimax'): ns3::Cid ns3::DsaReq::GetCid() const [member function] cls.add_method('GetCid', 'ns3::Cid', [], is_const=True) ## mac-messages.h (module 'wimax'): ns3::TypeId ns3::DsaReq::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): std::string ns3::DsaReq::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## mac-messages.h (module 'wimax'): uint32_t ns3::DsaReq::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): ns3::ServiceFlow ns3::DsaReq::GetServiceFlow() const [member function] cls.add_method('GetServiceFlow', 'ns3::ServiceFlow', [], is_const=True) ## mac-messages.h (module 'wimax'): uint32_t ns3::DsaReq::GetSfid() const [member function] cls.add_method('GetSfid', 'uint32_t', [], is_const=True) ## mac-messages.h (module 'wimax'): uint16_t ns3::DsaReq::GetTransactionId() const [member function] cls.add_method('GetTransactionId', 'uint16_t', [], is_const=True) ## mac-messages.h (module 'wimax'): static ns3::TypeId ns3::DsaReq::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mac-messages.h (module 'wimax'): void ns3::DsaReq::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): void ns3::DsaReq::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): void ns3::DsaReq::SetCid(ns3::Cid cid) [member function] cls.add_method('SetCid', 'void', [param('ns3::Cid', 'cid')]) ## mac-messages.h (module 'wimax'): void ns3::DsaReq::SetServiceFlow(ns3::ServiceFlow sf) [member function] cls.add_method('SetServiceFlow', 'void', [param('ns3::ServiceFlow', 'sf')]) ## mac-messages.h (module 'wimax'): void ns3::DsaReq::SetSfid(uint32_t sfid) [member function] cls.add_method('SetSfid', 'void', [param('uint32_t', 'sfid')]) ## mac-messages.h (module 'wimax'): void ns3::DsaReq::SetTransactionId(uint16_t transactionId) [member function] cls.add_method('SetTransactionId', 'void', [param('uint16_t', 'transactionId')]) return def register_Ns3DsaRsp_methods(root_module, cls): ## mac-messages.h (module 'wimax'): ns3::DsaRsp::DsaRsp(ns3::DsaRsp const & arg0) [copy constructor] cls.add_constructor([param('ns3::DsaRsp const &', 'arg0')]) ## mac-messages.h (module 'wimax'): ns3::DsaRsp::DsaRsp() [constructor] cls.add_constructor([]) ## mac-messages.h (module 'wimax'): uint32_t ns3::DsaRsp::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mac-messages.h (module 'wimax'): ns3::Cid ns3::DsaRsp::GetCid() const [member function] cls.add_method('GetCid', 'ns3::Cid', [], is_const=True) ## mac-messages.h (module 'wimax'): uint16_t ns3::DsaRsp::GetConfirmationCode() const [member function] cls.add_method('GetConfirmationCode', 'uint16_t', [], is_const=True) ## mac-messages.h (module 'wimax'): ns3::TypeId ns3::DsaRsp::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): std::string ns3::DsaRsp::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## mac-messages.h (module 'wimax'): uint32_t ns3::DsaRsp::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): ns3::ServiceFlow ns3::DsaRsp::GetServiceFlow() const [member function] cls.add_method('GetServiceFlow', 'ns3::ServiceFlow', [], is_const=True) ## mac-messages.h (module 'wimax'): uint32_t ns3::DsaRsp::GetSfid() const [member function] cls.add_method('GetSfid', 'uint32_t', [], is_const=True) ## mac-messages.h (module 'wimax'): uint16_t ns3::DsaRsp::GetTransactionId() const [member function] cls.add_method('GetTransactionId', 'uint16_t', [], is_const=True) ## mac-messages.h (module 'wimax'): static ns3::TypeId ns3::DsaRsp::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mac-messages.h (module 'wimax'): void ns3::DsaRsp::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): void ns3::DsaRsp::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mac-messages.h (module 'wimax'): void ns3::DsaRsp::SetCid(ns3::Cid cid) [member function] cls.add_method('SetCid', 'void', [param('ns3::Cid', 'cid')]) ## mac-messages.h (module 'wimax'): void ns3::DsaRsp::SetConfirmationCode(uint16_t confirmationCode) [member function] cls.add_method('SetConfirmationCode', 'void', [param('uint16_t', 'confirmationCode')]) ## mac-messages.h (module 'wimax'): void ns3::DsaRsp::SetServiceFlow(ns3::ServiceFlow sf) [member function] cls.add_method('SetServiceFlow', 'void', [param('ns3::ServiceFlow', 'sf')]) ## mac-messages.h (module 'wimax'): void ns3::DsaRsp::SetSfid(uint32_t sfid) [member function] cls.add_method('SetSfid', 'void', [param('uint32_t', 'sfid')]) ## mac-messages.h (module 'wimax'): void ns3::DsaRsp::SetTransactionId(uint16_t transactionId) [member function] cls.add_method('SetTransactionId', 'void', [param('uint16_t', 'transactionId')]) return def register_Ns3EmpiricalRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): ns3::EmpiricalRandomVariable::EmpiricalRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::CDF(double v, double c) [member function] cls.add_method('CDF', 'void', [param('double', 'v'), param('double', 'c')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::EmpiricalRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::EmpiricalRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function] cls.add_method('Interpolate', 'double', [param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')], visibility='private', is_virtual=True) ## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function] cls.add_method('Validate', 'void', [], visibility='private', is_virtual=True) return def register_Ns3EmptyAttributeValue_methods(root_module, cls): ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue(ns3::EmptyAttributeValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::EmptyAttributeValue const &', 'arg0')]) ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue() [constructor] cls.add_constructor([]) ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::EmptyAttributeValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, visibility='private', is_virtual=True) ## attribute.h (module 'core'): bool ns3::EmptyAttributeValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], visibility='private', is_virtual=True) ## attribute.h (module 'core'): std::string ns3::EmptyAttributeValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, visibility='private', is_virtual=True) return def register_Ns3ErlangRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ErlangRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ErlangRandomVariable::ErlangRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ErlangRandomVariable::GetK() const [member function] cls.add_method('GetK', 'uint32_t', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ErlangRandomVariable::GetLambda() const [member function] cls.add_method('GetLambda', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ErlangRandomVariable::GetValue(uint32_t k, double lambda) [member function] cls.add_method('GetValue', 'double', [param('uint32_t', 'k'), param('double', 'lambda')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ErlangRandomVariable::GetInteger(uint32_t k, uint32_t lambda) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'k'), param('uint32_t', 'lambda')]) ## random-variable-stream.h (module 'core'): double ns3::ErlangRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ErlangRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3EventImpl_methods(root_module, cls): ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl(ns3::EventImpl const & arg0) [copy constructor] cls.add_constructor([param('ns3::EventImpl const &', 'arg0')]) ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl() [constructor] cls.add_constructor([]) ## event-impl.h (module 'core'): void ns3::EventImpl::Cancel() [member function] cls.add_method('Cancel', 'void', []) ## event-impl.h (module 'core'): void ns3::EventImpl::Invoke() [member function] cls.add_method('Invoke', 'void', []) ## event-impl.h (module 'core'): bool ns3::EventImpl::IsCancelled() [member function] cls.add_method('IsCancelled', 'bool', []) ## event-impl.h (module 'core'): void ns3::EventImpl::Notify() [member function] cls.add_method('Notify', 'void', [], is_pure_virtual=True, visibility='protected', is_virtual=True) return def register_Ns3ExponentialRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ExponentialRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ExponentialRandomVariable::ExponentialRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::ExponentialRandomVariable::GetMean() const [member function] cls.add_method('GetMean', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ExponentialRandomVariable::GetBound() const [member function] cls.add_method('GetBound', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ExponentialRandomVariable::GetValue(double mean, double bound) [member function] cls.add_method('GetValue', 'double', [param('double', 'mean'), param('double', 'bound')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ExponentialRandomVariable::GetInteger(uint32_t mean, uint32_t bound) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mean'), param('uint32_t', 'bound')]) ## random-variable-stream.h (module 'core'): double ns3::ExponentialRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ExponentialRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3FixedRssLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::FixedRssLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::FixedRssLossModel::FixedRssLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): void ns3::FixedRssLossModel::SetRss(double rss) [member function] cls.add_method('SetRss', 'void', [param('double', 'rss')]) ## propagation-loss-model.h (module 'propagation'): double ns3::FixedRssLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::FixedRssLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3FragmentationSubheader_methods(root_module, cls): ## wimax-mac-header.h (module 'wimax'): ns3::FragmentationSubheader::FragmentationSubheader(ns3::FragmentationSubheader const & arg0) [copy constructor] cls.add_constructor([param('ns3::FragmentationSubheader const &', 'arg0')]) ## wimax-mac-header.h (module 'wimax'): ns3::FragmentationSubheader::FragmentationSubheader() [constructor] cls.add_constructor([]) ## wimax-mac-header.h (module 'wimax'): uint32_t ns3::FragmentationSubheader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::FragmentationSubheader::GetFc() const [member function] cls.add_method('GetFc', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::FragmentationSubheader::GetFsn() const [member function] cls.add_method('GetFsn', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): ns3::TypeId ns3::FragmentationSubheader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): std::string ns3::FragmentationSubheader::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint32_t ns3::FragmentationSubheader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): static ns3::TypeId ns3::FragmentationSubheader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wimax-mac-header.h (module 'wimax'): void ns3::FragmentationSubheader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): void ns3::FragmentationSubheader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): void ns3::FragmentationSubheader::SetFc(uint8_t fc) [member function] cls.add_method('SetFc', 'void', [param('uint8_t', 'fc')]) ## wimax-mac-header.h (module 'wimax'): void ns3::FragmentationSubheader::SetFsn(uint8_t fsn) [member function] cls.add_method('SetFsn', 'void', [param('uint8_t', 'fsn')]) return def register_Ns3FriisPropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::FriisPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::FriisPropagationLossModel::FriisPropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function] cls.add_method('SetFrequency', 'void', [param('double', 'frequency')]) ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetSystemLoss(double systemLoss) [member function] cls.add_method('SetSystemLoss', 'void', [param('double', 'systemLoss')]) ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetMinLoss(double minLoss) [member function] cls.add_method('SetMinLoss', 'void', [param('double', 'minLoss')]) ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetMinLoss() const [member function] cls.add_method('GetMinLoss', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetFrequency() const [member function] cls.add_method('GetFrequency', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetSystemLoss() const [member function] cls.add_method('GetSystemLoss', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::FriisPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3GammaRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::GammaRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::GammaRandomVariable::GammaRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::GammaRandomVariable::GetAlpha() const [member function] cls.add_method('GetAlpha', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::GammaRandomVariable::GetBeta() const [member function] cls.add_method('GetBeta', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::GammaRandomVariable::GetValue(double alpha, double beta) [member function] cls.add_method('GetValue', 'double', [param('double', 'alpha'), param('double', 'beta')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::GammaRandomVariable::GetInteger(uint32_t alpha, uint32_t beta) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'alpha'), param('uint32_t', 'beta')]) ## random-variable-stream.h (module 'core'): double ns3::GammaRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::GammaRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3GenericMacHeader_methods(root_module, cls): ## wimax-mac-header.h (module 'wimax'): ns3::GenericMacHeader::GenericMacHeader(ns3::GenericMacHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::GenericMacHeader const &', 'arg0')]) ## wimax-mac-header.h (module 'wimax'): ns3::GenericMacHeader::GenericMacHeader() [constructor] cls.add_constructor([]) ## wimax-mac-header.h (module 'wimax'): uint32_t ns3::GenericMacHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::GenericMacHeader::GetCi() const [member function] cls.add_method('GetCi', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): ns3::Cid ns3::GenericMacHeader::GetCid() const [member function] cls.add_method('GetCid', 'ns3::Cid', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::GenericMacHeader::GetEc() const [member function] cls.add_method('GetEc', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::GenericMacHeader::GetEks() const [member function] cls.add_method('GetEks', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::GenericMacHeader::GetHcs() const [member function] cls.add_method('GetHcs', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::GenericMacHeader::GetHt() const [member function] cls.add_method('GetHt', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): ns3::TypeId ns3::GenericMacHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): uint16_t ns3::GenericMacHeader::GetLen() const [member function] cls.add_method('GetLen', 'uint16_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): std::string ns3::GenericMacHeader::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint32_t ns3::GenericMacHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::GenericMacHeader::GetType() const [member function] cls.add_method('GetType', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): static ns3::TypeId ns3::GenericMacHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wimax-mac-header.h (module 'wimax'): void ns3::GenericMacHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): void ns3::GenericMacHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): void ns3::GenericMacHeader::SetCi(uint8_t ci) [member function] cls.add_method('SetCi', 'void', [param('uint8_t', 'ci')]) ## wimax-mac-header.h (module 'wimax'): void ns3::GenericMacHeader::SetCid(ns3::Cid cid) [member function] cls.add_method('SetCid', 'void', [param('ns3::Cid', 'cid')]) ## wimax-mac-header.h (module 'wimax'): void ns3::GenericMacHeader::SetEc(uint8_t ec) [member function] cls.add_method('SetEc', 'void', [param('uint8_t', 'ec')]) ## wimax-mac-header.h (module 'wimax'): void ns3::GenericMacHeader::SetEks(uint8_t eks) [member function] cls.add_method('SetEks', 'void', [param('uint8_t', 'eks')]) ## wimax-mac-header.h (module 'wimax'): void ns3::GenericMacHeader::SetHcs(uint8_t hcs) [member function] cls.add_method('SetHcs', 'void', [param('uint8_t', 'hcs')]) ## wimax-mac-header.h (module 'wimax'): void ns3::GenericMacHeader::SetHt(uint8_t HT) [member function] cls.add_method('SetHt', 'void', [param('uint8_t', 'HT')]) ## wimax-mac-header.h (module 'wimax'): void ns3::GenericMacHeader::SetLen(uint16_t len) [member function] cls.add_method('SetLen', 'void', [param('uint16_t', 'len')]) ## wimax-mac-header.h (module 'wimax'): void ns3::GenericMacHeader::SetType(uint8_t type) [member function] cls.add_method('SetType', 'void', [param('uint8_t', 'type')]) ## wimax-mac-header.h (module 'wimax'): bool ns3::GenericMacHeader::check_hcs() const [member function] cls.add_method('check_hcs', 'bool', [], is_const=True) return def register_Ns3GrantManagementSubheader_methods(root_module, cls): ## wimax-mac-header.h (module 'wimax'): ns3::GrantManagementSubheader::GrantManagementSubheader(ns3::GrantManagementSubheader const & arg0) [copy constructor] cls.add_constructor([param('ns3::GrantManagementSubheader const &', 'arg0')]) ## wimax-mac-header.h (module 'wimax'): ns3::GrantManagementSubheader::GrantManagementSubheader() [constructor] cls.add_constructor([]) ## wimax-mac-header.h (module 'wimax'): uint32_t ns3::GrantManagementSubheader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## wimax-mac-header.h (module 'wimax'): ns3::TypeId ns3::GrantManagementSubheader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): std::string ns3::GrantManagementSubheader::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint16_t ns3::GrantManagementSubheader::GetPbr() const [member function] cls.add_method('GetPbr', 'uint16_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::GrantManagementSubheader::GetPm() const [member function] cls.add_method('GetPm', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): uint32_t ns3::GrantManagementSubheader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): uint8_t ns3::GrantManagementSubheader::GetSi() const [member function] cls.add_method('GetSi', 'uint8_t', [], is_const=True) ## wimax-mac-header.h (module 'wimax'): static ns3::TypeId ns3::GrantManagementSubheader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wimax-mac-header.h (module 'wimax'): void ns3::GrantManagementSubheader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): void ns3::GrantManagementSubheader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## wimax-mac-header.h (module 'wimax'): void ns3::GrantManagementSubheader::SetPbr(uint16_t pbr) [member function] cls.add_method('SetPbr', 'void', [param('uint16_t', 'pbr')]) ## wimax-mac-header.h (module 'wimax'): void ns3::GrantManagementSubheader::SetPm(uint8_t pm) [member function] cls.add_method('SetPm', 'void', [param('uint8_t', 'pm')]) ## wimax-mac-header.h (module 'wimax'): void ns3::GrantManagementSubheader::SetSi(uint8_t si) [member function] cls.add_method('SetSi', 'void', [param('uint8_t', 'si')]) return def register_Ns3IpcsClassifier_methods(root_module, cls): ## ipcs-classifier.h (module 'wimax'): ns3::IpcsClassifier::IpcsClassifier(ns3::IpcsClassifier const & arg0) [copy constructor] cls.add_constructor([param('ns3::IpcsClassifier const &', 'arg0')]) ## ipcs-classifier.h (module 'wimax'): ns3::IpcsClassifier::IpcsClassifier() [constructor] cls.add_constructor([]) ## ipcs-classifier.h (module 'wimax'): ns3::ServiceFlow * ns3::IpcsClassifier::Classify(ns3::Ptr<const ns3::Packet> packet, ns3::Ptr<ns3::ServiceFlowManager> sfm, ns3::ServiceFlow::Direction dir) [member function] cls.add_method('Classify', 'ns3::ServiceFlow *', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Ptr< ns3::ServiceFlowManager >', 'sfm'), param('ns3::ServiceFlow::Direction', 'dir')]) ## ipcs-classifier.h (module 'wimax'): static ns3::TypeId ns3::IpcsClassifier::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3Ipv4AddressChecker_methods(root_module, cls): ## ipv4-address.h (module 'network'): ns3::Ipv4AddressChecker::Ipv4AddressChecker() [constructor] cls.add_constructor([]) ## ipv4-address.h (module 'network'): ns3::Ipv4AddressChecker::Ipv4AddressChecker(ns3::Ipv4AddressChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4AddressChecker const &', 'arg0')]) return def register_Ns3Ipv4AddressValue_methods(root_module, cls): ## ipv4-address.h (module 'network'): ns3::Ipv4AddressValue::Ipv4AddressValue() [constructor] cls.add_constructor([]) ## ipv4-address.h (module 'network'): ns3::Ipv4AddressValue::Ipv4AddressValue(ns3::Ipv4AddressValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4AddressValue const &', 'arg0')]) ## ipv4-address.h (module 'network'): ns3::Ipv4AddressValue::Ipv4AddressValue(ns3::Ipv4Address const & value) [constructor] cls.add_constructor([param('ns3::Ipv4Address const &', 'value')]) ## ipv4-address.h (module 'network'): ns3::Ptr<ns3::AttributeValue> ns3::Ipv4AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4AddressValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## ipv4-address.h (module 'network'): ns3::Ipv4Address ns3::Ipv4AddressValue::Get() const [member function] cls.add_method('Get', 'ns3::Ipv4Address', [], is_const=True) ## ipv4-address.h (module 'network'): std::string ns3::Ipv4AddressValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4AddressValue::Set(ns3::Ipv4Address const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Ipv4Address const &', 'value')]) return def register_Ns3Ipv4MaskChecker_methods(root_module, cls): ## ipv4-address.h (module 'network'): ns3::Ipv4MaskChecker::Ipv4MaskChecker() [constructor] cls.add_constructor([]) ## ipv4-address.h (module 'network'): ns3::Ipv4MaskChecker::Ipv4MaskChecker(ns3::Ipv4MaskChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4MaskChecker const &', 'arg0')]) return def register_Ns3Ipv4MaskValue_methods(root_module, cls): ## ipv4-address.h (module 'network'): ns3::Ipv4MaskValue::Ipv4MaskValue() [constructor] cls.add_constructor([]) ## ipv4-address.h (module 'network'): ns3::Ipv4MaskValue::Ipv4MaskValue(ns3::Ipv4MaskValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4MaskValue const &', 'arg0')]) ## ipv4-address.h (module 'network'): ns3::Ipv4MaskValue::Ipv4MaskValue(ns3::Ipv4Mask const & value) [constructor] cls.add_constructor([param('ns3::Ipv4Mask const &', 'value')]) ## ipv4-address.h (module 'network'): ns3::Ptr<ns3::AttributeValue> ns3::Ipv4MaskValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4MaskValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## ipv4-address.h (module 'network'): ns3::Ipv4Mask ns3::Ipv4MaskValue::Get() const [member function] cls.add_method('Get', 'ns3::Ipv4Mask', [], is_const=True) ## ipv4-address.h (module 'network'): std::string ns3::Ipv4MaskValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4MaskValue::Set(ns3::Ipv4Mask const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Ipv4Mask const &', 'value')]) return def register_Ns3Ipv6AddressChecker_methods(root_module, cls): ## ipv6-address.h (module 'network'): ns3::Ipv6AddressChecker::Ipv6AddressChecker() [constructor] cls.add_constructor([]) ## ipv6-address.h (module 'network'): ns3::Ipv6AddressChecker::Ipv6AddressChecker(ns3::Ipv6AddressChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv6AddressChecker const &', 'arg0')]) return def register_Ns3Ipv6AddressValue_methods(root_module, cls): ## ipv6-address.h (module 'network'): ns3::Ipv6AddressValue::Ipv6AddressValue() [constructor] cls.add_constructor([]) ## ipv6-address.h (module 'network'): ns3::Ipv6AddressValue::Ipv6AddressValue(ns3::Ipv6AddressValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv6AddressValue const &', 'arg0')]) ## ipv6-address.h (module 'network'): ns3::Ipv6AddressValue::Ipv6AddressValue(ns3::Ipv6Address const & value) [constructor] cls.add_constructor([param('ns3::Ipv6Address const &', 'value')]) ## ipv6-address.h (module 'network'): ns3::Ptr<ns3::AttributeValue> ns3::Ipv6AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6AddressValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## ipv6-address.h (module 'network'): ns3::Ipv6Address ns3::Ipv6AddressValue::Get() const [member function] cls.add_method('Get', 'ns3::Ipv6Address', [], is_const=True) ## ipv6-address.h (module 'network'): std::string ns3::Ipv6AddressValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6AddressValue::Set(ns3::Ipv6Address const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Ipv6Address const &', 'value')]) return def register_Ns3Ipv6PrefixChecker_methods(root_module, cls): ## ipv6-address.h (module 'network'): ns3::Ipv6PrefixChecker::Ipv6PrefixChecker() [constructor] cls.add_constructor([]) ## ipv6-address.h (module 'network'): ns3::Ipv6PrefixChecker::Ipv6PrefixChecker(ns3::Ipv6PrefixChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv6PrefixChecker const &', 'arg0')]) return def register_Ns3Ipv6PrefixValue_methods(root_module, cls): ## ipv6-address.h (module 'network'): ns3::Ipv6PrefixValue::Ipv6PrefixValue() [constructor] cls.add_constructor([]) ## ipv6-address.h (module 'network'): ns3::Ipv6PrefixValue::Ipv6PrefixValue(ns3::Ipv6PrefixValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv6PrefixValue const &', 'arg0')]) ## ipv6-address.h (module 'network'): ns3::Ipv6PrefixValue::Ipv6PrefixValue(ns3::Ipv6Prefix const & value) [constructor] cls.add_constructor([param('ns3::Ipv6Prefix const &', 'value')]) ## ipv6-address.h (module 'network'): ns3::Ptr<ns3::AttributeValue> ns3::Ipv6PrefixValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6PrefixValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix ns3::Ipv6PrefixValue::Get() const [member function] cls.add_method('Get', 'ns3::Ipv6Prefix', [], is_const=True) ## ipv6-address.h (module 'network'): std::string ns3::Ipv6PrefixValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6PrefixValue::Set(ns3::Ipv6Prefix const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Ipv6Prefix const &', 'value')]) return def register_Ns3LogDistancePropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::LogDistancePropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::LogDistancePropagationLossModel::LogDistancePropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): void ns3::LogDistancePropagationLossModel::SetPathLossExponent(double n) [member function] cls.add_method('SetPathLossExponent', 'void', [param('double', 'n')]) ## propagation-loss-model.h (module 'propagation'): double ns3::LogDistancePropagationLossModel::GetPathLossExponent() const [member function] cls.add_method('GetPathLossExponent', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): void ns3::LogDistancePropagationLossModel::SetReference(double referenceDistance, double referenceLoss) [member function] cls.add_method('SetReference', 'void', [param('double', 'referenceDistance'), param('double', 'referenceLoss')]) ## propagation-loss-model.h (module 'propagation'): double ns3::LogDistancePropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::LogDistancePropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3LogNormalRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::LogNormalRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::LogNormalRandomVariable::LogNormalRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::LogNormalRandomVariable::GetMu() const [member function] cls.add_method('GetMu', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::LogNormalRandomVariable::GetSigma() const [member function] cls.add_method('GetSigma', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::LogNormalRandomVariable::GetValue(double mu, double sigma) [member function] cls.add_method('GetValue', 'double', [param('double', 'mu'), param('double', 'sigma')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::LogNormalRandomVariable::GetInteger(uint32_t mu, uint32_t sigma) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mu'), param('uint32_t', 'sigma')]) ## random-variable-stream.h (module 'core'): double ns3::LogNormalRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::LogNormalRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3Mac48AddressChecker_methods(root_module, cls): ## mac48-address.h (module 'network'): ns3::Mac48AddressChecker::Mac48AddressChecker() [constructor] cls.add_constructor([]) ## mac48-address.h (module 'network'): ns3::Mac48AddressChecker::Mac48AddressChecker(ns3::Mac48AddressChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Mac48AddressChecker const &', 'arg0')]) return def register_Ns3Mac48AddressValue_methods(root_module, cls): ## mac48-address.h (module 'network'): ns3::Mac48AddressValue::Mac48AddressValue() [constructor] cls.add_constructor([]) ## mac48-address.h (module 'network'): ns3::Mac48AddressValue::Mac48AddressValue(ns3::Mac48AddressValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Mac48AddressValue const &', 'arg0')]) ## mac48-address.h (module 'network'): ns3::Mac48AddressValue::Mac48AddressValue(ns3::Mac48Address const & value) [constructor] cls.add_constructor([param('ns3::Mac48Address const &', 'value')]) ## mac48-address.h (module 'network'): ns3::Ptr<ns3::AttributeValue> ns3::Mac48AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## mac48-address.h (module 'network'): bool ns3::Mac48AddressValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## mac48-address.h (module 'network'): ns3::Mac48Address ns3::Mac48AddressValue::Get() const [member function] cls.add_method('Get', 'ns3::Mac48Address', [], is_const=True) ## mac48-address.h (module 'network'): std::string ns3::Mac48AddressValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## mac48-address.h (module 'network'): void ns3::Mac48AddressValue::Set(ns3::Mac48Address const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Mac48Address const &', 'value')]) return def register_Ns3MatrixPropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::MatrixPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::MatrixPropagationLossModel::MatrixPropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): void ns3::MatrixPropagationLossModel::SetLoss(ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b, double loss, bool symmetric=true) [member function] cls.add_method('SetLoss', 'void', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b'), param('double', 'loss'), param('bool', 'symmetric', default_value='true')]) ## propagation-loss-model.h (module 'propagation'): void ns3::MatrixPropagationLossModel::SetDefaultLoss(double defaultLoss) [member function] cls.add_method('SetDefaultLoss', 'void', [param('double', 'defaultLoss')]) ## propagation-loss-model.h (module 'propagation'): double ns3::MatrixPropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::MatrixPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3NakagamiPropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::NakagamiPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::NakagamiPropagationLossModel::NakagamiPropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): double ns3::NakagamiPropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::NakagamiPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3NetDevice_methods(root_module, cls): ## net-device.h (module 'network'): ns3::NetDevice::NetDevice() [constructor] cls.add_constructor([]) ## net-device.h (module 'network'): ns3::NetDevice::NetDevice(ns3::NetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::NetDevice const &', 'arg0')]) ## net-device.h (module 'network'): void ns3::NetDevice::AddLinkChangeCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('AddLinkChangeCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Address ns3::NetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Address ns3::NetDevice::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Ptr<ns3::Channel> ns3::NetDevice::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::Channel >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): uint32_t ns3::NetDevice::GetIfIndex() const [member function] cls.add_method('GetIfIndex', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): uint16_t ns3::NetDevice::GetMtu() const [member function] cls.add_method('GetMtu', 'uint16_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Address ns3::NetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv4Address', 'multicastGroup')], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Address ns3::NetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv6Address', 'addr')], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Ptr<ns3::Node> ns3::NetDevice::GetNode() const [member function] cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): static ns3::TypeId ns3::NetDevice::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsBridge() const [member function] cls.add_method('IsBridge', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsBroadcast() const [member function] cls.add_method('IsBroadcast', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsLinkUp() const [member function] cls.add_method('IsLinkUp', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsMulticast() const [member function] cls.add_method('IsMulticast', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsPointToPoint() const [member function] cls.add_method('IsPointToPoint', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::NeedsArp() const [member function] cls.add_method('NeedsArp', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Send', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::SendFrom(ns3::Ptr<ns3::Packet> packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('SendFrom', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetAddress(ns3::Address address) [member function] cls.add_method('SetAddress', 'void', [param('ns3::Address', 'address')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetIfIndex(uint32_t const index) [member function] cls.add_method('SetIfIndex', 'void', [param('uint32_t const', 'index')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::SetMtu(uint16_t const mtu) [member function] cls.add_method('SetMtu', 'bool', [param('uint16_t const', 'mtu')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetPromiscReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3NixVector_methods(root_module, cls): cls.add_output_stream_operator() ## nix-vector.h (module 'network'): ns3::NixVector::NixVector() [constructor] cls.add_constructor([]) ## nix-vector.h (module 'network'): ns3::NixVector::NixVector(ns3::NixVector const & o) [copy constructor] cls.add_constructor([param('ns3::NixVector const &', 'o')]) ## nix-vector.h (module 'network'): void ns3::NixVector::AddNeighborIndex(uint32_t newBits, uint32_t numberOfBits) [member function] cls.add_method('AddNeighborIndex', 'void', [param('uint32_t', 'newBits'), param('uint32_t', 'numberOfBits')]) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::BitCount(uint32_t numberOfNeighbors) const [member function] cls.add_method('BitCount', 'uint32_t', [param('uint32_t', 'numberOfNeighbors')], is_const=True) ## nix-vector.h (module 'network'): ns3::Ptr<ns3::NixVector> ns3::NixVector::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::NixVector >', [], is_const=True) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Deserialize(uint32_t const * buffer, uint32_t size) [member function] cls.add_method('Deserialize', 'uint32_t', [param('uint32_t const *', 'buffer'), param('uint32_t', 'size')]) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::ExtractNeighborIndex(uint32_t numberOfBits) [member function] cls.add_method('ExtractNeighborIndex', 'uint32_t', [param('uint32_t', 'numberOfBits')]) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetRemainingBits() [member function] cls.add_method('GetRemainingBits', 'uint32_t', []) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Serialize(uint32_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', [param('uint32_t *', 'buffer'), param('uint32_t', 'maxSize')], is_const=True) return def register_Ns3Node_methods(root_module, cls): ## node.h (module 'network'): ns3::Node::Node(ns3::Node const & arg0) [copy constructor] cls.add_constructor([param('ns3::Node const &', 'arg0')]) ## node.h (module 'network'): ns3::Node::Node() [constructor] cls.add_constructor([]) ## node.h (module 'network'): ns3::Node::Node(uint32_t systemId) [constructor] cls.add_constructor([param('uint32_t', 'systemId')]) ## node.h (module 'network'): uint32_t ns3::Node::AddApplication(ns3::Ptr<ns3::Application> application) [member function] cls.add_method('AddApplication', 'uint32_t', [param('ns3::Ptr< ns3::Application >', 'application')]) ## node.h (module 'network'): uint32_t ns3::Node::AddDevice(ns3::Ptr<ns3::NetDevice> device) [member function] cls.add_method('AddDevice', 'uint32_t', [param('ns3::Ptr< ns3::NetDevice >', 'device')]) ## node.h (module 'network'): static bool ns3::Node::ChecksumEnabled() [member function] cls.add_method('ChecksumEnabled', 'bool', [], is_static=True) ## node.h (module 'network'): ns3::Ptr<ns3::Application> ns3::Node::GetApplication(uint32_t index) const [member function] cls.add_method('GetApplication', 'ns3::Ptr< ns3::Application >', [param('uint32_t', 'index')], is_const=True) ## node.h (module 'network'): ns3::Ptr<ns3::NetDevice> ns3::Node::GetDevice(uint32_t index) const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'index')], is_const=True) ## node.h (module 'network'): uint32_t ns3::Node::GetId() const [member function] cls.add_method('GetId', 'uint32_t', [], is_const=True) ## node.h (module 'network'): uint32_t ns3::Node::GetNApplications() const [member function] cls.add_method('GetNApplications', 'uint32_t', [], is_const=True) ## node.h (module 'network'): uint32_t ns3::Node::GetNDevices() const [member function] cls.add_method('GetNDevices', 'uint32_t', [], is_const=True) ## node.h (module 'network'): uint32_t ns3::Node::GetSystemId() const [member function] cls.add_method('GetSystemId', 'uint32_t', [], is_const=True) ## node.h (module 'network'): static ns3::TypeId ns3::Node::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## node.h (module 'network'): void ns3::Node::RegisterDeviceAdditionListener(ns3::Callback<void,ns3::Ptr<ns3::NetDevice>,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> listener) [member function] cls.add_method('RegisterDeviceAdditionListener', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'listener')]) ## node.h (module 'network'): void ns3::Node::RegisterProtocolHandler(ns3::Callback<void, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> handler, uint16_t protocolType, ns3::Ptr<ns3::NetDevice> device, bool promiscuous=false) [member function] cls.add_method('RegisterProtocolHandler', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'handler'), param('uint16_t', 'protocolType'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('bool', 'promiscuous', default_value='false')]) ## node.h (module 'network'): void ns3::Node::UnregisterDeviceAdditionListener(ns3::Callback<void,ns3::Ptr<ns3::NetDevice>,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> listener) [member function] cls.add_method('UnregisterDeviceAdditionListener', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'listener')]) ## node.h (module 'network'): void ns3::Node::UnregisterProtocolHandler(ns3::Callback<void, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> handler) [member function] cls.add_method('UnregisterProtocolHandler', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'handler')]) ## node.h (module 'network'): void ns3::Node::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) ## node.h (module 'network'): void ns3::Node::DoInitialize() [member function] cls.add_method('DoInitialize', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3NormalRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): ns3::NormalRandomVariable::INFINITE_VALUE [variable] cls.add_static_attribute('INFINITE_VALUE', 'double const', is_const=True) ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::NormalRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::NormalRandomVariable::NormalRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetMean() const [member function] cls.add_method('GetMean', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetVariance() const [member function] cls.add_method('GetVariance', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetBound() const [member function] cls.add_method('GetBound', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound=ns3::NormalRandomVariable::INFINITE_VALUE) [member function] cls.add_method('GetValue', 'double', [param('double', 'mean'), param('double', 'variance'), param('double', 'bound', default_value='ns3::NormalRandomVariable::INFINITE_VALUE')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::NormalRandomVariable::GetInteger(uint32_t mean, uint32_t variance, uint32_t bound) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mean'), param('uint32_t', 'variance'), param('uint32_t', 'bound')]) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::NormalRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3ObjectFactoryChecker_methods(root_module, cls): ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker() [constructor] cls.add_constructor([]) ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker(ns3::ObjectFactoryChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::ObjectFactoryChecker const &', 'arg0')]) return def register_Ns3ObjectFactoryValue_methods(root_module, cls): ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue() [constructor] cls.add_constructor([]) ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactoryValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::ObjectFactoryValue const &', 'arg0')]) ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactory const & value) [constructor] cls.add_constructor([param('ns3::ObjectFactory const &', 'value')]) ## object-factory.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::ObjectFactoryValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## object-factory.h (module 'core'): bool ns3::ObjectFactoryValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## object-factory.h (module 'core'): ns3::ObjectFactory ns3::ObjectFactoryValue::Get() const [member function] cls.add_method('Get', 'ns3::ObjectFactory', [], is_const=True) ## object-factory.h (module 'core'): std::string ns3::ObjectFactoryValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## object-factory.h (module 'core'): void ns3::ObjectFactoryValue::Set(ns3::ObjectFactory const & value) [member function] cls.add_method('Set', 'void', [param('ns3::ObjectFactory const &', 'value')]) return def register_Ns3OutputStreamWrapper_methods(root_module, cls): ## output-stream-wrapper.h (module 'network'): ns3::OutputStreamWrapper::OutputStreamWrapper(ns3::OutputStreamWrapper const & arg0) [copy constructor] cls.add_constructor([param('ns3::OutputStreamWrapper const &', 'arg0')]) ## output-stream-wrapper.h (module 'network'): ns3::OutputStreamWrapper::OutputStreamWrapper(std::string filename, std::_Ios_Openmode filemode) [constructor] cls.add_constructor([param('std::string', 'filename'), param('std::_Ios_Openmode', 'filemode')]) ## output-stream-wrapper.h (module 'network'): ns3::OutputStreamWrapper::OutputStreamWrapper(std::ostream * os) [constructor] cls.add_constructor([param('std::ostream *', 'os')]) ## output-stream-wrapper.h (module 'network'): std::ostream * ns3::OutputStreamWrapper::GetStream() [member function] cls.add_method('GetStream', 'std::ostream *', []) return def register_Ns3Packet_methods(root_module, cls): cls.add_output_stream_operator() ## packet.h (module 'network'): ns3::Packet::Packet() [constructor] cls.add_constructor([]) ## packet.h (module 'network'): ns3::Packet::Packet(ns3::Packet const & o) [copy constructor] cls.add_constructor([param('ns3::Packet const &', 'o')]) ## packet.h (module 'network'): ns3::Packet::Packet(uint32_t size) [constructor] cls.add_constructor([param('uint32_t', 'size')]) ## packet.h (module 'network'): ns3::Packet::Packet(uint8_t const * buffer, uint32_t size, bool magic) [constructor] cls.add_constructor([param('uint8_t const *', 'buffer'), param('uint32_t', 'size'), param('bool', 'magic')]) ## packet.h (module 'network'): ns3::Packet::Packet(uint8_t const * buffer, uint32_t size) [constructor] cls.add_constructor([param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) ## packet.h (module 'network'): void ns3::Packet::AddAtEnd(ns3::Ptr<const ns3::Packet> packet) [member function] cls.add_method('AddAtEnd', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## packet.h (module 'network'): void ns3::Packet::AddByteTag(ns3::Tag const & tag) const [member function] cls.add_method('AddByteTag', 'void', [param('ns3::Tag const &', 'tag')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::AddHeader(ns3::Header const & header) [member function] cls.add_method('AddHeader', 'void', [param('ns3::Header const &', 'header')]) ## packet.h (module 'network'): void ns3::Packet::AddPacketTag(ns3::Tag const & tag) const [member function] cls.add_method('AddPacketTag', 'void', [param('ns3::Tag const &', 'tag')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::AddPaddingAtEnd(uint32_t size) [member function] cls.add_method('AddPaddingAtEnd', 'void', [param('uint32_t', 'size')]) ## packet.h (module 'network'): void ns3::Packet::AddTrailer(ns3::Trailer const & trailer) [member function] cls.add_method('AddTrailer', 'void', [param('ns3::Trailer const &', 'trailer')]) ## packet.h (module 'network'): ns3::PacketMetadata::ItemIterator ns3::Packet::BeginItem() const [member function] cls.add_method('BeginItem', 'ns3::PacketMetadata::ItemIterator', [], is_const=True) ## packet.h (module 'network'): ns3::Ptr<ns3::Packet> ns3::Packet::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::Packet >', [], is_const=True) ## packet.h (module 'network'): uint32_t ns3::Packet::CopyData(uint8_t * buffer, uint32_t size) const [member function] cls.add_method('CopyData', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint32_t', 'size')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::CopyData(std::ostream * os, uint32_t size) const [member function] cls.add_method('CopyData', 'void', [param('std::ostream *', 'os'), param('uint32_t', 'size')], is_const=True) ## packet.h (module 'network'): ns3::Ptr<ns3::Packet> ns3::Packet::CreateFragment(uint32_t start, uint32_t length) const [member function] cls.add_method('CreateFragment', 'ns3::Ptr< ns3::Packet >', [param('uint32_t', 'start'), param('uint32_t', 'length')], is_const=True) ## packet.h (module 'network'): static void ns3::Packet::EnableChecking() [member function] cls.add_method('EnableChecking', 'void', [], is_static=True) ## packet.h (module 'network'): static void ns3::Packet::EnablePrinting() [member function] cls.add_method('EnablePrinting', 'void', [], is_static=True) ## packet.h (module 'network'): bool ns3::Packet::FindFirstMatchingByteTag(ns3::Tag & tag) const [member function] cls.add_method('FindFirstMatchingByteTag', 'bool', [param('ns3::Tag &', 'tag')], is_const=True) ## packet.h (module 'network'): ns3::ByteTagIterator ns3::Packet::GetByteTagIterator() const [member function] cls.add_method('GetByteTagIterator', 'ns3::ByteTagIterator', [], is_const=True) ## packet.h (module 'network'): ns3::Ptr<ns3::NixVector> ns3::Packet::GetNixVector() const [member function] cls.add_method('GetNixVector', 'ns3::Ptr< ns3::NixVector >', [], is_const=True) ## packet.h (module 'network'): ns3::PacketTagIterator ns3::Packet::GetPacketTagIterator() const [member function] cls.add_method('GetPacketTagIterator', 'ns3::PacketTagIterator', [], is_const=True) ## packet.h (module 'network'): uint32_t ns3::Packet::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## packet.h (module 'network'): uint32_t ns3::Packet::GetSize() const [member function] cls.add_method('GetSize', 'uint32_t', [], is_const=True) ## packet.h (module 'network'): uint64_t ns3::Packet::GetUid() const [member function] cls.add_method('GetUid', 'uint64_t', [], is_const=True) ## packet.h (module 'network'): uint32_t ns3::Packet::PeekHeader(ns3::Header & header) const [member function] cls.add_method('PeekHeader', 'uint32_t', [param('ns3::Header &', 'header')], is_const=True) ## packet.h (module 'network'): bool ns3::Packet::PeekPacketTag(ns3::Tag & tag) const [member function] cls.add_method('PeekPacketTag', 'bool', [param('ns3::Tag &', 'tag')], is_const=True) ## packet.h (module 'network'): uint32_t ns3::Packet::PeekTrailer(ns3::Trailer & trailer) [member function] cls.add_method('PeekTrailer', 'uint32_t', [param('ns3::Trailer &', 'trailer')]) ## packet.h (module 'network'): void ns3::Packet::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::PrintByteTags(std::ostream & os) const [member function] cls.add_method('PrintByteTags', 'void', [param('std::ostream &', 'os')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::PrintPacketTags(std::ostream & os) const [member function] cls.add_method('PrintPacketTags', 'void', [param('std::ostream &', 'os')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::RemoveAllByteTags() [member function] cls.add_method('RemoveAllByteTags', 'void', []) ## packet.h (module 'network'): void ns3::Packet::RemoveAllPacketTags() [member function] cls.add_method('RemoveAllPacketTags', 'void', []) ## packet.h (module 'network'): void ns3::Packet::RemoveAtEnd(uint32_t size) [member function] cls.add_method('RemoveAtEnd', 'void', [param('uint32_t', 'size')]) ## packet.h (module 'network'): void ns3::Packet::RemoveAtStart(uint32_t size) [member function] cls.add_method('RemoveAtStart', 'void', [param('uint32_t', 'size')]) ## packet.h (module 'network'): uint32_t ns3::Packet::RemoveHeader(ns3::Header & header) [member function] cls.add_method('RemoveHeader', 'uint32_t', [param('ns3::Header &', 'header')]) ## packet.h (module 'network'): bool ns3::Packet::RemovePacketTag(ns3::Tag & tag) [member function] cls.add_method('RemovePacketTag', 'bool', [param('ns3::Tag &', 'tag')]) ## packet.h (module 'network'): uint32_t ns3::Packet::RemoveTrailer(ns3::Trailer & trailer) [member function] cls.add_method('RemoveTrailer', 'uint32_t', [param('ns3::Trailer &', 'trailer')]) ## packet.h (module 'network'): bool ns3::Packet::ReplacePacketTag(ns3::Tag & tag) [member function] cls.add_method('ReplacePacketTag', 'bool', [param('ns3::Tag &', 'tag')]) ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function] cls.add_method('SetNixVector', 'void', [param('ns3::Ptr< ns3::NixVector >', 'nixVector')]) ## packet.h (module 'network'): std::string ns3::Packet::ToString() const [member function] cls.add_method('ToString', 'std::string', [], is_const=True) return def register_Ns3ParetoRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ParetoRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ParetoRandomVariable::ParetoRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetMean() const [member function] cls.add_method('GetMean', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetShape() const [member function] cls.add_method('GetShape', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetBound() const [member function] cls.add_method('GetBound', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetValue(double mean, double shape, double bound) [member function] cls.add_method('GetValue', 'double', [param('double', 'mean'), param('double', 'shape'), param('double', 'bound')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ParetoRandomVariable::GetInteger(uint32_t mean, uint32_t shape, uint32_t bound) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mean'), param('uint32_t', 'shape'), param('uint32_t', 'bound')]) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ParetoRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3SimpleOfdmWimaxPhy_methods(root_module, cls): ## simple-ofdm-wimax-phy.h (module 'wimax'): ns3::SimpleOfdmWimaxPhy::SimpleOfdmWimaxPhy(ns3::SimpleOfdmWimaxPhy const & arg0) [copy constructor] cls.add_constructor([param('ns3::SimpleOfdmWimaxPhy const &', 'arg0')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): ns3::SimpleOfdmWimaxPhy::SimpleOfdmWimaxPhy() [constructor] cls.add_constructor([]) ## simple-ofdm-wimax-phy.h (module 'wimax'): ns3::SimpleOfdmWimaxPhy::SimpleOfdmWimaxPhy(char * tracesPath) [constructor] cls.add_constructor([param('char *', 'tracesPath')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::ActivateLoss(bool loss) [member function] cls.add_method('ActivateLoss', 'void', [param('bool', 'loss')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): int64_t ns3::SimpleOfdmWimaxPhy::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::DoAttach(ns3::Ptr<ns3::WimaxChannel> channel) [member function] cls.add_method('DoAttach', 'void', [param('ns3::Ptr< ns3::WimaxChannel >', 'channel')], is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): uint32_t ns3::SimpleOfdmWimaxPhy::GetBandwidth() const [member function] cls.add_method('GetBandwidth', 'uint32_t', [], is_const=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): double ns3::SimpleOfdmWimaxPhy::GetNoiseFigure() const [member function] cls.add_method('GetNoiseFigure', 'double', [], is_const=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): ns3::WimaxPhy::PhyType ns3::SimpleOfdmWimaxPhy::GetPhyType() const [member function] cls.add_method('GetPhyType', 'ns3::WimaxPhy::PhyType', [], is_const=True, is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): double ns3::SimpleOfdmWimaxPhy::GetTxPower() const [member function] cls.add_method('GetTxPower', 'double', [], is_const=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): static ns3::TypeId ns3::SimpleOfdmWimaxPhy::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::NotifyRxBegin(ns3::Ptr<ns3::PacketBurst> burst) [member function] cls.add_method('NotifyRxBegin', 'void', [param('ns3::Ptr< ns3::PacketBurst >', 'burst')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::NotifyRxDrop(ns3::Ptr<ns3::PacketBurst> burst) [member function] cls.add_method('NotifyRxDrop', 'void', [param('ns3::Ptr< ns3::PacketBurst >', 'burst')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::NotifyRxEnd(ns3::Ptr<ns3::PacketBurst> burst) [member function] cls.add_method('NotifyRxEnd', 'void', [param('ns3::Ptr< ns3::PacketBurst >', 'burst')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::NotifyTxBegin(ns3::Ptr<ns3::PacketBurst> burst) [member function] cls.add_method('NotifyTxBegin', 'void', [param('ns3::Ptr< ns3::PacketBurst >', 'burst')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::NotifyTxDrop(ns3::Ptr<ns3::PacketBurst> burst) [member function] cls.add_method('NotifyTxDrop', 'void', [param('ns3::Ptr< ns3::PacketBurst >', 'burst')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::NotifyTxEnd(ns3::Ptr<ns3::PacketBurst> burst) [member function] cls.add_method('NotifyTxEnd', 'void', [param('ns3::Ptr< ns3::PacketBurst >', 'burst')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::Send(ns3::Ptr<ns3::PacketBurst> burst, ns3::WimaxPhy::ModulationType modulationType, uint8_t direction) [member function] cls.add_method('Send', 'void', [param('ns3::Ptr< ns3::PacketBurst >', 'burst'), param('ns3::WimaxPhy::ModulationType', 'modulationType'), param('uint8_t', 'direction')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::Send(ns3::SendParams * params) [member function] cls.add_method('Send', 'void', [param('ns3::SendParams *', 'params')], is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::SetBandwidth(uint32_t BW) [member function] cls.add_method('SetBandwidth', 'void', [param('uint32_t', 'BW')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::SetNoiseFigure(double nf) [member function] cls.add_method('SetNoiseFigure', 'void', [param('double', 'nf')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::SetReceiveCallback(ns3::Callback<void,ns3::Ptr<ns3::PacketBurst>,ns3::Ptr<ns3::WimaxConnection>,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> callback) [member function] cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::PacketBurst >, ns3::Ptr< ns3::WimaxConnection >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::SetSNRToBlockErrorRateTracesPath(char * tracesPath) [member function] cls.add_method('SetSNRToBlockErrorRateTracesPath', 'void', [param('char *', 'tracesPath')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::SetTxPower(double txPower) [member function] cls.add_method('SetTxPower', 'void', [param('double', 'txPower')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::StartReceive(uint32_t burstSize, bool isFirstBlock, uint64_t frequency, ns3::WimaxPhy::ModulationType modulationType, uint8_t direction, double rxPower, ns3::Ptr<ns3::PacketBurst> burst) [member function] cls.add_method('StartReceive', 'void', [param('uint32_t', 'burstSize'), param('bool', 'isFirstBlock'), param('uint64_t', 'frequency'), param('ns3::WimaxPhy::ModulationType', 'modulationType'), param('uint8_t', 'direction'), param('double', 'rxPower'), param('ns3::Ptr< ns3::PacketBurst >', 'burst')]) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): uint32_t ns3::SimpleOfdmWimaxPhy::DoGetDataRate(ns3::WimaxPhy::ModulationType modulationType) const [member function] cls.add_method('DoGetDataRate', 'uint32_t', [param('ns3::WimaxPhy::ModulationType', 'modulationType')], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): ns3::Time ns3::SimpleOfdmWimaxPhy::DoGetFrameDuration(uint8_t frameDurationCode) const [member function] cls.add_method('DoGetFrameDuration', 'ns3::Time', [param('uint8_t', 'frameDurationCode')], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): uint8_t ns3::SimpleOfdmWimaxPhy::DoGetFrameDurationCode() const [member function] cls.add_method('DoGetFrameDurationCode', 'uint8_t', [], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): double ns3::SimpleOfdmWimaxPhy::DoGetGValue() const [member function] cls.add_method('DoGetGValue', 'double', [], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): uint16_t ns3::SimpleOfdmWimaxPhy::DoGetNfft() const [member function] cls.add_method('DoGetNfft', 'uint16_t', [], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): uint64_t ns3::SimpleOfdmWimaxPhy::DoGetNrBytes(uint32_t symbols, ns3::WimaxPhy::ModulationType modulationType) const [member function] cls.add_method('DoGetNrBytes', 'uint64_t', [param('uint32_t', 'symbols'), param('ns3::WimaxPhy::ModulationType', 'modulationType')], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): uint64_t ns3::SimpleOfdmWimaxPhy::DoGetNrSymbols(uint32_t size, ns3::WimaxPhy::ModulationType modulationType) const [member function] cls.add_method('DoGetNrSymbols', 'uint64_t', [param('uint32_t', 'size'), param('ns3::WimaxPhy::ModulationType', 'modulationType')], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): uint16_t ns3::SimpleOfdmWimaxPhy::DoGetRtg() const [member function] cls.add_method('DoGetRtg', 'uint16_t', [], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): double ns3::SimpleOfdmWimaxPhy::DoGetSamplingFactor() const [member function] cls.add_method('DoGetSamplingFactor', 'double', [], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): double ns3::SimpleOfdmWimaxPhy::DoGetSamplingFrequency() const [member function] cls.add_method('DoGetSamplingFrequency', 'double', [], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): ns3::Time ns3::SimpleOfdmWimaxPhy::DoGetTransmissionTime(uint32_t size, ns3::WimaxPhy::ModulationType modulationType) const [member function] cls.add_method('DoGetTransmissionTime', 'ns3::Time', [param('uint32_t', 'size'), param('ns3::WimaxPhy::ModulationType', 'modulationType')], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): uint16_t ns3::SimpleOfdmWimaxPhy::DoGetTtg() const [member function] cls.add_method('DoGetTtg', 'uint16_t', [], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::DoSetDataRates() [member function] cls.add_method('DoSetDataRates', 'void', [], visibility='private', is_virtual=True) ## simple-ofdm-wimax-phy.h (module 'wimax'): void ns3::SimpleOfdmWimaxPhy::DoSetPhyParameters() [member function] cls.add_method('DoSetPhyParameters', 'void', [], visibility='private', is_virtual=True) return def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) ## nstime.h (module 'core'): ns3::TimeValue::TimeValue(ns3::TimeValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::TimeValue const &', 'arg0')]) ## nstime.h (module 'core'): ns3::TimeValue::TimeValue(ns3::Time const & value) [constructor] cls.add_constructor([param('ns3::Time const &', 'value')]) ## nstime.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::TimeValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## nstime.h (module 'core'): bool ns3::TimeValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## nstime.h (module 'core'): ns3::Time ns3::TimeValue::Get() const [member function] cls.add_method('Get', 'ns3::Time', [], is_const=True) ## nstime.h (module 'core'): std::string ns3::TimeValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## nstime.h (module 'core'): void ns3::TimeValue::Set(ns3::Time const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Time const &', 'value')]) return def register_Ns3TypeIdChecker_methods(root_module, cls): ## type-id.h (module 'core'): ns3::TypeIdChecker::TypeIdChecker() [constructor] cls.add_constructor([]) ## type-id.h (module 'core'): ns3::TypeIdChecker::TypeIdChecker(ns3::TypeIdChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::TypeIdChecker const &', 'arg0')]) return def register_Ns3TypeIdValue_methods(root_module, cls): ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue() [constructor] cls.add_constructor([]) ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue(ns3::TypeIdValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::TypeIdValue const &', 'arg0')]) ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue(ns3::TypeId const & value) [constructor] cls.add_constructor([param('ns3::TypeId const &', 'value')]) ## type-id.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::TypeIdValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## type-id.h (module 'core'): bool ns3::TypeIdValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeIdValue::Get() const [member function] cls.add_method('Get', 'ns3::TypeId', [], is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeIdValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## type-id.h (module 'core'): void ns3::TypeIdValue::Set(ns3::TypeId const & value) [member function] cls.add_method('Set', 'void', [param('ns3::TypeId const &', 'value')]) return def register_Ns3UintegerValue_methods(root_module, cls): ## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue() [constructor] cls.add_constructor([]) ## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(ns3::UintegerValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::UintegerValue const &', 'arg0')]) ## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(uint64_t const & value) [constructor] cls.add_constructor([param('uint64_t const &', 'value')]) ## uinteger.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::UintegerValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## uinteger.h (module 'core'): bool ns3::UintegerValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## uinteger.h (module 'core'): uint64_t ns3::UintegerValue::Get() const [member function] cls.add_method('Get', 'uint64_t', [], is_const=True) ## uinteger.h (module 'core'): std::string ns3::UintegerValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## uinteger.h (module 'core'): void ns3::UintegerValue::Set(uint64_t const & value) [member function] cls.add_method('Set', 'void', [param('uint64_t const &', 'value')]) return def register_Ns3WimaxChannel_methods(root_module, cls): ## wimax-channel.h (module 'wimax'): ns3::WimaxChannel::WimaxChannel(ns3::WimaxChannel const & arg0) [copy constructor] cls.add_constructor([param('ns3::WimaxChannel const &', 'arg0')]) ## wimax-channel.h (module 'wimax'): ns3::WimaxChannel::WimaxChannel() [constructor] cls.add_constructor([]) ## wimax-channel.h (module 'wimax'): int64_t ns3::WimaxChannel::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_pure_virtual=True, is_virtual=True) ## wimax-channel.h (module 'wimax'): void ns3::WimaxChannel::Attach(ns3::Ptr<ns3::WimaxPhy> phy) [member function] cls.add_method('Attach', 'void', [param('ns3::Ptr< ns3::WimaxPhy >', 'phy')]) ## wimax-channel.h (module 'wimax'): ns3::Ptr<ns3::NetDevice> ns3::WimaxChannel::GetDevice(uint32_t i) const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_const=True, is_virtual=True) ## wimax-channel.h (module 'wimax'): uint32_t ns3::WimaxChannel::GetNDevices() const [member function] cls.add_method('GetNDevices', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-channel.h (module 'wimax'): static ns3::TypeId ns3::WimaxChannel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wimax-channel.h (module 'wimax'): void ns3::WimaxChannel::DoAttach(ns3::Ptr<ns3::WimaxPhy> phy) [member function] cls.add_method('DoAttach', 'void', [param('ns3::Ptr< ns3::WimaxPhy >', 'phy')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wimax-channel.h (module 'wimax'): ns3::Ptr<ns3::NetDevice> ns3::WimaxChannel::DoGetDevice(uint32_t i) const [member function] cls.add_method('DoGetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wimax-channel.h (module 'wimax'): uint32_t ns3::WimaxChannel::DoGetNDevices() const [member function] cls.add_method('DoGetNDevices', 'uint32_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) return def register_Ns3WimaxNetDevice_methods(root_module, cls): ## wimax-net-device.h (module 'wimax'): ns3::WimaxNetDevice::m_direction [variable] cls.add_static_attribute('m_direction', 'uint8_t', is_const=False) ## wimax-net-device.h (module 'wimax'): ns3::WimaxNetDevice::m_frameStartTime [variable] cls.add_static_attribute('m_frameStartTime', 'ns3::Time', is_const=False) ## wimax-net-device.h (module 'wimax'): ns3::WimaxNetDevice::m_traceRx [variable] cls.add_instance_attribute('m_traceRx', 'ns3::TracedCallback< ns3::Ptr< ns3::Packet const >, ns3::Mac48Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', is_const=False) ## wimax-net-device.h (module 'wimax'): ns3::WimaxNetDevice::m_traceTx [variable] cls.add_instance_attribute('m_traceTx', 'ns3::TracedCallback< ns3::Ptr< ns3::Packet const >, ns3::Mac48Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', is_const=False) ## wimax-net-device.h (module 'wimax'): static ns3::TypeId ns3::WimaxNetDevice::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wimax-net-device.h (module 'wimax'): ns3::WimaxNetDevice::WimaxNetDevice() [constructor] cls.add_constructor([]) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetTtg(uint16_t ttg) [member function] cls.add_method('SetTtg', 'void', [param('uint16_t', 'ttg')]) ## wimax-net-device.h (module 'wimax'): uint16_t ns3::WimaxNetDevice::GetTtg() const [member function] cls.add_method('GetTtg', 'uint16_t', [], is_const=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetRtg(uint16_t rtg) [member function] cls.add_method('SetRtg', 'void', [param('uint16_t', 'rtg')]) ## wimax-net-device.h (module 'wimax'): uint16_t ns3::WimaxNetDevice::GetRtg() const [member function] cls.add_method('GetRtg', 'uint16_t', [], is_const=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::Attach(ns3::Ptr<ns3::WimaxChannel> channel) [member function] cls.add_method('Attach', 'void', [param('ns3::Ptr< ns3::WimaxChannel >', 'channel')]) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetPhy(ns3::Ptr<ns3::WimaxPhy> phy) [member function] cls.add_method('SetPhy', 'void', [param('ns3::Ptr< ns3::WimaxPhy >', 'phy')]) ## wimax-net-device.h (module 'wimax'): ns3::Ptr<ns3::WimaxPhy> ns3::WimaxNetDevice::GetPhy() const [member function] cls.add_method('GetPhy', 'ns3::Ptr< ns3::WimaxPhy >', [], is_const=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetChannel(ns3::Ptr<ns3::WimaxChannel> wimaxChannel) [member function] cls.add_method('SetChannel', 'void', [param('ns3::Ptr< ns3::WimaxChannel >', 'wimaxChannel')]) ## wimax-net-device.h (module 'wimax'): uint64_t ns3::WimaxNetDevice::GetChannel(uint8_t index) const [member function] cls.add_method('GetChannel', 'uint64_t', [param('uint8_t', 'index')], is_const=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetNrFrames(uint32_t nrFrames) [member function] cls.add_method('SetNrFrames', 'void', [param('uint32_t', 'nrFrames')]) ## wimax-net-device.h (module 'wimax'): uint32_t ns3::WimaxNetDevice::GetNrFrames() const [member function] cls.add_method('GetNrFrames', 'uint32_t', [], is_const=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetMacAddress(ns3::Mac48Address address) [member function] cls.add_method('SetMacAddress', 'void', [param('ns3::Mac48Address', 'address')]) ## wimax-net-device.h (module 'wimax'): ns3::Mac48Address ns3::WimaxNetDevice::GetMacAddress() const [member function] cls.add_method('GetMacAddress', 'ns3::Mac48Address', [], is_const=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetState(uint8_t state) [member function] cls.add_method('SetState', 'void', [param('uint8_t', 'state')]) ## wimax-net-device.h (module 'wimax'): uint8_t ns3::WimaxNetDevice::GetState() const [member function] cls.add_method('GetState', 'uint8_t', [], is_const=True) ## wimax-net-device.h (module 'wimax'): ns3::Ptr<ns3::WimaxConnection> ns3::WimaxNetDevice::GetInitialRangingConnection() const [member function] cls.add_method('GetInitialRangingConnection', 'ns3::Ptr< ns3::WimaxConnection >', [], is_const=True) ## wimax-net-device.h (module 'wimax'): ns3::Ptr<ns3::WimaxConnection> ns3::WimaxNetDevice::GetBroadcastConnection() const [member function] cls.add_method('GetBroadcastConnection', 'ns3::Ptr< ns3::WimaxConnection >', [], is_const=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetCurrentDcd(ns3::Dcd dcd) [member function] cls.add_method('SetCurrentDcd', 'void', [param('ns3::Dcd', 'dcd')]) ## wimax-net-device.h (module 'wimax'): ns3::Dcd ns3::WimaxNetDevice::GetCurrentDcd() const [member function] cls.add_method('GetCurrentDcd', 'ns3::Dcd', [], is_const=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetCurrentUcd(ns3::Ucd ucd) [member function] cls.add_method('SetCurrentUcd', 'void', [param('ns3::Ucd', 'ucd')]) ## wimax-net-device.h (module 'wimax'): ns3::Ucd ns3::WimaxNetDevice::GetCurrentUcd() const [member function] cls.add_method('GetCurrentUcd', 'ns3::Ucd', [], is_const=True) ## wimax-net-device.h (module 'wimax'): ns3::Ptr<ns3::ConnectionManager> ns3::WimaxNetDevice::GetConnectionManager() const [member function] cls.add_method('GetConnectionManager', 'ns3::Ptr< ns3::ConnectionManager >', [], is_const=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetConnectionManager(ns3::Ptr<ns3::ConnectionManager> connectionManager) [member function] cls.add_method('SetConnectionManager', 'void', [param('ns3::Ptr< ns3::ConnectionManager >', 'connectionManager')], is_virtual=True) ## wimax-net-device.h (module 'wimax'): ns3::Ptr<ns3::BurstProfileManager> ns3::WimaxNetDevice::GetBurstProfileManager() const [member function] cls.add_method('GetBurstProfileManager', 'ns3::Ptr< ns3::BurstProfileManager >', [], is_const=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetBurstProfileManager(ns3::Ptr<ns3::BurstProfileManager> burstProfileManager) [member function] cls.add_method('SetBurstProfileManager', 'void', [param('ns3::Ptr< ns3::BurstProfileManager >', 'burstProfileManager')]) ## wimax-net-device.h (module 'wimax'): ns3::Ptr<ns3::BandwidthManager> ns3::WimaxNetDevice::GetBandwidthManager() const [member function] cls.add_method('GetBandwidthManager', 'ns3::Ptr< ns3::BandwidthManager >', [], is_const=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetBandwidthManager(ns3::Ptr<ns3::BandwidthManager> bandwidthManager) [member function] cls.add_method('SetBandwidthManager', 'void', [param('ns3::Ptr< ns3::BandwidthManager >', 'bandwidthManager')]) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::CreateDefaultConnections() [member function] cls.add_method('CreateDefaultConnections', 'void', []) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::Start() [member function] cls.add_method('Start', 'void', [], is_pure_virtual=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::Stop() [member function] cls.add_method('Stop', 'void', [], is_pure_virtual=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetReceiveCallback() [member function] cls.add_method('SetReceiveCallback', 'void', []) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::ForwardUp(ns3::Ptr<ns3::Packet> packet, ns3::Mac48Address const & source, ns3::Mac48Address const & dest) [member function] cls.add_method('ForwardUp', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Mac48Address const &', 'source'), param('ns3::Mac48Address const &', 'dest')]) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::Enqueue(ns3::Ptr<ns3::Packet> packet, ns3::MacHeaderType const & hdrType, ns3::Ptr<ns3::WimaxConnection> connection) [member function] cls.add_method('Enqueue', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::MacHeaderType const &', 'hdrType'), param('ns3::Ptr< ns3::WimaxConnection >', 'connection')], is_pure_virtual=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::ForwardDown(ns3::Ptr<ns3::PacketBurst> burst, ns3::WimaxPhy::ModulationType modulationType) [member function] cls.add_method('ForwardDown', 'void', [param('ns3::Ptr< ns3::PacketBurst >', 'burst'), param('ns3::WimaxPhy::ModulationType', 'modulationType')]) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetName(std::string const name) [member function] cls.add_method('SetName', 'void', [param('std::string const', 'name')], is_virtual=True) ## wimax-net-device.h (module 'wimax'): std::string ns3::WimaxNetDevice::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetIfIndex(uint32_t const index) [member function] cls.add_method('SetIfIndex', 'void', [param('uint32_t const', 'index')], is_virtual=True) ## wimax-net-device.h (module 'wimax'): uint32_t ns3::WimaxNetDevice::GetIfIndex() const [member function] cls.add_method('GetIfIndex', 'uint32_t', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): ns3::Ptr<ns3::Channel> ns3::WimaxNetDevice::GetPhyChannel() const [member function] cls.add_method('GetPhyChannel', 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): ns3::Ptr<ns3::Channel> ns3::WimaxNetDevice::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetAddress(ns3::Address address) [member function] cls.add_method('SetAddress', 'void', [param('ns3::Address', 'address')], is_virtual=True) ## wimax-net-device.h (module 'wimax'): ns3::Address ns3::WimaxNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::SetMtu(uint16_t const mtu) [member function] cls.add_method('SetMtu', 'bool', [param('uint16_t const', 'mtu')], is_virtual=True) ## wimax-net-device.h (module 'wimax'): uint16_t ns3::WimaxNetDevice::GetMtu() const [member function] cls.add_method('GetMtu', 'uint16_t', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::IsLinkUp() const [member function] cls.add_method('IsLinkUp', 'bool', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetLinkChangeCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetLinkChangeCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], is_virtual=True) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::IsBroadcast() const [member function] cls.add_method('IsBroadcast', 'bool', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): ns3::Address ns3::WimaxNetDevice::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::IsMulticast() const [member function] cls.add_method('IsMulticast', 'bool', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): ns3::Address ns3::WimaxNetDevice::GetMulticast() const [member function] cls.add_method('GetMulticast', 'ns3::Address', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): ns3::Address ns3::WimaxNetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function] cls.add_method('MakeMulticastAddress', 'ns3::Address', [param('ns3::Ipv4Address', 'multicastGroup')], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::IsPointToPoint() const [member function] cls.add_method('IsPointToPoint', 'bool', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Send', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True) ## wimax-net-device.h (module 'wimax'): ns3::Ptr<ns3::Node> ns3::WimaxNetDevice::GetNode() const [member function] cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::NeedsArp() const [member function] cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::AddLinkChangeCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('AddLinkChangeCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], is_virtual=True) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::SendFrom(ns3::Ptr<ns3::Packet> packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('SendFrom', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetPromiscReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## wimax-net-device.h (module 'wimax'): ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> ns3::WimaxNetDevice::GetPromiscReceiveCallback() [member function] cls.add_method('GetPromiscReceiveCallback', 'ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', []) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], is_virtual=True) ## wimax-net-device.h (module 'wimax'): ns3::Address ns3::WimaxNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv6Address', 'addr')], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): ns3::Address ns3::WimaxNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv4Address', 'multicastGroup')], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::IsBridge() const [member function] cls.add_method('IsBridge', 'bool', [], is_const=True, is_virtual=True) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::IsPromisc() [member function] cls.add_method('IsPromisc', 'bool', []) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::NotifyPromiscTrace(ns3::Ptr<ns3::Packet> p) [member function] cls.add_method('NotifyPromiscTrace', 'void', [param('ns3::Ptr< ns3::Packet >', 'p')]) ## wimax-net-device.h (module 'wimax'): bool ns3::WimaxNetDevice::DoSend(ns3::Ptr<ns3::Packet> packet, ns3::Mac48Address const & source, ns3::Mac48Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('DoSend', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Mac48Address const &', 'source'), param('ns3::Mac48Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wimax-net-device.h (module 'wimax'): void ns3::WimaxNetDevice::DoReceive(ns3::Ptr<ns3::Packet> packet) [member function] cls.add_method('DoReceive', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wimax-net-device.h (module 'wimax'): ns3::Ptr<ns3::WimaxChannel> ns3::WimaxNetDevice::DoGetChannel() const [member function] cls.add_method('DoGetChannel', 'ns3::Ptr< ns3::WimaxChannel >', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3AddressChecker_methods(root_module, cls): ## address.h (module 'network'): ns3::AddressChecker::AddressChecker() [constructor] cls.add_constructor([]) ## address.h (module 'network'): ns3::AddressChecker::AddressChecker(ns3::AddressChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::AddressChecker const &', 'arg0')]) return def register_Ns3AddressValue_methods(root_module, cls): ## address.h (module 'network'): ns3::AddressValue::AddressValue() [constructor] cls.add_constructor([]) ## address.h (module 'network'): ns3::AddressValue::AddressValue(ns3::AddressValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::AddressValue const &', 'arg0')]) ## address.h (module 'network'): ns3::AddressValue::AddressValue(ns3::Address const & value) [constructor] cls.add_constructor([param('ns3::Address const &', 'value')]) ## address.h (module 'network'): ns3::Ptr<ns3::AttributeValue> ns3::AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## address.h (module 'network'): bool ns3::AddressValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## address.h (module 'network'): ns3::Address ns3::AddressValue::Get() const [member function] cls.add_method('Get', 'ns3::Address', [], is_const=True) ## address.h (module 'network'): std::string ns3::AddressValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## address.h (module 'network'): void ns3::AddressValue::Set(ns3::Address const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Address const &', 'value')]) return def register_Ns3BaseStationNetDevice_methods(root_module, cls): ## bs-net-device.h (module 'wimax'): static ns3::TypeId ns3::BaseStationNetDevice::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## bs-net-device.h (module 'wimax'): ns3::BaseStationNetDevice::BaseStationNetDevice() [constructor] cls.add_constructor([]) ## bs-net-device.h (module 'wimax'): ns3::BaseStationNetDevice::BaseStationNetDevice(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::WimaxPhy> phy) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::WimaxPhy >', 'phy')]) ## bs-net-device.h (module 'wimax'): ns3::BaseStationNetDevice::BaseStationNetDevice(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::WimaxPhy> phy, ns3::Ptr<ns3::UplinkScheduler> uplinkScheduler, ns3::Ptr<ns3::BSScheduler> bsScheduler) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::WimaxPhy >', 'phy'), param('ns3::Ptr< ns3::UplinkScheduler >', 'uplinkScheduler'), param('ns3::Ptr< ns3::BSScheduler >', 'bsScheduler')]) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetInitialRangingInterval(ns3::Time initialRangInterval) [member function] cls.add_method('SetInitialRangingInterval', 'void', [param('ns3::Time', 'initialRangInterval')]) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::InitBaseStationNetDevice() [member function] cls.add_method('InitBaseStationNetDevice', 'void', []) ## bs-net-device.h (module 'wimax'): ns3::Time ns3::BaseStationNetDevice::GetInitialRangingInterval() const [member function] cls.add_method('GetInitialRangingInterval', 'ns3::Time', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetDcdInterval(ns3::Time dcdInterval) [member function] cls.add_method('SetDcdInterval', 'void', [param('ns3::Time', 'dcdInterval')]) ## bs-net-device.h (module 'wimax'): ns3::Time ns3::BaseStationNetDevice::GetDcdInterval() const [member function] cls.add_method('GetDcdInterval', 'ns3::Time', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetUcdInterval(ns3::Time ucdInterval) [member function] cls.add_method('SetUcdInterval', 'void', [param('ns3::Time', 'ucdInterval')]) ## bs-net-device.h (module 'wimax'): ns3::Time ns3::BaseStationNetDevice::GetUcdInterval() const [member function] cls.add_method('GetUcdInterval', 'ns3::Time', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetIntervalT8(ns3::Time interval) [member function] cls.add_method('SetIntervalT8', 'void', [param('ns3::Time', 'interval')]) ## bs-net-device.h (module 'wimax'): ns3::Time ns3::BaseStationNetDevice::GetIntervalT8() const [member function] cls.add_method('GetIntervalT8', 'ns3::Time', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetMaxRangingCorrectionRetries(uint8_t maxRangCorrectionRetries) [member function] cls.add_method('SetMaxRangingCorrectionRetries', 'void', [param('uint8_t', 'maxRangCorrectionRetries')]) ## bs-net-device.h (module 'wimax'): uint8_t ns3::BaseStationNetDevice::GetMaxRangingCorrectionRetries() const [member function] cls.add_method('GetMaxRangingCorrectionRetries', 'uint8_t', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetMaxInvitedRangRetries(uint8_t maxInvitedRangRetries) [member function] cls.add_method('SetMaxInvitedRangRetries', 'void', [param('uint8_t', 'maxInvitedRangRetries')]) ## bs-net-device.h (module 'wimax'): uint8_t ns3::BaseStationNetDevice::GetMaxInvitedRangRetries() const [member function] cls.add_method('GetMaxInvitedRangRetries', 'uint8_t', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetRangReqOppSize(uint8_t rangReqOppSize) [member function] cls.add_method('SetRangReqOppSize', 'void', [param('uint8_t', 'rangReqOppSize')]) ## bs-net-device.h (module 'wimax'): uint8_t ns3::BaseStationNetDevice::GetRangReqOppSize() const [member function] cls.add_method('GetRangReqOppSize', 'uint8_t', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetBwReqOppSize(uint8_t bwReqOppSize) [member function] cls.add_method('SetBwReqOppSize', 'void', [param('uint8_t', 'bwReqOppSize')]) ## bs-net-device.h (module 'wimax'): uint8_t ns3::BaseStationNetDevice::GetBwReqOppSize() const [member function] cls.add_method('GetBwReqOppSize', 'uint8_t', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetNrDlSymbols(uint32_t dlSymbols) [member function] cls.add_method('SetNrDlSymbols', 'void', [param('uint32_t', 'dlSymbols')]) ## bs-net-device.h (module 'wimax'): uint32_t ns3::BaseStationNetDevice::GetNrDlSymbols() const [member function] cls.add_method('GetNrDlSymbols', 'uint32_t', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetNrUlSymbols(uint32_t ulSymbols) [member function] cls.add_method('SetNrUlSymbols', 'void', [param('uint32_t', 'ulSymbols')]) ## bs-net-device.h (module 'wimax'): uint32_t ns3::BaseStationNetDevice::GetNrUlSymbols() const [member function] cls.add_method('GetNrUlSymbols', 'uint32_t', [], is_const=True) ## bs-net-device.h (module 'wimax'): uint32_t ns3::BaseStationNetDevice::GetNrDcdSent() const [member function] cls.add_method('GetNrDcdSent', 'uint32_t', [], is_const=True) ## bs-net-device.h (module 'wimax'): uint32_t ns3::BaseStationNetDevice::GetNrUcdSent() const [member function] cls.add_method('GetNrUcdSent', 'uint32_t', [], is_const=True) ## bs-net-device.h (module 'wimax'): ns3::Time ns3::BaseStationNetDevice::GetDlSubframeStartTime() const [member function] cls.add_method('GetDlSubframeStartTime', 'ns3::Time', [], is_const=True) ## bs-net-device.h (module 'wimax'): ns3::Time ns3::BaseStationNetDevice::GetUlSubframeStartTime() const [member function] cls.add_method('GetUlSubframeStartTime', 'ns3::Time', [], is_const=True) ## bs-net-device.h (module 'wimax'): uint8_t ns3::BaseStationNetDevice::GetRangingOppNumber() const [member function] cls.add_method('GetRangingOppNumber', 'uint8_t', [], is_const=True) ## bs-net-device.h (module 'wimax'): ns3::Ptr<ns3::SSManager> ns3::BaseStationNetDevice::GetSSManager() const [member function] cls.add_method('GetSSManager', 'ns3::Ptr< ns3::SSManager >', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetSSManager(ns3::Ptr<ns3::SSManager> ssManager) [member function] cls.add_method('SetSSManager', 'void', [param('ns3::Ptr< ns3::SSManager >', 'ssManager')]) ## bs-net-device.h (module 'wimax'): ns3::Ptr<ns3::UplinkScheduler> ns3::BaseStationNetDevice::GetUplinkScheduler() const [member function] cls.add_method('GetUplinkScheduler', 'ns3::Ptr< ns3::UplinkScheduler >', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetUplinkScheduler(ns3::Ptr<ns3::UplinkScheduler> ulScheduler) [member function] cls.add_method('SetUplinkScheduler', 'void', [param('ns3::Ptr< ns3::UplinkScheduler >', 'ulScheduler')]) ## bs-net-device.h (module 'wimax'): ns3::Ptr<ns3::BSLinkManager> ns3::BaseStationNetDevice::GetLinkManager() const [member function] cls.add_method('GetLinkManager', 'ns3::Ptr< ns3::BSLinkManager >', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetBSScheduler(ns3::Ptr<ns3::BSScheduler> bsSchedule) [member function] cls.add_method('SetBSScheduler', 'void', [param('ns3::Ptr< ns3::BSScheduler >', 'bsSchedule')]) ## bs-net-device.h (module 'wimax'): ns3::Ptr<ns3::BSScheduler> ns3::BaseStationNetDevice::GetBSScheduler() const [member function] cls.add_method('GetBSScheduler', 'ns3::Ptr< ns3::BSScheduler >', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetLinkManager(ns3::Ptr<ns3::BSLinkManager> linkManager) [member function] cls.add_method('SetLinkManager', 'void', [param('ns3::Ptr< ns3::BSLinkManager >', 'linkManager')]) ## bs-net-device.h (module 'wimax'): ns3::Ptr<ns3::IpcsClassifier> ns3::BaseStationNetDevice::GetBsClassifier() const [member function] cls.add_method('GetBsClassifier', 'ns3::Ptr< ns3::IpcsClassifier >', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetBsClassifier(ns3::Ptr<ns3::IpcsClassifier> classifier) [member function] cls.add_method('SetBsClassifier', 'void', [param('ns3::Ptr< ns3::IpcsClassifier >', 'classifier')]) ## bs-net-device.h (module 'wimax'): ns3::Time ns3::BaseStationNetDevice::GetPsDuration() const [member function] cls.add_method('GetPsDuration', 'ns3::Time', [], is_const=True) ## bs-net-device.h (module 'wimax'): ns3::Time ns3::BaseStationNetDevice::GetSymbolDuration() const [member function] cls.add_method('GetSymbolDuration', 'ns3::Time', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::Start() [member function] cls.add_method('Start', 'void', [], is_virtual=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::Stop() [member function] cls.add_method('Stop', 'void', [], is_virtual=True) ## bs-net-device.h (module 'wimax'): bool ns3::BaseStationNetDevice::Enqueue(ns3::Ptr<ns3::Packet> packet, ns3::MacHeaderType const & hdrType, ns3::Ptr<ns3::WimaxConnection> connection) [member function] cls.add_method('Enqueue', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::MacHeaderType const &', 'hdrType'), param('ns3::Ptr< ns3::WimaxConnection >', 'connection')], is_virtual=True) ## bs-net-device.h (module 'wimax'): ns3::Ptr<ns3::WimaxConnection> ns3::BaseStationNetDevice::GetConnection(ns3::Cid cid) [member function] cls.add_method('GetConnection', 'ns3::Ptr< ns3::WimaxConnection >', [param('ns3::Cid', 'cid')]) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::MarkUplinkAllocations() [member function] cls.add_method('MarkUplinkAllocations', 'void', []) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::MarkRangingOppStart(ns3::Time rangingOppStartTime) [member function] cls.add_method('MarkRangingOppStart', 'void', [param('ns3::Time', 'rangingOppStartTime')]) ## bs-net-device.h (module 'wimax'): ns3::Ptr<ns3::BsServiceFlowManager> ns3::BaseStationNetDevice::GetServiceFlowManager() const [member function] cls.add_method('GetServiceFlowManager', 'ns3::Ptr< ns3::BsServiceFlowManager >', [], is_const=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::SetServiceFlowManager(ns3::Ptr<ns3::BsServiceFlowManager> arg0) [member function] cls.add_method('SetServiceFlowManager', 'void', [param('ns3::Ptr< ns3::BsServiceFlowManager >', 'arg0')]) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) ## bs-net-device.h (module 'wimax'): bool ns3::BaseStationNetDevice::DoSend(ns3::Ptr<ns3::Packet> packet, ns3::Mac48Address const & source, ns3::Mac48Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('DoSend', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Mac48Address const &', 'source'), param('ns3::Mac48Address const &', 'dest'), param('uint16_t', 'protocolNumber')], visibility='private', is_virtual=True) ## bs-net-device.h (module 'wimax'): void ns3::BaseStationNetDevice::DoReceive(ns3::Ptr<ns3::Packet> packet) [member function] cls.add_method('DoReceive', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet')], visibility='private', is_virtual=True) return def register_Ns3SimpleOfdmWimaxChannel_methods(root_module, cls): ## simple-ofdm-wimax-channel.h (module 'wimax'): ns3::SimpleOfdmWimaxChannel::SimpleOfdmWimaxChannel(ns3::SimpleOfdmWimaxChannel const & arg0) [copy constructor] cls.add_constructor([param('ns3::SimpleOfdmWimaxChannel const &', 'arg0')]) ## simple-ofdm-wimax-channel.h (module 'wimax'): ns3::SimpleOfdmWimaxChannel::SimpleOfdmWimaxChannel() [constructor] cls.add_constructor([]) ## simple-ofdm-wimax-channel.h (module 'wimax'): ns3::SimpleOfdmWimaxChannel::SimpleOfdmWimaxChannel(ns3::SimpleOfdmWimaxChannel::PropModel propModel) [constructor] cls.add_constructor([param('ns3::SimpleOfdmWimaxChannel::PropModel', 'propModel')]) ## simple-ofdm-wimax-channel.h (module 'wimax'): int64_t ns3::SimpleOfdmWimaxChannel::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_virtual=True) ## simple-ofdm-wimax-channel.h (module 'wimax'): static ns3::TypeId ns3::SimpleOfdmWimaxChannel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## simple-ofdm-wimax-channel.h (module 'wimax'): void ns3::SimpleOfdmWimaxChannel::Send(ns3::Time BlockTime, uint32_t burstSize, ns3::Ptr<ns3::WimaxPhy> phy, bool isFirstBlock, bool isLastBlock, uint64_t frequency, ns3::WimaxPhy::ModulationType modulationType, uint8_t direction, double txPowerDbm, ns3::Ptr<ns3::PacketBurst> burst) [member function] cls.add_method('Send', 'void', [param('ns3::Time', 'BlockTime'), param('uint32_t', 'burstSize'), param('ns3::Ptr< ns3::WimaxPhy >', 'phy'), param('bool', 'isFirstBlock'), param('bool', 'isLastBlock'), param('uint64_t', 'frequency'), param('ns3::WimaxPhy::ModulationType', 'modulationType'), param('uint8_t', 'direction'), param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::PacketBurst >', 'burst')]) ## simple-ofdm-wimax-channel.h (module 'wimax'): void ns3::SimpleOfdmWimaxChannel::SetPropagationModel(ns3::SimpleOfdmWimaxChannel::PropModel propModel) [member function] cls.add_method('SetPropagationModel', 'void', [param('ns3::SimpleOfdmWimaxChannel::PropModel', 'propModel')]) ## simple-ofdm-wimax-channel.h (module 'wimax'): void ns3::SimpleOfdmWimaxChannel::DoAttach(ns3::Ptr<ns3::WimaxPhy> phy) [member function] cls.add_method('DoAttach', 'void', [param('ns3::Ptr< ns3::WimaxPhy >', 'phy')], visibility='private', is_virtual=True) ## simple-ofdm-wimax-channel.h (module 'wimax'): ns3::Ptr<ns3::NetDevice> ns3::SimpleOfdmWimaxChannel::DoGetDevice(uint32_t i) const [member function] cls.add_method('DoGetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_const=True, visibility='private', is_virtual=True) ## simple-ofdm-wimax-channel.h (module 'wimax'): uint32_t ns3::SimpleOfdmWimaxChannel::DoGetNDevices() const [member function] cls.add_method('DoGetNDevices', 'uint32_t', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3SubscriberStationNetDevice_methods(root_module, cls): ## ss-net-device.h (module 'wimax'): ns3::SubscriberStationNetDevice::m_linkManager [variable] cls.add_instance_attribute('m_linkManager', 'ns3::Ptr< ns3::SSLinkManager >', is_const=False) ## ss-net-device.h (module 'wimax'): static ns3::TypeId ns3::SubscriberStationNetDevice::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## ss-net-device.h (module 'wimax'): ns3::SubscriberStationNetDevice::SubscriberStationNetDevice() [constructor] cls.add_constructor([]) ## ss-net-device.h (module 'wimax'): ns3::SubscriberStationNetDevice::SubscriberStationNetDevice(ns3::Ptr<ns3::Node> arg0, ns3::Ptr<ns3::WimaxPhy> arg1) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::Node >', 'arg0'), param('ns3::Ptr< ns3::WimaxPhy >', 'arg1')]) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::InitSubscriberStationNetDevice() [member function] cls.add_method('InitSubscriberStationNetDevice', 'void', []) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetLostDlMapInterval(ns3::Time lostDlMapInterval) [member function] cls.add_method('SetLostDlMapInterval', 'void', [param('ns3::Time', 'lostDlMapInterval')]) ## ss-net-device.h (module 'wimax'): ns3::Time ns3::SubscriberStationNetDevice::GetLostDlMapInterval() const [member function] cls.add_method('GetLostDlMapInterval', 'ns3::Time', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetLostUlMapInterval(ns3::Time lostUlMapInterval) [member function] cls.add_method('SetLostUlMapInterval', 'void', [param('ns3::Time', 'lostUlMapInterval')]) ## ss-net-device.h (module 'wimax'): ns3::Time ns3::SubscriberStationNetDevice::GetLostUlMapInterval() const [member function] cls.add_method('GetLostUlMapInterval', 'ns3::Time', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetMaxDcdInterval(ns3::Time maxDcdInterval) [member function] cls.add_method('SetMaxDcdInterval', 'void', [param('ns3::Time', 'maxDcdInterval')]) ## ss-net-device.h (module 'wimax'): ns3::Time ns3::SubscriberStationNetDevice::GetMaxDcdInterval() const [member function] cls.add_method('GetMaxDcdInterval', 'ns3::Time', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetMaxUcdInterval(ns3::Time maxUcdInterval) [member function] cls.add_method('SetMaxUcdInterval', 'void', [param('ns3::Time', 'maxUcdInterval')]) ## ss-net-device.h (module 'wimax'): ns3::Time ns3::SubscriberStationNetDevice::GetMaxUcdInterval() const [member function] cls.add_method('GetMaxUcdInterval', 'ns3::Time', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetIntervalT1(ns3::Time interval1) [member function] cls.add_method('SetIntervalT1', 'void', [param('ns3::Time', 'interval1')]) ## ss-net-device.h (module 'wimax'): ns3::Time ns3::SubscriberStationNetDevice::GetIntervalT1() const [member function] cls.add_method('GetIntervalT1', 'ns3::Time', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetIntervalT2(ns3::Time interval2) [member function] cls.add_method('SetIntervalT2', 'void', [param('ns3::Time', 'interval2')]) ## ss-net-device.h (module 'wimax'): ns3::Time ns3::SubscriberStationNetDevice::GetIntervalT2() const [member function] cls.add_method('GetIntervalT2', 'ns3::Time', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetIntervalT3(ns3::Time interval3) [member function] cls.add_method('SetIntervalT3', 'void', [param('ns3::Time', 'interval3')]) ## ss-net-device.h (module 'wimax'): ns3::Time ns3::SubscriberStationNetDevice::GetIntervalT3() const [member function] cls.add_method('GetIntervalT3', 'ns3::Time', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetIntervalT7(ns3::Time interval7) [member function] cls.add_method('SetIntervalT7', 'void', [param('ns3::Time', 'interval7')]) ## ss-net-device.h (module 'wimax'): ns3::Time ns3::SubscriberStationNetDevice::GetIntervalT7() const [member function] cls.add_method('GetIntervalT7', 'ns3::Time', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetIntervalT12(ns3::Time interval12) [member function] cls.add_method('SetIntervalT12', 'void', [param('ns3::Time', 'interval12')]) ## ss-net-device.h (module 'wimax'): ns3::Time ns3::SubscriberStationNetDevice::GetIntervalT12() const [member function] cls.add_method('GetIntervalT12', 'ns3::Time', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetIntervalT20(ns3::Time interval20) [member function] cls.add_method('SetIntervalT20', 'void', [param('ns3::Time', 'interval20')]) ## ss-net-device.h (module 'wimax'): ns3::Time ns3::SubscriberStationNetDevice::GetIntervalT20() const [member function] cls.add_method('GetIntervalT20', 'ns3::Time', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetIntervalT21(ns3::Time interval21) [member function] cls.add_method('SetIntervalT21', 'void', [param('ns3::Time', 'interval21')]) ## ss-net-device.h (module 'wimax'): ns3::Time ns3::SubscriberStationNetDevice::GetIntervalT21() const [member function] cls.add_method('GetIntervalT21', 'ns3::Time', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetMaxContentionRangingRetries(uint8_t maxContentionRangingRetries) [member function] cls.add_method('SetMaxContentionRangingRetries', 'void', [param('uint8_t', 'maxContentionRangingRetries')]) ## ss-net-device.h (module 'wimax'): uint8_t ns3::SubscriberStationNetDevice::GetMaxContentionRangingRetries() const [member function] cls.add_method('GetMaxContentionRangingRetries', 'uint8_t', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetBasicConnection(ns3::Ptr<ns3::WimaxConnection> basicConnection) [member function] cls.add_method('SetBasicConnection', 'void', [param('ns3::Ptr< ns3::WimaxConnection >', 'basicConnection')]) ## ss-net-device.h (module 'wimax'): ns3::Ptr<ns3::WimaxConnection> ns3::SubscriberStationNetDevice::GetBasicConnection() const [member function] cls.add_method('GetBasicConnection', 'ns3::Ptr< ns3::WimaxConnection >', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetPrimaryConnection(ns3::Ptr<ns3::WimaxConnection> primaryConnection) [member function] cls.add_method('SetPrimaryConnection', 'void', [param('ns3::Ptr< ns3::WimaxConnection >', 'primaryConnection')]) ## ss-net-device.h (module 'wimax'): ns3::Ptr<ns3::WimaxConnection> ns3::SubscriberStationNetDevice::GetPrimaryConnection() const [member function] cls.add_method('GetPrimaryConnection', 'ns3::Ptr< ns3::WimaxConnection >', [], is_const=True) ## ss-net-device.h (module 'wimax'): ns3::Cid ns3::SubscriberStationNetDevice::GetBasicCid() const [member function] cls.add_method('GetBasicCid', 'ns3::Cid', [], is_const=True) ## ss-net-device.h (module 'wimax'): ns3::Cid ns3::SubscriberStationNetDevice::GetPrimaryCid() const [member function] cls.add_method('GetPrimaryCid', 'ns3::Cid', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetModulationType(ns3::WimaxPhy::ModulationType modulationType) [member function] cls.add_method('SetModulationType', 'void', [param('ns3::WimaxPhy::ModulationType', 'modulationType')]) ## ss-net-device.h (module 'wimax'): ns3::WimaxPhy::ModulationType ns3::SubscriberStationNetDevice::GetModulationType() const [member function] cls.add_method('GetModulationType', 'ns3::WimaxPhy::ModulationType', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetAreManagementConnectionsAllocated(bool areManagementConnectionsAllocated) [member function] cls.add_method('SetAreManagementConnectionsAllocated', 'void', [param('bool', 'areManagementConnectionsAllocated')]) ## ss-net-device.h (module 'wimax'): bool ns3::SubscriberStationNetDevice::GetAreManagementConnectionsAllocated() const [member function] cls.add_method('GetAreManagementConnectionsAllocated', 'bool', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetAreServiceFlowsAllocated(bool areServiceFlowsAllocated) [member function] cls.add_method('SetAreServiceFlowsAllocated', 'void', [param('bool', 'areServiceFlowsAllocated')]) ## ss-net-device.h (module 'wimax'): bool ns3::SubscriberStationNetDevice::GetAreServiceFlowsAllocated() const [member function] cls.add_method('GetAreServiceFlowsAllocated', 'bool', [], is_const=True) ## ss-net-device.h (module 'wimax'): ns3::Ptr<ns3::SSScheduler> ns3::SubscriberStationNetDevice::GetScheduler() const [member function] cls.add_method('GetScheduler', 'ns3::Ptr< ns3::SSScheduler >', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetScheduler(ns3::Ptr<ns3::SSScheduler> ssScheduler) [member function] cls.add_method('SetScheduler', 'void', [param('ns3::Ptr< ns3::SSScheduler >', 'ssScheduler')]) ## ss-net-device.h (module 'wimax'): bool ns3::SubscriberStationNetDevice::HasServiceFlows() const [member function] cls.add_method('HasServiceFlows', 'bool', [], is_const=True) ## ss-net-device.h (module 'wimax'): bool ns3::SubscriberStationNetDevice::Enqueue(ns3::Ptr<ns3::Packet> packet, ns3::MacHeaderType const & hdrType, ns3::Ptr<ns3::WimaxConnection> connection) [member function] cls.add_method('Enqueue', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::MacHeaderType const &', 'hdrType'), param('ns3::Ptr< ns3::WimaxConnection >', 'connection')], is_virtual=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SendBurst(uint8_t uiuc, uint16_t nrSymbols, ns3::Ptr<ns3::WimaxConnection> connection, ns3::MacHeaderType::HeaderType packetType=::ns3::MacHeaderType::HEADER_TYPE_GENERIC) [member function] cls.add_method('SendBurst', 'void', [param('uint8_t', 'uiuc'), param('uint16_t', 'nrSymbols'), param('ns3::Ptr< ns3::WimaxConnection >', 'connection'), param('ns3::MacHeaderType::HeaderType', 'packetType', default_value='::ns3::MacHeaderType::HEADER_TYPE_GENERIC')]) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::Start() [member function] cls.add_method('Start', 'void', [], is_virtual=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::Stop() [member function] cls.add_method('Stop', 'void', [], is_virtual=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::AddServiceFlow(ns3::ServiceFlow * sf) [member function] cls.add_method('AddServiceFlow', 'void', [param('ns3::ServiceFlow *', 'sf')]) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::AddServiceFlow(ns3::ServiceFlow sf) [member function] cls.add_method('AddServiceFlow', 'void', [param('ns3::ServiceFlow', 'sf')]) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetTimer(ns3::EventId eventId, ns3::EventId & event) [member function] cls.add_method('SetTimer', 'void', [param('ns3::EventId', 'eventId'), param('ns3::EventId &', 'event')]) ## ss-net-device.h (module 'wimax'): bool ns3::SubscriberStationNetDevice::IsRegistered() const [member function] cls.add_method('IsRegistered', 'bool', [], is_const=True) ## ss-net-device.h (module 'wimax'): ns3::Time ns3::SubscriberStationNetDevice::GetTimeToAllocation(ns3::Time defferTime) [member function] cls.add_method('GetTimeToAllocation', 'ns3::Time', [param('ns3::Time', 'defferTime')]) ## ss-net-device.h (module 'wimax'): ns3::Ptr<ns3::IpcsClassifier> ns3::SubscriberStationNetDevice::GetIpcsClassifier() const [member function] cls.add_method('GetIpcsClassifier', 'ns3::Ptr< ns3::IpcsClassifier >', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetIpcsPacketClassifier(ns3::Ptr<ns3::IpcsClassifier> arg0) [member function] cls.add_method('SetIpcsPacketClassifier', 'void', [param('ns3::Ptr< ns3::IpcsClassifier >', 'arg0')]) ## ss-net-device.h (module 'wimax'): ns3::Ptr<ns3::SSLinkManager> ns3::SubscriberStationNetDevice::GetLinkManager() const [member function] cls.add_method('GetLinkManager', 'ns3::Ptr< ns3::SSLinkManager >', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetLinkManager(ns3::Ptr<ns3::SSLinkManager> arg0) [member function] cls.add_method('SetLinkManager', 'void', [param('ns3::Ptr< ns3::SSLinkManager >', 'arg0')]) ## ss-net-device.h (module 'wimax'): ns3::Ptr<ns3::SsServiceFlowManager> ns3::SubscriberStationNetDevice::GetServiceFlowManager() const [member function] cls.add_method('GetServiceFlowManager', 'ns3::Ptr< ns3::SsServiceFlowManager >', [], is_const=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::SetServiceFlowManager(ns3::Ptr<ns3::SsServiceFlowManager> arg0) [member function] cls.add_method('SetServiceFlowManager', 'void', [param('ns3::Ptr< ns3::SsServiceFlowManager >', 'arg0')]) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) ## ss-net-device.h (module 'wimax'): bool ns3::SubscriberStationNetDevice::DoSend(ns3::Ptr<ns3::Packet> packet, ns3::Mac48Address const & source, ns3::Mac48Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('DoSend', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Mac48Address const &', 'source'), param('ns3::Mac48Address const &', 'dest'), param('uint16_t', 'protocolNumber')], visibility='private', is_virtual=True) ## ss-net-device.h (module 'wimax'): void ns3::SubscriberStationNetDevice::DoReceive(ns3::Ptr<ns3::Packet> packet) [member function] cls.add_method('DoReceive', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet')], visibility='private', is_virtual=True) return def register_Ns3HashImplementation_methods(root_module, cls): ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] cls.add_constructor([]) ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_pure_virtual=True, is_virtual=True) ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] cls.add_method('clear', 'void', [], is_pure_virtual=True, is_virtual=True) return def register_Ns3HashFunctionFnv1a_methods(root_module, cls): ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] cls.add_constructor([]) ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] cls.add_method('clear', 'void', [], is_virtual=True) return def register_Ns3HashFunctionHash32_methods(root_module, cls): ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] cls.add_method('clear', 'void', [], is_virtual=True) return def register_Ns3HashFunctionHash64_methods(root_module, cls): ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] cls.add_method('clear', 'void', [], is_virtual=True) return def register_Ns3HashFunctionMurmur3_methods(root_module, cls): ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] cls.add_constructor([]) ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] cls.add_method('clear', 'void', [], is_virtual=True) return def register_functions(root_module): module = root_module ## crc8.h (module 'wimax'): extern uint8_t ns3::CRC8Calculate(uint8_t const * data, int length) [free function] module.add_function('CRC8Calculate', 'uint8_t', [param('uint8_t const *', 'data'), param('int', 'length')]) register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) register_functions_ns3_TracedValueCallback(module.get_submodule('TracedValueCallback'), root_module) register_functions_ns3_internal(module.get_submodule('internal'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return def register_functions_ns3_Hash(module, root_module): register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) return def register_functions_ns3_Hash_Function(module, root_module): return def register_functions_ns3_TracedValueCallback(module, root_module): return def register_functions_ns3_internal(module, root_module): return def main(): out = FileCodeSink(sys.stdout) root_module = module_init() register_types(root_module) register_methods(root_module) register_functions(root_module) root_module.generate(out) if __name__ == '__main__': main()
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Bundle\FrameworkBundle\Controller\RedirectController; use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Component\HttpFoundation\ParameterBag; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; /** * @author Marcin Sikon <marcin.sikon@gmail.com> */ class RedirectControllerTest extends TestCase { public function testEmptyRoute() { $request = new Request(); $controller = new RedirectController(); try { $controller->redirectAction($request, '', true); $this->fail('Expected Symfony\Component\HttpKernel\Exception\HttpException to be thrown'); } catch (HttpException $e) { $this->assertSame(410, $e->getStatusCode()); } try { $controller->redirectAction($request, '', false); $this->fail('Expected Symfony\Component\HttpKernel\Exception\HttpException to be thrown'); } catch (HttpException $e) { $this->assertSame(404, $e->getStatusCode()); } $request = new Request([], [], ['_route_params' => ['route' => '', 'permanent' => true]]); try { $controller($request); $this->fail('Expected Symfony\Component\HttpKernel\Exception\HttpException to be thrown'); } catch (HttpException $e) { $this->assertSame(410, $e->getStatusCode()); } $request = new Request([], [], ['_route_params' => ['route' => '', 'permanent' => false]]); try { $controller($request); $this->fail('Expected Symfony\Component\HttpKernel\Exception\HttpException to be thrown'); } catch (HttpException $e) { $this->assertSame(404, $e->getStatusCode()); } } #[DataProvider('provider')] public function testRoute($permanent, $keepRequestMethod, $keepQueryParams, $ignoreAttributes, $expectedCode, $expectedAttributes) { $request = new Request(); $route = 'new-route'; $url = '/redirect-url'; $attributes = [ 'route' => $route, 'permanent' => $permanent, '_route' => 'current-route', '_route_params' => [ 'route' => $route, 'permanent' => $permanent, 'additional-parameter' => 'value', 'ignoreAttributes' => $ignoreAttributes, 'keepRequestMethod' => $keepRequestMethod, 'keepQueryParams' => $keepQueryParams, ], ]; $request->attributes = new ParameterBag($attributes); $router = $this->createMock(UrlGeneratorInterface::class); $router ->expects($this->exactly(2)) ->method('generate') ->with($this->equalTo($route), $this->equalTo($expectedAttributes)) ->willReturn($url); $controller = new RedirectController($router); $returnResponse = $controller->redirectAction($request, $route, $permanent, $ignoreAttributes, $keepRequestMethod, $keepQueryParams); $this->assertRedirectUrl($returnResponse, $url); $this->assertEquals($expectedCode, $returnResponse->getStatusCode()); $returnResponse = $controller($request); $this->assertRedirectUrl($returnResponse, $url); $this->assertEquals($expectedCode, $returnResponse->getStatusCode()); } public static function provider(): array { return [ [true, false, false, false, 301, ['additional-parameter' => 'value']], [false, false, false, false, 302, ['additional-parameter' => 'value']], [false, false, false, true, 302, []], [false, false, false, ['additional-parameter'], 302, []], [true, true, false, false, 308, ['additional-parameter' => 'value']], [false, true, false, false, 307, ['additional-parameter' => 'value']], [false, true, false, true, 307, []], [false, true, true, ['additional-parameter'], 307, []], ]; } public function testEmptyPath() { $request = new Request(); $controller = new RedirectController(); try { $controller->urlRedirectAction($request, '', true); $this->fail('Expected Symfony\Component\HttpKernel\Exception\HttpException to be thrown'); } catch (HttpException $e) { $this->assertSame(410, $e->getStatusCode()); } try { $controller->urlRedirectAction($request, '', false); $this->fail('Expected Symfony\Component\HttpKernel\Exception\HttpException to be thrown'); } catch (HttpException $e) { $this->assertSame(404, $e->getStatusCode()); } $request = new Request([], [], ['_route_params' => ['path' => '', 'permanent' => true]]); try { $controller($request); $this->fail('Expected Symfony\Component\HttpKernel\Exception\HttpException to be thrown'); } catch (HttpException $e) { $this->assertSame(410, $e->getStatusCode()); } $request = new Request([], [], ['_route_params' => ['path' => '', 'permanent' => false]]); try { $controller($request); $this->fail('Expected Symfony\Component\HttpKernel\Exception\HttpException to be thrown'); } catch (HttpException $e) { $this->assertSame(404, $e->getStatusCode()); } } public function testFullURL() { $request = new Request(); $controller = new RedirectController(); $returnResponse = $controller->urlRedirectAction($request, 'http://foo.bar/'); $this->assertRedirectUrl($returnResponse, 'http://foo.bar/'); $this->assertEquals(302, $returnResponse->getStatusCode()); $request = new Request([], [], ['_route_params' => ['path' => 'http://foo.bar/']]); $returnResponse = $controller($request); $this->assertRedirectUrl($returnResponse, 'http://foo.bar/'); $this->assertEquals(302, $returnResponse->getStatusCode()); } public function testFullURLWithMethodKeep() { $request = new Request(); $controller = new RedirectController(); $returnResponse = $controller->urlRedirectAction($request, 'http://foo.bar/', false, null, null, null, true); $this->assertRedirectUrl($returnResponse, 'http://foo.bar/'); $this->assertEquals(307, $returnResponse->getStatusCode()); $request = new Request([], [], ['_route_params' => ['path' => 'http://foo.bar/', 'keepRequestMethod' => true]]); $returnResponse = $controller($request); $this->assertRedirectUrl($returnResponse, 'http://foo.bar/'); $this->assertEquals(307, $returnResponse->getStatusCode()); } public function testProtocolRelative() { $request = new Request(); $controller = new RedirectController(); $returnResponse = $controller->urlRedirectAction($request, '//foo.bar/'); $this->assertRedirectUrl($returnResponse, 'http://foo.bar/'); $this->assertSame(302, $returnResponse->getStatusCode()); $returnResponse = $controller->urlRedirectAction($request, '//foo.bar/', false, 'https'); $this->assertRedirectUrl($returnResponse, 'https://foo.bar/'); $this->assertSame(302, $returnResponse->getStatusCode()); } public function testUrlRedirectDefaultPorts() { $host = 'www.example.com'; $baseUrl = '/base'; $path = '/redirect-path'; $httpPort = 1080; $httpsPort = 1443; $expectedUrl = "https://$host:$httpsPort$baseUrl$path"; $request = $this->createRequestObject('http', $host, $httpPort, $baseUrl); $controller = $this->createRedirectController(null, $httpsPort); $returnValue = $controller->urlRedirectAction($request, $path, false, 'https'); $this->assertRedirectUrl($returnValue, $expectedUrl); $request->attributes = new ParameterBag(['_route_params' => ['path' => $path, 'scheme' => 'https']]); $returnValue = $controller($request); $this->assertRedirectUrl($returnValue, $expectedUrl); $expectedUrl = "http://$host:$httpPort$baseUrl$path"; $request = $this->createRequestObject('https', $host, $httpPort, $baseUrl); $controller = $this->createRedirectController($httpPort); $returnValue = $controller->urlRedirectAction($request, $path, false, 'http'); $this->assertRedirectUrl($returnValue, $expectedUrl); $request->attributes = new ParameterBag(['_route_params' => ['path' => $path, 'scheme' => 'http']]); $returnValue = $controller($request); $this->assertRedirectUrl($returnValue, $expectedUrl); } public static function urlRedirectProvider(): array { return [ // Standard ports ['http', null, null, 'http', 80, ''], ['http', 80, null, 'http', 80, ''], ['https', null, null, 'http', 80, ''], ['https', 80, null, 'http', 80, ''], ['http', null, null, 'https', 443, ''], ['http', null, 443, 'https', 443, ''], ['https', null, null, 'https', 443, ''], ['https', null, 443, 'https', 443, ''], // Non-standard ports ['http', null, null, 'http', 8080, ':8080'], ['http', 4080, null, 'http', 8080, ':4080'], ['http', 80, null, 'http', 8080, ''], ['https', null, null, 'http', 8080, ''], ['https', null, 8443, 'http', 8080, ':8443'], ['https', null, 443, 'http', 8080, ''], ['https', null, null, 'https', 8443, ':8443'], ['https', null, 4443, 'https', 8443, ':4443'], ['https', null, 443, 'https', 8443, ''], ['http', null, null, 'https', 8443, ''], ['http', 8080, 4443, 'https', 8443, ':8080'], ['http', 80, 4443, 'https', 8443, ''], ]; } #[DataProvider('urlRedirectProvider')] public function testUrlRedirect($scheme, $httpPort, $httpsPort, $requestScheme, $requestPort, $expectedPort) { $host = 'www.example.com'; $baseUrl = '/base'; $path = '/redirect-path'; $expectedUrl = "$scheme://$host$expectedPort$baseUrl$path"; $request = $this->createRequestObject($requestScheme, $host, $requestPort, $baseUrl); $controller = $this->createRedirectController(); $returnValue = $controller->urlRedirectAction($request, $path, false, $scheme, $httpPort, $httpsPort); $this->assertRedirectUrl($returnValue, $expectedUrl); $request->attributes = new ParameterBag(['_route_params' => ['path' => $path, 'scheme' => $scheme, 'httpPort' => $httpPort, 'httpsPort' => $httpsPort]]); $returnValue = $controller($request); $this->assertRedirectUrl($returnValue, $expectedUrl); } public static function pathQueryParamsProvider(): array { return [ ['http://www.example.com/base/redirect-path', '/redirect-path', ''], ['http://www.example.com/base/redirect-path?foo=bar', '/redirect-path?foo=bar', ''], ['http://www.example.com/base/redirect-path?f.o=bar', '/redirect-path', 'f.o=bar'], ['http://www.example.com/base/redirect-path?f.o=bar&a.c=example', '/redirect-path?f.o=bar', 'a.c=example'], ['http://www.example.com/base/redirect-path?f.o=bar&a.c=example&b.z=def', '/redirect-path?f.o=bar', 'a.c=example&b.z=def'], ]; } #[DataProvider('pathQueryParamsProvider')] public function testPathQueryParams($expectedUrl, $path, $queryString) { $scheme = 'http'; $host = 'www.example.com'; $baseUrl = '/base'; $port = 80; $request = $this->createRequestObject($scheme, $host, $port, $baseUrl, $queryString); $controller = $this->createRedirectController(); $returnValue = $controller->urlRedirectAction($request, $path, false, $scheme, $port, null); $this->assertRedirectUrl($returnValue, $expectedUrl); $request->attributes = new ParameterBag(['_route_params' => ['path' => $path, 'scheme' => $scheme, 'httpPort' => $port]]); $returnValue = $controller($request); $this->assertRedirectUrl($returnValue, $expectedUrl); } public function testRedirectWithQuery() { $scheme = 'http'; $host = 'www.example.com'; $baseUrl = '/base'; $port = 80; $request = $this->createRequestObject($scheme, $host, $port, $baseUrl, 'b.se=zaza&f[%2525][%26][%3D][p.c]=d'); $request->attributes = new ParameterBag(['_route_params' => ['base2' => 'zaza']]); $urlGenerator = $this->createMock(UrlGeneratorInterface::class); $urlGenerator->expects($this->exactly(2)) ->method('generate') ->willReturn('/test?b.se=zaza&base2=zaza&f[%2525][%26][%3D][p.c]=d') ->with('/test', ['b.se' => 'zaza', 'base2' => 'zaza', 'f' => ['%25' => ['&' => ['=' => ['p.c' => 'd']]]]], UrlGeneratorInterface::ABSOLUTE_URL); $controller = new RedirectController($urlGenerator); $this->assertRedirectUrl($controller->redirectAction($request, '/test', false, false, false, true), '/test?b.se=zaza&base2=zaza&f[%2525][%26][%3D][p.c]=d'); $request->attributes->set('_route_params', ['base2' => 'zaza', 'route' => '/test', 'ignoreAttributes' => false, 'keepRequestMethod' => false, 'keepQueryParams' => true]); $this->assertRedirectUrl($controller($request), '/test?b.se=zaza&base2=zaza&f[%2525][%26][%3D][p.c]=d'); } public function testRedirectWithQueryWithRouteParamsOveriding() { $scheme = 'http'; $host = 'www.example.com'; $baseUrl = '/base'; $port = 80; $request = $this->createRequestObject($scheme, $host, $port, $baseUrl, 'b.se=zaza'); $request->attributes = new ParameterBag(['_route_params' => ['b.se' => 'zouzou']]); $urlGenerator = $this->createMock(UrlGeneratorInterface::class); $urlGenerator->expects($this->exactly(2))->method('generate')->willReturn('/test?b.se=zouzou')->with('/test', ['b.se' => 'zouzou'], UrlGeneratorInterface::ABSOLUTE_URL); $controller = new RedirectController($urlGenerator); $this->assertRedirectUrl($controller->redirectAction($request, '/test', false, false, false, true), '/test?b.se=zouzou'); $request->attributes->set('_route_params', ['b.se' => 'zouzou', 'route' => '/test', 'ignoreAttributes' => false, 'keepRequestMethod' => false, 'keepQueryParams' => true]); $this->assertRedirectUrl($controller($request), '/test?b.se=zouzou'); } public function testMissingPathOrRouteParameter() { $this->expectException(\RuntimeException::class); $this->expectExceptionMessage('The parameter "path" or "route" is required to configure the redirect action in "_redirect" routing configuration.'); (new RedirectController())(new Request([], [], ['_route' => '_redirect'])); } public function testAmbiguousPathAndRouteParameter() { $this->expectException(\RuntimeException::class); $this->expectExceptionMessage('Ambiguous redirection settings, use the "path" or "route" parameter, not both: "/foo" and "bar" found respectively in "_redirect" routing configuration.'); (new RedirectController())(new Request([], [], ['_route' => '_redirect', '_route_params' => ['path' => '/foo', 'route' => 'bar']])); } private function createRequestObject($scheme, $host, $port, $baseUrl, $queryString = '') { if ('' !== $queryString) { parse_str($queryString, $query); } else { $query = []; } return new Request($query, [], [], [], [], [ 'HTTPS' => 'https' === $scheme, 'HTTP_HOST' => $host.($port ? ':'.$port : ''), 'SERVER_PORT' => $port, 'SCRIPT_FILENAME' => $baseUrl, 'REQUEST_URI' => $baseUrl, 'QUERY_STRING' => $queryString, ]); } private function createRedirectController($httpPort = null, $httpsPort = null) { return new RedirectController(null, $httpPort, $httpsPort); } private function assertRedirectUrl(Response $returnResponse, $expectedUrl) { $this->assertTrue($returnResponse->isRedirect($expectedUrl), "Expected: $expectedUrl\nGot: ".$returnResponse->headers->get('Location')); } }
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import re import fnmatch import sys import subprocess import datetime import os ################################################################################ # file filtering ################################################################################ EXCLUDE = [ # libsecp256k1: 'src/secp256k1/include/secp256k1.h', 'src/secp256k1/include/secp256k1_ecdh.h', 'src/secp256k1/include/secp256k1_recovery.h', 'src/secp256k1/include/secp256k1_schnorr.h', 'src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c', 'src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h', 'src/secp256k1/src/java/org_bitcoin_Secp256k1Context.c', 'src/secp256k1/src/java/org_bitcoin_Secp256k1Context.h', # auto generated: 'src/univalue/lib/univalue_escapes.h', 'src/qt/bitcoinstrings.cpp', 'src/chainparamsseeds.h', # other external copyrights: 'src/tinyformat.h', 'src/leveldb/util/env_win.cc', 'src/crypto/ctaes/bench.c', 'qa/rpc-tests/test_framework/bignum.py', # python init: '*__init__.py', ] EXCLUDE_COMPILED = re.compile('|'.join([fnmatch.translate(m) for m in EXCLUDE])) INCLUDE = ['*.h', '*.cpp', '*.cc', '*.c', '*.py'] INCLUDE_COMPILED = re.compile('|'.join([fnmatch.translate(m) for m in INCLUDE])) def applies_to_file(filename): return ((EXCLUDE_COMPILED.match(filename) is None) and (INCLUDE_COMPILED.match(filename) is not None)) ################################################################################ # obtain list of files in repo according to INCLUDE and EXCLUDE ################################################################################ GIT_LS_CMD = 'git ls-files' def call_git_ls(): out = subprocess.check_output(GIT_LS_CMD.split(' ')) return [f for f in out.decode("utf-8").split('\n') if f != ''] def get_filenames_to_examine(): filenames = call_git_ls() return sorted([filename for filename in filenames if applies_to_file(filename)]) ################################################################################ # define and compile regexes for the patterns we are looking for ################################################################################ COPYRIGHT_WITH_C = 'Copyright \(c\)' COPYRIGHT_WITHOUT_C = 'Copyright' ANY_COPYRIGHT_STYLE = '(%s|%s)' % (COPYRIGHT_WITH_C, COPYRIGHT_WITHOUT_C) YEAR = "20[0-9][0-9]" YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR) YEAR_LIST = '(%s)(, %s)+' % (YEAR, YEAR) ANY_YEAR_STYLE = '(%s|%s)' % (YEAR_RANGE, YEAR_LIST) ANY_COPYRIGHT_STYLE_OR_YEAR_STYLE = ("%s %s" % (ANY_COPYRIGHT_STYLE, ANY_YEAR_STYLE)) ANY_COPYRIGHT_COMPILED = re.compile(ANY_COPYRIGHT_STYLE_OR_YEAR_STYLE) def compile_copyright_regex(copyright_style, year_style, name): return re.compile('%s %s %s' % (copyright_style, year_style, name)) EXPECTED_HOLDER_NAMES = [ "Satoshi Nakamoto\n", "The Bitcoin Core developers\n", "The Bitcoin Core developers \n", "Bitcoin Core Developers\n", "the Bitcoin Core developers\n", "The Bitcoin developers\n", "The LevelDB Authors\. All rights reserved\.\n", "BitPay Inc\.\n", "BitPay, Inc\.\n", "University of Illinois at Urbana-Champaign\.\n", "MarcoFalke\n", "Pieter Wuille\n", "Pieter Wuille +\*\n", "Pieter Wuille, Gregory Maxwell +\*\n", "Pieter Wuille, Andrew Poelstra +\*\n", "Andrew Poelstra +\*\n", "Wladimir J. van der Laan\n", "Jeff Garzik\n", "Diederik Huys, Pieter Wuille +\*\n", "Thomas Daede, Cory Fields +\*\n", "Jan-Klaas Kollhof\n", "Sam Rushing\n", "ArtForz -- public domain half-a-node\n", ] DOMINANT_STYLE_COMPILED = {} YEAR_LIST_STYLE_COMPILED = {} WITHOUT_C_STYLE_COMPILED = {} for holder_name in EXPECTED_HOLDER_NAMES: DOMINANT_STYLE_COMPILED[holder_name] = ( compile_copyright_regex(COPYRIGHT_WITH_C, YEAR_RANGE, holder_name)) YEAR_LIST_STYLE_COMPILED[holder_name] = ( compile_copyright_regex(COPYRIGHT_WITH_C, YEAR_LIST, holder_name)) WITHOUT_C_STYLE_COMPILED[holder_name] = ( compile_copyright_regex(COPYRIGHT_WITHOUT_C, ANY_YEAR_STYLE, holder_name)) ################################################################################ # search file contents for copyright message of particular category ################################################################################ def get_count_of_copyrights_of_any_style_any_holder(contents): return len(ANY_COPYRIGHT_COMPILED.findall(contents)) def file_has_dominant_style_copyright_for_holder(contents, holder_name): match = DOMINANT_STYLE_COMPILED[holder_name].search(contents) return match is not None def file_has_year_list_style_copyright_for_holder(contents, holder_name): match = YEAR_LIST_STYLE_COMPILED[holder_name].search(contents) return match is not None def file_has_without_c_style_copyright_for_holder(contents, holder_name): match = WITHOUT_C_STYLE_COMPILED[holder_name].search(contents) return match is not None ################################################################################ # get file info ################################################################################ def read_file(filename): return open(os.path.abspath(filename), 'r').read() def gather_file_info(filename): info = {} info['filename'] = filename c = read_file(filename) info['contents'] = c info['all_copyrights'] = get_count_of_copyrights_of_any_style_any_holder(c) info['classified_copyrights'] = 0 info['dominant_style'] = {} info['year_list_style'] = {} info['without_c_style'] = {} for holder_name in EXPECTED_HOLDER_NAMES: has_dominant_style = ( file_has_dominant_style_copyright_for_holder(c, holder_name)) has_year_list_style = ( file_has_year_list_style_copyright_for_holder(c, holder_name)) has_without_c_style = ( file_has_without_c_style_copyright_for_holder(c, holder_name)) info['dominant_style'][holder_name] = has_dominant_style info['year_list_style'][holder_name] = has_year_list_style info['without_c_style'][holder_name] = has_without_c_style if has_dominant_style or has_year_list_style or has_without_c_style: info['classified_copyrights'] = info['classified_copyrights'] + 1 return info ################################################################################ # report execution ################################################################################ SEPARATOR = '-'.join(['' for _ in range(80)]) def print_filenames(filenames, verbose): if not verbose: return for filename in filenames: print("\t%s" % filename) def print_report(file_infos, verbose): print(SEPARATOR) examined = [i['filename'] for i in file_infos] print("%d files examined according to INCLUDE and EXCLUDE fnmatch rules" % len(examined)) print_filenames(examined, verbose) print(SEPARATOR) print('') zero_copyrights = [i['filename'] for i in file_infos if i['all_copyrights'] == 0] print("%4d with zero copyrights" % len(zero_copyrights)) print_filenames(zero_copyrights, verbose) one_copyright = [i['filename'] for i in file_infos if i['all_copyrights'] == 1] print("%4d with one copyright" % len(one_copyright)) print_filenames(one_copyright, verbose) two_copyrights = [i['filename'] for i in file_infos if i['all_copyrights'] == 2] print("%4d with two copyrights" % len(two_copyrights)) print_filenames(two_copyrights, verbose) three_copyrights = [i['filename'] for i in file_infos if i['all_copyrights'] == 3] print("%4d with three copyrights" % len(three_copyrights)) print_filenames(three_copyrights, verbose) four_or_more_copyrights = [i['filename'] for i in file_infos if i['all_copyrights'] >= 4] print("%4d with four or more copyrights" % len(four_or_more_copyrights)) print_filenames(four_or_more_copyrights, verbose) print('') print(SEPARATOR) print('Copyrights with dominant style:\ne.g. "Copyright (c)" and ' '"<year>" or "<startYear>-<endYear>":\n') for holder_name in EXPECTED_HOLDER_NAMES: dominant_style = [i['filename'] for i in file_infos if i['dominant_style'][holder_name]] if len(dominant_style) > 0: print("%4d with '%s'" % (len(dominant_style), holder_name.replace('\n', '\\n'))) print_filenames(dominant_style, verbose) print('') print(SEPARATOR) print('Copyrights with year list style:\ne.g. "Copyright (c)" and ' '"<year1>, <year2>, ...":\n') for holder_name in EXPECTED_HOLDER_NAMES: year_list_style = [i['filename'] for i in file_infos if i['year_list_style'][holder_name]] if len(year_list_style) > 0: print("%4d with '%s'" % (len(year_list_style), holder_name.replace('\n', '\\n'))) print_filenames(year_list_style, verbose) print('') print(SEPARATOR) print('Copyrights with no "(c)" style:\ne.g. "Copyright" and "<year>" or ' '"<startYear>-<endYear>":\n') for holder_name in EXPECTED_HOLDER_NAMES: without_c_style = [i['filename'] for i in file_infos if i['without_c_style'][holder_name]] if len(without_c_style) > 0: print("%4d with '%s'" % (len(without_c_style), holder_name.replace('\n', '\\n'))) print_filenames(without_c_style, verbose) print('') print(SEPARATOR) unclassified_copyrights = [i['filename'] for i in file_infos if i['classified_copyrights'] < i['all_copyrights']] print("%d with unexpected copyright holder names" % len(unclassified_copyrights)) print_filenames(unclassified_copyrights, verbose) print(SEPARATOR) def exec_report(base_directory, verbose): original_cwd = os.getcwd() os.chdir(base_directory) filenames = get_filenames_to_examine() file_infos = [gather_file_info(f) for f in filenames] print_report(file_infos, verbose) os.chdir(original_cwd) ################################################################################ # report cmd ################################################################################ REPORT_USAGE = """ Produces a report of all copyright header notices found inside the source files of a repository. Usage: $ ./copyright_header.py report <base_directory> [verbose] Arguments: <base_directory> - The base directory of a bitcoin source code repository. [verbose] - Includes a list of every file of each subcategory in the report. """ def report_cmd(argv): if len(argv) == 2: sys.exit(REPORT_USAGE) base_directory = argv[2] if not os.path.exists(base_directory): sys.exit("*** bad <base_directory>: %s" % base_directory) if len(argv) == 3: verbose = False elif argv[3] == 'verbose': verbose = True else: sys.exit("*** unknown argument: %s" % argv[2]) exec_report(base_directory, verbose) ################################################################################ # query git for year of last change ################################################################################ GIT_LOG_CMD = "git log --pretty=format:%%ai %s" def call_git_log(filename): out = subprocess.check_output((GIT_LOG_CMD % filename).split(' ')) return out.decode("utf-8").split('\n') def get_git_change_years(filename): git_log_lines = call_git_log(filename) if len(git_log_lines) == 0: return [datetime.date.today().year] # timestamp is in ISO 8601 format. e.g. "2016-09-05 14:25:32 -0600" return [line.split(' ')[0].split('-')[0] for line in git_log_lines] def get_most_recent_git_change_year(filename): return max(get_git_change_years(filename)) ################################################################################ # read and write to file ################################################################################ def read_file_lines(filename): f = open(os.path.abspath(filename), 'r') file_lines = f.readlines() f.close() return file_lines def write_file_lines(filename, file_lines): f = open(os.path.abspath(filename), 'w') f.write(''.join(file_lines)) f.close() ################################################################################ # update header years execution ################################################################################ COPYRIGHT = 'Copyright \(c\)' YEAR = "20[0-9][0-9]" YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR) HOLDER = 'The Bitcoin Core developers' UPDATEABLE_LINE_COMPILED = re.compile(' '.join([COPYRIGHT, YEAR_RANGE, HOLDER])) def get_updatable_copyright_line(file_lines): index = 0 for line in file_lines: if UPDATEABLE_LINE_COMPILED.search(line) is not None: return index, line index = index + 1 return None, None def parse_year_range(year_range): year_split = year_range.split('-') start_year = year_split[0] if len(year_split) == 1: return start_year, start_year return start_year, year_split[1] def year_range_to_str(start_year, end_year): if start_year == end_year: return start_year return "%s-%s" % (start_year, end_year) def create_updated_copyright_line(line, last_git_change_year): copyright_splitter = 'Copyright (c) ' copyright_split = line.split(copyright_splitter) # Preserve characters on line that are ahead of the start of the copyright # notice - they are part of the comment block and vary from file-to-file. before_copyright = copyright_split[0] after_copyright = copyright_split[1] space_split = after_copyright.split(' ') year_range = space_split[0] start_year, end_year = parse_year_range(year_range) if end_year == last_git_change_year: return line return (before_copyright + copyright_splitter + year_range_to_str(start_year, last_git_change_year) + ' ' + ' '.join(space_split[1:])) def update_updatable_copyright(filename): file_lines = read_file_lines(filename) index, line = get_updatable_copyright_line(file_lines) if not line: print_file_action_message(filename, "No updatable copyright.") return last_git_change_year = get_most_recent_git_change_year(filename) new_line = create_updated_copyright_line(line, last_git_change_year) if line == new_line: print_file_action_message(filename, "Copyright up-to-date.") return file_lines[index] = new_line write_file_lines(filename, file_lines) print_file_action_message(filename, "Copyright updated! -> %s" % last_git_change_year) def exec_update_header_year(base_directory): original_cwd = os.getcwd() os.chdir(base_directory) for filename in get_filenames_to_examine(): update_updatable_copyright(filename) os.chdir(original_cwd) ################################################################################ # update cmd ################################################################################ UPDATE_USAGE = """ Updates all the copyright headers of "The Bitcoin Core developers" which were changed in a year more recent than is listed. For example: // Copyright (c) <firstYear>-<lastYear> The Bitcoin Core developers will be updated to: // Copyright (c) <firstYear>-<lastModifiedYear> The Bitcoin Core developers where <lastModifiedYear> is obtained from the 'git log' history. This subcommand also handles copyright headers that have only a single year. In those cases: // Copyright (c) <year> The Bitcoin Core developers will be updated to: // Copyright (c) <year>-<lastModifiedYear> The Bitcoin Core developers where the update is appropriate. Usage: $ ./copyright_header.py update <base_directory> Arguments: <base_directory> - The base directory of a bitcoin source code repository. """ def print_file_action_message(filename, action): print("%-52s %s" % (filename, action)) def update_cmd(argv): if len(argv) != 3: sys.exit(UPDATE_USAGE) base_directory = argv[2] if not os.path.exists(base_directory): sys.exit("*** bad base_directory: %s" % base_directory) exec_update_header_year(base_directory) ################################################################################ # inserted copyright header format ################################################################################ def get_header_lines(header, start_year, end_year): lines = header.split('\n')[1:-1] lines[0] = lines[0] % year_range_to_str(start_year, end_year) return [line + '\n' for line in lines] CPP_HEADER = ''' // Copyright (c) %s The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' def get_cpp_header_lines_to_insert(start_year, end_year): return reversed(get_header_lines(CPP_HEADER, start_year, end_year)) PYTHON_HEADER = ''' # Copyright (c) %s The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' def get_python_header_lines_to_insert(start_year, end_year): return reversed(get_header_lines(PYTHON_HEADER, start_year, end_year)) ################################################################################ # query git for year of last change ################################################################################ def get_git_change_year_range(filename): years = get_git_change_years(filename) return min(years), max(years) ################################################################################ # check for existing core copyright ################################################################################ def file_already_has_core_copyright(file_lines): index, _ = get_updatable_copyright_line(file_lines) return index != None ################################################################################ # insert header execution ################################################################################ def file_has_hashbang(file_lines): if len(file_lines) < 1: return False if len(file_lines[0]) <= 2: return False return file_lines[0][:2] == '#!' def insert_python_header(filename, file_lines, start_year, end_year): if file_has_hashbang(file_lines): insert_idx = 1 else: insert_idx = 0 header_lines = get_python_header_lines_to_insert(start_year, end_year) for line in header_lines: file_lines.insert(insert_idx, line) write_file_lines(filename, file_lines) def insert_cpp_header(filename, file_lines, start_year, end_year): header_lines = get_cpp_header_lines_to_insert(start_year, end_year) for line in header_lines: file_lines.insert(0, line) write_file_lines(filename, file_lines) def exec_insert_header(filename, style): file_lines = read_file_lines(filename) if file_already_has_core_copyright(file_lines): sys.exit('*** %s already has a copyright by The Bitcoin Core developers' % (filename)) start_year, end_year = get_git_change_year_range(filename) if style == 'python': insert_python_header(filename, file_lines, start_year, end_year) else: insert_cpp_header(filename, file_lines, start_year, end_year) ################################################################################ # insert cmd ################################################################################ INSERT_USAGE = """ Inserts a copyright header for "The Bitcoin Core developers" at the top of the file in either Python or C++ style as determined by the file extension. If the file is a Python file and it has a '#!' starting the first line, the header is inserted in the line below it. The copyright dates will be set to be: "<year_introduced>-<current_year>" where <year_introduced> is according to the 'git log' history. If <year_introduced> is equal to <current_year>, the date will be set to be: "<current_year>" If the file already has a copyright for "The Bitcoin Core developers", the script will exit. Usage: $ ./copyright_header.py insert <file> Arguments: <file> - A source file in the bitcoin repository. """ def insert_cmd(argv): if len(argv) != 3: sys.exit(INSERT_USAGE) filename = argv[2] if not os.path.isfile(filename): sys.exit("*** bad filename: %s" % filename) _, extension = os.path.splitext(filename) if extension not in ['.h', '.cpp', '.cc', '.c', '.py']: sys.exit("*** cannot insert for file extension %s" % extension) if extension == '.py': style = 'python' else: style = 'cpp' exec_insert_header(filename, style) ################################################################################ # UI ################################################################################ USAGE = """ copyright_header.py - utilities for managing copyright headers of 'The Bitcoin Core developers' in repository source files. Usage: $ ./copyright_header <subcommand> Subcommands: report update insert To see subcommand usage, run them without arguments. """ SUBCOMMANDS = ['report', 'update', 'insert'] if __name__ == "__main__": if len(sys.argv) == 1: sys.exit(USAGE) subcommand = sys.argv[1] if subcommand not in SUBCOMMANDS: sys.exit(USAGE) if subcommand == 'report': report_cmd(sys.argv) elif subcommand == 'update': update_cmd(sys.argv) elif subcommand == 'insert': insert_cmd(sys.argv)
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (2016-2017) Hewlett Packard Enterprise Development LP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. class ModuleDocFragment(object): # OneView doc fragment DOCUMENTATION = ''' options: config: description: - Path to a .json configuration file containing the OneView client configuration. The configuration file is optional and when used should be present in the host running the ansible commands. If the file path is not provided, the configuration will be loaded from environment variables. For links to example configuration files or how to use the environment variables verify the notes section. required: false requirements: - "python >= 2.7.9" notes: - "A sample configuration file for the config parameter can be found at: U(https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json)" - "Check how to use environment variables for configuration at: U(https://github.com/HewlettPackard/oneview-ansible#environment-variables)" - "Additional Playbooks for the HPE OneView Ansible modules can be found at: U(https://github.com/HewlettPackard/oneview-ansible/tree/master/examples)" ''' VALIDATEETAG = ''' options: validate_etag: description: - When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. default: true choices: ['true', 'false'] ''' FACTSPARAMS = ''' options: params: description: - List of params to delimit, filter and sort the list of resources. - "params allowed: C(start): The first item to return, using 0-based indexing. C(count): The number of resources to return. C(filter): A general filter/query string to narrow the list of items returned. C(sort): The sort order of the returned data set." required: false '''
unknown
codeparrot/codeparrot-clean
export var __N_SSG = true; export function Noop() {} export default function Test() { return __jsx("div", null); }
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/strip-page-exports/getStaticProps/not-remove-extra-named-export-function-declarations/output-default.js
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, at * your election, the "Elastic License 2.0", the "GNU Affero General Public * License v3.0 only", or the "Server Side Public License, v 1". */ package org.elasticsearch.benchmark.index.codec.tsdb; import org.elasticsearch.benchmark.index.codec.tsdb.internal.AbstractTSDBCodecBenchmark; import org.elasticsearch.benchmark.index.codec.tsdb.internal.CompressionMetrics; import org.elasticsearch.benchmark.index.codec.tsdb.internal.EncodeBenchmark; import org.elasticsearch.benchmark.index.codec.tsdb.internal.ThroughputMetrics; import org.elasticsearch.benchmark.index.codec.tsdb.internal.TimestampLikeSupplier; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Level; import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Param; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.Warmup; import org.openjdk.jmh.infra.Blackhole; import java.io.IOException; import java.util.concurrent.TimeUnit; /** * Benchmark for encoding timestamp-like data patterns. * * <p>Parameterized by jitter probability to test how delta encoding handles * varying degrees of timestamp regularity. Lower jitter means more consistent * deltas (better compression), higher jitter simulates irregular sampling. */ @Fork(value = 1) @Warmup(iterations = 3) @Measurement(iterations = 5) @BenchmarkMode(Mode.Throughput) @OutputTimeUnit(TimeUnit.SECONDS) @State(Scope.Benchmark) public class EncodeTimestampLikeBenchmark { private static final int SEED = 17; @Param({ "0.0", "0.1", "0.2", "0.5" }) private double jitterProbability; /** * Number of blocks encoded per measured benchmark invocation. * * <p>Default is 10: the smallest batch size that provides stable measurements with good * signal-to-noise ratio for regression tracking. Exposed as a JMH parameter to allow * tuning without code changes. */ @Param({ "10" }) private int blocksPerInvocation; private final AbstractTSDBCodecBenchmark encode; private TimestampLikeSupplier supplier; public EncodeTimestampLikeBenchmark() { this.encode = new EncodeBenchmark(); } @Setup(Level.Trial) public void setupTrial() throws IOException { supplier = TimestampLikeSupplier.builder(SEED, encode.getBlockSize()).withJitterProbability(jitterProbability).build(); encode.setupTrial(supplier); encode.setBlocksPerInvocation(blocksPerInvocation); encode.run(); } @Benchmark public void throughput(Blackhole bh, ThroughputMetrics metrics) throws IOException { encode.benchmark(bh); metrics.recordOperation(encode.getBlockSize() * blocksPerInvocation, encode.getEncodedSize() * blocksPerInvocation); } /** * Reports compression metrics (encoded size, compression ratio, bits per value). * * <p>This benchmark exists only to collect compression statistics via {@link CompressionMetrics}. * The reported time is not meaningful and should be ignored. Metrics are per-block regardless * of the {@code blocksPerInvocation} setting. */ @Benchmark @BenchmarkMode(Mode.SingleShotTime) @Warmup(iterations = 0) @Measurement(iterations = 1) public void compression(Blackhole bh, CompressionMetrics metrics) throws IOException { encode.benchmark(bh); metrics.recordOperation(encode.getBlockSize(), encode.getEncodedSize(), supplier.getNominalBitsPerValue()); } }
java
github
https://github.com/elastic/elasticsearch
benchmarks/src/main/java/org/elasticsearch/benchmark/index/codec/tsdb/EncodeTimestampLikeBenchmark.java
# Copyright (c) 2015 Shaun McCance <shaunm@gnome.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE.
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2017 Matthew C. Zwier and Lillian T. Chong # # This file is part of WESTPA. # # WESTPA is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # WESTPA is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with WESTPA. If not, see <http://www.gnu.org/licenses/>. ''' Kinetics analysis library ''' import logging log = logging.getLogger(__name__) from rate_averaging import RateAverager import _kinetics from _kinetics import (calculate_labeled_fluxes, labeled_flux_to_rate, #@UnresolvedImport calculate_labeled_fluxes_alllags, #@UnresolvedImport nested_to_flat_matrix, nested_to_flat_vector, #@UnresolvedImport flat_to_nested_matrix, flat_to_nested_vector, find_macrostate_transitions, #@UnresolvedImport sequence_macro_flux_to_rate) #@UnresolvedImport from events import WKinetics
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.rx3 import kotlinx.coroutines.testing.* import kotlinx.coroutines.* import org.junit.* import java.util.* import kotlin.coroutines.* class ObservableCompletionStressTest : TestBase() { private val N_REPEATS = 10_000 * stressTestMultiplier private fun CoroutineScope.range(context: CoroutineContext, start: Int, count: Int) = rxObservable(context) { for (x in start until start + count) send(x) } @Test fun testCompletion() { val rnd = Random() repeat(N_REPEATS) { val count = rnd.nextInt(5) runBlocking { withTimeout(5000) { var received = 0 range(Dispatchers.Default, 1, count).collect { x -> received++ if (x != received) error("$x != $received") } if (received != count) error("$received != $count") } } } } }
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
reactive/kotlinx-coroutines-rx3/test/ObservableCompletionStressTest.kt
#!/usr/bin/env python # # Copyright 2004,2005,2007,2010,2012,2013,2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # from gnuradio import gr, gr_unittest, blocks import pmt import os class test_stream_mux (gr_unittest.TestCase): def setUp (self): os.environ['GR_CONF_CONTROLPORT_ON'] = 'False' self.tb = gr.top_block () def tearDown (self): self.tb = None def help_stream_2ff(self, N, stream_sizes): v0 = blocks.vector_source_f(N*[1,], False) v1 = blocks.vector_source_f(N*[2,], False) mux = blocks.stream_mux(gr.sizeof_float, stream_sizes) dst = blocks.vector_sink_f () self.tb.connect (v0, (mux,0)) self.tb.connect (v1, (mux,1)) self.tb.connect (mux, dst) self.tb.run () return dst.data () def help_stream_ramp_2ff(self, N, stream_sizes): r1 = range(N) r2 = range(N) r2.reverse() v0 = blocks.vector_source_f(r1, False) v1 = blocks.vector_source_f(r2, False) mux = blocks.stream_mux(gr.sizeof_float, stream_sizes) dst = blocks.vector_sink_f () self.tb.connect (v0, (mux,0)) self.tb.connect (v1, (mux,1)) self.tb.connect (mux, dst) self.tb.run () return dst.data () def help_stream_tag_propagation(self, N, stream_sizes): src_data1 = stream_sizes[0]*N*[1,] src_data2 = stream_sizes[1]*N*[2,] src_data3 = stream_sizes[2]*N*[3,] # stream_mux scheme (3,2,4) src1 = blocks.vector_source_f(src_data1) src2 = blocks.vector_source_f(src_data2) src3 = blocks.vector_source_f(src_data3) tag_stream1 = blocks.stream_to_tagged_stream(gr.sizeof_float, 1, stream_sizes[0], 'src1') tag_stream2 = blocks.stream_to_tagged_stream(gr.sizeof_float, 1, stream_sizes[1], 'src2') tag_stream3 = blocks.stream_to_tagged_stream(gr.sizeof_float, 1, stream_sizes[2], 'src3') mux = blocks.stream_mux(gr.sizeof_float, stream_sizes) dst = blocks.vector_sink_f() self.tb.connect(src1, tag_stream1) self.tb.connect(src2, tag_stream2) self.tb.connect(src3, tag_stream3) self.tb.connect(tag_stream1, (mux,0)) self.tb.connect(tag_stream2, (mux,1)) self.tb.connect(tag_stream3, (mux,2)) self.tb.connect(mux, dst) self.tb.run() return (dst.data (), dst.tags ()) def test_stream_2NN_ff(self): N = 40 stream_sizes = [10, 10] result_data = self.help_stream_2ff(N, stream_sizes) exp_data = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0) self.assertEqual (exp_data, result_data) def test_stream_ramp_2NN_ff(self): N = 40 stream_sizes = [10, 10] result_data = self.help_stream_ramp_2ff(N, stream_sizes) exp_data = ( 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 39.0, 38.0, 37.0, 36.0, 35.0, 34.0, 33.0, 32.0, 31.0, 30.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 29.0, 28.0, 27.0, 26.0, 25.0, 24.0, 23.0, 22.0, 21.0, 20.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 19.0, 18.0, 17.0, 16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0) self.assertEqual (exp_data, result_data) def test_stream_2NM_ff(self): N = 40 stream_sizes = [7, 9] self.help_stream_2ff(N, stream_sizes) result_data = self.help_stream_2ff(N, stream_sizes) exp_data = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0) self.assertEqual (exp_data, result_data) def test_stream_2MN_ff(self): N = 37 stream_sizes = [7, 9] self.help_stream_2ff(N, stream_sizes) result_data = self.help_stream_2ff(N, stream_sizes) exp_data = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0) self.assertEqual (exp_data, result_data) def test_stream_2N0_ff(self): N = 30 stream_sizes = [7, 0] self.help_stream_2ff(N, stream_sizes) result_data = self.help_stream_2ff(N, stream_sizes) exp_data = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) self.assertEqual (exp_data, result_data) def test_stream_20N_ff(self): N = 30 stream_sizes = [0, 9] self.help_stream_2ff(N, stream_sizes) result_data = self.help_stream_2ff(N, stream_sizes) exp_data = (2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0) self.assertEqual (exp_data, result_data) def test_largeN_ff(self): stream_sizes = [3, 8191] r1 = (1,) * stream_sizes[0] r2 = (2,) * stream_sizes[1] v0 = blocks.vector_source_f(r1, repeat=False) v1 = blocks.vector_source_f(r2, repeat=False) mux = blocks.stream_mux(gr.sizeof_float, stream_sizes) dst = blocks.vector_sink_f () self.tb.connect (v0, (mux,0)) self.tb.connect (v1, (mux,1)) self.tb.connect (mux, dst) self.tb.run () self.assertEqual (r1 + r2, dst.data()) def test_tag_propagation(self): N = 10 # Block length stream_sizes = [1,2,3] expected_result = N*(stream_sizes[0]*[1,] +stream_sizes[1]*[2,] +stream_sizes[2]*[3,]) # check the data (result, tags) = self.help_stream_tag_propagation(N, stream_sizes) self.assertFloatTuplesAlmostEqual(expected_result, result, places=6) # check the tags expected_tag_offsets_src1 = [sum(stream_sizes)*i for i in range(N)] expected_tag_offsets_src2 = [stream_sizes[0] +sum(stream_sizes)*i for i in range(N)] expected_tag_offsets_src3 = [stream_sizes[0]+stream_sizes[1] +sum(stream_sizes)*i for i in range(N)] tags_src1 = [tag for tag in tags if pmt.eq(tag.key, pmt.intern('src1'))] tags_src2 = [tag for tag in tags if pmt.eq(tag.key, pmt.intern('src2'))] tags_src3 = [tag for tag in tags if pmt.eq(tag.key, pmt.intern('src3'))] for i in range(len(expected_tag_offsets_src1)): self.assertTrue(expected_tag_offsets_src1[i] == tags_src1[i].offset) for i in range(len(expected_tag_offsets_src2)): self.assertTrue(expected_tag_offsets_src2[i] == tags_src2[i].offset) for i in range(len(expected_tag_offsets_src3)): self.assertTrue(expected_tag_offsets_src3[i] == tags_src3[i].offset) if __name__ == '__main__': gr_unittest.run(test_stream_mux, "test_stream_mux.xml")
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0015_add_more_verbose_names'), ('wagtailsearch', '0003_remove_editors_pick'), ] operations = [ migrations.SeparateDatabaseAndState( state_operations=[ migrations.CreateModel( name='EditorsPick', fields=[ ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)), ('sort_order', models.IntegerField(editable=False, null=True, blank=True)), ('description', models.TextField(verbose_name='Description', blank=True)), ('page', models.ForeignKey(on_delete=models.CASCADE, verbose_name='Page', to='wagtailcore.Page')), ('query', models.ForeignKey(on_delete=models.CASCADE, to='wagtailsearch.Query', related_name='editors_picks')), ], options={ 'db_table': 'wagtailsearch_editorspick', 'verbose_name': "Editor's Pick", 'ordering': ('sort_order',), }, ), ], database_operations=[] ), migrations.AlterModelTable( name='editorspick', table=None, ), migrations.RenameModel( old_name='EditorsPick', new_name='SearchPromotion' ), migrations.AlterModelOptions( name='searchpromotion', options={'ordering': ('sort_order',), 'verbose_name': 'Search promotion'}, ), ]
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY MATT CHAPUT ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL MATT CHAPUT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # The views and conclusions contained in the software and documentation are # those of the authors and should not be interpreted as representing official # policies, either expressed or implied, of Matt Chaput. from ast import literal_eval from whoosh.compat import b, bytes_type, text_type, integer_types, PY3 from whoosh.compat import iteritems, dumps, loads, xrange from whoosh.codec import base from whoosh.matching import ListMatcher from whoosh.reading import TermInfo, TermNotFound if not PY3: class memoryview: pass _reprable = (bytes_type, text_type, integer_types, float) # Mixin classes for producing and consuming the simple text format class LineWriter(object): def _print_line(self, indent, command, **kwargs): self._dbfile.write(b(" ") * indent) self._dbfile.write(command.encode("latin1")) for k, v in iteritems(kwargs): if isinstance(v, memoryview): v = bytes(v) if v is not None and not isinstance(v, _reprable): raise TypeError(type(v)) self._dbfile.write(("\t%s=%r" % (k, v)).encode("latin1")) self._dbfile.write(b("\n")) class LineReader(object): def __init__(self, dbfile): self._dbfile = dbfile def _reset(self): self._dbfile.seek(0) def _find_line(self, indent, command, **kwargs): for largs in self._find_lines(indent, command, **kwargs): return largs def _find_lines(self, indent, command, **kwargs): while True: line = self._dbfile.readline() if not line: return c = self._parse_line(line) if c is None: return lindent, lcommand, largs = c if lindent == indent and lcommand == command: matched = True if kwargs: for k in kwargs: if kwargs[k] != largs.get(k): matched = False break if matched: yield largs elif lindent < indent: return def _parse_line(self, line): line = line.decode("latin1") line = line.rstrip() l = len(line) line = line.lstrip() if not line or line.startswith("#"): return None indent = (l - len(line)) // 2 parts = line.split("\t") command = parts[0] args = {} for i in xrange(1, len(parts)): n, v = parts[i].split("=") args[n] = literal_eval(v) return (indent, command, args) def _find_root(self, command): self._reset() c = self._find_line(0, command) if c is None: raise Exception("No root section %r" % (command,)) # Codec class class PlainTextCodec(base.Codec): length_stats = False def per_document_writer(self, storage, segment): return PlainPerDocWriter(storage, segment) def field_writer(self, storage, segment): return PlainFieldWriter(storage, segment) def per_document_reader(self, storage, segment): return PlainPerDocReader(storage, segment) def terms_reader(self, storage, segment): return PlainTermsReader(storage, segment) def new_segment(self, storage, indexname): return PlainSegment(indexname) class PlainPerDocWriter(base.PerDocumentWriter, LineWriter): def __init__(self, storage, segment): self._dbfile = storage.create_file(segment.make_filename(".dcs")) self._print_line(0, "DOCS") self.is_closed = False def start_doc(self, docnum): self._print_line(1, "DOC", dn=docnum) def add_field(self, fieldname, fieldobj, value, length): if value is not None: value = dumps(value, -1) self._print_line(2, "DOCFIELD", fn=fieldname, v=value, len=length) def add_column_value(self, fieldname, columnobj, value): self._print_line(2, "COLVAL", fn=fieldname, v=value) def add_vector_items(self, fieldname, fieldobj, items): self._print_line(2, "VECTOR", fn=fieldname) for text, weight, vbytes in items: self._print_line(3, "VPOST", t=text, w=weight, v=vbytes) def finish_doc(self): pass def close(self): self._dbfile.close() self.is_closed = True class PlainPerDocReader(base.PerDocumentReader, LineReader): def __init__(self, storage, segment): self._dbfile = storage.open_file(segment.make_filename(".dcs")) self._segment = segment self.is_closed = False def doc_count(self): return self._segment.doc_count() def doc_count_all(self): return self._segment.doc_count() def has_deletions(self): return False def is_deleted(self, docnum): return False def deleted_docs(self): return frozenset() def _find_doc(self, docnum): self._find_root("DOCS") c = self._find_line(1, "DOC") while c is not None: dn = c["dn"] if dn == docnum: return True elif dn > docnum: return False c = self._find_line(1, "DOC") return False def _iter_docs(self): self._find_root("DOCS") c = self._find_line(1, "DOC") while c is not None: yield c["dn"] c = self._find_line(1, "DOC") def _iter_docfields(self, fieldname): for _ in self._iter_docs(): for c in self._find_lines(2, "DOCFIELD", fn=fieldname): yield c def _iter_lengths(self, fieldname): return (c.get("len", 0) for c in self._iter_docfields(fieldname)) def doc_field_length(self, docnum, fieldname, default=0): for dn in self._iter_docs(): if dn == docnum: c = self._find_line(2, "DOCFIELD", fn=fieldname) if c is not None: return c.get("len", default) elif dn > docnum: break return default def _column_values(self, fieldname): for i, docnum in enumerate(self._iter_docs()): if i != docnum: raise Exception("Missing column value for field %r doc %d?" % (fieldname, i)) c = self._find_line(2, "COLVAL", fn=fieldname) if c is None: raise Exception("Missing column value for field %r doc %d?" % (fieldname, docnum)) yield c.get("v") def has_column(self, fieldname): for _ in self._column_values(fieldname): return True return False def column_reader(self, fieldname, column): return list(self._column_values(fieldname)) def field_length(self, fieldname): return sum(self._iter_lengths(fieldname)) def min_field_length(self, fieldname): return min(self._iter_lengths(fieldname)) def max_field_length(self, fieldname): return max(self._iter_lengths(fieldname)) def has_vector(self, docnum, fieldname): if self._find_doc(docnum): if self._find_line(2, "VECTOR"): return True return False def vector(self, docnum, fieldname, format_): if not self._find_doc(docnum): raise Exception if not self._find_line(2, "VECTOR"): raise Exception ids = [] weights = [] values = [] c = self._find_line(3, "VPOST") while c is not None: ids.append(c["t"]) weights.append(c["w"]) values.append(c["v"]) c = self._find_line(3, "VPOST") return ListMatcher(ids, weights, values, format_,) def _read_stored_fields(self): sfs = {} c = self._find_line(2, "DOCFIELD") while c is not None: v = c.get("v") if v is not None: v = loads(v) sfs[c["fn"]] = v c = self._find_line(2, "DOCFIELD") return sfs def stored_fields(self, docnum): if not self._find_doc(docnum): raise Exception return self._read_stored_fields() def iter_docs(self): return enumerate(self.all_stored_fields()) def all_stored_fields(self): for _ in self._iter_docs(): yield self._read_stored_fields() def close(self): self._dbfile.close() self.is_closed = True class PlainFieldWriter(base.FieldWriter, LineWriter): def __init__(self, storage, segment): self._dbfile = storage.create_file(segment.make_filename(".trm")) self._print_line(0, "TERMS") @property def is_closed(self): return self._dbfile.is_closed def start_field(self, fieldname, fieldobj): self._fieldobj = fieldobj self._print_line(1, "TERMFIELD", fn=fieldname) def start_term(self, btext): self._terminfo = TermInfo() self._print_line(2, "BTEXT", t=btext) def add(self, docnum, weight, vbytes, length): self._terminfo.add_posting(docnum, weight, length) self._print_line(3, "POST", dn=docnum, w=weight, v=vbytes) def finish_term(self): ti = self._terminfo self._print_line(3, "TERMINFO", df=ti.doc_frequency(), weight=ti.weight(), minlength=ti.min_length(), maxlength=ti.max_length(), maxweight=ti.max_weight(), minid=ti.min_id(), maxid=ti.max_id()) def add_spell_word(self, fieldname, text): self._print_line(2, "SPELL", fn=fieldname, t=text) def close(self): self._dbfile.close() class PlainTermsReader(base.TermsReader, LineReader): def __init__(self, storage, segment): self._dbfile = storage.open_file(segment.make_filename(".trm")) self._segment = segment self.is_closed = False def _find_field(self, fieldname): self._find_root("TERMS") if self._find_line(1, "TERMFIELD", fn=fieldname) is None: raise TermNotFound("No field %r" % fieldname) def _iter_fields(self): self._find_root() c = self._find_line(1, "TERMFIELD") while c is not None: yield c["fn"] c = self._find_line(1, "TERMFIELD") def _iter_btexts(self): c = self._find_line(2, "BTEXT") while c is not None: yield c["t"] c = self._find_line(2, "BTEXT") def _find_term(self, fieldname, btext): self._find_field(fieldname) for t in self._iter_btexts(): if t == btext: return True elif t > btext: break return False def _find_terminfo(self): c = self._find_line(3, "TERMINFO") return TermInfo(**c) def __contains__(self, term): fieldname, btext = term return self._find_term(fieldname, btext) def indexed_field_names(self): return self._iter_fields() def terms(self): for fieldname in self._iter_fields(): for btext in self._iter_btexts(): yield (fieldname, btext) def terms_from(self, fieldname, prefix): self._find_field(fieldname) for btext in self._iter_btexts(): if btext < prefix: continue yield (fieldname, btext) def items(self): for fieldname, btext in self.terms(): yield (fieldname, btext), self._find_terminfo() def items_from(self, fieldname, prefix): for fieldname, btext in self.terms_from(fieldname, prefix): yield (fieldname, btext), self._find_terminfo() def term_info(self, fieldname, btext): if not self._find_term(fieldname, btext): raise TermNotFound((fieldname, btext)) return self._find_terminfo() def matcher(self, fieldname, btext, format_, scorer=None): if not self._find_term(fieldname, btext): raise TermNotFound((fieldname, btext)) ids = [] weights = [] values = [] c = self._find_line(3, "POST") while c is not None: ids.append(c["dn"]) weights.append(c["w"]) values.append(c["v"]) c = self._find_line(3, "POST") return ListMatcher(ids, weights, values, format_, scorer=scorer) def close(self): self._dbfile.close() self.is_closed = True class PlainSegment(base.Segment): def __init__(self, indexname): base.Segment.__init__(self, indexname) self._doccount = 0 def codec(self): return PlainTextCodec() def set_doc_count(self, doccount): self._doccount = doccount def doc_count(self): return self._doccount def should_assemble(self): return False
unknown
codeparrot/codeparrot-clean
# # PEDA - Python Exploit Development Assistance for GDB # # Copyright (C) 2012 Long Le Dinh <longld at vnsecurity.net> # # License: see LICENSE file for details # # change below settings to match your needs ## BEGIN OF SETTINGS ## # external binaries, required for some commands READELF = "/usr/bin/readelf" OBJDUMP = "/usr/bin/objdump" NASM = "/usr/bin/nasm" NDISASM = "/usr/bin/ndisasm" # PEDA global options OPTIONS = { "badchars" : ("", "bad characters to be filtered in payload/output, e.g: '\\x0a\\x00'"), "pattern" : (1, "pattern type, 0 = basic, 1 = extended, 2 = maximum"), "p_charset" : ("", "custom charset for pattern_create"), "indent" : (4, "number of ident spaces for output python payload, e.g: 0|4|8"), "ansicolor" : ("on", "enable/disable colorized output, e.g: on|off"), "pagesize" : (25, "number of lines to display per page, 0 = disable paging"), "session" : ("peda-session-#FILENAME#.txt", "target file to save peda session"), "tracedepth": (0, "max depth for calls/instructions tracing, 0 means no limit"), "tracelog" : ("peda-trace-#FILENAME#.txt", "target file to save tracecall output"), "crashlog" : ("peda-crashdump-#FILENAME#.txt", "target file to save crash dump of fuzzing"), "snapshot" : ("peda-snapshot-#FILENAME#.raw", "target file to save crash dump of fuzzing"), "autosave" : ("on", "auto saving peda session, e.g: on|off"), "payload" : ("peda-payload-#FILENAME#.txt", "target file to save output of payload command"), "context" : ("register,code,stack", "context display setting, e.g: register, code, stack, all"), "verbose" : ("off", "show detail execution of commands, e.g: on|off"), "debug" : ("off", "show detail error of peda commands, e.g: on|off"), "_teefd" : ("", "internal use only for tracelog/crashlog writing") } ## END OF SETTINGS ## class Option(object): """ Class to access global options of PEDA commands and functions TODO: save/load option to/from file """ options = OPTIONS.copy() def __init__(self): """option format: name = (value, 'help message')""" pass @staticmethod def reset(): """reset to default options""" Option.options = OPTIONS.copy() return True @staticmethod def show(name=""): """display options""" result = {} for opt in Option.options: if name in opt and not opt.startswith("_"): result[opt] = Option.options[opt][0] return result @staticmethod def get(name): """get option""" if name in Option.options: return Option.options[name][0] else: return None @staticmethod def set(name, value): """set option""" if name in Option.options: Option.options[name] = (value, Option.options[name][1]) return True else: return False @staticmethod def help(name=""): """display help info of options""" result = {} for opt in Option.options: if name in opt and not opt.startswith("_"): result[opt] = Option.options[opt][1] return result
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.document_loaders.parsers.pdf import ( AmazonTextractPDFParser, DocumentIntelligenceParser, PDFMinerParser, PDFPlumberParser, PyMuPDFParser, PyPDFium2Parser, PyPDFParser, extract_from_images_with_rapidocr, ) # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DEPRECATED_LOOKUP = { "extract_from_images_with_rapidocr": ( "langchain_community.document_loaders.parsers.pdf" ), "PyPDFParser": "langchain_community.document_loaders.parsers.pdf", "PDFMinerParser": "langchain_community.document_loaders.parsers.pdf", "PyMuPDFParser": "langchain_community.document_loaders.parsers.pdf", "PyPDFium2Parser": "langchain_community.document_loaders.parsers.pdf", "PDFPlumberParser": "langchain_community.document_loaders.parsers.pdf", "AmazonTextractPDFParser": "langchain_community.document_loaders.parsers.pdf", "DocumentIntelligenceParser": "langchain_community.document_loaders.parsers.pdf", } _import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP) def __getattr__(name: str) -> Any: """Look up attributes dynamically.""" return _import_attribute(name) __all__ = [ "AmazonTextractPDFParser", "DocumentIntelligenceParser", "PDFMinerParser", "PDFPlumberParser", "PyMuPDFParser", "PyPDFParser", "PyPDFium2Parser", "extract_from_images_with_rapidocr", ]
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/document_loaders/parsers/pdf.py
#!/usr/bin/python # Copyright (c) 2016 Hewlett-Packard Enterprise Corporation # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: os_project_facts short_description: Retrieve facts about one or more OpenStack projects extends_documentation_fragment: openstack version_added: "2.1" author: "Ricardo Carrillo Cruz (@rcarrillocruz)" description: - Retrieve facts about a one or more OpenStack projects requirements: - "python >= 2.7" - "openstacksdk" options: name: description: - Name or ID of the project required: true domain: description: - Name or ID of the domain containing the project if the cloud supports domains filters: description: - A dictionary of meta data to use for further filtering. Elements of this dictionary may be additional dictionaries. availability_zone: description: - Ignored. Present for backwards compatibility ''' EXAMPLES = ''' # Gather facts about previously created projects - os_project_facts: cloud: awesomecloud - debug: var: openstack_projects # Gather facts about a previously created project by name - os_project_facts: cloud: awesomecloud name: demoproject - debug: var: openstack_projects # Gather facts about a previously created project in a specific domain - os_project_facts: cloud: awesomecloud name: demoproject domain: admindomain - debug: var: openstack_projects # Gather facts about a previously created project in a specific domain with filter - os_project_facts: cloud: awesomecloud name: demoproject domain: admindomain filters: enabled: False - debug: var: openstack_projects ''' RETURN = ''' openstack_projects: description: has all the OpenStack facts about projects returned: always, but can be null type: complex contains: id: description: Unique UUID. returned: success type: string name: description: Name given to the project. returned: success type: string description: description: Description of the project returned: success type: string enabled: description: Flag to indicate if the project is enabled returned: success type: bool domain_id: description: Domain ID containing the project (keystone v3 clouds only) returned: success type: bool ''' from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.openstack import openstack_full_argument_spec, openstack_cloud_from_module def main(): argument_spec = openstack_full_argument_spec( name=dict(required=False, default=None), domain=dict(required=False, default=None), filters=dict(required=False, type='dict', default=None), ) module = AnsibleModule(argument_spec) sdk, opcloud = openstack_cloud_from_module(module) try: name = module.params['name'] domain = module.params['domain'] filters = module.params['filters'] if domain: try: # We assume admin is passing domain id dom = opcloud.get_domain(domain)['id'] domain = dom except: # If we fail, maybe admin is passing a domain name. # Note that domains have unique names, just like id. dom = opcloud.search_domains(filters={'name': domain}) if dom: domain = dom[0]['id'] else: module.fail_json(msg='Domain name or ID does not exist') if not filters: filters = {} filters['domain_id'] = domain projects = opcloud.search_projects(name, filters) module.exit_json(changed=False, ansible_facts=dict( openstack_projects=projects)) except sdk.exceptions.OpenStackCloudException as e: module.fail_json(msg=str(e)) if __name__ == '__main__': main()
unknown
codeparrot/codeparrot-clean
package container // Mount contains information for a mount operation. type Mount struct { Source string `json:"source"` Destination string `json:"destination"` Writable bool `json:"writable"` }
go
github
https://github.com/moby/moby
daemon/container/mounts_windows.go
import os import pygame import sys from diamond_game.model.models import Board import Queue def main(): pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("test.png") ballrect = ball.get_rect() while 1: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() ballrect = ballrect.move(speed) if ballrect.left < 0 or ballrect.right > width: speed[0] = -speed[0] if ballrect.top < 0 or ballrect.bottom > height: speed[1] = -speed[1] screen.fill(black) screen.blit(ball, ballrect) pygame.display.flip() a = Queue.Queue(0) a.put(1) a.put(1) a.put(1) a.put(1) def geta(): if not a.empty(): return a.get() if __name__ == "__main__": x = 5 for i in range(5): print 1 board = Board() board.make_board() board.init_board() board.print_board() print -x for file in os.listdir("sounds"): fullname = os.path.join('sounds', file) print fullname event = geta() print event while event is not None: print event event = geta() print 5/2 li = [1,2,3,4] print li[234231] li = [] # main()
unknown
codeparrot/codeparrot-clean
import uuid from datetime import datetime import hmac from base64 import b64encode from django.conf import settings from django.utils import timezone from zeep import Client, xsd from agir.payments.models import Subscription from agir.system_pay import SystemPayError from agir.system_pay.utils import get_recurrence_rule client = Client("https://paiement.systempay.fr/vads-ws/v5?wsdl") header_namespace = "{http://v5.ws.vads.lyra.com/Header/}" prefix_namespace = "{http://v5.ws.vads.lyra.com/}" cancel_subscription_type = client.get_type(prefix_namespace + "cancelSubscription") common_request_type = client.get_type(prefix_namespace + "commonRequest") query_request_type = client.get_type(prefix_namespace + "queryRequest") order_request_type = client.get_type(prefix_namespace + "orderRequest") card_request_type = client.get_type(prefix_namespace + "cardRequest") subscription_request_type = client.get_type(prefix_namespace + "subscriptionRequest") class SystemPaySoapClient: def __init__(self, sp_config): self.sp_config = sp_config def _get_header(self): headers = list() request_id = str(uuid.uuid4()) timestamp = datetime.utcnow().replace(microsecond=0).isoformat() + "Z" elements = { "shopId": self.sp_config["site_id"], "requestId": request_id, "timestamp": timestamp, "mode": "PRODUCTION" if self.sp_config["production"] else "TEST", "authToken": b64encode( hmac.digest( self.sp_config["certificate"].encode(), (request_id + timestamp).encode(), "sha256", ) ).decode(), } for elem in elements: header = xsd.ComplexType( [xsd.Element(header_namespace + elem, xsd.String())] ) headers.append(header(**{elem: elements[elem]})) return headers def cancel_alias(self, alias): res = client.service.cancelToken( _soapheaders=self._get_header(), commonRequest=common_request_type(), queryRequest=query_request_type(paymentToken=alias.identifier.hex), ) if res["commonResponse"]["responseCode"] > 0: raise SystemPayError(res["commonResponse"]["responseCodeDetail"]) def cancel_subscription(self, subscription): system_pay_subscription = subscription.system_pay_subscription alias = system_pay_subscription.alias res = client.service.cancelSubscription( _soapheaders=self._get_header(), commonRequest=common_request_type(), queryRequest=query_request_type( paymentToken=alias.identifier.hex, subscriptionId=system_pay_subscription.identifier, ), ) if res["commonResponse"]["responseCode"] > 0: raise SystemPayError( res["commonResponse"]["responseCodeDetail"], system_pay_code=res["commonResponse"]["responseCode"], ) def get_subscription_details(self, subscription): system_pay_subscription = subscription.system_pay_subscription alias = system_pay_subscription.alias res = client.service.getSubscriptionDetails( _soapheaders=self._get_header(), queryRequest=query_request_type( paymentToken=alias.identifier.hex, subscriptionId=system_pay_subscription.identifier, ), ) if res["commonResponse"]["responseCode"] > 0: raise SystemPayError( res["commonResponse"]["responseCodeDetail"], system_pay_code=res["commonResponse"]["responseCode"], ) return { "orderId": res["orderResponse"]["orderId"], **res["subscriptionResponse"], } def create_subscription(self, subscription, alias): """ Crée une souscription côté SystemPay et renvoie l'identifiant de souscription SystemPay correspondant :param subscription: L'objet souscription pour lequel il faut créer la souscription :param alias: L'alias pour lequel il faut créer cette souscription :return: L'identifiant de souscription côté SystemPay """ if subscription.status != Subscription.STATUS_WAITING: raise ValueError("La souscription doit être en attente.") if not alias.active: raise ValueError("L'alias doit être actif.") res = client.service.createSubscription( _soapheaders=self._get_header(), commonRequest=common_request_type(), orderRequest=order_request_type(order_id=f"S{subscription.id}"), subscriptionRequest=subscription_request_type( effectDate=(timezone.now() + timezone.timedelta(hours=2)).strftime( "%Y-%m-%dT%H:%M:%SZ" ), amount=subscription.price, currency=settings.SYSTEMPAY_CURRENCY, initialAmount=None, initialAmountNumber=0, rrule=get_recurrence_rule(subscription), ), cardRequest=card_request_type(paymentToken=alias.identifier.hex), ) if res["commonResponse"]["responseCode"] > 0: raise SystemPayError( res["commonResponse"]["responseCodeDetail"], system_pay_code=res["commonResponse"]["responseCode"], ) return res["subscriptionResponse"]["subscriptionId"]
unknown
codeparrot/codeparrot-clean
import logging import os import re import shlex import subprocess import sys from time import sleep from streamlink_cli.compat import is_win32, stdout from streamlink_cli.constants import PLAYER_ARGS_INPUT_DEFAULT, PLAYER_ARGS_INPUT_FALLBACK, SUPPORTED_PLAYERS from streamlink_cli.utils import ignored if is_win32: import msvcrt log = logging.getLogger("streamlink.cli.output") class Output: def __init__(self): self.opened = False def open(self): self._open() self.opened = True def close(self): if self.opened: self._close() self.opened = False def write(self, data): if not self.opened: raise OSError("Output is not opened") return self._write(data) def _open(self): pass def _close(self): pass def _write(self, data): pass class FileOutput(Output): def __init__(self, filename=None, fd=None, record=None): super().__init__() self.filename = filename self.fd = fd self.record = record def _open(self): if self.filename: self.fd = open(self.filename, "wb") if self.record: self.record.open() if is_win32: msvcrt.setmode(self.fd.fileno(), os.O_BINARY) def _close(self): if self.fd is not stdout: self.fd.close() if self.record: self.record.close() def _write(self, data): self.fd.write(data) if self.record: self.record.write(data) class PlayerOutput(Output): PLAYER_TERMINATE_TIMEOUT = 10.0 _re_player_args_input = re.compile("|".join(map( lambda const: re.escape(f"{{{const}}}"), [PLAYER_ARGS_INPUT_DEFAULT, PLAYER_ARGS_INPUT_FALLBACK] ))) def __init__(self, cmd, args="", filename=None, quiet=True, kill=True, call=False, http=None, namedpipe=None, record=None, title=None): super().__init__() self.cmd = cmd self.args = args self.kill = kill self.call = call self.quiet = quiet self.filename = filename self.namedpipe = namedpipe self.http = http self.title = title self.player = None self.player_name = self.supported_player(self.cmd) self.record = record if self.namedpipe or self.filename or self.http: self.stdin = sys.stdin else: self.stdin = subprocess.PIPE if self.quiet: self.stdout = open(os.devnull, "w") self.stderr = open(os.devnull, "w") else: self.stdout = sys.stdout self.stderr = sys.stderr if not self._re_player_args_input.search(self.args): self.args += f"{' ' if self.args else ''}{{{PLAYER_ARGS_INPUT_DEFAULT}}}" @property def running(self): sleep(0.5) return self.player.poll() is None @classmethod def supported_player(cls, cmd): """ Check if the current player supports adding a title :param cmd: command to test :return: name of the player|None """ if not is_win32: # under a POSIX system use shlex to find the actual command # under windows this is not an issue because executables end in .exe cmd = shlex.split(cmd)[0] cmd = os.path.basename(cmd.lower()) for player, possiblecmds in SUPPORTED_PLAYERS.items(): for possiblecmd in possiblecmds: if cmd.startswith(possiblecmd): return player @classmethod def _mpv_title_escape(cls, title_string): # mpv has a "disable property-expansion" token which must be handled # in order to accurately represent $$ in title if r'\$>' in title_string: processed_title = "" double_dollars = True i = dollars = 0 while i < len(title_string): if double_dollars: if title_string[i] == "\\": if title_string[i + 1] == "$": processed_title += "$" dollars += 1 i += 1 if title_string[i + 1] == ">" and dollars % 2 == 1: double_dollars = False processed_title += ">" i += 1 else: processed_title += "\\" elif title_string[i] == "$": processed_title += "$$" else: dollars = 0 processed_title += title_string[i] else: if title_string[i:i + 2] == "\\$": processed_title += "$" i += 1 else: processed_title += title_string[i] i += 1 return processed_title else: # not possible for property-expansion to be disabled, happy days return title_string.replace("$", "$$").replace(r'\$$', "$") def _create_arguments(self): if self.namedpipe: filename = self.namedpipe.path if is_win32: if self.player_name == "vlc": filename = f"stream://\\{filename}" elif self.player_name == "mpv": filename = f"file://{filename}" elif self.filename: filename = self.filename elif self.http: filename = self.http.url else: filename = "-" extra_args = [] if self.title is not None: # vlc if self.player_name == "vlc": # see https://wiki.videolan.org/Documentation:Format_String/, allow escaping with \$ self.title = self.title.replace("$", "$$").replace(r'\$$', "$") extra_args.extend(["--input-title-format", self.title]) # mpv if self.player_name == "mpv": # see https://mpv.io/manual/stable/#property-expansion, allow escaping with \$, respect mpv's $> self.title = self._mpv_title_escape(self.title) extra_args.append(f"--force-media-title={self.title}") # potplayer if self.player_name == "potplayer": if filename != "-": # PotPlayer - About - Command Line # You can specify titles for URLs by separating them with a backslash (\) at the end of URLs. # eg. "http://...\title of this url" self.title = self.title.replace('"', '') filename = filename[:-1] + '\\' + self.title + filename[-1] args = self.args.format(**{PLAYER_ARGS_INPUT_DEFAULT: filename, PLAYER_ARGS_INPUT_FALLBACK: filename}) cmd = self.cmd # player command if is_win32: eargs = subprocess.list2cmdline(extra_args) # do not insert and extra " " when there are no extra_args return " ".join([cmd] + ([eargs] if eargs else []) + [args]) return shlex.split(cmd) + extra_args + shlex.split(args) def _open(self): try: if self.record: self.record.open() if self.call and self.filename: self._open_call() else: self._open_subprocess() finally: if self.quiet: # Output streams no longer needed in parent process self.stdout.close() self.stderr.close() def _open_call(self): args = self._create_arguments() if is_win32: fargs = args else: fargs = subprocess.list2cmdline(args) log.debug(f"Calling: {fargs}") subprocess.call(args, stdout=self.stdout, stderr=self.stderr) def _open_subprocess(self): # Force bufsize=0 on all Python versions to avoid writing the # unflushed buffer when closing a broken input pipe args = self._create_arguments() if is_win32: fargs = args else: fargs = subprocess.list2cmdline(args) log.debug(f"Opening subprocess: {fargs}") self.player = subprocess.Popen(args, stdin=self.stdin, bufsize=0, stdout=self.stdout, stderr=self.stderr) # Wait 0.5 seconds to see if program exited prematurely if not self.running: raise OSError("Process exited prematurely") if self.namedpipe: self.namedpipe.open() elif self.http: self.http.open() def _close(self): # Close input to the player first to signal the end of the # stream and allow the player to terminate of its own accord if self.namedpipe: self.namedpipe.close() elif self.http: self.http.close() elif not self.filename: self.player.stdin.close() if self.record: self.record.close() if self.kill: with ignored(Exception): self.player.terminate() if not is_win32: t, timeout = 0.0, self.PLAYER_TERMINATE_TIMEOUT while self.player.poll() is None and t < timeout: sleep(0.5) t += 0.5 if not self.player.returncode: self.player.kill() self.player.wait() def _write(self, data): if self.record: self.record.write(data) if self.namedpipe: self.namedpipe.write(data) elif self.http: self.http.write(data) else: self.player.stdin.write(data) __all__ = ["PlayerOutput", "FileOutput"]
unknown
codeparrot/codeparrot-clean
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha1 import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubectrlmgrconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1" ) // RecommendedDefaultHPAControllerConfiguration defaults a pointer to a // HPAControllerConfiguration struct. This will set the recommended default // values, but they may be subject to change between API versions. This function // is intentionally not registered in the scheme as a "normal" `SetDefaults_Foo` // function to allow consumers of this type to set whatever defaults for their // embedded configs. Forcing consumers to use these defaults would be problematic // as defaulting in the scheme is done as part of the conversion, and there would // be no easy way to opt-out. Instead, if you want to use this defaulting method // run it in your wrapper struct of this type in its `SetDefaults_` method. func RecommendedDefaultHPAControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.HPAControllerConfiguration) { zero := metav1.Duration{} if obj.ConcurrentHorizontalPodAutoscalerSyncs == 0 { obj.ConcurrentHorizontalPodAutoscalerSyncs = 5 } if obj.HorizontalPodAutoscalerSyncPeriod == zero { obj.HorizontalPodAutoscalerSyncPeriod = metav1.Duration{Duration: 15 * time.Second} } if obj.HorizontalPodAutoscalerDownscaleStabilizationWindow == zero { obj.HorizontalPodAutoscalerDownscaleStabilizationWindow = metav1.Duration{Duration: 5 * time.Minute} } if obj.HorizontalPodAutoscalerCPUInitializationPeriod == zero { obj.HorizontalPodAutoscalerCPUInitializationPeriod = metav1.Duration{Duration: 5 * time.Minute} } if obj.HorizontalPodAutoscalerInitialReadinessDelay == zero { obj.HorizontalPodAutoscalerInitialReadinessDelay = metav1.Duration{Duration: 30 * time.Second} } if obj.HorizontalPodAutoscalerTolerance == 0 { obj.HorizontalPodAutoscalerTolerance = 0.1 } }
go
github
https://github.com/kubernetes/kubernetes
pkg/controller/podautoscaler/config/v1alpha1/defaults.go
from decimal import Decimal _ = lambda x:x #from i18n import _ from electrum import WalletStorage, Wallet from electrum.util import format_satoshis, set_verbosity from electrum.bitcoin import is_valid, COIN, TYPE_ADDRESS from electrum.network import filter_protocol import sys, getpass, datetime # minimal fdisk like gui for console usage # written by rofl0r, with some bits stolen from the text gui (ncurses) class ElectrumGui: def __init__(self, config, daemon, plugins): self.config = config self.network = daemon.network storage = WalletStorage(config.get_wallet_path()) if not storage.file_exists: print "Wallet not found. try 'electrum create'" exit() if storage.is_encrypted(): password = getpass.getpass('Password:', stream=None) storage.decrypt(password) self.done = 0 self.last_balance = "" set_verbosity(False) self.str_recipient = "" self.str_description = "" self.str_amount = "" self.str_fee = "" self.wallet = Wallet(storage) self.wallet.start_threads(self.network) self.contacts = self.wallet.contacts self.network.register_callback(self.on_network, ['updated', 'banner']) self.commands = [_("[h] - displays this help text"), \ _("[i] - display transaction history"), \ _("[o] - enter payment order"), \ _("[p] - print stored payment order"), \ _("[s] - send stored payment order"), \ _("[r] - show own receipt addresses"), \ _("[c] - display contacts"), \ _("[b] - print server banner"), \ _("[q] - quit") ] self.num_commands = len(self.commands) def on_network(self, event, *args): if event == 'updated': self.updated() elif event == 'banner': self.print_banner() def main_command(self): self.print_balance() c = raw_input("enter command: ") if c == "h" : self.print_commands() elif c == "i" : self.print_history() elif c == "o" : self.enter_order() elif c == "p" : self.print_order() elif c == "s" : self.send_order() elif c == "r" : self.print_addresses() elif c == "c" : self.print_contacts() elif c == "b" : self.print_banner() elif c == "n" : self.network_dialog() elif c == "e" : self.settings_dialog() elif c == "q" : self.done = 1 else: self.print_commands() def updated(self): s = self.get_balance() if s != self.last_balance: print(s) self.last_balance = s return True def print_commands(self): self.print_list(self.commands, "Available commands") def print_history(self): width = [20, 40, 14, 14] delta = (80 - sum(width) - 4)/3 format_str = "%"+"%d"%width[0]+"s"+"%"+"%d"%(width[1]+delta)+"s"+"%" \ + "%d"%(width[2]+delta)+"s"+"%"+"%d"%(width[3]+delta)+"s" b = 0 messages = [] for item in self.wallet.get_history(): tx_hash, confirmations, value, timestamp, balance = item if confirmations: try: time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3] except Exception: time_str = "unknown" else: time_str = 'unconfirmed' label = self.wallet.get_label(tx_hash) messages.append( format_str%( time_str, label, format_satoshis(value, whitespaces=True), format_satoshis(balance, whitespaces=True) ) ) self.print_list(messages[::-1], format_str%( _("Date"), _("Description"), _("Amount"), _("Balance"))) def print_balance(self): print(self.get_balance()) def get_balance(self): if self.wallet.network.is_connected(): if not self.wallet.up_to_date: msg = _( "Synchronizing..." ) else: c, u, x = self.wallet.get_balance() msg = _("Balance")+": %f "%(Decimal(c) / COIN) if u: msg += " [%f unconfirmed]"%(Decimal(u) / COIN) if x: msg += " [%f unmatured]"%(Decimal(x) / COIN) else: msg = _( "Not connected" ) return(msg) def print_contacts(self): messages = map(lambda x: "%20s %45s "%(x[0], x[1][1]), self.contacts.items()) self.print_list(messages, "%19s %25s "%("Key", "Value")) def print_addresses(self): messages = map(lambda addr: "%30s %30s "%(addr, self.wallet.labels.get(addr,"")), self.wallet.get_addresses()) self.print_list(messages, "%19s %25s "%("Address", "Label")) def print_order(self): print("send order to " + self.str_recipient + ", amount: " + self.str_amount \ + "\nfee: " + self.str_fee + ", desc: " + self.str_description) def enter_order(self): self.str_recipient = raw_input("Pay to: ") self.str_description = raw_input("Description : ") self.str_amount = raw_input("Amount: ") self.str_fee = raw_input("Fee: ") def send_order(self): self.do_send() def print_banner(self): for i, x in enumerate( self.wallet.network.banner.split('\n') ): print( x ) def print_list(self, list, firstline): self.maxpos = len(list) if not self.maxpos: return print(firstline) for i in range(self.maxpos): msg = list[i] if i < len(list) else "" print(msg) def main(self): while self.done == 0: self.main_command() def do_send(self): if not is_valid(self.str_recipient): print(_('Invalid Bitcoin address')) return try: amount = int(Decimal(self.str_amount) * COIN) except Exception: print(_('Invalid Amount')) return try: fee = int(Decimal(self.str_fee) * COIN) except Exception: print(_('Invalid Fee')) return if self.wallet.use_encryption: password = self.password_dialog() if not password: return else: password = None c = "" while c != "y": c = raw_input("ok to send (y/n)?") if c == "n": return try: tx = self.wallet.mktx([(TYPE_ADDRESS, self.str_recipient, amount)], password, self.config, fee) except Exception as e: print(str(e)) return if self.str_description: self.wallet.labels[tx.hash()] = self.str_description print(_("Please wait...")) status, msg = self.network.broadcast(tx) if status: print(_('Payment sent.')) #self.do_clear() #self.update_contacts_tab() else: print(_('Error')) def network_dialog(self): print("use 'electrum setconfig server/proxy' to change your network settings") return True def settings_dialog(self): print("use 'electrum setconfig' to change your settings") return True def password_dialog(self): return getpass.getpass() # XXX unused def run_receive_tab(self, c): #if c == 10: # out = self.run_popup('Address', ["Edit label", "Freeze", "Prioritize"]) return def run_contacts_tab(self, c): pass
unknown
codeparrot/codeparrot-clean
""" ========================================= Comparison of Manifold Learning methods ========================================= An illustration of dimensionality reduction on the S-curve dataset with various manifold learning methods. For a discussion and comparison of these algorithms, see the :ref:`manifold module page <manifold>` For a similar example, where the methods are applied to a sphere dataset, see :ref:`sphx_glr_auto_examples_manifold_plot_manifold_sphere.py` Note that the purpose of the MDS is to find a low-dimensional representation of the data (here 2D) in which the distances respect well the distances in the original high-dimensional space, unlike other manifold-learning algorithms, it does not seeks an isotropic representation of the data in the low-dimensional space. """ # Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause # %% # Dataset preparation # ------------------- # # We start by generating the S-curve dataset. import matplotlib.pyplot as plt # unused but required import for doing 3d projections with matplotlib < 3.2 import mpl_toolkits.mplot3d # noqa: F401 from matplotlib import ticker from sklearn import datasets, manifold n_samples = 1500 S_points, S_color = datasets.make_s_curve(n_samples, random_state=0) # %% # Let's look at the original data. Also define some helping # functions, which we will use further on. def plot_3d(points, points_color, title): x, y, z = points.T fig, ax = plt.subplots( figsize=(6, 6), facecolor="white", tight_layout=True, subplot_kw={"projection": "3d"}, ) fig.suptitle(title, size=16) col = ax.scatter(x, y, z, c=points_color, s=50, alpha=0.8) ax.view_init(azim=-60, elev=9) ax.xaxis.set_major_locator(ticker.MultipleLocator(1)) ax.yaxis.set_major_locator(ticker.MultipleLocator(1)) ax.zaxis.set_major_locator(ticker.MultipleLocator(1)) fig.colorbar(col, ax=ax, orientation="horizontal", shrink=0.6, aspect=60, pad=0.01) plt.show() def plot_2d(points, points_color, title): fig, ax = plt.subplots(figsize=(3, 3), facecolor="white", constrained_layout=True) fig.suptitle(title, size=16) add_2d_scatter(ax, points, points_color) plt.show() def add_2d_scatter(ax, points, points_color, title=None): x, y = points.T ax.scatter(x, y, c=points_color, s=50, alpha=0.8) ax.set_title(title) ax.xaxis.set_major_formatter(ticker.NullFormatter()) ax.yaxis.set_major_formatter(ticker.NullFormatter()) plot_3d(S_points, S_color, "Original S-curve samples") # %% # Define algorithms for the manifold learning # ------------------------------------------- # # Manifold learning is an approach to non-linear dimensionality reduction. # Algorithms for this task are based on the idea that the dimensionality of # many data sets is only artificially high. # # Read more in the :ref:`User Guide <manifold>`. n_neighbors = 12 # neighborhood which is used to recover the locally linear structure n_components = 2 # number of coordinates for the manifold # %% # Locally Linear Embeddings # ^^^^^^^^^^^^^^^^^^^^^^^^^ # # Locally linear embedding (LLE) can be thought of as a series of local # Principal Component Analyses which are globally compared to find the # best non-linear embedding. # Read more in the :ref:`User Guide <locally_linear_embedding>`. params = { "n_neighbors": n_neighbors, "n_components": n_components, "eigen_solver": "auto", "random_state": 0, } lle_standard = manifold.LocallyLinearEmbedding(method="standard", **params) S_standard = lle_standard.fit_transform(S_points) lle_ltsa = manifold.LocallyLinearEmbedding(method="ltsa", **params) S_ltsa = lle_ltsa.fit_transform(S_points) lle_hessian = manifold.LocallyLinearEmbedding(method="hessian", **params) S_hessian = lle_hessian.fit_transform(S_points) lle_mod = manifold.LocallyLinearEmbedding(method="modified", **params) S_mod = lle_mod.fit_transform(S_points) # %% fig, axs = plt.subplots( nrows=2, ncols=2, figsize=(7, 7), facecolor="white", constrained_layout=True ) fig.suptitle("Locally Linear Embeddings", size=16) lle_methods = [ ("Standard locally linear embedding", S_standard), ("Local tangent space alignment", S_ltsa), ("Hessian eigenmap", S_hessian), ("Modified locally linear embedding", S_mod), ] for ax, method in zip(axs.flat, lle_methods): name, points = method add_2d_scatter(ax, points, S_color, name) plt.show() # %% # Isomap Embedding # ^^^^^^^^^^^^^^^^ # # Non-linear dimensionality reduction through Isometric Mapping. # Isomap seeks a lower-dimensional embedding which maintains geodesic # distances between all points. Read more in the :ref:`User Guide <isomap>`. isomap = manifold.Isomap(n_neighbors=n_neighbors, n_components=n_components, p=1) S_isomap = isomap.fit_transform(S_points) plot_2d(S_isomap, S_color, "Isomap Embedding") # %% # Multidimensional scaling # ^^^^^^^^^^^^^^^^^^^^^^^^ # # Multidimensional scaling (MDS) seeks a low-dimensional representation # of the data in which the distances respect well the distances in the # original high-dimensional space. # Read more in the :ref:`User Guide <multidimensional_scaling>`. md_scaling = manifold.MDS( n_components=n_components, max_iter=50, n_init=1, random_state=0, init="classical_mds", normalized_stress=False, ) S_scaling_metric = md_scaling.fit_transform(S_points) md_scaling_nonmetric = manifold.MDS( n_components=n_components, max_iter=50, n_init=1, random_state=0, normalized_stress=False, metric_mds=False, init="classical_mds", ) S_scaling_nonmetric = md_scaling_nonmetric.fit_transform(S_points) md_scaling_classical = manifold.ClassicalMDS(n_components=n_components) S_scaling_classical = md_scaling_classical.fit_transform(S_points) # %% fig, axs = plt.subplots( nrows=1, ncols=3, figsize=(7, 3.5), facecolor="white", constrained_layout=True ) fig.suptitle("Multidimensional scaling", size=16) mds_methods = [ ("Metric MDS", S_scaling_metric), ("Non-metric MDS", S_scaling_nonmetric), ("Classical MDS", S_scaling_classical), ] for ax, method in zip(axs.flat, mds_methods): name, points = method add_2d_scatter(ax, points, S_color, name) plt.show() # %% # Spectral embedding for non-linear dimensionality reduction # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # # This implementation uses Laplacian Eigenmaps, which finds a low dimensional # representation of the data using a spectral decomposition of the graph Laplacian. # Read more in the :ref:`User Guide <spectral_embedding>`. spectral = manifold.SpectralEmbedding( n_components=n_components, n_neighbors=n_neighbors, random_state=42 ) S_spectral = spectral.fit_transform(S_points) plot_2d(S_spectral, S_color, "Spectral Embedding") # %% # T-distributed Stochastic Neighbor Embedding # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # # It converts similarities between data points to joint probabilities and # tries to minimize the Kullback-Leibler divergence between the joint probabilities # of the low-dimensional embedding and the high-dimensional data. t-SNE has a cost # function that is not convex, i.e. with different initializations we can get # different results. Read more in the :ref:`User Guide <t_sne>`. t_sne = manifold.TSNE( n_components=n_components, perplexity=30, init="random", max_iter=250, random_state=0, ) S_t_sne = t_sne.fit_transform(S_points) plot_2d(S_t_sne, S_color, "T-distributed Stochastic \n Neighbor Embedding") # %%
python
github
https://github.com/scikit-learn/scikit-learn
examples/manifold/plot_compare_methods.py
'use strict'; import AxiosError from '../core/AxiosError.js'; import parseProtocol from './parseProtocol.js'; import platform from '../platform/index.js'; const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; /** * Parse data uri to a Buffer or Blob * * @param {String} uri * @param {?Boolean} asBlob * @param {?Object} options * @param {?Function} options.Blob * * @returns {Buffer|Blob} */ export default function fromDataURI(uri, asBlob, options) { const _Blob = options && options.Blob || platform.classes.Blob; const protocol = parseProtocol(uri); if (asBlob === undefined && _Blob) { asBlob = true; } if (protocol === 'data') { uri = protocol.length ? uri.slice(protocol.length + 1) : uri; const match = DATA_URL_PATTERN.exec(uri); if (!match) { throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL); } const mime = match[1]; const isBase64 = match[2]; const body = match[3]; const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8'); if (asBlob) { if (!_Blob) { throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT); } return new _Blob([buffer], {type: mime}); } return buffer; } throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT); }
javascript
github
https://github.com/axios/axios
lib/helpers/fromDataURI.js
"""Import hook support. Consistent use of this module will make it possible to change the different mechanisms involved in loading modules independently. While the built-in module imp exports interfaces to the built-in module searching and loading algorithm, and it is possible to replace the built-in function __import__ in order to change the semantics of the import statement, until now it has been difficult to combine the effect of different __import__ hacks, like loading modules from URLs by rimport.py, or restricted execution by rexec.py. This module defines three new concepts: 1) A "file system hooks" class provides an interface to a filesystem. One hooks class is defined (Hooks), which uses the interface provided by standard modules os and os.path. It should be used as the base class for other hooks classes. 2) A "module loader" class provides an interface to search for a module in a search path and to load it. It defines a method which searches for a module in a single directory; by overriding this method one can redefine the details of the search. If the directory is None, built-in and frozen modules are searched instead. Two module loader class are defined, both implementing the search strategy used by the built-in __import__ function: ModuleLoader uses the imp module's find_module interface, while HookableModuleLoader uses a file system hooks class to interact with the file system. Both use the imp module's load_* interfaces to actually load the module. 3) A "module importer" class provides an interface to import a module, as well as interfaces to reload and unload a module. It also provides interfaces to install and uninstall itself instead of the default __import__ and reload (and unload) functions. One module importer class is defined (ModuleImporter), which uses a module loader instance passed in (by default HookableModuleLoader is instantiated). The classes defined here should be used as base classes for extended functionality along those lines. If a module importer class supports dotted names, its import_module() must return a different value depending on whether it is called on behalf of a "from ... import ..." statement or not. (This is caused by the way the __import__ hook is used by the Python interpreter.) It would also do wise to install a different version of reload(). """ from warnings import warnpy3k, warn warnpy3k("the ihooks module has been removed in Python 3.0", stacklevel=2) del warnpy3k import __builtin__ import imp import os import sys __all__ = ["BasicModuleLoader","Hooks","ModuleLoader","FancyModuleLoader", "BasicModuleImporter","ModuleImporter","install","uninstall"] VERBOSE = 0 from imp import C_EXTENSION, PY_SOURCE, PY_COMPILED from imp import C_BUILTIN, PY_FROZEN, PKG_DIRECTORY BUILTIN_MODULE = C_BUILTIN FROZEN_MODULE = PY_FROZEN class _Verbose: def __init__(self, verbose = VERBOSE): self.verbose = verbose def get_verbose(self): return self.verbose def set_verbose(self, verbose): self.verbose = verbose # XXX The following is an experimental interface def note(self, *args): if self.verbose: self.message(*args) def message(self, format, *args): if args: print format%args else: print format class BasicModuleLoader(_Verbose): """Basic module loader. This provides the same functionality as built-in import. It doesn't deal with checking sys.modules -- all it provides is find_module() and a load_module(), as well as find_module_in_dir() which searches just one directory, and can be overridden by a derived class to change the module search algorithm when the basic dependency on sys.path is unchanged. The interface is a little more convenient than imp's: find_module(name, [path]) returns None or 'stuff', and load_module(name, stuff) loads the module. """ def find_module(self, name, path = None): if path is None: path = [None] + self.default_path() for dir in path: stuff = self.find_module_in_dir(name, dir) if stuff: return stuff return None def default_path(self): return sys.path def find_module_in_dir(self, name, dir): if dir is None: return self.find_builtin_module(name) else: try: return imp.find_module(name, [dir]) except ImportError: return None def find_builtin_module(self, name): # XXX frozen packages? if imp.is_builtin(name): return None, '', ('', '', BUILTIN_MODULE) if imp.is_frozen(name): return None, '', ('', '', FROZEN_MODULE) return None def load_module(self, name, stuff): file, filename, info = stuff try: return imp.load_module(name, file, filename, info) finally: if file: file.close() class Hooks(_Verbose): """Hooks into the filesystem and interpreter. By deriving a subclass you can redefine your filesystem interface, e.g. to merge it with the URL space. This base class behaves just like the native filesystem. """ # imp interface def get_suffixes(self): return imp.get_suffixes() def new_module(self, name): return imp.new_module(name) def is_builtin(self, name): return imp.is_builtin(name) def init_builtin(self, name): return imp.init_builtin(name) def is_frozen(self, name): return imp.is_frozen(name) def init_frozen(self, name): return imp.init_frozen(name) def get_frozen_object(self, name): return imp.get_frozen_object(name) def load_source(self, name, filename, file=None): return imp.load_source(name, filename, file) def load_compiled(self, name, filename, file=None): return imp.load_compiled(name, filename, file) def load_dynamic(self, name, filename, file=None): return imp.load_dynamic(name, filename, file) def load_package(self, name, filename, file=None): return imp.load_module(name, file, filename, ("", "", PKG_DIRECTORY)) def add_module(self, name): d = self.modules_dict() if name in d: return d[name] d[name] = m = self.new_module(name) return m # sys interface def modules_dict(self): return sys.modules def default_path(self): return sys.path def path_split(self, x): return os.path.split(x) def path_join(self, x, y): return os.path.join(x, y) def path_isabs(self, x): return os.path.isabs(x) # etc. def path_exists(self, x): return os.path.exists(x) def path_isdir(self, x): return os.path.isdir(x) def path_isfile(self, x): return os.path.isfile(x) def path_islink(self, x): return os.path.islink(x) # etc. def openfile(self, *x): return open(*x) openfile_error = IOError def listdir(self, x): return os.listdir(x) listdir_error = os.error # etc. class ModuleLoader(BasicModuleLoader): """Default module loader; uses file system hooks. By defining suitable hooks, you might be able to load modules from other sources than the file system, e.g. from compressed or encrypted files, tar files or (if you're brave!) URLs. """ def __init__(self, hooks = None, verbose = VERBOSE): BasicModuleLoader.__init__(self, verbose) self.hooks = hooks or Hooks(verbose) def default_path(self): return self.hooks.default_path() def modules_dict(self): return self.hooks.modules_dict() def get_hooks(self): return self.hooks def set_hooks(self, hooks): self.hooks = hooks def find_builtin_module(self, name): # XXX frozen packages? if self.hooks.is_builtin(name): return None, '', ('', '', BUILTIN_MODULE) if self.hooks.is_frozen(name): return None, '', ('', '', FROZEN_MODULE) return None def find_module_in_dir(self, name, dir, allow_packages=1): if dir is None: return self.find_builtin_module(name) if allow_packages: fullname = self.hooks.path_join(dir, name) if self.hooks.path_isdir(fullname): stuff = self.find_module_in_dir("__init__", fullname, 0) if stuff: file = stuff[0] if file: file.close() return None, fullname, ('', '', PKG_DIRECTORY) for info in self.hooks.get_suffixes(): suff, mode, type = info fullname = self.hooks.path_join(dir, name+suff) try: fp = self.hooks.openfile(fullname, mode) return fp, fullname, info except self.hooks.openfile_error: pass return None def load_module(self, name, stuff): file, filename, info = stuff (suff, mode, type) = info try: if type == BUILTIN_MODULE: return self.hooks.init_builtin(name) if type == FROZEN_MODULE: return self.hooks.init_frozen(name) if type == C_EXTENSION: m = self.hooks.load_dynamic(name, filename, file) elif type == PY_SOURCE: m = self.hooks.load_source(name, filename, file) elif type == PY_COMPILED: m = self.hooks.load_compiled(name, filename, file) elif type == PKG_DIRECTORY: m = self.hooks.load_package(name, filename, file) else: raise ImportError, "Unrecognized module type (%r) for %s" % \ (type, name) finally: if file: file.close() m.__file__ = filename return m class FancyModuleLoader(ModuleLoader): """Fancy module loader -- parses and execs the code itself.""" def load_module(self, name, stuff): file, filename, (suff, mode, type) = stuff realfilename = filename path = None if type == PKG_DIRECTORY: initstuff = self.find_module_in_dir("__init__", filename, 0) if not initstuff: raise ImportError, "No __init__ module in package %s" % name initfile, initfilename, initinfo = initstuff initsuff, initmode, inittype = initinfo if inittype not in (PY_COMPILED, PY_SOURCE): if initfile: initfile.close() raise ImportError, \ "Bad type (%r) for __init__ module in package %s" % ( inittype, name) path = [filename] file = initfile realfilename = initfilename type = inittype if type == FROZEN_MODULE: code = self.hooks.get_frozen_object(name) elif type == PY_COMPILED: import marshal file.seek(8) code = marshal.load(file) elif type == PY_SOURCE: data = file.read() code = compile(data, realfilename, 'exec') else: return ModuleLoader.load_module(self, name, stuff) m = self.hooks.add_module(name) if path: m.__path__ = path m.__file__ = filename try: exec code in m.__dict__ except: d = self.hooks.modules_dict() if name in d: del d[name] raise return m class BasicModuleImporter(_Verbose): """Basic module importer; uses module loader. This provides basic import facilities but no package imports. """ def __init__(self, loader = None, verbose = VERBOSE): _Verbose.__init__(self, verbose) self.loader = loader or ModuleLoader(None, verbose) self.modules = self.loader.modules_dict() def get_loader(self): return self.loader def set_loader(self, loader): self.loader = loader def get_hooks(self): return self.loader.get_hooks() def set_hooks(self, hooks): return self.loader.set_hooks(hooks) def import_module(self, name, globals={}, locals={}, fromlist=[]): name = str(name) if name in self.modules: return self.modules[name] # Fast path stuff = self.loader.find_module(name) if not stuff: raise ImportError, "No module named %s" % name return self.loader.load_module(name, stuff) def reload(self, module, path = None): name = str(module.__name__) stuff = self.loader.find_module(name, path) if not stuff: raise ImportError, "Module %s not found for reload" % name return self.loader.load_module(name, stuff) def unload(self, module): del self.modules[str(module.__name__)] # XXX Should this try to clear the module's namespace? def install(self): self.save_import_module = __builtin__.__import__ self.save_reload = __builtin__.reload if not hasattr(__builtin__, 'unload'): __builtin__.unload = None self.save_unload = __builtin__.unload __builtin__.__import__ = self.import_module __builtin__.reload = self.reload __builtin__.unload = self.unload def uninstall(self): __builtin__.__import__ = self.save_import_module __builtin__.reload = self.save_reload __builtin__.unload = self.save_unload if not __builtin__.unload: del __builtin__.unload class ModuleImporter(BasicModuleImporter): """A module importer that supports packages.""" def import_module(self, name, globals=None, locals=None, fromlist=None, level=-1): parent = self.determine_parent(globals, level) q, tail = self.find_head_package(parent, str(name)) m = self.load_tail(q, tail) if not fromlist: return q if hasattr(m, "__path__"): self.ensure_fromlist(m, fromlist) return m def determine_parent(self, globals, level=-1): if not globals or not level: return None pkgname = globals.get('__package__') if pkgname is not None: if not pkgname and level > 0: raise ValueError, 'Attempted relative import in non-package' else: # __package__ not set, figure it out and set it modname = globals.get('__name__') if modname is None: return None if "__path__" in globals: # __path__ is set so modname is already the package name pkgname = modname else: # normal module, work out package name if any if '.' not in modname: if level > 0: raise ValueError, ('Attempted relative import in ' 'non-package') globals['__package__'] = None return None pkgname = modname.rpartition('.')[0] globals['__package__'] = pkgname if level > 0: dot = len(pkgname) for x in range(level, 1, -1): try: dot = pkgname.rindex('.', 0, dot) except ValueError: raise ValueError('attempted relative import beyond ' 'top-level package') pkgname = pkgname[:dot] try: return sys.modules[pkgname] except KeyError: if level < 1: warn("Parent module '%s' not found while handling " "absolute import" % pkgname, RuntimeWarning, 1) return None else: raise SystemError, ("Parent module '%s' not loaded, cannot " "perform relative import" % pkgname) def find_head_package(self, parent, name): if '.' in name: i = name.find('.') head = name[:i] tail = name[i+1:] else: head = name tail = "" if parent: qname = "%s.%s" % (parent.__name__, head) else: qname = head q = self.import_it(head, qname, parent) if q: return q, tail if parent: qname = head parent = None q = self.import_it(head, qname, parent) if q: return q, tail raise ImportError, "No module named '%s'" % qname def load_tail(self, q, tail): m = q while tail: i = tail.find('.') if i < 0: i = len(tail) head, tail = tail[:i], tail[i+1:] mname = "%s.%s" % (m.__name__, head) m = self.import_it(head, mname, m) if not m: raise ImportError, "No module named '%s'" % mname return m def ensure_fromlist(self, m, fromlist, recursive=0): for sub in fromlist: if sub == "*": if not recursive: try: all = m.__all__ except AttributeError: pass else: self.ensure_fromlist(m, all, 1) continue if sub != "*" and not hasattr(m, sub): subname = "%s.%s" % (m.__name__, sub) submod = self.import_it(sub, subname, m) if not submod: raise ImportError, "No module named '%s'" % subname def import_it(self, partname, fqname, parent, force_load=0): if not partname: # completely empty module name should only happen in # 'from . import' or __import__("") return parent if not force_load: try: return self.modules[fqname] except KeyError: pass try: path = parent and parent.__path__ except AttributeError: return None partname = str(partname) stuff = self.loader.find_module(partname, path) if not stuff: return None fqname = str(fqname) m = self.loader.load_module(fqname, stuff) if parent: setattr(parent, partname, m) return m def reload(self, module): name = str(module.__name__) if '.' not in name: return self.import_it(name, name, None, force_load=1) i = name.rfind('.') pname = name[:i] parent = self.modules[pname] return self.import_it(name[i+1:], name, parent, force_load=1) default_importer = None current_importer = None def install(importer = None): global current_importer current_importer = importer or default_importer or ModuleImporter() current_importer.install() def uninstall(): global current_importer current_importer.uninstall()
unknown
codeparrot/codeparrot-clean
//===-- InsertionPointTess.cpp -------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "Annotations.h" #include "Protocol.h" #include "SourceCode.h" #include "TestTU.h" #include "XRefs.h" #include "refactor/InsertionPoint.h" #include "clang/AST/DeclBase.h" #include "llvm/Testing/Support/Error.h" #include "gmock/gmock.h" #include "gtest/gtest.h" namespace clang { namespace clangd { namespace { using llvm::HasValue; TEST(InsertionPointTests, Generic) { Annotations Code(R"cpp( namespace ns { $a^int a1; $b^// leading comment int b; $c^int c1; // trailing comment int c2; $a2^int a2; $end^}; )cpp"); auto StartsWith = [&](llvm::StringLiteral S) -> std::function<bool(const Decl *)> { return [S](const Decl *D) { if (const auto *ND = llvm::dyn_cast<NamedDecl>(D)) return llvm::StringRef(ND->getNameAsString()).starts_with(S); return false; }; }; auto AST = TestTU::withCode(Code.code()).build(); auto &NS = cast<NamespaceDecl>(findDecl(AST, "ns")); // Test single anchors. auto Point = [&](llvm::StringLiteral Prefix, Anchor::Dir Direction) { auto Loc = insertionPoint(NS, {Anchor{StartsWith(Prefix), Direction}}); return sourceLocToPosition(AST.getSourceManager(), Loc); }; EXPECT_EQ(Point("a", Anchor::Above), Code.point("a")); EXPECT_EQ(Point("a", Anchor::Below), Code.point("b")); EXPECT_EQ(Point("b", Anchor::Above), Code.point("b")); EXPECT_EQ(Point("b", Anchor::Below), Code.point("c")); EXPECT_EQ(Point("c", Anchor::Above), Code.point("c")); EXPECT_EQ(Point("c", Anchor::Below), Code.point("a2")); EXPECT_EQ(Point("", Anchor::Above), Code.point("a")); EXPECT_EQ(Point("", Anchor::Below), Code.point("end")); EXPECT_EQ(Point("no_match", Anchor::Below), Position{}); // Test anchor chaining. auto Chain = [&](llvm::StringLiteral P1, llvm::StringLiteral P2) { auto Loc = insertionPoint(NS, {Anchor{StartsWith(P1), Anchor::Above}, Anchor{StartsWith(P2), Anchor::Above}}); return sourceLocToPosition(AST.getSourceManager(), Loc); }; EXPECT_EQ(Chain("a", "b"), Code.point("a")); EXPECT_EQ(Chain("b", "a"), Code.point("b")); EXPECT_EQ(Chain("no_match", "a"), Code.point("a")); // Test edit generation. auto Edit = insertDecl("foo;", NS, {Anchor{StartsWith("a"), Anchor::Below}}); ASSERT_THAT_EXPECTED(Edit, llvm::Succeeded()); EXPECT_EQ(offsetToPosition(Code.code(), Edit->getOffset()), Code.point("b")); EXPECT_EQ(Edit->getReplacementText(), "foo;"); // If no match, the edit is inserted at the end. Edit = insertDecl("x;", NS, {Anchor{StartsWith("no_match"), Anchor::Below}}); ASSERT_THAT_EXPECTED(Edit, llvm::Succeeded()); EXPECT_EQ(offsetToPosition(Code.code(), Edit->getOffset()), Code.point("end")); } // For CXX, we should check: // - special handling for access specifiers // - unwrapping of template decls TEST(InsertionPointTests, CXX) { Annotations Code(R"cpp( class C { public: $Method^void pubMethod(); $Field^int PubField; $private^private: $field^int PrivField; $method^void privMethod(); template <typename T> void privTemplateMethod(); $end^}; )cpp"); auto AST = TestTU::withCode(Code.code()).build(); const CXXRecordDecl &C = cast<CXXRecordDecl>(findDecl(AST, "C")); auto IsMethod = [](const Decl *D) { return llvm::isa<CXXMethodDecl>(D); }; auto Any = [](const Decl *D) { return true; }; // Test single anchors. auto Point = [&](Anchor A, AccessSpecifier Protection) { auto Loc = insertionPoint(C, {A}, Protection); return sourceLocToPosition(AST.getSourceManager(), Loc); }; EXPECT_EQ(Point({IsMethod, Anchor::Above}, AS_public), Code.point("Method")); EXPECT_EQ(Point({IsMethod, Anchor::Below}, AS_public), Code.point("Field")); EXPECT_EQ(Point({Any, Anchor::Above}, AS_public), Code.point("Method")); EXPECT_EQ(Point({Any, Anchor::Below}, AS_public), Code.point("private")); EXPECT_EQ(Point({IsMethod, Anchor::Above}, AS_private), Code.point("method")); EXPECT_EQ(Point({IsMethod, Anchor::Below}, AS_private), Code.point("end")); EXPECT_EQ(Point({Any, Anchor::Above}, AS_private), Code.point("field")); EXPECT_EQ(Point({Any, Anchor::Below}, AS_private), Code.point("end")); EXPECT_EQ(Point({IsMethod, Anchor::Above}, AS_protected), Position{}); EXPECT_EQ(Point({IsMethod, Anchor::Below}, AS_protected), Position{}); EXPECT_EQ(Point({Any, Anchor::Above}, AS_protected), Position{}); EXPECT_EQ(Point({Any, Anchor::Below}, AS_protected), Position{}); // Edits when there's no match --> end of matching access control section. auto Edit = insertDecl("x", C, {}, AS_public); ASSERT_THAT_EXPECTED(Edit, llvm::Succeeded()); EXPECT_EQ(offsetToPosition(Code.code(), Edit->getOffset()), Code.point("private")); Edit = insertDecl("x", C, {}, AS_private); ASSERT_THAT_EXPECTED(Edit, llvm::Succeeded()); EXPECT_EQ(offsetToPosition(Code.code(), Edit->getOffset()), Code.point("end")); Edit = insertDecl("x", C, {}, AS_protected); ASSERT_THAT_EXPECTED(Edit, llvm::Succeeded()); EXPECT_EQ(offsetToPosition(Code.code(), Edit->getOffset()), Code.point("end")); EXPECT_EQ(Edit->getReplacementText(), "protected:\nx"); } MATCHER_P(replacementText, Text, "") { if (arg.getReplacementText() != Text) { *result_listener << "replacement is " << arg.getReplacementText().str(); return false; } return true; } TEST(InsertionPointTests, CXXAccessProtection) { // Empty class uses default access. auto AST = TestTU::withCode("struct S{};").build(); const CXXRecordDecl &S = cast<CXXRecordDecl>(findDecl(AST, "S")); ASSERT_THAT_EXPECTED(insertDecl("x", S, {}, AS_public), HasValue(replacementText("x"))); ASSERT_THAT_EXPECTED(insertDecl("x", S, {}, AS_private), HasValue(replacementText("private:\nx"))); // We won't insert above the first access specifier if there's nothing there. AST = TestTU::withCode("struct T{private:};").build(); const CXXRecordDecl &T = cast<CXXRecordDecl>(findDecl(AST, "T")); ASSERT_THAT_EXPECTED(insertDecl("x", T, {}, AS_public), HasValue(replacementText("public:\nx"))); ASSERT_THAT_EXPECTED(insertDecl("x", T, {}, AS_private), HasValue(replacementText("x"))); // But we will if there are declarations. AST = TestTU::withCode("struct U{int i;private:};").build(); const CXXRecordDecl &U = cast<CXXRecordDecl>(findDecl(AST, "U")); ASSERT_THAT_EXPECTED(insertDecl("x", U, {}, AS_public), HasValue(replacementText("x"))); ASSERT_THAT_EXPECTED(insertDecl("x", U, {}, AS_private), HasValue(replacementText("x"))); } // In ObjC we need to take care to get the @end fallback right. TEST(InsertionPointTests, ObjC) { Annotations Code(R"objc( @interface Foo -(void) v; $endIface^@end @implementation Foo -(void) v {} $endImpl^@end )objc"); auto TU = TestTU::withCode(Code.code()); TU.Filename = "TestTU.m"; auto AST = TU.build(); auto &Impl = cast<ObjCImplementationDecl>(findDecl(AST, [&](const NamedDecl &D) { return llvm::isa<ObjCImplementationDecl>(D); })); auto &Iface = *Impl.getClassInterface(); Anchor End{[](const Decl *) { return true; }, Anchor::Below}; const auto &SM = AST.getSourceManager(); EXPECT_EQ(sourceLocToPosition(SM, insertionPoint(Iface, {End})), Code.point("endIface")); EXPECT_EQ(sourceLocToPosition(SM, insertionPoint(Impl, {End})), Code.point("endImpl")); } } // namespace } // namespace clangd } // namespace clang
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/unittests/InsertionPointTests.cpp
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## import datetime import time from openerp.osv import osv from openerp.tools.translate import _ from openerp.report import report_sxw from openerp.tools.safe_eval import safe_eval as eval # # Use period and Journal for selection or resources # class report_assert_account(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(report_assert_account, self).__init__(cr, uid, name, context=context) self.localcontext.update( { 'time': time, 'datetime': datetime, 'execute_code': self.execute_code, }) def execute_code(self, code_exec): def reconciled_inv(): """ returns the list of invoices that are set as reconciled = True """ return self.pool.get('account.invoice').search(self.cr, self.uid, [('reconciled','=',True)]) def order_columns(item, cols=None): """ This function is used to display a dictionary as a string, with its columns in the order chosen. :param item: dict :param cols: list of field names :returns: a list of tuples (fieldname: value) in a similar way that would dict.items() do except that the returned values are following the order given by cols :rtype: [(key, value)] """ if cols is None: cols = item.keys() return [(col, item.get(col)) for col in cols if col in item.keys()] localdict = { 'cr': self.cr, 'uid': self.uid, 'reconciled_inv': reconciled_inv, #specific function used in different tests 'result': None, #used to store the result of the test 'column_order': None, #used to choose the display order of columns (in case you are returning a list of dict) '_': _, #used for translation } eval(code_exec, localdict, mode="exec", nocopy=True) result = localdict['result'] column_order = localdict.get('column_order', None) if not isinstance(result, (tuple, list, set)): result = [result] if not result: result = [_('The test was passed successfully')] else: def _format(item): if isinstance(item, dict): return ', '.join(["%s: %s" % (tup[0], tup[1]) for tup in order_columns(item, column_order)]) else: return item result = [_(_format(rec)) for rec in result] return result class report_accounttest(osv.AbstractModel): _name = 'report.account_test.report_accounttest' _inherit = 'report.abstract_report' _template = 'account_test.report_accounttest' _wrapped_report_class = report_assert_account # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
unknown
codeparrot/codeparrot-clean
from base64 import b64encode import mimetypes import os, urlparse from webassets.filter.cssrewrite.base import CSSUrlRewriter __all__ = ('CSSDataUri',) class CSSDataUri(CSSUrlRewriter): """Will replace CSS url() references to external files with internal `data: URIs <http://en.wikipedia.org/wiki/Data_URI_scheme>`_. The external file is now included inside your CSS, which minimizes HTTP requests. .. note:: Data Uris have `clear disadvantages <http://stackoverflow.com/questions/5258057/images-in-css-or-html-as-data-base64>`_, so put some thought into if and how you would like to use them. Have a look at some `performance measurements <http://www.ravelrumba.com/blog/data-uris-for-css-images-more-tests-more-questions/>`_. The filter respects a ``DATAURI_MAX_SIZE`` option, which is the maximum size (in bytes) of external files to include. The default limit is what I think should be a reasonably conservative number, 2048 bytes. """ name = 'datauri' options = { 'max_size': 'DATAURI_MAX_SIZE', } def replace_url(self, url): if url.startswith('data:'): # Don't even both sending data: through urlparse(), # who knows how well it'll deal with a lot of data. return # Ignore any urls which are not relative parsed = urlparse.urlparse(url) if parsed.scheme or parsed.netloc or parsed.path.startswith('/'): return # Since this runs BEFORE cssrewrite, we can thus assume that urls # will be relative to the file location. # # Notes: # - Django might need to override this filter for staticfiles if it # it should be possible to resolve cross-references between # different directories. # - For Flask-Assets blueprints, the logic might need to be: # 1) Take source_path, convert into correct url via absurl(). # 2) Join with the URL be be replaced. # 3) Convert url back to the filesystem path to which the url # would map (the hard part?). # filename = os.path.join(os.path.dirname(self.source_path), url) try: if os.stat(filename).st_size <= (self.max_size or 2048): data = b64encode(open(filename, 'rb').read()) return 'data:%s;base64,%s' % ( mimetypes.guess_type(filename)[0], data) except (OSError, IOError): # Ignore the file not existing. # TODO: When we have a logging system, this could produce a warning return
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -* # # iso9075.py - Python codec for ISO-9075 # # Copyright 2011 Jesús Torres <jmtorres@ull.es> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import codecs import re # XML NCName validator def validateNCNameChar(index, char): ch = ord(char) if (ch == ord('_') or (ch >= ord('A') and ch <= ord('Z')) or (ch >= ord('a') and ch <= ord('z')) or (ch >= 0x000C0 and ch <= 0x000D6) or (ch >= 0x000D8 and ch <= 0x000F6) or (ch >= 0x000F8 and ch <= 0x002FF) or (ch >= 0x00370 and ch <= 0x0037D) or (ch >= 0x0037F and ch <= 0x01FFF) or (ch >= 0x0200C and ch <= 0x0200D) or (ch >= 0x02070 and ch <= 0x0218F) or (ch >= 0x02C00 and ch <= 0x02FEF) or (ch >= 0x03001 and ch <= 0x0D7FF) or (ch >= 0x0F900 and ch <= 0x0FDCF) or (ch >= 0x0FDF0 and ch <= 0x0FFFD) or (ch >= 0x10000 and ch <= 0xEFFFF)): return True elif not index == 0: if (ch == ord('-') or ch == ord('.') or ch == 0xB7 or (ch >= ord('0') and ch <= ord('9')) or (ch >= 0x0300 and ch <= 0x036F) or (ch >= 0x203F and ch <= 0x2040)): return True return False # Codec API class Codec(codecs.Codec): def encode(self, input, errors='strict', validate=validateNCNameChar): return encode(input, errors, validate) def decode(self, input, errors='strict'): return decode(input, errors) class IncrementalEncoder(codecs.IncrementalEncoder): def __init__(self, errors='strict', validate=validateNCNameChar): self.lastIndex = 0 self.validate = validate super(IncrementalEncoder, self).__init__(errors) def encode(self, input, final=False): def validate(index, char): self.validate(self.lastIndex + index, char) output = encode(input, self.errors, validate) self.lastIndex += output[1] return output[0] class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False): return decode(input, self.errors)[0] class StreamWriter(Codec, codecs.StreamWriter): pass class StreamReader(Codec, codecs.StreamReader): pass # Encoding & decoding functions def encode(input, errors = 'strict', validate=validateNCNameChar): output = unicode() input = unicode(input) for i in range(len(input)): if validate(i, input[i]) == False: output += "_x%04x_" % ord(input[i]) elif re.match("_x[0-9a-fA-F]{4}_", input[i:i+7]): output += "_x%04x_" % ord('_') else: output += input[i] return (output, len(input)) def decode(input, errors = 'strict'): output = unicode() input = unicode(input) i = 0 while i < len(input): if re.match("_x[0-9a-fA-F]{4}_", input[i:i+7]): output += unichr(int(input[i+2:i+6], 16)) i += 7 else: output += input[i] i += 1 return (output, len(input)) # Register the codec search function def register(encoding, validate): """Register a ISO-9075 codec. The codec is registered using the name given in encoding. It will use the the function specified in validate to check the characters that must not be encoded. """ def find_codec(name): if name == encoding: return codecs.CodecInfo( name=encoding, encode=lambda input, errors='strict': Codec().encode(input, errors, validate), decode=Codec().decode, incrementalencoder=lambda errors='strict': IncrementalEncoder(errors, validate), incrementaldecoder=IncrementalDecoder, streamreader=StreamReader, streamwriter=StreamWriter, ) else: return None codecs.register(find_codec) register('iso9075', validateNCNameChar) if __name__ == '__main__': import sys for line in sys.stdin.readlines(): if line[-1] == '\n': print unicode(line[:-1], 'utf-8').encode('iso9075').encode('utf-8') else: sys.stdout.write( unicode(line, 'utf-8').encode('iso9075').encode('utf-8'))
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='test handling of --alternate-refs traversal' . ./test-lib.sh # Avoid test_commit because we want a specific and known set of refs: # # base -- one # \ \ # two -- merged # # where "one" and "two" are on separate refs, and "merged" is available only in # the dependent child repository. test_expect_success 'set up local refs' ' git checkout -b one && test_tick && git commit --allow-empty -m base && test_tick && git commit --allow-empty -m one && git checkout -b two HEAD^ && test_tick && git commit --allow-empty -m two ' # We'll enter the child repository after it's set up since that's where # all of the subsequent tests will want to run (and it's easy to forget a # "-C child" and get nonsense results). test_expect_success 'set up shared clone' ' git clone -s . child && cd child && git merge origin/one ' test_expect_success 'rev-list --alternate-refs' ' git rev-list --remotes=origin >expect && git rev-list --alternate-refs >actual && test_cmp expect actual ' test_expect_success 'rev-list --not --alternate-refs' ' git rev-parse HEAD >expect && git rev-list HEAD --not --alternate-refs >actual && test_cmp expect actual ' test_expect_success 'limiting with alternateRefsPrefixes' ' test_config core.alternateRefsPrefixes refs/heads/one && git rev-list origin/one >expect && git rev-list --alternate-refs >actual && test_cmp expect actual ' test_expect_success 'log --source shows .alternate marker' ' git log --oneline --source --remotes=origin >expect.orig && sed "s/origin.* /.alternate /" <expect.orig >expect && git log --oneline --source --alternate-refs >actual && test_cmp expect actual ' test_done
unknown
github
https://github.com/git/git
t/t5618-alternate-refs.sh
# -*- coding: utf-8 -*- ############################################################################### # # GetBuyLinks # Retrieves a list of Buy Links for a particular Album. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, # either express or implied. See the License for the specific # language governing permissions and limitations under the License. # # ############################################################################### from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class GetBuyLinks(Choreography): def __init__(self, temboo_session): """ Create a new instance of the GetBuyLinks Choreo. A TembooSession object, containing a valid set of Temboo credentials, must be supplied. """ super(GetBuyLinks, self).__init__(temboo_session, '/Library/LastFm/Album/GetBuyLinks') def new_input_set(self): return GetBuyLinksInputSet() def _make_result_set(self, result, path): return GetBuyLinksResultSet(result, path) def _make_execution(self, session, exec_id, path): return GetBuyLinksChoreographyExecution(session, exec_id, path) class GetBuyLinksInputSet(InputSet): """ An InputSet with methods appropriate for specifying the inputs to the GetBuyLinks Choreo. The InputSet object is used to specify input parameters when executing this Choreo. """ def set_APIKey(self, value): """ Set the value of the APIKey input for this Choreo. ((required, string) Your Last.fm API Key.) """ super(GetBuyLinksInputSet, self)._set_input('APIKey', value) def set_Album(self, value): """ Set the value of the Album input for this Choreo. ((conditional, string) The album name. Required unless providing MbID.) """ super(GetBuyLinksInputSet, self)._set_input('Album', value) def set_Artist(self, value): """ Set the value of the Artist input for this Choreo. ((conditional, string) The artist name. Required unless providing MbID.) """ super(GetBuyLinksInputSet, self)._set_input('Artist', value) def set_AutoCorrect(self, value): """ Set the value of the AutoCorrect input for this Choreo. ((optional, boolean) Transform misspelled artist names into correct artist names. The corrected artist name will be returned in the response. Defaults to 0.) """ super(GetBuyLinksInputSet, self)._set_input('AutoCorrect', value) def set_Country(self, value): """ Set the value of the Country input for this Choreo. ((required, string) A country name or two character country code, as defined by the ISO 3166-1 country names standard (e.g., US).) """ super(GetBuyLinksInputSet, self)._set_input('Country', value) def set_MbID(self, value): """ Set the value of the MbID input for this Choreo. ((conditional, string) The musicbrainz id for the album. Required unless providing the Album and Artist.) """ super(GetBuyLinksInputSet, self)._set_input('MbID', value) class GetBuyLinksResultSet(ResultSet): """ A ResultSet with methods tailored to the values returned by the GetBuyLinks Choreo. The ResultSet object is used to retrieve the results of a Choreo execution. """ def getJSONFromString(self, str): return json.loads(str) def get_Response(self): """ Retrieve the value for the "Response" output from this Choreo execution. ((xml) The response from Last.fm.) """ return self._output.get('Response', None) class GetBuyLinksChoreographyExecution(ChoreographyExecution): def _make_result_set(self, response, path): return GetBuyLinksResultSet(response, path)
unknown
codeparrot/codeparrot-clean
""" Acceptance tests for Studio's New Icon Display Days Test """ from .base_studio_test import StudioCourseTest from ...pages.studio.ga_course_rerun import CourseRerunPage from ...pages.studio.ga_index import DashboardPage from ...pages.studio.settings_advanced import AdvancedSettingsPage class NewIconDisplayDaysTest(StudioCourseTest): def setUp(self): super(NewIconDisplayDaysTest, self).setUp(True) self.dashboard = DashboardPage(self.browser) self.course_rerun = CourseRerunPage( self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run'] ) self.advanced_settings = AdvancedSettingsPage( self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run'] ) def test_set_advanced_settings(self): """ Test when update New Icon Display Days on advanced settings. """ self.advanced_settings.visit() self.advanced_settings.set( 'New Icon Display Days', '10' ) self.advanced_settings.refresh_and_wait_for_load() self.assertEqual( '10', self.advanced_settings.get('New Icon Display Days') ) def test_rerun_course(self): """ Test when rerun new course. """ self.advanced_settings.visit() self.advanced_settings.set( 'New Icon Display Days', '10' ) self.dashboard.visit() self.dashboard.create_rerun(self.course_info['display_name']) self.course_rerun.wait_for_page() self.course_rerun.course_name = 'TEST COURSE rerun' self.course_rerun.course_run = 'new_rerun_run' self.course_rerun.create_rerun() self.advanced_settings = AdvancedSettingsPage( self.browser, self.course_info['org'], self.course_info['number'], 'new_rerun_run' ) self.advanced_settings.visit() self.assertEqual( '"TEST COURSE rerun"', self.advanced_settings.get('Course Display Name') ) self.assertEqual( '10', self.advanced_settings.get('New Icon Display Days') ) def test_set_advanced_settings_error(self): """ Test when error New Icon Display Days on advanced settings. """ self.advanced_settings.visit() self.advanced_settings.set( 'New Icon Display Days', '"test"' ) self.advanced_settings.wait_for_modal_load() self.advanced_settings.save() self.assertTrue(self.advanced_settings.is_validation_modal_present()) self.assertEqual( [u'New Icon Display Days'], self.advanced_settings.get_error_item_names() ) self.assertEqual( [u'invalid literal for int() with base 10: \'test\''], self.advanced_settings.get_error_item_messages() )
unknown
codeparrot/codeparrot-clean
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_COMPILER_MLIR_LITE_TRANSFORMS_LIFT_TFLITE_FLEX_OPS_H_ #define TENSORFLOW_COMPILER_MLIR_LITE_TRANSFORMS_LIFT_TFLITE_FLEX_OPS_H_ #include "mlir/Dialect/Func/IR/FuncOps.h" // from @llvm-project #include "mlir/Pass/Pass.h" // from @llvm-project namespace mlir { namespace TFL { // Creates an instance of the lift TFLite Flex ops pass that lifts TFLite Flex // ops into TF dialect operations. std::unique_ptr<OperationPass<func::FuncOp>> CreateLiftTfliteFlexOpsPass(); void AddLiftTfliteFlexOpsPatterns(MLIRContext *context, RewritePatternSet &patterns); } // namespace TFL } // namespace mlir #endif // TENSORFLOW_COMPILER_MLIR_LITE_TRANSFORMS_LIFT_TFLITE_FLEX_OPS_H_
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/lite/transforms/lift_tflite_flex_ops.h
// // basic_streambuf_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_BASIC_STREAMBUF_FWD_HPP #define BOOST_ASIO_BASIC_STREAMBUF_FWD_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include <boost/asio/detail/config.hpp> #if !defined(BOOST_ASIO_NO_IOSTREAM) #include <memory> namespace boost { namespace asio { template <typename Allocator = std::allocator<char>> class basic_streambuf; template <typename Allocator = std::allocator<char>> class basic_streambuf_ref; } // namespace asio } // namespace boost #endif // !defined(BOOST_ASIO_NO_IOSTREAM) #endif // BOOST_ASIO_BASIC_STREAMBUF_FWD_HPP
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/asio/basic_streambuf_fwd.hpp
import datetime import os import shutil import sys import tempfile import threading import time import unittest from io import StringIO from pathlib import Path from urllib.request import urlopen from django.conf import DEFAULT_STORAGE_ALIAS, STATICFILES_STORAGE_ALIAS from django.core.cache import cache from django.core.exceptions import SuspiciousFileOperation from django.core.files.base import ContentFile, File from django.core.files.storage import FileSystemStorage, InvalidStorageError from django.core.files.storage import Storage as BaseStorage from django.core.files.storage import StorageHandler, default_storage, storages from django.core.files.uploadedfile import ( InMemoryUploadedFile, SimpleUploadedFile, TemporaryUploadedFile, ) from django.db.models import FileField from django.db.models.fields.files import FileDescriptor from django.test import LiveServerTestCase, SimpleTestCase, TestCase, override_settings from django.test.utils import requires_tz_support from django.urls import NoReverseMatch, reverse_lazy from django.utils import timezone from django.utils._os import symlinks_supported from django.utils.functional import empty from .models import ( Storage, callable_default_storage, callable_storage, temp_storage, temp_storage_location, ) FILE_SUFFIX_REGEX = "[A-Za-z0-9]{7}" class FileSystemStorageTests(unittest.TestCase): def test_deconstruction(self): path, args, kwargs = temp_storage.deconstruct() self.assertEqual(path, "django.core.files.storage.FileSystemStorage") self.assertEqual(args, ()) self.assertEqual(kwargs, {"location": temp_storage_location}) kwargs_orig = { "location": temp_storage_location, "base_url": "http://myfiles.example.com/", } storage = FileSystemStorage(**kwargs_orig) path, args, kwargs = storage.deconstruct() self.assertEqual(kwargs, kwargs_orig) def test_lazy_base_url_init(self): """ FileSystemStorage.__init__() shouldn't evaluate base_url. """ storage = FileSystemStorage(base_url=reverse_lazy("app:url")) with self.assertRaises(NoReverseMatch): storage.url(storage.base_url) class FileStorageTests(SimpleTestCase): storage_class = FileSystemStorage def setUp(self): self.temp_dir = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, self.temp_dir) self.storage = self.storage_class( location=self.temp_dir, base_url="/test_media_url/" ) def test_empty_location(self): """ Makes sure an exception is raised if the location is empty """ storage = self.storage_class(location="") self.assertEqual(storage.base_location, "") self.assertEqual(storage.location, os.getcwd()) def test_file_access_options(self): """ Standard file access options are available, and work as expected. """ self.assertFalse(self.storage.exists("storage_test")) f = self.storage.open("storage_test", "w") f.write("storage contents") f.close() self.assertTrue(self.storage.exists("storage_test")) f = self.storage.open("storage_test", "r") self.assertEqual(f.read(), "storage contents") f.close() self.storage.delete("storage_test") self.assertFalse(self.storage.exists("storage_test")) def _test_file_time_getter(self, getter): # Check for correct behavior under both USE_TZ=True and USE_TZ=False. # The tests are similar since they both set up a situation where the # system time zone, Django's TIME_ZONE, and UTC are distinct. self._test_file_time_getter_tz_handling_on(getter) self._test_file_time_getter_tz_handling_off(getter) @override_settings(USE_TZ=True, TIME_ZONE="Africa/Algiers") def _test_file_time_getter_tz_handling_on(self, getter): # Django's TZ (and hence the system TZ) is set to Africa/Algiers which # is UTC+1 and has no DST change. We can set the Django TZ to something # else so that UTC, Django's TIME_ZONE, and the system timezone are all # different. now_in_algiers = timezone.make_aware(datetime.datetime.now()) with timezone.override(timezone.get_fixed_timezone(-300)): # At this point the system TZ is +1 and the Django TZ # is -5. The following will be aware in UTC. now = timezone.now() self.assertFalse(self.storage.exists("test.file.tz.on")) f = ContentFile("custom contents") f_name = self.storage.save("test.file.tz.on", f) self.addCleanup(self.storage.delete, f_name) dt = getter(f_name) # dt should be aware, in UTC self.assertTrue(timezone.is_aware(dt)) self.assertEqual(now.tzname(), dt.tzname()) # The three timezones are indeed distinct. naive_now = datetime.datetime.now() algiers_offset = now_in_algiers.tzinfo.utcoffset(naive_now) django_offset = timezone.get_current_timezone().utcoffset(naive_now) utc_offset = datetime.UTC.utcoffset(naive_now) self.assertGreater(algiers_offset, utc_offset) self.assertLess(django_offset, utc_offset) # dt and now should be the same effective time. self.assertLess(abs(dt - now), datetime.timedelta(seconds=2)) @override_settings(USE_TZ=False, TIME_ZONE="Africa/Algiers") def _test_file_time_getter_tz_handling_off(self, getter): # Django's TZ (and hence the system TZ) is set to Africa/Algiers which # is UTC+1 and has no DST change. We can set the Django TZ to something # else so that UTC, Django's TIME_ZONE, and the system timezone are all # different. now_in_algiers = timezone.make_aware(datetime.datetime.now()) with timezone.override(timezone.get_fixed_timezone(-300)): # At this point the system TZ is +1 and the Django TZ # is -5. self.assertFalse(self.storage.exists("test.file.tz.off")) f = ContentFile("custom contents") f_name = self.storage.save("test.file.tz.off", f) self.addCleanup(self.storage.delete, f_name) dt = getter(f_name) # dt should be naive, in system (+1) TZ self.assertTrue(timezone.is_naive(dt)) # The three timezones are indeed distinct. naive_now = datetime.datetime.now() algiers_offset = now_in_algiers.tzinfo.utcoffset(naive_now) django_offset = timezone.get_current_timezone().utcoffset(naive_now) utc_offset = datetime.UTC.utcoffset(naive_now) self.assertGreater(algiers_offset, utc_offset) self.assertLess(django_offset, utc_offset) # dt and naive_now should be the same effective time. self.assertLess(abs(dt - naive_now), datetime.timedelta(seconds=2)) # If we convert dt to an aware object using the Algiers # timezone then it should be the same effective time to # now_in_algiers. _dt = timezone.make_aware(dt, now_in_algiers.tzinfo) self.assertLess(abs(_dt - now_in_algiers), datetime.timedelta(seconds=2)) def test_file_get_accessed_time(self): """ File storage returns a Datetime object for the last accessed time of a file. """ self.assertFalse(self.storage.exists("test.file")) f = ContentFile("custom contents") f_name = self.storage.save("test.file", f) self.addCleanup(self.storage.delete, f_name) path = self.storage.path(f_name) atime = self.storage.get_accessed_time(f_name) self.assertAlmostEqual( atime, datetime.datetime.fromtimestamp(os.path.getatime(path)), delta=datetime.timedelta(seconds=1), ) self.assertAlmostEqual( atime, timezone.now(), delta=datetime.timedelta(seconds=1), ) @requires_tz_support def test_file_get_accessed_time_timezone(self): self._test_file_time_getter(self.storage.get_accessed_time) def test_file_get_created_time(self): """ File storage returns a datetime for the creation time of a file. """ self.assertFalse(self.storage.exists("test.file")) f = ContentFile("custom contents") f_name = self.storage.save("test.file", f) self.addCleanup(self.storage.delete, f_name) path = self.storage.path(f_name) ctime = self.storage.get_created_time(f_name) self.assertAlmostEqual( ctime, datetime.datetime.fromtimestamp(os.path.getctime(path)), delta=datetime.timedelta(seconds=1), ) self.assertAlmostEqual( ctime, timezone.now(), delta=datetime.timedelta(seconds=1), ) @requires_tz_support def test_file_get_created_time_timezone(self): self._test_file_time_getter(self.storage.get_created_time) def test_file_get_modified_time(self): """ File storage returns a datetime for the last modified time of a file. """ self.assertFalse(self.storage.exists("test.file")) f = ContentFile("custom contents") f_name = self.storage.save("test.file", f) self.addCleanup(self.storage.delete, f_name) path = self.storage.path(f_name) mtime = self.storage.get_modified_time(f_name) self.assertAlmostEqual( mtime, datetime.datetime.fromtimestamp(os.path.getmtime(path)), delta=datetime.timedelta(seconds=1), ) self.assertAlmostEqual( mtime, timezone.now(), delta=datetime.timedelta(seconds=1), ) @requires_tz_support def test_file_get_modified_time_timezone(self): self._test_file_time_getter(self.storage.get_modified_time) def test_file_save_without_name(self): """ File storage extracts the filename from the content object if no name is given explicitly. """ self.assertFalse(self.storage.exists("test.file")) f = ContentFile("custom contents") f.name = "test.file" storage_f_name = self.storage.save(None, f) self.assertEqual(storage_f_name, f.name) self.assertTrue(os.path.exists(os.path.join(self.temp_dir, f.name))) self.storage.delete(storage_f_name) def test_file_save_with_path(self): """ Saving a pathname should create intermediate directories as necessary. """ self.assertFalse(self.storage.exists("path/to")) self.storage.save("path/to/test.file", ContentFile("file saved with path")) self.assertTrue(self.storage.exists("path/to")) with self.storage.open("path/to/test.file") as f: self.assertEqual(f.read(), b"file saved with path") self.assertTrue( os.path.exists(os.path.join(self.temp_dir, "path", "to", "test.file")) ) self.storage.delete("path/to/test.file") @unittest.skipUnless( symlinks_supported(), "Must be able to symlink to run this test." ) def test_file_save_broken_symlink(self): """A new path is created on save when a broken symlink is supplied.""" nonexistent_file_path = os.path.join(self.temp_dir, "nonexistent.txt") broken_symlink_file_name = "symlink.txt" broken_symlink_path = os.path.join(self.temp_dir, broken_symlink_file_name) os.symlink(nonexistent_file_path, broken_symlink_path) f = ContentFile("some content") f_name = self.storage.save(broken_symlink_file_name, f) self.assertIs(os.path.exists(os.path.join(self.temp_dir, f_name)), True) def test_save_doesnt_close(self): with TemporaryUploadedFile("test", "text/plain", 1, "utf8") as file: file.write(b"1") file.seek(0) self.assertFalse(file.closed) self.storage.save("path/to/test.file", file) self.assertFalse(file.closed) self.assertFalse(file.file.closed) file = InMemoryUploadedFile(StringIO("1"), "", "test", "text/plain", 1, "utf8") with file: self.assertFalse(file.closed) self.storage.save("path/to/test.file", file) self.assertFalse(file.closed) self.assertFalse(file.file.closed) def test_file_path(self): """ File storage returns the full path of a file """ self.assertFalse(self.storage.exists("test.file")) f = ContentFile("custom contents") f_name = self.storage.save("test.file", f) self.assertEqual(self.storage.path(f_name), os.path.join(self.temp_dir, f_name)) self.storage.delete(f_name) def test_file_url(self): """ File storage returns a url to access a given file from the web. """ self.assertEqual( self.storage.url("test.file"), self.storage.base_url + "test.file" ) # should encode special chars except ~!*()' # like encodeURIComponent() JavaScript function do self.assertEqual( self.storage.url(r"~!*()'@#$%^&*abc`+ =.file"), "/test_media_url/~!*()'%40%23%24%25%5E%26*abc%60%2B%20%3D.file", ) self.assertEqual(self.storage.url("ab\0c"), "/test_media_url/ab%00c") # should translate os path separator(s) to the url path separator self.assertEqual( self.storage.url("""a/b\\c.file"""), "/test_media_url/a/b/c.file" ) # #25905: remove leading slashes from file names to prevent unsafe url # output self.assertEqual(self.storage.url("/evil.com"), "/test_media_url/evil.com") self.assertEqual(self.storage.url(r"\evil.com"), "/test_media_url/evil.com") self.assertEqual(self.storage.url("///evil.com"), "/test_media_url/evil.com") self.assertEqual(self.storage.url(r"\\\evil.com"), "/test_media_url/evil.com") self.assertEqual(self.storage.url(None), "/test_media_url/") def test_base_url(self): """ File storage returns a url even when its base_url is unset or modified. """ self.storage.base_url = None with self.assertRaises(ValueError): self.storage.url("test.file") # #22717: missing ending slash in base_url should be auto-corrected storage = self.storage_class( location=self.temp_dir, base_url="/no_ending_slash" ) self.assertEqual( storage.url("test.file"), "%s%s" % (storage.base_url, "test.file") ) def test_listdir(self): """ File storage returns a tuple containing directories and files. """ self.assertFalse(self.storage.exists("storage_test_1")) self.assertFalse(self.storage.exists("storage_test_2")) self.assertFalse(self.storage.exists("storage_dir_1")) self.storage.save("storage_test_1", ContentFile("custom content")) self.storage.save("storage_test_2", ContentFile("custom content")) os.mkdir(os.path.join(self.temp_dir, "storage_dir_1")) self.addCleanup(self.storage.delete, "storage_test_1") self.addCleanup(self.storage.delete, "storage_test_2") for directory in ("", Path("")): with self.subTest(directory=directory): dirs, files = self.storage.listdir(directory) self.assertEqual(set(dirs), {"storage_dir_1"}) self.assertEqual(set(files), {"storage_test_1", "storage_test_2"}) def test_file_storage_prevents_directory_traversal(self): """ File storage prevents directory traversal (files can only be accessed if they're below the storage location). """ with self.assertRaises(SuspiciousFileOperation): self.storage.exists("..") with self.assertRaises(SuspiciousFileOperation): self.storage.exists("/etc/passwd") def test_file_storage_preserves_filename_case(self): """The storage backend should preserve case of filenames.""" # Create a storage backend associated with the mixed case name # directory. temp_dir2 = tempfile.mkdtemp(suffix="aBc") self.addCleanup(shutil.rmtree, temp_dir2) other_temp_storage = self.storage_class(location=temp_dir2) # Ask that storage backend to store a file with a mixed case filename. mixed_case = "CaSe_SeNsItIvE" file = other_temp_storage.open(mixed_case, "w") file.write("storage contents") file.close() self.assertEqual( os.path.join(temp_dir2, mixed_case), other_temp_storage.path(mixed_case), ) other_temp_storage.delete(mixed_case) def test_makedirs_race_handling(self): """ File storage should be robust against directory creation race conditions. """ real_makedirs = os.makedirs # Monkey-patch os.makedirs, to simulate a normal call, a raced call, # and an error. def fake_makedirs(path, mode=0o777, exist_ok=False): if path == os.path.join(self.temp_dir, "normal"): real_makedirs(path, mode, exist_ok) elif path == os.path.join(self.temp_dir, "raced"): real_makedirs(path, mode, exist_ok) if not exist_ok: raise FileExistsError() elif path == os.path.join(self.temp_dir, "error"): raise PermissionError() else: self.fail("unexpected argument %r" % path) try: os.makedirs = fake_makedirs self.storage.save("normal/test.file", ContentFile("saved normally")) with self.storage.open("normal/test.file") as f: self.assertEqual(f.read(), b"saved normally") self.storage.save("raced/test.file", ContentFile("saved with race")) with self.storage.open("raced/test.file") as f: self.assertEqual(f.read(), b"saved with race") # Exceptions aside from FileExistsError are raised. with self.assertRaises(PermissionError): self.storage.save("error/test.file", ContentFile("not saved")) finally: os.makedirs = real_makedirs def test_remove_race_handling(self): """ File storage should be robust against file removal race conditions. """ real_remove = os.remove # Monkey-patch os.remove, to simulate a normal call, a raced call, # and an error. def fake_remove(path): if path == os.path.join(self.temp_dir, "normal.file"): real_remove(path) elif path == os.path.join(self.temp_dir, "raced.file"): real_remove(path) raise FileNotFoundError() elif path == os.path.join(self.temp_dir, "error.file"): raise PermissionError() else: self.fail("unexpected argument %r" % path) try: os.remove = fake_remove self.storage.save("normal.file", ContentFile("delete normally")) self.storage.delete("normal.file") self.assertFalse(self.storage.exists("normal.file")) self.storage.save("raced.file", ContentFile("delete with race")) self.storage.delete("raced.file") self.assertFalse(self.storage.exists("normal.file")) # Exceptions aside from FileNotFoundError are raised. self.storage.save("error.file", ContentFile("delete with error")) with self.assertRaises(PermissionError): self.storage.delete("error.file") finally: os.remove = real_remove def test_file_chunks_error(self): """ Test behavior when file.chunks() is raising an error """ f1 = ContentFile("chunks fails") def failing_chunks(): raise OSError f1.chunks = failing_chunks with self.assertRaises(OSError): self.storage.save("error.file", f1) def test_delete_no_name(self): """ Calling delete with an empty name should not try to remove the base storage directory, but fail loudly (#20660). """ msg = "The name must be given to delete()." with self.assertRaisesMessage(ValueError, msg): self.storage.delete(None) with self.assertRaisesMessage(ValueError, msg): self.storage.delete("") def test_delete_deletes_directories(self): tmp_dir = tempfile.mkdtemp(dir=self.storage.location) self.storage.delete(tmp_dir) self.assertFalse(os.path.exists(tmp_dir)) @override_settings( MEDIA_ROOT="media_root", MEDIA_URL="media_url/", FILE_UPLOAD_PERMISSIONS=0o777, FILE_UPLOAD_DIRECTORY_PERMISSIONS=0o777, ) def test_setting_changed(self): """ Properties using settings values as defaults should be updated on referenced settings change while specified values should be unchanged. """ storage = self.storage_class( location="explicit_location", base_url="explicit_base_url/", file_permissions_mode=0o666, directory_permissions_mode=0o666, ) defaults_storage = self.storage_class() settings = { "MEDIA_ROOT": "overridden_media_root", "MEDIA_URL": "/overridden_media_url/", "FILE_UPLOAD_PERMISSIONS": 0o333, "FILE_UPLOAD_DIRECTORY_PERMISSIONS": 0o333, } with self.settings(**settings): self.assertEqual(storage.base_location, "explicit_location") self.assertIn("explicit_location", storage.location) self.assertEqual(storage.base_url, "explicit_base_url/") self.assertEqual(storage.file_permissions_mode, 0o666) self.assertEqual(storage.directory_permissions_mode, 0o666) self.assertEqual(defaults_storage.base_location, settings["MEDIA_ROOT"]) self.assertIn(settings["MEDIA_ROOT"], defaults_storage.location) self.assertEqual(defaults_storage.base_url, settings["MEDIA_URL"]) self.assertEqual( defaults_storage.file_permissions_mode, settings["FILE_UPLOAD_PERMISSIONS"], ) self.assertEqual( defaults_storage.directory_permissions_mode, settings["FILE_UPLOAD_DIRECTORY_PERMISSIONS"], ) def test_file_methods_pathlib_path(self): p = Path("test.file") self.assertFalse(self.storage.exists(p)) f = ContentFile("custom contents") f_name = self.storage.save(p, f) # Storage basic methods. self.assertEqual(self.storage.path(p), os.path.join(self.temp_dir, p)) self.assertEqual(self.storage.size(p), 15) self.assertEqual(self.storage.url(p), self.storage.base_url + f_name) with self.storage.open(p) as f: self.assertEqual(f.read(), b"custom contents") self.addCleanup(self.storage.delete, p) class CustomStorage(FileSystemStorage): def get_available_name(self, name, max_length=None): """ Append numbers to duplicate files rather than underscores, like Trac. """ basename, *ext = os.path.splitext(name) number = 2 while self.exists(name): name = "".join([basename, ".", str(number)] + ext) number += 1 return name class CustomStorageTests(FileStorageTests): storage_class = CustomStorage def test_custom_get_available_name(self): first = self.storage.save("custom_storage", ContentFile("custom contents")) self.assertEqual(first, "custom_storage") second = self.storage.save("custom_storage", ContentFile("more contents")) self.assertEqual(second, "custom_storage.2") self.storage.delete(first) self.storage.delete(second) class OverwritingStorageTests(FileStorageTests): storage_class = FileSystemStorage def setUp(self): self.temp_dir = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, self.temp_dir) self.storage = self.storage_class( location=self.temp_dir, base_url="/test_media_url/", allow_overwrite=True ) def test_save_overwrite_behavior(self): """Saving to same file name twice overwrites the first file.""" name = "test.file" self.assertFalse(self.storage.exists(name)) content_1 = b"content one" content_2 = b"second content" f_1 = ContentFile(content_1) f_2 = ContentFile(content_2) stored_name_1 = self.storage.save(name, f_1) try: self.assertEqual(stored_name_1, name) self.assertTrue(self.storage.exists(name)) with self.storage.open(name) as fp: self.assertEqual(fp.read(), content_1) stored_name_2 = self.storage.save(name, f_2) self.assertEqual(stored_name_2, name) self.assertTrue(self.storage.exists(name)) with self.storage.open(name) as fp: self.assertEqual(fp.read(), content_2) finally: self.storage.delete(name) def test_save_overwrite_behavior_truncate(self): name = "test.file" original_content = b"content extra extra extra" new_smaller_content = b"content" self.storage.save(name, ContentFile(original_content)) try: self.storage.save(name, ContentFile(new_smaller_content)) with self.storage.open(name) as fp: self.assertEqual(fp.read(), new_smaller_content) finally: self.storage.delete(name) def test_save_overwrite_behavior_temp_file(self): """Saving to same file name twice overwrites the first file.""" name = "test.file" self.assertFalse(self.storage.exists(name)) content_1 = b"content one" content_2 = b"second content" f_1 = TemporaryUploadedFile("tmp1", "text/plain", 11, "utf8") self.addCleanup(f_1.close) f_1.write(content_1) f_1.seek(0) f_2 = TemporaryUploadedFile("tmp2", "text/plain", 14, "utf8") self.addCleanup(f_2.close) f_2.write(content_2) f_2.seek(0) stored_name_1 = self.storage.save(name, f_1) try: self.assertEqual(stored_name_1, name) self.assertTrue(os.path.exists(os.path.join(self.temp_dir, name))) with self.storage.open(name) as fp: self.assertEqual(fp.read(), content_1) stored_name_2 = self.storage.save(name, f_2) self.assertEqual(stored_name_2, name) self.assertTrue(os.path.exists(os.path.join(self.temp_dir, name))) with self.storage.open(name) as fp: self.assertEqual(fp.read(), content_2) finally: self.storage.delete(name) def test_file_name_truncation(self): name = "test_long_file_name.txt" file = ContentFile(b"content") stored_name = self.storage.save(name, file, max_length=10) self.addCleanup(self.storage.delete, stored_name) self.assertEqual(stored_name, "test_l.txt") self.assertEqual(len(stored_name), 10) def test_file_name_truncation_extension_too_long(self): name = "file_name.longext" file = ContentFile(b"content") with self.assertRaisesMessage( SuspiciousFileOperation, "Storage can not find an available filename" ): self.storage.save(name, file, max_length=5) class DiscardingFalseContentStorage(FileSystemStorage): def _save(self, name, content): if content: return super()._save(name, content) return "" class DiscardingFalseContentStorageTests(FileStorageTests): storage_class = DiscardingFalseContentStorage def test_custom_storage_discarding_empty_content(self): """ When Storage.save() wraps a file-like object in File, it should include the name argument so that bool(file) evaluates to True (#26495). """ output = StringIO("content") self.storage.save("tests/stringio", output) self.assertTrue(self.storage.exists("tests/stringio")) with self.storage.open("tests/stringio") as f: self.assertEqual(f.read(), b"content") class FileFieldStorageTests(TestCase): def tearDown(self): if os.path.exists(temp_storage_location): shutil.rmtree(temp_storage_location) def _storage_max_filename_length(self, storage): """ Query filesystem for maximum filename length (e.g. AUFS has 242). """ dir_to_test = storage.location while not os.path.exists(dir_to_test): dir_to_test = os.path.dirname(dir_to_test) try: return os.pathconf(dir_to_test, "PC_NAME_MAX") except Exception: return 255 # Should be safe on most backends def test_files(self): self.assertIsInstance(Storage.normal, FileDescriptor) # An object without a file has limited functionality. obj1 = Storage() self.assertEqual(obj1.normal.name, "") with self.assertRaises(ValueError): obj1.normal.size # Saving a file enables full functionality. obj1.normal.save("django_test.txt", ContentFile("content")) self.assertEqual(obj1.normal.name, "tests/django_test.txt") self.assertEqual(obj1.normal.size, 7) self.assertEqual(obj1.normal.read(), b"content") obj1.normal.close() # File objects can be assigned to FileField attributes, but shouldn't # get committed until the model it's attached to is saved. obj1.normal = SimpleUploadedFile("assignment.txt", b"content") dirs, files = temp_storage.listdir("tests") self.assertEqual(dirs, []) self.assertNotIn("assignment.txt", files) obj1.save() dirs, files = temp_storage.listdir("tests") self.assertEqual(sorted(files), ["assignment.txt", "django_test.txt"]) # Save another file with the same name. obj2 = Storage() obj2.normal.save("django_test.txt", ContentFile("more content")) obj2_name = obj2.normal.name self.assertRegex(obj2_name, "tests/django_test_%s.txt" % FILE_SUFFIX_REGEX) self.assertEqual(obj2.normal.size, 12) obj2.normal.close() # Deleting an object does not delete the file it uses. obj2.delete() obj2.normal.save("django_test.txt", ContentFile("more content")) self.assertNotEqual(obj2_name, obj2.normal.name) self.assertRegex( obj2.normal.name, "tests/django_test_%s.txt" % FILE_SUFFIX_REGEX ) obj2.normal.close() def test_filefield_read(self): # Files can be read in a little at a time, if necessary. obj = Storage.objects.create( normal=SimpleUploadedFile("assignment.txt", b"content") ) obj.normal.open() self.assertEqual(obj.normal.read(3), b"con") self.assertEqual(obj.normal.read(), b"tent") self.assertEqual( list(obj.normal.chunks(chunk_size=2)), [b"co", b"nt", b"en", b"t"] ) obj.normal.close() def test_filefield_write(self): # Files can be written to. obj = Storage.objects.create( normal=SimpleUploadedFile("rewritten.txt", b"content") ) with obj.normal as normal: normal.open("wb") normal.write(b"updated") obj.refresh_from_db() self.assertEqual(obj.normal.read(), b"updated") obj.normal.close() def test_filefield_reopen(self): obj = Storage.objects.create( normal=SimpleUploadedFile("reopen.txt", b"content") ) with obj.normal as normal: normal.open() obj.normal.open() obj.normal.file.seek(0) obj.normal.close() def test_duplicate_filename(self): # Multiple files with the same name get _(7 random chars) appended to # them. tests = [ ("multiple_files", "txt"), ("multiple_files_many_extensions", "tar.gz"), ] for filename, extension in tests: with self.subTest(filename=filename): objs = [Storage() for i in range(2)] for o in objs: o.normal.save(f"{filename}.{extension}", ContentFile("Content")) try: names = [o.normal.name for o in objs] self.assertEqual(names[0], f"tests/{filename}.{extension}") self.assertRegex( names[1], f"tests/{filename}_{FILE_SUFFIX_REGEX}.{extension}" ) finally: for o in objs: o.delete() def test_file_truncation(self): # Given the max_length is limited, when multiple files get uploaded # under the same name, then the filename get truncated in order to fit # in _(7 random chars). When most of the max_length is taken by # dirname + extension and there are not enough characters in the # filename to truncate, an exception should be raised. objs = [Storage() for i in range(2)] filename = "filename.ext" for o in objs: o.limited_length.save(filename, ContentFile("Same Content")) try: # Testing truncation. names = [o.limited_length.name for o in objs] self.assertEqual(names[0], "tests/%s" % filename) self.assertRegex(names[1], "tests/fi_%s.ext" % FILE_SUFFIX_REGEX) # Testing exception is raised when filename is too short to # truncate. filename = "short.longext" objs[0].limited_length.save(filename, ContentFile("Same Content")) with self.assertRaisesMessage( SuspiciousFileOperation, "Storage can not find an available filename" ): objs[1].limited_length.save(*(filename, ContentFile("Same Content"))) finally: for o in objs: o.delete() @unittest.skipIf( sys.platform == "win32", "Windows supports at most 260 characters in a path.", ) def test_extended_length_storage(self): # Testing FileField with max_length > 255. Most systems have filename # length limitation of 255. Path takes extra chars. filename = ( self._storage_max_filename_length(temp_storage) - 4 ) * "a" # 4 chars for extension. obj = Storage() obj.extended_length.save("%s.txt" % filename, ContentFile("Same Content")) self.assertEqual(obj.extended_length.name, "tests/%s.txt" % filename) self.assertEqual(obj.extended_length.read(), b"Same Content") obj.extended_length.close() def test_filefield_default(self): # Default values allow an object to access a single file. temp_storage.save("tests/default.txt", ContentFile("default content")) obj = Storage.objects.create() self.assertEqual(obj.default.name, "tests/default.txt") self.assertEqual(obj.default.read(), b"default content") obj.default.close() # But it shouldn't be deleted, even if there are no more objects using # it. obj.delete() obj = Storage() self.assertEqual(obj.default.read(), b"default content") obj.default.close() def test_filefield_db_default(self): temp_storage.save("tests/db_default.txt", ContentFile("default content")) obj = Storage.objects.create() self.assertEqual(obj.db_default.name, "tests/db_default.txt") self.assertEqual(obj.db_default.read(), b"default content") obj.db_default.close() # File is not deleted, even if there are no more objects using it. obj.delete() s = Storage() self.assertEqual(s.db_default.name, "tests/db_default.txt") self.assertEqual(s.db_default.read(), b"default content") s.db_default.close() def test_empty_upload_to(self): # upload_to can be empty, meaning it does not use subdirectory. obj = Storage() obj.empty.save("django_test.txt", ContentFile("more content")) self.assertEqual(obj.empty.name, "django_test.txt") self.assertEqual(obj.empty.read(), b"more content") obj.empty.close() def test_pathlib_upload_to(self): obj = Storage() obj.pathlib_callable.save("some_file1.txt", ContentFile("some content")) self.assertEqual(obj.pathlib_callable.name, "bar/some_file1.txt") obj.pathlib_direct.save("some_file2.txt", ContentFile("some content")) self.assertEqual(obj.pathlib_direct.name, "bar/some_file2.txt") obj.random.close() def test_random_upload_to(self): # Verify the fix for #5655, making sure the directory is only # determined once. obj = Storage() obj.random.save("random_file", ContentFile("random content")) self.assertTrue(obj.random.name.endswith("/random_file")) obj.random.close() def test_custom_valid_name_callable_upload_to(self): """ Storage.get_valid_name() should be called when upload_to is a callable. """ obj = Storage() obj.custom_valid_name.save("random_file", ContentFile("random content")) # CustomValidNameStorage.get_valid_name() appends '_valid' to the name self.assertTrue(obj.custom_valid_name.name.endswith("/random_file_valid")) obj.custom_valid_name.close() def test_filefield_pickling(self): # Push an object into the cache to make sure it pickles properly obj = Storage() obj.normal.save("django_test.txt", ContentFile("more content")) obj.normal.close() cache.set("obj", obj) self.assertEqual(cache.get("obj").normal.name, "tests/django_test.txt") def test_file_object(self): # Create sample file temp_storage.save("tests/example.txt", ContentFile("some content")) # Load it as Python file object with open(temp_storage.path("tests/example.txt")) as file_obj: # Save it using storage and read its content temp_storage.save("tests/file_obj", file_obj) self.assertTrue(temp_storage.exists("tests/file_obj")) with temp_storage.open("tests/file_obj") as f: self.assertEqual(f.read(), b"some content") def test_stringio(self): # Test passing StringIO instance as content argument to save output = StringIO() output.write("content") output.seek(0) # Save it and read written file temp_storage.save("tests/stringio", output) self.assertTrue(temp_storage.exists("tests/stringio")) with temp_storage.open("tests/stringio") as f: self.assertEqual(f.read(), b"content") @override_settings( STORAGES={ DEFAULT_STORAGE_ALIAS: { "BACKEND": "django.core.files.storage.InMemoryStorage" } } ) def test_create_file_field_from_another_file_field_in_memory_storage(self): f = ContentFile("content", "file.txt") obj = Storage.objects.create(storage_callable_default=f) new_obj = Storage.objects.create( storage_callable_default=obj.storage_callable_default.file ) storage = callable_default_storage() with storage.open(new_obj.storage_callable_default.name) as f: self.assertEqual(f.read(), b"content") class FieldCallableFileStorageTests(SimpleTestCase): def setUp(self): self.temp_storage_location = tempfile.mkdtemp( suffix="filefield_callable_storage" ) self.addCleanup(shutil.rmtree, self.temp_storage_location) def test_callable_base_class_error_raises(self): class NotStorage: pass msg = ( "FileField.storage must be a subclass/instance of " "django.core.files.storage.base.Storage" ) for invalid_type in (NotStorage, str, list, set, tuple): with self.subTest(invalid_type=invalid_type): with self.assertRaisesMessage(TypeError, msg): FileField(storage=invalid_type) def test_file_field_storage_none_uses_default_storage(self): self.assertEqual(FileField().storage, default_storage) def test_callable_function_storage_file_field(self): storage = FileSystemStorage(location=self.temp_storage_location) def get_storage(): return storage obj = FileField(storage=get_storage) self.assertEqual(obj.storage, storage) self.assertEqual(obj.storage.location, storage.location) def test_callable_class_storage_file_field(self): class GetStorage(FileSystemStorage): pass obj = FileField(storage=GetStorage) self.assertIsInstance(obj.storage, BaseStorage) def test_callable_storage_file_field_in_model(self): obj = Storage() self.assertEqual(obj.storage_callable.storage, temp_storage) self.assertEqual(obj.storage_callable.storage.location, temp_storage_location) self.assertIsInstance(obj.storage_callable_class.storage, BaseStorage) def test_deconstruction(self): """ Deconstructing gives the original callable, not the evaluated value. """ obj = Storage() *_, kwargs = obj._meta.get_field("storage_callable").deconstruct() storage = kwargs["storage"] self.assertIs(storage, callable_storage) def test_deconstruction_storage_callable_default(self): """ A callable that returns default_storage is not omitted when deconstructing. """ obj = Storage() *_, kwargs = obj._meta.get_field("storage_callable_default").deconstruct() self.assertIs(kwargs["storage"], callable_default_storage) # Tests for a race condition on file saving (#4948). # This is written in such a way that it'll always pass on platforms # without threading. class SlowFile(ContentFile): def chunks(self): time.sleep(1) return super().chunks() class FileSaveRaceConditionTest(SimpleTestCase): def setUp(self): self.storage_dir = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, self.storage_dir) self.storage = FileSystemStorage(self.storage_dir) self.thread = threading.Thread(target=self.save_file, args=["conflict"]) def save_file(self, name): name = self.storage.save(name, SlowFile(b"Data")) def test_race_condition(self): self.thread.start() self.save_file("conflict") self.thread.join() files = sorted(os.listdir(self.storage_dir)) self.assertEqual(files[0], "conflict") self.assertRegex(files[1], "conflict_%s" % FILE_SUFFIX_REGEX) @unittest.skipIf( sys.platform == "win32", "Windows only partially supports umasks and chmod." ) class FileStoragePermissions(unittest.TestCase): def setUp(self): self.umask = 0o027 old_umask = os.umask(self.umask) self.addCleanup(os.umask, old_umask) self.storage_dir = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, self.storage_dir) @override_settings(FILE_UPLOAD_PERMISSIONS=0o654) def test_file_upload_permissions(self): self.storage = FileSystemStorage(self.storage_dir) name = self.storage.save("the_file", ContentFile("data")) actual_mode = os.stat(self.storage.path(name))[0] & 0o777 self.assertEqual(actual_mode, 0o654) @override_settings(FILE_UPLOAD_PERMISSIONS=None) def test_file_upload_default_permissions(self): self.storage = FileSystemStorage(self.storage_dir) fname = self.storage.save("some_file", ContentFile("data")) mode = os.stat(self.storage.path(fname))[0] & 0o777 self.assertEqual(mode, 0o666 & ~self.umask) @override_settings(FILE_UPLOAD_DIRECTORY_PERMISSIONS=0o765) def test_file_upload_directory_permissions(self): self.storage = FileSystemStorage(self.storage_dir) name = self.storage.save("the_directory/subdir/the_file", ContentFile("data")) file_path = Path(self.storage.path(name)) self.assertEqual(file_path.parent.stat().st_mode & 0o777, 0o765) self.assertEqual(file_path.parent.parent.stat().st_mode & 0o777, 0o765) @override_settings(FILE_UPLOAD_DIRECTORY_PERMISSIONS=None) def test_file_upload_directory_default_permissions(self): self.storage = FileSystemStorage(self.storage_dir) name = self.storage.save("the_directory/subdir/the_file", ContentFile("data")) file_path = Path(self.storage.path(name)) expected_mode = 0o777 & ~self.umask self.assertEqual(file_path.parent.stat().st_mode & 0o777, expected_mode) self.assertEqual(file_path.parent.parent.stat().st_mode & 0o777, expected_mode) class FileStoragePathParsing(SimpleTestCase): def setUp(self): self.storage_dir = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, self.storage_dir) self.storage = FileSystemStorage(self.storage_dir) def test_directory_with_dot(self): """Regression test for #9610. If the directory name contains a dot and the file name doesn't, make sure we still mangle the file name instead of the directory name. """ self.storage.save("dotted.path/test", ContentFile("1")) self.storage.save("dotted.path/test", ContentFile("2")) files = sorted(os.listdir(os.path.join(self.storage_dir, "dotted.path"))) self.assertFalse(os.path.exists(os.path.join(self.storage_dir, "dotted_.path"))) self.assertEqual(files[0], "test") self.assertRegex(files[1], "test_%s" % FILE_SUFFIX_REGEX) def test_first_character_dot(self): """ File names with a dot as their first character don't have an extension, and the underscore should get added to the end. """ self.storage.save("dotted.path/.test", ContentFile("1")) self.storage.save("dotted.path/.test", ContentFile("2")) files = sorted(os.listdir(os.path.join(self.storage_dir, "dotted.path"))) self.assertFalse(os.path.exists(os.path.join(self.storage_dir, "dotted_.path"))) self.assertEqual(files[0], ".test") self.assertRegex(files[1], ".test_%s" % FILE_SUFFIX_REGEX) class ContentFileStorageTestCase(unittest.TestCase): def setUp(self): storage_dir = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, storage_dir) self.storage = FileSystemStorage(storage_dir) def test_content_saving(self): """ ContentFile can be saved correctly with the filesystem storage, if it was initialized with either bytes or unicode content. """ self.storage.save("bytes.txt", ContentFile(b"content")) self.storage.save("unicode.txt", ContentFile("español")) @override_settings(ROOT_URLCONF="file_storage.urls") class FileLikeObjectTestCase(LiveServerTestCase): """ Test file-like objects (#15644). """ available_apps = [] def setUp(self): self.temp_dir = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, self.temp_dir) self.storage = FileSystemStorage(location=self.temp_dir) def test_urllib_request_urlopen(self): """ Test the File storage API with a file-like object coming from urllib.request.urlopen(). """ file_like_object = urlopen(self.live_server_url + "/") f = File(file_like_object) stored_filename = self.storage.save("remote_file.html", f) remote_file = urlopen(self.live_server_url + "/") with self.storage.open(stored_filename) as stored_file: self.assertEqual(stored_file.read(), remote_file.read()) class StorageHandlerTests(SimpleTestCase): @override_settings( STORAGES={ "custom_storage": { "BACKEND": "django.core.files.storage.FileSystemStorage", }, } ) def test_same_instance(self): cache1 = storages["custom_storage"] cache2 = storages["custom_storage"] self.assertIs(cache1, cache2) def test_defaults(self): storages = StorageHandler() self.assertEqual( storages.backends, { DEFAULT_STORAGE_ALIAS: { "BACKEND": "django.core.files.storage.FileSystemStorage", }, STATICFILES_STORAGE_ALIAS: { "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage", }, }, ) def test_nonexistent_alias(self): msg = "Could not find config for 'nonexistent' in settings.STORAGES." storages = StorageHandler() with self.assertRaisesMessage(InvalidStorageError, msg): storages["nonexistent"] def test_nonexistent_backend(self): test_storages = StorageHandler( { "invalid_backend": { "BACKEND": "django.nonexistent.NonexistentBackend", }, } ) msg = ( "Could not find backend 'django.nonexistent.NonexistentBackend': " "No module named 'django.nonexistent'" ) with self.assertRaisesMessage(InvalidStorageError, msg): test_storages["invalid_backend"] class StorageLazyObjectTests(SimpleTestCase): def test_lazy_object_is_not_evaluated_before_manual_access(self): obj = Storage() self.assertIs(obj.lazy_storage.storage._wrapped, empty) # assertEqual triggers resolution. self.assertEqual(obj.lazy_storage.storage, temp_storage)
python
github
https://github.com/django/django
tests/file_storage/tests.py
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import collections import logging import threading import grpc from grpc import _common from grpc._cython import cygrpc class _AuthMetadataContext( collections.namedtuple('AuthMetadataContext', ( 'service_url', 'method_name', )), grpc.AuthMetadataContext): pass class _CallbackState(object): def __init__(self): self.lock = threading.Lock() self.called = False self.exception = None class _AuthMetadataPluginCallback(grpc.AuthMetadataPluginCallback): def __init__(self, state, callback): self._state = state self._callback = callback def __call__(self, metadata, error): with self._state.lock: if self._state.exception is None: if self._state.called: raise RuntimeError( 'AuthMetadataPluginCallback invoked more than once!') else: self._state.called = True else: raise RuntimeError( 'AuthMetadataPluginCallback raised exception "{}"!'.format( self._state.exception)) if error is None: self._callback(metadata, cygrpc.StatusCode.ok, None) else: self._callback(None, cygrpc.StatusCode.internal, _common.encode(str(error))) class _Plugin(object): def __init__(self, metadata_plugin): self._metadata_plugin = metadata_plugin def __call__(self, service_url, method_name, callback): context = _AuthMetadataContext( _common.decode(service_url), _common.decode(method_name)) callback_state = _CallbackState() try: self._metadata_plugin(context, _AuthMetadataPluginCallback( callback_state, callback)) except Exception as exception: # pylint: disable=broad-except logging.exception( 'AuthMetadataPluginCallback "%s" raised exception!', self._metadata_plugin) with callback_state.lock: callback_state.exception = exception if callback_state.called: return callback(None, cygrpc.StatusCode.internal, _common.encode(str(exception))) def metadata_plugin_call_credentials(metadata_plugin, name): if name is None: try: effective_name = metadata_plugin.__name__ except AttributeError: effective_name = metadata_plugin.__class__.__name__ else: effective_name = name return grpc.CallCredentials( cygrpc.MetadataPluginCallCredentials( _Plugin(metadata_plugin), _common.encode(effective_name)))
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import sys import os import deadpool_dfa import phoenixAES import binascii def processinput(iblock, blocksize): #p=b'%0*x' % (2*blocksize, iblock) # Requires python3.5 p=('%0*x' % (2*blocksize, iblock)).encode('utf8') open('foo', 'wb').write(binascii.unhexlify(p)*4) return (None, ['-f', '-E', 'foo']) def processoutput(output, blocksize): return int(binascii.hexlify(output[:16]), 16) # Patch drmless to always return decrypted version: if not os.path.isfile('drmless.gold'): with open('drmless', 'rb') as finput, open('drmless.gold', 'wb') as foutput: foutput.write(finput.read(0x6C18)+b'\x01'+finput.read()[1:]) engine=deadpool_dfa.Acquisition(targetbin='./drmless', targetdata='./drmless', goldendata='drmless.gold', dfa=phoenixAES, processinput=processinput, processoutput=processoutput, maxleaf=2048, faults=[('nop', lambda x: 0x90)], verbose=2) tracefiles_sets=engine.run() for trace in tracefiles_sets[1]: if phoenixAES.crack_file(trace, encrypt=False): break
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import collections import mock import testtools from neutron.plugins.cisco.common import cisco_constants from neutron.plugins.cisco.common import cisco_credentials_v2 from neutron.plugins.cisco.common import cisco_exceptions as c_exc from neutron.plugins.cisco.common import config as config from neutron.plugins.cisco.db import network_db_v2 as cdb from neutron.plugins.cisco import network_plugin from neutron.tests.unit import testlib_api class CiscoNetworkDbTest(testlib_api.SqlTestCase): """Base class for Cisco network database unit tests.""" def setUp(self): super(CiscoNetworkDbTest, self).setUp() # The Cisco network plugin includes a thin layer of QoS and # credential API methods which indirectly call Cisco QoS and # credential database access methods. For better code coverage, # this test suite will make calls to the QoS and credential database # access methods indirectly through the network plugin. The network # plugin's init function can be mocked out for this purpose. def new_network_plugin_init(instance): pass with mock.patch.object(network_plugin.PluginV2, '__init__', new=new_network_plugin_init): self._network_plugin = network_plugin.PluginV2() class CiscoNetworkQosDbTest(CiscoNetworkDbTest): """Unit tests for Cisco network QoS database model.""" QosObj = collections.namedtuple('QosObj', 'tenant qname desc') def _qos_test_obj(self, tnum, qnum, desc=None): """Create a Qos test object from a pair of numbers.""" if desc is None: desc = 'test qos %s-%s' % (str(tnum), str(qnum)) tenant = 'tenant_%s' % str(tnum) qname = 'qos_%s' % str(qnum) return self.QosObj(tenant, qname, desc) def _assert_equal(self, qos, qos_obj): self.assertEqual(qos.tenant_id, qos_obj.tenant) self.assertEqual(qos.qos_name, qos_obj.qname) self.assertEqual(qos.qos_desc, qos_obj.desc) def test_qos_add_remove(self): qos11 = self._qos_test_obj(1, 1) qos = self._network_plugin.create_qos(qos11.tenant, qos11.qname, qos11.desc) self._assert_equal(qos, qos11) qos_id = qos.qos_id qos = self._network_plugin.delete_qos(qos11.tenant, qos_id) self._assert_equal(qos, qos11) qos = self._network_plugin.delete_qos(qos11.tenant, qos_id) self.assertIsNone(qos) def test_qos_add_dup(self): qos22 = self._qos_test_obj(2, 2) qos = self._network_plugin.create_qos(qos22.tenant, qos22.qname, qos22.desc) self._assert_equal(qos, qos22) qos_id = qos.qos_id with testtools.ExpectedException(c_exc.QosNameAlreadyExists): self._network_plugin.create_qos(qos22.tenant, qos22.qname, "duplicate 22") qos = self._network_plugin.delete_qos(qos22.tenant, qos_id) self._assert_equal(qos, qos22) qos = self._network_plugin.delete_qos(qos22.tenant, qos_id) self.assertIsNone(qos) def test_qos_get(self): qos11 = self._qos_test_obj(1, 1) qos11_id = self._network_plugin.create_qos(qos11.tenant, qos11.qname, qos11.desc).qos_id qos21 = self._qos_test_obj(2, 1) qos21_id = self._network_plugin.create_qos(qos21.tenant, qos21.qname, qos21.desc).qos_id qos22 = self._qos_test_obj(2, 2) qos22_id = self._network_plugin.create_qos(qos22.tenant, qos22.qname, qos22.desc).qos_id qos = self._network_plugin.get_qos_details(qos11.tenant, qos11_id) self._assert_equal(qos, qos11) qos = self._network_plugin.get_qos_details(qos21.tenant, qos21_id) self._assert_equal(qos, qos21) qos = self._network_plugin.get_qos_details(qos21.tenant, qos22_id) self._assert_equal(qos, qos22) with testtools.ExpectedException(c_exc.QosNotFound): self._network_plugin.get_qos_details(qos11.tenant, "dummyQosId") with testtools.ExpectedException(c_exc.QosNotFound): self._network_plugin.get_qos_details(qos11.tenant, qos21_id) with testtools.ExpectedException(c_exc.QosNotFound): self._network_plugin.get_qos_details(qos21.tenant, qos11_id) qos_all_t1 = self._network_plugin.get_all_qoss(qos11.tenant) self.assertEqual(len(qos_all_t1), 1) qos_all_t2 = self._network_plugin.get_all_qoss(qos21.tenant) self.assertEqual(len(qos_all_t2), 2) qos_all_t3 = self._network_plugin.get_all_qoss("tenant3") self.assertEqual(len(qos_all_t3), 0) def test_qos_update(self): qos11 = self._qos_test_obj(1, 1) qos11_id = self._network_plugin.create_qos(qos11.tenant, qos11.qname, qos11.desc).qos_id self._network_plugin.rename_qos(qos11.tenant, qos11_id, new_name=None) new_qname = "new qos name" new_qos = self._network_plugin.rename_qos(qos11.tenant, qos11_id, new_qname) expected_qobj = self.QosObj(qos11.tenant, new_qname, qos11.desc) self._assert_equal(new_qos, expected_qobj) new_qos = self._network_plugin.get_qos_details(qos11.tenant, qos11_id) self._assert_equal(new_qos, expected_qobj) with testtools.ExpectedException(c_exc.QosNotFound): self._network_plugin.rename_qos(qos11.tenant, "dummyQosId", new_name=None) class CiscoNetworkCredentialDbTest(CiscoNetworkDbTest): """Unit tests for Cisco network credentials database model.""" CredObj = collections.namedtuple('CredObj', 'cname usr pwd ctype') def _cred_test_obj(self, tnum, cnum): """Create a Credential test object from a pair of numbers.""" cname = 'credential_%s_%s' % (str(tnum), str(cnum)) usr = 'User_%s_%s' % (str(tnum), str(cnum)) pwd = 'Password_%s_%s' % (str(tnum), str(cnum)) ctype = 'ctype_%s' % str(tnum) return self.CredObj(cname, usr, pwd, ctype) def _assert_equal(self, credential, cred_obj): self.assertEqual(credential.type, cred_obj.ctype) self.assertEqual(credential.credential_name, cred_obj.cname) self.assertEqual(credential.user_name, cred_obj.usr) self.assertEqual(credential.password, cred_obj.pwd) def test_credential_add_remove(self): cred11 = self._cred_test_obj(1, 1) cred = cdb.add_credential( cred11.cname, cred11.usr, cred11.pwd, cred11.ctype) self._assert_equal(cred, cred11) cred_id = cred.credential_id cred = cdb.remove_credential(cred_id) self._assert_equal(cred, cred11) cred = cdb.remove_credential(cred_id) self.assertIsNone(cred) def test_credential_add_dup(self): cred22 = self._cred_test_obj(2, 2) cred = cdb.add_credential( cred22.cname, cred22.usr, cred22.pwd, cred22.ctype) self._assert_equal(cred, cred22) cred_id = cred.credential_id with testtools.ExpectedException(c_exc.CredentialAlreadyExists): cdb.add_credential( cred22.cname, cred22.usr, cred22.pwd, cred22.ctype) cred = cdb.remove_credential(cred_id) self._assert_equal(cred, cred22) cred = cdb.remove_credential(cred_id) self.assertIsNone(cred) def test_credential_get_id(self): cred11 = self._cred_test_obj(1, 1) cred11_id = cdb.add_credential( cred11.cname, cred11.usr, cred11.pwd, cred11.ctype).credential_id cred21 = self._cred_test_obj(2, 1) cred21_id = cdb.add_credential( cred21.cname, cred21.usr, cred21.pwd, cred21.ctype).credential_id cred22 = self._cred_test_obj(2, 2) cred22_id = cdb.add_credential( cred22.cname, cred22.usr, cred22.pwd, cred22.ctype).credential_id cred = self._network_plugin.get_credential_details(cred11_id) self._assert_equal(cred, cred11) cred = self._network_plugin.get_credential_details(cred21_id) self._assert_equal(cred, cred21) cred = self._network_plugin.get_credential_details(cred22_id) self._assert_equal(cred, cred22) with testtools.ExpectedException(c_exc.CredentialNotFound): self._network_plugin.get_credential_details("dummyCredentialId") cred_all_t1 = self._network_plugin.get_all_credentials() self.assertEqual(len(cred_all_t1), 3) def test_credential_get_name(self): cred11 = self._cred_test_obj(1, 1) cred11_id = cdb.add_credential( cred11.cname, cred11.usr, cred11.pwd, cred11.ctype).credential_id cred21 = self._cred_test_obj(2, 1) cred21_id = cdb.add_credential( cred21.cname, cred21.usr, cred21.pwd, cred21.ctype).credential_id cred22 = self._cred_test_obj(2, 2) cred22_id = cdb.add_credential( cred22.cname, cred22.usr, cred22.pwd, cred22.ctype).credential_id self.assertNotEqual(cred11_id, cred21_id) self.assertNotEqual(cred11_id, cred22_id) self.assertNotEqual(cred21_id, cred22_id) cred = cdb.get_credential_name(cred11.cname) self._assert_equal(cred, cred11) cred = cdb.get_credential_name(cred21.cname) self._assert_equal(cred, cred21) cred = cdb.get_credential_name(cred22.cname) self._assert_equal(cred, cred22) with testtools.ExpectedException(c_exc.CredentialNameNotFound): cdb.get_credential_name("dummyCredentialName") def test_credential_update(self): cred11 = self._cred_test_obj(1, 1) cred11_id = cdb.add_credential( cred11.cname, cred11.usr, cred11.pwd, cred11.ctype).credential_id self._network_plugin.rename_credential(cred11_id, new_name=None, new_password=None) new_usr = "new user name" new_pwd = "new password" new_credential = self._network_plugin.rename_credential( cred11_id, new_usr, new_pwd) expected_cred = self.CredObj( cred11.cname, new_usr, new_pwd, cred11.ctype) self._assert_equal(new_credential, expected_cred) new_credential = self._network_plugin.get_credential_details( cred11_id) self._assert_equal(new_credential, expected_cred) with testtools.ExpectedException(c_exc.CredentialNotFound): self._network_plugin.rename_credential( "dummyCredentialId", new_usr, new_pwd) def test_get_credential_not_found_exception(self): self.assertRaises(c_exc.CredentialNotFound, self._network_plugin.get_credential_details, "dummyCredentialId") def test_credential_delete_all_n1kv(self): cred_nexus_1 = self._cred_test_obj('nexus', 1) cred_nexus_2 = self._cred_test_obj('nexus', 2) cred_n1kv_1 = self.CredObj('n1kv-1', 'cisco', '123456', 'n1kv') cred_n1kv_2 = self.CredObj('n1kv-2', 'cisco', '123456', 'n1kv') cred_nexus_1_id = cdb.add_credential( cred_nexus_1.cname, cred_nexus_1.usr, cred_nexus_1.pwd, cred_nexus_1.ctype).credential_id cred_nexus_2_id = cdb.add_credential( cred_nexus_2.cname, cred_nexus_2.usr, cred_nexus_2.pwd, cred_nexus_2.ctype).credential_id cred_n1kv_1_id = cdb.add_credential( cred_n1kv_1.cname, cred_n1kv_1.usr, cred_n1kv_1.pwd, cred_n1kv_1.ctype).credential_id cred_n1kv_2_id = cdb.add_credential( cred_n1kv_2.cname, cred_n1kv_2.usr, cred_n1kv_2.pwd, cred_n1kv_2.ctype).credential_id cdb.delete_all_n1kv_credentials() cred = cdb.get_credential(cred_nexus_1_id) self.assertIsNotNone(cred) cred = cdb.get_credential(cred_nexus_2_id) self.assertIsNotNone(cred) self.assertRaises(c_exc.CredentialNotFound, cdb.get_credential, cred_n1kv_1_id) self.assertRaises(c_exc.CredentialNotFound, cdb.get_credential, cred_n1kv_2_id) class CiscoCredentialStoreTest(testlib_api.SqlTestCase): """Cisco Credential Store unit tests.""" def test_cred_store_init_duplicate_creds_ignored(self): """Check that with multi store instances, dup creds are ignored.""" # Create a device dictionary containing credentials for 1 switch. dev_dict = { ('dev_id', '1.1.1.1', cisco_constants.USERNAME): 'user_1', ('dev_id', '1.1.1.1', cisco_constants.PASSWORD): 'password_1', ('dev_id', '1.1.1.1', 'host_a'): '1/1', ('dev_id', '1.1.1.1', 'host_b'): '1/2', ('dev_id', '1.1.1.1', 'host_c'): '1/3', } with mock.patch.object(config, 'get_device_dictionary', return_value=dev_dict): # Create and initialize 2 instances of credential store. cisco_credentials_v2.Store().initialize() cisco_credentials_v2.Store().initialize() # There should be only 1 switch credential in the database. self.assertEqual(len(cdb.get_all_credentials()), 1)
unknown
codeparrot/codeparrot-clean
""" Helper module for Python version 2.7 - Ordered dictionaries - Encoding/decoding urls - Unicode - Exception handling (except Exception as e) """ import base64 from urllib import unquote, quote from collections import OrderedDict def modulename(): return "Helper module for Python version 2.7" def url_decode(uri): return unquote(uri) def url_encode(uri): return quote(uri) def new_dictionary(): return OrderedDict() def dictionary_keys(dictionary): return list(dictionary.keys()) def dictionary_values(dictionary): return list(dictionary.values()) def data_read(data): # Data for reading/receiving already a string in version 2.* return data def data_write(data): # Using string in version 2.* for sending/writing data return data def base64_decode(data): return base64.b64decode(data) def base64_encode(data): return base64.b64encode(data) def unicode_chr(code): return unichr(code) def unicode_string(string): if isinstance(string, unicode): return string return string.decode('utf8', 'replace') def is_digit(string): # Check if basestring (str, unicode) is digit return isinstance(string, basestring) and string.isdigit() def is_number(value): return isinstance(value, (int, long))
unknown
codeparrot/codeparrot-clean
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> # UI End-to-End Tests End-to-end tests for the Airflow UI using Playwright. ## Running Tests ### Using Breeze (Recommended) The easiest way to run the tests: ```bash breeze testing ui-e2e-tests # Run specific browser breeze testing ui-e2e-tests --browser firefox # Run specific test breeze testing ui-e2e-tests --test-pattern "dag-trigger.spec.ts" # Debug mode breeze testing ui-e2e-tests --debug-e2e # See the browser breeze testing ui-e2e-tests --headed ``` ### Direct Execution If you already have Airflow running on `http://localhost:8080`: ```bash cd airflow-core/src/airflow/ui pnpm install pnpm test:e2e:install pnpm test:e2e ``` ## CI Integration Tests run in GitHub Actions via workflow dispatch. The workflow uses `breeze testing ui-e2e-tests` which handles starting Airflow with docker-compose, running the tests, and cleanup. To run manually: 1. Go to Actions → UI End-to-End Tests 2. Click Run workflow 3. Select browser and other options ## Directory Structure ``` tests/e2e/ ├── pages/ # Page objects │ ├── BasePage.ts │ ├── LoginPage.ts │ └── DagsPage.ts └── specs/ # Test files └── dag-trigger.spec.ts ``` ## Writing Tests We use the Page Object Model pattern: ```typescript // pages/DagPage.ts export class DagPage extends BasePage { readonly pauseButton: Locator; constructor(page: Page) { super(page); this.pauseButton = page.locator('[data-testid="dag-pause"]'); } async pause() { await this.pauseButton.click(); } } // specs/dag.spec.ts test('pause DAG', async ({ page }) => { const dagPage = new DagPage(page); await dagPage.goto(); await dagPage.pause(); await expect(dagPage.pauseButton).toHaveAttribute('aria-pressed', 'true'); }); ``` ## Configuration Environment variables (with defaults): - `AIRFLOW_UI_BASE_URL` - Airflow URL (default: `http://localhost:8080`) - `TEST_USERNAME` - Username (default: `airflow`) - `TEST_PASSWORD` - Password (default: `airflow`) - `TEST_DAG_ID` - Test DAG ID (default: `example_bash_operator`) ## Debugging View test report after running locally: ```bash pnpm test:e2e:report ``` When tests fail in CI, check the uploaded artifacts for screenshots and HTML reports. ## Breeze Options ```bash breeze testing ui-e2e-tests --help ``` Common options: - `--browser` - chromium, firefox, webkit, or all - `--headed` - Show browser window - `--debug-e2e` - Enable Playwright inspector - `--ui-mode` - Interactive UI mode - `--test-pattern` - Run specific test file - `--workers` - Number of parallel workers ## Contributing New Tests This framework uses the **Page Object Model (POM)** pattern. Each page's elements and interactions are encapsulated in a page class. ### Steps to Add a New Test 1. **Create a page object** (if needed) in `pages/` - Extend `BasePage` and define page elements as locators - Add methods for page interactions - See existing pages: [LoginPage.ts](pages/LoginPage.ts), [DagsPage.ts](pages/DagsPage.ts) 2. **Create a spec file** in `specs/` - Import page objects and write test steps - See existing test: [dag-trigger.spec.ts](specs/dag-trigger.spec.ts) 3. **Run tests locally** ```bash breeze testing ui-e2e-tests --test-pattern "your-test.spec.ts" ``` 4. **Submit PR** ### Best Practices - Use `data-testid` attributes for selectors when available - Keep tests independent - each test should set up its own state - Add meaningful assertions, not just navigation checks ### Naming Convention - Spec files: `<feature>.spec.ts` - Page objects: `<Page>Page.ts` - Test names: Start with "should"
unknown
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/tests/e2e/README.md
package remote import ( "bytes" "context" "encoding/json" "errors" "fmt" "io" "net" "net/http" "net/http/httptest" "os" "path/filepath" "runtime" "testing" "github.com/moby/moby/v2/daemon/libnetwork/discoverapi" "github.com/moby/moby/v2/daemon/libnetwork/driverapi" "github.com/moby/moby/v2/daemon/libnetwork/options" "github.com/moby/moby/v2/daemon/libnetwork/scope" "github.com/moby/moby/v2/daemon/libnetwork/types" "github.com/moby/moby/v2/pkg/plugins" "gotest.tools/v3/assert" ) func handle(t *testing.T, mux *http.ServeMux, method string, h func(map[string]any) any) { mux.HandleFunc(fmt.Sprintf("/%s.%s", driverapi.NetworkPluginEndpointType, method), func(w http.ResponseWriter, r *http.Request) { var ask map[string]any err := json.NewDecoder(r.Body).Decode(&ask) if err != nil && !errors.Is(err, io.EOF) { t.Fatal(err) } answer := h(ask) err = json.NewEncoder(w).Encode(&answer) if err != nil { t.Fatal(err) } }) } func setupPlugin(t *testing.T, name string, mux *http.ServeMux) func() { specPath := "/etc/docker/plugins" if runtime.GOOS == "windows" { specPath = filepath.Join(os.Getenv("programdata"), "docker", "plugins") } if err := os.MkdirAll(specPath, 0o755); err != nil { t.Fatal(err) } defer func() { if t.Failed() { _ = os.RemoveAll(specPath) } }() server := httptest.NewServer(mux) if server == nil { t.Fatal("Failed to start an HTTP Server") } if err := os.WriteFile(filepath.Join(specPath, name+".spec"), []byte(server.URL), 0o644); err != nil { t.Fatal(err) } mux.HandleFunc("/Plugin.Activate", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", plugins.VersionMimetype) fmt.Fprintf(w, `{"Implements": ["%s"]}`, driverapi.NetworkPluginEndpointType) }) return func() { if err := os.RemoveAll(specPath); err != nil { t.Fatal(err) } server.Close() } } type testEndpoint struct { t *testing.T srcName string dstPrefix string dstName string address string addressIPv6 string macAddress string gateway string gatewayIPv6 string resolvConfPath string hostsPath string nextHop string destination string routeType types.RouteType disableGatewayService bool } func (test *testEndpoint) Address() *net.IPNet { if test.address == "" { return nil } nw, _ := types.ParseCIDR(test.address) return nw } func (test *testEndpoint) AddressIPv6() *net.IPNet { if test.addressIPv6 == "" { return nil } nw, _ := types.ParseCIDR(test.addressIPv6) return nw } func (test *testEndpoint) MacAddress() net.HardwareAddr { if test.macAddress == "" { return nil } mac, _ := net.ParseMAC(test.macAddress) return mac } func (test *testEndpoint) SetMacAddress(mac net.HardwareAddr) error { if test.macAddress != "" { return types.ForbiddenErrorf("endpoint interface MAC address present (%s). Cannot be modified with %s.", test.macAddress, mac) } if mac == nil { return types.InvalidParameterErrorf("tried to set nil MAC address to endpoint interface") } test.macAddress = mac.String() return nil } func (test *testEndpoint) SetIPAddress(address *net.IPNet) error { if address.IP == nil { return types.InvalidParameterErrorf("tried to set nil IP address to endpoint interface") } if address.IP.To4() == nil { return setAddress(&test.addressIPv6, address) } return setAddress(&test.address, address) } func setAddress(ifaceAddr *string, address *net.IPNet) error { if *ifaceAddr != "" { return types.ForbiddenErrorf("endpoint interface IP present (%s). Cannot be modified with (%s).", *ifaceAddr, address) } *ifaceAddr = address.String() return nil } func (test *testEndpoint) InterfaceName() driverapi.InterfaceNameInfo { return test } func compareIPs(t *testing.T, kind string, shouldBe string, supplied net.IP) { ip := net.ParseIP(shouldBe) if ip == nil { t.Fatalf(`Invalid IP to test against: "%s"`, shouldBe) } if !ip.Equal(supplied) { t.Fatalf(`%s IPs are not equal: expected "%s", got %v`, kind, shouldBe, supplied) } } func compareIPNets(t *testing.T, kind string, shouldBe string, supplied net.IPNet) { _, ipNet, _ := net.ParseCIDR(shouldBe) if ipNet == nil { t.Fatalf(`Invalid IP network to test against: "%s"`, shouldBe) } if !types.CompareIPNet(ipNet, &supplied) { t.Fatalf(`%s IP networks are not equal: expected "%s", got %v`, kind, shouldBe, supplied) } } func (test *testEndpoint) SetGateway(ipv4 net.IP) error { compareIPs(test.t, "Gateway", test.gateway, ipv4) return nil } func (test *testEndpoint) SetGatewayIPv6(ipv6 net.IP) error { compareIPs(test.t, "GatewayIPv6", test.gatewayIPv6, ipv6) return nil } func (test *testEndpoint) NetnsPath() string { return "" } func (test *testEndpoint) SetCreatedInContainer(bool) {} func (test *testEndpoint) SetNames(srcName, dstPrefix, dstName string) error { assert.Equal(test.t, test.srcName, srcName) assert.Equal(test.t, test.dstPrefix, dstPrefix) assert.Equal(test.t, test.dstName, dstName) return nil } func (test *testEndpoint) AddStaticRoute(destination *net.IPNet, routeType types.RouteType, nextHop net.IP) error { compareIPNets(test.t, "Destination", test.destination, *destination) compareIPs(test.t, "NextHop", test.nextHop, nextHop) if test.routeType != routeType { test.t.Fatalf(`Wrong RouteType; expected "%d", got "%d"`, test.routeType, routeType) } return nil } func (test *testEndpoint) DisableGatewayService() { test.disableGatewayService = true } func (test *testEndpoint) ForceGw4() {} func (test *testEndpoint) ForceGw6() {} func (test *testEndpoint) AddTableEntry(tableName string, key string, value []byte) error { return nil } func TestGetEmptyCapabilities(t *testing.T) { plugin := "test-net-driver-empty-cap" mux := http.NewServeMux() defer setupPlugin(t, plugin, mux)() handle(t, mux, "GetCapabilities", func(msg map[string]any) any { return map[string]any{} }) p, err := plugins.Get(plugin, driverapi.NetworkPluginEndpointType) if err != nil { t.Fatal(err) } client, err := getPluginClient(p) if err != nil { t.Fatal(err) } d := newDriver(plugin, client) if d.Type() != plugin { t.Fatal("Driver type does not match that given") } _, err = d.getCapabilities() if err == nil { t.Fatal("There should be error reported when get empty capability") } } func TestGetExtraCapabilities(t *testing.T) { plugin := "test-net-driver-extra-cap" mux := http.NewServeMux() defer setupPlugin(t, plugin, mux)() handle(t, mux, "GetCapabilities", func(msg map[string]any) any { return map[string]any{ "Scope": "local", "foo": "bar", "ConnectivityScope": "global", } }) p, err := plugins.Get(plugin, driverapi.NetworkPluginEndpointType) if err != nil { t.Fatal(err) } client, err := getPluginClient(p) if err != nil { t.Fatal(err) } d := newDriver(plugin, client) if d.Type() != plugin { t.Fatal("Driver type does not match that given") } c, err := d.getCapabilities() if err != nil { t.Fatal(err) } else if c.DataScope != scope.Local { t.Fatalf("get capability '%s', expecting 'local'", c.DataScope) } else if c.ConnectivityScope != scope.Global { t.Fatalf("get capability '%s', expecting %q", c.ConnectivityScope, scope.Global) } } func TestGetInvalidCapabilities(t *testing.T) { plugin := "test-net-driver-invalid-cap" mux := http.NewServeMux() defer setupPlugin(t, plugin, mux)() handle(t, mux, "GetCapabilities", func(msg map[string]any) any { return map[string]any{ "Scope": "fake", } }) p, err := plugins.Get(plugin, driverapi.NetworkPluginEndpointType) if err != nil { t.Fatal(err) } client, err := getPluginClient(p) if err != nil { t.Fatal(err) } d := newDriver(plugin, client) if d.Type() != plugin { t.Fatal("Driver type does not match that given") } _, err = d.getCapabilities() if err == nil { t.Fatal("There should be error reported when get invalid capability") } } func TestRemoteDriver(t *testing.T) { plugin := "test-net-driver" ep := &testEndpoint{ t: t, srcName: "vethsrc", dstPrefix: "vethdst", address: "192.168.5.7/16", addressIPv6: "2001:DB8::5:7/48", macAddress: "ab:cd:ef:ee:ee:ee", gateway: "192.168.0.1", gatewayIPv6: "2001:DB8::1", hostsPath: "/here/comes/the/host/path", resolvConfPath: "/there/goes/the/resolv/conf", destination: "10.0.0.0/8", nextHop: "10.0.0.1", routeType: types.CONNECTED, } mux := http.NewServeMux() defer setupPlugin(t, plugin, mux)() var networkID string handle(t, mux, "GetCapabilities", func(msg map[string]any) any { return map[string]any{ "Scope": "global", "GwAllocChecker": true, } }) handle(t, mux, "GwAllocCheck", func(msg map[string]any) any { options := msg["Options"].(map[string]any) return map[string]any{ "SkipIPv4": options["skip4"].(bool), "SkipIPv6": options["skip6"].(bool), } }) handle(t, mux, "CreateNetwork", func(msg map[string]any) any { nid := msg["NetworkID"] var ok bool if networkID, ok = nid.(string); !ok { t.Fatal("RPC did not include network ID string") } return map[string]any{} }) handle(t, mux, "DeleteNetwork", func(msg map[string]any) any { if nid, ok := msg["NetworkID"]; !ok || nid != networkID { t.Fatal("Network ID missing or does not match that created") } return map[string]any{} }) handle(t, mux, "CreateEndpoint", func(msg map[string]any) any { iface := map[string]any{ "MacAddress": ep.macAddress, "Address": ep.address, "AddressIPv6": ep.addressIPv6, } return map[string]any{ "Interface": iface, } }) handle(t, mux, "Join", func(msg map[string]any) any { opts := msg["Options"].(map[string]any) foo, ok := opts["foo"].(string) if !ok || foo != "fooValue" { t.Fatalf("Did not receive expected foo string in request options: %+v", msg) } return map[string]any{ "Gateway": ep.gateway, "GatewayIPv6": ep.gatewayIPv6, "HostsPath": ep.hostsPath, "ResolvConfPath": ep.resolvConfPath, "InterfaceName": map[string]any{ "SrcName": ep.srcName, "DstPrefix": ep.dstPrefix, "DstName": ep.dstName, }, "StaticRoutes": []map[string]any{ { "Destination": ep.destination, "RouteType": ep.routeType, "NextHop": ep.nextHop, }, }, } }) handle(t, mux, "Leave", func(msg map[string]any) any { return map[string]string{} }) handle(t, mux, "DeleteEndpoint", func(msg map[string]any) any { return map[string]any{} }) handle(t, mux, "EndpointOperInfo", func(msg map[string]any) any { return map[string]any{ "Value": map[string]string{ "Arbitrary": "key", "Value": "pairs?", }, } }) handle(t, mux, "DiscoverNew", func(msg map[string]any) any { return map[string]string{} }) handle(t, mux, "DiscoverDelete", func(msg map[string]any) any { return map[string]any{} }) p, err := plugins.Get(plugin, driverapi.NetworkPluginEndpointType) if err != nil { t.Fatal(err) } client, err := getPluginClient(p) if err != nil { t.Fatal(err) } d := newDriver(plugin, client) if d.Type() != plugin { t.Fatal("Driver type does not match that given") } c, err := d.getCapabilities() if err != nil { t.Fatal(err) } else if c.DataScope != scope.Global { t.Fatalf("get capability '%s', expecting 'global'", c.DataScope) } skipIPv4, skipIPv6, err := d.GetSkipGwAlloc(options.Generic{"skip4": true, "skip6": false}) if err != nil { t.Fatal(err) } else if !skipIPv4 || skipIPv6 { t.Fatalf("GetSkipGwAlloc, got skipIPv4:%t skipIPv6:%t", skipIPv4, skipIPv6) } skipIPv4, skipIPv6, err = d.GetSkipGwAlloc(options.Generic{"skip4": false, "skip6": true}) if err != nil { t.Fatal(err) } else if skipIPv4 || !skipIPv6 { t.Fatalf("GetSkipGwAlloc, got skipIPv4:%t skipIPv6:%t", skipIPv4, skipIPv6) } netID := "dummy-network" err = d.CreateNetwork(context.Background(), netID, map[string]any{}, nil, nil, nil) if err != nil { t.Fatal(err) } endID := "dummy-endpoint" ifInfo := &testEndpoint{} err = d.CreateEndpoint(context.Background(), netID, endID, ifInfo, map[string]any{}) if err != nil { t.Fatal(err) } if !bytes.Equal(ep.MacAddress(), ifInfo.MacAddress()) || !types.CompareIPNet(ep.Address(), ifInfo.Address()) || !types.CompareIPNet(ep.AddressIPv6(), ifInfo.AddressIPv6()) { t.Fatalf("Unexpected InterfaceInfo data. Expected (%s, %s, %s). Got (%v, %v, %v)", ep.MacAddress(), ep.Address(), ep.AddressIPv6(), ifInfo.MacAddress(), ifInfo.Address(), ifInfo.AddressIPv6()) } joinOpts := map[string]any{"foo": "fooValue"} err = d.Join(context.Background(), netID, endID, "sandbox-key", ep, nil, joinOpts) if err != nil { t.Fatal(err) } if _, err = d.EndpointOperInfo(netID, endID); err != nil { t.Fatal(err) } if err = d.Leave(netID, endID); err != nil { t.Fatal(err) } if err = d.DeleteEndpoint(netID, endID); err != nil { t.Fatal(err) } if err = d.DeleteNetwork(netID); err != nil { t.Fatal(err) } data := discoverapi.NodeDiscoveryData{ Address: "192.168.1.1", } if err = d.DiscoverNew(discoverapi.NodeDiscovery, data); err != nil { t.Fatal(err) } if err = d.DiscoverDelete(discoverapi.NodeDiscovery, data); err != nil { t.Fatal(err) } } func TestDriverError(t *testing.T) { plugin := "test-net-driver-error" mux := http.NewServeMux() defer setupPlugin(t, plugin, mux)() handle(t, mux, "CreateEndpoint", func(msg map[string]any) any { return map[string]any{ "Err": "this should get raised as an error", } }) p, err := plugins.Get(plugin, driverapi.NetworkPluginEndpointType) if err != nil { t.Fatal(err) } client, err := getPluginClient(p) if err != nil { t.Fatal(err) } d := newDriver(plugin, client) if err := d.CreateEndpoint(context.Background(), "dummy", "dummy", &testEndpoint{t: t}, map[string]any{}); err == nil { t.Fatal("Expected error from driver") } } func TestMissingValues(t *testing.T) { plugin := "test-net-driver-missing" mux := http.NewServeMux() defer setupPlugin(t, plugin, mux)() ep := &testEndpoint{ t: t, } handle(t, mux, "CreateEndpoint", func(msg map[string]any) any { iface := map[string]any{ "Address": ep.address, "AddressIPv6": ep.addressIPv6, "MacAddress": ep.macAddress, } return map[string]any{ "Interface": iface, } }) p, err := plugins.Get(plugin, driverapi.NetworkPluginEndpointType) if err != nil { t.Fatal(err) } client, err := getPluginClient(p) if err != nil { t.Fatal(err) } d := newDriver(plugin, client) if err := d.CreateEndpoint(context.Background(), "dummy", "dummy", ep, map[string]any{}); err != nil { t.Fatal(err) } } type rollbackEndpoint struct{} func (r *rollbackEndpoint) Interface() *rollbackEndpoint { return r } func (r *rollbackEndpoint) MacAddress() net.HardwareAddr { return nil } func (r *rollbackEndpoint) Address() *net.IPNet { return nil } func (r *rollbackEndpoint) AddressIPv6() *net.IPNet { return nil } func (r *rollbackEndpoint) SetMacAddress(mac net.HardwareAddr) error { return errors.New("invalid mac") } func (r *rollbackEndpoint) SetIPAddress(ip *net.IPNet) error { return errors.New("invalid ip") } func (r *rollbackEndpoint) NetnsPath() string { return "" } func (r *rollbackEndpoint) SetCreatedInContainer(bool) {} func TestRollback(t *testing.T) { plugin := "test-net-driver-rollback" mux := http.NewServeMux() defer setupPlugin(t, plugin, mux)() rolledback := false handle(t, mux, "CreateEndpoint", func(msg map[string]any) any { iface := map[string]any{ "Address": "192.168.4.5/16", "AddressIPv6": "", "MacAddress": "7a:12:34:56:78:90", } return map[string]any{ "Interface": any(iface), } }) handle(t, mux, "DeleteEndpoint", func(msg map[string]any) any { rolledback = true return map[string]any{} }) p, err := plugins.Get(plugin, driverapi.NetworkPluginEndpointType) if err != nil { t.Fatal(err) } client, err := getPluginClient(p) if err != nil { t.Fatal(err) } d := newDriver(plugin, client) ep := &rollbackEndpoint{} if err := d.CreateEndpoint(context.Background(), "dummy", "dummy", ep.Interface(), map[string]any{}); err == nil { t.Fatal("Expected error from driver") } if !rolledback { t.Fatal("Expected to have had DeleteEndpoint called") } }
go
github
https://github.com/moby/moby
daemon/libnetwork/drivers/remote/driver_test.go
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.exceptions.base; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import org.junit.Test; import org.mockitoutil.TestBase; public class MockitoAssertionErrorTest extends TestBase { private void throwIt() { throw new MockitoAssertionError("boom"); } @Test public void shouldKeepUnfilteredStackTrace() { try { throwIt(); fail(); } catch (MockitoAssertionError e) { assertEquals("throwIt", e.getUnfilteredStackTrace()[0].getMethodName()); } } @Test public void should_prepend_message_to_original() { MockitoAssertionError original = new MockitoAssertionError("original message"); MockitoAssertionError errorWithPrependedMessage = new MockitoAssertionError(original, "new message"); assertEquals("new message\noriginal message", errorWithPrependedMessage.getMessage()); } }
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockito/exceptions/base/MockitoAssertionErrorTest.java
<?php namespace Illuminate\Tests\Database; use Illuminate\Contracts\Support\Arrayable; enum StringStatus: string { case draft = 'draft'; case pending = 'pending'; case done = 'done'; } enum IntegerStatus: int { case draft = 0; case pending = 1; case done = 2; } enum NonBackedStatus { case draft; case pending; case done; } enum ArrayableStatus: string implements Arrayable { case pending = 'pending'; case done = 'done'; public function description(): string { return match ($this) { self::pending => 'pending status description', self::done => 'done status description' }; } public function toArray() { return [ 'name' => $this->name, 'value' => $this->value, 'description' => $this->description(), ]; } }
php
github
https://github.com/laravel/framework
tests/Database/Enums.php
"""Extend ExpatParser with hydroshare-specific functionality.""" import base64 import os.path from StringIO import StringIO from xml.sax import xmlreader, saxutils from xml.sax.expatreader import ExpatParser from django.conf import settings XML_CACHE = os.path.join(settings.PROJECT_ROOT, '_xmlcache') class CatalogedExpatParser(ExpatParser): """Extend ExpatParser with cataloging capabilities.""" def external_entity_ref(self, context, base, sysid, pubid): """Add external entity reference to XML document.""" if not self._external_ges: return 1 source = self._ent_handler.resolveEntity(pubid, sysid) source = saxutils.prepare_input_source(source, self._source.getSystemId() or "") # If an entry does not exist in the xml cache, create it. filepath = os.path.join(XML_CACHE, base64.urlsafe_b64encode(pubid)) if not os.path.isfile(filepath): with open(filepath, 'w') as f: contents = source.getByteStream().read() source.setByteStream(StringIO(contents)) f.write(contents) self._entity_stack.append((self._parser, self._source)) self._parser = self._parser.ExternalEntityParserCreate(context) self._source = source try: xmlreader.IncrementalParser.parse(self, source) except: return 0 # FIXME: save error info here? (self._parser, self._source) = self._entity_stack[-1] del self._entity_stack[-1] return 1 class CatalogEntityResolver(object): """Respove catalog entities based on file path.""" def resolveEntity(self, publicId, systemId): """Respove catalog entities based on file path.""" filepath = os.path.join(XML_CACHE, base64.urlsafe_b64encode(publicId)) if os.path.isfile(filepath): source = xmlreader.InputSource() with open(filepath, 'r') as f: source.setByteStream(StringIO(f.read())) return source return systemId def create_parser(*args, **kwargs): """Create extended XML parser.""" parser = CatalogedExpatParser(*args, **kwargs) parser.setEntityResolver(CatalogEntityResolver()) return parser
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package reflect import ( "internal/abi" "internal/goarch" "unsafe" ) // These variables are used by the register assignment // algorithm in this file. // // They should be modified with care (no other reflect code // may be executing) and are generally only modified // when testing this package. // // They should never be set higher than their internal/abi // constant counterparts, because the system relies on a // structure that is at least large enough to hold the // registers the system supports. // // Currently they're set to zero because using the actual // constants will break every part of the toolchain that // uses reflect to call functions (e.g. go test, or anything // that uses text/template). The values that are currently // commented out there should be the actual values once // we're ready to use the register ABI everywhere. var ( intArgRegs = abi.IntArgRegs floatArgRegs = abi.FloatArgRegs floatRegSize = uintptr(abi.EffectiveFloatRegSize) ) // abiStep represents an ABI "instruction." Each instruction // describes one part of how to translate between a Go value // in memory and a call frame. type abiStep struct { kind abiStepKind // offset and size together describe a part of a Go value // in memory. offset uintptr size uintptr // size in bytes of the part // These fields describe the ABI side of the translation. stkOff uintptr // stack offset, used if kind == abiStepStack ireg int // integer register index, used if kind == abiStepIntReg or kind == abiStepPointer freg int // FP register index, used if kind == abiStepFloatReg } // abiStepKind is the "op-code" for an abiStep instruction. type abiStepKind int const ( abiStepBad abiStepKind = iota abiStepStack // copy to/from stack abiStepIntReg // copy to/from integer register abiStepPointer // copy pointer to/from integer register abiStepFloatReg // copy to/from FP register ) // abiSeq represents a sequence of ABI instructions for copying // from a series of reflect.Values to a call frame (for call arguments) // or vice-versa (for call results). // // An abiSeq should be populated by calling its addArg method. type abiSeq struct { // steps is the set of instructions. // // The instructions are grouped together by whole arguments, // with the starting index for the instructions // of the i'th Go value available in valueStart. // // For instance, if this abiSeq represents 3 arguments // passed to a function, then the 2nd argument's steps // begin at steps[valueStart[1]]. // // Because reflect accepts Go arguments in distinct // Values and each Value is stored separately, each abiStep // that begins a new argument will have its offset // field == 0. steps []abiStep valueStart []int stackBytes uintptr // stack space used iregs, fregs int // registers used } func (a *abiSeq) dump() { for i, p := range a.steps { println("part", i, p.kind, p.offset, p.size, p.stkOff, p.ireg, p.freg) } print("values ") for _, i := range a.valueStart { print(i, " ") } println() println("stack", a.stackBytes) println("iregs", a.iregs) println("fregs", a.fregs) } // stepsForValue returns the ABI instructions for translating // the i'th Go argument or return value represented by this // abiSeq to the Go ABI. func (a *abiSeq) stepsForValue(i int) []abiStep { s := a.valueStart[i] var e int if i == len(a.valueStart)-1 { e = len(a.steps) } else { e = a.valueStart[i+1] } return a.steps[s:e] } // addArg extends the abiSeq with a new Go value of type t. // // If the value was stack-assigned, returns the single // abiStep describing that translation, and nil otherwise. func (a *abiSeq) addArg(t *abi.Type) *abiStep { // We'll always be adding a new value, so do that first. pStart := len(a.steps) a.valueStart = append(a.valueStart, pStart) if t.Size() == 0 { // If the size of the argument type is zero, then // in order to degrade gracefully into ABI0, we need // to stack-assign this type. The reason is that // although zero-sized types take up no space on the // stack, they do cause the next argument to be aligned. // So just do that here, but don't bother actually // generating a new ABI step for it (there's nothing to // actually copy). // // We cannot handle this in the recursive case of // regAssign because zero-sized *fields* of a // non-zero-sized struct do not cause it to be // stack-assigned. So we need a special case here // at the top. a.stackBytes = align(a.stackBytes, uintptr(t.Align())) return nil } // Hold a copy of "a" so that we can roll back if // register assignment fails. aOld := *a if !a.regAssign(t, 0) { // Register assignment failed. Roll back any changes // and stack-assign. *a = aOld a.stackAssign(t.Size(), uintptr(t.Align())) return &a.steps[len(a.steps)-1] } return nil } // addRcvr extends the abiSeq with a new method call // receiver according to the interface calling convention. // // If the receiver was stack-assigned, returns the single // abiStep describing that translation, and nil otherwise. // Returns true if the receiver is a pointer. func (a *abiSeq) addRcvr(rcvr *abi.Type) (*abiStep, bool) { // The receiver is always one word. a.valueStart = append(a.valueStart, len(a.steps)) var ok, ptr bool if !rcvr.IsDirectIface() || rcvr.Pointers() { ok = a.assignIntN(0, goarch.PtrSize, 1, 0b1) ptr = true } else { // TODO(mknyszek): Is this case even possible? // The interface data work never contains a non-pointer // value. This case was copied over from older code // in the reflect package which only conditionally added // a pointer bit to the reflect.(Value).Call stack frame's // GC bitmap. ok = a.assignIntN(0, goarch.PtrSize, 1, 0b0) ptr = false } if !ok { a.stackAssign(goarch.PtrSize, goarch.PtrSize) return &a.steps[len(a.steps)-1], ptr } return nil, ptr } // regAssign attempts to reserve argument registers for a value of // type t, stored at some offset. // // It returns whether or not the assignment succeeded, but // leaves any changes it made to a.steps behind, so the caller // must undo that work by adjusting a.steps if it fails. // // This method along with the assign* methods represent the // complete register-assignment algorithm for the Go ABI. func (a *abiSeq) regAssign(t *abi.Type, offset uintptr) bool { switch Kind(t.Kind()) { case UnsafePointer, Pointer, Chan, Map, Func: return a.assignIntN(offset, t.Size(), 1, 0b1) case Bool, Int, Uint, Int8, Uint8, Int16, Uint16, Int32, Uint32, Uintptr: return a.assignIntN(offset, t.Size(), 1, 0b0) case Int64, Uint64: switch goarch.PtrSize { case 4: return a.assignIntN(offset, 4, 2, 0b0) case 8: return a.assignIntN(offset, 8, 1, 0b0) } case Float32, Float64: return a.assignFloatN(offset, t.Size(), 1) case Complex64: return a.assignFloatN(offset, 4, 2) case Complex128: return a.assignFloatN(offset, 8, 2) case String: return a.assignIntN(offset, goarch.PtrSize, 2, 0b01) case Interface: return a.assignIntN(offset, goarch.PtrSize, 2, 0b10) case Slice: return a.assignIntN(offset, goarch.PtrSize, 3, 0b001) case Array: tt := (*arrayType)(unsafe.Pointer(t)) switch tt.Len { case 0: // There's nothing to assign, so don't modify // a.steps but succeed so the caller doesn't // try to stack-assign this value. return true case 1: return a.regAssign(tt.Elem, offset) default: return false } case Struct: st := (*structType)(unsafe.Pointer(t)) for i := range st.Fields { f := &st.Fields[i] if !a.regAssign(f.Typ, offset+f.Offset) { return false } } return true default: print("t.Kind == ", t.Kind(), "\n") panic("unknown type kind") } panic("unhandled register assignment path") } // assignIntN assigns n values to registers, each "size" bytes large, // from the data at [offset, offset+n*size) in memory. Each value at // [offset+i*size, offset+(i+1)*size) for i < n is assigned to the // next n integer registers. // // Bit i in ptrMap indicates whether the i'th value is a pointer. // n must be <= 8. // // Returns whether assignment succeeded. func (a *abiSeq) assignIntN(offset, size uintptr, n int, ptrMap uint8) bool { if n > 8 || n < 0 { panic("invalid n") } if ptrMap != 0 && size != goarch.PtrSize { panic("non-empty pointer map passed for non-pointer-size values") } if a.iregs+n > intArgRegs { return false } for i := 0; i < n; i++ { kind := abiStepIntReg if ptrMap&(uint8(1)<<i) != 0 { kind = abiStepPointer } a.steps = append(a.steps, abiStep{ kind: kind, offset: offset + uintptr(i)*size, size: size, ireg: a.iregs, }) a.iregs++ } return true } // assignFloatN assigns n values to registers, each "size" bytes large, // from the data at [offset, offset+n*size) in memory. Each value at // [offset+i*size, offset+(i+1)*size) for i < n is assigned to the // next n floating-point registers. // // Returns whether assignment succeeded. func (a *abiSeq) assignFloatN(offset, size uintptr, n int) bool { if n < 0 { panic("invalid n") } if a.fregs+n > floatArgRegs || floatRegSize < size { return false } for i := 0; i < n; i++ { a.steps = append(a.steps, abiStep{ kind: abiStepFloatReg, offset: offset + uintptr(i)*size, size: size, freg: a.fregs, }) a.fregs++ } return true } // stackAssign reserves space for one value that is "size" bytes // large with alignment "alignment" to the stack. // // Should not be called directly; use addArg instead. func (a *abiSeq) stackAssign(size, alignment uintptr) { a.stackBytes = align(a.stackBytes, alignment) a.steps = append(a.steps, abiStep{ kind: abiStepStack, offset: 0, // Only used for whole arguments, so the memory offset is 0. size: size, stkOff: a.stackBytes, }) a.stackBytes += size } // abiDesc describes the ABI for a function or method. type abiDesc struct { // call and ret represent the translation steps for // the call and return paths of a Go function. call, ret abiSeq // These fields describe the stack space allocated // for the call. stackCallArgsSize is the amount of space // reserved for arguments but not return values. retOffset // is the offset at which return values begin, and // spill is the size in bytes of additional space reserved // to spill argument registers into in case of preemption in // reflectcall's stack frame. stackCallArgsSize, retOffset, spill uintptr // stackPtrs is a bitmap that indicates whether // each word in the ABI stack space (stack-assigned // args + return values) is a pointer. Used // as the heap pointer bitmap for stack space // passed to reflectcall. stackPtrs *bitVector // inRegPtrs is a bitmap whose i'th bit indicates // whether the i'th integer argument register contains // a pointer. Used by makeFuncStub and methodValueCall // to make result pointers visible to the GC. // // outRegPtrs is the same, but for result values. // Used by reflectcall to make result pointers visible // to the GC. inRegPtrs, outRegPtrs abi.IntArgRegBitmap } func (a *abiDesc) dump() { println("ABI") println("call") a.call.dump() println("ret") a.ret.dump() println("stackCallArgsSize", a.stackCallArgsSize) println("retOffset", a.retOffset) println("spill", a.spill) print("inRegPtrs:") dumpPtrBitMap(a.inRegPtrs) println() print("outRegPtrs:") dumpPtrBitMap(a.outRegPtrs) println() } func dumpPtrBitMap(b abi.IntArgRegBitmap) { for i := 0; i < intArgRegs; i++ { x := 0 if b.Get(i) { x = 1 } print(" ", x) } } func newAbiDesc(t *funcType, rcvr *abi.Type) abiDesc { // We need to add space for this argument to // the frame so that it can spill args into it. // // The size of this space is just the sum of the sizes // of each register-allocated type. // // TODO(mknyszek): Remove this when we no longer have // caller reserved spill space. spill := uintptr(0) // Compute gc program & stack bitmap for stack arguments stackPtrs := new(bitVector) // Compute the stack frame pointer bitmap and register // pointer bitmap for arguments. inRegPtrs := abi.IntArgRegBitmap{} // Compute abiSeq for input parameters. var in abiSeq if rcvr != nil { stkStep, isPtr := in.addRcvr(rcvr) if stkStep != nil { if isPtr { stackPtrs.append(1) } else { stackPtrs.append(0) } } else { spill += goarch.PtrSize } } for i, arg := range t.InSlice() { stkStep := in.addArg(arg) if stkStep != nil { addTypeBits(stackPtrs, stkStep.stkOff, arg) } else { spill = align(spill, uintptr(arg.Align())) spill += arg.Size() for _, st := range in.stepsForValue(i) { if st.kind == abiStepPointer { inRegPtrs.Set(st.ireg) } } } } spill = align(spill, goarch.PtrSize) // From the input parameters alone, we now know // the stackCallArgsSize and retOffset. stackCallArgsSize := in.stackBytes retOffset := align(in.stackBytes, goarch.PtrSize) // Compute the stack frame pointer bitmap and register // pointer bitmap for return values. outRegPtrs := abi.IntArgRegBitmap{} // Compute abiSeq for output parameters. var out abiSeq // Stack-assigned return values do not share // space with arguments like they do with registers, // so we need to inject a stack offset here. // Fake it by artificially extending stackBytes by // the return offset. out.stackBytes = retOffset for i, res := range t.OutSlice() { stkStep := out.addArg(res) if stkStep != nil { addTypeBits(stackPtrs, stkStep.stkOff, res) } else { for _, st := range out.stepsForValue(i) { if st.kind == abiStepPointer { outRegPtrs.Set(st.ireg) } } } } // Undo the faking from earlier so that stackBytes // is accurate. out.stackBytes -= retOffset return abiDesc{in, out, stackCallArgsSize, retOffset, spill, stackPtrs, inRegPtrs, outRegPtrs} } // intFromReg loads an argSize sized integer from reg and places it at to. // // argSize must be non-zero, fit in a register, and a power-of-two. func intFromReg(r *abi.RegArgs, reg int, argSize uintptr, to unsafe.Pointer) { memmove(to, r.IntRegArgAddr(reg, argSize), argSize) } // intToReg loads an argSize sized integer and stores it into reg. // // argSize must be non-zero, fit in a register, and a power-of-two. func intToReg(r *abi.RegArgs, reg int, argSize uintptr, from unsafe.Pointer) { memmove(r.IntRegArgAddr(reg, argSize), from, argSize) } // floatFromReg loads a float value from its register representation in r. // // argSize must be 4 or 8. func floatFromReg(r *abi.RegArgs, reg int, argSize uintptr, to unsafe.Pointer) { switch argSize { case 4: *(*float32)(to) = archFloat32FromReg(r.Floats[reg]) case 8: *(*float64)(to) = *(*float64)(unsafe.Pointer(&r.Floats[reg])) default: panic("bad argSize") } } // floatToReg stores a float value in its register representation in r. // // argSize must be either 4 or 8. func floatToReg(r *abi.RegArgs, reg int, argSize uintptr, from unsafe.Pointer) { switch argSize { case 4: r.Floats[reg] = archFloat32ToReg(*(*float32)(from)) case 8: r.Floats[reg] = *(*uint64)(from) default: panic("bad argSize") } }
go
github
https://github.com/golang/go
src/reflect/abi.go