code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ## \package pts.modeling.build.models.general Contains the GeneralBuilder class, a base class for StarsBuilder and DustBuilder. # ----------------------------------------------------------------- # Ensure Python 3 compatibility from __future__ import absolute_import, division, print_function # Import standard modules from abc import ABCMeta, abstractmethod, abstractproperty # Import the relevant PTS classes and modules from ..component import BuildComponent from ....core.basics.log import log from ....core.prep.smile import SKIRTSmileSchema from ....core.tools import filesystem as fs from ....core.tools.serialization import write_dict from ..suite import parameters_filename, deprojection_filename, model_map_filename, model_filename, properties_filename from ....magic.core.frame import Frame from ....core.basics.configuration import save_mapping, PassiveConfigurationSetter, InteractiveConfigurationSetter # ----------------------------------------------------------------- class GeneralBuilder(BuildComponent): """ This class... """ __metaclass__ = ABCMeta # ----------------------------------------------------------------- def __init__(self, *args, **kwargs): """ The constructor ... :param kwargs: :return: """ # Call the constructor of the base class super(GeneralBuilder, self).__init__(*args, **kwargs) # The parameters self.parameters = dict() # The maps self.maps = dict() # The deprojections self.deprojections = dict() # The models self.models = dict() # The properties self.properties = dict() # The paths to the component directories self.paths = dict() # The SKIRT smile schema self.smile = None # File paths self.parameter_paths = dict() self.deprojection_paths = dict() self.map_paths = dict() self.model_paths = dict() self.properties_paths = dict() # ----------------------------------------------------------------- def setup(self, **kwargs): """ This function ... :param kwargs: :return: """ # Call the setup function of the base class super(GeneralBuilder, self).setup(**kwargs) # Create the SKIRT smile schema self.smile = SKIRTSmileSchema() # ----------------------------------------------------------------- def get_parameters(self, label, definition): """ This function ... :param label: :param definition: :return: """ # Debugging log.debug("Getting parameters for the " + label + " component ...") # Use default values if self.config.use_defaults: setter = PassiveConfigurationSetter(label, add_cwd=False, add_logging=False) config = setter.run(definition) # Prompt for the values else: # Prompt for the values setter = InteractiveConfigurationSetter(label, add_cwd=False, add_logging=False) config = setter.run(definition, prompt_optional=True) # Return the parameters mapping return config # ----------------------------------------------------------------- @abstractmethod def build_additional(self): """ This function ... :return: """ pass # ----------------------------------------------------------------- @property def component_names(self): """ This function ... :return: """ return self.parameters.keys() # ----------------------------------------------------------------- @property def with_model(self): """ This function ... :return: """ # Loop over all components for name in self.component_names: # Check if name not in self.models: continue else: yield name # ----------------------------------------------------------------- @property def with_deprojection(self): """ This function ... :return: """ # Loop over all components for name in self.component_names: # Check if name not in self.deprojections: continue else: yield name # ----------------------------------------------------------------- @property def with_map(self): """ This function ... :return: """ # Loop over all components for name in self.component_names: # Check if name not in self.maps: continue else: yield name # ----------------------------------------------------------------- @property def with_properties(self): """ This function ... :return: """ # Loop over all components for name in self.component_names: # Check if name not in self.properties: continue else: yield name # ----------------------------------------------------------------- def write(self): """ This function ... :return: """ # Inform the user log.info("Writing ...") # Write components self.write_component_directories() # Write parameters self.write_parameters() # Write deprojections self.write_deprojections() # Write maps self.write_maps() # Write models self.write_models() # Write properties self.write_properties() # ----------------------------------------------------------------- def write_component_directories(self): """ This function ... :return: """ # Inform the user log.info("Writing the component directories ...") # Loop over the components for name in self.parameters: # Create a directory component_path = self.output_path_file(name) fs.create_directory(component_path) # Set the path self.paths[name] = component_path # ----------------------------------------------------------------- def write_parameters(self): """ This function ... :return: """ # Inform the user log.info("Writing the component parameters ...") # Loop over the components for name in self.parameters: self.parameter_paths[name] = write_parameters(self.parameters[name], self.paths[name]) # ----------------------------------------------------------------- def write_deprojections(self): """ This function ... :param self: :return: """ # Inform the user log.info("Writing the deprojections ...") # Loop over the components for name in self.with_deprojection: self.deprojection_paths[name] = write_deprojection(self.deprojections[name], self.paths[name]) # ----------------------------------------------------------------- def write_maps(self): """ This function ... :return: """ # Inform the user log.info("Writing the maps ...") # Loop over the components for name in self.with_map: self.map_paths[name] = write_map(self.maps[name], self.paths[name]) # ----------------------------------------------------------------- def write_models(self): """ This function ... :param self: :return: """ # Inform the user log.info("Writing the models ...") # Loop over the names for name in self.with_model: self.model_paths[name] = write_model(self.models[name], self.paths[name]) # ----------------------------------------------------------------- def write_properties(self): """ This function ... :param self: :return: """ # Inform the user log.info("Writing the component properties ...") # Loop over the parameters for name in self.with_properties: self.properties_paths[name] = write_properties(self.properties[name], self.paths[name]) # ----------------------------------------------------------------- @abstractproperty def additional_names(self): """ This function ... :return: """ pass # ----------------------------------------------------------------- def write_component_alt(directory, name, parameters, model, deprojection, map, properties): """ This function ... :param directory: :param name: :param parameters: :param model: :param deprojection: :param map: :param properties: :return: """ # Debugging log.debug("Writing the '" + name + "' component to the '" + directory + "' directory ...") # Determine the path for the component directory component_path = fs.join(directory, name) # Check if fs.is_directory(component_path): raise IOError("Already a directory with the name '" + name + "'") else: fs.create_directory(component_path) # Save parameters if parameters is not None: write_parameters(parameters, component_path) # Save model if model is not None: write_model(model, component_path) # Save deprojection if deprojection is not None: write_deprojection(deprojection, component_path) # Save map if map is not None: write_map(map, component_path) # Save properties if properties is not None: write_properties(properties, component_path) # Return the component path return component_path # ----------------------------------------------------------------- def write_parameters(parameters, path): """ Thisf unction ... :param parameters: :param path: :return: """ # Debugging log.debug("Writing the component parameters ...") # Determine the path parameters_path = fs.join(path, parameters_filename) # Save the parameters #parameters.saveto(parameters_path) save_mapping(parameters_path, parameters) # Return the path return parameters_path # ----------------------------------------------------------------- def write_model(model, path): """ This function ... :param model: :param path: :return: """ # Debugging log.debug("Writing the component model ...") # Determine the path model_path = fs.join(path, model_filename) # Save the model model.saveto(model_path) # Return the path return model_path # ----------------------------------------------------------------- def write_deprojection(deprojection, path): """ This function ... :param deprojection: :param path: :return: """ # Debugging log.debug("Writing the component deprojection ...") # Determine the path deprojection_path = fs.join(path, deprojection_filename) # Save the deprojection deprojection.saveto(deprojection_path) # Return the path return deprojection_path # ----------------------------------------------------------------- def write_map(map, path): """ This function ... :param map: :param path: :return: """ # Debugging log.debug("Writing the component map ...") # Determine the path map_path = fs.join(path, model_map_filename) # Save the map map.saveto(map_path) # Return the path return map_path # ----------------------------------------------------------------- def write_properties(properties, path): """ Thsi function ... :param properties: :param path: :return: """ # Debugging log.debug("Writing the component properties ...") # Determine the path properties_path = fs.join(path, properties_filename) # Write write_dict(properties, properties_path) # Return the path return properties_path # ----------------------------------------------------------------- def write_component(directory, name, component): """ This function ... :param directory: directory for the component to be placed (either dust or stellar directory of a certain model) :param name: name of the component :param component: the component mapping :return: """ # Get parameters = component.parameters if "parameters" in component else None model = component.model if "model" in component else None deprojection = component.deprojection if "deprojection" in component else None map_path = component.map_path if "map_path" in component else None map = component.map if "map" in component else None properties = component.properties if "properties" in component else None # Load the map if map_path is not None and map is None: map = Frame.from_file(map_path) # Write, return the component path return write_component_alt(directory, name, parameters, model, deprojection, map, properties) # -----------------------------------------------------------------
SKIRT/PTS
modeling/build/models/general.py
Python
agpl-3.0
13,577
# File Transfer model #3 # # In which the client requests each chunk individually, using # command pipelining to give us a credit-based flow control. import os from threading import Thread import zmq from zhelpers import socket_set_hwm, zpipe CHUNK_SIZE = 250000 def client_thread(ctx, pipe): dealer = ctx.socket(zmq.DEALER) socket_set_hwm(dealer, 1) dealer.connect("tcp://127.0.0.1:6000") total = 0 # Total bytes received chunks = 0 # Total chunks received while True: # ask for next chunk dealer.send_multipart([ b"fetch", b"%i" % total, b"%i" % CHUNK_SIZE ]) try: chunk = dealer.recv() except zmq.ZMQError as e: if e.errno == zmq.ETERM: return # shutting down, quit else: raise chunks += 1 size = len(chunk) total += size if size < CHUNK_SIZE: break # Last chunk received; exit print ("%i chunks received, %i bytes" % (chunks, total)) pipe.send(b"OK") # .split File server thread # The server thread waits for a chunk request from a client, # reads that chunk and sends it back to the client: def server_thread(ctx): file = open("testdata", "r") router = ctx.socket(zmq.ROUTER) router.bind("tcp://*:6000") while True: # First frame in each message is the sender identity # Second frame is "fetch" command try: msg = router.recv_multipart() except zmq.ZMQError as e: if e.errno == zmq.ETERM: return # shutting down, quit else: raise identity, command, offset_str, chunksz_str = msg assert command == b"fetch" offset = int(offset_str) chunksz = int(chunksz_str) # Read chunk of data from file file.seek(offset, os.SEEK_SET) data = file.read(chunksz) # Send resulting chunk to client router.send_multipart([identity, data]) # The main task is just the same as in the first model. # .skip def main(): # Start child threads ctx = zmq.Context() a,b = zpipe(ctx) client = Thread(target=client_thread, args=(ctx, b)) server = Thread(target=server_thread, args=(ctx,)) client.start() server.start() # loop until client tells us it's done try: print a.recv() except KeyboardInterrupt: pass del a,b ctx.term() if __name__ == '__main__': main()
soscpd/bee
root/tests/zguide/examples/Python/fileio3.py
Python
mit
2,555
import sys import numpy as np from itertools import izip SIGNALMATFILENAME = sys.argv[1] MATERNALFASTAFILENAMELISTFILENAME = sys.argv[2] PATERNALFASTAFILENAMELISTFILENAME = sys.argv[3] OUTPUTSEQUENCESMATFILENAMEPREFIX = sys.argv[4] # Should not end with . OUTPUTSEQUENCESPATFILENAMEPREFIX = sys.argv[5] # Should not end with . OUTPUTSIGNALSFILENAMEPREFIX = sys.argv[6] # Should not end with . OUTPUTSIGNALINDICATORMATFILENAME = sys.argv[7] INDIVIDUALSLIST = [] for i in range(8, len(sys.argv)): INDIVIDUALSLIST.append(sys.argv[i]) def readFileNameList(fileNameListFileName): # Read a list of strings from a file # ASSUMES THAT INDIVIDUAL NAMES ARE IN THE FILE NAMES fileNameListFile = open(fileNameListFileName) fileNameList = fileNameListFile.readlines() fileNameListFile.close() fileList = [] for individual in INDIVIDUALSLIST: fileNameIndividual = filter(lambda x: individual in x, fileNameList) assert(len(fileNameIndividual) == 1) fileList.append(open(fileNameIndividual[0].strip())) return fileList def openOutputFiles(): # Open the output files outputSequencesMatFileList = [] outputSequencesPatFileList = [] outputSignalsFileList = [] for individual in INDIVIDUALSLIST: # Create output maternal sequence, paternal sequence, and label files for each individual outputSequencesMatFile = open(OUTPUTSEQUENCESMATFILENAMEPREFIX + "." + individual + ".txt", 'w+') outputSequencesPatFile = open(OUTPUTSEQUENCESPATFILENAMEPREFIX + "." + individual + ".txt", 'w+') outputSignalsFile = open(OUTPUTSIGNALSFILENAMEPREFIX + "." + individual + ".txt", 'w+') outputSequencesMatFileList.append(outputSequencesMatFile) outputSequencesPatFileList.append(outputSequencesPatFile) outputSignalsFileList.append(outputSignalsFile) return [outputSequencesMatFileList, outputSequencesPatFileList, outputSignalsFileList] def getNextSequences(fastaFileList): # Get the next sequences from a fasta file list nextSequences = [] for fastaFile in fastaFileList: # Iterate through the fasta files and get the next sequences from each fastaFile.readline() nextSequences.append(fastaFile.readline().strip().upper()) return nextSequences def getnanIndexes(signalArray): # Get the indexes of nans in a numpy array nanBools = np.isnan(signalArray) nanIndexes = [i for i, x in enumerate(nanBools) if x] return np.array(nanIndexes) def getIndElts(listOfLists, indexes): outputList = [] for l in listOfLists: # Iterate through the lists and get the elements of each list at the indexes lIndexes = [l[i] for i in indexes] outputList.append(lIndexes) return outputList def recordSequencePairsAndSignalsUnique(matSequences, patSequences, signalArray, outputSequencesMatFileList, outputSequencesPatFileList, outputSignalsFileList, outputSignalIndicatorMatFile, nanIndexes): # Record a list of sequence pairs and signals to lists of files # For each individual, record only sequences and corresponding signals that are different from the sequences of earlier individuals individualIndex = 0 for i in range(len(signalArray)): # Iterate through the sequences and labels and record each, but skip those that have already been recorded while individualIndex in nanIndexes: # Iterate through the individuals until an individual with a non-nan signal is reached outputSignalIndicatorMatFile.write("0\t") individualIndex = individualIndex + 1 maternalSequenceIndicies = np.array([j for j, x in enumerate(matSequences[0:i]) if x == matSequences[i]]) paternalSequenceIndicies = np.array([j for j, x in enumerate(patSequences[0:i]) if x == patSequences[i]]) indiciesIntersection = np.intersect1d(maternalSequenceIndicies, paternalSequenceIndicies) maternalSequenceIndiciesFlipped = np.array([j for j, x in enumerate(patSequences[0:i]) if x == matSequences[i]]) paternalSequenceIndiciesFlipped = np.array([j for j, x in enumerate(matSequences[0:i]) if x == patSequences[i]]) indiciesIntersectionFlipped = np.intersect1d(maternalSequenceIndiciesFlipped, paternalSequenceIndiciesFlipped) if (indiciesIntersection.shape[0] == 0) and (indiciesIntersectionFlipped.shape[0] == 0): # The sequence pair does not occur for any previous individuals, so record it outputSequencesMatFileList[i].write(matSequences[i] + "\n") outputSequencesPatFileList[i].write(patSequences[i] + "\n") outputSignalsFileList[i].write(str(float(signalArray[i])) + "\n") outputSignalIndicatorMatFile.write("1\t") else: # The sequence pair does occur for previous individuals, so record 0 for the region, individual entry in the indicator matrix file outputSignalIndicatorMatFile.write("0\t") individualIndex = individualIndex + 1 outputSignalIndicatorMatFile.write("\n") def getFastasWithSNPsUnique(): # Get the maternal and paternal sequences and their corresponding signals for each individual # In addition, for each individual, record only sequences that are different from those for all earlier individuals # ASSUMES THAT THE MATERNAL AND PATERNAL FASTA FILES ARE IN THE SAME ORDER AS THEIR CORRESPONDING INDIVIDUALS # ASSUMES THAT EACH ROW IN THE SIGNAL MATRIX CORRESPONDS TO THE SAME ROWS IN THE MATERNAL AND PATERNAL FASTA FILES # ASSUMES THAT ALL SIGNALS ARE >= 0 signalMat = np.genfromtxt(SIGNALMATFILENAME, names = True, usecols = INDIVIDUALSLIST) maternalFastaFileList = readFileNameList(MATERNALFASTAFILENAMELISTFILENAME) paternalFastaFileList = readFileNameList(PATERNALFASTAFILENAMELISTFILENAME) [outputSequencesMatFileList, outputSequencesPatFileList, outputSignalsFileList] = openOutputFiles() outputSignalIndicatorMatFile = open(OUTPUTSIGNALINDICATORMATFILENAME, 'w+') for signalRow in signalMat: # Iterate through the rows of the binary matrix and record each sequence in the appropriate set matSequences = getNextSequences(maternalFastaFileList) patSequences = getNextSequences(paternalFastaFileList) signalList = [x for x in signalRow] signalArray = np.array(signalList) if not(signalArray.any() > 0): # None of the selected individuals have signal, so skip it continue nanIndexes = getnanIndexes(signalArray) signalIndexes = np.setdiff1d(range(0, len(INDIVIDUALSLIST)), nanIndexes) [matSequencesSignals,patSequencesSignals,outputSequenceMatFileSignals,outputSequencePatFileSignals,outputSignalsFileSignals] = getIndElts([matSequences,patSequences,outputSequencesMatFileList,outputSequencesPatFileList,outputSignalsFileList], signalIndexes) recordSequencePairsAndSignalsUnique(matSequencesSignals, patSequencesSignals, signalArray[signalIndexes], outputSequenceMatFileSignals, outputSequencePatFileSignals, outputSignalsFileSignals, outputSignalIndicatorMatFile, nanIndexes) for individualFileList in izip(maternalFastaFileList, paternalFastaFileList, outputSequencesMatFileList, outputSequencesPatFileList, outputSignalsFileList): # Iterate through the individuals and close all of their input and output files for individualFile in individualFileList: # Iterate through the files for the current individual and close each individualFile.close() if __name__=="__main__": getFastasWithSNPsUnique()
imk1/IMKTFBindingCode
getFastasWithSNPsUnique.py
Python
mit
7,112
import base64 from subprocess import call template = '{"kind":"node","version":"v2","metadata":{"name":"%s","labels":{"group":"gravitational/devc"}},"spec":{"addr":"%s","hostname":"%s","cmd_labels":{"kernel":{"period":"5m0s","command":["/bin/uname","-r"],"result":"4.15.0-32-generic"}},"rotation":{"current_id":"","started":"0001-01-01T00:00:00Z","grace_period":"0s","last_rotated":"0001-01-01T00:00:00Z","schedule":{"update_clients":"0001-01-01T00:00:00Z","update_servers":"0001-01-01T00:00:00Z","standby":"0001-01-01T00:00:00Z"}}}}' for i in range(1, 4000): node = template % ("node-%d" % i, "127.0.0.%d:3022" %i, "planet-%d"%i) call(['./etcdctl.sh', 'set', '/teleport/namespaces/default/nodes/node-%d'%i, base64.b64encode(node)]) print "set node %i" % i
yacloud-io/teleport
examples/etcd/gen.py
Python
apache-2.0
778
from http.server import BaseHTTPRequestHandler,HTTPServer import json import numpy as np from train import trainer from utils import * class RequestHandler(BaseHTTPRequestHandler): def __init__(self,req,client,server): BaseHTTPRequestHandler.__init__(self,req,client,server) def log_message(self, format, *args): #silent return def do_GET(self): request_path = self.path print("\ndo_Get it should not happen\n") self.send_response(200) def do_POST(self): _debug = False request_path = self.path request_headers = self.headers content_length = request_headers.get_all('content-length') length = int(content_length[0]) if content_length else 0 content = self.rfile.read(length) if _debug: print("\n----- Request Start ----->\n") print(request_path) print(request_headers) print(content) print("<----- Request End -----\n") self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() self.wfile.write(self.dispatch(content.decode("ascii")).encode("ascii")) def get_target(self,msg): obj = json.loads(msg) return obj["state"]["side"] , obj def dispatch(self,msg): #print(msg) target , json_obj = self.get_target(msg) agent = dispatch_table[target] st = json_obj raw_act = agent.send((st["state"],float(st["reward"]),st["done"] == "true")) if target == "Radiant": sign = 1 else: sign = -1 ret = "%f %f"%(sign * raw_act[0], sign * raw_act[1]) print(target,ret) return ret do_PUT = do_POST do_DELETE = do_GET def start_env(params,shared_model,shared_grad_buffer): init_dispatch(params,shared_model,shared_grad_buffer) port = 8080 print('Listening on localhost:%s' % port) server = HTTPServer(('', port), RequestHandler) server.serve_forever() def parse_creep(sign,creep): count = 0 _x = 0.0 _y = 0.0 for c in creep: count = count + 1 _x = _x + c[5] _y = _y + c[6] _x = _x / count * sign _y = _y / count * sign if count == 1: count = 0 return [_x, _y, count] def parse_tup(side,raw_tup): origin = raw_tup raw_tup = raw_tup[0] self_input = raw_tup["self_input"] if side == "Radiant": sign = 1 _side = 0 else: sign = -1 _side = 1 ret = [sign * self_input[11],sign * self_input[12],_side] ret = ret + parse_creep(sign,raw_tup["ally_input"]) ret = ret + parse_creep(sign,raw_tup["enemy_input"]) return (ret,origin[1],origin[2]) def gen_model(): params,shared_model,shared_grad_buffers,side = yield while True: act = np.asarray([0.0,0.0]) agent = trainer(params,shared_model,shared_grad_buffers) tup = yield (act[0] * 500,act[1] * 500) total_reward = 0.0 agent.pre_train() tick = 0 while True: tick += 1 move_order = (act[0] * 500,act[1] * 500) tup = yield move_order tup = parse_tup(side, tup) print("origin input ", tup ,flush=True) total_reward += tup[1] act = get_action(agent.step(tup,None,0.0)) if tup[2]: break dispatch_table = {} def init_dispatch(params,shared_model,shared_grad_buffer): dispatch_table["Dire"] = gen_model() dispatch_table["Dire"].send(None) dispatch_table["Dire"].send((params,shared_model,shared_grad_buffer,"Dire")) dispatch_table["Radiant"] = gen_model() dispatch_table["Radiant"].send(None) dispatch_table["Radiant"].send((params,shared_model,shared_grad_buffer,"Radiant"))
lenLRX/Dota2_DPPO_bots
GameServer.py
Python
mit
3,946
#!/usr/bin/python """ Copyright 2015 The Trustees of Princeton University 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 os import sys import errno import cStringIO import traceback import signal import json import threading import cPickle as pickle import imp from syndicate.protobufs.sg_pb2 import DriverRequest, Manifest driver_shutdown = None def do_driver_shutdown(): """ gracefully shut down """ global driver_shutdown print >> sys.stderr, "Worker %s exiting" % os.getpid() if driver_shutdown is not None: rc = driver_shutdown() if type(rc) in [int, long]: sys.exit(rc) else: sys.exit(0) else: sys.exit(0) def read_string( f ): """ Read a null-terminated string from file f. """ s = cStringIO.StringIO() while True: c = f.read(1) if c == '\0': break s.write(c) return s.getvalue() def read_int( f ): """ Read an integer from file f, as a newline-terminated string Return the int on success Return None on error """ # read the int i = f.readline( 100 ) if len(i) == 0: # gateway exit do_driver_shutdown() if i[-1] != '\n': # invalid line print >> sys.stderr, "Integer too long: '%s'" % i return None try: i = int(i.strip()) except Exception, e: print >> sys.stderr, "Invalid integer: '%s'" % i return None return i def read_data( f, size ): """ Read a newline-terminated data stream from f, up to size. Return the chunk on success Return None on error """ chunk = f.read( size+1 ) if len(chunk) == 0: # gateway exit do_driver_shutdown() if len(chunk) != size+1: # invalid chunk print >> sys.stderr, "Data too short" return None if chunk[-1] != '\n': # invalid chunk print >> sys.stderr, "Data too long" return None chunk = chunk[:len(chunk)-1] return chunk def read_chunk( f ): """ Get a chunk of data from a file descriptor. A chunk is encoded by its length, a newline, and data. """ chunk_len = read_int( f ) if chunk_len is None: do_driver_shutdown() chunk = read_data( f, chunk_len ) return chunk def read_request( f ): """ Read a chunk from file f that contains a DriverRequest string. Return the deserialized DriverRequest on success Shut down the driver on error. """ req_chunk = read_chunk( f ) try: driver_req = DriverRequest() driver_req.ParseFromString( req_chunk ) except: print >> sys.stderr, "Failed to parse driver request" do_driver_shutdown() return driver_req def request_to_storage_path( request ): """ Create a storage path for a request. It will be prefixed by UID, then volume ID, then inode, then path, version, and either block ID or version or manifest timestamp (depending on what kind of request this is). Return the string on success """ prefix = "%s/%s/%X/%s" % (request.user_id, request.volume_id, request.file_id, request.path) if request.request_type == DriverRequest.BLOCK: prefix = os.path.join( prefix, "%s/%s" % (request.block_id, request.block_version) ) elif request.request_type == DriverRequest.MANIFEST: prefix = os.path.join( prefix, "manifest/%s.%s" % (request.manifest_mtime_sec, request.manifest_mtime_nsec)) else: print >> sys.stderr, "Invalid driver request type '%s'" % request.request_type do_driver_shutdown() return prefix def write_int( f, i ): """ Send back an integer to the main Syndicate daemon. """ f.write( "%s\n" % i ) def write_data( f, data ): """ Send back a string of data to the main Syndicate daemon. """ f.write( "%s\n" % data ) def write_chunk( f, data ): """ Send back a length, followed by a newline, followed by a string of data to Syndicate. """ f.write( "%s\n%s\n" % (len(data), data)) def request_byte_offset( request ): """ Calculate a DriverRequest's byte offset. Use the byte offset from the I/O hints if given; otherwise assume it's on a block boundary. Return None if the request is not for a block """ if hasattr(request, "io_type") and hasattr(request, "offset") and request.io_type in [DriverRequest.READ, DriverRequest.WRITE]: # gateway-given offset hint return request.offset return None def request_byte_len( request ): """ Calculate a DriverRequest's byte offset. Use the byte offset from the I/O hints if given; otherwise assume it's on a block boundary. Return None if the request is not for a block """ if hasattr(request, "io_type") and hasattr(request, "len") and request.io_type in [DriverRequest.READ, DriverRequest.WRITE]: # gateway-given offset hint return request.len return None def request_path( request ): """ Get the path of the request """ return str(request.path) def path_join( a, *b ): """ Join two or more paths, even if any of them are absolute. """ parts = [ p.strip("/") for p in b ] return os.path.join( a, *parts ) def make_metadata_command( cmd, ftype, mode, size, path ): """ Generate a metadata command structure (useful for crawling datasets). @cmd must be any of 'create', 'update', 'delete', or 'finish' @ftype must be either 'file' or 'directory' @path cannot have any newlines @size will be ignored for directories, and will only be processed on 'create' or 'update' Returns a command structure on success. Returns None if any of the above conditions are not met. """ if ftype != 'file': size = 4096 cmd_table = { "create": "C", "update": "U", "delete": "D", "finish": "F", } ftype_table = { "file": "F", "directory": "D" } ret = { "cmd": cmd_table.get(cmd), "ftype": ftype_table.get(ftype), "mode": mode, "size": size, "path": path } if not check_metadata_command( ret ): return None return ret def check_metadata_command( cmd_dict ): """ Given a metadata command structure, verify that it is well-formed. Return True if so Return False if not """ if type(cmd_dict) != dict: return False for key in ["cmd", "ftype", "mode", "size", "path"]: if not cmd_dict.has_key(key): return False if cmd_dict['cmd'] not in ['C', 'U', 'D', 'F']: return False if cmd_dict['ftype'] not in ['F', 'D']: return False if '\n' in cmd_dict['path']: return False return True def write_metadata_command( f, cmd_dict ): """ Send back a metadata command for the gateway to send to the MS. Valid values for @cmd are "create", "update", or "delete" Valid values for @ftype are "file", "directory" @mode is the permission bits @size is the size of the file (ignored for directories) @path is the absolute path to the file or directory Raises an exception on invalid input. """ if not check_metadata_command( cmd_dict ): raise Exception("Malformed command: %s" % cmd_dict) # see the AG documentation for the description of this stanza f.write("%s\n%s 0%o %s\n%s\n\0\n" % (cmd_dict['cmd'], cmd_dict['ftype'], cmd_dict['mode'], cmd_dict['size'], cmd_dict['path']) ) def crawl( cmd_dict ): """ Rendezvous with the gateway: send it a metadata command, and get back the result code of the gateway's attempt at processing it. Returns the integer code, or raises an exception if the command dict is malformed. """ write_metadata_command( sys.stdout, cmd_dict ) sys.stdout.flush() rc = read_int( sys.stdin ) return rc def log_error( msg ): """ Synchronously log an error message """ print >> sys.stderr, "[Driver %s] %s" % (os.getpid(), msg) sys.stderr.flush() driver_shutdown = None driver_shutdown_lock = threading.Semaphore(1) # die on a signal def sig_die( signum, frame ): global driver_shutdown, driver_shutdown_lock if driver_shutdown is not None: driver_shutdown_lock.acquire() # leave this locked to prevent subsequent calls driver_shutdown() sys.exit(0) # is an object callable? def is_callable( obj ): return hasattr( obj, "__call__" ) # does a module have a method? def has_method( mod, method_name ): return hasattr( mod, method_name ) and is_callable( getattr(mod, method_name, None) ) def driver_setup( operation_modes, expected_callback_names, default_callbacks={} ): """ Set up a gateway driver: * verify that the operation mode is supported (i.e. the operation mode is present in operation_modes) * install signal handlers for shutting down the driver, and calling the driver_shutdown() method. * load configuration, secrets, and code. * validate configuration, secrets, and code (i.e. verify that the config and secrets are well-formed, and that the code defines a callback for each method names in expected_callback_names). * run the driver_init() method. Return (operation mode, driver module) on success Signal the parent process and exit with a non-zero exit code on failure: * return 1 and exit 1 on misconfiguration * return 1 and exit 2 on failure to initialize * return 2 and exit 0 if the driver does not implement the requested operation mode """ # die on SIGINT signal.signal( signal.SIGINT, sig_die ) # usage: $0 operation_mode if len(sys.argv) != 2: print >> sys.stderr, "Usage: %s operation_mode" % sys.argv[0] # tell the parent that we failed print "1" sys.exit(1) usage = sys.argv[1] if usage not in operation_modes: print >> sys.stderr, "Usage: %s operation_mode" % sys.argv[0] # tell the parent that we failed print "1" sys.exit(1) method_name_idx = operation_modes.index(usage) method_name = expected_callback_names[method_name_idx] # on stdin: config and secrets (as two separate null-terminated strings) config_len = read_int( sys.stdin ) if config_len is None: print "1" sys.exit(1) config_str = read_data( sys.stdin, config_len ) if config_str is None: print "1" sys.exit(1) secrets_len = read_int( sys.stdin ) if secrets_len is None: print "1" sys.exit(1) secrets_str = read_data( sys.stdin, secrets_len ) if secrets_str is None: print "1" sys.exit(1) driver_len = read_int( sys.stdin ) if driver_len is None: print "1" sys.exit(1) driver_str = read_data( sys.stdin, driver_len ) if driver_str is None: print "1" sys.exit(1) CONFIG = {} SECRETS = {} # config_str should be a JSON dict try: CONFIG = json.loads(config_str) except Exception, e: log_error("Failed to load config") log_error("'%s'" % config_str ) log_error( traceback.format_exc() ) # tell the parent that we failed print "1" sys.exit(2) # secrets_str should be a JSON dict try: SECRETS = json.loads(secrets_str) except Exception, e: log_error("Failed to load secrets") log_error( traceback.format_exc() ) # tell the parent that we failed print "1" sys.exit(2) # driver should be a set of methods driver_mod = imp.new_module("driver_mod") try: exec driver_str in driver_mod.__dict__ except Exception, e: log_error("Failed to load driver") log_error(traceback.format_exc()) # tell the parent that we failed print "1" sys.exit(2) # verify that the driver method is defined fail = False if not has_method( driver_mod, method_name ): if not default_callbacks.has_key( method_name ): fail = True log_error("No method '%s' defined" % method_name) elif default_callbacks[method_name] is None: # no method implementation; fall back to the gateway log_error("No implementation for '%s'" % method_name) print "2" sys.exit(0) else: log_error("Using default implementation for '%s'" % method_name ); setattr( driver_mod, usage, default_callbacks[method_name] ) # remember generic shutdown so the signal handler can use it if has_method( driver_mod, "driver_shutdown" ): global driver_shutdown driver_shutdown = driver_mod.driver_shutdown # do our one-time init, if given if not fail and has_method( driver_mod, "driver_init" ): try: fail = not driver_mod.driver_init( CONFIG, SECRETS ) except: log_error("driver_init raised an exception") log_error(traceback.format_exc()) fail = True if fail not in [True, False]: # indicates a bug fail = True if fail: print "1" sys.stderr.flush() sys.stdout.flush() sys.exit(2) driver_mod.CONFIG = CONFIG driver_mod.SECRETS = SECRETS return (usage, driver_mod)
iychoi/syndicate
python/syndicate/util/gateway.py
Python
apache-2.0
13,857
from __future__ import absolute_import import pytest import six from sentry.runner.importer import ConfigurationError from sentry.runner.initializer import bootstrap_options, apply_legacy_settings @pytest.fixture def settings(): class Settings(object): pass s = Settings() s.TIME_ZONE = 'UTC' s.ALLOWED_HOSTS = [] s.SENTRY_FEATURES = {} s.SENTRY_OPTIONS = {} s.SENTRY_DEFAULT_OPTIONS = {} s.SENTRY_EMAIL_BACKEND_ALIASES = {'dummy': 'alias-for-dummy'} return s @pytest.fixture def config_yml(tmpdir): return tmpdir.join('config.yml') def test_bootstrap_options_simple(settings, config_yml): "Config options are specified in both places, but config.yml should prevail" settings.SECRET_KEY = 'xxx' settings.EMAIL_BACKEND = 'xxx' settings.EMAIL_HOST = 'xxx' settings.EMAIL_PORT = 6969 settings.EMAIL_HOST_USER = 'xxx' settings.EMAIL_HOST_PASSWORD = 'xxx' settings.EMAIL_USE_TLS = False settings.SERVER_EMAIL = 'xxx' settings.EMAIL_SUBJECT_PREFIX = 'xxx' settings.SENTRY_OPTIONS = {'something.else': True} config_yml.write("""\ foo.bar: my-foo-bar system.secret-key: my-system-secret-key mail.backend: my-mail-backend mail.host: my-mail-host mail.port: 123 mail.username: my-mail-username mail.password: my-mail-password mail.use-tls: true mail.from: my-mail-from mail.subject-prefix: my-mail-subject-prefix """) bootstrap_options(settings, six.text_type(config_yml)) assert settings.SENTRY_OPTIONS == { 'something.else': True, 'foo.bar': 'my-foo-bar', 'system.secret-key': 'my-system-secret-key', 'mail.backend': 'my-mail-backend', 'mail.host': 'my-mail-host', 'mail.port': 123, 'mail.username': 'my-mail-username', 'mail.password': 'my-mail-password', 'mail.use-tls': True, 'mail.from': 'my-mail-from', 'mail.subject-prefix': 'my-mail-subject-prefix', } assert settings.SECRET_KEY == 'my-system-secret-key' assert settings.EMAIL_BACKEND == 'my-mail-backend' assert settings.EMAIL_HOST == 'my-mail-host' assert settings.EMAIL_PORT == 123 assert settings.EMAIL_HOST_USER == 'my-mail-username' assert settings.EMAIL_HOST_PASSWORD == 'my-mail-password' assert settings.EMAIL_USE_TLS is True assert settings.SERVER_EMAIL == 'my-mail-from' assert settings.EMAIL_SUBJECT_PREFIX == 'my-mail-subject-prefix' def test_bootstrap_options_malformed_yml(settings, config_yml): config_yml.write('1') with pytest.raises(ConfigurationError): bootstrap_options(settings, six.text_type(config_yml)) config_yml.write('{{{') with pytest.raises(ConfigurationError): bootstrap_options(settings, six.text_type(config_yml)) def test_bootstrap_options_no_config(settings): "No config file should gracefully extract values out of settings" settings.SECRET_KEY = 'my-system-secret-key' settings.EMAIL_BACKEND = 'my-mail-backend' settings.EMAIL_HOST = 'my-mail-host' settings.EMAIL_PORT = 123 settings.EMAIL_HOST_USER = 'my-mail-username' settings.EMAIL_HOST_PASSWORD = 'my-mail-password' settings.EMAIL_USE_TLS = True settings.SERVER_EMAIL = 'my-mail-from' settings.EMAIL_SUBJECT_PREFIX = 'my-mail-subject-prefix' settings.FOO_BAR = 'lol' bootstrap_options(settings) assert settings.SENTRY_OPTIONS == { 'system.secret-key': 'my-system-secret-key', 'mail.backend': 'my-mail-backend', 'mail.host': 'my-mail-host', 'mail.port': 123, 'mail.username': 'my-mail-username', 'mail.password': 'my-mail-password', 'mail.use-tls': True, 'mail.from': 'my-mail-from', 'mail.subject-prefix': 'my-mail-subject-prefix', } def test_bootstrap_options_no_config_only_sentry_options(settings): "SENTRY_OPTIONS is only declared, but should be promoted into settings" settings.SENTRY_OPTIONS = { 'system.secret-key': 'my-system-secret-key', 'mail.backend': 'my-mail-backend', 'mail.host': 'my-mail-host', 'mail.port': 123, 'mail.username': 'my-mail-username', 'mail.password': 'my-mail-password', 'mail.use-tls': True, 'mail.from': 'my-mail-from', 'mail.subject-prefix': 'my-mail-subject-prefix', } bootstrap_options(settings) assert settings.SECRET_KEY == 'my-system-secret-key' assert settings.EMAIL_BACKEND == 'my-mail-backend' assert settings.EMAIL_HOST == 'my-mail-host' assert settings.EMAIL_PORT == 123 assert settings.EMAIL_HOST_USER == 'my-mail-username' assert settings.EMAIL_HOST_PASSWORD == 'my-mail-password' assert settings.EMAIL_USE_TLS is True assert settings.SERVER_EMAIL == 'my-mail-from' assert settings.EMAIL_SUBJECT_PREFIX == 'my-mail-subject-prefix' def test_bootstrap_options_mail_aliases(settings): settings.SENTRY_OPTIONS = { 'mail.backend': 'dummy', } bootstrap_options(settings) assert settings.EMAIL_BACKEND == 'alias-for-dummy' def test_bootstrap_options_missing_file(settings): bootstrap_options(settings, 'this-file-does-not-exist-xxxxxxxxxxxxxx.yml') assert settings.SENTRY_OPTIONS == {} def test_bootstrap_options_empty_file(settings, config_yml): config_yml.write('') bootstrap_options(settings, six.text_type(config_yml)) assert settings.SENTRY_OPTIONS == {} def test_apply_legacy_settings(settings): settings.ALLOWED_HOSTS = [] settings.SENTRY_USE_QUEUE = True settings.SENTRY_ALLOW_REGISTRATION = True settings.SENTRY_ADMIN_EMAIL = 'admin-email' settings.SENTRY_URL_PREFIX = 'http://url-prefix' settings.SENTRY_SYSTEM_MAX_EVENTS_PER_MINUTE = 10 settings.SENTRY_REDIS_OPTIONS = {'foo': 'bar'} settings.SENTRY_ENABLE_EMAIL_REPLIES = True settings.SENTRY_SMTP_HOSTNAME = 'reply-hostname' settings.MAILGUN_API_KEY = 'mailgun-api-key' settings.SENTRY_OPTIONS = { 'system.secret-key': 'secret-key', 'mail.from': 'mail-from', } apply_legacy_settings(settings) assert settings.CELERY_ALWAYS_EAGER is False assert settings.SENTRY_FEATURES['auth:register'] is True assert settings.SENTRY_OPTIONS == { 'system.admin-email': 'admin-email', 'system.url-prefix': 'http://url-prefix', 'system.rate-limit': 10, 'system.secret-key': 'secret-key', 'redis.clusters': {'default': {'foo': 'bar'}}, 'mail.from': 'mail-from', 'mail.enable-replies': True, 'mail.reply-hostname': 'reply-hostname', 'mail.mailgun-api-key': 'mailgun-api-key', } assert settings.DEFAULT_FROM_EMAIL == 'mail-from' assert settings.ALLOWED_HOSTS == ['*'] def test_initialize_app(settings): "Just a sanity check of the full initialization process" settings.SENTRY_OPTIONS = {'system.secret-key': 'secret-key'} bootstrap_options(settings) apply_legacy_settings(settings) def test_require_secret_key(settings): assert 'system.secret-key' not in settings.SENTRY_OPTIONS with pytest.raises(ConfigurationError): apply_legacy_settings(settings)
alexm92/sentry
tests/sentry/runner/test_initializer.py
Python
bsd-3-clause
7,162
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_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4'], 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 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_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'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function] cls.add_method('AddAtEnd', 'bool', [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'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function] cls.add_method('AddAtStart', 'bool', [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'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function] cls.add_method('CreateFullCopy', 'ns3::Buffer', [], 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'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function] cls.add_method('GetCurrentEndOffset', 'int32_t', [], is_const=True) ## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function] cls.add_method('GetCurrentStartOffset', 'int32_t', [], 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 adjustment, int32_t appendOffset) [member function] cls.add_method('AddAtEnd', 'void', [param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')]) ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function] cls.add_method('AddAtStart', 'void', [param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')]) ## 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') ## callback.h (module 'core'): static std::string ns3::CallbackBase::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_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 [ 20 ]', 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 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', '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 & 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 &', '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 & time) [member function] cls.add_method('Stop', 'void', [param('ns3::Time const &', 'time')], 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'): 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 & header, ns3::Ptr<const ns3::Packet> p) [member function] cls.add_method('Write', 'void', [param('ns3::Time', 't'), param('ns3::Header &', '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'): 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'): 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'): 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'): 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) 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 arg0, double arg1, double arg2, double arg3, double arg4) [member function] cls.add_method('Interpolate', 'double', [param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')], 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'): 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_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_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()
Enchufa2/ns-3-dev-git
src/wimax/bindings/modulegen__gcc_LP64.py
Python
gpl-2.0
773,543
#!/usr/bin/python from commonlib import FullNode from hashlib import sha256 req = sha256('secretnr2').digest().encode('hex') req2 = sha256('secretnr10').digest().encode('hex') s = FullNode('a'*32, ('0.0.0.0', 30001)) s.p2pnodeinstance.public_reach(('127.0.0.1'),30001) s.p2pnodeinstance.store_data('secretnr3') s.p2pnodeinstance.store_data('secretnr1') s.p2pnodeinstance.peers.append(('0.0.0.0',30002)) s.p2pnodeinstance.wanted_pieces.append(req) s.p2pnodeinstance.need2mirror[req2] = 1 s.serve_forever()
thestick613/secure-p2p-kv-store
test1.py
Python
gpl-3.0
510
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgposter" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osg from osgpypp import osgDB from osgpypp import osgGA from osgpypp import osgUtil from osgpypp import osgViewer # Translated from file 'osgposter.cpp' # -*-c++-*- OpenSceneGraph example, osgposter. #* #* 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 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. # #include <osg/ArgumentParser> #include <osg/Texture2D> #include <osg/Switch> #include <osgDB/ReadFile> #include <osgDB/WriteFile> #include <osgGA/TrackballManipulator> #include <osgGA/StateSetManipulator> #include <osgViewer/Renderer> #include <osgViewer/Viewer> #include <osgViewer/ViewerEventHandlers> #include <iostream> #include "PosterPrinter.h" # Computing view matrix helpers template<class T> class FindTopMostNodeOfTypeVisitor (osg.NodeVisitor) : FindTopMostNodeOfTypeVisitor() : osg.NodeVisitor(osg.NodeVisitor.TRAVERSE_ALL_CHILDREN), _foundNode(0) def apply(node): result = dynamic_cast<T*>( node ) if result : _foundNode = result traverse = else( node ) _foundNode = T*() template<class T> def findTopMostNodeOfType(node): if not node : return 0 fnotv = FindTopMostNodeOfTypeVisitor<T>() node.accept( fnotv ) return fnotv._foundNode # Computing view matrix functions def computeViewMatrix(camera, eye, hpr): matrix = osg.Matrixd() matrix.makeTranslate( eye ) matrix.preMult( osg.Matrixd.rotate( hpr[0], 0.0, 1.0, 0.0) ) matrix.preMult( osg.Matrixd.rotate( hpr[1], 1.0, 0.0, 0.0) ) matrix.preMult( osg.Matrixd.rotate( hpr[2], 0.0, 0.0, 1.0) ) camera.setViewMatrix( osg.Matrixd.inverse(matrix) ) def computeViewMatrixOnEarth(camera, scene, latLongHeight, hpr): csn = findTopMostNodeOfType<osg.CoordinateSystemNode>(scene) if not csn : return # Compute eye point in world coordiantes eye = osg.Vec3d() csn.getEllipsoidModel().convertLatLongHeightToXYZ( latLongHeight.x(), latLongHeight.y(), latLongHeight.z(), eye.x(), eye.y(), eye.z() ) # Build matrix for computing target vector target_matrix = osg.Matrixd.rotate( -hpr.x(), osg.Vec3d(1,0,0), -latLongHeight.x(), osg.Vec3d(0,1,0), latLongHeight.y(), osg.Vec3d(0,0,1) ) # Compute tangent vector tangent = target_matrix.preMult( osg.Vec3d(0,0,1) ) # Compute non-inclined, non-rolled up vector up = osg.Vec3d( eye ) up.normalize() # Incline by rotating the target- and up vector around the tangent/up-vector # cross-product up_cross_tangent = up ^ tangent incline_matrix = osg.Matrixd.rotate( hpr.y(), up_cross_tangent ) target = incline_matrix.preMult( tangent ) # Roll by rotating the up vector around the target vector roll_matrix = incline_matrix * osg.Matrixd.rotate( hpr.z(), target ) up = roll_matrix.preMult( up ) camera.setViewMatrixAsLookAt( eye, eye+target, up ) # CustomRenderer: Do culling only while loading PagedLODs class CustomRenderer (osgViewer.Renderer) : CustomRenderer( osg.Camera* camera ) : osgViewer.Renderer(camera), _cullOnly(True) def setCullOnly(on): _cullOnly = on virtual void operator ()( osg.GraphicsContext* ) if _graphicsThreadDoesCull : if _cullOnly : cull() cull_draw = else() def cull(): sceneView = _sceneView[0] if not sceneView or _done or _graphicsThreadDoesCull : return updateSceneView( sceneView ) view = dynamic_cast<osgViewer.View*>( _camera.getView() ) if view : sceneView.setFusionDistance( view.getFusionDistanceMode(), view.getFusionDistanceValue() ) sceneView.inheritCullSettings( *(sceneView.getCamera()) ) sceneView.cull() _cullOnly = bool() # PrintPosterHandler: A gui handler for interactive high-res capturing class PrintPosterHandler (osgGA.GUIEventHandler) : PrintPosterHandler( PosterPrinter* printer ) : _printer(printer), _started(False) def handle(ea, aa): view = dynamic_cast<osgViewer.View*>( aa ) if not view : return False switch( ea.getEventType() ) case osgGA.GUIEventAdapter.FRAME: if view.getDatabasePager() : # Wait until all paged nodes are processed if view.getDatabasePager().getRequestsInProgress() : break if _printer.valid() : _printer.frame( view.getFrameStamp(), view.getSceneData() ) if _started and _printer.done() : root = dynamic_cast<osg.Switch*>( view.getSceneData() ) if root : # Assume child 0 is the loaded model and 1 is the poster camera # Switch them in time to prevent dual traversals of subgraph root.setValue( 0, True ) root.setValue( 1, False ) _started = False break case osgGA.GUIEventAdapter.KEYDOWN: if ea.getKey()==ord("p") or ea.getKey()==ord("P") : if _printer.valid() : root = dynamic_cast<osg.Switch*>( view.getSceneData() ) if root : # Assume child 0 is the loaded model and 1 is the poster camera root.setValue( 0, False ) root.setValue( 1, True ) _printer.init( view.getCamera() ) _started = True return True break default: break return False _printer = PosterPrinter() _started = bool() # The main entry def main(argv): arguments = osg.ArgumentParser( argc, argv ) usage = arguments.getApplicationUsage() usage.setDescription( arguments.getApplicationName() + " is the example which demonstrates how to render high-resolution images (posters).") usage.setCommandLineUsage( arguments.getApplicationName() + " [options] scene_file" ) usage.addCommandLineOption( "-h or --help", "Display this information." ) usage.addCommandLineOption( "--color <r> <g> <b>", "The background color." ) usage.addCommandLineOption( "--ext <ext>", "The output tiles' extension (Default: bmp)." ) usage.addCommandLineOption( "--poster <filename>", "The output poster's name (Default: poster.bmp)." ) usage.addCommandLineOption( "--tilesize <w> <h>", "Size of each image tile (Default: 640 480)." ) usage.addCommandLineOption( "--finalsize <w> <h>", "Size of the poster (Default: 6400 4800)." ) usage.addCommandLineOption( "--enable-output-poster", "Output the final poster file (Default)." ) usage.addCommandLineOption( "--disable-output-poster", "Don't output the final poster file." ) #usage.addCommandLineOption( "--enable-output-tiles", "Output all tile files." ) #usage.addCommandLineOption( "--disable-output-tiles", "Don't output all tile files (Default)." ) usage.addCommandLineOption( "--use-fb", "Use Frame Buffer for rendering tiles (Default, recommended).") usage.addCommandLineOption( "--use-fbo", "Use Frame Buffer Object for rendering tiles.") usage.addCommandLineOption( "--use-pbuffer","Use Pixel Buffer for rendering tiles.") usage.addCommandLineOption( "--use-pbuffer-rtt","Use Pixel Buffer RTT for rendering tiles.") usage.addCommandLineOption( "--inactive", "Inactive capturing mode." ) usage.addCommandLineOption( "--camera-eye <x> <y> <z>", "Set eye position in inactive mode." ) usage.addCommandLineOption( "--camera-latlongheight <lat> <lon> <h>", "Set eye position on earth in inactive mode." ) usage.addCommandLineOption( "--camera-hpr <h> <p> <r>", "Set eye rotation in inactive mode." ) if arguments.read("-h") or arguments.read("--help") : usage.write( std.cout ) return 1 # Poster arguments activeMode = True outputPoster = True #bool outputTiles = False tileWidth = 640, tileHeight = 480 posterWidth = 640*2, posterHeight = 480*2 posterName = "poster.bmp", extName = "bmp" bgColor = osg.Vec4(0.2, 0.2, 0.6, 1.0) renderImplementation = osg.Camera.FRAME_BUFFER_OBJECT while arguments.read("--inactive") : activeMode = False while arguments.read("--color", bgColor.r(), bgColor.g(), bgColor.b()) : while arguments.read("--tilesize", tileWidth, tileHeight) : while arguments.read("--finalsize", posterWidth, posterHeight) : while arguments.read("--poster", posterName) : while arguments.read("--ext", extName) : while arguments.read("--enable-output-poster") : outputPoster = True while arguments.read("--disable-output-poster") : outputPoster = False #while arguments.read("--enable-output-tiles") : outputTiles = True #while arguments.read("--disable-output-tiles") : outputTiles = False while arguments.read("--use-fbo") : renderImplementation = osg.Camera.FRAME_BUFFER_OBJECT while arguments.read("--use-pbuffer") : renderImplementation = osg.Camera.PIXEL_BUFFER while arguments.read("--use-pbuffer-rtt") : renderImplementation = osg.Camera.PIXEL_BUFFER_RTT while arguments.read("--use-fb") : renderImplementation = osg.Camera.FRAME_BUFFER # Camera settings for inactive screenshot useLatLongHeight = True eye = osg.Vec3d() latLongHeight = osg.Vec3d( 50.0, 10.0, 2000.0 ) hpr = osg.Vec3d( 0.0, 0.0, 0.0 ) if arguments.read("--camera-eye", eye.x(), eye.y(), eye.z()) : useLatLongHeight = False activeMode = False elif arguments.read("--camera-latlongheight", latLongHeight.x(), latLongHeight.y(), latLongHeight.z()) : activeMode = False latLongHeight.x() = osg.DegreesToRadians( latLongHeight.x() ) latLongHeight.y() = osg.DegreesToRadians( latLongHeight.y() ) if arguments.read("--camera-hpr", hpr.x(), hpr.y(), hpr.z()) : activeMode = False hpr.x() = osg.DegreesToRadians( hpr.x() ) hpr.y() = osg.DegreesToRadians( hpr.y() ) hpr.z() = osg.DegreesToRadians( hpr.z() ) # Construct scene graph scene = osgDB.readNodeFiles( arguments ) if not scene : scene = osgDB.readNodeFile( "cow.osgt" ) if not scene : print arguments.getApplicationName(), ": No data loaded" return 1 # Create camera for rendering tiles offscreen. FrameBuffer is recommended because it requires less memory. camera = osg.Camera() camera.setClearColor( bgColor ) camera.setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) camera.setReferenceFrame( osg.Transform.ABSOLUTE_RF ) camera.setRenderOrder( osg.Camera.PRE_RENDER ) camera.setRenderTargetImplementation( renderImplementation ) camera.setViewport( 0, 0, tileWidth, tileHeight ) camera.addChild( scene ) # Set the printer printer = PosterPrinter() printer.setTileSize( tileWidth, tileHeight ) printer.setPosterSize( posterWidth, posterHeight ) printer.setCamera( camera ) posterImage = 0 if outputPoster : posterImage = osg.Image() posterImage.allocateImage( posterWidth, posterHeight, 1, GL_RGBA, GL_UNSIGNED_BYTE ) printer.setFinalPoster( posterImage ) printer.setOutputPosterName( posterName ) #if 0 # While recording sub-images of the poster, the scene will always be traversed twice, from its two # parent node: root and camera. Sometimes this may not be so comfortable. # To prevent this behaviour, we can use a switch node to enable one parent and disable the other. # However, the solution also needs to be used with care, as the window will go blank while taking # snapshots and recover later. root = osg.Switch() root.addChild( scene, True ) root.addChild( camera, False ) #else: root = osg.Group() root.addChild( scene ) root.addChild( camera ) #endif viewer = osgViewer.Viewer() viewer.setSceneData( root ) viewer.getDatabasePager().setDoPreCompile( False ) if renderImplementation==osg.Camera.FRAME_BUFFER : # FRAME_BUFFER requires the window resolution equal or greater than the to-be-copied size viewer.setUpViewInWindow( 100, 100, tileWidth, tileHeight ) else: # We want to see the console output, so just render in a window viewer.setUpViewInWindow( 100, 100, 800, 600 ) if activeMode : viewer.addEventHandler( PrintPosterHandler(printer) ) viewer.addEventHandler( osgViewer.StatsHandler )() viewer.addEventHandler( osgGA.StateSetManipulator(viewer.getCamera().getOrCreateStateSet()) ) viewer.setCameraManipulator( osgGA.TrackballManipulator )() viewer.run() else: camera = viewer.getCamera() if not useLatLongHeight : computeViewMatrix( camera, eye, hpr ) computeViewMatrixOnEarth = else( camera, scene, latLongHeight, hpr ) renderer = CustomRenderer( camera ) camera.setRenderer( renderer ) viewer.setThreadingModel( osgViewer.Viewer.SingleThreaded ) # Realize and initiate the first PagedLOD request viewer.realize() viewer.frame() printer.init( camera ) while not printer.done() : viewer.advance() # Keep updating and culling until full level of detail is reached renderer.setCullOnly( True ) while viewer.getDatabasePager().getRequestsInProgress() : viewer.updateTraversal() viewer.renderingTraversals() renderer.setCullOnly( False ) printer.frame( viewer.getFrameStamp(), viewer.getSceneData() ) viewer.renderingTraversals() return 0 # Translated from file 'PosterPrinter.cpp' #include <osg/ClusterCullingCallback> #include <osgDB/ReadFile> #include <osgDB/WriteFile> #include <string.h> #include <iostream> #include <sstream> #include "PosterPrinter.h" # PagedLoadingCallback: Callback for loading paged nodes while doing intersecting test class PagedLoadingCallback (osgUtil.IntersectionVisitor.ReadCallback) : def readNodeFile(filename): return osgDB.readNodeFile( filename ) static PagedLoadingCallback g_pagedLoadingCallback = PagedLoadingCallback() # LodCullingCallback: Callback for culling LODs and selecting the highest level class LodCullingCallback (osg.NodeCallback) : virtual void operator()( osg.Node* node, osg.NodeVisitor* nv ) lod = static_cast<osg.LOD*>(node) if lod and lod.getNumChildren()>0 : lod.getChild(lod.getNumChildren()-1).accept(*nv) static LodCullingCallback g_lodCullingCallback = LodCullingCallback() # PagedCullingCallback: Callback for culling paged nodes and selecting the highest level class PagedCullingCallback (osg.NodeCallback) : virtual void operator()( osg.Node* node, osg.NodeVisitor* nv ) pagedLOD = static_cast<osg.PagedLOD*>(node) if pagedLOD and pagedLOD.getNumChildren()>0 : numChildren = pagedLOD.getNumChildren() updateTimeStamp = nv.getVisitorType()==osg.NodeVisitor.CULL_VISITOR if nv.getFrameStamp() and updateTimeStamp : timeStamp = nv.getFrameStamp().getReferenceTime() if (nv.getFrameStamp()) else 0.0 frameNumber = nv.getFrameStamp().getFrameNumber() if (nv.getFrameStamp()) else 0 pagedLOD.setFrameNumberOfLastTraversal( frameNumber ) pagedLOD.setTimeStamp( numChildren-1, timeStamp ) pagedLOD.setFrameNumber( numChildren-1, frameNumber ) pagedLOD.getChild(numChildren-1).accept(*nv) # Request for child if not pagedLOD.getDisableExternalChildrenPaging() and nv.getDatabaseRequestHandler() and numChildren<pagedLOD.getNumRanges() : if pagedLOD.getDatabasePath().empty() : nv.getDatabaseRequestHandler().requestNodeFile( pagedLOD.getFileName(numChildren), nv.getNodePath(), 1.0, nv.getFrameStamp(), pagedLOD.getDatabaseRequest(numChildren), pagedLOD.getDatabaseOptions() ) else: nv.getDatabaseRequestHandler().requestNodeFile( pagedLOD.getDatabasePath()+pagedLOD.getFileName(numChildren), nv.getNodePath(), 1.0, nv.getFrameStamp(), pagedLOD.getDatabaseRequest(numChildren), pagedLOD.getDatabaseOptions() ) #node.traverse(*nv) static PagedCullingCallback g_pagedCullingCallback = PagedCullingCallback() # PosterVisitor: A visitor for adding culling callbacks to newly allocated paged nodes PosterVisitor.PosterVisitor() : osg.NodeVisitor(osg.NodeVisitor.TRAVERSE_ALL_CHILDREN), _appliedCount(0), _needToApplyCount(0), _addingCallbacks(True) void PosterVisitor.apply( osg.LOD node ) #if not hasCullCallback(node.getCullCallback(), g_lodCullingCallback) : # # if not node.getName().empty() : # # itr = _pagedNodeNames.find( node.getName() ) # if itr not =_pagedNodeNames.end() : # # insertCullCallback( node, g_lodCullingCallback ) # _appliedCount++ # # # # def if _addingCallbacks . # # node.removeCullCallback( g_lodCullingCallback ) # _appliedCount-- # traverse( node ) void PosterVisitor.apply( osg.PagedLOD node ) if not hasCullCallback(node.getCullCallback(), g_pagedCullingCallback) : for ( unsigned int i=0 i<node.getNumFileNames() ++i ) if node.getFileName(i).empty() : continue itr = _pagedNodeNames.find( node.getFileName(i) ) if itr not =_pagedNodeNames.end() : node.addCullCallback( g_pagedCullingCallback ) _appliedCount++ break def if _addingCallbacks . node.removeCullCallback( g_pagedCullingCallback ) if _appliedCount>0 : _appliedCount-- traverse( node ) # PosterIntersector: A simple polytope intersector for updating pagedLODs in each image-tile PosterIntersector.PosterIntersector( osg.Polytope polytope ) : _intersectionVisitor(0), _parent(0), _polytope(polytope) PosterIntersector.PosterIntersector( double xMin, double yMin, double xMax, double yMax ) : Intersector(osgUtil.Intersector.PROJECTION), _intersectionVisitor(0), _parent(0) _polytope.add( osg.Plane( 1.0, 0.0, 0.0,-xMin) ) _polytope.add( osg.Plane(-1.0, 0.0, 0.0, xMax) ) _polytope.add( osg.Plane( 0.0, 1.0, 0.0,-yMin) ) _polytope.add( osg.Plane( 0.0,-1.0, 0.0, yMax) ) osgUtil.Intersector* PosterIntersector.clone( osgUtil.IntersectionVisitor iv ) matrix = osg.Matrix() if iv.getProjectionMatrix() : matrix.preMult( *iv.getProjectionMatrix() ) if iv.getViewMatrix() : matrix.preMult( *iv.getViewMatrix() ) if iv.getModelMatrix() : matrix.preMult( *iv.getModelMatrix() ) transformedPolytope = osg.Polytope() transformedPolytope.setAndTransformProvidingInverse( _polytope, matrix ) pi = PosterIntersector( transformedPolytope ) pi._intersectionVisitor = iv pi._parent = this return pi.release() bool PosterIntersector.enter( osg.Node node ) if not node.isCullingActive() : return True if _polytope.contains(node.getBound()) : if node.getCullCallback() : cccb = dynamic_cast< osg.ClusterCullingCallback*>( node.getCullCallback() ) if cccb and cccb.cull(_intersectionVisitor, 0, NULL) : return False return True return False void PosterIntersector.reset() _intersectionVisitor = NULL Intersector.reset() void PosterIntersector.intersect( osgUtil.IntersectionVisitor iv, osg.Drawable* drawable ) if not _polytope.contains(drawable.getBound()) : return if iv.getDoDummyTraversal() : return # Find and collect all paged LODs in the node path nodePath = iv.getNodePath() for ( osg.NodePath.iterator itr=nodePath.begin() itr not =nodePath.end() ++itr ) pagedLOD = dynamic_cast<osg.PagedLOD*>(*itr) if pagedLOD : # FIXME: The first non-empty getFileName() is used as the identity of this paged node. # This should work with VPB-generated terrains but maybe unusable with others. for ( unsigned int i=0 i<pagedLOD.getNumFileNames() ++i ) if pagedLOD.getFileName(i).empty() : continue if _parent._visitor.valid() : _parent._visitor.insertName( pagedLOD.getFileName(i) ) break continue #osg.LOD* lod = dynamic_cast<osg.LOD*>(*itr) # if lod : # # if not lod.getName().empty() and _parent._visitor.valid() : # _parent._visitor.insertName( lod.getName() ) # # PosterPrinter: The implementation class of high-res rendering PosterPrinter.PosterPrinter(): _outputTiles(False), _outputTileExt("bmp"), _isRunning(False), _isFinishing(False), _lastBindingFrame(0), _currentRow(0), _currentColumn(0), _camera(0), _finalPoster(0) _intersector = PosterIntersector(-1.0, -1.0, 1.0, 1.0) _visitor = PosterVisitor() _intersector.setPosterVisitor( _visitor ) void PosterPrinter.init( osg.Camera* camera ) if _camera.valid() : init( camera.getViewMatrix(), camera.getProjectionMatrix() ) void PosterPrinter.init( osg.Matrixd view, osg.Matrixd proj ) if _isRunning : return _images.clear() _visitor.clearNames() _tileRows = (int)(_posterSize.y() / _tileSize.y()) _tileColumns = (int)(_posterSize.x() / _tileSize.x()) _currentRow = 0 _currentColumn = 0 _currentViewMatrix = view _currentProjectionMatrix = proj _lastBindingFrame = 0 _isRunning = True _isFinishing = False void PosterPrinter.frame( osg.FrameStamp* fs, osg.Node* node ) # Add cull callbacks to all existing paged nodes, # and advance frame when all callbacks are dispatched. if addCullCallbacks(fs, node) : return if _isFinishing : if fs.getFrameNumber()-_lastBindingFrame :>2 : # Record images and the final poster recordImages() if _finalPoster.valid() : print "Writing final result to file..." osgDB.writeImageFile( *_finalPoster, _outputPosterName ) # Release all cull callbacks to free unused paged nodes removeCullCallbacks( node ) _visitor.clearNames() _isFinishing = False print "Recording images finished." if _isRunning : # Every "copy-to-image" process seems to be finished in 2 frames. # So record them and dispatch camera to next tiles. if fs.getFrameNumber()-_lastBindingFrame :>2 : # Record images and unref them to free memory recordImages() # Release all cull callbacks to free unused paged nodes removeCullCallbacks( node ) _visitor.clearNames() if _camera.valid() : print "Binding sub-camera ", _currentRow, "_", _currentColumn, " to image..." bindCameraToImage( _camera, _currentRow, _currentColumn ) if _currentColumn<_tileColumns-1 : _currentColumn++ else: if _currentRow<_tileRows-1 : _currentRow++ _currentColumn = 0 else: _isRunning = False _isFinishing = True _lastBindingFrame = fs.getFrameNumber() bool PosterPrinter.addCullCallbacks( osg.FrameStamp* fs, osg.Node* node ) if not _visitor.inQueue() or done() : return False _visitor.setAddingCallbacks( True ) _camera.accept( *_visitor ) _lastBindingFrame = fs.getFrameNumber() print "Dispatching callbacks to paged nodes... ", _visitor.inQueue() return True void PosterPrinter.removeCullCallbacks( osg.Node* node ) _visitor.setAddingCallbacks( False ) _camera.accept( *_visitor ) void PosterPrinter.bindCameraToImage( osg.Camera* camera, int row, int col ) stream = strstream() stream, "image_", row, "_", col image = osg.Image() image.setName( stream.str() ) image.allocateImage( (int)_tileSize.x(), (int)_tileSize.y(), 1, GL_RGBA, GL_UNSIGNED_BYTE ) _images[TilePosition(row,col)] = image # Calculate projection matrix offset of each tile offsetMatrix = osg.Matrix.scale(_tileColumns, _tileRows, 1.0) * osg.Matrix.translate(_tileColumns-1-2*col, _tileRows-1-2*row, 0.0) camera.setViewMatrix( _currentViewMatrix ) camera.setProjectionMatrix( _currentProjectionMatrix * offsetMatrix ) # Check intersections between the image-tile box and the model iv = osgUtil.IntersectionVisitor( _intersector ) iv.setReadCallback( g_pagedLoadingCallback ) _intersector.reset() camera.accept( iv ) if _intersector.containsIntersections() : # Apply a cull calback to every paged node obtained, to force the highest level displaying. # This will be done by the PosterVisitor, who already records all the paged nodes. # Reattach cameras and allocated images camera.setRenderingCache( NULL ) # FIXME: Uses for reattaching camera with image, maybe camera.detach( osg.Camera: if (inefficient) else COLOR_BUFFER ) camera.attach( osg.Camera.COLOR_BUFFER, image, 0, 0 ) void PosterPrinter.recordImages() for ( TileImages.iterator itr=_images.begin() itr not =_images.end() ++itr ) image = (itr.second) if _finalPoster.valid() : # FIXME: A stupid way to combine tile images to final result. Any better ideas? row = itr.first.first, col = itr.first.second for ( int t=0 t<image.t() ++t ) source = image.data( 0, t ) target = _finalPoster.data( col*(int)_tileSize.x(), t + row*(int)_tileSize.y() ) memcpy( target, source, image.s() * 4 * sizeof(unsigned char) ) if _outputTiles : osgDB.writeImageFile( *image, image.getName()+"."+_outputTileExt ) _images.clear() # Translated from file 'PosterPrinter.h' #ifndef OSGPOSTER_POSTERPRINTER #define OSGPOSTER_POSTERPRINTER #include <osg/Camera> #include <osg/PagedLOD> #include <osgUtil/IntersectionVisitor> #* PosterVisitor: A visitor for adding culling callbacks to newly allocated paged nodes class PosterVisitor (osg.NodeVisitor) : typedef std.set<str> PagedNodeNameSet PosterVisitor() META_NodeVisitor( osgPoster, PosterVisitor ) def insertName(name): if _pagedNodeNames.insert(name).second : _needToApplyCount++ def eraseName(name): if _pagedNodeNames.erase(name)>0 : _needToApplyCount-- def clearNames(): _pagedNodeNames.clear() _needToApplyCount = 0 _appliedCount = 0 def getNumNames(): return _pagedNodeNames.size() def getPagedNodeNames(): return _pagedNodeNames def getPagedNodeNames(): return _pagedNodeNames def getNeedToApplyCount(): return _needToApplyCount def getAppliedCount(): return _appliedCount def inQueue(): return _needToApplyCount-_appliedCount if (_needToApplyCount>_appliedCount) else 0 def setAddingCallbacks(b): _addingCallbacks = b def getAddingCallbacks(): return _addingCallbacks apply = virtual void( osg.LOD node ) apply = virtual void( osg.PagedLOD node ) def hasCullCallback(nc, target): if nc==target : return True elif not nc : return False hasCullCallback = return( nc.getNestedCallback(), target ) _pagedNodeNames = PagedNodeNameSet() _appliedCount = unsigned int() _needToApplyCount = unsigned int() _addingCallbacks = bool() #* PosterIntersector: A simple polytope intersector for updating pagedLODs in each image-tile class PosterIntersector (osgUtil.Intersector) : typedef std.set<str> PagedNodeNameSet PosterIntersector( osg.Polytope polytope ) PosterIntersector( double xMin, double yMin, double xMax, double yMax ) def setPosterVisitor(pcv): _visitor = pcv def getPosterVisitor(): return _visitor def getPosterVisitor(): return _visitor clone = virtual Intersector*( osgUtil.IntersectionVisitor iv ) def containsIntersections(): return _visitor.valid() and _visitor.getNumNames()>0 enter = virtual bool( osg.Node node ) def leave(): reset = virtual void() intersect = virtual void( osgUtil.IntersectionVisitor iv, osg.Drawable* drawable ) _intersectionVisitor = osgUtil.IntersectionVisitor*() _visitor = PosterVisitor() _parent = PosterIntersector*() _polytope = osg.Polytope() #* PosterPrinter: The implementation class of high-res rendering class PosterPrinter (osg.Referenced) : typedef std.pair<unsigned int, unsigned int> TilePosition typedef std.map< TilePosition, osg.Image > TileImages PosterPrinter() #* Set to output each sub-image-tile to disk def setOutputTiles(b): _outputTiles = b def getOutputTiles(): return _outputTiles #* Set the output sub-image-tile extension, e.g. bmp def setOutputTileExtension(ext): _outputTileExt = ext def getOutputTileExtension(): return _outputTileExt #* Set the output poster name, e.g. output.bmp def setOutputPosterName(name): _outputPosterName = name def getOutputPosterName(): return _outputPosterName #* Set the size of each sub-image-tile, e.g. 640x480 def setTileSize(w, h): _tileSize.set(w, h) def getTileSize(): return _tileSize #* Set the final size of the high-res poster, e.g. 6400x4800 def setPosterSize(w, h): _posterSize.set(w, h) def getPosterSize(): return _posterSize #* Set the capturing camera def setCamera(camera): _camera = camera def getCamera(): return _camera #* Set the final poster image, should be already allocated def setFinalPoster(image): _finalPoster = image def getFinalPoster(): return _finalPoster def getPosterVisitor(): return _visitor def getPosterVisitor(): return _visitor def done(): return not _isRunning and not _isFinishing init = void( osg.Camera* camera ) init = void( osg.Matrixd view, osg.Matrixd proj ) frame = void( osg.FrameStamp* fs, osg.Node* node ) virtual ~PosterPrinter() addCullCallbacks = bool( osg.FrameStamp* fs, osg.Node* node ) removeCullCallbacks = void( osg.Node* node ) bindCameraToImage = void( osg.Camera* camera, int row, int col ) recordImages = void() _outputTiles = bool() _outputTileExt = str() _outputPosterName = str() _tileSize = osg.Vec2() _posterSize = osg.Vec2() _isRunning = bool() _isFinishing = bool() _lastBindingFrame = unsigned int() _tileRows = int() _tileColumns = int() _currentRow = int() _currentColumn = int() _intersector = PosterIntersector() _visitor = PosterVisitor() _currentViewMatrix = osg.Matrixd() _currentProjectionMatrix = osg.Matrixd() _camera = osg.Camera() _finalPoster = osg.Image() _images = TileImages() #endif if __name__ == "__main__": main(sys.argv)
JaneliaSciComp/osgpyplusplus
examples/rough_translated1/osgposter.py
Python
bsd-3-clause
33,474
import json import sys import datetime from utils import clean_text lang = sys.argv[1] lang_git = sys.argv[2] timestamp = '{:%Y-%m-%d %H:%M:%S %Z}'.format(datetime.datetime.now()) header="""--- layout: default title: %s packages --- %s: [trendy](#trendy) and [latest](#latest) repositories - updated %s """ % (lang, lang, timestamp) header_packages=""" ## <a id="latest"></a>%s packages | Package | Description | |:-------------|:------------------|""" % lang header_trendy=""" ## <a id="trendy"></a>%s trendy repositories [Trendy %s repositories](https://github.com/trending/%s?since=daily) | Repository | Description | |:-------------|:------------------|""" % (lang, lang, lang_git) print(header) print(header_trendy) fname = "data/%s-github-trendy.json" % lang with open(fname) as f: for line in f: package = json.loads(line) if "description" not in package or "name" not in package or "url" not in package or not package["name"] or not package["url"]: continue if package["description"] is None: package["description"] = "" row = "| [%s](%s) | %s |" % (clean_text(package["name"]), package["url"], clean_text(package["description"])) print(row) print(header_packages) fname = "data/%s.json" % lang with open(fname) as f: for line in f: package = json.loads(line) if "description" not in package or "name" not in package or "url" not in package or not package["name"] or not package["url"]: continue if package["description"] is None: package["description"] = "" row = "| [%s](%s) | %s |" % (clean_text(package["name"]), package["url"], clean_text(package["description"])) print(row)
matteoredaelli/programming-languages-packages
build-package-html-page.py
Python
gpl-3.0
1,762
"""UptimeRobot binary_sensor platform.""" from __future__ import annotations from homeassistant.components.binary_sensor import ( DEVICE_CLASS_CONNECTIVITY, BinarySensorEntity, BinarySensorEntityDescription, ) from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.update_coordinator import DataUpdateCoordinator from .const import DOMAIN from .entity import UptimeRobotEntity async def async_setup_entry( hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback ) -> None: """Set up the UptimeRobot binary_sensors.""" coordinator: DataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id] async_add_entities( [ UptimeRobotBinarySensor( coordinator, BinarySensorEntityDescription( key=str(monitor.id), name=monitor.friendly_name, device_class=DEVICE_CLASS_CONNECTIVITY, ), monitor=monitor, ) for monitor in coordinator.data ], ) class UptimeRobotBinarySensor(UptimeRobotEntity, BinarySensorEntity): """Representation of a UptimeRobot binary sensor.""" @property def is_on(self) -> bool: """Return True if the entity is on.""" return self.monitor_available
aronsky/home-assistant
homeassistant/components/uptimerobot/binary_sensor.py
Python
apache-2.0
1,463
# -*- coding: utf-8 -*- ############################################################################### # # DeleteActivity # Removes an individual strength training activity from a user’s feed. # # 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 DeleteActivity(Choreography): def __init__(self, temboo_session): """ Create a new instance of the DeleteActivity Choreo. A TembooSession object, containing a valid set of Temboo credentials, must be supplied. """ super(DeleteActivity, self).__init__(temboo_session, '/Library/RunKeeper/StrengthTrainingActivities/DeleteActivity') def new_input_set(self): return DeleteActivityInputSet() def _make_result_set(self, result, path): return DeleteActivityResultSet(result, path) def _make_execution(self, session, exec_id, path): return DeleteActivityChoreographyExecution(session, exec_id, path) class DeleteActivityInputSet(InputSet): """ An InputSet with methods appropriate for specifying the inputs to the DeleteActivity Choreo. The InputSet object is used to specify input parameters when executing this Choreo. """ def set_AccessToken(self, value): """ Set the value of the AccessToken input for this Choreo. ((required, string) The Access Token retrieved after the final step in the OAuth2 process.) """ super(DeleteActivityInputSet, self)._set_input('AccessToken', value) def set_ActivityID(self, value): """ Set the value of the ActivityID input for this Choreo. ((required, integer) This can be the individual id of the activity, or you can pass the full uri for the activity as returned from RetrieveActivities response (i.e. /strengthTrainingActivities/125927913).) """ super(DeleteActivityInputSet, self)._set_input('ActivityID', value) class DeleteActivityResultSet(ResultSet): """ A ResultSet with methods tailored to the values returned by the DeleteActivity 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. ((boolean) Contains the string "true" when an activity is deleted successfully.) """ return self._output.get('Response', None) class DeleteActivityChoreographyExecution(ChoreographyExecution): def _make_result_set(self, response, path): return DeleteActivityResultSet(response, path)
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/RunKeeper/StrengthTrainingActivities/DeleteActivity.py
Python
gpl-2.0
3,469
#!/usr/bin/env python """ Copyright (c) 2014-2022 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from __future__ import print_function import codecs import csv import glob import inspect import os import re import sqlite3 import sys import time sys.dont_write_bytecode = True sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) # to enable calling from current directory too from core.addr import addr_to_int from core.addr import int_to_addr from core.addr import make_mask from core.common import bogon_ip from core.common import cdn_ip from core.common import check_whitelisted from core.common import load_trails from core.common import retrieve_content from core.compat import xrange from core.settings import config from core.settings import read_config from core.settings import read_whitelist from core.settings import BAD_TRAIL_PREFIXES from core.settings import FRESH_IPCAT_DELTA_DAYS from core.settings import LOW_PRIORITY_INFO_KEYWORDS from core.settings import HIGH_PRIORITY_INFO_KEYWORDS from core.settings import HIGH_PRIORITY_REFERENCES from core.settings import IPCAT_CSV_FILE from core.settings import IPCAT_SQLITE_FILE from core.settings import IPCAT_URL from core.settings import IS_WIN from core.settings import ROOT_DIR from core.settings import UNICODE_ENCODING from core.settings import USERS_DIR from core.trailsdict import TrailsDict from thirdparty import six from thirdparty.six.moves import urllib as _urllib # patch for self-signed certificates (e.g. CUSTOM_TRAILS_URL) try: import ssl ssl._create_default_https_context = ssl._create_unverified_context except (ImportError, AttributeError): pass def _chown(filepath): if not IS_WIN and os.path.exists(filepath): try: os.chown(filepath, int(os.environ.get("SUDO_UID", -1)), int(os.environ.get("SUDO_GID", -1))) except Exception as ex: print("[!] chown problem with '%s' ('%s')" % (filepath, ex)) def _fopen(filepath, mode="rb", opener=open): retval = opener(filepath, mode) if "w+" in mode: _chown(filepath) return retval def update_trails(force=False, offline=False): """ Update trails from feeds """ success = False trails = TrailsDict() duplicates = {} try: if not os.path.isdir(USERS_DIR): os.makedirs(USERS_DIR, 0o755) except Exception as ex: exit("[!] something went wrong during creation of directory '%s' ('%s')" % (USERS_DIR, ex)) _chown(USERS_DIR) if config.UPDATE_SERVER: print("[i] retrieving trails from provided 'UPDATE_SERVER' server...") content = retrieve_content(config.UPDATE_SERVER) if not content or content.count(',') < 2: print("[x] unable to retrieve data from '%s'" % config.UPDATE_SERVER) else: with _fopen(config.TRAILS_FILE, "w+b" if six.PY2 else "w+", open if six.PY2 else codecs.open) as f: f.write(content) trails = load_trails() else: trail_files = set() for dirpath, dirnames, filenames in os.walk(os.path.abspath(os.path.join(ROOT_DIR, "trails"))): for filename in filenames: trail_files.add(os.path.abspath(os.path.join(dirpath, filename))) if config.CUSTOM_TRAILS_DIR: for dirpath, dirnames, filenames in os.walk(os.path.abspath(os.path.join(ROOT_DIR, os.path.expanduser(config.CUSTOM_TRAILS_DIR)))): for filename in filenames: trail_files.add(os.path.abspath(os.path.join(dirpath, filename))) if not trails and (force or not os.path.isfile(config.TRAILS_FILE) or (time.time() - os.stat(config.TRAILS_FILE).st_mtime) >= config.UPDATE_PERIOD or os.stat(config.TRAILS_FILE).st_size == 0 or any(os.stat(_).st_mtime > os.stat(config.TRAILS_FILE).st_mtime for _ in trail_files)): if not config.offline: print("[i] updating trails (this might take a while)...") else: print("[i] checking trails...") if not offline and (force or config.USE_FEED_UPDATES): _ = os.path.abspath(os.path.join(ROOT_DIR, "trails", "feeds")) if _ not in sys.path: sys.path.append(_) filenames = sorted(glob.glob(os.path.join(_, "*.py"))) else: filenames = [] _ = os.path.abspath(os.path.join(ROOT_DIR, "trails")) if _ not in sys.path: sys.path.append(_) filenames += [os.path.join(_, "custom")] filenames += [os.path.join(_, "static")] # Note: higher priority than previous one because of dummy user trails (FE) filenames = [_ for _ in filenames if "__init__.py" not in _] if config.DISABLED_FEEDS: filenames = [filename for filename in filenames if os.path.splitext(os.path.split(filename)[-1])[0] not in re.split(r"[^\w]+", config.DISABLED_FEEDS)] for i in xrange(len(filenames)): filename = filenames[i] try: module = __import__(os.path.basename(filename).split(".py")[0]) except (ImportError, SyntaxError) as ex: print("[x] something went wrong during import of feed file '%s' ('%s')" % (filename, ex)) continue for name, function in inspect.getmembers(module, inspect.isfunction): if name == "fetch": url = module.__url__ # Note: to prevent "SyntaxError: can not delete variable 'module' referenced in nested scope" print(" [o] '%s'%s" % (url, " " * 20 if len(url) < 20 else "")) sys.stdout.write("[?] progress: %d/%d (%d%%)\r" % (i, len(filenames), i * 100 // len(filenames))) sys.stdout.flush() if config.DISABLED_TRAILS_INFO_REGEX and re.search(config.DISABLED_TRAILS_INFO_REGEX, getattr(module, "__info__", "")): continue try: results = function() for item in results.items(): if item[0].startswith("www.") and '/' not in item[0]: item = [item[0][len("www."):], item[1]] if item[0] in trails: if item[0] not in duplicates: duplicates[item[0]] = set((trails[item[0]][1],)) duplicates[item[0]].add(item[1][1]) if not (item[0] in trails and (any(_ in item[1][0] for _ in LOW_PRIORITY_INFO_KEYWORDS) or trails[item[0]][1] in HIGH_PRIORITY_REFERENCES)) or (item[1][1] in HIGH_PRIORITY_REFERENCES and "history" not in item[1][0]) or any(_ in item[1][0] for _ in HIGH_PRIORITY_INFO_KEYWORDS): trails[item[0]] = item[1] if not results and not any(_ in url for _ in ("abuse.ch", "cobaltstrike")): print("[x] something went wrong during remote data retrieval ('%s')" % url) except Exception as ex: print("[x] something went wrong during processing of feed file '%s' ('%s')" % (filename, ex)) try: sys.modules.pop(module.__name__) del module except Exception: pass # custom trails from remote location if config.CUSTOM_TRAILS_URL: print(" [o] '(remote custom)'%s" % (" " * 20)) for url in re.split(r"[;,]", config.CUSTOM_TRAILS_URL): url = url.strip() if not url: continue url = ("http://%s" % url) if "//" not in url else url content = retrieve_content(url) if not content: print("[x] unable to retrieve data (or empty response) from '%s'" % url) else: __info__ = "blacklisted" __reference__ = "(remote custom)" # urlparse.urlsplit(url).netloc for line in content.split('\n'): line = line.strip() if not line or line.startswith('#'): continue line = re.sub(r"\s*#.*", "", line) if '://' in line: line = re.search(r"://(.*)", line).group(1) line = line.rstrip('/') if line in trails and any(_ in trails[line][1] for _ in ("custom", "static")): continue if '/' in line: trails[line] = (__info__, __reference__) line = line.split('/')[0] elif re.search(r"\A\d+\.\d+\.\d+\.\d+\Z", line): trails[line] = (__info__, __reference__) else: trails[line.strip('.')] = (__info__, __reference__) for match in re.finditer(r"(\d+\.\d+\.\d+\.\d+)/(\d+)", content): prefix, mask = match.groups() mask = int(mask) if mask > 32: continue start_int = addr_to_int(prefix) & make_mask(mask) end_int = start_int | ((1 << 32 - mask) - 1) if 0 <= end_int - start_int <= 1024: address = start_int while start_int <= address <= end_int: trails[int_to_addr(address)] = (__info__, __reference__) address += 1 print("[i] post-processing trails (this might take a while)...") # basic cleanup for key in list(trails.keys()): if key not in trails: continue if config.DISABLED_TRAILS_INFO_REGEX: if re.search(config.DISABLED_TRAILS_INFO_REGEX, trails[key][0]): del trails[key] continue try: _key = key.decode(UNICODE_ENCODING) if isinstance(key, bytes) else key _key = _key.encode("idna") if six.PY3: _key = _key.decode(UNICODE_ENCODING) if _key != key: # for domains with non-ASCII letters (e.g. phishing) trails[_key] = trails[key] del trails[key] key = _key except: pass if not key or re.search(r"(?i)\A\.?[a-z]+\Z", key) and not any(_ in trails[key][1] for _ in ("custom", "static")): del trails[key] continue if re.search(r"\A\d+\.\d+\.\d+\.\d+\Z", key): if any(_ in trails[key][0] for _ in ("parking site", "sinkhole")) and key in duplicates: # Note: delete (e.g.) junk custom trails if static trail is a sinkhole del duplicates[key] if trails[key][0] == "malware": trails[key] = ("potential malware site", trails[key][1]) if config.get("IP_MINIMUM_FEEDS", 3) > 1: if (key not in duplicates or len(duplicates[key]) < config.get("IP_MINIMUM_FEEDS", 3)) and re.search(r"\b(custom|static)\b", trails[key][1]) is None: del trails[key] continue if any(int(_) > 255 for _ in key.split('.')): del trails[key] continue if trails[key][0] == "ransomware": trails[key] = ("ransomware (malware)", trails[key][1]) if key.startswith("www.") and '/' not in key: _ = trails[key] del trails[key] key = key[len("www."):] if key: trails[key] = _ if '?' in key and not key.startswith('/'): _ = trails[key] del trails[key] key = key.split('?')[0] if key: trails[key] = _ if '//' in key: _ = trails[key] del trails[key] key = key.replace('//', '/') trails[key] = _ if key != key.lower(): _ = trails[key] del trails[key] key = key.lower() trails[key] = _ if key in duplicates: _ = trails[key] others = sorted(duplicates[key] - set((_[1],))) if others and " (+" not in _[1]: trails[key] = (_[0], "%s (+%s)" % (_[1], ','.join(others))) read_whitelist() for key in list(trails.keys()): match = re.search(r"\A(\d+\.\d+\.\d+\.\d+)\b", key) if check_whitelisted(key) or any(key.startswith(_) for _ in BAD_TRAIL_PREFIXES): del trails[key] elif match and (bogon_ip(match.group(1)) or cdn_ip(match.group(1))) and not any(_ in trails[key][0] for _ in ("parking", "sinkhole")): del trails[key] else: try: key.decode("utf8") if hasattr(key, "decode") else key.encode("utf8") trails[key][0].decode("utf8") if hasattr(trails[key][0], "decode") else trails[key][0].encode("utf8") trails[key][1].decode("utf8") if hasattr(trails[key][1], "decode") else trails[key][1].encode("utf8") except UnicodeError: del trails[key] try: if trails: with _fopen(config.TRAILS_FILE, "w+b" if six.PY2 else "w+", open if six.PY2 else codecs.open) as f: writer = csv.writer(f, delimiter=',', quotechar='\"', quoting=csv.QUOTE_MINIMAL) for trail in trails: row = (trail, trails[trail][0], trails[trail][1]) writer.writerow(row) success = True except Exception as ex: print("[x] something went wrong during trails file write '%s' ('%s')" % (config.TRAILS_FILE, ex)) print("[i] update finished%s" % (40 * " ")) if success: print("[i] trails stored to '%s'" % config.TRAILS_FILE) return trails def update_ipcat(force=False): try: if not os.path.isdir(USERS_DIR): os.makedirs(USERS_DIR, 0o755) except Exception as ex: exit("[!] something went wrong during creation of directory '%s' ('%s')" % (USERS_DIR, ex)) _chown(USERS_DIR) if force or not os.path.isfile(IPCAT_CSV_FILE) or not os.path.isfile(IPCAT_SQLITE_FILE) or (time.time() - os.stat(IPCAT_CSV_FILE).st_mtime) >= FRESH_IPCAT_DELTA_DAYS * 24 * 3600 or os.stat(IPCAT_SQLITE_FILE).st_size == 0: print("[i] updating ipcat database...") try: with open(IPCAT_CSV_FILE, "w+b") as f: f.write(_urllib.request.urlopen(IPCAT_URL).read()) except Exception as ex: print("[x] something went wrong during retrieval of '%s' ('%s')" % (IPCAT_URL, ex)) else: try: if os.path.exists(IPCAT_SQLITE_FILE): os.remove(IPCAT_SQLITE_FILE) with sqlite3.connect(IPCAT_SQLITE_FILE, isolation_level=None, check_same_thread=False) as con: cur = con.cursor() cur.execute("BEGIN TRANSACTION") cur.execute("CREATE TABLE ranges (start_int INT, end_int INT, name TEXT)") with open(IPCAT_CSV_FILE) as f: for row in f: if not row.startswith('#') and not row.startswith('start'): row = row.strip().split(",") cur.execute("INSERT INTO ranges VALUES (?, ?, ?)", (addr_to_int(row[0]), addr_to_int(row[1]), row[2])) cur.execute("COMMIT") cur.close() con.commit() except Exception as ex: print("[x] something went wrong during ipcat database update ('%s')" % ex) _chown(IPCAT_CSV_FILE) _chown(IPCAT_SQLITE_FILE) def main(): if "-c" in sys.argv: read_config(sys.argv[sys.argv.index("-c") + 1]) try: offline = "--offline" in sys.argv update_trails(force=True, offline=offline) if not offline: update_ipcat() except KeyboardInterrupt: print("\r[x] Ctrl-C pressed") else: if "-r" in sys.argv: results = [] with _fopen(config.TRAILS_FILE, "rb" if six.PY2 else 'r', open if six.PY2 else codecs.open) as f: for line in f: if line and line[0].isdigit(): items = line.split(',', 2) if re.search(r"\A[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\Z", items[0]): ip = items[0] reputation = 1 lists = items[-1] if '+' in lists: reputation = 2 + lists.count(',') if "(custom)" in lists: reputation -= 1 if "(static)" in lists: reputation -= 1 reputation -= max(0, lists.count("prox") + lists.count("maxmind") + lists.count("spys.ru") + lists.count("rosinstrument") - 1) # remove duplicate proxy hits reputation -= max(0, lists.count("blutmagie") + lists.count("torproject") - 1) # remove duplicate tor hits if reputation > 0: results.append((ip, reputation)) results = sorted(results, key=lambda _: _[1], reverse=True) for result in results: sys.stderr.write("%s\t%s\n" % (result[0], result[1])) sys.stderr.flush() if "--console" in sys.argv: with _fopen(config.TRAILS_FILE, "rb" if six.PY2 else 'r', open if six.PY2 else codecs.open) as f: for line in f: sys.stdout.write(line) if __name__ == "__main__": main()
stamparm/maltrail
core/update.py
Python
mit
19,284
#!/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. """Test the bumpfee RPC. Verifies that the bumpfee RPC creates replacement transactions successfully when its preconditions are met, and returns appropriate errors in other cases. This module consists of around a dozen individual test cases implemented in the top-level functions named as test_<test_case_description>. The test functions can be disabled or reordered if needed for debugging. If new test cases are added in the future, they should try to follow the same convention and not make assumptions about execution order. """ from segwit import send_to_witness from test_framework.test_framework import IoPTestFramework from test_framework import blocktools from test_framework.mininode import CTransaction from test_framework.util import * import io # Sequence number that is BIP 125 opt-in and BIP 68-compliant BIP125_SEQUENCE_NUMBER = 0xfffffffd WALLET_PASSPHRASE = "test" WALLET_PASSPHRASE_TIMEOUT = 3600 class BumpFeeTest(IoPTestFramework): def set_test_params(self): self.num_nodes = 2 self.setup_clean_chain = True self.extra_args = [["-prematurewitness", "-walletprematurewitness", "-walletrbf={}".format(i)] for i in range(self.num_nodes)] def run_test(self): # Encrypt wallet for test_locked_wallet_fails test self.nodes[1].node_encrypt_wallet(WALLET_PASSPHRASE) self.start_node(1) self.nodes[1].walletpassphrase(WALLET_PASSPHRASE, WALLET_PASSPHRASE_TIMEOUT) connect_nodes_bi(self.nodes, 0, 1) self.sync_all() peer_node, rbf_node = self.nodes rbf_node_address = rbf_node.getnewaddress() # fund rbf node with 10 coins of 0.001 iop (100,000 satoshis) self.log.info("Mining blocks...") peer_node.generate(110) self.sync_all() for i in range(25): peer_node.sendtoaddress(rbf_node_address, 0.001) self.sync_all() peer_node.generate(1) self.sync_all() assert_equal(rbf_node.getbalance(), Decimal("0.025")) self.log.info("Running tests") dest_address = peer_node.getnewaddress() test_simple_bumpfee_succeeds(rbf_node, peer_node, dest_address) test_segwit_bumpfee_succeeds(rbf_node, dest_address) test_nonrbf_bumpfee_fails(peer_node, dest_address) test_notmine_bumpfee_fails(rbf_node, peer_node, dest_address) test_bumpfee_with_descendant_fails(rbf_node, rbf_node_address, dest_address) test_small_output_fails(rbf_node, dest_address) test_dust_to_fee(rbf_node, dest_address) test_settxfee(rbf_node, dest_address) test_rebumping(rbf_node, dest_address) test_rebumping_not_replaceable(rbf_node, dest_address) test_unconfirmed_not_spendable(rbf_node, rbf_node_address) test_bumpfee_metadata(rbf_node, dest_address) test_locked_wallet_fails(rbf_node, dest_address) self.log.info("Success") def test_simple_bumpfee_succeeds(rbf_node, peer_node, dest_address): rbfid = spend_one_input(rbf_node, dest_address) rbftx = rbf_node.gettransaction(rbfid) sync_mempools((rbf_node, peer_node)) assert rbfid in rbf_node.getrawmempool() and rbfid in peer_node.getrawmempool() bumped_tx = rbf_node.bumpfee(rbfid) assert_equal(bumped_tx["errors"], []) assert bumped_tx["fee"] - abs(rbftx["fee"]) > 0 # check that bumped_tx propogates, original tx was evicted and has a wallet conflict sync_mempools((rbf_node, peer_node)) assert bumped_tx["txid"] in rbf_node.getrawmempool() assert bumped_tx["txid"] in peer_node.getrawmempool() assert rbfid not in rbf_node.getrawmempool() assert rbfid not in peer_node.getrawmempool() oldwtx = rbf_node.gettransaction(rbfid) assert len(oldwtx["walletconflicts"]) > 0 # check wallet transaction replaces and replaced_by values bumpedwtx = rbf_node.gettransaction(bumped_tx["txid"]) assert_equal(oldwtx["replaced_by_txid"], bumped_tx["txid"]) assert_equal(bumpedwtx["replaces_txid"], rbfid) def test_segwit_bumpfee_succeeds(rbf_node, dest_address): # Create a transaction with segwit output, then create an RBF transaction # which spends it, and make sure bumpfee can be called on it. segwit_in = next(u for u in rbf_node.listunspent() if u["amount"] == Decimal("0.001")) segwit_out = rbf_node.validateaddress(rbf_node.getnewaddress()) rbf_node.addwitnessaddress(segwit_out["address"]) segwitid = send_to_witness( use_p2wsh=False, node=rbf_node, utxo=segwit_in, pubkey=segwit_out["pubkey"], encode_p2sh=False, amount=Decimal("0.0009"), sign=True) rbfraw = rbf_node.createrawtransaction([{ 'txid': segwitid, 'vout': 0, "sequence": BIP125_SEQUENCE_NUMBER }], {dest_address: Decimal("0.0005"), rbf_node.getrawchangeaddress(): Decimal("0.0003")}) rbfsigned = rbf_node.signrawtransaction(rbfraw) rbfid = rbf_node.sendrawtransaction(rbfsigned["hex"]) assert rbfid in rbf_node.getrawmempool() bumped_tx = rbf_node.bumpfee(rbfid) assert bumped_tx["txid"] in rbf_node.getrawmempool() assert rbfid not in rbf_node.getrawmempool() def test_nonrbf_bumpfee_fails(peer_node, dest_address): # cannot replace a non RBF transaction (from node which did not enable RBF) not_rbfid = peer_node.sendtoaddress(dest_address, Decimal("0.00090000")) assert_raises_rpc_error(-4, "not BIP 125 replaceable", peer_node.bumpfee, not_rbfid) def test_notmine_bumpfee_fails(rbf_node, peer_node, dest_address): # cannot bump fee unless the tx has only inputs that we own. # here, the rbftx has a peer_node coin and then adds a rbf_node input # Note that this test depends upon the RPC code checking input ownership prior to change outputs # (since it can't use fundrawtransaction, it lacks a proper change output) utxos = [node.listunspent()[-1] for node in (rbf_node, peer_node)] inputs = [{ "txid": utxo["txid"], "vout": utxo["vout"], "address": utxo["address"], "sequence": BIP125_SEQUENCE_NUMBER } for utxo in utxos] output_val = sum(utxo["amount"] for utxo in utxos) - Decimal("0.001") rawtx = rbf_node.createrawtransaction(inputs, {dest_address: output_val}) signedtx = rbf_node.signrawtransaction(rawtx) signedtx = peer_node.signrawtransaction(signedtx["hex"]) rbfid = rbf_node.sendrawtransaction(signedtx["hex"]) assert_raises_rpc_error(-4, "Transaction contains inputs that don't belong to this wallet", rbf_node.bumpfee, rbfid) def test_bumpfee_with_descendant_fails(rbf_node, rbf_node_address, dest_address): # cannot bump fee if the transaction has a descendant # parent is send-to-self, so we don't have to check which output is change when creating the child tx parent_id = spend_one_input(rbf_node, rbf_node_address) tx = rbf_node.createrawtransaction([{"txid": parent_id, "vout": 0}], {dest_address: 0.00020000}) tx = rbf_node.signrawtransaction(tx) txid = rbf_node.sendrawtransaction(tx["hex"]) assert_raises_rpc_error(-8, "Transaction has descendants in the wallet", rbf_node.bumpfee, parent_id) def test_small_output_fails(rbf_node, dest_address): # cannot bump fee with a too-small output rbfid = spend_one_input(rbf_node, dest_address) rbf_node.bumpfee(rbfid, {"totalFee": 50000}) rbfid = spend_one_input(rbf_node, dest_address) assert_raises_rpc_error(-4, "Change output is too small", rbf_node.bumpfee, rbfid, {"totalFee": 50001}) def test_dust_to_fee(rbf_node, dest_address): # check that if output is reduced to dust, it will be converted to fee # the bumped tx sets fee=49,900, but it converts to 50,000 rbfid = spend_one_input(rbf_node, dest_address) fulltx = rbf_node.getrawtransaction(rbfid, 1) bumped_tx = rbf_node.bumpfee(rbfid, {"totalFee": 49900}) full_bumped_tx = rbf_node.getrawtransaction(bumped_tx["txid"], 1) assert_equal(bumped_tx["fee"], Decimal("0.00050000")) assert_equal(len(fulltx["vout"]), 2) assert_equal(len(full_bumped_tx["vout"]), 1) #change output is eliminated def test_settxfee(rbf_node, dest_address): # check that bumpfee reacts correctly to the use of settxfee (paytxfee) rbfid = spend_one_input(rbf_node, dest_address) requested_feerate = Decimal("0.00025000") rbf_node.settxfee(requested_feerate) bumped_tx = rbf_node.bumpfee(rbfid) actual_feerate = bumped_tx["fee"] * 1000 / rbf_node.getrawtransaction(bumped_tx["txid"], True)["size"] # Assert that the difference between the requested feerate and the actual # feerate of the bumped transaction is small. assert_greater_than(Decimal("0.00001000"), abs(requested_feerate - actual_feerate)) rbf_node.settxfee(Decimal("0.00000000")) # unset paytxfee def test_rebumping(rbf_node, dest_address): # check that re-bumping the original tx fails, but bumping the bumper succeeds rbfid = spend_one_input(rbf_node, dest_address) bumped = rbf_node.bumpfee(rbfid, {"totalFee": 2000}) assert_raises_rpc_error(-4, "already bumped", rbf_node.bumpfee, rbfid, {"totalFee": 3000}) rbf_node.bumpfee(bumped["txid"], {"totalFee": 3000}) def test_rebumping_not_replaceable(rbf_node, dest_address): # check that re-bumping a non-replaceable bump tx fails rbfid = spend_one_input(rbf_node, dest_address) bumped = rbf_node.bumpfee(rbfid, {"totalFee": 10000, "replaceable": False}) assert_raises_rpc_error(-4, "Transaction is not BIP 125 replaceable", rbf_node.bumpfee, bumped["txid"], {"totalFee": 20000}) def test_unconfirmed_not_spendable(rbf_node, rbf_node_address): # check that unconfirmed outputs from bumped transactions are not spendable rbfid = spend_one_input(rbf_node, rbf_node_address) rbftx = rbf_node.gettransaction(rbfid)["hex"] assert rbfid in rbf_node.getrawmempool() bumpid = rbf_node.bumpfee(rbfid)["txid"] assert bumpid in rbf_node.getrawmempool() assert rbfid not in rbf_node.getrawmempool() # check that outputs from the bump transaction are not spendable # due to the replaces_txid check in CWallet::AvailableCoins assert_equal([t for t in rbf_node.listunspent(minconf=0, include_unsafe=False) if t["txid"] == bumpid], []) # submit a block with the rbf tx to clear the bump tx out of the mempool, # then call abandon to make sure the wallet doesn't attempt to resubmit the # bump tx, then invalidate the block so the rbf tx will be put back in the # mempool. this makes it possible to check whether the rbf tx outputs are # spendable before the rbf tx is confirmed. block = submit_block_with_tx(rbf_node, rbftx) rbf_node.abandontransaction(bumpid) rbf_node.invalidateblock(block.hash) assert bumpid not in rbf_node.getrawmempool() assert rbfid in rbf_node.getrawmempool() # check that outputs from the rbf tx are not spendable before the # transaction is confirmed, due to the replaced_by_txid check in # CWallet::AvailableCoins assert_equal([t for t in rbf_node.listunspent(minconf=0, include_unsafe=False) if t["txid"] == rbfid], []) # check that the main output from the rbf tx is spendable after confirmed rbf_node.generate(1) assert_equal( sum(1 for t in rbf_node.listunspent(minconf=0, include_unsafe=False) if t["txid"] == rbfid and t["address"] == rbf_node_address and t["spendable"]), 1) def test_bumpfee_metadata(rbf_node, dest_address): rbfid = rbf_node.sendtoaddress(dest_address, Decimal("0.00100000"), "comment value", "to value") bumped_tx = rbf_node.bumpfee(rbfid) bumped_wtx = rbf_node.gettransaction(bumped_tx["txid"]) assert_equal(bumped_wtx["comment"], "comment value") assert_equal(bumped_wtx["to"], "to value") def test_locked_wallet_fails(rbf_node, dest_address): rbfid = spend_one_input(rbf_node, dest_address) rbf_node.walletlock() assert_raises_rpc_error(-13, "Please enter the wallet passphrase with walletpassphrase first.", rbf_node.bumpfee, rbfid) def spend_one_input(node, dest_address): tx_input = dict( sequence=BIP125_SEQUENCE_NUMBER, **next(u for u in node.listunspent() if u["amount"] == Decimal("0.00100000"))) rawtx = node.createrawtransaction( [tx_input], {dest_address: Decimal("0.00050000"), node.getrawchangeaddress(): Decimal("0.00049000")}) signedtx = node.signrawtransaction(rawtx) txid = node.sendrawtransaction(signedtx["hex"]) return txid def submit_block_with_tx(node, tx): ctx = CTransaction() ctx.deserialize(io.BytesIO(hex_str_to_bytes(tx))) tip = node.getbestblockhash() height = node.getblockcount() + 1 block_time = node.getblockheader(tip)["mediantime"] + 1 block = blocktools.create_block(int(tip, 16), blocktools.create_coinbase(height), block_time) block.vtx.append(ctx) block.rehash() block.hashMerkleRoot = block.calc_merkle_root() block.solve() node.submitblock(bytes_to_hex_str(block.serialize(True))) return block if __name__ == "__main__": BumpFeeTest().main()
Jcing95/iop-hd
test/functional/bumpfee.py
Python
mit
13,445
import attr from typing import ClassVar @attr.s(auto_attribs=True) class A1: bar1: int <error descr="Fields with a default value must come after any fields without a default.">baz1</error>: int = 1 foo1: int <error descr="Fields with a default value must come after any fields without a default.">bar2</error>: int = 2 baz2: int foo2: int = 3 @attr.s(auto_attribs=True) class A2: bar1: int baz1: ClassVar[int] = 1 foo1: int bar2: ClassVar[int] = 2 baz2: int foo2: int = 3 @attr.s(auto_attribs=True) class B1: a: int = attr.ib() b: int @attr.s(auto_attribs=True) class B2: <error descr="Fields with a default value must come after any fields without a default.">a</error>: int = attr.ib(default=1) b: int = attr.ib() @attr.s(auto_attribs=True) class B3: <error descr="Fields with a default value must come after any fields without a default.">a</error>: int = attr.ib(default=attr.Factory(int)) b: int = attr.ib() @attr.s class C1: <error descr="Fields with a default value must come after any fields without a default.">x</error> = attr.ib() y = attr.ib() @x.default def name_does_not_matter(self): return 1 @attr.dataclass class D1: x: int = attr.NOTHING y: int @attr.dataclass class D2: x: int = attr.ib(default=attr.NOTHING) y: int @attr.dataclass class E1: x: int = 0 y: int = attr.ib(init=False)
goodwinnk/intellij-community
python/testData/inspections/PyDataclassInspection/attrsFieldsOrder.py
Python
apache-2.0
1,439
""" Last Edited By: Kevin Flathers Date Las Edited: 06/07/2017 Author: Kevin Flathers Date Created: 05/27/2017 Purpose: """ from .Tgml import * class ConvertValue(Tgml): DEFAULT_PROPERTIES = {} SUPPORTED_CHILDREN = {} def __init__(self, *args, input_type='blank', **kwargs): super().__init__(*args, input_type=input_type, **kwargs) self.__properties = {} self.__exposed_properties = {} @property def properties(self): return self.__properties @properties.setter def properties(self, value): self.__properties = value @property def exposed_properties(self): return self.__properties @exposed_properties.setter def exposed_properties(self, value): self.exposed_properties = value
flatherskevin/TGML
ConvertValue.py
Python
mit
713
from tornado import web,ioloop from pymongo import * import os class joinHandler(web.RequestHandler): def get(self): self.set_header("Access-Control-Allow-Origin", "*") self.set_header("Access-Control-Allow-Headers", "x-requested-with") self.set_header('Access-Control-Allow-Methods', 'POST, GET, OPTIONS') client = MongoClient() userid = self.get_query_arguments("userid")[0] groupid = self.get_query_arguments("groupid")[0] print("uiiiiiid",uid) print("Giiiiiid",groupid) client = MongoClient() db_livechat = client.livechat collec_groups = db_livechat.groups print("groupid",groupid); joingrp = collec_groups.find({"groupType":"public","_id":groupid},{"groupmember":1,"groupName":1,"_id":1,"image":1}) result = collec_groups.update_one({'_id':groupid}, {'$push': {"groupmember":[userid,0]}}) res = collec_groups.find({"groupType":"public","_id":gid},{"groupmember":1,"groupName":1,"_id":1,"image":1}) self.write(res) app = web.Application( [(r"/join",joinHandler)], static_path='static', debug=True ) app.listen(7888) ioloop.IOLoop.current().start()
ezamlee/live-chat
handlers/joinHandler.py
Python
gpl-3.0
1,116
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2007 Lukáš Lalinský # # 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. import re from picard import config from picard.util import format_time, translate_from_sortname, parse_amazon_url from picard.const import RELEASE_FORMATS _artist_rel_types = { "composer": "composer", "writer": "writer", "conductor": "conductor", "chorus master": "conductor", "performing orchestra": "performer:orchestra", "arranger": "arranger", "orchestrator": "arranger", "instrumentator": "arranger", "lyricist": "lyricist", "librettist": "lyricist", "remixer": "remixer", "producer": "producer", "engineer": "engineer", "audio": "engineer", #"Mastering": "engineer", "sound": "engineer", "live sound": "engineer", "mix": "mixer", #"Recording": "engineer", "mix-DJ": "djmixer", } def _decamelcase(text): return re.sub(r'([A-Z])', r' \1', text).strip() _REPLACE_MAP = {} _EXTRA_ATTRS = ['guest', 'additional', 'minor'] _BLANK_SPECIAL_RELTYPES = {'vocal': 'vocals'} def _parse_attributes(attrs, reltype): attrs = [_decamelcase(_REPLACE_MAP.get(a, a)) for a in attrs] prefix = ' '.join([a for a in attrs if a in _EXTRA_ATTRS]) attrs = [a for a in attrs if a not in _EXTRA_ATTRS] if len(attrs) > 1: attrs = '%s and %s' % (', '.join(attrs[:-1]), attrs[-1:][0]) elif len(attrs) == 1: attrs = attrs[0] else: attrs = _BLANK_SPECIAL_RELTYPES.get(reltype, '') return ' '.join([prefix, attrs]).strip().lower() def _relations_to_metadata(relation_lists, m): for relation_list in relation_lists: if relation_list.target_type == 'artist': for relation in relation_list.relation: artist = relation.artist[0] value = _translate_artist_node(artist)[0] or artist.name[0].text reltype = relation.type attribs = [] if 'attribute_list' in relation.children: attribs = [a.text for a in relation.attribute_list[0].attribute] if reltype in ('vocal', 'instrument', 'performer'): name = 'performer:' + _parse_attributes(attribs, reltype) elif reltype == 'mix-DJ' and len(attribs) > 0: if not hasattr(m, "_djmix_ars"): m._djmix_ars = {} for attr in attribs: m._djmix_ars.setdefault(attr.split()[1], []).append(value) continue else: try: name = _artist_rel_types[reltype] except KeyError: continue if value not in m[name]: m.add(name, value) elif relation_list.target_type == 'work': for relation in relation_list.relation: if relation.type == 'performance': work_to_metadata(relation.work[0], m) elif relation_list.target_type == 'url': for relation in relation_list.relation: if relation.type == 'amazon asin' and 'asin' not in m: amz = parse_amazon_url(relation.target[0].text) if amz is not None: m['asin'] = amz['asin'] elif relation.type == 'license': url = relation.target[0].text m.add('license', url) def _translate_artist_node(node): transl, translsort = None, None if config.setting['translate_artist_names']: locale = config.setting["artist_locale"] lang = locale.split("_")[0] if "alias_list" in node.children: found_primary = found_locale = False for alias in node.alias_list[0].alias: if alias.attribs.get("type") != "Search hint" and "locale" in alias.attribs: if alias.locale == locale: transl, translsort = alias.text, alias.attribs["sort_name"] if alias.attribs.get("primary") == "primary": return (transl, translsort) found_locale = True elif alias.locale == lang and not (found_locale or found_primary): transl, translsort = alias.text, alias.attribs["sort_name"] if alias.attribs.get("primary") == "primary": found_primary = True if lang == "en" and not transl: transl = translate_from_sortname(node.name[0].text, node.sort_name[0].text) return (transl, translsort) def artist_credit_from_node(node): artist = "" artistsort = "" for credit in node.name_credit: a = credit.artist[0] transl, translsort = _translate_artist_node(a) if transl: artist += transl else: if 'name' in credit.children and not config.setting["standardize_artists"]: artist += credit.name[0].text else: artist += a.name[0].text artistsort += translsort if translsort else a.sort_name[0].text if 'joinphrase' in credit.attribs: artist += credit.joinphrase artistsort += credit.joinphrase return (artist, artistsort) def artist_credit_to_metadata(node, m, release=False): ids = [n.artist[0].id for n in node.name_credit] artist, artistsort = artist_credit_from_node(node) if release: m["musicbrainz_albumartistid"] = ids m["albumartist"] = artist m["albumartistsort"] = artistsort else: m["musicbrainz_artistid"] = ids m["artist"] = artist m["artistsort"] = artistsort def label_info_from_node(node): labels = [] catalog_numbers = [] if node.count != "0": for label_info in node.label_info: if 'label' in label_info.children: labels.append(label_info.label[0].name[0].text) if 'catalog_number' in label_info.children: catalog_numbers.append(label_info.catalog_number[0].text) return (labels, catalog_numbers) def media_formats_from_node(node): formats_count = {} formats_order = [] for medium in node.medium: if "format" in medium.children: text = medium.format[0].text else: text = "(unknown)" if text in formats_count: formats_count[text] += 1 else: formats_count[text] = 1 formats_order.append(text) formats = [] for format in formats_order: count = formats_count[format] format = RELEASE_FORMATS.get(format, format) if count > 1: format = str(count) + u"×" + format formats.append(format) return " + ".join(formats) def track_to_metadata(node, track): m = track.metadata recording_to_metadata(node.recording[0], track) # overwrite with data we have on the track for name, nodes in node.children.iteritems(): if not nodes: continue if name == 'title': m['title'] = nodes[0].text elif name == 'position': m['tracknumber'] = nodes[0].text elif name == 'length' and nodes[0].text: m.length = int(nodes[0].text) elif name == 'artist_credit': artist_credit_to_metadata(nodes[0], m) m['~length'] = format_time(m.length) def recording_to_metadata(node, track): m = track.metadata m.length = 0 m['musicbrainz_trackid'] = node.attribs['id'] for name, nodes in node.children.iteritems(): if not nodes: continue if name == 'title': m['title'] = nodes[0].text elif name == 'length' and nodes[0].text: m.length = int(nodes[0].text) elif name == 'disambiguation': m['~recordingcomment'] = nodes[0].text elif name == 'artist_credit': artist_credit_to_metadata(nodes[0], m) elif name == 'relation_list': _relations_to_metadata(nodes, m) elif name == 'tag_list': add_folksonomy_tags(nodes[0], track) elif name == 'user_tag_list': add_user_folksonomy_tags(nodes[0], track) elif name == 'isrc_list': add_isrcs_to_metadata(nodes[0], m) elif name == 'user_rating': m['~rating'] = nodes[0].text m['~length'] = format_time(m.length) def work_to_metadata(work, m): m.add("musicbrainz_workid", work.attribs['id']) if 'language' in work.children: m.add_unique("language", work.language[0].text) if 'relation_list' in work.children: _relations_to_metadata(work.relation_list, m) def medium_to_metadata(node, m): for name, nodes in node.children.iteritems(): if not nodes: continue if name == 'position': m['discnumber'] = nodes[0].text elif name == 'track_list': m['totaltracks'] = nodes[0].count elif name == 'title': m['discsubtitle'] = nodes[0].text elif name == 'format': m['media'] = nodes[0].text def release_to_metadata(node, m, album=None): """Make metadata dict from a XML 'release' node.""" m['musicbrainz_albumid'] = node.attribs['id'] for name, nodes in node.children.iteritems(): if not nodes: continue if name == 'status': m['releasestatus'] = nodes[0].text.lower() elif name == 'title': m['album'] = nodes[0].text elif name == 'disambiguation': m['~releasecomment'] = nodes[0].text elif name == 'asin': m['asin'] = nodes[0].text elif name == 'artist_credit': artist_credit_to_metadata(nodes[0], m, release=True) elif name == 'date': m['date'] = nodes[0].text elif name == 'country': m['releasecountry'] = nodes[0].text elif name == 'barcode': m['barcode'] = nodes[0].text elif name == 'relation_list': _relations_to_metadata(nodes, m) elif name == 'label_info_list' and nodes[0].count != '0': m['label'], m['catalognumber'] = label_info_from_node(nodes[0]) elif name == 'text_representation': if 'language' in nodes[0].children: m['~releaselanguage'] = nodes[0].language[0].text if 'script' in nodes[0].children: m['script'] = nodes[0].script[0].text elif name == 'tag_list': add_folksonomy_tags(nodes[0], album) elif name == 'user_tag_list': add_user_folksonomy_tags(nodes[0], album) def release_group_to_metadata(node, m, release_group=None): """Make metadata dict from a XML 'release-group' node taken from inside a 'release' node.""" m['musicbrainz_releasegroupid'] = node.attribs['id'] for name, nodes in node.children.iteritems(): if not nodes: continue if name == 'title': m['~releasegroup'] = nodes[0].text elif name == 'disambiguation': m['~releasegroupcomment'] = nodes[0].text elif name == 'first_release_date': m['originaldate'] = nodes[0].text elif name == 'tag_list': add_folksonomy_tags(nodes[0], release_group) elif name == 'user_tag_list': add_user_folksonomy_tags(nodes[0], release_group) elif name == 'primary_type': m['~primaryreleasetype'] = nodes[0].text.lower() elif name == 'secondary_type_list': add_secondary_release_types(nodes[0], m) m['releasetype'] = m.getall('~primaryreleasetype') + m.getall('~secondaryreleasetype') def add_secondary_release_types(node, m): if 'secondary_type' in node.children: for secondary_type in node.secondary_type: m.add_unique('~secondaryreleasetype', secondary_type.text.lower()) def add_folksonomy_tags(node, obj): if obj and 'tag' in node.children: for tag in node.tag: name = tag.name[0].text count = int(tag.attribs['count']) obj.add_folksonomy_tag(name, count) def add_user_folksonomy_tags(node, obj): if obj and 'user_tag' in node.children: for tag in node.user_tag: name = tag.name[0].text obj.add_folksonomy_tag(name, 1) def add_isrcs_to_metadata(node, metadata): if 'isrc' in node.children: for isrc in node.isrc: metadata.add('isrc', isrc.id)
kepstin/picard
picard/mbxml.py
Python
gpl-2.0
13,296
# -*- coding: utf-8 -*- """Collection of fixtures for simplified work with blockers. You can use the :py:func:`blocker` fixture to retrieve any blocker using blocker syntax (as described in :py:mod:`cfme.metaplugins.blockers`). The :py:func:`bug` fixture is specific for bugzilla, it accepts number argument and spits out the BUGZILLA BUG! (a :py:class:`utils.bz.BugWrapper`, not a :py:class:`utils.blockers.BZ`!). The :py:func:`blockers` retrieves list of all blockers as specified in the meta marker. All of them are converted to the :py:class:`utils.blockers.Blocker` instances """ import pytest from fixtures.pytest_store import store from cfme.utils.blockers import Blocker, BZ, GH @pytest.fixture(scope="function") def blocker(uses_blockers): """Return any blocker that matches the expression. Returns: Instance of :py:class:`utils.blockers.Blocker` """ return lambda b, **kwargs: Blocker.parse(b, **kwargs) @pytest.fixture(scope="function") def blockers(uses_blockers, meta): """Returns list of all assigned blockers. Returns: List of :py:class:`utils.blockers.Blocker` instances. """ result = [] for blocker in meta.get("blockers", []): if isinstance(blocker, int): result.append(Blocker.parse("BZ#{}".format(blocker))) elif isinstance(blocker, Blocker): result.append(blocker) else: result.append(Blocker.parse(blocker)) return result @pytest.fixture(scope="function") def bug(blocker): """Return bugzilla bug by its id. Returns: Instance of :py:class:`utils.bz.BugWrapper` or :py:class:`NoneType` if the bug is closed. """ return lambda bug_id, **kwargs: blocker("BZ#{}".format(bug_id), **kwargs).bugzilla_bug def pytest_addoption(parser): group = parser.getgroup('Blockers options') group.addoption('--list-blockers', action='store_true', default=False, dest='list_blockers', help='Specify to list the blockers (takes some time though).') @pytest.mark.trylast def pytest_collection_modifyitems(session, config, items): if not config.getvalue("list_blockers"): return store.terminalreporter.write("Loading blockers ...\n", bold=True) blocking = set([]) for item in items: if "blockers" not in item._metadata: continue for blocker in item._metadata["blockers"]: if isinstance(blocker, int): # TODO: DRY blocker_object = Blocker.parse("BZ#{}".format(blocker)) else: blocker_object = Blocker.parse(blocker) if blocker_object.blocks: blocking.add(blocker_object) if blocking: store.terminalreporter.write("Known blockers:\n", bold=True) for blocker in blocking: if isinstance(blocker, BZ): bug = blocker.bugzilla_bug store.terminalreporter.write("- #{} - {}\n".format(bug.id, bug.status)) store.terminalreporter.write(" {}\n".format(bug.summary)) store.terminalreporter.write( " {} -> {}\n".format(str(bug.version), str(bug.target_release))) store.terminalreporter.write( " https://bugzilla.redhat.com/show_bug.cgi?id={}\n\n".format(bug.id)) elif isinstance(blocker, GH): bug = blocker.data store.terminalreporter.write("- {}\n".format(str(bug))) store.terminalreporter.write(" {}\n".format(bug.title)) else: store.terminalreporter.write("- {}\n".format(str(blocker.data))) else: store.terminalreporter.write("No blockers detected!\n", bold=True)
jkandasa/integration_tests
fixtures/blockers.py
Python
gpl-2.0
3,804
import numpy as np from numpy import linalg from scipy.sparse import dok_matrix, csr_matrix, issparse from scipy.spatial.distance import cosine, cityblock, minkowski, wminkowski from sklearn.utils.testing import assert_greater from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_raises_regexp from sklearn.utils.testing import assert_true from sklearn.utils.testing import ignore_warnings from sklearn.externals.six import iteritems from sklearn.metrics.pairwise import euclidean_distances from sklearn.metrics.pairwise import manhattan_distances from sklearn.metrics.pairwise import linear_kernel from sklearn.metrics.pairwise import chi2_kernel, additive_chi2_kernel from sklearn.metrics.pairwise import polynomial_kernel from sklearn.metrics.pairwise import rbf_kernel from sklearn.metrics.pairwise import laplacian_kernel from sklearn.metrics.pairwise import sigmoid_kernel from sklearn.metrics.pairwise import cosine_similarity from sklearn.metrics.pairwise import cosine_distances from sklearn.metrics.pairwise import pairwise_distances from sklearn.metrics.pairwise import pairwise_distances_argmin_min from sklearn.metrics.pairwise import pairwise_distances_argmin from sklearn.metrics.pairwise import pairwise_kernels from sklearn.metrics.pairwise import PAIRWISE_KERNEL_FUNCTIONS from sklearn.metrics.pairwise import PAIRWISE_DISTANCE_FUNCTIONS from sklearn.metrics.pairwise import PAIRWISE_BOOLEAN_FUNCTIONS from sklearn.metrics.pairwise import PAIRED_DISTANCES from sklearn.metrics.pairwise import check_pairwise_arrays from sklearn.metrics.pairwise import check_paired_arrays from sklearn.metrics.pairwise import paired_distances from sklearn.metrics.pairwise import paired_euclidean_distances from sklearn.metrics.pairwise import paired_manhattan_distances from sklearn.preprocessing import normalize from sklearn.exceptions import DataConversionWarning def test_pairwise_distances(): # Test the pairwise_distance helper function. rng = np.random.RandomState(0) # Euclidean distance should be equivalent to calling the function. X = rng.random_sample((5, 4)) S = pairwise_distances(X, metric="euclidean") S2 = euclidean_distances(X) assert_array_almost_equal(S, S2) # Euclidean distance, with Y != X. Y = rng.random_sample((2, 4)) S = pairwise_distances(X, Y, metric="euclidean") S2 = euclidean_distances(X, Y) assert_array_almost_equal(S, S2) # Test with tuples as X and Y X_tuples = tuple([tuple([v for v in row]) for row in X]) Y_tuples = tuple([tuple([v for v in row]) for row in Y]) S2 = pairwise_distances(X_tuples, Y_tuples, metric="euclidean") assert_array_almost_equal(S, S2) # "cityblock" uses sklearn metric, cityblock (function) is scipy.spatial. S = pairwise_distances(X, metric="cityblock") S2 = pairwise_distances(X, metric=cityblock) assert_equal(S.shape[0], S.shape[1]) assert_equal(S.shape[0], X.shape[0]) assert_array_almost_equal(S, S2) # The manhattan metric should be equivalent to cityblock. S = pairwise_distances(X, Y, metric="manhattan") S2 = pairwise_distances(X, Y, metric=cityblock) assert_equal(S.shape[0], X.shape[0]) assert_equal(S.shape[1], Y.shape[0]) assert_array_almost_equal(S, S2) # Low-level function for manhattan can divide in blocks to avoid # using too much memory during the broadcasting S3 = manhattan_distances(X, Y, size_threshold=10) assert_array_almost_equal(S, S3) # Test cosine as a string metric versus cosine callable # "cosine" uses sklearn metric, cosine (function) is scipy.spatial S = pairwise_distances(X, Y, metric="cosine") S2 = pairwise_distances(X, Y, metric=cosine) assert_equal(S.shape[0], X.shape[0]) assert_equal(S.shape[1], Y.shape[0]) assert_array_almost_equal(S, S2) # Test with sparse X and Y, # currently only supported for Euclidean, L1 and cosine. X_sparse = csr_matrix(X) Y_sparse = csr_matrix(Y) S = pairwise_distances(X_sparse, Y_sparse, metric="euclidean") S2 = euclidean_distances(X_sparse, Y_sparse) assert_array_almost_equal(S, S2) S = pairwise_distances(X_sparse, Y_sparse, metric="cosine") S2 = cosine_distances(X_sparse, Y_sparse) assert_array_almost_equal(S, S2) S = pairwise_distances(X_sparse, Y_sparse.tocsc(), metric="manhattan") S2 = manhattan_distances(X_sparse.tobsr(), Y_sparse.tocoo()) assert_array_almost_equal(S, S2) S2 = manhattan_distances(X, Y) assert_array_almost_equal(S, S2) # Test with scipy.spatial.distance metric, with a kwd kwds = {"p": 2.0} S = pairwise_distances(X, Y, metric="minkowski", **kwds) S2 = pairwise_distances(X, Y, metric=minkowski, **kwds) assert_array_almost_equal(S, S2) # same with Y = None kwds = {"p": 2.0} S = pairwise_distances(X, metric="minkowski", **kwds) S2 = pairwise_distances(X, metric=minkowski, **kwds) assert_array_almost_equal(S, S2) # Test that scipy distance metrics throw an error if sparse matrix given assert_raises(TypeError, pairwise_distances, X_sparse, metric="minkowski") assert_raises(TypeError, pairwise_distances, X, Y_sparse, metric="minkowski") # Test that a value error is raised if the metric is unknown assert_raises(ValueError, pairwise_distances, X, Y, metric="blah") # ignore conversion to boolean in pairwise_distances @ignore_warnings(category=DataConversionWarning) def test_pairwise_boolean_distance(): # test that we convert to boolean arrays for boolean distances rng = np.random.RandomState(0) X = rng.randn(5, 4) Y = X.copy() Y[0, 0] = 1 - Y[0, 0] for metric in PAIRWISE_BOOLEAN_FUNCTIONS: for Z in [Y, None]: res = pairwise_distances(X, Z, metric=metric) res[np.isnan(res)] = 0 assert_true(np.sum(res != 0) == 0) def test_pairwise_precomputed(): for func in [pairwise_distances, pairwise_kernels]: # Test correct shape assert_raises_regexp(ValueError, '.* shape .*', func, np.zeros((5, 3)), metric='precomputed') # with two args assert_raises_regexp(ValueError, '.* shape .*', func, np.zeros((5, 3)), np.zeros((4, 4)), metric='precomputed') # even if shape[1] agrees (although thus second arg is spurious) assert_raises_regexp(ValueError, '.* shape .*', func, np.zeros((5, 3)), np.zeros((4, 3)), metric='precomputed') # Test not copied (if appropriate dtype) S = np.zeros((5, 5)) S2 = func(S, metric="precomputed") assert_true(S is S2) # with two args S = np.zeros((5, 3)) S2 = func(S, np.zeros((3, 3)), metric="precomputed") assert_true(S is S2) # Test always returns float dtype S = func(np.array([[1]], dtype='int'), metric='precomputed') assert_equal('f', S.dtype.kind) # Test converts list to array-like S = func([[1.]], metric='precomputed') assert_true(isinstance(S, np.ndarray)) def check_pairwise_parallel(func, metric, kwds): rng = np.random.RandomState(0) for make_data in (np.array, csr_matrix): X = make_data(rng.random_sample((5, 4))) Y = make_data(rng.random_sample((3, 4))) try: S = func(X, metric=metric, n_jobs=1, **kwds) except (TypeError, ValueError) as exc: # Not all metrics support sparse input # ValueError may be triggered by bad callable if make_data is csr_matrix: assert_raises(type(exc), func, X, metric=metric, n_jobs=2, **kwds) continue else: raise S2 = func(X, metric=metric, n_jobs=2, **kwds) assert_array_almost_equal(S, S2) S = func(X, Y, metric=metric, n_jobs=1, **kwds) S2 = func(X, Y, metric=metric, n_jobs=2, **kwds) assert_array_almost_equal(S, S2) def test_pairwise_parallel(): wminkowski_kwds = {'w': np.arange(1, 5).astype('double'), 'p': 1} metrics = [(pairwise_distances, 'euclidean', {}), (pairwise_distances, wminkowski, wminkowski_kwds), (pairwise_distances, 'wminkowski', wminkowski_kwds), (pairwise_kernels, 'polynomial', {'degree': 1}), (pairwise_kernels, callable_rbf_kernel, {'gamma': .1}), ] for func, metric, kwds in metrics: yield check_pairwise_parallel, func, metric, kwds def test_pairwise_callable_nonstrict_metric(): # paired_distances should allow callable metric where metric(x, x) != 0 # Knowing that the callable is a strict metric would allow the diagonal to # be left uncalculated and set to 0. assert_equal(pairwise_distances([[1.]], metric=lambda x, y: 5)[0, 0], 5) def callable_rbf_kernel(x, y, **kwds): # Callable version of pairwise.rbf_kernel. K = rbf_kernel(np.atleast_2d(x), np.atleast_2d(y), **kwds) return K def test_pairwise_kernels(): # Test the pairwise_kernels helper function. rng = np.random.RandomState(0) X = rng.random_sample((5, 4)) Y = rng.random_sample((2, 4)) # Test with all metrics that should be in PAIRWISE_KERNEL_FUNCTIONS. test_metrics = ["rbf", "laplacian", "sigmoid", "polynomial", "linear", "chi2", "additive_chi2"] for metric in test_metrics: function = PAIRWISE_KERNEL_FUNCTIONS[metric] # Test with Y=None K1 = pairwise_kernels(X, metric=metric) K2 = function(X) assert_array_almost_equal(K1, K2) # Test with Y=Y K1 = pairwise_kernels(X, Y=Y, metric=metric) K2 = function(X, Y=Y) assert_array_almost_equal(K1, K2) # Test with tuples as X and Y X_tuples = tuple([tuple([v for v in row]) for row in X]) Y_tuples = tuple([tuple([v for v in row]) for row in Y]) K2 = pairwise_kernels(X_tuples, Y_tuples, metric=metric) assert_array_almost_equal(K1, K2) # Test with sparse X and Y X_sparse = csr_matrix(X) Y_sparse = csr_matrix(Y) if metric in ["chi2", "additive_chi2"]: # these don't support sparse matrices yet assert_raises(ValueError, pairwise_kernels, X_sparse, Y=Y_sparse, metric=metric) continue K1 = pairwise_kernels(X_sparse, Y=Y_sparse, metric=metric) assert_array_almost_equal(K1, K2) # Test with a callable function, with given keywords. metric = callable_rbf_kernel kwds = {'gamma': 0.1} K1 = pairwise_kernels(X, Y=Y, metric=metric, **kwds) K2 = rbf_kernel(X, Y=Y, **kwds) assert_array_almost_equal(K1, K2) # callable function, X=Y K1 = pairwise_kernels(X, Y=X, metric=metric, **kwds) K2 = rbf_kernel(X, Y=X, **kwds) assert_array_almost_equal(K1, K2) def test_pairwise_kernels_filter_param(): rng = np.random.RandomState(0) X = rng.random_sample((5, 4)) Y = rng.random_sample((2, 4)) K = rbf_kernel(X, Y, gamma=0.1) params = {"gamma": 0.1, "blabla": ":)"} K2 = pairwise_kernels(X, Y, metric="rbf", filter_params=True, **params) assert_array_almost_equal(K, K2) assert_raises(TypeError, pairwise_kernels, X, Y, "rbf", **params) def test_paired_distances(): # Test the pairwise_distance helper function. rng = np.random.RandomState(0) # Euclidean distance should be equivalent to calling the function. X = rng.random_sample((5, 4)) # Euclidean distance, with Y != X. Y = rng.random_sample((5, 4)) for metric, func in iteritems(PAIRED_DISTANCES): S = paired_distances(X, Y, metric=metric) S2 = func(X, Y) assert_array_almost_equal(S, S2) S3 = func(csr_matrix(X), csr_matrix(Y)) assert_array_almost_equal(S, S3) if metric in PAIRWISE_DISTANCE_FUNCTIONS: # Check the pairwise_distances implementation # gives the same value distances = PAIRWISE_DISTANCE_FUNCTIONS[metric](X, Y) distances = np.diag(distances) assert_array_almost_equal(distances, S) # Check the callable implementation S = paired_distances(X, Y, metric='manhattan') S2 = paired_distances(X, Y, metric=lambda x, y: np.abs(x - y).sum(axis=0)) assert_array_almost_equal(S, S2) # Test that a value error is raised when the lengths of X and Y should not # differ Y = rng.random_sample((3, 4)) assert_raises(ValueError, paired_distances, X, Y) def test_pairwise_distances_argmin_min(): # Check pairwise minimum distances computation for any metric X = [[0], [1]] Y = [[-1], [2]] Xsp = dok_matrix(X) Ysp = csr_matrix(Y, dtype=np.float32) # euclidean metric D, E = pairwise_distances_argmin_min(X, Y, metric="euclidean") D2 = pairwise_distances_argmin(X, Y, metric="euclidean") assert_array_almost_equal(D, [0, 1]) assert_array_almost_equal(D2, [0, 1]) assert_array_almost_equal(D, [0, 1]) assert_array_almost_equal(E, [1., 1.]) # sparse matrix case Dsp, Esp = pairwise_distances_argmin_min(Xsp, Ysp, metric="euclidean") assert_array_equal(Dsp, D) assert_array_equal(Esp, E) # We don't want np.matrix here assert_equal(type(Dsp), np.ndarray) assert_equal(type(Esp), np.ndarray) # Non-euclidean sklearn metric D, E = pairwise_distances_argmin_min(X, Y, metric="manhattan") D2 = pairwise_distances_argmin(X, Y, metric="manhattan") assert_array_almost_equal(D, [0, 1]) assert_array_almost_equal(D2, [0, 1]) assert_array_almost_equal(E, [1., 1.]) D, E = pairwise_distances_argmin_min(Xsp, Ysp, metric="manhattan") D2 = pairwise_distances_argmin(Xsp, Ysp, metric="manhattan") assert_array_almost_equal(D, [0, 1]) assert_array_almost_equal(E, [1., 1.]) # Non-euclidean Scipy distance (callable) D, E = pairwise_distances_argmin_min(X, Y, metric=minkowski, metric_kwargs={"p": 2}) assert_array_almost_equal(D, [0, 1]) assert_array_almost_equal(E, [1., 1.]) # Non-euclidean Scipy distance (string) D, E = pairwise_distances_argmin_min(X, Y, metric="minkowski", metric_kwargs={"p": 2}) assert_array_almost_equal(D, [0, 1]) assert_array_almost_equal(E, [1., 1.]) # Compare with naive implementation rng = np.random.RandomState(0) X = rng.randn(97, 149) Y = rng.randn(111, 149) dist = pairwise_distances(X, Y, metric="manhattan") dist_orig_ind = dist.argmin(axis=0) dist_orig_val = dist[dist_orig_ind, range(len(dist_orig_ind))] dist_chunked_ind, dist_chunked_val = pairwise_distances_argmin_min( X, Y, axis=0, metric="manhattan", batch_size=50) np.testing.assert_almost_equal(dist_orig_ind, dist_chunked_ind, decimal=7) np.testing.assert_almost_equal(dist_orig_val, dist_chunked_val, decimal=7) def test_euclidean_distances(): # Check the pairwise Euclidean distances computation X = [[0]] Y = [[1], [2]] D = euclidean_distances(X, Y) assert_array_almost_equal(D, [[1., 2.]]) X = csr_matrix(X) Y = csr_matrix(Y) D = euclidean_distances(X, Y) assert_array_almost_equal(D, [[1., 2.]]) rng = np.random.RandomState(0) X = rng.random_sample((10, 4)) Y = rng.random_sample((20, 4)) X_norm_sq = (X ** 2).sum(axis=1).reshape(1, -1) Y_norm_sq = (Y ** 2).sum(axis=1).reshape(1, -1) # check that we still get the right answers with {X,Y}_norm_squared D1 = euclidean_distances(X, Y) D2 = euclidean_distances(X, Y, X_norm_squared=X_norm_sq) D3 = euclidean_distances(X, Y, Y_norm_squared=Y_norm_sq) D4 = euclidean_distances(X, Y, X_norm_squared=X_norm_sq, Y_norm_squared=Y_norm_sq) assert_array_almost_equal(D2, D1) assert_array_almost_equal(D3, D1) assert_array_almost_equal(D4, D1) # check we get the wrong answer with wrong {X,Y}_norm_squared X_norm_sq *= 0.5 Y_norm_sq *= 0.5 wrong_D = euclidean_distances(X, Y, X_norm_squared=np.zeros_like(X_norm_sq), Y_norm_squared=np.zeros_like(Y_norm_sq)) assert_greater(np.max(np.abs(wrong_D - D1)), .01) # Paired distances def test_paired_euclidean_distances(): # Check the paired Euclidean distances computation X = [[0], [0]] Y = [[1], [2]] D = paired_euclidean_distances(X, Y) assert_array_almost_equal(D, [1., 2.]) def test_paired_manhattan_distances(): # Check the paired manhattan distances computation X = [[0], [0]] Y = [[1], [2]] D = paired_manhattan_distances(X, Y) assert_array_almost_equal(D, [1., 2.]) def test_chi_square_kernel(): rng = np.random.RandomState(0) X = rng.random_sample((5, 4)) Y = rng.random_sample((10, 4)) K_add = additive_chi2_kernel(X, Y) gamma = 0.1 K = chi2_kernel(X, Y, gamma=gamma) assert_equal(K.dtype, np.float) for i, x in enumerate(X): for j, y in enumerate(Y): chi2 = -np.sum((x - y) ** 2 / (x + y)) chi2_exp = np.exp(gamma * chi2) assert_almost_equal(K_add[i, j], chi2) assert_almost_equal(K[i, j], chi2_exp) # check diagonal is ones for data with itself K = chi2_kernel(Y) assert_array_equal(np.diag(K), 1) # check off-diagonal is < 1 but > 0: assert_true(np.all(K > 0)) assert_true(np.all(K - np.diag(np.diag(K)) < 1)) # check that float32 is preserved X = rng.random_sample((5, 4)).astype(np.float32) Y = rng.random_sample((10, 4)).astype(np.float32) K = chi2_kernel(X, Y) assert_equal(K.dtype, np.float32) # check integer type gets converted, # check that zeros are handled X = rng.random_sample((10, 4)).astype(np.int32) K = chi2_kernel(X, X) assert_true(np.isfinite(K).all()) assert_equal(K.dtype, np.float) # check that kernel of similar things is greater than dissimilar ones X = [[.3, .7], [1., 0]] Y = [[0, 1], [.9, .1]] K = chi2_kernel(X, Y) assert_greater(K[0, 0], K[0, 1]) assert_greater(K[1, 1], K[1, 0]) # test negative input assert_raises(ValueError, chi2_kernel, [[0, -1]]) assert_raises(ValueError, chi2_kernel, [[0, -1]], [[-1, -1]]) assert_raises(ValueError, chi2_kernel, [[0, 1]], [[-1, -1]]) # different n_features in X and Y assert_raises(ValueError, chi2_kernel, [[0, 1]], [[.2, .2, .6]]) # sparse matrices assert_raises(ValueError, chi2_kernel, csr_matrix(X), csr_matrix(Y)) assert_raises(ValueError, additive_chi2_kernel, csr_matrix(X), csr_matrix(Y)) def test_kernel_symmetry(): # Valid kernels should be symmetric rng = np.random.RandomState(0) X = rng.random_sample((5, 4)) for kernel in (linear_kernel, polynomial_kernel, rbf_kernel, laplacian_kernel, sigmoid_kernel, cosine_similarity): K = kernel(X, X) assert_array_almost_equal(K, K.T, 15) def test_kernel_sparse(): rng = np.random.RandomState(0) X = rng.random_sample((5, 4)) X_sparse = csr_matrix(X) for kernel in (linear_kernel, polynomial_kernel, rbf_kernel, laplacian_kernel, sigmoid_kernel, cosine_similarity): K = kernel(X, X) K2 = kernel(X_sparse, X_sparse) assert_array_almost_equal(K, K2) def test_linear_kernel(): rng = np.random.RandomState(0) X = rng.random_sample((5, 4)) K = linear_kernel(X, X) # the diagonal elements of a linear kernel are their squared norm assert_array_almost_equal(K.flat[::6], [linalg.norm(x) ** 2 for x in X]) def test_rbf_kernel(): rng = np.random.RandomState(0) X = rng.random_sample((5, 4)) K = rbf_kernel(X, X) # the diagonal elements of a rbf kernel are 1 assert_array_almost_equal(K.flat[::6], np.ones(5)) def test_laplacian_kernel(): rng = np.random.RandomState(0) X = rng.random_sample((5, 4)) K = laplacian_kernel(X, X) # the diagonal elements of a laplacian kernel are 1 assert_array_almost_equal(np.diag(K), np.ones(5)) # off-diagonal elements are < 1 but > 0: assert_true(np.all(K > 0)) assert_true(np.all(K - np.diag(np.diag(K)) < 1)) def test_cosine_similarity_sparse_output(): # Test if cosine_similarity correctly produces sparse output. rng = np.random.RandomState(0) X = rng.random_sample((5, 4)) Y = rng.random_sample((3, 4)) Xcsr = csr_matrix(X) Ycsr = csr_matrix(Y) K1 = cosine_similarity(Xcsr, Ycsr, dense_output=False) assert_true(issparse(K1)) K2 = pairwise_kernels(Xcsr, Y=Ycsr, metric="cosine") assert_array_almost_equal(K1.todense(), K2) def test_cosine_similarity(): # Test the cosine_similarity. rng = np.random.RandomState(0) X = rng.random_sample((5, 4)) Y = rng.random_sample((3, 4)) Xcsr = csr_matrix(X) Ycsr = csr_matrix(Y) for X_, Y_ in ((X, None), (X, Y), (Xcsr, None), (Xcsr, Ycsr)): # Test that the cosine is kernel is equal to a linear kernel when data # has been previously normalized by L2-norm. K1 = pairwise_kernels(X_, Y=Y_, metric="cosine") X_ = normalize(X_) if Y_ is not None: Y_ = normalize(Y_) K2 = pairwise_kernels(X_, Y=Y_, metric="linear") assert_array_almost_equal(K1, K2) def test_check_dense_matrices(): # Ensure that pairwise array check works for dense matrices. # Check that if XB is None, XB is returned as reference to XA XA = np.resize(np.arange(40), (5, 8)) XA_checked, XB_checked = check_pairwise_arrays(XA, None) assert_true(XA_checked is XB_checked) assert_array_equal(XA, XA_checked) def test_check_XB_returned(): # Ensure that if XA and XB are given correctly, they return as equal. # Check that if XB is not None, it is returned equal. # Note that the second dimension of XB is the same as XA. XA = np.resize(np.arange(40), (5, 8)) XB = np.resize(np.arange(32), (4, 8)) XA_checked, XB_checked = check_pairwise_arrays(XA, XB) assert_array_equal(XA, XA_checked) assert_array_equal(XB, XB_checked) XB = np.resize(np.arange(40), (5, 8)) XA_checked, XB_checked = check_paired_arrays(XA, XB) assert_array_equal(XA, XA_checked) assert_array_equal(XB, XB_checked) def test_check_different_dimensions(): # Ensure an error is raised if the dimensions are different. XA = np.resize(np.arange(45), (5, 9)) XB = np.resize(np.arange(32), (4, 8)) assert_raises(ValueError, check_pairwise_arrays, XA, XB) XB = np.resize(np.arange(4 * 9), (4, 9)) assert_raises(ValueError, check_paired_arrays, XA, XB) def test_check_invalid_dimensions(): # Ensure an error is raised on 1D input arrays. # The modified tests are not 1D. In the old test, the array was internally # converted to 2D anyways XA = np.arange(45).reshape(9, 5) XB = np.arange(32).reshape(4, 8) assert_raises(ValueError, check_pairwise_arrays, XA, XB) XA = np.arange(45).reshape(9, 5) XB = np.arange(32).reshape(4, 8) assert_raises(ValueError, check_pairwise_arrays, XA, XB) def test_check_sparse_arrays(): # Ensures that checks return valid sparse matrices. rng = np.random.RandomState(0) XA = rng.random_sample((5, 4)) XA_sparse = csr_matrix(XA) XB = rng.random_sample((5, 4)) XB_sparse = csr_matrix(XB) XA_checked, XB_checked = check_pairwise_arrays(XA_sparse, XB_sparse) # compare their difference because testing csr matrices for # equality with '==' does not work as expected. assert_true(issparse(XA_checked)) assert_equal(abs(XA_sparse - XA_checked).sum(), 0) assert_true(issparse(XB_checked)) assert_equal(abs(XB_sparse - XB_checked).sum(), 0) XA_checked, XA_2_checked = check_pairwise_arrays(XA_sparse, XA_sparse) assert_true(issparse(XA_checked)) assert_equal(abs(XA_sparse - XA_checked).sum(), 0) assert_true(issparse(XA_2_checked)) assert_equal(abs(XA_2_checked - XA_checked).sum(), 0) def tuplify(X): # Turns a numpy matrix (any n-dimensional array) into tuples. s = X.shape if len(s) > 1: # Tuplify each sub-array in the input. return tuple(tuplify(row) for row in X) else: # Single dimension input, just return tuple of contents. return tuple(r for r in X) def test_check_tuple_input(): # Ensures that checks return valid tuples. rng = np.random.RandomState(0) XA = rng.random_sample((5, 4)) XA_tuples = tuplify(XA) XB = rng.random_sample((5, 4)) XB_tuples = tuplify(XB) XA_checked, XB_checked = check_pairwise_arrays(XA_tuples, XB_tuples) assert_array_equal(XA_tuples, XA_checked) assert_array_equal(XB_tuples, XB_checked) def test_check_preserve_type(): # Ensures that type float32 is preserved. XA = np.resize(np.arange(40), (5, 8)).astype(np.float32) XB = np.resize(np.arange(40), (5, 8)).astype(np.float32) XA_checked, XB_checked = check_pairwise_arrays(XA, None) assert_equal(XA_checked.dtype, np.float32) # both float32 XA_checked, XB_checked = check_pairwise_arrays(XA, XB) assert_equal(XA_checked.dtype, np.float32) assert_equal(XB_checked.dtype, np.float32) # mismatched A XA_checked, XB_checked = check_pairwise_arrays(XA.astype(np.float), XB) assert_equal(XA_checked.dtype, np.float) assert_equal(XB_checked.dtype, np.float) # mismatched B XA_checked, XB_checked = check_pairwise_arrays(XA, XB.astype(np.float)) assert_equal(XA_checked.dtype, np.float) assert_equal(XB_checked.dtype, np.float)
toastedcornflakes/scikit-learn
sklearn/metrics/tests/test_pairwise.py
Python
bsd-3-clause
26,200
#!/usr/bin/env python import sys, os, time, atexit from signal import SIGTERM class Daemon: """ A generic daemon class. Usage: subclass the Daemon class and override the run() method """ def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'): self.stdin = stdin self.stdout = stdout self.stderr = stderr self.pidfile = pidfile def daemonize(self): """ do the UNIX double-fork magic, see Stevens' "Advanced Programming in the UNIX Environment" for details (ISBN 0201563177) http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16 """ try: pid = os.fork() if pid > 0: # exit first parent sys.exit(0) except OSError, e: sys.stderr.write("fork #1 failed: %d (%s)\n" % (e.errno, e.strerror)) sys.exit(1) # decouple from parent environment os.chdir("/") os.setsid() os.umask(0) # do second fork try: pid = os.fork() if pid > 0: # exit from second parent sys.exit(0) except OSError, e: sys.stderr.write("fork #2 failed: %d (%s)\n" % (e.errno, e.strerror)) sys.exit(1) # redirect standard file descriptors sys.stdout.flush() sys.stderr.flush() si = file(self.stdin, 'r') so = file(self.stdout, 'a+') se = file(self.stderr, 'a+', 0) os.dup2(si.fileno(), sys.stdin.fileno()) os.dup2(so.fileno(), sys.stdout.fileno()) os.dup2(se.fileno(), sys.stderr.fileno()) # write pidfile atexit.register(self.delpid) pid = str(os.getpid()) file(self.pidfile,'w+').write("%s\n" % pid) def delpid(self): os.remove(self.pidfile) def start(self): """ Start the daemon """ # Check for a pidfile to see if the daemon already runs try: pf = file(self.pidfile,'r') pid = int(pf.read().strip()) pf.close() except IOError: pid = None if pid: message = "pidfile %s already exist. Daemon already running?\n" sys.stderr.write(message % self.pidfile) sys.exit(1) # Start the daemon self.daemonize() self.run() def stop(self): """ Stop the daemon """ # Get the pid from the pidfile try: pf = file(self.pidfile,'r') pid = int(pf.read().strip()) pf.close() except IOError: pid = None if not pid: message = "pidfile %s does not exist. Daemon not running?\n" sys.stderr.write(message % self.pidfile) return # not an error in a restart # Try killing the daemon process try: while 1: os.kill(pid, SIGTERM) time.sleep(0.1) except OSError, err: err = str(err) if err.find("No such process") > 0: if os.path.exists(self.pidfile): os.remove(self.pidfile) else: print str(err) sys.exit(1) def restart(self): """ Restart the daemon """ self.stop() self.start() def run(self): """ You should override this method when you subclass Daemon. It will be called after the process has been daemonized by start() or restart(). """ #try: #self.f = open('/tmp/test.txt', 'r+') #except IOError: #self.f = open('/tmp/test.txt', 'w+') #self.f.seek(0, os.SEEK_END) #self.f.write('i') ##self.f.flush() #print self.f.tell(),'test' #self.f.close()
badbytes/pymeg
daemon/daemon.py
Python
gpl-3.0
3,997
# coding=utf-8 """InaSAFE Disaster risk tool by Australian Aid - Flood Polygon on Roads Impact Function. Contact : ole.moller.nielsen@gmail.com .. note:: 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. """ import logging from collections import OrderedDict from qgis.core import ( QgsRectangle, QgsFeatureRequest, QgsGeometry, QgsCoordinateReferenceSystem, QgsCoordinateTransform ) from safe.impact_functions.bases.classified_vh_classified_ve import \ ClassifiedVHClassifiedVE from safe.impact_functions.inundation. \ flood_polygon_roads.metadata_definitions import \ FloodPolygonRoadsMetadata from safe.common.exceptions import ZeroImpactException from safe.utilities.i18n import tr from safe.storage.vector import Vector from safe.common.utilities import get_utm_epsg from safe.common.exceptions import GetDataError from safe.gis.qgis_vector_tools import split_by_polygon, clip_by_polygon from safe.impact_reports.road_exposure_report_mixin import\ RoadExposureReportMixin import safe.messaging as m from safe.messaging import styles LOGGER = logging.getLogger('InaSAFE') class FloodPolygonRoadsFunction( ClassifiedVHClassifiedVE, RoadExposureReportMixin): # noinspection PyUnresolvedReferences """Simple experimental impact function for inundation.""" _metadata = FloodPolygonRoadsMetadata() def __init__(self): """Constructor.""" super(FloodPolygonRoadsFunction, self).__init__() # The 'wet' variable self.wet = 'wet' def notes(self): """Return the notes section of the report. .. versionadded:: 3.2.1 :return: The notes that should be attached to this impact report. :rtype: safe.messaging.Message """ hazard_terminology = tr('inundated') flood_value = [unicode(hazard_class) for hazard_class in self.hazard_class_mapping[self.wet]] message = m.Message(style_class='container') message.add( m.Heading(tr('Notes and assumptions'), **styles.INFO_STYLE)) checklist = m.BulletedList() checklist.add(tr( 'Roads are said to be %s when in a region with field "%s" in ' '"%s" .' % ( hazard_terminology, self.hazard_class_attribute, ', '.join(flood_value)))) checklist.add(tr( 'Roads are closed if they are %s.' % hazard_terminology)) checklist.add(tr( 'Roads are open if they are not %s.' % hazard_terminology)) message.add(checklist) return message def run(self): """Experimental impact function for flood polygons on roads.""" self.validate() self.prepare() # Get parameters from layer's keywords self.hazard_class_attribute = self.hazard.keyword('field') self.hazard_class_mapping = self.hazard.keyword('value_map') self.exposure_class_attribute = self.exposure.keyword( 'road_class_field') hazard_provider = self.hazard.layer.dataProvider() affected_field_index = hazard_provider.fieldNameIndex( self.hazard_class_attribute) # see #818: should still work if there is no valid attribute if affected_field_index == -1: pass # message = tr('''Parameter "Affected Field"(='%s') # is not present in the attribute table of the hazard layer. # ''' % (affected_field, )) # raise GetDataError(message) LOGGER.info('Affected field: %s' % self.hazard_class_attribute) LOGGER.info('Affected field index: %s' % affected_field_index) # Filter geometry and data using the extent requested_extent = QgsRectangle(*self.requested_extent) # This is a hack - we should be setting the extent CRS # in the IF base class via safe/engine/core.py:calculate_impact # for now we assume the extent is in 4326 because it # is set to that from geo_extent # See issue #1857 transform = QgsCoordinateTransform( QgsCoordinateReferenceSystem( 'EPSG:%i' % self._requested_extent_crs), self.hazard.layer.crs() ) projected_extent = transform.transformBoundingBox(requested_extent) request = QgsFeatureRequest() request.setFilterRect(projected_extent) # Split line_layer by hazard and save as result: # 1) Filter from hazard inundated features # 2) Mark roads as inundated (1) or not inundated (0) ################################# # REMARK 1 # In qgis 2.2 we can use request to filter inundated # polygons directly (it allows QgsExpression). Then # we can delete the lines and call # # request = .... # hazard_poly = union_geometry(H, request) # ################################ hazard_features = self.hazard.layer.getFeatures(request) hazard_poly = None for feature in hazard_features: attributes = feature.attributes() if affected_field_index != -1: value = attributes[affected_field_index] if value not in self.hazard_class_mapping[self.wet]: continue if hazard_poly is None: hazard_poly = QgsGeometry(feature.geometry()) else: # Make geometry union of inundated polygons # But some feature.geometry() could be invalid, skip them tmp_geometry = hazard_poly.combine(feature.geometry()) try: if tmp_geometry.isGeosValid(): hazard_poly = tmp_geometry except AttributeError: pass ############################################### # END REMARK 1 ############################################### if hazard_poly is None: message = tr( 'There are no objects in the hazard layer with %s (Affected ' 'Field) in %s (Affected Value). Please check the value or use ' 'a different extent.' % ( self.hazard_class_attribute, self.hazard_class_mapping[self.wet])) raise GetDataError(message) # Clip exposure by the extent extent_as_polygon = QgsGeometry().fromRect(requested_extent) line_layer = clip_by_polygon(self.exposure.layer, extent_as_polygon) # Find inundated roads, mark them line_layer = split_by_polygon( line_layer, hazard_poly, request, mark_value=(self.target_field, 1)) # Generate simple impact report epsg = get_utm_epsg(self.requested_extent[0], self.requested_extent[1]) destination_crs = QgsCoordinateReferenceSystem(epsg) transform = QgsCoordinateTransform( self.exposure.layer.crs(), destination_crs) roads_data = line_layer.getFeatures() road_type_field_index = line_layer.fieldNameIndex( self.exposure_class_attribute) target_field_index = line_layer.fieldNameIndex(self.target_field) flooded_keyword = tr('Temporarily closed (m)') self.affected_road_categories = [flooded_keyword] self.affected_road_lengths = OrderedDict([ (flooded_keyword, {})]) self.road_lengths = OrderedDict() for road in roads_data: attributes = road.attributes() road_type = attributes[road_type_field_index] if road_type.__class__.__name__ == 'QPyNullVariant': road_type = tr('Other') geom = road.geometry() geom.transform(transform) length = geom.length() if road_type not in self.road_lengths: self.affected_road_lengths[flooded_keyword][road_type] = 0 self.road_lengths[road_type] = 0 self.road_lengths[road_type] += length if attributes[target_field_index] == 1: self.affected_road_lengths[ flooded_keyword][road_type] += length impact_summary = self.html_report() # For printing map purpose map_title = tr('Roads inundated') legend_title = tr('Road inundated status') style_classes = [dict(label=tr('Not Inundated'), value=0, colour='#1EFC7C', transparency=0, size=0.5), dict(label=tr('Inundated'), value=1, colour='#F31A1C', transparency=0, size=0.5)] style_info = dict( target_field=self.target_field, style_classes=style_classes, style_type='categorizedSymbol') # Convert QgsVectorLayer to inasafe layer and return it if line_layer.featureCount() == 0: # Raising an exception seems poor semantics here.... raise ZeroImpactException( tr('No roads are flooded in this scenario.')) line_layer = Vector( data=line_layer, name=tr('Flooded roads'), keywords={ 'impact_summary': impact_summary, 'map_title': map_title, 'legend_title': legend_title, 'target_field': self.target_field}, style_info=style_info) self._impact = line_layer return line_layer
cchristelis/inasafe
safe/impact_functions/inundation/flood_polygon_roads/impact_function.py
Python
gpl-3.0
9,755
<<<<<<< HEAD <<<<<<< HEAD from tkinter import * from idlelib.EditorWindow import EditorWindow import re import tkinter.messagebox as tkMessageBox from idlelib import IOBinding class OutputWindow(EditorWindow): """An editor window that can serve as an output file. Also the future base class for the Python shell window. This class has no input facilities. """ def __init__(self, *args): EditorWindow.__init__(self, *args) self.text.bind("<<goto-file-line>>", self.goto_file_line) # Customize EditorWindow def ispythonsource(self, filename): # No colorization needed return 0 def short_title(self): return "Output" def maybesave(self): # Override base class method -- don't ask any questions if self.get_saved(): return "yes" else: return "no" # Act as output file def write(self, s, tags=(), mark="insert"): if isinstance(s, (bytes, bytes)): s = s.decode(IOBinding.encoding, "replace") self.text.insert(mark, s, tags) self.text.see(mark) self.text.update() return len(s) def writelines(self, lines): for line in lines: self.write(line) def flush(self): pass # Our own right-button menu rmenu_specs = [ ("Cut", "<<cut>>", "rmenu_check_cut"), ("Copy", "<<copy>>", "rmenu_check_copy"), ("Paste", "<<paste>>", "rmenu_check_paste"), (None, None, None), ("Go to file/line", "<<goto-file-line>>", None), ] file_line_pats = [ # order of patterns matters r'file "([^"]*)", line (\d+)', r'([^\s]+)\((\d+)\)', r'^(\s*\S.*?):\s*(\d+):', # Win filename, maybe starting with spaces r'([^\s]+):\s*(\d+):', # filename or path, ltrim r'^\s*(\S.*?):\s*(\d+):', # Win abs path with embedded spaces, ltrim ] file_line_progs = None def goto_file_line(self, event=None): if self.file_line_progs is None: l = [] for pat in self.file_line_pats: l.append(re.compile(pat, re.IGNORECASE)) self.file_line_progs = l # x, y = self.event.x, self.event.y # self.text.mark_set("insert", "@%d,%d" % (x, y)) line = self.text.get("insert linestart", "insert lineend") result = self._file_line_helper(line) if not result: # Try the previous line. This is handy e.g. in tracebacks, # where you tend to right-click on the displayed source line line = self.text.get("insert -1line linestart", "insert -1line lineend") result = self._file_line_helper(line) if not result: tkMessageBox.showerror( "No special line", "The line you point at doesn't look like " "a valid file name followed by a line number.", master=self.text) return filename, lineno = result edit = self.flist.open(filename) edit.gotoline(lineno) def _file_line_helper(self, line): for prog in self.file_line_progs: match = prog.search(line) if match: filename, lineno = match.group(1, 2) try: f = open(filename, "r") f.close() break except OSError: continue else: return None try: return filename, int(lineno) except TypeError: return None # These classes are currently not used but might come in handy class OnDemandOutputWindow: tagdefs = { # XXX Should use IdlePrefs.ColorPrefs "stdout": {"foreground": "blue"}, "stderr": {"foreground": "#007700"}, } def __init__(self, flist): self.flist = flist self.owin = None def write(self, s, tags, mark): if not self.owin: self.setup() self.owin.write(s, tags, mark) def setup(self): self.owin = owin = OutputWindow(self.flist) text = owin.text for tag, cnf in self.tagdefs.items(): if cnf: text.tag_configure(tag, **cnf) text.tag_raise('sel') self.write = self.owin.write ======= from tkinter import * from idlelib.EditorWindow import EditorWindow import re import tkinter.messagebox as tkMessageBox from idlelib import IOBinding class OutputWindow(EditorWindow): """An editor window that can serve as an output file. Also the future base class for the Python shell window. This class has no input facilities. """ def __init__(self, *args): EditorWindow.__init__(self, *args) self.text.bind("<<goto-file-line>>", self.goto_file_line) # Customize EditorWindow def ispythonsource(self, filename): # No colorization needed return 0 def short_title(self): return "Output" def maybesave(self): # Override base class method -- don't ask any questions if self.get_saved(): return "yes" else: return "no" # Act as output file def write(self, s, tags=(), mark="insert"): if isinstance(s, (bytes, bytes)): s = s.decode(IOBinding.encoding, "replace") self.text.insert(mark, s, tags) self.text.see(mark) self.text.update() return len(s) def writelines(self, lines): for line in lines: self.write(line) def flush(self): pass # Our own right-button menu rmenu_specs = [ ("Cut", "<<cut>>", "rmenu_check_cut"), ("Copy", "<<copy>>", "rmenu_check_copy"), ("Paste", "<<paste>>", "rmenu_check_paste"), (None, None, None), ("Go to file/line", "<<goto-file-line>>", None), ] file_line_pats = [ # order of patterns matters r'file "([^"]*)", line (\d+)', r'([^\s]+)\((\d+)\)', r'^(\s*\S.*?):\s*(\d+):', # Win filename, maybe starting with spaces r'([^\s]+):\s*(\d+):', # filename or path, ltrim r'^\s*(\S.*?):\s*(\d+):', # Win abs path with embedded spaces, ltrim ] file_line_progs = None def goto_file_line(self, event=None): if self.file_line_progs is None: l = [] for pat in self.file_line_pats: l.append(re.compile(pat, re.IGNORECASE)) self.file_line_progs = l # x, y = self.event.x, self.event.y # self.text.mark_set("insert", "@%d,%d" % (x, y)) line = self.text.get("insert linestart", "insert lineend") result = self._file_line_helper(line) if not result: # Try the previous line. This is handy e.g. in tracebacks, # where you tend to right-click on the displayed source line line = self.text.get("insert -1line linestart", "insert -1line lineend") result = self._file_line_helper(line) if not result: tkMessageBox.showerror( "No special line", "The line you point at doesn't look like " "a valid file name followed by a line number.", master=self.text) return filename, lineno = result edit = self.flist.open(filename) edit.gotoline(lineno) def _file_line_helper(self, line): for prog in self.file_line_progs: match = prog.search(line) if match: filename, lineno = match.group(1, 2) try: f = open(filename, "r") f.close() break except OSError: continue else: return None try: return filename, int(lineno) except TypeError: return None # These classes are currently not used but might come in handy class OnDemandOutputWindow: tagdefs = { # XXX Should use IdlePrefs.ColorPrefs "stdout": {"foreground": "blue"}, "stderr": {"foreground": "#007700"}, } def __init__(self, flist): self.flist = flist self.owin = None def write(self, s, tags, mark): if not self.owin: self.setup() self.owin.write(s, tags, mark) def setup(self): self.owin = owin = OutputWindow(self.flist) text = owin.text for tag, cnf in self.tagdefs.items(): if cnf: text.tag_configure(tag, **cnf) text.tag_raise('sel') self.write = self.owin.write >>>>>>> b875702c9c06ab5012e52ff4337439b03918f453 ======= from tkinter import * from idlelib.EditorWindow import EditorWindow import re import tkinter.messagebox as tkMessageBox from idlelib import IOBinding class OutputWindow(EditorWindow): """An editor window that can serve as an output file. Also the future base class for the Python shell window. This class has no input facilities. """ def __init__(self, *args): EditorWindow.__init__(self, *args) self.text.bind("<<goto-file-line>>", self.goto_file_line) # Customize EditorWindow def ispythonsource(self, filename): # No colorization needed return 0 def short_title(self): return "Output" def maybesave(self): # Override base class method -- don't ask any questions if self.get_saved(): return "yes" else: return "no" # Act as output file def write(self, s, tags=(), mark="insert"): if isinstance(s, (bytes, bytes)): s = s.decode(IOBinding.encoding, "replace") self.text.insert(mark, s, tags) self.text.see(mark) self.text.update() return len(s) def writelines(self, lines): for line in lines: self.write(line) def flush(self): pass # Our own right-button menu rmenu_specs = [ ("Cut", "<<cut>>", "rmenu_check_cut"), ("Copy", "<<copy>>", "rmenu_check_copy"), ("Paste", "<<paste>>", "rmenu_check_paste"), (None, None, None), ("Go to file/line", "<<goto-file-line>>", None), ] file_line_pats = [ # order of patterns matters r'file "([^"]*)", line (\d+)', r'([^\s]+)\((\d+)\)', r'^(\s*\S.*?):\s*(\d+):', # Win filename, maybe starting with spaces r'([^\s]+):\s*(\d+):', # filename or path, ltrim r'^\s*(\S.*?):\s*(\d+):', # Win abs path with embedded spaces, ltrim ] file_line_progs = None def goto_file_line(self, event=None): if self.file_line_progs is None: l = [] for pat in self.file_line_pats: l.append(re.compile(pat, re.IGNORECASE)) self.file_line_progs = l # x, y = self.event.x, self.event.y # self.text.mark_set("insert", "@%d,%d" % (x, y)) line = self.text.get("insert linestart", "insert lineend") result = self._file_line_helper(line) if not result: # Try the previous line. This is handy e.g. in tracebacks, # where you tend to right-click on the displayed source line line = self.text.get("insert -1line linestart", "insert -1line lineend") result = self._file_line_helper(line) if not result: tkMessageBox.showerror( "No special line", "The line you point at doesn't look like " "a valid file name followed by a line number.", master=self.text) return filename, lineno = result edit = self.flist.open(filename) edit.gotoline(lineno) def _file_line_helper(self, line): for prog in self.file_line_progs: match = prog.search(line) if match: filename, lineno = match.group(1, 2) try: f = open(filename, "r") f.close() break except OSError: continue else: return None try: return filename, int(lineno) except TypeError: return None # These classes are currently not used but might come in handy class OnDemandOutputWindow: tagdefs = { # XXX Should use IdlePrefs.ColorPrefs "stdout": {"foreground": "blue"}, "stderr": {"foreground": "#007700"}, } def __init__(self, flist): self.flist = flist self.owin = None def write(self, s, tags, mark): if not self.owin: self.setup() self.owin.write(s, tags, mark) def setup(self): self.owin = owin = OutputWindow(self.flist) text = owin.text for tag, cnf in self.tagdefs.items(): if cnf: text.tag_configure(tag, **cnf) text.tag_raise('sel') self.write = self.owin.write >>>>>>> b875702c9c06ab5012e52ff4337439b03918f453
ArcherSys/ArcherSys
Lib/idlelib/OutputWindow.py
Python
mit
13,322
from django import forms from django.test.utils import override_settings from django_webtest import WebTest from material import Layout, Row, Column from . import build_test_urls class LayoutForm(forms.Form): test_field1 = forms.CharField() test_field2 = forms.CharField() test_field3 = forms.CharField() test_field4 = forms.CharField() test_field5 = forms.CharField() layout = Layout(Row('test_field1', 'test_field2'), Row('test_field3', Column('test_field4', 'test_field5'))) @override_settings(ROOT_URLCONF=__name__) class Test(WebTest): default_form = LayoutForm def test_field_part_override(self): """ Issue #19 """ response = self.app.get(self.test_field_part_override.url) self.assertIn('NO FIELD', response.content.decode('utf-8')) test_field_part_override.template = """ {% form %} {% part form.test_field1 %}NO FIELD{% endpart %} {% endform %} """ urlpatterns = build_test_urls(Test)
2947721120/django-material
tests/test_base_layout.py
Python
bsd-3-clause
1,031
import pandas import numpy # Read the data data = pandas.read_csv('data.csv') # Split the data into X and y X = numpy.array(data[['x1', 'x2']]) y = numpy.array(data['y']) # import statements for the classification algorithms from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier from sklearn.svm import SVC # TODO: Pick an algorithm from the list: # - Logistic Regression # - Decision Trees # - Support Vector Machines # Define a classifier (bonus: Specify some parameters!) # and use it to fit the data, make sure you name the variable as "classifier" # Click on `Test Run` to see how your algorithm fit the data!
hetaodie/hetaodie.github.io
assets/media/uda-ml/code/sklearn/quiz.py
Python
mit
665
# Copyright (c) 2013 Mirantis, 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 collections from murano.common import rpc from murano.common import uuidutils from murano.db import models from murano.db.services import sessions from murano.db import session as db_session EnvironmentStatus = collections.namedtuple('EnvironmentStatus', [ 'ready', 'pending', 'deploying' ])( ready='ready', pending='pending', deploying='deploying' ) DEFAULT_NETWORKS = { 'environment': 'io.murano.resources.NeutronNetwork', # 'flat': 'io.murano.resources.ExistingNetworkConnector' } class EnvironmentServices(object): @staticmethod def get_environments_by(filters): """ Returns list of environments :param filters: property filters :return: Returns list of environments """ unit = db_session.get_session() environments = unit.query(models.Environment).\ filter_by(**filters).all() for env in environments: env['status'] = EnvironmentServices.get_status(env['id']) return environments @staticmethod def get_status(environment_id): """ Environment can have one of three distinguished statuses: - Deploying: there is at least one session with status `deploying`; - Pending: there is at least one session with status `open`; - Ready: there is no sessions in status `deploying` or `open`. :param environment_id: Id of environment for which we checking status. :return: Environment status """ #Deploying: there is at least one valid session with status `deploying` deploying = sessions.SessionServices.get_sessions( environment_id, sessions.SessionState.deploying) if len(deploying) > 0: return 'deploying' #Pending: there is at least one valid session with status `open`; open = sessions.SessionServices.get_sessions( environment_id, sessions.SessionState.open) if len(open) > 0: return 'pending' #Ready: there are no sessions in status `deploying` or `open` return 'ready' @staticmethod def create(environment_params, tenant_id): #tagging environment by tenant_id for later checks """ Creates environment with specified params, in particular - name :param environment_params: Dict, e.g. {'name': 'env-name'} :param tenant_id: Tenant Id :return: Created Environment """ objects = {'?': { 'id': uuidutils.generate_uuid(), }} objects.update(environment_params) objects.update( EnvironmentServices.generate_default_networks(objects['name'])) objects['?']['type'] = 'io.murano.Environment' environment_params['tenant_id'] = tenant_id data = { 'Objects': objects, 'Attributes': [] } environment = models.Environment() environment.update(environment_params) unit = db_session.get_session() with unit.begin(): unit.add(environment) #saving environment as Json to itself environment.update({'description': data}) environment.save(unit) return environment @staticmethod def delete(environment_id, token): """ Deletes environment and notify orchestration engine about deletion :param environment_id: Environment that is going to be deleted :param token: OpenStack auth token """ unit = db_session.get_session() environment = unit.query(models.Environment).get(environment_id) #preparing data for removal from conductor env = environment.description env['Objects'] = None data = { 'model': env, 'token': token, 'tenant_id': environment.tenant_id } rpc.engine().handle_task(data) with unit.begin(): unit.delete(environment) @staticmethod def get_environment_description(environment_id, session_id=None, inner=True): """ Returns environment description for specified environment. If session is specified and not in deploying state function returns modified environment description, otherwise returns actual environment desc. :param environment_id: Environment Id :param session_id: Session Id :param inner: return contents of environment rather than whole Object Model structure :return: Environment Description Object """ unit = db_session.get_session() if session_id: session = unit.query(models.Session).get(session_id) if sessions.SessionServices.validate(session): if session.state != sessions.SessionState.deployed: env_description = session.description else: env = unit.query(models.Environment)\ .get(session.environment_id) env_description = env.description else: env = unit.query(models.Environment)\ .get(session.environment_id) env_description = env.description else: env = (unit.query(models.Environment).get(environment_id)) env_description = env.description if not inner: return env_description else: return env_description['Objects'] @staticmethod def save_environment_description(session_id, environment, inner=True): """ Saves environment description to specified session :param session_id: Session Id :param environment: Environment Description :param inner: save modifications to only content of environment rather than whole Object Model structure """ unit = db_session.get_session() session = unit.query(models.Session).get(session_id) if inner: data = session.description.copy() data['Objects'] = environment session.description = data else: session.description = environment session.save(unit) @staticmethod def generate_default_networks(env_name): # TODO(ativelkov): # This is a temporary workaround. Need to find a better way: # These objects have to be created in runtime when the environment is # deployed for the first time. Currently there is no way to persist # such changes, so we have to create the objects on the API side return { 'defaultNetworks': { 'environment': { '?': { 'id': uuidutils.generate_uuid(), 'type': DEFAULT_NETWORKS['environment'] }, 'name': env_name + '-network' }, 'flat': None } }
ativelkov/murano-api
murano/db/services/environments.py
Python
apache-2.0
7,639
# bokeh_lineid_plot.py # # Copyright (C) 2015 - Julio Campagnolo <juliocampagnolo@gmail.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, see <http://www.gnu.org/licenses/>. import numpy as np __all__ = ['plot_line_ids'] def adjust_boxes(line_wave, box_widths, left_edge, right_edge, max_iter=1000, adjust_factor=0.35, factor_decrement=3.0, fd_p=0.75): """Ajdust given boxes so that they don't overlap. Parameters ---------- line_wave: list or array of floats Line wave lengths. These are assumed to be the initial y (wave length) location of the boxes. box_widths: list or array of floats Width of box containing labels for each line identification. left_edge: float Left edge of valid data i.e., wave length minimum. right_edge: float Right edge of valid data i.e., wave lengths maximum. max_iter: int Maximum number of iterations to attempt. adjust_factor: float Gap between boxes are reduced or increased by this factor after each iteration. factor_decrement: float The `adjust_factor` itself if reduced by this factor, after certain number of iterations. This is useful for crowded regions. fd_p: float Percentage, given as a fraction between 0 and 1, after which adjust_factor must be reduced by a factor of `factor_decrement`. Default is set to 0.75. Returns ------- wlp, niter, changed: (float, float, float) The new x (wave length) location of the text boxes, the number of iterations used and a flag to indicated whether any changes to the input locations were made or not. Notes ----- This is a direct translation of the code in lineid_plot.pro file in NASA IDLAstro library. Positions are returned either when the boxes no longer overlap or when `max_iter` number of iterations are completed. So if there are many boxes, there is a possibility that the final box locations overlap. References ---------- + http://idlastro.gsfc.nasa.gov/ftp/pro/plot/lineid_plot.pro + http://idlastro.gsfc.nasa.gov/ """ # Adjust positions. niter = 0 changed = True nlines = len(line_wave) wlp = line_wave[:] while changed: changed = False for i in range(nlines): if i > 0: diff1 = wlp[i] - wlp[i - 1] separation1 = (box_widths[i] + box_widths[i - 1]) / 2.0 else: diff1 = wlp[i] - left_edge + box_widths[i] * 1.01 separation1 = box_widths[i] if i < nlines - 2: diff2 = wlp[i + 1] - wlp[i] separation2 = (box_widths[i] + box_widths[i + 1]) / 2.0 else: diff2 = right_edge + box_widths[i] * 1.01 - wlp[i] separation2 = box_widths[i] if diff1 < separation1 or diff2 < separation2: if wlp[i] == left_edge: diff1 = 0 if wlp[i] == right_edge: diff2 = 0 if diff2 > diff1: wlp[i] = wlp[i] + separation2 * adjust_factor wlp[i] = wlp[i] if wlp[i] < right_edge else right_edge else: wlp[i] = wlp[i] - separation1 * adjust_factor wlp[i] = wlp[i] if wlp[i] > left_edge else left_edge changed = True niter += 1 if niter == max_iter * fd_p: adjust_factor /= factor_decrement if niter >= max_iter: break return wlp, changed, niter def plot_line_ids(plot, spec_wave, spec_flux, line_wave, line_label, **kwargs): ''' Label features with automatic layout of labels. Parameters ---------- plot: Bokeh.plotting.figure The plot where the features will be labeled. spec_wave: list or array of floats Wave lengths of data. spec_flux: list or array of floats Flux at each wavelength. line_wave: list or array of floats Wave length of features to be labelled. line_label: list of strings Label text for each line. kwargs: key value pairs All of these keywords are optional. The following keys are recognized: *All the keywords of the text and line properties used in Bokeh max_iter: int Maximum iterations to use. Default is set to 1000. label_loc: string or float The y location of the labels. If a string is given, it's value may be 'above' or 'bellow', indicating that the label will be located above or bellow the spectrum by a distance given by label_dist. If a float is given, all the labels will be placed in a constant y value. label_dist: float Separation between the spectrum flux and the label. extend: bool Draw a line linking the spectrum and the label. vert_space: float Space between the label and the init of the vertical line box_width: floats The separation between labels in units of the wavelenght. adjust_factor: float Gap between boxes are reduced or increased by this factor after each iteration. factor_decrement: float The `adjust_factor` itself if reduced by this factor, after certain number of iterations. This is useful for crowded regions. ''' spec_wave = np.array(spec_wave) spec_flux = np.array(spec_flux) line_wave = np.array(line_wave) line_label = np.array(line_label) if not len(line_wave) == len(line_label): raise ValueError('the line_wave and line_label must have the same lengths.') indx = np.argsort(spec_wave) spec_wave[:] = spec_wave[indx] spec_flux[:] = spec_flux[indx] indx = np.argsort(line_wave) line_wave1 = line_wave[:] = line_wave[indx] line_label[:] = line_label[indx] label_loc = kwargs.pop('label_loc','above') label_dist = kwargs.pop('label_dist',1.0) vert_space = kwargs.pop('vert_space',0.5) line_flux = np.interp(line_wave, spec_wave, spec_flux) try: label_loc = float(label_loc) line_loc = np.array([label_loc]*len(line_wave)) except: if label_loc == 'above': line_loc = line_flux + label_dist elif label_loc == 'below': line_loc = line_flux - label_dist else: raise ValueError('the label_loc parameter must be \'above\', \'below\' or a float.') line_flux1 = line_loc + vert_space*(line_flux-label_loc)/abs(line_flux-label_loc) max_iter = kwargs.get('max_iter', 1000) adjust_factor = kwargs.get('adjust_factor', 0.35) factor_decrement = kwargs.get('factor_decrement', 3.0) box_widths = kwargs.get('box_widths', 10) box_widths = [box_widths]*len(line_label) wlp, niter, changed = adjust_boxes(line_wave, box_widths, np.min(spec_wave), np.max(spec_wave), adjust_factor=adjust_factor, factor_decrement=factor_decrement, max_iter=max_iter) text_angle = kwargs.pop('text_angle', np.pi/2) text_font_size = kwargs.pop('text_font_size',None) text_align = kwargs.pop('text_align','left') text_baseline = kwargs.pop('text_baseline','bottom') line_color = kwargs.pop('line_color','black') plot.text(wlp, line_loc, text=line_label, text_angle=text_angle, text_font_size=text_font_size, text_align=text_align, text_baseline=text_baseline, **kwargs) if kwargs.pop('extend',True): for i in range(len(line_label)): plot.line([line_wave1[i], line_wave1[i], wlp[i]], [line_flux[i], line_flux1[i], line_loc[i]], line_color=line_color, **kwargs)
juliotux/bokeh_lineid_plot
bokeh_lineid_plot.py
Python
gpl-3.0
8,642
# pylint: disable=wrong-or-nonexistent-copyright-notice """Demonstrates Shor's algorithm. Shor's algorithm [1] is a quantum algorithm for integer factorization. Given a composite integer n, it finds its non-trivial factor d, i.e. a factor other than 1 or n. The algorithm consists of two parts: quantum order-finding subroutine and classical probabilistic reduction of the factoring problem to the order- finding problem. Given two positive integers x and n, the order-finding problem asks for the smallest positive integer r such that x**r mod n == 1. The classical reduction algorithm first handles two corner cases which do not rely on quantum computation: when n is even or a prime power. For other n, the algorithm first draws a random x uniformly from 2..n-1 and then uses the quantum order-finding subroutine to compute the order r of x modulo n, i.e. it finds the smallest positive integer r such that x**r == 1 mod n. Now, if r is even, then y = x**(r/2) is a solution to the equation y**2 == 1 mod n. (*) It's easy to see that in this case gcd(y - 1, n) or gcd(y + 1, n) divides n. If in addition y is a non-trivial solution, i.e. if it is not equal to -1, then gcd(y - 1, n) or gcd(y + 1, n) is a non-trivial factor of n (note that y cannot be 1). If r is odd or if y is a trivial solution of (*), then the algorithm is repeated for a different random x. It turns out [1] that the probability of r being even and y = x**(r/2) being a non-trivial solution of equation (*) is at least 1 - 1/2**(k - 1) where k is the number of distinct prime factors of n. Since the case k = 1 has been handled by the classical part, we have k >= 2 and the success probability of a single attempt is at least 1/2. The subroutine for finding the order r of a number x modulo n consists of two steps. In the first step, Quantum Phase Estimation is applied to a unitary such as U|y⟩ = |xy mod n⟩ 0 <= y < n U|y⟩ = |y⟩ n =< y whose eigenvalues are s/r for s = 0, 1, ..., r - 1. In the second step, the classical continued fractions algorithm is used to recover r from s/r. Note that when gcd(s, r) > 1 then an incorrect r is found. This can be detected by verifying that r is indeed the order of x. If it is not, Quantum Phase Estimation algorithm is retried. [1]: https://arxiv.org/abs/quant-ph/9508027 """ import argparse import fractions import math import random from typing import Callable, List, Optional, Sequence, Union import sympy import cirq parser = argparse.ArgumentParser(description='Factorization demo.') parser.add_argument('n', type=int, help='composite integer to factor') parser.add_argument( '--order_finder', type=str, choices=('naive', 'quantum'), default='naive', help=( 'order finder to use; must be either "naive" ' 'for a naive classical algorithm or "quantum" ' 'for a quantum circuit; note that in practice ' '"quantum" is substantially slower since it ' 'incurs the overhead of classical simulation.' ), ) def naive_order_finder(x: int, n: int) -> Optional[int]: """Computes smallest positive r such that x**r mod n == 1. Args: x: integer whose order is to be computed, must be greater than one and belong to the multiplicative group of integers modulo n (which consists of positive integers relatively prime to n), n: modulus of the multiplicative group. Returns: Smallest positive integer r such that x**r == 1 mod n. Always succeeds (and hence never returns None). Raises: ValueError: When x is 1 or not an element of the multiplicative group of integers modulo n. """ if x < 2 or n <= x or math.gcd(x, n) > 1: raise ValueError(f'Invalid x={x} for modulus n={n}.') r, y = 1, x while y != 1: y = (x * y) % n r += 1 return r class ModularExp(cirq.ArithmeticOperation): """Quantum modular exponentiation. This class represents the unitary which multiplies base raised to exponent into the target modulo the given modulus. More precisely, it represents the unitary V which computes modular exponentiation x**e mod n: V|y⟩|e⟩ = |y * x**e mod n⟩ |e⟩ 0 <= y < n V|y⟩|e⟩ = |y⟩ |e⟩ n <= y where y is the target register, e is the exponent register, x is the base and n is the modulus. Consequently, V|y⟩|e⟩ = (U**e|r⟩)|e⟩ where U is the unitary defined as U|y⟩ = |y * x mod n⟩ 0 <= y < n U|y⟩ = |y⟩ n <= y in the header of this file. Quantum order finding algorithm (which is the quantum part of the Shor's algorithm) uses quantum modular exponentiation together with the Quantum Phase Estimation to compute the order of x modulo n. """ def __init__( self, target: Sequence[cirq.Qid], exponent: Union[int, Sequence[cirq.Qid]], base: int, modulus: int, ) -> None: if len(target) < modulus.bit_length(): raise ValueError( f'Register with {len(target)} qubits is too small for modulus {modulus}' ) self.target = target self.exponent = exponent self.base = base self.modulus = modulus def registers(self) -> Sequence[Union[int, Sequence[cirq.Qid]]]: return self.target, self.exponent, self.base, self.modulus def with_registers( self, *new_registers: Union[int, Sequence['cirq.Qid']], ) -> 'ModularExp': if len(new_registers) != 4: raise ValueError( f'Expected 4 registers (target, exponent, base, ' f'modulus), but got {len(new_registers)}' ) target, exponent, base, modulus = new_registers if not isinstance(target, Sequence): raise ValueError(f'Target must be a qubit register, got {type(target)}') if not isinstance(base, int): raise ValueError(f'Base must be a classical constant, got {type(base)}') if not isinstance(modulus, int): raise ValueError(f'Modulus must be a classical constant, got {type(modulus)}') return ModularExp(target, exponent, base, modulus) def apply(self, *register_values: int) -> int: assert len(register_values) == 4 target, exponent, base, modulus = register_values if target >= modulus: return target return (target * base ** exponent) % modulus def _circuit_diagram_info_( self, args: cirq.CircuitDiagramInfoArgs, ) -> cirq.CircuitDiagramInfo: assert args.known_qubits is not None wire_symbols: List[str] = [] t, e = 0, 0 for qubit in args.known_qubits: if qubit in self.target: if t == 0: if isinstance(self.exponent, Sequence): e_str = 'e' else: e_str = str(self.exponent) wire_symbols.append(f'ModularExp(t*{self.base}**{e_str} % {self.modulus})') else: wire_symbols.append('t' + str(t)) t += 1 if isinstance(self.exponent, Sequence) and qubit in self.exponent: wire_symbols.append('e' + str(e)) e += 1 return cirq.CircuitDiagramInfo(wire_symbols=tuple(wire_symbols)) def make_order_finding_circuit(x: int, n: int) -> cirq.Circuit: """Returns quantum circuit which computes the order of x modulo n. The circuit uses Quantum Phase Estimation to compute an eigenvalue of the unitary U|y⟩ = |y * x mod n⟩ 0 <= y < n U|y⟩ = |y⟩ n <= y discussed in the header of this file. The circuit uses two registers: the target register which is acted on by U and the exponent register from which an eigenvalue is read out after measurement at the end. The circuit consists of three steps: 1. Initialization of the target register to |0..01⟩ and the exponent register to a superposition state. 2. Multiple controlled-U**2**j operations implemented efficiently using modular exponentiation. 3. Inverse Quantum Fourier Transform to kick an eigenvalue to the exponent register. Args: x: positive integer whose order modulo n is to be found n: modulus relative to which the order of x is to be found Returns: Quantum circuit for finding the order of x modulo n """ L = n.bit_length() target = cirq.LineQubit.range(L) exponent = cirq.LineQubit.range(L, 3 * L + 3) return cirq.Circuit( cirq.X(target[L - 1]), cirq.H.on_each(*exponent), ModularExp(target, exponent, x, n), cirq.qft(*exponent, inverse=True), cirq.measure(*exponent, key='exponent'), ) def read_eigenphase(result: cirq.Result) -> float: """Interprets the output of the order finding circuit. Specifically, it returns s/r such that exp(2πis/r) is an eigenvalue of the unitary U|y⟩ = |xy mod n⟩ 0 <= y < n U|y⟩ = |y⟩ n <= y described in the header of this file. Args: result: trial result obtained by sampling the output of the circuit built by make_order_finding_circuit Returns: s/r where r is the order of x modulo n and s is in [0..r-1]. """ exponent_as_integer = result.data['exponent'][0] exponent_num_bits = result.measurements['exponent'].shape[1] return float(exponent_as_integer / 2 ** exponent_num_bits) def quantum_order_finder(x: int, n: int) -> Optional[int]: """Computes smallest positive r such that x**r mod n == 1. Args: x: integer whose order is to be computed, must be greater than one and belong to the multiplicative group of integers modulo n (which consists of positive integers relatively prime to n), n: modulus of the multiplicative group. Returns: Smallest positive integer r such that x**r == 1 mod n or None if the algorithm failed. The algorithm fails when the result of the Quantum Phase Estimation is inaccurate, zero or a reducible fraction. Raises: ValueError: When x is 1 or not an element of the multiplicative group of integers modulo n. """ if x < 2 or n <= x or math.gcd(x, n) > 1: raise ValueError(f'Invalid x={x} for modulus n={n}.') circuit = make_order_finding_circuit(x, n) result = cirq.sample(circuit) eigenphase = read_eigenphase(result) f = fractions.Fraction.from_float(eigenphase).limit_denominator(n) if f.numerator == 0: return None # coverage: ignore r = f.denominator if x ** r % n != 1: return None # coverage: ignore return r def find_factor_of_prime_power(n: int) -> Optional[int]: """Returns non-trivial factor of n if n is a prime power, else None.""" for k in range(2, math.floor(math.log2(n)) + 1): c = math.pow(n, 1 / k) c1 = math.floor(c) if c1 ** k == n: return c1 c2 = math.ceil(c) if c2 ** k == n: return c2 return None def find_factor( n: int, order_finder: Callable[[int, int], Optional[int]], max_attempts: int = 30 ) -> Optional[int]: """Returns a non-trivial factor of composite integer n. Args: n: integer to factorize, order_finder: function for finding the order of elements of the multiplicative group of integers modulo n, max_attempts: number of random x's to try, also an upper limit on the number of order_finder invocations. Returns: Non-trivial factor of n or None if no such factor was found. Factor k of n is trivial if it is 1 or n. """ if sympy.isprime(n): return None if n % 2 == 0: return 2 c = find_factor_of_prime_power(n) if c is not None: return c for _ in range(max_attempts): x = random.randint(2, n - 1) c = math.gcd(x, n) if 1 < c < n: return c # coverage: ignore r = order_finder(x, n) if r is None: continue # coverage: ignore if r % 2 != 0: continue # coverage: ignore y = x ** (r // 2) % n assert 1 < y < n c = math.gcd(y - 1, n) if 1 < c < n: return c return None # coverage: ignore def main( n: int, order_finder: Callable[[int, int], Optional[int]] = naive_order_finder, ): if n < 2: raise ValueError(f'Invalid input {n}, expected positive integer greater than one.') d = find_factor(n, order_finder) if d is None: print(f'No non-trivial factor of {n} found. It is probably a prime.') else: print(f'{d} is a non-trivial factor of {n}') assert 1 < d < n assert n % d == 0 if __name__ == '__main__': # coverage: ignore ORDER_FINDERS = { 'naive': naive_order_finder, 'quantum': quantum_order_finder, } args = parser.parse_args() main(n=args.n, order_finder=ORDER_FINDERS[args.order_finder])
quantumlib/Cirq
examples/shor.py
Python
apache-2.0
13,340
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import re import readline import sqlite3 import sys from os.path import expanduser PAT_ANON_CLASS = re.compile(r".*\$[0-9]+;") HISTORY_FILE = expanduser("~/.dexsql.history") OPCODES = {} OPCODES[0x1A] = "const-string" OPCODES[0x1B] = "const-string/jumbo" OPCODES[0x1C] = "const-class" OPCODES[0x1F] = "check-cast" OPCODES[0x20] = "instance-of" OPCODES[0x22] = "new-instance" OPCODES[0x52] = "iget" OPCODES[0x53] = "iget/wide" OPCODES[0x54] = "iget-object" OPCODES[0x55] = "iget-boolean" OPCODES[0x56] = "iget-byte" OPCODES[0x57] = "iget-char" OPCODES[0x58] = "iget-short" OPCODES[0x59] = "iput" OPCODES[0x5A] = "iput/wide" OPCODES[0x5B] = "iput-object" OPCODES[0x5C] = "iput-boolean" OPCODES[0x5D] = "iput-byte" OPCODES[0x5E] = "iput-char" OPCODES[0x5F] = "iput-short" OPCODES[0x60] = "sget" OPCODES[0x61] = "sget/wide" OPCODES[0x62] = "sget-object" OPCODES[0x63] = "sget-boolean" OPCODES[0x64] = "sget-byte" OPCODES[0x65] = "sget-char" OPCODES[0x66] = "sget-short" OPCODES[0x67] = "sput" OPCODES[0x68] = "sput/wide" OPCODES[0x69] = "sput-object" OPCODES[0x6A] = "sput-boolean" OPCODES[0x6B] = "sput-byte" OPCODES[0x6C] = "sput-char" OPCODES[0x6D] = "sput-short" OPCODES[0x6E] = "invoke-virtual" OPCODES[0x6F] = "invoke-super" OPCODES[0x70] = "invoke-direct" OPCODES[0x71] = "invoke-static" OPCODES[0x72] = "invoke-interface" OPCODES[0x74] = "invoke-virtual/range" OPCODES[0x75] = "invoke-super/range" OPCODES[0x76] = "invoke-direct/range" OPCODES[0x77] = "invoke-static/range" OPCODES[0x78] = "invoke-interface/range" # operates on classes.name column # return the first n levels of the package: PKG("com/foo/bar", 2) => "com/foo" def udf_pkg_2arg(text, n): groups = text.split("/") if n >= (len(groups) - 1): n = len(groups) - 1 return "/".join(groups[:n]) def udf_pkg_1arg(text): return udf_pkg_2arg(text, 9999) # operates on access column def udf_is_interface(access): return access & 0x00000200 # operates on access column def udf_is_static(access): return access & 0x00000008 # operates on access column def udf_is_final(access): return access & 0x00000010 # operates on access column def udf_is_native(access): return access & 0x00000100 # operates on access column def udf_is_abstract(access): return access & 0x00000400 # operates on access column def udf_is_synthetic(access): return access & 0x00001000 # operates on access column def udf_is_annotation(access): return access & 0x00002000 # operates on access column def udf_is_enum(access): return access & 0x00004000 # operates on access column def udf_is_constructor(access): return access & 0x00010000 # operates on dex column def udf_is_voltron_dex(dex_id): return not dex_id.startswith("dex/") # operates on classes.name def udf_is_inner_class(name): return "$" in name # operates on classes.name def udf_is_anon_class(name): return PAT_ANON_CLASS.match(name) is not None # convert a numerical opcode to its name def udf_opcode(opcode): return OPCODES.get(opcode, opcode) # operates on dex column def udf_is_coldstart(dex_id): return dex_id == "dex/0" or dex_id == "dex/1" or dex_id == "dex/2" def udf_is_default_ctor(name): return name == ";.<init>:()V" # operates on fields.name class AggregateFieldShape: def __init__(self): self.shape = {} def step(self, value): element = value[value.index(":") + 1] self.shape[element] = self.shape[element] + 1 if element in self.shape else 1 def finalize(self): return " ".join("%s:%s" % (k, v) for k, v in sorted(self.shape.items())) conn = sqlite3.connect(sys.argv[1]) conn.create_function("PKG", 2, udf_pkg_2arg) conn.create_function("PKG", 1, udf_pkg_1arg) conn.create_function("IS_INTERFACE", 1, udf_is_interface) conn.create_function("IS_STATIC", 1, udf_is_static) conn.create_function("IS_FINAL", 1, udf_is_final) conn.create_function("IS_NATIVE", 1, udf_is_native) conn.create_function("IS_ABSTRACT", 1, udf_is_abstract) conn.create_function("IS_SYNTHETIC", 1, udf_is_synthetic) conn.create_function("IS_ANNOTATION", 1, udf_is_annotation) conn.create_function("IS_ENUM", 1, udf_is_enum) conn.create_function("IS_CONSTRUCTOR", 1, udf_is_constructor) conn.create_function("IS_DEFAULT_CONSTRUCTOR", 1, udf_is_default_ctor) conn.create_function("IS_VOLTRON_DEX", 1, udf_is_voltron_dex) conn.create_function("IS_INNER_CLASS", 1, udf_is_inner_class) conn.create_function("IS_ANON_CLASS", 1, udf_is_anon_class) conn.create_function("OPCODE", 1, udf_opcode) conn.create_function("IS_COLDSTART", 1, udf_is_coldstart) conn.create_aggregate("FIELD_SHAPE", 1, AggregateFieldShape) cursor = conn.cursor() open(HISTORY_FILE, "a") readline.read_history_file(HISTORY_FILE) readline.set_history_length(1000) while True: line = input("> ") readline.write_history_file(HISTORY_FILE) try: rows = 0 cursor.execute(line) for row in cursor.fetchall(): print(str(row)) rows += 1 print("%d rows returned by query" % (rows)) except sqlite3.OperationalError as e: print("Query caused exception: %s" % str(e)) cursor.close() conn.close()
facebook/redex
tools/redex-tool/DexSqlQuery.py
Python
mit
5,468
# 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. """ Component tests for VPC Internal Load Balancer functionality with Nuage VSP SDN plugin """ # Import Local Modules from nuageTestCase import nuageTestCase from marvin.lib.base import (Account, ApplicationLoadBalancer, Network, Router) from marvin.cloudstackAPI import (listInternalLoadBalancerVMs, stopInternalLoadBalancerVM, startInternalLoadBalancerVM) # Import System Modules from nose.plugins.attrib import attr import copy import time class TestNuageInternalLb(nuageTestCase): """Test VPC Internal LB functionality with Nuage VSP SDN plugin """ @classmethod def setUpClass(cls): super(TestNuageInternalLb, cls).setUpClass() return def setUp(self): # Create an account self.account = Account.create(self.api_client, self.test_data["account"], admin=True, domainid=self.domain.id ) self.cleanup = [self.account] return # create_Internal_LB_Rule - Creates Internal LB rule in the given # VPC network def create_Internal_LB_Rule(self, network, vm_array=None, services=None, source_ip=None): self.debug("Creating Internal LB rule in VPC network with ID - %s" % network.id) if not services: services = self.test_data["internal_lbrule"] int_lb_rule = ApplicationLoadBalancer.create( self.api_client, services=services, sourcenetworkid=network.id, networkid=network.id, sourceipaddress=source_ip ) self.debug("Created Internal LB rule") # Assigning VMs to the created Internal Load Balancer rule if vm_array: self.debug("Assigning virtual machines - %s to the created " "Internal LB rule" % vm_array) int_lb_rule.assign(self.api_client, vms=vm_array) self.debug("Assigned VMs to the created Internal LB rule") return int_lb_rule # validate_Internal_LB_Rule - Validates the given Internal LB rule, # matches the given Internal LB rule name and state against the list of # Internal LB rules fetched def validate_Internal_LB_Rule(self, int_lb_rule, state=None, vm_array=None): """Validates the Internal LB Rule""" self.debug("Check if the Internal LB Rule is created successfully ?") int_lb_rules = ApplicationLoadBalancer.list(self.api_client, id=int_lb_rule.id ) self.assertEqual(isinstance(int_lb_rules, list), True, "List Internal LB Rule should return a valid list" ) self.assertEqual(int_lb_rule.name, int_lb_rules[0].name, "Name of the Internal LB Rule should match with the " "returned list data" ) if state: self.assertEqual(int_lb_rules[0].loadbalancerrule[0].state, state, "Internal LB Rule state should be '%s'" % state ) if vm_array: instance_ids = [instance.id for instance in int_lb_rules[0].loadbalancerinstance] for vm in vm_array: self.assertEqual(vm.id in instance_ids, True, "Internal LB instance list should have the " "VM with ID - %s" % vm.id ) self.debug("Internal LB Rule creation successfully validated for %s" % int_lb_rule.name) # list_InternalLbVms - Lists deployed Internal LB VM instances def list_InternalLbVms(self, network_id=None, source_ip=None): listInternalLoadBalancerVMsCmd = \ listInternalLoadBalancerVMs.listInternalLoadBalancerVMsCmd() listInternalLoadBalancerVMsCmd.account = self.account.name listInternalLoadBalancerVMsCmd.domainid = self.account.domainid if network_id: listInternalLoadBalancerVMsCmd.networkid = network_id internal_lb_vms = self.api_client.listInternalLoadBalancerVMs( listInternalLoadBalancerVMsCmd) if source_ip: return [internal_lb_vm for internal_lb_vm in internal_lb_vms if str(internal_lb_vm.guestipaddress) == source_ip] else: return internal_lb_vms # get_InternalLbVm - Returns Internal LB VM instance for the given VPC # network and source ip def get_InternalLbVm(self, network, source_ip): self.debug("Finding the InternalLbVm for network with ID - %s and " "source IP address - %s" % (network.id, source_ip)) internal_lb_vms = self.list_InternalLbVms(network.id, source_ip) self.assertEqual(isinstance(internal_lb_vms, list), True, "List InternalLbVms should return a valid list" ) return internal_lb_vms[0] # stop_InternalLbVm - Stops the given Internal LB VM instance def stop_InternalLbVm(self, int_lb_vm, force=False): self.debug("Stopping InternalLbVm with ID - %s" % int_lb_vm.id) cmd = stopInternalLoadBalancerVM.stopInternalLoadBalancerVMCmd() cmd.id = int_lb_vm.id if force: cmd.forced = force self.api_client.stopInternalLoadBalancerVM(cmd) # start_InternalLbVm - Starts the given Internal LB VM instance def start_InternalLbVm(self, int_lb_vm): self.debug("Starting InternalLbVm with ID - %s" % int_lb_vm.id) cmd = startInternalLoadBalancerVM.startInternalLoadBalancerVMCmd() cmd.id = int_lb_vm.id self.api_client.startInternalLoadBalancerVM(cmd) # check_InternalLbVm_state - Checks if the Internal LB VM instance of the # given VPC network and source IP is in the expected state form the list of # fetched Internal LB VM instances def check_InternalLbVm_state(self, network, source_ip, state=None): self.debug("Check if the InternalLbVm is in state - %s" % state) internal_lb_vms = self.list_InternalLbVms(network.id, source_ip) self.assertEqual(isinstance(internal_lb_vms, list), True, "List InternalLbVm should return a valid list" ) if state: self.assertEqual(internal_lb_vms[0].state, state, "InternalLbVm is not in the expected state" ) self.debug("InternalLbVm instance - %s is in the expected state - %s" % (internal_lb_vms[0].name, state)) # verify_vpc_vm_ingress_traffic - Verifies ingress traffic to the given VM # (SSH into VM) via a created Static NAT rule in the given VPC network def verify_vpc_vm_ingress_traffic(self, vm, network, vpc): self.debug("Verifying ingress traffic to the VM (SSH into VM) - %s " "via a created Static NAT rule in the VPC network - %s" % (vm, network)) # Creating Static NAT rule for the given VM in the given VPC network self.debug("Creating Static NAT Rule...") test_public_ip = self.acquire_PublicIPAddress(network, vpc) self.validate_PublicIPAddress(test_public_ip, network) self.create_StaticNatRule_For_VM(vm, test_public_ip, network) self.validate_PublicIPAddress( test_public_ip, network, static_nat=True, vm=vm) # VSD verification self.verify_vsd_floating_ip(network, vm, test_public_ip.ipaddress, vpc) # Adding Network ACL rule in the given VPC network self.debug("Creating Network ACL rule ...") test_public_ssh_rule = self.create_NetworkAclRule( self.test_data["ingress_rule"], network=network) # VSD verification self.verify_vsd_firewall_rule(test_public_ssh_rule) # SSH into VM self.debug("Verifying VM ingress traffic (SSH into VM)...") self.ssh_into_VM(vm, test_public_ip) # Removing Network ACL rule in the given VPC network self.debug("Removing the created Network ACL rule...") test_public_ssh_rule.delete(self.api_client) # VSD verification with self.assertRaises(Exception): self.verify_vsd_firewall_rule(test_public_ssh_rule) self.debug("Network ACL rule successfully deleted in VSD") # Deleting Static NAT Rule self.debug("Deleting the created Static NAT Rule...") self.delete_StaticNatRule_For_VM(test_public_ip) with self.assertRaises(Exception): self.validate_PublicIPAddress( test_public_ip, network, static_nat=True, vm=vm) self.debug("Static NAT Rule successfully deleted in CloudStack") # VSD verification with self.assertRaises(Exception): self.verify_vsd_floating_ip( network, vm, test_public_ip.ipaddress, vpc=vpc) self.debug("Floating IP successfully deleted in VSD") # Releasing acquired public IP self.debug("Releasing the acquired public IP...") test_public_ip.delete(self.api_client) with self.assertRaises(Exception): self.validate_PublicIPAddress(test_public_ip, network) self.debug("Acquired public IP in the network successfully released " "in CloudStack") self.debug("Successfully verified ingress traffic to the VM " "(SSH into VM) - %s via a created Static NAT rule in the " "VPC network - %s" % (vm, network)) # wget_from_vm_cmd - From within the given VM (ssh client), # fetches index.html file of web server running with the given public IP def wget_from_vm_cmd(self, ssh_client, ip_address, port): wget_file = "" cmd = "rm -rf index.html*" self.execute_cmd(ssh_client, cmd) cmd = "wget --no-cache -t 1 http://" + ip_address + ":" + str(port) + \ "/" response = self.execute_cmd(ssh_client, cmd) if "200 OK" in response: self.debug("wget from a VM with http server IP address " "- %s is successful" % ip_address) # Reading the wget file cmd = "cat index.html" wget_file = self.execute_cmd(ssh_client, cmd) # Removing the wget file cmd = "rm -rf index.html*" self.execute_cmd(ssh_client, cmd) else: self.debug("Failed to wget from a VM with http server IP address " "- %s" % ip_address) return wget_file # verify_lb_wget_file - Verifies that the given wget file (index.html) # belongs to the given Internal LB rule # assigned VMs (vm array) def verify_lb_wget_file(self, wget_file, vm_array): wget_server_ip = None for vm in vm_array: for nic in vm.nic: if str(nic.ipaddress) in str(wget_file): wget_server_ip = str(nic.ipaddress) if wget_server_ip: self.debug("Verified wget file from Internal Load Balanced VMs - " "%s" % vm_array) else: self.fail("Failed to verify wget file from Internal Load Balanced " "VMs - %s" % vm_array) return wget_server_ip # validate_internallb_algorithm_traffic - Validates Internal LB algorithms # by performing multiple wget traffic tests against the given Internal LB # VM instance (source port) def validate_internallb_algorithm_traffic(self, ssh_client, source_ip, port, vm_array, algorithm): # Internal LB (wget) traffic tests iterations = 2 * len(vm_array) wget_files = [] for i in range(iterations): wget_files.append( self.wget_from_vm_cmd(ssh_client, source_ip, port)) # Verifying Internal LB (wget) traffic tests wget_servers_ip_list = [] for i in range(iterations): wget_servers_ip_list.append( self.verify_lb_wget_file(wget_files[i], vm_array)) # Validating Internal LB algorithm if algorithm == "roundrobin" or algorithm == "leastconn": for i in range(iterations): if wget_servers_ip_list.count(wget_servers_ip_list[i]) \ is not 2: self.fail("Round Robin Internal LB algorithm validation " "failed - %s" % wget_servers_ip_list) self.debug("Successfully validated Round Robin/Least connections " "Internal LB algorithm - %s" % wget_servers_ip_list) if algorithm == "source": for i in range(iterations): if wget_servers_ip_list.count(wget_servers_ip_list[i]) \ is not iterations: self.fail("Source Internal LB algorithm validation failed " "- %s" % wget_servers_ip_list) self.debug("Successfully validated Source Internal LB algorithm - " "%s" % wget_servers_ip_list) @attr(tags=["advanced", "nuagevsp"], required_hardware="false") def test_01_nuage_internallb_vpc_Offering(self): """Test Nuage VSP VPC Offering with different combinations of LB service providers """ # 1. Verify that the network service providers supported by Nuage VSP # for VPC Internal LB functionality are all successfully created and # enabled. # 2. Create Nuage VSP VPC offering with LB service provider as # "InternalLbVm", check if it is successfully created and enabled. # Verify that the VPC creation succeeds with this VPC offering. # 3. Create Nuage VSP VPC offering with LB service provider as # "VpcVirtualRouter", check if it is successfully created and # enabled. Verify that the VPC creation fails with this VPC offering # as Nuage VSP does not support provider "VpcVirtualRouter" for # service LB. # 4. Create Nuage VSP VPC offering with LB service provider as # "Netscaler", check if it is successfully created and enabled. # Verify that the VPC creation fails with this VPC offering as Nuage # VSP does not support provider "Netscaler" for service LB. # 5. Delete all the created objects (cleanup). self.debug("Validating network service providers supported by Nuage " "VSP for VPC Internal LB functionality") providers = ["NuageVsp", "VpcVirtualRouter", "InternalLbVm"] for provider in providers: self.validate_NetworkServiceProvider(provider, state="Enabled") # Creating VPC offerings self.debug("Creating Nuage VSP VPC offering with LB service provider " "as InternalLbVm...") vpc_off_1 = self.create_VpcOffering( self.test_data["nuagevsp"]["vpc_offering_lb"]) self.validate_VpcOffering(vpc_off_1, state="Enabled") self.debug("Creating Nuage VSP VPC offering with LB service provider " "as VpcVirtualRouter...") vpc_offering_lb = copy.deepcopy( self.test_data["nuagevsp"]["vpc_offering_lb"]) vpc_offering_lb["serviceProviderList"]["Lb"] = "VpcVirtualRouter" vpc_off_2 = self.create_VpcOffering(vpc_offering_lb) self.validate_VpcOffering(vpc_off_2, state="Enabled") self.debug("Creating Nuage VSP VPC offering with LB service provider " "as Netscaler...") vpc_offering_lb["serviceProviderList"]["Lb"] = "Netscaler" vpc_off_3 = self.create_VpcOffering(vpc_offering_lb) self.validate_VpcOffering(vpc_off_3, state="Enabled") self.debug("Creating Nuage VSP VPC offering without LB service...") vpc_off_4 = self.create_VpcOffering( self.test_data["nuagevsp"]["vpc_offering"]) self.validate_VpcOffering(vpc_off_4, state="Enabled") # Creating VPCs self.debug("Creating a VPC with LB service provider as " "InternalLbVm...") vpc_1 = self.create_Vpc(vpc_off_1, cidr='10.1.0.0/16') self.validate_Vpc(vpc_1, state="Enabled") self.debug("Creating a VPC with LB service provider as " "VpcVirtualRouter...") with self.assertRaises(Exception): self.create_Vpc(vpc_off_2, cidr='10.1.0.0/16') self.debug("Nuage VSP does not support provider VpcVirtualRouter for " "service LB for VPCs") self.debug("Creating a VPC with LB service provider as Netscaler...") with self.assertRaises(Exception): self.create_Vpc(vpc_off_3, cidr='10.1.0.0/16') self.debug("Nuage VSP does not support provider Netscaler for service " "LB for VPCs") self.debug("Creating a VPC without LB service...") vpc_2 = self.create_Vpc(vpc_off_4, cidr='10.1.0.0/16') self.validate_Vpc(vpc_2, state="Enabled") @attr(tags=["advanced", "nuagevsp"], required_hardware="false") def test_02_nuage_internallb_vpc_network_offering(self): """Test Nuage VSP VPC Network Offering with and without Internal LB service """ # 1. Create Nuage VSP VPC Network offering with LB Service Provider as # "InternalLbVm" and LB Service Capability "lbSchemes" as # "internal", check if it is successfully created and enabled. # Verify that the VPC network creation succeeds with this Network # offering. # 2. Recreate above Network offering with ispersistent False, check if # it is successfully created and enabled.Verify that the VPC network # creation fails with this Network offering as Nuage VSP does not # support non persistent VPC networks. # 3. Recreate above Network offering with conserve mode On, check if # the network offering creation failed as only networks with # conserve mode Off can belong to VPC. # 4. Create Nuage VSP VPC Network offering with LB Service Provider as # "InternalLbVm" and LB Service Capability "lbSchemes" as "public", # check if the network offering creation failed as "public" lbScheme # is not supported for LB Service Provider "InternalLbVm". # 5. Create Nuage VSP VPC Network offering without Internal LB Service, # check if it is successfully created and enabled. Verify that the # VPC network creation succeeds with this Network offering. # 6. Recreate above Network offering with ispersistent False, check if # it is successfully created and enabled. Verify that the VPC # network creation fails with this Network offering as Nuage VSP # does not support non persistent VPC networks. # 7. Recreate the above Network offering with conserve mode On, check # if the network offering creation failed as only networks with # conserve mode Off can belong to VPC. # 8. Delete all the created objects (cleanup). # Creating VPC offering self.debug("Creating Nuage VSP VPC offering with Internal LB " "service...") vpc_off = self.create_VpcOffering( self.test_data["nuagevsp"]["vpc_offering_lb"]) self.validate_VpcOffering(vpc_off, state="Enabled") # Creating VPC self.debug("Creating a VPC with Internal LB service...") vpc = self.create_Vpc(vpc_off, cidr='10.1.0.0/16') self.validate_Vpc(vpc, state="Enabled") # Creating network offerings self.debug("Creating Nuage VSP VPC Network offering with LB Service " "Provider as InternalLbVm and LB Service Capability " "lbSchemes as internal...") net_off_1 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering_internal_lb"]) self.validate_NetworkOffering(net_off_1, state="Enabled") self.debug("Recreating above Network offering with ispersistent " "False...") vpc_net_off_lb_non_persistent = copy.deepcopy( self.test_data["nuagevsp"]["vpc_network_offering_internal_lb"]) vpc_net_off_lb_non_persistent["ispersistent"] = "False" net_off_2 = self.create_NetworkOffering(vpc_net_off_lb_non_persistent) self.validate_NetworkOffering(net_off_2, state="Enabled") self.debug("Recreating above Network offering with conserve mode " "On...") with self.assertRaises(Exception): self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering_internal_lb"], conserve_mode=True) self.debug("Network offering creation failed as only networks with " "conserve mode Off can belong to VPC") self.debug("Creating Nuage VSP VPC Network offering with LB Service " "Provider as InternalLbVm and LB Service Capability " "lbSchemes as public...") network_offering_internal_lb = copy.deepcopy( self.test_data["nuagevsp"]["vpc_network_offering_internal_lb"]) service_list = network_offering_internal_lb["serviceCapabilityList"] service_list["Lb"]["lbSchemes"] = "public" network_offering_internal_lb["serviceCapabilityList"] = service_list with self.assertRaises(Exception): self.create_NetworkOffering(network_offering_internal_lb) self.debug("Network offering creation failed as public lbScheme is " "not supported for LB Service Provider InternalLbVm") self.debug("Creating Nuage VSP VPC Network offering without Internal " "LB service...") net_off_3 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering"]) self.validate_NetworkOffering(net_off_3, state="Enabled") self.debug("Recreating above Network offering with ispersistent " "False...") vpc_net_off_non_persistent = copy.deepcopy( self.test_data["nuagevsp"]["vpc_network_offering"]) vpc_net_off_non_persistent["ispersistent"] = "False" net_off_4 = self.create_NetworkOffering(vpc_net_off_non_persistent) self.validate_NetworkOffering(net_off_4, state="Enabled") self.debug("Recreating above Network offering with conserve mode " "On...") with self.assertRaises(Exception): self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering"], conserve_mode=True) self.debug("Network offering creation failed as only networks with " "conserve mode Off can belong to VPC") # Creating VPC networks in the VPC self.debug("Creating a persistent VPC network with Internal LB " "service...") internal_tier = self.create_Network( net_off_1, gateway='10.1.1.1', vpc=vpc) self.validate_Network(internal_tier, state="Implemented") vr = self.get_Router(internal_tier) self.check_Router_state(vr, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier, vpc) self.verify_vsd_router(vr) self.debug("Creating a non persistent VPC network with Internal LB " "service...") with self.assertRaises(Exception): self.create_Network(net_off_2, gateway='10.1.2.1', vpc=vpc) self.debug("Nuage VSP does not support non persistent VPC networks") self.debug("Creating a persistent VPC network without Internal LB " "service...") public_tier = self.create_Network( net_off_3, gateway='10.1.3.1', vpc=vpc) self.validate_Network(public_tier, state="Implemented") vr = self.get_Router(public_tier) self.check_Router_state(vr, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, public_tier, vpc) self.verify_vsd_router(vr) self.debug("Creating a non persistent VPC network without Internal LB " "service...") with self.assertRaises(Exception): self.create_Network(net_off_4, gateway='10.1.4.1', vpc=vpc) self.debug("Nuage VSP does not support non persistent VPC networks") @attr(tags=["advanced", "nuagevsp"], required_hardware="false") def test_03_nuage_internallb_vpc_networks(self): """Test Nuage VSP VPC Networks with and without Internal LB service """ # 1. Create Nuage VSP VPC offering with Internal LB service, check if # it is successfully created and enabled. # 2. Create Nuage VSP VPC offering without Internal LB service, check # if it is successfully created and enabled. # 3. Create a VPC "vpc_1" with Internal LB service, check if it is # successfully created and enabled. # 4. Create a VPC "vpc_2" without Internal LB service, check if it is # successfully created and enabled. # 5. Create Nuage VSP VPC Network offering with Internal LB service, # check if it is successfully created and enabled. # 6. Create Nuage VSP VPC Network offering without Internal LB service, # check if it is successfully created and enabled. # 7. Create a VPC network in vpc_1 with Internal LB service and spawn a # VM, check if the tier is added to the VPC VR, and the VM is # deployed successfully in the tier. # 8. Create one more VPC network in vpc_1 with Internal LB service and # spawn a VM, check if the tier is added to the VPC VR, and the VM # is deployed successfully in the tier. # 9. Create a VPC network in vpc_2 with Internal LB service, check if # the tier creation failed. # 10. Create a VPC network in vpc_1 without Internal LB service and # spawn a VM, check if the tier is added to the VPC VR, and the VM # is deployed successfully in the tier. # 11. Create a VPC network in vpc_2 without Internal LB service and # spawn a VM, check if the tier is added to the VPC VR, and the VM # is deployed successfully in the tier. # 12. Upgrade the VPC network with Internal LB service to one with no # Internal LB service and vice-versa, check if the VPC Network # offering upgrade passed in both directions. # 13. Delete the VPC network with Internal LB service, check if the # tier is successfully deleted. # 14. Recreate the VPC network with Internal LB service, check if the # tier is successfully re-created. # 15. Delete all the created objects (cleanup). # Creating VPC offerings self.debug("Creating Nuage VSP VPC offering with Internal LB " "service...") vpc_off_1 = self.create_VpcOffering( self.test_data["nuagevsp"]["vpc_offering_lb"]) self.validate_VpcOffering(vpc_off_1, state="Enabled") self.debug("Creating Nuage VSP VPC offering without Internal LB " "service...") vpc_off_2 = self.create_VpcOffering( self.test_data["nuagevsp"]["vpc_offering"]) self.validate_VpcOffering(vpc_off_2, state="Enabled") # Creating VPCs self.debug("Creating a VPC with Internal LB service...") vpc_1 = self.create_Vpc(vpc_off_1, cidr='10.1.0.0/16') self.validate_Vpc(vpc_1, state="Enabled") self.debug("Creating a VPC without Internal LB service...") vpc_2 = self.create_Vpc(vpc_off_2, cidr='10.1.0.0/16') self.validate_Vpc(vpc_2, state="Enabled") # Creating network offerings self.debug("Creating Nuage VSP VPC Network offering with Internal LB " "service...") net_off_1 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering_internal_lb"]) self.validate_NetworkOffering(net_off_1, state="Enabled") self.debug("Creating Nuage VSP VPC Network offering without Internal " "LB service...") net_off_2 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering"]) self.validate_NetworkOffering(net_off_2, state="Enabled") # Creating VPC networks in VPCs, and deploying VMs self.debug("Creating a VPC network in vpc_1 with Internal LB " "service...") internal_tier_1 = self.create_Network( net_off_1, gateway='10.1.1.1', vpc=vpc_1) self.validate_Network(internal_tier_1, state="Implemented") vr_1 = self.get_Router(internal_tier_1) self.check_Router_state(vr_1, state="Running") self.debug("Deploying a VM in the created VPC network...") internal_vm_1 = self.create_VM(internal_tier_1) self.check_VM_state(internal_vm_1, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier_1, vpc_1) self.verify_vsd_router(vr_1) self.verify_vsd_vm(internal_vm_1) self.debug("Creating one more VPC network in vpc_1 with Internal LB " "service...") internal_tier_2 = self.create_Network( net_off_1, gateway='10.1.2.1', vpc=vpc_1) self.validate_Network(internal_tier_2, state="Implemented") vr_1 = self.get_Router(internal_tier_2) self.check_Router_state(vr_1, state="Running") self.debug("Deploying a VM in the created VPC network...") internal_vm_2 = self.create_VM(internal_tier_2) self.check_VM_state(internal_vm_2, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier_2, vpc_1) self.verify_vsd_router(vr_1) self.verify_vsd_vm(internal_vm_2) self.debug("Creating a VPC network in vpc_2 with Internal LB " "service...") with self.assertRaises(Exception): self.create_Network(net_off_1, gateway='10.1.1.1', vpc=vpc_2) self.debug("VPC Network creation failed as vpc_2 does not support " "Internal Lb service") self.debug("Creating a VPC network in vpc_1 without Internal LB " "service...") public_tier_1 = self.create_Network( net_off_2, gateway='10.1.3.1', vpc=vpc_1) self.validate_Network(public_tier_1, state="Implemented") vr_1 = self.get_Router(public_tier_1) self.check_Router_state(vr_1, state="Running") self.debug("Deploying a VM in the created VPC network...") public_vm_1 = self.create_VM(public_tier_1) self.check_VM_state(public_vm_1, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, public_tier_1, vpc_1) self.verify_vsd_router(vr_1) self.verify_vsd_vm(public_vm_1) self.debug("Creating a VPC network in vpc_2 without Internal LB " "service...") public_tier_2 = self.create_Network( net_off_2, gateway='10.1.1.1', vpc=vpc_2) self.validate_Network(public_tier_2, state="Implemented") vr_2 = self.get_Router(public_tier_2) self.check_Router_state(vr_2, state="Running") self.debug("Deploying a VM in the created VPC network...") public_vm_2 = self.create_VM(public_tier_2) self.check_VM_state(public_vm_2, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, public_tier_2, vpc_2) self.verify_vsd_router(vr_2) self.verify_vsd_vm(public_vm_2) # Upgrading a VPC network self.debug("Upgrading a VPC network with Internal LB Service to one " "without Internal LB Service...") self.upgrade_Network(net_off_2, internal_tier_2) self.validate_Network(internal_tier_2, state="Implemented") vr_1 = self.get_Router(internal_tier_2) self.check_Router_state(vr_1, state="Running") self.check_VM_state(internal_vm_2, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier_2, vpc_1) self.verify_vsd_router(vr_1) self.verify_vsd_vm(internal_vm_2) self.debug("Upgrading a VPC network without Internal LB Service to " "one with Internal LB Service...") self.upgrade_Network(net_off_1, internal_tier_2) self.validate_Network(internal_tier_2, state="Implemented") vr_1 = self.get_Router(internal_tier_2) self.check_Router_state(vr_1, state="Running") self.check_VM_state(internal_vm_2, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier_2, vpc_1) self.verify_vsd_router(vr_1) self.verify_vsd_vm(internal_vm_2) # Deleting and re-creating a VPC network self.debug("Deleting a VPC network with Internal LB Service...") self.delete_VM(internal_vm_2) self.delete_Network(internal_tier_2) with self.assertRaises(Exception): self.validate_Network(internal_tier_2) self.debug("VPC network successfully deleted in CloudStack") # VSD verification with self.assertRaises(Exception): self.verify_vsd_network(self.domain.id, internal_tier_2, vpc_1) self.debug("VPC network successfully deleted in VSD") self.debug("Recreating a VPC network with Internal LB Service...") internal_tier_2 = self.create_Network( net_off_1, gateway='10.1.2.1', vpc=vpc_1) internal_vm_2 = self.create_VM(internal_tier_2) self.validate_Network(internal_tier_2, state="Implemented") vr_1 = self.get_Router(internal_tier_2) self.check_Router_state(vr_1, state="Running") self.check_VM_state(internal_vm_2, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier_2, vpc_1) self.verify_vsd_router(vr_1) self.verify_vsd_vm(internal_vm_2) @attr(tags=["advanced", "nuagevsp"], required_hardware="false") def test_04_nuage_internallb_rules(self): """Test Nuage VSP VPC Internal LB functionality with different combinations of Internal LB rules """ # 1. Create an Internal LB Rule with source IP Address specified, check # if the Internal LB Rule is successfully created. # 2. Create an Internal LB Rule without source IP Address specified, # check if the Internal LB Rule is successfully created. # 3. Create an Internal LB Rule when the specified source IP Address is # outside the VPC network (tier) CIDR range, check if the Internal # LB Rule creation failed as the requested source IP is not in the # network's CIDR subnet. # 4. Create an Internal LB Rule when the specified source IP Address is # outside the VPC super CIDR range, check if the Internal LB Rule # creation failed as the requested source IP is not in the network's # CIDR subnet. # 5. Create an Internal LB Rule in the tier with LB service provider as # VpcInlineLbVm, check if the Internal LB Rule creation failed as # Scheme Internal is not supported by this network offering. # 6. Create multiple Internal LB Rules using different Load Balancing # source IP Addresses, check if the Internal LB Rules are # successfully created. # 7. Create multiple Internal LB Rules with different ports but using # the same Load Balancing source IP Address, check if the Internal # LB Rules are successfully created. # 8. Create multiple Internal LB Rules with same ports and using the # same Load Balancing source IP Address, check if the second # Internal LB Rule creation failed as it conflicts with the first # Internal LB rule. # 9. Attach a VM to the above created Internal LB Rules, check if the # VM is successfully attached to the Internal LB Rules. # 10. Verify the InternalLbVm deployment after successfully creating # the first Internal LB Rule and attaching a VM to it. # 11. Verify the failure of attaching a VM from a different tier to an # Internal LB Rule created on a tier. # 12. Delete the above created Internal LB Rules, check if the Internal # LB Rules are successfully deleted. # 13. Delete all the created objects (cleanup). # Creating a VPC offering self.debug("Creating Nuage VSP VPC offering with Internal LB " "service...") vpc_off = self.create_VpcOffering( self.test_data["nuagevsp"]["vpc_offering_lb"]) self.validate_VpcOffering(vpc_off, state="Enabled") # Creating a VPC self.debug("Creating a VPC with Internal LB service...") vpc = self.create_Vpc(vpc_off, cidr='10.1.0.0/16') self.validate_Vpc(vpc, state="Enabled") # Creating network offerings self.debug("Creating Nuage VSP VPC Network offering with Internal LB " "service...") net_off_1 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering_internal_lb"]) self.validate_NetworkOffering(net_off_1, state="Enabled") self.debug("Creating Nuage VSP VPC Network offering without Internal " "LB service...") net_off_2 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering"]) self.validate_NetworkOffering(net_off_2, state="Enabled") # Creating VPC networks in the VPC, and deploying VMs self.debug("Creating a VPC network with Internal LB service...") internal_tier = self.create_Network( net_off_1, gateway='10.1.1.1', vpc=vpc) self.validate_Network(internal_tier, state="Implemented") vr = self.get_Router(internal_tier) self.check_Router_state(vr, state="Running") self.debug("Deploying a VM in the created VPC network...") internal_vm = self.create_VM(internal_tier) self.check_VM_state(internal_vm, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(internal_vm) self.debug("Creating a VPC network without Internal LB service...") public_tier = self.create_Network( net_off_2, gateway='10.1.2.1', vpc=vpc) self.validate_Network(public_tier, state="Implemented") vr = self.get_Router(public_tier) self.check_Router_state(vr, state="Running") self.debug("Deploying a VM in the created VPC network...") public_vm = self.create_VM(public_tier) self.check_VM_state(public_vm, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, public_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(public_vm) # Creating Internal LB Rules self.debug("Creating an Internal LB Rule without source IP Address " "specified...") int_lb_rule = self.create_Internal_LB_Rule(internal_tier) self.validate_Internal_LB_Rule(int_lb_rule, state="Add") # Validating InternalLbVm deployment with self.assertRaises(Exception): self.check_InternalLbVm_state( internal_tier, int_lb_rule.sourceipaddress) self.debug("InternalLbVm is not deployed in the network as there are " "no VMs assigned to this Internal LB Rule") self.debug('Deleting the Internal LB Rule - %s' % int_lb_rule.name) int_lb_rule.delete(self.api_client) with self.assertRaises(Exception): self.validate_Internal_LB_Rule(int_lb_rule) self.debug("Internal LB Rule successfully deleted in CloudStack") free_source_ip = int_lb_rule.sourceipaddress self.debug("Creating an Internal LB Rule with source IP Address " "specified...") int_lb_rule = self.create_Internal_LB_Rule( internal_tier, source_ip=free_source_ip) self.validate_Internal_LB_Rule(int_lb_rule, state="Add") # Validating InternalLbVm deployment with self.assertRaises(Exception): self.check_InternalLbVm_state( internal_tier, int_lb_rule.sourceipaddress) self.debug("InternalLbVm is not deployed in the network as there are " "no VMs assigned to this Internal LB Rule") self.debug('Deleting the Internal LB Rule - %s' % int_lb_rule.name) int_lb_rule.delete(self.api_client) with self.assertRaises(Exception): self.validate_Internal_LB_Rule(int_lb_rule) self.debug("Internal LB Rule successfully deleted in CloudStack") self.debug("Creating an Internal LB Rule when the specified source IP " "Address is outside the VPC network CIDR range...") with self.assertRaises(Exception): self.create_Internal_LB_Rule(internal_tier, source_ip="10.1.1.256") self.debug("Internal LB Rule creation failed as the requested IP is " "not in the network's CIDR subnet") self.debug("Creating an Internal LB Rule when the specified source IP " "Address is outside the VPC super CIDR range...") with self.assertRaises(Exception): self.create_Internal_LB_Rule(internal_tier, source_ip="10.2.1.256") self.debug("Internal LB Rule creation failed as the requested IP is " "not in the network's CIDR subnet") self.debug("Creating an Internal LB Rule in a VPC network without " "Internal Lb service...") with self.assertRaises(Exception): self.create_Internal_LB_Rule(public_tier) self.debug("Internal LB Rule creation failed as Scheme Internal is " "not supported by this network offering") self.debug("Creating multiple Internal LB Rules using different Load " "Balancing source IP Addresses...") int_lb_rule_1 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm]) self.validate_Internal_LB_Rule( int_lb_rule_1, state="Active", vm_array=[internal_vm]) int_lb_rule_2 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm]) self.validate_Internal_LB_Rule( int_lb_rule_2, state="Active", vm_array=[internal_vm]) # Validating InternalLbVms deployment and state int_lb_vm_1 = self.get_InternalLbVm( internal_tier, int_lb_rule_1.sourceipaddress) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") int_lb_vm_2 = self.get_InternalLbVm( internal_tier, int_lb_rule_2.sourceipaddress) self.check_InternalLbVm_state( internal_tier, int_lb_rule_2.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm_1) self.verify_vsd_lb_device(int_lb_vm_2) self.debug('Removing VMs from the Internal LB Rules - %s, %s' % (int_lb_rule_1.name, int_lb_rule_2.name)) int_lb_rule_1.remove(self.api_client, vms=[internal_vm]) with self.assertRaises(Exception): self.validate_Internal_LB_Rule( int_lb_rule_1, vm_array=[internal_vm]) self.debug("VMs successfully removed from the Internal LB Rule in " "CloudStack") int_lb_rule_2.remove(self.api_client, vms=[internal_vm]) with self.assertRaises(Exception): self.validate_Internal_LB_Rule( int_lb_rule_2, vm_array=[internal_vm]) self.debug("VMs successfully removed from the Internal LB Rule in " "CloudStack") # Validating InternalLbVms state self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") self.check_InternalLbVm_state( internal_tier, int_lb_rule_2.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm_1) self.verify_vsd_lb_device(int_lb_vm_2) self.debug('Deleting the Internal LB Rules - %s, %s' % (int_lb_rule_1.name, int_lb_rule_2.name)) int_lb_rule_1.delete(self.api_client) with self.assertRaises(Exception): self.validate_Internal_LB_Rule(int_lb_rule_1) self.debug("Internal LB Rule successfully deleted in CloudStack") int_lb_rule_2.delete(self.api_client) with self.assertRaises(Exception): self.validate_Internal_LB_Rule(int_lb_rule_2) self.debug("Internal LB Rule successfully deleted in CloudStack") # Validating InternalLbVms un-deployment with self.assertRaises(Exception): self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress) self.debug("InternalLbVm successfully destroyed in CloudStack") with self.assertRaises(Exception): self.check_InternalLbVm_state( internal_tier, int_lb_rule_2.sourceipaddress) self.debug("InternalLbVm successfully destroyed in CloudStack") # VSD Verification with self.assertRaises(Exception): self.verify_vsd_lb_device(int_lb_vm_1) self.debug("InternalLbVm successfully destroyed in VSD") with self.assertRaises(Exception): self.verify_vsd_lb_device(int_lb_vm_2) self.debug("InternalLbVm successfully destroyed in VSD") self.debug("Creating multiple Internal LB Rules with different ports " "but using the same Load Balancing source IP Address...") int_lb_rule_1 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm]) self.validate_Internal_LB_Rule( int_lb_rule_1, state="Active", vm_array=[internal_vm]) int_lb_rule_2 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm], services=self.test_data["internal_lbrule_http"], source_ip=int_lb_rule_1.sourceipaddress) self.validate_Internal_LB_Rule( int_lb_rule_2, state="Active", vm_array=[internal_vm]) # Validating InternalLbVm deployment and state int_lb_vm = self.get_InternalLbVm( internal_tier, int_lb_rule_1.sourceipaddress) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) self.debug('Removing VMs from the Internal LB Rules - %s, %s' % (int_lb_rule_1.name, int_lb_rule_2.name)) int_lb_rule_1.remove(self.api_client, vms=[internal_vm]) with self.assertRaises(Exception): self.validate_Internal_LB_Rule( int_lb_rule_1, vm_array=[internal_vm]) self.debug("VMs successfully removed from the Internal LB Rule in " "CloudStack") int_lb_rule_2.remove(self.api_client, vms=[internal_vm]) with self.assertRaises(Exception): self.validate_Internal_LB_Rule( int_lb_rule_2, vm_array=[internal_vm]) self.debug("VMs successfully removed from the Internal LB Rule in " "CloudStack") # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) self.debug('Deleting the Internal LB Rules - %s, %s' % (int_lb_rule_1.name, int_lb_rule_2.name)) int_lb_rule_1.delete(self.api_client) with self.assertRaises(Exception): self.validate_Internal_LB_Rule(int_lb_rule_1) self.debug("Internal LB Rule successfully deleted in CloudStack") int_lb_rule_2.delete(self.api_client) with self.assertRaises(Exception): self.validate_Internal_LB_Rule(int_lb_rule_2) self.debug("Internal LB Rule successfully deleted in CloudStack") # Validating InternalLbVm un-deployment with self.assertRaises(Exception): self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress) self.debug("InternalLbVm successfully destroyed in CloudStack") # VSD Verification with self.assertRaises(Exception): self.verify_vsd_lb_device(int_lb_vm) self.debug("InternalLbVm successfully destroyed in VSD") self.debug("Creating multiple Internal LB Rules with same ports and " "using the same Load Balancing source IP Address...") int_lb_rule = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm]) self.validate_Internal_LB_Rule( int_lb_rule, state="Active", vm_array=[internal_vm]) with self.assertRaises(Exception): self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm], source_ip=int_lb_rule.sourceipaddress) self.debug("Internal LB Rule creation failed as it conflicts with the " "existing rule") # Validating InternalLbVm deployment and state int_lb_vm = self.get_InternalLbVm( internal_tier, int_lb_rule.sourceipaddress) self.check_InternalLbVm_state( internal_tier, int_lb_rule.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) self.debug('Removing VMs from the Internal LB Rule - %s' % int_lb_rule.name) int_lb_rule.remove(self.api_client, vms=[internal_vm]) with self.assertRaises(Exception): self.validate_Internal_LB_Rule(int_lb_rule, vm_array=[internal_vm]) self.debug("VMs successfully removed from the Internal LB Rule in " "CloudStack") # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier, int_lb_rule.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) self.debug('Deleting the Internal LB Rule - %s' % int_lb_rule.name) int_lb_rule.delete(self.api_client) with self.assertRaises(Exception): self.validate_Internal_LB_Rule(int_lb_rule) self.debug("Internal LB Rule successfully deleted in CloudStack") # Validating InternalLbVm un-deployment with self.assertRaises(Exception): self.check_InternalLbVm_state( internal_tier, int_lb_rule.sourceipaddress) self.debug("InternalLbVm successfully destroyed in CloudStack") # VSD Verification with self.assertRaises(Exception): self.verify_vsd_lb_device(int_lb_vm) self.debug("InternalLbVm successfully destroyed in VSD") self.debug("Attaching a VM from a different tier to an Internal LB " "Rule created on a tier...") with self.assertRaises(Exception): self.create_Internal_LB_Rule(internal_tier, vm_array=[public_vm]) self.debug("Internal LB Rule creation failed as the VM belongs to a " "different network") @attr(tags=["advanced", "nuagevsp"], required_hardware="true") def test_05_nuage_internallb_traffic(self): """Test Nuage VSP VPC Internal LB functionality by performing (wget) traffic tests within a VPC """ # 1. Create three different Internal LB Rules with a single source IP # Address specified on the Internal tier, check if the Internal LB # Rules are created successfully. # 2. Attach a VM to the above created Internal LB Rules, check if the # InternalLbVm is successfully deployed in the Internal tier. # 3. Deploy two more VMs in the Internal tier, check if the VMs are # successfully deployed. # 4. Attach the newly deployed VMs to the above created Internal LB # Rules, verify the validity of the above created Internal LB Rules # over three Load Balanced VMs in the Internal tier. # 5. Create the corresponding Network ACL rules to make the created # Internal LB rules (SSH & HTTP) accessible, check if the Network # ACL rules are successfully added to the internal tier. # 6. Validate the Internal LB functionality by performing (wget) # traffic tests from a VM in the Public tier to the Internal load # balanced guest VMs in the Internal tier, using Static NAT # functionality to access (ssh) the VM on the Public tier. # 7. Verify that the InternalLbVm gets destroyed when the last Internal # LB rule is removed from the Internal tier. # 8. Repeat the above steps for one more Internal tier as well, # validate the Internal LB functionality. # 9. Delete all the created objects (cleanup). # Creating a VPC offering self.debug("Creating Nuage VSP VPC offering with Internal LB " "service...") vpc_off = self.create_VpcOffering( self.test_data["nuagevsp"]["vpc_offering_lb"]) self.validate_VpcOffering(vpc_off, state="Enabled") # Creating a VPC self.debug("Creating a VPC with Internal LB service...") vpc = self.create_Vpc(vpc_off, cidr='10.1.0.0/16') self.validate_Vpc(vpc, state="Enabled") # Creating network offerings self.debug("Creating Nuage VSP VPC Network offering with Internal LB " "service...") net_off_1 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering_internal_lb"]) self.validate_NetworkOffering(net_off_1, state="Enabled") self.debug("Creating Nuage VSP VPC Network offering without Internal " "LB service...") net_off_2 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering"]) self.validate_NetworkOffering(net_off_2, state="Enabled") # Creating VPC networks in the VPC, and deploying VMs self.debug("Creating a VPC network with Internal LB service...") internal_tier_1 = self.create_Network( net_off_1, gateway='10.1.1.1', vpc=vpc) self.validate_Network(internal_tier_1, state="Implemented") vr = self.get_Router(internal_tier_1) self.check_Router_state(vr, state="Running") self.debug("Deploying a VM in the created VPC network...") internal_vm_1 = self.create_VM(internal_tier_1) self.check_VM_state(internal_vm_1, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier_1, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(internal_vm_1) self.debug("Creating one more VPC network with Internal LB service...") internal_tier_2 = self.create_Network( net_off_1, gateway='10.1.2.1', vpc=vpc) self.validate_Network(internal_tier_2, state="Implemented") vr = self.get_Router(internal_tier_2) self.check_Router_state(vr, state="Running") self.debug("Deploying a VM in the created VPC network...") internal_vm_2 = self.create_VM(internal_tier_2) self.check_VM_state(internal_vm_2, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier_2, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(internal_vm_2) self.debug("Creating a VPC network without Internal LB service...") public_tier = self.create_Network( net_off_2, gateway='10.1.3.1', vpc=vpc) self.validate_Network(public_tier, state="Implemented") vr = self.get_Router(public_tier) self.check_Router_state(vr, state="Running") self.debug("Deploying a VM in the created VPC network...") public_vm = self.create_VM(public_tier) self.check_VM_state(public_vm, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, public_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(public_vm) # Creating Internal LB Rules in the Internal tiers self.debug("Creating three Internal LB Rules (SSH & HTTP) using the " "same Load Balancing source IP Address...") int_lb_rule_1 = self.create_Internal_LB_Rule( internal_tier_1, vm_array=[internal_vm_1]) self.validate_Internal_LB_Rule( int_lb_rule_1, state="Active", vm_array=[internal_vm_1]) int_lb_rule_2 = self.create_Internal_LB_Rule( internal_tier_1, vm_array=[internal_vm_1], services=self.test_data["internal_lbrule_http"], source_ip=int_lb_rule_1.sourceipaddress) self.validate_Internal_LB_Rule( int_lb_rule_2, state="Active", vm_array=[internal_vm_1]) internal_lbrule_http = copy.deepcopy( self.test_data["internal_lbrule_http"]) internal_lbrule_http["sourceport"] = 8080 internal_lbrule_http["instanceport"] = 8080 int_lb_rule_3 = self.create_Internal_LB_Rule( internal_tier_1, vm_array=[internal_vm_1], services=internal_lbrule_http, source_ip=int_lb_rule_1.sourceipaddress) self.validate_Internal_LB_Rule( int_lb_rule_3, state="Active", vm_array=[internal_vm_1]) # Validating InternalLbVm deployment and state int_lb_vm_1 = self.get_InternalLbVm( internal_tier_1, int_lb_rule_1.sourceipaddress) self.check_InternalLbVm_state( internal_tier_1, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm_1) # Deploying more VMs in the Internal tier self.debug("Deploying two more VMs in network - %s" % internal_tier_1.name) internal_vm_1_1 = self.create_VM(internal_tier_1) internal_vm_1_2 = self.create_VM(internal_tier_1) # VSD verification self.verify_vsd_vm(internal_vm_1_1) self.verify_vsd_vm(internal_vm_1_2) # Adding newly deployed VMs to the created Internal LB rules self.debug("Adding two more virtual machines to the created Internal " "LB rules...") int_lb_rule_1.assign( self.api_client, [internal_vm_1_1, internal_vm_1_2]) self.validate_Internal_LB_Rule( int_lb_rule_1, state="Active", vm_array=[internal_vm_1, internal_vm_1_1, internal_vm_1_2]) int_lb_rule_2.assign( self.api_client, [internal_vm_1_1, internal_vm_1_2]) self.validate_Internal_LB_Rule( int_lb_rule_2, state="Active", vm_array=[internal_vm_1, internal_vm_1_1, internal_vm_1_2]) int_lb_rule_3.assign( self.api_client, [internal_vm_1_1, internal_vm_1_2]) self.validate_Internal_LB_Rule( int_lb_rule_3, state="Active", vm_array=[internal_vm_1, internal_vm_1_1, internal_vm_1_2]) # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier_1, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm_1) # Adding Network ACL rules in the Internal tier self.debug("Adding Network ACL rules to make the created Internal LB " "rules (HTTP) accessible...") http_rule_1 = self.create_NetworkAclRule( self.test_data["http_rule"], network=internal_tier_1) http_rule = copy.deepcopy(self.test_data["http_rule"]) http_rule["privateport"] = 8080 http_rule["publicport"] = 8080 http_rule["startport"] = 8080 http_rule["endport"] = 8080 http_rule_2 = self.create_NetworkAclRule( http_rule, network=internal_tier_1) # VSD verification self.verify_vsd_firewall_rule(http_rule_1) self.verify_vsd_firewall_rule(http_rule_2) # Creating Internal LB Rules in the Internal tier self.debug("Creating three Internal LB Rules (SSH & HTTP) using the " "same Load Balancing source IP Address...") int_lb_rule_4 = self.create_Internal_LB_Rule( internal_tier_2, vm_array=[internal_vm_2]) self.validate_Internal_LB_Rule( int_lb_rule_4, state="Active", vm_array=[internal_vm_2]) int_lb_rule_5 = self.create_Internal_LB_Rule( internal_tier_2, vm_array=[internal_vm_2], services=self.test_data["internal_lbrule_http"], source_ip=int_lb_rule_4.sourceipaddress) self.validate_Internal_LB_Rule( int_lb_rule_5, state="Active", vm_array=[internal_vm_2]) int_lb_rule_6 = self.create_Internal_LB_Rule( internal_tier_2, vm_array=[internal_vm_2], services=internal_lbrule_http, source_ip=int_lb_rule_4.sourceipaddress) self.validate_Internal_LB_Rule( int_lb_rule_6, state="Active", vm_array=[internal_vm_2]) # Validating InternalLbVm deployment and state int_lb_vm_2 = self.get_InternalLbVm( internal_tier_2, int_lb_rule_4.sourceipaddress) self.check_InternalLbVm_state( internal_tier_2, int_lb_rule_4.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm_2) # Deploying more VMs in the Internal tier self.debug("Deploying two more VMs in network - %s" % internal_tier_2.name) internal_vm_2_1 = self.create_VM(internal_tier_2) internal_vm_2_2 = self.create_VM(internal_tier_2) # VSD verification self.verify_vsd_vm(internal_vm_2_1) self.verify_vsd_vm(internal_vm_2_2) # Adding newly deployed VMs to the created Internal LB rules self.debug("Adding two more virtual machines to the created Internal " "LB rules...") int_lb_rule_4.assign( self.api_client, [internal_vm_2_1, internal_vm_2_2]) self.validate_Internal_LB_Rule( int_lb_rule_4, state="Active", vm_array=[internal_vm_2, internal_vm_2_1, internal_vm_2_2]) int_lb_rule_5.assign( self.api_client, [internal_vm_2_1, internal_vm_2_2]) self.validate_Internal_LB_Rule( int_lb_rule_5, state="Active", vm_array=[internal_vm_2, internal_vm_2_1, internal_vm_2_2]) int_lb_rule_6.assign( self.api_client, [internal_vm_2_1, internal_vm_2_2]) self.validate_Internal_LB_Rule( int_lb_rule_6, state="Active", vm_array=[internal_vm_2, internal_vm_2_1, internal_vm_2_2]) # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier_2, int_lb_rule_4.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm_2) # Adding Network ACL rules in the Internal tier self.debug("Adding Network ACL rules to make the created Internal LB " "rules (HTTP) accessible...") http_rule_1 = self.create_NetworkAclRule( self.test_data["http_rule"], network=internal_tier_2) http_rule_2 = self.create_NetworkAclRule( http_rule, network=internal_tier_2) # VSD verification self.verify_vsd_firewall_rule(http_rule_1) self.verify_vsd_firewall_rule(http_rule_2) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic( internal_vm_1, internal_tier_1, vpc) self.verify_vpc_vm_ingress_traffic( internal_vm_1_1, internal_tier_1, vpc) self.verify_vpc_vm_ingress_traffic( internal_vm_1_2, internal_tier_1, vpc) self.verify_vpc_vm_ingress_traffic( internal_vm_2, internal_tier_2, vpc) self.verify_vpc_vm_ingress_traffic( internal_vm_2_1, internal_tier_2, vpc) self.verify_vpc_vm_ingress_traffic( internal_vm_2_2, internal_tier_2, vpc) # Creating Static NAT rule for the VM in the Public tier public_ip = self.acquire_PublicIPAddress(public_tier, vpc) self.validate_PublicIPAddress(public_ip, public_tier) self.create_StaticNatRule_For_VM(public_vm, public_ip, public_tier) self.validate_PublicIPAddress( public_ip, public_tier, static_nat=True, vm=public_vm) # VSD verification self.verify_vsd_floating_ip( public_tier, public_vm, public_ip.ipaddress, vpc) # Adding Network ACL rule in the Public tier self.debug("Adding Network ACL rule to make the created NAT rule " "(SSH) accessible...") public_ssh_rule = self.create_NetworkAclRule( self.test_data["ingress_rule"], network=public_tier) # VSD verification self.verify_vsd_firewall_rule(public_ssh_rule) # Internal LB (wget) traffic tests ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file_1 = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file_2 = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, http_rule["publicport"]) ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file_3 = self.wget_from_vm_cmd( ssh_client, int_lb_rule_4.sourceipaddress, self.test_data["http_rule"]["publicport"]) ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file_4 = self.wget_from_vm_cmd( ssh_client, int_lb_rule_4.sourceipaddress, http_rule["publicport"]) # Verifying Internal LB (wget) traffic tests self.verify_lb_wget_file( wget_file_1, [internal_vm_1, internal_vm_1_1, internal_vm_1_2]) self.verify_lb_wget_file( wget_file_2, [internal_vm_1, internal_vm_1_1, internal_vm_1_2]) self.verify_lb_wget_file( wget_file_3, [internal_vm_2, internal_vm_2_1, internal_vm_2_2]) self.verify_lb_wget_file( wget_file_4, [internal_vm_2, internal_vm_2_1, internal_vm_2_2]) @attr(tags=["advanced", "nuagevsp"], required_hardware="true") def test_06_nuage_internallb_algorithms_traffic(self): """Test Nuage VSP VPC Internal LB functionality with different LB algorithms by performing (wget) traffic tests within a VPC """ # Repeat the tests in the testcase "test_05_nuage_internallb_traffic" # with different Internal LB algorithms: # 1. Round Robin # 2. Least connections # 3. Source # Verify the above Internal LB algorithms by performing multiple (wget) # traffic tests within a VPC. # Delete all the created objects (cleanup). # Creating a VPC offering self.debug("Creating Nuage VSP VPC offering with Internal LB " "service...") vpc_off = self.create_VpcOffering( self.test_data["nuagevsp"]["vpc_offering_lb"]) self.validate_VpcOffering(vpc_off, state="Enabled") # Creating a VPC self.debug("Creating a VPC with Internal LB service...") vpc = self.create_Vpc(vpc_off, cidr='10.1.0.0/16') self.validate_Vpc(vpc, state="Enabled") # Creating network offerings self.debug("Creating Nuage VSP VPC Network offering with Internal LB " "service...") net_off_1 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering_internal_lb"]) self.validate_NetworkOffering(net_off_1, state="Enabled") self.debug("Creating Nuage VSP VPC Network offering without Internal " "LB service...") net_off_2 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering"]) self.validate_NetworkOffering(net_off_2, state="Enabled") # Creating VPC networks in the VPC, and deploying VMs self.debug("Creating a VPC network with Internal LB service...") internal_tier = self.create_Network( net_off_1, gateway='10.1.1.1', vpc=vpc) self.validate_Network(internal_tier, state="Implemented") vr = self.get_Router(internal_tier) self.check_Router_state(vr, state="Running") self.debug("Deploying a VM in the created VPC network...") internal_vm = self.create_VM(internal_tier) self.check_VM_state(internal_vm, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(internal_vm) self.debug("Creating a VPC network without Internal LB service...") public_tier = self.create_Network( net_off_2, gateway='10.1.2.1', vpc=vpc) self.validate_Network(public_tier, state="Implemented") vr = self.get_Router(public_tier) self.check_Router_state(vr, state="Running") self.debug("Deploying a VM in the created VPC network...") public_vm = self.create_VM(public_tier) self.check_VM_state(public_vm, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, public_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(public_vm) # Creating Internal LB Rules in the Internal tier with Round Robin # Algorithm self.debug("Creating two Internal LB Rules (SSH & HTTP) with Round " "Robin Algorithm...") int_lb_rule_1 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm]) self.validate_Internal_LB_Rule( int_lb_rule_1, state="Active", vm_array=[internal_vm]) int_lb_rule_2 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm], services=self.test_data["internal_lbrule_http"], source_ip=int_lb_rule_1.sourceipaddress) self.validate_Internal_LB_Rule( int_lb_rule_2, state="Active", vm_array=[internal_vm]) # Validating InternalLbVm deployment and state int_lb_vm_1 = self.get_InternalLbVm( internal_tier, int_lb_rule_1.sourceipaddress) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm_1) # Deploying more VMs in the Internal tier self.debug("Deploying two more VMs in network - %s" % internal_tier.name) internal_vm_1 = self.create_VM(internal_tier) internal_vm_2 = self.create_VM(internal_tier) # VSD verification self.verify_vsd_vm(internal_vm_1) self.verify_vsd_vm(internal_vm_2) # Adding newly deployed VMs to the created Internal LB rules self.debug("Adding two more virtual machines to the created Internal " "LB rules...") int_lb_rule_1.assign(self.api_client, [internal_vm_1, internal_vm_2]) self.validate_Internal_LB_Rule( int_lb_rule_1, state="Active", vm_array=[internal_vm, internal_vm_1, internal_vm_2]) int_lb_rule_2.assign(self.api_client, [internal_vm_1, internal_vm_2]) self.validate_Internal_LB_Rule( int_lb_rule_2, state="Active", vm_array=[internal_vm, internal_vm_1, internal_vm_2]) # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm_1) # Creating Internal LB Rules in the Internal tier with Least # connections Algorithm self.debug("Creating two Internal LB Rules (SSH & HTTP) with Least " "connections Algorithm...") self.test_data["internal_lbrule"]["algorithm"] = "leastconn" int_lb_rule_3 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm, internal_vm_1, internal_vm_2], services=self.test_data["internal_lbrule"]) self.validate_Internal_LB_Rule( int_lb_rule_3, state="Active", vm_array=[internal_vm, internal_vm_1, internal_vm_2]) self.test_data["internal_lbrule_http"]["algorithm"] = "leastconn" int_lb_rule_4 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm, internal_vm_1, internal_vm_2], services=self.test_data["internal_lbrule_http"], source_ip=int_lb_rule_3.sourceipaddress) self.validate_Internal_LB_Rule( int_lb_rule_4, state="Active", vm_array=[internal_vm, internal_vm_1, internal_vm_2]) # Validating InternalLbVm deployment and state int_lb_vm_2 = self.get_InternalLbVm( internal_tier, int_lb_rule_3.sourceipaddress) self.check_InternalLbVm_state( internal_tier, int_lb_rule_3.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm_2) # Creating Internal LB Rules in the Internal tier with Source Algorithm self.debug("Creating two Internal LB Rules (SSH & HTTP) with Source " "Algorithm...") self.test_data["internal_lbrule"]["algorithm"] = "source" int_lb_rule_5 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm, internal_vm_1, internal_vm_2], services=self.test_data["internal_lbrule"]) self.validate_Internal_LB_Rule( int_lb_rule_5, state="Active", vm_array=[internal_vm, internal_vm_1, internal_vm_2]) self.test_data["internal_lbrule_http"]["algorithm"] = "source" int_lb_rule_6 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm, internal_vm_1, internal_vm_2], services=self.test_data["internal_lbrule_http"], source_ip=int_lb_rule_5.sourceipaddress) self.validate_Internal_LB_Rule( int_lb_rule_6, state="Active", vm_array=[internal_vm, internal_vm_1, internal_vm_2]) # Validating InternalLbVm deployment and state int_lb_vm_3 = self.get_InternalLbVm( internal_tier, int_lb_rule_5.sourceipaddress) self.check_InternalLbVm_state( internal_tier, int_lb_rule_5.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm_3) # Adding Network ACL rules in the Internal tier self.debug("Adding Network ACL rules to make the created Internal LB " "rules (HTTP) accessible...") http_rule = self.create_NetworkAclRule( self.test_data["http_rule"], network=internal_tier) # VSD verification self.verify_vsd_firewall_rule(http_rule) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Creating Static NAT rule for the VM in the Public tier public_ip = self.acquire_PublicIPAddress(public_tier, vpc) self.validate_PublicIPAddress(public_ip, public_tier) self.create_StaticNatRule_For_VM(public_vm, public_ip, public_tier) self.validate_PublicIPAddress( public_ip, public_tier, static_nat=True, vm=public_vm) # VSD verification self.verify_vsd_floating_ip( public_tier, public_vm, public_ip.ipaddress, vpc) # Adding Network ACL rule in the Public tier self.debug("Adding Network ACL rule to make the created NAT rule " "(SSH) accessible...") public_ssh_rule = self.create_NetworkAclRule( self.test_data["ingress_rule"], network=public_tier) # VSD verification self.verify_vsd_firewall_rule(public_ssh_rule) # Internal LB (wget) traffic tests with Round Robin Algorithm ssh_client = self.ssh_into_VM(public_vm, public_ip) self.validate_internallb_algorithm_traffic( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"], [internal_vm, internal_vm_1, internal_vm_2], "roundrobin") # Internal LB (wget) traffic tests with Least connections Algorithm ssh_client = self.ssh_into_VM(public_vm, public_ip) self.validate_internallb_algorithm_traffic( ssh_client, int_lb_rule_3.sourceipaddress, self.test_data["http_rule"]["publicport"], [internal_vm, internal_vm_1, internal_vm_2], "leastconn") # Internal LB (wget) traffic tests with Source Algorithm ssh_client = self.ssh_into_VM(public_vm, public_ip) self.validate_internallb_algorithm_traffic( ssh_client, int_lb_rule_5.sourceipaddress, self.test_data["http_rule"]["publicport"], [internal_vm, internal_vm_1, internal_vm_2], "source") @attr(tags=["advanced", "nuagevsp"], required_hardware="true") def test_07_nuage_internallb_vpc_network_restarts_traffic(self): """Test Nuage VSP VPC Internal LB functionality with restarts of VPC network components by performing (wget) traffic tests within a VPC """ # Repeat the tests in the testcase "test_05_nuage_internallb_traffic" # with restarts of VPC networks (tiers): # 1. Restart tier with InternalLbVm (cleanup = false), verify that the # InternalLbVm gets destroyed and deployed again in the Internal # tier. # 2. Restart tier with InternalLbVm (cleanup = true), verify that the # InternalLbVm gets destroyed and deployed again in the Internal # tier. # 3. Restart tier without InternalLbVm (cleanup = false), verify that # this restart has no effect on the InternalLbVm functionality. # 4. Restart tier without InternalLbVm (cleanup = true), verify that # this restart has no effect on the InternalLbVm functionality. # 5. Stop all the VMs configured with InternalLbVm, verify that the # InternalLbVm gets destroyed in the Internal tier. # 6. Start all the VMs configured with InternalLbVm, verify that the # InternalLbVm gets deployed again in the Internal tier. # 7. Restart VPC (cleanup = false), verify that the VPC VR gets # rebooted and this restart has no effect on the InternalLbVm # functionality. # 7. Restart VPC (cleanup = true), verify that the VPC VR gets rebooted # and this restart has no effect on the InternalLbVm functionality. # Verify the above restarts of VPC networks (tiers) by performing # (wget) traffic tests within a VPC. # Delete all the created objects (cleanup). # Creating a VPC offering self.debug("Creating Nuage VSP VPC offering with Internal LB " "service...") vpc_off = self.create_VpcOffering( self.test_data["nuagevsp"]["vpc_offering_lb"]) self.validate_VpcOffering(vpc_off, state="Enabled") # Creating a VPC self.debug("Creating a VPC with Internal LB service...") vpc = self.create_Vpc(vpc_off, cidr='10.1.0.0/16') self.validate_Vpc(vpc, state="Enabled") # Creating network offerings self.debug("Creating Nuage VSP VPC Network offering with Internal LB " "service...") net_off_1 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering_internal_lb"]) self.validate_NetworkOffering(net_off_1, state="Enabled") self.debug("Creating Nuage VSP VPC Network offering without Internal " "LB service...") net_off_2 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering"]) self.validate_NetworkOffering(net_off_2, state="Enabled") # Creating VPC networks in the VPC, and deploying VMs self.debug("Creating a VPC network with Internal LB service...") internal_tier = self.create_Network( net_off_1, gateway='10.1.1.1', vpc=vpc) self.validate_Network(internal_tier, state="Implemented") vr = self.get_Router(internal_tier) self.check_Router_state(vr, state="Running") self.debug("Deploying a VM in the created VPC network...") internal_vm = self.create_VM(internal_tier) self.check_VM_state(internal_vm, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(internal_vm) self.debug("Creating a VPC network without Internal LB service...") public_tier = self.create_Network( net_off_2, gateway='10.1.2.1', vpc=vpc) self.validate_Network(public_tier, state="Implemented") vr = self.get_Router(public_tier) self.check_Router_state(vr, state="Running") self.debug("Deploying a VM in the created VPC network...") public_vm = self.create_VM(public_tier) self.check_VM_state(public_vm, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, public_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(public_vm) # Creating Internal LB Rules in the Internal tier self.debug("Creating two Internal LB Rules (SSH & HTTP) using the " "same Load Balancing source IP Address...") int_lb_rule_1 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm]) self.validate_Internal_LB_Rule( int_lb_rule_1, state="Active", vm_array=[internal_vm]) int_lb_rule_2 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm], services=self.test_data["internal_lbrule_http"], source_ip=int_lb_rule_1.sourceipaddress) self.validate_Internal_LB_Rule( int_lb_rule_2, state="Active", vm_array=[internal_vm]) # Validating InternalLbVm deployment and state int_lb_vm = self.get_InternalLbVm( internal_tier, int_lb_rule_1.sourceipaddress) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Deploying more VMs in the Internal tier self.debug("Deploying two more VMs in network - %s" % internal_tier.name) internal_vm_1 = self.create_VM(internal_tier) internal_vm_2 = self.create_VM(internal_tier) # VSD verification self.verify_vsd_vm(internal_vm_1) self.verify_vsd_vm(internal_vm_2) # Adding newly deployed VMs to the created Internal LB rules self.debug("Adding two more virtual machines to the created Internal " "LB rules...") int_lb_rule_1.assign(self.api_client, [internal_vm_1, internal_vm_2]) self.validate_Internal_LB_Rule( int_lb_rule_1, state="Active", vm_array=[internal_vm, internal_vm_1, internal_vm_2]) int_lb_rule_2.assign(self.api_client, [internal_vm_1, internal_vm_2]) self.validate_Internal_LB_Rule( int_lb_rule_2, state="Active", vm_array=[internal_vm, internal_vm_1, internal_vm_2]) # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Adding Network ACL rules in the Internal tier self.debug("Adding Network ACL rules to make the created Internal LB " "rules (HTTP) accessible...") http_rule = self.create_NetworkAclRule( self.test_data["http_rule"], network=internal_tier) # VSD verification self.verify_vsd_firewall_rule(http_rule) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Creating Static NAT rule for the VM in the Public tier public_ip = self.acquire_PublicIPAddress(public_tier, vpc) self.validate_PublicIPAddress(public_ip, public_tier) self.create_StaticNatRule_For_VM(public_vm, public_ip, public_tier) self.validate_PublicIPAddress( public_ip, public_tier, static_nat=True, vm=public_vm) # VSD verification self.verify_vsd_floating_ip( public_tier, public_vm, public_ip.ipaddress, vpc) # Adding Network ACL rule in the Public tier self.debug("Adding Network ACL rule to make the created NAT rule " "(SSH) accessible...") public_ssh_rule = self.create_NetworkAclRule( self.test_data["ingress_rule"], network=public_tier) # VSD verification self.verify_vsd_firewall_rule(public_ssh_rule) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) # Restart Internal tier (cleanup = false) # InternalLbVm gets destroyed and deployed again in the Internal tier self.debug("Restarting the Internal tier without cleanup...") Network.restart(internal_tier, self.api_client, cleanup=False) self.validate_Network(internal_tier, state="Implemented") self.check_Router_state(vr, state="Running") self.check_VM_state(internal_vm, state="Running") self.check_VM_state(internal_vm_1, state="Running") self.check_VM_state(internal_vm_2, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(internal_vm) self.verify_vsd_vm(internal_vm_1) self.verify_vsd_vm(internal_vm_2) self.verify_vsd_firewall_rule(http_rule) # Validating InternalLbVm state # InternalLbVm gets destroyed and deployed again in the Internal tier int_lb_vm = self.get_InternalLbVm( internal_tier, int_lb_rule_1.sourceipaddress) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) # Restart Internal tier (cleanup = true) # InternalLbVm gets destroyed and deployed again in the Internal tier self.debug("Restarting the Internal tier with cleanup...") Network.restart(internal_tier, self.api_client, cleanup=True) self.validate_Network(internal_tier, state="Implemented") self.check_Router_state(vr, state="Running") self.check_VM_state(internal_vm, state="Running") self.check_VM_state(internal_vm_1, state="Running") self.check_VM_state(internal_vm_2, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(internal_vm) self.verify_vsd_vm(internal_vm_1) self.verify_vsd_vm(internal_vm_2) self.verify_vsd_firewall_rule(http_rule) # Validating InternalLbVm state # InternalLbVm gets destroyed and deployed again in the Internal tier int_lb_vm = self.get_InternalLbVm( internal_tier, int_lb_rule_1.sourceipaddress) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) # Restart Public tier (cleanup = false) # This restart has no effect on the InternalLbVm functionality self.debug("Restarting the Public tier without cleanup...") Network.restart(public_tier, self.api_client, cleanup=False) self.validate_Network(public_tier, state="Implemented") self.check_Router_state(vr, state="Running") self.check_VM_state(public_vm, state="Running") self.validate_PublicIPAddress( public_ip, public_tier, static_nat=True, vm=public_vm) # VSD verification self.verify_vsd_network(self.domain.id, public_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(public_vm) self.verify_vsd_floating_ip( public_tier, public_vm, public_ip.ipaddress, vpc) self.verify_vsd_firewall_rule(public_ssh_rule) # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) # Restart Public tier (cleanup = true) # This restart has no effect on the InternalLbVm functionality self.debug("Restarting the Public tier with cleanup...") Network.restart(public_tier, self.api_client, cleanup=True) self.validate_Network(public_tier, state="Implemented") self.check_Router_state(vr, state="Running") self.check_VM_state(public_vm, state="Running") self.validate_PublicIPAddress( public_ip, public_tier, static_nat=True, vm=public_vm) # VSD verification self.verify_vsd_network(self.domain.id, public_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(public_vm) self.verify_vsd_floating_ip( public_tier, public_vm, public_ip.ipaddress, vpc) self.verify_vsd_firewall_rule(public_ssh_rule) # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) # Stopping VMs in the Internal tier # wget traffic test fails as all the VMs in the Internal tier are in # stopped state self.debug("Stopping all the VMs in the Internal tier...") internal_vm.stop(self.api_client) internal_vm_1.stop(self.api_client) internal_vm_2.stop(self.api_client) self.validate_Network(internal_tier, state="Implemented") self.check_Router_state(vr, state="Running") self.check_VM_state(internal_vm, state="Stopped") self.check_VM_state(internal_vm_1, state="Stopped") self.check_VM_state(internal_vm_2, state="Stopped") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(internal_vm, stopped=True) self.verify_vsd_vm(internal_vm_1, stopped=True) self.verify_vsd_vm(internal_vm_2, stopped=True) self.verify_vsd_firewall_rule(http_rule) # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test with self.assertRaises(Exception): self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) self.debug("Failed to wget file as all the VMs in the Internal tier " "are in stopped state") # Starting VMs in the Internal tier # wget traffic test succeeds as all the VMs in the Internal tier are # back in running state self.debug("Starting all the VMs in the Internal tier...") internal_vm.start(self.api_client) internal_vm_1.start(self.api_client) internal_vm_2.start(self.api_client) self.validate_Network(internal_tier, state="Implemented") self.check_Router_state(vr, state="Running") self.check_VM_state(internal_vm, state="Running") self.check_VM_state(internal_vm_1, state="Running") self.check_VM_state(internal_vm_2, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(internal_vm) self.verify_vsd_vm(internal_vm_1) self.verify_vsd_vm(internal_vm_2) self.verify_vsd_firewall_rule(http_rule) # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) tries = 0 while tries < 25: wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) if wget_file != "": break self.debug("Waiting for the InternalLbVm and all the VMs in the " "Internal tier to be fully resolved for (wget) traffic " "test...") time.sleep(60) tries += 1 # Verifying Internal LB (wget) traffic test self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) # Restarting VPC (cleanup = false) # VPC VR gets destroyed and deployed again in the VPC # This restart has no effect on the InternalLbVm functionality self.debug("Restarting the VPC without cleanup...") self.restart_Vpc(vpc, cleanup=False) self.validate_Network(public_tier, state="Implemented") self.validate_Network(internal_tier, state="Implemented") vr = self.get_Router(public_tier) self.check_Router_state(vr, state="Running") self.check_VM_state(public_vm, state="Running") self.check_VM_state(internal_vm, state="Running") self.check_VM_state(internal_vm_1, state="Running") self.check_VM_state(internal_vm_2, state="Running") self.validate_PublicIPAddress( public_ip, public_tier, static_nat=True, vm=public_vm) # VSD verification self.verify_vsd_network(self.domain.id, public_tier, vpc) self.verify_vsd_network(self.domain.id, internal_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(public_vm) self.verify_vsd_vm(internal_vm) self.verify_vsd_vm(internal_vm_1) self.verify_vsd_vm(internal_vm_2) self.verify_vsd_floating_ip( public_tier, public_vm, public_ip.ipaddress, vpc) self.verify_vsd_firewall_rule(public_ssh_rule) self.verify_vsd_firewall_rule(http_rule) # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) # Restarting VPC (cleanup = true) # VPC VR gets destroyed and deployed again in the VPC # This restart has no effect on the InternalLbVm functionality self.debug("Restarting the VPC with cleanup...") self.restart_Vpc(vpc, cleanup=True) self.validate_Network(public_tier, state="Implemented") self.validate_Network(internal_tier, state="Implemented") vr = self.get_Router(public_tier) self.check_Router_state(vr, state="Running") self.check_VM_state(public_vm, state="Running") self.check_VM_state(internal_vm, state="Running") self.check_VM_state(internal_vm_1, state="Running") self.check_VM_state(internal_vm_2, state="Running") self.validate_PublicIPAddress( public_ip, public_tier, static_nat=True, vm=public_vm) # VSD verification self.verify_vsd_network(self.domain.id, public_tier, vpc) self.verify_vsd_network(self.domain.id, internal_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(public_vm) self.verify_vsd_vm(internal_vm) self.verify_vsd_vm(internal_vm_1) self.verify_vsd_vm(internal_vm_2) self.verify_vsd_floating_ip( public_tier, public_vm, public_ip.ipaddress, vpc) self.verify_vsd_firewall_rule(public_ssh_rule) self.verify_vsd_firewall_rule(http_rule) # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) @attr(tags=["advanced", "nuagevsp"], required_hardware="true") def test_08_nuage_internallb_appliance_operations_traffic(self): """Test Nuage VSP VPC Internal LB functionality with InternalLbVm appliance operations by performing (wget) traffic tests within a VPC """ # Repeat the tests in the testcase "test_05_nuage_internallb_traffic" # with InternalLbVm appliance operations: # 1. Verify the InternalLbVm deployment by creating the Internal LB # Rules when the VPC VR is in Stopped state, VPC VR has no effect on # the InternalLbVm functionality. # 2. Stop the InternalLbVm when the VPC VR is in Stopped State # 3. Start the InternalLbVm when the VPC VR is in Stopped state # 4. Stop the InternalLbVm when the VPC VR is in Running State # 5. Start the InternalLbVm when the VPC VR is in Running state # 6. Force stop the InternalLbVm when the VPC VR is in Running State # 7. Start the InternalLbVm when the VPC VR is in Running state # Verify the above restarts of VPC networks by performing (wget) # traffic tests within a VPC. # Delete all the created objects (cleanup). # Creating a VPC offering self.debug("Creating Nuage VSP VPC offering with Internal LB " "service...") vpc_off = self.create_VpcOffering( self.test_data["nuagevsp"]["vpc_offering_lb"]) self.validate_VpcOffering(vpc_off, state="Enabled") # Creating a VPC self.debug("Creating a VPC with Internal LB service...") vpc = self.create_Vpc(vpc_off, cidr='10.1.0.0/16') self.validate_Vpc(vpc, state="Enabled") # Creating network offerings self.debug("Creating Nuage VSP VPC Network offering with Internal LB " "service...") net_off_1 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering_internal_lb"]) self.validate_NetworkOffering(net_off_1, state="Enabled") self.debug("Creating Nuage VSP VPC Network offering without Internal " "LB service...") net_off_2 = self.create_NetworkOffering( self.test_data["nuagevsp"]["vpc_network_offering"]) self.validate_NetworkOffering(net_off_2, state="Enabled") # Creating VPC networks in the VPC, and deploying VMs self.debug("Creating a VPC network with Internal LB service...") internal_tier = self.create_Network( net_off_1, gateway='10.1.1.1', vpc=vpc) self.validate_Network(internal_tier, state="Implemented") vr = self.get_Router(internal_tier) self.check_Router_state(vr, state="Running") self.debug("Deploying a VM in the created VPC network...") internal_vm = self.create_VM(internal_tier) self.check_VM_state(internal_vm, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, internal_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(internal_vm) self.debug("Creating a VPC network without Internal LB service...") public_tier = self.create_Network( net_off_2, gateway='10.1.2.1', vpc=vpc) self.validate_Network(public_tier, state="Implemented") vr = self.get_Router(public_tier) self.check_Router_state(vr, state="Running") self.debug("Deploying a VM in the created VPC network...") public_vm = self.create_VM(public_tier) self.check_VM_state(public_vm, state="Running") # VSD verification self.verify_vsd_network(self.domain.id, public_tier, vpc) self.verify_vsd_router(vr) self.verify_vsd_vm(public_vm) # Stopping the VPC VR # VPC VR has no effect on the InternalLbVm functionality Router.stop(self.api_client, id=vr.id) self.check_Router_state(vr, state="Stopped") self.validate_Network(public_tier, state="Implemented") self.validate_Network(internal_tier, state="Implemented") # VSD verification self.verify_vsd_router(vr, stopped=True) self.verify_vsd_network(self.domain.id, public_tier, vpc) self.verify_vsd_network(self.domain.id, internal_tier, vpc) # Creating Internal LB Rules in the Internal tier self.debug("Creating two Internal LB Rules (SSH & HTTP) using the " "same Load Balancing source IP Address...") int_lb_rule_1 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm]) self.validate_Internal_LB_Rule( int_lb_rule_1, state="Active", vm_array=[internal_vm]) int_lb_rule_2 = self.create_Internal_LB_Rule( internal_tier, vm_array=[internal_vm], services=self.test_data["internal_lbrule_http"], source_ip=int_lb_rule_1.sourceipaddress) self.validate_Internal_LB_Rule( int_lb_rule_2, state="Active", vm_array=[internal_vm]) # Validating InternalLbVm deployment and state int_lb_vm = self.get_InternalLbVm( internal_tier, int_lb_rule_1.sourceipaddress) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Deploying more VMs in the Internal tier self.debug("Deploying two more VMs in network - %s" % internal_tier.name) internal_vm_1 = self.create_VM(internal_tier) internal_vm_2 = self.create_VM(internal_tier) # VSD verification self.verify_vsd_vm(internal_vm_1) self.verify_vsd_vm(internal_vm_2) # Adding newly deployed VMs to the created Internal LB rules self.debug("Adding two more virtual machines to the created Internal " "LB rules...") int_lb_rule_1.assign(self.api_client, [internal_vm_1, internal_vm_2]) self.validate_Internal_LB_Rule( int_lb_rule_1, state="Active", vm_array=[internal_vm, internal_vm_1, internal_vm_2]) int_lb_rule_2.assign(self.api_client, [internal_vm_1, internal_vm_2]) self.validate_Internal_LB_Rule( int_lb_rule_2, state="Active", vm_array=[internal_vm, internal_vm_1, internal_vm_2]) # Validating InternalLbVm state self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Adding Network ACL rules in the Internal tier self.debug("Adding Network ACL rules to make the created Internal LB " "rules (HTTP) accessible...") http_rule = self.create_NetworkAclRule( self.test_data["http_rule"], network=internal_tier) # VSD verification self.verify_vsd_firewall_rule(http_rule) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Creating Static NAT rule for the VM in the Public tier public_ip = self.acquire_PublicIPAddress(public_tier, vpc) self.validate_PublicIPAddress(public_ip, public_tier) self.create_StaticNatRule_For_VM(public_vm, public_ip, public_tier) self.validate_PublicIPAddress( public_ip, public_tier, static_nat=True, vm=public_vm) # VSD verification self.verify_vsd_floating_ip( public_tier, public_vm, public_ip.ipaddress, vpc) # Adding Network ACL rule in the Public tier self.debug("Adding Network ACL rule to make the created NAT rule " "(SSH) accessible...") public_ssh_rule = self.create_NetworkAclRule( self.test_data["ingress_rule"], network=public_tier) # VSD verification self.verify_vsd_firewall_rule(public_ssh_rule) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) # # Stopping the InternalLbVm when the VPC VR is in Stopped state self.stop_InternalLbVm(int_lb_vm) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Stopped") # VSD Verification self.verify_vsd_lb_device(int_lb_vm, stopped=True) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test with self.assertRaises(Exception): self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) self.debug("Failed to wget file as the InternalLbVm is in stopped" " state") # # Starting the InternalLbVm when the VPC VR is in Stopped state self.start_InternalLbVm(int_lb_vm) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) # Starting the VPC VR # VPC VR has no effect on the InternalLbVm functionality Router.start(self.api_client, id=vr.id) self.check_Router_state(vr) self.validate_Network(public_tier, state="Implemented") self.validate_Network(internal_tier, state="Implemented") # VSD verification self.verify_vsd_router(vr) self.verify_vsd_network(self.domain.id, public_tier, vpc) self.verify_vsd_network(self.domain.id, internal_tier, vpc) # # Stopping the InternalLbVm when the VPC VR is in Running state self.stop_InternalLbVm(int_lb_vm) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Stopped") # VSD Verification self.verify_vsd_lb_device(int_lb_vm, stopped=True) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test with self.assertRaises(Exception): self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) self.debug("Failed to wget file as the InternalLbVm is in stopped" " state") # # Starting the InternalLbVm when the VPC VR is in Running state self.start_InternalLbVm(int_lb_vm) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) # # Force Stopping the InternalLbVm when the VPC VR is in Running state self.stop_InternalLbVm(int_lb_vm, force=True) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Stopped") # VSD Verification self.verify_vsd_lb_device(int_lb_vm, stopped=True) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test with self.assertRaises(Exception): self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2]) self.debug("Failed to wget file as the InternalLbVm is in stopped" " state") # # Starting the InternalLbVm when the VPC VR is in Running state self.start_InternalLbVm(int_lb_vm) self.check_InternalLbVm_state( internal_tier, int_lb_rule_1.sourceipaddress, state="Running") # VSD Verification self.verify_vsd_lb_device(int_lb_vm) # Verifying Internal Load Balanced VMs ingress traffic # (SSH into VM via Static NAT rule) self.debug("Verifying Internal Load Balanced VMs ingress traffic " "(SSH into VM via Static NAT rule)...") self.verify_vpc_vm_ingress_traffic(internal_vm, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_1, internal_tier, vpc) self.verify_vpc_vm_ingress_traffic(internal_vm_2, internal_tier, vpc) # Internal LB (wget) traffic test ssh_client = self.ssh_into_VM(public_vm, public_ip) wget_file = self.wget_from_vm_cmd( ssh_client, int_lb_rule_1.sourceipaddress, self.test_data["http_rule"]["publicport"]) # Verifying Internal LB (wget) traffic test self.verify_lb_wget_file( wget_file, [internal_vm, internal_vm_1, internal_vm_2])
resmo/cloudstack
test/integration/plugins/nuagevsp/test_nuage_vpc_internal_lb.py
Python
apache-2.0
123,514
from django.contrib import admin # Register your models here. from .models import Roles @admin.register(Roles) class RolesAdmin(admin.ModelAdmin): list_display = ('group', 'description', 'color', 'internal')
inteos/IBAdmin
roles/admin.py
Python
agpl-3.0
215
#!/usr/bin/env python # -*- coding:utf-8 -*- """ HTTP-Client通道类 通过调用管理类对象的process_data函数实现信息的发送。 """ import logging from libs.base_channel import BaseChannel logger = logging.getLogger('linkworld') class HttpClientChannel(BaseChannel): def __init__(self, network, channel_name, channel_protocol, channel_params, manager, channel_type): self.status = None BaseChannel.__init__(network, channel_name, channel_protocol, channel_params, manager, channel_type) def run(self): logger.debug("HttpClientChannel has runned.") return def isAlive(self): return True def send_cmd(self, device_info, device_cmd): pass
lianwutech/plugin_linkworld-discard-
channels/http_client.py
Python
apache-2.0
723
# Copyright 2008 German Aerospace Center (DLR) # # 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. """ This check tests if a unit test exists for a given Java class. The java class must follow the pattern /main/.../Class.java and the unit test must follow the pattern /main/.../TestClass.java. Interfaces are omitted. """ import re from repoguard.core.module import Check, ConfigSerializer, Array, String class Config(ConfigSerializer): class types(ConfigSerializer.types): check_files = Array(String, optional=True, default=[".*\.java"]) ignore_files = Array(String, optional=True, default=[]) class UnitTests(Check): __config__ = Config def _run(self, config): files = self.transaction.get_files(config.check_files, config.ignore_files) interface_pattern = re.compile("interface .* {") class_pattern = re.compile("class .* {") msg = "" for filename, attribute in files.iteritems(): if attribute in ["A", "U", "UU"] and not "/test/" in filename: # skip java interfaces skip = False file_object = open(self.transaction.get_file(filename), "r") try: for line in file_object: if interface_pattern.search(line): skip = True break elif class_pattern.search(line): break finally: file_object.close() if skip: continue unittest = filename.replace("/main/", "/test/") unittest = unittest.replace(".java", "Test.java") if not self.transaction.file_exists(unittest): msg += "No unittest exists for file %r.\n" % filename if msg: return self.error(msg) else: return self.success()
DLR-SC/RepoGuard
src/repoguard/checks/unittests.py
Python
apache-2.0
2,532
# -*- coding: UTF-8 -*- import logging import json logger = logging.getLogger("enviosms") class MessageSMS(object): def __init__(self, recipient=None, content=None, json_str=None): if json_str: data = json.loads(json_str) self._recipient = data["recipient"] self._content = data["content"] else: self._recipient = recipient self._content = content @property def recipient(self): return self._recipient @recipient.setter def recipient(self, number): self._recipient = number @property def content(self): return self._content @content.setter def content(self, content): self._content = content def to_json(self): return json.dumps({"recipient": self.recipient, "content": self.content})
cetres/enviosms
enviosms/message.py
Python
gpl-2.0
879
#!/usr/bin/env python3 from octopus.plugins.plugin import OctopusPlugin from octopus.server.orientdb.orientdb_plugin_executor import OrientDBPluginExecutor class DummyPlugin(OctopusPlugin): def __init__(self, executor): super().__init__(executor) self._pluginname = 'dummy.jar' self._classname = 'joern.plugins.dummy.DummyPlugin' def __setattr__(self, key, value): if key in ['myParameter', 'projectName']: self._settings[key] = value else: super().__setattr__(key, value) if __name__ == '__main__': server_host = 'localhost' server_port = 2480 plugin_executor = OrientDBPluginExecutor(server_host, server_port) plugin = DummyPlugin(plugin_executor) plugin.myParameter = 'hello world' plugin.projectName = 'coreutils.tar.gz' plugin.execute()
octopus-platform/joern
projects/plugins/dummy/execute_dummy.py
Python
lgpl-3.0
851
# # bignum.py # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # from __future__ import absolute_import, division, print_function, unicode_literals import struct import binascii # from app.block.utils.typeutil import num_to_uchar # generic big endian MPI format def bn_bytes(v, have_ext=False): ext = 0 if have_ext: ext = 1 return ((v.bit_length() + 7) // 8) + ext def bn2bin(v): s = bytearray() i = bn_bytes(v) while i > 0: s.append((v >> ((i - 1) * 8)) & 0xff) i -= 1 return s def bin2bn(s): l = 0 for ch in s: l = (l << 8) | ch return l def bn2mpi(v): have_ext = False if v.bit_length() > 0: have_ext = (v.bit_length() & 0x07) == 0 neg = False if v < 0: neg = True v = -v s = struct.pack(b">I", bn_bytes(v, have_ext)) ext = bytearray() if have_ext: ext.append(0) v_bin = bn2bin(v) if neg: if have_ext: ext[0] |= 0x80 else: v_bin[0] |= 0x80 return s + ext + v_bin def mpi2bn(s): if len(s) < 4: return None s_size = str(s[:4]) v_len = struct.unpack(b">I", s_size)[0] if len(s) != (v_len + 4): return None if v_len == 0: return 0 v_str = bytearray(s[4:]) neg = False i = v_str[0] if i & 0x80: neg = True i &= ~0x80 v_str[0] = i v = bin2bn(v_str) if neg: return -v return v # bitcoin-specific little endian format, with implicit size def mpi2vch(s): r = s[4:] # strip size r = r[::-1] # reverse string, converting BE->LE return r # equal to CBigNum::getvch() def bn2vch(v): assert isinstance(v, int) or isinstance(v, long), "bn2vch must convert a num" return str(mpi2vch(bn2mpi(v))) def vch2mpi(s): r = struct.pack(b">I", len(s)) # size r += s[::-1] # reverse string, converting LE->BE return r # equal CBigNum(vector<unsigned int>) def vch2bn(s): assert type(s) is str or isinstance(s, bytearray), "vch2bn must convert a str or bytearray(PyScript)" return mpi2bn(vch2mpi(s)) def num_to_uchar(n): if n < 0: n += 0xff + 1 if n > 0xff: raise RuntimeError("num must is a bytes") return struct.pack("B", n) def invert_vch(s): return bytes(bytearray([num_to_uchar(~i) for i in bytearray(s)])) def _extend_bytes(s1, s2): len1 = len(s1) len2 = len(s2) diff = len1 - len2 if diff > 0: s2 = b'\x00' * diff + s2 elif diff < 0: s1 = b'\x00' * (-diff) + s1 return s1, s2 def and_vch(s1, s2): s1, s2 = _extend_bytes(s1, s2) return bytes(bytearray([num_to_uchar(fir & sed) for fir, sed in zip(bytearray(s1), bytearray(s2))])) pass def or_vch(s1, s2): s1, s2 = _extend_bytes(s1, s2) return bytes(bytearray([num_to_uchar(fir | sed) for fir, sed in zip(bytearray(s1), bytearray(s2))])) pass def xor_vch(s1, s2): s1, s2 = _extend_bytes(s1, s2) return bytes(bytearray([num_to_uchar(fir ^ sed) for fir, sed in zip(bytearray(s1), bytearray(s2))])) pass vch_false = b'\x00' vch_zero = b'\x00' vch_true = b'\x01' # equal to CBigNum::SetCompact() # different difficulty 1 value-0x207fffff so without need for negative # def uint256_from_compact(c): # nbytes = (c >> 24) & 0xFF # # some thing wrong in this place for negative, for negative # offset = nbytes - 3 # if offset < 0: # v = (c & 0xFFFFFF) >> (-8 * offset) # else: # v = (c & 0xFFFFFF) << (8 * offset) # return v from app.base import serialize # for negative, but it don't be used no int256 # def int256_from_compact(c): # nbytes = (c >> 24) & 0xFF # # high = (c >> 16) & 0xFF # v = 0 # if c & 0x800000: # c &= 0xFF7FFFFF # v |= 1 << 255 # # if high >= 0x80: # # high = high - 0x80 # # c &= 0xff00ffff # # c |= high << 16 # # v |= 1 << 255 # offset = nbytes - 3 # if offset < 0: # v |= (c & 0xFFFFFF) >> (-8 * offset) # else: # v |= (c & 0xFFFFFF) << (8 * offset) # return v # # # def compact_from_int256(u): # negative = False # if u & (1 << 255): # negative = True # u -= (1 << 255) # s = chr_x(u, 'big') # high = int(s[0].encode('hex'), 16) # if high >= 0x80: # s = b'\00' + s # else: # if negative: # high += 0x80 # s = chr(high) + s[1:] # nbytes = len(s) # len of bytes # compact = nbytes << 24 # offset = 0 # if nbytes < 3: # offset = 3 - nbytes # compact |= int(s[:3].encode('hex'), 16) << offset * 8 # return compact # equal to CBigNum::GetCompact # def compact_from_uint256(u): # """ # # :param u: # :type u: str # :return: # """ # # if isinstance(u, int) or isinstance(u, long): # # u = serialize.ser_uint256(u) # if type(u) == PyBigNum: # u = u.getvch() # nbytes = len(u) # len of bytes # # print(nbytes) # compact = nbytes << 24 # # compact |= int(s[0].encode('hex'), 16) << 16 # # compact |= int(s[1].encode('hex'), 16) << 8 # # compact |= int(s[2].encode('hex'), 16) << 0 # offset = 0 # if nbytes < 3: # offset = 3 - nbytes # compact |= int(u[:3].encode('hex'), 16) << offset * 8 # return compact class PyBigNum(long): def __new__(cls, *args, **kwargs): if isinstance(args[0], str) or isinstance(args[0], bytearray): num = vch2bn(args[0]) else: num = args[0] return super(PyBigNum, cls).__new__(cls, num) def getvch(self): return bn2vch(self) def gethexvch(self, endian='big'): s = self.getvch() if endian == 'big': s = reversed(s) return binascii.hexlify(s).strip() # ''.join(["%02X " % ord(x) for x in s]).strip() def getint(self): return int(self) def getlong(self): return long(self) @staticmethod def set_compact(compact): size = compact >> 24 s = bytearray(4 + size) s[0:4] = serialize.ser_uint(size, endian="big") if size >= 1: s[4] = compact >> 16 & 0xFF if size >= 2: s[5] = compact >> 8 & 0xFF if size >= 3: s[6] = compact >> 0 & 0xFF ret = mpi2bn(s) return PyBigNum(ret) def get_compact(self): # compact_from_uint256(self.getvch()) v = bytes(bn2mpi(self)) # print(len(v)) size = len(v) size -= 4 compact = size << 24 if size >= 1: compact |= (struct.unpack("B", v[4])[0] << 16) if size >= 2: compact |= (struct.unpack("B", v[5])[0] << 8) if size >= 3: compact |= (struct.unpack("B", v[6])[0] << 0) return compact def get_uint256(self, out_type=None): b = bn2mpi(self) size = len(b) if size < 4: return 0 else: b[4] &= 0x7F # modify num negative n = bytearray(32) # uint256 i = 0 # 0 -> 28 for n, empty for last 4 B for j in range(size - 1, 3, -1): # 32 -> 4 for b if i >= 32: break n[i] = b[j] i += 1 if out_type == "str": return bytes(n) if out_type == "hex": return serialize.hexser_uint256(bytes(n), in_type="str") return serialize.deser_uint256(bytes(n)) pass # class uint256(str): def main(): ret = bn2vch(0x10 + 1) ret = bn2vch(1000) # ret = bn2vch(-0x1) ret = bn2vch(0xffffffffffffff) print(repr(ret)) print(type(ret)) test = b'\x01\xff\xff\x00\x64\x9c\x01' print(repr(test)) print(repr(invert_vch(test))) print(repr(_extend_bytes(b'', b''))) print(repr(_extend_bytes(b'\x12\x35\57', b''))) print(repr(_extend_bytes(b'\x12\x35\57', b'\x12\x35\57\x56\x78'))) print(repr(_extend_bytes(b'', b'\x12\x35\57\x56\x78'))) print(repr(and_vch(b'', b''))) print(repr(or_vch(b'\x12\x35\57', b''))) print(repr(xor_vch(b'\x12\x35\57', b'\x12\x35\57\x56\x78'))) print(repr(and_vch(b'', b'\x12\x35\57\x56\x78'))) print(repr(xor_vch(b'\x12\x35\57\x56\x78', b'\x12\x35\57\x56\x78'))) print("test") # print (repr(num_to_uchar(-1))) print('========bignum=========') # print(repr(BigNum(1).getvch())) # print(repr(BigNum(11111111111111111111111).getvch())) # print (BigNum(1) < BigNum(2)) n = PyBigNum(b'\x01\x01\x00') print(n) print(repr(n.getvch())) print("start") n = PyBigNum(-2 + 0xFFFFFFFF + 1) print(type(n)) n += PyBigNum(1) print(n) print(type(n)) n -= 1 print(n) print(type(n)) n = -n print(n) print(type(n)) n = abs(n) print(n) print(type(n)) n >>= 1 print(n) print(type(n)) n <<= 1 print(n) print(type(n)) print(n == 0) print(n != 0) # print(n) # print(repr(n.getvch())) # # n2 = PyBigNum(n.getvch()[:-1]) # print(n2) # print(int(n2)) # # test case from https://bitcoin.org/en/developer-reference#target-nbits # # big end # test = b"\x01\x00\x34\x56" # test = b"\x01\x12\x34\x56" # test = b"\x01\00\x00\x12" # test = b"\x02\x00\x80\x00" # test = b"\x05\x00\x92\x34" # test = b"\x04\x92\x34\x56" # test = b"\x04\x12\x34\x56" # # uint = deser_uint(StringIO.StringIO(test), 'big') # uint = num_x(test, 'big') # # small end # # test = b"\x00\x38\x03\x05" # # uint = num_x(test) # r = int256_from_compact(uint) # print("bignum:", repr(chr_x(r))) # u = compact_from_int256(r) # print('compact:%x' % u) print("#####################") _s = b'' for i in range(32): _s += b'\xff' _s = _s[:28] + b'\x00\x00\x00\x00\x00\x00\x00\x00' # _s = ~uint256(0) >> 32 proofOfWorkLimit = PyBigNum(_s) # init ret = proofOfWorkLimit.get_compact() print(ret) print(repr(struct.pack(">I", ret))) print(repr(proofOfWorkLimit.get_uint256())) # print (repr(proofOfWorkLimit.getvch())) print("#####################") n = PyBigNum.set_compact(0x1d00ffff) print (repr(serialize.ser_uint256(n))) n *= 20 * 60 print type(n) print n _s = b'' for i in range(32): _s += b'\xff' _s = _s[:30] + b'\x00\x00\x00\x00' # _s = ~uint256(0) >> 32 proofOfWorkLimit = PyBigNum(_s) # init if n > proofOfWorkLimit: print 'over' else: print 'current' print type(n) n = PyBigNum(n) print n.get_compact() n2 = PyBigNum(n) print n2 print n.get_compact() pass if __name__ == "__main__": main()
JKingdom/KingCoin
app/base/bignum.py
Python
gpl-3.0
10,858
""" .. module:: layer :platform: Windows :synopsis: Base Class from which AGOL function inherit from. .. moduleauthor:: test """ import common import filters import featureservice from base import BaseAGOLClass import os import json import math import urlparse import mimetypes import uuid ######################################################################## class FeatureLayer(BaseAGOLClass): """ This contains information about a feature service's layer. """ _objectIdField = None _allowGeometryUpdates = None _globalIdField = None _token_url = None _currentVersion = None _id = None _name = None _type = None _description = None _definitionExpression = None _geometryType = None _hasZ = None _hasM = None _copyrightText = None _parentLayer = None _subLayers = None _minScale = None _maxScale = None _effectiveMinScale = None _effectiveMaxScale = None _defaultVisibility = None _extent = None _timeInfo = None _drawingInfo = None _hasAttachments = None _htmlPopupType = None _displayField = None _typeIdField = None _fields = None _types = None # sub-types _relationships = None _maxRecordCount = None _canModifyLayer = None _supportsStatistics = None _supportsAdvancedQueries = None _hasLabels = None _canScaleSymbols = None _capabilities = None _supportedQueryFormats = None _isDataVersioned = None _ownershipBasedAccessControlForFeatures = None _useStandardizedQueries = None _templates = None _indexes = None _hasStaticData = None _supportsRollbackOnFailureParameter = None _advancedQueryCapabilities = None #---------------------------------------------------------------------- def __init__(self, url, username=None, password=None, token_url=None): """Constructor""" self._url = url self._token_url = token_url self._username = username self._password = password if not username is None and\ not password is None: if not token_url is None: self._token = self.generate_token(tokenURL=token_url)[0] else: res = self.generate_token() if res == None: raise ValueError("Unable to get token") else: self._token =res[0] self.__init() #---------------------------------------------------------------------- def __init(self): """ initializes the service """ params = { "f" : "json", } if self._token is not None: params['token'] = self._token json_dict = self._do_get(self._url, params) attributes = [attr for attr in dir(self) if not attr.startswith('__') and \ not attr.startswith('_')] for k,v in json_dict.iteritems(): if k in attributes: setattr(self, "_"+ k, json_dict[k]) else: print k, " - attribute not implmented." self._parentLayer = featureservice.FeatureService( url=os.path.dirname(self._url), token_url=self._token_url, username=self._username, password=self._password) #---------------------------------------------------------------------- @property def advancedQueryCapabilities(self): """ returns the advanced query capabilities """ if self._advancedQueryCapabilities is None: self.__init() return self._advancedQueryCapabilities #---------------------------------------------------------------------- @property def supportsRollbackOnFailureParameter(self): """ returns if rollback on failure supported """ if self._supportsRollbackOnFailureParameter is None: self.__init() return self._supportsRollbackOnFailureParameter #---------------------------------------------------------------------- @property def hasStaticData(self): """boolean T/F if static data is present """ if self._hasStaticData is None: self.__init() return self._hasStaticData #---------------------------------------------------------------------- @property def indexes(self): """gets the indexes""" if self._indexes is None: self.__init() return self._indexes #---------------------------------------------------------------------- @property def templates(self): """ gets the template """ if self._templates is None: self.__init() return self._templates #---------------------------------------------------------------------- @property def allowGeometryUpdates(self): """ returns boolean if geometry updates are allowed """ if self._allowGeometryUpdates is None: self.__init() return self._allowGeometryUpdates #---------------------------------------------------------------------- @property def globalIdField(self): """ returns the global id field """ if self._globalIdField is None: self.__init() return self._globalIdField #---------------------------------------------------------------------- @property def objectIdField(self): if self._objectIdField is None: self.__init() return self._objectIdField #---------------------------------------------------------------------- @property def currentVersion(self): """ returns the current version """ if self._currentVersion is None: self.__init() return self._currentVersion #---------------------------------------------------------------------- @property def id(self): """ returns the id """ if self._id is None: self.__init() return self._id #---------------------------------------------------------------------- @property def name(self): """ returns the name """ if self._name is None: self.__init() return self._name #---------------------------------------------------------------------- @property def type(self): """ returns the type """ if self._type is None: self.__init() return self._type #---------------------------------------------------------------------- @property def description(self): """ returns the layer's description """ if self._description is None: self.__init() return self._description #---------------------------------------------------------------------- @property def definitionExpression(self): """returns the definitionExpression""" if self._definitionExpression is None: self.__init() return self._definitionExpression #---------------------------------------------------------------------- @property def geometryType(self): """returns the geometry type""" if self._geometryType is None: self.__init() return self._geometryType #---------------------------------------------------------------------- @property def hasZ(self): """ returns if it has a Z value or not """ if self._hasZ is None: self.__init() return self._hasZ #---------------------------------------------------------------------- @property def hasM(self): """ returns if it has a m value or not """ if self._hasM is None: self.__init() return self._hasM #---------------------------------------------------------------------- @property def copyrightText(self): """ returns the copyright text """ if self._copyrightText is None: self.__init() return self._copyrightText #---------------------------------------------------------------------- @property def parentLayer(self): """ returns information about the parent """ if self._parentLayer is None: self.__init() return self._parentLayer #---------------------------------------------------------------------- @property def subLayers(self): """ returns sublayers for layer """ if self._subLayers is None: self.__init() return self._subLayers #---------------------------------------------------------------------- @property def minScale(self): """ minimum scale layer will show """ if self._minScale is None: self.__init() return self._minScale @property def maxScale(self): """ sets the max scale """ if self._maxScale is None: self.__init() return self._maxScale @property def effectiveMinScale(self): if self._effectiveMinScale is None: self.__init() return self._effectiveMinScale @property def effectiveMaxScale(self): if self._effectiveMaxScale is None: self.__init() return self._effectiveMaxScale @property def defaultVisibility(self): if self._defaultVisibility is None: self.__init() return self._defaultVisibility @property def extent(self): if self._extent is None: self.__init() return self._extent @property def timeInfo(self): if self._timeInfo is None: self.__init() return self._timeInfo @property def drawingInfo(self): if self._drawingInfo is None: self.__init() return self._drawingInfo @property def hasAttachments(self): if self._hasAttachments is None: self.__init() return self._hasAttachments @property def htmlPopupType(self): if self._htmlPopupType is None: self.__init() return self._htmlPopupType @property def displayField(self): if self._displayField is None: self.__init() return self._displayField @property def typeIdField(self): if self._typeIdField is None: self.__init() return self._typeIdField @property def fields(self): if self._fields is None: self.__init() return self._fields @property def types(self): if self._types is None: self.__init() return self._types @property def relationships(self): if self._relationships is None: self.__init() return self._relationships @property def maxRecordCount(self): if self._maxRecordCount is None: self.__init() if self._maxRecordCount is None: self._maxRecordCount = 1000 return self._maxRecordCount @property def canModifyLayer(self): if self._canModifyLayer is None: self.__init() return self._canModifyLayer @property def supportsStatistics(self): if self._supportsStatistics is None: self.__init() return self._supportsStatistics @property def supportsAdvancedQueries(self): if self._supportsAdvancedQueries is None: self.__init() return self._supportsAdvancedQueries @property def hasLabels(self): if self._hasLabels is None: self.__init() return self._hasLabels @property def canScaleSymbols(self): if self._canScaleSymbols is None: self.__init() return self._canScaleSymbols @property def capabilities(self): if self._capabilities is None: self.__init() return self._capabilities @property def supportedQueryFormats(self): if self._supportedQueryFormats is None: self.__init() return self._supportedQueryFormats @property def isDataVersioned(self): if self._isDataVersioned is None: self.__init() return self._isDataVersioned @property def ownershipBasedAccessControlForFeatures(self): if self._ownershipBasedAccessControlForFeatures is None: self.__init() return self._ownershipBasedAccessControlForFeatures @property def useStandardizedQueries(self): if self._useStandardizedQueries is None: self.__init() return self._useStandardizedQueries #---------------------------------------------------------------------- def addAttachment(self, oid, file_path): """ Adds an attachment to a feature service Input: oid - string - OBJECTID value to add attachment to file_path - string - path to file Output: JSON Repsonse """ if self.hasAttachments == True: attachURL = self._url + "/%s/addAttachment" % oid params = {'f':'json'} if not self._token is None: params['token'] = self._token parsed = urlparse.urlparse(attachURL) port = parsed.port files = [] files.append(('attachment', file_path, os.path.basename(file_path))) res = self._post_multipart(host=parsed.hostname, selector=parsed.path, files=files, fields=params, port=port, ssl=parsed.scheme.lower() == 'https') return self._unicode_convert(json.loads(res)) else: return "Attachments are not supported for this feature service." #---------------------------------------------------------------------- def deleteAttachment(self, oid, attachment_id): """ removes an attachment from a feature service feature Input: oid - integer or string - id of feature attachment_id - integer - id of attachment to erase Output: JSON response """ url = self._url + "/%s/deleteAttachments" % oid params = { "f":"json", "attachmentIds" : "%s" % attachment_id } if not self._token is None: params['token'] = self._token return self._do_post(url, params) #---------------------------------------------------------------------- def updateAttachment(self, oid, attachment_id, file_path): """ updates an existing attachment with a new file Inputs: oid - string/integer - Unique record ID attachment_id - integer - Unique attachment identifier file_path - string - path to new attachment Output: JSON response """ url = self._url + "/%s/updateAttachment" % oid params = { "f":"json", "attachmentId" : "%s" % attachment_id } if not self._token is None: params['token'] = self._token parsed = urlparse.urlparse(url) port = parsed.port files = [] files.append(('attachment', file_path, os.path.basename(file_path))) res = self._post_multipart(host=parsed.hostname, selector=parsed.path, files=files, port=port, fields=params, ssl=parsed.scheme.lower() == 'https') return self._unicode_convert(json.loads(res)) #---------------------------------------------------------------------- def listAttachments(self, oid): """ list attachements for a given OBJECT ID """ url = self._url + "/%s/attachments" % oid params = { "f":"json" } if not self._token is None: params['token'] = self._token return self._do_get(url, params) #---------------------------------------------------------------------- def create_fc_template(self, out_path, out_name): """creates a featureclass template on local disk""" fields = self.fields objectIdField = self.objectIdField geomType = self.geometryType wkid = self.parentLayer.spatialReference['wkid'] return common.create_feature_class(out_path, out_name, geomType, wkid, fields, objectIdField) def create_feature_template(self): """creates a feature template""" fields = self.fields feat_schema = {} att = {} for fld in fields: self._globalIdField if not fld['name'] == self._objectIdField and not fld['name'] == self._globalIdField: att[fld['name']] = '' feat_schema['attributes'] = att feat_schema['geometry'] = '' return common.Feature(feat_schema) #---------------------------------------------------------------------- def query(self, where="1=1", out_fields="*", timeFilter=None, geometryFilter=None, returnGeometry=True, returnIDsOnly=False, returnCountOnly=False, returnFeatureClass=False, out_fc=None): """ queries a feature service based on a sql statement Inputs: where - the selection sql statement out_fields - the attribute fields to return timeFilter - a TimeFilter object where either the start time or start and end time are defined to limit the search results for a given time. The values in the timeFilter should be as UTC timestampes in milliseconds. No checking occurs to see if they are in the right format. geometryFilter - a GeometryFilter object to parse down a given query by another spatial dataset. returnGeometry - true means a geometry will be returned, else just the attributes returnIDsOnly - false is default. True means only OBJECTIDs will be returned returnCountOnly - if True, then an integer is returned only based on the sql statement returnFeatureClass - Default False. If true, query will be returned as feature class out_fc - only valid if returnFeatureClass is set to True. Output location of query. Output: A list of Feature Objects (default) or a path to the output featureclass if returnFeatureClass is set to True. """ params = {"f": "json", "where": where, "outFields": out_fields, "returnGeometry" : returnGeometry, "returnIdsOnly" : returnIDsOnly, "returnCountOnly" : returnCountOnly, } if not self._token is None: params["token"] = self._token if not timeFilter is None and \ isinstance(timeFilter, filters.TimeFilter): params['time'] = timeFilter.filter if not geometryFilter is None and \ isinstance(geometryFilter, filters.GeometryFilter): gf = geometryFilter.filter params['geometry'] = gf['geometry'] params['geometryType'] = gf['geometryType'] params['spatialRelationship'] = gf['spatialRel'] params['inSR'] = gf['inSR'] fURL = self._url + "/query" results = self._do_get(fURL, params) if not returnCountOnly and not returnIDsOnly: if returnFeatureClass: json_text = json.dumps(results) temp = common.scratchFolder() + os.sep + uuid.uuid4().get_hex() + ".json" with open(temp, 'wb') as writer: writer.write(json_text) writer.flush() del writer fc = common.json_to_featureclass(json_file=temp, out_fc=out_fc) os.remove(temp) return fc else: feats = [] for res in results['features']: feats.append(common.Feature(res)) return feats else: return results return #---------------------------------------------------------------------- def query_related_records(self, objectIds, relationshipId, outFields="*", definitionExpression=None, returnGeometry=True, maxAllowableOffset=None, geometryPrecision=None, outWKID=None, gdbVersion=None, returnZ=False, returnM=False): """ The Query operation is performed on a feature service layer resource. The result of this operation are feature sets grouped by source layer/table object IDs. Each feature set contains Feature objects including the values for the fields requested by the user. For related layers, if you request geometry information, the geometry of each feature is also returned in the feature set. For related tables, the feature set does not include geometries. Inputs: objectIds - the object IDs of the table/layer to be queried relationshipId - The ID of the relationship to be queried. outFields - the list of fields from the related table/layer to be included in the returned feature set. This list is a comma delimited list of field names. If you specify the shape field in the list of return fields, it is ignored. To request geometry, set returnGeometry to true. You can also specify the wildcard "*" as the value of this parameter. In this case, the result s will include all the field values. definitionExpression - The definition expression to be applied to the related table/layer. From the list of objectIds, only those records that conform to this expression are queried for related records. returnGeometry - If true, the feature set includes the geometry associated with each feature. The default is true. maxAllowableOffset - This option can be used to specify the maxAllowableOffset to be used for generalizing geometries returned by the query operation. The maxAllowableOffset is in the units of the outSR. If outSR is not specified, then maxAllowableOffset is assumed to be in the unit of the spatial reference of the map. geometryPrecision - This option can be used to specify the number of decimal places in the response geometries. outWKID - The spatial reference of the returned geometry. gdbVersion - The geodatabase version to query. This parameter applies only if the isDataVersioned property of the layer queried is true. returnZ - If true, Z values are included in the results if the features have Z values. Otherwise, Z values are not returned. The default is false. returnM - If true, M values are included in the results if the features have M values. Otherwise, M values are not returned. The default is false. """ params = { "f" : "json", "objectIds" : objectIds, "relationshipId" : relationshipId, "outFields" : outFields, "returnGeometry" : returnGeometry, "returnM" : returnM, "returnZ" : returnZ } if self._token is not None: params['token'] = self._token if gdbVersion is not None: params['gdbVersion'] = gdbVersion if definitionExpression is not None: params['definitionExpression'] = definitionExpression if outWKID is not None: params['outSR'] = common.SpatialReference(outWKID).asDictionary if maxAllowableOffset is not None: params['maxAllowableOffset'] = maxAllowableOffset if geometryPrecision is not None: params['geometryPrecision'] = geometryPrecision quURL = self._url + "/queryRelatedRecords" res = self._do_get(url=quURL, param_dict=params) return res #---------------------------------------------------------------------- def getHTMLPopup(self, oid): """ The htmlPopup resource provides details about the HTML pop-up authored by the user using ArcGIS for Desktop. Input: oid - object id of the feature where the HTML pop-up Output: """ if self.htmlPopupType != "esriServerHTMLPopupTypeNone": popURL = self._url + "/%s/htmlPopup" % oid params = { 'f' : "json" } if self._token is not None: params['token'] = self._token return self._do_get(url=popURL, param_dict=params) return "" #---------------------------------------------------------------------- def _chunks(self, l, n): """ Yield n successive chunks from a list l. """ l.sort() newn = int(1.0 * len(l) / n + 0.5) for i in xrange(0, n-1): yield l[i*newn:i*newn+newn] yield l[n*newn-newn:] #---------------------------------------------------------------------- def get_local_copy(self, out_path, includeAttachments=False): """ exports the whole feature service to a feature class Input: out_path - path to where the data will be placed includeAttachments - default False. If sync is not supported then the paramter is ignored. Output: path to exported feature class or fgdb (as list) """ if self.hasAttachments and \ self.parentLayer.syncEnabled: return self.parentLayer.createReplica(replicaName="fgdb_dump", layers="%s" % self.id, returnAsFeatureClass=True, returnAttachments=includeAttachments, out_path=out_path)[0] elif self.hasAttachments == False and \ self.parentLayer.syncEnabled: return self.parentLayer.createReplica(replicaName="fgdb_dump", layers="%s" % self.id, returnAsFeatureClass=True, out_path=out_path)[0] else: result_features = [] res = self.query(returnIDsOnly=True) OIDS = res['objectIds'] OIDS.sort() OIDField = res['objectIdFieldName'] count = len(OIDS) if count <= self.maxRecordCount: bins = 1 else: bins = count / self.maxRecordCount v = count % self.maxRecordCount if v > 0: bins += 1 chunks = self._chunks(OIDS, bins) for chunk in chunks: chunk.sort() sql = "%s >= %s and %s <= %s" % (OIDField, chunk[0], OIDField, chunk[len(chunk) -1]) temp_base = "a" + uuid.uuid4().get_hex()[:6] + "a" temp_fc = r"%s\%s" % (common.scratchGDB(), temp_base) temp_fc = self.query(where=sql, returnFeatureClass=True, out_fc=temp_fc) result_features.append(temp_fc) return common.merge_feature_class(merges=result_features, out_fc=out_path) #---------------------------------------------------------------------- def updateFeature(self, features, gdbVersion=None, rollbackOnFailure=True): """ updates an existing feature in a feature service layer Input: feature - feature object(s) to get updated. A single feature or a list of feature objects can be passed Output: dictionary of result messages """ params = { "f" : "json", "rollbackOnFailure" : rollbackOnFailure } if gdbVersion is not None: params['gdbVersion'] = gdbVersion if self._token is not None: params['token'] = self._token if isinstance(features, common.Feature): params['features'] = [features.asDictionary] elif isinstance(features, list): vals = [] for feature in features: if isinstance(feature, common.Feature): vals.append(feature.asDictionary) params['features'] = vals else: return {'message' : "invalid inputs"} updateURL = self._url + "/updateFeatures" res = self._do_post(url=updateURL, param_dict=params) return res #---------------------------------------------------------------------- def deleteFeatures(self, objectIds="", where="", geometryFilter=None, gdbVersion=None, rollbackOnFailure=True ): """ removes 1:n features based on a sql statement Input: objectIds - The object IDs of this layer/table to be deleted where - A where clause for the query filter. Any legal SQL where clause operating on the fields in the layer is allowed. Features conforming to the specified where clause will be deleted. geometryFilter - a filters.GeometryFilter object to limit deletion by a geometry. gdbVersion - Geodatabase version to apply the edits. This parameter applies only if the isDataVersioned property of the layer is true rollbackOnFailure - parameter to specify if the edits should be applied only if all submitted edits succeed. If false, the server will apply the edits that succeed even if some of the submitted edits fail. If true, the server will apply the edits only if all edits succeed. The default value is true. Output: JSON response as dictionary """ dURL = self._url + "/deleteFeatures" params = { "f": "json", } if geometryFilter is not None and \ isinstance(geometryFilter, filters.GeometryFilter): gfilter = geometryFilter.filter params['geometry'] = gfilter['geometry'] params['geometryType'] = gfilter['geometryType'] params['inSR'] = gfilter['inSR'] params['spatialRel'] = gfilter['spatialRel'] if where is not None and \ where != "": params['where'] = where if objectIds is not None and \ objectIds != "": params['objectIds'] = objectIds if not self._token is None: params['token'] = self._token result = self._do_post(url=dURL, param_dict=params) self.__init() return result #---------------------------------------------------------------------- def applyEdits(self, addFeatures=[], updateFeatures=[], deleteFeatures=None, gdbVersion=None, rollbackOnFailure=True): """ This operation adds, updates, and deletes features to the associated feature layer or table in a single call. Inputs: addFeatures - The array of features to be added. These features should be common.Feature objects updateFeatures - The array of features to be updateded. These features should be common.Feature objects deleteFeatures - string of OIDs to remove from service gdbVersion - Geodatabase version to apply the edits. rollbackOnFailure - Optional parameter to specify if the edits should be applied only if all submitted edits succeed. If false, the server will apply the edits that succeed even if some of the submitted edits fail. If true, the server will apply the edits only if all edits succeed. The default value is true. Output: dictionary of messages """ editURL = self._url + "/applyEdits" params = {"f": "json" } if self._token is not None: params['token'] = self._token if len(addFeatures) > 0 and \ isinstance(addFeatures[0], common.Feature): params['adds'] = [f.asDictionary for f in addFeatures] if len(updateFeatures) > 0 and \ isinstance(updateFeatures[0], common.Feature): params['updates'] = [f.asDictionary for f in updateFeatures] if deleteFeatures is not None and \ isinstance(deleteFeatures, str): params['deletes'] = deleteFeatures return self._do_post(url=editURL, param_dict=params) #---------------------------------------------------------------------- def addFeatures(self, fc, attachmentTable=None, nameField="ATT_NAME", blobField="DATA", contentTypeField="CONTENT_TYPE", rel_object_field="REL_OBJECTID"): """ adds a feature to the feature service Inputs: fc - string - path to feature class data to add. attachmentTable - string - (optional) path to attachment table nameField - string - (optional) name of file field in attachment table blobField - string - (optional) name field containing blob data contentTypeField - string - (optional) name of field containing content type rel_object_field - string - (optional) name of field with OID of feature class Output: boolean, add results message as list of dictionaries """ messages = [] if attachmentTable is None: count = 0 bins = 1 uURL = self._url + "/addFeatures" max_chunk = 250 js = self._unicode_convert( common.featureclass_to_json(fc)) js = js['features'] if len(js) <= max_chunk: bins = 1 else: bins = int(len(js)/max_chunk) if len(js) % max_chunk > 0: bins += 1 chunks = self._chunks(l=js, n=bins) for chunk in chunks: params = { "f" : 'json', "features" : json.dumps(chunk, default=self._date_handler) } if not self._token is None: params['token'] = self._token result = self._do_post(url=uURL, param_dict=params) messages.append(result) del params del result return True, messages else: oid_field = common.get_OID_field(fc) OIDs = common.get_records_with_attachments(attachment_table=attachmentTable) fl = common.create_feature_layer(fc, "%s not in ( %s )" % (oid_field, ",".join(OIDs))) val, msgs = self.addFeatures(fl) messages.append(msgs) del fl for oid in OIDs: fl = common.create_feature_layer(fc, "%s = %s" % (oid_field, oid), name="layer%s" % oid) val, msgs = self.addFeatures(fl) for result in msgs[0]['addResults']: oid_fs = result['objectId'] sends = common.get_attachment_data(attachmentTable, sql="%s = %s" % (rel_object_field, oid)) for s in sends: messages.append(self.addAttachment(oid_fs, s['blob'])) del s del sends del result messages.append(msgs) del fl del oid del OIDs return True, messages ######################################################################## class TableLayer(FeatureLayer): """Table object is exactly like FeatureLayer object""" pass
Esri/agol-helper
source/agol/layer.py
Python
apache-2.0
39,326
""" Web interface """ from .app import start_app __all__ = ("start_app",)
KarolBedkowski/webmon
webmon2/web/__init__.py
Python
gpl-2.0
77
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup from vargram_bot.version import VERSION setup( name = 'vargram-bot', version = VERSION, description = 'The official Telegram bot for the LinuxVar LUG.', url = 'https://github.com/imko92/vargram-bot', author = 'Riccardo Macoratti', author_email = 'r.macoratti@gmx.co.uk', license = 'MIT', packages = [ 'vargram_bot' ], install_requires=[ 'python-telegram-bot', 'lxml', 'PyYAML', 'requests', 'emoji', 'feedparser' ], zip_safe = False, scripts = [ 'scripts/vargram' ], data_files = [ ('/etc/systemd/system', ['scripts/vargram.service']) ] )
imko92/vargram-bot
setup.py
Python
mit
734
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module defines convenience types for type hinting purposes. Type hinting is new to pymatgen, so this module is subject to change until best practices are established. """ from pathlib import Path from typing import Union, Sequence import numpy as np try: from numpy.typing import ArrayLike except ImportError: ArrayLike = Union[Sequence[float], Sequence[Sequence[float]], Sequence[np.ndarray], np.ndarray] # type: ignore from pymatgen.core.periodic_table import Element, Species, DummySpecies from pymatgen.core.composition import Composition VectorLike = Union[Sequence[float], np.ndarray] MatrixLike = Union[Sequence[Sequence[float]], Sequence[np.ndarray], np.ndarray] PathLike = Union[str, Path] # Things that can be cast into a Species-like object using get_el_sp SpeciesLike = Union[str, Element, Species, DummySpecies] # Things that can be cast into a Composition CompositionLike = Union[str, Element, Species, DummySpecies, dict, Composition]
gmatteo/pymatgen
pymatgen/util/typing.py
Python
mit
1,085
"""Handle URL format for defining filters.""" import re def get_filters(args): """Extract the filters from the URL.""" filters = {} for parameter, argument in args.items(): match = re.search(r'filters\[([0-9]+)\]\[([a-z]+)\]', parameter) if match: (index, field) = match.groups() if not index in filters: filters[index] = {} filters[index][field] = argument return filters.values()
bheiskell/logolas
logolas/web/url.py
Python
mit
470
#!/usr/bin/env python #========================================================================= # # Copyright Insight Software Consortium # # 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.txt # # 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 SimpleITK as sitk import sys if len ( sys.argv ) != 3: print "Usage: %s inputImage outputImage" % ( sys.argv[0] ) sys.exit ( 1 ) inputImage = sitk.ReadImage( sys.argv[1] ) filter = sitk.MedianImageFilter() outputImage = filter.Execute( inputImage, [1,1,1] ) writer = sitk.ImageFileWriter() writer.SetFileName( sys.argv[2] ) writer.Execute( outputImage )
luisibanez/ITK-RSNA
Exercises/SimpleITK/Python/MedianImageFilter01.py
Python
apache-2.0
1,155
# -*- coding: utf8 -*- from . import TestCase from inxpect import expect from inxpect import getters class ListMethodTest(TestCase): def setUp(self): get_attr = getters.AttrByName('attribute') class Expect(object): attribute = expect.List(get_attr) self.expect = Expect() class Tested(object): attribute = ['value1','value2','value3',['value4']] self.object = Tested() def test_at_returns_a_function_that_tests_value_list_index(self): test = self.expect.attribute.at(1).equal_to('value2') self.assertTrue(test(self.object)) def test_at_can_be_called_twice(self): test = self.expect.attribute.at(3).at(0).equal_to('value4') self.assertTrue(test(self.object)) def test_has_returns_a_function_to_test_value_in_list(self): test_true = self.expect.attribute.has('value') test_false = self.expect.attribute.at(3).has('value4') self.assertFalse(test_true(self.object)) self.assertTrue(test_false(self.object)) def test_len_returns_a_function_to_make_tests_on_list_len(self): test_true = self.expect.attribute.len == 4 self.assertTrue(test_true(self.object)) def test_has_all_returns_a_function_to_test_all_values_in_list(self): test_true = self.expect.attribute.has_all(['value1', 'value2', 'value3']) test_false = self.expect.attribute.at(3).has_all(['value4', 'value1']) self.assertTrue(test_true(self.object)) self.assertFalse(test_false(self.object)) def test_has_any_returns_a_function_to_test_any_values_in_list(self): test_true = self.expect.attribute.has_any(['value', 'value4', 'value5']) test_false = self.expect.attribute.at(3).has_any(['value4', 'value1']) self.assertFalse(test_true(self.object)) self.assertTrue(test_false(self.object)) def test_has_key_returns_a_function_to_test_key_in_list(self): test_true = self.expect.attribute.has_key(0) test_false = self.expect.attribute.at(3).has_key(1) self.assertTrue(test_true(self.object)) self.assertFalse(test_false(self.object)) def test_has_keys_returns_a_function_to_test_keys_in_list(self): test_true = self.expect.attribute.has_keys([3, 0, 1]) test_false = self.expect.attribute.at(3).has_keys([0, 2]) self.assertTrue(test_true(self.object)) self.assertFalse(test_false(self.object)) def test_has_any_keys_returns_a_function_to_test_keys_in_list(self): test_true = self.expect.attribute.has_any_key([6, 4, 12]) test_false = self.expect.attribute.at(3).has_any_key([0, 1]) self.assertFalse(test_true(self.object)) self.assertTrue(test_false(self.object))
apieum/inxpect
inxpect/tests/testList.py
Python
lgpl-3.0
2,770
import json import urllib.error import urllib.parse import urllib.request def post_data_to_server(codespeed_url, data, dry_run=False, max_chunk=8, verbose=False): for chunk in [data[i:(i+max_chunk)] for i in range(0, len(data), max_chunk)]: json_data = {'json': json.dumps(chunk)} url = '%sresult/add/json/' % codespeed_url data_payload = urllib.parse.urlencode(json_data).encode('ascii') if dry_run: print('DRY_RUN would have sent request: ') print(' url: %s'%url) print(' data: %s'%data_payload) return if verbose: print('requesting url=%s data=%s'%(url, data_payload)) response = "None" try: f = urllib.request.urlopen(url, data_payload) except urllib.error.HTTPError as e: print(str(e)) print(e.read()) return response = f.read() f.close() print("Server (%s) response: %s\n" % (codespeed_url, response))
FStarLang/FStar
.scripts/benchmarking/codespeed_upload.py
Python
apache-2.0
1,017
''' Utility to help "tail" AWS logs stored in S3 generated by S3 bucket logging or ELB logging. ''' from builtins import object import os import sys import signal import errno import logging import re import click from boto import s3 from configstruct import ConfigStruct from .s3tail import S3Tail # TODO: # * consider support for reading from multiple buckets? DEFAULTS = { 'log_level': 'info', 'log_file': 'STDERR', 'cache_path': os.path.join(os.path.expanduser('~'), '.s3tailcache'), 'cache_hours': 24, } CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) @click.command(context_settings=CONTEXT_SETTINGS) @click.version_option() @click.option('-c', '--config-file', type=click.Path(dir_okay=False, writable=True), default=os.path.join(os.path.expanduser('~'), '.s3tailrc'), help='Configuration file', show_default=True) @click.option('-r', '--region', type=click.Choice(r.name for r in s3.regions()), help='AWS region to use when connecting') @click.option('-b', '--bookmark', help='Bookmark to start at (key:line or a named bookmark)') @click.option('-l', '--log-level', type=click.Choice(['debug','info','warning','error','critical']), help='set logging level') @click.option('--log-file', metavar='FILENAME', help='write logs to FILENAME') @click.option('--cache-hours', type=int, help='Number of hours to keep in cache before removing on next run (0 disables caching)') @click.option('--cache-lookup', is_flag=True, help='Report if s3_uri keys are cached (showing pathnames if found)') @click.argument('s3_uri') def main(config_file, region, bookmark, log_level, log_file, cache_hours, cache_lookup, s3_uri): '''Begins tailing files found at [s3://]BUCKET[/PREFIX] (automatically decompressing any ending in ".gz") ''' config = ConfigStruct(config_file, options=DEFAULTS) opts = config.options # let command line options have temporary precedence if provided values opts.might_prefer(region=region, log_level=log_level, log_file=log_file, cache_hours=cache_hours) s3_uri = re.sub(r'^(s3:)?/+', '', s3_uri) bucket, prefix = s3_uri.split('/', 1) log_kwargs = { 'level': getattr(logging, opts.log_level.upper()), 'format': '[%(asctime)s #%(process)d] %(levelname)-8s %(name)-12s %(message)s', 'datefmt': '%Y-%m-%dT%H:%M:%S%z', } if opts.log_file != 'STDERR': log_kwargs['filename'] = opts.log_file logging.basicConfig(**log_kwargs) logger = logging.getLogger(__name__) class Track(object): tail = None last_key = None last_num = None show_pick_up = bookmark != None def progress(key, cache_pn, cached): Track.last_key = key if cache_lookup: prefix = ' => ' click.echo(key) if not cached: click.echo(prefix + click.style('NOT IN CACHE', fg='red')) else: click.echo(prefix + click.style(cache_pn, fg='green')) return False else: logger.info('Starting %s', key) return True def dump(num, line): Track.last_num = num if Track.show_pick_up: logger.info('Picked up at line %s', num) Track.show_pick_up = False click.echo(line) tail = S3Tail(config, bucket, prefix, dump, key_handler=progress, bookmark=bookmark, region=opts.region, cache_path=opts.cache_path, hours=opts.cache_hours) signal.signal(signal.SIGINT, tail.stop) signal.signal(signal.SIGTERM, tail.stop) signal.signal(signal.SIGPIPE, tail.stop) try: tail.watch() except KeyboardInterrupt: signal_handler(signal.SIGINT, _) except IOError as exc: if exc.errno != errno.EPIPE: raise # just exit if piped to something that has terminated (i.e. head or tail) finally: tail.cleanup() if Track.last_key and Track.last_num: logger.info('Stopped processing at %s:%d', Track.last_key, Track.last_num) if Track.last_key or Track.last_num: logger.info('Bookmark: %s', tail.get_bookmark()) sys.exit(0) if __name__ == '__main__': main()
bradrf/s3tail
s3tail/cli.py
Python
mit
4,273
#/usr/bin/env/python # This is older working code , a new version has been uploaded class node: def __init__(self, size,center,parent): self.parent = parent self.size = size self.value = [] self.center = center self.children = [None for i in range(8)] def findQuadrant(self,coord,center): if coord[0] <= center[0]: #negX if coord[1] <= center[1]: #negY if coord[2] <= center[2]: #negZ return 6 else: #posZ return 5 else: #posY if coord[2] <= center[2]: #negZ return 2 else: #posZ return 1 else: #posX if coord[1] <= self.center[1]: #negY if coord[2] <= self.center[2]: #negZ return 7 else: #posZ return 4 else: #posY if coord[2] <= self.center[2]: #negZ return 3 else: #posZ return 0 def findCenter(self,size,center,quadrant): newcenter=[0,0,0] #print size #switch(quadrant){ if quadrant ==0: for i in range(3): newcenter[i]= size[i]/2 + center[i] return newcenter elif quadrant==1: newcenter[0]= -size[0]/2 + center[0] newcenter[1]= size[1]/2 + center[1] newcenter[2]= size[2]/2 + center[2] return newcenter elif quadrant == 2: newcenter[0]= -size[0]/2 + center[0] newcenter[1]= size[1]/2 + center[1] newcenter[2]= -size[2]/2 + center[2] return newcenter elif quadrant == 3: newcenter[0]= size[0]/2 + center[0] newcenter[1]= size[1]/2 + center[1] newcenter[2]= -size[2]/2 + center[2] return newcenter elif quadrant == 4: newcenter[0]= size[0]/2 + center[0] newcenter[1]= -size[1]/2 + center[1] newcenter[2]= size[2]/2 + center[2] return newcenter elif quadrant ==5: newcenter[0]= -size[0]/2 + center[0] newcenter[1]= -size[1]/2 + center[1] newcenter[2]= size[2]/2 + center[2] return newcenter elif quadrant ==6: newcenter[0]= -size[0]/2 + center[0] newcenter[1]= -size[1]/2 + center[1] newcenter[2]= -size[2]/2 + center[2] return newcenter elif quadrant==7: newcenter[0]= size[0]/2 + center[0] newcenter[1]= -size[1]/2 + center[1] newcenter[2]= -size[2]/2 + center[2] return newcenter def add(self, val, coord, sz): #print "in adding" #print sz if sz[0] == 1 or sz[1]==1 or sz[2]==1: #print "leaf added" self.value.append([coord,val,'leaf']) return self else: #print "size is " newsize = [int(sz[i]/2) for i in range(3)] #Determine quadrant quad = self.findQuadrant(coord,self.center) #print "quad is " #print quad newCenter = self.findCenter(newsize,self.center,quad) #print "new center is " #print newCenter if self.children[quad]== None: self.children[quad] = node(newsize, newCenter,self) #print self.children self.children[quad].add(val,coord,newsize) elif isinstance(self.children[quad],node): self.children[quad].add(val,coord,newsize) def printNode(self): if self.size[0]==1 or self.size[1]==1 or self.size[2]==1: print "----------------Leaf-------------------" print "value of leaf" print self.value print "coordinate of leaf" print self.center print "-----------------end leaf----------------" #print self.children else: #print self.children for i in self.children: if i != None: print i.printNode() class Octree(): """ class to hold the whole tree """ def __init__(self, world): print "------------------root created--------------------------------" self.world = world self.root_coords = [world[0]/2,world[1]/2,world[2]/2] self.root = node(world,self.root_coords,None) def add_item(self, payload, coord): """ Create recursively create subnodes until lowest size is reached then deposit payload in that node """ self.root.add(payload, coord, self.world) def printTree(self): print "------------------------------printing tree--------------------" self.root.printNode() if __name__ == "__main__": print "Creating octree" tree = Octree([1000,1000,1000]) print "inserting node" #tree.add_item(1, [90.34251,10.1234,10.9876]) for i in range(10): tree.add_item(1,[i,i*4,i*7]) tree.printTree() #get some data
ResByte/HMM-occupancy_grid
newOc.py
Python
gpl-2.0
4,235
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('profiles', '0001_initial'), ('military', '0003_unitdependency'), ('arenas', '0007_auto_20150522_0203'), ] operations = [ migrations.CreateModel( name='AggressorUnit', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ], ), migrations.CreateModel( name='Conflict', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('start_turn', models.IntegerField()), ('complete_turn', models.IntegerField(blank=True)), ('complete', models.BooleanField(default=False)), ('victory', models.NullBooleanField()), ('aggressor', models.ForeignKey(related_name='invasions', to='profiles.Profile')), ('defender', models.ForeignKey(related_name='defenses', blank=True, to='profiles.Profile', null=True)), ('territory', models.ForeignKey(to='arenas.Territory')), ], ), migrations.CreateModel( name='DefenderUnit', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('conflict', models.ForeignKey(to='combat.Conflict')), ('unit', models.ForeignKey(to='military.Unit')), ], ), migrations.AddField( model_name='aggressorunit', name='conflict', field=models.ForeignKey(to='combat.Conflict'), ), migrations.AddField( model_name='aggressorunit', name='unit', field=models.ForeignKey(to='military.Unit'), ), ]
mc706/prog-strat-game
combat/migrations/0001_initial.py
Python
mit
2,011
''' Created on 27 Jan 2017 @author: ernesto ''' import pandas as pd class p3BAMQC: """ Class representing a spreadsheet located at ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/working/20130606_sample_info/ 20130606_sample_info.xlsx containing information on the BAM QC done for the p3 """ def __init__(self, filepath): ''' Constructor Parameters ---------- filepath: str Path to the spreadsheet. book: ExcelFile object ''' self.filepath = filepath # Import the excel file and call it xls_file xls_file = pd.ExcelFile(filepath) self.book = xls_file def get_final_qc_results(self, group): """ Method to get the sheet corresponding to 'Final QC Results' Parameters ---------- group: {'low coverage', 'exome'} Get the data for the low coverage or exome worksheet. Returns ------- df : data.frame object """ sheet = self.book.parse('Final QC Results', skiprows=1, index_col=[0, 1]) new_column_names = ['VerifyBam_Omni_Free', 'VerifyBam_Affy_Free', 'VerifyBam_Omni_Chip', 'VerifyBam_Affy_Chip', 'Indel_Ratio', 'Passed_QC'] df = "" if group == "low coverage": df = sheet.iloc[:, 6:12] elif group == "exome": df = sheet.iloc[:, 0:6] df.columns = new_column_names return df
igsr/igsr_analysis
p3/p3BAMQC.py
Python
apache-2.0
1,522
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # 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 Street, Fifth Floor, Boston, MA 02110-1301 USA. # #------------------------------------------------------------------------- # # Standard Python modules # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale _ = glocale.translation.gettext #------------------------------------------------------------------------- # # Gramps modules # #------------------------------------------------------------------------- from .. import Rule #------------------------------------------------------------------------- # # IsDefaultPerson # #------------------------------------------------------------------------- class IsDefaultPerson(Rule): """Rule that checks for a default person in the database""" name = _('Home Person') category = _('General filters') description = _("Matches the Home Person") def prepare(self, db, user): p = db.get_default_person() if p: self.def_handle = p.get_handle() self.apply = self.apply_real else: self.apply = lambda db,p: False def apply_real(self,db,person): return person.handle == self.def_handle
SNoiraud/gramps
gramps/gen/filters/rules/person/_isdefaultperson.py
Python
gpl-2.0
1,950
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('goals', '0018_auto_20150312_1518'), ] operations = [ migrations.AddField( model_name='behavioraction', name='title_slug', field=models.SlugField(max_length=128, default=''), preserve_default=True, ), migrations.AddField( model_name='behaviorsequence', name='title_slug', field=models.SlugField(max_length=128, default=''), preserve_default=True, ), ]
tndatacommons/tndata_backend
tndata_backend/goals/migrations/0019_auto_20150312_1553.py
Python
mit
671
__author__ = 'sepulchered'
botdept/chatbot
bot/__init__.py
Python
agpl-3.0
27
from __future__ import absolute_import import os import importlib from ..Logger import * from ..settings.Settings import * class cmd_list(object): @classmethod def usage(self): return { 'name': 'list', 'args': '', 'desc': 'Displays SDKS for selected Xcode Install' }; @classmethod def action(self, args): Logger.debuglog([Logger.colour('black',True), Logger.string('%s', 'SDKs:'), Logger.colour('reset', True)]); sdks = args.ListOfActiveSDKs(); for sdk in sdks: active = ' '; if args.ActiveSDKPath(sdk): active = '*'; name = os.path.basename(sdk); Logger.debuglog([Logger.colour('green',True), Logger.string('\t %s ', active), Logger.colour('black',True), Logger.string('%s', name), Logger.colour('reset', True)]);
samdmarshall/SDKBuild
sdkbuild/commandparse/cmd_list.py
Python
bsd-3-clause
913
def func(a1): """ Parameters: a1 (:class:`MyClass`): used to call :def:`my_function` and access :attr:`my_attr` Raises: :class:`MyException`: thrown in case of any error """
asedunov/intellij-community
python/testData/docstrings/typeReferences.py
Python
apache-2.0
206
from __future__ import print_function import os def log(*items): print(*items) def log_error(*items): print(*items, file=sys.stderr) def run_command(command): log('>', command) return os.WEXITSTATUS(os.system(command))
theojepsen/p4app
docker/scripts/p4app_util.py
Python
apache-2.0
239
# -*- coding: utf-8 -*- """ This is an example settings/local.py file. These settings overrides what's in settings/base.py """ import logging # To extend any settings from settings/base.py here's an example: #from . import base #INSTALLED_APPS = base.INSTALLED_APPS + ['debug_toolbar'] DATABASES = { 'default': { # 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'database_name', 'USER': 'user_name', 'PASSWORD': 'user_password', 'HOST': '127.0.0.1', # 'PORT': '5432', # for some reasons you should add port } } # Uncomment this and set to all slave DBs in use on the site. # SLAVE_DATABASES = ['slave'] ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS TIME_ZONE = 'Europe/Moscow' # Debugging displays nice error messages, but leaks memory. Set this to False # on all server instances and True only for development. DEBUG = TEMPLATE_DEBUG = True # Is this a development instance? Set this to True on development/master # instances and False on stage/prod. DEV = True SECRET_KEY = '_^(m436@a$omj4(4(-xep&!0&i-%c4#^ag55!(m9%nsnta=66a' ## Log settings LOG_LEVEL = logging.INFO HAS_SYSLOG = True SYSLOG_TAG = "http_app_c300" # Make this unique to your project. # Remove this configuration variable to use your custom logging configuration LOGGING_CONFIG = None LOGGING = { 'version': 1, 'loggers': { 'c300': { 'level': "DEBUG" } } } # Common Event Format logging parameters #CEF_PRODUCT = 'you_product' #CEF_VENDOR = 'your Company' #CEF_VERSION = '0' #CEF_DEVICE_VERSION = '0' INTERNAL_IPS = ('127.0.0.1') # Enable these options for memcached #CACHE_BACKEND= "memcached://127.0.0.1:11211/" #CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True # Set this to true if you use a proxy that sets X-Forwarded-Host #USE_X_FORWARDED_HOST = False SERVER_EMAIL = "webmaster@example.com" DEFAULT_FROM_EMAIL = "webmaster@example.com" SYSTEM_EMAIL_PREFIX = "[prefix]"
codeboy/coddy-sitetools
sitetools/settings/local-temp.py
Python
bsd-3-clause
2,041
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization from ._policy_client_enums import * class ErrorResponse(msrest.serialization.Model): """Error response indicates Azure Resource Manager is not able to process the incoming request. The reason is provided in the error message. :ivar http_status: Http status code. :vartype http_status: str :ivar error_code: Error code. :vartype error_code: str :ivar error_message: Error message indicating why the operation failed. :vartype error_message: str """ _attribute_map = { 'http_status': {'key': 'httpStatus', 'type': 'str'}, 'error_code': {'key': 'errorCode', 'type': 'str'}, 'error_message': {'key': 'errorMessage', 'type': 'str'}, } def __init__( self, *, http_status: Optional[str] = None, error_code: Optional[str] = None, error_message: Optional[str] = None, **kwargs ): """ :keyword http_status: Http status code. :paramtype http_status: str :keyword error_code: Error code. :paramtype error_code: str :keyword error_message: Error message indicating why the operation failed. :paramtype error_message: str """ super(ErrorResponse, self).__init__(**kwargs) self.http_status = http_status self.error_code = error_code self.error_message = error_message class Identity(msrest.serialization.Model): """Identity for the resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar principal_id: The principal ID of the resource identity. :vartype principal_id: str :ivar tenant_id: The tenant ID of the resource identity. :vartype tenant_id: str :ivar type: The identity type. Possible values include: "SystemAssigned", "None". :vartype type: str or ~azure.mgmt.resource.policy.v2019_06_01.models.ResourceIdentityType """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, } _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, *, type: Optional[Union[str, "ResourceIdentityType"]] = None, **kwargs ): """ :keyword type: The identity type. Possible values include: "SystemAssigned", "None". :paramtype type: str or ~azure.mgmt.resource.policy.v2019_06_01.models.ResourceIdentityType """ super(Identity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None self.type = type class PolicyAssignment(msrest.serialization.Model): """The policy assignment. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The ID of the policy assignment. :vartype id: str :ivar type: The type of the policy assignment. :vartype type: str :ivar name: The name of the policy assignment. :vartype name: str :ivar sku: The policy sku. This property is optional, obsolete, and will be ignored. :vartype sku: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicySku :ivar location: The location of the policy assignment. Only required when utilizing managed identity. :vartype location: str :ivar identity: The managed identity associated with the policy assignment. :vartype identity: ~azure.mgmt.resource.policy.v2019_06_01.models.Identity :ivar display_name: The display name of the policy assignment. :vartype display_name: str :ivar policy_definition_id: The ID of the policy definition or policy set definition being assigned. :vartype policy_definition_id: str :ivar scope: The scope for the policy assignment. :vartype scope: str :ivar not_scopes: The policy's excluded scopes. :vartype not_scopes: list[str] :ivar parameters: Required if a parameter is used in policy rule. :vartype parameters: any :ivar description: This message will be part of response in case of policy violation. :vartype description: str :ivar metadata: The policy assignment metadata. :vartype metadata: any :ivar enforcement_mode: The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. Possible values include: "Default", "DoNotEnforce". :vartype enforcement_mode: str or ~azure.mgmt.resource.policy.v2019_06_01.models.EnforcementMode """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'PolicySku'}, 'location': {'key': 'location', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'Identity'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'policy_definition_id': {'key': 'properties.policyDefinitionId', 'type': 'str'}, 'scope': {'key': 'properties.scope', 'type': 'str'}, 'not_scopes': {'key': 'properties.notScopes', 'type': '[str]'}, 'parameters': {'key': 'properties.parameters', 'type': 'object'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'metadata': {'key': 'properties.metadata', 'type': 'object'}, 'enforcement_mode': {'key': 'properties.enforcementMode', 'type': 'str'}, } def __init__( self, *, sku: Optional["PolicySku"] = None, location: Optional[str] = None, identity: Optional["Identity"] = None, display_name: Optional[str] = None, policy_definition_id: Optional[str] = None, scope: Optional[str] = None, not_scopes: Optional[List[str]] = None, parameters: Optional[Any] = None, description: Optional[str] = None, metadata: Optional[Any] = None, enforcement_mode: Optional[Union[str, "EnforcementMode"]] = None, **kwargs ): """ :keyword sku: The policy sku. This property is optional, obsolete, and will be ignored. :paramtype sku: ~azure.mgmt.resource.policy.v2019_06_01.models.PolicySku :keyword location: The location of the policy assignment. Only required when utilizing managed identity. :paramtype location: str :keyword identity: The managed identity associated with the policy assignment. :paramtype identity: ~azure.mgmt.resource.policy.v2019_06_01.models.Identity :keyword display_name: The display name of the policy assignment. :paramtype display_name: str :keyword policy_definition_id: The ID of the policy definition or policy set definition being assigned. :paramtype policy_definition_id: str :keyword scope: The scope for the policy assignment. :paramtype scope: str :keyword not_scopes: The policy's excluded scopes. :paramtype not_scopes: list[str] :keyword parameters: Required if a parameter is used in policy rule. :paramtype parameters: any :keyword description: This message will be part of response in case of policy violation. :paramtype description: str :keyword metadata: The policy assignment metadata. :paramtype metadata: any :keyword enforcement_mode: The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. Possible values include: "Default", "DoNotEnforce". :paramtype enforcement_mode: str or ~azure.mgmt.resource.policy.v2019_06_01.models.EnforcementMode """ super(PolicyAssignment, self).__init__(**kwargs) self.id = None self.type = None self.name = None self.sku = sku self.location = location self.identity = identity self.display_name = display_name self.policy_definition_id = policy_definition_id self.scope = scope self.not_scopes = not_scopes self.parameters = parameters self.description = description self.metadata = metadata self.enforcement_mode = enforcement_mode class PolicyAssignmentListResult(msrest.serialization.Model): """List of policy assignments. :ivar value: An array of policy assignments. :vartype value: list[~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ _attribute_map = { 'value': {'key': 'value', 'type': '[PolicyAssignment]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["PolicyAssignment"]] = None, next_link: Optional[str] = None, **kwargs ): """ :keyword value: An array of policy assignments. :paramtype value: list[~azure.mgmt.resource.policy.v2019_06_01.models.PolicyAssignment] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ super(PolicyAssignmentListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link class PolicyDefinition(msrest.serialization.Model): """The policy definition. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The ID of the policy definition. :vartype id: str :ivar name: The name of the policy definition. :vartype name: str :ivar type: The type of the resource (Microsoft.Authorization/policyDefinitions). :vartype type: str :ivar policy_type: The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: "NotSpecified", "BuiltIn", "Custom". :vartype policy_type: str or ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyType :ivar mode: The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data. :vartype mode: str :ivar display_name: The display name of the policy definition. :vartype display_name: str :ivar description: The policy definition description. :vartype description: str :ivar policy_rule: The policy rule. :vartype policy_rule: any :ivar metadata: The policy definition metadata. :vartype metadata: any :ivar parameters: Required if a parameter is used in policy rule. :vartype parameters: any """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'policy_type': {'key': 'properties.policyType', 'type': 'str'}, 'mode': {'key': 'properties.mode', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'policy_rule': {'key': 'properties.policyRule', 'type': 'object'}, 'metadata': {'key': 'properties.metadata', 'type': 'object'}, 'parameters': {'key': 'properties.parameters', 'type': 'object'}, } def __init__( self, *, policy_type: Optional[Union[str, "PolicyType"]] = None, mode: Optional[str] = None, display_name: Optional[str] = None, description: Optional[str] = None, policy_rule: Optional[Any] = None, metadata: Optional[Any] = None, parameters: Optional[Any] = None, **kwargs ): """ :keyword policy_type: The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: "NotSpecified", "BuiltIn", "Custom". :paramtype policy_type: str or ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyType :keyword mode: The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data. :paramtype mode: str :keyword display_name: The display name of the policy definition. :paramtype display_name: str :keyword description: The policy definition description. :paramtype description: str :keyword policy_rule: The policy rule. :paramtype policy_rule: any :keyword metadata: The policy definition metadata. :paramtype metadata: any :keyword parameters: Required if a parameter is used in policy rule. :paramtype parameters: any """ super(PolicyDefinition, self).__init__(**kwargs) self.id = None self.name = None self.type = None self.policy_type = policy_type self.mode = mode self.display_name = display_name self.description = description self.policy_rule = policy_rule self.metadata = metadata self.parameters = parameters class PolicyDefinitionListResult(msrest.serialization.Model): """List of policy definitions. :ivar value: An array of policy definitions. :vartype value: list[~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinition] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ _attribute_map = { 'value': {'key': 'value', 'type': '[PolicyDefinition]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["PolicyDefinition"]] = None, next_link: Optional[str] = None, **kwargs ): """ :keyword value: An array of policy definitions. :paramtype value: list[~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinition] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ super(PolicyDefinitionListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link class PolicyDefinitionReference(msrest.serialization.Model): """The policy definition reference. :ivar policy_definition_id: The ID of the policy definition or policy set definition. :vartype policy_definition_id: str :ivar parameters: Required if a parameter is used in policy rule. :vartype parameters: any """ _attribute_map = { 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, 'parameters': {'key': 'parameters', 'type': 'object'}, } def __init__( self, *, policy_definition_id: Optional[str] = None, parameters: Optional[Any] = None, **kwargs ): """ :keyword policy_definition_id: The ID of the policy definition or policy set definition. :paramtype policy_definition_id: str :keyword parameters: Required if a parameter is used in policy rule. :paramtype parameters: any """ super(PolicyDefinitionReference, self).__init__(**kwargs) self.policy_definition_id = policy_definition_id self.parameters = parameters class PolicySetDefinition(msrest.serialization.Model): """The policy set definition. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The ID of the policy set definition. :vartype id: str :ivar name: The name of the policy set definition. :vartype name: str :ivar type: The type of the resource (Microsoft.Authorization/policySetDefinitions). :vartype type: str :ivar policy_type: The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: "NotSpecified", "BuiltIn", "Custom". :vartype policy_type: str or ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyType :ivar display_name: The display name of the policy set definition. :vartype display_name: str :ivar description: The policy set definition description. :vartype description: str :ivar metadata: The policy set definition metadata. :vartype metadata: any :ivar parameters: The policy set definition parameters that can be used in policy definition references. :vartype parameters: any :ivar policy_definitions: An array of policy definition references. :vartype policy_definitions: list[~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinitionReference] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'policy_type': {'key': 'properties.policyType', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'metadata': {'key': 'properties.metadata', 'type': 'object'}, 'parameters': {'key': 'properties.parameters', 'type': 'object'}, 'policy_definitions': {'key': 'properties.policyDefinitions', 'type': '[PolicyDefinitionReference]'}, } def __init__( self, *, policy_type: Optional[Union[str, "PolicyType"]] = None, display_name: Optional[str] = None, description: Optional[str] = None, metadata: Optional[Any] = None, parameters: Optional[Any] = None, policy_definitions: Optional[List["PolicyDefinitionReference"]] = None, **kwargs ): """ :keyword policy_type: The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: "NotSpecified", "BuiltIn", "Custom". :paramtype policy_type: str or ~azure.mgmt.resource.policy.v2019_06_01.models.PolicyType :keyword display_name: The display name of the policy set definition. :paramtype display_name: str :keyword description: The policy set definition description. :paramtype description: str :keyword metadata: The policy set definition metadata. :paramtype metadata: any :keyword parameters: The policy set definition parameters that can be used in policy definition references. :paramtype parameters: any :keyword policy_definitions: An array of policy definition references. :paramtype policy_definitions: list[~azure.mgmt.resource.policy.v2019_06_01.models.PolicyDefinitionReference] """ super(PolicySetDefinition, self).__init__(**kwargs) self.id = None self.name = None self.type = None self.policy_type = policy_type self.display_name = display_name self.description = description self.metadata = metadata self.parameters = parameters self.policy_definitions = policy_definitions class PolicySetDefinitionListResult(msrest.serialization.Model): """List of policy set definitions. :ivar value: An array of policy set definitions. :vartype value: list[~azure.mgmt.resource.policy.v2019_06_01.models.PolicySetDefinition] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ _attribute_map = { 'value': {'key': 'value', 'type': '[PolicySetDefinition]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["PolicySetDefinition"]] = None, next_link: Optional[str] = None, **kwargs ): """ :keyword value: An array of policy set definitions. :paramtype value: list[~azure.mgmt.resource.policy.v2019_06_01.models.PolicySetDefinition] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ super(PolicySetDefinitionListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link class PolicySku(msrest.serialization.Model): """The policy sku. This property is optional, obsolete, and will be ignored. All required parameters must be populated in order to send to Azure. :ivar name: Required. The name of the policy sku. Possible values are A0 and A1. :vartype name: str :ivar tier: The policy sku tier. Possible values are Free and Standard. :vartype tier: str """ _validation = { 'name': {'required': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'tier': {'key': 'tier', 'type': 'str'}, } def __init__( self, *, name: str, tier: Optional[str] = None, **kwargs ): """ :keyword name: Required. The name of the policy sku. Possible values are A0 and A1. :paramtype name: str :keyword tier: The policy sku tier. Possible values are Free and Standard. :paramtype tier: str """ super(PolicySku, self).__init__(**kwargs) self.name = name self.tier = tier
Azure/azure-sdk-for-python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/models/_models_py3.py
Python
mit
22,105
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @Daddy_Blamo wrote this file. As long as you retain this notice you # can do whatever you want with this stuff. If we meet some day, and you think # this stuff is worth it, you can buy me a beer in return. - Muad'Dib # ---------------------------------------------------------------------------- ####################################################################### # Addon Name: Placenta # Addon id: plugin.video.placenta # Addon Provider: Mr.Blamo import base64 import json import re import urllib import urlparse from resources.lib.modules import anilist from resources.lib.modules import cache from resources.lib.modules import cleantitle from resources.lib.modules import client from resources.lib.modules import directstream from resources.lib.modules import dom_parser from resources.lib.modules import jsunpack from resources.lib.modules import source_utils from resources.lib.modules import tvmaze class source: def __init__(self): self.priority = 1 self.language = ['de'] self.domains = ['foxx.to'] self.base_link = 'http://foxx.to' self.search_link = '/wp-json/dooplay/search/?keyword=%s&nonce=%s' def movie(self, imdb, title, localtitle, aliases, year): try: url = self.__search([localtitle] + source_utils.aliases_to_array(aliases), year) if not url and title != localtitle: url = self.__search([title] + source_utils.aliases_to_array(aliases), year) if not url and source_utils.is_anime('movie', 'imdb', imdb): url = self.__search([anilist.getAlternativTitle(title)] + source_utils.aliases_to_array(aliases), year) return url except: return def tvshow(self, imdb, tvdb, tvshowtitle, localtvshowtitle, aliases, year): try: url = self.__search([localtvshowtitle] + source_utils.aliases_to_array(aliases), year) if not url and tvshowtitle != localtvshowtitle: url = self.__search([tvshowtitle] + source_utils.aliases_to_array(aliases), year) if not url and source_utils.is_anime('show', 'tvdb', tvdb): url = self.__search([tvmaze.tvMaze().showLookup('thetvdb', tvdb).get('name')] + source_utils.aliases_to_array(aliases), year) return url except: return def episode(self, url, imdb, tvdb, title, premiered, season, episode): try: if not url: return url = urlparse.urljoin(self.base_link, url) url = client.request(url, output='geturl') if season == 1 and episode == 1: season = episode = '' r = client.request(url) r = dom_parser.parse_dom(r, 'ul', attrs={'class': 'episodios'}) r = dom_parser.parse_dom(r, 'a', attrs={'href': re.compile('[^\'"]*%s' % ('-%sx%s' % (season, episode)))})[0].attrs['href'] return source_utils.strip_domain(r) except: return def sources(self, url, hostDict, hostprDict): sources = [] try: if not url: return sources url = urlparse.urljoin(self.base_link, url) r = client.request(url, output='extended') headers = r[3] headers.update({'Cookie': r[2].get('Set-Cookie'), 'Referer': self.base_link}) r = r[0] rels = dom_parser.parse_dom(r, 'nav', attrs={'class': 'player'}) rels = dom_parser.parse_dom(rels, 'ul', attrs={'class': 'idTabs'}) rels = dom_parser.parse_dom(rels, 'li') rels = [(dom_parser.parse_dom(i, 'a', attrs={'class': 'options'}, req='href'), dom_parser.parse_dom(i, 'img', req='src')) for i in rels] rels = [(i[0][0].attrs['href'][1:], re.findall('/flags/(\w+)\.png$', i[1][0].attrs['src'])) for i in rels if i[0] and i[1]] rels = [i[0] for i in rels if len(i[1]) > 0 and i[1][0].lower() == 'de'] r = [dom_parser.parse_dom(r, 'div', attrs={'id': i}) for i in rels] links = re.findall('''(?:link|file)["']?\s*:\s*["'](.+?)["']''', ''.join([i[0].content for i in r])) links += [l.attrs['src'] for i in r for l in dom_parser.parse_dom(i, 'iframe', attrs={'class': 'metaframe'}, req='src')] links += [l.attrs['src'] for i in r for l in dom_parser.parse_dom(i, 'source', req='src')] for i in links: try: i = re.sub('\[.+?\]|\[/.+?\]', '', i) i = client.replaceHTMLCodes(i) if '/play/' in i: i = urlparse.urljoin(self.base_link, i) if self.domains[0] in i: i = client.request(i, headers=headers, referer=url) for x in re.findall('''\(["']?(.*)["']?\)''', i): try: i += jsunpack.unpack(base64.decodestring(re.sub('"\s*\+\s*"', '', x))).replace('\\', '') except: pass for x in re.findall('(eval\s*\(function.*?)</script>', i, re.DOTALL): try: i += jsunpack.unpack(x).replace('\\', '') except: pass links = [(match[0], match[1]) for match in re.findall('''['"]?file['"]?\s*:\s*['"]([^'"]+)['"][^}]*['"]?label['"]?\s*:\s*['"]([^'"]*)''', i, re.DOTALL)] links = [(x[0].replace('\/', '/'), source_utils.label_to_quality(x[1])) for x in links if '/no-video.mp4' not in x[0]] doc_links = [directstream.google('https://drive.google.com/file/d/%s/view' % match) for match in re.findall('''file:\s*["'](?:[^"']+youtu.be/([^"']+))''', i, re.DOTALL)] doc_links = [(u['url'], u['quality']) for x in doc_links if x for u in x] links += doc_links for url, quality in links: if self.base_link in url: url = url + '|Referer=' + self.base_link sources.append({'source': 'gvideo', 'quality': quality, 'language': 'de', 'url': url, 'direct': True, 'debridonly': False}) else: try: # as long as resolveurl get no Update for this URL (So just a Temp-Solution) did = re.findall('youtube.googleapis.com.*?docid=(\w+)', i) if did: i = 'https://drive.google.com/file/d/%s/view' % did[0] valid, host = source_utils.is_host_valid(i, hostDict) if not valid: continue urls, host, direct = source_utils.check_directstreams(i, host) for x in urls: sources.append({'source': host, 'quality': x['quality'], 'language': 'de', 'url': x['url'], 'direct': direct, 'debridonly': False}) except: pass except: pass return sources except: return sources def resolve(self, url): return url def __search(self, titles, year): try: n = cache.get(self.__get_nonce, 24) query = self.search_link % (urllib.quote_plus(cleantitle.query(titles[0])), n) query = urlparse.urljoin(self.base_link, query) t = [cleantitle.get(i) for i in set(titles) if i] y = ['%s' % str(year), '%s' % str(int(year) + 1), '%s' % str(int(year) - 1), '0'] r = client.request(query) r = json.loads(r) r = [(r[i].get('url'), r[i].get('title'), r[i].get('extra').get('date')) for i in r] r = sorted(r, key=lambda i: int(i[2]), reverse=True) # with year > no year r = [i[0] for i in r if cleantitle.get(i[1]) in t and i[2] in y][0] return source_utils.strip_domain(r) except: return def __get_nonce(self): n = client.request(self.base_link) try: n = re.findall('nonce"?\s*:\s*"?([0-9a-zA-Z]+)', n)[0] except: n = '5d12d0fa54' return n
RuiNascimento/krepo
script.module.lambdascrapers/lib/lambdascrapers/sources_ lambdascrapers/de/foxx.py
Python
gpl-2.0
8,359
# Copyright 2009 James P Goodwin ped tiny python editor """ module to implement search for files and search for pattern in files used in the ped editor """ import curses import curses.ascii import sys import os import tempfile from ped_dialog import dialog from ped_core import editor_common import re import traceback from array import array from ped_dialog.message_dialog import message from ped_dialog.stream_select import StreamSelectComponent from ped_dialog.file_browse import FileBrowseComponent from ped_core import keytab def sanitize( text ): """ if a string has binary chunks replace them with hex return fixed up string """ inbytes = array('B') inbytes.fromstring(text) hexchars = "0123456789ABCDEF" outtext = "" index = 0 for i in inbytes: if (i < 32 and (i not in [9,10,13])) or i > 127: hexout = hexchars[i//16] + hexchars[i%16] outtext = outtext + hexout else: outtext = outtext + text[index] index = index + 1 return outtext def contains(fullpath, pattern, found): """ test to see if the file referenced by fullpath contains pattern write result lines to file object found """ try: line = 0 fl = open(fullpath, "r") inline = fl.readline(2048) while inline: sl = sanitize(inline) if re.search(pattern,sl): print("%s:%d:%s"%(fullpath,line,sl.rstrip()), file=found) inline = fl.readline(2048) line += 1 except Exception as e: print("%s:%d:ERROR %s"%(fullpath,line,str(e)), file=found) def where( path, fpat, cpat, recurse, scr ): """ recursively search for a pattern in files starting with path, files matchin re fpat, containing re cpat, if recurse == False only do one directory, if scr is non null then report status in a message dialog""" found = tempfile.TemporaryFile(mode="w+") for (dirpath, dirnames, filenames) in os.walk(path): for f in filenames: if f[0] == ".": continue if f[-1] == "~": continue if f.endswith(".bak") or f.endswith(".pyc"): continue fullpath = os.path.join(dirpath,f) if re.search(r"\.svn",fullpath): continue try: if re.search(fpat,fullpath): if scr and cpat: message(scr,"Searching",fullpath,False) if cpat: contains(fullpath, cpat, found) else: print("%s"%(fullpath), file=found) except Exception as e: print("%s:0:ERROR:%s"%(fullpath,str(e)), file=found) if not recurse: break found.seek(0,0) return found class FileFindDialog(dialog.Dialog): """ dialog subclass that implements a file find dialog with a list of found files/lines preview window and fields for file pattern, contents pattern, recursive search, starting path, buttons for opening the current file in the editor, search again, and cancel """ def __init__(self,scr,title = "File Find Dialog",fpat=".*",cpat="",recurse=False): """ takes the curses window to pop up over, title to display, will dynamically size to parent window """ max_y,max_x = scr.getmaxyx() pw = (max_x - 4) ph = ((max_y-7) // 2) cx = max_x // 2 y = 1 self.found_list = StreamSelectComponent("found",7,cx-(pw//2),y,pw,ph,"Found",where(os.getcwd(),fpat,cpat,recurse,scr)) y += ph self.preview = FileBrowseComponent("browse",8,cx-(pw//2),y,pw,ph,"Preview",None) y += ph self.start_dir = dialog.Prompt("dir",1,2,y,"Path: ",max_x-10,os.getcwd()) y += 1 self.recurse = dialog.Toggle("recurse",2,2,y,20,1,["Search Subdirs","Don't Search Subdirs"]) y += 1 self.file_name = dialog.Prompt("file",2,2,y,"File: ",max_x-10,fpat) y += 1 self.contains = dialog.Prompt("contains",3,2,y,"Contains:",max_x-13,cpat) y += 1 dialog.Dialog.__init__(self,scr,"FileFindDialog", max_y, max_x, [ dialog.Frame(title), self.found_list, self.preview, self.start_dir, self.recurse, self.file_name, self.contains, dialog.Button("search",4,2,y,"SEARCH",dialog.Component.CMP_KEY_NOP), dialog.Button("open",5,2+((max_x-4)//3),y,"OPEN",dialog.Component.CMP_KEY_OK), dialog.Button("cancel",6,2+(((max_x-4)//3)*2),y,"CANCEL",dialog.Component.CMP_KEY_CANCEL)]) def handle(self,ch): """ handles found file selection, populating the preview window, new searches, and opening a file """ focus_index = self.current focus_field = self.focus_list[self.current][1] ret_ch = dialog.Dialog.handle(self,ch) if ch in [keytab.KEYTAB_SPACE,keytab.KEYTAB_CR]: if focus_field == self.found_list: line = focus_field.getvalue().rstrip() fname = None number = 0 if ":" in line: fname,number,rest = line.split(":",2) else: fname = line self.preview.setfilename(fname,int(number)) else: values = self.getvalue() if values["search"]: (recurse,choices) = values["recurse"] self.found_list.setstream(where(values["dir"],values["file"],values["contains"],not recurse,self.getparent())) values["search"] = False self.setvalue(values) idx = 0 while idx < len(self.focus_list): if self.focus_list[idx][1] == self.found_list: self.current = idx break idx += 1 return ret_ch def filefind(scr, title = "File Find Dialog", fpat = ".*", cpat = "", recurse = False): """ wrapper function for finding files, returns either a (filename, line) tuple, or None if canceled """ d = FileFindDialog(scr,title,fpat,cpat,recurse) values = d.main() if "found" in values: line = values["found"].rstrip() number = 0 if ":" in line: fname,number,rest = line.split(":",2) else: fname = line return (fname,int(number)) else: return None def main(stdscr): """ test main driver for file find dialog """ try: d = FileFindDialog(stdscr) d.main() except Exception as e: log = open("file_find.log","w") print(str(e), file=log) print(traceback.format_exc(), file=log) if __name__ == '__main__': try: curses.wrapper(main) except Exception as e: log = open("file_find.log","w") print(str(e), file=log) print(traceback.format_exc(), file=log)
jpfxgood/ped
ped_dialog/file_find.py
Python
mit
7,426
import unittest, os, sys sys.path.append(os.path.abspath('..')) from bayeser import Bayeser from sure import expect class BayeserTest(unittest.TestCase): spam_words = set(['justin bieber is so cool', 'russian hiphop is the best', 'viagra on sale now']) ham_words = set(['african american performance artist', 'jazz age show revives interest in jazz', 'gallery opening portraying slavery']) def test_ham(self): test_words = 'african american bieber cool artist jazz' bayeser = Bayeser(self.ham_words, self.spam_words, test_words) expect(bayeser.classify()).to.equal('ham') def test_spam(self): test_words = 'african american bieber cool artist jazz viagra on sale' bayeser = Bayeser(self.ham_words, self.spam_words, test_words) expect(bayeser.classify()).to.equal('spam') if __name__ == '__main__': unittest.main()
UMNLibraries/hamster
tests/test_bayeser.py
Python
mit
854
import urllib.request, urllib.parse, urllib.error import oauth import hidden def augment(url, parameters) : secrets = hidden.oauth() consumer = oauth.OAuthConsumer(secrets['consumer_key'], secrets['consumer_secret']) token = oauth.OAuthToken(secrets['token_key'],secrets['token_secret']) oauth_request = oauth.OAuthRequest.from_consumer_and_token(consumer, token=token, http_method='GET', http_url=url, parameters=parameters) oauth_request.sign_request(oauth.OAuthSignatureMethod_HMAC_SHA1(), consumer, token) return oauth_request.to_url() def test_me() : print('* Calling Twitter...') url = augment('https://api.twitter.com/1.1/statuses/user_timeline.json', {'screen_name': 'drchuck', 'count': '2'} ) print(url) connection = urllib.request.urlopen(url) data = connection.read() print(data) headers = dict(connection.getheaders()) print(headers)
mkhuthir/learnPython
Book_pythonlearn_com/twitter/twurl.py
Python
mit
923
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. 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. """ The HQLdesign class can (de)serialize a design to/from a QueryDict. """ from future import standard_library standard_library.install_aliases() from builtins import object import json import logging import os import re import sys import urllib.parse import django.http from django import forms from django.forms import ValidationError from notebook.sql_utils import split_statements, strip_trailing_semicolon from desktop.lib.django_forms import BaseSimpleFormSet, MultiForm from hadoop.cluster import get_hdfs if sys.version_info[0] > 2: from django.utils.translation import gettext as _ else: from django.utils.translation import ugettext as _ LOG = logging.getLogger(__name__) SERIALIZATION_VERSION = '0.4.1' def hql_query(hql, database='default', query_type=None, settings=None, file_resources=None, functions=None): data_dict = HQLdesign.get_default_data_dict() if not (isinstance(hql, str) or isinstance(hql, unicode)): raise Exception('Requires a SQL text query of type <str>, <unicode> and not %s' % type(hql)) data_dict['query']['query'] = strip_trailing_semicolon(hql) data_dict['query']['database'] = database if query_type: data_dict['query']['type'] = query_type if settings is not None and HQLdesign.validate_properties('settings', settings, HQLdesign._SETTINGS_ATTRS): data_dict['settings'] = settings if file_resources is not None and HQLdesign.validate_properties('file resources', file_resources, HQLdesign._FILE_RES_ATTRS): data_dict['file_resources'] = file_resources if functions is not None and HQLdesign.validate_properties('functions', functions, HQLdesign._FUNCTIONS_ATTRS): data_dict['functions'] = functions hql_design = HQLdesign() hql_design._data_dict = data_dict return hql_design class HQLdesign(object): """ Represents an HQL design, with methods to perform (de)serialization. We support queries that aren't parameterized, in case users want to use "$" natively, but we leave that as an advanced option to turn off. """ _QUERY_ATTRS = ['query', 'type', 'is_parameterized', 'email_notify', 'database'] _SETTINGS_ATTRS = ['key', 'value'] _FILE_RES_ATTRS = ['type', 'path'] _FUNCTIONS_ATTRS = ['name', 'class_name'] def __init__(self, form=None, query_type=None): """Initialize the design from a valid form data.""" if form is not None: assert isinstance(form, MultiForm) self._data_dict = { 'query': normalize_form_dict(form.query, HQLdesign._QUERY_ATTRS), 'settings': normalize_formset_dict(form.settings, HQLdesign._SETTINGS_ATTRS), 'file_resources': normalize_formset_dict(form.file_resources, HQLdesign._FILE_RES_ATTRS), 'functions': normalize_formset_dict(form.functions, HQLdesign._FUNCTIONS_ATTRS) } if query_type is not None: self._data_dict['query']['type'] = query_type @property def database(self): return self._data_dict['query']['database'] @property def hql_query(self): return self._data_dict['query']['query'] @hql_query.setter def hql_query(self, query): self._data_dict['query']['query'] = query @property def query(self): return self._data_dict['query'].copy() @property def settings(self): return list(self._data_dict.get('settings', [])) @property def file_resources(self): return list(self._data_dict.get('file_resources', [])) @property def functions(self): return list(self._data_dict.get('functions', [])) @property def statement_count(self): return len(self.statements) @property def statements(self): hql_query = strip_trailing_semicolon(self.hql_query) dialect = 'hplsql' if self._data_dict['query']['type'] == 4 else None return [ strip_trailing_semicolon(statement) for (start_row, start_col), (end_row, end_col), statement in split_statements(hql_query, dialect) ] @staticmethod def get_default_data_dict(): return { 'query': { 'email_notify': False, 'query': None, 'type': 0, 'is_parameterized': True, 'database': 'default' }, 'functions': [], 'VERSION': SERIALIZATION_VERSION, 'file_resources': [], 'settings': [] } @staticmethod def loads(data): """Returns an HQLdesign from the serialized form""" dic = json.loads(data) dic = dict([(str(k), dic.get(k)) for k in list(dic.keys())]) if dic['VERSION'] != SERIALIZATION_VERSION: LOG.error('Design version mismatch. Found %s; expect %s' % (dic['VERSION'], SERIALIZATION_VERSION)) # Convert to latest version del dic['VERSION'] if 'type' not in dic['query'] or dic['query']['type'] is None: dic['query']['type'] = 0 if 'database' not in dic['query']: dic['query']['database'] = 'default' design = HQLdesign() design._data_dict = dic return design @staticmethod def validate_properties(property_type, properties, req_attr_list): """ :param property_type: 'Settings', 'File Resources', or 'Functions' :param properties: list of properties as dict :param req_attr_list: list of attributes that are required keys for each dict item """ if isinstance(properties, list) and all(isinstance(item, dict) for item in properties): for item in properties: if not all(attr in item for attr in req_attr_list): raise ValidationError(_("Invalid %s, missing required attributes: %s.") % (property_type, ', '.join(req_attr_list))) else: raise ValidationError(_('Invalid settings, expected list of dict items.')) return True def dumps(self): """Returns the serialized form of the design in a string""" dic = self._data_dict.copy() dic['VERSION'] = SERIALIZATION_VERSION return json.dumps(dic) def get_configuration_statements(self): configuration = [] for f in self.file_resources: if not urllib.parse.urlsplit(f['path']).scheme: scheme = get_hdfs().fs_defaultfs else: scheme = '' configuration.append('ADD %(type)s %(scheme)s%(path)s' % {'type': f['type'].upper(), 'path': f['path'], 'scheme': scheme}) for f in self.functions: configuration.append("CREATE TEMPORARY FUNCTION %(name)s AS '%(class_name)s'" % {'name': f['name'], 'class_name': f['class_name']}) return configuration def get_query_dict(self): # We construct the mform to use its structure and prefix. We don't actually bind data to the forms. from beeswax.forms import QueryForm mform = QueryForm() mform.bind() res = django.http.QueryDict('', mutable=True) res.update(denormalize_form_dict( self._data_dict['query'], mform.query, HQLdesign._QUERY_ATTRS)) res.update(denormalize_formset_dict( self._data_dict['settings'], mform.settings, HQLdesign._SETTINGS_ATTRS)) res.update(denormalize_formset_dict( self._data_dict['file_resources'], mform.file_resources, HQLdesign._FILE_RES_ATTRS)) res.update(denormalize_formset_dict( self._data_dict['functions'], mform.functions, HQLdesign._FUNCTIONS_ATTRS)) return res def get_query(self): return self._data_dict["query"] def get_query_statement(self, n=0): return self.statements[n] def __eq__(self, other): return (isinstance(other, self.__class__) and self.__dict__ == other.__dict__) def __ne__(self, other): return not self.__eq__(other) def normalize_form_dict(form, attr_list): """ normalize_form_dict(form, attr_list) -> A dictionary of (attr, value) Each attr is a field name. And the value is obtained by looking up the form's data dict. """ assert isinstance(form, forms.Form) res = {} for attr in attr_list: res[attr] = form.cleaned_data.get(attr) return res def normalize_formset_dict(formset, attr_list): """ normalize_formset_dict(formset, attr_list) -> A list of dictionary of (attr, value) """ assert isinstance(formset, BaseSimpleFormSet) res = [] for form in formset.forms: res.append(normalize_form_dict(form, attr_list)) return res def denormalize_form_dict(data_dict, form, attr_list): """ denormalize_form_dict(data_dict, form, attr_list) -> A QueryDict with the attributes set """ assert isinstance(form, forms.Form) res = django.http.QueryDict('', mutable=True) for attr in attr_list: try: res[str(form.add_prefix(attr))] = data_dict[attr] except KeyError: pass return res def denormalize_formset_dict(data_dict_list, formset, attr_list): """ denormalize_formset_dict(data_dict, form, attr_list) -> A QueryDict with the attributes set """ assert isinstance(formset, BaseSimpleFormSet) res = django.http.QueryDict('', mutable=True) for i, data_dict in enumerate(data_dict_list): prefix = formset.make_prefix(i) form = formset.form(prefix=prefix) res.update(denormalize_form_dict(data_dict, form, attr_list)) res[prefix + '-_exists'] = 'True' res[str(formset.management_form.add_prefix('next_form_id'))] = str(len(data_dict_list)) return res def __str__(self): return '%s: %s' % (self.__class__, self.query)
cloudera/hue
apps/beeswax/src/beeswax/design.py
Python
apache-2.0
10,010
import numpy as np def mypolyval(p, x): _p = list(p) res = _p.pop(0) while _p: res = res * x + _p.pop(0) return res vpolyval = np.vectorize(mypolyval, excluded=['p']) vpolyval(p=[1,2,3],x=[0,1])
LingboTang/LearningFiles
integration_examples2.py
Python
apache-2.0
203
import json import os from mock import patch from unittest import TestCase, skip, skipIf, main from url import APP_ROOT, TEMPLATES_PATH, ERROR_BACKGROUND from url import replace_underscore from url import tokenize from url import guess_meme_image from url import parse_meme_url from url import derive_meme_path from url import app ON_TRAVIS = "TRAVIS" in os.environ and os.environ["TRAVIS"] == "true" # Maps meme's file name to its common names with open(os.path.join(APP_ROOT, 'memes.json')) as data_file: MEMES = json.load(data_file) class FlaskTestCase(TestCase): def setUp(self): self.app = app.test_client() class TestMemeTemplates(TestCase): def test_error_background_exists(self): self.assertIn(ERROR_BACKGROUND, MEMES.keys()) def test_all_images_exist(self): for meme_name in MEMES.keys(): meme_path = os.path.join(TEMPLATES_PATH, '%s.jpg' % meme_name) self.assertTrue(os.path.isfile(meme_path), 'Missing meme template: %s' % meme_path) def test_no_extra_images_exist(self): for meme_template in os.listdir(TEMPLATES_PATH): if meme_template in ['.DS_Store']: continue self.assertTrue(meme_template.endswith('.jpg'), "Found non jpg file: %s" % meme_template) meme_name = meme_template[:-4] self.assertIn(meme_name, MEMES.keys(), "Found extra jpg file: %s" % meme_template) class TestStringFunctions(TestCase): def test_replace_underscore(self): self.assertEqual('hello world', replace_underscore('hello world')) def test_tokenize(self): self.assertEqual('helloworld', tokenize('hello world')) self.assertEqual('helloworld', tokenize('HELLOWORLD')) class TestMemeUrlParser(TestCase): def test_underscores_are_replaced_with_spaces(self): expected = ' foo', 'bar ', 'b az', 'jpg' self.assertEqual(expected, parse_meme_url('__foo/bar__/b__az.jpg')) def test_discards_extra_arguments(self): expected = 'foo', 'bar', 'baz', 'jpg' self.assertEqual(expected, parse_meme_url('foo/bar/baz/boop.jpg')) def test_handles_too_few_arguments(self): expected = 'foo', '', '', 'jpg' self.assertEqual(expected, parse_meme_url('foo.jpg')) def test_dots_are_preserved(self): expected = '...', '...', 'bar', 'jpg' self.assertEqual(expected, parse_meme_url('.../.../bar.jpg')) def test_unknown_file_extension(self): expected = 'foo', 'bar', 'baz.bloop', 'jpg' self.assertEqual(expected, parse_meme_url('foo/bar/baz.bloop')) @skip('path.splittext() is to blame') def test_dots_in_bottom_text_are_preserved(self): expected = 'foo', 'bar', '...', 'jpg' self.assertEqual(expected, parse_meme_url('foo/bar/....jpg')) class TestMemeGuesser(TestCase): def test_guess_meme_image(self): self.assertEqual('success-kid', guess_meme_image('success')) def test_handles_simple_typos(self): self.assertEqual('success-kid', guess_meme_image('success kyd')) def test_handles_blank_image(self): for name in ['', ' ', 'blank']: self.assertEqual('blank-colored-background', guess_meme_image(name)) class TestMemeFilePath(TestCase): def test_hash(self): path = derive_meme_path('foo', 'bar', 'baz', 'jpg') self.assertTrue(path.endswith('04a4ab04fa79a4d325adc397d9b3e6bd.jpg')) path = derive_meme_path('foo', 'bar', 'baz', 'png') self.assertTrue(path.endswith('04a4ab04fa79a4d325adc397d9b3e6bd.png')) def test_emojis(self): path = derive_meme_path('success-kid', u'\xf0', u'\xf0', 'jpg') self.assertTrue(path.endswith('42025951d83a7977a4e5843c7c1d7e15.jpg')) class TestMemeResponse(FlaskTestCase): def test_meme_json(self): response = self.app.get('success/made_an_assertion/tests_passed.json') expected = { u'image': u'success-kid', u'top': u'made an assertion', u'bottom': u'tests passed' } self.assertEqual(200, response.status_code) self.assertEqual(expected, json.loads(response.get_data(as_text=True))) @skipIf(ON_TRAVIS, 'Image generation does not work on Travis yet') @patch('imgur.upload', return_value='http://imgur.com/MOCK_RESULT') def test_imgur_redirect(self, mock_upload): response = self.app.get('success/uploaded/to_imgur.jpg?host=imgur') self.assertEqual(301, response.status_code) self.assertEqual('http://imgur.com/MOCK_RESULT', response.location) @skipIf(ON_TRAVIS, 'Image generation does not work on Travis yet') def test_good_image_response(self): response = self.app.get('success/made_an_assertion/tests_passed.jpg') self.assertEqual(200, response.status_code) self.assertEqual('image/jpeg', response.mimetype) @skipIf(ON_TRAVIS, 'Image generation does not work on Travis yet') def test_png_response(self): response = self.app.get('success/made_an_assertion/tests_passed.png') self.assertEqual(200, response.status_code) self.assertEqual('image/png', response.mimetype) @skipIf(ON_TRAVIS, 'Image generation does not work on Travis yet') def test_gif_response(self): response = self.app.get('success/made_an_assertion/tests_passed.gif') self.assertEqual(200, response.status_code) self.assertEqual('image/gif', response.mimetype) if __name__ == '__main__': main()
monu27mr/gret
tests.py
Python
mit
5,511
""" Configure the Flask application. """ from logging.config import dictConfig from time import ctime from flask import request from redis import Redis from cheddar import defaults from cheddar.controllers import create_routes from cheddar.errorhandlers import create_errorhandlers from cheddar.history import History from cheddar.index.combined import CombinedIndex from cheddar.index.storage import DistributionStorage from cheddar.model.distribution import Projects def configure_app(app, debug=False, testing=False): """ Load configuration and initialize collaborators. """ app.debug = debug app.testing = testing _configure_from_defaults(app) _configure_from_environment(app) _configure_logging(app) _configure_jinja(app) app.redis = Redis(app.config['REDIS_HOSTNAME']) app.projects = Projects(app.redis, app.logger) app.local_storage = DistributionStorage(app.config["LOCAL_CACHE_DIR"], app.logger) app.remote_storage = DistributionStorage(app.config["REMOTE_CACHE_DIR"], app.logger) app.history = History(app) app.index = CombinedIndex(app) if app.config.get('FORCE_READ_REQUESTS'): # read the request fully so that nginx and uwsgi play nice @app.after_request def read_request(response): request.stream.read() return response create_routes(app) create_errorhandlers(app) def _configure_from_defaults(app): """ Load configuration defaults from defaults.py in this package. """ app.config.from_object(defaults) def _configure_from_environment(app): """ Load configuration from a file specified as the value of the CHEDDAR_SETTINGS environment variable. Don't complain if the variable is unset. """ app.config.from_envvar("CHEDDAR_SETTINGS", silent=True) def _configure_logging(app): if app.debug or app.testing: app.config['LOGGING']['loggers']['']['handlers'] = ['console'] if 'app' in app.config['LOGGING']['handlers']: del app.config['LOGGING']['handlers']['app'] dictConfig(app.config['LOGGING']) def _configure_jinja(app): def islist(obj): return isinstance(obj, list) def localtime(timestamp): return ctime(timestamp) app.jinja_env.filters.update({"islist": islist}) app.jinja_env.filters.update({"localtime": localtime})
jessemyers/cheddar
cheddar/configure.py
Python
apache-2.0
2,383
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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 girder.constants import GIRDER_ROUTE_ID, GIRDER_STATIC_ROUTE_ID, SettingKey from girder.models.setting import Setting from pytest_girder.assertions import assertStatusOk from pytest_girder.utils import getResponseBody from girder.utility.webroot import WebrootBase def testEscapeJavascript(): # Don't escape alphanumeric characters alphaNumString = 'abcxyz0189ABCXYZ' assert WebrootBase._escapeJavascript(alphaNumString) == alphaNumString # Do escape everything else dangerString = 'ab\'"<;>\\YZ' assert WebrootBase._escapeJavascript(dangerString) == \ 'ab\\u0027\\u0022\\u003C\\u003B\\u003E\\u005CYZ' def testAccessWebRoot(server, db): """ Requests the webroot and tests the existence of several elements in the returned html """ # Check webroot default settings defaultEmailAddress = Setting().getDefault(SettingKey.CONTACT_EMAIL_ADDRESS) defaultBrandName = Setting().getDefault(SettingKey.BRAND_NAME) resp = server.request(path='/', method='GET', isJson=False, prefix='') assertStatusOk(resp) body = getResponseBody(resp) assert WebrootBase._escapeJavascript(defaultEmailAddress) in body assert '<title>%s</title>' % defaultBrandName in body assert 'girder_app.min.js' in body assert 'girder_lib.min.js' in body # Change webroot settings Setting().set(SettingKey.CONTACT_EMAIL_ADDRESS, 'foo@bar.com') Setting().set(SettingKey.BRAND_NAME, 'FooBar') resp = server.request(path='/', method='GET', isJson=False, prefix='') assertStatusOk(resp) body = getResponseBody(resp) assert WebrootBase._escapeJavascript('foo@bar.com') in body assert '<title>FooBar</title>' in body # Remove webroot settings Setting().unset(SettingKey.CONTACT_EMAIL_ADDRESS) Setting().unset(SettingKey.BRAND_NAME) resp = server.request(path='/', method='GET', isJson=False, prefix='') assertStatusOk(resp) body = getResponseBody(resp) assert WebrootBase._escapeJavascript(defaultEmailAddress) in body assert '<title>%s</title>' % defaultBrandName in body def testWebRootProperlyHandlesStaticRouteUrls(server, db): Setting().set(SettingKey.ROUTE_TABLE, { GIRDER_ROUTE_ID: '/', GIRDER_STATIC_ROUTE_ID: 'http://my-cdn-url.com/static' }) resp = server.request(path='/', method='GET', isJson=False, prefix='') assertStatusOk(resp) body = getResponseBody(resp) assert 'href="http://my-cdn-url.com/static/img/Girder_Favicon.png"' in body # Same assertion should hold true for Swagger resp = server.request(path='/', method='GET', isJson=False) assertStatusOk(resp) body = getResponseBody(resp) assert 'href="http://my-cdn-url.com/static/img/Girder_Favicon.png"' in body def testWebRootTemplateFilename(): """ Test WebrootBase.templateFilename attribute after initialization and after setting a custom template path. """ webroot = WebrootBase(templatePath='/girder/base_template.mako') assert webroot.templateFilename == 'base_template.mako' webroot.setTemplatePath('/plugin/custom_template.mako') assert webroot.templateFilename == 'custom_template.mako'
data-exp-lab/girder
test/test_webroot.py
Python
apache-2.0
3,979
#!/usr/bin/python # coding=utf-8 # Select address and channel of PCA9571 I2C general purpose outputs # I2C Address: 0x25 Fixed # sudo ./gpo_active.py CHANNEL # Example: sudo ./gpo_active.py 25 255 1 #all relays activates import time import argparse import subprocess import RPi.GPIO as GPIO import smbus def I2C_setup(multiplexer_i2c_address, i2c_channel_setup, state): I2C_address = 0x25 if GPIO.RPI_REVISION in [2, 3]: I2C_bus_number = 1 else: I2C_bus_number = 0 bus = smbus.SMBus(I2C_bus_number) status_outputs=bus.read_byte(I2C_address) if state == 1: i2c_channel_setup=status_outputs|i2c_channel_setup elif state == 0: i2c_channel_setup=(-i2c_channel_setup-1)&status_outputs elif state == -1: i2c_channel_setup=0 bus.write_byte(I2C_address, i2c_channel_setup) #time.sleep(0) def menu(): while 1==1: subprocess.call('./mux_channel.py 72 0', shell=True) #time.sleep(0.1) file = open("rele1_16", "r") address=int(file.readline()) channel_outputs1=int(file.readline()) state1=int(file.readline()) channel_outputs2=int(file.readline()) state2=int(file.readline()) channel_outputs3=int(file.readline()) state3=int(file.readline()) channel_outputs4=int(file.readline()) state4=int(file.readline()) channel_outputs5=int(file.readline()) state5=int(file.readline()) channel_outputs6=int(file.readline()) state6=int(file.readline()) channel_outputs7=int(file.readline()) state7=int(file.readline()) channel_outputs8=int(file.readline()) state8=int(file.readline()) channel_outputs9=int(file.readline()) state9=int(file.readline()) channel_outputs10=int(file.readline()) state10=int(file.readline()) channel_outputs11=int(file.readline()) state11=int(file.readline()) channel_outputs12=int(file.readline()) state12=int(file.readline()) channel_outputs13=int(file.readline()) state13=int(file.readline()) channel_outputs14=int(file.readline()) state14=int(file.readline()) channel_outputs15=int(file.readline()) state15=int(file.readline()) channel_outputs16=int(file.readline()) state16=int(file.readline()) I2C_setup(address, channel_outputs1, state1) I2C_setup(address, channel_outputs2, state2) I2C_setup(address, channel_outputs3, state3) I2C_setup(address, channel_outputs4, state4) I2C_setup(address, channel_outputs5, state5) I2C_setup(address, channel_outputs6, state6) I2C_setup(address, channel_outputs7, state7) I2C_setup(address, channel_outputs8, state8) subprocess.call('./mux_channel.py 72 1', shell=True) #time.sleep(0.1) I2C_setup(address, channel_outputs9, state9) I2C_setup(address, channel_outputs10, state10) I2C_setup(address, channel_outputs11, state11) I2C_setup(address, channel_outputs12, state12) I2C_setup(address, channel_outputs13, state13) I2C_setup(address, channel_outputs14, state14) I2C_setup(address, channel_outputs15, state15) I2C_setup(address, channel_outputs16, state16) subprocess.call('./mux_channel.py 72 0', shell=True) if __name__ == "__main__": menu()
lejubila/piGarden
drv/spb16ch/scripts/rele_1_16_active.py
Python
gpl-2.0
3,117
from django.utils.translation import ugettext_noop from django.utils.translation import ugettext as _ from corehq.apps.reports.standard import CustomProjectReport from corehq.apps.reports.generic import GenericTabularReport from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from casexml.apps.case.models import CommCareCase from corehq.apps.sms.models import ExpectedCallbackEventLog, CALLBACK_PENDING, CALLBACK_RECEIVED, CALLBACK_MISSED from datetime import datetime, timedelta from dimagi.utils.timezones import utils as tz_utils from dimagi.utils.parsing import json_format_datetime from corehq.apps.reports.util import format_datatables_data import pytz from dateutil.parser import parse class MissedCallbackReport(CustomProjectReport, GenericTabularReport): name = ugettext_noop("Missed Callbacks") slug = "missed_callbacks" description = ugettext_noop("Summarizes two weeks of SMS / Callback interactions for all participants.") flush_layout = True def get_past_two_weeks(self): now = datetime.utcnow() local_datetime = tz_utils.adjust_datetime_to_timezone(now, pytz.utc.zone, self.timezone.zone) return [(local_datetime + timedelta(days = x)).date() for x in range(-14, 0)] @property def headers(self): args = [ DataTablesColumn(_("Participant ID")), DataTablesColumn(_("Total No Response")), DataTablesColumn(_("Total Indicated")), DataTablesColumn(_("Total Pending")), ] args += [DataTablesColumn(date.strftime("%b %d")) for date in self.get_past_two_weeks()] return DataTablesHeader(*args) @property def rows(self): group_id = None if self.request.couch_user.is_commcare_user(): group_ids = self.request.couch_user.get_group_ids() if len(group_ids) > 0: group_id = group_ids[0] cases = CommCareCase.view("hqcase/types_by_domain", key=[self.domain, "participant"], reduce=False, include_docs=True).all() data = {} for case in cases: if case.closed: continue # If a site coordinator is viewing the report, only show participants from that site (group) if group_id is None or group_id == case.owner_id: data[case._id] = { "name" : case.name, "time_zone" : case.get_case_property("time_zone"), "dates" : [None for x in range(14)], } dates = self.get_past_two_weeks() date_strings = [date.strftime("%Y-%m-%d") for date in dates] start_date = dates[0] - timedelta(days=1) end_date = dates[-1] + timedelta(days=2) start_utc_timestamp = json_format_datetime(start_date) end_utc_timestamp = json_format_datetime(end_date) expected_callback_events = ExpectedCallbackEventLog.view("sms/expected_callback_event", startkey=[self.domain, start_utc_timestamp], endkey=[self.domain, end_utc_timestamp], include_docs=True).all() for event in expected_callback_events: if event.couch_recipient in data: event_date = tz_utils.adjust_datetime_to_timezone(event.date, pytz.utc.zone, data[event.couch_recipient]["time_zone"]).date() event_date = event_date.strftime("%Y-%m-%d") if event_date in date_strings: data[event.couch_recipient]["dates"][date_strings.index(event_date)] = event.status result = [] for case_id, data_dict in data.items(): row = [ self._fmt(data_dict["name"]), None, None, None, ] total_no_response = 0 total_indicated = 0 total_pending = 0 for date_status in data_dict["dates"]: if date_status == CALLBACK_PENDING: total_indicated += 1 total_pending += 1 row.append(self._fmt(_("pending"))) elif date_status == CALLBACK_RECEIVED: total_indicated += 1 row.append(self._fmt(_("OK"))) elif date_status == CALLBACK_MISSED: total_indicated += 1 total_no_response += 1 row.append(self._fmt_highlight(_("No Response"))) else: row.append(self._fmt(_("not indicated"))) if total_no_response > 0: row[1] = self._fmt_highlight(total_no_response) else: row[1] = self._fmt(total_no_response) row[2] = self._fmt(total_indicated) row[3] = self._fmt(total_pending) result.append(row) return result def _fmt(self, value): return self.table_cell(value, '<div style="text-align:center">%s</div>' % value) def _fmt_highlight(self, value): return self.table_cell(value, '<div style="background-color:#f33; font-weight:bold; text-align:center">%s</div>' % value)
SEL-Columbia/commcare-hq
custom/_legacy/a5288/reports.py
Python
bsd-3-clause
5,576
class A: def method(self): print('This method belongs to class A') class B(A): def method(self): print('This method belongs to class B') class C(A): def method(self): print('This method belongs to class C') #pass class D(C,B): pass d = D() d.method()
cyberlearner13/techshots13
OOOPython/diamond.py
Python
gpl-2.0
302
# -*- coding: utf-8 -*- import requests import datetime import os from voices import find_voice import sys reload(sys) sys.setdefaultencoding('utf-8') class AccessError(Exception): def __init__(self, response): self.status_code = response.status_code data = response.json() error_msg = "" if "message" in data: error_msg = data["message"] elif "error" in data: error_msg = data["error"]["message"] super(AccessError, self).__init__(error_msg) class ArgumentOutOfRangeException(Exception): def __init__(self, message): self.message = message.replace('ArgumentOutOfRangeException: ', '') super(ArgumentOutOfRangeException, self).__init__(self.message) class TranslateApiException(Exception): def __init__(self, message, *args): self.message = message.replace('TranslateApiException: ', '') super(TranslateApiException, self).__init__(self.message, *args) class LanguageException(Exception): def __init__(self, message): self.message = str(message) super(LanguageException, self).__init__(self.message) class AccessToken(object): access_url = "https://eastus.api.cognitive.microsoft.com/sts/v1.0/issueToken" expire_delta = datetime.timedelta(minutes=9) # speech API valid for 10 minutes, actually def __init__(self, subscription_key, region = 'eastus'): if region != 'eastus': self.access_url = self.access_url.replace('eastus', region) self.subscription_key = subscription_key self._token = None self._expdate = None def __call__(self, r): r.headers['Authorization'] = "Bearer " + self.token return r def request_token(self): headers = { 'Ocp-Apim-Subscription-Key': self.subscription_key } resp = requests.post(self.access_url, headers=headers) if resp.status_code == 200: self._token = resp.text self._expdate = datetime.datetime.now() + self.expire_delta else: raise AccessError(resp) @property def expired(self): return datetime.datetime.now() > self._expdate @property def token(self): if not self._token or self.expired: self.request_token() return self._token class Speech(object): """ Implements API for the Bing Speech service """ region = 'eastus' api_url = "https://eastus.tts.speech.microsoft.com/cognitiveservices/v1" def __init__(self, subscription_key, region = 'eastus'): if region != 'eastus': self.api_url = self.api_url.replace('eastus', region) self.auth = AccessToken(subscription_key, region) def make_request(self, headers, data): resp = requests.post(self.api_url, auth=self.auth, headers=headers, data=data) return resp def speak(self, text, lang, gender, format): """ Gather parameters and call. :param text: Text to be sent to Bing TTS API to be converted to speech :param lang: Language to be spoken :param gender: Gender of the speaker :param format: File format (see link below) """ if not gender: gender = 'Female' else: gender = gender.capitalize() if not lang: lang = 'en-US' voice = find_voice(locale=lang, gender=gender, neural=True) if not voice: raise LanguageException("Invalid language/gender combination: %s, %s" % (lang, gender)) if not format: format = 'riff-8khz-8bit-mono-mulaw' headers = { "Content-type": "application/ssml+xml; charset=utf-8", "X-Microsoft-OutputFormat": format, "User-Agent": "TTSForPython" } body = "<speak version='1.0' xml:lang='%s'><voice xml:lang='%s' xml:gender='%s' name='%s'>%s</voice></speak>" % (lang, lang, gender, voice['Name'], str(text)) return self.make_request(headers, body) def speak_to_file(self, file, *args, **kwargs): resp = self.speak(*args, **kwargs) if isinstance(file, str): with open(file, 'wb'): file.write(resp.content) elif hasattr(file, 'write'): file.write(resp.content) else: raise ValueError('Expected filepath or a file-like object') class MSSpeak(object): cache = True def __init__(self, subscription_key, directory='', region='eastus'): """construct Microsoft Translate TTS""" self.speech = Speech(subscription_key, region=region) self.tts_engine = 'bing_speech' self.directory = directory self.filename = None def set_cache(self, value=True): """ Enable Cache of file, if files already stored return this filename """ self.cache = value def speak(self, textstr, lang='en-US', gender='female', format='riff-16khz-16bit-mono-pcm'): """ Run will call Microsoft Translate API and and produce audio """ # print("speak(textstr=%s, lang=%s, gender=%s, format=%s)" % (textstr, lang, gender, format)) concatkey = '%s-%s-%s-%s' % (textstr, lang.lower(), gender.lower(), format) key = self.tts_engine + '' + str(hash(concatkey)) self.filename = '%s-%s.mp3' % (key, lang) # check if file exists fileloc = self.directory + self.filename if self.cache and os.path.isfile(self.directory + self.filename): return self.filename else: with open(fileloc, 'wb') as f: self.speech.speak_to_file(f, textstr, lang, gender, format) return self.filename return False if __name__ == "__main__": subscription_key = 'XXXXXXXXXXXXXXXXXX' speech = Speech(subscription_key) # format = 'riff-16khz-16bit-mono-pcm' format = 'audio-16khz-64kbitrate-mono-mp3' lang = 'en-GB' gender = 'Female' tts_msspeak = MSSpeak(subscription_key, '/tmp/') output_filename = tts_msspeak.speak("Peter Piper Picked a peck of pickled peppers. Complicated words like R.N.I.B., macular degeneration, diabetes and retinitis pigmentosa could also be pronounced.", lang, gender, format) print ("Recorded TTS to /tmp/%s" % output_filename)
newfies-dialer/python-msspeak
msspeak/msspeak.py
Python
mit
6,354
# -*- coding: utf-8 -*- import newrelic.agent from django.http import HttpResponseBadRequest, JsonResponse from django.shortcuts import render from django.utils.translation import ugettext_lazy as _ from django.views.decorators.http import require_GET from kuma.core.decorators import block_user_agents from ..constants import ALLOWED_TAGS, REDIRECT_CONTENT from ..decorators import allow_CORS_GET from ..models import Document, EditorToolbar def ckeditor_config(request): """ Return ckeditor config from database """ default_config = EditorToolbar.objects.filter(name='default') if default_config.exists(): code = default_config[0].code else: code = '' context = { 'editor_config': code, 'redirect_pattern': REDIRECT_CONTENT, 'allowed_tags': ' '.join(ALLOWED_TAGS), } return render(request, 'wiki/ckeditor_config.js', context, content_type='application/x-javascript') @newrelic.agent.function_trace() @block_user_agents @require_GET @allow_CORS_GET def autosuggest_documents(request): """ Returns the closest title matches for front-end autosuggests """ partial_title = request.GET.get('term', '') locale = request.GET.get('locale', False) current_locale = request.GET.get('current_locale', False) exclude_current_locale = request.GET.get('exclude_current_locale', False) if not partial_title: # Only handle actual autosuggest requests, not requests for a # memory-busting list of all documents. return HttpResponseBadRequest(_('Autosuggest requires a partial ' 'title. For a full document ' 'index, see the main page.')) # Retrieve all documents that aren't redirects or templates docs = (Document.objects.extra(select={'length': 'Length(slug)'}) .filter(title__icontains=partial_title, is_template=0, is_redirect=0) .exclude(slug__icontains='Talk:') # Remove old talk pages .order_by('title', 'length')) # All locales are assumed, unless a specific locale is requested or banned if locale: docs = docs.filter(locale=locale) if current_locale: docs = docs.filter(locale=request.LANGUAGE_CODE) if exclude_current_locale: docs = docs.exclude(locale=request.LANGUAGE_CODE) # Generates a list of acceptable docs docs_list = [] for doc in docs: data = doc.get_json_data() data['label'] += ' [' + doc.locale + ']' docs_list.append(data) return JsonResponse(docs_list, safe=False)
ollie314/kuma
kuma/wiki/views/misc.py
Python
mpl-2.0
2,763
from xml.etree import ElementTree as ET def om(tag): return "{http://omeka.org/schemas/omeka-xml/v5}" + tag class Parser(object): def __init__(self): self._parse_item = ItemParser() def read(self, text): doc = ET.fromstring(text) for item in doc.findall(om("item")): itemid, pkt = self._parse_item(item) class ItemParser(object): def __init__(self): pass
BL-Labs/jokedbapp
jokedbapp/parse_omeka.py
Python
mit
395
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- import parted # Basic support for command line history. fdisk(1) doesn't do this, # so we are even better! import readline import sys class ExitMainLoop(Exception): """Exception that signals the job is done""" pass class UnknownCommand(Exception): """Exception raised when user enters invalid command""" pass class Fdisk(object): """Main program class""" def __init__(self, devpath): # Supported commands and corresponding handlers self.commands = { 'a': self.toggle_bootable, 'd': self.delete_partition, 'm': self.print_menu, 'n': self.add_partition, 'o': self.create_empty, 'p': self.print_partitions, 'q': self.quit, 'w': self.write } try: self.device = parted.getDevice(devpath) except parted.IOException as e: raise RuntimeError(e.message) try: self.disk = parted.newDisk(self.device) if self.disk.type != 'msdos': raise RuntimeError('Only MBR partitions are supported') except parted.DiskException: self.create_empty() def do_command(self, cmd): if cmd in self.commands: return self.commands[cmd]() else: raise UnknownCommand() def toggle_bootable(self): """toggle a bootable flag""" if not self.disk.partitions: print 'No partition is defined yet!' return number = self._ask_partition() for p in self.disk.partitions: # handle partitions not in disk order if p.number == number: if not p.getFlag(parted.PARTITION_BOOT): p.setFlag(parted.PARTITION_BOOT) else: p.unsetFlag(parted.PARTITION_BOOT) break def delete_partition(self): """delete a partition""" if not self.disk.partitions: print 'No partition is defined yet!' number = self._ask_partition() for p in self.disk.partitions: # handle partitions not in disk order if p.number == number: try: self.disk.deletePartition(p) except parted.PartitionException as e: print e.message break def print_menu(self): """print this menu""" print "Command action" for (command, fun) in self.commands.iteritems(): print '{0:^7}{1}'.format(command, fun.__doc__) def add_partition(self): """add a new partition""" # Primary partitions count pri_count = len(self.disk.getPrimaryPartitions()) # HDDs may contain only one extended partition ext_count = 1 if self.disk.getExtendedPartition() else 0 # First logical partition number lpart_start = self.disk.maxPrimaryPartitionCount + 1 # Number of spare partitions slots parts_avail = self.disk.maxPrimaryPartitionCount - (pri_count + ext_count) data = { 'primary': pri_count, 'extended': ext_count, 'free': parts_avail, 'first_logical': lpart_start } default = None options = set() geometry = self._get_largest_free_region() if not geometry: print 'No free sectors available' return if not parts_avail and not ext_count: print """If you want to create more than four partitions, you must replace a primary partition with an extended partition first.""" return else: print "Partition type:" if parts_avail: default = 'p' options.add('p') print ' p primary ({primary:d} primary, {extended:d} extended, {free:d} free)'.format(**data) if not ext_count: # If we have only one spare partition, suggest extended if pri_count >= 3: default = 'e' options.add('e') print ' e extended' if ext_count: # XXX: We do not observe disk.getMaxLogicalPartitions() constraint default = default or 'l' options.add('l') print ' l logical (numbered from {first_logical:d})'.format(**data) # fdisk doesn't display a menu if it has only one option, but we do choice = raw_input('Select (default {default:s}): '.format(default=default)) if not choice: print "Using default response {default:s}".format(default=default) choice = default if not choice[0] in options: print "Invalid partition type `{choice}'".format(choice=choice) return try: partition = None ext_part = self.disk.getExtendedPartition() if choice[0] == 'p': # If there is an extended partition, we look for free region that is # completely outside of it. if ext_part: try: ext_part.geometry.intersect(geometry) print 'No free sectors available' return except ArithmeticError: # All ok pass partition = self._create_partition(geometry, type=parted.PARTITION_NORMAL) elif choice[0] == 'e': # Create extended partition in the largest free region partition = self._create_partition(geometry, type=parted.PARTITION_EXTENDED) elif choice[0] == 'l': # Largest free region must be (at least partially) inside the # extended partition. try: geometry = ext_part.geometry.intersect(geometry) except ArithmeticError: print "No free sectors available" return partition = self._create_partition(geometry, type=parted.PARTITION_LOGICAL) if partition: print 'Partition number {number:d} created'.format(number=partition.number) except RuntimeError as e: print e.message def create_empty(self): """create a new empty DOS partition table""" print """ Device contains no valid DOS partition table. Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable.""" self.disk = parted.freshDisk(self.device, 'msdos') def print_partitions(self): """print the partition table""" # Shortcuts device, disk = self.device, self.disk unit = device.sectorSize size = device.length * device.sectorSize cylinders, heads, sectors = device.hardwareGeometry data = { 'path': device.path, 'size': size, 'size_mbytes': int(parted.formatBytes(size, 'MB')), 'heads': heads, 'sectors': sectors, 'cylinders': cylinders, 'sectors_total': device.length, 'unit': unit, 'sector_size': device.sectorSize, 'physical_sector_size': device.physicalSectorSize, # Try to guess minimum_io_size and optimal_io_size, should work under Linux 'minimum_io_size': device.minimumAlignment.grainSize * device.sectorSize, 'optimal_io_size': device.optimumAlignment.grainSize * device.sectorSize, } # TODO: Alignment offset: disk.startAlignment if disk.startAlignment != 0 print """ Disk {path}: {size_mbytes:d} MB, {size:d} bytes {heads:d} heads, {sectors:d} sectors/track, {cylinders:d} cylinders, total {sectors_total:d} sectors Units = 1 * sectors of {unit:d} = {unit:d} bytes Sector size (logical/physical): {sector_size:d} bytes / {physical_sector_size:d} bytes I/O size (minimum/optimal): {minimum_io_size:d} bytes / {optimal_io_size:d} bytes """.format(**data) # Calculate first column width: if there is something in it, there should be enough space # If not, give it the minimum to fit the caption nicely width = len(disk.partitions[0].path) if disk.partitions else len('Device') + 1 print "{0:>{width}} Boot Start End Blocks Id System".format('Device', width=width) for p in disk.partitions: boot = '*' if p.getFlag(parted.PARTITION_BOOT) else '' # Assume default 1K-blocks blocks = int(parted.formatBytes(p.geometry.length * device.sectorSize, 'KiB')) data = { 'path': p.path, 'boot': boot, 'start': p.geometry.start, 'end': p.geometry.end, 'blocks': blocks, 'id': p.number, 'system': self._guess_system(p), } print "{path:>}{boot:>4}{start:>12d}{end:>12d}{blocks:>12d}{id:>5d} {system}".format(**data) return device, disk def quit(self): """quit without saving change""" raise ExitMainLoop() def write(self): """write table to disk and exit""" self.disk.commit() raise ExitMainLoop() # Protected helper methods def _ask_value(self, prompt, default=None, parse=None): """Asks user for a value using prompt, parse using parse if necessary""" value = None while not value: choice = raw_input(prompt) if not choice: if default: print 'Using default value {default:s}'.format(default=str(default)) value = default else: try: value = parse(choice) if parse else choice except ValueError: print "Invalid value" continue return value def _ask_partition(self): """Asks user for a partition number""" last_part = self.disk.lastPartitionNumber number = self._ask_value("Partition number (1-{last_part:d}): ".format(last_part=last_part), parse=lambda x: int(x)) return number def _parse_last_sector_expr(self, start, value, sector_size): """Parses fdisk(1)-style partition end exception""" import re # map fdisk units to PyParted ones known_units = {'K': 'KiB', 'M': 'MiB', 'G': 'GiB', 'KB': 'kB', 'MB': 'MB', 'GB': 'GB'} match = re.search('^\+(?P<num>\d+)(?P<unit>[KMG]?)$', value) if match: # num must be an integer; if not, raise ValueError num = int(match.group('num')) unit = match.group('unit') if not unit: # +sectors sector = start + num return sector elif unit in known_units.keys(): # +size{K,M,G} sector = start + parted.sizeToSectors(num, known_units[unit], sector_size) return sector else: # must be an integer (sector); if not, raise ValueError sector = int(value) return sector def _create_partition(self, region, type=parted.PARTITION_NORMAL): """Creates the partition with geometry specified""" # libparted doesn't let setting partition number, so we skip it, too # We want our new partition to be optimally aligned # (you can use minimalAlignedConstraint, if you wish). alignment = self.device.optimalAlignedConstraint constraint = parted.Constraint(maxGeom=region).intersect(alignment) data = { 'start': constraint.startAlign.alignUp(region, region.start), 'end': constraint.endAlign.alignDown(region, region.end), } # Ideally, ask_value() should immediately check that value is in range. We sacrifice # this feature to demonstrate the exception raised when a partition doesn't meet the constraint. part_start = self._ask_value( 'First sector ({start:d}-{end:d}, default {start:d}): '.format(**data), data['start'], lambda x: int(x)) part_end = self._ask_value( 'Last sector, +sectors or +size{{K,M,G}} ({start:d}-{end:d}, default {end:d}): '.format(**data), data['end'], lambda x: self._parse_last_sector_expr(part_start, x, self.device.sectorSize)) try: partition = parted.Partition( disk=self.disk, type=type, geometry=parted.Geometry(device=self.device, start=part_start, end=part_end) ) self.disk.addPartition(partition=partition, constraint=constraint) except (parted.PartitionException, parted.GeometryException, parted.CreateException) as e: # GeometryException accounts for incorrect start/end values (e.g. start < end), # CreateException is raised e.g. when the partition doesn't fit on the disk. # PartedException is a generic error (e.g. start/end values out of range) raise RuntimeError(e.message) return partition def _guess_system(self, partition): """Tries to guess partition type""" if not partition.fileSystem: if partition.getFlag(parted.PARTITION_SWAP): return 'Linux swap / Solaris' elif partition.getFlag(parted.PARTITION_RAID): return 'Linux raid autodetect' elif partition.getFlag(parted.PARTITION_LVM): return 'Linux LVM' else: return 'unknown' else: if partition.fileSystem.type in {'ext2', 'ext3', 'ext4', 'btrfs', 'reiserfs', 'xfs', 'jfs'}: return 'Linux' # If mkswap(1) was run on the partition, upper branch won't be executed elif partition.fileSystem.type.startswith('linux-swap'): return 'Linux swap / Solaris' elif partition.fileSystem.type == 'fat32': return 'W95 FAT32' elif partition.fileSystem.type == 'fat16': return 'W95 FAT16' elif partition.fileSystem.type == 'ntfs': return 'HPFS/NTFS/exFAT' else: return 'unknown' def _get_largest_free_region(self): """Finds largest free region on the disk""" # There are better ways to do it, but let's be straightforward max_size = -1 region = None alignment = self.device.optimumAlignment for r in self.disk.getFreeSpaceRegions(): # Heuristic: Ignore alignment gaps if r.length > max_size and r.length > alignment.grainSize: region = r max_size = r.length return region def usage(): print """ Usage: fdisk <disk> change partition table """ def main(): if len(sys.argv) < 2: usage() sys.exit(1) try: fdisk = Fdisk(devpath=sys.argv[1]) except RuntimeError as e: print e.message sys.exit(1) while True: c = raw_input('\nCommand (m for help): ') try: fdisk.do_command(c[0]) except UnknownCommand: fdisk.print_menu() except ExitMainLoop: sys.exit(0) if __name__ == '__main__': main()
vsinitsyn/fdisk.py
fdisk.py
Python
unlicense
15,691
import logging import os import subprocess from requests.exceptions import HTTPError from git.exc import NoSuchPathError from assigner.roster_util import get_filtered_roster from assigner.backends import RepoError from assigner.backends.decorators import requires_config_and_backend from assigner import progress help = "Add and commit changes to student repos" logger = logging.getLogger(__name__) @requires_config_and_backend def push(conf, backend, args): _push(conf, backend, args) def _push(conf, backend, args): backend_conf = conf.backend namespace = conf.namespace semester = conf.semester hw_name = args.name hw_path = args.path message = args.message branch = args.branch add = args.add remove = args.remove update = args.update allow_empty = args.allow_empty gpg_sign = args.gpg_sign # Default behavior: commit changes to all tracked files if (add == []) and (remove == []): logging.debug("Nothing explicitly added or removed; defaulting to git add --update") update = True path = os.path.join(hw_path, hw_name) roster = get_filtered_roster(conf.roster, args.section, args.student) for student in progress.iterate(roster): username = student["username"] student_section = student["section"] full_name = backend.student_repo.build_name(semester, student_section, hw_name, username) has_changes = False try: repo = backend.student_repo(backend_conf, namespace, full_name) repo_dir = os.path.join(path, username) repo.add_local_copy(repo_dir) logging.debug("%s: checking out branch %s", full_name, branch) repo.get_head(branch).checkout() index = repo.get_index() if update: # Stage modified and deleted files for commit # This exactly mimics the behavior of git add --update # (or the effect of doing git commit -a) for change in index.diff(None): has_changes = True if change.deleted_file: logging.debug("%s: git rm %s", full_name, change.b_path) index.remove([change.b_path]) else: logging.debug("%s: git add %s", full_name, change.b_path) index.add([change.b_path]) if add: has_changes = True logging.debug("%s: adding %s", full_name, add) index.add(add) if remove: has_changes = True logging.debug("%s: removing %s", full_name, remove) index.remove(remove) if has_changes or allow_empty: logging.debug("%s: committing changes with message %s", full_name, message) if gpg_sign: # The GitPython interface does not support signed commits, and # launching via repo.git.commit will launch an inaccessible # interactive prompt in the background index.write(ignore_extension_data=True) subprocess.check_call(["git", "commit", "-S", "-m", '"{}"'.format(message)], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, cwd=repo_dir) else: index.commit(message) else: logging.warning("%s: No changes in repo; skipping commit.", full_name) except NoSuchPathError: logging.warning("Local repo for %s does not exist; skipping...", username) except RepoError as e: logging.warning(e) except HTTPError as e: if e.response.status_code == 404: logging.warning("Repository %s does not exist.", full_name) else: raise def setup_parser(parser): parser.add_argument("name", help="Name of the assignment to commit to.") parser.add_argument("message", help="Commit message") parser.add_argument("path", default=".", nargs="?", help="Path of student repositories to commit to") parser.add_argument("--branch", nargs="?", default="master", help="Local branch to commit to") parser.add_argument("-a", "--add", nargs="+", dest="add", default=[], help="Files to add before committing") parser.add_argument("-r", "--remove", nargs="+", dest="remove", default=[], help="Files to remove before committing") parser.add_argument("-u", "--update", action="store_true", dest="update", help="Include all changed files (i.e., git add -u or git commit -a)") parser.add_argument("-e", "--allow-empty", action="store_true", dest="allow_empty", help="Commit even if there are no changes to commit") parser.add_argument("-S", "--gpg-sign", action="store_true", dest="gpg_sign", help="GPG-sign the commits using the committer identity") parser.add_argument("--section", nargs="?", help="Section to commit to") parser.add_argument("--student", metavar="id", help="ID of student whose assignment is to be committed to.") parser.set_defaults(run=push)
tymorrow/assigner
assigner/commands/commit.py
Python
mit
5,551
import os import glob import pyfits import numpy as np arcperpix = 3. * 60. bands = ['I1', 'I2', 'I3', 'I4', 'M1', 'S3', 'S4'] n_groups = 8 nx = 5 ny = 7 def rms(values): return np.mean(values ** 2) variance = {} for model in glob.glob('models/basic/images_total_*_conv.fits'): variance[model] = {} variance[model]['lon'] = {} variance[model]['lat'] = {} # Extract model name model_name = os.path.basename(model).replace('_conv.fits', '').replace('images_total_', '') # Define longitude scale l = np.linspace(65., -65., 130) b = np.linspace(-1., 1., 40) # Read in flux flux_lon = pyfits.getdata('models/basic/images_lon_%s_conv.fits' % model_name)[:, 0, :, :] flux_lat = pyfits.getdata('models/basic/images_lat_%s_conv.fits' % model_name)[:, :, 0, :] vl = [] vb = [] # Loop through the four IRAC bands for inu in range(len(bands)): # Read in data data_lon = np.loadtxt('images/profiles/profile_%s_lon.txt' % bands[inu]) data_lat = np.loadtxt('images/profiles/profile_%s_lat.txt' % bands[inu]) dl, dlf = data_lon[:, 0], data_lon[:, 1] db, dbf = data_lat[:, 0], data_lat[:, 1] flux_total = flux_lon.sum(axis=2)[inu, :] mlf = np.interp(dl, l[::-1], flux_total[::-1]) flux_total = flux_lat.sum(axis=2)[inu, :] mbf = np.interp(db, b, flux_total) kl = (mlf > 0.) & (dlf > 0.) kb = (mbf > 0.) & (dbf > 0.) variance[model]['lon'][inu] = rms(np.log10(dlf[kl]) - np.log10(mlf[kl])) variance[model]['lat'][inu] = rms(np.log10(dbf[kb]) - np.log10(mbf[kb])) means = {} for model in ['original', 'updarm_gaussian', 'updarm_gaussian_hole', 'updarm_gaussian_hole_morepah']: full_model = 'models/basic/images_total_sky_' + model + '_conv.fits' means[full_model] = {} for direction in ['lon', 'lat']: means[full_model][direction] = [] for inu in range(len(bands)): line = [] for model in ['original', 'updarm_gaussian', 'updarm_gaussian_hole', 'updarm_gaussian_hole_morepah']: full_model = 'models/basic/images_total_sky_' + model + '_conv.fits' for direction in ['lon', 'lat']: line.append("%6.4f" % variance[full_model][direction][inu]) means[full_model][direction].append(variance[full_model][direction][inu]) line = ' & '.join(line) print line line = [] for model in ['original', 'updarm_gaussian', 'updarm_gaussian_hole', 'updarm_gaussian_hole_morepah']: full_model = 'models/basic/images_total_sky_' + model + '_conv.fits' for direction in ['lon', 'lat']: line.append("%6.4f" % np.mean(means[full_model][direction])) line = ' & '.join(line) print line
hyperion-rt/paper-galaxy-rt-model
scripts/fit_profiles.py
Python
bsd-2-clause
2,724
# # # Copyright 2012-2014 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (http://www.herculesstichting.be/in_English) # and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en). # # http://github.com/hpcugent/easybuild # # EasyBuild 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 v2. # # EasyBuild 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 EasyBuild. If not, see <http://www.gnu.org/licenses/>. # # """ Unit tests for filetools.py @author: Toon Willems (Ghent University) @author: Kenneth Hoste (Ghent University) @author: Stijn De Weirdt (Ghent University) """ import os from test.framework.utilities import EnhancedTestCase from unittest import TestLoader, main from vsc.utils.fancylogger import setLogLevelDebug, logToScreen from easybuild.tools.build_log import EasyBuildError from easybuild.tools.run import run_cmd, run_cmd_qa, parse_log_for_error from easybuild.tools.run import _log as run_log class RunTest(EnhancedTestCase): """ Testcase for run module """ def test_run_cmd(self): """Basic test for run_cmd function.""" (out, ec) = run_cmd("echo hello") self.assertEqual(out, "hello\n") # no reason echo hello could fail self.assertEqual(ec, 0) def test_run_cmd_bis(self): """More 'complex' test for run_cmd function.""" # a more 'complex' command to run, make sure all required output is there (out, ec) = run_cmd("for j in `seq 1 3`; do for i in `seq 1 100`; do echo hello; done; sleep 1.4; done") self.assertTrue(out.startswith('hello\nhello\n')) self.assertEqual(len(out), len("hello\n"*300)) self.assertEqual(ec, 0) def test_run_cmd_qa(self): """Basic test for run_cmd_qa function.""" (out, ec) = run_cmd_qa("echo question; read x; echo $x", {"question": "answer"}) self.assertEqual(out, "question\nanswer\n") # no reason echo hello could fail self.assertEqual(ec, 0) def test_run_cmd_qa_answers(self): """Test providing list of answers in run_cmd_qa.""" cmd = "echo question; read x; echo $x; " * 2 qa = {"question": ["answer1", "answer2"]} (out, ec) = run_cmd_qa(cmd, qa) self.assertEqual(out, "question\nanswer1\nquestion\nanswer2\n") self.assertEqual(ec, 0) (out, ec) = run_cmd_qa(cmd, {}, std_qa=qa) self.assertEqual(out, "question\nanswer1\nquestion\nanswer2\n") self.assertEqual(ec, 0) self.assertErrorRegex(EasyBuildError, "Invalid type for answer", run_cmd_qa, cmd, {'q': 1}) # test cycling of answers cmd = cmd * 2 (out, ec) = run_cmd_qa(cmd, {}, std_qa=qa) self.assertEqual(out, "question\nanswer1\nquestion\nanswer2\n" * 2) self.assertEqual(ec, 0) def test_run_cmd_simple(self): """Test return value for run_cmd in 'simple' mode.""" self.assertEqual(True, run_cmd("echo hello", simple=True)) self.assertEqual(False, run_cmd("exit 1", simple=True, log_all=False, log_ok=False)) def test_parse_log_error(self): """Test basic parse_log_for_error functionality.""" errors = parse_log_for_error("error failed", True) self.assertEqual(len(errors), 1) def test_run_cmd_suse(self): """Test run_cmd on SuSE systems, which have $PROFILEREAD set.""" # avoid warning messages run_log_level = run_log.getEffectiveLevel() run_log.setLevel('ERROR') # run_cmd should also work if $PROFILEREAD is set (very relevant for SuSE systems) profileread = os.environ.get('PROFILEREAD', None) os.environ['PROFILEREAD'] = 'profilereadxxx' try: (out, ec) = run_cmd("echo hello") except Exception, err: out, ec = "ERROR: %s" % err, 1 # make sure it's restored again before we can fail the test if profileread is not None: os.environ['PROFILEREAD'] = profileread else: del os.environ['PROFILEREAD'] self.assertEqual(out, "hello\n") self.assertEqual(ec, 0) run_log.setLevel(run_log_level) def suite(): """ returns all the testcases in this module """ return TestLoader().loadTestsFromTestCase(RunTest) if __name__ == '__main__': #logToScreen(enable=True) #setLogLevelDebug() main()
mesocentrefc/easybuild-framework
test/framework/run.py
Python
gpl-2.0
4,976
"""Gaussian process experiments."""
kastnerkyle/gp2
gp2/__init__.py
Python
bsd-3-clause
36
#!/usr/bin/env python3 from os import mkdir, listdir from os.path import isdir, isfile #import time import datetime import numpy as np from matplotlib import pyplot as plt from scipy.optimize import brute, least_squares import h5py from LoLIM.utilities import processed_data_dir, v_air, antName_is_even, BoundingBox_collision, logger from LoLIM.IO.raw_tbb_IO import filePaths_by_stationName, MultiFile_Dal1, read_station_delays, read_antenna_pol_flips, read_bad_antennas, read_antenna_delays from LoLIM.findRFI import window_and_filter from LoLIM.signal_processing import remove_saturation, data_cut_inspan, locate_data_loss from LoLIM.iterativeMapper.cython_utils import parabolic_fitter, planewave_locator_helper, autoadjusting_upsample_and_correlate, \ pointsource_locator, abs_max def do_nothing(*A, **B): pass ############# HEADER TOOLS ################### from LoLIM.iterativeMapper.mapper_header import read_planewave_fits, make_header, read_header ############# DATA MANAGER #################### class raw_data_manager: def __init__(self, header, print_func=do_nothing): #### variables #### self.blocksize = header.blocksize self.num_dataLoss_zeros = header.num_zeros_dataLoss_Threshold self.positive_saturation = header.positive_saturation self.negative_saturation = header.negative_saturation self.saturation_removal_length = header.saturation_removal_length self.saturation_half_hann_length = header.saturation_half_hann_length self.half_hann_safety_region = int(header.hann_window_fraction*self.blocksize) + 5 self.remove_saturation = header.remove_saturation self.remove_RFI = header.remove_RFI raw_fpaths = filePaths_by_stationName( header.timeID ) #### get data from files #### ## objects that are length of number of stations self.station_data_files = [] self.RFI_filters = [] self.station_to_antSpan = np.empty( [header.num_stations,2], dtype=np.int ) self.station_locations = np.empty( [header.num_stations,3], dtype=np.double ) self.is_RS = np.empty( header.num_stations, dtype=bool ) ## objects by number of antennas self.station_antenna_index = np.empty(header.num_total_antennas, dtype=np.int) self.antenna_expected_RMS = np.empty(header.num_total_antennas, dtype=np.double) self.antI_to_station = np.empty(header.num_total_antennas, dtype=np.int) self.antenna_locations = np.empty( [header.num_total_antennas,3], dtype=np.double ) self.antenna_delays = np.empty(header.num_total_antennas, dtype=np.double) self.antenna_names = [] next_ant_i = 0 for sname, antenna_list in zip(header.station_names, header.antenna_info): print_func('opening', sname) stat_i = len( self.station_data_files ) raw_data_file = MultiFile_Dal1(raw_fpaths[sname], polarization_flips=header.pol_flips, pol_flips_are_bad=header.pol_flips_are_bad) data_filter = window_and_filter(timeID=header.timeID, sname=sname, half_window_percent=header.hann_window_fraction) self.station_data_files.append( raw_data_file ) self.RFI_filters.append( data_filter ) if data_filter.blocksize != self.blocksize: print_func("RFI info from station", sname, "has wrong block size of", data_filter.blocksize, '. expected', self.blocksize) quit() first_ant_i = next_ant_i station_antenna_names = raw_data_file.get_antenna_names() for ant in antenna_list: self.antenna_names.append( ant.ant_name ) self.station_antenna_index[ next_ant_i ] = station_antenna_names.index( ant.ant_name ) self.antenna_expected_RMS[ next_ant_i ] = ant.planewave_RMS self.antenna_locations[ next_ant_i ] = ant.location self.antenna_delays[ next_ant_i ] = ant.delay next_ant_i += 1 self.antI_to_station[ first_ant_i:next_ant_i ] = stat_i self.station_locations[ stat_i ] = np.average( self.antenna_locations[ first_ant_i:next_ant_i ], axis=0 ) self.station_to_antSpan[ stat_i, 0] = first_ant_i self.station_to_antSpan[ stat_i, 1] = next_ant_i self.is_RS[ stat_i ] = sname[:2]=='RS' #### allocate memory #### self.raw_data = np.empty( [header.num_total_antennas,self.blocksize], dtype=np.complex ) self.tmp_workspace = np.empty( self.blocksize, dtype=np.complex ) self.antenna_data_loaded = np.zeros( header.num_total_antennas, dtype=bool ) self.starting_time = np.empty(header.num_total_antennas, dtype=np.double) ## real time of the first sample in raw data self.referance_ave_delay = np.average( self.antenna_delays[self.station_to_antSpan[0,0]:self.station_to_antSpan[0,1]] ) # self.antenna_delays -= self.referance_ave_delay self.staturation_removals = [ [] ]*header.num_total_antennas self.data_loss_spans = [ [] ]*header.num_total_antennas def get_station_location(self, station_i): return self.station_locations[ station_i ] def antI_to_sname(self, ant_i): station_i = self.antI_to_station[ ant_i ] stationFile = self.station_data_files[ station_i ] return stationFile.get_station_name() def antI_to_antName(self, ant_i): return self.antenna_names[ ant_i ] def statI_to_sname(self, stat_i): return self.station_data_files[ stat_i ].get_station_name() def get_antI_span(self, station_i): return self.station_to_antSpan[ station_i ] def get_antenna_locations(self, station_i): span = self.station_to_antSpan[ station_i ] return self.antenna_locations[ span[0]:span[1] ] def open_antenna_SampleNumber(self, antenna_i, sample_number): """opens the data for a station, where every antenna starts at the given sample number. Returns the data block for this station, and the start times for each antenna""" # print('opening:', antenna_i) station_i = self.antI_to_station[ antenna_i ] stationFile = self.station_data_files[ station_i ] data_filter = self.RFI_filters[ station_i ] station_antenna_index = self.station_antenna_index[ antenna_i ] TMP = stationFile.get_data(sample_number, self.blocksize, antenna_index=station_antenna_index ) if len(TMP) != self.blocksize: MSG = 'data length wrong. is: ' + str(len(TMP)) + " should be " + str(self.blocksize) + ". sample: " + \ str(sample_number) + ". antenna: " + str(station_antenna_index) + ". station: " + stationFile.get_station_name() raise Exception( MSG ) self.data_loss_spans[ antenna_i ], DL = locate_data_loss(TMP, self.num_dataLoss_zeros) self.tmp_workspace[:] = TMP if self.remove_saturation: self.staturation_removals[antenna_i] = remove_saturation( self.tmp_workspace, self.positive_saturation, self.negative_saturation, self.saturation_removal_length, self.saturation_half_hann_length ) else: self.staturation_removals[antenna_i] = [] if self.remove_RFI: self.raw_data[ antenna_i ] = data_filter.filter( self.tmp_workspace ) else: self.raw_data[ antenna_i ] = self.tmp_workspace self.starting_time[ antenna_i ] = sample_number*5E-9 - self.antenna_delays[ antenna_i ] self.antenna_data_loaded[ antenna_i ] = True return self.raw_data[ antenna_i ], self.starting_time[ antenna_i ] def open_station_SampleNumber(self, station_i, sample_number): """opens the data for a station, where every antenna starts at the given sample number. Returns the data block for this station, and the start times for each antenna""" antI_span = self.station_to_antSpan[ station_i ] for antI in range(antI_span[0],antI_span[1]): self.open_antenna_SampleNumber( antI, sample_number ) return self.raw_data[ antI_span[0]:antI_span[1] ], self.starting_time[antI_span[0]:antI_span[1]] def get_station_safetySpan(self, station_i, start_time, stop_time): """returns the data and start times for a station (same as open_station_SampleNumber), insuring that the data between start_time and stop_time is valid for all antennas in this station. (assume the duration is smaller then a block). If new data is opened, then start_time is aligned to just after the beginning of the file.""" antI_span = self.station_to_antSpan[ station_i ] do_load = False if not self.station_data_loaded[ station_i ]: do_load = True else: present_start_time = np.max( self.starting_time[antI_span[0]:antI_span[1]] ) + self.half_hann_safety_region*5.0E-9 is_safe = present_start_time < start_time present_end_time = np.min( self.starting_time[antI_span[0]:antI_span[1]] ) + self.blocksize*5.0E-9 - self.half_hann_safety_region*5.0E-9 is_safe = is_safe and present_end_time>stop_time do_load = not is_safe if do_load: antenna_delays = self.antenna_delays[ antI_span[0]:antI_span[1] ] start_sample_number = int( (start_time + min( antenna_delays ))/5.0E-9 ) + 1 start_sample_number -= self.half_hann_safety_region self.open_station_SampleNumber( station_i, start_sample_number ) return self.raw_data[ antI_span[0]:antI_span[1] ], self.starting_time[antI_span[0]:antI_span[1]] def get_antenna_safetySpan(self, antenna_i, start_time, stop_time): """returns the data and start times for a station (same as open_station_SampleNumber), insuring that the data between start_time and stop_time is valid for all antennas in this station. (assume the duration is smaller then a block). If new data is opened, then start_time is aligned to just after the beginning of the file.""" do_load = False if not self.antenna_data_loaded[ antenna_i ]: do_load = True else: present_start_time = self.starting_time[ antenna_i ] + self.half_hann_safety_region*5.0E-9 is_safe = present_start_time < start_time present_end_time = self.starting_time[ antenna_i ] + self.blocksize*5.0E-9 - self.half_hann_safety_region*5.0E-9 is_safe = is_safe and present_end_time>stop_time do_load = not is_safe if do_load: antenna_delay = self.antenna_delays[ antenna_i ] start_sample_number = int( (start_time + antenna_delay )/5.0E-9 ) start_sample_number -= self.half_hann_safety_region try: self.open_antenna_SampleNumber(antenna_i, start_sample_number) except Exception as e: print('info', antenna_i, start_time, antenna_delay) raise e present_start_time = self.starting_time[ antenna_i ] + self.half_hann_safety_region*5.0E-9 present_end_time = self.starting_time[ antenna_i ] + self.blocksize*5.0E-9 - self.half_hann_safety_region*5.0E-9 return self.raw_data[ antenna_i ], self.starting_time[ antenna_i ] def check_saturation_span(self, ant_i, first_index, last_index): return data_cut_inspan( self.staturation_removals[ant_i], first_index,last_index ) def check_dataLoss_span(self, ant_i, first_index, last_index): return data_cut_inspan( self.data_loss_spans[ant_i], first_index,last_index ) def get_station_dataloss(self, stat_i, out_array=None): antI_span = self.station_to_antSpan[ stat_i ] if out_array is None: out_array = np.zeros(antI_span[1]-antI_span[0], dtype=np.int) else: out_array[:] = 0 for ant_i in range(antI_span[0], antI_span[1]): for span in self.data_loss_spans[ant_i]: out_array[ant_i] += span[1]-span[0] return out_array def get_station_saturation(self, stat_i, out_array=None): antI_span = self.station_to_antSpan[ stat_i ] if out_array is None: out_array = np.zeros(antI_span[1]-antI_span[0], dtype=np.int) else: out_array[:] = 0 for ant_i in range(antI_span[0], antI_span[1]): for span in self.staturation_removals[ant_i]: out_array[ant_i] += span[1]-span[0] return out_array ######### LOCATORS!!! ######### class planewave_locator: def __init__(self, header, data_manager, half_window): self.data_manager = data_manager self.antenna_locations = self.data_manager.get_antenna_locations( 0 ) self.min_amp = header.min_amplitude self.upsample_factor = header.upsample_factor self.half_window = half_window self.num_antennas = len(self.antenna_locations) self.max_delta_matrix = np.empty( (self.num_antennas,self.num_antennas), dtype=np.int ) for i, iloc in enumerate(self.antenna_locations): for j, jloc in enumerate(self.antenna_locations): R = np.linalg.norm( iloc-jloc ) self.max_delta_matrix[i,j] = int( R/(v_air*5.0E-9) ) + 1 self.max_half_length = half_window + np.max( self.max_delta_matrix ) self.correlator = autoadjusting_upsample_and_correlate(2*self.max_half_length, self.upsample_factor) self.max_CC_size = self.correlator.get_current_output_length() ## setup memory self.relative_ant_locations = np.array( self.antenna_locations ) self.cross_correlation_storage = np.empty( (self.num_antennas, self.max_CC_size ), dtype=np.double ) self.cal_delta_storage = np.empty( self.num_antennas , dtype=np.double ) self.workspace = np.empty( self.num_antennas, dtype=np.double ) self.measured_dt = np.empty( self.num_antennas, dtype=np.double ) self.antenna_mask = np.ones( self.num_antennas, dtype=int) self.CC_lengths = np.ones( self.num_antennas, dtype=int) ## CHECK THESE! self.locator = planewave_locator_helper(self.upsample_factor, self.num_antennas, self.max_CC_size, 50 ) self.locator.set_memory( self.cross_correlation_storage, self.relative_ant_locations, self.cal_delta_storage, self.workspace, self.measured_dt, self.antenna_mask, self.CC_lengths ) self.max_itters = header.max_minimize_itters self.ftol = header.minimize_ftol self.xtol = header.minimize_xtol self.gtol = header.minimize_gtol self.ZeAz = np.empty(2, dtype=np.double) def set_data(self, ref_ant_i, data_block, start_times): self.ref_ant_i = ref_ant_i self.relative_ant_locations[:] = self.antenna_locations self.relative_ant_locations[:] -= self.antenna_locations[ self.ref_ant_i ] self.data_block = data_block self.start_times = start_times def locate(self, peak_index, do_plot): ## extract trace on ref antenna ref_trace = self.data_block[ self.ref_ant_i, peak_index-self.half_window:peak_index+self.half_window ] self.correlator.set_referance( ref_trace ) ref_time = self.start_times[ self.ref_ant_i ] ## get data from all other antennas traces = [None for i in range(len(self.start_times))] traces[ self.ref_ant_i ] = ref_trace self.cal_delta_storage[ self.ref_ant_i ] = 0.0 self.measured_dt[ self.ref_ant_i ] = 0.0 ## ?? self.workspace[ self.ref_ant_i ] = 0.0 ##?? for i, (data,start_time) in enumerate(zip(self.data_block,self.start_times)): if i == self.ref_ant_i: self.antenna_mask[i] = 0 continue half_length = self.max_delta_matrix[self.ref_ant_i, i] + self.half_window trace = data[ peak_index-half_length:peak_index+half_length ] HEmax = abs_max( trace ) if HEmax < self.min_amp: self.antenna_mask[i] = 0 continue has_saturation = self.data_manager.check_saturation_span(i, peak_index-half_length, peak_index+half_length ) if has_saturation: self.antenna_mask[i] = False continue if self.data_manager.check_dataLoss_span(i, peak_index-half_length, peak_index+half_length ): self.antenna_mask[i] = False continue traces[i] = trace cross_corelation = self.correlator.correlate( trace ) CC_length = len(cross_corelation) np.abs(cross_corelation, out = self.cross_correlation_storage[i, :CC_length]) self.CC_lengths[i] = CC_length self.cal_delta_storage[i] = start_time-ref_time - self.max_delta_matrix[self.ref_ant_i, i]*5.0e-9 self.antenna_mask[i] = 1 N = np.sum( self.antenna_mask ) if N<2: return [0,0], 0.0, self.measured_dt, self.antenna_mask, N ## get brute guess self.locator.run_brute(self.ZeAz) ## now run minimizer succeeded, RMS = self.locator.run_minimizer( self.ZeAz, self.max_itters, self.xtol, self.gtol, self.ftol) return self.ZeAz, RMS, self.measured_dt, self.antenna_mask, N def num_itters(self): return self.locator.get_num_iters() class iterative_mapper: def __init__(self, header, print_func=do_nothing): self.header = header ## open raw data files self.data_manager = raw_data_manager( header, print_func ) self.antenna_XYZs = self.data_manager.antenna_locations self.antenna_expected_RMS = self.data_manager.antenna_expected_RMS ## find best station order station_locs = self.data_manager.station_locations relative_distances = np.linalg.norm( station_locs - station_locs[0], axis=1 ) self.station_order = np.argsort( relative_distances ) ## load helpers: self.planewave_manager = planewave_locator( header, self.data_manager, int(header.min_pulse_length_samples/2) ) self.half_min_pulse_length_samples = int(header.min_pulse_length_samples/2) self.half_min_pulse_width_time = self.half_min_pulse_length_samples*5.0E-9 self.edge_exclusion_points = self.planewave_manager.max_CC_size+ self.data_manager.half_hann_safety_region self.usable_block_length = self.data_manager.blocksize - 2*self.edge_exclusion_points self.correlator = autoadjusting_upsample_and_correlate( header.min_pulse_length_samples, header.upsample_factor ) self.peak_fitter = parabolic_fitter() self.pointsource_manager = pointsource_locator( self.header.num_total_antennas ) ### LOAD MEMORY ### self.antenna_mask = np.zeros( header.num_total_antennas, dtype=int ) self.measured_dt = np.zeros( header.num_total_antennas, dtype=np.double ) self.weights = np.zeros( header.num_total_antennas, dtype=np.double ) self.pointsource_manager.set_memory( self.antenna_XYZs, self.measured_dt, self.antenna_mask, self.weights ) self.len_ref_station = self.data_manager.station_to_antSpan[0,1]-self.data_manager.station_to_antSpan[0,0] self.data_loss_workspace = np.empty( self.len_ref_station, dtype=np.int ) self.ref_ant_workspace = np.empty( self.usable_block_length, dtype=np.double ) self.refAnt_peakIndeces = np.empty( header.max_events_perBlock, dtype=np.int ) self.XYZc = np.zeros( 4, dtype=np.double ) self.XYZc_old = np.zeros( 4, dtype=np.double ) self.station_mode = np.zeros( header.num_stations, dtype=np.int ) ## current fitting mode for all stations. 0: do not fit, 1: reload if needed, 2: always reload self.covariance_matrix = np.empty( (3,3), dtype=np.double ) output_type = [("ID", 'i8'), ('x', 'd'), ('y', 'd'), ('z', 'd'), ('t', 'd'), ('RMS', 'd'), ('RedChiSquared', 'd'), ('numRS', 'i8'), ('refAmp', 'i8'), ('numThrows', 'i8'), ('image_i', 'i8'), ('refAnt', 'S9'), ('covXX', 'd'), ('covXY', 'd'), ('covXZ', 'd'), ('covYY', 'd'), ('covYZ', 'd'), ('covZZ', 'd')] self.output_type = np.dtype( output_type ) self.output_data = np.empty( self.header.max_events_perBlock, dtype=self.output_type ) def reload_data(self): "this is where the magic REALLY happens" for stat_i in self.station_order: if self.station_mode[ stat_i ] == 0: continue ant_span = self.data_manager.station_to_antSpan[ stat_i ] for ant_i in range( ant_span[0], ant_span[1] ): predicted_dt = self.pointsource_manager.relative_arrival_time(ant_i, self.XYZc) if self.station_mode[ stat_i ] != 2 and self.antenna_mask[ ant_i ]: if np.abs( predicted_dt-self.measured_dt[ant_i] ) < self.header.min_pulse_length_samples*5.0E-9/4: continue ## do not re-load info! ## get data start_T = self.referance_peakTime + predicted_dt - self.header.min_pulse_length_samples*5.0E-9/2 antenna_data, start_time = self.data_manager.get_antenna_safetySpan( ant_i, start_T, start_T + self.header.min_pulse_length_samples*5.0E-9) sample_index = int( (start_T - start_time)/5.0E-9 ) antenna_trace = antenna_data[ sample_index:sample_index + self.header.min_pulse_length_samples ] trace_startTime = start_time + sample_index*5.0E-9 ## check quality if len(antenna_trace) != self.header.min_pulse_length_samples: ## something went wrong, I dobn't think this should ever really happen self.antenna_mask[ ant_i ] = False continue if abs_max( antenna_trace ) < self.header.min_amplitude: self.antenna_mask[ ant_i ] = False continue has_saturation = self.data_manager.check_saturation_span(ant_i, sample_index, sample_index+self.header.min_pulse_length_samples ) if has_saturation: self.antenna_mask[ ant_i ] = False continue if self.data_manager.check_dataLoss_span(ant_i, sample_index, sample_index+self.header.min_pulse_length_samples ): self.antenna_mask[ ant_i ] = False continue ## do cross correlation and get peak location cross_correlation = self.correlator.correlate( antenna_trace ) CC_length = len(cross_correlation) workspace_slice = self.ref_ant_workspace[:CC_length] np.abs(cross_correlation, out=workspace_slice) CC_peak = self.peak_fitter.fit( workspace_slice ) if CC_peak > CC_length/2: CC_peak -= CC_length peak_location = CC_peak*5.0E-9/self.header.upsample_factor peak_location += trace_startTime - (self.referance_peakTime-self.half_min_pulse_length_samples*5.0E-9) self.measured_dt[ ant_i ] = peak_location self.antenna_mask[ ant_i ] = True def reload_data_and_plot(self, chi_squared): print('start loading. red chi square:', chi_squared) for stat_i in self.station_order: if self.station_mode[ stat_i ] == 0: continue ant_span = self.data_manager.station_to_antSpan[ stat_i ] for ant_i in range( ant_span[0], ant_span[1] ): predicted_dt = self.pointsource_manager.relative_arrival_time(ant_i, self.XYZc) # if self.station_mode[ stat_i ] != 2 and self.antenna_mask[ ant_i ]: # if np.abs( predicted_dt-self.measured_dt[ant_i] ) < self.header.min_pulse_length_samples*5.0E-9/4: # continue ## do not re-load info! if self.station_mode[ stat_i ] == 2 and ant_i==ant_span[0]: print('loading:', self.data_manager.statI_to_sname(stat_i)) self.pointsource_manager.load_covariance_matrix( self.XYZc, self.covariance_matrix ) ref_XYZ = self.data_manager.antenna_locations[ self.referance_antI ] ant_XYZ = self.data_manager.antenna_locations[ ant_i ] source_XYZ = self.XYZc[:3] diff_ref = source_XYZ-ref_XYZ ref_R = np.sqrt( diff_ref[0]**2 + diff_ref[1]**2 + diff_ref[2]**2 ) diff_ant = source_XYZ-ant_XYZ ant_R = np.sqrt( diff_ant[0]**2 + diff_ant[1]**2 + diff_ant[2]**2 ) ## now we need the derivative diff_ref *= 1.0/ref_R diff_ant *= 1.0/ant_R diff_ant -= diff_ref diff_ant *= 1.0/v_air ## now we make a sandwich! prediction_variance = np.dot(diff_ant, np.dot( self.covariance_matrix, diff_ant )) ## SO TASTY!! print(" model std:", np.sqrt(prediction_variance), np.sqrt(prediction_variance*chi_squared)) ## get data start_T = self.referance_peakTime + predicted_dt - self.header.min_pulse_length_samples*5.0E-9/2 antenna_data, start_time = self.data_manager.get_antenna_safetySpan( ant_i, start_T, start_T + self.header.min_pulse_length_samples*5.0E-9) sample_index = int( (start_T - start_time)/5.0E-9 ) antenna_trace = antenna_data[ sample_index:sample_index + self.header.min_pulse_length_samples ] trace_startTime = start_time + sample_index*5.0E-9 ## check quality if len(antenna_trace) != self.header.min_pulse_length_samples: ## something went wrong, I dobn't think this should ever really happen self.antenna_mask[ ant_i ] = False continue if abs_max( antenna_trace ) < self.header.min_amplitude: self.antenna_mask[ ant_i ] = False continue has_saturation = self.data_manager.check_saturation_span(ant_i, sample_index, sample_index+self.header.min_pulse_length_samples ) if has_saturation: self.antenna_mask[ ant_i ] = False continue if self.data_manager.check_dataLoss_span(ant_i, sample_index, sample_index+self.header.min_pulse_length_samples ): self.antenna_mask[ ant_i ] = False continue ## do cross correlation and get peak location cross_correlation = self.correlator.correlate( antenna_trace ) CC_length = len(cross_correlation) workspace_slice = self.ref_ant_workspace[:CC_length] np.abs(cross_correlation, out=workspace_slice) CC_peak = self.peak_fitter.fit( workspace_slice ) if CC_peak > CC_length/2: CC_peak -= CC_length peak_location = CC_peak*5.0E-9/self.header.upsample_factor peak_location += trace_startTime - (self.referance_peakTime-self.half_min_pulse_length_samples*5.0E-9) self.measured_dt[ ant_i ] = peak_location self.antenna_mask[ ant_i ] = True # if self.station_mode[ stat_i ] == 2: # self.TEST_MEMORY[ ant_i ] = peak_location T = np.arange( len(antenna_trace), dtype=np.double ) T -= len(antenna_trace)/2 T *= 5.0E-9 A = np.abs(antenna_trace) A /= np.max(A) A += stat_i plt.plot(T, A) plt.annotate( self.data_manager.statI_to_sname(stat_i), (0.0, stat_i) ) plt.show() def process(self, start_index, print_func=do_nothing): #### get initial data and identify referance antenna #### referanceStat_blockData, startTimes = self.data_manager.open_station_SampleNumber(0, start_index) self.data_manager.get_station_dataloss(0, self.data_loss_workspace ) self.referance_antI = np.argmin( self.data_loss_workspace ) self.referance_ant_name = self.data_manager.antI_to_antName( self.referance_antI ) self.planewave_manager.set_data(self.referance_antI, referanceStat_blockData, startTimes) self.pointsource_manager.set_ref_antenna( self.referance_antI ) self.ref_XYZ = self.antenna_XYZs[ self.referance_antI ] ### does this need to be self? #### set the appropriate weights #### self.weights[:] = self.data_manager.antenna_expected_RMS # load the expected RMS self.weights *= self.weights # convert to covariance self.weights += self.weights[ self.referance_antI ] # add covariances np.sqrt(self.weights, out=self.weights) # back to RMS #### find and sort the top peaks in ref antennas #### np.abs( referanceStat_blockData[self.referance_antI, self.edge_exclusion_points:-self.edge_exclusion_points], out=self.ref_ant_workspace ) num_events = 0 half_erasure_length = int( self.header.erasure_length/2 ) for event_i in range( self.header.max_events_perBlock ): peak_index = np.argmax( self.ref_ant_workspace ) amplitude = self.ref_ant_workspace[ peak_index ] if amplitude < self.header.min_amplitude: break else: self.refAnt_peakIndeces[ event_i ] = self.edge_exclusion_points + peak_index num_events += 1 if peak_index < half_erasure_length: self.ref_ant_workspace[ 0 : peak_index+half_erasure_length ] = 0.0 elif peak_index >= len(self.ref_ant_workspace)-half_erasure_length: self.ref_ant_workspace[ peak_index-half_erasure_length : ] = 0.0 else: self.ref_ant_workspace[ peak_index-half_erasure_length : peak_index+half_erasure_length ] = 0.0 ref_indeces = self.refAnt_peakIndeces[:num_events] ref_indeces.sort() #### find events!! #### print_func("block at", start_index, "ref. antenna ID:", self.referance_antI) print_func("fitting", num_events, 'events') out_i = 0 for event_i, event_ref_index in enumerate( ref_indeces ): #### setup ref info referance_trace = referanceStat_blockData[ self.referance_antI, event_ref_index-self.half_min_pulse_length_samples:event_ref_index+self.half_min_pulse_length_samples ] self.referance_peakTime = startTimes[ self.referance_antI ] + 5.0E-9*event_ref_index referance_amplitude = np.abs( referanceStat_blockData[ self.referance_antI, event_ref_index] ) self.correlator.set_referance( referance_trace ) print_func() print_func('event:', event_i, '/', num_events, event_ref_index, ". amplitude:", referance_amplitude) print_func(" total index:", start_index+event_ref_index, 'on antenna', self.data_manager.antenna_names[ self.referance_antI ] ) #### try to fit planewave zenith_azimuth, planewave_RMS, planewave_dt, planewave_mask, planewave_num_ants = self.planewave_manager.locate( event_ref_index, False) print_func('planewave RMS:', planewave_RMS, 'num antennas:', planewave_num_ants, 'num iters:', self.planewave_manager.num_itters() ) print_func('zenith, azimuth:', zenith_azimuth) if planewave_num_ants<2: print_func(" too few antennas") print_func() print_func() continue # print_func() self.XYZc[0] = np.sin( zenith_azimuth[0] )*np.cos( zenith_azimuth[1] )*self.header.guess_distance + self.ref_XYZ[0] self.XYZc[1] = np.sin( zenith_azimuth[0] )*np.sin( zenith_azimuth[1] )*self.header.guess_distance + self.ref_XYZ[1] self.XYZc[2] = np.cos( zenith_azimuth[0] )*self.header.guess_distance + self.ref_XYZ[2] self.XYZc[3] = 0.0 #### prep for fitting self.antenna_mask[:] = 0 self.antenna_mask[:self.len_ref_station] = planewave_mask self.measured_dt[:self.len_ref_station] = planewave_dt # success, chi_squared = self.pointsource_manager.run_minimizer( self.XYZc, self.header.max_minimize_itters, # self.header.minimize_xtol, self.header.minimize_gtol, self.header.minimize_ftol ) # print_func('initial fit chi-squared:', chi_squared) print_func(' XYZ', self.XYZc[:3]) print_func() # self.XYZc[2] = np.abs( self.XYZc[2] ) # self.XYZc[:3] *= self.header.guess_distance/np.linalg.norm( self.XYZc[:3] ) #### now do the thing!! self.station_mode[:] = 0 is_good = True current_red_chi_sq = np.inf #chi_squared num_throws = 0 for stat_i in self.station_order: self.station_mode[ stat_i ] = 2 # if planewave_num_ants > 3: self.reload_data() # else: # self.reload_data_and_plot(current_red_chi_sq) # if 190 <= event_i <= 194: # self.reload_data_and_plot( current_red_chi_sq ) # else: # self.reload_data() self.station_mode[ stat_i ] = 1 num_ants = np.sum( self.antenna_mask ) if num_ants < 3: continue success, new_chi_squared = self.pointsource_manager.run_minimizer( self.XYZc, self.header.max_minimize_itters, self.header.minimize_xtol, self.header.minimize_gtol, self.header.minimize_ftol ) if (stat_i != 0) and ( (current_red_chi_sq > 1 and new_chi_squared > 5*current_red_chi_sq) or \ (current_red_chi_sq<1 and new_chi_squared>5) ): self.station_mode[ stat_i ] = 0 ant_span = self.data_manager.station_to_antSpan[ stat_i ] self.antenna_mask[ ant_span[0]:ant_span[1] ] = 0 print_func(" throwing station:", stat_i, 'had red. chi-squared of:', new_chi_squared, 'previous:', current_red_chi_sq) self.XYZc[:] = self.XYZc_old ## keep the old chi-squared and location num_throws += 1 elif (stat_i != 0) and (new_chi_squared > self.header.stop_chi_squared) and num_ants>5: print_func("chi-squared too high:", new_chi_squared) print_func() print_func() is_good = False break else: current_red_chi_sq = new_chi_squared self.XYZc[2] = np.abs( self.XYZc[2] ) self.XYZc_old[:] = self.XYZc if stat_i == 0: self.XYZc[:3] *= self.header.guess_distance/np.linalg.norm( self.XYZc[:3] ) if not is_good: continue #### get final info success, current_red_chi_sq = self.pointsource_manager.run_minimizer( self.XYZc, self.header.max_minimize_itters, self.header.minimize_xtol, self.header.minimize_gtol, self.header.minimize_ftol ) RMS = self.pointsource_manager.get_RMS() num_remote_stations = 0 for stat_i in self.station_order: if self.data_manager.is_RS[ stat_i ]: ant_span = self.data_manager.station_to_antSpan[ stat_i ] num_ant = np.sum( self.antenna_mask[ ant_span[0]:ant_span[1] ] ) if num_ant > 0: num_remote_stations += 1 self.pointsource_manager.load_covariance_matrix( self.XYZc, self.covariance_matrix ) try: eigvalues, eigenvectors = np.linalg.eigh( self.covariance_matrix ) np.sqrt(eigvalues, out=eigvalues) except: print('eigenvalues did not converge???') eigvalues = None eigenvectors = self.covariance_matrix # T = (event_ref_index+start_index)*5.0E-9 - np.linalg.norm( self.XYZc[:3]-self.ref_XYZ )/v_air - self.header.refStat_delay T = self.referance_peakTime - np.linalg.norm( self.XYZc[:3]-self.ref_XYZ )/v_air #### output! print_func("successful fit :", out_i) print_func(" RMS:", RMS, 'red. chi-square:', current_red_chi_sq) print_func(" XYZT:", self.XYZc[:3], T) print_func(" num RS:", num_remote_stations) print_func(' eig. info:') print_func( eigvalues ) print_func(eigenvectors) print_func() print_func() self.output_data[out_i]['ID'] = out_i self.output_data[out_i]['x'] = self.XYZc[0] self.output_data[out_i]['y'] = self.XYZc[1] self.output_data[out_i]['z'] = self.XYZc[2] self.output_data[out_i]['t'] = T self.output_data[out_i]['RMS'] = RMS self.output_data[out_i]['RedChiSquared'] = current_red_chi_sq self.output_data[out_i]['numRS'] = num_remote_stations self.output_data[out_i]['refAmp'] = referance_amplitude self.output_data[out_i]['numThrows'] = num_throws self.output_data[out_i]['image_i'] = event_i self.output_data[out_i]['refAnt'] = self.referance_ant_name self.output_data[out_i]['covXX'] = self.covariance_matrix[0,0] self.output_data[out_i]['covXY'] = self.covariance_matrix[0,1] self.output_data[out_i]['covXZ'] = self.covariance_matrix[0,2] self.output_data[out_i]['covYY'] = self.covariance_matrix[1,1] self.output_data[out_i]['covYZ'] = self.covariance_matrix[1,2] self.output_data[out_i]['covZZ'] = self.covariance_matrix[2,2] out_i += 1 return self.output_data[:out_i] def process_block(self, block_i, print_func=do_nothing, skip_blocks_done=True): output_dir = self.header.input_folder out_fname = output_dir + "/block_"+str(block_i)+".h5" if skip_blocks_done and isfile(out_fname): print_func("block:", block_i, "already completed. Skipping") return print_func("block:", block_i) data = self.process( self.header.initial_datapoint + block_i*self.usable_block_length, print_func ) if len(data) != 0: X_array = data['x'] minX = np.min( X_array ) maxX = np.max( X_array ) Y_array = data['y'] minY = np.min( Y_array ) maxY = np.max( Y_array ) Z_array = data['z'] minZ = np.min( Z_array ) maxZ = np.max( Z_array ) T_array = data['t'] minT = np.min( T_array ) maxT = np.max( T_array ) bounds = np.array([ [minX,maxX], [minY,maxY], [minZ,maxZ], [minT,maxT] ]) else: bounds = np.array([ [0.0,0.0], [0.0,0.0], [0.0,0.0], [0.0,0.0] ]) block_outfile = h5py.File(out_fname, "w") out_dataset = block_outfile.create_dataset(str(block_i), data=data ) out_dataset.attrs['block'] = block_i out_dataset.attrs['bounds'] = bounds if __name__ == "__main__": from LoLIM import utilities utilities.default_raw_data_loc = "/exp_app2/appexp1/lightning_data" utilities.default_processed_data_loc = "/home/brian/processed_files" out_folder = 'iterMapper_50_CS002_TST2' timeID = 'D20170929T202255.000Z' stations_to_exclude = [ 'RS407', 'RS409'] outHeader = make_header(timeID, 3000*(2**16), station_delays_fname = 'station_delays4.txt', additional_antenna_delays_fname = 'ant_delays.txt', bad_antennas_fname = 'bad_antennas.txt', pol_flips_fname = 'polarization_flips.txt') # outHeader.stations_to_exclude = stations_to_exclude # outHeader.max_events_perBlock = 100 outHeader.run( out_folder ) # read_header('iterMapper_50_CS002', timeID).resave_header( out_folder ) inHeader = read_header(out_folder, timeID) # inHeader.print_all_info() log_fname = inHeader.next_log_file() logger_function = logger() logger_function.set( log_fname, True ) logger_function.take_stdout() logger_function.take_stderr() mapper = iterative_mapper(inHeader, print) # for i in range(1113, 1113+10): mapper.process_block(816, print, False)
Bhare8972/LOFAR-LIM
LIM_scripts/iterativeMapper/iterative_mapper.py
Python
mit
43,912
# -*- encoding: utf-8 -*- from abjad import * def test_mathtools_all_are_numbers_01(): r'''Is true when all elements in sequence are numbers. ''' assert mathtools.all_are_numbers([1, 2, 5.5, Fraction(8, 3)]) def test_mathtools_all_are_numbers_02(): r'''True on empty sequence. ''' assert mathtools.all_are_numbers([]) def test_mathtools_all_are_numbers_03(): r'''Otherwise false. ''' assert not mathtools.all_are_numbers([1, 2, NamedPitch(3)]) def test_mathtools_all_are_numbers_04(): r'''False when expr is not a sequence. ''' assert not mathtools.all_are_numbers(17)
mscuthbert/abjad
abjad/tools/mathtools/test/test_mathtools_all_are_numbers.py
Python
gpl-3.0
628
#!/usr/bin/python from generator.actions import Actions import random import re import subprocess import sys from struct import pack from math import sin # length of a dot in ms dot_len_ms = 5 # num of PCM samples in a dot samples_per_dot = int(44100*(dot_len_ms/1000.0)) # frequency of tones in Hz freq = 440 # language definition lang = { '!': '.', '"': '-', '#': '..', '$': '.-', '%': '-.', '&': '--', '\'': '...', '(': '..-', ')': '.-.', '*': '.--', '+': '-..', ',': '-.-', '-': '--.', '.': '---', '/': '....', '0': '...-', '1': '..-.', '2': '..--', '3': '.-..', '4': '.-.-', '5': '.--.', '6': '.---', '7': '-...', '8': '-..-', '9': '-.-.', ':': '-.--', ';': '--..', '<': '--.-', '=': '---.', '>': '----', '?': '.....', '@': '....-', 'A': '...-.', 'B': '...--', 'C': '..-..', 'D': '..-.-', 'E': '..--.', 'F': '..---', 'G': '.-...', 'H': '.-..-', 'I': '.-.-.', 'J': '.-.--', 'K': '.--..', 'L': '.--.-', 'M': '.---.', 'N': '.----', 'O': '-....', 'P': '-...-', 'Q': '-..-.', 'R': '-..--', 'S': '-.-..', 'T': '-.-.-', 'U': '-.--.', 'V': '-.---', 'W': '--...', 'X': '--..-', 'Y': '--.-.', 'Z': '--.--', '\x1f': '-----' } class Wav(Actions): def start(self): pass def random_string(self, min_length, max_length): chars = map(chr, range(32, 91)) str = ' ' # don't allow consecutive spaces or consecutive chars with no variation while re.search(' ', str) or len(str) < min_length or re.search('^[ !#\'/?]+$', str) or re.search('^[ "&\.>\x1f]+$', str): str = ''.join(random.choice(chars) for _ in range(random.randint(min_length, max_length))).rstrip() return str def nondiverse_random_string(self): chars = '!#/?"' return random.choice(chars) def gen_tone(self, intervals): tone = '' for i in range(0, samples_per_dot*intervals): tone += pack('<h', 20000*sin(2*3.14159*freq*i/44100)) return tone def gen_silence(self, intervals): silence = '' for i in range(0, samples_per_dot*intervals): silence += pack('<h', 0) return silence def gen_header(self, data_len, num_samples): header = '' header += 'PCM ' # ID header += pack("<L", data_len) # DataSize header += pack("<L", num_samples) # NumSamples return header def gen_pcm(self, str, dot_len_ms): global samples_per_dot samples_per_dot = int(44100*(dot_len_ms/1000.0)) pcm_data = '' num_samples = 0 str_len = len(str) for i in range(0, str_len): c = str[i] if c == ' ': pcm_data += self.gen_silence(7) num_samples += 7*samples_per_dot continue if not c in lang.keys(): sys.stderr.write("Invalid char "+c+"\n") sys.exit(-1) code_len = len(lang[c]) for j in range(0, code_len): s = (lang[c])[j] if s == '.': pcm_data += self.gen_tone(1) num_samples += 1*samples_per_dot if s == '-': pcm_data += self.gen_tone(3) num_samples += 3*samples_per_dot # append inter-symbol pause if there are more symbol if (j < code_len-1): pcm_data += self.gen_silence(1) num_samples += 1*samples_per_dot # append inter-character pause if there are more characters if (i < str_len-1) and (str[i+1] != ' '): pcm_data += self.gen_silence(3) num_samples += 3*samples_per_dot return self.gen_header(len(pcm_data),num_samples)+pcm_data def valid(self): rnd_str = self.random_string(3,5) self.write(self.gen_pcm(rnd_str,random.randint(2,30))) self.read(delim='\n', expect=rnd_str) def invalid_char(self): rnd_str = "\x1f"+self.random_string(3,5) self.write(self.gen_pcm(rnd_str,random.randint(2,30))) self.read(delim='\n', expect='unknown character\n') def insufficient_symbol_diversity(self): rnd_str = self.nondiverse_random_string() self.write(self.gen_pcm(rnd_str,random.randint(2,30))) self.read(delim='\n', expect='Insufficient symbol diversity\n') def invalid_length(self): rnd_str = self.random_string(30,40) self.write(self.gen_pcm(rnd_str,50)) self.read(delim='\n', expect='Invalid WAV length\n')
f0rki/cb-multios
original-challenges/PCM_Message_decoder/poller/for-testing/machine.py
Python
mit
3,976
version = '1.0' from utils import load, dump from os.path import exists from sklearn.lda import LDA from knn-correlation import KNNC1 import numpy as np from sklearn.metrix import confusion_matrix _known_classifiers = { 'LDA': LDA, 'KNN-correlation': KNNC1, } def classify(Subject, classifier, mode, mask, mask_name): raise NotImplementedError def cross_validation_score(Subject, classifier, *args, **kwargs): if classifier not in _known_classifiers: raise ValueError("Unknown classifier %s" % classifier) save_name = "%s/%s_%s_%s_%s-cross_validation_results-v%s.dat" % (Subject.save_location, Subject.get_train_name(), classifier, args, kwargs, version) if exists(save_name): return load(save_name) Labels = Subject.get_train_labels() Samples = Subject.get_train_univariate_samples() lCount = np.unique(Labels).size CM = np.zeros((Subject.voxel_count, lCount, lCount)) Predictions = np.zeros((Subject.voxel_count, len(Labels))) Performances = np.zeros((Subject.voxel_count,)) CLF = _known_classifiers[classifier](*args, **kwargs) L = len(Labels) indices = np.arange(L) for voxel, sample in enumerate(Samples): for i in xrange(L): CLF.fit(sample[indices != i, :], Labels[indices != i]) Predictions[voxel, i] = CLF.predict(sample[[i], :]) for i, (cm, predictions) in enumerate(zip(CM, Predictions)): temp = confusion_matrix(Labels, predictions).astype(float) cm = temp / sum(temp) Performances[i] = sum(Labels == predictions) Performances /= float(L) dump(save_name, CM, Performances) return CM, Performances
maat25/brain-decoding
classifier/classify.py
Python
mit
1,607
test = { 'name': 'Question', 'points': 1, 'suites': [ { 'cases': [ { 'code': r""" >>> # It looks like you're not making an array. You shouldn't need to >>> # use .item anywhere in your solution. >>> import numpy as np >>> type(total_charges) == np.ndarray True """, 'hidden': False, 'locked': False }, { 'code': r""" >>> # You made an array, but it doesn't have the right numbers in it. >>> import numpy as np >>> sum(abs(total_charges - np.array([24.144, 47.88, 37.212]))) < 1e-6 True """, 'hidden': False, 'locked': False } ], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest' } ] }
jamesfolberth/jupyterhub_AWS_deployment
notebooks/data8_notebooks/lab02/tests/q432.py
Python
bsd-3-clause
853
'''Build an admin interface for pages and page-related things ''' import functools import urlparse from django import http from django.conf import settings try: from django.conf.urls import defaults as urls except: from django.conf import urls from django.contrib import admin from django.core import exceptions, urlresolvers from django.db import transaction from django.views.decorators import csrf from django.utils import decorators, encoding, functional, html, safestring from django.utils.translation import ugettext as _ import forms import models csrf_protect_m = decorators.method_decorator(csrf.csrf_protect) def back_redirect(request): '''Generate response to redirect ro previous page ''' if 'HTTP_REFERER' in request.META: url = urlparse.urljoin(request.META['HTTP_REFERER'], request.META['QUERY_STRING']) else: url = '/admin/' return http.HttpResponseRedirect(url) class ActivityMixin(admin.ModelAdmin): '''Mixin ''' def do_change_active(obj): '''Change delete status ''' is_active = obj.is_active icon = is_active and 'icon-yes.gif' or 'icon-no.gif' action = is_active and 'deactivate' or 'activate' msg = is_active and 'Restore file' or 'Delete file' return safestring.mark_safe(''' <a class='active_switch' title='%s' href="%s/%s/"> <img alt="%s" src="%s/admin/img/%s" /> </a>''' % (msg, obj.pk, action, msg, settings.STATIC_URL, icon)) do_change_active.allow_tags = True do_change_active.short_description = _('is active') do_change_active = staticmethod(do_change_active) def change_active(self, request, object_id, is_active): '''Change document deleted state ''' obj = self.get_object(request, object_id) if obj.is_active != is_active: obj.is_active = is_active obj.save() return back_redirect(request) def get_urls(self): """Get urls for make object active/inactive """ def wrap(view): '''Wrap object with permissions checking ''' def wrapper(*args, **kwargs): '''View wrapper ''' return self.admin_site.admin_view(view)(*args, **kwargs) return functools.update_wrapper(wrapper, view) info = self.model._meta.app_label, self.model._meta.module_name urlpatterns = urls.patterns('', urls.url(r'^(.+)/activate/$', wrap(self.change_active), {'is_active': True}, name='%s_%s_change' % info, ), urls.url(r'^(.+)/deactivate/$', wrap(self.change_active), {'is_active': False}, name='%s_%s_change' % info, ), ) return urlpatterns + super(ActivityMixin, self).get_urls() class LanguageAdmin(admin.ModelAdmin): '''Class represents admin interface for language model ''' model = models.Language list_display = ('name', 'raw_code', ) admin.site.register(models.Language, LanguageAdmin) class LayoutAdmin(admin.ModelAdmin): '''Admin iterface for layouts list ''' model = models.Layout list_display = ('name', 'template', 'is_default', 'is_active', ) fields = ('name', 'template', 'is_default', 'is_active', ) admin.site.register(models.Layout, LayoutAdmin) class PageAdmin(admin.ModelAdmin): '''Class represents admin interface for page model ''' model = models.Page add_form_template = 'admin/page_change_form.html' change_form_template = 'admin/page_change_form.html' search_fields = ('translations__header', 'translations__title', 'translations__alias', ) list_filter = ('translations__layout', ) list_display = ('title', 'alias', 'layout', ) def title(self, obj): '''Get title ''' return unicode(obj) title.short_description = _('title') def alias(self, obj): '''Get alias ''' return obj.get_translation().alias alias.short_description = _('alias') def layout(self, obj): '''Get layout ''' return obj.get_translation().layout layout.short_description = _('layout') def get_urls(self): '''Get urls accessible in admin interface ''' def wrap(view): def wrapper(*args, **kwargs): return self.admin_site.admin_view(view)(*args, **kwargs) return functools.update_wrapper(wrapper, view) info = self.model._meta.app_label, self.model._meta.module_name return urls.patterns('', urls.url('^get_layout_form/(?P<page_id>\w+)/(?P<layout_id>\w+)/' + '(?P<lang_code>\w+)$', wrap(self.layout_view), name='%s_%s_get_layout_form' % info), urls.url('^get_layout_form/(?P<layout_id>\w+)/(?P<lang_code>\w+)$', wrap(self.layout_view), name='%s_%s_get_layout_form' % info), ) + super(PageAdmin, self).get_urls() def get_placeholders(self, template_name): '''Get a list of placeholders for layout ''' aliases = settings.PAGES_TEMPLATES_PLACEHOLDERS.get(template_name, ()) return [models.Placeholder.objects.get_or_create(alias=alias)[0] for alias in aliases] def render_layout_form(self, language, layout, page): ''' ''' from django.template import loader if page: def get_instance(place): return models.PageArticle.objects.get_or_create(layout=layout, page=page, place=place)[0] else: get_instance = lambda __: None formset = [forms.PageContentForm(None, layout=layout, place=place, instance=get_instance(place), language=language) for place in self.get_placeholders(layout.template)] return loader.render_to_string('admin/includes/content_form.html', {'formset': formset}) @csrf_protect_m def layout_view(self, request, page_id=None, layout_id=None, lang_code=None): '''Get a lyout ''' # Select language lang_code = lang_code or settings.LANGUAGE_CODE lang = models.Language.objects.get(code=lang_code) # Select layout layout_manager = models.Layout.objects layout = (layout_manager.get(id=layout_id) if layout_id else self.default_layout) # Select page if page_id: page = models.PageTranslation.objects.get(page_id=page_id, language=lang) else: page = None return http.HttpResponse(self.render_layout_form(lang, layout, page)) @functional.cached_property def default_layout(self): '''Get default layout ''' return models.Layout.objects.get_default() def validate_forms(self, forms): '''Validate a list of forms ''' return functools.reduce(lambda valid, form: form.is_valid() and valid, forms, True) def validate_inlines(self, translations): '''Validate a list forms for contents ''' return functools.reduce( lambda valid, transl: self.validate_forms(transl.content_forms) and valid, translations, True) def get_translation_forms(self, data=None, page=None): '''Get a list of forms for different languages ''' if page: get_instance = lambda lang: models.PageTranslation.objects.get( page=page, language=lang) else: get_instance = lambda __: None return [forms.PageTranslationForm(data, language=language, instance=get_instance(language), page=page, initial={'is_active': True, 'layout__id': self.default_layout.id}) for language in models.Language.objects.all()] def get_layout_forms(self, translations, data=None, page=None): '''Get layout forms ''' if page: def get_instance(transl, place, layout): page_translation = models.PageTranslation.objects.get( page=page, language=transl.language) return models.PageArticle.objects.get_or_create(layout=layout, page=page_translation, place=place)[0] else: get_instance = lambda __, ___, ____: None for translation in translations: layout = translation.layout or self.default_layout translation.content_forms = [ forms.PageContentForm(data, layout=layout, place=placeholder, instance=get_instance(translation, placeholder, layout), language=translation.language) for placeholder in self.get_placeholders(layout.template)] def save_data(self, request, new_object, form, translations): '''Save model and translations with whole data ''' self.save_model(request, new_object, form, True) for translation in translations: tranls_obj = translation.save(page=new_object) for content in translation.content_forms: content.save(page=tranls_obj) @csrf_protect_m @transaction.commit_on_success def add_view(self, request, form_url='', extra_context=None): '''The 'add' admin view for this model. ''' model = self.model opts = model._meta if not self.has_add_permission(request): raise exceptions.PermissionDenied ModelForm = self.get_form(request) if request.method == 'POST': # Trying to create new post form = ModelForm(request.POST, request.FILES) if form.is_valid(): new_object = self.save_form(request, form, change=False) form_validated = True else: form_validated = False new_object = self.model() # Validate additional data translations = self.get_translation_forms(request.POST) transl_valid = self.validate_forms(translations) self.get_layout_forms(translations, request.POST) inlines_valid = self.validate_inlines(translations) # If data valid can save results if form_validated and transl_valid and inlines_valid: self.log_addition(request, new_object) self.save_data(request, new_object, form, translations) return self.response_add(request, new_object) else: # Prepare the dict of initial data from the request. initial = dict(request.GET.items()) for k in initial: try: field = opts.get_field(k) except models.FieldDoesNotExist: continue if isinstance(field, models.ManyToManyField): initial[k] = initial[k].split(",") form = ModelForm(initial=initial) # Prepare translations translations = self.get_translation_forms() self.get_layout_forms(translations) # Create an admin form adminForm = admin.helpers.AdminForm(form, list(self.get_fieldsets(request)), self.get_prepopulated_fields(request), self.get_readonly_fields(request), model_admin=self) media = self.media + adminForm.media context = { 'title': _('Add %s') % encoding.force_unicode(opts.verbose_name), 'adminform': adminForm, 'is_popup': "_popup" in request.REQUEST, 'show_delete': False, 'media': media, 'errors': admin.helpers.AdminErrorList(form, []), 'app_label': opts.app_label, 'translations': translations } context.update(extra_context or {}) return self.render_change_form(request, context, form_url=form_url, add=True) @csrf_protect_m @transaction.commit_on_success def change_view(self, request, object_id, form_url='', extra_context=None): "The 'change' admin view for this model." model = self.model opts = model._meta obj = self.get_object(request, admin.util.unquote(object_id)) if not self.has_change_permission(request, obj): raise exceptions.PermissionDenied if obj is None: raise exceptions.Http404( _('%(name)s object with primary key %(key)r does not exist.') % {'name': encoding.force_unicode(opts.verbose_name), 'key': html.escape(object_id)}) if request.method == 'POST' and "_saveasnew" in request.POST: url = urlresolvers.reverse('admin:%s_%s_add' % (opts.app_label, opts.module_name), current_app=self.admin_site.name) return self.add_view(request, form_url=url) ModelForm = self.get_form(request, obj) if request.method == 'POST': # Validate save form form = ModelForm(request.POST, request.FILES, instance=obj) if form.is_valid(): form_validated = True new_object = self.save_form(request, form, change=True) else: form_validated = False new_object = obj # Validate translations, conten translations = self.get_translation_forms(request.POST, obj) transl_valid = self.validate_forms(translations) self.get_layout_forms(translations, request.POST, obj) inlines_valid = self.validate_inlines(translations) # If all valid real save if form_validated and transl_valid and inlines_valid: self.save_data(request, new_object, form, translations) change_message = self.construct_change_message(request, form, []) self.log_change(request, new_object, change_message) return self.response_change(request, new_object) else: # Create new form form = ModelForm(instance=obj) translations = self.get_translation_forms(page=obj) self.get_layout_forms(translations, None, obj) adminForm = admin.helpers.AdminForm(form, self.get_fieldsets(request, obj), self.get_prepopulated_fields(request, obj), self.get_readonly_fields(request, obj), model_admin=self) media = self.media + adminForm.media context = { 'title': _('Change %s') % encoding.force_unicode(opts.verbose_name), 'adminform': adminForm, 'object_id': object_id, 'original': obj, 'is_popup': "_popup" in request.REQUEST, 'media': media, 'errors': admin.helpers.AdminErrorList(form, []), 'app_label': opts.app_label, 'translations': translations } context.update(extra_context or {}) return self.render_change_form(request, context, change=True, obj=obj, form_url=form_url) admin.site.register(models.Page, PageAdmin) class MenuAdmin(ActivityMixin): '''Admin interface for menus ''' model = models.Menu form = forms.MenuForm list_display = ('name', 'alias', ActivityMixin.do_change_active, ) def save_related(self, request, form, formsets, change): """Given the ``HttpRequest``, the parent ``ModelForm`` instance, the list of inline formsets and a boolean value based on whether the parent is being added or changed, save the related objects to the database. Note that at this point save_form() and save_model() have already been called. """ for formset in formsets: self.save_formset(request, form, formset, change=change) admin.site.register(models.Menu, MenuAdmin) admin.site.register(models.MenuItem)
GrAndSE/django-pages
pages/admin.py
Python
bsd-3-clause
16,940
# Copyright (c) 2008 Nokia 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. from e32calendar import *
pymo/pymo
symbian/PythonForS60_1.9.6/templates/calendar.py
Python
mit
611
#!/usr/bin/env python "Load data, train a random forest, output predictions" import pandas as pd from sklearn.ensemble import RandomForestClassifier as RF train_file = 'data/orig/numerai_training_data.csv' test_file = 'data/orig/numerai_tournament_data.csv' output_file = 'data/predictions.csv' # train = pd.read_csv( train_file ) test = pd.read_csv( test_file ) # no need for validation flag train.drop( 'validation', axis = 1 , inplace = True ) # encode the categorical variable as one-hot, drop the original column afterwards # but first let's make sure the values are the same in train and test assert( set( train.c1.unique()) == set( test.c1.unique())) train_dummies = pd.get_dummies( train.c1 ) train_num = pd.concat(( train.drop( 'c1', axis = 1 ), train_dummies.astype( int )), axis = 1 ) test_dummies = pd.get_dummies( test.c1 ) test_num = pd.concat(( test.drop( 'c1', axis = 1 ), test_dummies.astype(int) ), axis = 1 ) # train and predict n_trees = 1000 rf = RF( n_estimators = n_trees, verbose = True ) rf.fit( train_num.drop( 'target', axis = 1 ), train_num.target ) p = rf.predict_proba( test_num.drop( 't_id', axis = 1 )) # save test_num['probability'] = p[:,1] test_num.to_csv( output_file, columns = ( 't_id', 'probability' ), index = None )
zygmuntz/numer.ai
predict.py
Python
bsd-3-clause
1,277
# -*- coding: utf-8 -*- # Copyright: (c) 2021, Ansible Project # 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 import pytest from ansible.module_utils._text import to_native from ansible.module_utils.common.validation import check_required_by @pytest.fixture def path_arguments_terms(): return { "path": ["mode", "owner"], } def test_check_required_by(): arguments_terms = {} params = {} assert check_required_by(arguments_terms, params) == {} def test_check_required_by_missing(): arguments_terms = { "force": "force_reason", } params = {"force": True} expected = "missing parameter(s) required by 'force': force_reason" with pytest.raises(TypeError) as e: check_required_by(arguments_terms, params) assert to_native(e.value) == expected def test_check_required_by_multiple(path_arguments_terms): params = { "path": "/foo/bar", } expected = "missing parameter(s) required by 'path': mode, owner" with pytest.raises(TypeError) as e: check_required_by(path_arguments_terms, params) assert to_native(e.value) == expected def test_check_required_by_single(path_arguments_terms): params = {"path": "/foo/bar", "mode": "0700"} expected = "missing parameter(s) required by 'path': owner" with pytest.raises(TypeError) as e: check_required_by(path_arguments_terms, params) assert to_native(e.value) == expected def test_check_required_by_missing_none(path_arguments_terms): params = { "path": "/foo/bar", "mode": "0700", "owner": "root", } assert check_required_by(path_arguments_terms, params) def test_check_required_by_options_context(path_arguments_terms): params = {"path": "/foo/bar", "mode": "0700"} options_context = ["foo_context"] expected = "missing parameter(s) required by 'path': owner found in foo_context" with pytest.raises(TypeError) as e: check_required_by(path_arguments_terms, params, options_context) assert to_native(e.value) == expected def test_check_required_by_missing_multiple_options_context(path_arguments_terms): params = { "path": "/foo/bar", } options_context = ["foo_context"] expected = ( "missing parameter(s) required by 'path': mode, owner found in foo_context" ) with pytest.raises(TypeError) as e: check_required_by(path_arguments_terms, params, options_context) assert to_native(e.value) == expected
ansible/ansible
test/units/module_utils/common/validation/test_check_required_by.py
Python
gpl-3.0
2,642
''' Pango text provider =================== .. versionadded:: 1.11.0 .. warning:: The low-level Pango API is experimental, and subject to change without notice for as long as this warning is present. Installation ------------ 1. Install pangoft2 (`apt install libfreetype6-dev libpango1.0-dev libpangoft2-1.0-0`) or ensure it is available in pkg-config 2. Recompile kivy. Check that pangoft2 is found `use_pangoft2 = 1` 3. Test it! Enforce the text core renderer to pango using environment variable: `export KIVY_TEXT=pango` This has been tested on OSX and Linux, Python 3.6. Font context types for FontConfig+FreeType2 backend --------------------------------------------------- * `system://` - `FcInitLoadConfigAndFonts()` * `systemconfig://` - `FcInitLoadConfig()` * `directory://<PATH>` - `FcInitLoadConfig()` + `FcAppFontAddDir()` * `fontconfig://<PATH>` - `FcConfigCreate()` + `FcConfigParseAndLoad()` * Any other context name - `FcConfigCreate()` Low-level Pango access ---------------------- Since Kivy currently does its own text layout, the Label and TextInput widgets do not take full advantage of Pango. For example, line breaks do not take language/script into account, and switching alignment per paragraph (for bi- directional text) is not supported. For advanced i18n requirements, we provide a simple wrapper around PangoLayout that you can use to render text. * https://developer.gnome.org/pango/1.40/pango-Layout-Objects.html * https://developer.gnome.org/pango/1.40/PangoMarkupFormat.html * See the `kivy/core/text/_text_pango.pyx` file @ `cdef class KivyPangoLayout` for more information. Not all features of PangoLayout are implemented. .. python:: from kivy.core.window import Window # OpenGL must be initialized from kivy.core.text._text_pango import KivyPangoLayout layout = KivyPangoLayout('system://') layout.set_markup('<span font="20">Hello <b>World!</b></span>') tex = layout.render_as_Texture() Known limitations ----------------- * Pango versions older than v1.38 has not been tested. It may work on some systems with older pango and newer FontConfig/FreeType2 versions. * Kivy's text layout is used, not Pango. This means we do not use Pango's line-breaking feature (which is superior to Kivy's), and we can't use Pango's bidirectional cursor helpers in TextInput. * Font family collissions can happen. For example, if you use a `system://` context and add a custom `Arial.ttf`, using `arial` as the `font_family` may or may not draw with your custom font (depending on whether or not there is already a system-wide "arial" font installed) * Rendering is inefficient; the normal way to integrate Pango would be using a dedicated PangoLayout per widget. This is not currently practical due to missing abstractions in Kivy core (in the current implementation, we have a dedicated PangoLayout *per font context,* which is rendered once for each LayoutWord) ''' __all__ = ('LabelPango', ) from types import MethodType from os.path import isfile from kivy.resources import resource_find from kivy.core.text import LabelBase, FontContextManagerBase from kivy.core.text._text_pango import ( KivyPangoRenderer, kpango_get_extents, kpango_get_ascent, kpango_get_descent, kpango_find_base_dir, kpango_font_context_exists, kpango_font_context_create, kpango_font_context_destroy, kpango_font_context_add_font, kpango_font_context_list, kpango_font_context_list_custom, kpango_font_context_list_families) class LabelPango(LabelBase): _font_family_support = True def __init__(self, *largs, **kwargs): self.get_extents = MethodType(kpango_get_extents, self) self.get_ascent = MethodType(kpango_get_ascent, self) self.get_descent = MethodType(kpango_get_descent, self) super(LabelPango, self).__init__(*largs, **kwargs) find_base_direction = staticmethod(kpango_find_base_dir) def _render_begin(self): self._rdr = KivyPangoRenderer(*self._size) def _render_text(self, text, x, y): self._rdr.render(self, text, x, y) def _render_end(self): imgdata = self._rdr.get_ImageData() del self._rdr return imgdata class PangoFontContextManager(FontContextManagerBase): create = staticmethod(kpango_font_context_create) exists = staticmethod(kpango_font_context_exists) destroy = staticmethod(kpango_font_context_destroy) list = staticmethod(kpango_font_context_list) list_families = staticmethod(kpango_font_context_list_families) list_custom = staticmethod(kpango_font_context_list_custom) @staticmethod def add_font(font_context, filename, autocreate=True, family=None): if not autocreate and not PangoFontContextManager.exists(font_context): raise Exception("FontContextManager: Attempt to add font file " "'{}' to non-existing context '{}' without " "autocreate.".format(filename, font_context)) if not filename: raise Exception("FontContextManager: Cannot add empty font file") if not isfile(filename): filename = resource_find(filename) if not isfile(filename): if not filename.endswith('.ttf'): filename = resource_find('{}.ttf'.format(filename)) if filename and isfile(filename): return kpango_font_context_add_font(font_context, filename) raise Exception("FontContextManager: Attempt to add non-existant " "font file: '{}' to context '{}'" .format(filename, font_context))
akshayaurora/kivy
kivy/core/text/text_pango.py
Python
mit
5,729
''' Build a tweet sentiment analyzer ''' from collections import OrderedDict import cPickle as pkl import sys import time import numpy import theano from theano import config import theano.tensor as tensor from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams import imdb datasets = {'imdb': (imdb.load_data, imdb.prepare_data)} # Set the random number generators' seeds for consistency SEED = 123 numpy.random.seed(SEED) def numpy_floatX(data): return numpy.asarray(data, dtype=config.floatX) def get_minibatches_idx(n, minibatch_size, shuffle=False): """ Used to shuffle the dataset at each iteration. """ idx_list = numpy.arange(n, dtype="int32") if shuffle: numpy.random.shuffle(idx_list) minibatches = [] minibatch_start = 0 for i in range(n // minibatch_size): minibatches.append(idx_list[minibatch_start: minibatch_start + minibatch_size]) minibatch_start += minibatch_size if (minibatch_start != n): # Make a minibatch out of what is left minibatches.append(idx_list[minibatch_start:]) return zip(range(len(minibatches)), minibatches) def get_dataset(name): return datasets[name][0], datasets[name][1] def zipp(params, tparams): """ When we reload the model. Needed for the GPU stuff. """ for kk, vv in params.iteritems(): tparams[kk].set_value(vv) def unzip(zipped): """ When we pickle the model. Needed for the GPU stuff. """ new_params = OrderedDict() for kk, vv in zipped.iteritems(): new_params[kk] = vv.get_value() return new_params def dropout_layer(state_before, use_noise, trng): proj = tensor.switch(use_noise, (state_before * trng.binomial(state_before.shape, p=0.5, n=1, dtype=state_before.dtype)), state_before * 0.5) return proj def _p(pp, name): return '%s_%s' % (pp, name) def init_params(options): """ Global (not LSTM) parameter. For the embeding and the classifier. """ params = OrderedDict() # embedding randn = numpy.random.rand(options['n_words'], options['dim_proj']) params['Wemb'] = (0.01 * randn).astype(config.floatX) params = get_layer(options['encoder'])[0](options, params, prefix=options['encoder']) # classifier params['U'] = 0.01 * numpy.random.randn(options['dim_proj'], options['ydim']).astype(config.floatX) params['b'] = numpy.zeros((options['ydim'],)).astype(config.floatX) return params def load_params(path, params): pp = numpy.load(path) for kk, vv in params.iteritems(): if kk not in pp: raise Warning('%s is not in the archive' % kk) params[kk] = pp[kk] return params def init_tparams(params): tparams = OrderedDict() for kk, pp in params.iteritems(): tparams[kk] = theano.shared(params[kk], name=kk) return tparams def get_layer(name): fns = layers[name] return fns def ortho_weight(ndim): W = numpy.random.randn(ndim, ndim) u, s, v = numpy.linalg.svd(W) return u.astype(config.floatX) def param_init_lstm(options, params, prefix='lstm'): """ Init the LSTM parameter: :see: init_params """ W = numpy.concatenate([ortho_weight(options['dim_proj']), ortho_weight(options['dim_proj']), ortho_weight(options['dim_proj']), ortho_weight(options['dim_proj'])], axis=1) params[_p(prefix, 'W')] = W U = numpy.concatenate([ortho_weight(options['dim_proj']), ortho_weight(options['dim_proj']), ortho_weight(options['dim_proj']), ortho_weight(options['dim_proj'])], axis=1) params[_p(prefix, 'U')] = U b = numpy.zeros((4 * options['dim_proj'],)) params[_p(prefix, 'b')] = b.astype(config.floatX) return params def lstm_layer(tparams, state_below, options, prefix='lstm', mask=None): nsteps = state_below.shape[0] if state_below.ndim == 3: n_samples = state_below.shape[1] else: n_samples = 1 assert mask is not None def _slice(_x, n, dim): if _x.ndim == 3: return _x[:, :, n * dim:(n + 1) * dim] return _x[:, n * dim:(n + 1) * dim] def _step(m_, x_, h_, c_): preact = tensor.dot(h_, tparams[_p(prefix, 'U')]) preact += x_ i = tensor.nnet.sigmoid(_slice(preact, 0, options['dim_proj'])) f = tensor.nnet.sigmoid(_slice(preact, 1, options['dim_proj'])) o = tensor.nnet.sigmoid(_slice(preact, 2, options['dim_proj'])) c = tensor.tanh(_slice(preact, 3, options['dim_proj'])) c = f * c_ + i * c c = m_[:, None] * c + (1. - m_)[:, None] * c_ h = o * tensor.tanh(c) h = m_[:, None] * h + (1. - m_)[:, None] * h_ return h, c state_below = (tensor.dot(state_below, tparams[_p(prefix, 'W')]) + tparams[_p(prefix, 'b')]) dim_proj = options['dim_proj'] rval, updates = theano.scan(_step, sequences=[mask, state_below], outputs_info=[tensor.alloc(numpy_floatX(0.), n_samples, dim_proj), tensor.alloc(numpy_floatX(0.), n_samples, dim_proj)], name=_p(prefix, '_layers'), n_steps=nsteps) return rval[0] # ff: Feed Forward (normal neural net), only useful to put after lstm # before the classifier. layers = {'lstm': (param_init_lstm, lstm_layer)} def sgd(lr, tparams, grads, x, mask, y, cost): """ Stochastic Gradient Descent :note: A more complicated version of sgd then needed. This is done like that for adadelta and rmsprop. """ # New set of shared variable that will contain the gradient # for a mini-batch. gshared = [theano.shared(p.get_value() * 0., name='%s_grad' % k) for k, p in tparams.iteritems()] gsup = [(gs, g) for gs, g in zip(gshared, grads)] # Function that computes gradients for a mini-batch, but do not # updates the weights. f_grad_shared = theano.function([x, mask, y], cost, updates=gsup, name='sgd_f_grad_shared') pup = [(p, p - lr * g) for p, g in zip(tparams.values(), gshared)] # Function that updates the weights from the previously computed # gradient. f_update = theano.function([lr], [], updates=pup, name='sgd_f_update') return f_grad_shared, f_update def adadelta(lr, tparams, grads, x, mask, y, cost): """ An adaptive learning rate optimizer Parameters ---------- lr : Theano SharedVariable Initial learning rate tpramas: Theano SharedVariable Model parameters grads: Theano variable Gradients of cost w.r.t to parameres x: Theano variable Model inputs mask: Theano variable Sequence mask y: Theano variable Targets cost: Theano variable Objective fucntion to minimize Notes ----- For more information, see [ADADELTA]_. .. [ADADELTA] Matthew D. Zeiler, *ADADELTA: An Adaptive Learning Rate Method*, arXiv:1212.5701. """ zipped_grads = [theano.shared(p.get_value() * numpy_floatX(0.), name='%s_grad' % k) for k, p in tparams.iteritems()] running_up2 = [theano.shared(p.get_value() * numpy_floatX(0.), name='%s_rup2' % k) for k, p in tparams.iteritems()] running_grads2 = [theano.shared(p.get_value() * numpy_floatX(0.), name='%s_rgrad2' % k) for k, p in tparams.iteritems()] zgup = [(zg, g) for zg, g in zip(zipped_grads, grads)] rg2up = [(rg2, 0.95 * rg2 + 0.05 * (g ** 2)) for rg2, g in zip(running_grads2, grads)] f_grad_shared = theano.function([x, mask, y], cost, updates=zgup + rg2up, name='adadelta_f_grad_shared') updir = [-tensor.sqrt(ru2 + 1e-6) / tensor.sqrt(rg2 + 1e-6) * zg for zg, ru2, rg2 in zip(zipped_grads, running_up2, running_grads2)] ru2up = [(ru2, 0.95 * ru2 + 0.05 * (ud ** 2)) for ru2, ud in zip(running_up2, updir)] param_up = [(p, p + ud) for p, ud in zip(tparams.values(), updir)] f_update = theano.function([lr], [], updates=ru2up + param_up, on_unused_input='ignore', name='adadelta_f_update') return f_grad_shared, f_update def rmsprop(lr, tparams, grads, x, mask, y, cost): """ A variant of SGD that scales the step size by running average of the recent step norms. Parameters ---------- lr : Theano SharedVariable Initial learning rate tpramas: Theano SharedVariable Model parameters grads: Theano variable Gradients of cost w.r.t to parameres x: Theano variable Model inputs mask: Theano variable Sequence mask y: Theano variable Targets cost: Theano variable Objective fucntion to minimize Notes ----- For more information, see [Hint2014]_. .. [Hint2014] Geoff Hinton, *Neural Networks for Machine Learning*, lecture 6a, http://cs.toronto.edu/~tijmen/csc321/slides/lecture_slides_lec6.pdf """ zipped_grads = [theano.shared(p.get_value() * numpy_floatX(0.), name='%s_grad' % k) for k, p in tparams.iteritems()] running_grads = [theano.shared(p.get_value() * numpy_floatX(0.), name='%s_rgrad' % k) for k, p in tparams.iteritems()] running_grads2 = [theano.shared(p.get_value() * numpy_floatX(0.), name='%s_rgrad2' % k) for k, p in tparams.iteritems()] zgup = [(zg, g) for zg, g in zip(zipped_grads, grads)] rgup = [(rg, 0.95 * rg + 0.05 * g) for rg, g in zip(running_grads, grads)] rg2up = [(rg2, 0.95 * rg2 + 0.05 * (g ** 2)) for rg2, g in zip(running_grads2, grads)] f_grad_shared = theano.function([x, mask, y], cost, updates=zgup + rgup + rg2up, name='rmsprop_f_grad_shared') updir = [theano.shared(p.get_value() * numpy_floatX(0.), name='%s_updir' % k) for k, p in tparams.iteritems()] updir_new = [(ud, 0.9 * ud - 1e-4 * zg / tensor.sqrt(rg2 - rg ** 2 + 1e-4)) for ud, zg, rg, rg2 in zip(updir, zipped_grads, running_grads, running_grads2)] param_up = [(p, p + udn[1]) for p, udn in zip(tparams.values(), updir_new)] f_update = theano.function([lr], [], updates=updir_new + param_up, on_unused_input='ignore', name='rmsprop_f_update') return f_grad_shared, f_update def build_model(tparams, options): trng = RandomStreams(SEED) # Used for dropout. use_noise = theano.shared(numpy_floatX(0.)) x = tensor.matrix('x', dtype='int64') mask = tensor.matrix('mask', dtype=config.floatX) y = tensor.vector('y', dtype='int64') n_timesteps = x.shape[0] n_samples = x.shape[1] emb = tparams['Wemb'][x.flatten()].reshape([n_timesteps, n_samples, options['dim_proj']]) proj = get_layer(options['encoder'])[1](tparams, emb, options, prefix=options['encoder'], mask=mask) if options['encoder'] == 'lstm': proj = (proj * mask[:, :, None]).sum(axis=0) proj = proj / mask.sum(axis=0)[:, None] if options['use_dropout']: proj = dropout_layer(proj, use_noise, trng) pred = tensor.nnet.softmax(tensor.dot(proj, tparams['U']) + tparams['b']) f_pred_prob = theano.function([x, mask], pred, name='f_pred_prob') f_pred = theano.function([x, mask], pred.argmax(axis=1), name='f_pred') off = 1e-8 if pred.dtype == 'float16': off = 1e-6 cost = -tensor.log(pred[tensor.arange(n_samples), y] + off).mean() return use_noise, x, mask, y, f_pred_prob, f_pred, cost def pred_probs(f_pred_prob, prepare_data, data, iterator, verbose=False): """ If you want to use a trained model, this is useful to compute the probabilities of new examples. """ n_samples = len(data[0]) probs = numpy.zeros((n_samples, 2)).astype(config.floatX) n_done = 0 for _, valid_index in iterator: x, mask, y = prepare_data([data[0][t] for t in valid_index], numpy.array(data[1])[valid_index], maxlen=None) pred_probs = f_pred_prob(x, mask) probs[valid_index, :] = pred_probs n_done += len(valid_index) if verbose: print '%d/%d samples classified' % (n_done, n_samples) return probs def pred_error(f_pred, prepare_data, data, iterator, verbose=False): """ Just compute the error f_pred: Theano fct computing the prediction prepare_data: usual prepare_data for that dataset. """ valid_err = 0 for _, valid_index in iterator: x, mask, y = prepare_data([data[0][t] for t in valid_index], numpy.array(data[1])[valid_index], maxlen=None) preds = f_pred(x, mask) targets = numpy.array(data[1])[valid_index] valid_err += (preds == targets).sum() valid_err = 1. - numpy_floatX(valid_err) / len(data[0]) return valid_err def train_lstm( dim_proj=5, # word embeding dimension and LSTM number of hidden units. patience=10, # Number of epoch to wait before early stop if no progress max_epochs=5000, # The maximum number of epoch to run dispFreq=10, # Display to stdout the training progress every N updates decay_c=0., # Weight decay for the classifier applied to the U weights. lrate=0.0001, # Learning rate for sgd (not used for adadelta and rmsprop) n_words=10000, # Vocabulary size optimizer=adadelta, # sgd, adadelta and rmsprop available, sgd very hard to use, not recommanded (probably need momentum and decaying learning rate). encoder='lstm', # TODO: can be removed must be lstm. saveto='lstm_model.npz', # The best model will be saved there validFreq=370, # Compute the validation error after this number of update. saveFreq=1110, # Save the parameters after every saveFreq updates maxlen=100, # Sequence longer then this get ignored batch_size=16, # The batch size during training. valid_batch_size=64, # The batch size used for validation/test set. dataset='imdb', # Parameter for extra option noise_std=0., use_dropout=True, # if False slightly faster, but worst test error # This frequently need a bigger model. reload_model=None, # Path to a saved model we want to start from. test_size=-1, # If >0, we keep only this number of test example. ): # Model options model_options = locals().copy() print "model options", model_options load_data, prepare_data = get_dataset(dataset) print 'Loading data' train, valid, test = load_data(n_words=n_words, valid_portion=0.05, maxlen=maxlen) if test_size > 0: # The test set is sorted by size, but we want to keep random # size example. So we must select a random selection of the # examples. idx = numpy.arange(len(test[0])) numpy.random.shuffle(idx) idx = idx[:test_size] test = ([test[0][n] for n in idx], [test[1][n] for n in idx]) ydim = numpy.max(train[1]) + 1 model_options['ydim'] = ydim print 'Building model' # This create the initial parameters as numpy ndarrays. # Dict name (string) -> numpy ndarray params = init_params(model_options) if reload_model: load_params('lstm_model.npz', params) # This create Theano Shared Variable from the parameters. # Dict name (string) -> Theano Tensor Shared Variable # params and tparams have different copy of the weights. tparams = init_tparams(params) # use_noise is for dropout (use_noise, x, mask, y, f_pred_prob, f_pred, cost) = build_model(tparams, model_options) if decay_c > 0.: decay_c = theano.shared(numpy_floatX(decay_c), name='decay_c') weight_decay = 0. weight_decay += (tparams['U'] ** 2).sum() weight_decay *= decay_c cost += weight_decay f_cost = theano.function([x, mask, y], cost, name='f_cost') grads = tensor.grad(cost, wrt=tparams.values()) f_grad = theano.function([x, mask, y], grads, name='f_grad') lr = tensor.scalar(name='lr') f_grad_shared, f_update = optimizer(lr, tparams, grads, x, mask, y, cost) print 'Optimization' kf_valid = get_minibatches_idx(len(valid[0]), valid_batch_size) kf_test = get_minibatches_idx(len(test[0]), valid_batch_size) print "%d train examples" % len(train[0]) print "%d valid examples" % len(valid[0]) print "%d test examples" % len(test[0]) history_errs = [] best_p = None bad_count = 0 if validFreq == -1: validFreq = len(train[0]) / batch_size if saveFreq == -1: saveFreq = len(train[0]) / batch_size uidx = 0 # the number of update done estop = False # early stop start_time = time.time() try: for eidx in xrange(max_epochs): n_samples = 0 # Get new shuffled index for the training set. kf = get_minibatches_idx(len(train[0]), batch_size, shuffle=True) for _, train_index in kf: uidx += 1 use_noise.set_value(1.) # Select the random examples for this minibatch y = [train[1][t] for t in train_index] x = [train[0][t]for t in train_index] # Get the data in numpy.ndarray format # This swap the axis! # Return something of shape (minibatch maxlen, n samples) x, mask, y = prepare_data(x, y) n_samples += x.shape[1] cost = f_grad_shared(x, mask, y) f_update(lrate) if numpy.isnan(cost) or numpy.isinf(cost): print 'NaN detected' return 1., 1., 1. if numpy.mod(uidx, dispFreq) == 0: print 'Epoch ', eidx, 'Update ', uidx, 'Cost ', cost if saveto and numpy.mod(uidx, saveFreq) == 0: print 'Saving...', if best_p is not None: params = best_p else: params = unzip(tparams) numpy.savez(saveto, history_errs=history_errs, **params) pkl.dump(model_options, open('%s.pkl' % saveto, 'wb'), -1) print 'Done' if numpy.mod(uidx, validFreq) == 0: use_noise.set_value(0.) train_err = pred_error(f_pred, prepare_data, train, kf) valid_err = pred_error(f_pred, prepare_data, valid, kf_valid) test_err = pred_error(f_pred, prepare_data, test, kf_test) history_errs.append([valid_err, test_err]) if (uidx == 0 or valid_err <= numpy.array(history_errs)[:, 0].min()): best_p = unzip(tparams) bad_counter = 0 print ('Train ', train_err, 'Valid ', valid_err, 'Test ', test_err) if (len(history_errs) > patience and valid_err >= numpy.array(history_errs)[:-patience, 0].min()): bad_counter += 1 if bad_counter > patience: print 'Early Stop!' estop = True break print 'Seen %d samples' % n_samples if estop: break except KeyboardInterrupt: print "Training interupted" end_time = time.time() if best_p is not None: zipp(best_p, tparams) else: best_p = unzip(tparams) use_noise.set_value(0.) kf_train_sorted = get_minibatches_idx(len(train[0]), batch_size) train_err = pred_error(f_pred, prepare_data, train, kf_train_sorted) valid_err = pred_error(f_pred, prepare_data, valid, kf_valid) test_err = pred_error(f_pred, prepare_data, test, kf_test) print 'Train ', train_err, 'Valid ', valid_err, 'Test ', test_err if saveto: numpy.savez(saveto, train_err=train_err, valid_err=valid_err, test_err=test_err, history_errs=history_errs, **best_p) print 'The code run for %d epochs, with %f sec/epochs' % ( (eidx + 1), (end_time - start_time) / (1. * (eidx + 1))) print >> sys.stderr, ('Training took %.1fs' % (end_time - start_time)) return train_err, valid_err, test_err if __name__ == '__main__': # See function train for all possible parameter and there definition. train_lstm( max_epochs=100, test_size=500, )
SimonHL/TSA
simpleLSTMtmp.py
Python
bsd-2-clause
22,625
import pika import logging class PublisherRabbit(object): """This is an example publisher that will handle unexpected interactions with RabbitMQ such as channel and connection closures. If RabbitMQ closes the connection, it will reopen it. You should look at the output, as there are limited reasons why the connection may be closed, which usually are tied to permission related issues or socket timeouts. It uses delivery confirmations and illustrates one way to keep track of messages that have been sent and if they've been confirmed by RabbitMQ. """ # EXCHANGE = 'dofinder' # EXCHANGE_TYPE = 'direct' # PUBLISH_INTERVAL = 1 # QUEUE = 'images' # ROUTING_KEY = 'images.scan' def __init__(self, amqp_url, exchange="dofinder", queue="images", route_key="images.scan"): """Setup the example publisher object, passing in the URL we will use to connect to RabbitMQ. :param str amqp_url: The URL for connecting to RabbitMQ """ self._connection = None self._channel = None self._deliveries = [] self._acked = 0 self._nacked = 0 self._message_number = 0 self._stopping = False self._url = amqp_url self._closing = False self.exchange = exchange self.exchange_type = "direct" self.queue = queue self.routing_key = route_key #self.logger = utils.get_logger(__name__, logging.INFO) self.logger = logging.getLogger(__class__.__name__) self.logger.info(__class__.__name__ + " logger initialized") def connect(self): """This method connects to RabbitMQ, returning the connection handle. When the connection is established, the on_connection_open method will be invoked by pika. If you want the reconnection to work, make sure you set stop_ioloop_on_close to False, which is not the default behavior of this adapter. :rtype: pika.SelectConnection """ return pika.SelectConnection(pika.URLParameters(self._url), self.on_connection_open, stop_ioloop_on_close=False) def on_connection_open(self, unused_connection): """This method is called by pika once the connection to RabbitMQ has been established. It passes the handle to the connection object in case we need it, but in this case, we'll just mark it unused. :type unused_connection: pika.SelectConnection """ self.logger.debug('Connection opened') self.add_on_connection_close_callback() self.open_channel() def add_on_connection_close_callback(self): """This method adds an on close callback that will be invoked by pika when RabbitMQ closes the connection to the publisher unexpectedly. """ self.logger.debug('Adding connection close callback') self._connection.add_on_close_callback(self.on_connection_closed) def on_connection_closed(self, connection, reply_code, reply_text): """This method is invoked by pika when the connection to RabbitMQ is closed unexpectedly. Since it is unexpected, we will reconnect to RabbitMQ if it disconnects. :param pika.connection.Connection connection: The closed connection obj :param int reply_code: The server provided reply_code if given :param str reply_text: The server provided reply_text if given """ self._channel = None if self._closing: self._connection.ioloop.stop() else: self.logger.warning('Connection closed, reopening in 5 seconds: (%s) %s', reply_code, reply_text) self._connection.add_timeout(5, self.reconnect) def reconnect(self): """Will be invoked by the IOLoop timer if the connection is closed. See the on_connection_closed method. """ self._deliveries = [] self._acked = 0 self._nacked = 0 self._message_number = 0 # This is the old connection IOLoop instance, stop its ioloop self._connection.ioloop.stop() # Create a new connection self._connection = self.connect() # There is now a new connection, needs a new ioloop to run self._connection.ioloop.start() def open_channel(self): """This method will open a new channel with RabbitMQ by issuing the Channel.Open RPC command. When RabbitMQ confirms the channel is open by sending the Channel.OpenOK RPC reply, the on_channel_open method will be invoked. """ self.logger.debug('Creating a new channel') self._connection.channel(on_open_callback=self.on_channel_open) def on_channel_open(self, channel): """This method is invoked by pika when the channel has been opened. The channel object is passed in so we can make use of it. Since the channel is now open, we'll declare the exchange to use. :param pika.channel.Channel channel: The channel object """ self.logger.debug('Channel opened') self._channel = channel self.add_on_channel_close_callback() self.setup_exchange(self.exchange) def add_on_channel_close_callback(self): """This method tells pika to call the on_channel_closed method if RabbitMQ unexpectedly closes the channel. """ self.logger.debug('Adding channel close callback') self._channel.add_on_close_callback(self.on_channel_closed) def on_channel_closed(self, channel, reply_code, reply_text): """Invoked by pika when RabbitMQ unexpectedly closes the channel. Channels are usually closed if you attempt to do something that violates the protocol, such as re-declare an exchange or queue with different parameters. In this case, we'll close the connection to shutdown the object. :param pika.channel.Channel: The closed channel :param int reply_code: The numeric reason the channel was closed :param str reply_text: The text reason the channel was closed """ self.logger.warning('Channel was closed: (%s) %s', reply_code, reply_text) if not self._closing: self._connection.close() def setup_exchange(self, exchange_name): """Setup the exchange on RabbitMQ by invoking the Exchange.Declare RPC command. When it is complete, the on_exchange_declareok method will be invoked by pika. :param str|unicode exchange_name: The name of the exchange to declare """ self.logger.debug('Declaring exchange %s', exchange_name) self._channel.exchange_declare(self.on_exchange_declareok, exchange_name, self.exchange_type, durable=True ) def on_exchange_declareok(self, unused_frame): """Invoked by pika when RabbitMQ has finished the Exchange.Declare RPC command. :param pika.Frame.Method unused_frame: Exchange.DeclareOk response frame """ self.logger.debug('Exchange declared') self.setup_queue(self.queue) def setup_queue(self, queue_name): """Setup the queue on RabbitMQ by invoking the Queue.Declare RPC command. When it is complete, the on_queue_declareok method will be invoked by pika. :param str|unicode queue_name: The name of the queue to declare. """ self.logger.debug('Declaring queue %s', queue_name) self._channel.queue_declare(self.on_queue_declareok, queue_name, durable=True) def on_queue_declareok(self, method_frame): """Method invoked by pika when the Queue.Declare RPC call made in setup_queue has completed. In this method we will bind the queue and exchange together with the routing key by issuing the Queue.Bind RPC command. When this command is complete, the on_bindok method will be invoked by pika. :param pika.frame.Method method_frame: The Queue.DeclareOk frame """ self.logger.info('Binding exchenge: %s, to: %s with: %s', self.exchange, self.queue, self.routing_key) self._channel.queue_bind(self.on_bindok, self.queue, self.exchange, self.routing_key) def on_bindok(self, unused_frame): """This method is invoked by pika when it receives the Queue.BindOk response from RabbitMQ. Since we know we're now setup and bound, it's time to start publishing.""" self.logger.debug('Queue bound') #self.enable_delivery_confirmations() self.start_publishing() def start_publishing(self): """This method will enable delivery confirmations and schedule the first message to be sent to RabbitMQ """ self.logger.debug('Issuing consumer related RPC commands') for json_image in self.images_generator: self.publish_message(json_image) def enable_delivery_confirmations(self): """Send the Confirm.Select RPC method to RabbitMQ to enable delivery confirmations on the channel. The only way to turn this off is to close the channel and create a new one. When the message is confirmed from RabbitMQ, the on_delivery_confirmation method will be invoked passing in a Basic.Ack or Basic.Nack method from RabbitMQ that will indicate which messages it is confirming or rejecting. """ self.logger.debug('Issuing Confirm.Select RPC command') self._channel.confirm_delivery(self.on_delivery_confirmation) def on_delivery_confirmation(self, method_frame): """Invoked by pika when RabbitMQ responds to a Basic.Publish RPC command, passing in either a Basic.Ack or Basic.Nack frame with the delivery tag of the message that was published. The delivery tag is an integer counter indicating the message number that was sent on the channel via Basic.Publish. Here we're just doing house keeping to keep track of stats and remove message numbers that we expect a delivery confirmation of from the list used to keep track of messages that are pending confirmation. :param pika.frame.Method method_frame: Basic.Ack or Basic.Nack frame """ confirmation_type = method_frame.method.NAME.split('.')[1].lower() self.logger.debug('Received %s for delivery tag: %i', confirmation_type, method_frame.method.delivery_tag) if confirmation_type == 'ack': self._acked += 1 elif confirmation_type == 'nack': self._nacked += 1 self._deliveries.remove(method_frame.method.delivery_tag) self.logger.info('Published %i messages, %i have yet to be confirmed, ' '%i were acked and %i were nacked', self._message_number, len(self._deliveries), self._acked, self._nacked) def publish_message(self, json_message): """If the class is not stopping, publish a message to RabbitMQ, appending a list of deliveries with the message number that was sent. This list will be used to check for delivery confirmations in the on_delivery_confirmations method. Once the message has been sent, schedule another message to be sent. The main reason I put scheduling in was just so you can get a good idea of how the process is flowing by slowing down and speeding up the delivery intervals by changing the PUBLISH_INTERVAL constant in the class. """ if self._stopping: return properties = pika.BasicProperties(app_id='example-publisher', content_type='application/json', #headers=message, delivery_mode=2) # DIDO make store to the disk self._channel.basic_publish(self.exchange, self.routing_key, #json.dumps(message, ensure_ascii=False), json_message, properties) self._message_number += 1 self._deliveries.append(self._message_number) self.logger.debug('Published message # %i', self._message_number) def close_channel(self): """Invoke this command to close the channel with RabbitMQ by sending the Channel.Close RPC command. """ self.logger.info('Closing the channel') if self._channel: self._channel.close() def run(self, images_generator_function): """Run the example code by connecting and then starting the IOLoop. """ self.images_generator = images_generator_function self.logger.info('Connecting to %s ...', self._url) while True: try: self._connection = self.connect() self.logger.info('Succesful connection to %s', self._url) break except: pass self._connection.ioloop.start() def stop(self): """Stop the example by closing the channel and connection. We set a flag here so that we stop scheduling new messages to be published. The IOLoop is started because this method is invoked by the Try/Catch below when KeyboardInterrupt is caught. Starting the IOLoop again will allow the publisher to cleanly disconnect from RabbitMQ. """ self.logger.info('Stopping') self._stopping = True self.close_channel() self.close_connection() self._connection.ioloop.start() self.logger.info('Stopped') def close_connection(self): """This method closes the connection to RabbitMQ.""" self.logger.info('Closing connection') self._closing = True self._connection.close() # # def main(): # # # # Connect to localhost:5672 as guest with the password guest and virtual host "/" (%2F) # def gen_iamges(): # for i in range(5): # yield json.dumps({"ciao": " msg num " + str(i)}) # # example = PublisherRabbit('amqp://guest:guest@180.0.0.8:5672') # # try: # example.run(gen_iamges()) # except KeyboardInterrupt: # example.stop() # # if __name__ == '__main__': # main()
di-unipi-socc/DockerFinder
analysis/pyFinder/pyfinder/core/publisher_rabbit.py
Python
apache-2.0
14,745
from ceph_deploy.util import pkg_managers, templates from ceph_deploy.lib import remoto def install(distro, version_kind, version, adjust_repos): pkg_managers.yum_clean(distro.conn) pkg_managers.yum(distro.conn, ['ceph', 'ceph-mon', 'ceph-osd']) def mirror_install(distro, repo_url, gpg_url, adjust_repos, extra_installs=True): repo_url = repo_url.strip('/') # Remove trailing slashes gpg_url_path = gpg_url.split('file://')[-1] # Remove file if present pkg_managers.yum_clean(distro.conn) if adjust_repos: remoto.process.run( distro.conn, [ 'rpm', '--import', gpg_url_path, ] ) ceph_repo_content = templates.ceph_repo.format( repo_url=repo_url, gpg_url=gpg_url ) distro.conn.remote_module.write_yum_repo(ceph_repo_content) if extra_installs: pkg_managers.yum(distro.conn, ['ceph', 'ceph-mon', 'ceph-osd']) def repo_install(distro, reponame, baseurl, gpgkey, **kw): # Get some defaults name = kw.pop('name', '%s repo' % reponame) enabled = kw.pop('enabled', 1) gpgcheck = kw.pop('gpgcheck', 1) install_ceph = kw.pop('install_ceph', False) proxy = kw.pop('proxy', '') # will get ignored if empty _type = 'repo-md' baseurl = baseurl.strip('/') # Remove trailing slashes pkg_managers.yum_clean(distro.conn) if gpgkey: remoto.process.run( distro.conn, [ 'rpm', '--import', gpgkey, ] ) repo_content = templates.custom_repo( reponame=reponame, name=name, baseurl=baseurl, enabled=enabled, gpgcheck=gpgcheck, _type=_type, gpgkey=gpgkey, proxy=proxy, **kw ) distro.conn.remote_module.write_yum_repo( repo_content, "%s.repo" % reponame ) # Some custom repos do not need to install ceph if install_ceph: pkg_managers.yum(distro.conn, ['ceph', 'ceph-mon', 'ceph-osd', 'radosgw'])
rtulke/ceph-deploy
ceph_deploy/hosts/rhel/install.py
Python
mit
2,132
# # 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. # """A package containing internal utilities. For internal use only; no backwards-compatibility guarantees. """ from __future__ import absolute_import
rangadi/beam
sdks/python/apache_beam/utils/__init__.py
Python
apache-2.0
936
import random import time import os import tempfile from infi.unittest import parameters from pkg_resources import Requirement import forge from .test_cases import ForgeTest from pydeploy import environment from pydeploy import os_api from pydeploy import virtualenv_api from pydeploy.environment_utils import EnvironmentUtils from pydeploy import get_active_envrionment from pydeploy.sources import ( Source, Path, EasyInstall ) class EnvironmentTest(ForgeTest): def tearDown(self): environment.clear_active_environment() self.assertIsNone(get_active_envrionment()) super(EnvironmentTest, self).tearDown() class EnvironmentConstructionTest(EnvironmentTest): def setUp(self): super(EnvironmentConstructionTest, self).setUp() self.env_root = "/some/path" self.forge.replace_many(os_api, "makedirs") self.forge.replay() # make sure nothing happens during the test self.env = environment.Environment(self.env_root) def test__no_checkout_cache_by_default(self): self.assertIsNone(self.env.get_checkout_cache()) def test__utils(self): self.assertIsInstance(self.env.utils, EnvironmentUtils) class GetActiveEnvironmentTest(EnvironmentTest): def setUp(self): super(GetActiveEnvironmentTest, self).setUp() self.forge.replace_many(virtualenv_api, "create_environment", "activate_environment" ) def test__create_and_activate_frontend(self): create_environment_stub = self.forge.replace(virtualenv_api, "create_environment") e = self.forge.create_hybrid_mock(environment.Environment) e._states = [] e.__forge__.enable_setattr_during_replay() e._path = path = os.path.join(tempfile.mkdtemp(), "some", "path") create_environment_stub(e._path) def _assert_no_active_environment(): self.assertIsNone(get_active_envrionment()) e._try_load_installed_signatures() virtualenv_api.activate_environment(path).and_call(_assert_no_active_environment) with self.forge.verified_replay_context(): e.create_and_activate() self.addCleanup(e.deactivate) self.assertIs(get_active_envrionment(), e) class EnvironmentWithLocalPathTest(EnvironmentTest): def setUp(self): super(EnvironmentWithLocalPathTest, self).setUp() self.path = os.path.join(tempfile.gettempdir(), "envs", str(random.random())) self.argv = ["some", "argv", "here"] self.forge.replace_with(virtualenv_api, "create_environment", self._create) self.forge.replace_with(virtualenv_api, "activate_environment", self._activate) self.activated_count = 0 self.env = environment.Environment(self.path, self.argv) self.forge.replace(self.env, "_fix_sys_path") self.assertEquals(self.activated_count, 0) def _create(self, path): if not os.path.isdir(path): os.makedirs(path) def _activate(self, path): self.assertEquals(self.path, path) self.activated_count += 1 class EnvironmentAPITest(EnvironmentWithLocalPathTest): def test__get_argv(self): self.assertEquals(self.env.get_argv(), self.argv) self.assertIsNot(self.env.get_argv(), self.argv) def test__get_path(self): self.assertEquals(self.env.get_path(), self.path) def test__get_python_executable(self): self.assertEquals(self.env.get_python_executable(), os.path.join(self.path, "bin", "python")) def test__get_easy_install_executable(self): self.assertEquals(self.env._get_easy_install_executable(), os.path.join(self.path, "bin", "easy_install")) def test__get_pip_executable(self): self.assertEquals(self.env._get_pip_executable(), os.path.join(self.path, "bin", "pip")) def test__make_source_object_path(self): path = os.path.join(tempfile.gettempdir(), "bla") open(path, "wb").close() result = self.env._make_source_object(path) self.assertIsInstance(result, Path) self.assertEquals(result._param, path) def test__make_source_object_easy_install(self): pkg_name = "some_pkg" result = self.env._make_source_object(pkg_name) self.assertIsInstance(result, EasyInstall) self.assertEquals(result._param, pkg_name) class ActivatedEnvironmentTest(EnvironmentWithLocalPathTest): def setUp(self): super(ActivatedEnvironmentTest, self).setUp() self.env.create_and_activate() self.addCleanup(self.env.deactivate) self.assertEquals(self.activated_count, 1) class AliasTest(ActivatedEnvironmentTest): def setUp(self): super(AliasTest, self).setUp() self.source = self.forge.create_mock(Source) self.source.get_name().whenever().and_return('some_name_here') self.source.get_signature().whenever().and_return('signature') self.nickname = 'some_nickname' @parameters.toggle('reinstall') def test__installing_from_string(self, reinstall): self.env.add_alias(self.nickname, self.source) self.source.install(self.env, reinstall=reinstall) self.env._fix_sys_path() self.forge.replay() self.env.install(self.nickname, reinstall=reinstall) @parameters.toggle('reinstall') def test__installing_from_requirement_no_constraint(self, reinstall): self.env.add_alias(self.nickname, self.source) self.source.install(self.env, reinstall=reinstall) self.env._fix_sys_path() self.forge.replay() self.env.install(Requirement.parse(self.nickname), reinstall=reinstall) @parameters.toggle('reinstall') def test__installing_from_requirements_with_constraints(self, reinstall): real_source = self.forge.create_mock(Source) real_source.get_name().whenever().and_return('real_source_name') real_source.get_signature().whenever().and_return('real_source_signature') self.env.add_alias("bla", self.source) source = Requirement.parse("bla>=2.0.0") self.source.resolve_constraints([(">=", "2.0.0")]).and_return(real_source) real_source.install(self.env, reinstall=reinstall) self.env._fix_sys_path() self.forge.replay() self.env.install(source, reinstall=reinstall) def test__has_alias(self): self.env.add_alias(self.nickname, self.source) self.assertTrue(self.env.has_alias(self.nickname)) self.assertFalse(self.env.has_alias("bla")) self.assertTrue(self.env.has_alias(Requirement.parse("{}>=2.0.0".format(self.nickname)))) class InstallCheckoutTest(ActivatedEnvironmentTest): def setUp(self): super(InstallCheckoutTest, self).setUp() self.source = self.forge.create_mock(Source) self.source_name = "some_name" self.source.get_name = lambda: self.source_name self.source_signature = "some_signature" self.source.get_signature = lambda: self.source_signature def _assert_env_is_in_installation_context(self): self.assertIsNotNone(self.env.installer._context) def _assert_env_is_not_in_installation_context(self): self.assertIsNone(self.env.installer._context) @parameters.toggle('reinstall') def test__main_installation_sequence(self, reinstall): expected_result = self.forge.create_sentinel() self.source.install(self.env, reinstall=reinstall).\ and_call(self._assert_env_is_in_installation_context).\ and_return(expected_result) self.env._fix_sys_path() with self.forge.verified_replay_context(): self._assert_env_is_not_in_installation_context() self.assertEquals(self.activated_count, 1) result = self.env.install(self.source, reinstall=reinstall) self.assertEquals(self.activated_count, 1) self.assertIs(result, expected_result) @parameters.toggle('with_arg') def test__main_checkout_sequence(self, with_arg): expected_result = self.forge.create_sentinel() arg = self.forge.create_sentinel() self.source.checkout(self.env, *([arg] if with_arg else ())).\ and_call(self._assert_env_is_not_in_installation_context).\ and_return(expected_result) with self.forge.verified_replay_context(): self._assert_env_is_not_in_installation_context() result = self.env.checkout(self.source, *([arg] if with_arg else ())) self.assertIs(expected_result, result) def test__installed_signatures(self): self.env._fix_sys_path() self.forge.replay() self.installed = False class MySource(Path): def install(self_, env, reinstall): if self.installed: raise Exception("Already installed") self.installed = True src = MySource("/bla/bla") self.assertFalse(self.env._is_already_installed(src)) self.assertFalse(self.installed) for i in range(3): #only first time should matter self.env.install(src, reinstall=False) self.assertEquals(self.activated_count, 1) self.assertTrue(self.installed) # even if the environment is reinitialized, nothing should happen second_env = environment.Environment(self.path) second_env.create_and_activate() self.addCleanup(second_env.deactivate) self.assertEquals(self.activated_count, 2) self.env.install(src, reinstall=False) self.assertEquals(self.activated_count, 2)
vmalloc/pydeploy
tests/test__environment.py
Python
bsd-3-clause
9,757
""" Django settings for a project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ # SECURITY WARNING: don't run with debug turned on in production! ACCOUNT_ACTIVATION_DAYS = 30 # кол-во дней для хранения кода активации # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'registration', 'chat', 'api', 'HipstaChat' ) MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'HipstaChat.middleware.LoginFormMiddleware' ) TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.request' ) ROOT_URLCONF = 'HipstaChat.urls' AUTH_USER_EMAIL_UNIQUE = True WSGI_APPLICATION = 'HipstaChat.wsgi.application' # Internationalization # https://docs.djangoproject.com/en/1.7/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.7/howto/static-files/ STATIC_URL = '/static/' MEDIA_URL = '/media/' STATIC_ROOT = os.path.join(BASE_DIR, '../static_content/static') STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static"), ) TEMPLATE_DIRS = ( os.path.join(BASE_DIR, 'templates'), ) AUTH_USER_MODEL = 'HipstaChat.HCUser' # AUTHENTICATION_BACKENDS = ( # 'HipstaChat.custom_auth.HCUserModelBackend', # 'django.contrib.auth.backends.ModelBackend' # ) from .settings_local import *
13pi/HipstaChat
HipstaChat/settings.py
Python
gpl-2.0
2,553
# # This file is part of GreatFET # from ..interface import PirateCompatibleInterface class I2CBus(PirateCompatibleInterface): """ Class representing a GreatFET I2C bus. For now, supports only the primary I2C bus (I2C0), but will be expanded when the vendor commands are. """ # Short name for this type of interface. INTERFACE_SHORT_NAME = "i2c" def __init__(self, board, name='i2c bus', buffer_size=255, duty_cycle_count=255): """ Initialize a new I2C bus. Args: board -- The GreatFET board whose I2C bus we want to control. name -- The display name for the given I2C bus. buffer_size -- The size of the I2C receive buffer on the GreatFET. """ # Store a reference to the parent board, and our API. self.board = board self.api = board.apis.i2c # Store our limitations. self.buffer_size = buffer_size # Create a list that will store all connected devices. self.devices = [] # Store our duty cycle count self.duty_cycle_count = duty_cycle_count # Set up the I2C bus for communications. board.apis.i2c.start(duty_cycle_count) def attach_device(self, device): """ Attaches a given I2C device to this bus. Typically called by the I2C device as it is constructed. Arguments: device -- The device object to attach to the given bus. """ # TODO: Check for address conflicts! self.devices.append(device) def read(self, address, receive_length=0): """ Reads data from the I2C bus. Args: address -- The 7-bit I2C address for the target device. Should not contain read/write bits. Can be used to address special addresses, for now; but this behavior may change. receive_length -- The I2C controller will attempt to read the provided amount of data, in bytes. """ if (not isinstance(receive_length, int)) or receive_length < 0: raise ValueError("invalid receive length!") if receive_length > self.buffer_size: raise ValueError("Tried to receive more than the size of the receive buffer.") if address > 127 or address < 0: raise ValueError("Tried to transmit to an invalid I2C address!") return self.api.read(address, receive_length) def write(self, address, data): """ Sends data over the I2C bus. Args: address -- The 7-bit I2C address for the target device. Should not contain read/write bits. Can be used to address special addresses, for now; but this behavior may change. data -- The data to be sent to the given device. """ if address > 127 or address < 0: raise ValueError("Tried to transmit to an invalid I2C address!") data = bytes(data) write_status = self.api.write(address, data) return write_status def transmit(self, address, data, receive_length): """ Wrapper function for back to back TX/RX. Args: address -- The 7-bit I2C address for the target device. Should not contain read/write bits. Can be used to address special addresses, for now; but this behavior may change. data -- The data to be sent to the given device. receive_length -- The I2C controller will attempt to read the provided amount of data, in bytes. """ self.write(address, data) return self.read(address, receive_length) def scan(self): """ TX/RX over the I2C bus, and receives ACK/NAK in response for valid/invalid addresses. """ responses = self.api.scan() write_responses = responses[:16] read_responses = responses[16:] responses = [] for write_response, read_response in zip(write_responses, read_responses): for x in range(8): responses.append( (write_response & 1 << x != 0, read_response & 1 << x != 0)) return responses # # Low-level methods that allow us to be used in bus-pirate mode. # def _handle_pirate_read(self, length, ends_transaction=False): """ Performs a bus-pirate read of the given length, and returns a list of numeric values. """ response = [] # Send down data in 256-byte chuns. CHUNK_SIZE = 256 # Read our data. to_receive = length while to_receive: size_to_read = CHUNK_SIZE if (to_receive > CHUNK_SIZE) else to_receive to_receive -= size_to_read # If this exhausts our data, we want to end with a NAK, as this serves as an I2C "end-of-packet". end_with_nak = ends_transaction and (not to_receive) data = self.api.read_bytes(size_to_read, end_with_nak) response.extend(data) return response def _handle_pirate_write(self, data, ends_transaction=False): """ Performs a bus-pirate send of the relevant list of data, and returns a list of any data received. """ # Send down data in 256-byte chuns. CHUNK_SIZE = 256 # Transmit the bytes. to_transmit = data[:] while to_transmit: chunk_to_transmit = to_transmit[0:CHUNK_SIZE] del to_transmit[0:CHUNK_SIZE] self.api.issue_bytes(bytes(chunk_to_transmit)) # I2C is half-duplex, so we don't provide any data in return. return [] def _handle_pirate_start(self): """ Starts a given communication by performing any start conditions present on the interface. """ self.api.issue_start() def _handle_pirate_stop(self): """ Starts a given communication by performing any start conditions present on the interface. """ self.api.issue_stop()
dominicgs/GreatFET-experimental
host/greatfet/interfaces/i2c_bus.py
Python
bsd-3-clause
6,235
from alembic.config import Config from alembic.environment import EnvironmentContext from alembic.migration import MigrationContext from alembic.script import ScriptDirectory from difflib import unified_diff from pytest import fixture from re import split from sqlalchemy import engine_from_config from subprocess import call, Popen, PIPE @fixture def settings(testing): # we use our own db for this test, since it will be created and dropped project_name = testing.project_name() db_name = '%s_migration_test' % project_name return { 'db_name': db_name, 'sqlalchemy.url': 'postgresql:///' + db_name, 'testing': True, } def createdb(db_name): call('createdb %s -E utf8 -T template0' % db_name, shell=True) def dropdb(db_name): call('dropdb %s' % db_name, shell=True) def dumpdb(db_name): p = Popen('pg_dump --schema-only %s' % db_name, shell=True, stdout=PIPE, stderr=PIPE) out, err = p.communicate() assert p.returncode == 0, err # we parse the output and change it a little bit for better diffing out = out.splitlines() start = None for index, line in enumerate(out): # we only change CREATE TABLE statements if line.startswith('CREATE TABLE'): start = index if start is not None: if line.strip().endswith(');'): # we sort the columns out[start + 1:index] = sorted(out[start + 1:index]) start = None else: # and remove trailing commas out[index] = line.rstrip().rstrip(',') else: # for COPY statements, we have to sort the column names as well if line.startswith('COPY'): parts = split('[()]', line) columns = sorted(x.strip() for x in parts[1].split(',')) out[index] = '%s(%s)%s' % (parts[0], ' ,'.join(columns), parts[2]) # we add newlines for diffing return ['%s\n' % x for x in out] def test_db_metadata_differences(models, settings): db_name = settings['db_name'] # first we drop anything there might be dropdb(db_name) # then we create a clean DB from the metadata createdb(db_name) metadata = models.metadata engine = engine_from_config(settings) metadata.bind = engine metadata.create_all(engine, tables=[table for name, table in metadata.tables.items() if not name.startswith('test_')]) # and store the results create_all_result = dumpdb(db_name) engine.dispose() # now we do it again, but this time using migrations dropdb(db_name) createdb(db_name) config = Config() config.set_main_option('script_location', 'backrest:migrations') script = ScriptDirectory.from_config(config) connection = engine.connect() environment = EnvironmentContext(config, script, starting_rev='base', destination_rev='head') context = MigrationContext.configure(connection) def upgrade(rev, context): return script._upgrade_revs('head', rev) context._migrations_fn = upgrade environment._migration_context = context with environment.begin_transaction(): environment.run_migrations() # we drop alembic_version to avoid it showing up in the diff engine.execute('DROP TABLE alembic_version;') # we store these results alembic_result = dumpdb(db_name) del context del environment connection.close() del connection engine.dispose() # now we check whether there are differences and output them if there are diff = unified_diff(alembic_result, create_all_result) assert alembic_result == create_all_result, \ 'Migration output differs:\n' + ''.join(diff)
pyfidelity/rest-seed
backend/backrest/tests/test_migrations.py
Python
bsd-2-clause
3,745
from riq_obj import RIQObject from riq_base import RIQBase class User(RIQObject,RIQBase) : # Object Attributes _id = None _name = None _email = None _email = None def __init__(self, _id=None, name=None, email=None, data=None) : if data != None : self.parse(data) elif self.id(_id) != None : self.get() self.name(name) self.email(email) @classmethod def node(cls) : return 'users' def parse(self,data) : self.id(data.get('id',None)) self.name(data.get('name',None)) self.email(data.get('email',None)) return self # Data Payload def payload(self) : payload = { 'name' : self.name(), 'email' : self.email() } if self.id() : payload['id'] = self.id() return payload # Hybrid def id(self,value=None) : if value != None : self._id = value return self._id def email(self,value=None) : if value != None : self._email = value return self._email def name(self,value=None) : if value != None : self._name = value return self._name
SalesforceIQ/apisdk
python/relateiq/users.py
Python
apache-2.0
1,236
#!/usr/bin/env python #Skript ist momentan nur rudimentaer und unausgemistet, sorry! from PIL import Image from mpl_toolkits.axes_grid.axislines import SubplotZero import matplotlib.pyplot as plt import numpy as np #todo: calculate gauss-filter with s defined by the command line #v=[1,3,6,9,10,9,6,3,1] # Gauss Filter with s=2 v=[1,2,4,7,10,13,16,17,16,13,10,7,4,2,1] # Gauss Filter with s=3 #todo: define image file in command line #todo: check if laser beam is horizontal or vertical in the image #todo: delete things in the image that are not the laser beam #todo: detect laser beam in a non-dark image background (e.g. open two images of the same background, one with laser beam, one without. correlate them and subtract them so that only the laser beam is left) #img=Image.open("/home/martin/Bilder/Laser/IMG_20150422_203922b.jpg") img=Image.open("/home/martin/Bilder/Laser/DSC_8243b.jpg") #img=Image.open("/home/martin/Bilder/Laser/DSC_8207_mod.jpg") #img=Image.open("/home/martin/Bilder/Laser/DSC_8207.JPG") r,g,b=img.split() pix=r.load() profile=[] profilec=[] profilef=[] pvalue=[] A=np.asarray(r) for x in xrange(r.size[0]): profile.append(0) profilec.append(0) pvalue.append(0) profilef.append(0) #print(profile) col=A[:,x] colc=np.convolve(A[:,x],v,mode='same') pvalue[x]=max(colc) profile[x]=np.argmax(col) profilec[x]=np.argmax(colc) #parabolic sub-pixel maximum finder (http://www-ist.massey.ac.nz/dbailey/sprg/pdfs/2003_IVCNZ_414.pdf) if ( profilec[x] > 0 and profilec[x] < r.size[1]): profilef[x] = (colc[profilec[x]+1] - colc[profilec[x]-1]) / (4.0*colc[profilec[x]] - 2.0*(colc[profilec[x]+1] + colc[profilec[x]-1] )) profilef[x] = profilef[x] + profilec[x] #todo: #zero-filling and filtering sub-pixel maximum finder #oversampling_factor = 8 # 1 value, n-1 zeros #searchrange = 10 # search n pixels before and n after the maximum value # for y in xrange(r.size[1]): # if pix[x,y] > pvalue[x]: # profile[x] = y # pvalue[x] = pix[x,y] #todo: #geometrische Anpassung, wenn Brennweite bekannt xaxis = np.arange(r.size[0]) profilefnp=np.asarray(profilef) preselector = pvalue > np.mean(pvalue)*0.75 #todo: define the pixels that should not be used in the polyfit (e.g. the reference object) #linear fit to the data to get a straight line of the residuals as result p = np.polyfit( xaxis[preselector], profilefnp[preselector], 1,) flattened=profilef-p[1]-p[0]*xaxis #quadratic fit to the data to get a straight line of the residuals as result #p = np.polyfit( xaxis[preselector], profilefnp[preselector], 2,) #flattened = profilef - p[2] - p[1]*xaxis - p[0] * xaxis**2 #todo: variable high pass filtering to remove lens errors or waviness #points with weak lighting are marked weak1=flattened*1.0 weak2=flattened*1.0 weak1[pvalue > (np.mean(pvalue)*0.5)]=np.nan weak2[pvalue > (np.mean(pvalue)*0.75)]=np.nan #flattened[pvalue < (np.mean(pvalue)*0.7)]=np.nan #np.place(weak1,pvalue < (np.mean(pvalue)/3),None) #np.place(weak2,pvalue < (np.mean(pvalue)/2),None) #cleaned=profilef #cleaned[pvalue < (np.mean(pvalue)/2)]=np.nan #warning if too many overdriven pixels overdriven=np.count_nonzero(A>254) print overdriven allpixels=r.size[0]*r.size[1] overdrivenpercent = 100.0* overdriven / allpixels print ('%i pixels are at limit! (%f percent)' %(overdriven,overdrivenpercent)) #figure1: raw profile data of various maximum finding algorithms plt.figure(1) #ax = SubplotZero(fig, 111) #fig.add_subplot(ax) plt.plot(profile,'r') plt.plot(profilec) plt.plot(profilef,'g') plt.title('raw profile data of various maximum finding algorithms') plt.grid(b=True, which=u'major') #plt.plot(clean,'g') #figure2: illumination data plt.figure(2) #plt.plot(A[:,20],'r') #plt.plot(np.convolve(A[:,20],v,mode='same')/sum(v))#,mode='same') plt.plot(pvalue/np.sum(v)) plt.title('illumination data') plt.grid(b=True, which=u'major') #figure3: filtered profile in pixels plt.figure(3) plt.plot(xaxis,flattened,'g') plt.plot(xaxis,weak2,'y') plt.plot(xaxis,weak1,'r') plt.grid(b=True, which=u'major') plt.xlabel('length / px') plt.ylabel('height / px') plt.title('filtered profile in pixels') #plt.plot(xaxis, pvalue < (np.mean(pvalue)/3),'r') #plt.plot(xaxis, pvalue < (np.mean(pvalue)/2),'y') #todo in far future: recognize the reference object and its dimensions in pixels in the image height_px = 20 width_px = 50 #todo: define the values of the reference object in the command line height_mm = 23.0 width_mm = 37.0 x_scale = width_px / width_mm # pixel pro mm breite y_scale = height_px / height_mm # pixel pro mm hoehe #figure3: filtered profile in mm plt.figure(4) plt.plot(xaxis / x_scale, flattened / y_scale,'g') plt.plot(xaxis / x_scale, weak2 / y_scale,'y') plt.plot(xaxis / x_scale, weak1 / y_scale,'r') plt.grid(b=True, which=u'major') plt.xlabel('length / mm') plt.ylabel('height / mm') plt.title('filtered profile in mm') plt.show() #todo: calculate roughness parameters like Rz, Ra, Rq... #f = open('/home/martin/Bilder/Laser/DSC_8207_mod.txt','w') #for k in profile: # f.write("%s,%s\n" %(profile[k], pvalue[k]) ) #f.close
kolg/light-section_script
profil.py
Python
gpl-2.0
5,171
from itertools import permutations destinations = set() distances = dict() with open("inputData.txt", "r") as infile: for line in infile: values = line.split() # 0 = Departing, 2 = Arriving, 4 = Cost destinations.add(values[0]) destinations.add(values[2]) # This will create a dictionary of dictionaries of possible distances, e.g. # {'Tristram': {'AlphaCentauri': 34, 'Snowdin': 100}, (...)} distances.setdefault(values[0], dict())[values[2]] = int(values[4]) distances.setdefault(values[2], dict())[values[0]] = int(values[4]) possible_distances = [] def getDistance(x, y): return distances[x][y] for items in permutations(destinations): distancesT = map(getDistance, items[:-1], items[1:]) total_fuel_used = sum(distancesT) possible_distances.append(total_fuel_used) # This required very little modification. longest_distance = max(possible_distances) print(longest_distance)
gytdau/advent
Day9/part2.py
Python
mit
970
import redis import uuid import pytz import random import pika from datetime import datetime class hmfkException(Exception): def __init__(self,code,message): self.code=code self.message=message class projectsEntity: def __init__(self,name='',enabled=False,x_account_bytes_used=0,x_account_container_count=0,x_account_object_count=0,x_timestamp=0): tz = pytz.timezone("Europe/Riga") self.name=name self.enabled=enabled self.x_account_bytes_used=x_account_bytes_used self.x_account_object_count=x_account_object_count self.x_account_container_count=x_account_container_count self.x_timestamp=x_timestamp self.date=datetime.fromtimestamp(float(x_timestamp), tz) class RpcClient(object): def __init__(self, host, user, password, queue='rpc_queue'): self.credentials = pika.PlainCredentials(user, password) self.connection = pika.BlockingConnection(pika.ConnectionParameters( host=host, credentials = self.credentials)) self.exchange='message' self.queue=queue self.channel = self.connection.channel() result = self.channel.queue_declare(exclusive=True) self.callback_queue = result.method.queue self.channel.basic_consume(self.on_response, no_ack=True, queue=self.callback_queue) def on_response(self, ch, method, props, body): if self.corr_id == props.correlation_id: self.response = body def call(self, n): self.response = None self.corr_id = str(uuid.uuid4()) self.channel.basic_publish(exchange=self.exchange, routing_key=self.queue, properties=pika.BasicProperties( reply_to = self.callback_queue, correlation_id = self.corr_id, ), body=str(n)) while self.response is None: self.connection.process_data_events() return self.response def set_redis_value(key,value): r=redis.StrictRedis(host='localhost', port=6379, db=0) r.set(key.encode('ascii'),value) def get_redis_value(key): r=redis.StrictRedis(host='localhost', port=6379, db=0) redis_value=r.get(key.encode('ascii')) if redis_value is None: return 0 else: return redis_value def receive_gen_stat(host, user, password, queue='bdrq'): connection = pika.BlockingConnection(pika.ConnectionParameters( host=host, credentials = pika.PlainCredentials(user, password ) )) channel = connection.channel() channel.queue_declare(queue=queue) method_frame, header_frame, body = channel.basic_get(queue = queue) if method_frame is None or method_frame.NAME == 'Basic.GetEmpty': connection.close() return None else: channel.basic_ack(delivery_tag=method_frame.delivery_tag) connection.close() return body def make_amqp_call(host, user, password, signal): if signal =="status": rsignal=99 elif signal =="start": rsignal=1 elif signal =="pause": rsignal=2 elif signal =="reset": rsignal=4 rpc = RpcClient(host, user, password ) response = rpc.call(rsignal) return response
zbitmanis/cmanager
bd/utils.py
Python
apache-2.0
3,433
# # Copyright (C) 2010 Sorcerer # # This file is part of UrTSB. # # UrTSB 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. # # UrTSB 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 UrTSB. If not, see <http://www.gnu.org/licenses/>. # from logging.handlers import RotatingFileHandler from urtsb_src.globals import Globals import logging class Log(object): """ This class handles the initialization of an application logger. """ log = None def __init__(self, level=logging.INFO): """ Constructor @parameter the loggin level to use """ log_file = Globals.config_dir + '/urtsb.log' Log.log = logging.getLogger('UrTSB') #initialize logging #rotating filehandler using a 2MB logfile and keep 5 backups filehandler = RotatingFileHandler( \ log_file, maxBytes=2097152, backupCount=5) FORMAT='%(asctime)s\t%(levelname)s\t%(message)s' formatter = logging.Formatter(FORMAT) logging.basicConfig(format=FORMAT) filehandler.setFormatter(formatter) Log.log.addHandler(filehandler) Log.log.setLevel(level)
anthonynguyen/UrTSB
urtsb_src/log.py
Python
gpl-3.0
1,640