repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
kaankizilagac/sozluk
config/urls.py
1
1795
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views from sozluk.home import urls as home_api_urls from sozluk.topics import urls as topic_api_urls from sozluk.userprofile import urls as profile_api_urls from sozluk.home.views import home urlpatterns = [ url(r'^$', home, name="home"), url(r'^about/$', TemplateView.as_view(template_name='pages/about.html'), name='about'), # Django Admin, use {% url 'admin:index' %} url(settings.ADMIN_URL, include(admin.site.urls)), # User management url(r'^users/', include('sozluk.users.urls', namespace='users')), url(r'^accounts/', include('allauth.urls')), # Your stuff: custom urls includes go here url(r'^topic/', include(topic_api_urls, namespace='topic-general')), url(r'^profile/', include(profile_api_urls, namespace='user-profile-general')), url(r'^entry/', include(home_api_urls, namespace='home-general')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: # This allows the error pages to be debugged during development, just visit # these url in browser to see how these error pages look like. urlpatterns += [ url(r'^400/$', default_views.bad_request, kwargs={'exception': Exception('Bad Request!')}), url(r'^403/$', default_views.permission_denied, kwargs={'exception': Exception('Permission Denied')}), url(r'^404/$', default_views.page_not_found, kwargs={'exception': Exception('Page not Found')}), url(r'^500/$', default_views.server_error), ]
mit
4,076,073,840,083,351,600
41.738095
110
0.699721
false
mathLab/RBniCS
rbnics/eim/problems/exact_parametrized_functions_decorated_problem.py
1
9290
# Copyright (C) 2015-2021 by the RBniCS authors # # This file is part of RBniCS. # # SPDX-License-Identifier: LGPL-3.0-or-later import inspect from rbnics.eim.backends import OfflineOnlineBackend from rbnics.eim.utils.decorators import (DefineSymbolicParameters, StoreMapFromParametrizedOperatorsToProblem, StoreMapFromParametrizedOperatorsToTermAndIndex) from rbnics.utils.decorators import overload, PreserveClassName, ProblemDecoratorFor, tuple_of from rbnics.utils.test import PatchInstanceMethod def ExactParametrizedFunctions_OfflineAndOnline(**kwargs): assert kwargs["stages"] in ("offline", ("offline", ), ("offline", "online")) if kwargs["stages"] == ("offline", "online"): # Keep exact parametrized functions evaluation both offline and online from rbnics.eim.problems.exact_parametrized_functions import ExactParametrizedFunctions return ExactParametrizedFunctions(**kwargs) else: # This exact decorator should do nothing. Indeed EIM/DEIM exact decorator will take # care of adding the ExactParametrizedFunctions decorator, and we should not add it again here def DoNothing(ParametrizedDifferentialProblem_DerivedClass): return ParametrizedDifferentialProblem_DerivedClass return DoNothing def ExactParametrizedFunctionsDecoratedProblem( stages=("offline", "online"), **decorator_kwargs ): from rbnics.eim.problems.exact_parametrized_functions import ExactParametrizedFunctions @ProblemDecoratorFor(ExactParametrizedFunctions, ExactAlgorithm=ExactParametrizedFunctions_OfflineAndOnline, stages=stages) def ExactParametrizedFunctionsDecoratedProblem_Decorator(ParametrizedDifferentialProblem_DerivedClass): @DefineSymbolicParameters @StoreMapFromParametrizedOperatorsToProblem @StoreMapFromParametrizedOperatorsToTermAndIndex @PreserveClassName class ExactParametrizedFunctionsDecoratedProblem_Class(ParametrizedDifferentialProblem_DerivedClass): # Default initialization of members def __init__(self, V, **kwargs): # Call the parent initialization ParametrizedDifferentialProblem_DerivedClass.__init__(self, V, **kwargs) # Store values passed to decorator self._store_exact_evaluation_stages(stages) # Generate offline online backend for current problem self.offline_online_backend = OfflineOnlineBackend(self.name()) @overload(str) def _store_exact_evaluation_stages(self, stage): assert stages != "online", ( "This choice does not make any sense because it requires an EIM/DEIM offline stage" + " which then is not used online") assert stages == "offline" self._apply_exact_evaluation_at_stages = (stages, ) @overload(tuple_of(str)) def _store_exact_evaluation_stages(self, stage): assert len(stages) in (1, 2) assert stages[0] in ("offline", "online") if len(stages) > 1: assert stages[1] in ("offline", "online") assert stages[0] != stages[1] self._apply_exact_evaluation_at_stages = stages def init(self): # self.disable_init_operators may be shared between EIM/DEIM and exact evaluation has_disable_init_operators = hasattr(self, "disable_init_operators") # Call parent's method (enforcing an empty parent call to _init_operators) if not has_disable_init_operators: self.disable_init_operators = PatchInstanceMethod(self, "_init_operators", lambda self_: None) self.disable_init_operators.patch() ParametrizedDifferentialProblem_DerivedClass.init(self) self.disable_init_operators.unpatch() if not has_disable_init_operators: del self.disable_init_operators # Then, initialize exact operators self._init_operators_exact() def _init_operators_exact(self): # Initialize offline/online switch storage only once (may be shared between EIM/DEIM and # exact evaluation) OfflineOnlineClassMethod = self.offline_online_backend.OfflineOnlineClassMethod OfflineOnlineExpansionStorage = self.offline_online_backend.OfflineOnlineExpansionStorage OfflineOnlineExpansionStorageSize = self.offline_online_backend.OfflineOnlineExpansionStorageSize OfflineOnlineSwitch = self.offline_online_backend.OfflineOnlineSwitch if not isinstance(self.Q, OfflineOnlineSwitch): assert isinstance(self.Q, dict) assert len(self.Q) == 0 self.Q = OfflineOnlineExpansionStorageSize() if not isinstance(self.operator, OfflineOnlineSwitch): assert isinstance(self.operator, dict) assert len(self.operator) == 0 self.operator = OfflineOnlineExpansionStorage(self, "OperatorExpansionStorage") if not isinstance(self.assemble_operator, OfflineOnlineSwitch): assert inspect.ismethod(self.assemble_operator) self._assemble_operator_exact = self.assemble_operator self.assemble_operator = OfflineOnlineClassMethod(self, "assemble_operator") if not isinstance(self.compute_theta, OfflineOnlineSwitch): assert inspect.ismethod(self.compute_theta) self._compute_theta_exact = self.compute_theta self.compute_theta = OfflineOnlineClassMethod(self, "compute_theta") # Temporarily replace float parameters with symbols, so that we can detect if operators # are parametrized self.attach_symbolic_parameters() # Setup offline/online switches former_stage = OfflineOnlineSwitch.get_current_stage() for stage_exact in self._apply_exact_evaluation_at_stages: OfflineOnlineSwitch.set_current_stage(stage_exact) # Enforce exact evaluation of assemble_operator and compute_theta self.assemble_operator.attach(self._assemble_operator_exact, lambda term: True) self.compute_theta.attach(self._compute_theta_exact, lambda term: True) # Setup offline/online operators storage with exact operators self.operator.set_is_affine(False) self._init_operators() self.operator.unset_is_affine() # Restore former stage in offline/online switch storage OfflineOnlineSwitch.set_current_stage(former_stage) # Restore float parameters self.detach_symbolic_parameters() def solve(self, **kwargs): # Exact operators should be used regardless of the current stage OfflineOnlineSwitch = self.offline_online_backend.OfflineOnlineSwitch former_stage = OfflineOnlineSwitch.get_current_stage() OfflineOnlineSwitch.set_current_stage("offline") # Call Parent method solution = ParametrizedDifferentialProblem_DerivedClass.solve(self, **kwargs) # Restore former stage in offline/online switch storage OfflineOnlineSwitch.set_current_stage(former_stage) # Return return solution def compute_output(self): # Exact operators should be used regardless of the current stage OfflineOnlineSwitch = self.offline_online_backend.OfflineOnlineSwitch former_stage = OfflineOnlineSwitch.get_current_stage() OfflineOnlineSwitch.set_current_stage("offline") # Call Parent method output = ParametrizedDifferentialProblem_DerivedClass.compute_output(self) # Restore former stage in offline/online switch storage OfflineOnlineSwitch.set_current_stage(former_stage) # Return return output def _cache_key_from_kwargs(self, **kwargs): cache_key = ParametrizedDifferentialProblem_DerivedClass._cache_key_from_kwargs(self, **kwargs) # Change cache key depending on current stage OfflineOnlineSwitch = self.offline_online_backend.OfflineOnlineSwitch if OfflineOnlineSwitch.get_current_stage() in self._apply_exact_evaluation_at_stages: # Append current stage to cache key cache_key = cache_key + ("exact_evaluation", ) # Return return cache_key # return value (a class) for the decorator return ExactParametrizedFunctionsDecoratedProblem_Class # return the decorator itself return ExactParametrizedFunctionsDecoratedProblem_Decorator
lgpl-3.0
-4,619,943,413,212,641,000
54.297619
114
0.64155
false
xiaolingzi/deploy-tool-lingploy
lingploy/view/aes.py
1
1426
from PyQt5 import QtWidgets from view.aes_window import Ui_AESWindow from view.ui_thread import UIThread from view.base import Base from utils.aes_handler import AESHandler class AES(QtWidgets.QMainWindow, Ui_AESWindow, Base): def __init__(self, parent=None): QtWidgets.QMainWindow.__init__(self, parent) Ui_AESWindow.__init__(self) self.setupUi(self) self.btn_encode.clicked.connect(self.encode_event) # self.btn_decode.clicked.connect(self.decode_event) self.btn_decode.setVisible(False) def encode_event(self): self.encode_thread = UIThread(self.aes_encode) self.encode_thread.start() def aes_encode(self): try: source_str = self.txt_source.text() if source_str: result = AESHandler.cbc_encrypt(source_str) self.txt_result.setText(result) except Exception as ex: QtWidgets.QMessageBox.critical(self, "Error", str(ex)) def decode_event(self): self.decode_thread = UIThread(self.aes_decode) self.decode_thread.start() def aes_decode(self): try: source_str = self.txt_source.text() if source_str: result = AESHandler.cbc_decrypt(source_str) self.txt_result.setText(result) except Exception as ex: QtWidgets.QMessageBox.critical(self, "Error", str(ex))
gpl-3.0
-8,237,361,051,983,861,000
33.780488
66
0.629032
false
cnamejj/PollEngine
just-otp.py
1
4562
#!/usr/bin/env python """ Driver for OpenVPN client """ import time import base64 import hashlib import struct import hmac import pollengine # --- class OVDriveData: """OpenVPN authentication data""" def __init__( self ): self.otp_secret = NO_SECRET # --- class ShellAdmin: """Driver for admin shell object""" def __init__( self ): # PE.displaymsg( 'dbg:: Shell_Admin init' ) self.ovdata = OVDriveData() def set_ovdata( self, ovdata ): """Record a data structure""" self.ovdata = ovdata def process_request( self, conn ): """Handle requests received from the client""" # PE.displaymsg( 'Received {size} bytes "{req}"'.format( # size=len(conn.inp_queue), req=conn.inp_queue) ) __continue = True __lines = conn.inp_queue.split( '\n' ) for __req in __lines: __words = __req.split( ' ' ) # PE.displaymsg( 'dbg:: line "{line}" words {nw}'.format(line=__req, # nw=len(__words)) ) if len(__words) > 0: __comm = __words[0] if __comm == '': continue if __comm == ACR_SECRET: if len(__words) == 2: self.ovdata.otp_secret = __words[1] PE.displaymsg( 'Admin: set OTP secret' ) conn.queue_response( 'OTP secret' ) else: conn.queue_response( 'The "secret" command takes one argument' ) elif __comm == ACR_SHOW: PE.displaymsg( 'Admin: show current settings' ) conn.queue_response( SHOW_TEMPLATE.format( secret=self.ovdata.otp_secret) ) elif __comm == ACR_OTP: __otp = gen_otp(self.ovdata) PE.displaymsg( 'Admin: Generate OTP {otp}'.format( otp=__otp[-6:]) ) conn.queue_response( 'OTP for {now} is {otp}'.format( now=time.strftime('%y/%m/%d-%H:%M:%S'), otp=__otp[-6:]) ) elif __comm == ACR_DROP: PE.displaymsg( 'Admin: drop client connection' ) conn.close() elif __comm == ACR_QUIT: PE.displaymsg( 'Admin: stop OVDriver' ) __continue = False else: PE.displaymsg( 'Admin: unrecognized command "{comm}"'. format(comm=__comm) ) conn.queue_response( 'Command "{comm}" unrecognized'. format(comm=__comm) ) # conn.queue_response( 'Got {nl} lines, {size} bytes\n'.format( # size=len(conn.inp_queue), nl=len(__lines)) ) conn.inp_lines = '' conn.inp_queue = '' return __continue def get_name( self ): """Return a description of the class""" return 'Shell_Admin' # --- def gen_otp( ovdata ): """Generate the current one-time-password""" try: __n_interval = time.time() // OTP_INTERVAL __key = base64.b32decode( ovdata.otp_secret, casefold=OTP_COLLAPSE ) __msg = struct.pack( '>Q', __n_interval ) __hdig = hmac.new( __key, __msg, OTP_DIGEST_METH ).digest() __ob_low = ord( __hdig[19] ) & 15 __fulltoken = struct.unpack( '>I', __hdig[__ob_low:__ob_low + 4]) __token = (__fulltoken[0] & OTP_TOKEN_MASK) % (10 ** OTP_TOKEN_LEN) __result = '{token:06d}'.format(token=__token) except TypeError: __result = OTP_ERROR # PE.displaymsg( 'dbg:: Generate OTP {otp}'.format(otp=__result) ) return( __result ) # --- ADMIN_PORT = 8888 NO_SECRET = 'NoOTPSecret' OTP_INTERVAL = 30 OTP_TOKEN_LEN = 6 OTP_DIGEST_METH = hashlib.sha1 OTP_COLLAPSE = True OTP_TOKEN_MASK = 0x7fffffff OTP_ERROR = 'OTP-Failed' ACR_SECRET = 'secret' ACR_SHOW = 'show' ACR_QUIT = 'quit' ACR_OTP = 'otp' ACR_DROP = 'drop' # Comma is needed to make this a tuple SERVER_SPEC_LIST = ( ADMIN_PORT, ) SHOW_TEMPLATE = 'Secret: {secret}' # --- print "Listening on port {port}".format(port=SERVER_SPEC_LIST[0]) PE = pollengine ENGINE = PE.Engine( server_list = SERVER_SPEC_LIST ) OVDATA = OVDriveData() OVDATA.otp_secret = NO_SECRET ADMIN_SHELL = ShellAdmin() ADMIN_SHELL.set_ovdata( OVDATA ) ENGINE.config_server( ADMIN_PORT, shell = ADMIN_SHELL ) ENGINE.run()
apache-2.0
-972,208,901,866,818,200
26.481928
79
0.511618
false
numerical-mathematics/extrapolation
ex_serial.py
1
12151
from __future__ import division import numpy as np import math def error_norm(y1, y2, atol, rtol): tol = atol + np.maximum(y1,y2)*rtol return np.linalg.norm((y1-y2)/tol)/(len(y1)**0.5) def adapt_step(method, f, tn_1, yn_1, y, y_hat, h, p, atol, rtol): ''' Checks if the step size is accepted. If not, computes a new step size and checks again. Repeats until step size is accepted **Inputs**: - method -- the method on which the extrapolation is based - f -- the right hand side function of the IVP. Must output a non-scalar numpy.ndarray - tn_1, yn_1 -- y(tn_1) = yn_1 is the last accepted value of the computed solution - y, y_hat -- the computed values of y(tn_1 + h) of order p and (p-1), respectively - h -- the step size taken and to be tested - p -- the order of the higher extrapolation method Assumed to be greater than 1. - atol, rtol -- the absolute and relative tolerance of the local error. **Outputs**: - y, y_hat -- the computed solution of orders p and (p-1) at the accepted step size - h -- the accepted step taken to compute y and y_hat - h_new -- the proposed next step size - fe -- the number of f evaluations ''' fe = 0 facmax = 5 facmin = 0.2 fac = 0.8 err = error_norm(y, y_hat, atol, rtol) h_new = h*min(facmax, max(facmin, fac*((1/err)**(1/p)))) while err > 1: h = h_new y, y_hat, fe_ = method(f, tn_1, yn_1, h, p) fe += fe_ err = error_norm(y, y_hat, atol, rtol) h_new = h*min(facmax, max(facmin, fac*((1/err)**(1/p)))) return (y, y_hat, h, h_new, fe) def extrapolation_serial(method, f, t0, tf, y0, adaptive="order", p=4, step_size=0.5, atol=0, rtol=0, exact=(lambda t: t)): ''' Solves the system of IVPs y'(t) = f(y, t) with extrapolation of order p based on method provided. The implementation is serial. **Inputs**: - method -- the method on which the extrapolation is based - f -- the right hand side function of the IVP Must output a non-scalar numpy.ndarray - [t0, tf] -- the interval of integration - y0 -- the value of y(t0). Must be a non-scalar numpy.ndarray - adaptive -- can be either of three values: "fixed" = use fixed step size and order. "step" = use adaptive step size but fixed order. "order" = use adaptive step size and adaptive order. optional; defaults to "order" - p -- the order of extrapolation if adaptive is not "order", and the starting order otherwise. optional; defaults to 4 - step_size -- the fixed step size when adaptive="fixed", and the starting step size otherwise. optional; defaults to 0.5 - atol, rtol -- the absolute and relative tolerance of the local error. optional; both default to 0 - exact -- the exact solution to the IVP. Only used for debugging. optional; defaults to (lambda t: t). Must output a non-scalar numpy.ndarray **Outputs**: - y -- the computed solution for y(tf) - fe -- the number of f evaluations ''' fe = 0 if adaptive == "fixed": ts, h = np.linspace(t0, tf, (tf-t0)/step_size + 1, retstep=True) y = y0 for i in range(len(ts) - 1): y, _, fe_ = method(f, ts[i], y, h, p) fe += fe_ elif adaptive == "step": assert p > 1, "order of method must be greater than 1 if adaptive=True" y, t = y0, t0 h = min(step_size, tf-t0) while t < tf: y_, y_hat, fe_ = method(f, t, y, h, p) fe += fe_ y, _, h, h_new, fe_ = adapt_step(method, f, t, y, y_, y_hat, h, p, atol, rtol) t, fe = t + h, fe + fe_ h = min(h_new, tf - t) elif adaptive == "order": y, t, k = y0, t0, p h = min(step_size, tf-t0) sum_ks, sum_hs = 0, 0 num_iter = 0 while t < tf: y, h, k, h_new, k_new, _, _, fe_ = method(f, t, y, h, k, atol, rtol) t, fe = t + h, fe + fe_ sum_ks += k sum_hs += h num_iter += 1 h = min(h_new, tf - t) k = k_new return (y, fe, sum_hs/num_iter, sum_ks/num_iter) else: raise Exception("\'" + str(adaptive) + "\' is not a valid value for the argument \'adaptive\'") return (y, fe) def euler_fixed_step(f, tn, yn, h, p): Y = np.zeros((p+1,p+1, len(yn)), dtype=(type(yn[0]))) T = np.zeros((p+1,p+1, len(yn)), dtype=(type(yn[0]))) fe = 0 for k in range(1,p+1): Y[k,0] = yn for j in range(1,k+1): Y[k,j] = Y[k,j-1] + (h/k)*f(Y[k,j-1], tn + j*(h/k)) fe += 1 T[k,1] = Y[k,k] for k in range(2, p+1): for j in range(k, p+1): T[j,k] = T[j,k-1] + (T[j,k-1] - T[j-1,k-1])/((j/(j-k+1)) - 1) return (T[p,p], T[p-1,p-1], fe) def midpoint_fixed_step(f, tn, yn, h, p): r = int(round(p/2)) Y = np.zeros((r+1,2*r+1, len(yn)), dtype=(type(yn[0]))) T = np.zeros((r+1,r+1, len(yn)), dtype=(type(yn[0]))) fe = 0 for k in range(1,r+1): Y[k,0] = yn Y[k,1] = Y[k,0] + h/(2*k)*f(Y[k,0], tn) for j in range(2,2*k+1): Y[k,j] = Y[k,j-2] + (h/k)*f(Y[k,j-1], tn + (j-1)*(h/(2*k))) fe += 1 T[k,1] = Y[k,2*k] for k in range(2, r+1): for j in range(k, r+1): T[j,k] = T[j,k-1] + (T[j,k-1] - T[j-1,k-1])/((j/(j-k+1))**2 - 1) return (T[r,r], T[r-1,r-1], fe) def midpoint_adapt_order(f, tn, yn, h, k, atol, rtol): k_max = 10 k_min = 3 k = min(k_max, max(k_min, k)) A_k = lambda k: k*(k+1) H_k = lambda h, k, err_k: h*0.94*(0.65/err_k)**(1/(2*k-1)) W_k = lambda Ak,Hk: Ak/Hk Y = np.zeros((k+2,2*(k+1)+1, len(yn)), dtype=(type(yn[0]))) T = np.zeros((k+2,k+2, len(yn)), dtype=(type(yn[0]))) fe = 0 h_rej = [] k_rej = [] # compute the first k-1 lines extrapolation tableau for i in range(1,k): Y[i,0] = yn Y[i,1] = Y[i,0] + h/(2*i)*f(Y[i,0], tn) for j in range(2,2*i+1): Y[i,j] = Y[i,j-2] + (h/i)*f(Y[i,j-1], tn + (j-1)*(h/(2*i))) fe += 1 T[i,1] = Y[i,2*i] for i in range(2, k): for j in range(i, k): T[j,i] = T[j,i-1] + (T[j,i-1] - T[j-1,i-1])/((j/(j-i+1))**2 - 1) err_k_2 = error_norm(T[k-2,k-3], T[k-2,k-2], atol, rtol) err_k_1 = error_norm(T[k-1,k-2], T[k-1,k-1], atol, rtol) h_k_2 = H_k(h, k-2, err_k_2) h_k_1 = H_k(h, k-1, err_k_1) w_k_2 = W_k(A_k(k-2), h_k_2) w_k_1 = W_k(A_k(k-1), h_k_1) if err_k_1 <= 1: # convergence in line k-1 y = T[k-1,k-1] k_new = k if w_k_1 < 0.9*w_k_2 else k-1 h_new = h_k_1 if k_new <= k-1 else h_k_1*A_k(k)/A_k(k-1) elif err_k_1 > ((k+1)*k)**2: # convergence monitor # reject (h, k) and restart with new values accordingly k_new = k-1 h_new = min(h_k_1, h) h_rej.append(h) k_rej.append(k) y, h, k, h_new, k_new, h_rej_, k_rej_, fe_ = midpoint_adapt_order(f, tn, yn, h_new, k_new, atol, rtol) fe += fe_ h_rej += h_rej_ k_rej += k_rej_ else: # compute line k of extrapolation tableau Y[k,0] = yn Y[k,1] = Y[k,0] + h/(2*k)*f(Y[k,0], tn) for j in range(2,2*k+1): Y[k,j] = Y[k,j-2] + (h/k)*f(Y[k,j-1], tn + (j-1)*(h/(2*k))) fe += 1 T[k,1] = Y[k,2*k] for i in range(2, k+1): T[k,i] = T[k,i-1] + (T[k,i-1] - T[k-1,i-1])/((k/(k-i+1))**2 - 1) err_k = error_norm(T[k,k-1], T[k,k], atol, rtol) h_k = H_k(h, k, err_k) w_k = W_k(A_k(k), h_k) if err_k <= 1: # convergence in line k y = T[k,k] k_new = k-1 if w_k_1 < 0.9*w_k else ( k+1 if w_k < 0.9*w_k_1 else k) h_new = h_k_1 if k_new == k-1 else ( h_k if k_new == k else h_k*A_k(k+1)/A_k(k)) elif err_k > (k+1)**2: # second convergence monitor # reject (h, k) and restart with new values accordingly k_new = k-1 if w_k_1 < 0.9*w_k else k h_new = min(h_k_1 if k_new == k-1 else h_k, h) h_rej.append(h) k_rej.append(k) y, h, k, h_new, k_new, h_rej_, k_rej_, fe_ = midpoint_adapt_order(f, tn, yn, h_new, k_new, atol, rtol) fe += fe_ h_rej += h_rej_ k_rej += k_rej_ else: # hope for convergence in line k+1 # compute line k+1 of extrapolation tableau Y[(k+1),0] = yn Y[(k+1),1] = Y[(k+1),0] + h/(2*(k+1))*f(Y[(k+1),0], tn) for j in range(2,2*(k+1)+1): Y[(k+1),j] = Y[(k+1),j-2] + (h/(k+1))*f(Y[(k+1),j-1], tn + (j-1)*(h/(2*(k+1)))) fe += 1 T[(k+1),1] = Y[(k+1),2*(k+1)] for i in range(2, (k+1)+1): T[(k+1),i] = T[(k+1),i-1] + (T[(k+1),i-1] - T[(k+1)-1,i-1])/(((k+1)/((k+1)-i+1))**2 - 1) err_k1 = error_norm(T[(k+1),(k+1)-1], T[(k+1),(k+1)], atol, rtol) h_k1 = H_k(h, (k+1), err_k1) w_k1 = W_k(A_k((k+1)), h_k1) if err_k1 <= 1: # convergence in line k+1 y = T[k+1,k+1] if w_k_1 < 0.9*w_k: k_new = k+1 if w_k1 < 0.9*w_k_1 else k-1 else: k_new = k+1 if w_k1 < 0.9*w_k else k h_new = h_k_1 if k_new == k-1 else ( h_k if k_new == k else h_k1) else: # no convergence # reject (h, k) and restart with new values accordingly k_new = k-1 if w_k_1 < 0.9*w_k else k h_new = min(h_k_1 if k_new == k-1 else h_k, h) h_rej.append(h) k_rej.append(k) y, h, k, h_new, k_new, h_rej_, k_rej_, fe_ = midpoint_adapt_order(f, tn, yn, h_new, k_new, atol, rtol) fe += fe_ h_rej += h_rej_ k_rej += k_rej_ return (y, h, k, h_new, k_new, h_rej, k_rej, fe) def ex_euler_serial(f, t0, tf, y0, adaptive="order", p=4, step_size=0.5, atol=0, rtol=0, exact=(lambda t: t)): ''' An instantiation of extrapolation_serial() function with Euler's method. For more details, refer to extrapolation_serial() function. TODO: implement adaptive order extrapolation based on Euler ''' method = euler_fixed_step if adaptive == "order": raise NotImplementedError return extrapolation_serial(method, f, t0, tf, y0, adaptive=adaptive, p=p, step_size=step_size, atol=atol, rtol=rtol, exact=exact) def ex_midpoint_serial(f, t0, tf, y0, adaptive="order", p=4, step_size=0.5, atol=0, rtol=0, exact=(lambda t: t)): ''' An instantiation of extrapolation_serial() function with the midpoint method. For more details, refer to extrapolation_serial() function. ''' method = midpoint_adapt_order if adaptive == "order" else midpoint_fixed_step return extrapolation_serial(method, f, t0, tf, y0, adaptive=adaptive, p=p, step_size=step_size, atol=atol, rtol=rtol, exact=exact) if __name__ == "__main__": import doctest doctest.testmod()
mit
3,576,681,026,400,465,000
35.271642
104
0.458398
false
skosukhin/spack
var/spack/repos/builtin/packages/ps-lite/package.py
1
1768
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [email protected], All rights reserved. # LLNL-CODE-647188 # # For details, see https://github.com/spack/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License (as # published by the Free Software Foundation) version 2.1, February 1999. # # 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 terms and # conditions of the GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * class PsLite(CMakePackage): """ps-lite is A light and efficient implementation of the parameter server framework.""" homepage = "https://github.com/dmlc/ps-lite" url = "https://github.com/dmlc/ps-lite.git" version('master', git='https://github.com/dmlc/ps-lite.git', branch='master') version('20170328', git='https://github.com/dmlc/ps-lite.git', commit='acdb698fa3bb80929ef83bb37c705f025e119b82') depends_on('protobuf@3:') depends_on('zeromq') patch('cmake.patch')
lgpl-2.1
7,886,909,420,478,296,000
41.095238
81
0.669118
false
uehara1414/serverctl-prototype
serverctl_prototype/settings.py
1
3666
""" Django settings for serverctl_prototype project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '930m&u3@mu-35a8)hk9^!oa3$)lhbp#1kk4%xxryn9zr!ku=we' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'rest_framework_swagger', 'serverctl' ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'serverctl_prototype.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'serverctl_prototype.wsgi.application' # Database # https://docs.djangoproject.com/en/1.10/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': os.environ['POSTGRES_DB'], 'USER': os.environ['POSTGRES_USER'], 'PASSWORD': os.environ['POSTGRES_PASSWORD'], 'HOST': 'postgres', 'PORT': '5432', } } # Password validation # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] REST_FRAMEWORK = { # Use Django's standard `django.contrib.auth` permissions, # or allow read-only access for unauthenticated users. 'DEFAULT_PERMISSION_CLASSES': [ 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' ] } # Internationalization # https://docs.djangoproject.com/en/1.10/topics/i18n/ LANGUAGE_CODE = 'ja' TIME_ZONE = 'Asia/Tokyo' USE_I18N = True USE_L10N = True USE_TZ = True LOGIN_URL = '/login/' # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.10/howto/static-files/ STATIC_URL = '/static/' STATICFILES_DIRS = (BASE_DIR, )
mit
-4,818,082,104,645,412,000
25.185714
91
0.683306
false
lsbardel/python-stdnet
stdnet/utils/skiplist.py
1
5251
# Modified version of skiplist # http://code.activestate.com/recipes/ # 576930-efficient-running-median-using-an-indexable-skipli/ # import sys from random import random from math import log ispy3k = int(sys.version[0]) >= 3 if not ispy3k: range = xrange __all__ = ['skiplist'] class Node(object): __slots__ = ('score', 'value', 'next', 'width') def __init__(self, score, value, next, width): self.score, self.value, self.next, self.width = (score, value, next, width) SKIPLIST_MAXLEVEL = 32 # Should be enough for 2^32 elements class skiplist(object): '''Sorted collection supporting O(lg n) insertion, removal, and lookup by rank.''' def __init__(self, data=None, unique=False): self.unique = unique self.clear() if data is not None: self.extend(data) def clear(self): self.__size = 0 self.__level = 1 self.__head = Node('HEAD', None, [None]*SKIPLIST_MAXLEVEL, [1]*SKIPLIST_MAXLEVEL) def __repr__(self): return list(self).__repr__() def __str__(self): return self.__repr__() def __len__(self): return self.__size def __getitem__(self, index): node = self.__head traversed = 0 index += 1 for i in range(self.__level-1, -1, -1): while node.next[i] and (traversed + node.width[i]) <= index: traversed += node.width[i] node = node.next[i] if traversed == index: return node.value raise IndexError('skiplist index out of range') def extend(self, iterable): i = self.insert for score_values in iterable: i(*score_values) update = extend def rank(self, score): '''Return the 0-based index (rank) of ``score``. If the score is not available it returns a negative integer which absolute score is the left most closest index with score less than *score*.''' node = self.__head rank = 0 for i in range(self.__level-1, -1, -1): while node.next[i] and node.next[i].score <= score: rank += node.width[i] node = node.next[i] if node.score == score: return rank - 1 else: return -1 - rank def insert(self, score, value): # find first node on each level where node.next[levels].score > score if score != score: raise ValueError('Cannot insert score {0}'.format(score)) chain = [None] * SKIPLIST_MAXLEVEL rank = [0] * SKIPLIST_MAXLEVEL node = self.__head for i in range(self.__level-1, -1, -1): #store rank that is crossed to reach the insert position rank[i] = 0 if i == self.__level-1 else rank[i+1] while node.next[i] and node.next[i].score <= score: rank[i] += node.width[i] node = node.next[i] chain[i] = node # the score already exist if chain[0].score == score and self.unique: return # insert a link to the newnode at each level level = min(SKIPLIST_MAXLEVEL, 1 - int(log(random(), 2.0))) if level > self.__level: for i in range(self.__level, level): rank[i] = 0 chain[i] = self.__head chain[i].width[i] = self.__size self.__level = level # create the new node node = Node(score, value, [None]*level, [None]*level) for i in range(level): prevnode = chain[i] steps = rank[0] - rank[i] node.next[i] = prevnode.next[i] node.width[i] = prevnode.width[i] - steps prevnode.next[i] = node prevnode.width[i] = steps + 1 # increment width for untouched levels for i in range(level, self.__level): chain[i].width[i] += 1 self.__size += 1 return node def remove(self, score): # find first node on each level where node.next[levels].score >= score chain = [None] * SKIPLIST_MAXLEVEL node = self.__head for i in range(self.__level-1, -1, -1): while node.next[i] and node.next[i].score < score: node = node.next[i] chain[i] = node node = node.next[0] if score != node.score: raise KeyError('Not Found') for i in range(self.__level): if chain[i].next[i] == node: chain[i].width[i] += node.width[i] - 1 chain[i].next[i] = node.next[i] else: chain[i].width[i] -= 1 self.__size -= 1 def __iter__(self): 'Iterate over values in sorted order' node = self.__head.next[0] while node: yield node.score, node.value node = node.next[0] def flat(self): return tuple(self._flat()) def _flat(self): node = self.__head.next[0] while node: yield node.score yield node.value node = node.next[0]
bsd-3-clause
3,151,889,869,157,624,300
30.071006
78
0.517997
false
lago-project/lago
lago/templates.py
1
20977
# encoding: utf-8 from __future__ import absolute_import from __future__ import division """ This module contains any disk template related classes and functions, including the repository store manager classes and template providers, some useful definitions: * Template repositories: Repository where to fetch templates from, as an http server * Template store: Local store to cache templates * Template: Unititialized disk image to use as base for other disk images * Template version: Specific version of a template, to allow getting updates without having to change the template name everywhere """ import errno import json import logging import os import posixpath import shutil import sys from six.moves.urllib import request as urllib from six.moves.urllib.error import HTTPError import lago.utils as utils from . import log_utils from .config import config LOGGER = logging.getLogger(__name__) class FileSystemTemplateProvider: """ Handles file type templates, that is, getting a disk template from the host's filesystem """ def __init__(self, root): """ Args: root (str): Path to the template, any vars and user globs wil be expanded """ self._root = os.path.expanduser(os.path.expandvars(root)) def _prefixed(self, *path): """ Join all the given paths prefixed with this provider's base root path Args: *path (str): sections of the path to join, passed as positional arguments Returns: str: Joined paths prepended with the provider root path """ return os.path.join(self._root, *path) def download_image(self, handle, dest): """ Copies over the handl to the destination Args: handle (str): path to copy over dest (str): path to copy to Returns: None """ shutil.copyfile(self._prefixed(handle), dest) def get_hash(self, handle): """ Returns the associated hash for the given handle, the hash file must exist (``handle + '.hash'``). Args: handle (str): Path to the template to get the hash from Returns: str: Hash for the given handle """ handle = os.path.expanduser(os.path.expandvars(handle)) with open(self._prefixed('%s.hash' % handle)) as f: return f.read() def get_metadata(self, handle): """ Returns the associated metadata info for the given handle, the metadata file must exist (``handle + '.metadata'``). Args: handle (str): Path to the template to get the metadata from Returns: dict: Metadata for the given handle """ handle = os.path.expanduser(os.path.expandvars(handle)) with open(self._prefixed('%s.metadata' % handle)) as f: return json.load(f) class HttpTemplateProvider: """ This provider allows the usage of http urls for templates """ def __init__(self, baseurl): """ Args: baseurl (str): Url to prepend to every handle """ self.baseurl = baseurl def open_url(self, url, suffix='', dest=None): """ Opens the given url, trying the compressed version first. The compressed version url is generated adding the ``.xz`` extension to the ``url`` and adding the given suffix **after** that ``.xz`` extension. If dest passed, it will download the data to that path if able Args: url (str): relative url from the ``self.baseurl`` to retrieve suffix (str): optional suffix to append to the url after adding the compressed extension to the path dest (str or None): Path to save the data to Returns: urllib.addinfourl: response object to read from (lazy read), closed if no dest passed Raises: RuntimeError: if the url gave http error when retrieving it """ if not url.endswith('.xz'): try: return self.open_url( url=url + '.xz', suffix=suffix, dest=dest, ) except RuntimeError: pass full_url = posixpath.join(self.baseurl, url) + suffix try: response = urllib.urlopen(full_url) except HTTPError as e: if e.code >= 300: raise RuntimeError( 'Failed no retrieve URL %s:\nCode: %d' % (full_url, e.code) ) meta = response.info() file_size_kb = int(meta.get("Content-Length")[0]) // 1024 if file_size_kb > 0: sys.stdout.write( "Downloading %s Kilobytes from %s \n" % (file_size_kb, full_url) ) def report(count, block_size, total_size): percent = (count * block_size * 100 / float(total_size)) sys.stdout.write( "\r% 3.1f%%" % percent + " complete (%d " % (count * block_size // 1024) + "Kilobytes)" ) sys.stdout.flush() if dest: response.close() urllib.urlretrieve(full_url, dest, report) sys.stdout.write("\n") return response def download_image(self, handle, dest): """ Downloads the image from the http server Args: handle (str): url from the `self.baseurl` to the remote template dest (str): Path to store the downloaded url to, must be a file path Returns: None """ with log_utils.LogTask('Download image %s' % handle, logger=LOGGER): self.open_url(url=handle, dest=dest) self.extract_image_xz(dest) @staticmethod def extract_image_xz(path): if not path.endswith('.xz'): os.rename(path, path + '.xz') path = path + '.xz' with log_utils.LogTask('Decompress local image', logger=LOGGER): ret = utils.run_command( ['xz', '--threads=0', '--decompress', path], ) if ret: raise RuntimeError('Failed to decompress %s' % path) def get_hash(self, handle): """ Get the associated hash for the given handle, the hash file must exist (``handle + '.hash'``). Args: handle (str): Path to the template to get the hash from Returns: str: Hash for the given handle """ response = self.open_url(url=handle, suffix='.hash') try: return response.read().decode('utf-8') finally: response.close() def get_metadata(self, handle): """ Returns the associated metadata info for the given handle, the metadata file must exist (``handle + '.metadata'``). If the given handle has an ``.xz`` extension, it will get removed when calculating the handle metadata path Args: handle (str): Path to the template to get the metadata from Returns: dict: Metadata for the given handle """ response = self.open_url(url=handle, suffix='.metadata') try: return json.load(response) finally: response.close() #: Registry for template providers _PROVIDERS = { 'file': FileSystemTemplateProvider, 'http': HttpTemplateProvider, } def find_repo_by_name(name, repo_dir=None): """ Searches the given repo name inside the repo_dir (will use the config value 'template_repos' if no repo dir passed), will rise an exception if not found Args: name (str): Name of the repo to search repo_dir (str): Directory where to search the repo Return: str: path to the repo Raises: RuntimeError: if not found """ if repo_dir is None: repo_dir = config.get('template_repos') ret, out, _ = utils.run_command([ 'find', repo_dir, '-name', '*.json', ], ) repos = [ TemplateRepository.from_url(line.strip()) for line in out.split('\n') if len(line.strip()) ] for repo in repos: if repo.name == name: return repo raise RuntimeError('Could not find repo %s' % name) class TemplateRepository: """ A template repository is a single source for templates, that uses different providers to actually retrieve them. That means for example that the 'ovirt' template repository, could support the 'http' and a theoretical 'gluster' template providers. Attributes: _dom (dict): Specification of the template _providers (dict): Providers instances for any source in the spec """ def __init__(self, dom, path): """ You would usually use the :func:`TemplateRepository.from_url` method instead of directly using this Args: dom (dict): Specification of the template repository (not confuse with xml dom) """ self._dom = dom self._providers = { name: self._get_provider(spec) for name, spec in self._dom.get('sources', {}).items() } self._path = path @classmethod def from_url(cls, path): """ Instantiate a :class:`TemplateRepository` instance from the data in a file or url Args: path (str): Path or url to the json file to load Returns: TemplateRepository: A new instance """ if os.path.isfile(path): with open(path) as fd: data = fd.read() else: try: response = urllib.urlopen(path) if response.code >= 300: raise RuntimeError('Unable to load repo from %s' % path) data = response.read() response.close() except IOError: raise RuntimeError( 'Unable to load repo from %s (IO error)' % path ) return cls(json.loads(data), path) def _get_provider(self, spec): """ Get the provider for the given template spec Args: spec (dict): Template spec Returns: HttpTemplateProvider or FileSystemTemplateProvider: A provider instance for that spec """ provider_class = _PROVIDERS[spec['type']] return provider_class(**spec['args']) @property def name(self): """ Getter for the template repo name Returns: str: the name of this template repo """ return self._dom['name'] @property def path(self): """ Getter for the template repo path Returns: str: the path/url of this template repo """ return self._path def get_by_name(self, name): """ Retrieve a template by it's name Args: name (str): Name of the template to retrieve Raises: LagoMissingTemplateError: if no template is found """ try: spec = self._dom.get('templates', {})[name] except KeyError: raise LagoMissingTemplateError(name, self._path) return Template( name=name, versions={ ver_name: TemplateVersion( name='%s:%s:%s' % (self.name, name, ver_name), source=self._providers[ver_spec['source']], handle=ver_spec['handle'], timestamp=ver_spec['timestamp'], ) for ver_name, ver_spec in spec['versions'].items() }, ) class Template: """ Disk image template class Attributes: name (str): Name of this template _versions (dict(str:TemplateVersion)): versions for this template """ def __init__(self, name, versions): """ Args: name (str): Name of the template versions (dict(str:TemplateVersion)): dictionary with the version_name: :class:`TemplateVersion` pairs for this template """ self.name = name self._versions = versions def get_version(self, ver_name=None): """ Get the given version for this template, or the latest Args: ver_name (str or None): Version to retieve, None for the latest Returns: TemplateVersion: The version matching the given name or the latest one """ if ver_name is None: return self.get_latest_version() return self._versions[ver_name] def get_latest_version(self): """ Retrieves the latest version for this template, the latest being the one with the newest timestamp Returns: TemplateVersion """ return max(self._versions.values(), key=lambda x: x.timestamp()) class TemplateVersion: """ Each template can have multiple versions, each of those is actually a different disk template file representation, under the same base name. """ def __init__(self, name, source, handle, timestamp): """ Args: name (str): Base name of the template source (HttpTemplateProvider or FileSystemTemplateProvider): template provider for this version handle (str): handle of the template version, this is the information that will be used passed to the repo provider to retrieve the template (depends on the provider) timestamp (int): timestamp as seconds since 1970-01-01 00:00:00 UTC """ self.name = name self._source = source self._handle = handle self._timestamp = timestamp self._hash = None self._metadata = None def timestamp(self): """ Getter for the timestamp """ return self._timestamp def get_hash(self): """ Returns the associated hash for this template version Returns: str: Hash for this version """ if self._hash is None: self._hash = self._source.get_hash(self._handle).strip() return self._hash def get_metadata(self): """ Returns the associated metadata info for this template version Returns: dict: Metadata for this version """ if self._metadata is None: self._metadata = self._source.get_metadata(self._handle) return self._metadata def download(self, destination): """ Retrieves this template to the destination file Args: destination (str): file path to write this template to Returns: None """ self._source.download_image(self._handle, destination) class TemplateStore: """ Local cache to store templates The store uses various files to keep track of the templates cached, access and versions. An example template store looks like:: $ tree /var/lib/lago/store/ /var/lib/lago/store/ ├── in_office_repo:centos6_engine:v2.tmp ├── in_office_repo:centos7_engine:v5.tmp ├── in_office_repo:fedora22_host:v2.tmp ├── phx_repo:centos6_engine:v2 ├── phx_repo:centos6_engine:v2.hash ├── phx_repo:centos6_engine:v2.metadata ├── phx_repo:centos6_engine:v2.users ├── phx_repo:centos7_engine:v4.tmp ├── phx_repo:centos7_host:v4.tmp └── phx_repo:storage-nfs:v1.tmp There you can see the files: * \*.tmp Temporary file created while downloading the template from the repository (depends on the provider) * ${repo_name}:${template_name}:${template_version} This file is the actual disk image template * \*.hash Cached hash for the template disk image * \*.metadata Metadata for this template image in json format, usually this includes the `distro` and `root-password` """ def __init__(self, path): """ :param str path: Path to a local dir for this store, will be created if it does not exist :raises OSError: if there's a failure creating the dir """ self._root = path try: os.makedirs(path) except OSError as e: if e.errno != errno.EEXIST: LOGGER.error('Failed to create store dir') raise def _prefixed(self, *path): """ Join the given paths and prepend this stores path Args: *path (str): list of paths to join, as positional arguments Returns: str: all the paths joined and prepended with the store path """ return os.path.join(self._root, *path) def __contains__(self, temp_ver): """ Checks if a given version is in this store Args: temp_ver (TemplateVersion): Version to look for Returns: bool: ``True`` if the version is in this store """ return os.path.exists(self._prefixed(temp_ver.name)) def get_path(self, temp_ver): """ Get the path of the given version in this store Args: temp_ver TemplateVersion: version to look for Returns: str: The path to the template version inside the store Raises: RuntimeError: if the template is not in the store """ if temp_ver not in self: raise RuntimeError( 'Template: {} not present'.format(temp_ver.name) ) return self._prefixed(temp_ver.name) def download(self, temp_ver, store_metadata=True): """ Retrieve the given template version Args: temp_ver (TemplateVersion): template version to retrieve store_metadata (bool): If set to ``False``, will not refresh the local metadata with the retrieved one Returns: None """ dest = self._prefixed(temp_ver.name) temp_dest = '%s.tmp' % dest with utils.LockFile(dest + '.lock'): # Image was downloaded while we were waiting if os.path.exists(dest): return temp_ver.download(temp_dest) if store_metadata: with open('%s.metadata' % dest, 'w') as f: utils.json_dump(temp_ver.get_metadata(), f) sha1 = utils.get_hash(temp_dest) if temp_ver.get_hash() != sha1: raise RuntimeError( 'Image %s does not match the expected hash %s' % ( temp_ver.name, sha1, ) ) with open('%s.hash' % dest, 'w') as f: f.write(sha1) with log_utils.LogTask('Convert image', logger=LOGGER): result = utils.run_command( [ 'qemu-img', 'convert', '-O', 'raw', temp_dest, dest, ], ) os.unlink(temp_dest) if result: raise RuntimeError(result.err) def get_stored_metadata(self, temp_ver): """ Retrieves the metadata for the given template version from the store Args: temp_ver (TemplateVersion): template version to retrieve the metadata for Returns: dict: the metadata of the given template version """ with open(self._prefixed('%s.metadata' % temp_ver.name)) as f: return json.load(f) def get_stored_hash(self, temp_ver): """ Retrieves the hash for the given template version from the store Args: temp_ver (TemplateVersion): template version to retrieve the hash for Returns: str: hash of the given template version """ with open(self._prefixed('%s.hash' % temp_ver.name)) as f: return f.read().strip() class LagoMissingTemplateError(utils.LagoException): def __init__(self, name, path): super().__init__( 'Image {} doesn\'t exist in repo {}'.format(name, path) )
gpl-2.0
3,427,605,394,685,809,700
28.254545
79
0.551035
false
pedroeml/t1-fcg
CrowdDataAnalysis/analysis/grouping.py
1
3888
from collections import deque def detect_group(people_graph, everyone_in_frame, grouping_max_distance): """ :param people_graph: :type people_graph: Graph :param everyone_in_frame: [PersonPath] :type everyone_in_frame: list :param grouping_max_distance: :return: """ groups = deque() ids_in_frame = [person_path.id_number for person_path in everyone_in_frame] nodes_in_frame = [node for node in people_graph.get_nodes() if node.item in ids_in_frame] for node in nodes_in_frame: if not does_belong_to_any_group(node, groups): group = perform_group(node, grouping_max_distance) groups.append(group) return groups def find_group_that_it_belongs(node, groups): for group in groups: if node in group: return group return None def does_belong_to_any_group(node, groups): return True if find_group_that_it_belongs(node, groups) is not None else False def perform_group(node, grouping_max_distance, group=None): g = deque([edge.target for edge in node.get_edges() if edge.weight <= grouping_max_distance]) g.append(node) if group is None: # the base case: if this is the first call of this function group = g for n in list(group): # for every person nearby group = perform_group(n, grouping_max_distance, group) else: # if there is already a group for n in g: # for every person nearby if n not in group: # if this person is not already in the group group.append(n) # add this person return group def differences_between_groups(group_a, group_b): people_not_in_group_b = deque() people_not_in_group_a = deque() for node in group_a: if not (node in group_b): people_not_in_group_b.append(node) for node in group_b: if not (node in group_a): people_not_in_group_a.append(node) return people_not_in_group_b, people_not_in_group_a def are_groups_the_same(group_a, group_b): if len(group_a) != len(group_b): return False people_not_in_group_b, people_not_in_group_a = differences_between_groups(group_a, group_b) if people_not_in_group_b or people_not_in_group_a: # if at least one of these lists is not empty return False return True def compare_groups(previous_groups, current_groups): for current_group in current_groups: # for each group in the current groups list for node in current_group: # for each person in this group identify_grouping_events(node, previous_groups, current_group) break def identify_grouping_events(node, previous_groups, current_group): previous_group_where_it_belongs = find_group_that_it_belongs(node, previous_groups) # find the group where this person belongs in the previous groups list if previous_group_where_it_belongs is None: # if this person never was in a group before if len(current_group) == 1: print('Group created: ', [n.item for n in current_group]) else: print('Group updated: ', [n.item for n in current_group]) # when someone who wasn't in a group before and now joined a group else: # if this person was in a group before people_not_in_group_b, people_not_in_group_a = differences_between_groups(previous_group_where_it_belongs, current_group) # if there is anything bifferent between these groups where this person belongs if people_not_in_group_b: print([person.item for person in people_not_in_group_b], "left %d's group:" % node.item, [n.item for n in current_group]) if people_not_in_group_a: print([person.item for person in people_not_in_group_a], "joined %d's group:" % node.item, [n.item for n in current_group]) return True return False
mit
2,369,166,324,165,528,600
35
159
0.655864
false
AnhellO/DAS_Sistemas
Ene-Jun-2021/pena-balderas-bryan/ExamenParcial1/Ejercicio 5/srp.py
1
1887
import json # Descarga esta librería con el comando 'pip install json2html' from json2html import * class Usuario(object): #si ya tenemos definidos nuestros atributos no es necesario pedir con **args def __init__(self, nombre,edad,direccion): self.nombre = nombre self.edad = edad self.direccion = direccion #Quite los getters y setters ya que no tenian caso de ser porque desde la misma instancia del objeto se pueden llamar a los #atributos o asignarles valores def __str__(self): return """ Nombre: {}\nEdad: {}\nDireccion: {}\n """.format(self.nombre, self.edad, self.direccion).strip() def serializar(self, formato='diccionario'): formato = formato.lower() #Quite el formato de string ya que la misma funcion de str nos devulve ese formato if formato == 'diccionario': return self.__dict__ elif formato == 'json': return json.dumps(self.__dict__) elif formato == 'html': return json2html.convert(json=json.dumps(self.__dict__)) user = Usuario( nombre='Ramanujan', edad=25, direccion='Calle X, #Y Colonia Z' ) print(user) print(user.serializar("html")) #¿Qué sucedería si quiero agregar otro formato de serialización más complejo como XML o Yaml? #Solo se agregaria un if que evalue, si entra en ese if, lo ideal seria crear una funcion que haga todo el proceso #de esta forma tendriamos la funcion que evalua a que tipo de formato se quiere pasar y una funcion #que pase a xml o yalm #¿Qué sucedería si quiero soporte para serialización a otros objetos aparte de los instanciados por la clase Usuario? #EN ese caso lo ideal seria sacar las funciones del objeto usuario y crear una clase especifica #para realizar la serializacion, que no dependa del usuario si no que se llame cuando sea
mit
5,022,539,029,547,369,000
35.823529
127
0.688332
false
adcomp/piwadio
piwardio.py
1
4411
#!/usr/bin/python # -*- coding: utf-8 -*- # PIWADIO - Web Radio Player # Python WebSocket Server / wrp / HTML5 client # by David Art [aka] adcomp <[email protected]> import json import os import sys import subprocess import select import tornado.httpserver import tornado.websocket import tornado.ioloop import tornado.web VOLUME_DOWN = "amixer sset Master 5%+" VOLUME_UP = "amixer sset Master 5%-" class WebRadioPlayer: """ A class to access a slave wrp process """ url = '' state = 'stop' info = { "Name": '', "Genre": '', "Website": '', "Bitrate": ''} def __init__(self): # start mplayer in slave mode self.proc = subprocess.Popen( ['mplayer', '-slave', '-quiet', '-idle', '-vo', 'null', '-nolirc'], shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, bufsize=1) self._readlines() def cmd(self, txt): # play / pause if txt == 'pause': if self.state == 'play': self.state = 'pause' elif self.state == 'pause': self.state = 'play' # stop elif txt == 'stop': if self.state == 'pause': self.proc.stdin.write("pause\n") self.state = 'stop' self.url = '' self.clearInfo() # send command to wrp self.proc.stdin.write("%s\n" % txt) return self._readlines() def loadUrl(self, cmd, url): if self.state == 'pause': self.proc.stdin.write("pause\n") # stop before loading self.proc.stdin.write("stop\n") # get the url self.url = url self.state = 'play' self.clearInfo() print('\n[wrp] StreamURL = %s' % self.url) # send command to wrp self.proc.stdin.write("%s %s\n" % (cmd, url)) return self._readlines() def clearInfo(self): self.info = { "Name": '', "Genre": '', "Website": '', "Bitrate": ''} def _readlines(self): while any(select.select([self.proc.stdout.fileno()], [], [], 0.6)): line = self.proc.stdout.readline() line = line.strip() linesplit = line.split(":") if line and linesplit[0].strip() in self.info: inf = ''.join(linesplit[1:]) self.info[linesplit[0].strip()] = inf.strip() print("[wrp] %s : %s" % (linesplit[0],inf.strip())) return def changeVolume(self, value): cmd = ['amixer', 'sset', 'Master', value] subprocess.Popen(cmd).communicate() def getData(self): return {"state": self.state, "url": self.url.split('/')[-1], "info": self.info} class IndexHandler(tornado.web.RequestHandler): @tornado.web.asynchronous def get(self): self.render("index.html") class WebSocketHandler(tornado.websocket.WebSocketHandler): clients = [] def open(self): self.connected = True # print("new connection", self.request.remote_ip) self.clients.append(self) # update client data data = data = wrp.getData() self.write_message(json.dumps(data)) """ Tornado 4.0 introduced an, on by default, same origin check. This checks that the origin header set by the browser is the same as the host header """ def check_origin(self, origin): # this is needed .. return True def on_message(self, message): data = json.loads(message) # mplayer command if "cmd" in data: if data["cmd"] == "loadlist" or data["cmd"] == "loadfile": wrp.loadUrl(data["cmd"], data["url"]) else: wrp.cmd(data["cmd"]) # volume change elif "volume" in data: wrp.changeVolume(data["volume"]) elif "shutdown" in data: shutdown(data["shutdown"]) else: # later pass # return data to all clients data = wrp.getData() for client in self.clients: client.write_message(json.dumps(data)) def on_close(self): self.connected = False # print("[websocket] connection closed") self.clients.remove(self) def shutdown(mode="h"): print('[wrp] shutdown now ..\nBye :)') cmd = "sudo shutdown -%s now" % mode subprocess.Popen(cmd.split()).communicate() sys.exit(0) application = tornado.web.Application([ (r'/favicon.ico', tornado.web.StaticFileHandler, {'path': './static/favicon.png'}), (r'/static/(.*)', tornado.web.StaticFileHandler, {'path': './static/'}), (r'/', IndexHandler), (r'/piwardio', WebSocketHandler) ]) wrp = WebRadioPlayer() if __name__ == "__main__": http_server = tornado.httpserver.HTTPServer(application) http_server.listen(8888) print("") print("[piwadio] WebSocket Server start ..") try: tornado.ioloop.IOLoop.instance().start() except KeyboardInterrupt: print('\nExit ..') sys.exit(0)
gpl-2.0
4,014,646,459,952,775,000
20.945274
89
0.635684
false
samj1912/picard
picard/webservice/api_helpers.py
1
10816
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2017 Sambhav Kothari # # 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 PyQt5.QtCore import QUrl from picard import config, PICARD_VERSION_STR from picard.const import (ACOUSTID_KEY, ACOUSTID_HOST, ACOUSTID_PORT, CAA_HOST, CAA_PORT) from picard.webservice import ( CLIENT_STRING, DEFAULT_RESPONSE_PARSER_TYPE, ratecontrol, ) ratecontrol.set_minimum_delay((ACOUSTID_HOST, ACOUSTID_PORT), 333) ratecontrol.set_minimum_delay((CAA_HOST, CAA_PORT), 0) def escape_lucene_query(text): return re.sub(r'([+\-&|!(){}\[\]\^"~*?:\\/])', r'\\\1', text) def _wrap_xml_metadata(data): return ('<?xml version="1.0" encoding="UTF-8"?>' + '<metadata xmlns="http://musicbrainz.org/ns/mmd-2.0#">%s</metadata>' % data) class APIHelper(object): def __init__(self, host, port, api_path, webservice): self.host = host self.port = port self.api_path = api_path self._webservice = webservice def get(self, path_list, handler, priority=False, important=False, mblogin=False, cacheloadcontrol=None, refresh=False, queryargs=None, parse_response_type=DEFAULT_RESPONSE_PARSER_TYPE): path = self.api_path + "/".join(path_list) return self._webservice.get(self.host, self.port, path, handler, priority=priority, important=important, mblogin=mblogin, refresh=refresh, queryargs=queryargs, parse_response_type=parse_response_type) def post(self, path_list, data, handler, priority=False, important=False, mblogin=True, queryargs=None, parse_response_type=DEFAULT_RESPONSE_PARSER_TYPE): path = self.api_path + "/".join(path_list) return self._webservice.post(self.host, self.port, path, data, handler, priority=priority, important=important, mblogin=mblogin, queryargs=queryargs, parse_response_type=parse_response_type) def put(self, path_list, data, handler, priority=True, important=False, mblogin=True, queryargs=None): path = self.api_path + "/".join(path_list) return self._webservice.put(self.host, self.port, path, data, handler, priority=priority, important=important, mblogin=mblogin, queryargs=queryargs) def delete(self, path_list, handler, priority=True, important=False, mblogin=True, queryargs=None): path = self.api_path + "/".join(path_list) return self._webservice.delete(self.host, self.port, path, handler, priority=priority, important=important, mblogin=mblogin, queryargs=queryargs) class MBAPIHelper(APIHelper): def __init__(self, webservice): super().__init__(config.setting['server_host'], config.setting['server_port'], "/ws/2/", webservice) def _get_by_id(self, entitytype, entityid, handler, inc=None, queryargs=None, priority=False, important=False, mblogin=False, refresh=False): path_list = [entitytype, entityid] if queryargs is None: queryargs = {} if inc: queryargs["inc"] = "+".join(inc) return self.get(path_list, handler, priority=priority, important=important, mblogin=mblogin, refresh=refresh, queryargs=queryargs) def get_release_by_id(self, releaseid, handler, inc=None, priority=False, important=False, mblogin=False, refresh=False): if inc is None: inc = [] return self._get_by_id('release', releaseid, handler, inc, priority=priority, important=important, mblogin=mblogin, refresh=refresh) def get_track_by_id(self, trackid, handler, inc=None, priority=False, important=False, mblogin=False, refresh=False): if inc is None: inc = [] return self._get_by_id('recording', trackid, handler, inc, priority=priority, important=important, mblogin=mblogin, refresh=refresh) def lookup_discid(self, discid, handler, priority=True, important=True, refresh=False): inc = ['artist-credits', 'labels'] return self._get_by_id('discid', discid, handler, inc, queryargs={"cdstubs": "no"}, priority=priority, important=important, refresh=refresh) def _find(self, entitytype, handler, **kwargs): filters = [] limit = kwargs.pop("limit") if limit: filters.append(("limit", limit)) is_search = kwargs.pop("search", False) if is_search: if config.setting["use_adv_search_syntax"]: query = kwargs["query"] else: query = escape_lucene_query(kwargs["query"]).strip().lower() filters.append(("dismax", 'true')) else: query = [] for name, value in kwargs.items(): value = escape_lucene_query(value).strip().lower() if value: query.append('%s:(%s)' % (name, value)) query = ' '.join(query) if query: filters.append(("query", query)) queryargs = {} for name, value in filters: value = QUrl.toPercentEncoding(string_(value)) queryargs[string_(name)] = value path_list = [entitytype] return self.get(path_list, handler, queryargs=queryargs, priority=True, important=True, mblogin=False, refresh=False) def find_releases(self, handler, **kwargs): return self._find('release', handler, **kwargs) def find_tracks(self, handler, **kwargs): return self._find('recording', handler, **kwargs) def find_artists(self, handler, **kwargs): return self._find('artist', handler, **kwargs) def _browse(self, entitytype, handler, inc=None, **kwargs): path_list = [entitytype] queryargs = kwargs if inc: queryargs["inc"] = "+".join(inc) return self.get(path_list, handler, queryargs=queryargs, priority=True, important=True, mblogin=False, refresh=False) def browse_releases(self, handler, **kwargs): inc = ["media", "labels"] return self._browse("release", handler, inc, **kwargs) def submit_ratings(self, ratings, handler): path_list = ['rating'] params = {"client": CLIENT_STRING} recordings = (''.join(['<recording id="%s"><user-rating>%s</user-rating></recording>' % (i[1], j*20) for i, j in ratings.items() if i[0] == 'recording'])) data = _wrap_xml_metadata('<recording-list>%s</recording-list>' % recordings) return self.post(path_list, data, handler, priority=True, queryargs=params, parse_response_type="xml") def get_collection(self, collection_id, handler, limit=100, offset=0): path_list = ["collection"] queryargs = None if collection_id is not None: inc = ["releases", "artist-credits", "media"] path_list.extend([collection_id, "releases"]) queryargs = {} queryargs["inc"] = "+".join(inc) queryargs["limit"] = limit queryargs["offset"] = offset return self.get(path_list, handler, priority=True, important=True, mblogin=True, queryargs=queryargs) def get_collection_list(self, handler): return self.get_collection(None, handler) def _collection_request(self, collection_id, releases): while releases: ids = ";".join(releases if len(releases) <= 400 else releases[:400]) releases = releases[400:] yield ["collection", collection_id, "releases", ids] def _get_client_queryarg(self): return {"client": CLIENT_STRING} def put_to_collection(self, collection_id, releases, handler): for path_list in self._collection_request(collection_id, releases): self.put(path_list, "", handler, queryargs=self._get_client_queryarg()) def delete_from_collection(self, collection_id, releases, handler): for path_list in self._collection_request(collection_id, releases): self.delete(path_list, handler, queryargs=self._get_client_queryarg()) class AcoustIdAPIHelper(APIHelper): def __init__(self, webservice): super().__init__(ACOUSTID_HOST, ACOUSTID_PORT, '/v2/', webservice) def _encode_acoustid_args(self, args, format_='json'): filters = [] args['client'] = ACOUSTID_KEY args['clientversion'] = PICARD_VERSION_STR args['format'] = format_ for name, value in args.items(): value = string_(QUrl.toPercentEncoding(value)) filters.append('%s=%s' % (string_(name), value)) return '&'.join(filters) def query_acoustid(self, handler, **args): path_list = ['lookup'] body = self._encode_acoustid_args(args) return self.post(path_list, body, handler, priority=False, important=False, mblogin=False) def submit_acoustid_fingerprints(self, submissions, handler): path_list = ['submit'] args = {'user': config.setting["acoustid_apikey"]} for i, submission in enumerate(submissions): args['fingerprint.%d' % i] = string_(submission.fingerprint) args['duration.%d' % i] = string_(submission.duration) args['mbid.%d' % i] = string_(submission.recordingid) if submission.puid: args['puid.%d' % i] = string_(submission.puid) body = self._encode_acoustid_args(args, format_='json') return self.post(path_list, body, handler, priority=True, important=False, mblogin=False)
gpl-2.0
-4,988,077,440,481,802,000
41.920635
120
0.59976
false
amaurywalbert/twitter
evaluation/chen_paralell/hashmap/old/hashmap_chen_s_metrics_with_ground_truth_v1.0.py
1
12948
# -*- coding: latin1 -*- ################################################################################################ import datetime, sys, time, json, os, os.path, shutil, time, struct, random import subprocess reload(sys) sys.setdefaultencoding('utf-8') ###################################################################################################################################################################### ###################################################################################################################################################################### ## Status - Versão 1 - Calcular métricas usando o software desenvolvido por Chen: - Usando arquivos de entrada convertidos pelo HASHMAP ## ## ## SALVA ARQUIVOS NOS DIRETÒRIOS: ## RAW: conforme calculado - ## SEPARATE BY METRICS ## ## ## ## Mingming Chen, Sisi Liu, and Boleslaw Szymanski, “Parallel Toolkit for Measuring the Quality of Network Community Structure”, ## The First European Network Intelligence Conference (ENIC), Wroclaw, Poland, September, 2014, pp. 22-29. ## ## # INPUT: Arquivos com as comunidades detectadas, rede e o ground truth ## ## # OUTPUT: ## - Com Ground-Truth: ## total_running_time_pair_counting_metrics computation_time msg_passing_time ## numProcs VI NMI F-measure NVD RI ARI JI ## ## - Sem Ground-Truth: ## numProcs total_running_time ## numProcs modularity modularity_density #intra-edges intra-density contraction #inter-edges expansion conductance ## ###################################################################################################################################################################### ###################################################################################################################################################################### # # Prepara arquivos para ficar no mesmo formato que a versão anterior - separados por METRICA # ###################################################################################################################################################################### def prepare_data(data_dir,output_dir): if not os.path.isdir(data_dir): print ("\n\n\nDIRETÓRIO NÃO ENCONTRADO: "+str(data_dir)+"\n\n\n") else: if os.path.isdir(output_dir): shutil.rmtree(output_dir) os.makedirs(output_dir) else: os.makedirs(output_dir) for file in os.listdir(data_dir): network = file.split(".json") # pegar o nome do arquivo que indica o a rede analisada network = network[0] print ("\n##################################################") print ("Separando por métrica - Recuperando dados da rede "+str(network)+" - "+str(data_dir)+"\n") with open(data_dir+file, 'r') as f: partial = {} for line in f: comm_data = json.loads(line) for k, v in comm_data.iteritems(): # Preparação para ler o arquivo JSON que tem o Formato {"threshold": {metric": [values ---- {"5": {"VI": [0.542,...], "NMI": [0,214,0,36...],...}} threshold = k for _k,_v in v.iteritems(): dictionary = {} values = _v metric = _k dictionary[threshold] = values print ("Salvando dados em: "+str(output_dir)+str(metric)+"/"+str(network)+".json") if not os.path.isdir(output_dir+str(metric)+"/"): os.makedirs(output_dir+str(metric)+"/") with open(output_dir+str(metric)+"/"+str(network)+".json", "a") as f: f.write(json.dumps(dictionary, separators=(',', ':'))+"\n") print ("##################################################") ###################################################################################################################################################################### # # Realiza as configurações necessárias para os dados do METRICA # ###################################################################################################################################################################### def instructions(alg): ################################################################################################ data_dir = str(source)+"graphs_with_ego/"+alg+"/raw/full/" output_dir = str(source)+"graphs_with_ego/"+alg+"/by_metrics/full/" prepare_data(data_dir,output_dir) ################################################################################################ data_dir = str(source)+"graphs_with_ego/"+alg+"/raw/without_singletons/" output_dir = str(source)+"graphs_with_ego/"+alg+"/by_metrics/without_singletons/" prepare_data(data_dir,output_dir) ################################################################################################ data_dir = str(source)+"graphs_without_ego/"+alg+"/raw/full/" output_dir = str(source)+"graphs_without_ego/"+alg+"/by_metrics/full/" prepare_data(data_dir,output_dir) ################################################################################################ data_dir = str(source)+"graphs_without_ego/"+alg+"/raw/without_singletons/" output_dir = str(source)+"graphs_without_ego/"+alg+"/by_metrics/without_singletons/" prepare_data(data_dir,output_dir) ###################################################################################################################################################################### # # Cálculos iniciais sobre o conjunto de dados lidos. # ###################################################################################################################################################################### def calculate_alg(communities,output,singletons,net,ground_truth,g_type): communities = communities+singletons+"/"+net+"/" ground_truth = ground_truth+singletons+"/" output = output+singletons+"/" if not os.path.exists(output): os.makedirs(output) print print("######################################################################") print ("Os arquivos serão armazenados em: "+str(output)) print("######################################################################") if os.path.isfile(str(output)+str(net)+".json"): print ("Arquivo de destino já existe: "+str(output)+str(net)+".json") else: result={} for threshold in range(51): #Parâmetro do algoritmo de detecção threshold+=1 i=0 #Ponteiro para o ego if not os.path.isdir(str(communities)+str(threshold)+"/"): print ("Diretório com as comunidades não encontrado: "+str(communities)+str(threshold)) else: print("######################################################################") _result = {} VI = [] NMI = [] F_measure = [] NVD = [] RI = [] ARI = [] JI = [] # Armazenar os indices de cada ego e salvar depois em uma linha para cada threshold do arquivo result.json for file in os.listdir(str(communities)+str(threshold)+"/"): i+=1 if not os.path.isfile(str(ground_truth)+str(file)): print ("ERROR - EGO: "+str(i)+" - Arquivo de ground truth não encontrado:" +(str(ground_truth)+str(file))) else: try: execute = subprocess.Popen(["mpirun","-np","4","/home/amaury/algoritmos/Metricas/ParallelComMetric-master/src/mpimetric","1",str(ground_truth)+str(file),str(communities)+str(threshold)+"/"+str(file)], stdout=subprocess.PIPE) value = execute.communicate()[0] b = value.split('\n') t = b[0].split('\t') a = b[1].split('\t') vi = float(a[1]) nmi = float(a[2]) f_measure = float(a[3]) nvd = float(a[4]) ri = float(a[5]) ari = float(a[6]) ji = float(a[7]) print (str(g_type)+" - "+str(singletons)+" - Rede: "+str(net)+" - THRESHOLD: "+str(threshold)+" - ego("+str(i)+"): "+str(file)+" - "+str(a)) VI.append(vi) NMI.append(nmi) F_measure.append(f_measure) NVD.append(nvd) RI.append(ri) ARI.append(ari) JI.append(ji) except Exception as e: print e print("######################################################################") _result['VI'] = VI _result['NMI'] = NMI _result['F_measure'] = F_measure _result['NVD'] = NVD _result['RI'] = RI _result['ARI'] = ARI _result['JI'] = JI result[threshold] = _result if len(result) > 0: with open(str(output)+str(net)+".json", 'w') as f: f.write(json.dumps(result)) print("######################################################################") ###################################################################################################################################################################### # # Método principal do programa. # Realiza teste e coleta dos dados de cada user especificado no arquivo. # ###################################################################################################################################################################### ###################################################################################################################################################################### def main(): os.system('clear') print "################################################################################" print" " print" Avaliação de Comunidades - Chen's Software " print" " print"#################################################################################" print print"Realizar o cálculo usando Singletons?" print print" 01 - SIM - full" print" 02 - NÃO" print op = int(raw_input("Escolha uma opção acima: ")) if op == 01: singletons = "full" elif op == 02: singletons = "without_singletons" else: singletons = "" print("Opção inválida! Saindo...") sys.exit() ####################################################################### ####################################################################### print("######################################################################") print print "Algoritmo utilizado na detecção das comunidades" print print" 01 - COPRA" print" 02 - OSLOM" print op2 = int(raw_input("Escolha uma opção acima: ")) if op2 == 01: alg = "copra" elif op2 == 02: alg = "oslom" else: alg = "" print("Opção inválida! Saindo...") sys.exit() print print print ("Opção escolhida: "+str(singletons)+" - "+str(alg)) print ("Aguarde...") time.sleep(5) ###################################################################################################################### #####Alterar as linhas para Dropbox quando executado em ambiente de produção ground_truth = "/home/amaury/dataset/ground_truth/lists_users_TXT_hashmap/" communities1 = "/home/amaury/communities_hashmap/graphs_with_ego/"+str(alg)+"/" communities2 = "/home/amaury/communities_hashmap/graphs_without_ego/"+str(alg)+"/" output1 = "/home/amaury/Dropbox/Chen_software_results_hashmap/with_ground_truth/graphs_with_ego/"+str(alg)+"/raw/" output2 = "/home/amaury/Dropbox/Chen_software_results_hashmap/with_ground_truth/graphs_without_ego/"+str(alg)+"/raw/" for i in range(10): # Para cada rede-ego gerada i+=1 net = "n"+str(i) print print ("Calculando métricas nas comunidades detectadas na rede: "+str(net)+" - COM o ego - Algoritmo: "+str(alg)) g_type = "graphs_with_ego" calculate_alg(communities1,output1,singletons,net,ground_truth,g_type) print print ("Calculando métricas nas comunidades detectadas na rede: "+str(net)+" - SEM o ego - Algoritmo: "+str(alg)) g_type = "graphs_without_ego" calculate_alg(communities2,output2,singletons,net,ground_truth,g_type) ###################################################################################################################### instructions(alg) # Separar por métrica ###################################################################################################################### print("######################################################################") print print("######################################################################") print("Script finalizado!") print("######################################################################\n") ###################################################################################################################################################################### # # INÍCIO DO PROGRAMA # ###################################################################################################################################################################### source = "/home/amaury/Dropbox/Chen_software_results_hashmap/with_ground_truth/" output = "/home/amaury/Dropbox/Chen_software_statistics_hashmap/with_ground_truth/" ###################################################################################################################### if __name__ == "__main__": main()
gpl-3.0
1,110,181,253,667,685,800
41.993333
231
0.421073
false
sonicxml/PennApps-2016f
server.py
1
2384
import flask import config import yelp_handler import json import requests slack_posturl = "https://slack.com/api/chat.postMessage" slack_reacturl = "https://slack.com/api/reactions.add" app = flask.Flask(__name__) class InvalidTokenException(Exception): pass @app.errorhandler(InvalidTokenException) def handle_invalid_token(error): abort(403) @app.route('/') def index(): return 'SuperSwagSauce(TM) Productions' def get_restaurants_from_yelp(location): # Talk to yelp restaurants = yelp_handler.get_restaurants_by_location(location) return restaurants @app.route('/slack', methods=['POST']) def generate_response(): form_info = flask.request.form if config.API_TOKEN != form_info['token']: raise InvalidTokenException # First, parse args and find the restaurants passed_args = form_info['text'] channel = form_info['channel_id'] restaurants = get_restaurants_from_yelp(config.LOCATION) # Next, send POST request with list of restaurants for Slack post_data = { 'response_type': 'in_channel', 'text': "Here's a list of restaurants to choose from today!", 'attachments': [{'title': r, 'text': 'Rating: ' + \ str(restaurants[r])} for r in restaurants.keys()], 'token': config.API_TOKEN, 'channel': channel } # post_data['response_type'] = 'in_channel' # post_data['text'] = "Here's a list of restaurants to choose from today!" # post_data['attachments'] = [{'title': r, 'text': 'Rating: ' + \ # str(restaurants[r])} for r in restaurants.keys()] # post_data['token'] = config.API_TOKEN # post_data['channel'] = channel post_response = requests.post(slack_posturl, data=post_data) # Finally, add poll reactions # Heavily inspired by SimplePoll for Slack emoji_names = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', \ 'eight', 'nine', 'keycap_ten'] for i in xrange(min(len(emoji_names), len(restaurants))): reaction_data = { 'token': config.API_TOKEN, 'name': emoji_names[i], 'channel': channel, 'timestamp': post_response['ts'] } requests.post(slack_reacturl, data=reaction_data) return '' def main(): app.run(host='0.0.0.0', port='9999', threaded=True) if __name__ == '__main__': main()
gpl-3.0
603,276,408,014,567,700
29.974026
78
0.626258
false
MGautier/security-sensor
trunk/Documentacion/Memoria/trozos-codigo/codigo-9-additional-class.py
1
1844
class PacketAdditionalInfoTestCase(TestCase): # Atributos internos de la clase timestamp = timezone.now() timestamp_insertion = timezone.now() def setUp(self): ip_source = Ips.objects.create(Ip="127.0.0.2", Hostname="localhost", Tag="localhost") ip_dest = Ips.objects.create(Ip="127.0.0.3", Hostname="localhost", Tag="localhost") port_source = Ports.objects.create(Tag="ftp") port_dest = Ports.objects.create(Tag="ssh") mac_source = Macs.objects.create( MAC="00:00:00:00:00:00:00:00:00:00:00:00:08:00", TAG="Mac local1") mac_dest = Macs.objects.create( MAC="00:00:00:00:00:00:00:00:00:00:00:00:08:00", TAG="Mac local2") log_sources = LogSources.objects.create( Description="Firewall of gnu/linux kernel", Type="Iptables", Model="iptables v1.4.21", Active=1, Software_Class="Firewall", Path="iptables", ) event = Events.objects.create( Timestamp=self.timestamp, Timestamp_Insertion=self.timestamp_insertion, ID_Source=log_sources, Comment="Iptables Events", ) packet = PacketEventsInformation.objects.create( ID_IP_Source=ip_source, ID_IP_Dest=ip_dest, ID_Source_Port=port_source, ID_Dest_Port=port_dest, Protocol="ICMP", ID_Source_MAC=mac_source, ID_Dest_MAC=mac_dest, RAW_Info="LOG RAW INFO", TAG="Connection ICMP", id=event ) tag = Tags.objects.create(Description="Packet ID", Tag="ID") PacketAdditionalInfo.objects.create( ID_Tag=tag, ID_Packet_Events=packet, Value="32731 DF" )
mit
-8,364,452,860,194,801,000
36.632653
93
0.560195
false
diana-hep/carl
tests/distributions/test_histogram.py
1
1901
# Carl is free software; you can redistribute it and/or modify it # under the terms of the Revised BSD License; see LICENSE file for # more details. import numpy as np from numpy.testing import assert_raises from numpy.testing import assert_array_almost_equal from numpy.testing import assert_almost_equal from carl.distributions import Histogram def test_histogram(): X = np.arange(11).reshape(-1, 1) h = Histogram(bins=11) h.fit(X) assert_array_almost_equal( h.pdf([[0.0], [1.0], [10.0], [-0.5], [10.5]]), [0.1, 0.1, 0.1, 0., 0.]) assert_array_almost_equal( h.nll([[0.0], [1.0], [10.0], [-0.5], [10.5]]), -np.log(h.pdf([[0.0], [1.0], [10.0], [-0.5], [10.5]]))) X = h.rvs(10000, random_state=1) assert np.abs(np.mean(X) - 5.0) < 0.05 assert X.min() >= 0.0 assert X.max() <= 10.0 def test_histogram_sample_weight(): X = np.arange(11).reshape(-1, 1) w = np.ones(len(X)) / len(X) h1 = Histogram(bins=11) h1.fit(X) h2 = Histogram(bins=11) h2.fit(X, sample_weight=w) assert_array_almost_equal( h1.pdf([[0.0], [1.0], [10.0], [-0.5], [10.5]]), h2.pdf([[0.0], [1.0], [10.0], [-0.5], [10.5]])) assert_raises(ValueError, h1.fit, X, sample_weight=w[1:]) def test_histogram_2d(): X = np.arange(100).reshape(-1, 2) h = Histogram(bins=[5, 3]) h.fit(X) assert h.ndim == 2 assert h.histogram_.shape[0] == 5+2 assert h.histogram_.shape[1] == 3+2 def test_histogram_variable_width(): X = np.arange(11).reshape(-1, 1) h = Histogram(bins=11, variable_width=True) h.fit(X) assert_array_almost_equal(h.pdf([[1.0], [2.0], [8.0]]), [0.1, 0.1, 0.1]) h = Histogram(bins=3, variable_width=True) h.fit(X) integral = h.histogram_ * (h.edges_[0][1:] - h.edges_[0][:-1]) integral = integral[1:-1].sum() assert_almost_equal(integral, 1.)
bsd-3-clause
1,730,187,702,484,390,400
26.955882
76
0.577065
false
nagyistoce/netzob
src/netzob/Common/Plugins/Extensions/CapturerMenuExtension.py
1
3757
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocols | #+---------------------------------------------------------------------------+ #| Copyright (C) 2011 Georges Bossert and Frédéric Guihéry | #| This program is free software: you can redistribute it and/or modify | #| it under the terms of the GNU General Public License as published by | #| the Free Software Foundation, either version 3 of the License, or | #| (at your option) any later version. | #| | #| This program is distributed in the hope that it will be useful, | #| but WITHOUT ANY WARRANTY; without even the implied warranty of | #| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | #| GNU General Public License for more details. | #| | #| You should have received a copy of the GNU General Public License | #| along with this program. If not, see <http://www.gnu.org/licenses/>. | #+---------------------------------------------------------------------------+ #| @url : http://www.netzob.org | #| @contact : [email protected] | #| @sponsors : Amossys, http://www.amossys.fr | #| Supélec, http://www.rennes.supelec.fr/ren/rd/cidre/ | #+---------------------------------------------------------------------------+ #+---------------------------------------------------------------------------+ #| Standard library imports #+---------------------------------------------------------------------------+ #+---------------------------------------------------------------------------+ #| Related third party imports #+---------------------------------------------------------------------------+ #+---------------------------------------------------------------------------+ #| Local application imports #+---------------------------------------------------------------------------+ from netzob.Common.Plugins.Extensions.GlobalMenuExtension import GlobalMenuExtension class CapturerMenuExtension(GlobalMenuExtension): def __init__(self, netzob, controller, actionName, menuText, menuStock=None, menuAccel=None, menuTooltip=None): super(GlobalMenuExtension, self).__init__() self.netzob = netzob self.actionName = actionName self.menuText = menuText self.menuStock = menuStock self.menuAccel = menuAccel self.menuTooltip = menuTooltip self.controller = controller def getUIDefinition(self): uiDefinition = """ <ui> <menubar name='MenuBar'> <menu action='Project'> <menu action='CaptureMessages'> <menuitem action='{0}' /> </menu> </menu> </menubar> </ui> """.format(self.actionName) return uiDefinition def getActions(self): actions = [ (self.actionName, self.menuStock, self.menuText, self.menuAccel, self.menuTooltip, self.executeAction)] return actions def executeAction(self, widget, vocabularyView, data=None): self.controller(vocabularyView)
gpl-3.0
7,366,559,778,283,444,000
47.74026
84
0.417
false
time-river/wander
practice/urllib/baidutieba_spider.py
1
5915
#!/usr/bin/env python3 # -*- coding:utf-8 -*- ''' from http://cuiqingcai.com/993.html I just copy it and use python3 to rewrite it. ''' import urllib.request import urllib.parse import urllib.error import re class Tool: ''' 除去页面标签 ''' def __init__(self): self.removeImg = re.compile(r'<img.*?>| {7}') #删除 img标签 或 7位长空格 self.removeAddr = re.compile(r'<a.*?>|</a>') #删除 超链接标签 self.replaceLine = re.compile(r'<br><br>|<br>|<tr>|<div>|</div>|</p>') #换行的标签 置为 \n self.replaceTD = re.compile(r'<td>') #td标签 换为 \t self.replacePara = re.compile(r'<p.*?>') #段落开头加空格 self.removeExtraTag = re.compile(r'<.*?>') #移除其他标签 def replace(self, x): x = re.sub(self.removeImg, "", x) x = re.sub(self.removeAddr, "", x) x = re.sub(self.replaceLine, "\n", x) x = re.sub(self.replaceTD, "\t", x) x = re.sub(self.replacePara, "\n ", x) x = re.sub(self.removeExtraTag, "", x) return x.strip() class BDTB: ''' 百度贴吧爬虫 ''' def __init__(self, baseUrl, seeLZ, floorTag): ''' 传入参数 baseURL, seeLZ, floorTag 初始化参数 baseUrl: 百度贴吧某一资源 seeLZ:布尔值,取0或1,含义——是否只看楼主 file:文件写入变量 floor:楼层标号,初始为1 defaultTitle:默认标题,未获取标题则使用此标题 floorTag:是否写入楼层分隔符号标记 ''' self.baseURL = baseUrl self.seeLZ = '?see_lz=' + str(seeLZ) self.file = None self.floor = 1 self.defaultTitle = "百度贴吧" self.floorTag = floorTag self.tool = Tool() def getPage(self, pageNum): ''' 功能 获取制定页码的html文档 传入参数 pageNum:传入页码 ''' try: url = self.baseURL+ self.seeLZ + '&pn=' + str(pageNum) request = urllib.request.Request(url) response = urllib.request.urlopen(request, timeout=30) page = response.read().decode("utf-8") return page except urllib.error.URLError as e: if hasattr(e, "reason"): print("We failed to reach a server. Please check your url and read the reason") print("Reason: {}".format(e.reason)) return None elif hasattr(e, "code"): print("The server couldn't fulfill the request.") print("Error code: {}".format(e.code)) return None def getTitle(self, page): ''' 功能 获取帖子标题 传入参数 page:获取到的html文档 ''' pattern = re.compile(r'<h\d.*?class="core_title_txt.*?>(.*?)</h\d>') result = pattern.search(page) if result: return result.group(1).strip() #为了使用正则表达式匹配到的这些分组,需要对search()函数的返回值调用groups()方法。它会返回一个这个正则表达式中定义的所有分组结果组成的元组。 else: return None def getPageNum(self, page): ''' 功能 获取帖子页数 传入参数 page:获取到的html文档 ''' pattern = re.compile(r'<a.*?href=".*?pn=(\d+)">尾页</a>') number = pattern.search(page) if number: return number.group(1).strip() else: return None def getContents(self, page): ''' 功能 提取百度贴吧每层楼内容 传入参数 page:获取到的html文档 ''' pattern = re.compile(r'<div.*?id="post_content.*?>(.*?)</div>', re.S) items = pattern.findall(page) try: contents = [] for item in items: content = "\n" + self.tool.replace(item) + "\n" contents.append(content) return contents except TypeError as e: print("未找到内容") def setFileTitle(self, title): ''' 功能 设置文件名称 传入参数 title:获取到的帖子标题 ''' if title is not None: return title else: return self.defaultTitle def writeData(self, title, contents): ''' 功能 向文件中写入每层楼信息 参数 title:帖子标题 contents:楼层信息 ''' for item in contents: with open(title+".txt", "a") as file: if self.floorTag == '1': floorLine = "\n" + str(self.floor) + "-----------------------------------------------------------------------------------------\n" file.write(floorLine) file.write(item) self.floor += 1 def start(self): page = self.getPage(1) pageNum = self.getPageNum(page) title = self.getTitle(page) fileTitle = self.setFileTitle(title) if pageNum is None: print("链接已经失效") return try: print("该帖子共有{}页".format(pageNum)) for i in range(1, int(pageNum)+1): print("正在写入第{}页数据".format(i)) page = self.getPage(i) contents = self.getContents(page) self.writeData(fileTitle, contents) except IOError as e: print("写入异常,原因{}".format(e.code)) finally: print("写入完成") baseURL = 'http://tieba.baidu.com/p/3138733512' seeLZ = 1 floorTag = 1 spider = BDTB(baseURL, seeLZ, floorTag) spider.start()
mit
-6,150,374,476,879,375,000
28
150
0.497399
false
nicko7i/vcnc
api-python/tests/simple/test_pcapi_workspace.py
1
3026
import pytest import json from velstor.restapi import Session from velstor.pcapi import Workspace from velstor.pcapi import RESTException def test_as_json(): """Tests whether the Workspace JSON representation is valid JSON""" w = Workspace('session') json.loads(w.json) def test_get_well_known_workspace(): with Session() as session: session.login('cnc:7130') w = Workspace(session).get('/root/local') assert(w.pathname == '/root/local') assert(w.vtrq_id == 0) assert(w.vtrq_path == '/') assert(w.writeback == 'always') def test_set_no_pathname(): with Session() as session: session.login('cnc:7130') w = Workspace(session) try: w.set() assert False except ValueError: assert True def test_equality_operator(): w1 = Workspace(None, pathname='/molly', writeback='always') w2 = Workspace(None, pathname='/molly', writeback='always') w3 = Workspace(None, pathname='/bubba', writeback='never') assert(w1 == w1) assert(w1 == w2) assert(w1 != w3) assert(w2 != w3) # assert(not (w1 != w1)) assert(not (w1 != w2)) assert(not (w1 == w3)) assert(not (w2 == w3)) def test_lifecycle_success(): with Session() as session: session.login('cnc:7130') w = Workspace(session, pathname='/bubba', writeback='never') # # Prepare by deleting any existing workspace. # try: w.delete() except RESTException: pass # # Create/Get/Delete # We expect these methods to raise a RESTException if they fail # w.set() assert(w.get() == w) w.delete() def test_get_enoent(): with Session() as session: session.login('cnc:7130') try: Workspace(session, pathname='/not/even').get() assert False except RESTException as e: assert(e.error_sym == 'ENOENT') assert(e.http_code == 404) @pytest.mark.xfail def test_delete_enoent(): with Session() as session: session.login('cnc:7130') try: Workspace(session, pathname='/not/even').delete() assert False except RESTException as e: assert(e.error_sym == 'ENOENT') assert(e.http_code == 404) def test_get_default(): with Session() as session: session.login('cnc:7130') try: Workspace(session).get() assert False except ValueError: pass def test_set_default(): with Session() as session: session.login('cnc:7130') try: Workspace(session).set() assert False except ValueError: pass def test_delete_default(): with Session() as session: session.login('cnc:7130') try: Workspace(session).delete() assert False except ValueError: pass
apache-2.0
-2,666,719,511,131,740,700
24.008264
72
0.560476
false
supernathan23/dn_availability
dn_availability/reports.py
1
5431
""" reports.py This file contains report definitions. A report definition is some kind callable that should output data in whatever format. Once defined, it should be added to the ALL_REPORTS dictionary, where the key is the public name used to reference the report, like from the CLI. Example definition: def sample_report(avail_info_obj, output_file, args): avail_info_obj is the AvailabilityInfo instance used to generate the report output_file is a file-like object that should be used for outputting the report data. args is an object containing the user input from the cli (if available) There is a ReportBase class that assists with handling the args. """ from .db import AvailabilityDB from sqlalchemy import and_ import sys import logging ALL_REPORTS = {} class ReportBase(object): """ Helper class for report definitions Basic Usage: subclasses need to implement the generate method User Input handling: This class assists in gather data from user input. When these attributes are specified, the class will validate the user input and then select the data from the DB. This will be provided to the generate method. requires_phone_system - when True, requires that the user specify a phone_system_id requires_number_group - when True, requires that the user specify a number_group_id Note: the user can specify more than one phone system or number group. Also, even if the data is not required this will grab the data from the DB if the objects are specified by the user (useful for when the data is optional) """ requires_phone_system = False requires_number_group = False def __init__(self, avail_info_obj, output_file, args): self.logger = logging.getLogger(__name__) self.avail_info_obj = avail_info_obj self.output_file = output_file self.args = args phone_systems = self._get_db_rows( table=AvailabilityDB.phone_system, args=args, arg_db_mapping={'system_id': 'id'}) has_errors = False if self.requires_phone_system and phone_systems is None: has_errors = True self.logger.error('Must provide a valid system_id: "-s" or "--system_id"') elif self.requires_phone_system and not phone_systems: # here we are checking for an empty list, which means args were # provided but didn't match any rows has_errors = True self.logger.error('No matching phone systems found') number_groups = self._get_db_rows( table=AvailabilityDB.number_group, args=args, arg_db_mapping={'number_group': 'id'}) if self.requires_number_group and number_groups is None: has_errors = True self.logger.error('Must provide a valid number group id: "-g" or "--number_group"') elif self.requires_number_group and not number_groups: has_errors = True self.logger.error('No matching number groups found') if has_errors: self.logger.info('Errors encountered, exiting') sys.exit() self.generate(phone_systems, number_groups) def _get_db_rows(self, table, args, arg_db_mapping): """ Returns a list of rows in table matching data in args If no applicable arguments are specified in args, returns None If arguments are specified but no rows are matched, returns an empty list. table should be a SQL Alchemy table object args is a collection of user input from the cli module arg_db_mappings should be a dict-ish object with a key as the attribute name in the args collection and the associated value being the DB column name used for the query """ clauses = [] for argname, db_col in arg_db_mapping.items(): v = getattr(args, argname) if not v: continue has_args = True if type(v) == list: clauses.append(table.c[db_col].in_(v)) else: clauses.append(table.c[db_col] == v) if not clauses: return None elif len(clauses) == 1: clause = clauses[0] else: clause = and_(*clauses) conn = self.avail_info_obj.db.connect() result = conn.execute(table.select().where(clause)) return result.fetchall() def write(self, data): self.output_file.write(data) def generate(self, phone_systems, number_groups): raise NotImplemented() class FakeReport(ReportBase): def generate(self, phone_systems, number_groups): self.write('Fake report generation\n\n') self.write('phone_systems: {}\n'.format(phone_systems)) self.write('number_groups: {}\n'.format(number_groups)) ALL_REPORTS['FakeReport'] = FakeReport class BatExportReport(ReportBase): def generate(self, phone_systems, number_groups): pass #TODO ALL_REPORTS['BAT_Export'] = BatExportReport
mit
-6,912,152,011,082,097,000
35.212329
95
0.608728
false
JuanDaniel/DBOJ
Engine/src/Execute/qualifieldThread.py
1
1262
''' Created on 30/01/2014 @author: jdsantana ''' import threading import time from Common.Request import Request import json class qualifieldThread(threading.Thread): def __init__(self, dbManager, parameters): threading.Thread.__init__(self) self.__dbManager = dbManager self.__parameters = parameters def run(self): ''' Check if the DB exists ''' self.__dbManager.connect() if not self.__dbManager.checkDB(self.__parameters['db']): ''' Get the schema ''' request = Request() schema = request.send('getSchema', {'id': self.__parameters['idProblema']}).read() schema = json.loads(schema) self.__dbManager.createDB(self.__parameters['db'], schema['schema']) if self.__dbManager.execute("SELECT compare('%s', '%s')" %(self.__parameters['sqlUser'], self.__parameters['sqlSolution'])): qualifield = 'Aceptado' else: qualifield = 'Incorrecto' request = Request() response = request.send('setResultSending', {'id': self.__parameters['id'], 'qualifield': qualifield}).read() print response #time.sleep(60) print 'Termine'
mit
-4,865,329,643,605,331,000
26.434783
132
0.574485
false
intelie/pycollector
src/third/stomp/__init__.py
1
1595
"""Stomp Protocol Connectivity This provides basic connectivity to a message broker supporting the 'stomp' protocol. At the moment ACK, SEND, SUBSCRIBE, UNSUBSCRIBE, BEGIN, ABORT, COMMIT, CONNECT and DISCONNECT operations are supported. This changes the previous version which required a listener per subscription -- now a listener object just calls the 'addlistener' method and will receive all messages sent in response to all/any subscriptions. (The reason for the change is that the handling of an 'ack' becomes problematic unless the listener mechanism is decoupled from subscriptions). Note that you must 'start' an instance of Connection to begin receiving messages. For example: conn = stomp.Connection([('localhost', 62003)], 'myuser', 'mypass') conn.start() Meta-Data --------- Author: Jason R Briggs License: http://www.apache.org/licenses/LICENSE-2.0 Start Date: 2005/12/01 Last Revision Date: $Date: 2008/09/11 00:16 $ Notes/Attribution ----------------- * uuid method courtesy of Carl Free Jr: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/213761 * patch from Andreas Schobel * patches from Julian Scheid of Rising Sun Pictures (http://open.rsp.com.au) * patch from Fernando * patches from Eugene Strulyov """ __version__ = '2.0.4' __all__ = [ 'stomp' ] import stomp import cli import listener Connection = stomp.Connection ConnectionListener = listener.ConnectionListener StatsListener = listener.StatsListener
bsd-3-clause
-3,484,393,463,302,203,400
34.295455
113
0.691536
false
cs2c-zhangchao/nkwin1.0-anaconda
pyanaconda/ui/gui/spokes/lib/resize.py
1
17819
# Disk resizing dialog # # Copyright (C) 2012-2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY expressed or implied, including the implied warranties 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. Any Red Hat trademarks that are incorporated in the # source code or documentation are not subject to the GNU General Public # License and may only be used or replicated with the express permission of # Red Hat, Inc. # # Red Hat Author(s): Chris Lumens <[email protected]> # from __future__ import division from gi.repository import Gtk from pyanaconda.i18n import _, N_, P_ from pyanaconda.ui.lib.disks import size_str from pyanaconda.ui.gui import GUIObject from blivet.size import Size __all__ = ["ResizeDialog"] DEVICE_ID_COL = 0 DESCRIPTION_COL = 1 FILESYSTEM_COL = 2 RECLAIMABLE_COL = 3 ACTION_COL = 4 EDITABLE_COL = 5 TOOLTIP_COL = 6 RESIZE_TARGET_COL = 7 NAME_COL = 8 PRESERVE = N_("Preserve") SHRINK = N_("Shrink") DELETE = N_("Delete") class ResizeDialog(GUIObject): builderObjects = ["actionStore", "diskStore", "resizeDialog", "resizeAdjustment"] mainWidgetName = "resizeDialog" uiFile = "spokes/lib/resize.glade" def __init__(self, data, storage, payload): GUIObject.__init__(self, data) self.storage = storage self.payload = payload self._actionStore = self.builder.get_object("actionStore") self._diskStore = self.builder.get_object("diskStore") self._view = self.builder.get_object("diskView") self._diskStore = self.builder.get_object("diskStore") self._reclaimable_label = self.builder.get_object("reclaimableSpaceLabel") self._selected_label = self.builder.get_object("selectedSpaceLabel") self._required_label = self.builder.get_object("requiredSpaceLabel") markup = self._required_label.get_label() self._required_label.set_markup(markup % size_str(self.payload.spaceRequired)) self._reclaimDescLabel = self.builder.get_object("reclaimDescLabel") self._resizeButton = self.builder.get_object("resizeButton") self._preserveButton = self.builder.get_object("preserveButton") self._shrinkButton = self.builder.get_object("shrinkButton") self._deleteButton = self.builder.get_object("deleteButton") self._resizeSlider = self.builder.get_object("resizeSlider") def _description(self, part): # First, try to find the partition in some known Root. If we find # it, return the mountpoint as the description. for root in self.storage.roots: for (mount, device) in root.mounts.iteritems(): if device == part: return "%s (%s)" % (mount, root.name) # Otherwise, fall back on increasingly vague information. if not part.isleaf: return self.storage.devicetree.getChildren(part)[0].name if getattr(part.format, "label", None): return part.format.label elif getattr(part.format, "name", None): return part.format.name else: return "" def _get_tooltip(self, device): if device.protected: return _("This device contains the installation source.") else: return None def populate(self, disks): totalDisks = 0 totalReclaimableSpace = 0 self._initialFreeSpace = Size(0) self._selectedReclaimableSpace = 0 canShrinkSomething = False free_space = self.storage.getFreeSpace(disks=disks) for disk in disks: # First add the disk itself. editable = not disk.protected if disk.partitioned: fstype = "" diskReclaimableSpace = 0 else: fstype = disk.format.type diskReclaimableSpace = disk.size itr = self._diskStore.append(None, [disk.id, "%s %s" % (size_str(disk.size), disk.description), fstype, "<span foreground='grey' style='italic'>%s total</span>", _(PRESERVE), editable, self._get_tooltip(disk), disk.size, disk.name]) if disk.partitioned: # Then add all its partitions. for dev in self.storage.devicetree.getChildren(disk): if dev.isExtended and disk.format.logicalPartitions: continue # Devices that are not resizable are still deletable. if dev.resizable: freeSize = dev.size - dev.minSize resizeString = _("%(freeSize)s of %(devSize)s") \ % {"freeSize": size_str(freeSize), "devSize": size_str(dev.size)} if not dev.protected: canShrinkSomething = True else: freeSize = dev.size resizeString = "<span foreground='grey'>%s</span>" % _("Not resizeable") self._diskStore.append(itr, [dev.id, self._description(dev), dev.format.type, resizeString, _(PRESERVE), not dev.protected, self._get_tooltip(dev), dev.size, dev.name]) diskReclaimableSpace += freeSize # And then add another uneditable line that lists how much space is # already free in the disk. diskFree = free_space[disk.name][0] converted = diskFree.convertTo(spec="mb") if int(converted): self._diskStore.append(itr, [disk.id, _("""<span foreground='grey' style='italic'>Free space</span>"""), "", "<span foreground='grey' style='italic'>%s</span>" % size_str(diskFree), _(PRESERVE), False, self._get_tooltip(disk), float(converted), ""]) self._initialFreeSpace += diskFree # And then go back and fill in the total reclaimable space for the # disk, now that we know what each partition has reclaimable. self._diskStore[itr][RECLAIMABLE_COL] = self._diskStore[itr][RECLAIMABLE_COL] % size_str(diskReclaimableSpace) totalDisks += 1 totalReclaimableSpace += diskReclaimableSpace self._update_labels(totalDisks, totalReclaimableSpace, 0) description = _("You can remove existing filesystems you no longer need to free up space " "for this installation. Removing a filesystem will permanently delete all " "of the data it contains.") if canShrinkSomething: description += "\n\n" description += _("There is also free space available in pre-existing filesystems. " "While it's risky and we recommend you back up your data first, you " "can recover that free disk space and make it available for this " "installation below.") self._reclaimDescLabel.set_text(description) def _update_labels(self, nDisks=None, totalReclaimable=None, selectedReclaimable=None): if nDisks is not None and totalReclaimable is not None: text = P_("<b>%s disk; %s reclaimable space</b> (in filesystems)", "<b>%s disks; %s reclaimable space</b> (in filesystems)", nDisks) % (nDisks, size_str(totalReclaimable)) self._reclaimable_label.set_markup(text) if selectedReclaimable is not None: text = _("Total selected space to reclaim: <b>%s</b>") % size_str(selectedReclaimable) self._selected_label.set_markup(text) def _setup_slider(self, device, value): """Set up the slider for this device, pulling out any previously given shrink value as the default. This also sets up the ticks on the slider and keyboard support. Any devices that are not resizable will not have a slider displayed, so they do not need to be worried with here. """ self._resizeSlider.set_range(device.minSize, device.size) self._resizeSlider.set_value(value) # The slider needs to be keyboard-accessible. We'll make small movements change in # 1% increments, and large movements in 5% increments. distance = device.size - device.minSize onePercent = distance*0.01 fivePercent = distance*0.05 twentyPercent = distance*0.2 adjustment = self.builder.get_object("resizeAdjustment") adjustment.configure(value, device.minSize, device.size, onePercent, fivePercent, 0) # And then the slider needs a couple tick marks for easier navigation. self._resizeSlider.clear_marks() for i in range(1, 5): self._resizeSlider.add_mark(device.minSize + i*twentyPercent, Gtk.PositionType.BOTTOM, None) # Finally, add tick marks for the ends. self._resizeSlider.add_mark(device.minSize, Gtk.PositionType.BOTTOM, size_str(device.minSize)) self._resizeSlider.add_mark(device.size, Gtk.PositionType.BOTTOM, size_str(device.size)) def _update_action_buttons(self, row): device = self.storage.devicetree.getDeviceByID(row[DEVICE_ID_COL]) # Disks themselves may be editable in certain ways, but they are never # shrinkable. self._preserveButton.set_sensitive(row[EDITABLE_COL]) self._shrinkButton.set_sensitive(row[EDITABLE_COL] and not device.isDisk) self._deleteButton.set_sensitive(row[EDITABLE_COL]) self._resizeSlider.set_visible(False) if not row[EDITABLE_COL]: return # If the selected filesystem does not support shrinking, make that # button insensitive. self._shrinkButton.set_sensitive(device.resizable) self._setup_slider(device, row[RESIZE_TARGET_COL]) # Then, disable the button for whatever action is currently selected. # It doesn't make a lot of sense to allow clicking that. if row[ACTION_COL] == _(PRESERVE): self._preserveButton.set_sensitive(False) elif row[ACTION_COL] == _(SHRINK): self._shrinkButton.set_sensitive(False) self._resizeSlider.set_visible(True) elif row[ACTION_COL] == _(DELETE): self._deleteButton.set_sensitive(False) def _update_reclaim_button(self, got): # The reclaim button is sensitive if two conditions are met: # (1) There's enough available space (existing free/unpartitioned space, # shrink space, etc.) on all disks. # (2) At least one destructive action has been chosen. We can detect # this by checking whether got is non-zero. need = self.payload.spaceRequired self._resizeButton.set_sensitive(got+self._initialFreeSpace >= need and got > Size(0)) def refresh(self, disks): super(ResizeDialog, self).refresh() # clear out the store and repopulate it from the devicetree self._diskStore.clear() self.populate(disks) self._view.expand_all() def run(self): rc = self.window.run() self.window.destroy() return rc # Signal handlers. def _sumReclaimableSpace(self, model, path, itr, *args): (editable, action, ident, targetSize) = model.get(itr, EDITABLE_COL, ACTION_COL, DEVICE_ID_COL, RESIZE_TARGET_COL) if not editable: return False device = self.storage.devicetree.getDeviceByID(ident) if action == _(PRESERVE): return False if action == _(SHRINK): self._selectedReclaimableSpace += device.size - targetSize elif action == _(DELETE): self._selectedReclaimableSpace += device.size return False def on_preserve_clicked(self, button): self._actionChanged(PRESERVE) def on_shrink_clicked(self, button): self._actionChanged(SHRINK) def on_delete_clicked(self, button): self._actionChanged(DELETE) def _actionChanged(self, newAction): selection = self.builder.get_object("diskView-selection") (model, itr) = selection.get_selected() if not itr: return # Handle the row selected when a button was pressed. selectedRow = self._diskStore[itr] selectedRow[ACTION_COL] = _(newAction) # If that row is a disk header, we need to process all the partitions # it contains. device = self.storage.devicetree.getDeviceByID(selectedRow[DEVICE_ID_COL]) if device.isDisk and device.partitioned: partItr = model.iter_children(itr) while partItr: self._diskStore[partItr][ACTION_COL] = _(newAction) # If the user marked a whole disk for deletion, they can't go in and # un-delete partitions under it. if newAction == DELETE: self._diskStore[partItr][EDITABLE_COL] = False elif newAction == PRESERVE: part = self.storage.devicetree.getDeviceByID(self._diskStore[partItr][DEVICE_ID_COL]) self._diskStore[partItr][EDITABLE_COL] = not part.protected partItr = model.iter_next(partItr) # And then we're keeping a running tally of how much space the user # has selected to reclaim, so reflect that in the UI. self._selectedReclaimableSpace = 0 self._diskStore.foreach(self._sumReclaimableSpace, None) self._update_labels(selectedReclaimable=self._selectedReclaimableSpace) self._update_reclaim_button(Size(spec="%s MB" % self._selectedReclaimableSpace)) self._update_action_buttons(selectedRow) def _scheduleActions(self, model, path, itr, *args): (editable, action, ident, target) = model.get(itr, EDITABLE_COL, ACTION_COL, DEVICE_ID_COL, RESIZE_TARGET_COL) device = self.storage.devicetree.getDeviceByID(ident) if not editable: return False if action == _(PRESERVE): return False elif action == _(SHRINK): if device.resizable: self.storage.resizeDevice(device, target) else: self.storage.recursiveRemove(device) elif action == _(DELETE): self.storage.recursiveRemove(device) return False def on_resize_clicked(self, *args): self._diskStore.foreach(self._scheduleActions, None) def on_row_clicked(self, view, path, column): # This handles when the user clicks on a row in the view. We use it # only for expanding/collapsing disk headers. if view.row_expanded(path): view.collapse_row(path) else: view.expand_row(path, True) def on_selection_changed(self, selection): # This handles when the selection changes. It's very similar to what # on_row_clicked above does, but this handler only deals with changes in # selection. Thus, clicking on a disk header to collapse it and then # immediately clicking on it again to expand it would not work when # dealt with here. (model, itr) = selection.get_selected() if not itr: return self._update_action_buttons(self._diskStore[itr]) def on_resize_value_changed(self, rng): selection = self.builder.get_object("diskView-selection") (model, itr) = selection.get_selected() # Update the target size in the store. model[itr][RESIZE_TARGET_COL] = rng.get_value() # Update the "Total selected space" label. delta = rng.get_adjustment().get_upper()-rng.get_value() self._update_labels(selectedReclaimable=self._selectedReclaimableSpace+delta) # And then the reclaim button, in case they've made enough space. newTotal = self._selectedReclaimableSpace + delta self._update_reclaim_button(Size(spec="%s MB" % newTotal)) def resize_slider_format(self, scale, value): # This makes the value displayed under the slider prettier than just a # single number. return size_str(value)
gpl-2.0
7,598,323,766,163,763,000
41.629187
122
0.590662
false
katekim/stellarya
src/stellarya/Preferences.py
1
1812
import os import yaml from PyQt4.QtCore import * import stellarya class Preferences(QObject): changed = pyqtSignal(str) def __init__(self): QObject.__init__(self) self._data = {} @property def _cfgpath(self): return os.path.join(stellarya._.confdir, "stellarya.cfg") def load(self): self._data = yaml.load( stellarya._.resourceLoader.getfp("default.yaml")) if not os.path.exists(self._cfgpath): return try: existingData = yaml.load(open(self._cfgpath)) except: stellarya._.notifier.abort("""\ Your preference data seems to be collapsed. Check the preference file or delete it if you want to start with default preferences. %s """ % self._cfgpath) for k, v in existingData.items(): self._data[k] = v def save(self): try: yaml.dump(self._data, open(self._cfgpath, "w"), default_flow_style=False, allow_unicode=True) except: stellarya._.notifier.exc( "Failed to save preferences data to %s." % self._cfgpath) def emitAll(self): for key in self._data: self.changed.emit(key) def __getitem__(self, sKey): return self._data[sKey] def __setitem__(self, sKey, value): if sKey not in self._data: stellarya._.notifier.syserror( "%s is not a valid preference key." % sKey) if type(value) not in (int, long, float, str, unicode, tuple, list, dict): stellarya._.notifier.syserror( "%s of type %s is not a valid type." % (sKey, type(sKey))) self._data[sKey] = value self.save() self.changed.emit(sKey)
mit
7,850,103,655,720,551,000
25.26087
85
0.551876
false
Teagan42/home-assistant
homeassistant/components/fan/__init__.py
1
5555
"""Provides functionality to interact with fans.""" from datetime import timedelta import functools as ft import logging from typing import Optional import voluptuous as vol from homeassistant.const import SERVICE_TOGGLE, SERVICE_TURN_OFF, SERVICE_TURN_ON import homeassistant.helpers.config_validation as cv from homeassistant.helpers.config_validation import ( # noqa: F401 PLATFORM_SCHEMA, PLATFORM_SCHEMA_BASE, ) from homeassistant.helpers.entity import ToggleEntity from homeassistant.helpers.entity_component import EntityComponent from homeassistant.loader import bind_hass _LOGGER = logging.getLogger(__name__) DOMAIN = "fan" SCAN_INTERVAL = timedelta(seconds=30) ENTITY_ID_FORMAT = DOMAIN + ".{}" # Bitfield of features supported by the fan entity SUPPORT_SET_SPEED = 1 SUPPORT_OSCILLATE = 2 SUPPORT_DIRECTION = 4 SERVICE_SET_SPEED = "set_speed" SERVICE_OSCILLATE = "oscillate" SERVICE_SET_DIRECTION = "set_direction" SPEED_OFF = "off" SPEED_LOW = "low" SPEED_MEDIUM = "medium" SPEED_HIGH = "high" DIRECTION_FORWARD = "forward" DIRECTION_REVERSE = "reverse" ATTR_SPEED = "speed" ATTR_SPEED_LIST = "speed_list" ATTR_OSCILLATING = "oscillating" ATTR_DIRECTION = "direction" PROP_TO_ATTR = { "speed": ATTR_SPEED, "oscillating": ATTR_OSCILLATING, "current_direction": ATTR_DIRECTION, } @bind_hass def is_on(hass, entity_id: str) -> bool: """Return if the fans are on based on the statemachine.""" state = hass.states.get(entity_id) return state.attributes[ATTR_SPEED] not in [SPEED_OFF, None] async def async_setup(hass, config: dict): """Expose fan control via statemachine and services.""" component = hass.data[DOMAIN] = EntityComponent( _LOGGER, DOMAIN, hass, SCAN_INTERVAL ) await component.async_setup(config) component.async_register_entity_service( SERVICE_TURN_ON, {vol.Optional(ATTR_SPEED): cv.string}, "async_turn_on" ) component.async_register_entity_service(SERVICE_TURN_OFF, {}, "async_turn_off") component.async_register_entity_service(SERVICE_TOGGLE, {}, "async_toggle") component.async_register_entity_service( SERVICE_SET_SPEED, {vol.Required(ATTR_SPEED): cv.string}, "async_set_speed", [SUPPORT_SET_SPEED], ) component.async_register_entity_service( SERVICE_OSCILLATE, {vol.Required(ATTR_OSCILLATING): cv.boolean}, "async_oscillate", [SUPPORT_OSCILLATE], ) component.async_register_entity_service( SERVICE_SET_DIRECTION, {vol.Optional(ATTR_DIRECTION): cv.string}, "async_set_direction", [SUPPORT_DIRECTION], ) return True async def async_setup_entry(hass, entry): """Set up a config entry.""" return await hass.data[DOMAIN].async_setup_entry(entry) async def async_unload_entry(hass, entry): """Unload a config entry.""" return await hass.data[DOMAIN].async_unload_entry(entry) class FanEntity(ToggleEntity): """Representation of a fan.""" def set_speed(self, speed: str) -> None: """Set the speed of the fan.""" raise NotImplementedError() async def async_set_speed(self, speed: str): """Set the speed of the fan.""" if speed is SPEED_OFF: await self.async_turn_off() else: await self.hass.async_add_job(self.set_speed, speed) def set_direction(self, direction: str) -> None: """Set the direction of the fan.""" raise NotImplementedError() async def async_set_direction(self, direction: str): """Set the direction of the fan.""" await self.hass.async_add_job(self.set_direction, direction) # pylint: disable=arguments-differ def turn_on(self, speed: Optional[str] = None, **kwargs) -> None: """Turn on the fan.""" raise NotImplementedError() # pylint: disable=arguments-differ async def async_turn_on(self, speed: Optional[str] = None, **kwargs): """Turn on the fan.""" if speed is SPEED_OFF: await self.async_turn_off() else: await self.hass.async_add_job(ft.partial(self.turn_on, speed, **kwargs)) def oscillate(self, oscillating: bool) -> None: """Oscillate the fan.""" pass async def async_oscillate(self, oscillating: bool): """Oscillate the fan.""" await self.hass.async_add_job(self.oscillate, oscillating) @property def is_on(self): """Return true if the entity is on.""" return self.speed not in [SPEED_OFF, None] @property def speed(self) -> Optional[str]: """Return the current speed.""" return None @property def speed_list(self) -> list: """Get the list of available speeds.""" return [] @property def current_direction(self) -> Optional[str]: """Return the current direction of the fan.""" return None @property def capability_attributes(self): """Return capabilitiy attributes.""" return {ATTR_SPEED_LIST: self.speed_list} @property def state_attributes(self) -> dict: """Return optional state attributes.""" data = {} for prop, attr in PROP_TO_ATTR.items(): if not hasattr(self, prop): continue value = getattr(self, prop) if value is not None: data[attr] = value return data @property def supported_features(self) -> int: """Flag supported features.""" return 0
apache-2.0
6,271,439,153,283,638,000
27.782383
84
0.646445
false
aselle/tensorflow
tensorflow/python/keras/engine/training_utils.py
1
37405
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Training-related utilities. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import math import numpy as np from tensorflow.python.data.ops import dataset_ops from tensorflow.python.data.ops import iterator_ops from tensorflow.python.eager import context from tensorflow.python.framework import constant_op from tensorflow.python.framework import tensor_util from tensorflow.python.keras import backend as K from tensorflow.python.keras import losses from tensorflow.python.keras import metrics as metrics_module from tensorflow.python.ops import array_ops from tensorflow.python.ops import math_ops from tensorflow.python.ops import weights_broadcast_ops def _map_nested(data, func): """Maps each nested element using func.""" if isinstance(data, list): return [_map_nested(nested_data, func) for nested_data in data] elif isinstance(data, tuple): return tuple(_map_nested(nested_data, func) for nested_data in data) elif isinstance(data, dict): return { k: _map_nested(nested_data, func) for k, nested_data in data.items() } else: return func(data) def _nested_all(data, cond_func): """Checks if all elements in a nested structure satisfy cond_func.""" if isinstance(data, (tuple, list)): return all([_nested_all(nested_data, cond_func) for nested_data in data]) elif isinstance(data, dict): return all( [_nested_all(nested_data, cond_func) for nested_data in data.values()]) else: return cond_func(data) def _nested_any(data, cond_func): """Checks if any nested_elements in a nested structure satisfy cond_func.""" if isinstance(data, (tuple, list)): return any([_nested_any(nested_data, cond_func) for nested_data in data]) elif isinstance(data, dict): return any( [_nested_any(nested_data, cond_func) for nested_data in data.values()]) else: return cond_func(data) def _convert_lists_to_tuples(data): """Converts all lists to tuples, since Datasets expect tuples.""" if isinstance(data, (tuple, list)): return tuple(_convert_lists_to_tuples(nested_data) for nested_data in data) elif isinstance(data, dict): return { k: _convert_lists_to_tuples(nested_data) for k, nested_data in data.items() } else: return data def _get_batch_axis_size(data): """Returns batch axis shape for nested data.""" if isinstance(data, (tuple, list)): return _get_batch_axis_size(data[0]) elif isinstance(data, dict): return _get_batch_axis_size(list(data.values())) else: return int(data.shape[0]) def convert_to_iterator(x=None, y=None, sample_weights=None, batch_size=None, steps_per_epoch=None, epochs=1, shuffle=False): """Converts NumPy arrays or EagerTensors to an EagerIterator. Combines all provided data into a single EagerIterator. Arguments: x: NumPy array or EagerTensor, or list of Numpy arrays or EagerTensors representing inputs to a model. y: Optional. NumPy array or EagerTensor, or list of Numpy arrays or EagerTensors representing targets of a model. sample_weights: Optional NumPy array or EagerTensor representing sample weights. batch_size: Used to batch data and calculate how many steps EagerIterator should take per epoch. steps_per_epoch: If provided, how many steps EagerIterator should take per epoch. epochs: Epochs to repeat iterator for. shuffle: Whether to shuffle data after each epoch. Raises: ValueError: if steps_per_epoch cannot be calculated from the data provided. Returns: (Iterator, steps_per_epoch). """ if isinstance(x, iterator_ops.EagerIterator): return x, steps_per_epoch if not _nested_any(sample_weights, lambda x: x is None): data = (x, y, sample_weights) elif not _nested_any(y, lambda x: x is None): data = (x, y) else: # always wrap in a tuple, so we know y, sample_weights weren't set # even when x has multiple elements data = (x,) data = _convert_lists_to_tuples(data) if steps_per_epoch is None and batch_size is not None: num_samples = _get_batch_axis_size(data) steps_per_epoch = int(math.ceil(num_samples / batch_size)) if steps_per_epoch is None: raise ValueError('Could not determine steps_per_epoch.' 'Please provide either batch_size or' 'steps_per_epoch.') # TODO(omalleyt) for NumPy arrays in graph mode # placeholder ops should be used # this is only ideal for eager mode dataset = dataset_ops.Dataset.from_tensor_slices(data) if batch_size is not None: dataset = dataset.batch(batch_size) if shuffle: dataset = dataset.shuffle(buffer_size=10000) dataset = dataset.repeat(epochs) iterator = dataset.make_one_shot_iterator() return iterator, steps_per_epoch def check_num_samples(ins, batch_size=None, steps=None, steps_name='steps'): """Determine the number of samples provided for training and evaluation. The number of samples is not defined when running with `steps`, in which case the number of samples is set to `None`. Arguments: ins: List of tensors to be fed to the Keras function. batch_size: Integer batch size or `None` if not defined. steps: Total number of steps (batches of samples) before declaring `_predict_loop` finished. Ignored with the default value of `None`. steps_name: The public API's parameter name for `steps`. Raises: ValueError: when `steps` is `None` and the attribute `ins.shape` does not exist. Also raises ValueError when `steps` is not `None` and `batch_size` is not `None` because they are mutually exclusive. Returns: When steps is `None`, returns the number of samples to be processed based on the size of the first dimension of the first input numpy array. When steps is not `None` and `batch_size` is `None`, returns `None`. Raises: ValueError: In case of invalid arguments. """ if steps is not None and batch_size is not None: raise ValueError( 'If ' + steps_name + ' is set, the `batch_size` must be None.') if check_steps_argument(ins, steps, steps_name): return None if hasattr(ins[0], 'shape'): return int(ins[0].shape[0]) return None # Edge case where ins == [static_learning_phase] def standardize_single_array(x): if x is None: return None elif tensor_util.is_tensor(x): return x elif x.ndim == 1: x = np.expand_dims(x, 1) return x def standardize_input_data(data, names, shapes=None, check_batch_axis=True, exception_prefix=''): """Normalizes inputs and targets provided by users. Users may pass data as a list of arrays, dictionary of arrays, or as a single array. We normalize this to an ordered list of arrays (same order as `names`), while checking that the provided arrays have shapes that match the network's expectations. Arguments: data: User-provided input data (polymorphic). names: List of expected array names. shapes: Optional list of expected array shapes. check_batch_axis: Boolean; whether to check that the batch axis of the arrays matches the expected value found in `shapes`. exception_prefix: String prefix used for exception formatting. Returns: List of standardized input arrays (one array per model input). Raises: ValueError: in case of improperly formatted user-provided data. """ if not names: if data is not None and hasattr(data, '__len__') and len(data): raise ValueError('Error when checking model ' + exception_prefix + ': ' 'expected no data, but got:', data) return [] if data is None: return [None for _ in range(len(names))] if isinstance(data, dict): try: data = [ data[x].values if data[x].__class__.__name__ == 'DataFrame' else data[x] for x in names ] except KeyError as e: raise ValueError('No data provided for "' + e.args[0] + '". Need data ' 'for each key in: ' + str(names)) elif isinstance(data, (list, tuple)): if isinstance(data[0], (list, tuple)): data = [np.asarray(d) for d in data] elif len(names) == 1 and isinstance(data[0], (float, int)): data = [np.asarray(data)] else: data = [ x.values if x.__class__.__name__ == 'DataFrame' else x for x in data ] else: data = data.values if data.__class__.__name__ == 'DataFrame' else data data = [data] data = [standardize_single_array(x) for x in data] if len(data) != len(names): if data and hasattr(data[0], 'shape'): raise ValueError('Error when checking model ' + exception_prefix + ': the list of Numpy arrays that you are passing to ' 'your model is not the size the model expected. ' 'Expected to see ' + str(len(names)) + ' array(s), ' 'but instead got the following list of ' + str(len(data)) + ' arrays: ' + str(data)[:200] + '...') elif len(names) > 1: raise ValueError( 'Error when checking model ' + exception_prefix + ': you are passing a list as input to your model, ' 'but the model expects a list of ' + str(len(names)) + ' Numpy arrays instead. The list you passed was: ' + str(data)[:200]) elif len(data) == 1 and not hasattr(data[0], 'shape'): raise TypeError('Error when checking model ' + exception_prefix + ': data should be a Numpy array, or list/dict of ' 'Numpy arrays. Found: ' + str(data)[:200] + '...') elif len(names) == 1: data = [np.asarray(data)] # Check shapes compatibility. if shapes: for i in range(len(names)): if shapes[i] is not None: if tensor_util.is_tensor(data[i]): tensorshape = data[i].get_shape() if not tensorshape: continue data_shape = tuple(tensorshape.as_list()) else: data_shape = data[i].shape shape = shapes[i] if len(data_shape) != len(shape): raise ValueError('Error when checking ' + exception_prefix + ': expected ' + names[i] + ' to have ' + str(len(shape)) + ' dimensions, but got array ' 'with shape ' + str(data_shape)) if not check_batch_axis: data_shape = data_shape[1:] shape = shape[1:] for dim, ref_dim in zip(data_shape, shape): if ref_dim != dim and ref_dim is not None and dim is not None: raise ValueError( 'Error when checking ' + exception_prefix + ': expected ' + names[i] + ' to have shape ' + str(shape) + ' but got array with shape ' + str(data_shape)) return data def standardize_sample_or_class_weights(x_weight, output_names, weight_type): """Maps `sample_weight` or `class_weight` to model outputs. Arguments: x_weight: User-provided `sample_weight` or `class_weight` argument. output_names: List of output names (strings) in the model. weight_type: A string used purely for exception printing. Returns: A list of `sample_weight` or `class_weight` where there are exactly one element per model output. Raises: ValueError: In case of invalid user-provided argument. """ if x_weight is None or len(x_weight) == 0: # pylint: disable=g-explicit-length-test return [None for _ in output_names] if len(output_names) == 1: if isinstance(x_weight, list) and len(x_weight) == 1: return x_weight if isinstance(x_weight, dict) and output_names[0] in x_weight: return [x_weight[output_names[0]]] else: return [x_weight] if isinstance(x_weight, list): if len(x_weight) != len(output_names): raise ValueError('Provided `' + weight_type + '` was a list of ' + str(len(x_weight)) + ' elements, but the model has ' + str(len(output_names)) + ' outputs. ' 'You should provide one `' + weight_type + '`' 'array per model output.') return x_weight if isinstance(x_weight, dict): x_weights = [] for name in output_names: x_weights.append(x_weight.get(name)) return x_weights else: raise TypeError( 'The model has multiple outputs, so `' + weight_type + '` ' 'should be either a list or a dict. ' 'Provided `' + weight_type + '` type not understood: ' + str(x_weight)) def standardize_class_weights(class_weight, output_names): return standardize_sample_or_class_weights(class_weight, output_names, 'class_weight') def standardize_sample_weights(sample_weight, output_names): return standardize_sample_or_class_weights(sample_weight, output_names, 'sample_weight') def check_array_lengths(inputs, targets, weights=None): """Does user input validation for numpy arrays. Arguments: inputs: list of Numpy arrays of inputs. targets: list of Numpy arrays of targets. weights: list of Numpy arrays of sample weights. Raises: ValueError: in case of incorrectly formatted data. """ def set_of_lengths(x): # Returns a set with the variation between # different shapes, with None => 0 if x is None: return {} else: return set([y.shape[0] for y in x if y is not None and not tensor_util.is_tensor(y)]) set_x = set_of_lengths(inputs) set_y = set_of_lengths(targets) set_w = set_of_lengths(weights) if len(set_x) > 1: raise ValueError('All input arrays (x) should have ' 'the same number of samples. Got array shapes: ' + str([x.shape for x in inputs])) if len(set_y) > 1: raise ValueError('All target arrays (y) should have ' 'the same number of samples. Got array shapes: ' + str([y.shape for y in targets])) if set_x and set_y and list(set_x)[0] != list(set_y)[0]: raise ValueError('Input arrays should have ' 'the same number of samples as target arrays. ' 'Found ' + str(list(set_x)[0]) + ' input samples ' 'and ' + str(list(set_y)[0]) + ' target samples.') if len(set_w) > 1: raise ValueError('All sample_weight arrays should have ' 'the same number of samples. Got array shapes: ' + str([w.shape for w in weights])) if set_y and set_w and list(set_y)[0] != list(set_w)[0]: raise ValueError('Sample_weight arrays should have ' 'the same number of samples as target arrays. Got ' + str(list(set_y)[0]) + ' input samples and ' + str(list(set_w)[0]) + ' target samples.') def check_loss_and_target_compatibility(targets, loss_fns, output_shapes): """Does validation on the compatibility of targets and loss functions. This helps prevent users from using loss functions incorrectly. This check is purely for UX purposes. Arguments: targets: list of Numpy arrays of targets. loss_fns: list of loss functions. output_shapes: list of shapes of model outputs. Raises: ValueError: if a loss function or target array is incompatible with an output. """ key_losses = { losses.mean_squared_error, losses.binary_crossentropy, losses.categorical_crossentropy } for y, loss, shape in zip(targets, loss_fns, output_shapes): if y is None or loss is None or tensor_util.is_tensor(y): continue if loss is losses.categorical_crossentropy: if y.shape[-1] == 1: raise ValueError('You are passing a target array of shape ' + str( y.shape) + ' while using as loss `categorical_crossentropy`. ' '`categorical_crossentropy` expects ' 'targets to be binary matrices (1s and 0s) ' 'of shape (samples, classes). ' 'If your targets are integer classes, ' 'you can convert them to the expected format via:\n' '```\n' 'from keras.utils import to_categorical\n' 'y_binary = to_categorical(y_int)\n' '```\n' '\n' 'Alternatively, you can use the loss function ' '`sparse_categorical_crossentropy` instead, ' 'which does expect integer targets.') if loss in key_losses: for target_dim, out_dim in zip(y.shape[1:], shape[1:]): if out_dim is not None and target_dim != out_dim: raise ValueError('A target array with shape ' + str(y.shape) + ' was passed for an output of shape ' + str(shape) + ' while using as loss `' + loss.__name__ + '`. ' 'This loss expects ' 'targets to have the same shape ' 'as the output.') def collect_metrics(metrics, output_names): """Maps metric functions to model outputs. Arguments: metrics: a list or dict of metric functions. output_names: a list of the names (strings) of model outputs. Returns: A list (one entry per model output) of lists of metric functions. For instance, if the model has 2 outputs, and for the first output we want to compute "binary_accuracy" and "binary_crossentropy", and just "binary_accuracy" for the second output, the list would look like: `[[binary_accuracy, binary_crossentropy], [binary_accuracy]]` Raises: TypeError: if an incorrect type is passed for the `metrics` argument. """ if not metrics: return [[] for _ in output_names] if isinstance(metrics, list): # we then apply all metrics to all outputs. return [copy.copy(metrics) for _ in output_names] elif isinstance(metrics, dict): nested_metrics = [] for name in output_names: output_metrics = metrics.get(name, []) if not isinstance(output_metrics, list): output_metrics = [output_metrics] nested_metrics.append(output_metrics) return nested_metrics else: raise TypeError('Type of `metrics` argument not understood. ' 'Expected a list or dictionary, found: ' + str(metrics)) def batch_shuffle(index_array, batch_size): """Shuffles an array in a batch-wise fashion. Useful for shuffling HDF5 arrays (where one cannot access arbitrary indices). Arguments: index_array: array of indices to be shuffled. batch_size: integer. Returns: The `index_array` array, shuffled in a batch-wise fashion. """ batch_count = int(len(index_array) / batch_size) # to reshape we need to be cleanly divisible by batch size # we stash extra items and reappend them after shuffling last_batch = index_array[batch_count * batch_size:] index_array = index_array[:batch_count * batch_size] index_array = index_array.reshape((batch_count, batch_size)) np.random.shuffle(index_array) index_array = index_array.flatten() return np.append(index_array, last_batch) def weighted_masked_objective(fn): """Adds support for masking and sample-weighting to an objective function. It transforms an objective function `fn(y_true, y_pred)` into a sample-weighted, cost-masked objective function `fn(y_true, y_pred, weights, mask)`. Arguments: fn: The objective function to wrap, with signature `fn(y_true, y_pred)`. Returns: A function with signature `fn(y_true, y_pred, weights, mask)`. """ if fn is None: return None def weighted(y_true, y_pred, weights, mask=None): """Wrapper function. Arguments: y_true: `y_true` argument of `fn`. y_pred: `y_pred` argument of `fn`. weights: Weights tensor. mask: Mask tensor. Returns: Scalar tensor. """ # score_array has ndim >= 2 score_array = fn(y_true, y_pred) if mask is not None: # Cast the mask to floatX to avoid float64 upcasting in theano mask = math_ops.cast(mask, K.floatx()) # mask should have the same shape as score_array score_array *= mask # the loss per batch should be proportional # to the number of unmasked samples. score_array /= K.mean(mask) # Apply sample weighting. if weights is not None: # Update dimensions of weights to match with values if possible. score_array, _, weights = metrics_module.squeeze_or_expand_dimensions( score_array, None, weights) try: # Broadcast weights if possible. weights = weights_broadcast_ops.broadcast_weights(weights, score_array) except ValueError: # Reduce values to same ndim as weight array. ndim = K.ndim(score_array) weight_ndim = K.ndim(weights) score_array = K.mean(score_array, axis=list(range(weight_ndim, ndim))) score_array = math_ops.multiply(score_array, weights) score_array = math_ops.reduce_sum(score_array) weights = math_ops.reduce_sum(weights) score_array = metrics_module.safe_div(score_array, weights) return K.mean(score_array) return weighted def standardize_weights(y, sample_weight=None, class_weight=None, sample_weight_mode=None): """Performs sample weight validation and standardization. Everything gets normalized to a single sample-wise (or timestep-wise) weight array. Arguments: y: Numpy array of model targets to be weighted. sample_weight: User-provided `sample_weight` argument. class_weight: User-provided `class_weight` argument. sample_weight_mode: One of `None` or `"temporal"`. `"temporal"` indicated that we expect 2D weight data that will be applied to the last 2 dimensions of the targets (i.e. we are weighting timesteps, not samples). Returns: A numpy array of target weights, one entry per sample to weight. Raises: ValueError: In case of invalid user-provided arguments. """ # Iterator may return sample_weight as 1-tuple if isinstance(sample_weight, tuple): sample_weight = sample_weight[0] if sample_weight_mode is not None: if sample_weight_mode != 'temporal': raise ValueError('"sample_weight_mode ' 'should be None or "temporal". ' 'Found: ' + str(sample_weight_mode)) if len(y.shape) < 3: raise ValueError('Found a sample_weight array for ' 'an input with shape ' + str(y.shape) + '. ' 'Timestep-wise sample weighting (use of ' 'sample_weight_mode="temporal") is restricted to ' 'outputs that are at least 3D, i.e. that have ' 'a time dimension.') if sample_weight is not None and len(sample_weight.shape) != 2: raise ValueError('Found a sample_weight array with shape ' + str(sample_weight.shape) + '. ' 'In order to use timestep-wise sample weighting, ' 'you should pass a 2D sample_weight array.') else: if sample_weight is not None and len(sample_weight.shape) != 1: raise ValueError('Found a sample_weight array with shape ' + str(sample_weight.shape) + '. ' 'In order to use timestep-wise sample weights, ' 'you should specify ' 'sample_weight_mode="temporal" ' 'in compile(). If you just mean to use ' 'sample-wise weights, make sure your ' 'sample_weight array is 1D.') if sample_weight is not None: if len(sample_weight.shape) > len(y.shape): raise ValueError( 'Found a sample_weight with shape' + str(sample_weight.shape) + '.' 'Expected sample_weight with rank ' 'less than or equal to ' + str(len(y.shape))) if y.shape[:sample_weight.ndim] != sample_weight.shape: raise ValueError( 'Found a sample_weight array with shape ' + str(sample_weight.shape) + ' for an input with shape ' + str(y.shape) + '. ' 'sample_weight cannot be broadcast.') return sample_weight elif isinstance(class_weight, dict): if len(y.shape) > 2: raise ValueError('`class_weight` not supported for ' '3+ dimensional targets.') if y.shape[1] > 1: y_classes = np.argmax(y, axis=1) elif y.shape[1] == 1: y_classes = np.reshape(y, y.shape[0]) else: y_classes = y weights = np.asarray( [class_weight[cls] for cls in y_classes if cls in class_weight]) if len(weights) != len(y_classes): # subtract the sets to pick all missing classes existing_classes = set(y_classes) existing_class_weight = set(class_weight.keys()) raise ValueError('`class_weight` must contain all classes in the data.' ' The classes %s exist in the data but not in ' '`class_weight`.' % (existing_classes - existing_class_weight)) return weights else: return None def has_symbolic_tensors(ls): if context.executing_eagerly(): return False return has_tensors(ls) def has_tensors(ls): if isinstance(ls, (list, tuple)): return any(tensor_util.is_tensor(v) for v in ls) return tensor_util.is_tensor(ls) def populate_metric_names(model): for i in range(len(model.outputs)): metrics = model.nested_metrics[i] for metric in metrics: base_metric_name = get_metric_name(metric) add_metric_name(model, base_metric_name, i) def get_metric_name(metric, weighted=False): """Returns the metric name corresponding to the given metric input. Arguments: metric: Metric function name or reference. weighted: Boolean indicating if the given metric is weighted. Returns: a metric name. """ metric_name_prefix = 'weighted_' if weighted else '' if metric in ('accuracy', 'acc', 'crossentropy', 'ce'): if metric in ('accuracy', 'acc'): suffix = 'acc' elif metric in ('crossentropy', 'ce'): suffix = 'ce' metric_name = metric_name_prefix + suffix else: metric_fn = metrics_module.get(metric) # Get metric name as string if hasattr(metric_fn, 'name'): metric_name = metric_fn.name else: metric_name = metric_fn.__name__ metric_name = metric_name_prefix + metric_name return metric_name def get_metric_function(metric, output_shape=None, loss_fn=None): """Returns the metric function corresponding to the given metric input. Arguments: metric: Metric function name or reference. output_shape: The shape of the output that this metric will be calculated for. loss_fn: The loss function used. Returns: The metric function. """ if metric in ['accuracy', 'acc']: if output_shape[-1] == 1 or loss_fn == losses.binary_crossentropy: return metrics_module.binary_accuracy # case: binary accuracy elif loss_fn == losses.sparse_categorical_crossentropy: # case: categorical accuracy with sparse targets return metrics_module.sparse_categorical_accuracy return metrics_module.categorical_accuracy # case: categorical accuracy elif metric in ['crossentropy', 'ce']: if output_shape[-1] == 1 or loss_fn == losses.binary_crossentropy: return metrics_module.binary_crossentropy # case: binary cross-entropy elif loss_fn == losses.sparse_categorical_crossentropy: # case: categorical cross-entropy with sparse targets return metrics_module.sparse_categorical_crossentropy # case: categorical cross-entropy return metrics_module.categorical_crossentropy return metrics_module.get(metric) def add_metric_name(model, metric_name, index): """Makes the metric name unique and adds it to the model's metric name list. If there are multiple outputs for which the metrics are calculated, the metric names have to be made unique by appending an integer. Arguments: model: Model to which we are adding metric names. metric_name: Metric name that corresponds to the metric specified by the user. For example: 'acc' index: The index of the model output for which the metric name is being added. Returns: string, name of the model's unique metric name """ if len(model.output_names) > 1: metric_name = '%s_%s' % (model.output_names[index], metric_name) j = 1 base_metric_name = metric_name while metric_name in model.metrics_names: metric_name = '%s_%d' % (base_metric_name, j) j += 1 model.metrics_names.append(metric_name) return metric_name def validate_iterator_input(x, y, sample_weight, validation_split=None): """Validates user input arguments when a dataset iterator is passed. Arguments: x: Input data. A `tf.data` dataset iterator. y: Target data. It could be either Numpy array(s) or TensorFlow tensor(s). Expected to be `None` when `x` is a dataset iterator. sample_weight: An optional sample-weight array passed by the user to weight the importance of each sample in `x`. Expected to be `None` when `x` is a dataset iterator validation_split: Float between 0 and 1. Fraction of the training data to be used as validation data. Expected to be `None` when `x` is a dataset iterator. Raises: ValueError: if argument `y` or `sample_weight` or `validation_split` are provided by user. """ if y is not None: raise ValueError('You passed a dataset or dataset iterator (%s) as ' 'input `x` to your model. In that case, you should ' 'not specify a target (`y`) argument, since the dataset ' 'or dataset iterator generates both input data and ' 'target data. ' 'Received: %s' % (x, y)) if sample_weight is not None: raise ValueError('`sample_weight` argument is not supported when input ' '`x` is a dataset or a dataset iterator. ' 'Received: x=%s, sample_weight=%s' % (x, sample_weight)) if validation_split is not None and validation_split != 0.0: raise ValueError( '`validation_split` argument is not supported when ' 'input `x` is a dataset or a dataset iterator. ' 'Received: x=%s, validation_split=%f' % (x, validation_split)) def check_steps_argument(input_data, steps, steps_name): """Validates `steps` argument based on input data's type. The cases when `steps` value must be provided are when 1. input data passed is an iterator. 2. model was built on top of symbolic tensors, input data is not required and is `None`. 3. input data passed is a symbolic tensor. Arguments: input_data: Input data. Can be Numpy array(s) or TensorFlow tensor(s) or tf.data.Dataset iterator or `None`. steps: Integer or `None`. Total number of steps (batches of samples) to execute. steps_name: The public API's parameter name for `steps`. Returns: boolean, True if `steps` argument is required, else False. Raises: ValueError: if `steps` argument is required for given input data type but not provided. """ is_x_iterator = ( isinstance(input_data, iterator_ops.Iterator) or isinstance(input_data, iterator_ops.EagerIterator)) if (input_data is None or is_x_iterator or has_symbolic_tensors(input_data) or (isinstance(input_data, list) and not input_data)): if steps is None: input_type_str = 'iterators' if is_x_iterator else 'data tensors' raise ValueError('When using {input_type} as input to a model, you should' ' specify the `{steps_name}` argument.'.format( input_type=input_type_str, steps_name=steps_name)) return True return False def cast_if_floating_dtype(x): """Casts the given data tensors to the default floating point type. Casts only if the input is already a floating point type. Args: x: tensor or list/tuple of tensors. Returns: Converted input. Raises: RuntimeError: if data isn't tensors. """ if not has_tensors(x): raise RuntimeError( 'Please provide tensors for casting, got: {x}'.format(x=x)) if isinstance(x, (list, tuple)): return [ math_ops.cast(val, dtype=K.floatx()) if tensor_util.is_tensor(val) and val.dtype.is_floating else val for val in x ] return math_ops.cast(x, dtype=K.floatx()) if x.dtype.is_floating else x def get_output_sample_weight_and_mode(skip_target_weighing_indices, sample_weight_mode, output_name, output_index): """Returns the sample weight and weight mode for a single output.""" if output_index in skip_target_weighing_indices: return None, None if sample_weight_mode == 'temporal': default_value = [[1.]] shape = [None, None] mode = 'temporal' else: default_value = [1.] shape = [None] mode = None if context.executing_eagerly(): weight = None else: weight = array_ops.placeholder_with_default( constant_op.constant(default_value, dtype=K.floatx()), shape=shape, name=output_name + '_sample_weights') return weight, mode def prepare_sample_weights(output_names, sample_weight_mode, skip_target_weighing_indices): """Prepares sample weights for the model. Args: output_names: List of model output names. sample_weight_mode: sample weight mode user input passed from compile API. skip_target_weighing_indices: Indices of output for which sample weights should be skipped. Returns: A pair of list of sample weights and sample weight modes (one for each output). Raises: ValueError: In case of invalid `sample_weight_mode` input. """ sample_weights = [] sample_weight_modes = [] if isinstance(sample_weight_mode, dict): unknown_output = set(sample_weight_mode.keys()) - set(output_names) if unknown_output: raise ValueError('Unknown entry in ' 'sample_weight_mode dictionary: "' + unknown_output + '". Only expected the following keys: ' + str(output_names)) for i, name in enumerate(output_names): if (i not in skip_target_weighing_indices and name not in sample_weight_mode): raise ValueError('Output missing from sample_weight_modes dictionary') weight, mode = get_output_sample_weight_and_mode( skip_target_weighing_indices, sample_weight_mode.get(name), name, i) sample_weights.append(weight) sample_weight_modes.append(mode) elif isinstance(sample_weight_mode, list): if len(sample_weight_mode) != len(output_names): raise ValueError('When passing a list as sample_weight_mode, ' 'it should have one entry per model output. ' 'The model has ' + str(len(output_names)) + ' outputs, but you passed ' + str(len(sample_weight_mode)) + 'sample_weight_modes') for i, name in enumerate(output_names): weight, mode = get_output_sample_weight_and_mode( skip_target_weighing_indices, sample_weight_mode[i], name, i) sample_weights.append(weight) sample_weight_modes.append(mode) else: for i, name in enumerate(output_names): weight, mode = get_output_sample_weight_and_mode( skip_target_weighing_indices, sample_weight_mode, name, i) sample_weights.append(weight) sample_weight_modes.append(mode) return sample_weights, sample_weight_modes
apache-2.0
-8,599,687,522,877,374,000
37.013211
86
0.626521
false
purpleidea/bash-tutor
examples/0.2/gitbisect/homework/tests/fibonacciTestCase2.py
1
2850
#!/usr/bin/python # -*- coding: utf-8 -*- """tests.fibonacciTestCase Model test case for adding tests into the automatic suite. To add a test case: 3) modify methods in the class, building your test case 4) edit this docstring to show the correct name and short description 5) test by running this file. will automatically run with main suite """ # Copyright (C) 2009-2010 James Shubin, McGill University # Written for McGill University by James Shubin <[email protected]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import os import sys import unittest # do some path magic so this can run anyhow from anywhere TESTNAME = os.path.splitext(os.path.basename(os.path.normpath(__file__)))[0] BASEPATH = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../')) sys.path.append(os.path.join(BASEPATH, 'src/')) __all__ = [TESTNAME] class fibonacciTestCase(unittest.TestCase): """see: http://www.research.att.com/~njas/sequences/A000045""" def setUp(self): """setup code that has to occur for each test*()""" import fibonacci self.f = fibonacci def testSimple1(self): """By definition.""" self.assertEqual(self.f.fib(0), 0) self.assertEqual(self.f.fib(1), 1) def testSimple2(self): """First five generated numbers.""" self.assertEqual(self.f.fib(2), 1) self.assertEqual(self.f.fib(3), 2) self.assertEqual(self.f.fib(4), 3) self.assertEqual(self.f.fib(5), 5) self.assertEqual(self.f.fib(6), 8) def testSimple3(self): """Randoms from OEIS database.""" self.assertEqual(self.f.fib(7), 13) self.assertEqual(self.f.fib(13), 233) def testInverse(self): """test with inverse function for n < 70.""" import math def fibinv(f): """works with n < 70.""" phi = (1 + 5**0.5) / 2 if f < 2: return f return int(round(math.log(f * 5**0.5) / math.log(phi))) # start with F3 because F2 and F1 cause it to be ambiguous # this gets slower and slower with a recursive function. for n in range(3, 69): self.assertEqual(fibinv(self.f.fib(n)), n) # group all tests into a suite suite = unittest.TestLoader().loadTestsFromTestCase(globals()[TESTNAME]) # if this file is run individually, then run these test cases if __name__ == '__main__': unittest.main()
agpl-3.0
567,258,592,141,781,250
32.529412
92
0.710877
false
stephanos/subvoc
web/routing.py
1
1967
import os import jinja2 from flask_json import as_json from web.routes.api_analysis import analysis_api from web.routes.api_search import search_api from web.routes.api_word import words_api from web.routes.bootstrap import bootstrap from web.routes.error import error from api.dictionary.wordnik import Wordnik from api.subtitle.opensubtitles import OpenSubtitles from api.poster.fanart import FanArt from domain.analyse import Analyser from domain.corpus import Corpus, CorpusDatabase from domain.load import Loader from domain.parse import Parser from domain.search import Searcher TEMPLATE_ROOT = 'templates' def create_routes(app): app.jinja_loader = jinja2.FileSystemLoader(os.path.join(os.getcwd(), TEMPLATE_ROOT)) opensubtitle_credentials = (app.config['OPENSUBTITLES_USER'], app.config['OPENSUBTITLES_PASS']) subtitle_api = OpenSubtitles(opensubtitle_credentials) fanart_key = app.config['FANART_TV_KEY'] poster_api = FanArt(fanart_key) wordnik_key = app.config['WORDNIK_KEY'] wordnik_api = Wordnik(wordnik_key) searcher = Searcher(subtitle_api, poster_api) corpus = Corpus(CorpusDatabase.FULL) loader = Loader(subtitle_api) parser = Parser() analyser = Analyser(loader, parser, corpus) @app.route('/') def home_route(): return bootstrap() @app.route('/m/<id>') def analysis_route(id): return bootstrap() @app.route('/m/<id>/w/<word>') def word_route(id, word): return bootstrap() @app.route('/error') def error_route(): return error() @app.route('/api/search/<query>') @as_json def search_api_route(query): return search_api(searcher, query) @app.route('/api/analysis/<id>') @as_json def analysis_api_route(id): return analysis_api(analyser, poster_api, id) @app.route('/api/words/<token>') @as_json def words_api_route(token): return words_api(wordnik_api, token)
mit
2,810,889,148,646,337,500
25.581081
99
0.695984
false
icisneros/uav_landing
OtherssCode/SmartCamera-master/vehicle_control.py
1
7922
#!/usr/bin/python import time import math from pymavlink import mavutil from droneapi.lib import VehicleMode, Location import sc_config from sc_video import sc_video from sc_logger import sc_logger """ This class encapsulates the vehicle and some commonly used controls via the DroneAPI """ ''' TODO: At rally point support to get get_landing() ''' class VehicleControl(object): def __init__(self): # add variable initialisation here self.api = None self.vehicle = None self.last_mode_call = 0 self.last_mode_state = 'STABILIZE' self.mode_update_rate = sc_config.config.get_float('vehicle control', 'mode_update_rate', 0.75) self.last_home_call = 0 self.last_home = None self.home_update_rate = sc_config.config.get_float('vehicle control', 'home_update_rate', 10) self.last_set_velocity = 0 self.vel_update_rate = sc_config.config.get_float('vehicle control', 'vel_update_rate', 0.1) # connect - connects to droneAPI. # because of scope issues the local_connect() must be called from the top level class def connect(self, api): # First get an instance of the API endpoint (the connect via web case will be similar) self.api = api # if we succesfully connect if not self.api is None: # get our vehicle (we assume the user is trying to control the virst vehicle attached to the GCS) self.vehicle = self.api.get_vehicles()[0] return #is_connected - are we connected to a DroneApi def is_connected(self): if (self.api is None) or (self.vehicle is None): return False return (not self.api.exit) #get_vehicle - returns the connected vehicle def get_vehicle(self): return self.vehicle # controlling_vehicle - return true if we have control of the vehicle def controlling_vehicle(self): if self.api is None: return False # we are active in guided mode if self.get_mode() == "GUIDED": return True else: return False # is_armed - returns arm status of vehicle def is_armed(self): return self.vehicle.armed # set_yaw - send condition_yaw mavlink command to vehicle so it points at specified heading (in degrees) def set_yaw(self, heading): # create the CONDITION_YAW command msg = self.vehicle.message_factory.mission_item_encode(0, 0, # target system, target component 0, # sequence mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT, # frame mavutil.mavlink.MAV_CMD_CONDITION_YAW, # command 2, # current - set to 2 to make it a guided command 0, # auto continue heading, 0, 0, 0, 0, 0, 0) # param 1 ~ 7 # send command to vehicle self.vehicle.send_mavlink(msg) self.vehicle.flush() # set_velocity - send nav_velocity command to vehicle to request it fly in specified direction def set_velocity(self, velocity_x, velocity_y, velocity_z): #only let commands through at 10hz if(time.time() - self.last_set_velocity) > self.vel_update_rate: self.last_set_velocity = time.time() # create the SET_POSITION_TARGET_LOCAL_NED command msg = self.vehicle.message_factory.set_position_target_local_ned_encode( 0, # time_boot_ms (not used) 0, 0, # target system, target component mavutil.mavlink.MAV_FRAME_LOCAL_NED, # frame 0x01C7, # type_mask (ignore pos | ignore acc) 0, 0, 0, # x, y, z positions (not used) velocity_x, velocity_y, velocity_z, # x, y, z velocity in m/s 0, 0, 0, # x, y, z acceleration (not used) 0, 0) # yaw, yaw_rate (not used) # send command to vehicle self.vehicle.send_mavlink(msg) self.vehicle.flush() sc_logger.text(sc_logger.AIRCRAFT, 'Sent Vx: {0}, Vy: {1}, Vz: {2}'.format(velocity_x,velocity_y,velocity_z)) #get_location - returns the lat, lon, alt of vehicle def get_location(self): return self.vehicle.location #get_attitude - returns pitch, roll, and yaw of vehicle def get_attitude(self): return self.vehicle.attitude #get_landing - get the landing location. Only supports home location def get_landing(self): return self.get_home(True) #get_home - get the home location for this mission def get_home(self, wait_for_arm = False): #wait unitl we are armed to grab the INITIAL home position. This will lock up the program. if(wait_for_arm and self.last_home is None): sc_logger.text(sc_logger.GENERAL, 'Waiting for intial home lock: Requires armed status....') while(self.vehicle.armed == False): time.sleep(0.3) sc_logger.text(sc_logger.GENERAL, 'Got valid intial home location') if(time.time() - self.last_home_call > self.home_update_rate): self.last_home_call = time.time() # download the vehicle waypoints mission_cmds = self.vehicle.commands mission_cmds.download() mission_cmds.wait_valid() # get the home lat and lon home_lat = mission_cmds[0].x home_lon = mission_cmds[0].y self.last_home = Location(home_lat,home_lon,0) return self.last_home #get_mode - get current mode of vehicle def get_mode(self): #limit how often we request the current mode if (time.time() - self.last_mode_call) > self.mode_update_rate: self.last_mode_call = time.time() self.last_mode = self.vehicle.mode.name return self.last_mode #set_mode - set the mode of the vehicle as long as we are in control def set_mode(self, mode): if self.controlling_vehicle(): self.vehicle.mode = VehicleMode(mode) self.vehicle.flush() return True return False # run - should be called repeatedly from parent def run(self): # return immediately if not connected if self.api is None: return # we are connected so iterate if self.controlling_vehicle(): # request vehicle to turn due east self.set_yaw(90) return # test - should be called to test this class from the simulator def test(self): # return immediately if not connected if self.api is None: return while not self.api.exit: # we are connected so iterate # control vehicle if self.controlling_vehicle(): # request vehicle to turn due east self.set_yaw(90) #self.set_velocity(200,0,0) print self.get_attitude() print self.get_location() # sleep so we don't consume too much CPU time.sleep(1.0) # create global object veh_control = VehicleControl() # if this is the parent class connect and run test if __name__ == "__builtin__": veh_control.connect(local_connect()) veh_control.test()
mit
958,851,344,772,216,300
37.086538
121
0.558697
false
djsegal/ahab_legacy_
pequod/createVectorLists.py
1
6291
# -*- coding: utf-8 -*- """ Created on Fri May 30 19:52:46 2014 @author: dan """ from getMultiCurVals import getMultiCurVals from readCurVectorInput import readCurVectorInput from readValue import readValue from copy import deepcopy def createVectorLists( standardVals , inputValues , inputModes , inputModeSet , constsList , constDependences , indepIndex , isFloat ) : # ========================================= # create the vectorLists --- AND --- # the vectorTypes that will be returned # as well as a variables that help it # ========================================= returnLists = [ [ ] ] returnTypes = [ [0] * len( inputModeSet ) ] deleteIndices = [ ] for runOfStdVals in standardVals : # ==================================== # check for runOfStdVal's existence, # then add all of its vals # to the entire set of lists # ==================================== if runOfStdVals: for curVal in runOfStdVals : for j in range( len( returnLists ) ) : returnLists[j].append( curVal ) # ====================================== # continue over empty inputValue lists # ====================================== if inputValues == [] : continue # ================================================= # because the pairing between the number of lists # is one-to-one or off-by-one in stdVals' favor, # current input information is just popped off # ================================================= curDeps = constDependences.pop(0) curVals = inputValues.pop(0) curMode = inputModes.pop(0) # =================================================== # get all possible combinations of the consts vals. # if there aren't any consts, create a variable # so that the algorithm still works for them # =================================================== ( multiCurVals , curTypesList , curConstModes ) = \ getMultiCurVals( \ curVals , curDeps , constsList ) # ======================================== # create new returnLists and returnTypes # ======================================== #------------------------ oldReturnLists = deepcopy( returnLists ) # make a deepcopy oldReturnTypes = deepcopy( returnTypes ) # of the original vars #------------------------ returnLists = [] # reset the vars so that returnTypes = [] # they can be rebuilt #------------------------ stopChange = False # prep for if there curModeList = [curMode] + curConstModes # are vecs with consts #------------------------ # ----------------------------------- # loop through multiCurVals. # note : for vecs without cons, # there's only one iteration # ----------------------------------- for ( i , aCurVals ) in enumerate ( multiCurVals ) : # ------------------------------------- # read in values for the curValueList # ------------------------------------- curValueList = readValue( [''.join(aCurVals)] , isFloat ) # ------------------------------------------ # ( 1 ) make a copy of the old return vars # ( 2 ) get tmp return vars using aCurVals # ( 3 ) add a copy of them to the new vars # ------------------------------------------ curReturnLists = deepcopy( oldReturnLists ) curReturnTypes = deepcopy( oldReturnTypes ) curDeleteIndices = readCurVectorInput( curReturnLists , curReturnTypes , curModeList , curValueList , inputModeSet , curTypesList[i] , stopChange ) returnLists += deepcopy( curReturnLists ) returnTypes += deepcopy( curReturnTypes ) # --------------------------------- # only change the indep index # once inside readCurVectorInputs # --------------------------------- if not stopChange and curMode == indepIndex : stopChange = True # ------------------------------------ # update the list of deleted indices # with the ones from the recent call # to readCurVectorInput # ------------------------------------ deleteIndices += curDeleteIndices # ----------------------------------------------------------- # don't include types that have: one element length vectors # or arent meant to be swept over # ----------------------------------------------------------- for curType in reversed( list( set( deleteIndices ) ) ) : inputModeSet.pop(curType) for i in range(len(returnTypes)): returnTypes[i].pop(curType) return ( returnLists , returnTypes )
apache-2.0
-3,726,841,644,481,246,700
40.394737
87
0.35368
false
jandom/rdkit
rdkit/Chem/Draw/UnitTestSimilarityMaps.py
1
7019
# $Id$ # # Copyright (c) 2013, Novartis Institutes for BioMedical Research Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of Novartis Institutes for BioMedical Research Inc. # nor the names of its contributors may be used to endorse or promote # products derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Created by Sereina Riniker, Aug 2013 """ unit testing code for molecule drawing """ from __future__ import print_function from rdkit import RDConfig import unittest, os, tempfile from rdkit import Chem from rdkit.Chem import Draw import platform if platform.system() == "Linux": import os, sys if not os.environ.get("DISPLAY", None): try: # Force matplotlib to not use any Xwindows backend. import matplotlib print("Forcing use of Agg renderer", file=sys.stderr) matplotlib.use('Agg') except ImportError: pass try: from rdkit.Chem.Draw import SimilarityMaps as sm except ImportError: sm = None from rdkit.RDLogger import logger logger = logger() class TestCase(unittest.TestCase): def setUp(self): self.mol1 = Chem.MolFromSmiles('c1ccccc1') self.mol2 = Chem.MolFromSmiles('c1ccncc1') def testSimilarityMap(self): # Morgan2 BV refWeights = [0.5, 0.5, 0.5, -0.5, 0.5, 0.5] weights = sm.GetAtomicWeightsForFingerprint( self.mol1, self.mol2, lambda m, i: sm.GetMorganFingerprint(m, i, radius=2, fpType='bv')) for w, r in zip(weights, refWeights): self.assertEqual(w, r) fig, maxWeight = sm.GetSimilarityMapForFingerprint( self.mol1, self.mol2, lambda m, i: sm.GetMorganFingerprint(m, i, radius=2, fpType='bv')) self.assertEqual(maxWeight, 0.5) weights, maxWeight = sm.GetStandardizedWeights(weights) self.assertEqual(maxWeight, 0.5) refWeights = [1.0, 1.0, 1.0, -1.0, 1.0, 1.0] for w, r in zip(weights, refWeights): self.assertEqual(w, r) weights = sm.GetAtomicWeightsForFingerprint( self.mol1, self.mol2, lambda m, i: sm.GetMorganFingerprint(m, i, fpType='count')) self.assertTrue(weights[3] < 0) weights = sm.GetAtomicWeightsForFingerprint( self.mol1, self.mol2, lambda m, i: sm.GetMorganFingerprint(m, i, fpType='bv', useFeatures=True)) self.assertTrue(weights[3] < 0) # hashed AP BV refWeights = [0.09523, 0.17366, 0.17366, -0.23809, 0.17366, 0.17366] weights = sm.GetAtomicWeightsForFingerprint( self.mol1, self.mol2, lambda m, i: sm.GetAPFingerprint(m, i, fpType='bv', nBits=1024)) for w, r in zip(weights, refWeights): self.assertAlmostEqual(w, r, 4) weights = sm.GetAtomicWeightsForFingerprint( self.mol1, self.mol2, lambda m, i: sm.GetAPFingerprint(m, i, fpType='normal')) self.assertTrue(weights[3] < 0) weights = sm.GetAtomicWeightsForFingerprint( self.mol1, self.mol2, lambda m, i: sm.GetAPFingerprint(m, i, fpType='hashed')) self.assertTrue(weights[3] < 0) # hashed TT BV refWeights = [0.5, 0.5, -0.16666, -0.5, -0.16666, 0.5] weights = sm.GetAtomicWeightsForFingerprint( self.mol1, self.mol2, lambda m, i: sm.GetTTFingerprint(m, i, fpType='bv', nBits=1024, nBitsPerEntry=1)) for w, r in zip(weights, refWeights): self.assertAlmostEqual(w, r, 4) weights = sm.GetAtomicWeightsForFingerprint( self.mol1, self.mol2, lambda m, i: sm.GetTTFingerprint(m, i, fpType='normal')) self.assertTrue(weights[3] < 0) weights = sm.GetAtomicWeightsForFingerprint( self.mol1, self.mol2, lambda m, i: sm.GetTTFingerprint(m, i, fpType='hashed')) self.assertTrue(weights[3] < 0) # RDK fingerprint BV refWeights = [0.42105, 0.42105, 0.42105, -0.32895, 0.42105, 0.42105] weights = sm.GetAtomicWeightsForFingerprint( self.mol1, self.mol2, lambda m, i: sm.GetRDKFingerprint(m, i, nBits=1024, nBitsPerHash=1)) for w, r in zip(weights, refWeights): self.assertAlmostEqual(w, r, 4) def testSimilarityMapKWArgs(self): # Morgan2 BV m1 = Chem.MolFromSmiles('CC[C@](F)(Cl)c1ccccc1') m2 = Chem.MolFromSmiles('CC[C@@](F)(Cl)c1ccccc1') weights = sm.GetAtomicWeightsForFingerprint( m1, m2, lambda m, i: sm.GetAPFingerprint(m, atomId=i, includeChirality=False)) for w in weights: self.assertAlmostEqual(w, 0.100, 4) weights = sm.GetAtomicWeightsForFingerprint( m1, m2, lambda m, i: sm.GetAPFingerprint(m, atomId=i, includeChirality=True)) for i, w in enumerate(weights): if i != 2: self.assertAlmostEqual(w, 0.098, 3) else: self.assertAlmostEqual(w, -0.082, 3) weights = sm.GetAtomicWeightsForFingerprint( m1, m2, lambda m, i: sm.GetTTFingerprint(m, atomId=i, includeChirality=False)) for w in weights: self.assertTrue(w > 0.0) weights = sm.GetAtomicWeightsForFingerprint( m1, m2, lambda m, i: sm.GetTTFingerprint(m, atomId=i, includeChirality=True)) for i, w in enumerate(weights): if i > 4: self.assertTrue(w > 0.0) else: self.assertTrue(w < 0.0) weights = sm.GetAtomicWeightsForFingerprint( m1, m2, lambda m, i: sm.GetMorganFingerprint(m, radius=1, atomId=i, useChirality=False)) weights2 = sm.GetAtomicWeightsForFingerprint( m1, m2, lambda m, i: sm.GetMorganFingerprint(m, radius=1, atomId=i, useChirality=True)) # testing explicit values here seems silly, just check that the contribution of the # chiral center drops: self.assertTrue(weights[2] > weights2[2]) if __name__ == '__main__': try: import matplotlib from rdkit.Chem.Draw.mplCanvas import Canvas except ImportError: pass except RuntimeError: # happens with GTK can't initialize pass else: unittest.main()
bsd-3-clause
-6,318,957,341,486,780,000
39.108571
96
0.69782
false
theetcher/fxpt
fxpt/fx_texture_manager/harvesters.py
1
2482
import maya.cmds as m from fxpt.fx_texture_manager import tex_node TEX_ATTRIBUTES = { 'file': [ 'fileTextureName' ], # 'mentalrayTexture': [ # 'fileTextureName' # ] } class HarvesterBase(object): def getTexNodes(self): raise NotImplementedError('Call to abstract method.') class MayaSceneHarvester(HarvesterBase): def getTexNodes(self): texNodes = [] for nodeType in TEX_ATTRIBUTES: for node in m.ls(l=True, typ=nodeType): for attr in TEX_ATTRIBUTES[nodeType]: if m.objExists('{}.{}'.format(node, attr)): texNodes.append(tex_node.TexNode(node, attr)) return texNodes class MayaSelectionHarvester(HarvesterBase): def __init__(self): self.tns = [] self.visited = set() # noinspection PySetFunctionToLiteral self.skipInRecursion = set(( 'transform', 'groupId' )) def getTexNodes(self): if self.tns: return self.tns for sg in self.getAssignedSGs(): self.tns.extend(self.findTextureNodes(sg)) return self.tns def findTextureNodes(self, node): self.visited.add(node) res = [] nodeType = m.nodeType(node) if nodeType in TEX_ATTRIBUTES: for attr in TEX_ATTRIBUTES[nodeType]: if m.objExists('{}.{}'.format(node, attr)): res.append(tex_node.TexNode(node, attr)) inConnections = list(set(m.listConnections(node, d=False, s=True) or [])) for srcNode in inConnections: if (m.nodeType(srcNode) not in self.skipInRecursion) and (srcNode not in self.visited): res.extend(self.findTextureNodes(srcNode)) return res def getAssignedSGs(self): selectedNodes = self.getSelectedNodes() assignedSgs = set() for sg in m.ls(typ='shadingEngine'): for member in (m.sets(sg, q=True) or []): if member.split('.')[0] in selectedNodes: assignedSgs.add(sg) break return assignedSgs # noinspection PyMethodMayBeStatic def getSelectedNodes(self): res = set(m.ls(sl=True, dag=True, ap=True)) for s in m.ls(sl=True): node = s.split('.')[0] res.add(node) res.update(m.listRelatives(node, shapes=True, pa=True) or []) return res
mit
-5,509,195,213,790,897,000
27.860465
99
0.568896
false
DeflatedPickle/Colony
colony/resource.py
1
2949
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """""" from colony.entities.attributes import Age, Health from colony.entities import Entity from colony.item import Item from colony.references import * __title__ = "Resource" __author__ = "DeflatedPickle" __version__ = "1.0.2" class Resource(Entity, Age, Health): """Creates a resource.""" def __init__(self, parent, name: str = "", health: float = 0.0, resource: Item = None, resource_amount: int = 0, type_: str = "", x: int = 0, y: int = 0): Entity.__init__(self, parent, x, y, entity_type="resource") Age.__init__(self, parent.time, 1, 0, -1) Health.__init__(self) self.parent = parent self.name = name self.health = health self.resource = resource self.resource_amount = resource_amount try: self.resource.amount = self.resource_amount except AttributeError: self.resource_amount = 0 self.type = type_ def mark_for_deconstruct(self): """Marks the resource for deconstruction.""" if "deconstruct" not in self.parent.game_area.itemcget(self.entity, "tags"): self.entity_deconstruct = self.parent.game_area.create_text(self.location["x"], self.location["y"], text="D", state="disabled", font=get_fonts()["text"]["normal"], tag="extra") self.parent.game_area.itemconfigure(self.entity, tag="deconstruct") def deconstruct(self): """Deconstructs the resource.""" self.destroy() self.resource.location = {"x": self.location["x"], "y": self.location["y"]} self.resource.draw() def draw_entity_buttons(self): """Draws the buttons for the entity.""" self.parent.game_area.create_window(48, self.parent.canvas.winfo_height() - 48, window=ttk.Button(self.parent.parent, text="Deconstruct", command=self.mark_for_deconstruct), anchor="nw", tags="Buttons") def remove_entity_buttons(self): """Removes the entity buttons.""" self.parent.game_area.delete("Buttons") def decrease_health(self, amount): """Decreases the enity by a given amount.""" Health.decrease_health(self, amount) self.parent.game_area.itemconfig(self.entity_health, text="{}/{}".format(self.get_health(), self.get_highest_health())) if self.get_health() <= 0: self.deconstruct()
mit
-4,868,313,324,769,137,000
40.535211
127
0.505256
false
nttks/edx-platform
biz/djangoapps/gx_member/builders.py
1
3466
# -*- coding: utf-8 -*- from collections import OrderedDict from django.utils.translation import ugettext as _ from biz.djangoapps.gx_member.models import Member FIELD_GROUP_CODE = 'group_code' FIELD_CODE = 'code' FIELD_EMAIL = 'email' FIELD_FIRST_NAME = 'first_name' FIELD_LAST_NAME = 'last_name' FIELD_PASSWORD = 'password' FIELD_USERNAME = 'username' FIELD_LOGIN_CODE = 'login_code' FIELD_ORG_NUMBER = 'org' FIELD_ITEM_NUMBER = 'item' class MemberTsv: def __init__(self, org=None): """ :param org: from biz.djangoapps.ga_organization.models import Organization """ self.org = org self.header_columns = OrderedDict() self.header_columns[FIELD_GROUP_CODE] = _("Organization Code") self.header_columns[FIELD_CODE] = _("Member Code") self.header_columns[FIELD_EMAIL] = _("Email Address") self.header_columns[FIELD_USERNAME] = _("Username") self.header_columns[FIELD_FIRST_NAME] = _("Last Name") self.header_columns[FIELD_LAST_NAME] = _("First Name") self.header_columns[FIELD_LOGIN_CODE] = _("Login Code") self.header_columns[FIELD_PASSWORD] = _("Password") for i in range(1, 11): self.header_columns[FIELD_ORG_NUMBER + str(i)] = _("Organization") + str(i) for i in range(1, 11): self.header_columns[FIELD_ITEM_NUMBER + str(i)] = _("Item") + str(i) @property def headers_for_export(self): """ Get headers rows for file to export :return: """ return self.header_columns.values() @property def headers_for_import(self): """ Get headers for file import :return: """ return self.header_columns.keys() def _load_data(self): data = Member.objects.filter(org=self.org, is_active=True, is_delete=False).select_related( 'user', 'user__bizuser', 'group').order_by('group__level_no', 'group__group_code', 'code') return data def get_rows_for_export(self): """ Get record rows for file to export. :return: """ rows = [] for data in self._load_data(): row = [] group = getattr(data, 'group', None) user = getattr(data, 'user') bizuser = getattr(user, 'bizuser', None) for column in self.header_columns.keys(): if column is FIELD_GROUP_CODE: row.append(group.group_code if group else '') elif column is FIELD_EMAIL: row.append(user.email) elif column is FIELD_FIRST_NAME: row.append(user.first_name) elif column is FIELD_LAST_NAME: row.append(user.last_name) elif column is FIELD_USERNAME: row.append(user.username) elif column is FIELD_PASSWORD: row.append('') elif column is FIELD_LOGIN_CODE: row.append(bizuser.login_code if bizuser else '') else: row.append(getattr(data, column)) rows.append(row) return rows def get_dic_by_import_row(self, row): """ Get dictionary object by row of import file. :param row: :return: """ return { column: row[i] for i, column in enumerate(self.headers_for_import) }
agpl-3.0
-4,143,055,898,418,332,000
34.010101
102
0.560589
false
Jet-Streaming/gyp
test/small/gyptest-small.py
1
1532
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Runs small tests. """ import imp import os import sys import unittest import TestGyp test = TestGyp.TestGyp() # Add pylib to the import path (so tests can import their dependencies). # This is consistant with the path.append done in the top file "gyp". sys.path.append(os.path.join(test._cwd, 'pylib')) # Add new test suites here. files_to_test = [ 'pylib/gyp/MSVSSettings_test.py', 'pylib/gyp/easy_xml_test.py', 'pylib/gyp/generator/msvs_test.py', 'pylib/gyp/generator/ninja_test.py', 'pylib/gyp/generator/xcode_test.py', 'pylib/gyp/common_test.py', 'pylib/gyp/input_test.py', ] # Collect all the suites from the above files. suites = [] for filename in files_to_test: # Carve the module name out of the path. name = os.path.splitext(os.path.split(filename)[1])[0] # Find the complete module path. full_filename = os.path.join(test._cwd, filename) # Load the module. module = imp.load_source(name, full_filename) # Add it to the list of test suites. suites.append(unittest.defaultTestLoader.loadTestsFromModule(module)) # Create combined suite. all_tests = unittest.TestSuite(suites) # Run all the tests. result = unittest.TextTestRunner(verbosity=2).run(all_tests) if result.failures or result.errors: test.fail_test() test.pass_test()
bsd-3-clause
1,676,917,526,871,446,300
25.854545
72
0.691906
false
CS-SI/QGIS
python/plugins/processing/algs/gdal/tri.py
1
4263
# -*- coding: utf-8 -*- """ *************************************************************************** tri.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * *************************************************************************** """ __author__ = 'Alexander Bruy' __date__ = 'October 2013' __copyright__ = '(C) 2013, Alexander Bruy' # This will get replaced with a git SHA1 when you do a git archive __revision__ = '$Format:%H$' import os from qgis.core import (QgsProcessingParameterDefinition, QgsProcessingParameterRasterLayer, QgsProcessingParameterBand, QgsProcessingParameterString, QgsProcessingParameterBoolean, QgsProcessingParameterRasterDestination) from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.algs.gdal.GdalUtils import GdalUtils pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0] class tri(GdalAlgorithm): INPUT = 'INPUT' BAND = 'BAND' COMPUTE_EDGES = 'COMPUTE_EDGES' OPTIONS = 'OPTIONS' OUTPUT = 'OUTPUT' def __init__(self): super().__init__() def initAlgorithm(self, config=None): self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer'))) self.addParameter(QgsProcessingParameterBand(self.BAND, self.tr('Band number'), parentLayerParameterName=self.INPUT)) self.addParameter(QgsProcessingParameterBoolean(self.COMPUTE_EDGES, self.tr('Compute edges'), defaultValue=False)) options_param = QgsProcessingParameterString(self.OPTIONS, self.tr('Additional creation parameters'), defaultValue='', optional=True) options_param.setFlags(options_param.flags() | QgsProcessingParameterDefinition.FlagAdvanced) options_param.setMetadata({ 'widget_wrapper': { 'class': 'processing.algs.gdal.ui.RasterOptionsWidget.RasterOptionsWidgetWrapper'}}) self.addParameter(options_param) self.addParameter(QgsProcessingParameterRasterDestination(self.OUTPUT, self.tr('Terrain Ruggedness Index'))) def name(self): return 'triterrainruggednessindex' def displayName(self): return self.tr('TRI (Terrain Ruggedness Index)') def group(self): return self.tr('Raster analysis') def groupId(self): return 'rasteranalysis' def getConsoleCommands(self, parameters, context, feedback, executing=True): arguments = ['TRI'] inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context) arguments.append(inLayer.source()) out = self.parameterAsOutputLayer(parameters, self.OUTPUT, context) arguments.append(out) arguments.append('-b') arguments.append(str(self.parameterAsInt(parameters, self.BAND, context))) if self.parameterAsBool(parameters, self.COMPUTE_EDGES, context): arguments.append('-compute_edges') options = self.parameterAsString(parameters, self.OPTIONS, context) if options: arguments.extend(GdalUtils.parseCreationOptions(options)) return ['gdaldem', GdalUtils.escapeAndJoin(arguments)]
gpl-2.0
9,072,826,177,340,879,000
40.38835
116
0.545156
false
QwertyManiac/seal-cdh4
seal/lib/mr/filter_link.py
1
1740
# Copyright (C) 2011-2012 CRS4. # # This file is part of Seal. # # Seal 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. # # Seal 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 Seal. If not, see <http://www.gnu.org/licenses/>. from seal.lib.mr.hit_processor_chain_link import HitProcessorChainLink class FilterLink(HitProcessorChainLink): def __init__(self, monitor, next_link = None): super(type(self), self).__init__(next_link) self.min_hit_quality = 1 self.remove_unmapped = True # if true, all unmapped are removed regardless of hit quality self.event_monitor = monitor def __remove_i(self, pair, i): pair[i] = None other_hit = pair[i^1] if other_hit: other_hit.remove_mate() return pair def process(self, pair): if len(pair) != 2: raise ValueError("pair length != 2 (it's %d)" % len(pair)) pair = list(pair) # tuples can't be modified for i in 0,1: if self.remove_unmapped and pair[i].is_unmapped(): pair = self.__remove_i(pair, i) self.event_monitor.count("reads filtered: unmapped") elif pair[i].qual < self.min_hit_quality: pair = self.__remove_i(pair, i) self.event_monitor.count("reads filtered: low quality") if self.next_link and any(pair): self.next_link.process(tuple(pair)) # forward pair to next element in chain
gpl-3.0
884,195,564,982,591,200
36.021277
91
0.71092
false
fabeschan/midigeneration
playback-demo.py
1
1282
import data import time import mido import playback def main(): # initialize a PlaybackUtility for each midi file, put them into a list -> playback_utils playback_utils = [] for f in ['mid/owl.mid', 'mid/lost.mid']: musicpiece = data.piece(f) pbu = playback.PlaybackUtility() pbu.add_notes(musicpiece.unified_track.notes) playback_utils.append(pbu) tempo_reciprocal = 3000 # 'speed' of playback. need to adjust this carefully playback.init_midi_channel() # set up channel, and prompt MIDI device reset before continuing # loop loop = True piece_index = 0 # index of the piece currently playing start_time = time.clock() while loop: # read/poll the trigger file text = playback.read_trigger_file('trigger_file') if text: print 'read triggerfile:', text piece_index = (piece_index + 1) % 2 # switch pieces cur_time = time.clock() playback_pos = int((cur_time - start_time) * 1000000) / tempo_reciprocal # play those notes using the corresponding PlaybackUtility playback_utils[piece_index].run(playback_pos) if playback_utils[piece_index].isTerminated(): loop = False if __name__ == '__main__': main()
mit
-4,767,020,812,574,751,000
32.736842
97
0.638846
false
kaste/pytest-beds
testbeds/fixtures.py
1
3023
import pytest fixture = pytest.fixture @fixture def bed(request): from google.appengine.ext import testbed bed = testbed.Testbed() bed.activate() request.addfinalizer(lambda: teardown_bed(bed)) return bed def teardown_bed(bed): bed.deactivate() @fixture def mailer(bed): from google.appengine.ext import testbed bed.init_mail_stub(show_mail_body=False) mailer = bed.get_stub(testbed.MAIL_SERVICE_NAME) return mailer @fixture def channel(bed): from google.appengine.ext import testbed bed.init_channel_stub() channel = bed.get_stub(testbed.CHANNEL_SERVICE_NAME) return channel @fixture def urlfetch(bed): from google.appengine.ext import testbed bed.init_urlfetch_stub() urlfetch = bed.get_stub(testbed.URLFETCH_SERVICE_NAME) return urlfetch @fixture def memcache(bed): bed.init_memcache_stub() from google.appengine.api import memcache return memcache @fixture def taskqueue(bed, pytestconfig, monkeypatch): from google.appengine.ext import testbed import taskqueue_stub project_root = pytestconfig.getvalue('project_root') bed.init_taskqueue_stub(root_path=project_root) taskqueue = bed.get_stub(testbed.TASKQUEUE_SERVICE_NAME) monkeypatch.setattr(taskqueue, 'get_filtered_tasks', taskqueue_stub.get_filtered_tasks) return taskqueue @fixture def deferreds(taskqueue): from .taskqueue_stub import TaskqueueStub return TaskqueueStub(taskqueue) @fixture def blobstore(bed): bed.init_blobstore_stub() bed.init_files_stub() from google.appengine.ext import blobstore return blobstore @fixture def search(bed): bed.init_search_stub() from google.appengine.api import search return search @fixture def app_identity(bed): bed.init_app_identity_stub() from google.appengine.api import app_identity return app_identity @fixture def ndb_(bed, memcache, monkeypatch): from google.appengine.datastore import datastore_stub_util policy = datastore_stub_util.PseudoRandomHRConsistencyPolicy() bed.init_datastore_v3_stub(consistency_policy=policy) from google.appengine.ext import ndb monkeypatch.setattr(ndb, 'set_consistent_probability', lambda p: policy.SetProbability(p), raising=False) return ndb @fixture def ndb(ndb_): ndb_.set_consistent_probability(1) return ndb_ @fixture def slowndb(ndb_): ndb_.set_consistent_probability(0) return ndb_ @fixture def users(bed): bed.setup_env(overwrite=True, **{}) bed.init_user_stub() anonymous = users @fixture def login(bed, users): def decorated(id='', email='', admin=False, domain='google'): data = dict( user_id=str(id), user_email=email, user_is_admin=repr(int(admin)), auth_domain=domain ) bed.setup_env(overwrite=True, **data) decorated.logout = lambda: decorated() return decorated del pytest, fixture
mit
-5,951,949,498,737,973,000
20.446809
74
0.69302
false
openstack/barbican
barbican/objects/fields.py
1
3518
# Copyright 2018 Fujitsu. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from oslo_serialization import jsonutils as json from oslo_versionedobjects import fields import six # Import field errors from oslo.versionedobjects KeyTypeError = fields.KeyTypeError ElementTypeError = fields.ElementTypeError # Import fields from oslo.versionedobjects BooleanField = fields.BooleanField UnspecifiedDefault = fields.UnspecifiedDefault IntegerField = fields.IntegerField NonNegativeIntegerField = fields.NonNegativeIntegerField UUIDField = fields.UUIDField FloatField = fields.FloatField NonNegativeFloatField = fields.NonNegativeFloatField StringField = fields.StringField SensitiveStringField = fields.SensitiveStringField EnumField = fields.EnumField DateTimeField = fields.DateTimeField DictOfStringsField = fields.DictOfStringsField DictOfNullableStringsField = fields.DictOfNullableStringsField DictOfIntegersField = fields.DictOfIntegersField ListOfStringsField = fields.ListOfStringsField SetOfIntegersField = fields.SetOfIntegersField ListOfSetsOfIntegersField = fields.ListOfSetsOfIntegersField ListOfDictOfNullableStringsField = fields.ListOfDictOfNullableStringsField DictProxyField = fields.DictProxyField ObjectField = fields.ObjectField ListOfObjectsField = fields.ListOfObjectsField VersionPredicateField = fields.VersionPredicateField FlexibleBooleanField = fields.FlexibleBooleanField DictOfListOfStringsField = fields.DictOfListOfStringsField IPAddressField = fields.IPAddressField IPV4AddressField = fields.IPV4AddressField IPV6AddressField = fields.IPV6AddressField IPV4AndV6AddressField = fields.IPV4AndV6AddressField IPNetworkField = fields.IPNetworkField IPV4NetworkField = fields.IPV4NetworkField IPV6NetworkField = fields.IPV6NetworkField AutoTypedField = fields.AutoTypedField BaseEnumField = fields.BaseEnumField MACAddressField = fields.MACAddressField ListOfIntegersField = fields.ListOfIntegersField PCIAddressField = fields.PCIAddressField Enum = fields.Enum Field = fields.Field FieldType = fields.FieldType Set = fields.Set Dict = fields.Dict List = fields.List Object = fields.Object IPAddress = fields.IPAddress IPV4Address = fields.IPV4Address IPV6Address = fields.IPV6Address IPNetwork = fields.IPNetwork IPV4Network = fields.IPV4Network IPV6Network = fields.IPV6Network class Json(FieldType): def coerce(self, obj, attr, value): if isinstance(value, six.string_types): loaded = json.loads(value) return loaded return value def from_primitive(self, obj, attr, value): return self.coerce(obj, attr, value) def to_primitive(self, obj, attr, value): return json.dumps(value) class DictOfObjectsField(AutoTypedField): def __init__(self, objtype, subclasses=False, **kwargs): self.AUTO_TYPE = Dict(Object(objtype, subclasses)) self.objname = objtype super(DictOfObjectsField, self).__init__(**kwargs) class JsonField(AutoTypedField): AUTO_TYPE = Json()
apache-2.0
4,955,053,650,329,911,000
34.897959
78
0.800171
false
PMBio/limix
limix/scripts/iSet_postprocess.py
1
2451
#! /usr/bin/env python # Copyright(c) 2014, The mtSet developers (Francesco Paolo Casale, Barbara Rakitsch, Oliver Stegle) # All rights reserved. from optparse import OptionParser from limix.mtSet.core.iset_utils import calc_emp_pv_eff import pandas as pd import glob import os import time import sys def entry_point(): parser = OptionParser() parser.add_option("--resdir", dest='resdir', type=str, default='./') parser.add_option("--outfile", dest='outfile', type=str, default=None) #parser.add_option("--manhattan_plot", dest='manhattan',action="store_true",default=False) parser.add_option("--tol", dest='tol', type=float, default=4e-3) (options, args) = parser.parse_args() resdir = options.resdir out_file = options.outfile tol = options.tol print('.. load permutation results') file_name = os.path.join(resdir, '*.iSet.perm') files = glob.glob(file_name) df0 = pd.DataFrame() for _file in files: print(_file) df0 = df0.append(pd.read_csv(_file, index_col=0)) print('.. load real results') file_name = os.path.join(resdir, '*.iSet.real') files = glob.glob(file_name) df = pd.DataFrame() for _file in files: print(_file) df = df.append(pd.read_csv(_file, index_col=0)) #calculate P values for the three tests for test in ['mtSet', 'iSet', 'iSet-het']: df[test+' pv'] = calc_emp_pv_eff(df[test+' LLR'].values, df0[test+' LLR0'].values) print(('.. saving %s' % out_file+'.res')) df.to_csv(out_file+'.res') if 0: if options.manhattan: import limix.utils.plot as plot if not os.path.exists(options.outfile): os.makedirs(options.outfile) def plot_manhattan(pv, out_file): import matplotlib.pylab as PLT import scipy as SP posCum = SP.arange(pv.shape[0]) idx=~SP.isnan(pv) plot.plot_manhattan(posCum[idx],pv[idx],alphaNS=1.0,alphaS=1.0) PLT.savefig(out_file) for test in ['mtSet', 'iSet', 'iSet-het']: out_file = os.path.join(options.outfile, 'iSet.%s_pv.manhattan.png'\ % (test,)) print((".. saving " + out_file)) plot_manhattan(df['%s pv' % test].values, out_file)
apache-2.0
6,777,799,267,604,765,000
33.521127
99
0.569563
false
angus-ai/angus-service-facedetection
angus/services/facedetection.py
1
1997
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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. import logging import os import cv2 import angus.service LOGGER = logging.getLogger(__name__) def compute(resource, data): img = str(data['image'].path) img = cv2.imread(img) home = os.path.dirname(os.path.realpath(__file__)) classifiers = home + "/resources/classifiers/" classifier = classifiers + 'haarcascade_frontalface_alt.xml' face_cascade = cv2.CascadeClassifier(classifier) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) height = img.shape[0] width = img.shape[1] faces = face_cascade.detectMultiScale(gray, 1.3, 5) result = { "input_size": [width, height], "nb_faces": len(faces), "faces": [{ "roi": [int(x), int(y), int(w), int(h)], "roi_fonfidence": 0, } for (x, y, w, h) in faces] } resource.update(result) def main(): port = os.environ.get('PORT', 9999) logging.basicConfig(level=logging.DEBUG) service = angus.service.Service( 'face_detection', 1, port, compute, resource_storage=angus.storage.MemoryStorage(), threads=4 ) service.start() if __name__ == '__main__': main()
apache-2.0
-6,569,452,880,651,726,000
27.126761
65
0.664997
false
mitdbg/aurum-datadiscovery
nearpy/storage/storage_redis.py
1
5855
# -*- coding: utf-8 -*- # Copyright (c) 2013 Ole Krause-Sparmann # 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 # -*- coding: utf-8 -*- # Copyright (c) 2013 Ole Krause-Sparmann # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. import redis import json import numpy import scipy try: import cPickle as pickle except ImportError: import pickle from nearpy.storage.storage import Storage class RedisStorage(Storage): """ Storage using redis. """ def __init__(self, redis_object): """ Uses specified redis object for storage. """ self.redis_object = redis_object def store_vector(self, hash_name, bucket_key, v, data): """ Stores vector and JSON-serializable data in bucket with specified key. """ redis_key = 'nearpy_%s_%s' % (hash_name, bucket_key) val_dict = {} # Depending on type (sparse or not) fill value dict if scipy.sparse.issparse(v): # Make sure that we are using COO format (easy to handle) if not scipy.sparse.isspmatrix_coo(v): v = scipy.sparse.coo_matrix(v) # Construct list of [index, value] items, # one for each non-zero element of the sparse vector encoded_values = [] for k in range(v.data.size): row_index = v.row[k] value = v.data[k] encoded_values.append([int(row_index), value]) val_dict['sparse'] = 1 val_dict['nonzeros'] = encoded_values val_dict['dim'] = v.shape[0] else: # Make sure it is a 1d vector v = numpy.reshape(v, v.shape[0]) val_dict['vector'] = v.tostring() val_dict['dtype'] = v.dtype.name # Add data if set if data: val_dict['data'] = data # Push JSON representation of dict to end of bucket list self.redis_object.rpush(redis_key, pickle.dumps(val_dict, protocol=2)) def get_bucket(self, hash_name, bucket_key): """ Returns bucket content as list of tuples (vector, data). """ redis_key = 'nearpy_%s_%s' % (hash_name, bucket_key) items = self.redis_object.lrange(redis_key, 0, -1) results = [] for item_str in items: val_dict = pickle.loads(item_str) # Depending on type (sparse or not) reconstruct vector if 'sparse' in val_dict: # Fill these for COO creation row = [] col = [] data = [] # For each non-zero element, append values for e in val_dict['nonzeros']: row.append(e[0]) # Row index data.append(e[1]) # Value col.append(0) # Column index (always 0) # Create numpy arrays for COO creation coo_row = numpy.array(row, dtype=numpy.int32) coo_col = numpy.array(col, dtype=numpy.int32) coo_data = numpy.array(data) # Create COO sparse vector vector = scipy.sparse.coo_matrix( (coo_data, (coo_row, coo_col)), shape=(val_dict['dim'], 1)) else: vector = numpy.fromstring(val_dict['vector'], dtype=val_dict['dtype']) # Add data to result tuple, if present if 'data' in val_dict: results.append((vector, val_dict['data'])) else: results.append((vector, None)) return results def clean_buckets(self, hash_name): """ Removes all buckets and their content for specified hash. """ bucket_keys = self.redis_object.keys(pattern='nearpy_%s_*' % hash_name) for bucket_key in bucket_keys: self.redis_object.delete(bucket_key) def clean_all_buckets(self): """ Removes all buckets from all hashes and their content. """ bucket_keys = self.redis_object.keys(pattern='nearpy_*') for bucket_key in bucket_keys: self.redis_object.delete(bucket_key) def store_hash_configuration(self, lshash): """ Stores hash configuration """ self.redis_object.set(lshash.hash_name + '_conf', pickle.dumps(lshash.get_config())) def load_hash_configuration(self, hash_name): """ Loads and returns hash configuration """ conf = self.redis_object.get(hash_name + '_conf') return pickle.loads(conf) if conf is not None else None
mit
-6,178,399,285,993,410,000
34.920245
79
0.594364
false
ztane/python-Levenshtein
setup.py
1
1550
from setuptools import setup import os import sys from distutils.core import Extension version = '0.12.2' extLevensthein = Extension('Levenshtein._levenshtein', sources = ['Levenshtein/_levenshtein.c'], ) if sys.version_info >= (3, 0): _open = lambda f: open(f, encoding='utf8') else: _open = open setup(name='python-Levenshtein', version=version, description="Python extension for computing string edit distances and similarities.", long_description=_open("README.rst").read() + "\n" + _open(os.path.join("HISTORY.txt")).read(), # Get more strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[ "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython" ], keywords='string Levenshtein comparison edit-distance', author='Antti Haapala', author_email='[email protected]', url='http://github.com/ztane/python-Levenshtein', license='GPL', packages=['Levenshtein'], namespace_packages=[], include_package_data=True, zip_safe=False, ext_modules = [extLevensthein], install_requires=[ 'setuptools', # -*- Extra requirements: -*- ], entry_points=""" """, )
gpl-2.0
3,761,975,170,363,939,300
31.978723
91
0.599355
false
mitsei/dlkit
dlkit/handcar/id/objects.py
1
3208
# -*- coding: utf-8 -*- # This module contains all the Object classes used by the MIT Core Concept # Catalog (MC3) Handcar based implementation of the OSID Id Service. from ...abstract_osid.id import objects as abc_id_objects from ..osid import objects as osid_objects from .. import settings from ..primitives import Id, Type, DisplayText from ..osid.osid_errors import NullArgument, InvalidArgument, NotFound, NoAccess, IllegalState, OperationFailed, Unimplemented, Unsupported INVALID = 0 VALID = 1 class IdList(abc_id_objects.IdList, osid_objects.OsidList): """Like all OsidLists, IdList provides a means for accessing Id elements sequentially either one at a time or many at a time. Examples: while (il.hasNext()) { Id id = il.getNextId(); } or while (il.hasNext()) { Id[] ids = il.getNextIds(il.available()); } """ def get_next_id(self): """Gets the next Id in this list. return: (osid.id.Id) - the next Id in this list. The has_next() method should be used to test that a next Id is available before calling this method. raise: IllegalState - no more elements available in this list raise: OperationFailed - unable to complete request compliance: mandatory - This method must be implemented. """ try: next_item = next(self) except StopIteration: raise IllegalState('no more elements available in this list') except Exception: # Need to specify exceptions here! raise OperationFailed() else: return next_item def next(self): try: next_item = osid_objects.OsidList.next(self) except StopIteration: raise except Exception: # Need to specify exceptions here! raise OperationFailed() if isinstance(next_item, dict): next_item = Id(next_item) return next_item __next__ = next def get_next_ids(self, n=None): """Gets the next set of Ids in this list. The specified amount must be less than or equal to the return from available(). arg: n (cardinal): the number of Id elements requested which must be less than or equal to available() return: (osid.id.Id) - an array of Id elements. The length of the array is less than or equal to the number specified. raise: IllegalState - no more elements available in this list raise: OperationFailed - unable to complete request compliance: mandatory - This method must be implemented. """ if n > self.available(): # !!! This is not quite as specified (see method docs) !!! raise IllegalState('not enough elements available in this list') else: next_list = [] x = 0 while x < n: try: next_list.append(next(self)) except Exception: # Need to specify exceptions here! raise OperationFailed() x = x + 1 return next_list next_id = property(get_next_id)
mit
8,675,160,027,935,675,000
34.252747
139
0.608167
false
emilioriosvz/EmilioRiosExamen
peachestore/Gestor.py
1
4821
__author__ = 'Emilio' import sys, json, datetime, os from random import randrange class Gestor(): files = {} cwd = os.getcwd() files['aplicacionesgratuitas'] = os.path.join(cwd, "aplicacionesgratuitas.json") files['aplicacionesdepago'] = os.path.join(cwd, "aplicacionesdepago.json") applistfree = [] applistpay = [] def __init__(self): print("Gestor inicializado") def getAppsFree(self): with open(self.files['aplicacionesgratuitas'], mode='r', encoding='utf-8')as file: apps = json.load(file) for app in apps: self.applistfree = apps print(str(app)) def getAppsPay(self): with open(self.files['aplicacionesdepago'], mode='r', encoding='utf-8')as file: apps = json.load(file) for app in apps: self.applistpay = apps print(str(app),":", apps[str(app)]["precio"],'€') def addPayApp(self): nombreapp = input("Introduce el nombre de la app: ") proveedor = input("Introduce el proveedor: ") precio = input("Introduce el precio: ") fechapublicacion = datetime.datetime.now().date() with open(self.files['aplicacionesdepago'], mode='r', encoding='utf-8') as file: apps = json.load(file) apps[nombreapp] = {"proveedor": proveedor,"fechapublicacion": str(fechapublicacion),"precio": int(precio),"ndescargas": 0,"npuntuaciones": 0,"puntuacion": 0,"ncomentarios": 0} with open(self.files['aplicacionesdepago'], mode='w', encoding='utf-8') as file: json.dump(apps, file) def addFreeApp(self): nombreapp = input("Introduce el nombre de la app: ") proveedor = input("Introduce el proveedor: ") precio = 0 fechapublicacion = datetime.datetime.now().date() with open(self.files['aplicacionesgratuitas'], mode='r', encoding='utf-8') as file: apps = json.load(file) apps[nombreapp] = {"proveedor": proveedor,"fechapublicacion": str(fechapublicacion),"precio": int(precio),"ndescargas": 0,"npuntuaciones": 0,"puntuacion": 0,"ncomentarios": 0} with open(self.files['aplicacionesgratuitas'], mode='w', encoding='utf-8') as file: json.dump(apps, file) def addDescarga(self,appName): try: with open(self.files['aplicacionesgratuitas'], mode='r', encoding='utf-8') as file: apps = json.load(file) apps[appName]["ndescargas"] = int(apps[appName]["ndescargas"]+1) with open(self.files['aplicacionesgratuitas'], mode='w', encoding='utf-8') as file: file.write(json.dumps(apps)) except: print("App de pago: ") with open(self.files['aplicacionesdepago'], mode='r', encoding='utf-8') as file: apps = json.load(file) apps[appName]["ndescargas"] = int(apps[appName]["ndescargas"]+1) with open(self.files['aplicacionesdepago'], mode='w', encoding='utf-8') as file: file.write(json.dumps(apps)) def addComent(self,appName): try: with open(self.files['aplicacionesgratuitas'], mode='r', encoding='utf-8') as file: apps = json.load(file) apps[appName]["ncomentarios"] = int(apps[appName]["ncomentarios"]+1) with open(self.files['aplicacionesgratuitas'], mode='w', encoding='utf-8') as file: file.write(json.dumps(apps)) except: print("App de pago: ") with open(self.files['aplicacionesdepago'], mode='r', encoding='utf-8') as file: apps = json.load(file) apps[appName]["ncomentarios"] = int(apps[appName]["ncomentarios"]+1) with open(self.files['aplicacionesdepago'], mode='w', encoding='utf-8') as file: file.write(json.dumps(apps)) def getDeveloper(self,developer): with open(self.files['aplicacionesgratuitas'], mode='r', encoding='utf-8')as file: apps = json.load(file) for app in apps: if developer == apps[app]["proveedor"]: print(app) with open(self.files['aplicacionesdepago'], mode='r', encoding='utf-8')as file: apps = json.load(file) for app in apps: if developer == apps[app]["proveedor"]: print(app) def getTotal(self,nombreapp): total = 0 with open(self.files['aplicacionesdepago'], mode='r', encoding='utf-8')as file: apps = json.load(file) for app in apps: if nombreapp == app: total = int(apps[app]["ndescargas"]) * int(apps[app]["precio"]) print(total)
apache-2.0
860,530,872,228,743,400
38.834711
187
0.574601
false
bendmorris/retriever
engines/sqlite.py
1
1726
import os import platform from retriever.lib.models import Engine, no_cleanup from retriever import DATA_DIR class engine(Engine): """Engine instance for SQLite.""" name = "SQLite" abbreviation = "sqlite" datatypes = { "auto": "INTEGER", "int": "INTEGER", "bigint": "INTEGER", "double": "REAL", "decimal": "REAL", "char": "TEXT", "bool": "INTEGER", } required_opts = [("file", "Enter the filename of your SQLite database", os.path.join(DATA_DIR, "sqlite.db"), ""), ("table_name", "Format of table name", "{db}_{table}"), ] def create_db(self): """SQLite doesn't create databases; each database is a file and needs a separate connection.""" return None def escape_single_quotes(self, line): return line.replace("'", "''") def table_exists(self, dbname, tablename): if not hasattr(self, 'existing_table_names'): self.cursor.execute("SELECT name FROM sqlite_master WHERE type='table';") self.existing_table_names = set() for line in self.cursor: self.existing_table_names.add(line[0].lower()) return self.table_name(name=tablename, dbname=dbname).lower() in self.existing_table_names def get_connection(self): """Gets the db connection.""" import sqlite3 as dbapi self.get_input() return dbapi.connect(self.opts["file"])
mit
-7,740,125,364,134,082,000
34.958333
98
0.505794
false
eouti/megapy
main.py
1
2237
#!/usr/bin/env python """main.py: Script to download links using mega-debrid.eu.""" __author__ = "eoutin" import argparse import ast import urllib from urllib2 import * import subprocess parser = argparse.ArgumentParser() parser.add_argument("link", help="link to download", type=str) parser.add_argument("path", help="path to save file", type=str) parser.add_argument("-f", "--file", help="get links from text file", action="store_true") args = parser.parse_args() print args.link print args.path # Credentials user = 'user' password = 'pass' # API url auth = 'http://www.mega-debrid.eu/api.php?action=connectUser&' link_url = 'http://www.mega-debrid.eu/api.php?action=getLink&token=' hosters_url = 'http://www.mega-debrid.eu/api.php?action=getHosters' query_args = {'login': user, 'password': password} encoded_args = urllib.urlencode(query_args) auth_url = auth + encoded_args def get_hosters_list(): pass def get_token(): """Get auth token""" request = Request(auth_url) response = urlopen(request) rep = response.read() data = ast.literal_eval(rep) #TODO: cleaner way? return data.get('token') def get_link(rawLink, token): """Get debridlink from rawlink""" url = link_url+token values = dict(link=rawLink) data = urllib.urlencode(values) req = Request(url, data) response = urlopen(req) page = response.read() lien = ast.literal_eval(page).get('debridLink') return lien.replace("\\", "")[1:-1] def download(debridlink, path): subprocess.call(["wget", debridlink, '-P', path]) try: token = get_token() print "Token: "+token if args.file: print "Links from file" # thus args.link is a file with open(args.link, "r") as ins: # store all links in a list links = [x.rstrip() for x in ins if x.strip()] print links for elem in links: debridlink = get_link(elem, token) print debridlink download(debridlink, args.path) else: print "Link from args" # no file, normal download debridlink = get_link(args.link, token) download(debridlink, args.path) except URLError, e: print 'Bug. Got an error code:', e
gpl-3.0
-4,732,943,757,378,375,000
25.951807
89
0.643719
false
gkno/gkno_launcher
src/gkno/fileErrors.py
1
4112
#!/usr/bin/python from __future__ import print_function import inspect from inspect import currentframe, getframeinfo import errors from errors import * import os import sys class fileErrors: # Initialise. def __init__(self): # Get general error writing and termination methods. self.errors = errors() # The error messages are stored in the following list. self.text = [] # For a list of all error code values, see adminErrors.py. self.errorCode = '4' # Attempt to open a non-existent file. def noFile(self, filename): self.text.append('Unable to open configuration file.') self.text.append('In order to execute the requested pipeline, the configuration file:') self.text.append('\t') self.text.append('\t' + filename) self.text.append('\t') self.text.append('This filename cannot be found. Please check the names of all pipelines and tools and ensure that they ' + \ 'are valid') self.errors.writeFormattedText(self.text, errorType = 'error') self.errors.terminate(self.errorCode) # The opened file is not a valid json file. def notJson(self, filename, info): # Determine if this is a tool or a pipeline and strip the path from the name. filenameList = filename.split('/') name = filenameList[-1].rsplit('.json')[0] configurationType = 'tool' if filenameList[-2] == 'tools' else 'pipeline' # Get additional error messages. exc_type, exc_value, exc_traceback = sys.exc_info() # Define the error message. self.text.append('Invalid configuration file.') self.text.append('The ' + configurationType + ' configuration file \'' + name + '\' is not a valid json file. The specific error raised is:') self.text.append('\t') self.text.append(str(exc_value)) self.errors.writeFormattedText(self.text, errorType = 'error') self.errors.terminate(self.errorCode) # If a tool is added, but the tool is already available. def invalidPipelineName(self, pipelines, pipeline): self.text.append('Invalid pipeline.') self.text.append('The requested pipeline is not recognised. The command line must have the syntax \'gkno <pipeline>\' where the \'pipeline\' ' + \ 'is the name of a pipeline. The requested pipeline \'' + pipeline + '\' is not an available pipeline. Please check the command ' + \ 'line or request help (\'gkno --help\') to identify the required pipeline.') if pipelines: self.text.append('\t') self.text.append('The following are the closest pipelines, ranked by similarity:') for task in pipelines[:5]: self.text.append('\t' + task) self.errors.writeFormattedText(self.text, errorType = 'error') self.errors.terminate(self.errorCode) # If files required for the pipeline to run are missing, write a warning. def missingFiles(self, fileList): self.text.append('Missing input files.') self.text.append('In order to execute, there are a number of input files that are required. The following list indicates all required files that ' + \ 'are missing. Since files are missing, the generated makefile will not be automatically executed, but will need to be executed manually (make -f' + \ ' <makefile name>), or gkno can be reexecuted when the required files are present.') self.text.append('\t') for filename in fileList: self.text.append('\t' + filename) self.errors.writeFormattedText(self.text, errorType = 'warning') # A list was provided, but does not exist. def missingList(self, argument, value): self.text.append('Missing list.') self.text.append('The argument \'' + argument + '\' was supplied with a file with the extension \'.list\', which implies that the values to be ' + \ 'used for this argument are to be extracted from this file. The file does not exist, however. Please ensure that the file exists, or, if this ' + \ 'is not intended to be a list of values, but a single file, that the extension for the file is not \'.list\'.') self.errors.writeFormattedText(self.text, errorType = 'error') self.errors.terminate(self.errorCode)
mit
269,886,199,515,153,630
45.202247
154
0.699173
false
HEG-Arc/voices
arc/tests.py
1
1186
# -*- coding: UTF-8 -*- # tests.py # # Copyright (C) 2013 HES-SO // Haute école de gestion Arc # # Author: Cédric Gaspoz <[email protected]> # # This file is part of voices. # # voices 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. # # voices 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 voices. If not, see <http://www.gnu.org/licenses/>. """ This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 always equals 2. """ self.assertEqual(1 + 1, 2)
gpl-3.0
-797,811,566,359,866,200
30.157895
79
0.717905
false
Zenohm/crusoe
travis_pypi_setup.py
1
3751
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file """ from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric.padding import PKCS1v15 try: from urllib import urlopen except: from urllib.request import urlopen GITHUB_REPO = 'Zenohm/crusoe' TRAVIS_CONFIG_FILE = os.path.join( os.path.dirname(os.path.abspath(__file__)), '.travis.yml') def load_key(pubkey): """Load public RSA key, with work-around for keys using incorrect header/footer format. Read more about RSA encryption with cryptography: https://cryptography.io/latest/hazmat/primitives/asymmetric/rsa/ """ try: return load_pem_public_key(pubkey.encode(), default_backend()) except ValueError: # workaround for https://github.com/travis-ci/travis-api/issues/196 pubkey = pubkey.replace('BEGIN RSA', 'BEGIN').replace('END RSA', 'END') return load_pem_public_key(pubkey.encode(), default_backend()) def encrypt(pubkey, password): """Encrypt password using given RSA public key and encode it with base64. The encrypted password can only be decrypted by someone with the private key (in this case, only Travis). """ key = load_key(pubkey) encrypted_password = key.encrypt(password, PKCS1v15()) return base64.b64encode(encrypted_password) def fetch_public_key(repo): """Download RSA public key Travis will use for this repo. Travis API docs: http://docs.travis-ci.com/api/#repository-keys """ keyurl = 'https://api.travis-ci.org/repos/{0}/key'.format(repo) data = json.loads(urlopen(keyurl).read().decode()) if 'key' not in data: errmsg = "Could not find public key for repo: {}.\n".format(repo) errmsg += "Have you already added your GitHub repo to Travis?" raise ValueError(errmsg) return data['key'] def prepend_line(filepath, line): """Rewrite a file adding a line to its beginning. """ with open(filepath) as f: lines = f.readlines() lines.insert(0, line) with open(filepath, 'w') as f: f.writelines(lines) def load_yaml_config(filepath): with open(filepath) as f: return yaml.load(f) def save_yaml_config(filepath, config): with open(filepath, 'w') as f: yaml.dump(config, f, default_flow_style=False) def update_travis_deploy_password(encrypted_password): """Update the deploy section of the .travis.yml file to use the given encrypted password. """ config = load_yaml_config(TRAVIS_CONFIG_FILE) config['deploy']['password'] = dict(secure=encrypted_password) save_yaml_config(TRAVIS_CONFIG_FILE, config) line = ('# This file was autogenerated and will overwrite' ' each time you run travis_pypi_setup.py\n') prepend_line(TRAVIS_CONFIG_FILE, line) def main(args): public_key = fetch_public_key(args.repo) password = args.password or getpass('PyPI password: ') update_travis_deploy_password(encrypt(public_key, password.encode())) print("Wrote encrypted password to .travis.yml -- you're ready to deploy") if '__main__' == __name__: import argparse parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('--repo', default=GITHUB_REPO, help='GitHub repo (default: %s)' % GITHUB_REPO) parser.add_argument('--password', help='PyPI password (will prompt if not provided)') args = parser.parse_args() main(args)
mit
4,224,383,735,861,574,000
29.745902
79
0.679019
false
klmitch/nova
nova/tests/unit/api/openstack/compute/test_server_start_stop.py
1
9355
# Copyright (c) 2012 Midokura Japan K.K. # # 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 mock from oslo_policy import policy as oslo_policy from oslo_utils.fixture import uuidsentinel as uuids import webob from nova.api.openstack.compute import servers \ as server_v21 from nova.compute import api as compute_api from nova.db import api as db from nova import exception from nova import policy from nova import test from nova.tests import fixtures as nova_fixtures from nova.tests.unit.api.openstack import fakes class ServerStartStopTestV21(test.TestCase): def setUp(self): super(ServerStartStopTestV21, self).setUp() self._setup_controller() self.req = fakes.HTTPRequest.blank('') self.useFixture(nova_fixtures.SingleCellSimple()) self.stub_out('nova.db.api.instance_get_by_uuid', fakes.fake_instance_get( project_id=fakes.FAKE_PROJECT_ID)) def _setup_controller(self): self.controller = server_v21.ServersController() @mock.patch.object(compute_api.API, 'start') def test_start(self, start_mock): body = dict(start="") self.controller._start_server(self.req, uuids.instance, body) start_mock.assert_called_once_with(mock.ANY, mock.ANY) @mock.patch.object(compute_api.API, 'start', side_effect=exception.InstanceNotReady( instance_id=uuids.instance)) def test_start_not_ready(self, start_mock): body = dict(start="") self.assertRaises(webob.exc.HTTPConflict, self.controller._start_server, self.req, uuids.instance, body) @mock.patch.object(compute_api.API, 'start', side_effect=exception.InstanceIsLocked( instance_uuid=uuids.instance)) def test_start_locked_server(self, start_mock): body = dict(start="") self.assertRaises(webob.exc.HTTPConflict, self.controller._start_server, self.req, uuids.instance, body) @mock.patch.object(compute_api.API, 'start', side_effect=exception.InstanceIsLocked( instance_uuid=uuids.instance)) def test_start_invalid_state(self, start_mock): body = dict(start="") ex = self.assertRaises(webob.exc.HTTPConflict, self.controller._start_server, self.req, uuids.instance, body) self.assertIn('is locked', str(ex)) @mock.patch.object(compute_api.API, 'stop') def test_stop(self, stop_mock): body = dict(stop="") self.controller._stop_server(self.req, uuids.instance, body) stop_mock.assert_called_once_with(mock.ANY, mock.ANY) @mock.patch.object(compute_api.API, 'stop', side_effect=exception.InstanceNotReady( instance_id=uuids.instance)) def test_stop_not_ready(self, stop_mock): body = dict(stop="") self.assertRaises(webob.exc.HTTPConflict, self.controller._stop_server, self.req, uuids.instance, body) @mock.patch.object(compute_api.API, 'stop', side_effect=exception.InstanceIsLocked( instance_uuid=uuids.instance)) def test_stop_locked_server(self, stop_mock): body = dict(stop="") ex = self.assertRaises(webob.exc.HTTPConflict, self.controller._stop_server, self.req, uuids.instance, body) self.assertIn('is locked', str(ex)) @mock.patch.object(compute_api.API, 'stop', side_effect=exception.InstanceIsLocked( instance_uuid=uuids.instance)) def test_stop_invalid_state(self, stop_mock): body = dict(start="") self.assertRaises(webob.exc.HTTPConflict, self.controller._stop_server, self.req, uuids.instance, body) @mock.patch.object(db, 'instance_get_by_uuid', side_effect=exception.InstanceNotFound( instance_id=uuids.instance)) def test_start_with_bogus_id(self, get_mock): body = dict(start="") self.assertRaises(webob.exc.HTTPNotFound, self.controller._start_server, self.req, uuids.instance, body) @mock.patch.object(db, 'instance_get_by_uuid', side_effect=exception.InstanceNotFound( instance_id=uuids.instance)) def test_stop_with_bogus_id(self, get_mock): body = dict(stop="") self.assertRaises(webob.exc.HTTPNotFound, self.controller._stop_server, self.req, uuids.instance, body) class ServerStartStopPolicyEnforcementV21(test.TestCase): start_policy = "os_compute_api:servers:start" stop_policy = "os_compute_api:servers:stop" def setUp(self): super(ServerStartStopPolicyEnforcementV21, self).setUp() self.controller = server_v21.ServersController() self.req = fakes.HTTPRequest.blank('') self.useFixture(nova_fixtures.SingleCellSimple()) self.stub_out( 'nova.db.api.instance_get_by_uuid', fakes.fake_instance_get( project_id=self.req.environ['nova.context'].project_id)) def test_start_policy_failed(self): rules = { self.start_policy: "project_id:non_fake" } policy.set_rules(oslo_policy.Rules.from_dict(rules)) body = dict(start="") exc = self.assertRaises(exception.PolicyNotAuthorized, self.controller._start_server, self.req, uuids.instance, body) self.assertIn(self.start_policy, exc.format_message()) def test_start_overridden_policy_failed_with_other_user_in_same_project( self): rules = { self.start_policy: "user_id:%(user_id)s" } policy.set_rules(oslo_policy.Rules.from_dict(rules)) # Change the user_id in request context. self.req.environ['nova.context'].user_id = 'other-user' body = dict(start="") exc = self.assertRaises(exception.PolicyNotAuthorized, self.controller._start_server, self.req, uuids.instance, body) self.assertIn(self.start_policy, exc.format_message()) @mock.patch('nova.compute.api.API.start') def test_start_overridden_policy_pass_with_same_user(self, start_mock): rules = { self.start_policy: "user_id:%(user_id)s" } policy.set_rules(oslo_policy.Rules.from_dict(rules)) body = dict(start="") self.controller._start_server(self.req, uuids.instance, body) start_mock.assert_called_once_with(mock.ANY, mock.ANY) def test_stop_policy_failed_with_other_project(self): rules = { self.stop_policy: "project_id:%(project_id)s" } policy.set_rules(oslo_policy.Rules.from_dict(rules)) body = dict(stop="") # Change the project_id in request context. self.req.environ['nova.context'].project_id = 'other-project' exc = self.assertRaises(exception.PolicyNotAuthorized, self.controller._stop_server, self.req, uuids.instance, body) self.assertIn(self.stop_policy, exc.format_message()) @mock.patch('nova.compute.api.API.stop') def test_stop_overridden_policy_pass_with_same_project(self, stop_mock): rules = { self.stop_policy: "project_id:%(project_id)s" } policy.set_rules(oslo_policy.Rules.from_dict(rules)) body = dict(stop="") self.controller._stop_server(self.req, uuids.instance, body) stop_mock.assert_called_once_with(mock.ANY, mock.ANY) def test_stop_overridden_policy_failed_with_other_user_in_same_project( self): rules = { self.stop_policy: "user_id:%(user_id)s" } policy.set_rules(oslo_policy.Rules.from_dict(rules)) # Change the user_id in request context. self.req.environ['nova.context'].user_id = 'other-user' body = dict(stop="") exc = self.assertRaises(exception.PolicyNotAuthorized, self.controller._stop_server, self.req, uuids.instance, body) self.assertIn(self.stop_policy, exc.format_message()) @mock.patch('nova.compute.api.API.stop') def test_stop_overridden_policy_pass_with_same_user(self, stop_mock): rules = { self.stop_policy: "user_id:%(user_id)s" } policy.set_rules(oslo_policy.Rules.from_dict(rules)) body = dict(stop="") self.controller._stop_server(self.req, uuids.instance, body) stop_mock.assert_called_once_with(mock.ANY, mock.ANY)
apache-2.0
9,134,414,122,101,168,000
41.912844
78
0.62031
false
kelvinguu/lang2program
third-party/gtd/gtd/tests/test_persist.py
1
15908
import json import logging import time from abc import ABCMeta, abstractmethod from collections import Counter import pytest from gtd.persist import LazyMapping, EagerMapping, TableMapping, ORM, ORMColumn, FileSequence, FileSerializer, SimpleORM, \ ShardedSequence, CustomSerializer, LazyIterator, BatchIterator, SimpleBatchMapping, SequenceSlice from sqlalchemy import MetaData, String, Integer, Table, create_engine, select, Column from sqlalchemy.engine.url import URL from sqlalchemy.exc import OperationalError from sqlalchemy.inspection import inspect class BatchMappingTester(object): pass # TODO # make sure getitem throws KeyError when appropriate class BatchMutableMappingTester(BatchMappingTester): pass # TODO class MetaDataExample(MetaData): def __init__(self): url = URL(drivername='postgresql+psycopg2', username='Kelvin', host='localhost', port=5432, database='test_db') try: engine = create_engine(url) engine.connect() logging.info('Using Postgres test database.') except OperationalError: # postgres test database not available url = 'sqlite:///:memory:' engine = create_engine(url) logging.warn('Using SQLite test database.') super(MetaDataExample, self).__init__(engine) class LazyMappingExample(LazyMapping): def __init__(self, cache): super(LazyMappingExample, self).__init__(cache) self.computes_called = Counter() def compute_batch(self, keys): for key in keys: self.computes_called[key] += 1 return [k * 2 for k in keys] class TestLazyMapping(object): @pytest.fixture def lazy_dict(self): cache = SimpleBatchMapping() return LazyMappingExample(cache) def test_getitem(self, lazy_dict): d = lazy_dict cache = d.cache assert len(cache) == 0 assert d[3] == 6 # check that it entered cache assert cache[3] == 6 # get the same value assert d[3] == 6 # every computation only done once for val in d.computes_called.itervalues(): assert val <= 1 def test_get_batch(self, lazy_dict): def assert_batches(xs, correct): results = lazy_dict.get_batch(xs) results_par = LazyMapping.compute_batch_parallel(lambda k: 2 * k, xs) assert results == correct assert results_par == correct # every computation only done once for val in lazy_dict.computes_called.itervalues(): assert val <= 1 # WARNING: this test could fail because computes_called is a Counter, which may # not be thread-safe. assert_batches([0, 1, 2, 3], [0, 2, 4, 6]) assert_batches([2, 3, 4], [4, 6, 8]) class EagerMappingExample(EagerMapping): def __init__(self, cache): super(EagerMappingExample, self).__init__(cache) def populate(self, cache): cache['a'] = 1 cache['b'] = 2 def test_eager_mapping(): cd = EagerMappingExample({}) assert cd.cache == {'a': 1, 'b': 2} # if cache is already populated, doesn't overwrite it cd2 = EagerMappingExample({'d': 3}) assert cd2.cache == {'d': 3} class ORMTester(object): __metaclass__ = ABCMeta @pytest.fixture(scope='session') def metadata(self): return MetaDataExample() @abstractmethod def object(self): pass @abstractmethod def orm(self): pass @pytest.yield_fixture def table(self, orm, metadata): metadata.drop_all() # clear the database table_args = [c.unbound_column for c in orm.columns] table = Table('test_table', metadata, *table_args) metadata.create_all() yield table metadata.drop_all() def test_preserve_object(self, orm, object, table, metadata): orm.bind(table) row = orm.to_row(object) for key in row: assert isinstance(key, Column) eng = metadata.bind with eng.begin() as conn: conn.execute(table.insert(values=row)) result = conn.execute(select([table])) new_row = result.first() new_object = orm.from_row(new_row) assert new_object == object class ExampleKeyORM(ORM): def __init__(self): self.name = ORMColumn('name', String) self.age = ORMColumn('age', Integer) columns = [self.name, self.age] super(ExampleKeyORM, self).__init__(columns) def to_row(self, value): name, age = value return {self.name.key: name, self.age.key: age} def from_row(self, row): return row[self.name.key], row[self.age.key] class TestExampleKeyORM(ORMTester): @pytest.fixture def object(self): return ('bob', 4) @pytest.fixture def orm(self): return ExampleKeyORM() class ExampleValORM(ORM): def __init__(self): self.name = ORMColumn('json', String) super(ExampleValORM, self).__init__([self.name]) def to_row(self, value): return {self.name.key: json.dumps(value)} def from_row(self, row): return json.loads(row[self.name.key]) class TestTableMapping: @pytest.fixture(scope='session') def metadata(self): return MetaDataExample() @pytest.yield_fixture def table_dict(self, metadata): metadata.drop_all() key_orm = ExampleKeyORM() val_orm = ExampleValORM() td = TableMapping('test_table', key_orm, val_orm, metadata) td[('ren', 1)] = {'hobby': 'bowling'} td[('bob', 2)] = {'hobby': 'bowling'} yield td metadata.drop_all() def test_contains(self, table_dict): assert ('ren', 1) in table_dict assert ('ren', 2) not in table_dict def test_contains_batch(self, table_dict): # note that there is a duplicate batch = [('ren', 1), ('ren', 2), ('ren', 1), ('bob', 2)] correct = [True, False, True, True] presence = table_dict.contains_batch(batch) assert presence == correct def test_correct_table(self, table_dict): correct_columns = ['name', 'age', 'json'] correct_keys = ['name', 'age'] names = lambda cols: [col.name for col in cols] table = table_dict.table assert names(table.columns) == correct_columns assert names(inspect(table).primary_key.columns) == correct_keys def test_set_batch(self, table_dict): bob_json = {'hobby': 'golf'} james_json = {'hobby': 'tennis'} ren_json = {'hobby': 'bowling'} table_dict.set_batch([(('bob', 2), bob_json), (('james', 3), james_json)]) d = dict(table_dict) assert d == {('bob', 2): bob_json, ('james', 3): james_json, ('ren', 1): ren_json} # note that bob_json was overwritten from bowling to golf def test_getitem(self, table_dict): assert table_dict[('ren', 1)] == {'hobby': 'bowling'} with pytest.raises(KeyError): bob_val = table_dict[('bob', 1)] def test_setitem(self, table_dict): table_dict[('ren', 1)] = {'hobby': 'none'} d = dict(table_dict) assert d == {('ren', 1): {'hobby': 'none'}, ('bob', 2): {'hobby': 'bowling'}, } def test_delitem(self, table_dict): del table_dict[('bob', 2)] assert dict(table_dict) == {('ren', 1): {'hobby': 'bowling'}} with pytest.raises(KeyError): del table_dict[('bob', 1)] def test_iter(self, table_dict): assert set(iter(table_dict)) == {('ren', 1), ('bob', 2)} def test_len(self, table_dict): assert len(table_dict) == 2 # TODO: test iterkeys, iteritems, itervalues class AppendableSequenceTester(object): @abstractmethod def empty_list(self): """An empty list object to be tested.""" pass @abstractmethod def reference_list(self): """A standard Python list containing at least 5 items.""" pass def test_append_getitem(self, empty_list, reference_list): lst = empty_list item = reference_list[0] lst.append(item) assert lst[0] == item def test_extend(self, empty_list, reference_list): lst = empty_list lst.extend(reference_list) for i, item in enumerate(reference_list): assert lst[i] == item assert len(lst) == len(reference_list) def test_len(self, empty_list, reference_list): lst = empty_list item = reference_list[0] lst.append(item) lst.append(item) lst.append(item) lst.append(item) assert len(lst) == 4 def test_iter(self, empty_list, reference_list): lst = empty_list lst.extend(reference_list) for i, item in enumerate(lst): assert item == reference_list[i] def test_slice(self, empty_list, reference_list): lst = empty_list lst.extend(reference_list) assert list(lst[0:2:5]) == reference_list[0:2:5] class FileSerializerExample(FileSerializer): def to_line(self, s): return s def from_line(self, line): return line class FileSerializerTester(object): __metaclass__ = ABCMeta @abstractmethod def serializer(self): pass @abstractmethod def object(self): pass def test_serializer(self, serializer, object): line = serializer.to_line(object) new_obj = serializer.from_line(line) assert new_obj == object class TestFileSequence(AppendableSequenceTester): @pytest.yield_fixture def empty_list(self, tmpdir): path = tmpdir.join('test_file_list.txt') # whether to use gzip with FileSequence(str(path), FileSerializerExample()) as seq: yield seq @pytest.fixture def reference_list(self): return 'a b c d e f g'.split() def test_json_newline(self, tmpdir): path = str(tmpdir.join('test_json_items.txt')) ser = CustomSerializer(lambda o: json.dumps(o), lambda l: json.loads(l)) fs = FileSequence(path, ser) items = ['hey\nthere', 'two\nobjects serialized'] fs.extend(items) for i, val in enumerate(fs): assert val == items[i] def test_reload(self, empty_list, reference_list): empty_list.extend(reference_list) l = empty_list new_l = FileSequence(l.path, l._ser) assert len(new_l) == len(l) for i1, i2 in zip(new_l, l): assert i1 == i2 class TestShardedSequence(AppendableSequenceTester): @pytest.yield_fixture def empty_list(self, tmpdir): path = str(tmpdir) shard_size = 3 with ShardedSequence(path, shard_size, FileSerializerExample()) as seq: yield seq @pytest.fixture def reference_list(self): return [str(i) for i in range(16)] def test_reload(self, empty_list, reference_list): empty_list.extend(reference_list) # populate the list l = empty_list # reload it new_l = ShardedSequence(l.directory, l.shard_size, FileSerializerExample()) assert len(new_l) == len(l) for i1, i2 in zip(new_l, l): assert i1 == i2 class FileSequenceExample(FileSequence): def __init__(self, path): ser = FileSerializerExample() super(FileSequenceExample, self).__init__(path, ser) class TableMappingExample(TableMapping): def __init__(self, metadata): key_orm = SimpleORM(ORMColumn('key', Integer)) val_orm = SimpleORM(ORMColumn('val', String)) super(TableMappingExample, self).__init__('tabledict_example', key_orm, val_orm, metadata) class TestTableMappingSpeed(object): @pytest.fixture(scope='session') def metadata(self): return MetaDataExample() @pytest.yield_fixture def file_list(self, tmpdir): path = tmpdir.join('test_file_list.txt') with FileSequenceExample(str(path)) as seq: yield seq @pytest.yield_fixture def raw_file(self, tmpdir): p = str(tmpdir.join('raw_file.txt')) with open(p, 'w') as f: yield f @pytest.yield_fixture def table_dict(self, metadata): metadata.drop_all() yield TableMappingExample(metadata) metadata.drop_all() def test_extend(self, raw_file, file_list, table_dict): def time_it(fxn): start = time.time() fxn() stop = time.time() return stop - start # 100 rows of text, each with 500,000 characters vals = ['a' * 500000] * 100 def extend_raw(): for v in vals: raw_file.write(v) raw_file.write('\n') def extend_file(): file_list.extend(vals) def extend_dict(): d = {i: v for i, v in enumerate(vals)} table_dict.update(d) raw_time = time_it(extend_raw) file_time = time_it(extend_file) dict_time = time_it(extend_dict) # just make sure we did the inserts assert len(file_list) == 100 assert len(table_dict) == 100 assert file_time < raw_time * 2 # TableDict should not be more than 20x slower than file # On average, seems to be about 15x slower assert dict_time < file_time * 20 # should take less than two seconds assert dict_time < 2 class LazyIteratorExample(LazyIterator): def __init__(self): cache = [] super(LazyIteratorExample, self).__init__(cache) def compute_batch(self, k): batch = [] for i in range(k): item = self.iterated + i if item == 15: break batch.append(item) return batch class TestLazyIterator(object): @pytest.fixture def iterator(self): return LazyIteratorExample() def test_iter(self, iterator): assert list(iterator) == range(15) def test_next_batch(self, iterator): assert iterator.next_batch(6) == [0, 1, 2, 3, 4, 5] assert iterator.next_batch(2) == [6, 7] assert iterator.next_batch(5) == [8, 9, 10, 11, 12] assert iterator.next_batch(8) == [13, 14] with pytest.raises(StopIteration): iterator.next_batch(1) class ExampleBatchIterator(BatchIterator): def __init__(self, total): self.iterated = 0 self.total = total super(ExampleBatchIterator, self).__init__(default_batch_size=30) def next_batch(self, k): batch = [self.iterated + i for i in range(k)] batch = [b for b in batch if b < self.total] if len(batch) == 0: raise StopIteration self.iterated += len(batch) return batch class TestBatchIterator(object): @pytest.fixture def iterator(self): return ExampleBatchIterator(8) def test_iterator(self, iterator): assert list(iterator) == [0, 1, 2, 3, 4, 5, 6, 7] class TestSequenceSlice(object): @pytest.fixture def seq(self): return range(10) def test_full(self, seq): ss = list(SequenceSlice(seq, slice(2, 8, 3))) assert ss == [2, 5] def test_partial(self, seq): ss = list(SequenceSlice(seq, slice(None, 8, 3))) assert ss == [0, 3, 6] ss = list(SequenceSlice(seq, slice(None, 8, None))) assert ss == [0, 1, 2, 3, 4, 5, 6, 7] ss = list(SequenceSlice(seq, slice(None, None, None))) assert ss == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] def test_negative(self, seq): ss = SequenceSlice(seq, slice(None, 8, 3)) assert ss[-1] == 6 assert ss[-2] == 3 assert ss[-3] == 0 with pytest.raises(IndexError): ss[-4]
apache-2.0
4,992,345,303,471,828,000
28.082267
123
0.588886
false
pytorch/vision
.circleci/unittest/linux/scripts/run-clang-format.py
1
11280
#!/usr/bin/env python """ MIT License Copyright (c) 2017 Guillaume Papin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ """A wrapper script around clang-format, suitable for linting multiple files and to use for continuous integration. This is an alternative API for the clang-format command line. It runs over multiple files and directories in parallel. A diff output is produced and a sensible exit code is returned. """ import argparse import codecs import difflib import fnmatch import io import multiprocessing import os import signal import subprocess import sys import traceback from functools import partial try: from subprocess import DEVNULL # py3k except ImportError: DEVNULL = open(os.devnull, "wb") DEFAULT_EXTENSIONS = 'c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx,cu' class ExitStatus: SUCCESS = 0 DIFF = 1 TROUBLE = 2 def list_files(files, recursive=False, extensions=None, exclude=None): if extensions is None: extensions = [] if exclude is None: exclude = [] out = [] for file in files: if recursive and os.path.isdir(file): for dirpath, dnames, fnames in os.walk(file): fpaths = [os.path.join(dirpath, fname) for fname in fnames] for pattern in exclude: # os.walk() supports trimming down the dnames list # by modifying it in-place, # to avoid unnecessary directory listings. dnames[:] = [ x for x in dnames if not fnmatch.fnmatch(os.path.join(dirpath, x), pattern) ] fpaths = [ x for x in fpaths if not fnmatch.fnmatch(x, pattern) ] for f in fpaths: ext = os.path.splitext(f)[1][1:] if ext in extensions: out.append(f) else: out.append(file) return out def make_diff(file, original, reformatted): return list( difflib.unified_diff( original, reformatted, fromfile='{}\t(original)'.format(file), tofile='{}\t(reformatted)'.format(file), n=3)) class DiffError(Exception): def __init__(self, message, errs=None): super(DiffError, self).__init__(message) self.errs = errs or [] class UnexpectedError(Exception): def __init__(self, message, exc=None): super(UnexpectedError, self).__init__(message) self.formatted_traceback = traceback.format_exc() self.exc = exc def run_clang_format_diff_wrapper(args, file): try: ret = run_clang_format_diff(args, file) return ret except DiffError: raise except Exception as e: raise UnexpectedError('{}: {}: {}'.format(file, e.__class__.__name__, e), e) def run_clang_format_diff(args, file): try: with io.open(file, 'r', encoding='utf-8') as f: original = f.readlines() except IOError as exc: raise DiffError(str(exc)) invocation = [args.clang_format_executable, file] # Use of utf-8 to decode the process output. # # Hopefully, this is the correct thing to do. # # It's done due to the following assumptions (which may be incorrect): # - clang-format will returns the bytes read from the files as-is, # without conversion, and it is already assumed that the files use utf-8. # - if the diagnostics were internationalized, they would use utf-8: # > Adding Translations to Clang # > # > Not possible yet! # > Diagnostic strings should be written in UTF-8, # > the client can translate to the relevant code page if needed. # > Each translation completely replaces the format string # > for the diagnostic. # > -- http://clang.llvm.org/docs/InternalsManual.html#internals-diag-translation try: proc = subprocess.Popen( invocation, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, encoding='utf-8') except OSError as exc: raise DiffError( "Command '{}' failed to start: {}".format( subprocess.list2cmdline(invocation), exc ) ) proc_stdout = proc.stdout proc_stderr = proc.stderr # hopefully the stderr pipe won't get full and block the process outs = list(proc_stdout.readlines()) errs = list(proc_stderr.readlines()) proc.wait() if proc.returncode: raise DiffError( "Command '{}' returned non-zero exit status {}".format( subprocess.list2cmdline(invocation), proc.returncode ), errs, ) return make_diff(file, original, outs), errs def bold_red(s): return '\x1b[1m\x1b[31m' + s + '\x1b[0m' def colorize(diff_lines): def bold(s): return '\x1b[1m' + s + '\x1b[0m' def cyan(s): return '\x1b[36m' + s + '\x1b[0m' def green(s): return '\x1b[32m' + s + '\x1b[0m' def red(s): return '\x1b[31m' + s + '\x1b[0m' for line in diff_lines: if line[:4] in ['--- ', '+++ ']: yield bold(line) elif line.startswith('@@ '): yield cyan(line) elif line.startswith('+'): yield green(line) elif line.startswith('-'): yield red(line) else: yield line def print_diff(diff_lines, use_color): if use_color: diff_lines = colorize(diff_lines) sys.stdout.writelines(diff_lines) def print_trouble(prog, message, use_colors): error_text = 'error:' if use_colors: error_text = bold_red(error_text) print("{}: {} {}".format(prog, error_text, message), file=sys.stderr) def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument( '--clang-format-executable', metavar='EXECUTABLE', help='path to the clang-format executable', default='clang-format') parser.add_argument( '--extensions', help='comma separated list of file extensions (default: {})'.format( DEFAULT_EXTENSIONS), default=DEFAULT_EXTENSIONS) parser.add_argument( '-r', '--recursive', action='store_true', help='run recursively over directories') parser.add_argument('files', metavar='file', nargs='+') parser.add_argument( '-q', '--quiet', action='store_true') parser.add_argument( '-j', metavar='N', type=int, default=0, help='run N clang-format jobs in parallel' ' (default number of cpus + 1)') parser.add_argument( '--color', default='auto', choices=['auto', 'always', 'never'], help='show colored diff (default: auto)') parser.add_argument( '-e', '--exclude', metavar='PATTERN', action='append', default=[], help='exclude paths matching the given glob-like pattern(s)' ' from recursive search') args = parser.parse_args() # use default signal handling, like diff return SIGINT value on ^C # https://bugs.python.org/issue14229#msg156446 signal.signal(signal.SIGINT, signal.SIG_DFL) try: signal.SIGPIPE except AttributeError: # compatibility, SIGPIPE does not exist on Windows pass else: signal.signal(signal.SIGPIPE, signal.SIG_DFL) colored_stdout = False colored_stderr = False if args.color == 'always': colored_stdout = True colored_stderr = True elif args.color == 'auto': colored_stdout = sys.stdout.isatty() colored_stderr = sys.stderr.isatty() version_invocation = [args.clang_format_executable, str("--version")] try: subprocess.check_call(version_invocation, stdout=DEVNULL) except subprocess.CalledProcessError as e: print_trouble(parser.prog, str(e), use_colors=colored_stderr) return ExitStatus.TROUBLE except OSError as e: print_trouble( parser.prog, "Command '{}' failed to start: {}".format( subprocess.list2cmdline(version_invocation), e ), use_colors=colored_stderr, ) return ExitStatus.TROUBLE retcode = ExitStatus.SUCCESS files = list_files( args.files, recursive=args.recursive, exclude=args.exclude, extensions=args.extensions.split(',')) if not files: return njobs = args.j if njobs == 0: njobs = multiprocessing.cpu_count() + 1 njobs = min(len(files), njobs) if njobs == 1: # execute directly instead of in a pool, # less overhead, simpler stacktraces it = (run_clang_format_diff_wrapper(args, file) for file in files) pool = None else: pool = multiprocessing.Pool(njobs) it = pool.imap_unordered( partial(run_clang_format_diff_wrapper, args), files) while True: try: outs, errs = next(it) except StopIteration: break except DiffError as e: print_trouble(parser.prog, str(e), use_colors=colored_stderr) retcode = ExitStatus.TROUBLE sys.stderr.writelines(e.errs) except UnexpectedError as e: print_trouble(parser.prog, str(e), use_colors=colored_stderr) sys.stderr.write(e.formatted_traceback) retcode = ExitStatus.TROUBLE # stop at the first unexpected error, # something could be very wrong, # don't process all files unnecessarily if pool: pool.terminate() break else: sys.stderr.writelines(errs) if outs == []: continue if not args.quiet: print_diff(outs, use_color=colored_stdout) if retcode == ExitStatus.SUCCESS: retcode = ExitStatus.DIFF return retcode if __name__ == '__main__': sys.exit(main())
bsd-3-clause
-5,974,119,727,037,007,000
30.07438
87
0.596543
false
aissehust/sesame-paste-noodle
mlbase/tests/smoke.py
1
26037
import theano import theano.tensor as T import mlbase.network as N import h5py import numpy as np import mlbase.layers.activation as act import mlbase.loaddata as l from mlbase.layers import * import mlbase.cost as cost from skimage.measure import block_reduce def test_generative(): import mlbase.cost as cost import mlbase.layers.activation as act import h5py network = N.Network() network.debug = True network.setInput(N.RawInput((1, 28,28))) network.append(N.Conv2d(feature_map_multiplier=32)) network.append(act.Relu()) network.append(N.Pooling()) network.append(N.Conv2d(feature_map_multiplier=2)) network.append(act.Relu()) network.append(N.Pooling()) network.append(UpConv2d(feature_map_multiplier=2)) network.append(act.Relu()) network.append(UpConv2d(feature_map_multiplier=32)) network.append(act.Relu()) #network.append(N.Flatten()) #network.append(N.FullConn(input_feature=1152, output_feature=1152*2)) #network.append(N.Relu()) #network.append(N.FullConn(input_feature=1152*2, output_feature=10)) #network.append(N.SoftMax()) network.costFunction = cost.ImageSSE network.inputOutputType = (T.tensor4(), T.tensor4(),) network.build() f = h5py.File('/hdd/home/yueguan/workspace/data/mnist/mnist.hdf5', 'r') trX = f['x_train'][:,:].reshape(-1, 1, 28, 28) teX = f['x_test'][:,:].reshape(-1, 1, 28, 28) trY = np.zeros((f['t_train'].shape[0], 10)) trY[np.arange(len(f['t_train'])), f['t_train']] = 1 teY = np.zeros((f['t_test'].shape[0], 10)) teY[np.arange(len(f['t_test'])), f['t_test']] = 1 for i in range(5000): print(i) #network.train(trX, trY) #print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) network.train(trX, trX) print(np.sum((teX - network.predict(teX)) * (teX - network.predict(teX)))) # the following is the piece to load model and predict a image. #import mlbase.networkhelper as N #import mlbase.cost as cost #import theano.tensor as T #import mlbase.loaddata as l #from PIL import Image # #n = N.Network() #n.loadFromFile('/hdd/home/yueguan/workspace/sesame-paste-noodle-dev/expdata/saved_model_LAST') #n.costFunction = cost.ImageSSE #n.inputOutputType = (T.tensor4(), T.tensor4(),) # #n.build(reload=True) # #trX, trY, teX, teY = l.load_mnist() #result = n.predict(trX[0:1]) #result = (result > 0).astype(float)*255.0 # # #im = Image.fromarray(result[0][0]) #if im.mode != 'RGB': # im = im.convert('RGB') # #im.save('result.jpg') def test_resnet(): import mlbase.network as N import h5py network = N.Network() network.debug = True network.setInput(N.RawInput((1,28,28))) network.append(N.Conv2d(feature_map_multiplier=32)) network.append(ResLayer()) network.append(ResLayer()) network.append(ResLayer()) network.append(ResLayer(increase_dim=True)) network.append(ResLayer()) network.append(ResLayer()) network.append(ResLayer()) network.append(ResLayer(increase_dim=True)) network.append(ResLayer()) network.append(ResLayer()) network.append(ResLayer()) network.append(N.GlobalPooling()) network.append(N.FullConn(input_feature=128, output_feature=10)) network.append(N.SoftMax()) network.build() f = h5py.File('/hdd/home/yueguan/workspace/data/mnist/mnist.hdf5', 'r') trX = f['x_train'][:,:].reshape(-1, 1, 28, 28) teX = f['x_test'][:,:].reshape(-1, 1, 28, 28) trY = np.zeros((f['t_train'].shape[0], 10)) trY[np.arange(len(f['t_train'])), f['t_train']] = 1 teY = np.zeros((f['t_test'].shape[0], 10)) teY[np.arange(len(f['t_test'])), f['t_test']] = 1 for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) def test_deeper(): import h5py network = N.Network() network.debug = True network.setInput(N.RawInput((1,28,28))) network.append(N.Conv2d(feature_map_multiplier=32)) for _ in range(3): network.append(ResLayer()) network.append(ResLayer(increase_dim=True)) for _ in range(3): network.append(ResLayer()) network.append(ResLayer(increase_dim=True)) for _ in range(3): network.append(ResLayer()) network.append(N.GlobalPooling()) network.append(N.FullConn(input_feature=128, output_feature=10)) network.append(N.SoftMax()) network.build() f = h5py.File('/hdd/home/yueguan/workspace/data/mnist/mnist.hdf5', 'r') trX = f['x_train'][:,:].reshape(-1, 1, 28, 28) teX = f['x_test'][:,:].reshape(-1, 1, 28, 28) trY = np.zeros((f['t_train'].shape[0], 10)) trY[np.arange(len(f['t_train'])), f['t_train']] = 1 teY = np.zeros((f['t_test'].shape[0], 10)) teY[np.arange(len(f['t_test'])), f['t_test']] = 1 for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) def test_binaryinput(): network = N.Network() network.debug = True network.setInput(RawInput((1, 28,28))) network.append(Conv2d(filter_size=(3,3), input_feature=1, output_feature=32)) network.append(Relu()) network.append(Pooling((2,2))) network.append(Binarize()) network.append(Conv2d(filter_size=(3,3), input_feature=32, output_feature=64)) network.append(Relu()) network.append(Pooling((2,2))) network.append(Binarize()) network.append(Conv2d(filter_size=(3,3), input_feature=64, output_feature=128)) network.append(Relu()) network.append(Pooling((2,2))) network.append(Flatten()) network.append(FullConn(input_feature=1152, output_feature=1152*2)) network.append(Relu()) network.append(FullConn(input_feature=1152*2, output_feature=10)) network.append(SoftMax()) network.build() f = h5py.File('/hdd/home/yueguan/workspace/data/mnist/mnist.hdf5', 'r') trX = f['x_train'][:,:].reshape(-1, 1, 28, 28) teX = f['x_test'][:,:].reshape(-1, 1, 28, 28) trY = np.zeros((f['t_train'].shape[0], 10)) trY[np.arange(len(f['t_train'])), f['t_train']] = 1 teY = np.zeros((f['t_test'].shape[0], 10)) teY[np.arange(len(f['t_test'])), f['t_test']] = 1 for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) def test_binaryweight(): network = N.Network() network.debug = True network.setInput(RawInput((1, 28,28))) network.append(Conv2d(feature_map_multiplier=32)) network.append(Relu()) network.append(Pooling((2,2))) network.append(Binarize()) network.append(Conv2d(feature_map_multiplier=2)) network.append(Relu()) network.append(Pooling((2,2))) network.append(Binarize()) network.append(BinaryConv2d(feature_map_multiplier=2)) network.append(Relu()) network.append(Pooling((2,2))) network.append(Flatten()) network.append(FullConn(input_feature=1152, output_feature=1152*2)) network.append(Relu()) network.append(FullConn(input_feature=1152*2, output_feature=10)) network.append(SoftMax()) network.build() f = h5py.File('/hdd/home/yueguan/workspace/data/mnist/mnist.hdf5', 'r') trX = f['x_train'][:,:].reshape(-1, 1, 28, 28) teX = f['x_test'][:,:].reshape(-1, 1, 28, 28) trY = np.zeros((f['t_train'].shape[0], 10)) trY[np.arange(len(f['t_train'])), f['t_train']] = 1 teY = np.zeros((f['t_test'].shape[0], 10)) teY[np.arange(len(f['t_test'])), f['t_test']] = 1 for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) def test_unet(): n = N.Network() def unet_dag(): x1 = DAGPlan.input() y1 = Relu(Conv2d(Relu(Conv2d(x1)))) x2 = Pooling(y1) y2 = Relu(Conv2d(Relu(Conv2d(x2)))) x3 = Pooling(y2) y3 = Relu(Conv2d(Relu(Conv2d(x3)))) #x4 = y2 // conv.UpConv2d(y3) x4 = CropConcat(y2, UpConv2d(y3)) y4 = Relu(Conv2d(Relu(Conv2d(x4)))) #x5 = y1 // conv.UpConv2d(y4) x5 = CropConcat(y1, UpConv2d(y4)) y5 = Relu(Conv2d(Relu(Conv2d(x5)))) return y5 dagplan = unet_dag() class UNet(Layer, metaclass=DAG, dag=dagplan, yaml_tag=u'!UNet', type_name='UNet'): pass n.setInput(RawInput((1, 420//2, 580//2))) n.append(Conv2d(feature_map_multiplier=4)) n.append(Relu()) n.append(UNet()) n.append(Conv2d(output_feature=1)) n.batchSize = 32 n.costFunction = cost.ImageDice n.inputOutputType = (T.tensor4(), T.tensor4(),) n.build() trX, trY, teX = l.load_kaggle_ultrasound() trX = block_reduce(trX, block_size=(1,1,2,2), func=np.mean) trY = block_reduce(trY, block_size=(1,1,2,2), func=np.mean) teX = block_reduce(teX, block_size=(1,1,2,2), func=np.mean) trX = trX[:]/255.0 trY = trY[:]/255.0 teX = teX[:]/255.0 for i in range(5000): print(i) n.train(trX, trX[:,:,:208, :288]) #n.train(trX, trX) #print(np.sum((teX - network.predict(teX)) * (teX - network.predict(teX)))) def test_seqlayer(): network = N.Network() network.debug = True class ConvNN(layer.Layer, metaclass=compose.SeqLayer, seq=[Conv2d, act.Relu, pooling.Pooling], yaml_tag=u'!ConvNN', type_name='ConvNN'): def __init__(self, feature_map_multiplier=1): super().__init__() self.bases[0] = Conv2d(feature_map_multiplier=feature_map_multiplier) network.setInput(RawInput((1, 28,28))) network.append(ConvNN(feature_map_multiplier=32)) network.append(ConvNN(feature_map_multiplier=2)) network.append(ConvNN(feature_map_multiplier=2)) network.append(reshape.Flatten()) network.append(fullconn.FullConn(input_feature=1152, output_feature=1152*2)) network.append(act.Relu()) network.append(fullconn.FullConn(input_feature=1152*2, output_feature=10)) network.append(output.SoftMax()) network.build() trX, trY, teX, teY = l.load_mnist() for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) def testload(): n = N.Network() n.loadFromFile() n.saveToFile('testmodel') def test_maxout(): network = N.Network() network.setInput(RawInput((1, 28,28))) network.append(conv.Conv2d(filter_size=(3,3), feature_map_multiplier=128)) network.append(pooling.FeaturePooling(4)) network.append(pooling.Pooling((2,2))) network.append(conv.Conv2d(filter_size=(3,3), feature_map_multiplier=8)) network.append(pooling.FeaturePooling(4)) network.append(pooling.Pooling((2,2))) network.append(conv.Conv2d(filter_size=(3,3), feature_map_multiplier=8)) network.append(pooling.FeaturePooling(4)) network.append(pooling.GlobalPooling()) network.append(fullconn.FullConn(input_feature=128, output_feature=10)) network.append(output.SoftMax()) network.build() trX, trY, teX, teY = l.load_mnist() for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) def test_globalpooling(): network = N.Network() network.debug = True network.setInput(RawInput((1, 28,28))) network.append(conv.Conv2d(filter_size=(3,3), feature_map_multiplier=32)) network.append(bn.BatchNormalization()) network.append(act.Relu()) network.append(polling.Pooling((2,2))) network.append(conv.Conv2d(filter_size=(3,3), feature_map_multiplier=2)) network.append(bn.BatchNormalization()) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(conv.Conv2d(filter_size=(3,3), feature_map_multiplier=2)) network.append(bn.BatchNormalization()) network.append(act.Relu()) network.append(pooling.GlobalPooling()) network.append(fullconn.FullConn(input_feature=128, output_feature=10)) network.append(output.SoftMax()) network.build() f = h5py.File('/hdd/home/yueguan/workspace/data/mnist/mnist.hdf5', 'r') trX = f['x_train'][:,:].reshape(-1, 1, 28, 28) teX = f['x_test'][:,:].reshape(-1, 1, 28, 28) trY = np.zeros((f['t_train'].shape[0], 10)) trY[np.arange(len(f['t_train'])), f['t_train']] = 1 teY = np.zeros((f['t_test'].shape[0], 10)) teY[np.arange(len(f['t_test'])), f['t_test']] = 1 for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) def test5(): network = N.Network() network.debug = True network.setInput(RawInput((1, 28,28))) network.append(conv.Conv2d(filter_size=(3,3), feature_map_multiplier=32)) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(conv.Conv2d(filter_size=(3,3), feature_map_multiplier=2)) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(conv.Conv2d(filter_size=(3,3), feature_map_multiplier=2)) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(reshape.Flatten()) network.append(fullconn.FullConn(input_feature=1152, output_feature=1152*2)) network.append(act.Relu()) network.append(fullconn.FullConn(input_feature=1152*2, output_feature=10)) network.append(output.SoftMax()) network.build() f = h5py.File('/hdd/home/yueguan/workspace/data/mnist/mnist.hdf5', 'r') trX = f['x_train'][:,:].reshape(-1, 1, 28, 28) teX = f['x_test'][:,:].reshape(-1, 1, 28, 28) trY = np.zeros((f['t_train'].shape[0], 10)) trY[np.arange(len(f['t_train'])), f['t_train']] = 1 teY = np.zeros((f['t_test'].shape[0], 10)) teY[np.arange(len(f['t_test'])), f['t_test']] = 1 for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) def testbn(): network = N.Network() network.debug = True network.setSaveInterval(10) network.setInput(RawInput((1, 28,28))) network.append(conv.Conv2d(filter_size=(3,3), input_feature=1, output_feature=32)) network.append(N.BatchNormalization()) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(conv.Conv2d(filter_size=(3,3), input_feature=32, output_feature=64)) network.append(N.BatchNormalization()) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(conv.Conv2d(filter_size=(3,3), input_feature=64, output_feature=128)) network.append(N.BatchNormalization()) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(reshape.Flatten()) network.append(fullconn.FullConn(input_feature=1152, output_feature=1152*2)) network.append(act.Relu()) network.append(fullconn.FullConn(input_feature=1152*2, output_feature=10)) network.append(output.SoftMax()) network.build() f = h5py.File('/hdd/home/yueguan/workspace/data/mnist/mnist.hdf5', 'r') trX = f['x_train'][:,:].reshape(-1, 1, 28, 28) teX = f['x_test'][:,:].reshape(-1, 1, 28, 28) trY = np.zeros((f['t_train'].shape[0], 10)) trY[np.arange(len(f['t_train'])), f['t_train']] = 1 teY = np.zeros((f['t_test'].shape[0], 10)) teY[np.arange(len(f['t_test'])), f['t_test']] = 1 for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) def test(): network = N.Network() network.debug = True network.setInput(RawInput((28,28))) network.append(conv.Conv2d(filter_size=(3,3), input_feature=1, output_feature=32)) network.append(act.Relu()) network.append(conv.Conv2d(filter_size=(2,2), input_feature=32, output_feature=32, subsample=(2,2),border='valid')) network.append(conv.Conv2d(filter_size=(3,3), input_feature=32, output_feature=64)) network.append(act.Relu()) network.append(conv.Conv2d(filter_size=(2,2), input_feature=64, output_feature=64, subsample=(2,2),border='valid')) network.append(conv.Conv2d(filter_size=(3,3), input_feature=64, output_feature=128)) network.append(act.Relu()) network.append(conv.Conv2d(filter_size=(2,2), input_feature=128, output_feature=128, subsample=(2,2),border='valid')) network.append(reshape.Flatten()) network.append(fullconn.FullConn(input_feature=1152, output_feature=1152*2)) network.append(act.Relu()) network.append(fullconn.FullConn(input_feature=1152*2, output_feature=10)) network.append(output.SoftMax()) network.build() print(network) f = h5py.File('/hdd/home/yueguan/workspace/data/mnist/mnist.hdf5', 'r') trX = f['x_train'][:,:].reshape(-1, 1, 28, 28) teX = f['x_test'][:,:].reshape(-1, 1, 28, 28) trY = np.zeros((f['t_train'].shape[0], 10)) trY[np.arange(len(f['t_train'])), f['t_train']] = 1 teY = np.zeros((f['t_test'].shape[0], 10)) teY[np.arange(len(f['t_test'])), f['t_test']] = 1 for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) def test4(): network = N.Network() network.debug = True network.setInput(RawInput((28,28))) network.append(conv.Conv2d(filter_size=(3,3), input_feature=1, output_feature=32)) network.append(act.Relu()) network.append(conv.Conv2d(filter_size=(2,2), input_feature=32, output_feature=32, subsample=(2,2),border='valid')) network.append(conv.Conv2d(filter_size=(3,3), input_feature=32, output_feature=64)) network.append(act.Relu()) network.append(conv.Conv2d(filter_size=(2,2), input_feature=64, output_feature=64, subsample=(2,2),border='valid')) network.append(conv.Conv2d(filter_size=(3,3), input_feature=64, output_feature=128)) network.append(act.Relu()) network.append(conv.Conv2d(filter_size=(2,2), input_feature=128, output_feature=128, subsample=(2,2),border='valid')) network.append(reshape.Flatten()) network.append(fullconn.FullConn(input_feature=1152, output_feature=1152*2)) network.append(act.Relu()) network.append(fullconn.FullConn(input_feature=1152*2, output_feature=10)) network.append(output.SoftMax()) network.build() f = h5py.File('/hdd/home/yueguan/workspace/data/mnist/mnist.hdf5', 'r') trX = f['x_train'][:,:].reshape(-1, 1, 28, 28) teX = f['x_test'][:,:].reshape(-1, 1, 28, 28) trY = np.zeros((f['t_train'].shape[0], 10)) trY[np.arange(len(f['t_train'])), f['t_train']] = 1 teY = np.zeros((f['t_test'].shape[0], 10)) teY[np.arange(len(f['t_test'])), f['t_test']] = 1 for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) # test3() def test3(): network = N.Network() network.debug = True network.setInput(RawInput((28,28))) network.append(conv.Conv2d(filter_size=(3,3), input_feature=1, output_feature=32)) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(conv.Conv2d(filter_size=(3,3), input_feature=32, output_feature=64)) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(conv.Conv2d(filter_size=(3,3), input_feature=64, output_feature=128)) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(reshape.Flatten()) network.append(fullconn.FullConn(input_feature=1152, output_feature=1152*2)) network.append(act.Relu()) network.append(fullconn.FullConn(input_feature=1152*2, output_feature=10)) network.append(output.SoftMax()) network.build() f = h5py.File('/hdd/home/yueguan/workspace/data/mnist/mnist.hdf5', 'r') trX = f['x_train'][:,:].reshape(-1, 1, 28, 28) teX = f['x_test'][:,:].reshape(-1, 1, 28, 28) trY = np.zeros((f['t_train'].shape[0], 10)) trY[np.arange(len(f['t_train'])), f['t_train']] = 1 teY = np.zeros((f['t_test'].shape[0], 10)) teY[np.arange(len(f['t_test'])), f['t_test']] = 1 for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) # test2() def test2(): network = N.Network() network.debug = True #network.setInput(RawInput((1, 28,28))) #network.append(conv.Conv2d(feature_map_multiplier=32)) #network.append(act.Relu()) #network.append(pooling.Pooling()) #network.append(conv.Conv2d(feature_map_multiplier=2)) #network.append(act.Relu()) #network.append(pooling.Pooling()) #network.append(conv.Conv2d(feature_map_multiplier=2)) #network.append(act.Relu()) #network.append(pooling.Pooling()) #network.append(reshape.Flatten()) #network.append(fullconn.FullConn(input_feature=1152, output_feature=1152*2)) #network.append(act.Relu()) #network.append(fullconn.FullConn(input_feature=1152*2, output_feature=10)) #network.append(output.SoftMax()) li = RawInput((1, 28,28)) network.setInput(li) lc1 = conv.Conv2d(feature_map_multiplier=32) la1 = act.Relu() lp1 = pooling.Pooling() lc2 = conv.Conv2d(feature_map_multiplier=2) la2 = act.Relu() lp2 = pooling.Pooling() lc3 = conv.Conv2d(feature_map_multiplier=2) la3 = act.Relu() lp3 = pooling.Pooling() lf = reshape.Flatten() lfc1 = fullconn.FullConn(input_feature=1152, output_feature=1152*2) la4 = act.Relu() lfc2 = fullconn.FullConn(input_feature=1152*2, output_feature=10) lsm = output.SoftMax() network.connect(li, lc1) network.connect(lc1, la1) network.connect(la1, lp1) network.connect(lp1, lc2) network.connect(lc2, la2) network.connect(la2, lp2) network.connect(lp2, lc3) network.connect(lc3, la3) network.connect(la3, lp3) network.connect(lp3, lf) network.connect(lf, lfc1) network.connect(lfc1, la4) network.connect(la4, lfc2) network.connect(lfc2, lsm) network.build() trX, trY, teX, teY = l.load_mnist() for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(network.predict(teX), axis=1))) # test1(): def test1(): network = N.Network() network.debug = True network.setInput((28,28)) network.append(conv.Conv2d(filter=(3,3), input_feature=1, output_feature=32)) network.append(act.Relu()) network.append(conv.Conv2d(filter=(3,3), input_feature=32, output_feature=32)) network.append(act.Relu()) network.append(conv.Conv2d(filter=(3,3), input_feature=32, output_feature=32)) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(conv.Conv2d(filter=(3,3), input_feature=32, output_feature=64)) network.append(act.Relu()) network.append(conv.Conv2d(filter=(3,3), input_feature=64, output_feature=64)) network.append(act.Relu()) network.append(conv.Conv2d(filter=(3,3), input_feature=64, output_feature=64)) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(conv.Conv2d(filter=(3,3), input_feature=64, output_feature=128)) network.append(act.Relu()) network.append(conv.Conv2d(filter=(3,3), input_feature=128, output_feature=128)) network.append(act.Relu()) network.append(conv.Conv2d(filter=(3,3), input_feature=128, output_feature=128)) network.append(act.Relu()) network.append(pooling.Pooling((2,2))) network.append(reshape.Flatten()) network.append(fullconn.FullConn(input_feature=1152, output_feature=1152*2)) network.append(act.Relu()) network.append(fullconn.FullConn(input_feature=1152*2, output_feature=10)) network.append(output.SoftMax()) #network.setCost(N.CategoryCrossEntropy) network.build() f = h5py.File('/hdd/home/yueguan/workspace/data/mnist/mnist.hdf5', 'r') trX = f['x_train'][:,:].reshape(-1, 1, 28, 28) teX = f['x_test'][:,:].reshape(-1, 1, 28, 28) trY = np.zeros((f['t_train'].shape[0], 10)) trY[np.arange(len(f['t_train'])), f['t_train']] = 1 teY = np.zeros((f['t_test'].shape[0], 10)) teY[np.arange(len(f['t_test'])), f['t_test']] = 1 for i in range(5000): print(i) network.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == network.predict(teX))) def test_mlp(): n = N.Network() n.setInput(RawInput((1, 28, 28))) n.append(Flatten()) n.append(FullConn(feature_map_multiplier=2)) n.append(Elu()) n.append(FullConn(output_feature=10)) n.append(output.SoftMax()) n.build() trX, trY, teX, teY = l.load_mnist() for i in range(100): print(i) n.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(n.predict(teX), axis=1))) def test_show_internal(): n = N.Network() n.setInput(RawInput((1, 28, 28))) n.append(Flatten(), "flatten") n.append(FullConn(feature_map_multiplier=2), "fc1") n.append(Elu(), "layer1") n.append(FullConn(output_feature=10), "fc2") n.append(output.SoftMax(), "layer2") n.build() trX, trY, teX, teY = l.load_mnist() for i in range(100): print(i) n.train(trX, trY) print(1 - np.mean(np.argmax(teY, axis=1) == np.argmax(n.predict(teX), axis=1))) n.predict(teX, stub=["layer1", "layer2"]) if __name__ == "__main__": test_mlp()
bsd-3-clause
4,741,205,503,026,675,000
33.855422
121
0.631601
false
com4/eventmq
eventmq/publisher.py
2
2447
# This file is part of eventmq. # # eventmq is free software: you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) # any later version. # # eventmq 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with eventmq. If not, see <http://www.gnu.org/licenses/>. """ :mod:`publisher` -- Publisher ======================= Publishes messages to subscribers """ import logging import zmq from . import constants from .utils.devices import generate_device_name logger = logging.getLogger(__name__) class Publisher(): """ name (str): Name of this socket zcontext (:class:`zmq.Context`): socket context zsocket (:class:`zmq.Socket`): """ def __init__(self, *args, **kwargs): self.zcontext = kwargs.get('context', zmq.Context.instance()) self.name = kwargs.get('name', generate_device_name()) self.zsocket = kwargs.get('socket', self.zcontext.socket(zmq.PUB)) self.zsocket.setsockopt(zmq.IDENTITY, self.name) self.status = constants.STATUS.ready return def listen(self, addr=None): """ listen to address defined by `addr` Args: addr (str): Address to listen to as a connection string Raises: :class:`Exception` """ if self.ready: self.zsocket.bind(addr) self.status = constants.STATUS.connected logger.debug('Publisher %s: Listen to %s' % (self.name, addr)) else: raise Exception('Receiver %s not ready. status=%s' % (self.name, self.status)) def publish(self, topic, msg): logger.debug("Notifying topic: {}".format(topic)) return self.zsocket.send_multipart([topic, msg]) @property def ready(self): """ Property used to check if this receiver is ready. Returns: bool: True if the receiver is ready to connect or listen, otherwise False """ return self.status == constants.STATUS.ready
lgpl-2.1
9,049,493,517,715,643,000
29.974684
79
0.629342
false
VaclavDedik/classifier
classifier/models.py
1
5190
import numpy as np import operator from sklearn import naive_bayes from sklearn import svm, tree from kernels import GaussianKernel class AbstractModel(object): """Abstract model of a learning algorithm. When implementing a subclass, you have to implement method ``train``. Method ``predict`` is implemented by default. """ def __init__(self, feature_selector): """Default initializer requires only feature selector to be specified. If you want to add additional parameters to your implementation of the model, be sure to call this initializer in your initializer first. :param feature_selector: Feature selector class from package ``selectors``. """ self.feature_selector = feature_selector def train(self, documents): """Trains the model on the provided list of **labeled** documents. This method is expected to initialize some sort of predictor field(s) that will be used by method ``predict``, e.g. in Naive Bayes model, the initialized fields could be ``prior`` and ``likelihood``. :param documents: Labeled documents used to train the predictor. """ raise NotImplementedError() def predict(self, document, n=1): """Predicts label(s) for given document. Note that before running this method, method ``train`` must be run. :param document: Document to be labeled. :param n: Number of predictions, 1 by default. :returns: Predicted label(s) of the document in descending order. """ raise NotImplementedError() class BaselineModel(AbstractModel): """This baseline model always predict label that is the most frequent.""" def __init__(self, feature_selector): super(BaselineModel, self).__init__(feature_selector) def train(self, documents): X, Y = self.feature_selector.build(documents) labels_freq = {} for document in documents: if document.label in labels_freq: labels_freq[document.label] += 1 else: labels_freq[document.label] = 1 self.labels_freq = sorted(labels_freq.items(), reverse=True, key=operator.itemgetter(1)) def predict(self, document, n=1): top_n = self.labels_freq[:n] labels = map(lambda x: x[0], top_n) return labels class NaiveBayesModel(AbstractModel): """Naive Bayes model. No +1 smoothing is used in this model, the selector is expected to remove words that are not in the vocabulary. """ def __init__(self, feature_selector): super(NaiveBayesModel, self).__init__(feature_selector) def train(self, documents): X, Y = self.feature_selector.build(documents) nb = naive_bayes.GaussianNB() nb.fit(X, np.concatenate(Y)) self.nb = nb def predict(self, document, n=1): x = self.feature_selector.get_x(document) probs = self.nb.predict_proba([x])[0] Y = probs.argsort()[::-1] labels = map(self.feature_selector.get_label, Y) return labels[:n] def __str__(self): return "NaiveBayesModel(feature_selector=%s)" \ % self.feature_selector class SVMModel(AbstractModel): """Support Vector Machine model.""" def __init__(self, feature_selector, kernel=GaussianKernel(), C=1, cache_size=200): super(SVMModel, self).__init__(feature_selector) self.C = C self.kernel = kernel self.cache_size = cache_size def train(self, documents): X, Y = self.feature_selector.build(documents) if hasattr(self.kernel, 'sklearn_name'): self.svm = svm.SVC(C=self.C, kernel=self.kernel.sklearn_name, probability=True, cache_size=self.cache_size, **self.kernel.sklearn_params) else: self.svm = svm.SVC(C=self.C, kernel=self.kernel.compute) self.svm.fit(X, np.concatenate(Y)) def predict(self, document, n=1): x = self.feature_selector.get_x(document) probs = self.svm.predict_proba([x])[0] Y = probs.argsort()[::-1] labels = map(self.feature_selector.get_label, Y) return labels[:n] def __str__(self): return "SVMModel(feature_selector=%s, kernel=%s, C=%s)" \ % (self.feature_selector, self.kernel, self.C) class CARTModel(AbstractModel): "Decision Tree Model using CART algorithm." def __init__(self, feature_selector): super(CARTModel, self).__init__(feature_selector) def train(self, documents): X, Y = self.feature_selector.build(documents) self.clf = tree.DecisionTreeClassifier() self.clf.fit(X, np.concatenate(Y)) def predict(self, document, n=1): x = self.feature_selector.get_x(document) probs = self.clf.predict_proba([x])[0] Y = probs.argsort()[::-1] labels = map(self.feature_selector.get_label, Y) return labels[:n] def __str__(self): return "CARTModel(feature_selector=%s)" % self.feature_selector
mit
-3,483,062,381,400,961,000
32.921569
78
0.618304
false
igabriel85/dmon-adp
pyadp.py
1
10665
from dataformatter import DataFormatter from pyQueryConstructor import QueryConstructor import os from dmonconnector import Connector from adplogger import logger from datetime import datetime import time if __name__ == '__main__': dataDir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data') modelDir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'models') #Standard query values # qte = 1475842980000 # qlte = 1475845200000 qgte = 1477911300000 qlte = 1477914720000 qsize = 0 qinterval = "10s" dmonEndpoint = '85.120.206.27' dmonConnector = Connector(dmonEndpoint) qConstructor = QueryConstructor() dformat = DataFormatter(dataDir) nodeList = dmonConnector.getNodeList() interval = dmonConnector.getInterval() if int(qinterval[:-1]) < interval['System']: logger.warning('[%s] : [WARN] System Interval smaller than set interval!', datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S')) # per slave unique process name list nodeProcessReduce = {} nodeProcessMap = {} # Get host based metrics for node in nodeList: # Query and file string load, load_file = qConstructor.loadString(node) memory, memory_file = qConstructor.memoryString(node) interface, interface_file = qConstructor.interfaceString(node) packet, packet_file = qConstructor.packetString(node) nodeManager, nodeManager_file = qConstructor.nodeManagerString(node) jvmNodeManager, jvmNodeManager_file = qConstructor.jvmnodeManagerString(node) #jvmMapTask, jvmMapTask_file = qConstructor.jvmMapTask(node) datanode, datanode_file = qConstructor.datanodeString(node) shuffle, shuffle_file = qConstructor.shuffleString(node) # Queries qload = qConstructor.systemLoadQuery(load, qgte, qlte, qsize, qinterval) qmemory = qConstructor.systemMemoryQuery(memory, qgte, qlte, qsize, qinterval) qinterface = qConstructor.systemInterfaceQuery(interface, qgte, qlte, qsize, qinterval) qpacket = qConstructor.systemInterfaceQuery(packet, qgte, qlte, qsize, qinterval) qnodeManager = qConstructor.yarnNodeManager(nodeManager, qgte, qlte, qsize, qinterval) qjvmNodeManager = qConstructor.jvmNNquery(jvmNodeManager, qgte, qlte, qsize, qinterval) #qjvmMapTask = qConstructor.jvmNNquery(jvmMapTask, qgte, qlte, qsize, qinterval) qdatanode = qConstructor.datanodeMetricsQuery(datanode, qgte, qlte, qsize, qinterval) qshuffle = qConstructor.shuffleQuery(shuffle, qgte, qlte, qsize, qinterval) # Execute query and convert response to csv qloadResponse = dmonConnector.aggQuery(qload) dformat.dict2csv(qloadResponse, qload, load_file) gmemoryResponse = dmonConnector.aggQuery(qmemory) #print gmemoryResponse dformat.dict2csv(gmemoryResponse, qmemory, memory_file) ginterfaceResponse = dmonConnector.aggQuery(qinterface) dformat.dict2csv(ginterfaceResponse, qinterface, interface_file) gpacketResponse = dmonConnector.aggQuery(qpacket) dformat.dict2csv(gpacketResponse, qpacket, packet_file) gnodeManagerResponse = dmonConnector.aggQuery(qnodeManager) if gnodeManagerResponse['aggregations'].values()[0].values()[0]: dformat.dict2csv(gnodeManagerResponse, qnodeManager, nodeManager_file) else: logger.info('[%s] : [INFO] Empty response from %s no Node Manager detected!', datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S'), node) gjvmNodeManagerResponse = dmonConnector.aggQuery(qjvmNodeManager) if gjvmNodeManagerResponse['aggregations'].values()[0].values()[0]: dformat.dict2csv(gjvmNodeManagerResponse, qjvmNodeManager, jvmNodeManager_file) else: logger.info('[%s] : [INFO] Empty response from %s no Node Manager detected!', datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S'), node) gshuffleResponse = dmonConnector.aggQuery(qshuffle) if gshuffleResponse['aggregations'].values()[0].values()[0]: dformat.dict2csv(gshuffleResponse, qshuffle, shuffle_file) else: logger.info('[%s] : [INFO] Empty response from %s no shuffle metrics!', datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S'), node) gdatanode = dmonConnector.aggQuery(qdatanode) if gdatanode['aggregations'].values()[0].values()[0]: dformat.dict2csv(gdatanode, qdatanode, datanode_file) else: logger.info('[%s] : [INFO] Empty response from %s no datanode metrics!', datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S'), node) # gjvmMapTaskResponse = dmonConnector.aggQuery(qjvmMapTask) # if gjvmMapTaskResponse['aggregations'].values()[0].values()[0]: # dformat.dict2csv(gjvmMapTaskResponse, qjvmMapTask, jvmMapTask_file) # else: # logger.info('[%s] : [INFO] Empty response from %s no Node Manager detected!', # datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S'), node) reduce = qConstructor.jvmRedProcessString(node) map = qConstructor.jvmMapProcessingString(node) qreduce = qConstructor.queryByProcess(reduce, qgte, qlte, 500, qinterval) qmap = qConstructor.queryByProcess(map, qgte, qlte, 500, qinterval) greduce = dmonConnector.aggQuery(qreduce) gmap = dmonConnector.aggQuery(qmap) uniqueReduce = set() for i in greduce['hits']['hits']: # print i['_source']['ProcessName'] uniqueReduce.add(i['_source']['ProcessName']) nodeProcessReduce[node] = list(uniqueReduce) uniqueMap = set() for i in gmap['hits']['hits']: # print i['_source']['ProcessName'] uniqueMap.add(i['_source']['ProcessName']) nodeProcessMap[node] = list(uniqueMap) # Get Process info by host and name for host, processes in nodeProcessReduce.iteritems(): if processes: for process in processes: logger.info('[%s] : [INFO] Reduce process %s for host %s found', datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S'), process, host) hreduce, hreduce_file = qConstructor.jvmRedProcessbyNameString(host, process) qhreduce = qConstructor.jvmNNquery(hreduce, qgte, qlte, qsize, qinterval) ghreduce = dmonConnector.aggQuery(qhreduce) dformat.dict2csv(ghreduce, qhreduce, hreduce_file) else: logger.info('[%s] : [INFO] No reduce process for host %s found', datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S'), host) pass for host, processes in nodeProcessMap.iteritems(): if processes: for process in processes: logger.info('[%s] : [INFO] Map process %s for host %s found', datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S'), process, host) hmap, hmap_file = qConstructor.jvmMapProcessbyNameString(host, process) qhmap = qConstructor.jvmNNquery(hmap, qgte, qlte, qsize, qinterval) ghmap = dmonConnector.aggQuery(qhmap) dformat.dict2csv(ghmap, qhmap, hmap_file) else: logger.info('[%s] : [INFO] No map process for host %s found', datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S'), host) pass # Get non host based metrics queries and file strings dfs, dfs_file = qConstructor.dfsString() dfsFs, dfsFs_file = qConstructor.dfsFString() jvmNameNodeString, jvmNameNode_file = qConstructor.jvmNameNodeString() queue, queue_file = qConstructor.queueResourceString() cluster, cluster_file = qConstructor.clusterMetricsSring() jvmResMng, jvmResMng_file = qConstructor.jvmResourceManagerString() mrapp, mrapp_file = qConstructor.mrappmasterString() jvmMrapp, jvmMrapp_file = qConstructor.jvmMrappmasterString() fsop, fsop_file = qConstructor.fsopDurationsString() # Queries qdfs = qConstructor.dfsQuery(dfs, qgte, qlte, qsize, qinterval) qdfsFs = qConstructor.dfsFSQuery(dfsFs, qgte, qlte, qsize, qinterval) qjvmNameNode = qConstructor.jvmNNquery(jvmNameNodeString, qgte, qlte, qsize, qinterval) qqueue = qConstructor.resourceQueueQuery(queue, qgte, qlte, qsize, qinterval) qcluster = qConstructor.clusterMetricsQuery(cluster, qgte, qlte, qsize, qinterval) qjvmResMng = qConstructor.jvmNNquery(jvmResMng, qgte, qlte, qsize, qinterval) qjvmMrapp = qConstructor.jvmNNquery(jvmMrapp, qgte, qlte, qsize, qinterval) qfsop = qConstructor.fsopDurationsQuery(fsop, qgte, qlte, qsize, qinterval) # Responses and convert to csv gdfs = dmonConnector.aggQuery(qdfs) dformat.dict2csv(gdfs, qdfs, dfs_file) gdfsFs = dmonConnector.aggQuery(qdfsFs) dformat.dict2csv(gdfsFs, qdfsFs, dfsFs_file) gjvmNameNode = dmonConnector.aggQuery(qjvmNameNode) dformat.dict2csv(gjvmNameNode, qjvmNameNode, jvmNameNode_file) gqueue = dmonConnector.aggQuery(qqueue) dformat.dict2csv(gqueue, qqueue, queue_file) gcluster = dmonConnector.aggQuery(qcluster) dformat.dict2csv(gcluster, qcluster, cluster_file) gjvmResourceManager = dmonConnector.aggQuery(qjvmResMng) dformat.dict2csv(gjvmResourceManager, qjvmResMng, jvmResMng_file) gjvmMrapp = dmonConnector.aggQuery(qjvmMrapp) dformat.dict2csv(gjvmMrapp, qjvmMrapp, jvmMrapp_file) gfsop = dmonConnector.aggQuery(qfsop) dformat.dict2csv(gfsop, qfsop, fsop_file) # Merge and rename by node system Files dformat.chainMergeSystem() #Merge system metricsall merged_df = dformat.chainMergeNR() dformat.df2csv(merged_df, os.path.join(dataDir, "System.csv")) #print testConnector.info() #response = testConnector.aggQuery(query) # logger.info('This is a test') #response2 = testConnector.aggQuery(query2) # dformat = DataFormatter(dataDir) # # dformat.dict2csv(response, query, 'test2.csv') # dformat.dict2csv(response2, query2, 'test22.csv') # # dformat.dict2arff('test2.csv', 'test2.arff') #responseSystem = testConnector.aggQuery(systemRequest) #print responseSystem #print type(response['aggregations']) #print len(response) #print response2 #print len(response2)
apache-2.0
4,747,426,054,977,383,000
43.810924
163
0.672386
false
Jeff-Tian/mybnb
Python27/Lib/idlelib/AutoCompleteWindow.py
2
17725
""" An auto-completion window for IDLE, used by the AutoComplete extension """ from Tkinter import * from idlelib.MultiCall import MC_SHIFT from idlelib.AutoComplete import COMPLETE_FILES, COMPLETE_ATTRIBUTES HIDE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-hide>>" HIDE_SEQUENCES = ("<FocusOut>", "<ButtonPress>") KEYPRESS_VIRTUAL_EVENT_NAME = "<<autocompletewindow-keypress>>" # We need to bind event beyond <Key> so that the function will be called # before the default specific IDLE function KEYPRESS_SEQUENCES = ("<Key>", "<Key-BackSpace>", "<Key-Return>", "<Key-Tab>", "<Key-Up>", "<Key-Down>", "<Key-Home>", "<Key-End>", "<Key-Prior>", "<Key-Next>") KEYRELEASE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-keyrelease>>" KEYRELEASE_SEQUENCE = "<KeyRelease>" LISTUPDATE_SEQUENCE = "<B1-ButtonRelease>" WINCONFIG_SEQUENCE = "<Configure>" DOUBLECLICK_SEQUENCE = "<B1-Double-ButtonRelease>" class AutoCompleteWindow: def __init__(self, widget): # The widget (Text) on which we place the AutoCompleteWindow self.widget = widget # The widgets we create self.autocompletewindow = self.listbox = self.scrollbar = None # The default foreground and background of a selection. Saved because # they are changed to the regular colors of list items when the # completion start is not a prefix of the selected completion self.origselforeground = self.origselbackground = None # The list of completions self.completions = None # A list with more completions, or None self.morecompletions = None # The completion mode. Either AutoComplete.COMPLETE_ATTRIBUTES or # AutoComplete.COMPLETE_FILES self.mode = None # The current completion start, on the text box (a string) self.start = None # The index of the start of the completion self.startindex = None # The last typed start, used so that when the selection changes, # the new start will be as close as possible to the last typed one. self.lasttypedstart = None # Do we have an indication that the user wants the completion window # (for example, he clicked the list) self.userwantswindow = None # event ids self.hideid = self.keypressid = self.listupdateid = self.winconfigid \ = self.keyreleaseid = self.doubleclickid = None # Flag set if last keypress was a tab self.lastkey_was_tab = False def _change_start(self, newstart): min_len = min(len(self.start), len(newstart)) i = 0 while i < min_len and self.start[i] == newstart[i]: i += 1 if i < len(self.start): self.widget.delete("%s+%dc" % (self.startindex, i), "%s+%dc" % (self.startindex, len(self.start))) if i < len(newstart): self.widget.insert("%s+%dc" % (self.startindex, i), newstart[i:]) self.start = newstart def _binary_search(self, s): """Find the first index in self.completions where completions[i] is greater or equal to s, or the last index if there is no such one.""" i = 0; j = len(self.completions) while j > i: m = (i + j) // 2 if self.completions[m] >= s: j = m else: i = m + 1 return min(i, len(self.completions)-1) def _complete_string(self, s): """Assuming that s is the prefix of a string in self.completions, return the longest string which is a prefix of all the strings which s is a prefix of them. If s is not a prefix of a string, return s.""" first = self._binary_search(s) if self.completions[first][:len(s)] != s: # There is not even one completion which s is a prefix of. return s # Find the end of the range of completions where s is a prefix of. i = first + 1 j = len(self.completions) while j > i: m = (i + j) // 2 if self.completions[m][:len(s)] != s: j = m else: i = m + 1 last = i-1 if first == last: # only one possible completion return self.completions[first] # We should return the maximum prefix of first and last first_comp = self.completions[first] last_comp = self.completions[last] min_len = min(len(first_comp), len(last_comp)) i = len(s) while i < min_len and first_comp[i] == last_comp[i]: i += 1 return first_comp[:i] def _selection_changed(self): """Should be called when the selection of the Listbox has changed. Updates the Listbox display and calls _change_start.""" cursel = int(self.listbox.curselection()[0]) self.listbox.see(cursel) lts = self.lasttypedstart selstart = self.completions[cursel] if self._binary_search(lts) == cursel: newstart = lts else: min_len = min(len(lts), len(selstart)) i = 0 while i < min_len and lts[i] == selstart[i]: i += 1 newstart = selstart[:i] self._change_start(newstart) if self.completions[cursel][:len(self.start)] == self.start: # start is a prefix of the selected completion self.listbox.configure(selectbackground=self.origselbackground, selectforeground=self.origselforeground) else: self.listbox.configure(selectbackground=self.listbox.cget("bg"), selectforeground=self.listbox.cget("fg")) # If there are more completions, show them, and call me again. if self.morecompletions: self.completions = self.morecompletions self.morecompletions = None self.listbox.delete(0, END) for item in self.completions: self.listbox.insert(END, item) self.listbox.select_set(self._binary_search(self.start)) self._selection_changed() def show_window(self, comp_lists, index, complete, mode, userWantsWin): """Show the autocomplete list, bind events. If complete is True, complete the text, and if there is exactly one matching completion, don't open a list.""" # Handle the start we already have self.completions, self.morecompletions = comp_lists self.mode = mode self.startindex = self.widget.index(index) self.start = self.widget.get(self.startindex, "insert") if complete: completed = self._complete_string(self.start) start = self.start self._change_start(completed) i = self._binary_search(completed) if self.completions[i] == completed and \ (i == len(self.completions)-1 or self.completions[i+1][:len(completed)] != completed): # There is exactly one matching completion return completed == start self.userwantswindow = userWantsWin self.lasttypedstart = self.start # Put widgets in place self.autocompletewindow = acw = Toplevel(self.widget) # Put it in a position so that it is not seen. acw.wm_geometry("+10000+10000") # Make it float acw.wm_overrideredirect(1) try: # This command is only needed and available on Tk >= 8.4.0 for OSX # Without it, call tips intrude on the typing process by grabbing # the focus. acw.tk.call("::tk::unsupported::MacWindowStyle", "style", acw._w, "help", "noActivates") except TclError: pass self.scrollbar = scrollbar = Scrollbar(acw, orient=VERTICAL) self.listbox = listbox = Listbox(acw, yscrollcommand=scrollbar.set, exportselection=False, bg="white") for item in self.completions: listbox.insert(END, item) self.origselforeground = listbox.cget("selectforeground") self.origselbackground = listbox.cget("selectbackground") scrollbar.config(command=listbox.yview) scrollbar.pack(side=RIGHT, fill=Y) listbox.pack(side=LEFT, fill=BOTH, expand=True) acw.lift() # work around bug in Tk 8.5.18+ (issue #24570) # Initialize the listbox selection self.listbox.select_set(self._binary_search(self.start)) self._selection_changed() # bind events self.hideid = self.widget.bind(HIDE_VIRTUAL_EVENT_NAME, self.hide_event) for seq in HIDE_SEQUENCES: self.widget.event_add(HIDE_VIRTUAL_EVENT_NAME, seq) self.keypressid = self.widget.bind(KEYPRESS_VIRTUAL_EVENT_NAME, self.keypress_event) for seq in KEYPRESS_SEQUENCES: self.widget.event_add(KEYPRESS_VIRTUAL_EVENT_NAME, seq) self.keyreleaseid = self.widget.bind(KEYRELEASE_VIRTUAL_EVENT_NAME, self.keyrelease_event) self.widget.event_add(KEYRELEASE_VIRTUAL_EVENT_NAME,KEYRELEASE_SEQUENCE) self.listupdateid = listbox.bind(LISTUPDATE_SEQUENCE, self.listselect_event) self.winconfigid = acw.bind(WINCONFIG_SEQUENCE, self.winconfig_event) self.doubleclickid = listbox.bind(DOUBLECLICK_SEQUENCE, self.doubleclick_event) def winconfig_event(self, event): if not self.is_active(): return # Position the completion list window text = self.widget text.see(self.startindex) x, y, cx, cy = text.bbox(self.startindex) acw = self.autocompletewindow acw_width, acw_height = acw.winfo_width(), acw.winfo_height() text_width, text_height = text.winfo_width(), text.winfo_height() new_x = text.winfo_rootx() + min(x, max(0, text_width - acw_width)) new_y = text.winfo_rooty() + y if (text_height - (y + cy) >= acw_height # enough height below or y < acw_height): # not enough height above # place acw below current line new_y += cy else: # place acw above current line new_y -= acw_height acw.wm_geometry("+%d+%d" % (new_x, new_y)) def hide_event(self, event): if not self.is_active(): return self.hide_window() def listselect_event(self, event): if not self.is_active(): return self.userwantswindow = True cursel = int(self.listbox.curselection()[0]) self._change_start(self.completions[cursel]) def doubleclick_event(self, event): # Put the selected completion in the text, and close the list cursel = int(self.listbox.curselection()[0]) self._change_start(self.completions[cursel]) self.hide_window() def keypress_event(self, event): if not self.is_active(): return keysym = event.keysym if hasattr(event, "mc_state"): state = event.mc_state else: state = 0 if keysym != "Tab": self.lastkey_was_tab = False if (len(keysym) == 1 or keysym in ("underscore", "BackSpace") or (self.mode == COMPLETE_FILES and keysym in ("period", "minus"))) \ and not (state & ~MC_SHIFT): # Normal editing of text if len(keysym) == 1: self._change_start(self.start + keysym) elif keysym == "underscore": self._change_start(self.start + '_') elif keysym == "period": self._change_start(self.start + '.') elif keysym == "minus": self._change_start(self.start + '-') else: # keysym == "BackSpace" if len(self.start) == 0: self.hide_window() return self._change_start(self.start[:-1]) self.lasttypedstart = self.start self.listbox.select_clear(0, int(self.listbox.curselection()[0])) self.listbox.select_set(self._binary_search(self.start)) self._selection_changed() return "break" elif keysym == "Return": self.hide_window() return elif (self.mode == COMPLETE_ATTRIBUTES and keysym in ("period", "space", "parenleft", "parenright", "bracketleft", "bracketright")) or \ (self.mode == COMPLETE_FILES and keysym in ("slash", "backslash", "quotedbl", "apostrophe")) \ and not (state & ~MC_SHIFT): # If start is a prefix of the selection, but is not '' when # completing file names, put the whole # selected completion. Anyway, close the list. cursel = int(self.listbox.curselection()[0]) if self.completions[cursel][:len(self.start)] == self.start \ and (self.mode == COMPLETE_ATTRIBUTES or self.start): self._change_start(self.completions[cursel]) self.hide_window() return elif keysym in ("Home", "End", "Prior", "Next", "Up", "Down") and \ not state: # Move the selection in the listbox self.userwantswindow = True cursel = int(self.listbox.curselection()[0]) if keysym == "Home": newsel = 0 elif keysym == "End": newsel = len(self.completions)-1 elif keysym in ("Prior", "Next"): jump = self.listbox.nearest(self.listbox.winfo_height()) - \ self.listbox.nearest(0) if keysym == "Prior": newsel = max(0, cursel-jump) else: assert keysym == "Next" newsel = min(len(self.completions)-1, cursel+jump) elif keysym == "Up": newsel = max(0, cursel-1) else: assert keysym == "Down" newsel = min(len(self.completions)-1, cursel+1) self.listbox.select_clear(cursel) self.listbox.select_set(newsel) self._selection_changed() self._change_start(self.completions[newsel]) return "break" elif (keysym == "Tab" and not state): if self.lastkey_was_tab: # two tabs in a row; insert current selection and close acw cursel = int(self.listbox.curselection()[0]) self._change_start(self.completions[cursel]) self.hide_window() return "break" else: # first tab; let AutoComplete handle the completion self.userwantswindow = True self.lastkey_was_tab = True return elif any(s in keysym for s in ("Shift", "Control", "Alt", "Meta", "Command", "Option")): # A modifier key, so ignore return else: # Unknown event, close the window and let it through. self.hide_window() return def keyrelease_event(self, event): if not self.is_active(): return if self.widget.index("insert") != \ self.widget.index("%s+%dc" % (self.startindex, len(self.start))): # If we didn't catch an event which moved the insert, close window self.hide_window() def is_active(self): return self.autocompletewindow is not None def complete(self): self._change_start(self._complete_string(self.start)) # The selection doesn't change. def hide_window(self): if not self.is_active(): return # unbind events for seq in HIDE_SEQUENCES: self.widget.event_delete(HIDE_VIRTUAL_EVENT_NAME, seq) self.widget.unbind(HIDE_VIRTUAL_EVENT_NAME, self.hideid) self.hideid = None for seq in KEYPRESS_SEQUENCES: self.widget.event_delete(KEYPRESS_VIRTUAL_EVENT_NAME, seq) self.widget.unbind(KEYPRESS_VIRTUAL_EVENT_NAME, self.keypressid) self.keypressid = None self.widget.event_delete(KEYRELEASE_VIRTUAL_EVENT_NAME, KEYRELEASE_SEQUENCE) self.widget.unbind(KEYRELEASE_VIRTUAL_EVENT_NAME, self.keyreleaseid) self.keyreleaseid = None self.listbox.unbind(LISTUPDATE_SEQUENCE, self.listupdateid) self.listupdateid = None self.autocompletewindow.unbind(WINCONFIG_SEQUENCE, self.winconfigid) self.winconfigid = None # destroy widgets self.scrollbar.destroy() self.scrollbar = None self.listbox.destroy() self.listbox = None self.autocompletewindow.destroy() self.autocompletewindow = None
apache-2.0
-8,441,115,935,815,127,000
41.550369
80
0.554697
false
pawhewitt/Dev
SU2_PY/parse_config.py
2
9159
#!/usr/bin/env python ## \file parse_config.py # \brief Builds a worksheet of all SU2.cpp options # \author A. Aranake, F. Palacios # \version 5.0.0 "Raven" # # SU2 Original Developers: Dr. Francisco D. Palacios. # Dr. Thomas D. Economon. # # SU2 Developers: Prof. Juan J. Alonso's group at Stanford University. # Prof. Piero Colonna's group at Delft University of Technology. # Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology. # Prof. Alberto Guardone's group at Polytechnic University of Milan. # Prof. Rafael Palacios' group at Imperial College London. # Prof. Edwin van der Weide's group at the University of Twente. # Prof. Vincent Terrapon's group at the University of Liege. # # Copyright (C) 2012-2017 SU2, the open-source CFD code. # # SU2 is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # SU2 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with SU2. If not, see <http://www.gnu.org/licenses/>. import os,sys,xlwt # note: requires xlwt for spreadsheet output # http://pypi.python.org/pypi/xlwt class config_option: option_name = "" option_type = "" option_category = "" option_values = [] option_default = "" option_description = "" def __init__(self,name,otype,category,values,default,description): self.option_name = name self.option_type = otype self.option_category = category self.option_values = values self.option_default = default self.option_description = description def print_data(self): print 'Option Name: %s '% self.option_name print 'Option Type: %s '% self.option_type print 'Option Category: %s '% self.option_category print 'Option values: ', self.option_values print 'Option default: %s'% self.option_default print 'Option description: %s '% self.option_description print '' def parse_config(config_cpp, config_hpp): # List of option types option_types = ['AddEnumOption', 'AddMathProblem', 'AddSpecialOption', 'AddScalarOption', 'AddMarkerOption', 'AddMarkerPeriodic', 'AddMarkerDirichlet', 'AddMarkerInlet', 'AddMarkerOutlet', 'AddMarkerDisplacement', 'AddMarkerLoad', 'AddMarkerFlowLoad', 'AddArrayOption', 'AddListOption', 'AddConvectOption', 'AddEnumListOption', 'AddDVParamOption'] # Build a dictionary of enum options from hpp file enum_options = {} f = open(config_hpp,'r') while(1): # Find beginning of enum definitions s = f.readline() if s.find('BEGIN_CONFIG_ENUMS') >-1: break while(1): s = f.readline() if s.find('END_CONFIG_ENUMS')>-1: break # Reached end if s.find('CCreateMap')>-1: dict_key = (s.split('=')[0]).split('>')[1].strip() dict_val = [] while(1): s2 = f.readline() thisval = s2.split('"')[1] dict_val.append(thisval) if s2.find(';')>-1: break; enum_options[dict_key] = dict_val f.close() # Temporary: For now, build a list of all of the schemes scheme_list = enum_options['Upwind_Map'] scheme_list.extend(enum_options['Centered_Map'][1:]) # Read the Options section of config_structure.cpp into a list of strings lines = [] f = open(config_cpp,'r') while(1): s = f.readline() if s.find('BEGIN_CONFIG_OPTIONS')>-1: break while(1): s = f.readline() # Check if we've reached the end if s.find('END_CONFIG_OPTIONS')>-1: break lines.append(s) f.close() option_list = [] present_category = "None" #----- Main text parsing loop ----- for j,line in enumerate(lines): # Check for a category description if line.find('CONFIG_CATEGORY')>-1: present_category = line.split(':')[1].strip().strip('*/').strip() print present_category # Check for an option type for option_type in option_types: if line.find(option_type)>-1: # Found an option # Get option name name = line.split('"')[1] # Permitted values values = ['YES','NO'] if option_type=='AddEnumOption': try: enum_mapname = line.split(',')[2].strip() values = enum_options[enum_mapname] except KeyError: print "KeyError, key=%s"%enum_mapname print "enum_options: ",enum_options sys.exit(1) except TypeError: print "TypeError, key=%s"%enum_mapname print "enum_options: ",enum_options sys.exit(1) elif option_type=='AddMathProblem': values = ['DIRECT','CONTINUOUS_ADJOINT','LINEARIZED'] elif option_type=='AddScalarOption': values = ['A scalar constant'] elif option_type in ('AddMarkerOption', 'AddMarkerPeriodic', 'AddMarkerDirichlet', 'AddMarkerInlet', 'AddMarkerOutlet', 'AddMarkerDisplacement', 'AddMarkerLoad', 'AddMarkerFlowLoad'): values = ['Valid marker name from grid file'] elif option_type == 'AddArrayOption': values = ['Array'] elif option_type == 'AddListOption': values = ['List'] elif option_type == 'AddConvectOption': values = scheme_list print "Convect Option: ", name elif option_type == 'AddEnumListOption': values = ['Enum list'] elif option_type == 'AddDVParamOption': values = ['DV Param'] # A first pass at finding the default value (Check the last item in parenthesis) jdefault = j while(lines[jdefault].find(';')==-1): jdefault = jdefault+1 default = lines[jdefault].strip().strip(');').split(',')[-1].strip().strip('"') # A whole bunch of corrections for what the default should be... if default.find('string("')==0: default = default.split('"')[1] if default=="default_vec_3d": default = '(1.0, 100.0, 1.0)' if default=="default_vec_6d": default = '( -1E15, -1E15, -1E15, 1E15, 1E15, 1E15 )' if option_type == "AddMathProblem": default = 'DIRECT' if option_type == "AddConvectOption": default = 'ROE-1ST_ORDER' if default == 'RK_Alpha_Step': default = '( 0.66667, 0.66667, 1.000000 )' if default == 'RK_Beta_Step': default = '( 1.00000, 0.00000, 0.00000 )' if default=='false': default='NO' elif default=='true': default='YES' # Check for a description tag description = "No description" if lines[j-1].find('DESCRIPTION')>-1: description = lines[j-1].split(':')[1].strip().strip('*/').strip() # Add a new option option_list.append(config_option(name,option_type[3:],present_category,values,default,description)) break return option_list def print_all(option_list): # Dumps the option list to screen for option in option_list: option.print_data() def make_spreadsheet(filename, option_list): wbk = xlwt.Workbook() sheet_name = "" jp = 0 for j,opt in enumerate(option_list): jp = jp+1 if not sheet_name==opt.option_category: # Create new sheet for new category sheet_name = opt.option_category sheet = wbk.add_sheet(sheet_name[:31].replace('/','-')) # Write spreadsheet header sheet.write(0,0,'Option Name') sheet.write(0,1,'Option Type') sheet.write(0,2,'Option Category') sheet.write(0,3,'Option Values') sheet.write(0,4,'Option Default') sheet.write(0,5,'Option Description') jp = 1 sheet.write(jp,0,opt.option_name) sheet.write(jp,1,opt.option_type) sheet.write(jp,2,opt.option_category) sheet.write(jp,3,(',').join(opt.option_values)) sheet.write(jp,4,opt.option_default) sheet.write(jp,5,opt.option_description) wbk.save(filename) if __name__=="__main__": # These variables should point to the configuration files su2_home = os.environ['SU2_HOME'] config_cpp = os.path.join(su2_home,'Common/src/config_structure.cpp') config_hpp = os.path.join(su2_home,'Common/include/option_structure.hpp') # Check that files exist if not os.path.isfile(config_cpp): sys.exit('Could not find cpp file, please check that su2_basedir is set correctly in parse_config.py') if not os.path.isfile(config_hpp): sys.exit('Could not find hpp file, please check that su2_basedir is set correctly in parse_config.py') # Run the parser option_list = parse_config(config_cpp, config_hpp) # Dump parsed data to screen print_all(option_list) #make_spreadsheet('out.xls',option_list)
lgpl-2.1
-5,697,584,729,431,939,000
34.777344
349
0.62354
false
DFEC-R2D2/r2d2
tests/example.py
1
1074
from __future__ import print_function import time from dual_mc33926_rpi import motors, MAX_SPEED # Set up sequences of motor speeds. test_forward_speeds = list(range(0, MAX_SPEED, 1)) + \ [MAX_SPEED] * 200 + list(range(MAX_SPEED, 0, -1)) + [0] test_reverse_speeds = list(range(0, -MAX_SPEED, -1)) + \ [-MAX_SPEED] * 200 + list(range(-MAX_SPEED, 0, 1)) + [0] try: motors.enable() motors.setSpeeds(0, 0) print("Motor 1 forward") for s in test_forward_speeds: motors.motor1.setSpeed(s) time.sleep(0.005) print("Motor 1 reverse") for s in test_reverse_speeds: motors.motor1.setSpeed(s) time.sleep(0.005) print("Motor 2 forward") for s in test_forward_speeds: motors.motor2.setSpeed(s) time.sleep(0.005) print("Motor 2 reverse") for s in test_reverse_speeds: motors.motor2.setSpeed(s) time.sleep(0.005) finally: # Stop the motors, even if there is an exception # or the user presses Ctrl+C to kill the process. motors.setSpeeds(0, 0) motors.disable()
mit
-8,810,767,270,861,297,000
25.85
60
0.634078
false
djangraw/PsychoPyParadigms
BasicExperiments/MovieListTask_Builder_d1.py
1
24389
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This experiment was created using PsychoPy2 Experiment Builder (v1.90.1), on Tue May 8 15:02:31 2018 Created 5/8/18 by DJ. Updated 5/8/18 by DJ - added NetStationEEG code from https://github.com/imnotamember/PyNetstation (per Pete's instructions) Updated 6/8/18 by DJ - made into list of movie files instead of single movie files """ from __future__ import absolute_import, division from psychopy import locale_setup, sound, gui, visual, core, data, event, logging, clock from psychopy.constants import (NOT_STARTED, STARTED, PLAYING, PAUSED, STOPPED, FINISHED, PRESSED, RELEASED, FOREVER) import numpy as np # whole numpy lib is available, prepend 'np.' from numpy import (sin, cos, tan, log, log10, pi, average, sqrt, std, deg2rad, rad2deg, linspace, asarray) from numpy.random import random, randint, normal, shuffle import os # handy system and path functions import sys # to get file system encoding # Declare movie params params = { 'movieFileList': u'/Users/jangrawdc/Documents/Python/PsychoPyParadigms/BasicExperiments/Movies/MovieList.txt', # text file with spaces/linebreaks between movies 'imiDur': 5.0, # time between movies. 'warmUpTime': 6.0, # time before first movie 'coolDownTime': 6.0, # time after last movie 'movieSize': (640.0*3,360.0*3), # for Boldscreen 'fixCrossHeight': 0.5, # eeg params 'isEegConnected': False, # is an EGI EEG system connected? 'tcpipAddress': '10.10.10.42', 'tcpipPort': 55513 } # Load movies fid = open(params['movieFileList'],'r') movieFileText = fid.read() movieFiles = movieFileText.split() fid.close() print "%d movie files read."%(len(movieFiles)) print(movieFiles) # === EEG === # # === Initialize if params['isEegConnected'] == False: # # This will import the debugging version of the PyNetStation module, # # which will not actually attempt a connection but will check to make sure # # your code is properly functioning. import egi.fake as egi # FOR TESTING WITHOUT CONNECTION TO NETSTATION COMPUTER else: # # This will import the single-threaded version of the PyNetStation module import egi.simple as egi # FOR RUNNING CONNECTED TO NETSTATION COMPUTER -- USE THIS IN A REAL EXPERIMENT # === Timing Obj # # Create a proper timing object to reference. To retrieve the time you want later, # # call this method using ms_localtime(), it returns the time in a millisecond format # # appropriate for the NetStation TCP/IP protocol. # # This is only necessary if you are in need of direct contact with the clock object that NetStation is utilizing, # # which you don't actually need since it's working behind the scenes in the egi module. # ms_localtime = egi.ms_localtime # === Netstation Obj # # Create the NetStation event-sending object. After this you can call # # the methods via the object instance, in this case 'ns'. ns = egi.Netstation() # === Establish Cxn # # The next line is for connecting the actual, single-threaded module version to the computer. if params['isEegConnected']: ns.connect(params['tcpipAddress'], params['tcpipPort']) # sample address and port -- change according to your network settings # === Link Expt to Session # # This sends some initialization info to NetStation for recording events. ns.BeginSession() # # This synchronizes the clocks of the stim computer and the NetStation computer. ns.sync() # === END EEG === # # Ensure that relative paths start from the same directory as this script _thisDir = os.path.dirname(os.path.abspath(__file__)).decode(sys.getfilesystemencoding()) os.chdir(_thisDir) # Store info about the experiment session expName = u'MovieListTask_Builder_d1' # Name of experiment expInfo = {'session': '001', 'participant': ''} dlg = gui.DlgFromDict(dictionary=expInfo, title=expName) if dlg.OK == False: core.quit() # user pressed cancel expInfo['date'] = data.getDateStr() # add a simple timestamp expInfo['expName'] = expName # Data file name stem = absolute path + name; later add .psyexp, .csv, .log, etc filename = _thisDir + os.sep + u'data/%s_%s_%s' % (expInfo['participant'], expName, expInfo['date']) # An ExperimentHandler isn't essential but helps with data saving thisExp = data.ExperimentHandler(name=expName, version='', extraInfo=expInfo, runtimeInfo=None, originPath=u'/Users/jangrawdc/Documents/Python/PsychoPyParadigms/BasicExperiments/TEST.psyexp', savePickle=True, saveWideText=True, dataFileName=filename) # save a log file for detail verbose info logFile = logging.LogFile(filename+'.log', level=logging.EXP) logging.console.setLevel(logging.WARNING) # this outputs to the screen, not a file endExpNow = False # flag for 'escape' or other condition => quit the exp # Start Code - component code to be run before the window creation # Setup the Window win = visual.Window( size=(1024, 768), fullscr=True, screen=0, allowGUI=False, allowStencil=False, monitor='testMonitor', color=[0,0,0], colorSpace='rgb', blendMode='avg', useFBO=True) # store frame rate of monitor if we can measure it expInfo['frameRate'] = win.getActualFrameRate() if expInfo['frameRate'] != None: frameDur = 1.0 / round(expInfo['frameRate']) else: frameDur = 1.0 / 60.0 # could not measure, so guess # Initialize components for Routine "Trigger" TriggerClock = core.Clock() TriggerText = visual.TextStim(win=win, name='TriggerText', text=u'Waiting for trigger...\n\n(Experimenter: press t to override.)', font=u'Arial', pos=(0, 0), height=0.1, wrapWidth=None, ori=0, color=u'white', colorSpace='rgb', opacity=1, depth=0.0); # Initialize components for Routine "Fixation" fixationClock = core.Clock() fixCross = visual.TextStim(win=win, name='fixCross', text=u'+', font=u'Arial', pos=(0, 0), height=params['fixCrossHeight'], wrapWidth=None, ori=0, color=u'white', colorSpace='rgb', opacity=1, depth=0.0); # Initialize components for Routine "Movie" MovieClock = core.Clock() movie = [] movieDur = [0]*len(movieFiles) for i in range(len(movieFiles)): movie.append(visual.MovieStim3( win=win, name='movie', noAudio = False, filename=movieFiles[i], ori=0, pos=(0, 0), size=params['movieSize'], opacity=1, depth=0.0, )) # save out duration of this movie movieDur[i] = movie[i].duration # print results for debugging print('Movie %d: loaded %s'%(i, movieFiles[i])) print('duration: %f'%movieDur[i]); ImiText = fixCross # Initialize components for Routine "WaitForEnd" WaitForEndClock = core.Clock() WaitForEndText = visual.TextStim(win=win, name='WaitForEndText', text=u'Please stay still until\nthe scanner noise stops.', font=u'Arial', pos=(0, 0), height=0.1, wrapWidth=None, ori=0, color=u'white', colorSpace='rgb', opacity=1, depth=0.0); # Create some handy timers globalClock = core.Clock() # to track the time since experiment started routineTimer = core.CountdownTimer() # to track time remaining of each (non-slip) routine # === EEG === # # # This starts the recording in NetStation acquisition. Equivalent to pressing the Record button. # # If at some point you pause the experiment using the "StopRecording()" method, # # just call this method again to restart the recording. ns.StartRecording() # === END EEG === # # ------Prepare to start Routine "Trigger"------- t = 0 TriggerClock.reset() # clock frameN = -1 continueRoutine = True # update component parameters for each repeat TriggerKey = event.BuilderKeyResponse() # keep track of which components have finished TriggerComponents = [TriggerText, TriggerKey] for thisComponent in TriggerComponents: if hasattr(thisComponent, 'status'): thisComponent.status = NOT_STARTED # === EEG === # # # This re-aligns the clocks between the stim computer and the NetStation computer. # # Best to put at the start of each trial for maximal timing accuracy. ns.sync() # Send Message to EEG win.callOnFlip(ns.send_event, key='WAIT', timestamp=None, label="WaitForTrigger", description="Waiting for Trigger from fMRI", pad=False) # === END EEG === # # -------Start Routine "Trigger"------- while continueRoutine: # get current time t = TriggerClock.getTime() frameN = frameN + 1 # number of completed frames (so 0 is the first frame) # update/draw components on each frame # *TriggerText* updates if t >= 0.0 and TriggerText.status == NOT_STARTED: # keep track of start time/frame for later TriggerText.tStart = t TriggerText.frameNStart = frameN # exact frame index TriggerText.setAutoDraw(True) # *TriggerKey* updates if t >= 0.0 and TriggerKey.status == NOT_STARTED: # keep track of start time/frame for later TriggerKey.tStart = t TriggerKey.frameNStart = frameN # exact frame index TriggerKey.status = STARTED # keyboard checking is just starting win.callOnFlip(TriggerKey.clock.reset) # t=0 on next screen flip event.clearEvents(eventType='keyboard') if TriggerKey.status == STARTED: theseKeys = event.getKeys(keyList=['t']) # check for quit: if "escape" in theseKeys: endExpNow = True if len(theseKeys) > 0: # at least one key was pressed TriggerKey.keys = theseKeys[-1] # just the last key pressed TriggerKey.rt = TriggerKey.clock.getTime() # a response ends the routine continueRoutine = False # check if all components have finished if not continueRoutine: # a component has requested a forced-end of Routine break continueRoutine = False # will revert to True if at least one component still running for thisComponent in TriggerComponents: if hasattr(thisComponent, "status") and thisComponent.status != FINISHED: continueRoutine = True break # at least one component has not yet finished # check for quit (the Esc key) if endExpNow or event.getKeys(keyList=["escape"]): core.quit() # refresh the screen if continueRoutine: # don't flip if this routine is over or we'll get a blank screen win.flip() # -------Ending Routine "Trigger"------- for thisComponent in TriggerComponents: if hasattr(thisComponent, "setAutoDraw"): thisComponent.setAutoDraw(False) # check responses if TriggerKey.keys in ['', [], None]: # No response was made TriggerKey.keys=None thisExp.addData('TriggerKey.keys',TriggerKey.keys) if TriggerKey.keys != None: # we had a response thisExp.addData('TriggerKey.rt', TriggerKey.rt) thisExp.nextEntry() # the Routine "Trigger" was not non-slip safe, so reset the non-slip timer routineTimer.reset() # ------Prepare to start Routine "fixation"------- t = 0 fixationClock.reset() # clock frameN = -1 continueRoutine = True routineTimer.add(params['warmUpTime']) # update component parameters for each repeat # keep track of which components have finished fixationComponents = [fixCross] for thisComponent in fixationComponents: if hasattr(thisComponent, 'status'): thisComponent.status = NOT_STARTED # === EEG === # # # This re-aligns the clocks between the stim computer and the NetStation computer. # # Best to put at the start of each trial for maximal timing accuracy. ns.sync() # Send Message to EEG win.callOnFlip(ns.send_event, key='FIX', timestamp=None, label="Fixation", description="Fixation Cross", pad=False) # === END EEG === # # -------Start Routine "fixation"------- while continueRoutine and routineTimer.getTime() > 0: # get current time t = fixationClock.getTime() frameN = frameN + 1 # number of completed frames (so 0 is the first frame) # update/draw components on each frame # *fixCross* updates if t >= 0.0 and fixCross.status == NOT_STARTED: # keep track of start time/frame for later fixCross.tStart = t fixCross.frameNStart = frameN # exact frame index fixCross.setAutoDraw(True) frameRemains = 0.0 + params['warmUpTime'] - win.monitorFramePeriod * 0.75 # most of one frame period left if fixCross.status == STARTED and t >= frameRemains: fixCross.setAutoDraw(False) # check if all components have finished if not continueRoutine: # a component has requested a forced-end of Routine break continueRoutine = False # will revert to True if at least one component still running for thisComponent in fixationComponents: if hasattr(thisComponent, "status") and thisComponent.status != FINISHED: continueRoutine = True break # at least one component has not yet finished # check for quit (the Esc key) if endExpNow or event.getKeys(keyList=["escape"]): core.quit() # refresh the screen if continueRoutine: # don't flip if this routine is over or we'll get a blank screen win.flip() # -------Ending Routine "fixation"------- for thisComponent in fixationComponents: if hasattr(thisComponent, "setAutoDraw"): thisComponent.setAutoDraw(False) # ------Prepare to start Routine "Movie"------- # update component parameters for each repeat # keep track of which components have finished MovieComponents = movie + [ImiText] for thisComponent in MovieComponents: if hasattr(thisComponent, 'status'): thisComponent.status = NOT_STARTED # ------Start Movie Loop------- for i in range(len(movie)): # initialize vars t = 0 MovieClock.reset() # clock frameN = -1 continueRoutine = True # Update timer if i<(len(movie)-1): routineTimer.add(movieDur[i]+params['imiDur']) else: routineTimer.add(movieDur[i]) # Make sure repeated-use ImiText object is listed as "not started" ImiText.status = NOT_STARTED # === EEG === # # # This re-aligns the clocks between the stim computer and the NetStation computer. # # Best to put at the start of each trial for maximal timing accuracy. ns.sync() # Send Message to EEG win.callOnFlip(ns.send_event, key='MOVI', timestamp=None, label="StartMovie%d"%i, description="Started Movie %d"%i, pad=False) # === END EEG === # # -------Start Routine "Movie"------- while continueRoutine and routineTimer.getTime() > 0: # get current time t = MovieClock.getTime() frameN = frameN + 1 # number of completed frames (so 0 is the first frame) # update/draw components on each frame # *movie* updates if t >= 0.0 and movie[i].status == NOT_STARTED: # keep track of start time/frame for later movie[i].tStart = t movie[i].frameNStart = frameN # exact frame index movie[i].setAutoDraw(True) frameRemains = 0.0 + movieDur[i]- win.monitorFramePeriod * 0.75 # most of one frame period left if movie[i].status == STARTED and t >= frameRemains: movie[i].setAutoDraw(False) # *ImiText* updates if t >= movieDur[i] and ImiText.status == NOT_STARTED and i<(len(movie)-1): # keep track of start time/frame for later ImiText.tStart = t ImiText.frameNStart = frameN # exact frame index ImiText.setAutoDraw(True) # === EEG === # # # This re-aligns the clocks between the stim computer and the NetStation computer. # # Best to put at the start of each trial for maximal timing accuracy. ns.sync() # Send Message to EEG win.callOnFlip(ns.send_event, key='IMI', timestamp=None, label="Inter-Movie Interval", description="Inter-Movie Interval", pad=False) # === END EEG === # frameRemains = movieDur[i] + params['imiDur']- win.monitorFramePeriod * 0.75 # most of one frame period left if ImiText.status == STARTED and t >= frameRemains: ImiText.setAutoDraw(False) # check if all components have finished if not continueRoutine: # a component has requested a forced-end of Routine break continueRoutine = False # will revert to True if at least one component still running for thisComponent in MovieComponents: if hasattr(thisComponent, "status") and thisComponent.status != FINISHED: continueRoutine = True break # at least one component has not yet finished # check for quit (the Esc key) if endExpNow or event.getKeys(keyList=["escape"]): core.quit() # refresh the screen if continueRoutine: # don't flip if this routine is over or we'll get a blank screen win.flip() # -------Ending Routine "Movie"------- for thisComponent in MovieComponents: if hasattr(thisComponent, "setAutoDraw"): thisComponent.setAutoDraw(False) # ------Prepare to start Routine "fixation"------- t = 0 fixationClock.reset() # clock frameN = -1 continueRoutine = True routineTimer.add(params['coolDownTime']) # update component parameters for each repeat # keep track of which components have finished fixationComponents = [fixCross] for thisComponent in fixationComponents: if hasattr(thisComponent, 'status'): thisComponent.status = NOT_STARTED # === EEG === # # # This re-aligns the clocks between the stim computer and the NetStation computer. # # Best to put at the start of each trial for maximal timing accuracy. ns.sync() # Send Message to EEG win.callOnFlip(ns.send_event, key='FIX', timestamp=None, label="Fixation", description="Fixation Cross", pad=False) # === END EEG === # # -------Start Routine "fixation"------- while continueRoutine and routineTimer.getTime() > 0: # get current time t = fixationClock.getTime() frameN = frameN + 1 # number of completed frames (so 0 is the first frame) # update/draw components on each frame # *fixCross* updates if t >= 0.0 and fixCross.status == NOT_STARTED: # keep track of start time/frame for later fixCross.tStart = t fixCross.frameNStart = frameN # exact frame index fixCross.setAutoDraw(True) frameRemains = 0.0 + params['coolDownTime'] - win.monitorFramePeriod * 0.75 # most of one frame period left if fixCross.status == STARTED and t >= frameRemains: fixCross.setAutoDraw(False) # check if all components have finished if not continueRoutine: # a component has requested a forced-end of Routine break continueRoutine = False # will revert to True if at least one component still running for thisComponent in fixationComponents: if hasattr(thisComponent, "status") and thisComponent.status != FINISHED: continueRoutine = True break # at least one component has not yet finished # check for quit (the Esc key) if endExpNow or event.getKeys(keyList=["escape"]): core.quit() # refresh the screen if continueRoutine: # don't flip if this routine is over or we'll get a blank screen win.flip() # -------Ending Routine "fixation"------- for thisComponent in fixationComponents: if hasattr(thisComponent, "setAutoDraw"): thisComponent.setAutoDraw(False) # ------Prepare to start Routine "WaitForEnd"------- t = 0 WaitForEndClock.reset() # clock frameN = -1 continueRoutine = True # update component parameters for each repeat EndKey = event.BuilderKeyResponse() # keep track of which components have finished WaitForEndComponents = [WaitForEndText, EndKey] for thisComponent in WaitForEndComponents: if hasattr(thisComponent, 'status'): thisComponent.status = NOT_STARTED # === EEG === # # # This re-aligns the clocks between the stim computer and the NetStation computer. # # Best to put at the start of each trial for maximal timing accuracy. ns.sync() # Send Message to EEG win.callOnFlip(ns.send_event, key='END', timestamp=None, label="WaitForEnd", description="Waiting for End of Scan", pad=False) # === END EEG === # # -------Start Routine "WaitForEnd"------- while continueRoutine: # get current time t = WaitForEndClock.getTime() frameN = frameN + 1 # number of completed frames (so 0 is the first frame) # update/draw components on each frame # *WaitForEndText* updates if t >= 0.0 and WaitForEndText.status == NOT_STARTED: # keep track of start time/frame for later WaitForEndText.tStart = t WaitForEndText.frameNStart = frameN # exact frame index WaitForEndText.setAutoDraw(True) # *EndKey* updates if t >= 0.0 and EndKey.status == NOT_STARTED: # keep track of start time/frame for later EndKey.tStart = t EndKey.frameNStart = frameN # exact frame index EndKey.status = STARTED # keyboard checking is just starting win.callOnFlip(EndKey.clock.reset) # t=0 on next screen flip event.clearEvents(eventType='keyboard') if EndKey.status == STARTED: theseKeys = event.getKeys(keyList=['q', 'escape']) # check for quit: if "escape" in theseKeys: endExpNow = True if len(theseKeys) > 0: # at least one key was pressed EndKey.keys = theseKeys[-1] # just the last key pressed EndKey.rt = EndKey.clock.getTime() # a response ends the routine continueRoutine = False # check if all components have finished if not continueRoutine: # a component has requested a forced-end of Routine break continueRoutine = False # will revert to True if at least one component still running for thisComponent in WaitForEndComponents: if hasattr(thisComponent, "status") and thisComponent.status != FINISHED: continueRoutine = True break # at least one component has not yet finished # check for quit (the Esc key) if endExpNow or event.getKeys(keyList=["escape"]): core.quit() # refresh the screen if continueRoutine: # don't flip if this routine is over or we'll get a blank screen win.flip() # -------Ending Routine "WaitForEnd"------- for thisComponent in WaitForEndComponents: if hasattr(thisComponent, "setAutoDraw"): thisComponent.setAutoDraw(False) # check responses if EndKey.keys in ['', [], None]: # No response was made EndKey.keys=None thisExp.addData('EndKey.keys',EndKey.keys) if EndKey.keys != None: # we had a response thisExp.addData('EndKey.rt', EndKey.rt) thisExp.nextEntry() # the Routine "WaitForEnd" was not non-slip safe, so reset the non-slip timer routineTimer.reset() # === EEG === # # # This re-aligns the clocks between the stim computer and the NetStation computer. # # Best to put at the start of each trial for maximal timing accuracy. ns.sync() # Send Message to EEG win.callOnFlip(ns.send_event, key='DONE', timestamp=None, label="ExperimentDone", description="End of Scan", pad=False) # === End Session # # This method is misleading, as it merely pauses the recording in NetStation. Equivalent to the pause button. # # It is not actually stopping the recording session. That is done by the 'EndSession()' method. ns.StopRecording() # # I don't typically use this, as it is closes the current "Session" in NetStation. # # I find it easier to just pause the recording using "StopRecording()" and then # # get ending impedance measurements before manually closing NetStation. ns.EndSession() # # This line ends the connection via the ns object, and should then be destroying the object itself. # # It is good practice to use so as not to waste memory or leave TCP/IP links open, which could lead to being # # unable to reconnect without restarting the computer running the experiment. if params['isEegConnected']: ns.disconnect() # === END EEG === # # ----------Finishing Experiment---------- # these shouldn't be strictly necessary (should auto-save) thisExp.saveAsWideText(filename+'.csv') thisExp.saveAsPickle(filename) logging.flush() # make sure everything is closed down thisExp.abort() # or data files will save again on exit win.close() core.quit()
mit
2,653,068,431,553,983,500
38.400646
164
0.67797
false
osrsbox/osrsbox-db
osrsbox/items_api_examples/print_f2p_weapons.py
1
1661
""" Author: PH01L Email: [email protected] Website: https://www.osrsbox.com Description: A very simple example script of how to load the osrsbox-db item database, loop through the loaded items, and print and items that are both weapons and available in free to play. Copyright (c) 2019, PH01L ############################################################################### This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ############################################################################### """ from osrsbox import items_api if __name__ == "__main__": # Load all items all_db_items = items_api.load() # Loop through all items in the database and print the item name for each item for item in all_db_items: # Check if item is equipable, and is not memebers (aka f2p item) if item.equipable_by_player and not item.members: # If item is a "weapon" of "2h" weapon, print it! if item.equipment.slot == "weapon" or item.equipment.slot == "2h": print(f"{item.id:<6} {item.name}") # New, f-strings printing method
gpl-3.0
4,822,616,301,344,140,000
40.525
84
0.647803
false
Azure/azure-sdk-for-python
sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_models.py
1
49380
# 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 azure.core.exceptions import HttpResponseError import msrest.serialization class AccessKeys(msrest.serialization.Model): """The Account access keys. :param atlas_kafka_primary_endpoint: Gets or sets the primary connection string. :type atlas_kafka_primary_endpoint: str :param atlas_kafka_secondary_endpoint: Gets or sets the secondary connection string. :type atlas_kafka_secondary_endpoint: str """ _attribute_map = { 'atlas_kafka_primary_endpoint': {'key': 'atlasKafkaPrimaryEndpoint', 'type': 'str'}, 'atlas_kafka_secondary_endpoint': {'key': 'atlasKafkaSecondaryEndpoint', 'type': 'str'}, } def __init__( self, **kwargs ): super(AccessKeys, self).__init__(**kwargs) self.atlas_kafka_primary_endpoint = kwargs.get('atlas_kafka_primary_endpoint', None) self.atlas_kafka_secondary_endpoint = kwargs.get('atlas_kafka_secondary_endpoint', None) class TrackedResource(msrest.serialization.Model): """Azure ARM Tracked Resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Gets or sets the identifier. :vartype id: str :param identity: Identity Info on the tracked resource. :type identity: ~azure.mgmt.purview.models.Identity :param location: Gets or sets the location. :type location: str :ivar name: Gets or sets the name. :vartype name: str :param tags: A set of tags. Tags on the azure resource. :type tags: dict[str, str] :ivar type: Gets or sets the type. :vartype type: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'Identity'}, 'location': {'key': 'location', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, **kwargs ): super(TrackedResource, self).__init__(**kwargs) self.id = None self.identity = kwargs.get('identity', None) self.location = kwargs.get('location', None) self.name = None self.tags = kwargs.get('tags', None) self.type = None class Account(TrackedResource): """Account resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Gets or sets the identifier. :vartype id: str :param identity: Identity Info on the tracked resource. :type identity: ~azure.mgmt.purview.models.Identity :param location: Gets or sets the location. :type location: str :ivar name: Gets or sets the name. :vartype name: str :param tags: A set of tags. Tags on the azure resource. :type tags: dict[str, str] :ivar type: Gets or sets the type. :vartype type: str :param sku: Gets or sets the Sku. :type sku: ~azure.mgmt.purview.models.AccountSku :param cloud_connectors: Cloud connectors. External cloud identifier used as part of scanning configuration. :type cloud_connectors: ~azure.mgmt.purview.models.CloudConnectors :ivar created_at: Gets the time at which the entity was created. :vartype created_at: ~datetime.datetime :ivar created_by: Gets the creator of the entity. :vartype created_by: str :ivar created_by_object_id: Gets the creators of the entity's object id. :vartype created_by_object_id: str :ivar endpoints: The URIs that are the public endpoints of the account. :vartype endpoints: ~azure.mgmt.purview.models.AccountEndpoints :ivar friendly_name: Gets or sets the friendly name. :vartype friendly_name: str :ivar managed_resources: Gets the resource identifiers of the managed resources. :vartype managed_resources: ~azure.mgmt.purview.models.ManagedResources :ivar private_endpoint_connections: Gets the private endpoint connections information. :vartype private_endpoint_connections: list[~azure.mgmt.purview.models.PrivateEndpointConnection] :ivar provisioning_state: Gets or sets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "SoftDeleting", "SoftDeleted", "Failed", "Succeeded". :vartype provisioning_state: str or ~azure.mgmt.purview.models.ProvisioningState :param public_network_access: Gets or sets the public network access. Possible values include: "NotSpecified", "Enabled", "Disabled". :type public_network_access: str or ~azure.mgmt.purview.models.PublicNetworkAccess """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'created_at': {'readonly': True}, 'created_by': {'readonly': True}, 'created_by_object_id': {'readonly': True}, 'endpoints': {'readonly': True}, 'friendly_name': {'readonly': True}, 'managed_resources': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'Identity'}, 'location': {'key': 'location', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'type': {'key': 'type', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'AccountSku'}, 'cloud_connectors': {'key': 'properties.cloudConnectors', 'type': 'CloudConnectors'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'created_by_object_id': {'key': 'properties.createdByObjectId', 'type': 'str'}, 'endpoints': {'key': 'properties.endpoints', 'type': 'AccountEndpoints'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, 'managed_resources': {'key': 'properties.managedResources', 'type': 'ManagedResources'}, 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } def __init__( self, **kwargs ): super(Account, self).__init__(**kwargs) self.sku = kwargs.get('sku', None) self.cloud_connectors = kwargs.get('cloud_connectors', None) self.created_at = None self.created_by = None self.created_by_object_id = None self.endpoints = None self.friendly_name = None self.managed_resources = None self.private_endpoint_connections = None self.provisioning_state = None self.public_network_access = kwargs.get('public_network_access', None) class AccountEndpoints(msrest.serialization.Model): """The account endpoints. Variables are only populated by the server, and will be ignored when sending a request. :ivar catalog: Gets the catalog endpoint. :vartype catalog: str :ivar guardian: Gets the guardian endpoint. :vartype guardian: str :ivar scan: Gets the scan endpoint. :vartype scan: str """ _validation = { 'catalog': {'readonly': True}, 'guardian': {'readonly': True}, 'scan': {'readonly': True}, } _attribute_map = { 'catalog': {'key': 'catalog', 'type': 'str'}, 'guardian': {'key': 'guardian', 'type': 'str'}, 'scan': {'key': 'scan', 'type': 'str'}, } def __init__( self, **kwargs ): super(AccountEndpoints, self).__init__(**kwargs) self.catalog = None self.guardian = None self.scan = None class AccountList(msrest.serialization.Model): """Paged list of account resources. All required parameters must be populated in order to send to Azure. :param count: Total item count. :type count: long :param next_link: The Url of next result page. :type next_link: str :param value: Required. Collection of items of type results. :type value: list[~azure.mgmt.purview.models.Account] """ _validation = { 'value': {'required': True}, } _attribute_map = { 'count': {'key': 'count', 'type': 'long'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, 'value': {'key': 'value', 'type': '[Account]'}, } def __init__( self, **kwargs ): super(AccountList, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.next_link = kwargs.get('next_link', None) self.value = kwargs['value'] class AccountPropertiesEndpoints(AccountEndpoints): """The URIs that are the public endpoints of the account. Variables are only populated by the server, and will be ignored when sending a request. :ivar catalog: Gets the catalog endpoint. :vartype catalog: str :ivar guardian: Gets the guardian endpoint. :vartype guardian: str :ivar scan: Gets the scan endpoint. :vartype scan: str """ _validation = { 'catalog': {'readonly': True}, 'guardian': {'readonly': True}, 'scan': {'readonly': True}, } _attribute_map = { 'catalog': {'key': 'catalog', 'type': 'str'}, 'guardian': {'key': 'guardian', 'type': 'str'}, 'scan': {'key': 'scan', 'type': 'str'}, } def __init__( self, **kwargs ): super(AccountPropertiesEndpoints, self).__init__(**kwargs) class ManagedResources(msrest.serialization.Model): """The managed resources in customer subscription. Variables are only populated by the server, and will be ignored when sending a request. :ivar event_hub_namespace: Gets the managed event hub namespace resource identifier. :vartype event_hub_namespace: str :ivar resource_group: Gets the managed resource group resource identifier. This resource group will host resource dependencies for the account. :vartype resource_group: str :ivar storage_account: Gets the managed storage account resource identifier. :vartype storage_account: str """ _validation = { 'event_hub_namespace': {'readonly': True}, 'resource_group': {'readonly': True}, 'storage_account': {'readonly': True}, } _attribute_map = { 'event_hub_namespace': {'key': 'eventHubNamespace', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, 'storage_account': {'key': 'storageAccount', 'type': 'str'}, } def __init__( self, **kwargs ): super(ManagedResources, self).__init__(**kwargs) self.event_hub_namespace = None self.resource_group = None self.storage_account = None class AccountPropertiesManagedResources(ManagedResources): """Gets the resource identifiers of the managed resources. Variables are only populated by the server, and will be ignored when sending a request. :ivar event_hub_namespace: Gets the managed event hub namespace resource identifier. :vartype event_hub_namespace: str :ivar resource_group: Gets the managed resource group resource identifier. This resource group will host resource dependencies for the account. :vartype resource_group: str :ivar storage_account: Gets the managed storage account resource identifier. :vartype storage_account: str """ _validation = { 'event_hub_namespace': {'readonly': True}, 'resource_group': {'readonly': True}, 'storage_account': {'readonly': True}, } _attribute_map = { 'event_hub_namespace': {'key': 'eventHubNamespace', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, 'storage_account': {'key': 'storageAccount', 'type': 'str'}, } def __init__( self, **kwargs ): super(AccountPropertiesManagedResources, self).__init__(**kwargs) class AccountSku(msrest.serialization.Model): """The Sku. :param capacity: Gets or sets the sku capacity. Possible values include: 4, 16. :type capacity: int :param name: Gets or sets the sku name. Possible values include: "Standard". :type name: str or ~azure.mgmt.purview.models.Name """ _attribute_map = { 'capacity': {'key': 'capacity', 'type': 'int'}, 'name': {'key': 'name', 'type': 'str'}, } def __init__( self, **kwargs ): super(AccountSku, self).__init__(**kwargs) self.capacity = kwargs.get('capacity', None) self.name = kwargs.get('name', None) class AccountUpdateParameters(msrest.serialization.Model): """The account update properties. Variables are only populated by the server, and will be ignored when sending a request. :param tags: A set of tags. Tags on the azure resource. :type tags: dict[str, str] :param cloud_connectors: Cloud connectors. External cloud identifier used as part of scanning configuration. :type cloud_connectors: ~azure.mgmt.purview.models.CloudConnectors :ivar created_at: Gets the time at which the entity was created. :vartype created_at: ~datetime.datetime :ivar created_by: Gets the creator of the entity. :vartype created_by: str :ivar created_by_object_id: Gets the creators of the entity's object id. :vartype created_by_object_id: str :ivar endpoints: The URIs that are the public endpoints of the account. :vartype endpoints: ~azure.mgmt.purview.models.AccountEndpoints :ivar friendly_name: Gets or sets the friendly name. :vartype friendly_name: str :ivar managed_resources: Gets the resource identifiers of the managed resources. :vartype managed_resources: ~azure.mgmt.purview.models.ManagedResources :ivar private_endpoint_connections: Gets the private endpoint connections information. :vartype private_endpoint_connections: list[~azure.mgmt.purview.models.PrivateEndpointConnection] :ivar provisioning_state: Gets or sets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "SoftDeleting", "SoftDeleted", "Failed", "Succeeded". :vartype provisioning_state: str or ~azure.mgmt.purview.models.ProvisioningState :param public_network_access: Gets or sets the public network access. Possible values include: "NotSpecified", "Enabled", "Disabled". :type public_network_access: str or ~azure.mgmt.purview.models.PublicNetworkAccess """ _validation = { 'created_at': {'readonly': True}, 'created_by': {'readonly': True}, 'created_by_object_id': {'readonly': True}, 'endpoints': {'readonly': True}, 'friendly_name': {'readonly': True}, 'managed_resources': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'cloud_connectors': {'key': 'properties.cloudConnectors', 'type': 'CloudConnectors'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'created_by_object_id': {'key': 'properties.createdByObjectId', 'type': 'str'}, 'endpoints': {'key': 'properties.endpoints', 'type': 'AccountEndpoints'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, 'managed_resources': {'key': 'properties.managedResources', 'type': 'ManagedResources'}, 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } def __init__( self, **kwargs ): super(AccountUpdateParameters, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) self.cloud_connectors = kwargs.get('cloud_connectors', None) self.created_at = None self.created_by = None self.created_by_object_id = None self.endpoints = None self.friendly_name = None self.managed_resources = None self.private_endpoint_connections = None self.provisioning_state = None self.public_network_access = kwargs.get('public_network_access', None) class CheckNameAvailabilityRequest(msrest.serialization.Model): """The request payload for CheckNameAvailability API. :param name: Resource name to verify for availability. :type name: str :param type: Fully qualified resource type which includes provider namespace. :type type: str """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, **kwargs ): super(CheckNameAvailabilityRequest, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.type = kwargs.get('type', None) class CheckNameAvailabilityResult(msrest.serialization.Model): """The response payload for CheckNameAvailability API. :param message: Error message. :type message: str :param name_available: Indicates if name is valid and available. :type name_available: bool :param reason: The reason the name is not available. Possible values include: "Invalid", "AlreadyExists". :type reason: str or ~azure.mgmt.purview.models.Reason """ _attribute_map = { 'message': {'key': 'message', 'type': 'str'}, 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, 'reason': {'key': 'reason', 'type': 'str'}, } def __init__( self, **kwargs ): super(CheckNameAvailabilityResult, self).__init__(**kwargs) self.message = kwargs.get('message', None) self.name_available = kwargs.get('name_available', None) self.reason = kwargs.get('reason', None) class CloudConnectors(msrest.serialization.Model): """Properties for configuring third party cloud connections. Variables are only populated by the server, and will be ignored when sending a request. :ivar aws_external_id: AWS external identifier. Configured in AWS to allow use of the role arn used for scanning. :vartype aws_external_id: str """ _validation = { 'aws_external_id': {'readonly': True}, } _attribute_map = { 'aws_external_id': {'key': 'awsExternalId', 'type': 'str'}, } def __init__( self, **kwargs ): super(CloudConnectors, self).__init__(**kwargs) self.aws_external_id = None class DefaultAccountPayload(msrest.serialization.Model): """Payload to get and set the default account in the given scope. :param account_name: The name of the account that is set as the default. :type account_name: str :param resource_group_name: The resource group name of the account that is set as the default. :type resource_group_name: str :param scope: The scope object ID. For example, sub ID or tenant ID. :type scope: str :param scope_tenant_id: The scope tenant in which the default account is set. :type scope_tenant_id: str :param scope_type: The scope where the default account is set. Possible values include: "Tenant", "Subscription". :type scope_type: str or ~azure.mgmt.purview.models.ScopeType :param subscription_id: The subscription ID of the account that is set as the default. :type subscription_id: str """ _attribute_map = { 'account_name': {'key': 'accountName', 'type': 'str'}, 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, 'scope': {'key': 'scope', 'type': 'str'}, 'scope_tenant_id': {'key': 'scopeTenantId', 'type': 'str'}, 'scope_type': {'key': 'scopeType', 'type': 'str'}, 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, } def __init__( self, **kwargs ): super(DefaultAccountPayload, self).__init__(**kwargs) self.account_name = kwargs.get('account_name', None) self.resource_group_name = kwargs.get('resource_group_name', None) self.scope = kwargs.get('scope', None) self.scope_tenant_id = kwargs.get('scope_tenant_id', None) self.scope_type = kwargs.get('scope_type', None) self.subscription_id = kwargs.get('subscription_id', None) class ProxyResource(msrest.serialization.Model): """Proxy Azure Resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Gets or sets the identifier. :vartype id: str :ivar name: Gets or sets the name. :vartype name: str :ivar type: Gets or sets the type. :vartype type: str """ _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'}, } def __init__( self, **kwargs ): super(ProxyResource, self).__init__(**kwargs) self.id = None self.name = None self.type = None class DeletedAccount(ProxyResource): """Soft Deleted Account resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Gets or sets the identifier. :vartype id: str :ivar name: Gets or sets the name. :vartype name: str :ivar type: Gets or sets the type. :vartype type: str :ivar account_id: Gets the account identifier associated with resource. :vartype account_id: str :ivar deleted_by: Gets the user identifier that deleted resource. :vartype deleted_by: str :ivar deletion_date: Gets the time at which the resource was soft deleted. :vartype deletion_date: ~datetime.datetime :ivar location: Gets the resource location. :vartype location: str :ivar scheduled_purge_date: Gets the scheduled purge datetime. :vartype scheduled_purge_date: ~datetime.datetime :ivar tags: A set of tags. Gets the account tags. :vartype tags: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'account_id': {'readonly': True}, 'deleted_by': {'readonly': True}, 'deletion_date': {'readonly': True}, 'location': {'readonly': True}, 'scheduled_purge_date': {'readonly': True}, 'tags': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'account_id': {'key': 'properties.accountId', 'type': 'str'}, 'deleted_by': {'key': 'properties.deletedBy', 'type': 'str'}, 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, 'location': {'key': 'properties.location', 'type': 'str'}, 'scheduled_purge_date': {'key': 'properties.scheduledPurgeDate', 'type': 'iso-8601'}, 'tags': {'key': 'properties.tags', 'type': '{str}'}, } def __init__( self, **kwargs ): super(DeletedAccount, self).__init__(**kwargs) self.account_id = None self.deleted_by = None self.deletion_date = None self.location = None self.scheduled_purge_date = None self.tags = None class DeletedAccountList(msrest.serialization.Model): """Paged list of soft deleted account resources. All required parameters must be populated in order to send to Azure. :param count: Total item count. :type count: long :param next_link: The Url of next result page. :type next_link: str :param value: Required. Collection of items of type results. :type value: list[~azure.mgmt.purview.models.DeletedAccount] """ _validation = { 'value': {'required': True}, } _attribute_map = { 'count': {'key': 'count', 'type': 'long'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, 'value': {'key': 'value', 'type': '[DeletedAccount]'}, } def __init__( self, **kwargs ): super(DeletedAccountList, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.next_link = kwargs.get('next_link', None) self.value = kwargs['value'] class DeletedAccountProperties(msrest.serialization.Model): """The soft deleted account properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar account_id: Gets the account identifier associated with resource. :vartype account_id: str :ivar deleted_by: Gets the user identifier that deleted resource. :vartype deleted_by: str :ivar deletion_date: Gets the time at which the resource was soft deleted. :vartype deletion_date: ~datetime.datetime :ivar location: Gets the resource location. :vartype location: str :ivar scheduled_purge_date: Gets the scheduled purge datetime. :vartype scheduled_purge_date: ~datetime.datetime :ivar tags: A set of tags. Gets the account tags. :vartype tags: dict[str, str] """ _validation = { 'account_id': {'readonly': True}, 'deleted_by': {'readonly': True}, 'deletion_date': {'readonly': True}, 'location': {'readonly': True}, 'scheduled_purge_date': {'readonly': True}, 'tags': {'readonly': True}, } _attribute_map = { 'account_id': {'key': 'accountId', 'type': 'str'}, 'deleted_by': {'key': 'deletedBy', 'type': 'str'}, 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, 'location': {'key': 'location', 'type': 'str'}, 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__( self, **kwargs ): super(DeletedAccountProperties, self).__init__(**kwargs) self.account_id = None self.deleted_by = None self.deletion_date = None self.location = None self.scheduled_purge_date = None self.tags = None class DeletedAccountPropertiesAutoGenerated(DeletedAccountProperties): """Gets or sets the properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar account_id: Gets the account identifier associated with resource. :vartype account_id: str :ivar deleted_by: Gets the user identifier that deleted resource. :vartype deleted_by: str :ivar deletion_date: Gets the time at which the resource was soft deleted. :vartype deletion_date: ~datetime.datetime :ivar location: Gets the resource location. :vartype location: str :ivar scheduled_purge_date: Gets the scheduled purge datetime. :vartype scheduled_purge_date: ~datetime.datetime :ivar tags: A set of tags. Gets the account tags. :vartype tags: dict[str, str] """ _validation = { 'account_id': {'readonly': True}, 'deleted_by': {'readonly': True}, 'deletion_date': {'readonly': True}, 'location': {'readonly': True}, 'scheduled_purge_date': {'readonly': True}, 'tags': {'readonly': True}, } _attribute_map = { 'account_id': {'key': 'accountId', 'type': 'str'}, 'deleted_by': {'key': 'deletedBy', 'type': 'str'}, 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, 'location': {'key': 'location', 'type': 'str'}, 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__( self, **kwargs ): super(DeletedAccountPropertiesAutoGenerated, self).__init__(**kwargs) class DimensionProperties(msrest.serialization.Model): """properties for dimension. :param display_name: localized display name of the dimension to customer. :type display_name: str :param name: dimension name. :type name: str :param to_be_exported_for_customer: flag indicating whether this dimension should be included to the customer in Azure Monitor logs (aka Shoebox). :type to_be_exported_for_customer: bool """ _attribute_map = { 'display_name': {'key': 'displayName', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'to_be_exported_for_customer': {'key': 'toBeExportedForCustomer', 'type': 'bool'}, } def __init__( self, **kwargs ): super(DimensionProperties, self).__init__(**kwargs) self.display_name = kwargs.get('display_name', None) self.name = kwargs.get('name', None) self.to_be_exported_for_customer = kwargs.get('to_be_exported_for_customer', None) class ErrorModel(msrest.serialization.Model): """Default error model. Variables are only populated by the server, and will be ignored when sending a request. :ivar code: Gets or sets the code. :vartype code: str :ivar details: Gets or sets the details. :vartype details: list[~azure.mgmt.purview.models.ErrorModel] :ivar message: Gets or sets the messages. :vartype message: str :ivar target: Gets or sets the target. :vartype target: str """ _validation = { 'code': {'readonly': True}, 'details': {'readonly': True}, 'message': {'readonly': True}, 'target': {'readonly': True}, } _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'details': {'key': 'details', 'type': '[ErrorModel]'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, } def __init__( self, **kwargs ): super(ErrorModel, self).__init__(**kwargs) self.code = None self.details = None self.message = None self.target = None class ErrorResponseModel(msrest.serialization.Model): """Default error response model. Variables are only populated by the server, and will be ignored when sending a request. :ivar error: Gets or sets the error. :vartype error: ~azure.mgmt.purview.models.ErrorModel """ _validation = { 'error': {'readonly': True}, } _attribute_map = { 'error': {'key': 'error', 'type': 'ErrorModel'}, } def __init__( self, **kwargs ): super(ErrorResponseModel, self).__init__(**kwargs) self.error = None class ErrorResponseModelError(ErrorModel): """Gets or sets the error. Variables are only populated by the server, and will be ignored when sending a request. :ivar code: Gets or sets the code. :vartype code: str :ivar details: Gets or sets the details. :vartype details: list[~azure.mgmt.purview.models.ErrorModel] :ivar message: Gets or sets the messages. :vartype message: str :ivar target: Gets or sets the target. :vartype target: str """ _validation = { 'code': {'readonly': True}, 'details': {'readonly': True}, 'message': {'readonly': True}, 'target': {'readonly': True}, } _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'details': {'key': 'details', 'type': '[ErrorModel]'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, } def __init__( self, **kwargs ): super(ErrorResponseModelError, self).__init__(**kwargs) class Identity(msrest.serialization.Model): """The Managed Identity of the resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar principal_id: Service principal object Id. :vartype principal_id: str :ivar tenant_id: Tenant Id. :vartype tenant_id: str :param type: Identity Type. Possible values include: "SystemAssigned". :type type: str or ~azure.mgmt.purview.models.Type """ _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, **kwargs ): super(Identity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None self.type = kwargs.get('type', None) class Operation(msrest.serialization.Model): """Operation resource. :param display: Properties on the operation. :type display: ~azure.mgmt.purview.models.OperationDisplay :param is_data_action: Whether operation is a data action. :type is_data_action: bool :param name: Operation name for display purposes. :type name: str :param origin: origin of the operation. :type origin: str :param service_specification: meta service specification. :type service_specification: ~azure.mgmt.purview.models.OperationMetaServiceSpecification """ _attribute_map = { 'display': {'key': 'display', 'type': 'OperationDisplay'}, 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'origin': {'key': 'origin', 'type': 'str'}, 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationMetaServiceSpecification'}, } def __init__( self, **kwargs ): super(Operation, self).__init__(**kwargs) self.display = kwargs.get('display', None) self.is_data_action = kwargs.get('is_data_action', None) self.name = kwargs.get('name', None) self.origin = kwargs.get('origin', None) self.service_specification = kwargs.get('service_specification', None) class OperationDisplay(msrest.serialization.Model): """The response model for get operation properties. :param description: Description of the operation for display purposes. :type description: str :param operation: Name of the operation for display purposes. :type operation: str :param provider: Name of the provider for display purposes. :type provider: str :param resource: Name of the resource type for display purposes. :type resource: str """ _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, 'operation': {'key': 'operation', 'type': 'str'}, 'provider': {'key': 'provider', 'type': 'str'}, 'resource': {'key': 'resource', 'type': 'str'}, } def __init__( self, **kwargs ): super(OperationDisplay, self).__init__(**kwargs) self.description = kwargs.get('description', None) self.operation = kwargs.get('operation', None) self.provider = kwargs.get('provider', None) self.resource = kwargs.get('resource', None) class OperationList(msrest.serialization.Model): """Paged list of operation resources. All required parameters must be populated in order to send to Azure. :param count: Total item count. :type count: long :param next_link: The Url of next result page. :type next_link: str :param value: Required. Collection of items of type results. :type value: list[~azure.mgmt.purview.models.Operation] """ _validation = { 'value': {'required': True}, } _attribute_map = { 'count': {'key': 'count', 'type': 'long'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, 'value': {'key': 'value', 'type': '[Operation]'}, } def __init__( self, **kwargs ): super(OperationList, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.next_link = kwargs.get('next_link', None) self.value = kwargs['value'] class OperationMetaLogSpecification(msrest.serialization.Model): """log specifications for operation api. :param blob_duration: blob duration of the log. :type blob_duration: str :param display_name: localized name of the log category. :type display_name: str :param name: name of the log category. :type name: str """ _attribute_map = { 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, } def __init__( self, **kwargs ): super(OperationMetaLogSpecification, self).__init__(**kwargs) self.blob_duration = kwargs.get('blob_duration', None) self.display_name = kwargs.get('display_name', None) self.name = kwargs.get('name', None) class OperationMetaMetricSpecification(msrest.serialization.Model): """metric specifications for the operation. :param aggregation_type: aggregation type of metric. :type aggregation_type: str :param dimensions: properties for dimension. :type dimensions: list[~azure.mgmt.purview.models.DimensionProperties] :param display_description: description of the metric. :type display_description: str :param display_name: localized name of the metric. :type display_name: str :param enable_regional_mdm_account: enable regional mdm account. :type enable_regional_mdm_account: str :param internal_metric_name: internal metric name. :type internal_metric_name: str :param name: name of the metric. :type name: str :param resource_id_dimension_name_override: dimension name use to replace resource id if specified. :type resource_id_dimension_name_override: str :param source_mdm_namespace: Metric namespace. Only set the namespace if different from the default value, leaving it empty makes it use the value from the ARM manifest. :type source_mdm_namespace: str :param supported_aggregation_types: supported aggregation types. :type supported_aggregation_types: list[str] :param supported_time_grain_types: supported time grain types. :type supported_time_grain_types: list[str] :param unit: units for the metric. :type unit: str """ _attribute_map = { 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, 'dimensions': {'key': 'dimensions', 'type': '[DimensionProperties]'}, 'display_description': {'key': 'displayDescription', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'unit': {'key': 'unit', 'type': 'str'}, } def __init__( self, **kwargs ): super(OperationMetaMetricSpecification, self).__init__(**kwargs) self.aggregation_type = kwargs.get('aggregation_type', None) self.dimensions = kwargs.get('dimensions', None) self.display_description = kwargs.get('display_description', None) self.display_name = kwargs.get('display_name', None) self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) self.internal_metric_name = kwargs.get('internal_metric_name', None) self.name = kwargs.get('name', None) self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) self.unit = kwargs.get('unit', None) class OperationMetaServiceSpecification(msrest.serialization.Model): """The operation meta service specification. :param log_specifications: log specifications for the operation. :type log_specifications: list[~azure.mgmt.purview.models.OperationMetaLogSpecification] :param metric_specifications: metric specifications for the operation. :type metric_specifications: list[~azure.mgmt.purview.models.OperationMetaMetricSpecification] """ _attribute_map = { 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationMetaLogSpecification]'}, 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetaMetricSpecification]'}, } def __init__( self, **kwargs ): super(OperationMetaServiceSpecification, self).__init__(**kwargs) self.log_specifications = kwargs.get('log_specifications', None) self.metric_specifications = kwargs.get('metric_specifications', None) class PrivateEndpoint(msrest.serialization.Model): """A private endpoint class. :param id: The private endpoint identifier. :type id: str """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, } def __init__( self, **kwargs ): super(PrivateEndpoint, self).__init__(**kwargs) self.id = kwargs.get('id', None) class PrivateEndpointConnection(ProxyResource): """A private endpoint connection class. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Gets or sets the identifier. :vartype id: str :ivar name: Gets or sets the name. :vartype name: str :ivar type: Gets or sets the type. :vartype type: str :param private_endpoint: The private endpoint information. :type private_endpoint: ~azure.mgmt.purview.models.PrivateEndpoint :param private_link_service_connection_state: The private link service connection state. :type private_link_service_connection_state: ~azure.mgmt.purview.models.PrivateLinkServiceConnectionState :ivar provisioning_state: The provisioning state. :vartype provisioning_state: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__( self, **kwargs ): super(PrivateEndpointConnection, self).__init__(**kwargs) self.private_endpoint = kwargs.get('private_endpoint', None) self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) self.provisioning_state = None class PrivateEndpointConnectionList(msrest.serialization.Model): """Paged list of private endpoint connections. All required parameters must be populated in order to send to Azure. :param count: Total item count. :type count: long :param next_link: The Url of next result page. :type next_link: str :param value: Required. Collection of items of type results. :type value: list[~azure.mgmt.purview.models.PrivateEndpointConnection] """ _validation = { 'value': {'required': True}, } _attribute_map = { 'count': {'key': 'count', 'type': 'long'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, } def __init__( self, **kwargs ): super(PrivateEndpointConnectionList, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.next_link = kwargs.get('next_link', None) self.value = kwargs['value'] class PrivateLinkResource(ProxyResource): """A privately linkable resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Gets or sets the identifier. :vartype id: str :ivar name: Gets or sets the name. :vartype name: str :ivar type: Gets or sets the type. :vartype type: str :ivar group_id: The private link resource group identifier. :vartype group_id: str :ivar required_members: This translates to how many Private IPs should be created for each privately linkable resource. :vartype required_members: list[str] :ivar required_zone_names: The required zone names for private link resource. :vartype required_zone_names: list[str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'group_id': {'readonly': True}, 'required_members': {'readonly': True}, 'required_zone_names': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'group_id': {'key': 'properties.groupId', 'type': 'str'}, 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, } def __init__( self, **kwargs ): super(PrivateLinkResource, self).__init__(**kwargs) self.group_id = None self.required_members = None self.required_zone_names = None class PrivateLinkResourceList(msrest.serialization.Model): """Paged list of private link resources. All required parameters must be populated in order to send to Azure. :param count: Total item count. :type count: long :param next_link: The Url of next result page. :type next_link: str :param value: Required. Collection of items of type results. :type value: list[~azure.mgmt.purview.models.PrivateLinkResource] """ _validation = { 'value': {'required': True}, } _attribute_map = { 'count': {'key': 'count', 'type': 'long'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, } def __init__( self, **kwargs ): super(PrivateLinkResourceList, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.next_link = kwargs.get('next_link', None) self.value = kwargs['value'] class PrivateLinkServiceConnectionState(msrest.serialization.Model): """The private link service connection state. :param actions_required: The required actions. :type actions_required: str :param description: The description. :type description: str :param status: The status. Possible values include: "Unknown", "Pending", "Approved", "Rejected", "Disconnected". :type status: str or ~azure.mgmt.purview.models.Status """ _attribute_map = { 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'status': {'key': 'status', 'type': 'str'}, } def __init__( self, **kwargs ): super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) self.actions_required = kwargs.get('actions_required', None) self.description = kwargs.get('description', None) self.status = kwargs.get('status', None)
mit
-4,076,056,713,243,702,000
34.96504
150
0.619907
false
connect2ocbc/pyocbc
ocbc/__init__.py
1
1511
#!/usr/bin/env python # # A library that provides a Python interface to the OCBC API # Copyright (C) 2016 # Naveen Sanmane <[email protected]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser Public License for more details. # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. """A library that provides a Python interface to the OCBC API""" from sys import version_info from .base import OcbcObject from .ocbcconnect import OcbcConnect from .nullhandler import NullHandler from .error import OcbcError from .error import Unauthorized from .forex import Forex from .rate import Rate from .branches import Branches from .branch import Branch from .atms import Atms from .atm import Atm from .ccsuggest import CCSuggest from .creditcard import CreditCard __author__ = '[email protected]' __version__ = '1.0.0' __all__ = ['OcbcObject', 'OcbcConnect', 'Forex', 'Rate', 'Branches', 'Branch', 'Atms', 'Atm', 'CCSuggest', 'CreditCard', 'OcbcError', 'Unauthorized', 'NullHandler',]
lgpl-3.0
-8,216,884,998,903,073,000
35.878049
81
0.74454
false
sethmbaker/fewsn-web
agent/tests.py
1
1963
from django.test import TestCase from sensor_net.models import Node, Reading, Sensor from agent import utils from agent.models import * class AlertLogTestCase(TestCase): # When a reading is created, the value is checked against def setUp(self): # This test case supposes a humidity monitor for a guitar, which self.sensor_1 = Sensor.objects.create(sensor_id='humidity') self.sensor_1.save() self.sensor_1 = Sensor.objects.get(sensor_id='humidity') self.node_1 = Node.objects.create(nickname='guitar humidity') self.node_1.save() self.node_1.sensors.add(self.sensor_1) self.readings = [] initial_reading = Reading.objects.create(node=self.node_1, sensor=self.sensor_1, val=50) self.readings.append(initial_reading) def test_alert_creation(self): pass def test_log_alert_creation(self): pass def test_signal(self): pass # # class Alert(models.Model): # alert_name = models.CharField(max_length=32, default='User alert', null=True) # alert_description = models.CharField(max_length=256, default='') # threshold_high = models.DecimalField(decimal_places=5, max_digits=16, blank=True, null=True) # threshold_low = models.DecimalField(decimal_places=5, max_digits=16, blank=True, null=True) # start_time = models.DateTimeField(default=datetime.now, blank=True) # duration = models.DurationField(default=timedelta(days=365)) # node = models.ManyToManyField('sensor_net.Node', help_text="One or more nodes you wish to watch") # sensor = models.ManyToManyField('sensor_net.Sensor', help_text="One or more sensors you wish to watch") # alert_action = models.ManyToManyField('Action', default=None) # # # TODO Add property that calls a utility function to send one or more reminder messages before the alert is # # set to expire # def __unicode__(self): # return self.alert_name
apache-2.0
-6,219,476,835,745,085,000
34.709091
113
0.687723
false
mwishoff/mattsWork
Cracking The Coding Interview/FindMissingNumbers.py
1
1145
from bitarray import bitarray def MissingNumbers(array): bArray = bitarray(100) missingNums = [] tempPair = [] strList = [] itr = iter(range(100)) strRange = "" for num in array: bArray[num] = 1 for i in itr: print(i) if bArray[i] == 0: tempPair.append(str(i)) while bArray[i] == 0: print(i) try: i = next(itr) except StopIteration: break tempPair.append(str(i - 1)) missingNums.append(tempPair) tempPair = [] for pair in missingNums: if pair[0] == pair[1]: strList.append(pair[0]) strList.append(", ") else: strList.append(pair[0]) strList.append('-') strList.append(pair[1]) strList.append(', ') return strRange.join(strList) def main(): array = [] for i in range(90): if i < 40 or i > 60: array.append(i) array = [0, 2, 4, 6, 9, 13, 15, 18, 21, 22, 24, 25] print(MissingNumbers(array)) main()
gpl-3.0
-7,503,232,586,219,784,000
20.203704
55
0.470742
false
jpachecot/Programa_Organizacion_Hotel_Royal_Decameron_Punta_Sal
modulobdreservaciones.py
1
17320
#MODULO RESERVACIONES - BASE DE DATOS import os import sys import sqlite3 import moduloinicio import moduloreservaciones def nombre(): letras = [' ','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','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'] while True: x = str(input("\tNOMBRE:")) verificacion = True for letra in x: if letra not in letras: print ("\tIngresa solo letras") verificación = False nombre() break if verificacion == True: return x def appaterno(): letras = [' ','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','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'] while True: x = str(input("\tAPELLIDO PATERNO:")) verificacion = True for letra in x: if letra not in letras: print ("\tIngresa solo letras") verificación = False appaterno() break if verificacion == True: return x def apmaterno(): letras = [' ','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','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'] while True: x = str(input("\tAPELLIDO MATERNO:")) verificacion = True for letra in x: if letra not in letras: print ("\tIngresa solo letras") verificación = False apmaterno() break if verificacion == True: return x def corigen(): letras = [' ','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','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'] while True: x = str(input("\tCIUDAD ORIGEN:")) verificacion = True for letra in x: if letra not in letras: print ("\tIngresa solo letras") verificación = False corigen() break if verificacion == True: return x def thabitacion(): global th1, th2, th3 print("\tSELECCIONE EL TIPO DE HABITACIONES QUE DESEA PARA SU RESERVACION") moduloreservaciones.thab1() while True: try: th1a=0 while (th1a!=1 and th1a!=2 and th1a!=3): th1a=int(input("\tCLASE DE HABITACION: ")) if th1a==1: th1='KIND A' print("\tSELECCIONE EL TIPO DE HABITACION") print("\t--------------------------------") moduloreservaciones.thab211() while True: try: th2a=0 while (th2a!=1 and th2a!=2): th2a=int(input("\tTIPO DE HABITACION: ")) if th2a==1: th2='SENCILLA' th3='' elif th2a==2: th2='DOBLE' th3='' else: print("\tIngrese un tipo valido") break except ValueError: print("\tSolo EXISTEN LOS TIPOS 1,2. Pruebe de nuevo POR FAVOR.") elif th1a==2: th1='KIND B' print("\tSELECCIONE EL TIPO DE HABITACION") print("\t--------------------------------") moduloreservaciones.thab212() while True: try: th2a=0 while (th2a!=1 and th2a!=2 and th2a!=3 and th2a!=4): th2a=int(input("\tTIPO DE HABITACION: ")) if th2a==1: th2='SENCILLA' th3='' elif th2a==2: th2='DOBLE' th3='' elif th2a==3: th2='TRIPLE' th3='' elif th2a==4: th2='CUADRUPLE' th3='' else: print("\tIngrese un tipo valido") break except ValueError: print("\tSolo EXISTEN LOS TIPOS 1,2,3,4. Pruebe de nuevo POR FAVOR.") elif th1a==3: th1='BUNGALOWS' print("\tSELECCIONE LAS CLASES DE BUNGALOWS") print("\t----------------------------------") moduloreservaciones.thab213() while True: try: th2a=0 while (th2a!=1 and th2a!=2): th2a=int(input("\tCLASE DE BUNGALOWS: ")) if th2a==1: th2='KIND A' print("\tSELECCIONE EL TIPO DE HABITACION") print("\t--------------------------------") moduloreservaciones.thab2131() while True: try: th3a=0 while (th3a!=1 and th3a!=2): th3a=int(input("\tTIPO DE HABITACION: ")) if th3a==1: th3='SENCILLA' elif th3a==2: th3='DOBLE' else: print("\tIngrese un tipo valido") break except ValueError: print("\tSolo EXISTEN LOS TIPOS 1,2. Pruebe de nuevo POR FAVOR.") elif th2a==2: th2='KIND B' print("\tSELECCIONE EL TIPO DE HABITACION") print("\t--------------------------------") moduloreservaciones.thab2132() while True: try: th3a=0 while (th3a!=1 and th3a!=2 and th3a!=3 and th3a!=4): th3a=int(input("\tTIPO DE HABITACION: ")) if th3a==1: th3='SENCILLA' elif th3a==2: th3='DOBLE' elif th3a==3: th3='TRIPLE' elif th3a==4: th3='CUADRUPLE' else: print("\tIngrese un tipo valido") break except ValueError: print("\tSolo EXISTEN LOS TIPOS 1,2,3,4. Pruebe de nuevo POR FAVOR.") else: print("\tIngrese una clase valida") break except ValueError: print("\tSolo EXISTEN LAS CLASES 1,2. Pruebe de nuevo POR FAVOR.") else: print("\tIngrese una clase valida") break except ValueError: print("\tSolo EXISTEN LAS CLASES 1,2,3. Pruebe de nuevo POR FAVOR.") def vtexto(a): for t in a: if ((ord(t)<65 or ord(t)>90) and (ord(t)<97 or ord(t)>122) and ord(t)!=32): return False return True def menubd(): os.system("cls") os.system("color e") print("\n\t\tMENU RESERVACIONES") print("\t\t******************") print("\t(1) Ver reservaciones") print("\t(2) Agregar reservaciones") print("\t(3) Modificar reservaciones") print("\t(4) Eliminar reservaciones") print("\t(5) Volver al menu principal") opbd = input("\tDigite una opcion del menu: ") if opbd == "1": os.system("clear") consulta() elif opbd == "2": os.system("clear") agregar() elif opbd == "3": modificar() elif opbd == "4": eliminar() elif opbd == "5": os.system ("cls") moduloinicio.menuprincipal() else: os.system("cls") input("\tDigite una opcion valida del menu") menubd() #-----------------------------------CONSULTAR-------------------------------- def consulta(): os.system("cls") con = sqlite3.connect("HOTEL.s3db") cursor = con.cursor() cursor.execute("SELECT * FROM reg_hotel") print("\tReservaciones Registradas") print("\t=========================\n") for v in cursor: print("\tReservacion: ", v[0]) print("\tDNI: ", v[5]) print("\tNombres: ", v[1]) print("\tApellido Paterno: ", v[2]) print("\tApellido Materno: ", v[3]) print("\tCiudad de Origen: ", v[4]) print("\tTipo de Reservacion: ", v[11]) print("\tFecha: ", v[6], " al ", v[7]) print("\tTipo de Habitacion: ", v[8], " - " , v[9], " - ", v[10]) print("\n\t------------------------------------------------------------\n") input("\tPresione 'Enter' para volver al menu...") con.close() menubd() #-----------------------------------AGREGAR-------------------------------- def agregar(): os.system("cls") print("\n\tAgregar Reservacion") print("\t===================\n") print("\tIngrese los datos que a continuacion se le piden POR FAVOR\n") #INGRESO DEL DNI while True: try: c=1 while c!=8: ndni=int(input("\tDNI: ")) c=len(str(ndni)) if c!=8: print("\tSolo se permite el ingreso de un DNI valido (8 numeros). Pruebe de nuevo POR FAVOR.") break except ValueError: print("\tSolo se permite el ingreso de valores numeros para su DNI. Pruebe de nuevo POR FAVOR.") ndni=str(ndni) #INGRESO DEL NOMBRE nom=nombre() #INGRESO DEL APELLIDO PATERNO appa=appaterno() #INGRESO DEL APELLIDO MATERNO apma=apmaterno() #INGRESO DE CIUDAD DE ORIGEN co=corigen() #INGRESO DEL TIPO DE RESERVACION print("\n\tTIPO DE RESERVACION") print("\t-------------------") print("\n\t(1) HOTEL") print("\t(2) HOTEL - AEREO") while True: try: tr=0 while (tr!=1 and tr!=2): tr=int(input("¿Que tipo de reservacion desea hacer(1,2): ")) if tr==1: tres='HOTEL' elif tr==2: tres='HOTEL - AEREO' else: print("Ingrese un tipo reservacion valido") break except ValueError: print("Solo EXISTEN LOS TIPOS DE RESERVACION 1,2. Pruebe de nuevo POR FAVOR.") #INGRESO DE FECHA ENTRADA fen=input("\n\tFecha de entrada: ") #INGRESO DE FECHA SALIDA fsa=input("\n\tFecha de salida: ") #INGRESO DE TIPO DE HABITACION thabitacion() con = sqlite3.connect("HOTEL.s3db") cursor = con.cursor() cursor.execute("Insert into reg_hotel (nombre,appaterno,apmaterno,ciudadorigen,dni,fentrada,fsalida,thab1,thab2,thab3,treservacion) values ('"+nom+"','"+appa+"','"+apma+"','"+co+"','"+ndni+"','"+fen+"','"+fsa+"','"+th1+"','"+th2+"','"+th3+"','"+tres+"')") con.commit() con.close() os.system("cls") input("Reservacion registrada exitosamente!") menubd() #-----------------------------------MODIFICAR-------------------------------- def modificar(): os.system("cls") con = sqlite3.connect("HOTEL.s3db") cursor = con.cursor() cursor.execute("SELECT * FROM reg_hotel") print("\tReservaciones Registradas") print("\t=========================\n") for v in cursor: print("\tReservacion: ", v[0]) print("\tDNI: ", v[5]) print("\tNombres: ", v[1]) print("\tApellido Paterno: ", v[2]) print("\tApellido Materno: ", v[3]) print("\tCiudad de Origen: ", v[4]) print("\tTipo de Reservacion: ", v[11]) print("\tFecha: ", v[6], " al ", v[7]) print("\tTipo de Habitacion: ", v[8], " - " , v[9], " - ", v[10]) print("\n\t------------------------------------------------------------\n") codigo = input("\tDigite el codigo del campo que desea modificar: ") print("\n\tIngrese los datos en los siguientes campos para modificar: ") while True: try: c=1 while c!=8: ndni=int(input("\tDNI: ")) c=len(str(ndni)) if c!=8: print("\tSolo se permite el ingreso de un DNI valido (8 numeros). Pruebe de nuevo POR FAVOR.") break except ValueError: print("\tSolo se permite el ingreso de valores numeros para su DNI. Pruebe de nuevo POR FAVOR.") ndni=str(ndni) nom=nombre() appa=appaterno() apma=apmaterno() co=corigen() print("\n\tTIPO DE RESERVACION") print("\t-------------------") print("\n\t(1) HOTEL") print("\t(2) HOTEL - AEREO") while True: try: tr=0 while (tr!=1 and tr!=2): tr=int(input("¿Que tipo de reservacion desea hacer(1,2): ")) if tr==1: tres='HOTEL' elif tr==2: tres='HOTEL - AEREO' else: print("Ingrese un tipo reservacion valido") break except ValueError: print("Solo EXISTEN LOS TIPOS DE RESERVACION 1,2. Pruebe de nuevo POR FAVOR.") fen=input("\n\tFecha de entrada: ") fsa=input("\n\tFecha de salida: ") thabitacion() cursor.execute("update reg_hotel set nombre = '"+nom+"', appaterno = '"+appa+"', apmaterno = '"+apma+"', ciudadorigen = '"+co+"', dni = '"+ndni+"', fentrada = '"+fen+"', fsalida = '"+fsa+"', thab1 = '"+th1+"', thab2 = '"+th2+"', thab3 = '"+th3+"', treservacion = '"+tres+"' where ID = '"+codigo+"' ") con.commit() con.close() os.system("cls") input("Reservacion modificada") menubd() #-----------------------------------ELIMINAR-------------------------------- def eliminar(): os.system("cls") con = sqlite3.connect("HOTEL.s3db") cursor = con.cursor() cursor.execute("SELECT * FROM reg_hotel") print("\tReservaciones Registradas") print("\t=========================\n") for v in cursor: print("\tReservacion: ", v[0]) print("\tDNI: ", v[5]) print("\tNombres: ", v[1]) print("\tApellido Paterno: ", v[2]) print("\tApellido Materno: ", v[3]) print("\tCiudad de Origen: ", v[4]) print("\tTipo de Reservacion: ", v[11]) print("\tFecha: ", v[6], " al ", v[7]) print("\tTipo de Habitacion: ", v[8], " - " , v[9], " - ", v[10]) print("\n\t------------------------------------------------------------\n") codigo = input("\tDigite el codigo del campo que desea eliminar: ") cursor.execute("delete from reg_hotel where ID = '"+codigo+"' ") con.commit() con.close() input("\tReservacion eliminada") menubd()
gpl-3.0
-6,831,424,874,366,414,000
37.511416
304
0.385011
false
arangodb/arangodb
3rdParty/V8/gyp/MSVS/MSVSSettings.py
1
45377
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. r"""Code to validate and convert settings of the Microsoft build tools. This file contains code to validate and convert settings of the Microsoft build tools. The function ConvertToMSBuildSettings(), ValidateMSVSSettings(), and ValidateMSBuildSettings() are the entry points. This file was created by comparing the projects created by Visual Studio 2008 and Visual Studio 2010 for all available settings through the user interface. The MSBuild schemas were also considered. They are typically found in the MSBuild install directory, e.g. c:\Program Files (x86)\MSBuild """ from __future__ import print_function import sys import re if 'basestring' not in __builtins__: basestring = str # Dictionaries of settings validators. The key is the tool name, the value is # a dictionary mapping setting names to validation functions. _msvs_validators = {} _msbuild_validators = {} # A dictionary of settings converters. The key is the tool name, the value is # a dictionary mapping setting names to conversion functions. _msvs_to_msbuild_converters = {} # Tool name mapping from MSVS to MSBuild. _msbuild_name_of_tool = {} class _Tool(object): """Represents a tool used by MSVS or MSBuild. Attributes: msvs_name: The name of the tool in MSVS. msbuild_name: The name of the tool in MSBuild. """ def __init__(self, msvs_name, msbuild_name): self.msvs_name = msvs_name self.msbuild_name = msbuild_name def _AddTool(tool): """Adds a tool to the four dictionaries used to process settings. This only defines the tool. Each setting also needs to be added. Args: tool: The _Tool object to be added. """ _msvs_validators[tool.msvs_name] = {} _msbuild_validators[tool.msbuild_name] = {} _msvs_to_msbuild_converters[tool.msvs_name] = {} _msbuild_name_of_tool[tool.msvs_name] = tool.msbuild_name def _GetMSBuildToolSettings(msbuild_settings, tool): """Returns an MSBuild tool dictionary. Creates it if needed.""" return msbuild_settings.setdefault(tool.msbuild_name, {}) class _Type(object): """Type of settings (Base class).""" def ValidateMSVS(self, value): """Verifies that the value is legal for MSVS. Args: value: the value to check for this type. Raises: ValueError if value is not valid for MSVS. """ def ValidateMSBuild(self, value): """Verifies that the value is legal for MSBuild. Args: value: the value to check for this type. Raises: ValueError if value is not valid for MSBuild. """ def ConvertToMSBuild(self, value): """Returns the MSBuild equivalent of the MSVS value given. Args: value: the MSVS value to convert. Returns: the MSBuild equivalent. Raises: ValueError if value is not valid. """ return value class _String(_Type): """A setting that's just a string.""" def ValidateMSVS(self, value): if not isinstance(value, basestring): raise ValueError('expected string; got %r' % value) def ValidateMSBuild(self, value): if not isinstance(value, basestring): raise ValueError('expected string; got %r' % value) def ConvertToMSBuild(self, value): # Convert the macros return ConvertVCMacrosToMSBuild(value) class _StringList(_Type): """A settings that's a list of strings.""" def ValidateMSVS(self, value): if not isinstance(value, basestring) and not isinstance(value, list): raise ValueError('expected string list; got %r' % value) def ValidateMSBuild(self, value): if not isinstance(value, basestring) and not isinstance(value, list): raise ValueError('expected string list; got %r' % value) def ConvertToMSBuild(self, value): # Convert the macros if isinstance(value, list): return [ConvertVCMacrosToMSBuild(i) for i in value] else: return ConvertVCMacrosToMSBuild(value) class _Boolean(_Type): """Boolean settings, can have the values 'false' or 'true'.""" def _Validate(self, value): if value != 'true' and value != 'false': raise ValueError('expected bool; got %r' % value) def ValidateMSVS(self, value): self._Validate(value) def ValidateMSBuild(self, value): self._Validate(value) def ConvertToMSBuild(self, value): self._Validate(value) return value class _Integer(_Type): """Integer settings.""" def __init__(self, msbuild_base=10): _Type.__init__(self) self._msbuild_base = msbuild_base def ValidateMSVS(self, value): # Try to convert, this will raise ValueError if invalid. self.ConvertToMSBuild(value) def ValidateMSBuild(self, value): # Try to convert, this will raise ValueError if invalid. int(value, self._msbuild_base) def ConvertToMSBuild(self, value): msbuild_format = (self._msbuild_base == 10) and '%d' or '0x%04x' return msbuild_format % int(value) class _Enumeration(_Type): """Type of settings that is an enumeration. In MSVS, the values are indexes like '0', '1', and '2'. MSBuild uses text labels that are more representative, like 'Win32'. Constructor args: label_list: an array of MSBuild labels that correspond to the MSVS index. In the rare cases where MSVS has skipped an index value, None is used in the array to indicate the unused spot. new: an array of labels that are new to MSBuild. """ def __init__(self, label_list, new=None): _Type.__init__(self) self._label_list = label_list self._msbuild_values = set(value for value in label_list if value is not None) if new is not None: self._msbuild_values.update(new) def ValidateMSVS(self, value): # Try to convert. It will raise an exception if not valid. self.ConvertToMSBuild(value) def ValidateMSBuild(self, value): if value not in self._msbuild_values: raise ValueError('unrecognized enumerated value %s' % value) def ConvertToMSBuild(self, value): index = int(value) if index < 0 or index >= len(self._label_list): raise ValueError('index value (%d) not in expected range [0, %d)' % (index, len(self._label_list))) label = self._label_list[index] if label is None: raise ValueError('converted value for %s not specified.' % value) return label # Instantiate the various generic types. _boolean = _Boolean() _integer = _Integer() # For now, we don't do any special validation on these types: _string = _String() _file_name = _String() _folder_name = _String() _file_list = _StringList() _folder_list = _StringList() _string_list = _StringList() # Some boolean settings went from numerical values to boolean. The # mapping is 0: default, 1: false, 2: true. _newly_boolean = _Enumeration(['', 'false', 'true']) def _Same(tool, name, setting_type): """Defines a setting that has the same name in MSVS and MSBuild. Args: tool: a dictionary that gives the names of the tool for MSVS and MSBuild. name: the name of the setting. setting_type: the type of this setting. """ _Renamed(tool, name, name, setting_type) def _Renamed(tool, msvs_name, msbuild_name, setting_type): """Defines a setting for which the name has changed. Args: tool: a dictionary that gives the names of the tool for MSVS and MSBuild. msvs_name: the name of the MSVS setting. msbuild_name: the name of the MSBuild setting. setting_type: the type of this setting. """ def _Translate(value, msbuild_settings): msbuild_tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool) msbuild_tool_settings[msbuild_name] = setting_type.ConvertToMSBuild(value) _msvs_validators[tool.msvs_name][msvs_name] = setting_type.ValidateMSVS _msbuild_validators[tool.msbuild_name][msbuild_name] = ( setting_type.ValidateMSBuild) _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate def _Moved(tool, settings_name, msbuild_tool_name, setting_type): _MovedAndRenamed(tool, settings_name, msbuild_tool_name, settings_name, setting_type) def _MovedAndRenamed(tool, msvs_settings_name, msbuild_tool_name, msbuild_settings_name, setting_type): """Defines a setting that may have moved to a new section. Args: tool: a dictionary that gives the names of the tool for MSVS and MSBuild. msvs_settings_name: the MSVS name of the setting. msbuild_tool_name: the name of the MSBuild tool to place the setting under. msbuild_settings_name: the MSBuild name of the setting. setting_type: the type of this setting. """ def _Translate(value, msbuild_settings): tool_settings = msbuild_settings.setdefault(msbuild_tool_name, {}) tool_settings[msbuild_settings_name] = setting_type.ConvertToMSBuild(value) _msvs_validators[tool.msvs_name][msvs_settings_name] = ( setting_type.ValidateMSVS) validator = setting_type.ValidateMSBuild _msbuild_validators[msbuild_tool_name][msbuild_settings_name] = validator _msvs_to_msbuild_converters[tool.msvs_name][msvs_settings_name] = _Translate def _MSVSOnly(tool, name, setting_type): """Defines a setting that is only found in MSVS. Args: tool: a dictionary that gives the names of the tool for MSVS and MSBuild. name: the name of the setting. setting_type: the type of this setting. """ # noinspection PyUnusedLocal def _Translate(unused_value, unused_msbuild_settings): # Since this is for MSVS only settings, no translation will happen. pass _msvs_validators[tool.msvs_name][name] = setting_type.ValidateMSVS _msvs_to_msbuild_converters[tool.msvs_name][name] = _Translate def _MSBuildOnly(tool, name, setting_type): """Defines a setting that is only found in MSBuild. Args: tool: a dictionary that gives the names of the tool for MSVS and MSBuild. name: the name of the setting. setting_type: the type of this setting. """ def _Translate(value, msbuild_settings): # Let msbuild-only properties get translated as-is from msvs_settings. tool_settings = msbuild_settings.setdefault(tool.msbuild_name, {}) tool_settings[name] = value _msbuild_validators[tool.msbuild_name][name] = setting_type.ValidateMSBuild _msvs_to_msbuild_converters[tool.msvs_name][name] = _Translate def _ConvertedToAdditionalOption(tool, msvs_name, flag): """Defines a setting that's handled via a command line option in MSBuild. Args: tool: a dictionary that gives the names of the tool for MSVS and MSBuild. msvs_name: the name of the MSVS setting that if 'true' becomes a flag flag: the flag to insert at the end of the AdditionalOptions """ def _Translate(value, msbuild_settings): if value == 'true': tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool) if 'AdditionalOptions' in tool_settings: new_flags = '%s %s' % (tool_settings['AdditionalOptions'], flag) else: new_flags = flag tool_settings['AdditionalOptions'] = new_flags _msvs_validators[tool.msvs_name][msvs_name] = _boolean.ValidateMSVS _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate def _CustomGeneratePreprocessedFile(tool, msvs_name): def _Translate(value, msbuild_settings): tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool) if value == '0': tool_settings['PreprocessToFile'] = 'false' tool_settings['PreprocessSuppressLineNumbers'] = 'false' elif value == '1': # /P tool_settings['PreprocessToFile'] = 'true' tool_settings['PreprocessSuppressLineNumbers'] = 'false' elif value == '2': # /EP /P tool_settings['PreprocessToFile'] = 'true' tool_settings['PreprocessSuppressLineNumbers'] = 'true' else: raise ValueError('value must be one of [0, 1, 2]; got %s' % value) # Create a bogus validator that looks for '0', '1', or '2' msvs_validator = _Enumeration(['a', 'b', 'c']).ValidateMSVS _msvs_validators[tool.msvs_name][msvs_name] = msvs_validator msbuild_validator = _boolean.ValidateMSBuild msbuild_tool_validators = _msbuild_validators[tool.msbuild_name] msbuild_tool_validators['PreprocessToFile'] = msbuild_validator msbuild_tool_validators['PreprocessSuppressLineNumbers'] = msbuild_validator _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate fix_vc_macro_slashes_regex_list = ('IntDir', 'OutDir') fix_vc_macro_slashes_regex = re.compile( r'(\$\((?:%s)\))(?:[\\/]+)' % "|".join(fix_vc_macro_slashes_regex_list) ) # Regular expression to detect keys that were generated by exclusion lists _EXCLUDED_SUFFIX_RE = re.compile('^(.*)_excluded$') def _ValidateExclusionSetting(setting, settings, error_msg, stderr=sys.stderr): """Verify that 'setting' is valid if it is generated from an exclusion list. If the setting appears to be generated from an exclusion list, the root name is checked. Args: setting: A string that is the setting name to validate settings: A dictionary where the keys are valid settings error_msg: The message to emit in the event of error stderr: The stream receiving the error messages. """ # This may be unrecognized because it's an exclusion list. If the # setting name has the _excluded suffix, then check the root name. unrecognized = True m = re.match(_EXCLUDED_SUFFIX_RE, setting) if m: root_setting = m.group(1) unrecognized = root_setting not in settings if unrecognized: # We don't know this setting. Give a warning. print(error_msg, file=stderr) def FixVCMacroSlashes(s): """Replace macros which have excessive following slashes. These macros are known to have a built-in trailing slash. Furthermore, many scripts hiccup on processing paths with extra slashes in the middle. This list is probably not exhaustive. Add as needed. """ if '$' in s: s = fix_vc_macro_slashes_regex.sub(r'\1', s) return s def ConvertVCMacrosToMSBuild(s): """Convert the the MSVS macros found in the string to the MSBuild equivalent. This list is probably not exhaustive. Add as needed. """ if '$' in s: replace_map = { '$(ConfigurationName)': '$(Configuration)', '$(InputDir)': '%(RelativeDir)', '$(InputExt)': '%(Extension)', '$(InputFileName)': '%(Filename)%(Extension)', '$(InputName)': '%(Filename)', '$(InputPath)': '%(Identity)', '$(ParentName)': '$(ProjectFileName)', '$(PlatformName)': '$(Platform)', '$(SafeInputName)': '%(Filename)', } for old, new in replace_map.items(): s = s.replace(old, new) s = FixVCMacroSlashes(s) return s def ConvertToMSBuildSettings(msvs_settings, stderr=sys.stderr): """Converts MSVS settings (VS2008 and earlier) to MSBuild settings (VS2010+). Args: msvs_settings: A dictionary. The key is the tool name. The values are themselves dictionaries of settings and their values. stderr: The stream receiving the error messages. Returns: A dictionary of MSBuild settings. The key is either the MSBuild tool name or the empty string (for the global settings). The values are themselves dictionaries of settings and their values. """ msbuild_settings = {} for msvs_tool_name, msvs_tool_settings in msvs_settings.items(): if msvs_tool_name in _msvs_to_msbuild_converters: msvs_tool = _msvs_to_msbuild_converters[msvs_tool_name] for msvs_setting, msvs_value in msvs_tool_settings.items(): if msvs_setting in msvs_tool: # Invoke the translation function. try: msvs_tool[msvs_setting](msvs_value, msbuild_settings) except ValueError as e: print(('Warning: while converting %s/%s to MSBuild, ' '%s' % (msvs_tool_name, msvs_setting, e)), file=stderr) else: _ValidateExclusionSetting(msvs_setting, msvs_tool, ('Warning: unrecognized setting %s/%s ' 'while converting to MSBuild.' % (msvs_tool_name, msvs_setting)), stderr) else: print(('Warning: unrecognized tool %s while converting to ' 'MSBuild.' % msvs_tool_name), file=stderr) return msbuild_settings def ValidateMSVSSettings(settings, stderr=sys.stderr): """Validates that the names of the settings are valid for MSVS. Args: settings: A dictionary. The key is the tool name. The values are themselves dictionaries of settings and their values. stderr: The stream receiving the error messages. """ _ValidateSettings(_msvs_validators, settings, stderr) def ValidateMSBuildSettings(settings, stderr=sys.stderr): """Validates that the names of the settings are valid for MSBuild. Args: settings: A dictionary. The key is the tool name. The values are themselves dictionaries of settings and their values. stderr: The stream receiving the error messages. """ _ValidateSettings(_msbuild_validators, settings, stderr) def _ValidateSettings(validators, settings, stderr): """Validates that the settings are valid for MSBuild or MSVS. We currently only validate the names of the settings, not their values. Args: validators: A dictionary of tools and their validators. settings: A dictionary. The key is the tool name. The values are themselves dictionaries of settings and their values. stderr: The stream receiving the error messages. """ for tool_name in settings: if tool_name in validators: tool_validators = validators[tool_name] for setting, value in settings[tool_name].items(): if setting in tool_validators: try: tool_validators[setting](value) except ValueError as e: print(('Warning: for %s/%s, %s' % (tool_name, setting, e)), file=stderr) else: _ValidateExclusionSetting(setting, tool_validators, ('Warning: unrecognized setting %s/%s' % (tool_name, setting)), stderr) else: print(('Warning: unrecognized tool %s' % tool_name), file=stderr) # MSVS and MBuild names of the tools. _compile = _Tool('VCCLCompilerTool', 'ClCompile') _link = _Tool('VCLinkerTool', 'Link') _midl = _Tool('VCMIDLTool', 'Midl') _rc = _Tool('VCResourceCompilerTool', 'ResourceCompile') _lib = _Tool('VCLibrarianTool', 'Lib') _manifest = _Tool('VCManifestTool', 'Manifest') _masm = _Tool('MASM', 'MASM') _marmasm = _Tool('MARMASM', 'MARMASM') _AddTool(_compile) _AddTool(_link) _AddTool(_midl) _AddTool(_rc) _AddTool(_lib) _AddTool(_manifest) _AddTool(_masm) _AddTool(_marmasm) # Add sections only found in the MSBuild settings. _msbuild_validators[''] = {} _msbuild_validators['ProjectReference'] = {} _msbuild_validators['ManifestResourceCompile'] = {} # Descriptions of the compiler options, i.e. VCCLCompilerTool in MSVS and # ClCompile in MSBuild. # See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\cl.xml" for # the schema of the MSBuild ClCompile settings. # Options that have the same name in MSVS and MSBuild _Same(_compile, 'AdditionalIncludeDirectories', _folder_list) # /I _Same(_compile, 'AdditionalOptions', _string_list) _Same(_compile, 'AdditionalUsingDirectories', _folder_list) # /AI _Same(_compile, 'AssemblerListingLocation', _file_name) # /Fa _Same(_compile, 'BrowseInformationFile', _file_name) _Same(_compile, 'BufferSecurityCheck', _boolean) # /GS _Same(_compile, 'DisableLanguageExtensions', _boolean) # /Za _Same(_compile, 'DisableSpecificWarnings', _string_list) # /wd _Same(_compile, 'EnableFiberSafeOptimizations', _boolean) # /GT _Same(_compile, 'EnablePREfast', _boolean) # /analyze Visible='false' _Same(_compile, 'ExpandAttributedSource', _boolean) # /Fx _Same(_compile, 'FloatingPointExceptions', _boolean) # /fp:except _Same(_compile, 'ForceConformanceInForLoopScope', _boolean) # /Zc:forScope _Same(_compile, 'ForcedIncludeFiles', _file_list) # /FI _Same(_compile, 'ForcedUsingFiles', _file_list) # /FU _Same(_compile, 'GenerateXMLDocumentationFiles', _boolean) # /doc _Same(_compile, 'IgnoreStandardIncludePath', _boolean) # /X _Same(_compile, 'MinimalRebuild', _boolean) # /Gm _Same(_compile, 'OmitDefaultLibName', _boolean) # /Zl _Same(_compile, 'OmitFramePointers', _boolean) # /Oy _Same(_compile, 'PreprocessorDefinitions', _string_list) # /D _Same(_compile, 'ProgramDataBaseFileName', _file_name) # /Fd _Same(_compile, 'RuntimeTypeInfo', _boolean) # /GR _Same(_compile, 'ShowIncludes', _boolean) # /showIncludes _Same(_compile, 'SmallerTypeCheck', _boolean) # /RTCc _Same(_compile, 'StringPooling', _boolean) # /GF _Same(_compile, 'SuppressStartupBanner', _boolean) # /nologo _Same(_compile, 'TreatWChar_tAsBuiltInType', _boolean) # /Zc:wchar_t _Same(_compile, 'UndefineAllPreprocessorDefinitions', _boolean) # /u _Same(_compile, 'UndefinePreprocessorDefinitions', _string_list) # /U _Same(_compile, 'UseFullPaths', _boolean) # /FC _Same(_compile, 'WholeProgramOptimization', _boolean) # /GL _Same(_compile, 'XMLDocumentationFileName', _file_name) _Same(_compile, 'CompileAsWinRT', _boolean) # /ZW _Same(_compile, 'AssemblerOutput', _Enumeration(['NoListing', 'AssemblyCode', # /FA 'All', # /FAcs 'AssemblyAndMachineCode', # /FAc 'AssemblyAndSourceCode'])) # /FAs _Same(_compile, 'BasicRuntimeChecks', _Enumeration(['Default', 'StackFrameRuntimeCheck', # /RTCs 'UninitializedLocalUsageCheck', # /RTCu 'EnableFastChecks'])) # /RTC1 _Same(_compile, 'BrowseInformation', _Enumeration(['false', 'true', # /FR 'true'])) # /Fr _Same(_compile, 'CallingConvention', _Enumeration(['Cdecl', # /Gd 'FastCall', # /Gr 'StdCall', # /Gz 'VectorCall'])) # /Gv _Same(_compile, 'CompileAs', _Enumeration(['Default', 'CompileAsC', # /TC 'CompileAsCpp'])) # /TP _Same(_compile, 'DebugInformationFormat', _Enumeration(['', # Disabled 'OldStyle', # /Z7 None, 'ProgramDatabase', # /Zi 'EditAndContinue'])) # /ZI _Same(_compile, 'EnableEnhancedInstructionSet', _Enumeration(['NotSet', 'StreamingSIMDExtensions', # /arch:SSE 'StreamingSIMDExtensions2', # /arch:SSE2 'AdvancedVectorExtensions', # /arch:AVX (vs2012+) 'NoExtensions', # /arch:IA32 (vs2012+) # This one only exists in the new msbuild format. 'AdvancedVectorExtensions2', # /arch:AVX2 (vs2013r2+) ])) _Same(_compile, 'ErrorReporting', _Enumeration(['None', # /errorReport:none 'Prompt', # /errorReport:prompt 'Queue'], # /errorReport:queue new=['Send'])) # /errorReport:send" _Same(_compile, 'ExceptionHandling', _Enumeration(['false', 'Sync', # /EHsc 'Async'], # /EHa new=['SyncCThrow'])) # /EHs _Same(_compile, 'FavorSizeOrSpeed', _Enumeration(['Neither', 'Speed', # /Ot 'Size'])) # /Os _Same(_compile, 'FloatingPointModel', _Enumeration(['Precise', # /fp:precise 'Strict', # /fp:strict 'Fast'])) # /fp:fast _Same(_compile, 'InlineFunctionExpansion', _Enumeration(['Default', 'OnlyExplicitInline', # /Ob1 'AnySuitable'], # /Ob2 new=['Disabled'])) # /Ob0 _Same(_compile, 'Optimization', _Enumeration(['Disabled', # /Od 'MinSpace', # /O1 'MaxSpeed', # /O2 'Full'])) # /Ox _Same(_compile, 'RuntimeLibrary', _Enumeration(['MultiThreaded', # /MT 'MultiThreadedDebug', # /MTd 'MultiThreadedDLL', # /MD 'MultiThreadedDebugDLL'])) # /MDd _Same(_compile, 'StructMemberAlignment', _Enumeration(['Default', '1Byte', # /Zp1 '2Bytes', # /Zp2 '4Bytes', # /Zp4 '8Bytes', # /Zp8 '16Bytes'])) # /Zp16 _Same(_compile, 'WarningLevel', _Enumeration(['TurnOffAllWarnings', # /W0 'Level1', # /W1 'Level2', # /W2 'Level3', # /W3 'Level4'], # /W4 new=['EnableAllWarnings'])) # /Wall # Options found in MSVS that have been renamed in MSBuild. _Renamed(_compile, 'EnableFunctionLevelLinking', 'FunctionLevelLinking', _boolean) # /Gy _Renamed(_compile, 'EnableIntrinsicFunctions', 'IntrinsicFunctions', _boolean) # /Oi _Renamed(_compile, 'KeepComments', 'PreprocessKeepComments', _boolean) # /C _Renamed(_compile, 'ObjectFile', 'ObjectFileName', _file_name) # /Fo _Renamed(_compile, 'OpenMP', 'OpenMPSupport', _boolean) # /openmp _Renamed(_compile, 'PrecompiledHeaderThrough', 'PrecompiledHeaderFile', _file_name) # Used with /Yc and /Yu _Renamed(_compile, 'PrecompiledHeaderFile', 'PrecompiledHeaderOutputFile', _file_name) # /Fp _Renamed(_compile, 'UsePrecompiledHeader', 'PrecompiledHeader', _Enumeration(['NotUsing', # VS recognized '' for this value too. 'Create', # /Yc 'Use'])) # /Yu _Renamed(_compile, 'WarnAsError', 'TreatWarningAsError', _boolean) # /WX _ConvertedToAdditionalOption(_compile, 'DefaultCharIsUnsigned', '/J') # MSVS options not found in MSBuild. _MSVSOnly(_compile, 'Detect64BitPortabilityProblems', _boolean) _MSVSOnly(_compile, 'UseUnicodeResponseFiles', _boolean) # MSBuild options not found in MSVS. _MSBuildOnly(_compile, 'BuildingInIDE', _boolean) _MSBuildOnly(_compile, 'CompileAsManaged', _Enumeration([], new=['false', 'true'])) # /clr _MSBuildOnly(_compile, 'CreateHotpatchableImage', _boolean) # /hotpatch _MSBuildOnly(_compile, 'MultiProcessorCompilation', _boolean) # /MP _MSBuildOnly(_compile, 'PreprocessOutputPath', _string) # /Fi _MSBuildOnly(_compile, 'ProcessorNumber', _integer) # the number of processors _MSBuildOnly(_compile, 'TrackerLogDirectory', _folder_name) _MSBuildOnly(_compile, 'TreatSpecificWarningsAsErrors', _string_list) # /we _MSBuildOnly(_compile, 'UseUnicodeForAssemblerListing', _boolean) # /FAu # Defines a setting that needs very customized processing _CustomGeneratePreprocessedFile(_compile, 'GeneratePreprocessedFile') # Directives for converting MSVS VCLinkerTool to MSBuild Link. # See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\link.xml" for # the schema of the MSBuild Link settings. # Options that have the same name in MSVS and MSBuild _Same(_link, 'AdditionalDependencies', _file_list) _Same(_link, 'AdditionalLibraryDirectories', _folder_list) # /LIBPATH # /MANIFESTDEPENDENCY: _Same(_link, 'AdditionalManifestDependencies', _file_list) _Same(_link, 'AdditionalOptions', _string_list) _Same(_link, 'AddModuleNamesToAssembly', _file_list) # /ASSEMBLYMODULE _Same(_link, 'AllowIsolation', _boolean) # /ALLOWISOLATION _Same(_link, 'AssemblyLinkResource', _file_list) # /ASSEMBLYLINKRESOURCE _Same(_link, 'BaseAddress', _string) # /BASE _Same(_link, 'CLRUnmanagedCodeCheck', _boolean) # /CLRUNMANAGEDCODECHECK _Same(_link, 'DelayLoadDLLs', _file_list) # /DELAYLOAD _Same(_link, 'DelaySign', _boolean) # /DELAYSIGN _Same(_link, 'EmbedManagedResourceFile', _file_list) # /ASSEMBLYRESOURCE _Same(_link, 'EnableUAC', _boolean) # /MANIFESTUAC _Same(_link, 'EntryPointSymbol', _string) # /ENTRY _Same(_link, 'ForceSymbolReferences', _file_list) # /INCLUDE _Same(_link, 'FunctionOrder', _file_name) # /ORDER _Same(_link, 'GenerateDebugInformation', _boolean) # /DEBUG _Same(_link, 'GenerateMapFile', _boolean) # /MAP _Same(_link, 'HeapCommitSize', _string) _Same(_link, 'HeapReserveSize', _string) # /HEAP _Same(_link, 'IgnoreAllDefaultLibraries', _boolean) # /NODEFAULTLIB _Same(_link, 'IgnoreEmbeddedIDL', _boolean) # /IGNOREIDL _Same(_link, 'ImportLibrary', _file_name) # /IMPLIB _Same(_link, 'KeyContainer', _file_name) # /KEYCONTAINER _Same(_link, 'KeyFile', _file_name) # /KEYFILE _Same(_link, 'ManifestFile', _file_name) # /ManifestFile _Same(_link, 'MapExports', _boolean) # /MAPINFO:EXPORTS _Same(_link, 'MapFileName', _file_name) _Same(_link, 'MergedIDLBaseFileName', _file_name) # /IDLOUT _Same(_link, 'MergeSections', _string) # /MERGE _Same(_link, 'MidlCommandFile', _file_name) # /MIDL _Same(_link, 'ModuleDefinitionFile', _file_name) # /DEF _Same(_link, 'OutputFile', _file_name) # /OUT _Same(_link, 'PerUserRedirection', _boolean) _Same(_link, 'Profile', _boolean) # /PROFILE _Same(_link, 'ProfileGuidedDatabase', _file_name) # /PGD _Same(_link, 'ProgramDatabaseFile', _file_name) # /PDB _Same(_link, 'RegisterOutput', _boolean) _Same(_link, 'SetChecksum', _boolean) # /RELEASE _Same(_link, 'StackCommitSize', _string) _Same(_link, 'StackReserveSize', _string) # /STACK _Same(_link, 'StripPrivateSymbols', _file_name) # /PDBSTRIPPED _Same(_link, 'SupportUnloadOfDelayLoadedDLL', _boolean) # /DELAY:UNLOAD _Same(_link, 'SuppressStartupBanner', _boolean) # /NOLOGO _Same(_link, 'SwapRunFromCD', _boolean) # /SWAPRUN:CD _Same(_link, 'TurnOffAssemblyGeneration', _boolean) # /NOASSEMBLY _Same(_link, 'TypeLibraryFile', _file_name) # /TLBOUT _Same(_link, 'TypeLibraryResourceID', _integer) # /TLBID _Same(_link, 'UACUIAccess', _boolean) # /uiAccess='true' _Same(_link, 'Version', _string) # /VERSION _Same(_link, 'EnableCOMDATFolding', _newly_boolean) # /OPT:ICF _Same(_link, 'FixedBaseAddress', _newly_boolean) # /FIXED _Same(_link, 'LargeAddressAware', _newly_boolean) # /LARGEADDRESSAWARE _Same(_link, 'OptimizeReferences', _newly_boolean) # /OPT:REF _Same(_link, 'RandomizedBaseAddress', _newly_boolean) # /DYNAMICBASE _Same(_link, 'TerminalServerAware', _newly_boolean) # /TSAWARE _subsystem_enumeration = _Enumeration( ['NotSet', 'Console', # /SUBSYSTEM:CONSOLE 'Windows', # /SUBSYSTEM:WINDOWS 'Native', # /SUBSYSTEM:NATIVE 'EFI Application', # /SUBSYSTEM:EFI_APPLICATION 'EFI Boot Service Driver', # /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER 'EFI ROM', # /SUBSYSTEM:EFI_ROM 'EFI Runtime', # /SUBSYSTEM:EFI_RUNTIME_DRIVER 'WindowsCE'], # /SUBSYSTEM:WINDOWSCE new=['POSIX']) # /SUBSYSTEM:POSIX _target_machine_enumeration = _Enumeration( ['NotSet', 'MachineX86', # /MACHINE:X86 None, 'MachineARM', # /MACHINE:ARM 'MachineEBC', # /MACHINE:EBC 'MachineIA64', # /MACHINE:IA64 None, 'MachineMIPS', # /MACHINE:MIPS 'MachineMIPS16', # /MACHINE:MIPS16 'MachineMIPSFPU', # /MACHINE:MIPSFPU 'MachineMIPSFPU16', # /MACHINE:MIPSFPU16 None, None, None, 'MachineSH4', # /MACHINE:SH4 None, 'MachineTHUMB', # /MACHINE:THUMB 'MachineX64']) # /MACHINE:X64 _Same(_link, 'AssemblyDebug', _Enumeration(['', 'true', # /ASSEMBLYDEBUG 'false'])) # /ASSEMBLYDEBUG:DISABLE _Same(_link, 'CLRImageType', _Enumeration(['Default', 'ForceIJWImage', # /CLRIMAGETYPE:IJW 'ForcePureILImage', # /Switch="CLRIMAGETYPE:PURE 'ForceSafeILImage'])) # /Switch="CLRIMAGETYPE:SAFE _Same(_link, 'CLRThreadAttribute', _Enumeration(['DefaultThreadingAttribute', # /CLRTHREADATTRIBUTE:NONE 'MTAThreadingAttribute', # /CLRTHREADATTRIBUTE:MTA 'STAThreadingAttribute'])) # /CLRTHREADATTRIBUTE:STA _Same(_link, 'DataExecutionPrevention', _Enumeration(['', 'false', # /NXCOMPAT:NO 'true'])) # /NXCOMPAT _Same(_link, 'Driver', _Enumeration(['NotSet', 'Driver', # /Driver 'UpOnly', # /DRIVER:UPONLY 'WDM'])) # /DRIVER:WDM _Same(_link, 'LinkTimeCodeGeneration', _Enumeration(['Default', 'UseLinkTimeCodeGeneration', # /LTCG 'PGInstrument', # /LTCG:PGInstrument 'PGOptimization', # /LTCG:PGOptimize 'PGUpdate'])) # /LTCG:PGUpdate _Same(_link, 'ShowProgress', _Enumeration(['NotSet', 'LinkVerbose', # /VERBOSE 'LinkVerboseLib'], # /VERBOSE:Lib new=['LinkVerboseICF', # /VERBOSE:ICF 'LinkVerboseREF', # /VERBOSE:REF 'LinkVerboseSAFESEH', # /VERBOSE:SAFESEH 'LinkVerboseCLR'])) # /VERBOSE:CLR _Same(_link, 'SubSystem', _subsystem_enumeration) _Same(_link, 'TargetMachine', _target_machine_enumeration) _Same(_link, 'UACExecutionLevel', _Enumeration(['AsInvoker', # /level='asInvoker' 'HighestAvailable', # /level='highestAvailable' 'RequireAdministrator'])) # /level='requireAdministrator' _Same(_link, 'MinimumRequiredVersion', _string) _Same(_link, 'TreatLinkerWarningAsErrors', _boolean) # /WX # Options found in MSVS that have been renamed in MSBuild. _Renamed(_link, 'ErrorReporting', 'LinkErrorReporting', _Enumeration(['NoErrorReport', # /ERRORREPORT:NONE 'PromptImmediately', # /ERRORREPORT:PROMPT 'QueueForNextLogin'], # /ERRORREPORT:QUEUE new=['SendErrorReport'])) # /ERRORREPORT:SEND _Renamed(_link, 'IgnoreDefaultLibraryNames', 'IgnoreSpecificDefaultLibraries', _file_list) # /NODEFAULTLIB _Renamed(_link, 'ResourceOnlyDLL', 'NoEntryPoint', _boolean) # /NOENTRY _Renamed(_link, 'SwapRunFromNet', 'SwapRunFromNET', _boolean) # /SWAPRUN:NET _Moved(_link, 'GenerateManifest', '', _boolean) _Moved(_link, 'IgnoreImportLibrary', '', _boolean) _Moved(_link, 'LinkIncremental', '', _newly_boolean) _Moved(_link, 'LinkLibraryDependencies', 'ProjectReference', _boolean) _Moved(_link, 'UseLibraryDependencyInputs', 'ProjectReference', _boolean) # MSVS options not found in MSBuild. _MSVSOnly(_link, 'OptimizeForWindows98', _newly_boolean) _MSVSOnly(_link, 'UseUnicodeResponseFiles', _boolean) # MSBuild options not found in MSVS. _MSBuildOnly(_link, 'BuildingInIDE', _boolean) _MSBuildOnly(_link, 'ImageHasSafeExceptionHandlers', _boolean) # /SAFESEH _MSBuildOnly(_link, 'LinkDLL', _boolean) # /DLL Visible='false' _MSBuildOnly(_link, 'LinkStatus', _boolean) # /LTCG:STATUS _MSBuildOnly(_link, 'PreventDllBinding', _boolean) # /ALLOWBIND _MSBuildOnly(_link, 'SupportNobindOfDelayLoadedDLL', _boolean) # /DELAY:NOBIND _MSBuildOnly(_link, 'TrackerLogDirectory', _folder_name) _MSBuildOnly(_link, 'MSDOSStubFileName', _file_name) # /STUB Visible='false' _MSBuildOnly(_link, 'SectionAlignment', _integer) # /ALIGN _MSBuildOnly(_link, 'SpecifySectionAttributes', _string) # /SECTION _MSBuildOnly(_link, 'ForceFileOutput', _Enumeration([], new=['Enabled', # /FORCE # /FORCE:MULTIPLE 'MultiplyDefinedSymbolOnly', 'UndefinedSymbolOnly'])) # /FORCE:UNRESOLVED _MSBuildOnly(_link, 'CreateHotPatchableImage', _Enumeration([], new=['Enabled', # /FUNCTIONPADMIN 'X86Image', # /FUNCTIONPADMIN:5 'X64Image', # /FUNCTIONPADMIN:6 'ItaniumImage'])) # /FUNCTIONPADMIN:16 _MSBuildOnly(_link, 'CLRSupportLastError', _Enumeration([], new=['Enabled', # /CLRSupportLastError 'Disabled', # /CLRSupportLastError:NO # /CLRSupportLastError:SYSTEMDLL 'SystemDlls'])) # Directives for converting VCResourceCompilerTool to ResourceCompile. # See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\rc.xml" for # the schema of the MSBuild ResourceCompile settings. _Same(_rc, 'AdditionalOptions', _string_list) _Same(_rc, 'AdditionalIncludeDirectories', _folder_list) # /I _Same(_rc, 'Culture', _Integer(msbuild_base=16)) _Same(_rc, 'IgnoreStandardIncludePath', _boolean) # /X _Same(_rc, 'PreprocessorDefinitions', _string_list) # /D _Same(_rc, 'ResourceOutputFileName', _string) # /fo _Same(_rc, 'ShowProgress', _boolean) # /v # There is no UI in VisualStudio 2008 to set the following properties. # However they are found in CL and other tools. Include them here for # completeness, as they are very likely to have the same usage pattern. _Same(_rc, 'SuppressStartupBanner', _boolean) # /nologo _Same(_rc, 'UndefinePreprocessorDefinitions', _string_list) # /u # MSBuild options not found in MSVS. _MSBuildOnly(_rc, 'NullTerminateStrings', _boolean) # /n _MSBuildOnly(_rc, 'TrackerLogDirectory', _folder_name) # Directives for converting VCMIDLTool to Midl. # See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\midl.xml" for # the schema of the MSBuild Midl settings. _Same(_midl, 'AdditionalIncludeDirectories', _folder_list) # /I _Same(_midl, 'AdditionalOptions', _string_list) _Same(_midl, 'CPreprocessOptions', _string) # /cpp_opt _Same(_midl, 'ErrorCheckAllocations', _boolean) # /error allocation _Same(_midl, 'ErrorCheckBounds', _boolean) # /error bounds_check _Same(_midl, 'ErrorCheckEnumRange', _boolean) # /error enum _Same(_midl, 'ErrorCheckRefPointers', _boolean) # /error ref _Same(_midl, 'ErrorCheckStubData', _boolean) # /error stub_data _Same(_midl, 'GenerateStublessProxies', _boolean) # /Oicf _Same(_midl, 'GenerateTypeLibrary', _boolean) _Same(_midl, 'HeaderFileName', _file_name) # /h _Same(_midl, 'IgnoreStandardIncludePath', _boolean) # /no_def_idir _Same(_midl, 'InterfaceIdentifierFileName', _file_name) # /iid _Same(_midl, 'MkTypLibCompatible', _boolean) # /mktyplib203 _Same(_midl, 'OutputDirectory', _string) # /out _Same(_midl, 'PreprocessorDefinitions', _string_list) # /D _Same(_midl, 'ProxyFileName', _file_name) # /proxy _Same(_midl, 'RedirectOutputAndErrors', _file_name) # /o _Same(_midl, 'SuppressStartupBanner', _boolean) # /nologo _Same(_midl, 'TypeLibraryName', _file_name) # /tlb _Same(_midl, 'UndefinePreprocessorDefinitions', _string_list) # /U _Same(_midl, 'WarnAsError', _boolean) # /WX _Same(_midl, 'DefaultCharType', _Enumeration(['Unsigned', # /char unsigned 'Signed', # /char signed 'Ascii'])) # /char ascii7 _Same(_midl, 'TargetEnvironment', _Enumeration(['NotSet', 'Win32', # /env win32 'Itanium', # /env ia64 'X64', # /env x64 'ARM64', # /env arm64 ])) _Same(_midl, 'EnableErrorChecks', _Enumeration(['EnableCustom', 'None', # /error none 'All'])) # /error all _Same(_midl, 'StructMemberAlignment', _Enumeration(['NotSet', '1', # Zp1 '2', # Zp2 '4', # Zp4 '8'])) # Zp8 _Same(_midl, 'WarningLevel', _Enumeration(['0', # /W0 '1', # /W1 '2', # /W2 '3', # /W3 '4'])) # /W4 _Renamed(_midl, 'DLLDataFileName', 'DllDataFileName', _file_name) # /dlldata _Renamed(_midl, 'ValidateParameters', 'ValidateAllParameters', _boolean) # /robust # MSBuild options not found in MSVS. _MSBuildOnly(_midl, 'ApplicationConfigurationMode', _boolean) # /app_config _MSBuildOnly(_midl, 'ClientStubFile', _file_name) # /cstub _MSBuildOnly(_midl, 'GenerateClientFiles', _Enumeration([], new=['Stub', # /client stub 'None'])) # /client none _MSBuildOnly(_midl, 'GenerateServerFiles', _Enumeration([], new=['Stub', # /client stub 'None'])) # /client none _MSBuildOnly(_midl, 'LocaleID', _integer) # /lcid DECIMAL _MSBuildOnly(_midl, 'ServerStubFile', _file_name) # /sstub _MSBuildOnly(_midl, 'SuppressCompilerWarnings', _boolean) # /no_warn _MSBuildOnly(_midl, 'TrackerLogDirectory', _folder_name) _MSBuildOnly(_midl, 'TypeLibFormat', _Enumeration([], new=['NewFormat', # /newtlb 'OldFormat'])) # /oldtlb # Directives for converting VCLibrarianTool to Lib. # See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\lib.xml" for # the schema of the MSBuild Lib settings. _Same(_lib, 'AdditionalDependencies', _file_list) _Same(_lib, 'AdditionalLibraryDirectories', _folder_list) # /LIBPATH _Same(_lib, 'AdditionalOptions', _string_list) _Same(_lib, 'ExportNamedFunctions', _string_list) # /EXPORT _Same(_lib, 'ForceSymbolReferences', _string) # /INCLUDE _Same(_lib, 'IgnoreAllDefaultLibraries', _boolean) # /NODEFAULTLIB _Same(_lib, 'IgnoreSpecificDefaultLibraries', _file_list) # /NODEFAULTLIB _Same(_lib, 'ModuleDefinitionFile', _file_name) # /DEF _Same(_lib, 'OutputFile', _file_name) # /OUT _Same(_lib, 'SuppressStartupBanner', _boolean) # /NOLOGO _Same(_lib, 'UseUnicodeResponseFiles', _boolean) _Same(_lib, 'LinkTimeCodeGeneration', _boolean) # /LTCG _Same(_lib, 'TargetMachine', _target_machine_enumeration) # TODO(jeanluc) _link defines the same value that gets moved to # ProjectReference. We may want to validate that they are consistent. _Moved(_lib, 'LinkLibraryDependencies', 'ProjectReference', _boolean) _MSBuildOnly(_lib, 'DisplayLibrary', _string) # /LIST Visible='false' _MSBuildOnly(_lib, 'ErrorReporting', _Enumeration([], new=['PromptImmediately', # /ERRORREPORT:PROMPT 'QueueForNextLogin', # /ERRORREPORT:QUEUE 'SendErrorReport', # /ERRORREPORT:SEND 'NoErrorReport'])) # /ERRORREPORT:NONE _MSBuildOnly(_lib, 'MinimumRequiredVersion', _string) _MSBuildOnly(_lib, 'Name', _file_name) # /NAME _MSBuildOnly(_lib, 'RemoveObjects', _file_list) # /REMOVE _MSBuildOnly(_lib, 'SubSystem', _subsystem_enumeration) _MSBuildOnly(_lib, 'TrackerLogDirectory', _folder_name) _MSBuildOnly(_lib, 'TreatLibWarningAsErrors', _boolean) # /WX _MSBuildOnly(_lib, 'Verbose', _boolean) # Directives for converting VCManifestTool to Mt. # See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\mt.xml" for # the schema of the MSBuild Lib settings. # Options that have the same name in MSVS and MSBuild _Same(_manifest, 'AdditionalManifestFiles', _file_list) # /manifest _Same(_manifest, 'AdditionalOptions', _string_list) _Same(_manifest, 'AssemblyIdentity', _string) # /identity: _Same(_manifest, 'ComponentFileName', _file_name) # /dll _Same(_manifest, 'GenerateCatalogFiles', _boolean) # /makecdfs _Same(_manifest, 'InputResourceManifests', _string) # /inputresource _Same(_manifest, 'OutputManifestFile', _file_name) # /out _Same(_manifest, 'RegistrarScriptFile', _file_name) # /rgs _Same(_manifest, 'ReplacementsFile', _file_name) # /replacements _Same(_manifest, 'SuppressStartupBanner', _boolean) # /nologo _Same(_manifest, 'TypeLibraryFile', _file_name) # /tlb: _Same(_manifest, 'UpdateFileHashes', _boolean) # /hashupdate _Same(_manifest, 'UpdateFileHashesSearchPath', _file_name) _Same(_manifest, 'VerboseOutput', _boolean) # /verbose # Options that have moved location. _MovedAndRenamed(_manifest, 'ManifestResourceFile', 'ManifestResourceCompile', 'ResourceOutputFileName', _file_name) _Moved(_manifest, 'EmbedManifest', '', _boolean) # MSVS options not found in MSBuild. _MSVSOnly(_manifest, 'DependencyInformationFile', _file_name) _MSVSOnly(_manifest, 'UseFAT32Workaround', _boolean) _MSVSOnly(_manifest, 'UseUnicodeResponseFiles', _boolean) # MSBuild options not found in MSVS. _MSBuildOnly(_manifest, 'EnableDPIAwareness', _boolean) _MSBuildOnly(_manifest, 'GenerateCategoryTags', _boolean) # /category _MSBuildOnly(_manifest, 'ManifestFromManagedAssembly', _file_name) # /managedassemblyname _MSBuildOnly(_manifest, 'OutputResourceManifests', _string) # /outputresource _MSBuildOnly(_manifest, 'SuppressDependencyElement', _boolean) # /nodependency _MSBuildOnly(_manifest, 'TrackerLogDirectory', _folder_name) # Directives for MASM. # See "$(VCTargetsPath)\BuildCustomizations\masm.xml" for the schema of the # MSBuild MASM settings. # Options that have the same name in MSVS and MSBuild. _Same(_masm, 'UseSafeExceptionHandlers', _boolean) # /safeseh
apache-2.0
-3,895,816,195,586,645,000
39.953971
80
0.648588
false
SteveDiamond/cvxpy
cvxpy/interface/base_matrix_interface.py
2
5011
""" Copyright 2013 Steven Diamond 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 cvxpy.interface.matrix_utilities import abc import numpy as np class BaseMatrixInterface(object): """ An interface between constants' internal values and the target matrix used internally. """ __metaclass__ = abc.ABCMeta @abc.abstractmethod def const_to_matrix(self, value, convert_scalars=False): """Convert an arbitrary value into a matrix of type self.target_matrix. Args: value: The constant to be converted. convert_scalars: Should scalars be converted? Returns: A matrix of type self.target_matrix or a scalar. """ return NotImplemented # Adds a case for scalars to const_to_matrix methods. @staticmethod def scalar_const(converter): def new_converter(self, value, convert_scalars=False): if not convert_scalars and cvxpy.interface.matrix_utilities.is_scalar(value): return cvxpy.interface.matrix_utilities.scalar_value(value) else: return converter(self, value) return new_converter # Return an identity matrix. @abc.abstractmethod def identity(self, size): return NotImplemented # Return the number of elements of the matrix. def size(self, matrix): return np.prod(self.shape(matrix), dtype=int) # Return the dimensions of the matrix. @abc.abstractmethod def shape(self, matrix): return NotImplemented # Get the matrix interpreted as a scalar. @abc.abstractmethod def scalar_value(self, matrix): return NotImplemented # Return a matrix with all 0's. def zeros(self, shape): return self.scalar_matrix(0, shape) # Return a matrix with all 1's. def ones(self, shape): return self.scalar_matrix(1, shape) # A matrix with all entries equal to the given scalar value. @abc.abstractmethod def scalar_matrix(self, value, shape): return NotImplemented # Return the value at the given index in the matrix. def index(self, matrix, key): value = matrix[key] # Reduce to a scalar if possible. if cvxpy.interface.matrix_utilities.shape(value) == (1, 1): return cvxpy.interface.matrix_utilities.scalar_value(value) else: return value # Coerce the matrix into the given shape. @abc.abstractmethod def reshape(self, matrix, shape): return NotImplemented def block_add(self, matrix, block, vert_offset, horiz_offset, rows, cols, vert_step=1, horiz_step=1): """Add the block to a slice of the matrix. Args: matrix: The matrix the block will be added to. block: The matrix/scalar to be added. vert_offset: The starting row for the matrix slice. horiz_offset: The starting column for the matrix slice. rows: The height of the block. cols: The width of the block. vert_step: The row step size for the matrix slice. horiz_step: The column step size for the matrix slice. """ block = self._format_block(matrix, block, rows, cols) matrix[vert_offset:(rows+vert_offset):vert_step, horiz_offset:(horiz_offset+cols):horiz_step] += block def _format_block(self, matrix, block, rows, cols): """Formats the block for block_add. Args: matrix: The matrix the block will be added to. block: The matrix/scalar to be added. rows: The height of the block. cols: The width of the block. """ # If the block is a scalar, promote it. if cvxpy.interface.matrix_utilities.is_scalar(block): block = self.scalar_matrix( cvxpy.interface.matrix_utilities.scalar_value(block), rows, cols) # If the block is a vector coerced into a matrix, promote it. elif cvxpy.interface.matrix_utilities.is_vector(block) and cols > 1: block = self.reshape(block, (rows, cols)) # If the block is a matrix coerced into a vector, vectorize it. elif not cvxpy.interface.matrix_utilities.is_vector(block) and cols == 1: block = self.reshape(block, (rows, cols)) # Ensure the block is the same type as the matrix. elif type(block) != type(matrix): block = self.const_to_matrix(block) return block
gpl-3.0
1,837,893,221,666,258,700
35.311594
89
0.645979
false
unknowfly/npa-bbs
NpaForum/apps/users/models.py
1
1981
# -*- coding: utf8 -*- from __future__ import unicode_literals from django.contrib.auth.models import AbstractUser from django.db import models from datetime import datetime from utils.common_utils import * # Create your models here. class UserProfile(AbstractUser): nickname = models.CharField(max_length=60, verbose_name='昵称') birthday = models.DateField(blank=True, null=True, verbose_name='生日') gender = models.CharField(choices=(('male', '男'), ('female', '女')), max_length=10, verbose_name='性别') address = models.CharField(max_length=200, verbose_name='地址') mobile = models.CharField(max_length=20, verbose_name='移动电话', blank=True, null=True) image = models.ImageField(max_length=200, upload_to='image/%Y/%m', default='image/default/avatar.png', verbose_name='头像') website = models.CharField(max_length=50, verbose_name='个人网站', blank=True, default='') fav_topic_nums = models.IntegerField(default=0, verbose_name='收藏主题数') fav_node_nums = models.IntegerField(default=0, verbose_name='收藏节点数') fav_user_nums = models.IntegerField(default=0, verbose_name='收藏用户数') class Meta: verbose_name = '用户信息' verbose_name_plural = verbose_name def __unicode__(self): return self.username class EmailVerifyRecord(models.Model): code = models.CharField(max_length=50, verbose_name='验证码') email = models.EmailField(max_length=50, verbose_name='邮箱') send_type = models.CharField(choices=(('用户注册', 'register'), ('忘记密码', 'forgot_pwd'), ('更改注册邮箱', 'update_email')), verbose_name='验证码类型', max_length=50) send_time = models.DateTimeField(default=datetime.now) class Meta: verbose_name = '邮箱验证码' verbose_name_plural = verbose_name def __unicode__(self): return self.send_type + self.email
mit
-713,898,654,345,017,200
37.4375
125
0.673171
false
kepstin/picard
picard/plugin.py
1
6881
# -*- 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. from PyQt4 import QtCore import imp import os.path import shutil import picard.plugins import traceback from picard import config, log from picard.const import USER_PLUGIN_DIR _suffixes = [s[0] for s in imp.get_suffixes()] _package_entries = ["__init__.py", "__init__.pyc", "__init__.pyo"] _extension_points = [] def _plugin_name_from_path(path): path = os.path.normpath(path) file = os.path.basename(path) if os.path.isdir(path): for entry in _package_entries: if os.path.isfile(os.path.join(path, entry)): return file else: if file in _package_entries: return None name, ext = os.path.splitext(file) if ext in _suffixes: return name return None def _unregister_module_extensions(module): for ep in _extension_points: ep.unregister_module(module) class ExtensionPoint(object): def __init__(self): self.__items = [] _extension_points.append(self) def register(self, module, item): if module.startswith("picard.plugins"): module = module[15:] else: module = None self.__items.append((module, item)) def unregister_module(self, name): self.__items = filter(lambda i: i[0] != name, self.__items) def __iter__(self): enabled_plugins = config.setting["enabled_plugins"].split() for module, item in self.__items: if module is None or module in enabled_plugins: yield item class PluginWrapper(object): def __init__(self, module, plugindir): self.module = module self.compatible = False self.dir = plugindir def __get_name(self): try: return self.module.PLUGIN_NAME except AttributeError: return self.module_name name = property(__get_name) def __get_module_name(self): name = self.module.__name__ if name.startswith("picard.plugins"): name = name[15:] return name module_name = property(__get_module_name) def __get_author(self): try: return self.module.PLUGIN_AUTHOR except AttributeError: return "" author = property(__get_author) def __get_description(self): try: return self.module.PLUGIN_DESCRIPTION except AttributeError: return "" description = property(__get_description) def __get_version(self): try: return self.module.PLUGIN_VERSION except AttributeError: return "" version = property(__get_version) def __get_api_versions(self): try: return self.module.PLUGIN_API_VERSIONS except AttributeError: return [] api_versions = property(__get_api_versions) def __get_file(self): return self.module.__file__ file = property(__get_file) class PluginManager(QtCore.QObject): plugin_installed = QtCore.pyqtSignal(PluginWrapper, bool) def __init__(self): QtCore.QObject.__init__(self) self.plugins = [] def load_plugindir(self, plugindir): if not os.path.isdir(plugindir): log.debug("Plugin directory %r doesn't exist", plugindir) return names = set() for path in [os.path.join(plugindir, file) for file in os.listdir(plugindir)]: name = _plugin_name_from_path(path) if name: names.add(name) for name in names: self.load_plugin(name, plugindir) def load_plugin(self, name, plugindir): self.log.debug("Loading plugin %r", name) try: info = imp.find_module(name, [plugindir]) except ImportError: log.error("Failed loading plugin %r", name) return None plugin = None try: index = None for i, p in enumerate(self.plugins): if name == p.module_name: _unregister_module_extensions(name) index = i break plugin_module = imp.load_module("picard.plugins." + name, *info) plugin = PluginWrapper(plugin_module, plugindir) for version in list(plugin.api_versions): for api_version in picard.api_versions: if api_version.startswith(version): plugin.compatible = True setattr(picard.plugins, name, plugin_module) if index: self.plugins[index] = plugin else: self.plugins.append(plugin) break else: continue break else: log.info("Plugin '%s' from '%s' is not compatible" " with this version of Picard." % (plugin.name, plugin.file)) except: log.error(traceback.format_exc()) if info[0] is not None: info[0].close() return plugin def install_plugin(self, path, dest): plugin_name = _plugin_name_from_path(path) if plugin_name: try: dest_exists = os.path.exists(dest) same_file = os.path.samefile(path, dest) if dest_exists else False if os.path.isfile(path) and not (dest_exists and same_file): shutil.copy(path, dest) elif os.path.isdir(path) and not same_file: if dest_exists: shutil.rmtree(dest) shutil.copytree(path, dest) plugin = self.load_plugin(plugin_name, USER_PLUGIN_DIR) if plugin is not None: self.plugin_installed.emit(plugin, False) except OSError, IOError: log.debug("Unable to copy %s to plugin folder %s" % (path, USER_PLUGIN_DIR)) def enabled(self, name): return True
gpl-2.0
-1,107,018,417,051,953,000
31.443396
92
0.573423
false
elektro-NIK/P3DA
setup.py
1
1037
from setuptools import setup, find_packages from pip import get_installed_distributions from sys import exit PACKAGE = 'software' NAME = 'P3DA' DESCRIPTION = 'P3DA - RGB controller based on Arduino board' AUTHOR = 'Bogdan Kalinin' AUTHOR_EMAIL = '[email protected]' URL = 'https://github.com/elektro-NIK/P3DA' VERSION = __import__(PACKAGE).__version__ if not 'pyqt5' in [i.key for i in get_installed_distributions()]: exit('ERROR! Install PyQt5, use:\n pip3 install PyQt5') setup(name=NAME, version=VERSION, url=URL, license='GNU GPL v.3', author=AUTHOR, author_email=AUTHOR_EMAIL, description=DESCRIPTION, long_description=open('README.md').read(), packages=find_packages(), platforms='any', install_requires=['pyqt5>=5.8.1', 'pyserial>=3.3', 'numpy>=1.12.1', 'pyqtgraph>=0.10.0'], entry_points={'console_scripts': ['p3da = software.main']}, include_package_data=True, )
gpl-3.0
3,551,913,329,480,088,000
31.40625
65
0.621022
false
atzengin/OCC
occ/gui/Bars.py
1
4767
""" Copyright 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Radio OpenCV Companion 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. OpenCV Companion 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 Actions import pygtk pygtk.require('2.0') import gtk ##The list of actions for the toolbar. TOOLBAR_LIST = ( Actions.FLOW_GRAPH_NEW, Actions.FLOW_GRAPH_OPEN, Actions.FLOW_GRAPH_SAVE, Actions.FLOW_GRAPH_CLOSE, None, Actions.FLOW_GRAPH_SCREEN_CAPTURE, None, Actions.BLOCK_CUT, Actions.BLOCK_COPY, Actions.BLOCK_PASTE, Actions.ELEMENT_DELETE, None, Actions.FLOW_GRAPH_UNDO, Actions.FLOW_GRAPH_REDO, None, Actions.ERRORS_WINDOW_DISPLAY, Actions.FLOW_GRAPH_GEN, Actions.FLOW_GRAPH_EXEC, Actions.FLOW_GRAPH_KILL, None, Actions.BLOCK_ROTATE_CCW, Actions.BLOCK_ROTATE_CW, None, Actions.BLOCK_ENABLE, Actions.BLOCK_DISABLE, None, Actions.RELOAD_BLOCKS, Actions.OPEN_HIER, Actions.BUSSIFY_SOURCES, Actions.FLOW_GRAPH_SEND_TO_CAMERA, ) ##The list of actions and categories for the menu bar. MENU_BAR_LIST = ( (gtk.Action('File', '_File', None, None), [ Actions.FLOW_GRAPH_NEW, Actions.FLOW_GRAPH_OPEN, None, Actions.FLOW_GRAPH_SAVE, Actions.FLOW_GRAPH_SAVE_AS, None, Actions.FLOW_GRAPH_SCREEN_CAPTURE, None, Actions.FLOW_GRAPH_CLOSE, Actions.APPLICATION_QUIT, ]), (gtk.Action('Edit', '_Edit', None, None), [ Actions.FLOW_GRAPH_UNDO, Actions.FLOW_GRAPH_REDO, None, Actions.BLOCK_CUT, Actions.BLOCK_COPY, Actions.BLOCK_PASTE, Actions.ELEMENT_DELETE, None, Actions.BLOCK_ROTATE_CCW, Actions.BLOCK_ROTATE_CW, None, Actions.BLOCK_ENABLE, Actions.BLOCK_DISABLE, None, Actions.BLOCK_PARAM_MODIFY, ]), (gtk.Action('View', '_View', None, None), [ Actions.ERRORS_WINDOW_DISPLAY, ]), (gtk.Action('Build', '_Build', None, None), [ Actions.FLOW_GRAPH_GEN, Actions.FLOW_GRAPH_EXEC, Actions.FLOW_GRAPH_KILL, Actions.FLOW_GRAPH_SEND_TO_CAMERA, ]), (gtk.Action('Help', '_Help', None, None), [ Actions.HELP_WINDOW_DISPLAY, Actions.TYPES_WINDOW_DISPLAY, None, Actions.ABOUT_WINDOW_DISPLAY, ]), ) class Toolbar(gtk.Toolbar): """The gtk toolbar with actions added from the toolbar list.""" def __init__(self): """ Parse the list of action names in the toolbar list. Look up the action for each name in the action list and add it to the toolbar. """ gtk.Toolbar.__init__(self) self.set_style(gtk.TOOLBAR_ICONS) for action in TOOLBAR_LIST: if action: #add a tool item self.add(action.create_tool_item()) #this reset of the tooltip property is required (after creating the tool item) for the tooltip to show action.set_property('tooltip', action.get_property('tooltip')) else: self.add(gtk.SeparatorToolItem()) class MenuBar(gtk.MenuBar): """The gtk menu bar with actions added from the menu bar list.""" def __init__(self): """ Parse the list of submenus from the menubar list. For each submenu, get a list of action names. Look up the action for each name in the action list and add it to the submenu. Add the submenu to the menu bar. """ gtk.MenuBar.__init__(self) for main_action, actions in MENU_BAR_LIST: #create the main menu item main_menu_item = main_action.create_menu_item() self.append(main_menu_item) #create the menu main_menu = gtk.Menu() main_menu_item.set_submenu(main_menu) for action in actions: if action: #append a menu item main_menu.append(action.create_menu_item()) else: main_menu.append(gtk.SeparatorMenuItem()) main_menu.show_all() #this show all is required for the separators to show
gpl-3.0
5,145,827,815,054,436,000
31.650685
118
0.632893
false
summanlp/textrank
summa/preprocessing/snowball.py
1
166890
# Adapted from the NLTK package v3.0.1: # https://github.com/nltk/nltk/blob/3.0.1/nltk/stem/snowball.py # # Natural Language Toolkit: Snowball Stemmer # # Copyright (C) 2001-2014 NLTK Project # Author: Peter Michael Stahl <[email protected]> # Peter Ljunglof <[email protected]> (revisions) # Algorithms: Dr Martin Porter <[email protected]> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Snowball stemmers This module provides a port of the Snowball stemmers developed by Martin Porter. """ import re from .porter import PorterStemmer from .util import prefix_replace, suffix_replace class SnowballStemmer(): """ Snowball Stemmer The following languages are supported: Danish, Dutch, English, Finnish, French, German, Hungarian, Italian, Norwegian, Portuguese, Romanian, Russian, Spanish and Swedish. The algorithm for English is documented here: Porter, M. \"An algorithm for suffix stripping.\" Program 14.3 (1980): 130-137. The algorithms have been developed by Martin Porter. These stemmers are called Snowball, because Porter created a programming language with this name for creating new stemming algorithms. There is more information available at http://snowball.tartarus.org/ The stemmer is invoked as shown below: >>> from summa.preprocessing.snowball import SnowballStemmer >>> print(" ".join(SnowballStemmer.languages)) # See which languages are supported ... >>> stemmer = SnowballStemmer("german") # Choose a language >>> stemmer.stem("Autobahnen") # Stem a word 'autobahn' Invoking the stemmers that way is useful if you do not know the language to be stemmed at runtime. Alternatively, if you already know the language, then you can invoke the language specific stemmer directly: >>> from summa.preprocessing.snowball import GermanStemmer >>> stemmer = GermanStemmer() >>> stemmer.stem("Autobahnen") 'autobahn' :param language: The language whose subclass is instantiated. :type language: str or unicode :raise ValueError: If there is no stemmer for the specified language, a ValueError is raised. """ languages = ( "arabic", "danish", "dutch", "english", "finnish", "french", "german", "hungarian", "italian", "norwegian", "polish", "portuguese", "romanian", "russian", "spanish", "swedish", ) def __init__(self, language): if language not in self.languages: raise ValueError("The language '%s' is not supported." % language) stemmerclass = globals()[language.capitalize() + "Stemmer"] self.stemmer = stemmerclass() self.stem = self.stemmer.stem class _LanguageSpecificStemmer(): """ This helper subclass offers the possibility to invoke a specific stemmer directly. This is useful if you already know the language to be stemmed at runtime. Create an instance of the Snowball stemmer. """ def __init__(self): # The language is the name of the class, minus the final "Stemmer". language = type(self).__name__.lower() if language.endswith("stemmer"): language = language[:-7] def __repr__(self): """ Print out the string representation of the respective class. """ return "<%s>" % type(self).__name__ class PorterStemmer(_LanguageSpecificStemmer, PorterStemmer): """ A word stemmer based on the original Porter stemming algorithm. Porter, M. \"An algorithm for suffix stripping.\" Program 14.3 (1980): 130-137. A few minor modifications have been made to Porter's basic algorithm. See the source code of the module nltk.stem.porter for more information. """ def __init__(self): _LanguageSpecificStemmer.__init__(self) PorterStemmer.__init__(self) class _ScandinavianStemmer(_LanguageSpecificStemmer): """ This subclass encapsulates a method for defining the string region R1. It is used by the Danish, Norwegian, and Swedish stemmer. """ def _r1_scandinavian(self, word, vowels): """ Return the region R1 that is used by the Scandinavian stemmers. R1 is the region after the first non-vowel following a vowel, or is the null region at the end of the word if there is no such non-vowel. But then R1 is adjusted so that the region before it contains at least three letters. :param word: The word whose region R1 is determined. :type word: str or unicode :param vowels: The vowels of the respective language that are used to determine the region R1. :type vowels: unicode :return: the region R1 for the respective word. :rtype: unicode :note: This helper method is invoked by the respective stem method of the subclasses DanishStemmer, NorwegianStemmer, and SwedishStemmer. It is not to be invoked directly! """ r1 = "" for i in range(1, len(word)): if word[i] not in vowels and word[i-1] in vowels: if len(word[:i+1]) < 3 and len(word[:i+1]) > 0: r1 = word[3:] elif len(word[:i+1]) >= 3: r1 = word[i+1:] else: return word break return r1 class _StandardStemmer(_LanguageSpecificStemmer): """ This subclass encapsulates two methods for defining the standard versions of the string regions R1, R2, and RV. """ def _r1r2_standard(self, word, vowels): """ Return the standard interpretations of the string regions R1 and R2. R1 is the region after the first non-vowel following a vowel, or is the null region at the end of the word if there is no such non-vowel. R2 is the region after the first non-vowel following a vowel in R1, or is the null region at the end of the word if there is no such non-vowel. :param word: The word whose regions R1 and R2 are determined. :type word: str or unicode :param vowels: The vowels of the respective language that are used to determine the regions R1 and R2. :type vowels: unicode :return: (r1,r2), the regions R1 and R2 for the respective word. :rtype: tuple :note: This helper method is invoked by the respective stem method of the subclasses DutchStemmer, FinnishStemmer, FrenchStemmer, GermanStemmer, ItalianStemmer, PortugueseStemmer, RomanianStemmer, and SpanishStemmer. It is not to be invoked directly! :note: A detailed description of how to define R1 and R2 can be found at http://snowball.tartarus.org/texts/r1r2.html """ r1 = "" r2 = "" for i in range(1, len(word)): if word[i] not in vowels and word[i-1] in vowels: r1 = word[i+1:] break for i in range(1, len(r1)): if r1[i] not in vowels and r1[i-1] in vowels: r2 = r1[i+1:] break return (r1, r2) def _rv_standard(self, word, vowels): """ Return the standard interpretation of the string region RV. If the second letter is a consonant, RV is the region after the next following vowel. If the first two letters are vowels, RV is the region after the next following consonant. Otherwise, RV is the region after the third letter. :param word: The word whose region RV is determined. :type word: str or unicode :param vowels: The vowels of the respective language that are used to determine the region RV. :type vowels: unicode :return: the region RV for the respective word. :rtype: unicode :note: This helper method is invoked by the respective stem method of the subclasses ItalianStemmer, PortugueseStemmer, RomanianStemmer, and SpanishStemmer. It is not to be invoked directly! """ rv = "" if len(word) >= 2: if word[1] not in vowels: for i in range(2, len(word)): if word[i] in vowels: rv = word[i+1:] break elif word[:2] in vowels: for i in range(2, len(word)): if word[i] not in vowels: rv = word[i+1:] break else: rv = word[3:] return rv class DanishStemmer(_ScandinavianStemmer): """ The Danish Snowball stemmer. :cvar __vowels: The Danish vowels. :type __vowels: unicode :cvar __consonants: The Danish consonants. :type __consonants: unicode :cvar __double_consonants: The Danish double consonants. :type __double_consonants: tuple :cvar __s_ending: Letters that may directly appear before a word final 's'. :type __s_ending: unicode :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: tuple :cvar __step2_suffixes: Suffixes to be deleted in step 2 of the algorithm. :type __step2_suffixes: tuple :cvar __step3_suffixes: Suffixes to be deleted in step 3 of the algorithm. :type __step3_suffixes: tuple :note: A detailed description of the Danish stemming algorithm can be found under http://snowball.tartarus.org/algorithms/danish/stemmer.html """ # The language's vowels and other important characters are defined. __vowels = "aeiouy\xE6\xE5\xF8" __consonants = "bcdfghjklmnpqrstvwxz" __double_consonants = ("bb", "cc", "dd", "ff", "gg", "hh", "jj", "kk", "ll", "mm", "nn", "pp", "qq", "rr", "ss", "tt", "vv", "ww", "xx", "zz") __s_ending = "abcdfghjklmnoprtvyz\xE5" # The different suffixes, divided into the algorithm's steps # and organized by length, are listed in tuples. __step1_suffixes = ("erendes", "erende", "hedens", "ethed", "erede", "heden", "heder", "endes", "ernes", "erens", "erets", "ered", "ende", "erne", "eren", "erer", "heds", "enes", "eres", "eret", "hed", "ene", "ere", "ens", "ers", "ets", "en", "er", "es", "et", "e", "s") __step2_suffixes = ("gd", "dt", "gt", "kt") __step3_suffixes = ("elig", "l\xF8st", "lig", "els", "ig") def stem(self, word): """ Stem a Danish word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ # Every word is put into lower case for normalization. word = word.lower() # After this, the required regions are generated # by the respective helper method. r1 = self._r1_scandinavian(word, self.__vowels) # Then the actual stemming process starts. # Every new step is explicitly indicated # according to the descriptions on the Snowball website. # STEP 1 for suffix in self.__step1_suffixes: if r1.endswith(suffix): if suffix == "s": if word[-2] in self.__s_ending: word = word[:-1] r1 = r1[:-1] else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] break # STEP 2 for suffix in self.__step2_suffixes: if r1.endswith(suffix): word = word[:-1] r1 = r1[:-1] break # STEP 3 if r1.endswith("igst"): word = word[:-2] r1 = r1[:-2] for suffix in self.__step3_suffixes: if r1.endswith(suffix): if suffix == "l\xF8st": word = word[:-1] r1 = r1[:-1] else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] if r1.endswith(self.__step2_suffixes): word = word[:-1] r1 = r1[:-1] break # STEP 4: Undouble for double_cons in self.__double_consonants: if word.endswith(double_cons) and len(word) > 3: word = word[:-1] break return word class DutchStemmer(_StandardStemmer): """ The Dutch Snowball stemmer. :cvar __vowels: The Dutch vowels. :type __vowels: unicode :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: tuple :cvar __step3b_suffixes: Suffixes to be deleted in step 3b of the algorithm. :type __step3b_suffixes: tuple :note: A detailed description of the Dutch stemming algorithm can be found under http://snowball.tartarus.org/algorithms/dutch/stemmer.html """ __vowels = "aeiouy\xE8" __step1_suffixes = ("heden", "ene", "en", "se", "s") __step3b_suffixes = ("baar", "lijk", "bar", "end", "ing", "ig") def stem(self, word): """ Stem a Dutch word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ word = word.lower() step2_success = False # Vowel accents are removed. word = (word.replace("\xE4", "a").replace("\xE1", "a") .replace("\xEB", "e").replace("\xE9", "e") .replace("\xED", "i").replace("\xEF", "i") .replace("\xF6", "o").replace("\xF3", "o") .replace("\xFC", "u").replace("\xFA", "u")) # An initial 'y', a 'y' after a vowel, # and an 'i' between self.__vowels is put into upper case. # As from now these are treated as consonants. if word.startswith("y"): word = "".join(("Y", word[1:])) for i in range(1, len(word)): if word[i-1] in self.__vowels and word[i] == "y": word = "".join((word[:i], "Y", word[i+1:])) for i in range(1, len(word)-1): if (word[i-1] in self.__vowels and word[i] == "i" and word[i+1] in self.__vowels): word = "".join((word[:i], "I", word[i+1:])) r1, r2 = self._r1r2_standard(word, self.__vowels) # R1 is adjusted so that the region before it # contains at least 3 letters. for i in range(1, len(word)): if word[i] not in self.__vowels and word[i-1] in self.__vowels: if len(word[:i+1]) < 3 and len(word[:i+1]) > 0: r1 = word[3:] elif len(word[:i+1]) == 0: return word break # STEP 1 for suffix in self.__step1_suffixes: if r1.endswith(suffix): if suffix == "heden": word = "".join((word[:-5], "heid")) r1 = "".join((r1[:-5], "heid")) if r2.endswith("heden"): r2 = "".join((r2[:-5], "heid")) elif (suffix in ("ene", "en") and not word.endswith("heden") and word[-len(suffix)-1] not in self.__vowels and word[-len(suffix)-3:-len(suffix)] != "gem"): word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] if word.endswith(("kk", "dd", "tt")): word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] elif (suffix in ("se", "s") and word[-len(suffix)-1] not in self.__vowels and word[-len(suffix)-1] != "j"): word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] break # STEP 2 if r1.endswith("e") and word[-2] not in self.__vowels: step2_success = True word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] if word.endswith(("kk", "dd", "tt")): word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] # STEP 3a if r2.endswith("heid") and word[-5] != "c": word = word[:-4] r1 = r1[:-4] r2 = r2[:-4] if (r1.endswith("en") and word[-3] not in self.__vowels and word[-5:-2] != "gem"): word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] if word.endswith(("kk", "dd", "tt")): word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] # STEP 3b: Derivational suffixes for suffix in self.__step3b_suffixes: if r2.endswith(suffix): if suffix in ("end", "ing"): word = word[:-3] r2 = r2[:-3] if r2.endswith("ig") and word[-3] != "e": word = word[:-2] else: if word.endswith(("kk", "dd", "tt")): word = word[:-1] elif suffix == "ig" and word[-3] != "e": word = word[:-2] elif suffix == "lijk": word = word[:-4] r1 = r1[:-4] if r1.endswith("e") and word[-2] not in self.__vowels: word = word[:-1] if word.endswith(("kk", "dd", "tt")): word = word[:-1] elif suffix == "baar": word = word[:-4] elif suffix == "bar" and step2_success: word = word[:-3] break # STEP 4: Undouble vowel if len(word) >= 4: if word[-1] not in self.__vowels and word[-1] != "I": if word[-3:-1] in ("aa", "ee", "oo", "uu"): if word[-4] not in self.__vowels: word = "".join((word[:-3], word[-3], word[-1])) # All occurrences of 'I' and 'Y' are put back into lower case. word = word.replace("I", "i").replace("Y", "y") return word class EnglishStemmer(_StandardStemmer): """ The English Snowball stemmer. :cvar __vowels: The English vowels. :type __vowels: unicode :cvar __double_consonants: The English double consonants. :type __double_consonants: tuple :cvar __li_ending: Letters that may directly appear before a word final 'li'. :type __li_ending: unicode :cvar __step0_suffixes: Suffixes to be deleted in step 0 of the algorithm. :type __step0_suffixes: tuple :cvar __step1a_suffixes: Suffixes to be deleted in step 1a of the algorithm. :type __step1a_suffixes: tuple :cvar __step1b_suffixes: Suffixes to be deleted in step 1b of the algorithm. :type __step1b_suffixes: tuple :cvar __step2_suffixes: Suffixes to be deleted in step 2 of the algorithm. :type __step2_suffixes: tuple :cvar __step3_suffixes: Suffixes to be deleted in step 3 of the algorithm. :type __step3_suffixes: tuple :cvar __step4_suffixes: Suffixes to be deleted in step 4 of the algorithm. :type __step4_suffixes: tuple :cvar __step5_suffixes: Suffixes to be deleted in step 5 of the algorithm. :type __step5_suffixes: tuple :cvar __special_words: A dictionary containing words which have to be stemmed specially. :type __special_words: dict :note: A detailed description of the English stemming algorithm can be found under http://snowball.tartarus.org/algorithms/english/stemmer.html """ __vowels = "aeiouy" __double_consonants = ("bb", "dd", "ff", "gg", "mm", "nn", "pp", "rr", "tt") __li_ending = "cdeghkmnrt" __step0_suffixes = ("'s'", "'s", "'") __step1a_suffixes = ("sses", "ied", "ies", "us", "ss", "s") __step1b_suffixes = ("eedly", "ingly", "edly", "eed", "ing", "ed") __step2_suffixes = ('ization', 'ational', 'fulness', 'ousness', 'iveness', 'tional', 'biliti', 'lessli', 'entli', 'ation', 'alism', 'aliti', 'ousli', 'iviti', 'fulli', 'enci', 'anci', 'abli', 'izer', 'ator', 'alli', 'bli', 'ogi', 'li') __step3_suffixes = ('ational', 'tional', 'alize', 'icate', 'iciti', 'ative', 'ical', 'ness', 'ful') __step4_suffixes = ('ement', 'ance', 'ence', 'able', 'ible', 'ment', 'ant', 'ent', 'ism', 'ate', 'iti', 'ous', 'ive', 'ize', 'ion', 'al', 'er', 'ic') __step5_suffixes = ("e", "l") __special_words = {"skis" : "ski", "skies" : "sky", "dying" : "die", "lying" : "lie", "tying" : "tie", "idly" : "idl", "gently" : "gentl", "ugly" : "ugli", "early" : "earli", "only" : "onli", "singly" : "singl", "sky" : "sky", "news" : "news", "howe" : "howe", "atlas" : "atlas", "cosmos" : "cosmos", "bias" : "bias", "andes" : "andes", "inning" : "inning", "innings" : "inning", "outing" : "outing", "outings" : "outing", "canning" : "canning", "cannings" : "canning", "herring" : "herring", "herrings" : "herring", "earring" : "earring", "earrings" : "earring", "proceed" : "proceed", "proceeds" : "proceed", "proceeded" : "proceed", "proceeding" : "proceed", "exceed" : "exceed", "exceeds" : "exceed", "exceeded" : "exceed", "exceeding" : "exceed", "succeed" : "succeed", "succeeds" : "succeed", "succeeded" : "succeed", "succeeding" : "succeed"} def stem(self, word): """ Stem an English word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ word = word.lower() if len(word) <= 2: return word elif word in self.__special_words: return self.__special_words[word] # Map the different apostrophe characters to a single consistent one word = (word.replace("\u2019", "\x27") .replace("\u2018", "\x27") .replace("\u201B", "\x27")) if word.startswith("\x27"): word = word[1:] if word.startswith("y"): word = "".join(("Y", word[1:])) for i in range(1, len(word)): if word[i-1] in self.__vowels and word[i] == "y": word = "".join((word[:i], "Y", word[i+1:])) step1a_vowel_found = False step1b_vowel_found = False r1 = "" r2 = "" if word.startswith(("gener", "commun", "arsen")): if word.startswith(("gener", "arsen")): r1 = word[5:] else: r1 = word[6:] for i in range(1, len(r1)): if r1[i] not in self.__vowels and r1[i-1] in self.__vowels: r2 = r1[i+1:] break else: r1, r2 = self._r1r2_standard(word, self.__vowels) # STEP 0 for suffix in self.__step0_suffixes: if word.endswith(suffix): word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] break # STEP 1a for suffix in self.__step1a_suffixes: if word.endswith(suffix): if suffix == "sses": word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] elif suffix in ("ied", "ies"): if len(word[:-len(suffix)]) > 1: word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] else: word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] elif suffix == "s": for letter in word[:-2]: if letter in self.__vowels: step1a_vowel_found = True break if step1a_vowel_found: word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] break # STEP 1b for suffix in self.__step1b_suffixes: if word.endswith(suffix): if suffix in ("eed", "eedly"): if r1.endswith(suffix): word = "".join((word[:-len(suffix)], "ee")) if len(r1) >= len(suffix): r1 = "".join((r1[:-len(suffix)], "ee")) else: r1 = "" if len(r2) >= len(suffix): r2 = "".join((r2[:-len(suffix)], "ee")) else: r2 = "" else: for letter in word[:-len(suffix)]: if letter in self.__vowels: step1b_vowel_found = True break if step1b_vowel_found: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] if word.endswith(("at", "bl", "iz")): word = "".join((word, "e")) r1 = "".join((r1, "e")) if len(word) > 5 or len(r1) >=3: r2 = "".join((r2, "e")) elif word.endswith(self.__double_consonants): word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] elif ((r1 == "" and len(word) >= 3 and word[-1] not in self.__vowels and word[-1] not in "wxY" and word[-2] in self.__vowels and word[-3] not in self.__vowels) or (r1 == "" and len(word) == 2 and word[0] in self.__vowels and word[1] not in self.__vowels)): word = "".join((word, "e")) if len(r1) > 0: r1 = "".join((r1, "e")) if len(r2) > 0: r2 = "".join((r2, "e")) break # STEP 1c if len(word) > 2 and word[-1] in "yY" and word[-2] not in self.__vowels: word = "".join((word[:-1], "i")) if len(r1) >= 1: r1 = "".join((r1[:-1], "i")) else: r1 = "" if len(r2) >= 1: r2 = "".join((r2[:-1], "i")) else: r2 = "" # STEP 2 for suffix in self.__step2_suffixes: if word.endswith(suffix): if r1.endswith(suffix): if suffix == "tional": word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] elif suffix in ("enci", "anci", "abli"): word = "".join((word[:-1], "e")) if len(r1) >= 1: r1 = "".join((r1[:-1], "e")) else: r1 = "" if len(r2) >= 1: r2 = "".join((r2[:-1], "e")) else: r2 = "" elif suffix == "entli": word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] elif suffix in ("izer", "ization"): word = "".join((word[:-len(suffix)], "ize")) if len(r1) >= len(suffix): r1 = "".join((r1[:-len(suffix)], "ize")) else: r1 = "" if len(r2) >= len(suffix): r2 = "".join((r2[:-len(suffix)], "ize")) else: r2 = "" elif suffix in ("ational", "ation", "ator"): word = "".join((word[:-len(suffix)], "ate")) if len(r1) >= len(suffix): r1 = "".join((r1[:-len(suffix)], "ate")) else: r1 = "" if len(r2) >= len(suffix): r2 = "".join((r2[:-len(suffix)], "ate")) else: r2 = "e" elif suffix in ("alism", "aliti", "alli"): word = "".join((word[:-len(suffix)], "al")) if len(r1) >= len(suffix): r1 = "".join((r1[:-len(suffix)], "al")) else: r1 = "" if len(r2) >= len(suffix): r2 = "".join((r2[:-len(suffix)], "al")) else: r2 = "" elif suffix == "fulness": word = word[:-4] r1 = r1[:-4] r2 = r2[:-4] elif suffix in ("ousli", "ousness"): word = "".join((word[:-len(suffix)], "ous")) if len(r1) >= len(suffix): r1 = "".join((r1[:-len(suffix)], "ous")) else: r1 = "" if len(r2) >= len(suffix): r2 = "".join((r2[:-len(suffix)], "ous")) else: r2 = "" elif suffix in ("iveness", "iviti"): word = "".join((word[:-len(suffix)], "ive")) if len(r1) >= len(suffix): r1 = "".join((r1[:-len(suffix)], "ive")) else: r1 = "" if len(r2) >= len(suffix): r2 = "".join((r2[:-len(suffix)], "ive")) else: r2 = "e" elif suffix in ("biliti", "bli"): word = "".join((word[:-len(suffix)], "ble")) if len(r1) >= len(suffix): r1 = "".join((r1[:-len(suffix)], "ble")) else: r1 = "" if len(r2) >= len(suffix): r2 = "".join((r2[:-len(suffix)], "ble")) else: r2 = "" elif suffix == "ogi" and word[-4] == "l": word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] elif suffix in ("fulli", "lessli"): word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] elif suffix == "li" and word[-3] in self.__li_ending: word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] break # STEP 3 for suffix in self.__step3_suffixes: if word.endswith(suffix): if r1.endswith(suffix): if suffix == "tional": word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] elif suffix == "ational": word = "".join((word[:-len(suffix)], "ate")) if len(r1) >= len(suffix): r1 = "".join((r1[:-len(suffix)], "ate")) else: r1 = "" if len(r2) >= len(suffix): r2 = "".join((r2[:-len(suffix)], "ate")) else: r2 = "" elif suffix == "alize": word = word[:-3] r1 = r1[:-3] r2 = r2[:-3] elif suffix in ("icate", "iciti", "ical"): word = "".join((word[:-len(suffix)], "ic")) if len(r1) >= len(suffix): r1 = "".join((r1[:-len(suffix)], "ic")) else: r1 = "" if len(r2) >= len(suffix): r2 = "".join((r2[:-len(suffix)], "ic")) else: r2 = "" elif suffix in ("ful", "ness"): word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] elif suffix == "ative" and r2.endswith(suffix): word = word[:-5] r1 = r1[:-5] r2 = r2[:-5] break # STEP 4 for suffix in self.__step4_suffixes: if word.endswith(suffix): if r2.endswith(suffix): if suffix == "ion": if word[-4] in "st": word = word[:-3] r1 = r1[:-3] r2 = r2[:-3] else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] break # STEP 5 if r2.endswith("l") and word[-2] == "l": word = word[:-1] elif r2.endswith("e"): word = word[:-1] elif r1.endswith("e"): if len(word) >= 4 and (word[-2] in self.__vowels or word[-2] in "wxY" or word[-3] not in self.__vowels or word[-4] in self.__vowels): word = word[:-1] word = word.replace("Y", "y") return word class FinnishStemmer(_StandardStemmer): """ The Finnish Snowball stemmer. :cvar __vowels: The Finnish vowels. :type __vowels: unicode :cvar __restricted_vowels: A subset of the Finnish vowels. :type __restricted_vowels: unicode :cvar __long_vowels: The Finnish vowels in their long forms. :type __long_vowels: tuple :cvar __consonants: The Finnish consonants. :type __consonants: unicode :cvar __double_consonants: The Finnish double consonants. :type __double_consonants: tuple :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: tuple :cvar __step2_suffixes: Suffixes to be deleted in step 2 of the algorithm. :type __step2_suffixes: tuple :cvar __step3_suffixes: Suffixes to be deleted in step 3 of the algorithm. :type __step3_suffixes: tuple :cvar __step4_suffixes: Suffixes to be deleted in step 4 of the algorithm. :type __step4_suffixes: tuple :note: A detailed description of the Finnish stemming algorithm can be found under http://snowball.tartarus.org/algorithms/finnish/stemmer.html """ __vowels = "aeiouy\xE4\xF6" __restricted_vowels = "aeiou\xE4\xF6" __long_vowels = ("aa", "ee", "ii", "oo", "uu", "\xE4\xE4", "\xF6\xF6") __consonants = "bcdfghjklmnpqrstvwxz" __double_consonants = ("bb", "cc", "dd", "ff", "gg", "hh", "jj", "kk", "ll", "mm", "nn", "pp", "qq", "rr", "ss", "tt", "vv", "ww", "xx", "zz") __step1_suffixes = ('kaan', 'k\xE4\xE4n', 'sti', 'kin', 'han', 'h\xE4n', 'ko', 'k\xF6', 'pa', 'p\xE4') __step2_suffixes = ('nsa', 'ns\xE4', 'mme', 'nne', 'si', 'ni', 'an', '\xE4n', 'en') __step3_suffixes = ('siin', 'tten', 'seen', 'han', 'hen', 'hin', 'hon', 'h\xE4n', 'h\xF6n', 'den', 'tta', 'tt\xE4', 'ssa', 'ss\xE4', 'sta', 'st\xE4', 'lla', 'll\xE4', 'lta', 'lt\xE4', 'lle', 'ksi', 'ine', 'ta', 't\xE4', 'na', 'n\xE4', 'a', '\xE4', 'n') __step4_suffixes = ('impi', 'impa', 'imp\xE4', 'immi', 'imma', 'imm\xE4', 'mpi', 'mpa', 'mp\xE4', 'mmi', 'mma', 'mm\xE4', 'eja', 'ej\xE4') def stem(self, word): """ Stem a Finnish word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ word = word.lower() step3_success = False r1, r2 = self._r1r2_standard(word, self.__vowels) # STEP 1: Particles etc. for suffix in self.__step1_suffixes: if r1.endswith(suffix): if suffix == "sti": if suffix in r2: word = word[:-3] r1 = r1[:-3] r2 = r2[:-3] else: if word[-len(suffix)-1] in "ntaeiouy\xE4\xF6": word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] break # STEP 2: Possessives for suffix in self.__step2_suffixes: if r1.endswith(suffix): if suffix == "si": if word[-3] != "k": word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] elif suffix == "ni": word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] if word.endswith("kse"): word = "".join((word[:-3], "ksi")) if r1.endswith("kse"): r1 = "".join((r1[:-3], "ksi")) if r2.endswith("kse"): r2 = "".join((r2[:-3], "ksi")) elif suffix == "an": if (word[-4:-2] in ("ta", "na") or word[-5:-2] in ("ssa", "sta", "lla", "lta")): word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] elif suffix == "\xE4n": if (word[-4:-2] in ("t\xE4", "n\xE4") or word[-5:-2] in ("ss\xE4", "st\xE4", "ll\xE4", "lt\xE4")): word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] elif suffix == "en": if word[-5:-2] in ("lle", "ine"): word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] else: word = word[:-3] r1 = r1[:-3] r2 = r2[:-3] break # STEP 3: Cases for suffix in self.__step3_suffixes: if r1.endswith(suffix): if suffix in ("han", "hen", "hin", "hon", "h\xE4n", "h\xF6n"): if ((suffix == "han" and word[-4] == "a") or (suffix == "hen" and word[-4] == "e") or (suffix == "hin" and word[-4] == "i") or (suffix == "hon" and word[-4] == "o") or (suffix == "h\xE4n" and word[-4] == "\xE4") or (suffix == "h\xF6n" and word[-4] == "\xF6")): word = word[:-3] r1 = r1[:-3] r2 = r2[:-3] step3_success = True elif suffix in ("siin", "den", "tten"): if (word[-len(suffix)-1] == "i" and word[-len(suffix)-2] in self.__restricted_vowels): word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] step3_success = True else: continue elif suffix == "seen": if word[-6:-4] in self.__long_vowels: word = word[:-4] r1 = r1[:-4] r2 = r2[:-4] step3_success = True else: continue elif suffix in ("a", "\xE4"): if word[-2] in self.__vowels and word[-3] in self.__consonants: word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] step3_success = True elif suffix in ("tta", "tt\xE4"): if word[-4] == "e": word = word[:-3] r1 = r1[:-3] r2 = r2[:-3] step3_success = True elif suffix == "n": word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] step3_success = True if word[-2:] == "ie" or word[-2:] in self.__long_vowels: word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] step3_success = True break # STEP 4: Other endings for suffix in self.__step4_suffixes: if r2.endswith(suffix): if suffix in ("mpi", "mpa", "mp\xE4", "mmi", "mma", "mm\xE4"): if word[-5:-3] != "po": word = word[:-3] r1 = r1[:-3] r2 = r2[:-3] else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] break # STEP 5: Plurals if step3_success and len(r1) >= 1 and r1[-1] in "ij": word = word[:-1] r1 = r1[:-1] elif (not step3_success and len(r1) >= 2 and r1[-1] == "t" and r1[-2] in self.__vowels): word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] if r2.endswith("imma"): word = word[:-4] r1 = r1[:-4] elif r2.endswith("mma") and r2[-5:-3] != "po": word = word[:-3] r1 = r1[:-3] # STEP 6: Tidying up if r1[-2:] in self.__long_vowels: word = word[:-1] r1 = r1[:-1] if (len(r1) >= 2 and r1[-2] in self.__consonants and r1[-1] in "a\xE4ei"): word = word[:-1] r1 = r1[:-1] if r1.endswith(("oj", "uj")): word = word[:-1] r1 = r1[:-1] if r1.endswith("jo"): word = word[:-1] r1 = r1[:-1] # If the word ends with a double consonant # followed by zero or more vowels, the last consonant is removed. for i in range(1, len(word)): if word[-i] in self.__vowels: continue else: if i == 1: if word[-i-1:] in self.__double_consonants: word = word[:-1] else: if word[-i-1:-i+1] in self.__double_consonants: word = "".join((word[:-i], word[-i+1:])) break return word class FrenchStemmer(_StandardStemmer): """ The French Snowball stemmer. :cvar __vowels: The French vowels. :type __vowels: unicode :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: tuple :cvar __step2a_suffixes: Suffixes to be deleted in step 2a of the algorithm. :type __step2a_suffixes: tuple :cvar __step2b_suffixes: Suffixes to be deleted in step 2b of the algorithm. :type __step2b_suffixes: tuple :cvar __step4_suffixes: Suffixes to be deleted in step 4 of the algorithm. :type __step4_suffixes: tuple :note: A detailed description of the French stemming algorithm can be found under http://snowball.tartarus.org/algorithms/french/stemmer.html """ __vowels = "aeiouy\xE2\xE0\xEB\xE9\xEA\xE8\xEF\xEE\xF4\xFB\xF9" __step1_suffixes = ('issements', 'issement', 'atrices', 'atrice', 'ateurs', 'ations', 'logies', 'usions', 'utions', 'ements', 'amment', 'emment', 'ances', 'iqUes', 'ismes', 'ables', 'istes', 'ateur', 'ation', 'logie', 'usion', 'ution', 'ences', 'ement', 'euses', 'ments', 'ance', 'iqUe', 'isme', 'able', 'iste', 'ence', 'it\xE9s', 'ives', 'eaux', 'euse', 'ment', 'eux', 'it\xE9', 'ive', 'ifs', 'aux', 'if') __step2a_suffixes = ('issaIent', 'issantes', 'iraIent', 'issante', 'issants', 'issions', 'irions', 'issais', 'issait', 'issant', 'issent', 'issiez', 'issons', 'irais', 'irait', 'irent', 'iriez', 'irons', 'iront', 'isses', 'issez', '\xEEmes', '\xEEtes', 'irai', 'iras', 'irez', 'isse', 'ies', 'ira', '\xEEt', 'ie', 'ir', 'is', 'it', 'i') __step2b_suffixes = ('eraIent', 'assions', 'erions', 'assent', 'assiez', '\xE8rent', 'erais', 'erait', 'eriez', 'erons', 'eront', 'aIent', 'antes', 'asses', 'ions', 'erai', 'eras', 'erez', '\xE2mes', '\xE2tes', 'ante', 'ants', 'asse', '\xE9es', 'era', 'iez', 'ais', 'ait', 'ant', '\xE9e', '\xE9s', 'er', 'ez', '\xE2t', 'ai', 'as', '\xE9', 'a') __step4_suffixes = ('i\xE8re', 'I\xE8re', 'ion', 'ier', 'Ier', 'e', '\xEB') def stem(self, word): """ Stem a French word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ word = word.lower() step1_success = False rv_ending_found = False step2a_success = False step2b_success = False # Every occurrence of 'u' after 'q' is put into upper case. for i in range(1, len(word)): if word[i-1] == "q" and word[i] == "u": word = "".join((word[:i], "U", word[i+1:])) # Every occurrence of 'u' and 'i' # between vowels is put into upper case. # Every occurrence of 'y' preceded or # followed by a vowel is also put into upper case. for i in range(1, len(word)-1): if word[i-1] in self.__vowels and word[i+1] in self.__vowels: if word[i] == "u": word = "".join((word[:i], "U", word[i+1:])) elif word[i] == "i": word = "".join((word[:i], "I", word[i+1:])) if word[i-1] in self.__vowels or word[i+1] in self.__vowels: if word[i] == "y": word = "".join((word[:i], "Y", word[i+1:])) r1, r2 = self._r1r2_standard(word, self.__vowels) rv = self.__rv_french(word, self.__vowels) # STEP 1: Standard suffix removal for suffix in self.__step1_suffixes: if word.endswith(suffix): if suffix == "eaux": word = word[:-1] step1_success = True elif suffix in ("euse", "euses"): if suffix in r2: word = word[:-len(suffix)] step1_success = True elif suffix in r1: word = "".join((word[:-len(suffix)], "eux")) step1_success = True elif suffix in ("ement", "ements") and suffix in rv: word = word[:-len(suffix)] step1_success = True if word[-2:] == "iv" and "iv" in r2: word = word[:-2] if word[-2:] == "at" and "at" in r2: word = word[:-2] elif word[-3:] == "eus": if "eus" in r2: word = word[:-3] elif "eus" in r1: word = "".join((word[:-1], "x")) elif word[-3:] in ("abl", "iqU"): if "abl" in r2 or "iqU" in r2: word = word[:-3] elif word[-3:] in ("i\xE8r", "I\xE8r"): if "i\xE8r" in rv or "I\xE8r" in rv: word = "".join((word[:-3], "i")) elif suffix == "amment" and suffix in rv: word = "".join((word[:-6], "ant")) rv = "".join((rv[:-6], "ant")) rv_ending_found = True elif suffix == "emment" and suffix in rv: word = "".join((word[:-6], "ent")) rv_ending_found = True elif (suffix in ("ment", "ments") and suffix in rv and not rv.startswith(suffix) and rv[rv.rindex(suffix)-1] in self.__vowels): word = word[:-len(suffix)] rv = rv[:-len(suffix)] rv_ending_found = True elif suffix == "aux" and suffix in r1: word = "".join((word[:-2], "l")) step1_success = True elif (suffix in ("issement", "issements") and suffix in r1 and word[-len(suffix)-1] not in self.__vowels): word = word[:-len(suffix)] step1_success = True elif suffix in ("ance", "iqUe", "isme", "able", "iste", "eux", "ances", "iqUes", "ismes", "ables", "istes") and suffix in r2: word = word[:-len(suffix)] step1_success = True elif suffix in ("atrice", "ateur", "ation", "atrices", "ateurs", "ations") and suffix in r2: word = word[:-len(suffix)] step1_success = True if word[-2:] == "ic": if "ic" in r2: word = word[:-2] else: word = "".join((word[:-2], "iqU")) elif suffix in ("logie", "logies") and suffix in r2: word = "".join((word[:-len(suffix)], "log")) step1_success = True elif (suffix in ("usion", "ution", "usions", "utions") and suffix in r2): word = "".join((word[:-len(suffix)], "u")) step1_success = True elif suffix in ("ence", "ences") and suffix in r2: word = "".join((word[:-len(suffix)], "ent")) step1_success = True elif suffix in ("it\xE9", "it\xE9s") and suffix in r2: word = word[:-len(suffix)] step1_success = True if word[-4:] == "abil": if "abil" in r2: word = word[:-4] else: word = "".join((word[:-2], "l")) elif word[-2:] == "ic": if "ic" in r2: word = word[:-2] else: word = "".join((word[:-2], "iqU")) elif word[-2:] == "iv": if "iv" in r2: word = word[:-2] elif (suffix in ("if", "ive", "ifs", "ives") and suffix in r2): word = word[:-len(suffix)] step1_success = True if word[-2:] == "at" and "at" in r2: word = word[:-2] if word[-2:] == "ic": if "ic" in r2: word = word[:-2] else: word = "".join((word[:-2], "iqU")) break # STEP 2a: Verb suffixes beginning 'i' if not step1_success or rv_ending_found: for suffix in self.__step2a_suffixes: if word.endswith(suffix): if (suffix in rv and len(rv) > len(suffix) and rv[rv.rindex(suffix)-1] not in self.__vowels): word = word[:-len(suffix)] step2a_success = True break # STEP 2b: Other verb suffixes if not step2a_success: for suffix in self.__step2b_suffixes: if rv.endswith(suffix): if suffix == "ions" and "ions" in r2: word = word[:-4] step2b_success = True elif suffix in ('eraIent', 'erions', '\xE8rent', 'erais', 'erait', 'eriez', 'erons', 'eront', 'erai', 'eras', 'erez', '\xE9es', 'era', 'iez', '\xE9e', '\xE9s', 'er', 'ez', '\xE9'): word = word[:-len(suffix)] step2b_success = True elif suffix in ('assions', 'assent', 'assiez', 'aIent', 'antes', 'asses', '\xE2mes', '\xE2tes', 'ante', 'ants', 'asse', 'ais', 'ait', 'ant', '\xE2t', 'ai', 'as', 'a'): word = word[:-len(suffix)] rv = rv[:-len(suffix)] step2b_success = True if rv.endswith("e"): word = word[:-1] break # STEP 3 if step1_success or step2a_success or step2b_success: if word[-1] == "Y": word = "".join((word[:-1], "i")) elif word[-1] == "\xE7": word = "".join((word[:-1], "c")) # STEP 4: Residual suffixes else: if (len(word) >= 2 and word[-1] == "s" and word[-2] not in "aiou\xE8s"): word = word[:-1] for suffix in self.__step4_suffixes: if word.endswith(suffix): if suffix in rv: if (suffix == "ion" and suffix in r2 and rv[-4] in "st"): word = word[:-3] elif suffix in ("ier", "i\xE8re", "Ier", "I\xE8re"): word = "".join((word[:-len(suffix)], "i")) elif suffix == "e": word = word[:-1] elif suffix == "\xEB" and word[-3:-1] == "gu": word = word[:-1] break # STEP 5: Undouble if word.endswith(("enn", "onn", "ett", "ell", "eill")): word = word[:-1] # STEP 6: Un-accent for i in range(1, len(word)): if word[-i] not in self.__vowels: i += 1 else: if i != 1 and word[-i] in ("\xE9", "\xE8"): word = "".join((word[:-i], "e", word[-i+1:])) break word = (word.replace("I", "i") .replace("U", "u") .replace("Y", "y")) return word def __rv_french(self, word, vowels): """ Return the region RV that is used by the French stemmer. If the word begins with two vowels, RV is the region after the third letter. Otherwise, it is the region after the first vowel not at the beginning of the word, or the end of the word if these positions cannot be found. (Exceptionally, u'par', u'col' or u'tap' at the beginning of a word is also taken to define RV as the region to their right.) :param word: The French word whose region RV is determined. :type word: str or unicode :param vowels: The French vowels that are used to determine the region RV. :type vowels: unicode :return: the region RV for the respective French word. :rtype: unicode :note: This helper method is invoked by the stem method of the subclass FrenchStemmer. It is not to be invoked directly! """ rv = "" if len(word) >= 2: if (word.startswith(("par", "col", "tap")) or (word[0] in vowels and word[1] in vowels)): rv = word[3:] else: for i in range(1, len(word)): if word[i] in vowels: rv = word[i+1:] break return rv class GermanStemmer(_StandardStemmer): """ The German Snowball stemmer. :cvar __vowels: The German vowels. :type __vowels: unicode :cvar __s_ending: Letters that may directly appear before a word final 's'. :type __s_ending: unicode :cvar __st_ending: Letter that may directly appear before a word final 'st'. :type __st_ending: unicode :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: tuple :cvar __step2_suffixes: Suffixes to be deleted in step 2 of the algorithm. :type __step2_suffixes: tuple :cvar __step3_suffixes: Suffixes to be deleted in step 3 of the algorithm. :type __step3_suffixes: tuple :note: A detailed description of the German stemming algorithm can be found under http://snowball.tartarus.org/algorithms/german/stemmer.html """ __vowels = "aeiouy\xE4\xF6\xFC" __s_ending = "bdfghklmnrt" __st_ending = "bdfghklmnt" __step1_suffixes = ("ern", "em", "er", "en", "es", "e", "s") __step2_suffixes = ("est", "en", "er", "st") __step3_suffixes = ("isch", "lich", "heit", "keit", "end", "ung", "ig", "ik") def stem(self, word): """ Stem a German word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ word = word.lower() word = word.replace("\xDF", "ss") # Every occurrence of 'u' and 'y' # between vowels is put into upper case. for i in range(1, len(word)-1): if word[i-1] in self.__vowels and word[i+1] in self.__vowels: if word[i] == "u": word = "".join((word[:i], "U", word[i+1:])) elif word[i] == "y": word = "".join((word[:i], "Y", word[i+1:])) r1, r2 = self._r1r2_standard(word, self.__vowels) # R1 is adjusted so that the region before it # contains at least 3 letters. for i in range(1, len(word)): if word[i] not in self.__vowels and word[i-1] in self.__vowels: if len(word[:i+1]) < 3 and len(word[:i+1]) > 0: r1 = word[3:] elif len(word[:i+1]) == 0: return word break # STEP 1 for suffix in self.__step1_suffixes: if r1.endswith(suffix): if (suffix in ("en", "es", "e") and word[-len(suffix)-4:-len(suffix)] == "niss"): word = word[:-len(suffix)-1] r1 = r1[:-len(suffix)-1] r2 = r2[:-len(suffix)-1] elif suffix == "s": if word[-2] in self.__s_ending: word = word[:-1] r1 = r1[:-1] r2 = r2[:-1] else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] break # STEP 2 for suffix in self.__step2_suffixes: if r1.endswith(suffix): if suffix == "st": if word[-3] in self.__st_ending and len(word[:-3]) >= 3: word = word[:-2] r1 = r1[:-2] r2 = r2[:-2] else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] break # STEP 3: Derivational suffixes for suffix in self.__step3_suffixes: if r2.endswith(suffix): if suffix in ("end", "ung"): if ("ig" in r2[-len(suffix)-2:-len(suffix)] and "e" not in r2[-len(suffix)-3:-len(suffix)-2]): word = word[:-len(suffix)-2] else: word = word[:-len(suffix)] elif (suffix in ("ig", "ik", "isch") and "e" not in r2[-len(suffix)-1:-len(suffix)]): word = word[:-len(suffix)] elif suffix in ("lich", "heit"): if ("er" in r1[-len(suffix)-2:-len(suffix)] or "en" in r1[-len(suffix)-2:-len(suffix)]): word = word[:-len(suffix)-2] else: word = word[:-len(suffix)] elif suffix == "keit": if "lich" in r2[-len(suffix)-4:-len(suffix)]: word = word[:-len(suffix)-4] elif "ig" in r2[-len(suffix)-2:-len(suffix)]: word = word[:-len(suffix)-2] else: word = word[:-len(suffix)] break # Umlaut accents are removed and # 'u' and 'y' are put back into lower case. word = (word.replace("\xE4", "a").replace("\xF6", "o") .replace("\xFC", "u").replace("U", "u") .replace("Y", "y")) return word class HungarianStemmer(_LanguageSpecificStemmer): """ The Hungarian Snowball stemmer. :cvar __vowels: The Hungarian vowels. :type __vowels: unicode :cvar __digraphs: The Hungarian digraphs. :type __digraphs: tuple :cvar __double_consonants: The Hungarian double consonants. :type __double_consonants: tuple :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: tuple :cvar __step2_suffixes: Suffixes to be deleted in step 2 of the algorithm. :type __step2_suffixes: tuple :cvar __step3_suffixes: Suffixes to be deleted in step 3 of the algorithm. :type __step3_suffixes: tuple :cvar __step4_suffixes: Suffixes to be deleted in step 4 of the algorithm. :type __step4_suffixes: tuple :cvar __step5_suffixes: Suffixes to be deleted in step 5 of the algorithm. :type __step5_suffixes: tuple :cvar __step6_suffixes: Suffixes to be deleted in step 6 of the algorithm. :type __step6_suffixes: tuple :cvar __step7_suffixes: Suffixes to be deleted in step 7 of the algorithm. :type __step7_suffixes: tuple :cvar __step8_suffixes: Suffixes to be deleted in step 8 of the algorithm. :type __step8_suffixes: tuple :cvar __step9_suffixes: Suffixes to be deleted in step 9 of the algorithm. :type __step9_suffixes: tuple :note: A detailed description of the Hungarian stemming algorithm can be found under http://snowball.tartarus.org/algorithms/hungarian/stemmer.html """ __vowels = "aeiou\xF6\xFC\xE1\xE9\xED\xF3\xF5\xFA\xFB" __digraphs = ("cs", "dz", "dzs", "gy", "ly", "ny", "ty", "zs") __double_consonants = ("bb", "cc", "ccs", "dd", "ff", "gg", "ggy", "jj", "kk", "ll", "lly", "mm", "nn", "nny", "pp", "rr", "ss", "ssz", "tt", "tty", "vv", "zz", "zzs") __step1_suffixes = ("al", "el") __step2_suffixes = ('k\xE9ppen', 'onk\xE9nt', 'enk\xE9nt', 'ank\xE9nt', 'k\xE9pp', 'k\xE9nt', 'ban', 'ben', 'nak', 'nek', 'val', 'vel', 't\xF3l', 't\xF5l', 'r\xF3l', 'r\xF5l', 'b\xF3l', 'b\xF5l', 'hoz', 'hez', 'h\xF6z', 'n\xE1l', 'n\xE9l', '\xE9rt', 'kor', 'ba', 'be', 'ra', 're', 'ig', 'at', 'et', 'ot', '\xF6t', 'ul', '\xFCl', 'v\xE1', 'v\xE9', 'en', 'on', 'an', '\xF6n', 'n', 't') __step3_suffixes = ("\xE1nk\xE9nt", "\xE1n", "\xE9n") __step4_suffixes = ('astul', 'est\xFCl', '\xE1stul', '\xE9st\xFCl', 'stul', 'st\xFCl') __step5_suffixes = ("\xE1", "\xE9") __step6_suffixes = ('ok\xE9', '\xF6k\xE9', 'ak\xE9', 'ek\xE9', '\xE1k\xE9', '\xE1\xE9i', '\xE9k\xE9', '\xE9\xE9i', 'k\xE9', '\xE9i', '\xE9\xE9', '\xE9') __step7_suffixes = ('\xE1juk', '\xE9j\xFCk', '\xFCnk', 'unk', 'juk', 'j\xFCk', '\xE1nk', '\xE9nk', 'nk', 'uk', '\xFCk', 'em', 'om', 'am', 'od', 'ed', 'ad', '\xF6d', 'ja', 'je', '\xE1m', '\xE1d', '\xE9m', '\xE9d', 'm', 'd', 'a', 'e', 'o', '\xE1', '\xE9') __step8_suffixes = ('jaitok', 'jeitek', 'jaink', 'jeink', 'aitok', 'eitek', '\xE1itok', '\xE9itek', 'jaim', 'jeim', 'jaid', 'jeid', 'eink', 'aink', 'itek', 'jeik', 'jaik', '\xE1ink', '\xE9ink', 'aim', 'eim', 'aid', 'eid', 'jai', 'jei', 'ink', 'aik', 'eik', '\xE1im', '\xE1id', '\xE1ik', '\xE9im', '\xE9id', '\xE9ik', 'im', 'id', 'ai', 'ei', 'ik', '\xE1i', '\xE9i', 'i') __step9_suffixes = ("\xE1k", "\xE9k", "\xF6k", "ok", "ek", "ak", "k") def stem(self, word): """ Stem an Hungarian word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ word = word.lower() r1 = self.__r1_hungarian(word, self.__vowels, self.__digraphs) # STEP 1: Remove instrumental case if r1.endswith(self.__step1_suffixes): for double_cons in self.__double_consonants: if word[-2-len(double_cons):-2] == double_cons: word = "".join((word[:-4], word[-3])) if r1[-2-len(double_cons):-2] == double_cons: r1 = "".join((r1[:-4], r1[-3])) break # STEP 2: Remove frequent cases for suffix in self.__step2_suffixes: if word.endswith(suffix): if r1.endswith(suffix): word = word[:-len(suffix)] r1 = r1[:-len(suffix)] if r1.endswith("\xE1"): word = "".join((word[:-1], "a")) r1 = "".join((r1[:-1], "a")) elif r1.endswith("\xE9"): word = "".join((word[:-1], "e")) r1 = "".join((r1[:-1], "e")) break # STEP 3: Remove special cases for suffix in self.__step3_suffixes: if r1.endswith(suffix): if suffix == "\xE9n": word = "".join((word[:-2], "e")) r1 = "".join((r1[:-2], "e")) else: word = "".join((word[:-len(suffix)], "a")) r1 = "".join((r1[:-len(suffix)], "a")) break # STEP 4: Remove other cases for suffix in self.__step4_suffixes: if r1.endswith(suffix): if suffix == "\xE1stul": word = "".join((word[:-5], "a")) r1 = "".join((r1[:-5], "a")) elif suffix == "\xE9st\xFCl": word = "".join((word[:-5], "e")) r1 = "".join((r1[:-5], "e")) else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] break # STEP 5: Remove factive case for suffix in self.__step5_suffixes: if r1.endswith(suffix): for double_cons in self.__double_consonants: if word[-1-len(double_cons):-1] == double_cons: word = "".join((word[:-3], word[-2])) if r1[-1-len(double_cons):-1] == double_cons: r1 = "".join((r1[:-3], r1[-2])) break # STEP 6: Remove owned for suffix in self.__step6_suffixes: if r1.endswith(suffix): if suffix in ("\xE1k\xE9", "\xE1\xE9i"): word = "".join((word[:-3], "a")) r1 = "".join((r1[:-3], "a")) elif suffix in ("\xE9k\xE9", "\xE9\xE9i", "\xE9\xE9"): word = "".join((word[:-len(suffix)], "e")) r1 = "".join((r1[:-len(suffix)], "e")) else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] break # STEP 7: Remove singular owner suffixes for suffix in self.__step7_suffixes: if word.endswith(suffix): if r1.endswith(suffix): if suffix in ("\xE1nk", "\xE1juk", "\xE1m", "\xE1d", "\xE1"): word = "".join((word[:-len(suffix)], "a")) r1 = "".join((r1[:-len(suffix)], "a")) elif suffix in ("\xE9nk", "\xE9j\xFCk", "\xE9m", "\xE9d", "\xE9"): word = "".join((word[:-len(suffix)], "e")) r1 = "".join((r1[:-len(suffix)], "e")) else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] break # STEP 8: Remove plural owner suffixes for suffix in self.__step8_suffixes: if word.endswith(suffix): if r1.endswith(suffix): if suffix in ("\xE1im", "\xE1id", "\xE1i", "\xE1ink", "\xE1itok", "\xE1ik"): word = "".join((word[:-len(suffix)], "a")) r1 = "".join((r1[:-len(suffix)], "a")) elif suffix in ("\xE9im", "\xE9id", "\xE9i", "\xE9ink", "\xE9itek", "\xE9ik"): word = "".join((word[:-len(suffix)], "e")) r1 = "".join((r1[:-len(suffix)], "e")) else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] break # STEP 9: Remove plural suffixes for suffix in self.__step9_suffixes: if word.endswith(suffix): if r1.endswith(suffix): if suffix == "\xE1k": word = "".join((word[:-2], "a")) elif suffix == "\xE9k": word = "".join((word[:-2], "e")) else: word = word[:-len(suffix)] break return word def __r1_hungarian(self, word, vowels, digraphs): """ Return the region R1 that is used by the Hungarian stemmer. If the word begins with a vowel, R1 is defined as the region after the first consonant or digraph (= two letters stand for one phoneme) in the word. If the word begins with a consonant, it is defined as the region after the first vowel in the word. If the word does not contain both a vowel and consonant, R1 is the null region at the end of the word. :param word: The Hungarian word whose region R1 is determined. :type word: str or unicode :param vowels: The Hungarian vowels that are used to determine the region R1. :type vowels: unicode :param digraphs: The digraphs that are used to determine the region R1. :type digraphs: tuple :return: the region R1 for the respective word. :rtype: unicode :note: This helper method is invoked by the stem method of the subclass HungarianStemmer. It is not to be invoked directly! """ r1 = "" if word[0] in vowels: for digraph in digraphs: if digraph in word[1:]: r1 = word[word.index(digraph[-1])+1:] return r1 for i in range(1, len(word)): if word[i] not in vowels: r1 = word[i+1:] break else: for i in range(1, len(word)): if word[i] in vowels: r1 = word[i+1:] break return r1 class ItalianStemmer(_StandardStemmer): """ The Italian Snowball stemmer. :cvar __vowels: The Italian vowels. :type __vowels: unicode :cvar __step0_suffixes: Suffixes to be deleted in step 0 of the algorithm. :type __step0_suffixes: tuple :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: tuple :cvar __step2_suffixes: Suffixes to be deleted in step 2 of the algorithm. :type __step2_suffixes: tuple :note: A detailed description of the Italian stemming algorithm can be found under http://snowball.tartarus.org/algorithms/italian/stemmer.html """ __vowels = "aeiou\xE0\xE8\xEC\xF2\xF9" __step0_suffixes = ('gliela', 'gliele', 'glieli', 'glielo', 'gliene', 'sene', 'mela', 'mele', 'meli', 'melo', 'mene', 'tela', 'tele', 'teli', 'telo', 'tene', 'cela', 'cele', 'celi', 'celo', 'cene', 'vela', 'vele', 'veli', 'velo', 'vene', 'gli', 'ci', 'la', 'le', 'li', 'lo', 'mi', 'ne', 'si', 'ti', 'vi') __step1_suffixes = ('atrice', 'atrici', 'azione', 'azioni', 'uzione', 'uzioni', 'usione', 'usioni', 'amento', 'amenti', 'imento', 'imenti', 'amente', 'abile', 'abili', 'ibile', 'ibili', 'mente', 'atore', 'atori', 'logia', 'logie', 'anza', 'anze', 'iche', 'ichi', 'ismo', 'ismi', 'ista', 'iste', 'isti', 'ist\xE0', 'ist\xE8', 'ist\xEC', 'ante', 'anti', 'enza', 'enze', 'ico', 'ici', 'ica', 'ice', 'oso', 'osi', 'osa', 'ose', 'it\xE0', 'ivo', 'ivi', 'iva', 'ive') __step2_suffixes = ('erebbero', 'irebbero', 'assero', 'assimo', 'eranno', 'erebbe', 'eremmo', 'ereste', 'eresti', 'essero', 'iranno', 'irebbe', 'iremmo', 'ireste', 'iresti', 'iscano', 'iscono', 'issero', 'arono', 'avamo', 'avano', 'avate', 'eremo', 'erete', 'erono', 'evamo', 'evano', 'evate', 'iremo', 'irete', 'irono', 'ivamo', 'ivano', 'ivate', 'ammo', 'ando', 'asse', 'assi', 'emmo', 'enda', 'ende', 'endi', 'endo', 'erai', 'erei', 'Yamo', 'iamo', 'immo', 'irai', 'irei', 'isca', 'isce', 'isci', 'isco', 'ano', 'are', 'ata', 'ate', 'ati', 'ato', 'ava', 'avi', 'avo', 'er\xE0', 'ere', 'er\xF2', 'ete', 'eva', 'evi', 'evo', 'ir\xE0', 'ire', 'ir\xF2', 'ita', 'ite', 'iti', 'ito', 'iva', 'ivi', 'ivo', 'ono', 'uta', 'ute', 'uti', 'uto', 'ar', 'ir') def stem(self, word): """ Stem an Italian word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ word = word.lower() step1_success = False # All acute accents are replaced by grave accents. word = (word.replace("\xE1", "\xE0") .replace("\xE9", "\xE8") .replace("\xED", "\xEC") .replace("\xF3", "\xF2") .replace("\xFA", "\xF9")) # Every occurrence of 'u' after 'q' # is put into upper case. for i in range(1, len(word)): if word[i-1] == "q" and word[i] == "u": word = "".join((word[:i], "U", word[i+1:])) # Every occurrence of 'u' and 'i' # between vowels is put into upper case. for i in range(1, len(word)-1): if word[i-1] in self.__vowels and word[i+1] in self.__vowels: if word[i] == "u": word = "".join((word[:i], "U", word[i+1:])) elif word [i] == "i": word = "".join((word[:i], "I", word[i+1:])) r1, r2 = self._r1r2_standard(word, self.__vowels) rv = self._rv_standard(word, self.__vowels) # STEP 0: Attached pronoun for suffix in self.__step0_suffixes: if rv.endswith(suffix): if rv[-len(suffix)-4:-len(suffix)] in ("ando", "endo"): word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] elif (rv[-len(suffix)-2:-len(suffix)] in ("ar", "er", "ir")): word = "".join((word[:-len(suffix)], "e")) r1 = "".join((r1[:-len(suffix)], "e")) r2 = "".join((r2[:-len(suffix)], "e")) rv = "".join((rv[:-len(suffix)], "e")) break # STEP 1: Standard suffix removal for suffix in self.__step1_suffixes: if word.endswith(suffix): if suffix == "amente" and r1.endswith(suffix): step1_success = True word = word[:-6] r2 = r2[:-6] rv = rv[:-6] if r2.endswith("iv"): word = word[:-2] r2 = r2[:-2] rv = rv[:-2] if r2.endswith("at"): word = word[:-2] rv = rv[:-2] elif r2.endswith(("os", "ic")): word = word[:-2] rv = rv[:-2] elif r2 .endswith("abil"): word = word[:-4] rv = rv[:-4] elif (suffix in ("amento", "amenti", "imento", "imenti") and rv.endswith(suffix)): step1_success = True word = word[:-6] rv = rv[:-6] elif r2.endswith(suffix): step1_success = True if suffix in ("azione", "azioni", "atore", "atori"): word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] if r2.endswith("ic"): word = word[:-2] rv = rv[:-2] elif suffix in ("logia", "logie"): word = word[:-2] rv = word[:-2] elif suffix in ("uzione", "uzioni", "usione", "usioni"): word = word[:-5] rv = rv[:-5] elif suffix in ("enza", "enze"): word = "".join((word[:-2], "te")) rv = "".join((rv[:-2], "te")) elif suffix == "it\xE0": word = word[:-3] r2 = r2[:-3] rv = rv[:-3] if r2.endswith(("ic", "iv")): word = word[:-2] rv = rv[:-2] elif r2.endswith("abil"): word = word[:-4] rv = rv[:-4] elif suffix in ("ivo", "ivi", "iva", "ive"): word = word[:-3] r2 = r2[:-3] rv = rv[:-3] if r2.endswith("at"): word = word[:-2] r2 = r2[:-2] rv = rv[:-2] if r2.endswith("ic"): word = word[:-2] rv = rv[:-2] else: word = word[:-len(suffix)] rv = rv[:-len(suffix)] break # STEP 2: Verb suffixes if not step1_success: for suffix in self.__step2_suffixes: if rv.endswith(suffix): word = word[:-len(suffix)] rv = rv[:-len(suffix)] break # STEP 3a if rv.endswith(("a", "e", "i", "o", "\xE0", "\xE8", "\xEC", "\xF2")): word = word[:-1] rv = rv[:-1] if rv.endswith("i"): word = word[:-1] rv = rv[:-1] # STEP 3b if rv.endswith(("ch", "gh")): word = word[:-1] word = word.replace("I", "i").replace("U", "u") return word class NorwegianStemmer(_ScandinavianStemmer): """ The Norwegian Snowball stemmer. :cvar __vowels: The Norwegian vowels. :type __vowels: unicode :cvar __s_ending: Letters that may directly appear before a word final 's'. :type __s_ending: unicode :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: tuple :cvar __step2_suffixes: Suffixes to be deleted in step 2 of the algorithm. :type __step2_suffixes: tuple :cvar __step3_suffixes: Suffixes to be deleted in step 3 of the algorithm. :type __step3_suffixes: tuple :note: A detailed description of the Norwegian stemming algorithm can be found under http://snowball.tartarus.org/algorithms/norwegian/stemmer.html """ __vowels = "aeiouy\xE6\xE5\xF8" __s_ending = "bcdfghjlmnoprtvyz" __step1_suffixes = ("hetenes", "hetene", "hetens", "heter", "heten", "endes", "ande", "ende", "edes", "enes", "erte", "ede", "ane", "ene", "ens", "ers", "ets", "het", "ast", "ert", "en", "ar", "er", "as", "es", "et", "a", "e", "s") __step2_suffixes = ("dt", "vt") __step3_suffixes = ("hetslov", "eleg", "elig", "elov", "slov", "leg", "eig", "lig", "els", "lov", "ig") def stem(self, word): """ Stem a Norwegian word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ word = word.lower() r1 = self._r1_scandinavian(word, self.__vowels) # STEP 1 for suffix in self.__step1_suffixes: if r1.endswith(suffix): if suffix in ("erte", "ert"): word = "".join((word[:-len(suffix)], "er")) r1 = "".join((r1[:-len(suffix)], "er")) elif suffix == "s": if (word[-2] in self.__s_ending or (word[-2] == "k" and word[-3] not in self.__vowels)): word = word[:-1] r1 = r1[:-1] else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] break # STEP 2 for suffix in self.__step2_suffixes: if r1.endswith(suffix): word = word[:-1] r1 = r1[:-1] break # STEP 3 for suffix in self.__step3_suffixes: if r1.endswith(suffix): word = word[:-len(suffix)] break return word class PortugueseStemmer(_StandardStemmer): """ The Portuguese Snowball stemmer. :cvar __vowels: The Portuguese vowels. :type __vowels: unicode :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: tuple :cvar __step2_suffixes: Suffixes to be deleted in step 2 of the algorithm. :type __step2_suffixes: tuple :cvar __step4_suffixes: Suffixes to be deleted in step 4 of the algorithm. :type __step4_suffixes: tuple :note: A detailed description of the Portuguese stemming algorithm can be found under http://snowball.tartarus.org/algorithms/portuguese/stemmer.html """ __vowels = "aeiou\xE1\xE9\xED\xF3\xFA\xE2\xEA\xF4" __step1_suffixes = ('amentos', 'imentos', 'uciones', 'amento', 'imento', 'adoras', 'adores', 'a\xE7o~es', 'log\xEDas', '\xEAncias', 'amente', 'idades', 'ismos', 'istas', 'adora', 'a\xE7a~o', 'antes', '\xE2ncia', 'log\xEDa', 'uci\xF3n', '\xEAncia', 'mente', 'idade', 'ezas', 'icos', 'icas', 'ismo', '\xE1vel', '\xEDvel', 'ista', 'osos', 'osas', 'ador', 'ante', 'ivas', 'ivos', 'iras', 'eza', 'ico', 'ica', 'oso', 'osa', 'iva', 'ivo', 'ira') __step2_suffixes = ('ar\xEDamos', 'er\xEDamos', 'ir\xEDamos', '\xE1ssemos', '\xEAssemos', '\xEDssemos', 'ar\xEDeis', 'er\xEDeis', 'ir\xEDeis', '\xE1sseis', '\xE9sseis', '\xEDsseis', '\xE1ramos', '\xE9ramos', '\xEDramos', '\xE1vamos', 'aremos', 'eremos', 'iremos', 'ariam', 'eriam', 'iriam', 'assem', 'essem', 'issem', 'ara~o', 'era~o', 'ira~o', 'arias', 'erias', 'irias', 'ardes', 'erdes', 'irdes', 'asses', 'esses', 'isses', 'astes', 'estes', 'istes', '\xE1reis', 'areis', '\xE9reis', 'ereis', '\xEDreis', 'ireis', '\xE1veis', '\xEDamos', 'armos', 'ermos', 'irmos', 'aria', 'eria', 'iria', 'asse', 'esse', 'isse', 'aste', 'este', 'iste', 'arei', 'erei', 'irei', 'aram', 'eram', 'iram', 'avam', 'arem', 'erem', 'irem', 'ando', 'endo', 'indo', 'adas', 'idas', 'ar\xE1s', 'aras', 'er\xE1s', 'eras', 'ir\xE1s', 'avas', 'ares', 'eres', 'ires', '\xEDeis', 'ados', 'idos', '\xE1mos', 'amos', 'emos', 'imos', 'iras', 'ada', 'ida', 'ar\xE1', 'ara', 'er\xE1', 'era', 'ir\xE1', 'ava', 'iam', 'ado', 'ido', 'ias', 'ais', 'eis', 'ira', 'ia', 'ei', 'am', 'em', 'ar', 'er', 'ir', 'as', 'es', 'is', 'eu', 'iu', 'ou') __step4_suffixes = ("os", "a", "i", "o", "\xE1", "\xED", "\xF3") def stem(self, word): """ Stem a Portuguese word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ word = word.lower() step1_success = False step2_success = False word = (word.replace("\xE3", "a~") .replace("\xF5", "o~")) r1, r2 = self._r1r2_standard(word, self.__vowels) rv = self._rv_standard(word, self.__vowels) # STEP 1: Standard suffix removal for suffix in self.__step1_suffixes: if word.endswith(suffix): if suffix == "amente" and r1.endswith(suffix): step1_success = True word = word[:-6] r2 = r2[:-6] rv = rv[:-6] if r2.endswith("iv"): word = word[:-2] r2 = r2[:-2] rv = rv[:-2] if r2.endswith("at"): word = word[:-2] rv = rv[:-2] elif r2.endswith(("os", "ic", "ad")): word = word[:-2] rv = rv[:-2] elif (suffix in ("ira", "iras") and rv.endswith(suffix) and word[-len(suffix)-1:-len(suffix)] == "e"): step1_success = True word = "".join((word[:-len(suffix)], "ir")) rv = "".join((rv[:-len(suffix)], "ir")) elif r2.endswith(suffix): step1_success = True if suffix in ("log\xEDa", "log\xEDas"): word = word[:-2] rv = rv[:-2] elif suffix in ("uci\xF3n", "uciones"): word = "".join((word[:-len(suffix)], "u")) rv = "".join((rv[:-len(suffix)], "u")) elif suffix in ("\xEAncia", "\xEAncias"): word = "".join((word[:-len(suffix)], "ente")) rv = "".join((rv[:-len(suffix)], "ente")) elif suffix == "mente": word = word[:-5] r2 = r2[:-5] rv = rv[:-5] if r2.endswith(("ante", "avel", "\xEDvel")): word = word[:-4] rv = rv[:-4] elif suffix in ("idade", "idades"): word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] if r2.endswith(("ic", "iv")): word = word[:-2] rv = rv[:-2] elif r2.endswith("abil"): word = word[:-4] rv = rv[:-4] elif suffix in ("iva", "ivo", "ivas", "ivos"): word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] if r2.endswith("at"): word = word[:-2] rv = rv[:-2] else: word = word[:-len(suffix)] rv = rv[:-len(suffix)] break # STEP 2: Verb suffixes if not step1_success: for suffix in self.__step2_suffixes: if rv.endswith(suffix): step2_success = True word = word[:-len(suffix)] rv = rv[:-len(suffix)] break # STEP 3 if step1_success or step2_success: if rv.endswith("i") and word[-2] == "c": word = word[:-1] rv = rv[:-1] ### STEP 4: Residual suffix if not step1_success and not step2_success: for suffix in self.__step4_suffixes: if rv.endswith(suffix): word = word[:-len(suffix)] rv = rv[:-len(suffix)] break # STEP 5 if rv.endswith(("e", "\xE9", "\xEA")): word = word[:-1] rv = rv[:-1] if ((word.endswith("gu") and rv.endswith("u")) or (word.endswith("ci") and rv.endswith("i"))): word = word[:-1] elif word.endswith("\xE7"): word = "".join((word[:-1], "c")) word = word.replace("a~", "\xE3").replace("o~", "\xF5") return word class RomanianStemmer(_StandardStemmer): """ The Romanian Snowball stemmer. :cvar __vowels: The Romanian vowels. :type __vowels: unicode :cvar __step0_suffixes: Suffixes to be deleted in step 0 of the algorithm. :type __step0_suffixes: tuple :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: tuple :cvar __step2_suffixes: Suffixes to be deleted in step 2 of the algorithm. :type __step2_suffixes: tuple :cvar __step3_suffixes: Suffixes to be deleted in step 3 of the algorithm. :type __step3_suffixes: tuple :note: A detailed description of the Romanian stemming algorithm can be found under http://snowball.tartarus.org/algorithms/romanian/stemmer.html """ __vowels = "aeiou\u0103\xE2\xEE" __step0_suffixes = ('iilor', 'ului', 'elor', 'iile', 'ilor', 'atei', 'a\u0163ie', 'a\u0163ia', 'aua', 'ele', 'iua', 'iei', 'ile', 'ul', 'ea', 'ii') __step1_suffixes = ('abilitate', 'abilitati', 'abilit\u0103\u0163i', 'ibilitate', 'abilit\u0103i', 'ivitate', 'ivitati', 'ivit\u0103\u0163i', 'icitate', 'icitati', 'icit\u0103\u0163i', 'icatori', 'ivit\u0103i', 'icit\u0103i', 'icator', 'a\u0163iune', 'atoare', '\u0103toare', 'i\u0163iune', 'itoare', 'iciva', 'icive', 'icivi', 'iciv\u0103', 'icala', 'icale', 'icali', 'ical\u0103', 'ativa', 'ative', 'ativi', 'ativ\u0103', 'atori', '\u0103tori', 'itiva', 'itive', 'itivi', 'itiv\u0103', 'itori', 'iciv', 'ical', 'ativ', 'ator', '\u0103tor', 'itiv', 'itor') __step2_suffixes = ('abila', 'abile', 'abili', 'abil\u0103', 'ibila', 'ibile', 'ibili', 'ibil\u0103', 'atori', 'itate', 'itati', 'it\u0103\u0163i', 'abil', 'ibil', 'oasa', 'oas\u0103', 'oase', 'anta', 'ante', 'anti', 'ant\u0103', 'ator', 'it\u0103i', 'iune', 'iuni', 'isme', 'ista', 'iste', 'isti', 'ist\u0103', 'i\u015Fti', 'ata', 'at\u0103', 'ati', 'ate', 'uta', 'ut\u0103', 'uti', 'ute', 'ita', 'it\u0103', 'iti', 'ite', 'ica', 'ice', 'ici', 'ic\u0103', 'osi', 'o\u015Fi', 'ant', 'iva', 'ive', 'ivi', 'iv\u0103', 'ism', 'ist', 'at', 'ut', 'it', 'ic', 'os', 'iv') __step3_suffixes = ('seser\u0103\u0163i', 'aser\u0103\u0163i', 'iser\u0103\u0163i', '\xE2ser\u0103\u0163i', 'user\u0103\u0163i', 'seser\u0103m', 'aser\u0103m', 'iser\u0103m', '\xE2ser\u0103m', 'user\u0103m', 'ser\u0103\u0163i', 'sese\u015Fi', 'seser\u0103', 'easc\u0103', 'ar\u0103\u0163i', 'ur\u0103\u0163i', 'ir\u0103\u0163i', '\xE2r\u0103\u0163i', 'ase\u015Fi', 'aser\u0103', 'ise\u015Fi', 'iser\u0103', '\xe2se\u015Fi', '\xE2ser\u0103', 'use\u015Fi', 'user\u0103', 'ser\u0103m', 'sesem', 'indu', '\xE2ndu', 'eaz\u0103', 'e\u015Fti', 'e\u015Fte', '\u0103\u015Fti', '\u0103\u015Fte', 'ea\u0163i', 'ia\u0163i', 'ar\u0103m', 'ur\u0103m', 'ir\u0103m', '\xE2r\u0103m', 'asem', 'isem', '\xE2sem', 'usem', 'se\u015Fi', 'ser\u0103', 'sese', 'are', 'ere', 'ire', '\xE2re', 'ind', '\xE2nd', 'eze', 'ezi', 'esc', '\u0103sc', 'eam', 'eai', 'eau', 'iam', 'iai', 'iau', 'a\u015Fi', 'ar\u0103', 'u\u015Fi', 'ur\u0103', 'i\u015Fi', 'ir\u0103', '\xE2\u015Fi', '\xe2r\u0103', 'ase', 'ise', '\xE2se', 'use', 'a\u0163i', 'e\u0163i', 'i\u0163i', '\xe2\u0163i', 'sei', 'ez', 'am', 'ai', 'au', 'ea', 'ia', 'ui', '\xE2i', '\u0103m', 'em', 'im', '\xE2m', 'se') def stem(self, word): """ Stem a Romanian word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ word = word.lower() step1_success = False step2_success = False for i in range(1, len(word)-1): if word[i-1] in self.__vowels and word[i+1] in self.__vowels: if word[i] == "u": word = "".join((word[:i], "U", word[i+1:])) elif word[i] == "i": word = "".join((word[:i], "I", word[i+1:])) r1, r2 = self._r1r2_standard(word, self.__vowels) rv = self._rv_standard(word, self.__vowels) # STEP 0: Removal of plurals and other simplifications for suffix in self.__step0_suffixes: if word.endswith(suffix): if suffix in r1: if suffix in ("ul", "ului"): word = word[:-len(suffix)] if suffix in rv: rv = rv[:-len(suffix)] else: rv = "" elif (suffix == "aua" or suffix == "atei" or (suffix == "ile" and word[-5:-3] != "ab")): word = word[:-2] elif suffix in ("ea", "ele", "elor"): word = "".join((word[:-len(suffix)], "e")) if suffix in rv: rv = "".join((rv[:-len(suffix)], "e")) else: rv = "" elif suffix in ("ii", "iua", "iei", "iile", "iilor", "ilor"): word = "".join((word[:-len(suffix)], "i")) if suffix in rv: rv = "".join((rv[:-len(suffix)], "i")) else: rv = "" elif suffix in ("a\u0163ie", "a\u0163ia"): word = word[:-1] break # STEP 1: Reduction of combining suffixes while True: replacement_done = False for suffix in self.__step1_suffixes: if word.endswith(suffix): if suffix in r1: step1_success = True replacement_done = True if suffix in ("abilitate", "abilitati", "abilit\u0103i", "abilit\u0103\u0163i"): word = "".join((word[:-len(suffix)], "abil")) elif suffix == "ibilitate": word = word[:-5] elif suffix in ("ivitate", "ivitati", "ivit\u0103i", "ivit\u0103\u0163i"): word = "".join((word[:-len(suffix)], "iv")) elif suffix in ("icitate", "icitati", "icit\u0103i", "icit\u0103\u0163i", "icator", "icatori", "iciv", "iciva", "icive", "icivi", "iciv\u0103", "ical", "icala", "icale", "icali", "ical\u0103"): word = "".join((word[:-len(suffix)], "ic")) elif suffix in ("ativ", "ativa", "ative", "ativi", "ativ\u0103", "a\u0163iune", "atoare", "ator", "atori", "\u0103toare", "\u0103tor", "\u0103tori"): word = "".join((word[:-len(suffix)], "at")) if suffix in r2: r2 = "".join((r2[:-len(suffix)], "at")) elif suffix in ("itiv", "itiva", "itive", "itivi", "itiv\u0103", "i\u0163iune", "itoare", "itor", "itori"): word = "".join((word[:-len(suffix)], "it")) if suffix in r2: r2 = "".join((r2[:-len(suffix)], "it")) else: step1_success = False break if not replacement_done: break # STEP 2: Removal of standard suffixes for suffix in self.__step2_suffixes: if word.endswith(suffix): if suffix in r2: step2_success = True if suffix in ("iune", "iuni"): if word[-5] == "\u0163": word = "".join((word[:-5], "t")) elif suffix in ("ism", "isme", "ist", "ista", "iste", "isti", "ist\u0103", "i\u015Fti"): word = "".join((word[:-len(suffix)], "ist")) else: word = word[:-len(suffix)] break # STEP 3: Removal of verb suffixes if not step1_success and not step2_success: for suffix in self.__step3_suffixes: if word.endswith(suffix): if suffix in rv: if suffix in ('seser\u0103\u0163i', 'seser\u0103m', 'ser\u0103\u0163i', 'sese\u015Fi', 'seser\u0103', 'ser\u0103m', 'sesem', 'se\u015Fi', 'ser\u0103', 'sese', 'a\u0163i', 'e\u0163i', 'i\u0163i', '\xE2\u0163i', 'sei', '\u0103m', 'em', 'im', '\xE2m', 'se'): word = word[:-len(suffix)] rv = rv[:-len(suffix)] else: if (not rv.startswith(suffix) and rv[rv.index(suffix)-1] not in "aeio\u0103\xE2\xEE"): word = word[:-len(suffix)] break # STEP 4: Removal of final vowel for suffix in ("ie", "a", "e", "i", "\u0103"): if word.endswith(suffix): if suffix in rv: word = word[:-len(suffix)] break word = word.replace("I", "i").replace("U", "u") return word class RussianStemmer(_LanguageSpecificStemmer): """ The Russian Snowball stemmer. :cvar __perfective_gerund_suffixes: Suffixes to be deleted. :type __perfective_gerund_suffixes: tuple :cvar __adjectival_suffixes: Suffixes to be deleted. :type __adjectival_suffixes: tuple :cvar __reflexive_suffixes: Suffixes to be deleted. :type __reflexive_suffixes: tuple :cvar __verb_suffixes: Suffixes to be deleted. :type __verb_suffixes: tuple :cvar __noun_suffixes: Suffixes to be deleted. :type __noun_suffixes: tuple :cvar __superlative_suffixes: Suffixes to be deleted. :type __superlative_suffixes: tuple :cvar __derivational_suffixes: Suffixes to be deleted. :type __derivational_suffixes: tuple :note: A detailed description of the Russian stemming algorithm can be found under http://snowball.tartarus.org/algorithms/russian/stemmer.html """ __perfective_gerund_suffixes = ("ivshis'", "yvshis'", "vshis'", "ivshi", "yvshi", "vshi", "iv", "yv", "v") __adjectival_suffixes = ('ui^ushchi^ui^u', 'ui^ushchi^ai^a', 'ui^ushchimi', 'ui^ushchymi', 'ui^ushchego', 'ui^ushchogo', 'ui^ushchemu', 'ui^ushchomu', 'ui^ushchikh', 'ui^ushchykh', 'ui^ushchui^u', 'ui^ushchaia', 'ui^ushchoi^u', 'ui^ushchei^u', 'i^ushchi^ui^u', 'i^ushchi^ai^a', 'ui^ushchee', 'ui^ushchie', 'ui^ushchye', 'ui^ushchoe', 'ui^ushchei`', 'ui^ushchii`', 'ui^ushchyi`', 'ui^ushchoi`', 'ui^ushchem', 'ui^ushchim', 'ui^ushchym', 'ui^ushchom', 'i^ushchimi', 'i^ushchymi', 'i^ushchego', 'i^ushchogo', 'i^ushchemu', 'i^ushchomu', 'i^ushchikh', 'i^ushchykh', 'i^ushchui^u', 'i^ushchai^a', 'i^ushchoi^u', 'i^ushchei^u', 'i^ushchee', 'i^ushchie', 'i^ushchye', 'i^ushchoe', 'i^ushchei`', 'i^ushchii`', 'i^ushchyi`', 'i^ushchoi`', 'i^ushchem', 'i^ushchim', 'i^ushchym', 'i^ushchom', 'shchi^ui^u', 'shchi^ai^a', 'ivshi^ui^u', 'ivshi^ai^a', 'yvshi^ui^u', 'yvshi^ai^a', 'shchimi', 'shchymi', 'shchego', 'shchogo', 'shchemu', 'shchomu', 'shchikh', 'shchykh', 'shchui^u', 'shchai^a', 'shchoi^u', 'shchei^u', 'ivshimi', 'ivshymi', 'ivshego', 'ivshogo', 'ivshemu', 'ivshomu', 'ivshikh', 'ivshykh', 'ivshui^u', 'ivshai^a', 'ivshoi^u', 'ivshei^u', 'yvshimi', 'yvshymi', 'yvshego', 'yvshogo', 'yvshemu', 'yvshomu', 'yvshikh', 'yvshykh', 'yvshui^u', 'yvshai^a', 'yvshoi^u', 'yvshei^u', 'vshi^ui^u', 'vshi^ai^a', 'shchee', 'shchie', 'shchye', 'shchoe', 'shchei`', 'shchii`', 'shchyi`', 'shchoi`', 'shchem', 'shchim', 'shchym', 'shchom', 'ivshee', 'ivshie', 'ivshye', 'ivshoe', 'ivshei`', 'ivshii`', 'ivshyi`', 'ivshoi`', 'ivshem', 'ivshim', 'ivshym', 'ivshom', 'yvshee', 'yvshie', 'yvshye', 'yvshoe', 'yvshei`', 'yvshii`', 'yvshyi`', 'yvshoi`', 'yvshem', 'yvshim', 'yvshym', 'yvshom', 'vshimi', 'vshymi', 'vshego', 'vshogo', 'vshemu', 'vshomu', 'vshikh', 'vshykh', 'vshui^u', 'vshai^a', 'vshoi^u', 'vshei^u', 'emi^ui^u', 'emi^ai^a', 'nni^ui^u', 'nni^ai^a', 'vshee', 'vshie', 'vshye', 'vshoe', 'vshei`', 'vshii`', 'vshyi`', 'vshoi`', 'vshem', 'vshim', 'vshym', 'vshom', 'emimi', 'emymi', 'emego', 'emogo', 'ememu', 'emomu', 'emikh', 'emykh', 'emui^u', 'emai^a', 'emoi^u', 'emei^u', 'nnimi', 'nnymi', 'nnego', 'nnogo', 'nnemu', 'nnomu', 'nnikh', 'nnykh', 'nnui^u', 'nnai^a', 'nnoi^u', 'nnei^u', 'emee', 'emie', 'emye', 'emoe', 'emei`', 'emii`', 'emyi`', 'emoi`', 'emem', 'emim', 'emym', 'emom', 'nnee', 'nnie', 'nnye', 'nnoe', 'nnei`', 'nnii`', 'nnyi`', 'nnoi`', 'nnem', 'nnim', 'nnym', 'nnom', 'i^ui^u', 'i^ai^a', 'imi', 'ymi', 'ego', 'ogo', 'emu', 'omu', 'ikh', 'ykh', 'ui^u', 'ai^a', 'oi^u', 'ei^u', 'ee', 'ie', 'ye', 'oe', 'ei`', 'ii`', 'yi`', 'oi`', 'em', 'im', 'ym', 'om') __reflexive_suffixes = ("si^a", "s'") __verb_suffixes = ("esh'", 'ei`te', 'ui`te', 'ui^ut', "ish'", 'ete', 'i`te', 'i^ut', 'nno', 'ila', 'yla', 'ena', 'ite', 'ili', 'yli', 'ilo', 'ylo', 'eno', 'i^at', 'uet', 'eny', "it'", "yt'", 'ui^u', 'la', 'na', 'li', 'em', 'lo', 'no', 'et', 'ny', "t'", 'ei`', 'ui`', 'il', 'yl', 'im', 'ym', 'en', 'it', 'yt', 'i^u', 'i`', 'l', 'n') __noun_suffixes = ('ii^ami', 'ii^akh', 'i^ami', 'ii^am', 'i^akh', 'ami', 'iei`', 'i^am', 'iem', 'akh', 'ii^u', "'i^u", 'ii^a', "'i^a", 'ev', 'ov', 'ie', "'e", 'ei', 'ii', 'ei`', 'oi`', 'ii`', 'em', 'am', 'om', 'i^u', 'i^a', 'a', 'e', 'i', 'i`', 'o', 'u', 'y', "'") __superlative_suffixes = ("ei`she", "ei`sh") __derivational_suffixes = ("ost'", "ost") def stem(self, word): """ Stem a Russian word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ chr_exceeded = False for i in range(len(word)): if ord(word[i]) > 255: chr_exceeded = True break if chr_exceeded: word = self.__cyrillic_to_roman(word) step1_success = False adjectival_removed = False verb_removed = False undouble_success = False superlative_removed = False rv, r2 = self.__regions_russian(word) # Step 1 for suffix in self.__perfective_gerund_suffixes: if rv.endswith(suffix): if suffix in ("v", "vshi", "vshis'"): if (rv[-len(suffix)-3:-len(suffix)] == "i^a" or rv[-len(suffix)-1:-len(suffix)] == "a"): word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] step1_success = True break else: word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] step1_success = True break if not step1_success: for suffix in self.__reflexive_suffixes: if rv.endswith(suffix): word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] break for suffix in self.__adjectival_suffixes: if rv.endswith(suffix): if suffix in ('i^ushchi^ui^u', 'i^ushchi^ai^a', 'i^ushchui^u', 'i^ushchai^a', 'i^ushchoi^u', 'i^ushchei^u', 'i^ushchimi', 'i^ushchymi', 'i^ushchego', 'i^ushchogo', 'i^ushchemu', 'i^ushchomu', 'i^ushchikh', 'i^ushchykh', 'shchi^ui^u', 'shchi^ai^a', 'i^ushchee', 'i^ushchie', 'i^ushchye', 'i^ushchoe', 'i^ushchei`', 'i^ushchii`', 'i^ushchyi`', 'i^ushchoi`', 'i^ushchem', 'i^ushchim', 'i^ushchym', 'i^ushchom', 'vshi^ui^u', 'vshi^ai^a', 'shchui^u', 'shchai^a', 'shchoi^u', 'shchei^u', 'emi^ui^u', 'emi^ai^a', 'nni^ui^u', 'nni^ai^a', 'shchimi', 'shchymi', 'shchego', 'shchogo', 'shchemu', 'shchomu', 'shchikh', 'shchykh', 'vshui^u', 'vshai^a', 'vshoi^u', 'vshei^u', 'shchee', 'shchie', 'shchye', 'shchoe', 'shchei`', 'shchii`', 'shchyi`', 'shchoi`', 'shchem', 'shchim', 'shchym', 'shchom', 'vshimi', 'vshymi', 'vshego', 'vshogo', 'vshemu', 'vshomu', 'vshikh', 'vshykh', 'emui^u', 'emai^a', 'emoi^u', 'emei^u', 'nnui^u', 'nnai^a', 'nnoi^u', 'nnei^u', 'vshee', 'vshie', 'vshye', 'vshoe', 'vshei`', 'vshii`', 'vshyi`', 'vshoi`', 'vshem', 'vshim', 'vshym', 'vshom', 'emimi', 'emymi', 'emego', 'emogo', 'ememu', 'emomu', 'emikh', 'emykh', 'nnimi', 'nnymi', 'nnego', 'nnogo', 'nnemu', 'nnomu', 'nnikh', 'nnykh', 'emee', 'emie', 'emye', 'emoe', 'emei`', 'emii`', 'emyi`', 'emoi`', 'emem', 'emim', 'emym', 'emom', 'nnee', 'nnie', 'nnye', 'nnoe', 'nnei`', 'nnii`', 'nnyi`', 'nnoi`', 'nnem', 'nnim', 'nnym', 'nnom'): if (rv[-len(suffix)-3:-len(suffix)] == "i^a" or rv[-len(suffix)-1:-len(suffix)] == "a"): word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] adjectival_removed = True break else: word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] adjectival_removed = True break if not adjectival_removed: for suffix in self.__verb_suffixes: if rv.endswith(suffix): if suffix in ("la", "na", "ete", "i`te", "li", "i`", "l", "em", "n", "lo", "no", "et", "i^ut", "ny", "t'", "esh'", "nno"): if (rv[-len(suffix)-3:-len(suffix)] == "i^a" or rv[-len(suffix)-1:-len(suffix)] == "a"): word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] verb_removed = True break else: word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] verb_removed = True break if not adjectival_removed and not verb_removed: for suffix in self.__noun_suffixes: if rv.endswith(suffix): word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] break # Step 2 if rv.endswith("i"): word = word[:-1] r2 = r2[:-1] # Step 3 for suffix in self.__derivational_suffixes: if r2.endswith(suffix): word = word[:-len(suffix)] break # Step 4 if word.endswith("nn"): word = word[:-1] undouble_success = True if not undouble_success: for suffix in self.__superlative_suffixes: if word.endswith(suffix): word = word[:-len(suffix)] superlative_removed = True break if word.endswith("nn"): word = word[:-1] if not undouble_success and not superlative_removed: if word.endswith("'"): word = word[:-1] if chr_exceeded: word = self.__roman_to_cyrillic(word) return word def __regions_russian(self, word): """ Return the regions RV and R2 which are used by the Russian stemmer. In any word, RV is the region after the first vowel, or the end of the word if it contains no vowel. R2 is the region after the first non-vowel following a vowel in R1, or the end of the word if there is no such non-vowel. R1 is the region after the first non-vowel following a vowel, or the end of the word if there is no such non-vowel. :param word: The Russian word whose regions RV and R2 are determined. :type word: str or unicode :return: the regions RV and R2 for the respective Russian word. :rtype: tuple :note: This helper method is invoked by the stem method of the subclass RussianStemmer. It is not to be invoked directly! """ r1 = "" r2 = "" rv = "" vowels = ("A", "U", "E", "a", "e", "i", "o", "u", "y") word = (word.replace("i^a", "A") .replace("i^u", "U") .replace("e`", "E")) for i in range(1, len(word)): if word[i] not in vowels and word[i-1] in vowels: r1 = word[i+1:] break for i in range(1, len(r1)): if r1[i] not in vowels and r1[i-1] in vowels: r2 = r1[i+1:] break for i in range(len(word)): if word[i] in vowels: rv = word[i+1:] break r2 = (r2.replace("A", "i^a") .replace("U", "i^u") .replace("E", "e`")) rv = (rv.replace("A", "i^a") .replace("U", "i^u") .replace("E", "e`")) return (rv, r2) def __cyrillic_to_roman(self, word): """ Transliterate a Russian word into the Roman alphabet. A Russian word whose letters consist of the Cyrillic alphabet are transliterated into the Roman alphabet in order to ease the forthcoming stemming process. :param word: The word that is transliterated. :type word: unicode :return: the transliterated word. :rtype: unicode :note: This helper method is invoked by the stem method of the subclass RussianStemmer. It is not to be invoked directly! """ word = (word.replace("\u0410", "a").replace("\u0430", "a") .replace("\u0411", "b").replace("\u0431", "b") .replace("\u0412", "v").replace("\u0432", "v") .replace("\u0413", "g").replace("\u0433", "g") .replace("\u0414", "d").replace("\u0434", "d") .replace("\u0415", "e").replace("\u0435", "e") .replace("\u0401", "e").replace("\u0451", "e") .replace("\u0416", "zh").replace("\u0436", "zh") .replace("\u0417", "z").replace("\u0437", "z") .replace("\u0418", "i").replace("\u0438", "i") .replace("\u0419", "i`").replace("\u0439", "i`") .replace("\u041A", "k").replace("\u043A", "k") .replace("\u041B", "l").replace("\u043B", "l") .replace("\u041C", "m").replace("\u043C", "m") .replace("\u041D", "n").replace("\u043D", "n") .replace("\u041E", "o").replace("\u043E", "o") .replace("\u041F", "p").replace("\u043F", "p") .replace("\u0420", "r").replace("\u0440", "r") .replace("\u0421", "s").replace("\u0441", "s") .replace("\u0422", "t").replace("\u0442", "t") .replace("\u0423", "u").replace("\u0443", "u") .replace("\u0424", "f").replace("\u0444", "f") .replace("\u0425", "kh").replace("\u0445", "kh") .replace("\u0426", "t^s").replace("\u0446", "t^s") .replace("\u0427", "ch").replace("\u0447", "ch") .replace("\u0428", "sh").replace("\u0448", "sh") .replace("\u0429", "shch").replace("\u0449", "shch") .replace("\u042A", "''").replace("\u044A", "''") .replace("\u042B", "y").replace("\u044B", "y") .replace("\u042C", "'").replace("\u044C", "'") .replace("\u042D", "e`").replace("\u044D", "e`") .replace("\u042E", "i^u").replace("\u044E", "i^u") .replace("\u042F", "i^a").replace("\u044F", "i^a")) return word def __roman_to_cyrillic(self, word): """ Transliterate a Russian word back into the Cyrillic alphabet. A Russian word formerly transliterated into the Roman alphabet in order to ease the stemming process, is transliterated back into the Cyrillic alphabet, its original form. :param word: The word that is transliterated. :type word: str or unicode :return: word, the transliterated word. :rtype: unicode :note: This helper method is invoked by the stem method of the subclass RussianStemmer. It is not to be invoked directly! """ word = (word.replace("i^u", "\u044E").replace("i^a", "\u044F") .replace("shch", "\u0449").replace("kh", "\u0445") .replace("t^s", "\u0446").replace("ch", "\u0447") .replace("e`", "\u044D").replace("i`", "\u0439") .replace("sh", "\u0448").replace("k", "\u043A") .replace("e", "\u0435").replace("zh", "\u0436") .replace("a", "\u0430").replace("b", "\u0431") .replace("v", "\u0432").replace("g", "\u0433") .replace("d", "\u0434").replace("e", "\u0435") .replace("z", "\u0437").replace("i", "\u0438") .replace("l", "\u043B").replace("m", "\u043C") .replace("n", "\u043D").replace("o", "\u043E") .replace("p", "\u043F").replace("r", "\u0440") .replace("s", "\u0441").replace("t", "\u0442") .replace("u", "\u0443").replace("f", "\u0444") .replace("''", "\u044A").replace("y", "\u044B") .replace("'", "\u044C")) return word class SpanishStemmer(_StandardStemmer): """ The Spanish Snowball stemmer. :cvar __vowels: The Spanish vowels. :type __vowels: unicode :cvar __step0_suffixes: Suffixes to be deleted in step 0 of the algorithm. :type __step0_suffixes: tuple :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: tuple :cvar __step2a_suffixes: Suffixes to be deleted in step 2a of the algorithm. :type __step2a_suffixes: tuple :cvar __step2b_suffixes: Suffixes to be deleted in step 2b of the algorithm. :type __step2b_suffixes: tuple :cvar __step3_suffixes: Suffixes to be deleted in step 3 of the algorithm. :type __step3_suffixes: tuple :note: A detailed description of the Spanish stemming algorithm can be found under http://snowball.tartarus.org/algorithms/spanish/stemmer.html """ __vowels = "aeiou\xE1\xE9\xED\xF3\xFA\xFC" __step0_suffixes = ("selas", "selos", "sela", "selo", "las", "les", "los", "nos", "me", "se", "la", "le", "lo") __step1_suffixes = ('amientos', 'imientos', 'amiento', 'imiento', 'aciones', 'uciones', 'adoras', 'adores', 'ancias', 'log\xEDas', 'encias', 'amente', 'idades', 'anzas', 'ismos', 'ables', 'ibles', 'istas', 'adora', 'aci\xF3n', 'antes', 'ancia', 'log\xEDa', 'uci\xf3n', 'encia', 'mente', 'anza', 'icos', 'icas', 'ismo', 'able', 'ible', 'ista', 'osos', 'osas', 'ador', 'ante', 'idad', 'ivas', 'ivos', 'ico', 'ica', 'oso', 'osa', 'iva', 'ivo') __step2a_suffixes = ('yeron', 'yendo', 'yamos', 'yais', 'yan', 'yen', 'yas', 'yes', 'ya', 'ye', 'yo', 'y\xF3') __step2b_suffixes = ('ar\xEDamos', 'er\xEDamos', 'ir\xEDamos', 'i\xE9ramos', 'i\xE9semos', 'ar\xEDais', 'aremos', 'er\xEDais', 'eremos', 'ir\xEDais', 'iremos', 'ierais', 'ieseis', 'asteis', 'isteis', '\xE1bamos', '\xE1ramos', '\xE1semos', 'ar\xEDan', 'ar\xEDas', 'ar\xE9is', 'er\xEDan', 'er\xEDas', 'er\xE9is', 'ir\xEDan', 'ir\xEDas', 'ir\xE9is', 'ieran', 'iesen', 'ieron', 'iendo', 'ieras', 'ieses', 'abais', 'arais', 'aseis', '\xE9amos', 'ar\xE1n', 'ar\xE1s', 'ar\xEDa', 'er\xE1n', 'er\xE1s', 'er\xEDa', 'ir\xE1n', 'ir\xE1s', 'ir\xEDa', 'iera', 'iese', 'aste', 'iste', 'aban', 'aran', 'asen', 'aron', 'ando', 'abas', 'adas', 'idas', 'aras', 'ases', '\xEDais', 'ados', 'idos', 'amos', 'imos', 'emos', 'ar\xE1', 'ar\xE9', 'er\xE1', 'er\xE9', 'ir\xE1', 'ir\xE9', 'aba', 'ada', 'ida', 'ara', 'ase', '\xEDan', 'ado', 'ido', '\xEDas', '\xE1is', '\xE9is', '\xEDa', 'ad', 'ed', 'id', 'an', 'i\xF3', 'ar', 'er', 'ir', 'as', '\xEDs', 'en', 'es') __step3_suffixes = ("os", "a", "e", "o", "\xE1", "\xE9", "\xED", "\xF3") def stem(self, word): """ Stem a Spanish word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ word = word.lower() step1_success = False r1, r2 = self._r1r2_standard(word, self.__vowels) rv = self._rv_standard(word, self.__vowels) # STEP 0: Attached pronoun for suffix in self.__step0_suffixes: if word.endswith(suffix): if rv.endswith(suffix): if rv[:-len(suffix)].endswith(("i\xE9ndo", "\xE1ndo", "\xE1r", "\xE9r", "\xEDr")): word = (word[:-len(suffix)].replace("\xE1", "a") .replace("\xE9", "e") .replace("\xED", "i")) r1 = (r1[:-len(suffix)].replace("\xE1", "a") .replace("\xE9", "e") .replace("\xED", "i")) r2 = (r2[:-len(suffix)].replace("\xE1", "a") .replace("\xE9", "e") .replace("\xED", "i")) rv = (rv[:-len(suffix)].replace("\xE1", "a") .replace("\xE9", "e") .replace("\xED", "i")) elif rv[:-len(suffix)].endswith(("ando", "iendo", "ar", "er", "ir")): word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] elif (rv[:-len(suffix)].endswith("yendo") and word[:-len(suffix)].endswith("uyendo")): word = word[:-len(suffix)] r1 = r1[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] break # STEP 1: Standard suffix removal for suffix in self.__step1_suffixes: if word.endswith(suffix): if suffix == "amente" and r1.endswith(suffix): step1_success = True word = word[:-6] r2 = r2[:-6] rv = rv[:-6] if r2.endswith("iv"): word = word[:-2] r2 = r2[:-2] rv = rv[:-2] if r2.endswith("at"): word = word[:-2] rv = rv[:-2] elif r2.endswith(("os", "ic", "ad")): word = word[:-2] rv = rv[:-2] elif r2.endswith(suffix): step1_success = True if suffix in ("adora", "ador", "aci\xF3n", "adoras", "adores", "aciones", "ante", "antes", "ancia", "ancias"): word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] if r2.endswith("ic"): word = word[:-2] rv = rv[:-2] elif suffix in ("log\xEDa", "log\xEDas"): word = word.replace(suffix, "log") rv = rv.replace(suffix, "log") elif suffix in ("uci\xF3n", "uciones"): word = word.replace(suffix, "u") rv = rv.replace(suffix, "u") elif suffix in ("encia", "encias"): word = word.replace(suffix, "ente") rv = rv.replace(suffix, "ente") elif suffix == "mente": word = word[:-5] r2 = r2[:-5] rv = rv[:-5] if r2.endswith(("ante", "able", "ible")): word = word[:-4] rv = rv[:-4] elif suffix in ("idad", "idades"): word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] for pre_suff in ("abil", "ic", "iv"): if r2.endswith(pre_suff): word = word[:-len(pre_suff)] rv = rv[:-len(pre_suff)] elif suffix in ("ivo", "iva", "ivos", "ivas"): word = word[:-len(suffix)] r2 = r2[:-len(suffix)] rv = rv[:-len(suffix)] if r2.endswith("at"): word = word[:-2] rv = rv[:-2] else: word = word[:-len(suffix)] rv = rv[:-len(suffix)] break # STEP 2a: Verb suffixes beginning 'y' if not step1_success: for suffix in self.__step2a_suffixes: if (rv.endswith(suffix) and word[-len(suffix)-1:-len(suffix)] == "u"): word = word[:-len(suffix)] rv = rv[:-len(suffix)] break # STEP 2b: Other verb suffixes for suffix in self.__step2b_suffixes: if rv.endswith(suffix): if suffix in ("en", "es", "\xE9is", "emos"): word = word[:-len(suffix)] rv = rv[:-len(suffix)] if word.endswith("gu"): word = word[:-1] if rv.endswith("gu"): rv = rv[:-1] else: word = word[:-len(suffix)] rv = rv[:-len(suffix)] break # STEP 3: Residual suffix for suffix in self.__step3_suffixes: if rv.endswith(suffix): if suffix in ("e", "\xE9"): word = word[:-len(suffix)] rv = rv[:-len(suffix)] if word[-2:] == "gu" and rv[-1] == "u": word = word[:-1] else: word = word[:-len(suffix)] break word = (word.replace("\xE1", "a").replace("\xE9", "e") .replace("\xED", "i").replace("\xF3", "o") .replace("\xFA", "u")) return word class SwedishStemmer(_ScandinavianStemmer): """ The Swedish Snowball stemmer. :cvar __vowels: The Swedish vowels. :type __vowels: unicode :cvar __s_ending: Letters that may directly appear before a word final 's'. :type __s_ending: unicode :cvar __step1_suffixes: Suffixes to be deleted in step 1 of the algorithm. :type __step1_suffixes: tuple :cvar __step2_suffixes: Suffixes to be deleted in step 2 of the algorithm. :type __step2_suffixes: tuple :cvar __step3_suffixes: Suffixes to be deleted in step 3 of the algorithm. :type __step3_suffixes: tuple :note: A detailed description of the Swedish stemming algorithm can be found under http://snowball.tartarus.org/algorithms/swedish/stemmer.html """ __vowels = "aeiouy\xE4\xE5\xF6" __s_ending = "bcdfghjklmnoprtvy" __step1_suffixes = ("heterna", "hetens", "heter", "heten", "anden", "arnas", "ernas", "ornas", "andes", "andet", "arens", "arna", "erna", "orna", "ande", "arne", "aste", "aren", "ades", "erns", "ade", "are", "ern", "ens", "het", "ast", "ad", "en", "ar", "er", "or", "as", "es", "at", "a", "e", "s") __step2_suffixes = ("dd", "gd", "nn", "dt", "gt", "kt", "tt") __step3_suffixes = ("fullt", "l\xF6st", "els", "lig", "ig") def stem(self, word): """ Stem a Swedish word and return the stemmed form. :param word: The word that is stemmed. :type word: str or unicode :return: The stemmed form. :rtype: unicode """ word = word.lower() r1 = self._r1_scandinavian(word, self.__vowels) # STEP 1 for suffix in self.__step1_suffixes: if r1.endswith(suffix): if suffix == "s": if word[-2] in self.__s_ending: word = word[:-1] r1 = r1[:-1] else: word = word[:-len(suffix)] r1 = r1[:-len(suffix)] break # STEP 2 for suffix in self.__step2_suffixes: if r1.endswith(suffix): word = word[:-1] r1 = r1[:-1] break # STEP 3 for suffix in self.__step3_suffixes: if r1.endswith(suffix): if suffix in ("els", "lig", "ig"): word = word[:-len(suffix)] elif suffix in ("fullt", "l\xF6st"): word = word[:-1] break return word class PolishStemmer(_LanguageSpecificStemmer): """ The Polish stemmer, implemented based on python stemmer for Polish language available at: https://github.com/Tutanchamon/pl_stemmer """ def stem(self, word): word = word.lower() stem = word[:] stem = self.remove_nouns(stem) stem = self.remove_diminutive(stem) stem = self.remove_adjective_ends(stem) stem = self.remove_verbs_ends(stem) stem = self.remove_adverbs_ends(stem) stem = self.remove_plural_forms(stem) stem = self.remove_general_ends(stem) return stem @staticmethod def remove_general_ends(word): # print "DEBUG: END", word[-1:] if len(word) > 4 and word[-2:] in {"ia", "ie"}: return word[:-2] if len(word) > 4 and word[-1:] in {"u", u"ą", "i", "a", u"ę", "y", u"ę", u"ł"}: return word[:-1] return word @staticmethod def remove_diminutive(word): if len(word) > 6: if word[-5:] in {"eczek", "iczek", "iszek", "aszek", "uszek"}: return word[:-5] if word[-4:] in {"enek", "ejek", "erek"}: return word[:-2] if len(word) > 4: if word[-2:] in {"ek", "ak"}: return word[:-2] return word @staticmethod def remove_verbs_ends(word): if len(word) > 5 and word.endswith("bym"): return word[:-3] if len(word) > 5 and word[-3:] in {"esz", "asz", "cie", u"eść", u"aść", u"łem", "amy", "emy"}: return word[:-3] if len(word) > 3 and word[-3:] in {"esz", "asz", u"eść", u"aść", u"eć", u"ać"}: return word[:-2] if len(word) > 3 and word[-3:] in {"aj"}: return word[:-1] if len(word) > 3 and word[-2:] in {u"ać", "em", "am", u"ał", u"ił", u"ić", u"ąc"}: return word[:-2] return word @staticmethod def remove_nouns(word): if len(word) > 7 and word[-5:] in {"zacja", u"zacją", "zacji"}: return word[:-4] if len(word) > 6 and word[-4:] in {"acja", "acji", u"acją", "tach", "anie", "enie", "eniu", "aniu"}: return word[:-4] if len(word) > 6 and word.endswith("tyka"): return word[:-2] if len(word) > 5 and word[-3:] in {"ach", "ami", "nia", "niu", "cia", "ciu"}: return word[:-3] if len(word) > 5 and word[-3:] in {"cji", "cja", u"cją"}: return word[:-2] if len(word) > 5 and word[-2:] in {"ce", "ta"}: return word[:-2] return word @staticmethod def remove_adjective_ends(word): if len(word) > 7 and word.startswith("naj") and (word.endswith("sze") or word.endswith("szy")): return word[3:-3] if len(word) > 7 and word.startswith("naj") and word.endswith("szych"): return word[3:-5] if len(word) > 6 and word.endswith("czny"): return word[:-4] if len(word) > 5 and word[-3:] in {"owy", "owa", "owe", "ych", "ego"}: return word[:-3] if len(word) > 5 and word[-2:] in {"ej"}: return word[:-2] return word @staticmethod def remove_adverbs_ends(word): if len(word) > 4 and word[:-3] in {"nie", "wie"}: return word[:-2] if len(word) > 4 and word.endswith("rze"): return word[:-2] return word @staticmethod def remove_plural_forms(word): if len(word) > 4 and (word.endswith(u"ów") or word.endswith("om")): return word[:-2] if len(word) > 4 and word.endswith("ami"): return word[:-3] return word class ArabicStemmer(_StandardStemmer, _LanguageSpecificStemmer): # Normalize_pre stes __vocalization = re.compile( r'[\u064b-\u064c-\u064d-\u064e-\u064f-\u0650-\u0651-\u0652]' ) __kasheeda = re.compile(r'[\u0640]') # ـ tatweel/kasheeda __arabic_punctuation_marks = re.compile(r'[\u060C-\u061B-\u061F]') # ؛ ، ؟ # Normalize_post __last_hamzat = ('\u0623', '\u0625', '\u0622', '\u0624', '\u0626') # أ، إ، آ، ؤ، ئ # normalize other hamza's __initial_hamzat = re.compile(r'^[\u0622\u0623\u0625]') # أ، إ، آ __waw_hamza = re.compile(r'[\u0624]') # ؤ __yeh_hamza = re.compile(r'[\u0626]') # ئ __alefat = re.compile(r'[\u0623\u0622\u0625]') # أ، إ، آ # Checks __checks1 = ( '\u0643\u0627\u0644', '\u0628\u0627\u0644', # بال، كال '\u0627\u0644', '\u0644\u0644', # لل، ال ) __checks2 = ('\u0629', '\u0627\u062a') # ة # female plural ات # Suffixes __suffix_noun_step1a = ( '\u064a', '\u0643', '\u0647', # ي، ك، ه '\u0646\u0627', '\u0643\u0645', '\u0647\u0627', '\u0647\u0646', '\u0647\u0645', # نا، كم، ها، هن، هم '\u0643\u0645\u0627', '\u0647\u0645\u0627', # كما، هما ) __suffix_noun_step1b = '\u0646' # ن __suffix_noun_step2a = ('\u0627', '\u064a', '\u0648') # ا، ي، و __suffix_noun_step2b = '\u0627\u062a' # ات __suffix_noun_step2c1 = '\u062a' # ت __suffix_noun_step2c2 = '\u0629' # ة __suffix_noun_step3 = '\u064a' # ي __suffix_verb_step1 = ( '\u0647', '\u0643', # ه، ك '\u0646\u064a', '\u0646\u0627', '\u0647\u0627', '\u0647\u0645', # ني، نا، ها، هم '\u0647\u0646', '\u0643\u0645', '\u0643\u0646', # هن، كم، كن '\u0647\u0645\u0627', '\u0643\u0645\u0627', '\u0643\u0645\u0648', # هما، كما، كمو ) __suffix_verb_step2a = ( '\u062a', '\u0627', '\u0646', '\u064a', # ت، ا، ن، ي '\u0646\u0627', '\u062a\u0627', '\u062a\u0646', # نا، تا، تن Past '\u0627\u0646', '\u0648\u0646', '\u064a\u0646', # ان، هن، ين Present '\u062a\u0645\u0627', # تما ) __suffix_verb_step2b = ('\u0648\u0627', '\u062a\u0645') # وا، تم __suffix_verb_step2c = ('\u0648', '\u062a\u0645\u0648') # و # تمو __suffix_all_alef_maqsura = '\u0649' # ى # Prefixes __prefix_step1 = ( '\u0623', # أ '\u0623\u0623', '\u0623\u0622', '\u0623\u0624', '\u0623\u0627', '\u0623\u0625', # أأ، أآ، أؤ، أا، أإ ) __prefix_step2a = ('\u0641\u0627\u0644', '\u0648\u0627\u0644') # فال، وال __prefix_step2b = ('\u0641', '\u0648') # ف، و __prefix_step3a_noun = ( '\u0627\u0644', '\u0644\u0644', # لل، ال '\u0643\u0627\u0644', '\u0628\u0627\u0644', # بال، كال ) __prefix_step3b_noun = ( '\u0628', '\u0643', '\u0644', # ب، ك، ل '\u0628\u0628', '\u0643\u0643', # بب، كك ) __prefix_step3_verb = ( '\u0633\u064a', '\u0633\u062a', '\u0633\u0646', '\u0633\u0623', ) # سي، ست، سن، سأ __prefix_step4_verb = ( '\u064a\u0633\u062a', '\u0646\u0633\u062a', '\u062a\u0633\u062a', ) # يست، نست، تست # Suffixes added due to Conjugation Verbs __conjugation_suffix_verb_1 = ('\u0647', '\u0643') # ه، ك __conjugation_suffix_verb_2 = ( '\u0646\u064a', '\u0646\u0627', '\u0647\u0627', # ني، نا، ها '\u0647\u0645', '\u0647\u0646', '\u0643\u0645', # هم، هن، كم '\u0643\u0646', # كن ) __conjugation_suffix_verb_3 = ( '\u0647\u0645\u0627', '\u0643\u0645\u0627', '\u0643\u0645\u0648', ) # هما، كما، كمو __conjugation_suffix_verb_4 = ('\u0627', '\u0646', '\u064a') # ا، ن، ي __conjugation_suffix_verb_past = ( '\u0646\u0627', '\u062a\u0627', '\u062a\u0646', ) # نا، تا، تن __conjugation_suffix_verb_present = ( '\u0627\u0646', '\u0648\u0646', '\u064a\u0646', ) # ان، ون، ين # Suffixes added due to derivation Names __conjugation_suffix_noun_1 = ('\u064a', '\u0643', '\u0647') # ي، ك، ه __conjugation_suffix_noun_2 = ( '\u0646\u0627', '\u0643\u0645', # نا، كم '\u0647\u0627', '\u0647\u0646', '\u0647\u0645', # ها، هن، هم ) __conjugation_suffix_noun_3 = ( '\u0643\u0645\u0627', '\u0647\u0645\u0627', ) # كما، هما # Prefixes added due to derivation Names __prefixes1 = ('\u0648\u0627', '\u0641\u0627') # فا، وا __articles_3len = ('\u0643\u0627\u0644', '\u0628\u0627\u0644') # بال كال __articles_2len = ('\u0627\u0644', '\u0644\u0644') # ال لل # Prepositions letters __prepositions1 = ('\u0643', '\u0644') # ك، ل __prepositions2 = ('\u0628\u0628', '\u0643\u0643') # بب، كك is_verb = True is_noun = True is_defined = False suffixes_verb_step1_success = False suffix_verb_step2a_success = False suffix_verb_step2b_success = False suffix_noun_step2c2_success = False suffix_noun_step1a_success = False suffix_noun_step2a_success = False suffix_noun_step2b_success = False suffixe_noun_step1b_success = False prefix_step2a_success = False prefix_step3a_noun_success = False prefix_step3b_noun_success = False def __normalize_pre(self, token): """ :param token: string :return: normalized token type string """ # strip diacritics token = self.__vocalization.sub('', token) # strip kasheeda token = self.__kasheeda.sub('', token) # strip punctuation marks token = self.__arabic_punctuation_marks.sub('', token) return token def __normalize_post(self, token): # normalize last hamza for hamza in self.__last_hamzat: if token.endswith(hamza): token = suffix_replace(token, hamza, '\u0621') break # normalize other hamzat token = self.__initial_hamzat.sub('\u0627', token) token = self.__waw_hamza.sub('\u0648', token) token = self.__yeh_hamza.sub('\u064a', token) token = self.__alefat.sub('\u0627', token) return token def __checks_1(self, token): for prefix in self.__checks1: if token.startswith(prefix): if prefix in self.__articles_3len and len(token) > 4: self.is_noun = True self.is_verb = False self.is_defined = True break if prefix in self.__articles_2len and len(token) > 3: self.is_noun = True self.is_verb = False self.is_defined = True break def __checks_2(self, token): for suffix in self.__checks2: if token.endswith(suffix): if suffix == '\u0629' and len(token) > 2: self.is_noun = True self.is_verb = False break if suffix == '\u0627\u062a' and len(token) > 3: self.is_noun = True self.is_verb = False break def __Suffix_Verb_Step1(self, token): for suffix in self.__suffix_verb_step1: if token.endswith(suffix): if suffix in self.__conjugation_suffix_verb_1 and len(token) >= 4: token = token[:-1] self.suffixes_verb_step1_success = True break if suffix in self.__conjugation_suffix_verb_2 and len(token) >= 5: token = token[:-2] self.suffixes_verb_step1_success = True break if suffix in self.__conjugation_suffix_verb_3 and len(token) >= 6: token = token[:-3] self.suffixes_verb_step1_success = True break return token def __Suffix_Verb_Step2a(self, token): for suffix in self.__suffix_verb_step2a: if token.endswith(suffix) and len(token) > 3: if suffix == '\u062a' and len(token) >= 4: token = token[:-1] self.suffix_verb_step2a_success = True break if suffix in self.__conjugation_suffix_verb_4 and len(token) >= 4: token = token[:-1] self.suffix_verb_step2a_success = True break if suffix in self.__conjugation_suffix_verb_past and len(token) >= 5: token = token[:-2] # past self.suffix_verb_step2a_success = True break if suffix in self.__conjugation_suffix_verb_present and len(token) > 5: token = token[:-2] # present self.suffix_verb_step2a_success = True break if suffix == '\u062a\u0645\u0627' and len(token) >= 6: token = token[:-3] self.suffix_verb_step2a_success = True break return token def __Suffix_Verb_Step2c(self, token): for suffix in self.__suffix_verb_step2c: if token.endswith(suffix): if suffix == '\u062a\u0645\u0648' and len(token) >= 6: token = token[:-3] break if suffix == '\u0648' and len(token) >= 4: token = token[:-1] break return token def __Suffix_Verb_Step2b(self, token): for suffix in self.__suffix_verb_step2b: if token.endswith(suffix) and len(token) >= 5: token = token[:-2] self.suffix_verb_step2b_success = True break return token def __Suffix_Noun_Step2c2(self, token): for suffix in self.__suffix_noun_step2c2: if token.endswith(suffix) and len(token) >= 3: token = token[:-1] self.suffix_noun_step2c2_success = True break return token def __Suffix_Noun_Step1a(self, token): for suffix in self.__suffix_noun_step1a: if token.endswith(suffix): if suffix in self.__conjugation_suffix_noun_1 and len(token) >= 4: token = token[:-1] self.suffix_noun_step1a_success = True break if suffix in self.__conjugation_suffix_noun_2 and len(token) >= 5: token = token[:-2] self.suffix_noun_step1a_success = True break if suffix in self.__conjugation_suffix_noun_3 and len(token) >= 6: token = token[:-3] self.suffix_noun_step1a_success = True break return token def __Suffix_Noun_Step2a(self, token): for suffix in self.__suffix_noun_step2a: if token.endswith(suffix) and len(token) > 4: token = token[:-1] self.suffix_noun_step2a_success = True break return token def __Suffix_Noun_Step2b(self, token): for suffix in self.__suffix_noun_step2b: if token.endswith(suffix) and len(token) >= 5: token = token[:-2] self.suffix_noun_step2b_success = True break return token def __Suffix_Noun_Step2c1(self, token): for suffix in self.__suffix_noun_step2c1: if token.endswith(suffix) and len(token) >= 4: token = token[:-1] break return token def __Suffix_Noun_Step1b(self, token): for suffix in self.__suffix_noun_step1b: if token.endswith(suffix) and len(token) > 5: token = token[:-1] self.suffixe_noun_step1b_success = True break return token def __Suffix_Noun_Step3(self, token): for suffix in self.__suffix_noun_step3: if token.endswith(suffix) and len(token) >= 3: token = token[:-1] # ya' nisbiya break return token def __Suffix_All_alef_maqsura(self, token): for suffix in self.__suffix_all_alef_maqsura: if token.endswith(suffix): token = suffix_replace(token, suffix, '\u064a') return token def __Prefix_Step1(self, token): for prefix in self.__prefix_step1: if token.startswith(prefix) and len(token) > 3: if prefix == '\u0623\u0623': token = prefix_replace(token, prefix, '\u0623') break elif prefix == '\u0623\u0622': token = prefix_replace(token, prefix, '\u0622') break elif prefix == '\u0623\u0624': token = prefix_replace(token, prefix, '\u0624') break elif prefix == '\u0623\u0627': token = prefix_replace(token, prefix, '\u0627') break elif prefix == '\u0623\u0625': token = prefix_replace(token, prefix, '\u0625') break return token def __Prefix_Step2a(self, token): for prefix in self.__prefix_step2a: if token.startswith(prefix) and len(token) > 5: token = token[len(prefix) :] self.prefix_step2a_success = True break return token def __Prefix_Step2b(self, token): for prefix in self.__prefix_step2b: if token.startswith(prefix) and len(token) > 3: if token[:2] not in self.__prefixes1: token = token[len(prefix) :] break return token def __Prefix_Step3a_Noun(self, token): for prefix in self.__prefix_step3a_noun: if token.startswith(prefix): if prefix in self.__articles_2len and len(token) > 4: token = token[len(prefix) :] self.prefix_step3a_noun_success = True break if prefix in self.__articles_3len and len(token) > 5: token = token[len(prefix) :] break return token def __Prefix_Step3b_Noun(self, token): for prefix in self.__prefix_step3b_noun: if token.startswith(prefix): if len(token) > 3: if prefix == '\u0628': token = token[len(prefix) :] self.prefix_step3b_noun_success = True break if prefix in self.__prepositions2: token = prefix_replace(token, prefix, prefix[1]) self.prefix_step3b_noun_success = True break if prefix in self.__prepositions1 and len(token) > 4: token = token[len(prefix) :] # BUG: cause confusion self.prefix_step3b_noun_success = True break return token def __Prefix_Step3_Verb(self, token): for prefix in self.__prefix_step3_verb: if token.startswith(prefix) and len(token) > 4: token = prefix_replace(token, prefix, prefix[1]) break return token def __Prefix_Step4_Verb(self, token): for prefix in self.__prefix_step4_verb: if token.startswith(prefix) and len(token) > 4: token = prefix_replace(token, prefix, '\u0627\u0633\u062a') self.is_verb = True self.is_noun = False break return token def stem(self, word): """ Stem an Arabic word and return the stemmed form. :param word: string :return: string """ # set initial values self.is_verb = True self.is_noun = True self.is_defined = False self.suffix_verb_step2a_success = False self.suffix_verb_step2b_success = False self.suffix_noun_step2c2_success = False self.suffix_noun_step1a_success = False self.suffix_noun_step2a_success = False self.suffix_noun_step2b_success = False self.suffixe_noun_step1b_success = False self.prefix_step2a_success = False self.prefix_step3a_noun_success = False self.prefix_step3b_noun_success = False modified_word = word # guess type and properties # checks1 self.__checks_1(modified_word) # checks2 self.__checks_2(modified_word) # Pre_Normalization modified_word = self.__normalize_pre(modified_word) # Start stemming if self.is_verb: modified_word = self.__Suffix_Verb_Step1(modified_word) if self.suffixes_verb_step1_success: modified_word = self.__Suffix_Verb_Step2a(modified_word) if not self.suffix_verb_step2a_success: modified_word = self.__Suffix_Verb_Step2c(modified_word) # or next TODO: How to deal with or next instruction else: modified_word = self.__Suffix_Verb_Step2b(modified_word) if not self.suffix_verb_step2b_success: modified_word = self.__Suffix_Verb_Step2a(modified_word) if self.is_noun: modified_word = self.__Suffix_Noun_Step2c2(modified_word) if not self.suffix_noun_step2c2_success: if not self.is_defined: modified_word = self.__Suffix_Noun_Step1a(modified_word) # if self.suffix_noun_step1a_success: modified_word = self.__Suffix_Noun_Step2a(modified_word) if not self.suffix_noun_step2a_success: modified_word = self.__Suffix_Noun_Step2b(modified_word) if ( not self.suffix_noun_step2b_success and not self.suffix_noun_step2a_success ): modified_word = self.__Suffix_Noun_Step2c1(modified_word) # or next ? todo : how to deal with or next else: modified_word = self.__Suffix_Noun_Step1b(modified_word) if self.suffixe_noun_step1b_success: modified_word = self.__Suffix_Noun_Step2a(modified_word) if not self.suffix_noun_step2a_success: modified_word = self.__Suffix_Noun_Step2b(modified_word) if ( not self.suffix_noun_step2b_success and not self.suffix_noun_step2a_success ): modified_word = self.__Suffix_Noun_Step2c1(modified_word) else: if not self.is_defined: modified_word = self.__Suffix_Noun_Step2a(modified_word) modified_word = self.__Suffix_Noun_Step2b(modified_word) modified_word = self.__Suffix_Noun_Step3(modified_word) if not self.is_noun and self.is_verb: modified_word = self.__Suffix_All_alef_maqsura(modified_word) # prefixes modified_word = self.__Prefix_Step1(modified_word) modified_word = self.__Prefix_Step2a(modified_word) if not self.prefix_step2a_success: modified_word = self.__Prefix_Step2b(modified_word) modified_word = self.__Prefix_Step3a_Noun(modified_word) if not self.prefix_step3a_noun_success and self.is_noun: modified_word = self.__Prefix_Step3b_Noun(modified_word) else: if not self.prefix_step3b_noun_success and self.is_verb: modified_word = self.__Prefix_Step3_Verb(modified_word) modified_word = self.__Prefix_Step4_Verb(modified_word) # post normalization stemming modified_word = self.__normalize_post(modified_word) stemmed_word = modified_word return stemmed_word
mit
-7,996,408,616,791,845,000
37.813796
102
0.420733
false
pkill-nine/qutebrowser
tests/unit/config/test_config.py
1
16989
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 Florian Bruhin (The Compiler) <[email protected]> # This file is part of qutebrowser. # # qutebrowser 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. # # qutebrowser 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 qutebrowser. If not, see <http://www.gnu.org/licenses/>. """Tests for qutebrowser.config.config.""" import os import os.path import configparser import collections import shutil from PyQt5.QtGui import QColor import pytest import qutebrowser from qutebrowser.config import config, configexc, configdata from qutebrowser.config.parsers import keyconf from qutebrowser.commands import runners class TestConfigParser: """Test reading of ConfigParser.""" Objects = collections.namedtuple('Objects', ['cp', 'cfg']) @pytest.fixture def objects(self, tmpdir): cp = configparser.ConfigParser(interpolation=None, comment_prefixes='#') cp.optionxform = lambda opt: opt # be case-insensitive cfg = config.ConfigManager() cfg.read(str(tmpdir), 'qutebrowser.conf') return self.Objects(cp=cp, cfg=cfg) @pytest.mark.parametrize('config, section, option, value', [ # Simple option without transformation ({'general': {'ignore-case': 'false'}}, 'general', 'ignore-case', False), # Transformed section with old name ({'permissions': {'allow-plugins': 'true'}}, 'content', 'allow-plugins', True), # Transformed section with new name ({'content': {'allow-plugins': 'true'}}, 'content', 'allow-plugins', True), # Transformed option with old name ({'colors': {'tab.fg.odd': 'pink'}}, 'colors', 'tabs.fg.odd', QColor('pink')), # Transformed option with new name ({'colors': {'tabs.fg.odd': 'pink'}}, 'colors', 'tabs.fg.odd', QColor('pink')), ]) def test_get(self, objects, config, section, option, value): objects.cp.read_dict(config) objects.cfg._from_cp(objects.cp) assert objects.cfg.get(section, option) == value @pytest.mark.parametrize('config', [ {'general': {'ignore-case': 'invalid'}}, {'general': {'ignore-case': 'smart', 'private-browsing': '${ignore-case}'}}, ]) def test_failing_validation(self, objects, config): objects.cp.read_dict(config) objects.cfg._from_cp(objects.cp) with pytest.raises(configexc.ValidationError): objects.cfg._validate_all() @pytest.mark.parametrize('config, sect1, opt1, sect2, opt2', [ # Same section ({'general': {'ignore-case': 'false', 'private-browsing': '${ignore-case}'}}, 'general', 'ignore-case', 'general', 'private-browsing'), # Across sections ({'general': {'ignore-case': '${network:do-not-track}'}, 'network': {'do-not-track': 'false'}}, 'general', 'ignore-case', 'network', 'do-not-track'), ]) def test_interpolation(self, objects, config, sect1, opt1, sect2, opt2): objects.cp.read_dict(config) objects.cfg._from_cp(objects.cp) assert not objects.cfg.get(sect1, opt1) assert not objects.cfg.get(sect2, opt2) def test_invalid_interpolation(self, objects): """Test an invalid interpolation.""" objects.cp.read_dict({'general': {'ignore-case': '${foo}'}}) objects.cfg._from_cp(objects.cp) with pytest.raises(configparser.InterpolationError): objects.cfg._validate_all() @pytest.mark.parametrize('config, exception', [ # Invalid interpolation syntax ({'general': {'ignore-case': '${'}}, configexc.InterpolationSyntaxError), # Invalid section ({'foo': {'bar': 'baz'}}, configexc.NoSectionError), # Invalid option ({'general': {'bar': 'baz'}}, configexc.NoOptionError), ]) def test_invalid_from_cp(self, objects, config, exception): objects.cp.read_dict(config) with pytest.raises(exception): objects.cfg._from_cp(objects.cp) @pytest.mark.parametrize('config, sect, opt, exception', [ # Invalid section ({'foo': {'bar': 'baz'}}, 'foo', 'bar', configexc.NoSectionError), # Invalid option ({'general': {'bar': 'baz'}}, 'general', 'baz', configexc.NoOptionError), ]) def test_invalid_relaxed(self, objects, config, sect, opt, exception): objects.cp.read_dict(config) objects.cfg._from_cp(objects.cp, relaxed=True) with pytest.raises(exception): objects.cfg.get(sect, opt) def test_fallback(self, objects): """Test getting an option with fallback. This is done during interpolation in later Python 3.4 versions. See https://github.com/qutebrowser/qutebrowser/issues/968 """ assert objects.cfg.get('general', 'blabla', fallback='blub') == 'blub' def test_sectionproxy(self, objects): """Test getting an option via the section proxy.""" objects.cp.read_dict({'general': {'ignore-case': 'false'}}) objects.cfg._from_cp(objects.cp) assert not objects.cfg['general'].get('ignore-case') def test_sectionproxy_keyerror(self, objects): """Test getting an inexistent option via the section proxy.""" with pytest.raises(configexc.NoOptionError): objects.cfg['general'].get('blahblahblub') @pytest.mark.parametrize('old_sect, new_sect', config.ConfigManager.RENAMED_SECTIONS.items()) def test_renamed_sections(self, old_sect, new_sect): """Make sure renamed sections don't exist anymore.""" assert old_sect not in configdata.DATA assert new_sect in configdata.DATA @pytest.mark.parametrize('old_tuple, new_option', sorted(config.ConfigManager.RENAMED_OPTIONS.items())) def test_renamed_options(self, old_tuple, new_option): """Make sure renamed options exist under the new name.""" section, old_option = old_tuple assert old_option not in configdata.DATA[section] assert new_option in configdata.DATA[section] @pytest.mark.parametrize('section, option', config.ConfigManager.DELETED_OPTIONS) def test_deleted_options(self, section, option): """Make sure renamed options don't exist anymore.""" assert option not in configdata.DATA[section] def test_config_reading_with_deleted_options(self, objects): """Test an invalid option with relaxed=True.""" objects.cp.read_dict({ 'general': collections.OrderedDict( [('wrap-search', 'true'), ('save-session', 'true')]) }) objects.cfg._from_cp(objects.cp) with pytest.raises(configexc.NoOptionError): objects.cfg.get('general', 'wrap-search') assert objects.cfg.get('general', 'save-session') class TestTransformers: """Test value transformers in CHANGED_OPTIONS.""" @pytest.mark.parametrize('val, expected', [('a', 'b'), ('c', 'c')]) def test_get_value_transformer(self, val, expected): func = config._get_value_transformer({'a': 'b'}) assert func(val) == expected @pytest.mark.parametrize('val, expected', [ ('top', 'top'), ('north', 'top'), ('south', 'bottom'), ('west', 'left'), ('east', 'right'), ]) def test_position(self, val, expected): func = config._transform_position assert func(val) == expected OLD_GRADIENT = ('-webkit-gradient(linear, left top, left bottom, ' 'color-stop(0%,{}), color-stop(100%,{}))') NEW_GRADIENT = ('qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 {}, ' 'stop:1 {})') @pytest.mark.parametrize('val, expected', [ ('-unknown-stuff', None), ('blue', 'blue'), ('rgba(1, 2, 3, 4)', 'rgba(1, 2, 3, 4)'), ('-webkit-gradient(unknown)', None), (OLD_GRADIENT.format('blah', 'blah'), None), (OLD_GRADIENT.format('red', 'green'), NEW_GRADIENT.format('rgba(255, 0, 0, 0.8)', 'rgba(0, 128, 0, 0.8)')), (OLD_GRADIENT.format(' red', ' green'), NEW_GRADIENT.format('rgba(255, 0, 0, 0.8)', 'rgba(0, 128, 0, 0.8)')), (OLD_GRADIENT.format('#101010', ' #202020'), NEW_GRADIENT.format('rgba(16, 16, 16, 0.8)', 'rgba(32, 32, 32, 0.8)')), (OLD_GRADIENT.format('#666', ' #777'), NEW_GRADIENT.format('rgba(102, 102, 102, 0.8)', 'rgba(119, 119, 119, 0.8)')), (OLD_GRADIENT.format('red', 'green') + 'more stuff', None), ]) def test_hint_color(self, val, expected): assert config._transform_hint_color(val) == expected @pytest.mark.parametrize('val, expected', [ ('bold 12pt Monospace', 'bold 12pt ${_monospace}'), ('23pt Monospace', '23pt ${_monospace}'), ('bold 12pt ${_monospace}', 'bold 12pt ${_monospace}'), ('bold 12pt Comic Sans MS', 'bold 12pt Comic Sans MS'), ]) def test_hint_font(self, val, expected): assert config._transform_hint_font(val) == expected class TestKeyConfigParser: """Test config.parsers.keyconf.KeyConfigParser.""" def test_cmd_binding(self, cmdline_test, config_stub, tmpdir): """Test various command bindings. See https://github.com/qutebrowser/qutebrowser/issues/615 Args: cmdline_test: A pytest fixture which provides testcases. """ config_stub.data = {'aliases': []} kcp = keyconf.KeyConfigParser(str(tmpdir), 'keys.conf') kcp._cur_section = 'normal' if cmdline_test.valid: kcp._read_command(cmdline_test.cmd) else: with pytest.raises(keyconf.KeyConfigError): kcp._read_command(cmdline_test.cmd) @pytest.mark.parametrize('rgx', [rgx for rgx, _repl in configdata.CHANGED_KEY_COMMANDS]) def test_default_config_no_deprecated(self, rgx): """Make sure the default config contains no deprecated commands.""" for sect in configdata.KEY_DATA.values(): for command in sect: assert rgx.match(command) is None @pytest.mark.parametrize( 'old, new_expected', [ ('open -t about:blank', 'open -t'), ('open -w about:blank', 'open -w'), ('open -b about:blank', 'open -b'), ('open about:blank', None), ('open -t example.com', None), ('download-page', 'download'), ('cancel-download', 'download-cancel'), ('search ""', 'clear-keychain ;; search ;; fullscreen --leave'), ("search ''", 'clear-keychain ;; search ;; fullscreen --leave'), ("search", 'clear-keychain ;; search ;; fullscreen --leave'), ("search ;; foobar", None), ('search "foo"', None), ('set-cmd-text "foo bar"', 'set-cmd-text foo bar'), ("set-cmd-text 'foo bar'", 'set-cmd-text foo bar'), ('set-cmd-text foo bar', None), ('set-cmd-text "foo bar "', 'set-cmd-text -s foo bar'), ("set-cmd-text 'foo bar '", 'set-cmd-text -s foo bar'), ('hint links rapid', 'hint --rapid links tab-bg'), ('hint links rapid-win', 'hint --rapid links window'), ('scroll -50 0', 'scroll left'), ('scroll 0 50', 'scroll down'), ('scroll 0 -50', 'scroll up'), ('scroll 50 0', 'scroll right'), ('scroll -50 10', 'scroll-px -50 10'), ('scroll 50 50', 'scroll-px 50 50'), ('scroll 0 0', 'scroll-px 0 0'), ('scroll 23 42', 'scroll-px 23 42'), ('search ;; clear-keychain', 'clear-keychain ;; search ;; fullscreen --leave'), ('search;;clear-keychain', 'clear-keychain ;; search ;; fullscreen --leave'), ('search;;foo', None), ('clear-keychain ;; search', 'clear-keychain ;; search ;; fullscreen --leave'), ('leave-mode ;; foo', None), ('search ;; clear-keychain', 'clear-keychain ;; search ;; fullscreen --leave'), ('download-remove --all', 'download-clear'), ('hint links fill ":open {hint-url}"', 'hint links fill :open {hint-url}'), ('hint links fill ":open -t {hint-url}"', 'hint links fill :open -t {hint-url}'), ('yank-selected', 'yank selection'), ('yank-selected --sel', 'yank selection --sel'), ('yank-selected -p', 'yank selection -s'), ('yank -t', 'yank title'), ('yank -ts', 'yank title -s'), ('yank -d', 'yank domain'), ('yank -ds', 'yank domain -s'), ('yank -p', 'yank pretty-url'), ('yank -ps', 'yank pretty-url -s'), ('paste', 'open -- {clipboard}'), ('paste -s', 'open -- {primary}'), ('paste -t', 'open -t -- {clipboard}'), ('paste -ws', 'open -w -- {primary}'), ('open {clipboard}', 'open -- {clipboard}'), ('open -t {clipboard}', 'open -t -- {clipboard}'), ('open -b {primary}', 'open -b -- {primary}'), ('set-cmd-text -s :search', 'set-cmd-text /'), ('set-cmd-text -s :search -r', 'set-cmd-text ?'), ('set-cmd-text -s :', 'set-cmd-text :'), ('set-cmd-text -s :set keybind', 'set-cmd-text -s :bind'), ('prompt-yes', 'prompt-accept yes'), ('prompt-no', 'prompt-accept no'), ('tab-close -l', 'tab-close --prev'), ('tab-close --left', 'tab-close --prev'), ('tab-close -r', 'tab-close --next'), ('tab-close --right', 'tab-close --next'), ('tab-only -l', 'tab-only --prev'), ('tab-only --left', 'tab-only --prev'), ('tab-only -r', 'tab-only --next'), ('tab-only --right', 'tab-only --next'), ] ) def test_migrations(self, old, new_expected): """Make sure deprecated commands get migrated correctly.""" if new_expected is None: new_expected = old new = old for rgx, repl in configdata.CHANGED_KEY_COMMANDS: if rgx.match(new): new = rgx.sub(repl, new) break assert new == new_expected @pytest.mark.usefixtures('config_tmpdir') @pytest.mark.integration class TestDefaultConfig: """Test validating of the default config.""" @pytest.mark.usefixtures('qapp') def test_default_config(self, tmpdir): """Test validating of the default config.""" conf = config.ConfigManager() conf.read(str(tmpdir), 'qutebrowser.conf') conf._validate_all() def test_default_key_config(self, tmpdir): """Test validating of the default key config.""" # We import qutebrowser.app so the cmdutils.register decorators run. import qutebrowser.app # pylint: disable=unused-variable conf = keyconf.KeyConfigParser(str(tmpdir), 'keys.conf') runner = runners.CommandRunner(win_id=0) for sectname in configdata.KEY_DATA: for cmd in conf.get_bindings_for(sectname).values(): runner.parse(cmd) def test_upgrade_version(self): """Fail when the qutebrowser version changed. The aim of this is to remind us to add a new file to old_configs. If the config file of the current release didn't change compared to the last one in old_configs, just increment the version here. If it did change, place a new qutebrowser-vx.y.z.conf in old_configs and then increment the version. """ assert qutebrowser.__version__ == '0.11.0' @pytest.mark.parametrize('filename', os.listdir(os.path.join(os.path.dirname(__file__), 'old_configs')), ids=os.path.basename) def test_old_config(self, qapp, tmpdir, filename): """Check if upgrading old configs works correctly.""" full_path = os.path.join(os.path.dirname(__file__), 'old_configs', filename) shutil.copy(full_path, str(tmpdir / 'qutebrowser.conf')) conf = config.ConfigManager() conf.read(str(tmpdir), 'qutebrowser.conf')
gpl-3.0
7,556,874,685,535,554,000
39.258294
79
0.574666
false
jreback/pandas
pandas/conftest.py
1
37035
""" This file is very long and growing, but it was decided to not split it yet, as it's still manageable (2020-03-17, ~1.1k LoC). See gh-31989 Instead of splitting it was decided to define sections here: - Configuration / Settings - Autouse fixtures - Common arguments - Missing values & co. - Classes - Indices - Series' - DataFrames - Operators & Operations - Data sets/files - Time zones - Dtypes - Misc """ from collections import abc from datetime import date, time, timedelta, timezone from decimal import Decimal import operator import os from dateutil.tz import tzlocal, tzutc import hypothesis from hypothesis import strategies as st import numpy as np import pytest from pytz import FixedOffset, utc import pandas.util._test_decorators as td from pandas.core.dtypes.dtypes import DatetimeTZDtype, IntervalDtype import pandas as pd from pandas import DataFrame, Interval, Period, Series, Timedelta, Timestamp import pandas._testing as tm from pandas.core import ops from pandas.core.indexes.api import Index, MultiIndex # ---------------------------------------------------------------- # Configuration / Settings # ---------------------------------------------------------------- # pytest def pytest_configure(config): # Register marks to avoid warnings in pandas.test() # sync with setup.cfg config.addinivalue_line("markers", "single: mark a test as single cpu only") config.addinivalue_line("markers", "slow: mark a test as slow") config.addinivalue_line("markers", "network: mark a test as network") config.addinivalue_line( "markers", "db: tests requiring a database (mysql or postgres)" ) config.addinivalue_line("markers", "high_memory: mark a test as a high-memory only") config.addinivalue_line("markers", "clipboard: mark a pd.read_clipboard test") config.addinivalue_line( "markers", "arm_slow: mark a test as slow for arm64 architecture" ) def pytest_addoption(parser): parser.addoption("--skip-slow", action="store_true", help="skip slow tests") parser.addoption("--skip-network", action="store_true", help="skip network tests") parser.addoption("--skip-db", action="store_true", help="skip db tests") parser.addoption( "--run-high-memory", action="store_true", help="run high memory tests" ) parser.addoption("--only-slow", action="store_true", help="run only slow tests") parser.addoption( "--strict-data-files", action="store_true", help="Fail if a test is skipped for missing data file.", ) def pytest_runtest_setup(item): if "slow" in item.keywords and item.config.getoption("--skip-slow"): pytest.skip("skipping due to --skip-slow") if "slow" not in item.keywords and item.config.getoption("--only-slow"): pytest.skip("skipping due to --only-slow") if "network" in item.keywords and item.config.getoption("--skip-network"): pytest.skip("skipping due to --skip-network") if "db" in item.keywords and item.config.getoption("--skip-db"): pytest.skip("skipping due to --skip-db") if "high_memory" in item.keywords and not item.config.getoption( "--run-high-memory" ): pytest.skip("skipping high memory test since --run-high-memory was not set") # Hypothesis hypothesis.settings.register_profile( "ci", # Hypothesis timing checks are tuned for scalars by default, so we bump # them from 200ms to 500ms per test case as the global default. If this # is too short for a specific test, (a) try to make it faster, and (b) # if it really is slow add `@settings(deadline=...)` with a working value, # or `deadline=None` to entirely disable timeouts for that test. deadline=500, suppress_health_check=(hypothesis.HealthCheck.too_slow,), ) hypothesis.settings.load_profile("ci") # Registering these strategies makes them globally available via st.from_type, # which is use for offsets in tests/tseries/offsets/test_offsets_properties.py for name in "MonthBegin MonthEnd BMonthBegin BMonthEnd".split(): cls = getattr(pd.tseries.offsets, name) st.register_type_strategy( cls, st.builds(cls, n=st.integers(-99, 99), normalize=st.booleans()) ) for name in "YearBegin YearEnd BYearBegin BYearEnd".split(): cls = getattr(pd.tseries.offsets, name) st.register_type_strategy( cls, st.builds( cls, n=st.integers(-5, 5), normalize=st.booleans(), month=st.integers(min_value=1, max_value=12), ), ) for name in "QuarterBegin QuarterEnd BQuarterBegin BQuarterEnd".split(): cls = getattr(pd.tseries.offsets, name) st.register_type_strategy( cls, st.builds( cls, n=st.integers(-24, 24), normalize=st.booleans(), startingMonth=st.integers(min_value=1, max_value=12), ), ) # ---------------------------------------------------------------- # Autouse fixtures # ---------------------------------------------------------------- @pytest.fixture(autouse=True) def configure_tests(): """ Configure settings for all tests and test modules. """ pd.set_option("chained_assignment", "raise") @pytest.fixture(autouse=True) def add_imports(doctest_namespace): """ Make `np` and `pd` names available for doctests. """ doctest_namespace["np"] = np doctest_namespace["pd"] = pd # ---------------------------------------------------------------- # Common arguments # ---------------------------------------------------------------- @pytest.fixture(params=[0, 1, "index", "columns"], ids=lambda x: f"axis {repr(x)}") def axis(request): """ Fixture for returning the axis numbers of a DataFrame. """ return request.param axis_frame = axis @pytest.fixture(params=[True, False, None]) def observed(request): """ Pass in the observed keyword to groupby for [True, False] This indicates whether categoricals should return values for values which are not in the grouper [False / None], or only values which appear in the grouper [True]. [None] is supported for future compatibility if we decide to change the default (and would need to warn if this parameter is not passed). """ return request.param @pytest.fixture(params=[True, False, None]) def ordered(request): """ Boolean 'ordered' parameter for Categorical. """ return request.param @pytest.fixture(params=["first", "last", False]) def keep(request): """ Valid values for the 'keep' parameter used in .duplicated or .drop_duplicates """ return request.param @pytest.fixture(params=["left", "right", "both", "neither"]) def closed(request): """ Fixture for trying all interval closed parameters. """ return request.param @pytest.fixture(params=["left", "right", "both", "neither"]) def other_closed(request): """ Secondary closed fixture to allow parametrizing over all pairs of closed. """ return request.param @pytest.fixture(params=[None, "gzip", "bz2", "zip", "xz"]) def compression(request): """ Fixture for trying common compression types in compression tests. """ return request.param @pytest.fixture(params=["gzip", "bz2", "zip", "xz"]) def compression_only(request): """ Fixture for trying common compression types in compression tests excluding uncompressed case. """ return request.param @pytest.fixture(params=[True, False]) def writable(request): """ Fixture that an array is writable. """ return request.param @pytest.fixture(params=["inner", "outer", "left", "right"]) def join_type(request): """ Fixture for trying all types of join operations. """ return request.param @pytest.fixture(params=["nlargest", "nsmallest"]) def nselect_method(request): """ Fixture for trying all nselect methods. """ return request.param # ---------------------------------------------------------------- # Missing values & co. # ---------------------------------------------------------------- @pytest.fixture(params=tm.NULL_OBJECTS, ids=str) def nulls_fixture(request): """ Fixture for each null type in pandas. """ return request.param nulls_fixture2 = nulls_fixture # Generate cartesian product of nulls_fixture @pytest.fixture(params=[None, np.nan, pd.NaT]) def unique_nulls_fixture(request): """ Fixture for each null type in pandas, each null type exactly once. """ return request.param # Generate cartesian product of unique_nulls_fixture: unique_nulls_fixture2 = unique_nulls_fixture # ---------------------------------------------------------------- # Classes # ---------------------------------------------------------------- @pytest.fixture(params=[pd.DataFrame, pd.Series]) def frame_or_series(request): """ Fixture to parametrize over DataFrame and Series. """ return request.param @pytest.fixture( params=[pd.Index, pd.Series], ids=["index", "series"] # type: ignore[list-item] ) def index_or_series(request): """ Fixture to parametrize over Index and Series, made necessary by a mypy bug, giving an error: List item 0 has incompatible type "Type[Series]"; expected "Type[PandasObject]" See GH#29725 """ return request.param # Generate cartesian product of index_or_series fixture: index_or_series2 = index_or_series @pytest.fixture( params=[pd.Index, pd.Series, pd.array], ids=["index", "series", "array"] ) def index_or_series_or_array(request): """ Fixture to parametrize over Index, Series, and ExtensionArray """ return request.param @pytest.fixture def dict_subclass(): """ Fixture for a dictionary subclass. """ class TestSubDict(dict): def __init__(self, *args, **kwargs): dict.__init__(self, *args, **kwargs) return TestSubDict @pytest.fixture def non_dict_mapping_subclass(): """ Fixture for a non-mapping dictionary subclass. """ class TestNonDictMapping(abc.Mapping): def __init__(self, underlying_dict): self._data = underlying_dict def __getitem__(self, key): return self._data.__getitem__(key) def __iter__(self): return self._data.__iter__() def __len__(self): return self._data.__len__() return TestNonDictMapping # ---------------------------------------------------------------- # Indices # ---------------------------------------------------------------- @pytest.fixture def multiindex_year_month_day_dataframe_random_data(): """ DataFrame with 3 level MultiIndex (year, month, day) covering first 100 business days from 2000-01-01 with random data """ tdf = tm.makeTimeDataFrame(100) ymd = tdf.groupby([lambda x: x.year, lambda x: x.month, lambda x: x.day]).sum() # use Int64Index, to make sure things work ymd.index = ymd.index.set_levels([lev.astype("i8") for lev in ymd.index.levels]) ymd.index.set_names(["year", "month", "day"], inplace=True) return ymd @pytest.fixture def multiindex_dataframe_random_data(): """DataFrame with 2 level MultiIndex with random data""" index = MultiIndex( levels=[["foo", "bar", "baz", "qux"], ["one", "two", "three"]], codes=[[0, 0, 0, 1, 1, 2, 2, 3, 3, 3], [0, 1, 2, 0, 1, 1, 2, 0, 1, 2]], names=["first", "second"], ) return DataFrame( np.random.randn(10, 3), index=index, columns=Index(["A", "B", "C"], name="exp") ) def _create_multiindex(): """ MultiIndex used to test the general functionality of this object """ # See Also: tests.multi.conftest.idx major_axis = Index(["foo", "bar", "baz", "qux"]) minor_axis = Index(["one", "two"]) major_codes = np.array([0, 0, 1, 2, 3, 3]) minor_codes = np.array([0, 1, 0, 1, 0, 1]) index_names = ["first", "second"] return MultiIndex( levels=[major_axis, minor_axis], codes=[major_codes, minor_codes], names=index_names, verify_integrity=False, ) def _create_mi_with_dt64tz_level(): """ MultiIndex with a level that is a tzaware DatetimeIndex. """ # GH#8367 round trip with pickle return MultiIndex.from_product( [[1, 2], ["a", "b"], pd.date_range("20130101", periods=3, tz="US/Eastern")], names=["one", "two", "three"], ) indices_dict = { "unicode": tm.makeUnicodeIndex(100), "string": tm.makeStringIndex(100), "datetime": tm.makeDateIndex(100), "datetime-tz": tm.makeDateIndex(100, tz="US/Pacific"), "period": tm.makePeriodIndex(100), "timedelta": tm.makeTimedeltaIndex(100), "int": tm.makeIntIndex(100), "uint": tm.makeUIntIndex(100), "range": tm.makeRangeIndex(100), "float": tm.makeFloatIndex(100), "bool": tm.makeBoolIndex(10), "categorical": tm.makeCategoricalIndex(100), "interval": tm.makeIntervalIndex(100), "empty": Index([]), "tuples": MultiIndex.from_tuples(zip(["foo", "bar", "baz"], [1, 2, 3])), "mi-with-dt64tz-level": _create_mi_with_dt64tz_level(), "multi": _create_multiindex(), "repeats": Index([0, 0, 1, 1, 2, 2]), } @pytest.fixture(params=indices_dict.keys()) def index(request): """ Fixture for many "simple" kinds of indices. These indices are unlikely to cover corner cases, e.g. - no names - no NaTs/NaNs - no values near implementation bounds - ... """ # copy to avoid mutation, e.g. setting .name return indices_dict[request.param].copy() # Needed to generate cartesian product of indices index_fixture2 = index @pytest.fixture(params=indices_dict.keys()) def index_with_missing(request): """ Fixture for indices with missing values """ if request.param in ["int", "uint", "range", "empty", "repeats"]: pytest.xfail("missing values not supported") # GH 35538. Use deep copy to avoid illusive bug on np-dev # Azure pipeline that writes into indices_dict despite copy ind = indices_dict[request.param].copy(deep=True) vals = ind.values if request.param in ["tuples", "mi-with-dt64tz-level", "multi"]: # For setting missing values in the top level of MultiIndex vals = ind.tolist() vals[0] = (None,) + vals[0][1:] vals[-1] = (None,) + vals[-1][1:] return MultiIndex.from_tuples(vals) else: vals[0] = None vals[-1] = None return type(ind)(vals) # ---------------------------------------------------------------- # Series' # ---------------------------------------------------------------- @pytest.fixture def empty_series(): return pd.Series([], index=[], dtype=np.float64) @pytest.fixture def string_series(): """ Fixture for Series of floats with Index of unique strings """ s = tm.makeStringSeries() s.name = "series" return s @pytest.fixture def object_series(): """ Fixture for Series of dtype object with Index of unique strings """ s = tm.makeObjectSeries() s.name = "objects" return s @pytest.fixture def datetime_series(): """ Fixture for Series of floats with DatetimeIndex """ s = tm.makeTimeSeries() s.name = "ts" return s def _create_series(index): """ Helper for the _series dict """ size = len(index) data = np.random.randn(size) return pd.Series(data, index=index, name="a") _series = { f"series-with-{index_id}-index": _create_series(index) for index_id, index in indices_dict.items() } @pytest.fixture def series_with_simple_index(index): """ Fixture for tests on series with changing types of indices. """ return _create_series(index) @pytest.fixture def series_with_multilevel_index(): """ Fixture with a Series with a 2-level MultiIndex. """ arrays = [ ["bar", "bar", "baz", "baz", "qux", "qux", "foo", "foo"], ["one", "two", "one", "two", "one", "two", "one", "two"], ] tuples = zip(*arrays) index = MultiIndex.from_tuples(tuples) data = np.random.randn(8) ser = Series(data, index=index) ser[3] = np.NaN return ser _narrow_dtypes = [ np.float16, np.float32, np.int8, np.int16, np.int32, np.uint8, np.uint16, np.uint32, ] _narrow_series = { f"{dtype.__name__}-series": tm.makeFloatSeries(name="a").astype(dtype) for dtype in _narrow_dtypes } @pytest.fixture(params=_narrow_series.keys()) def narrow_series(request): """ Fixture for Series with low precision data types """ # copy to avoid mutation, e.g. setting .name return _narrow_series[request.param].copy() _index_or_series_objs = {**indices_dict, **_series, **_narrow_series} @pytest.fixture(params=_index_or_series_objs.keys()) def index_or_series_obj(request): """ Fixture for tests on indexes, series and series with a narrow dtype copy to avoid mutation, e.g. setting .name """ return _index_or_series_objs[request.param].copy(deep=True) # ---------------------------------------------------------------- # DataFrames # ---------------------------------------------------------------- @pytest.fixture def empty_frame(): return DataFrame() @pytest.fixture def int_frame(): """ Fixture for DataFrame of ints with index of unique strings Columns are ['A', 'B', 'C', 'D'] A B C D vpBeWjM651 1 0 1 0 5JyxmrP1En -1 0 0 0 qEDaoD49U2 -1 1 0 0 m66TkTfsFe 0 0 0 0 EHPaNzEUFm -1 0 -1 0 fpRJCevQhi 2 0 0 0 OlQvnmfi3Q 0 0 -2 0 ... .. .. .. .. uB1FPlz4uP 0 0 0 1 EcSe6yNzCU 0 0 -1 0 L50VudaiI8 -1 1 -2 0 y3bpw4nwIp 0 -1 0 0 H0RdLLwrCT 1 1 0 0 rY82K0vMwm 0 0 0 0 1OPIUjnkjk 2 0 0 0 [30 rows x 4 columns] """ return DataFrame(tm.getSeriesData()).astype("int64") @pytest.fixture def datetime_frame(): """ Fixture for DataFrame of floats with DatetimeIndex Columns are ['A', 'B', 'C', 'D'] A B C D 2000-01-03 -1.122153 0.468535 0.122226 1.693711 2000-01-04 0.189378 0.486100 0.007864 -1.216052 2000-01-05 0.041401 -0.835752 -0.035279 -0.414357 2000-01-06 0.430050 0.894352 0.090719 0.036939 2000-01-07 -0.620982 -0.668211 -0.706153 1.466335 2000-01-10 -0.752633 0.328434 -0.815325 0.699674 2000-01-11 -2.236969 0.615737 -0.829076 -1.196106 ... ... ... ... ... 2000-02-03 1.642618 -0.579288 0.046005 1.385249 2000-02-04 -0.544873 -1.160962 -0.284071 -1.418351 2000-02-07 -2.656149 -0.601387 1.410148 0.444150 2000-02-08 -1.201881 -1.289040 0.772992 -1.445300 2000-02-09 1.377373 0.398619 1.008453 -0.928207 2000-02-10 0.473194 -0.636677 0.984058 0.511519 2000-02-11 -0.965556 0.408313 -1.312844 -0.381948 [30 rows x 4 columns] """ return DataFrame(tm.getTimeSeriesData()) @pytest.fixture def float_frame(): """ Fixture for DataFrame of floats with index of unique strings Columns are ['A', 'B', 'C', 'D']. A B C D P7GACiRnxd -0.465578 -0.361863 0.886172 -0.053465 qZKh6afn8n -0.466693 -0.373773 0.266873 1.673901 tkp0r6Qble 0.148691 -0.059051 0.174817 1.598433 wP70WOCtv8 0.133045 -0.581994 -0.992240 0.261651 M2AeYQMnCz -1.207959 -0.185775 0.588206 0.563938 QEPzyGDYDo -0.381843 -0.758281 0.502575 -0.565053 r78Jwns6dn -0.653707 0.883127 0.682199 0.206159 ... ... ... ... ... IHEGx9NO0T -0.277360 0.113021 -1.018314 0.196316 lPMj8K27FA -1.313667 -0.604776 -1.305618 -0.863999 qa66YMWQa5 1.110525 0.475310 -0.747865 0.032121 yOa0ATsmcE -0.431457 0.067094 0.096567 -0.264962 65znX3uRNG 1.528446 0.160416 -0.109635 -0.032987 eCOBvKqf3e 0.235281 1.622222 0.781255 0.392871 xSucinXxuV -1.263557 0.252799 -0.552247 0.400426 [30 rows x 4 columns] """ return DataFrame(tm.getSeriesData()) # ---------------------------------------------------------------- # Scalars # ---------------------------------------------------------------- @pytest.fixture( params=[ (Interval(left=0, right=5), IntervalDtype("int64")), (Interval(left=0.1, right=0.5), IntervalDtype("float64")), (Period("2012-01", freq="M"), "period[M]"), (Period("2012-02-01", freq="D"), "period[D]"), ( Timestamp("2011-01-01", tz="US/Eastern"), DatetimeTZDtype(tz="US/Eastern"), ), (Timedelta(seconds=500), "timedelta64[ns]"), ] ) def ea_scalar_and_dtype(request): return request.param # ---------------------------------------------------------------- # Operators & Operations # ---------------------------------------------------------------- _all_arithmetic_operators = [ "__add__", "__radd__", "__sub__", "__rsub__", "__mul__", "__rmul__", "__floordiv__", "__rfloordiv__", "__truediv__", "__rtruediv__", "__pow__", "__rpow__", "__mod__", "__rmod__", ] @pytest.fixture(params=_all_arithmetic_operators) def all_arithmetic_operators(request): """ Fixture for dunder names for common arithmetic operations. """ return request.param @pytest.fixture( params=[ operator.add, ops.radd, operator.sub, ops.rsub, operator.mul, ops.rmul, operator.truediv, ops.rtruediv, operator.floordiv, ops.rfloordiv, operator.mod, ops.rmod, operator.pow, ops.rpow, operator.eq, operator.ne, operator.lt, operator.le, operator.gt, operator.ge, operator.and_, ops.rand_, operator.xor, ops.rxor, operator.or_, ops.ror_, ] ) def all_binary_operators(request): """ Fixture for operator and roperator arithmetic, comparison, and logical ops. """ return request.param @pytest.fixture( params=[ operator.add, ops.radd, operator.sub, ops.rsub, operator.mul, ops.rmul, operator.truediv, ops.rtruediv, operator.floordiv, ops.rfloordiv, operator.mod, ops.rmod, operator.pow, ops.rpow, ] ) def all_arithmetic_functions(request): """ Fixture for operator and roperator arithmetic functions. Notes ----- This includes divmod and rdivmod, whereas all_arithmetic_operators does not. """ return request.param _all_numeric_reductions = [ "sum", "max", "min", "mean", "prod", "std", "var", "median", "kurt", "skew", ] @pytest.fixture(params=_all_numeric_reductions) def all_numeric_reductions(request): """ Fixture for numeric reduction names. """ return request.param _all_boolean_reductions = ["all", "any"] @pytest.fixture(params=_all_boolean_reductions) def all_boolean_reductions(request): """ Fixture for boolean reduction names. """ return request.param _all_reductions = _all_numeric_reductions + _all_boolean_reductions @pytest.fixture(params=_all_reductions) def all_reductions(request): """ Fixture for all (boolean + numeric) reduction names. """ return request.param @pytest.fixture(params=["__eq__", "__ne__", "__le__", "__lt__", "__ge__", "__gt__"]) def all_compare_operators(request): """ Fixture for dunder names for common compare operations * >= * > * == * != * < * <= """ return request.param @pytest.fixture(params=["__le__", "__lt__", "__ge__", "__gt__"]) def compare_operators_no_eq_ne(request): """ Fixture for dunder names for compare operations except == and != * >= * > * < * <= """ return request.param @pytest.fixture( params=["__and__", "__rand__", "__or__", "__ror__", "__xor__", "__rxor__"] ) def all_logical_operators(request): """ Fixture for dunder names for common logical operations * | * & * ^ """ return request.param # ---------------------------------------------------------------- # Data sets/files # ---------------------------------------------------------------- @pytest.fixture def strict_data_files(pytestconfig): """ Returns the configuration for the test setting `--strict-data-files`. """ return pytestconfig.getoption("--strict-data-files") @pytest.fixture def datapath(strict_data_files): """ Get the path to a data file. Parameters ---------- path : str Path to the file, relative to ``pandas/tests/`` Returns ------- path including ``pandas/tests``. Raises ------ ValueError If the path doesn't exist and the --strict-data-files option is set. """ BASE_PATH = os.path.join(os.path.dirname(__file__), "tests") def deco(*args): path = os.path.join(BASE_PATH, *args) if not os.path.exists(path): if strict_data_files: raise ValueError( f"Could not find file {path} and --strict-data-files is set." ) else: pytest.skip(f"Could not find {path}.") return path return deco @pytest.fixture def iris(datapath): """ The iris dataset as a DataFrame. """ return pd.read_csv(datapath("io", "data", "csv", "iris.csv")) # ---------------------------------------------------------------- # Time zones # ---------------------------------------------------------------- TIMEZONES = [ None, "UTC", "US/Eastern", "Asia/Tokyo", "dateutil/US/Pacific", "dateutil/Asia/Singapore", "+01:15", "-02:15", "UTC+01:15", "UTC-02:15", tzutc(), tzlocal(), FixedOffset(300), FixedOffset(0), FixedOffset(-300), timezone.utc, timezone(timedelta(hours=1)), timezone(timedelta(hours=-1), name="foo"), ] TIMEZONE_IDS = [repr(i) for i in TIMEZONES] @td.parametrize_fixture_doc(str(TIMEZONE_IDS)) @pytest.fixture(params=TIMEZONES, ids=TIMEZONE_IDS) def tz_naive_fixture(request): """ Fixture for trying timezones including default (None): {0} """ return request.param @td.parametrize_fixture_doc(str(TIMEZONE_IDS[1:])) @pytest.fixture(params=TIMEZONES[1:], ids=TIMEZONE_IDS[1:]) def tz_aware_fixture(request): """ Fixture for trying explicit timezones: {0} """ return request.param # Generate cartesian product of tz_aware_fixture: tz_aware_fixture2 = tz_aware_fixture @pytest.fixture(scope="module") def datetime_tz_utc(): """ Yields the UTC timezone object from the datetime module. """ return timezone.utc @pytest.fixture(params=["utc", "dateutil/UTC", utc, tzutc(), timezone.utc]) def utc_fixture(request): """ Fixture to provide variants of UTC timezone strings and tzinfo objects. """ return request.param # ---------------------------------------------------------------- # Dtypes # ---------------------------------------------------------------- @pytest.fixture(params=tm.STRING_DTYPES) def string_dtype(request): """ Parametrized fixture for string dtypes. * str * 'str' * 'U' """ return request.param @pytest.fixture(params=tm.BYTES_DTYPES) def bytes_dtype(request): """ Parametrized fixture for bytes dtypes. * bytes * 'bytes' """ return request.param @pytest.fixture(params=tm.OBJECT_DTYPES) def object_dtype(request): """ Parametrized fixture for object dtypes. * object * 'object' """ return request.param @pytest.fixture(params=tm.DATETIME64_DTYPES) def datetime64_dtype(request): """ Parametrized fixture for datetime64 dtypes. * 'datetime64[ns]' * 'M8[ns]' """ return request.param @pytest.fixture(params=tm.TIMEDELTA64_DTYPES) def timedelta64_dtype(request): """ Parametrized fixture for timedelta64 dtypes. * 'timedelta64[ns]' * 'm8[ns]' """ return request.param @pytest.fixture(params=tm.FLOAT_DTYPES) def float_dtype(request): """ Parameterized fixture for float dtypes. * float * 'float32' * 'float64' """ return request.param @pytest.fixture(params=tm.FLOAT_EA_DTYPES) def float_ea_dtype(request): """ Parameterized fixture for float dtypes. * 'Float32' * 'Float64' """ return request.param @pytest.fixture(params=tm.FLOAT_DTYPES + tm.FLOAT_EA_DTYPES) def any_float_allowed_nullable_dtype(request): """ Parameterized fixture for float dtypes. * float * 'float32' * 'float64' * 'Float32' * 'Float64' """ return request.param @pytest.fixture(params=tm.COMPLEX_DTYPES) def complex_dtype(request): """ Parameterized fixture for complex dtypes. * complex * 'complex64' * 'complex128' """ return request.param @pytest.fixture(params=tm.SIGNED_INT_DTYPES) def sint_dtype(request): """ Parameterized fixture for signed integer dtypes. * int * 'int8' * 'int16' * 'int32' * 'int64' """ return request.param @pytest.fixture(params=tm.UNSIGNED_INT_DTYPES) def uint_dtype(request): """ Parameterized fixture for unsigned integer dtypes. * 'uint8' * 'uint16' * 'uint32' * 'uint64' """ return request.param @pytest.fixture(params=tm.ALL_INT_DTYPES) def any_int_dtype(request): """ Parameterized fixture for any integer dtype. * int * 'int8' * 'uint8' * 'int16' * 'uint16' * 'int32' * 'uint32' * 'int64' * 'uint64' """ return request.param @pytest.fixture(params=tm.ALL_EA_INT_DTYPES) def any_nullable_int_dtype(request): """ Parameterized fixture for any nullable integer dtype. * 'UInt8' * 'Int8' * 'UInt16' * 'Int16' * 'UInt32' * 'Int32' * 'UInt64' * 'Int64' """ return request.param @pytest.fixture(params=tm.ALL_EA_INT_DTYPES + tm.FLOAT_EA_DTYPES) def any_numeric_dtype(request): """ Parameterized fixture for any nullable integer dtype and any float ea dtypes. * 'UInt8' * 'Int8' * 'UInt16' * 'Int16' * 'UInt32' * 'Int32' * 'UInt64' * 'Int64' * 'Float32' * 'Float64' """ return request.param @pytest.fixture(params=tm.SIGNED_EA_INT_DTYPES) def any_signed_nullable_int_dtype(request): """ Parameterized fixture for any signed nullable integer dtype. * 'Int8' * 'Int16' * 'Int32' * 'Int64' """ return request.param @pytest.fixture(params=tm.ALL_REAL_DTYPES) def any_real_dtype(request): """ Parameterized fixture for any (purely) real numeric dtype. * int * 'int8' * 'uint8' * 'int16' * 'uint16' * 'int32' * 'uint32' * 'int64' * 'uint64' * float * 'float32' * 'float64' """ return request.param @pytest.fixture(params=tm.ALL_NUMPY_DTYPES) def any_numpy_dtype(request): """ Parameterized fixture for all numpy dtypes. * bool * 'bool' * int * 'int8' * 'uint8' * 'int16' * 'uint16' * 'int32' * 'uint32' * 'int64' * 'uint64' * float * 'float32' * 'float64' * complex * 'complex64' * 'complex128' * str * 'str' * 'U' * bytes * 'bytes' * 'datetime64[ns]' * 'M8[ns]' * 'timedelta64[ns]' * 'm8[ns]' * object * 'object' """ return request.param # categoricals are handled separately _any_skipna_inferred_dtype = [ ("string", ["a", np.nan, "c"]), ("string", ["a", pd.NA, "c"]), ("bytes", [b"a", np.nan, b"c"]), ("empty", [np.nan, np.nan, np.nan]), ("empty", []), ("mixed-integer", ["a", np.nan, 2]), ("mixed", ["a", np.nan, 2.0]), ("floating", [1.0, np.nan, 2.0]), ("integer", [1, np.nan, 2]), ("mixed-integer-float", [1, np.nan, 2.0]), ("decimal", [Decimal(1), np.nan, Decimal(2)]), ("boolean", [True, np.nan, False]), ("boolean", [True, pd.NA, False]), ("datetime64", [np.datetime64("2013-01-01"), np.nan, np.datetime64("2018-01-01")]), ("datetime", [pd.Timestamp("20130101"), np.nan, pd.Timestamp("20180101")]), ("date", [date(2013, 1, 1), np.nan, date(2018, 1, 1)]), # The following two dtypes are commented out due to GH 23554 # ('complex', [1 + 1j, np.nan, 2 + 2j]), # ('timedelta64', [np.timedelta64(1, 'D'), # np.nan, np.timedelta64(2, 'D')]), ("timedelta", [timedelta(1), np.nan, timedelta(2)]), ("time", [time(1), np.nan, time(2)]), ("period", [pd.Period(2013), pd.NaT, pd.Period(2018)]), ("interval", [pd.Interval(0, 1), np.nan, pd.Interval(0, 2)]), ] ids, _ = zip(*_any_skipna_inferred_dtype) # use inferred type as fixture-id @pytest.fixture(params=_any_skipna_inferred_dtype, ids=ids) def any_skipna_inferred_dtype(request): """ Fixture for all inferred dtypes from _libs.lib.infer_dtype The covered (inferred) types are: * 'string' * 'empty' * 'bytes' * 'mixed' * 'mixed-integer' * 'mixed-integer-float' * 'floating' * 'integer' * 'decimal' * 'boolean' * 'datetime64' * 'datetime' * 'date' * 'timedelta' * 'time' * 'period' * 'interval' Returns ------- inferred_dtype : str The string for the inferred dtype from _libs.lib.infer_dtype values : np.ndarray An array of object dtype that will be inferred to have `inferred_dtype` Examples -------- >>> import pandas._libs.lib as lib >>> >>> def test_something(any_skipna_inferred_dtype): ... inferred_dtype, values = any_skipna_inferred_dtype ... # will pass ... assert lib.infer_dtype(values, skipna=True) == inferred_dtype """ inferred_dtype, values = request.param values = np.array(values, dtype=object) # object dtype to avoid casting # correctness of inference tested in tests/dtypes/test_inference.py return inferred_dtype, values # ---------------------------------------------------------------- # Misc # ---------------------------------------------------------------- @pytest.fixture def ip(): """ Get an instance of IPython.InteractiveShell. Will raise a skip if IPython is not installed. """ pytest.importorskip("IPython", minversion="6.0.0") from IPython.core.interactiveshell import InteractiveShell # GH#35711 make sure sqlite history file handle is not leaked from traitlets.config import Config # isort:skip c = Config() c.HistoryManager.hist_file = ":memory:" return InteractiveShell(config=c) @pytest.fixture(params=["bsr", "coo", "csc", "csr", "dia", "dok", "lil"]) def spmatrix(request): """ Yields scipy sparse matrix classes. """ from scipy import sparse return getattr(sparse, request.param + "_matrix") @pytest.fixture( params=[ getattr(pd.offsets, o) for o in pd.offsets.__all__ if issubclass(getattr(pd.offsets, o), pd.offsets.Tick) ] ) def tick_classes(request): """ Fixture for Tick based datetime offsets available for a time series. """ return request.param @pytest.fixture(params=[None, lambda x: x]) def sort_by_key(request): """ Simple fixture for testing keys in sorting methods. Tests None (no key) and the identity key. """ return request.param @pytest.fixture() def fsspectest(): pytest.importorskip("fsspec") from fsspec import register_implementation from fsspec.implementations.memory import MemoryFileSystem from fsspec.registry import _registry as registry class TestMemoryFS(MemoryFileSystem): protocol = "testmem" test = [None] def __init__(self, **kwargs): self.test[0] = kwargs.pop("test", None) super().__init__(**kwargs) register_implementation("testmem", TestMemoryFS, clobber=True) yield TestMemoryFS() registry.pop("testmem", None) TestMemoryFS.test[0] = None TestMemoryFS.store.clear() @pytest.fixture( params=[ ("foo", None, None), ("Egon", "Venkman", None), ("NCC1701D", "NCC1701D", "NCC1701D"), ] ) def names(request): """ A 3-tuple of names, the first two for operands, the last for a result. """ return request.param @pytest.fixture(params=[tm.setitem, tm.loc, tm.iloc]) def indexer_sli(request): """ Parametrize over __setitem__, loc.__setitem__, iloc.__setitem__ """ return request.param @pytest.fixture(params=[tm.setitem, tm.iloc]) def indexer_si(request): """ Parametrize over __setitem__, iloc.__setitem__ """ return request.param
bsd-3-clause
-4,583,032,823,071,654,400
24.297131
88
0.583286
false
haggi/OpenMaya
src/mayaToCorona/mtco_devmodule/scripts/Corona/AETemplate/AECoronaLayeredTemplate.py
1
10391
import pymel.core as pm import logging import traceback import sys from getpass import getuser log = logging.getLogger("ui") class BaseTemplate(pm.ui.AETemplate): def addControl(self, control, label=None, **kwargs): pm.ui.AETemplate.addControl(self, control, label=label, **kwargs) def beginLayout(self, name, collapse=True): pm.ui.AETemplate.beginLayout(self, name, collapse=collapse) class AECoronaLayeredTemplate(BaseTemplate): def __init__(self, nodeName): BaseTemplate.__init__(self,nodeName) log.debug("AECoronaLayeredTemplate") self.thisNode = None self.node = pm.PyNode(self.nodeName) self.layersUi = None pm.mel.AEswatchDisplay(nodeName) self.beginScrollLayout() self.buildBody(nodeName) self.addExtraControls("ExtraControls") if getuser() != "haggi": self.suppress("outColor") self.suppress("materialEntry") self.suppress("materialEntryAmount") self.endScrollLayout() def addLayer(self, *args): log.debug("addLayer") numElements = self.thisNode.materialEntryMtl.numElements() index = 0; if numElements > 0: index = self.thisNode.materialEntryMtl.elementByPhysicalIndex(numElements-1).index() + 1 self.thisNode.materialEntryMtl[index].get() #create by request self.thisNode.materialEntryAmount[index].get() #create by request numElements = self.thisNode.materialEntryMtl.numElements() self.layersReplace("none") def removeLayer(self, *args): layerNumber = args[0] log.debug("removeLayer {0}".format(layerNumber)) if self.thisNode.materialEntryMtl[layerNumber].isConnected(): input = self.thisNode.materialEntryMtl[layerNumber].inputs(p=1)[0] input // self.thisNode.materialEntryMtl[layerNumber] self.thisNode.materialEntryMtl[layerNumber].remove() if self.thisNode.materialEntryAmount[layerNumber].isConnected(): input = self.thisNode.materialEntryAmount[layerNumber].inputs(p=1)[0] input // self.thisNode.materialEntryAmount[layerNumber] self.thisNode.materialEntryAmount[layerNumber].remove() def moveLayer(self, currentIndex, newIndex): currentMtlInput = None currentAmountInput = None currentAmountColor = None newLayerMtlInput = None newLayerAmountInput = None newLayerAmountColor = None try: if self.thisNode.materialEntryMtl[currentIndex].isConnected(): currentMtlInput = self.thisNode.materialEntryMtl[currentIndex].inputs(p=1)[0] if self.thisNode.materialEntryAmount[currentIndex].isConnected(): currentAmountInput = self.thisNode.materialEntryAmount[currentIndex].inputs(p=1)[0] else: currentAmountColor = self.thisNode.materialEntryAmount[currentIndex].get() if self.thisNode.materialEntryMtl[newIndex].isConnected(): newLayerMtlInput = self.thisNode.materialEntryMtl[newIndex].inputs(p=1)[0] if self.thisNode.materialEntryAmount[newIndex].isConnected(): newLayerAmountInput = self.thisNode.materialEntryAmount[newIndex].inputs(p=1)[0] else: newLayerAmountColor = self.thisNode.materialEntryAmount[newIndex].get() # disconnect existing connections if currentMtlInput is not None: currentMtlInput // self.thisNode.materialEntryMtl[currentIndex] if newLayerMtlInput is not None: newLayerMtlInput // self.thisNode.materialEntryMtl[newIndex] if currentAmountInput is not None: currentAmountInput // self.thisNode.materialEntryAmount[currentIndex] if newLayerAmountInput is not None: newLayerAmountInput // self.thisNode.materialEntryAmount[newIndex] if currentMtlInput is not None: currentMtlInput >> self.thisNode.materialEntryMtl[newIndex] if newLayerMtlInput is not None: newLayerMtlInput >> self.thisNode.materialEntryMtl[currentIndex] if currentAmountInput is not None: currentAmountInput >> self.thisNode.materialEntryAmount[newIndex] else: self.thisNode.materialEntryAmount[newIndex].set(currentAmountColor) if newLayerAmountInput is not None: newLayerAmountInput >> self.thisNode.materialEntryAmount[currentIndex] else: self.thisNode.materialEntryAmount[currentIndex].set(newLayerAmountColor) except: traceback.print_exc(file=sys.__stderr__) return def moveLayerUp(self, *args): layerNumber = args[0] log.debug("moveLayerUp {0}".format(layerNumber)) print "this node", self.thisNode firstIndex = self.thisNode.materialEntryMtl.elementByPhysicalIndex(0).index() if layerNumber == firstIndex: log.debug("Layer is first layer, cannot move up") return indexAbove = -1 for entryId in range(self.thisNode.materialEntryMtl.numElements()): if self.thisNode.materialEntryMtl.elementByPhysicalIndex(entryId).index() == layerNumber: break indexAbove = self.thisNode.materialEntryMtl.elementByPhysicalIndex(entryId).index() if indexAbove < 0: log.error("Could not find index above current one.") return self.moveLayer(layerNumber, indexAbove) self.layersReplace("none") def moveLayerDown(self, *args): layerNumber = args[0] log.debug("moveLayerDown {0}".format(layerNumber)) lastIndex = self.thisNode.materialEntryMtl.elementByPhysicalIndex(self.thisNode.materialEntryMtl.numElements()-1).index() if layerNumber == lastIndex: log.debug("Layer is last layer, cannot move down.") return newIndex = -1 for entryId in range(self.thisNode.materialEntryMtl.numElements()): if self.thisNode.materialEntryMtl.elementByPhysicalIndex(entryId).index() == layerNumber: newIndex = self.thisNode.materialEntryMtl.elementByPhysicalIndex(entryId + 1).index() break if newIndex < 0: log.error("Could not find index below current one.") return self.moveLayer(layerNumber, newIndex) self.layersReplace("none") def layersReplace(self, attribute): if attribute is not "none": self.thisNode = pm.PyNode(attribute).node() log.debug("layersReplace {0}".format(attribute)) pm.setUITemplate("attributeEditorTemplate", pushTemplate=True) materialEntries = self.thisNode.materialEntryMtl.numElements() #print "layersReplace: node has ", self.thisNode.materialEntryMtl.numElements(), "layers" if self.layersUi is not None: pm.deleteUI(self.layersUi) with pm.columnLayout(adj=True, parent=self.uiParent) as self.layersUi: for layerNumber in range(materialEntries): layerIndex = self.thisNode.materialEntryMtl.elementByPhysicalIndex(layerNumber).index() with pm.frameLayout(label="Layer {0}".format(layerNumber), collapsable=True, collapse=False) as fl: print "create layer", layerNumber with pm.columnLayout(adj=True): attribute = self.thisNode.materialEntryMtl[layerIndex] #tf = pm.textFieldGrp(label="Shader", editable=False) if attribute.isConnected(): pm.frameLayout(fl, edit=True, label=attribute.inputs(p=1)[0]) # tf.setText(attribute.inputs(p=1)[0]) pm.attrColorSliderGrp(label="Material", at=attribute) attribute = self.thisNode.materialEntryAmount[layerIndex] pm.attrColorSliderGrp(label="Amount", at=attribute) with pm.columnLayout(adj=True): pm.button(label="Remove Layer", c=pm.Callback(self.removeLayer, layerIndex), height=18) pm.button(label="Layer Up", c=pm.Callback(self.moveLayerUp, layerIndex), height=18) pm.button(label="Layer Down", c=pm.Callback(self.moveLayerDown, layerIndex), height=18) pm.setUITemplate("attributeEditorTemplate", popTemplate=True) def layersNew(self, attribute): print "layersNew", attribute self.uiParent = pm.setParent(query=True) pm.button(label="Add Layer", c=self.addLayer, parent=self.uiParent) self.layersReplace(attribute) def buildBody(self, nodeName): self.thisNode = pm.PyNode(nodeName) self.beginLayout("Base" ,collapse=0) self.addControl("baseMaterial", label="Base Material") self.endLayout() self.beginLayout("Layers" ,collapse=0) self.callCustom( self.layersNew, self.layersReplace, "materialEntryMtl") self.endLayout() # self.beginNoOptimize() # self.addControl("emissionColorMultiplier", label="Multiplier") # self.addControl("opacity", label="Opacity") # self.addControl("emitLight", label="Emit Light") # self.addControl("emissionGlossyness", label="Directionality") # self.addSeparator() # self.addControl("iesProfile", label="IES Profile") # self.addControl("emissionSharpnessFake", label="Sharp Patterns") # #self.addControl("emissionDisableSampling", label="Disable Sampling") # #self.addControl("emissionSharpnessFakePoint", label="Sharpness Fake Point") # self.endNoOptimize() #self.beginLayout("Hardware Texturing" ,collapse=0) #pm.mel.eval('AEhardwareTextureTemplate "%s"' % self.nodeName + r'("diffuse emissionColor ")') #self.endLayout()
mit
-1,501,525,835,912,991,700
46.669725
129
0.626407
false
Berkeley-BORIS/BORIS_Code
notebooks/stereocalibrationtesting/stereo_calibration_orig.py
1
8634
import sys import os import random import fnmatch import cv import cv2 import numpy as np #print cv2.__version__ #if not cv2.__version__.startswith('2.3'): # raise NotImplementedError("WARNING: cv2 is version {0}!! We haven't implemented the inverted transform direction changed after 2.3!".format(cv2.__version__)) def stereo_calibration(check_img_folder,nimages,display=False,dims=(4,11),size=(640,480)): '''reads files from a directory of stereo images of opencv circle grid. calibrates intrinsics of each camera, then extrinsics of stereo rig ''' #grab calbration frames directory for dir in os.listdir(check_img_folder): if fnmatch.fnmatch(dir,'calibration_frames*'): check_img_folder = check_img_folder + dir + '/' break # Number of points in circle grid num_pts = dims[0] * dims[1] if not os.path.exists(check_img_folder + 'images_used/'): os.mkdir(check_img_folder + 'images_used/') # evaluate image points nimg = 0 #number of images with found corners iptsF1 = [] #image point arrays to fill up iptsF2 = [] random_images = random.sample(range(500), nimages) #for n in range(0,nimages,2): for n in random_images: filename1 = check_img_folder + 'cam1_frame_'+str(n+1)+'.bmp' filename2 = check_img_folder + 'cam2_frame_'+str(n+1)+'.bmp' if os.path.exists(filename1) and os.path.exists(filename2): img1 = cv2.imread(filename1,0) img2 = cv2.imread(filename2,0) # find center points in circle grid [found1,points1] = cv2.findCirclesGridDefault(img1,dims,flags=(cv2.CALIB_CB_ASYMMETRIC_GRID)) [found2,points2] = cv2.findCirclesGridDefault(img2,dims,flags=(cv2.CALIB_CB_ASYMMETRIC_GRID)) # copy the found points into the ipts matrices temp1 = np.zeros( (num_pts,2) ) temp2 = np.zeros( (num_pts,2) ) if found1 and found2: for i in range(num_pts): temp1[i,0]=points1[i,0,0] temp1[i,1]=points1[i,0,1] temp2[i,0]=points2[i,0,0] temp2[i,1]=points2[i,0,1] iptsF1.append(temp1) iptsF2.append(temp2) nimg = nimg + 1 #increment image counter #save images with points identified drawn_boards_1 = img1.copy() drawn_boards_2 = img2.copy() cv2.drawChessboardCorners(drawn_boards_1, dims, points1, found1) cv2.drawChessboardCorners(drawn_boards_2, dims, points2, found2) cv2.imwrite(check_img_folder + 'images_used/' + 'cam1_frame_'+str(n+1)+'.bmp', drawn_boards_1) cv2.imwrite(check_img_folder + 'images_used/' + 'cam2_frame_'+str(n+1)+'.bmp', drawn_boards_2) print "\n Usable stereo pairs: " + str(nimg) # convert image points to numpy iptsF1 = np.array(iptsF1, dtype = np.float32) iptsF2 = np.array(iptsF2, dtype = np.float32) # evaluate object points opts = object_points(dims,nimg,4.35) # initialize camera parameters intrinsics1 = np.zeros( (3,3) ) intrinsics2 = np.zeros( (3,3) ) distortion1 = np.zeros( (8,1) ) distortion2 = np.zeros( (8,1) ) # Set initial guess for intrinsic camera parameters (focal length = 0.35cm) intrinsics1[0,0] = 583.3 intrinsics1[1,1] = 583.3 intrinsics1[0,2] = 320 intrinsics1[1,2] = 240 intrinsics1[2,2] = 1.0 intrinsics2[0,0] = 583.3 intrinsics2[1,1] = 583.3 intrinsics2[0,2] = 320 intrinsics2[1,2] = 240 intrinsics2[2,2] = 1.0 #calibrate cameras print 'Calibrating camera 1...' (cam1rms, intrinsics1, distortion1, rotv1, trav1) = cv2.calibrateCamera(opts, iptsF1, size, intrinsics1, distortion1, flags=int(cv2.CALIB_USE_INTRINSIC_GUESS | cv2.CALIB_RATIONAL_MODEL)) print "\nEstimated intrinsic parameters for camera 1:" for i in range(3): print [intrinsics1[i,j] for j in range(3)] print "\nEstimated distortion parameters for camera 1:" print distortion1 print 'Calibrating camera 2...' (cam2rms, intrinsics2, distortion2, rotv2, trav2) = cv2.calibrateCamera(opts, iptsF2, size, intrinsics2, distortion2,flags=int(cv2.CALIB_USE_INTRINSIC_GUESS | cv2.CALIB_RATIONAL_MODEL)) print "\nEstimated intrinsic parameters for camera 2:" for i in range(3): print [intrinsics2[i,j] for j in range(3)] print "\nEstimated distortion parameters for camera 2:" print distortion2 print "\n rms pixel error:" print "cam1 orig: " + str(cam1rms) print "cam2 orig: " + str(cam2rms) # Estimate extrinsic parameters from stereo point correspondences print "\n Stereo estimating..." #(stereorms, intrinsics1, distortion1, intrinsics2, distortion2, R, T, E, F) = cv2.stereoCalibrate(opts, iptsF1, iptsF2, intrinsics1, distortion1, intrinsics2, distortion2, size,criteria=(cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 300, 1e-7), flags=(cv2.CALIB_USE_INTRINSIC_GUESS | cv2.CALIB_RATIONAL_MODEL)) (stereorms, intrinsics1, distortion1, intrinsics2, distortion2, R, T, E, F) = cv2.stereoCalibrate(opts, iptsF1, iptsF2, size, intrinsics1, distortion1, intrinsics2, distortion2,criteria=(cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 300, 1e-7), flags=(cv2.CALIB_USE_INTRINSIC_GUESS | cv2.CALIB_RATIONAL_MODEL)) print "\nEstimated extrinsic parameters between cameras 1 and 2:\nRotation:" for i in range(3): print [R[i,j] for j in range(3)] print "\nTranslation:" print [T[i,0] for i in range(3)] print "\n rms pixel error:" print "stereo: " + str(stereorms) # Initialize rectification parameters R1=cv.CreateMat(3,3,cv.CV_64F) R2=cv.CreateMat(3,3,cv.CV_64F) P1=cv.CreateMat(3,4,cv.CV_64F) P2=cv.CreateMat(3,4,cv.CV_64F) Q=cv.CreateMat(4,4,cv.CV_64F) intrinsics1 = cv.fromarray(intrinsics1.copy()) intrinsics2 = cv.fromarray(intrinsics2.copy()) distortion1 = cv.fromarray(distortion1.copy()) distortion2 = cv.fromarray(distortion2.copy()) R = cv.fromarray(R.copy()) T = cv.fromarray(T.copy()) E = cv.fromarray(E.copy()) F = cv.fromarray(F.copy()) new_size = (640,480) # Estimate rectification (roi1,roi2)=cv.StereoRectify(intrinsics1, intrinsics2, distortion1, distortion2, size, R,T,R1, R2, P1,P2, Q,cv.CV_CALIB_ZERO_DISPARITY) # Rectification maps #Left maps map1x = cv.CreateMat(new_size[1], new_size[0], cv.CV_32FC1) map2x = cv.CreateMat(new_size[1], new_size[0], cv.CV_32FC1) #Right maps map1y = cv.CreateMat(new_size[1], new_size[0], cv.CV_32FC1) map2y = cv.CreateMat(new_size[1], new_size[0], cv.CV_32FC1) cv.InitUndistortRectifyMap(intrinsics1, distortion1, R1, P1, map1x, map1y) cv.InitUndistortRectifyMap(intrinsics2, distortion2, R2, P2, map2x, map2y) #save parameter estimates print "\nSaving all parameters to the folder with checkerboard images..." calib_params = open(check_img_folder+ 'calib_params.txt', 'w') calib_params.write("\n num stereo frames: " + str(nimg)) calib_params.write("\n rms cam1: " + str(cam1rms)) calib_params.write("\n rms cam2: " + str(cam2rms)) calib_params.write("\n rms stereo: " + str(stereorms)) calib_params.close() cv.Save(check_img_folder + 'Intrinsics_cam1.xml',intrinsics1) cv.Save(check_img_folder + 'Intrinsics_cam2.xml',intrinsics2) cv.Save(check_img_folder + 'Distortion_cam1.xml',distortion1) cv.Save(check_img_folder + 'Distortion_cam2.xml',distortion2) cv.Save(check_img_folder + 'Projection_matrix_cam1.xml',P1) cv.Save(check_img_folder + 'Projection_matrix_cam2.xml',P2) cv.Save(check_img_folder + 'Essential_matrix.xml',E) cv.Save(check_img_folder + 'Fundamental_matrix.xml',F) cv.Save(check_img_folder + 'Rotation_matrix.xml',R) cv.Save(check_img_folder + 'Translation_vector.xml',T) cv.Save(check_img_folder + 'Disp2depth_matrix.xml',Q) cv.Save(check_img_folder + 'Rectification_transform_cam1.xml',R1) cv.Save(check_img_folder + 'Rectification_transform_cam2.xml',R2) cv.Save(check_img_folder + 'Rectification_map_cam1x.xml',map1x) cv.Save(check_img_folder + 'Rectification_map_cam1y.xml',map1y) cv.Save(check_img_folder + 'Rectification_map_cam2x.xml',map2x) cv.Save(check_img_folder + 'Rectification_map_cam2y.xml',map2y) return None def object_points(dims,num_images,square_size): '''determine 3d object points for each image ''' width = dims[0] height = dims[1] num_pts = width*height opts = [] for n in range(num_images): temp = np.zeros( (num_pts,3) ) for i in range(height): for j in range(width): if i%2==0: temp[i*width+j,0] = (i*(square_size/2.00)) temp[i*width+j,1] = j*square_size temp[i*width+j,2] = 0 else: temp[i*width+j,0] = (i*(square_size/2.00)) temp[i*width+j,1] = (j*square_size) + square_size/2.00 temp[i*width+j,2] = 0 opts.append(temp) opts = np.array(opts, dtype = np.float32) return opts if __name__=="__main__": check_img_folder = sys.argv[1] nimages = int(sys.argv[2]) stereo_calibration(check_img_folder,nimages,display=False,dims=(4,11),size=(640,480))
mit
-3,516,562,591,805,934,000
36.703057
315
0.702571
false
shenaishiren/xiaodi
xiaodi/api/abc.py
1
2864
# coding=utf-8 import types import logging from tornado.gen import coroutine from tornado.web import asynchronous from tornado.web import RequestHandler from tornado.web import HTTPError from xiaodi.api.errors import HTTPAPIError from xiaodi.api.errors import INTERNAL_SERVER_ERROR from xiaodi.api.errors import BAD_REQUEST_ERROR LOG = logging.getLogger(__name__) class GenAsyncMetaclass(type): def __new__(cls, clsname, bases, attrs): allow_method = ['get', 'put', 'delete', 'post', 'options', 'patch'] for method in attrs: if method.lower() in allow_method: attrs[method] = coroutine(asynchronous(attrs[method])) return super(GenAsyncMetaclass, cls).__new__(cls, clsname, bases, attrs) class Namespace(dict): def __getattr__(self, name): try: return self[name] except KeyError: raise AttributeError(name) def __setattr__(self, name, value): self[name] = value class BaseApiHandler(RequestHandler): __metaclass__ = GenAsyncMetaclass def prepare(self): self._G = Namespace() def on_finish(self): self.set_header("Content-Type", "application/json; charset=UTF-8") def _async_write(self, data, finish=True): self.write(data) # disconnect long connection if finish: self.finish() def write_success(self, data=None, finish=True): assert isinstance(data, (types.NoneType, dict)), 'data must be NoneType or dict' self._async_write(dict((data or {}), **{'status': 'success'}), finish=finish) def write_error(self, status_code, **kwargs): try: exc_info = kwargs.pop('exc_info') e = exc_info[1] if isinstance(e, HTTPAPIError): pass elif isinstance(e, HTTPError): e = HTTPAPIError(BAD_REQUEST_ERROR, e.log_message, e.status_code) else: e = HTTPAPIError(INTERNAL_SERVER_ERROR, str(e), 500) self.set_status(status_code) self._async_write(str(e)) except Exception as e: LOG.exception(str(e)) return super(BaseApiHandler, self).write_error(status_code, **kwargs) # private method def __set_cross_domain_headers(self): self.set_header('Access-Control-Allow-Origin', '*') self.set_header('Access-Control-Max-Age', 1000) self.set_header('Access-Control-Allow-Methods', 'POST, GET, PUT, DELETE, OPTIONS') self.set_header('Access-Control-Allow-Headers', '*') def set_default_headers(self): self.__set_cross_domain_headers() self.set_header('Content-type', 'application/json') def options(self, *args): self.__set_cross_domain_headers() @property def settings(self): return self.application.settings
gpl-3.0
-5,720,625,523,224,219,000
31.179775
90
0.622556
false
nataliemcmullen/WikiMiney
db/data/2012/10/get_gzs.py
1
24893
urls = [ "pagecounts-20121001-000000.gz", "pagecounts-20121001-010000.gz", "pagecounts-20121001-020000.gz", "pagecounts-20121001-030000.gz", "pagecounts-20121001-040000.gz", "pagecounts-20121001-050000.gz", "pagecounts-20121001-060001.gz", "pagecounts-20121001-070000.gz", "pagecounts-20121001-080000.gz", "pagecounts-20121001-090000.gz", "pagecounts-20121001-100000.gz", "pagecounts-20121001-110000.gz", "pagecounts-20121001-120000.gz", "pagecounts-20121001-130000.gz", "pagecounts-20121001-140000.gz", "pagecounts-20121001-150000.gz", "pagecounts-20121001-160000.gz", "pagecounts-20121001-170000.gz", "pagecounts-20121001-180000.gz", "pagecounts-20121001-190000.gz", "pagecounts-20121001-200001.gz", "pagecounts-20121001-210000.gz", "pagecounts-20121001-220000.gz", "pagecounts-20121001-230000.gz", "pagecounts-20121002-000000.gz", "pagecounts-20121002-010000.gz", "pagecounts-20121002-020000.gz", "pagecounts-20121002-030000.gz", "pagecounts-20121002-040000.gz", "pagecounts-20121002-050000.gz", "pagecounts-20121002-060000.gz", "pagecounts-20121002-070000.gz", "pagecounts-20121002-080000.gz", "pagecounts-20121002-090000.gz", "pagecounts-20121002-100001.gz", "pagecounts-20121002-110000.gz", "pagecounts-20121002-120000.gz", "pagecounts-20121002-130000.gz", "pagecounts-20121002-140000.gz", "pagecounts-20121002-150000.gz", "pagecounts-20121002-160000.gz", "pagecounts-20121002-170000.gz", "pagecounts-20121002-180000.gz", "pagecounts-20121002-190000.gz", "pagecounts-20121002-200000.gz", "pagecounts-20121002-210000.gz", "pagecounts-20121002-220000.gz", "pagecounts-20121002-230000.gz", "pagecounts-20121003-000001.gz", "pagecounts-20121003-010000.gz", "pagecounts-20121003-020000.gz", "pagecounts-20121003-030000.gz", "pagecounts-20121003-040000.gz", "pagecounts-20121003-050000.gz", "pagecounts-20121003-060000.gz", "pagecounts-20121003-070000.gz", "pagecounts-20121003-080000.gz", "pagecounts-20121003-090000.gz", "pagecounts-20121003-100000.gz", "pagecounts-20121003-110000.gz", "pagecounts-20121003-120000.gz", "pagecounts-20121003-130001.gz", "pagecounts-20121003-140000.gz", "pagecounts-20121003-150000.gz", "pagecounts-20121003-160000.gz", "pagecounts-20121003-170000.gz", "pagecounts-20121003-180000.gz", "pagecounts-20121003-190000.gz", "pagecounts-20121003-200000.gz", "pagecounts-20121003-210000.gz", "pagecounts-20121003-220000.gz", "pagecounts-20121003-230000.gz", "pagecounts-20121004-000000.gz", "pagecounts-20121004-010000.gz", "pagecounts-20121004-020000.gz", "pagecounts-20121004-030001.gz", "pagecounts-20121004-040000.gz", "pagecounts-20121004-050000.gz", "pagecounts-20121004-060000.gz", "pagecounts-20121004-070000.gz", "pagecounts-20121004-080000.gz", "pagecounts-20121004-090000.gz", "pagecounts-20121004-100000.gz", "pagecounts-20121004-110000.gz", "pagecounts-20121004-120000.gz", "pagecounts-20121004-130000.gz", "pagecounts-20121004-140000.gz", "pagecounts-20121004-150000.gz", "pagecounts-20121004-160000.gz", "pagecounts-20121004-170001.gz", "pagecounts-20121004-180000.gz", "pagecounts-20121004-190000.gz", "pagecounts-20121004-200000.gz", "pagecounts-20121004-210000.gz", "pagecounts-20121004-220000.gz", "pagecounts-20121004-230000.gz", "pagecounts-20121005-000000.gz", "pagecounts-20121005-010000.gz", "pagecounts-20121005-020000.gz", "pagecounts-20121005-030000.gz", "pagecounts-20121005-040000.gz", "pagecounts-20121005-050000.gz", "pagecounts-20121005-060000.gz", "pagecounts-20121005-070001.gz", "pagecounts-20121005-080000.gz", "pagecounts-20121005-090000.gz", "pagecounts-20121005-100000.gz", "pagecounts-20121005-110000.gz", "pagecounts-20121005-120000.gz", "pagecounts-20121005-130000.gz", "pagecounts-20121005-140000.gz", "pagecounts-20121005-150000.gz", "pagecounts-20121005-160000.gz", "pagecounts-20121005-170000.gz", "pagecounts-20121005-180000.gz", "pagecounts-20121005-190000.gz", "pagecounts-20121005-200000.gz", "pagecounts-20121005-210001.gz", "pagecounts-20121005-220000.gz", "pagecounts-20121005-230000.gz", "pagecounts-20121006-000000.gz", "pagecounts-20121006-010000.gz", "pagecounts-20121006-020000.gz", "pagecounts-20121006-030000.gz", "pagecounts-20121006-040000.gz", "pagecounts-20121006-050000.gz", "pagecounts-20121006-060000.gz", "pagecounts-20121006-070000.gz", "pagecounts-20121006-080000.gz", "pagecounts-20121006-090000.gz", "pagecounts-20121006-100000.gz", "pagecounts-20121006-110000.gz", "pagecounts-20121006-120001.gz", "pagecounts-20121006-130000.gz", "pagecounts-20121006-140000.gz", "pagecounts-20121006-150000.gz", "pagecounts-20121006-160000.gz", "pagecounts-20121006-170000.gz", "pagecounts-20121006-180000.gz", "pagecounts-20121006-190000.gz", "pagecounts-20121006-200000.gz", "pagecounts-20121006-210000.gz", "pagecounts-20121006-220000.gz", "pagecounts-20121006-230000.gz", "pagecounts-20121007-000000.gz", "pagecounts-20121007-010000.gz", "pagecounts-20121007-020001.gz", "pagecounts-20121007-030000.gz", "pagecounts-20121007-040000.gz", "pagecounts-20121007-050000.gz", "pagecounts-20121007-060000.gz", "pagecounts-20121007-070000.gz", "pagecounts-20121007-080000.gz", "pagecounts-20121007-090000.gz", "pagecounts-20121007-100000.gz", "pagecounts-20121007-110000.gz", "pagecounts-20121007-120000.gz", "pagecounts-20121007-130000.gz", "pagecounts-20121007-140000.gz", "pagecounts-20121007-150001.gz", "pagecounts-20121007-160000.gz", "pagecounts-20121007-170000.gz", "pagecounts-20121007-180000.gz", "pagecounts-20121007-190000.gz", "pagecounts-20121007-200000.gz", "pagecounts-20121007-210000.gz", "pagecounts-20121007-220000.gz", "pagecounts-20121007-230000.gz", "pagecounts-20121008-000000.gz", "pagecounts-20121008-010000.gz", "pagecounts-20121008-020000.gz", "pagecounts-20121008-030000.gz", "pagecounts-20121008-040001.gz", "pagecounts-20121008-050000.gz", "pagecounts-20121008-060000.gz", "pagecounts-20121008-070000.gz", "pagecounts-20121008-080000.gz", "pagecounts-20121008-090000.gz", "pagecounts-20121008-100000.gz", "pagecounts-20121008-110000.gz", "pagecounts-20121008-120000.gz", "pagecounts-20121008-130000.gz", "pagecounts-20121008-140000.gz", "pagecounts-20121008-150000.gz", "pagecounts-20121008-160000.gz", "pagecounts-20121008-170000.gz", "pagecounts-20121008-180001.gz", "pagecounts-20121008-190000.gz", "pagecounts-20121008-200000.gz", "pagecounts-20121008-210000.gz", "pagecounts-20121008-220000.gz", "pagecounts-20121008-230000.gz", "pagecounts-20121009-000000.gz", "pagecounts-20121009-010000.gz", "pagecounts-20121009-020000.gz", "pagecounts-20121009-030000.gz", "pagecounts-20121009-040000.gz", "pagecounts-20121009-050000.gz", "pagecounts-20121009-060000.gz", "pagecounts-20121009-070001.gz", "pagecounts-20121009-080000.gz", "pagecounts-20121009-090000.gz", "pagecounts-20121009-100000.gz", "pagecounts-20121009-110000.gz", "pagecounts-20121009-120000.gz", "pagecounts-20121009-130000.gz", "pagecounts-20121009-140000.gz", "pagecounts-20121009-150000.gz", "pagecounts-20121009-160000.gz", "pagecounts-20121009-170000.gz", "pagecounts-20121009-180000.gz", "pagecounts-20121009-190000.gz", "pagecounts-20121009-200001.gz", "pagecounts-20121009-210000.gz", "pagecounts-20121009-220000.gz", "pagecounts-20121009-230000.gz", "pagecounts-20121010-000000.gz", "pagecounts-20121010-010000.gz", "pagecounts-20121010-020000.gz", "pagecounts-20121010-030000.gz", "pagecounts-20121010-040000.gz", "pagecounts-20121010-050000.gz", "pagecounts-20121010-060000.gz", "pagecounts-20121010-070000.gz", "pagecounts-20121010-080000.gz", "pagecounts-20121010-090000.gz", "pagecounts-20121010-100000.gz", "pagecounts-20121010-110001.gz", "pagecounts-20121010-120000.gz", "pagecounts-20121010-130000.gz", "pagecounts-20121010-140000.gz", "pagecounts-20121010-150000.gz", "pagecounts-20121010-160000.gz", "pagecounts-20121010-170000.gz", "pagecounts-20121010-180000.gz", "pagecounts-20121010-190000.gz", "pagecounts-20121010-200000.gz", "pagecounts-20121010-210000.gz", "pagecounts-20121010-220000.gz", "pagecounts-20121010-230000.gz", "pagecounts-20121011-000000.gz", "pagecounts-20121011-010001.gz", "pagecounts-20121011-020000.gz", "pagecounts-20121011-030000.gz", "pagecounts-20121011-040000.gz", "pagecounts-20121011-050000.gz", "pagecounts-20121011-060000.gz", "pagecounts-20121011-070000.gz", "pagecounts-20121011-080000.gz", "pagecounts-20121011-090000.gz", "pagecounts-20121011-100000.gz", "pagecounts-20121011-110000.gz", "pagecounts-20121011-120000.gz", "pagecounts-20121011-130000.gz", "pagecounts-20121011-140000.gz", "pagecounts-20121011-150001.gz", "pagecounts-20121011-160000.gz", "pagecounts-20121011-170000.gz", "pagecounts-20121011-180000.gz", "pagecounts-20121011-190000.gz", "pagecounts-20121011-200000.gz", "pagecounts-20121011-210000.gz", "pagecounts-20121011-220000.gz", "pagecounts-20121011-230000.gz", "pagecounts-20121012-000000.gz", "pagecounts-20121012-010000.gz", "pagecounts-20121012-020000.gz", "pagecounts-20121012-030000.gz", "pagecounts-20121012-040000.gz", "pagecounts-20121012-050000.gz", "pagecounts-20121012-060001.gz", "pagecounts-20121012-070000.gz", "pagecounts-20121012-080000.gz", "pagecounts-20121012-090000.gz", "pagecounts-20121012-100000.gz", "pagecounts-20121012-110000.gz", "pagecounts-20121012-120000.gz", "pagecounts-20121012-130000.gz", "pagecounts-20121012-140000.gz", "pagecounts-20121012-150000.gz", "pagecounts-20121012-160000.gz", "pagecounts-20121012-170000.gz", "pagecounts-20121012-180000.gz", "pagecounts-20121012-190000.gz", "pagecounts-20121012-200001.gz", "pagecounts-20121012-210000.gz", "pagecounts-20121012-220000.gz", "pagecounts-20121012-230000.gz", "pagecounts-20121013-000000.gz", "pagecounts-20121013-010000.gz", "pagecounts-20121013-020000.gz", "pagecounts-20121013-030000.gz", "pagecounts-20121013-040000.gz", "pagecounts-20121013-050000.gz", "pagecounts-20121013-060000.gz", "pagecounts-20121013-070000.gz", "pagecounts-20121013-080000.gz", "pagecounts-20121013-090001.gz", "pagecounts-20121013-100000.gz", "pagecounts-20121013-110000.gz", "pagecounts-20121013-120000.gz", "pagecounts-20121013-130000.gz", "pagecounts-20121013-140000.gz", "pagecounts-20121013-150000.gz", "pagecounts-20121013-160000.gz", "pagecounts-20121013-170000.gz", "pagecounts-20121013-180000.gz", "pagecounts-20121013-190000.gz", "pagecounts-20121013-200000.gz", "pagecounts-20121013-210000.gz", "pagecounts-20121013-220001.gz", "pagecounts-20121013-230000.gz", "pagecounts-20121014-000000.gz", "pagecounts-20121014-010000.gz", "pagecounts-20121014-020000.gz", "pagecounts-20121014-030000.gz", "pagecounts-20121014-040000.gz", "pagecounts-20121014-050000.gz", "pagecounts-20121014-060000.gz", "pagecounts-20121014-070000.gz", "pagecounts-20121014-080000.gz", "pagecounts-20121014-090000.gz", "pagecounts-20121014-100000.gz", "pagecounts-20121014-110000.gz", "pagecounts-20121014-120001.gz", "pagecounts-20121014-130000.gz", "pagecounts-20121014-140000.gz", "pagecounts-20121014-150000.gz", "pagecounts-20121014-160000.gz", "pagecounts-20121014-170000.gz", "pagecounts-20121014-180000.gz", "pagecounts-20121014-190000.gz", "pagecounts-20121014-200000.gz", "pagecounts-20121014-210000.gz", "pagecounts-20121014-220000.gz", "pagecounts-20121014-230000.gz", "pagecounts-20121015-000000.gz", "pagecounts-20121015-010000.gz", "pagecounts-20121015-020001.gz", "pagecounts-20121015-030000.gz", "pagecounts-20121015-040000.gz", "pagecounts-20121015-050000.gz", "pagecounts-20121015-060000.gz", "pagecounts-20121015-070000.gz", "pagecounts-20121015-080000.gz", "pagecounts-20121015-090000.gz", "pagecounts-20121015-100000.gz", "pagecounts-20121015-110000.gz", "pagecounts-20121015-120000.gz", "pagecounts-20121015-130000.gz", "pagecounts-20121015-140001.gz", "pagecounts-20121015-150000.gz", "pagecounts-20121015-160000.gz", "pagecounts-20121015-170000.gz", "pagecounts-20121015-180000.gz", "pagecounts-20121015-190000.gz", "pagecounts-20121015-200000.gz", "pagecounts-20121015-210000.gz", "pagecounts-20121015-220000.gz", "pagecounts-20121015-230000.gz", "pagecounts-20121016-000000.gz", "pagecounts-20121016-010000.gz", "pagecounts-20121016-020000.gz", "pagecounts-20121016-030000.gz", "pagecounts-20121016-040001.gz", "pagecounts-20121016-050000.gz", "pagecounts-20121016-060000.gz", "pagecounts-20121016-070000.gz", "pagecounts-20121016-080000.gz", "pagecounts-20121016-090000.gz", "pagecounts-20121016-100000.gz", "pagecounts-20121016-110000.gz", "pagecounts-20121016-120000.gz", "pagecounts-20121016-130000.gz", "pagecounts-20121016-140000.gz", "pagecounts-20121016-150000.gz", "pagecounts-20121016-160001.gz", "pagecounts-20121016-170000.gz", "pagecounts-20121016-180000.gz", "pagecounts-20121016-190000.gz", "pagecounts-20121016-200000.gz", "pagecounts-20121016-210000.gz", "pagecounts-20121016-220000.gz", "pagecounts-20121016-230000.gz", "pagecounts-20121017-000000.gz", "pagecounts-20121017-010000.gz", "pagecounts-20121017-020000.gz", "pagecounts-20121017-030000.gz", "pagecounts-20121017-040000.gz", "pagecounts-20121017-050000.gz", "pagecounts-20121017-060001.gz", "pagecounts-20121017-070000.gz", "pagecounts-20121017-080000.gz", "pagecounts-20121017-090000.gz", "pagecounts-20121017-100000.gz", "pagecounts-20121017-110000.gz", "pagecounts-20121017-120000.gz", "pagecounts-20121017-130000.gz", "pagecounts-20121017-140000.gz", "pagecounts-20121017-150000.gz", "pagecounts-20121017-160000.gz", "pagecounts-20121017-170000.gz", "pagecounts-20121017-180000.gz", "pagecounts-20121017-190000.gz", "pagecounts-20121017-200001.gz", "pagecounts-20121017-210000.gz", "pagecounts-20121017-220000.gz", "pagecounts-20121017-230000.gz", "pagecounts-20121018-000000.gz", "pagecounts-20121018-010000.gz", "pagecounts-20121018-020000.gz", "pagecounts-20121018-030000.gz", "pagecounts-20121018-040000.gz", "pagecounts-20121018-050000.gz", "pagecounts-20121018-060000.gz", "pagecounts-20121018-070000.gz", "pagecounts-20121018-080000.gz", "pagecounts-20121018-090000.gz", "pagecounts-20121018-100001.gz", "pagecounts-20121018-110000.gz", "pagecounts-20121018-120000.gz", "pagecounts-20121018-130000.gz", "pagecounts-20121018-140000.gz", "pagecounts-20121018-150000.gz", "pagecounts-20121018-160000.gz", "pagecounts-20121018-170000.gz", "pagecounts-20121018-180000.gz", "pagecounts-20121018-190000.gz", "pagecounts-20121018-200000.gz", "pagecounts-20121018-210000.gz", "pagecounts-20121018-220000.gz", "pagecounts-20121018-230000.gz", "pagecounts-20121019-000001.gz", "pagecounts-20121019-010000.gz", "pagecounts-20121019-020000.gz", "pagecounts-20121019-030000.gz", "pagecounts-20121019-040000.gz", "pagecounts-20121019-050000.gz", "pagecounts-20121019-060000.gz", "pagecounts-20121019-070000.gz", "pagecounts-20121019-080000.gz", "pagecounts-20121019-090000.gz", "pagecounts-20121019-100000.gz", "pagecounts-20121019-110000.gz", "pagecounts-20121019-120000.gz", "pagecounts-20121019-130000.gz", "pagecounts-20121019-140001.gz", "pagecounts-20121019-150000.gz", "pagecounts-20121019-160000.gz", "pagecounts-20121019-170000.gz", "pagecounts-20121019-180000.gz", "pagecounts-20121019-190000.gz", "pagecounts-20121019-200000.gz", "pagecounts-20121019-210000.gz", "pagecounts-20121019-220000.gz", "pagecounts-20121019-230000.gz", "pagecounts-20121020-000000.gz", "pagecounts-20121020-010000.gz", "pagecounts-20121020-020000.gz", "pagecounts-20121020-030000.gz", "pagecounts-20121020-040001.gz", "pagecounts-20121020-050000.gz", "pagecounts-20121020-060000.gz", "pagecounts-20121020-070000.gz", "pagecounts-20121020-080000.gz", "pagecounts-20121020-090000.gz", "pagecounts-20121020-100000.gz", "pagecounts-20121020-110000.gz", "pagecounts-20121020-120000.gz", "pagecounts-20121020-130000.gz", "pagecounts-20121020-140000.gz", "pagecounts-20121020-150000.gz", "pagecounts-20121020-160000.gz", "pagecounts-20121020-170000.gz", "pagecounts-20121020-180001.gz", "pagecounts-20121020-190000.gz", "pagecounts-20121020-200000.gz", "pagecounts-20121020-210000.gz", "pagecounts-20121020-220000.gz", "pagecounts-20121020-230000.gz", "pagecounts-20121021-000000.gz", "pagecounts-20121021-010000.gz", "pagecounts-20121021-020000.gz", "pagecounts-20121021-030000.gz", "pagecounts-20121021-040000.gz", "pagecounts-20121021-050000.gz", "pagecounts-20121021-060000.gz", "pagecounts-20121021-070000.gz", "pagecounts-20121021-080001.gz", "pagecounts-20121021-090000.gz", "pagecounts-20121021-100000.gz", "pagecounts-20121021-110000.gz", "pagecounts-20121021-120000.gz", "pagecounts-20121021-130000.gz", "pagecounts-20121021-140000.gz", "pagecounts-20121021-150000.gz", "pagecounts-20121021-160000.gz", "pagecounts-20121021-170000.gz", "pagecounts-20121021-180000.gz", "pagecounts-20121021-190000.gz", "pagecounts-20121021-200000.gz", "pagecounts-20121021-210000.gz", "pagecounts-20121021-220001.gz", "pagecounts-20121021-230000.gz", "pagecounts-20121022-000000.gz", "pagecounts-20121022-010000.gz", "pagecounts-20121022-020000.gz", "pagecounts-20121022-030000.gz", "pagecounts-20121022-040000.gz", "pagecounts-20121022-050000.gz", "pagecounts-20121022-060000.gz", "pagecounts-20121022-070000.gz", "pagecounts-20121022-080000.gz", "pagecounts-20121022-090000.gz", "pagecounts-20121022-100000.gz", "pagecounts-20121022-110001.gz", "pagecounts-20121022-120000.gz", "pagecounts-20121022-130000.gz", "pagecounts-20121022-140000.gz", "pagecounts-20121022-150000.gz", "pagecounts-20121022-160000.gz", "pagecounts-20121022-170000.gz", "pagecounts-20121022-180000.gz", "pagecounts-20121022-190000.gz", "pagecounts-20121022-200000.gz", "pagecounts-20121022-210000.gz", "pagecounts-20121022-220000.gz", "pagecounts-20121022-230000.gz", "pagecounts-20121023-000001.gz", "pagecounts-20121023-010000.gz", "pagecounts-20121023-020000.gz", "pagecounts-20121023-030000.gz", "pagecounts-20121023-040000.gz", "pagecounts-20121023-050000.gz", "pagecounts-20121023-060000.gz", "pagecounts-20121023-070000.gz", "pagecounts-20121023-080000.gz", "pagecounts-20121023-090000.gz", "pagecounts-20121023-100000.gz", "pagecounts-20121023-110000.gz", "pagecounts-20121023-120000.gz", "pagecounts-20121023-130000.gz", "pagecounts-20121023-140000.gz", "pagecounts-20121023-150001.gz", "pagecounts-20121023-160000.gz", "pagecounts-20121023-170000.gz", "pagecounts-20121023-180000.gz", "pagecounts-20121023-190000.gz", "pagecounts-20121023-200000.gz", "pagecounts-20121023-210000.gz", "pagecounts-20121023-220000.gz", "pagecounts-20121023-230000.gz", "pagecounts-20121024-000000.gz", "pagecounts-20121024-010000.gz", "pagecounts-20121024-020000.gz", "pagecounts-20121024-030001.gz", "pagecounts-20121024-040000.gz", "pagecounts-20121024-050000.gz", "pagecounts-20121024-060000.gz", "pagecounts-20121024-070000.gz", "pagecounts-20121024-080000.gz", "pagecounts-20121024-090000.gz", "pagecounts-20121024-100000.gz", "pagecounts-20121024-110000.gz", "pagecounts-20121024-120000.gz", "pagecounts-20121024-130000.gz", "pagecounts-20121024-140000.gz", "pagecounts-20121024-150000.gz", "pagecounts-20121024-160001.gz", "pagecounts-20121024-170000.gz", "pagecounts-20121024-180000.gz", "pagecounts-20121024-190000.gz", "pagecounts-20121024-200000.gz", "pagecounts-20121024-210000.gz", "pagecounts-20121024-220000.gz", "pagecounts-20121024-230000.gz", "pagecounts-20121025-000000.gz", "pagecounts-20121025-010000.gz", "pagecounts-20121025-020000.gz", "pagecounts-20121025-030000.gz", "pagecounts-20121025-040000.gz", "pagecounts-20121025-050001.gz", "pagecounts-20121025-060000.gz", "pagecounts-20121025-070000.gz", "pagecounts-20121025-080000.gz", "pagecounts-20121025-090000.gz", "pagecounts-20121025-100000.gz", "pagecounts-20121025-110000.gz", "pagecounts-20121025-120000.gz", "pagecounts-20121025-130000.gz", "pagecounts-20121025-140000.gz", "pagecounts-20121025-150000.gz", "pagecounts-20121025-160000.gz", "pagecounts-20121025-170001.gz", "pagecounts-20121025-180000.gz", "pagecounts-20121025-190000.gz", "pagecounts-20121025-200000.gz", "pagecounts-20121025-210000.gz", "pagecounts-20121025-220000.gz", "pagecounts-20121025-230000.gz", "pagecounts-20121026-000000.gz", "pagecounts-20121026-010000.gz", "pagecounts-20121026-020000.gz", "pagecounts-20121026-030000.gz", "pagecounts-20121026-040000.gz", "pagecounts-20121026-050000.gz", "pagecounts-20121026-060000.gz", "pagecounts-20121026-070001.gz", "pagecounts-20121026-080000.gz", "pagecounts-20121026-090000.gz", "pagecounts-20121026-100000.gz", "pagecounts-20121026-110000.gz", "pagecounts-20121026-120000.gz", "pagecounts-20121026-130000.gz", "pagecounts-20121026-140000.gz", "pagecounts-20121026-150000.gz", "pagecounts-20121026-160000.gz", "pagecounts-20121026-170000.gz", "pagecounts-20121026-180000.gz", "pagecounts-20121026-190000.gz", "pagecounts-20121026-200001.gz", "pagecounts-20121026-210000.gz", "pagecounts-20121026-220000.gz", "pagecounts-20121026-230000.gz", "pagecounts-20121027-000000.gz", "pagecounts-20121027-010000.gz", "pagecounts-20121027-020000.gz", "pagecounts-20121027-030000.gz", "pagecounts-20121027-040000.gz", "pagecounts-20121027-050000.gz", "pagecounts-20121027-060000.gz", "pagecounts-20121027-070000.gz", "pagecounts-20121027-080000.gz", "pagecounts-20121027-090001.gz", "pagecounts-20121027-100000.gz", "pagecounts-20121027-110000.gz", "pagecounts-20121027-120000.gz", "pagecounts-20121027-130000.gz", "pagecounts-20121027-140000.gz", "pagecounts-20121027-150000.gz", "pagecounts-20121027-160000.gz", "pagecounts-20121027-170000.gz", "pagecounts-20121027-180000.gz", "pagecounts-20121027-190000.gz", "pagecounts-20121027-200000.gz", "pagecounts-20121027-210000.gz", "pagecounts-20121027-220001.gz", "pagecounts-20121027-230000.gz", "pagecounts-20121028-000000.gz", "pagecounts-20121028-010000.gz", "pagecounts-20121028-020000.gz", "pagecounts-20121028-030000.gz", "pagecounts-20121028-040000.gz", "pagecounts-20121028-050000.gz", "pagecounts-20121028-060000.gz", "pagecounts-20121028-070000.gz", "pagecounts-20121028-080000.gz", "pagecounts-20121028-090000.gz", "pagecounts-20121028-100000.gz", "pagecounts-20121028-110000.gz", "pagecounts-20121028-120001.gz", "pagecounts-20121028-130000.gz", "pagecounts-20121028-140000.gz", "pagecounts-20121028-150000.gz", "pagecounts-20121028-160000.gz", "pagecounts-20121028-170000.gz", "pagecounts-20121028-180000.gz", "pagecounts-20121028-190000.gz", "pagecounts-20121028-200000.gz", "pagecounts-20121028-210000.gz", "pagecounts-20121028-220000.gz", "pagecounts-20121028-230000.gz", "pagecounts-20121029-000000.gz", "pagecounts-20121029-010001.gz", "pagecounts-20121029-020000.gz", "pagecounts-20121029-030000.gz", "pagecounts-20121029-040000.gz", "pagecounts-20121029-050000.gz", "pagecounts-20121029-060000.gz", "pagecounts-20121029-070000.gz", "pagecounts-20121029-080000.gz", "pagecounts-20121029-090000.gz", "pagecounts-20121029-100000.gz", "pagecounts-20121029-110000.gz", "pagecounts-20121029-120000.gz", "pagecounts-20121029-130000.gz", "pagecounts-20121029-140000.gz", "pagecounts-20121029-150001.gz", "pagecounts-20121029-160000.gz", "pagecounts-20121029-170000.gz", "pagecounts-20121029-180000.gz", "pagecounts-20121029-190000.gz", "pagecounts-20121029-200000.gz", "pagecounts-20121029-210000.gz", "pagecounts-20121029-220000.gz", "pagecounts-20121029-230000.gz", "pagecounts-20121030-000000.gz", "pagecounts-20121030-010000.gz", "pagecounts-20121030-020000.gz", "pagecounts-20121030-030000.gz", "pagecounts-20121030-040001.gz", "pagecounts-20121030-050000.gz", "pagecounts-20121030-060000.gz", "pagecounts-20121030-070000.gz", "pagecounts-20121030-080000.gz", "pagecounts-20121030-090000.gz", "pagecounts-20121030-100000.gz", "pagecounts-20121030-110000.gz", "pagecounts-20121030-120000.gz", "pagecounts-20121030-130000.gz", "pagecounts-20121030-140000.gz", "pagecounts-20121030-150000.gz", "pagecounts-20121030-160000.gz", "pagecounts-20121030-170001.gz", "pagecounts-20121030-180000.gz", "pagecounts-20121030-190000.gz", "pagecounts-20121030-200000.gz", "pagecounts-20121030-210000.gz", "pagecounts-20121030-220000.gz", "pagecounts-20121030-230000.gz", "pagecounts-20121031-000000.gz", "pagecounts-20121031-010000.gz", "pagecounts-20121031-020000.gz", "pagecounts-20121031-030000.gz", "pagecounts-20121031-040000.gz", "pagecounts-20121031-050000.gz", "pagecounts-20121031-060001.gz", "pagecounts-20121031-070000.gz", "pagecounts-20121031-080000.gz", "pagecounts-20121031-090000.gz", "pagecounts-20121031-100000.gz", "pagecounts-20121031-110000.gz", "pagecounts-20121031-120000.gz", "pagecounts-20121031-130000.gz", "pagecounts-20121031-140000.gz", "pagecounts-20121031-150000.gz", "pagecounts-20121031-160000.gz", "pagecounts-20121031-170000.gz", "pagecounts-20121031-180000.gz", "pagecounts-20121031-190001.gz", "pagecounts-20121031-200000.gz", "pagecounts-20121031-210000.gz", "pagecounts-20121031-220000.gz", "pagecounts-20121031-230000.gz", ] import os base = "http://dumps.wikimedia.org/other/pagecounts-raw/" tail = "2012/2012-10/" i = 0 for url in urls: print "%d completeted of %d total. %d remaining" % (i, len(urls), len(urls) - i) #os.system("curl --silent -O %s >> /dev/null" % (base + tail + url)) os.system("curl -O %s" % (base + tail + url)) i = i + 1
mit
190,367,817,570,999,400
31.883752
82
0.78512
false
jenskutilek/Glyphs-Scripts
Layers/Delete all non-Master layers.py
1
1836
# MenuTitle: Delete all non-Master layers # -*- coding: utf-8 -*- from __future__ import ( absolute_import, division, print_function, unicode_literals, ) __doc__ = """ Goes through selected glyphs and deletes all glyph layers which are not a Master, Bracket or Brace layer. """ Font = Glyphs.font selectedLayers = Font.selectedLayers searchTerms = ["[]", "{}"] def process(thisGlyph): count = 0 numberOfLayers = len(thisGlyph.layers) for i in range(numberOfLayers)[::-1]: thisLayer = thisGlyph.layers[i] if ( thisLayer.layerId != thisLayer.associatedMasterId ): # not the master layer thisLayerName = thisLayer.name thisLayerShouldBeRemoved = True if thisLayerName: # always delete unnamed layers for parentheses in searchTerms: opening = parentheses[0] closing = parentheses[1] # check if ONE of them is at the END of the layer name, like: # Bold [160], Bold [160[, Bold ]160], Regular {120} if thisLayerName.endswith( opening ) or thisLayerName.endswith(closing): thisLayerShouldBeRemoved = False if thisLayerShouldBeRemoved: count += 1 del thisGlyph.layers[i] return count Font.disableUpdateInterface() for thisLayer in selectedLayers: thisGlyph = thisLayer.parent thisGlyphName = thisGlyph.name if str(thisGlyphName)[:7] != "_smart.": thisGlyph.beginUndo() print("%s layers deleted in %s." % (process(thisGlyph), thisGlyphName)) thisGlyph.endUndo() else: print("Smart layers kept in %s." % (thisGlyphName)) Font.enableUpdateInterface()
mit
-8,980,516,049,966,369,000
28.142857
105
0.592593
false
jacoor/sew_django
config/dev/local_settings.py
1
1070
# -*- coding: utf-8 -*- import os DEBUG=True SASS_DEBUG = DEBUG TEMPLATE_DEBUG=DEBUG #COMPRESS_ENABLED=True PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) ADMINS = ( ('jacek', '[email protected]'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': '', 'USER': '', 'PASSWORD': '', 'HOST': "127.0.0.1", 'PORT': '3306', }, } EMAIL_USE_TLS = True EMAIL_HOST = 'email-smtp.us-east-1.amazonaws.com' EMAIL_HOST_PASSWORD = '' EMAIL_HOST_USER = 'AKIAIBZV3BA6HZSHI5BQ' EMAIL_PORT = 587 DEFAULT_FROM_EMAIL = '' #ENV_PREFIX = 'styleguide-local' ALLOWED_HOSTS = [ 'am.ivolution.pl', '127.0.0.1', ] INTERNAL_IPS = ( "127.0.0.1", ) if SASS_DEBUG: COMPRESS_PRECOMPILERS = ( #('text/x-scss', 'sass --scss --debug-info {infile} {outfile}'), ('text/x-scss', 'sass --scss --compass --debug-info {infile} {outfile}'), ) else: COMPRESS_PRECOMPILERS = ( ('text/x-scss', 'sass --scss --compass {infile} {outfile}'), )
mit
-7,958,092,836,899,876,000
19.596154
82
0.575701
false
freeserver/readerss
grabber/engines/base.py
1
2008
from models.model import Feed, Entry class BaseDB(object): """ The base implementation of the database interface. """ TABLES = [ Feed, Entry ] def __init__(self, connection_string): """ Sets up connection to mongo database. :param connection_string: the string (as a json type in this case) that represents how to connect to the database server """ raise NotImplementedError() def setup_database(self): """ Sets up database tables if need be. """ raise NotImplementedError() def get_item(self, collection, id=None, **filters): """ Retrieve an item from the database. :param collection:the type of data to retrieve :param id:the unique identifier of the item to retrieve :param filters:a dictionary of items to match on. """ raise NotImplementedError() def get_items(self, collection, **filters): """ Similar to `get_item` but it returns more than one item and can also have a filter applied to specify the data to return :param collection:the type of data to retrieve :param id:the unique identifier of the item to retrieve :param filters:a dictionary of items to match on. """ raise NotImplementedError() def add_item(self, collection, data): """ Adds data to the database. :param collection:the type of data to retrieve :param data:the data to add to the database. """ raise NotImplementedError() def remove_item(self, collection, id=None, **filters): """ Delete items from collection. :param collection:the type of data to select :param id:the unique identifier of the item to retrieve :param filters:a dictionary of items to match on. """ raise NotImplementedError() DATABASE=BaseDB
agpl-3.0
3,253,627,756,864,543,000
30.873016
71
0.601594
false
Oldentide/Oldentide
db/tools/character_builder_scraper.py
2
9353
#!/bin/python # This script will parse and reformat all of the race and profession modifiers in the RoE files. # Modules. import argparse import os import pprint import re import sys import time # Set up command line arguments. parser = argparse.ArgumentParser(description='This script will parse and reformat all of the profession and class modifiers in the RoE files.') parser.add_argument('crsm_dir', type=str, help='Full path of the Crsm folder in the RoE game directory.') args = parser.parse_args() # Initialize path and files. race_modifiers_file = 'race_templates.csv' profession_modifiers_file = 'profession_templates.csv' # Initialize modifiers data structures. skills = ( "Hppl", "Mppl", "Strength", "Constitution", "Intelligence", "Dexterity", "Axe", "Dagger", "Hammer", "Polearm", "Spear", "Staff", "Sword", "Unarmed", "Archery", "Crossbow", "Sling", "Thrown", "Armor", "Dual Weapon", "Shield", "Bardic", "Conjuring", "Druidic", "Illusion", "Necromancy", "Shamanic", "Sorcery", "Summoning", "Spellcraft", "Focus", "Alchemy", "Armorsmithing", "Calligraphy", "Enchanting", "Fletching", "Lapidary", "Tailoring", "Weaponsmithing", "Herbalism", "Hunting", "Mining", "Bargaining", "Camping", "First Aid", "Lore", "Pick Locks", "Scouting", "Search", "Stealth", "Traps", "Aeolandis", "Hieroform", "High Gundis", "Old Praxic", "Praxic", "Runic", "Skill_1_multi", "Skill_1_names", "Skill_1_value", "Skill_2_multi", "Skill_2_names", "Skill_2_value", "Skill_3_multi", "Skill_3_names", "Skill_3_value", "Skill_4_multi", "Skill_4_names", "Skill_4_value", "Skill_5_multi", "Skill_5_names", "Skill_5_value", "Description" ) headers = ( "hppl", "mppl", "strength_mod", "constitution_mod", "intelligence_mod", "dexterity_mod", "axe_mod", "dagger_mod", "hammer_mod", "polearm_mod", "spear_mod", "staff_mod", "sword_mod", "unarmed_mod", "archery_mod", "crossbow_mod", "sling_mod", "thrown_mod", "armor_mod", "dualweapon_mod", "shield_mod", "bardic_mod", "conjuring_mod", "druidic_mod", "illusion_mod", "necromancy_mod", "shamanic_mod", "sorcery_mod", "summoning_mod", "spellcraft_mod", "focus_mod", "alchemy_mod", "armorsmithing_mod", "calligraphy_mod", "enchanting_mod", "fletching_mod", "lapidary_mod", "tailoring_mod", "weaponsmithing_mod", "herbalism_mod", "hunting_mod", "mining_mod", "bargaining_mod", "camping_mod", "firstaid_mod", "lore_mod", "picklocks_mod", "scouting_mod", "search_mod", "stealth_mod", "traps_mod", "aeolandis_mod", "hieroform_mod", "highgundis_mod", "oldpraxic_mod", "praxic_mod", "runic_mod", "skill_1_multi", "skill_1_names", "skill_1_value", "skill_2_multi", "skill_2_names", "skill_2_value", "skill_3_multi", "skill_3_names", "skill_3_value", "skill_4_multi", "skill_4_names", "skill_4_value", "skill_5_multi", "skill_5_names", "skill_5_value", "description" ) races = dict() professions = dict() # Parse race modifiers and store in data structure. races_path = args.crsm_dir + "\\rsm" print("Parsing character race modifiers in \"" + races_path + "\"") for filename in os.listdir(races_path): race_name = filename.split('.')[0] race_dict = dict() race_file_path = races_path + "\\" + filename race_data = open(race_file_path).readlines() for line in race_data: skill, mod = line.rstrip("\n").rsplit(None,1) if skill in skills: race_dict[skill] = float(mod) if race_name == "Dwarf": race_dict["Strength"] = 5.0 race_dict["Constitution"] = 15.0 race_dict["Intelligence"] = -5.0 race_dict["Dexterity"] = -15.0 elif race_name == "Elf": race_dict["Strength"] = -5.0 race_dict["Constitution"] = -15.0 race_dict["Intelligence"] = 5.0 race_dict["Dexterity"] = 15.0 elif race_name == "Gnome": race_dict["Strength"] = -10.0 race_dict["Constitution"] = -10.0 race_dict["Intelligence"] = 10.0 race_dict["Dexterity"] = 10.0 elif race_name == "Human": race_dict["Strength"] = 0.0 race_dict["Constitution"] = 0.0 race_dict["Intelligence"] = 0.0 race_dict["Dexterity"] = 0.0 elif race_name == "Leshy": race_dict["Strength"] = -15.0 race_dict["Constitution"] = -5.0 race_dict["Intelligence"] = 20.0 race_dict["Dexterity"] = 0.0 elif race_name == "Ogre": race_dict["Strength"] = 20.0 race_dict["Constitution"] = 5.0 race_dict["Intelligence"] = -15.0 race_dict["Dexterity"] = -10.0 elif race_name == "Orc": race_dict["Strength"] = 5.0 race_dict["Constitution"] = 0.0 race_dict["Intelligence"] = -10.0 race_dict["Dexterity"] = 5.0 races[race_name] = race_dict # Parse profession modifiers and store in a data structure. professions_path = args.crsm_dir + "\\csm" print("Parsing character profession modifiers in \"" + professions_path + "\"") for filename in os.listdir(professions_path): profession_name = filename.split('.')[0] profession_dict = dict() profession_file_path = professions_path + "\\" + filename profession_data = open(profession_file_path).readlines() for line in profession_data: if line == profession_data[0]: hppl, mppl = line.split(" ") profession_dict['Hppl'] = hppl.rstrip("\n") profession_dict['Mppl'] = mppl.rstrip("\n") else: skill, mod = line.rstrip("\n").rsplit(None,1) if skill in skills: profession_dict[skill] = float(mod) professions[profession_name] = profession_dict # Parse profession base info and store in a data structure. professions_base_path = args.crsm_dir + "\\crq" print("Parsing character profession base info in \"" + professions_base_path + "\"") for filename in os.listdir(professions_base_path): profession_base_name = filename.split('.')[0] profession_base_file_path = professions_base_path + "\\" + filename profession_base_data = open(profession_base_file_path).readlines() # State variables for parsing class skill options. optional = False base_mod = 0 skill_options = [] skill_option_index = 1 for line in profession_base_data: if (len(line.split()) > 1): skill, mod = line.rstrip("\n").rsplit(None,1) if skill == 'STR': professions[profession_base_name]['Strength'] = float(mod) elif skill == 'DEX': professions[profession_base_name]['Dexterity'] = float(mod) elif skill == 'CON': professions[profession_base_name]['Constitution'] = float(mod) elif skill == 'INT': professions[profession_base_name]['Intelligence'] = float(mod) elif skill in skills: sos = "Skill_" + str(skill_option_index) + "_multi" professions[profession_base_name][sos] = "0" sos = "Skill_" + str(skill_option_index) + "_names" professions[profession_base_name][sos] = skill sos = "Skill_" + str(skill_option_index) + "_value" professions[profession_base_name][sos] = mod skill_option_index += 1 elif skill == "*": sos = "Skill_" + str(skill_option_index) + "_multi" if mod == "0": professions[profession_base_name][sos] = "0" else: professions[profession_base_name][sos] = "1" sos = "Skill_" + str(skill_option_index) + "_value" professions[profession_base_name][sos] = mod skill_option_index += 1 else: skill = line.rstrip("\n") if skill in skills: sos = "Skill_" + str(skill_option_index) + "_names" if sos in professions[profession_base_name]: professions[profession_base_name][sos] += ("-" + skill) else: professions[profession_base_name][sos] = skill # Parse profession information and store in a data structure. info_path = args.crsm_dir + "\\info" print("Parsing character information in \"" + info_path + "\"") for filename in os.listdir(info_path): info_name = filename.split('.')[0] info_file_name = info_path + "\\" + filename info_data = open(info_file_name).readlines() if (info_data[-1] == "\n"): info_data = info_data[0:-1] if info_name in professions: professions[info_name]['Description'] = info_data[-1].rstrip("\n").replace(",", " -") elif info_name in races: races[info_name]['Description'] = info_data[-1].rstrip("\n").replace(",", " -") #pprint.pprint(races) #pprint.pprint(professions) # Write parsed race data to a csv file. race_mod_file = open(race_modifiers_file, "w+") race_mod_file.write("race") for header_key in headers: if not "skill_" in header_key and not "hppl" in header_key and not "mppl" in header_key: race_mod_file.write("," + header_key) race_mod_file.write("\n") for race in sorted(races): race_mod_file.write(race) for skill in skills: if not "Skill_" in skill and not "Hppl" in skill and not "Mppl" in skill: if skill in races[race]: race_mod_file.write("," + str(races[race][skill])) else: race_mod_file.write(",0.0") race_mod_file.write("\n") # Write parsed profession data to a csv file. profession_mod_file = open(profession_modifiers_file, "w+") profession_mod_file.write("profession") for header_key in headers: profession_mod_file.write("," + header_key) profession_mod_file.write("\n") for profession in sorted(professions): profession_mod_file.write(profession) for skill in skills: if skill in professions[profession]: profession_mod_file.write("," + str(professions[profession][skill])) else: profession_mod_file.write(",0.0") profession_mod_file.write("\n")
gpl-2.0
-4,958,627,607,280,227,000
26.431085
143
0.651449
false
ACCUConf/ACCUConf_Submission_Web_Application
accuconf_cfp/views/review.py
1
11087
"""Routes associated with reviewing submitted proposals.""" from flask import jsonify, render_template, request, session from accuconf_cfp import app, db, year from accuconf_cfp.utils import is_acceptable_route, is_logged_in, md from models.proposal import Proposal from models.proposal_types import sessiontype_descriptions from models.role_types import Role from models.score import CommentForProposer, CommentForCommittee, Score from models.user import User base_page = { 'year': year, } def already_reviewed(proposal, reviewer): return any(x.proposal == proposal for x in reviewer.scores) @app.route('/review_list') def review_list(): check = is_acceptable_route() if not check[0]: return check[1] assert check[1] is None if is_logged_in(): user = User.query.filter_by(email=session['email']).first() if not user: return render_template('/general.html', page=md(base_page, { 'pagetitle': 'Review List Failed', 'data': 'Logged in user is not a registered user. This cannot happen.', })) if user.role != Role.reviewer: return render_template('/general.html', page=md(base_page, { 'pagetitle': 'Review List Failed', 'data': 'Logged in user is not a registered reviewer.', })) # TODO reviewer cannot review proposed proposals (done) but what about being a presenter? proposals = [(p.id, p.title, lead.presenter.name, p.session_type.value, already_reviewed(p, user)) for p in Proposal.query.all() if p.proposer != user for lead in p.proposal_presenters if lead.is_lead ] return render_template('/review_list.html', page=md(base_page, { 'pagetitle': 'List of Proposals', 'data': 'Please click on the proposal you wish to review.', 'proposals': proposals, })) return render_template('review_list.html', page=md(base_page, { 'pagetitle': 'Review List Failed', 'data': 'You must be registered, logged in, and a reviewer to review proposals', })) def _reviewer_is_in_proposal(reviewer, proposal): if reviewer.email == proposal.proposer.email: return True for p in proposal.presenters: if reviewer.email == p.email: return True return False def _reviewer_is_in_proposal_index(reviewer, i): proposal = Proposal.query.filter_by(id=i).all() if not proposal: return False assert len(proposal) == 1 proposal = proposal[0] return _reviewer_is_in_proposal(reviewer, proposal) @app.route('/review_proposal/<int:id>', methods=['GET', 'POST']) def review_proposal(id): check = is_acceptable_route() if not check[0]: return check[1] assert check[1] is None if is_logged_in(): reviewer = User.query.filter_by(email=session['email']).first() if request.method == 'POST': review_data = request.json if not reviewer: response = jsonify('Logged in person is not a reviewer. This cannot happen.') response.status_code = 400 return response proposal = Proposal.query.filter_by(id=id).first() if not proposal: response = jsonify('Proposal cannot be found. This cannot happen.') response.status_code = 400 return response # TODO Is this the right way of doing this? score = Score.query.filter_by(proposal=proposal, scorer=reviewer).all() if score: assert len(score) == 1 score[0].score = review_data['score'] else: db.session.add(Score(proposal, reviewer, review_data['score'])) if review_data['comment_for_proposer']: comment = CommentForProposer.query.filter_by(proposal=proposal, commenter=reviewer).all() if comment: comment[0].comment = review_data['comment_for_proposer'] else: db.session.add(CommentForProposer(proposal, reviewer, review_data['comment_for_proposer'])) if review_data['comment_for_committee']: comment = CommentForCommittee.query.filter_by(proposal=proposal, commenter=reviewer).all() if comment: comment[0].comment = review_data['comment_for_committee'] else: db.session.add(CommentForCommittee(proposal, reviewer, review_data['comment_for_committee'])) db.session.commit() return jsonify('Review stored.') if not reviewer: return render_template('/general.html', page=md(base_page, { 'pagetitle': 'Review Proposal Failed', 'data': 'Logged in user is not a registered user. This cannot happen.', })) if reviewer.role != Role.reviewer: return render_template('/general.html', page=md(base_page, { 'pagetitle': 'Review Proposal Failed', 'data': 'Logged in user is not a registered reviewer.', })) number_of_proposals = Proposal.query.count() if not (1 <= id <= number_of_proposals): return render_template('general.html', page=md(base_page, { 'pagetitle': 'Review Proposal Failed', 'data': 'Requested proposal does not exist.', })) proposal = Proposal.query.filter_by(id=id).first() presenters = [{'name': p.name, 'bio': p.bio} for p in proposal.presenters] score = '' comment_for_proposer = '' comment_for_committee = '' if already_reviewed(proposal, reviewer): scores = [s for s in reviewer.scores if s.proposal == proposal] assert len(scores) == 1 score = scores[0].score comments_for_proposer = [c for c in reviewer.comments_for_proposer if c.proposal == proposal] if comments_for_proposer: comment_for_proposer = comments_for_proposer[0].comment comments_for_committee = [c for c in reviewer.comments_for_committee if c.proposal == proposal] if comments_for_committee: comment_for_committee = comments_for_committee[0].comment has_next = id < number_of_proposals if has_next: for i in range(id + 1, number_of_proposals + 1): if not _reviewer_is_in_proposal_index(reviewer, i): break else: has_next = False has_previous = id > 1 if has_previous: for i in range(id - 1, 0, -1): if not _reviewer_is_in_proposal_index(reviewer, i): break else: has_previous = False return render_template('/review_proposal.html', page=md(base_page, { 'pagetitle': 'Proposal to Review', 'data': 'There is no specific "do nothing" button, to not do anything simply navigate away from this page.', 'proposal_id': id, 'title': proposal.title, 'summary': proposal.summary, 'session_type': sessiontype_descriptions[proposal.session_type], 'audience': proposal.audience.value, 'notes': proposal.notes, 'presenters': presenters, 'button_label': 'Submit' if not score else 'Update', 'score': score, 'comment_for_proposer': comment_for_proposer, 'comment_for_committee': comment_for_committee, 'has_previous': has_previous, 'has_next': has_next, })) return render_template('general.html', page=md(base_page, { 'pagetitle': 'Review Proposal Failed', 'data': 'You must be registered, logged in, and a reviewer to review a proposal', })) @app.route('/previous_proposal/<int:id>/<int:unreviewed>') def previous_proposal(id, unreviewed): check = is_acceptable_route() if not check[0]: return check[1] assert check[1] is None if is_logged_in(): user = User.query.filter_by(email=session['email']).first() if user.role != Role.reviewer: return render_template('/general.html', page=md(base_page, { 'pagetitle': 'Proposal Navigation Failed', 'data': 'Logged in user is not a registered reviewer.', })) if not unreviewed: for i in range(id - 1, 0, -1): if not _reviewer_is_in_proposal_index(user, i): return jsonify(i) response = jsonify("Requested proposal does not exist.") response.status_code = 400 return response for i in range(id - 1, 0, -1): proposal = Proposal.query.filter_by(id=i).first() if not proposal: break if not already_reviewed(proposal, user): if not _reviewer_is_in_proposal(user, proposal): return jsonify(i) response = jsonify("Requested proposal does not exist.") response.status_code = 400 return response return render_template('general.html', page=md(base_page, { 'pagetitle': 'Proposal Navigation Failed', 'data': 'You must be registered, logged in, and a reviewer to review a proposal', })) @app.route('/next_proposal/<int:id>/<int:unreviewed>') def next_proposal(id, unreviewed): check = is_acceptable_route() if not check[0]: return check[1] assert check[1] is None if is_logged_in(): user = User.query.filter_by(email=session['email']).first() if user.role != Role.reviewer: return render_template('/general.html', page=md(base_page, { 'pagetitle': 'Proposal Navigation Failed', 'data': 'Logged in user is not a registered reviewer.', })) if not unreviewed: number_of_proposals = Proposal.query.count() for i in range(id + 1, number_of_proposals + 1): if not _reviewer_is_in_proposal_index(user, i): return jsonify(i) response = jsonify("Requested proposal does not exist.") response.status_code = 400 return response i = id + 1 while True: proposal = Proposal.query.filter_by(id=i).first() if not proposal: break if not already_reviewed(proposal, user): if not _reviewer_is_in_proposal(user, proposal): return jsonify(i) i += 1 response = jsonify("Requested proposal does not exist.") response.status_code = 400 return response return render_template('general.html', page=md(base_page, { 'pagetitle': 'Proposal Navigation Failed', 'data': 'You must be registered, logged in, and a reviewer to review a proposal', }))
gpl-3.0
8,220,997,768,545,114,000
42.478431
120
0.582394
false
fritzgerald/NehePyOpenGL
01-05/nehe-02.py
1
2520
#!/usr/bin/env python import glfw import OpenGL.GL as gl import OpenGL.GLU as glu window_width = 640 window_height = 480 def main(): # Initialize the library if not glfw.init(): return # Create a windowed mode window and its OpenGL context window = glfw.create_window(window_width, window_height, "Hello World", None, None) if not window: glfw.terminate() return # Make the window's context current glfw.make_context_current(window) glfw.set_window_size_callback(window, on_window_size) initGL(window) # Loop until the user closes the window while not glfw.window_should_close(window): # Render here, e.g. using pyOpenGL display() # Swap front and back buffers glfw.swap_buffers(window) # Poll for and process events glfw.poll_events() glfw.terminate() def on_window_size(window, w, h): # get the frame buffer size and don't rely on the window # the window size and the framebuffer can vary on retina displays size_w, size_h = glfw.get_framebuffer_size(window) window_width = size_w window_height = size_h gl.glViewport(0, 0, window_width, window_height) #Reset The Current Viewport And Perspective Transformation gl.glMatrixMode(gl.GL_PROJECTION) #Select The Projection Matrix gl.glLoadIdentity() #Reset The Projection Matrix glu.gluPerspective(45.0,window_width/window_height,0.1,100.0) #Calculate The Aspect Ratio Of The Window gl.glMatrixMode(gl.GL_MODELVIEW) #Select The Modelview Matrix def initGL(window): gl.glClearColor(0.40,0.58,0.93,1.0) #cornflower blue gl.glClearDepth(1.0) #Enables Clearing Of The Depth Buffer gl.glDepthFunc(gl.GL_LESS) #The Type Of Depth Test To Do gl.glEnable(gl.GL_DEPTH_TEST) #Enables Depth Testing gl.glShadeModel(gl.GL_SMOOTH) #Enables Smooth Color Shading on_window_size(window, window_width, window_height) def display(): gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT) gl.glLoadIdentity() gl.glTranslatef(-1.5,0.0,-6.0) gl.glBegin(gl.GL_TRIANGLES) gl.glVertex3f( 0.0, 1.0, 0.0) gl.glVertex3f(-1.0,-1.0, 0.0) gl.glVertex3f( 1.0,-1.0, 0.0) gl.glEnd() gl.glLoadIdentity() gl.glTranslatef(1.5,0.0,-6.0) gl.glBegin(gl.GL_QUADS) gl.glVertex3f(-1.0, 1.0, 0.0) gl.glVertex3f( 1.0, 1.0, 0.0) gl.glVertex3f( 1.0,-1.0, 0.0) gl.glVertex3f(-1.0,-1.0, 0.0) gl.glEnd() if __name__ == "__main__": main()
mit
-5,422,371,594,309,356,000
27.325843
111
0.666667
false
ArchiveTeam/ftp-grab
pipeline.py
1
10356
from distutils.version import StrictVersion import datetime import hashlib import os import re import socket import shutil import time import sys import urllib try: import requests except ImportError: print('Please install or update the requests module.') sys.exit(1) import seesaw from seesaw.config import realize, NumberConfigValue from seesaw.externalprocess import WgetDownload, ExternalProcess from seesaw.item import ItemInterpolation, ItemValue from seesaw.pipeline import Pipeline from seesaw.project import Project from seesaw.task import SimpleTask, SetItemKey, LimitConcurrent from seesaw.tracker import PrepareStatsForTracker, GetItemFromTracker, \ UploadWithTracker, SendDoneToTracker from seesaw.util import find_executable # check the seesaw version if StrictVersion(seesaw.__version__) < StrictVersion("0.8.3"): raise Exception("This pipeline needs seesaw version 0.8.3 or higher.") ########################################################################### # Find a useful Wpull executable. # # WPULL_EXE will be set to the first path that # 1. does not crash with --version, and # 2. prints the required version string WPULL_EXE = find_executable( "Wpull", re.compile(r"\b1\.2\b"), [ "./wpull", os.path.expanduser("~/.local/share/wpull-1.2/wpull"), os.path.expanduser("~/.local/bin/wpull"), "./wpull_bootstrap", "wpull", ] ) if not WPULL_EXE: raise Exception("No usable Wpull found.") ########################################################################### # The version number of this pipeline definition. # # Update this each time you make a non-cosmetic change. # It will be added to the WARC files and reported to the tracker. VERSION = "20160304.01" TRACKER_ID = 'ftp' TRACKER_HOST = 'tracker.archiveteam.org' ########################################################################### # This section defines project-specific tasks. # # Simple tasks (tasks that do not need any concurrency) are based on the # SimpleTask class and have a process(item) method that is called for # each item. class CheckIP(SimpleTask): def __init__(self): SimpleTask.__init__(self, "CheckIP") self._counter = 0 def process(self, item): if self._counter <= 0: item.log_output('Checking IP address.') ip_set = set() ip_set.add(socket.gethostbyname('twitter.com')) ip_set.add(socket.gethostbyname('facebook.com')) ip_set.add(socket.gethostbyname('youtube.com')) ip_set.add(socket.gethostbyname('microsoft.com')) ip_set.add(socket.gethostbyname('icanhas.cheezburger.com')) ip_set.add(socket.gethostbyname('archiveteam.org')) if len(ip_set) != 6: item.log_output('Got IP addresses: {0}'.format(ip_set)) item.log_output( 'You are behind a firewall or proxy. That is a big no-no!') raise Exception( 'You are behind a firewall or proxy. That is a big no-no!') # Check only occasionally if self._counter <= 0: self._counter = 10 else: self._counter -= 1 class PrepareDirectories(SimpleTask): def __init__(self, warc_prefix): SimpleTask.__init__(self, "PrepareDirectories") self.warc_prefix = warc_prefix def process(self, item): item_name = item["item_name"] escaped_item_name = item_name.replace(':', '_').replace('/', '_') item['escaped_item_name'] = escaped_item_name dirname = "/".join((item["data_dir"], escaped_item_name)) if os.path.isdir(dirname): shutil.rmtree(dirname) os.makedirs(dirname) item["item_dir"] = dirname item["warc_file_base"] = "%s-%s-%s" % ( self.warc_prefix, escaped_item_name, time.strftime("%Y%m%d-%H%M%S") ) open("%(item_dir)s/%(warc_file_base)s.warc.gz" % item, "w").close() class MoveFiles(SimpleTask): def __init__(self): SimpleTask.__init__(self, "MoveFiles") def process(self, item): # Check if wget was compiled with zlib support if os.path.exists("%(item_dir)s/%(warc_file_base)s.warc" % item): raise Exception('Please compile wget with zlib support!') os.rename("%(item_dir)s/%(warc_file_base)s.warc.gz" % item, "%(data_dir)s/%(warc_file_base)s.warc.gz" % item) shutil.rmtree("%(item_dir)s" % item) def get_hash(filename): with open(filename, 'rb') as in_file: return hashlib.sha1(in_file.read()).hexdigest() CWD = os.getcwd() PIPELINE_SHA1 = get_hash(os.path.join(CWD, 'pipeline.py')) SCRIPT_SHA1 = get_hash(os.path.join(CWD, 'ftp.py')) def stats_id_function(item): # For accountability and stats. d = { 'pipeline_hash': PIPELINE_SHA1, 'script_hash': SCRIPT_SHA1, 'python_version': sys.version, } return d class WgetArgs(object): def realize(self, item): wget_args = [ WPULL_EXE, "-nv", "--python-script", "ftp.py", "-o", ItemInterpolation("%(item_dir)s/wpull.log"), "--no-check-certificate", "--database", ItemInterpolation("%(item_dir)s/wpull.db"), "--delete-after", "--no-robots", "--no-cookies", "--rotate-dns", "--timeout", "60", "--tries", "inf", "--wait", "0.5", "--random-wait", "--waitretry", "5", "--warc-file", ItemInterpolation("%(item_dir)s/%(warc_file_base)s"), "--warc-header", "operator: Archive Team", "--warc-header", "ftp-dld-script-version: " + VERSION, "--warc-header", ItemInterpolation("ftp-user: %(item_name)s"), ] item_name = item['item_name'] assert ':' in item_name item_sort, item_item, item_file = item_name.split(':', 2) item['item_item'] = item_item MAX_SIZE = 10737418240 skipped = requests.get('https://raw.githubusercontent.com/ArchiveTeam/ftp-items/master/skipped_sites') if skipped.status_code != 200: raise Exception('Something went wrong getting the skipped_sites list from GitHub. ABORTING.') skipped_items = skipped.text.splitlines() for skipped_item in skipped_items: if item_file.startswith(skipped_item): raise Exception('This FTP will be skipped...') item_list = requests.get('http://archive.org/download/{0}/{1}'.format(item_item, item_file)) if item_list.status_code != 200: raise Exception('You received status code %d with URL %s. ABORTING.'%(item_list.status_code, 'https://archive.org/download/{0}/{1}'.format(item_item, item_file))) itemsize = int(re.search(r'ITEM_TOTAL_SIZE: ([0-9]+)', item_list.text).group(1)) if itemsize > MAX_SIZE: raise Exception('Item is %d bytes. This is larger then %d bytes. ABORTING.'%(itemsize, MAX_SIZE)) for url in item_list.text.splitlines(): if url.startswith('ftp://'): url = url.replace('&#32;', '%20').replace('&amp;', '&') url = urllib.unquote(url) if item_item == 'archiveteam_ftp_items_2015120102': url = url.replace('ftp://ftp.research.microsoft.com/downloads/downloads/', 'ftp://ftp.research.microsoft.com/downloads/') if '#' in url: raise Exception('%s containes a bad character.'%(url)) else: wget_args.append("{0}".format(url)) if 'bind_address' in globals(): wget_args.extend(['--bind-address', globals()['bind_address']]) print('') print('*** Wget will bind address at {0} ***'.format( globals()['bind_address'])) print('') return realize(wget_args, item) ########################################################################### # Initialize the project. # # This will be shown in the warrior management panel. The logo should not # be too big. The deadline is optional. project = Project( title="ftp", project_html=""" <img class="project-logo" alt="Project logo" src="http://archiveteam.org/images/thumb/f/f3/Archive_team.png/235px-Archive_team.png" height="50px" title=""/> <h2>FTP <span class="links"><a href="http://archiveteam.org/index.php?title=FTP">Website</a> &middot; <a href="http://tracker.archiveteam.org/ftp/">Leaderboard</a></span></h2> <p>Archiving all FTPs!</p> """ ) pipeline = Pipeline( CheckIP(), GetItemFromTracker("http://%s/%s" % (TRACKER_HOST, TRACKER_ID), downloader, VERSION), PrepareDirectories(warc_prefix="ftp"), WgetDownload( WgetArgs(), max_tries=1, accept_on_exit_code=[0, 8], env={ "item_dir": ItemValue("item_dir"), "item_item": ItemValue("item_item"), "downloader": downloader } ), PrepareStatsForTracker( defaults={"downloader": downloader, "version": VERSION}, file_groups={ "data": [ ItemInterpolation("%(item_dir)s/%(warc_file_base)s.warc.gz"), ] }, id_function=stats_id_function, ), MoveFiles(), LimitConcurrent( NumberConfigValue(min=1, max=4, default="1", name="shared:rsync_threads", title="Rsync threads", description="The maximum number of concurrent uploads."), UploadWithTracker( "http://%s/%s" % (TRACKER_HOST, TRACKER_ID), downloader=downloader, version=VERSION, files=[ ItemInterpolation("%(data_dir)s/%(warc_file_base)s.warc.gz"), ], rsync_target_source_path=ItemInterpolation("%(data_dir)s/"), rsync_extra_args=[ "--recursive", "--partial", "--partial-dir", ".rsync-tmp", ] ), ), SendDoneToTracker( tracker_url="http://%s/%s" % (TRACKER_HOST, TRACKER_ID), stats=ItemValue("stats") ) )
unlicense
-4,047,015,062,139,173,400
33.868687
174
0.565856
false
arrabito/DIRAC
tests/Integration/Framework/Test_LoggingDB.py
1
2988
""" This is a test of the SystemLoggingDB It supposes that the DB is present and installed in DIRAC """ # pylint: disable=invalid-name,wrong-import-position,protected-access import unittest from DIRAC.Core.Base.Script import parseCommandLine parseCommandLine() from DIRAC import gLogger from DIRAC.Core.Utilities.Time import toString from DIRAC.FrameworkSystem.DB.SystemLoggingDB import SystemLoggingDB from DIRAC.FrameworkSystem.private.logging.Message import tupleToMessage class TestSystemLoggingDBTestCase(unittest.TestCase): def setUp(self): self.db = SystemLoggingDB() def tearDown(self): pass class testDB(TestSystemLoggingDBTestCase): def test_addAndRemove(self): """ Some test cases """ systemName = 'TestSystem' subSystemName = 'TestSubSystem' level = 10 time = toString() msgTest = 'Hello' variableText = time frameInfo = "" message = tupleToMessage((systemName, level, time, msgTest, variableText, frameInfo, subSystemName)) site = 'somewehere' longSite = 'somewehere1234567890123456789012345678901234567890123456789012345678901234567890' nodeFQDN = '127.0.0.1' userDN = 'Yo' userGroup = 'Us' remoteAddress = 'elsewhere' records = 10 db = SystemLoggingDB() res = db._connect() self.assertTrue(res['OK']) gLogger.info('\n Inserting some records\n') for k in xrange(records): result = db.insertMessage(message, site, nodeFQDN, userDN, userGroup, remoteAddress) self.assertTrue(result['OK']) self.assertEqual(result['lastRowId'], k + 1) self.assertEqual(result['Value'], 1) result = db._queryDB(showFieldList=['SiteName']) self.assertTrue(result['OK']) self.assertEqual(result['Value'][0][0], site) result = db._queryDB(showFieldList=['SystemName']) self.assertTrue(result['OK']) self.assertEqual(result['Value'][0][0], systemName) result = db._queryDB(showFieldList=['SubSystemName']) self.assertTrue(result['OK']) self.assertEqual(result['Value'][0][0], subSystemName) result = db._queryDB(showFieldList=['OwnerGroup']) self.assertTrue(result['OK']) self.assertEqual(result['Value'][0][0], userGroup) result = db._queryDB(showFieldList=['FixedTextString']) self.assertTrue(result['OK']) self.assertEqual(result['Value'][0][0], msgTest) result = db._queryDB(showFieldList=['VariableText', 'SiteName'], count=True, groupColumn='VariableText') self.assertTrue(result['OK']) self.assertEqual(result['Value'][0][1], site) self.assertEqual(result['Value'][0][2], records) result = db.insertMessage(message, longSite, nodeFQDN, userDN, userGroup, remoteAddress) self.assertFalse(result['OK']) if __name__ == '__main__': suite = unittest.defaultTestLoader.loadTestsFromTestCase(TestSystemLoggingDBTestCase) suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(testDB)) testResult = unittest.TextTestRunner(verbosity=2).run(suite)
gpl-3.0
-3,121,295,232,823,107,000
30.787234
108
0.711847
false
evenmarbles/mlpy
mlpy/knowledgerep/cbr/similarity.py
1
17713
from __future__ import division, print_function, absolute_import import math import numpy as np from abc import ABCMeta, abstractmethod from sklearn.neighbors import NearestNeighbors from sklearn.cluster import KMeans from sklearn.metrics.pairwise import cosine_similarity from sklearn.neighbors.dist_metrics import METRIC_MAPPING class Stat(object): """The similarity statistics container. The similarity statistics is a container to pass the calculated measure of similarity between the case identified by the case id and the query case between functions. Parameters ---------- case_id : int The case's id. similarity : float The similarity measure. """ __slots__ = ('_case_id', '_similarity') @property def case_id(self): """The case's id. Returns ------- int : The case's id """ return self._case_id @property def similarity(self): """The similarity measure. Returns ------- float : The similarity measure. """ return self._similarity def __init__(self, case_id, similarity=None): self._case_id = case_id self._similarity = similarity class SimilarityFactory(object): """The similarity factory. An instance of a similarity model can be created by passing the similarity model type. Examples -------- >>> from mlpy.knowledgerep.cbr.similarity import SimilarityFactory >>> SimilarityFactory.create('float', **{}) """ @staticmethod def create(_type, **kwargs): """ Create a feature of the given type. Parameters ---------- _type : str The feature type. Valid feature types are: knn A k-nearest-neighbor algorithm is used to determine similarity between cases (:class:`NeighborSimilarity`). The value ``n_neighbors`` must be specified. radius-n Similarity between cases is determined by the nearest neighbors within a radius (:class:`NeighborSimilarity`). The value ``radius`` must be specified. kmeans Similarity is determined by a KMeans clustering algorithm (:class:`KMeansSimilarity`). The value ``n_clusters`` must be specified. exact-match Only exact matches are considered similar (:class:`ExactMatchSimilarity`). cosine A cosine similarity measure is used to determine similarity between cases (:class:`CosineSimilarity`). kwargs : dict, optional Non-positional arguments to pass to the class of the given type for initialization. Returns ------- ISimilarity : A similarity instance of the given type. """ try: if _type == "knn": kwargs["n_neighbors"] = kwargs["method_params"] elif _type == "radius-n": kwargs["radius"] = kwargs["method_params"] elif _type == "kmeans": kwargs["n_cluster"] = kwargs["method_params"] elif _type == "cosine": kwargs["threshold"] = kwargs["method_params"] del kwargs["method_params"] return { "knn": NeighborSimilarity, "radius-n": NeighborSimilarity, "kmeans": KMeansSimilarity, "exact-match": ExactMatchSimilarity, "cosine": CosineSimilarity, }[_type](**kwargs) except KeyError: return None class ISimilarity(object): """The similarity model interface. The similarity model keeps an internal indexing structure of the relevant case data to efficiently computing the similarity measure between data points. Notes ----- All similarity models must inherit from this class. """ __metaclass__ = ABCMeta def __init__(self): #: The indexing structure self._indexing_structure = None #: The mapping of the data points to their case ids self._id_map = None """:ivar: dict""" @abstractmethod def build_indexing_structure(self, data, id_map): """Build the indexing structure. Parameters ---------- data : ndarray[ndarray[float]] The raw data points to be indexed. id_map : dict[int, int] The mapping from the data points to their case ids. Raises ------ NotImplementedError If the child class does not implement this function. """ raise NotImplementedError @abstractmethod def compute_similarity(self, data_point): """Computes the similarity. Computes the similarity between the data point and the data in the indexing structure returning the results in a collection of similarity statistics (:class:`Stat`). Parameters ---------- data_point : list[float] The raw data point to compare against the data points stored in the indexing structure. Returns ------- list[Stat] : A collection of similarity statistics. Raises ------ NotImplementedError If the child class does not implement this function. """ raise NotImplementedError class NeighborSimilarity(ISimilarity): """The neighborhood similarity model. The neighbor similarity model determines similarity between the data in the indexing structure and the query data by using the nearest neighbor algorithm :class:`sklearn.neighbors.NearestNeighbors`. Both a k-neighbors classifier and a radius-neighbor-classifier are implemented. To choose between the classifiers either `n_neighbors` or `radius` must be specified. Parameters ---------- n_neighbors : int The number of data points considered to be closest neighbors. radius : int The radius around the query data point, within which the data points are considered closest neighbors. algorithm : str The internal indexing structure of the training data. Defaults to `kd-tree`. metric : str The metric used to compute the distances between pairs of points. Refer to :class:`sklearn.neighbors.DistanceMetric` for valid identifiers. Default is `euclidean`. metric_params : dict Parameters relevant to the specified metric. Raises ------ UserWarning : If the either both or none of `n_neighbors` and `radius` are given. See Also -------- :class:`sklearn.neighbors.KNeighborsClassifier`, :class:`sklearn.neighbors.RadiusNeighborsClassifier` """ def __init__(self, n_neighbors=None, radius=None, algorithm=None, metric=None, metric_params=None): super(NeighborSimilarity, self).__init__() if (n_neighbors is not None and radius is not None) or not (n_neighbors is None or radius is None): raise UserWarning("Exactly one of n_neighbors or radius must be initialized.") self._n_neighbors = n_neighbors self._radius = radius if algorithm is not None: if algorithm not in ["ball_tree", "kd_tree", "brute", "auto"]: raise ValueError("%s is not a valid retrieval algorithm" % algorithm) self._algorithm = algorithm else: self._algorithm = "kd_tree" if metric is not None: if metric not in METRIC_MAPPING: raise ValueError("%s is not a valid retrieval metric" % metric) self._metric = metric else: self._metric = "euclidean" self._metric_params = metric_params if metric_params is not None else 2 def build_indexing_structure(self, data, id_map): """Build the indexing structure. Build the indexing structure by fitting the data according to the specified algorithm. Parameters ---------- data : ndarray[ndarray[float]] The raw data points to be indexed. id_map : dict[int, int] The mapping from the data points to their case ids. """ self._id_map = id_map if self._n_neighbors is not None: self._indexing_structure = NearestNeighbors(n_neighbors=self._n_neighbors, algorithm=self._algorithm, metric=self._metric, p=self._metric_params).fit(data) else: self._indexing_structure = NearestNeighbors(radius=self._radius, algorithm=self._algorithm, metric=self._metric, p=self._metric_params).fit(data) def compute_similarity(self, data_point): """Computes the similarity. Computes the similarity between the data point and the data in the indexing structure using the :class:`sklearn.neighbors.NearestNeighbors` algorithm. The results are returned in a collection of similarity statistics (:class:`Stat`). Parameters ---------- data_point : list[float] The raw data point to compare against the data points stored in the indexing structure. Returns ------- list[Stat] : A collection of similarity statistics. """ if self._n_neighbors is not None: # noinspection PyProtectedMember raw_data = self._indexing_structure._fit_X if len(raw_data) < self._n_neighbors: result = [] for i, feat in enumerate(raw_data): dist = np.linalg.norm(np.asarray(data_point) - np.asarray(feat)) result.append(Stat(self._id_map[i], dist)) # noinspection PyShadowingNames result = sorted(result, key=lambda x: x.similarity) else: d, key_lists = self._indexing_structure.kneighbors(data_point) result = [Stat(self._id_map[x], d[0][i]) for i, x in enumerate(key_lists[0])] else: d, key_lists = self._indexing_structure.radius_neighbors(data_point) result = [Stat(self._id_map[x], d[0][i]) for i, x in enumerate(key_lists[0])] return result class KMeansSimilarity(ISimilarity): """The KMeans similarity model. The KMeans similarity model determines similarity between the data in the indexing structure and the query data by using the :class:`sklearn.cluster.KMeans` algorithm. Parameters ---------- n_cluster : int The number of clusters to fit the raw data in. """ def __init__(self, n_cluster=None): super(KMeansSimilarity, self).__init__() self._n_cluster = n_cluster if n_cluster is None else 8 def build_indexing_structure(self, data, id_map): """Build the indexing structure. Build the indexing structure by fitting the data into `n_cluster` clusters. Parameters ---------- data : ndarray[ndarray[float]] The raw data points to be indexed. id_map : dict[int, int] The mapping from the data points to their case ids. """ self._id_map = id_map self._indexing_structure = KMeans(init='k-means++', n_clusters=self._n_cluster, n_init=10).fit(data) def compute_similarity(self, data_point): """Computes the similarity. Computes the similarity between the data point and the data in the indexing structure using the :class:`sklearn.cluster.KMeans` clustering algorithm. The results are returned in a collection of similarity statistics (:class:`Stat`). Parameters ---------- data_point : list[float] The raw data point to compare against the data points stored in the indexing structure. Returns ------- list[Stat] : A collection of similarity statistics. """ label = self._indexing_structure.predict(data_point) result = [] try: # noinspection PyTypeChecker,PyUnresolvedReferences key_lists = np.nonzero(self._indexing_structure.labels_ == label[0])[0] result = [Stat(self._id_map[x]) for x in key_lists] except IndexError: pass return result class ExactMatchSimilarity(ISimilarity): """The exact match similarity model. The exact match similarity model considered only exact matches between the data in the indexing structure and the query data as similar. """ # noinspection PyUnusedLocal def __init__(self, **kwargs): super(ExactMatchSimilarity, self).__init__() def build_indexing_structure(self, data, id_map): """Build the indexing structure. To determine exact matches a brute-force algorithm is used thus the data remains as is and no special indexing structure is implemented. Parameters ---------- data : ndarray[ndarray[float]] The raw data points to be indexed. id_map : dict[int, int] The mapping from the data points to their case ids. .. todo:: It might be worth looking into a more efficient way of determining exact matches. """ self._id_map = id_map self._indexing_structure = data def compute_similarity(self, data_point): """Computes the similarity. Computes the similarity between the data point and the data in the indexing structure identifying exact matches. The results are returned in a collection of similarity statistics (:class:`Stat`). Parameters ---------- data_point : list[float] The raw data point to compare against the data points stored in the indexing structure. Returns ------- list[Stat] : A collection of similarity statistics. """ result = [] for i, feat in enumerate(self._indexing_structure): total = 0 for j, val in enumerate(data_point): total += math.pow(val - feat[j], 2) if total == 0.0: result.append(Stat(self._id_map[i])) return result class CosineSimilarity(ISimilarity): """The cosine similarity model. Cosine similarity is a measure of similarity between two vectors of an inner product space that measures the cosine of the angle between them. The cosine of 0 degree is 1, and it is less than 1 for any other angle. It is thus a judgement of orientation and not magnitude: tow vectors with the same orientation have a cosine similarity of 1, two vectors at 90 degrees have a similarity of 0, and two vectors diametrically opposed have a similarity of -1, independent of their magnitude [1]_. The cosine model employs the `cosine_similarity <http://scikit-learn.org/stable/modules/metrics.html#cosine-similarity>`_ function from the :mod:`sklearn.metrics.pairwise` module to determine similarity. .. seealso:: `Machine Learning::Cosine Similarity for Vector Space Models (Part III) <http://blog.christianperone.com/?p=2497>`_ References ---------- .. [1] `Wikipidia::cosine_similarity <https://en.wikipedia.org/wiki/Cosine_similarity>`_ """ # noinspection PyUnusedLocal def __init__(self, **kwargs): super(CosineSimilarity, self).__init__() def build_indexing_structure(self, data, id_map): """Build the indexing structure. The cosine_similarity function from :mod:`sklearn.metrics.pairwise` takes the raw data as input. Thus the data remains as is and no special indexing structure is implemented. Parameters ---------- data : ndarray[ndarray[float]] The raw data points to be indexed. id_map : dict[int, int] The mapping from the data points to their case ids. """ self._id_map = id_map self._indexing_structure = data def compute_similarity(self, data_point): """Computes the similarity. Computes the similarity between the data point and the data in the indexing structure using the function :func:`cosine_similarity` from :mod:`sklearn.metrics.pairwise`. The resulting similarity ranges from -1 meaning exactly opposite, to 1 meaning exactly the same, with 0 indicating orthogonality (decorrelation), and in-between values indicating intermediate similarity or dissimilarity. The results are returned in a collection of similarity statistics (:class:`Stat`). Parameters ---------- data_point : list[float] The raw data point to compare against the data points stored in the indexing structure. Returns ------- list[Stat] : A collection of similarity statistics. """ similarity = cosine_similarity(data_point, self._indexing_structure) if not np.any(data_point): similarity = np.array([[float(np.array_equal(data_point, m)) for m in np.array(self._indexing_structure)]]) return [Stat(self._id_map[i], x) for i, x in enumerate(similarity[0])]
mit
-1,097,991,111,061,715,100
31.985102
119
0.603342
false
larsks/cobbler-larsks
koan/utils.py
1
16252
""" koan = kickstart over a network general usage functions Copyright 2006-2008 Red Hat, Inc. Michael DeHaan <[email protected]> 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 random import os import traceback import tempfile import exceptions ANCIENT_PYTHON = 0 try: try: import subprocess as sub_process except: import sub_process import urllib2 except: ANCIENT_PYTHON = 1 import time import shutil import errno import re import sys import xmlrpclib import string import re import glob import socket import shutil import tempfile import urlgrabber VIRT_STATE_NAME_MAP = { 0 : "running", 1 : "running", 2 : "running", 3 : "paused", 4 : "shutdown", 5 : "shutdown", 6 : "crashed" } class InfoException(exceptions.Exception): """ Custom exception for tracking of fatal errors. """ def __init__(self,value,**args): self.value = value % args self.from_koan = 1 def __str__(self): return repr(self.value) def setupLogging(appname): """ set up logging ... code borrowed/adapted from virt-manager """ import logging import logging.handlers dateFormat = "%a, %d %b %Y %H:%M:%S" fileFormat = "[%(asctime)s " + appname + " %(process)d] %(levelname)s (%(module)s:%(lineno)d) %(message)s" streamFormat = "%(asctime)s %(levelname)-8s %(message)s" filename = "/var/log/koan/koan.log" rootLogger = logging.getLogger() rootLogger.setLevel(logging.DEBUG) fileHandler = logging.handlers.RotatingFileHandler(filename, "a", 1024*1024, 5) fileHandler.setFormatter(logging.Formatter(fileFormat, dateFormat)) rootLogger.addHandler(fileHandler) streamHandler = logging.StreamHandler(sys.stderr) streamHandler.setFormatter(logging.Formatter(streamFormat, dateFormat)) streamHandler.setLevel(logging.DEBUG) rootLogger.addHandler(streamHandler) def urlread(url): """ to support more distributions, implement (roughly) some parts of urlread and urlgrab from urlgrabber, in ways that are less cool and less efficient. """ print "- reading URL: %s" % url if url is None or url == "": raise InfoException, "invalid URL: %s" % url elif url[0:3] == "nfs": try: ndir = os.path.dirname(url[6:]) nfile = os.path.basename(url[6:]) nfsdir = tempfile.mkdtemp(prefix="koan_nfs",dir="/tmp") nfsfile = os.path.join(nfsdir,nfile) cmd = ["mount","-t","nfs","-o","ro", ndir, nfsdir] subprocess_call(cmd) fd = open(nfsfile) data = fd.read() fd.close() cmd = ["umount",nfsdir] subprocess_call(cmd) return data except: traceback.print_exc() raise InfoException, "Couldn't mount and read URL: %s" % url elif url[0:4] == "http": try: fd = urllib2.urlopen(url) data = fd.read() fd.close() return data except: if ANCIENT_PYTHON: # this logic is to support python 1.5 and EL 2 import urllib fd = urllib.urlopen(url) data = fd.read() fd.close() return data traceback.print_exc() raise InfoException, "Couldn't download: %s" % url elif url[0:4] == "file": try: fd = open(url[5:]) data = fd.read() fd.close() return data except: raise InfoException, "Couldn't read file from URL: %s" % url else: raise InfoException, "Unhandled URL protocol: %s" % url def urlgrab(url,saveto): """ like urlread, but saves contents to disk. see comments for urlread as to why it's this way. """ data = urlread(url) fd = open(saveto, "w+") fd.write(data) fd.close() def subprocess_call(cmd,ignore_rc=0): """ Wrapper around subprocess.call(...) """ print "- %s" % cmd if not ANCIENT_PYTHON: rc = sub_process.call(cmd) else: cmd = string.join(cmd, " ") print "cmdstr=(%s)" % cmd rc = os.system(cmd) if rc != 0 and not ignore_rc: raise InfoException, "command failed (%s)" % rc return rc def input_string_or_hash(options,delim=None,allow_multiples=True): """ Older cobbler files stored configurations in a flat way, such that all values for strings. Newer versions of cobbler allow dictionaries. This function is used to allow loading of older value formats so new users of cobbler aren't broken in an upgrade. """ if options is None: return {} elif type(options) == list: raise InfoException("No idea what to do with list: %s" % options) elif type(options) == type(""): new_dict = {} tokens = string.split(options, delim) for t in tokens: tokens2 = string.split(t,"=") if len(tokens2) == 1: # this is a singleton option, no value key = tokens2[0] value = None else: key = tokens2[0] value = tokens2[1] # if we're allowing multiple values for the same key, # check to see if this token has already been # inserted into the dictionary of values already if key in new_dict.keys() and allow_multiples: # if so, check to see if there is already a list of values # otherwise convert the dictionary value to an array, and add # the new value to the end of the list if type(new_dict[key]) == list: new_dict[key].append(value) else: new_dict[key] = [new_dict[key], value] else: new_dict[key] = value # dict.pop is not avail in 2.2 if new_dict.has_key(""): del new_dict[""] return new_dict elif type(options) == type({}): options.pop('',None) return options else: raise InfoException("invalid input type: %s" % type(options)) def hash_to_string(hash): """ Convert a hash to a printable string. used primarily in the kernel options string and for some legacy stuff where koan expects strings (though this last part should be changed to hashes) """ buffer = "" if type(hash) != dict: return hash for key in hash: value = hash[key] if value is None: buffer = buffer + str(key) + " " elif type(value) == list: # this value is an array, so we print out every # key=value for item in value: buffer = buffer + str(key) + "=" + str(item) + " " else: buffer = buffer + str(key) + "=" + str(value) + " " return buffer def nfsmount(input_path): # input: [user@]server:/foo/bar/x.img as string # output: (dirname where mounted, last part of filename) as 2-element tuple # FIXME: move this function to util.py so other modules can use it # we have to mount it first filename = input_path.split("/")[-1] dirpath = string.join(input_path.split("/")[:-1],"/") tempdir = tempfile.mkdtemp(suffix='.mnt', prefix='koan_', dir='/tmp') mount_cmd = [ "/bin/mount", "-t", "nfs", "-o", "ro", dirpath, tempdir ] print "- running: %s" % mount_cmd rc = sub_process.call(mount_cmd) if not rc == 0: shutil.rmtree(tempdir, ignore_errors=True) raise koan.InfoException("nfs mount failed: %s" % dirpath) # NOTE: option for a blocking install might be nice, so we could do this # automatically, if supported by python-virtinst print "after install completes, you may unmount and delete %s" % tempdir return (tempdir, filename) def find_vm(conn, vmid): """ Extra bonus feature: vmid = -1 returns a list of everything This function from Func: fedorahosted.org/func """ vms = [] # this block of code borrowed from virt-manager: # get working domain's name ids = conn.listDomainsID(); for id in ids: vm = conn.lookupByID(id) vms.append(vm) # get defined domain names = conn.listDefinedDomains() for name in names: vm = conn.lookupByName(name) vms.append(vm) if vmid == -1: return vms for vm in vms: if vm.name() == vmid: return vm raise InfoException("koan could not find the VM to watch: %s" % vmid) def get_vm_state(conn, vmid): """ Returns the state of a libvirt VM, by name. From Func: fedorahosted.org/func """ state = find_vm(conn, vmid).info()[0] return VIRT_STATE_NAME_MAP.get(state,"unknown") def check_dist(): """ Determines what distro we're running under. """ if os.path.exists("/etc/debian_version"): import lsb_release return lsb_release.get_distro_information()['ID'].lower() elif os.path.exists("/etc/SuSE-release"): return "suse" else: # valid for Fedora and all Red Hat / Fedora derivatives return "redhat" def os_release(): """ This code is borrowed from Cobbler and really shouldn't be repeated. """ if ANCIENT_PYTHON: return ("unknown", 0) if check_dist() == "redhat": fh = open("/etc/redhat-release") data = fh.read().lower() if data.find("fedora") != -1: make = "fedora" elif data.find("centos") != -1: make = "centos" else: make = "redhat" release_index = data.find("release") rest = data[release_index+7:-1] tokens = rest.split(" ") for t in tokens: try: return (make,float(t)) except ValueError, ve: pass raise CX("failed to detect local OS version from /etc/redhat-release") elif check_dist() == "debian": import lsb_release release = lsb_release.get_distro_information()['RELEASE'] return ("debian", release) elif check_dist() == "ubuntu": version = sub_process.check_output(("lsb_release","--release","--short")).rstrip() make = "ubuntu" return (make, float(version)) elif check_dist() == "suse": fd = open("/etc/SuSE-release") for line in fd.read().split("\n"): if line.find("VERSION") != -1: version = line.replace("VERSION = ","") if line.find("PATCHLEVEL") != -1: rest = line.replace("PATCHLEVEL = ","") make = "suse" return (make, float(version)) else: return ("unknown",0) def uniqify(lst, purge=None): temp = {} for x in lst: temp[x] = 1 if purge is not None: temp2 = {} for x in temp.keys(): if x != purge: temp2[x] = 1 temp = temp2 return temp.keys() def get_network_info(): try: import ethtool except: try: import rhpl.ethtool ethtool = rhpl.ethtool except: raise InfoException("the rhpl or ethtool module is required to use this feature (is your OS>=EL3?)") interfaces = {} # get names inames = ethtool.get_devices() for iname in inames: mac = ethtool.get_hwaddr(iname) if mac == "00:00:00:00:00:00": mac = "?" try: ip = ethtool.get_ipaddr(iname) if ip == "127.0.0.1": ip = "?" except: ip = "?" bridge = 0 module = "" try: nm = ethtool.get_netmask(iname) except: nm = "?" interfaces[iname] = { "ip_address" : ip, "mac_address" : mac, "netmask" : nm, "bridge" : bridge, "module" : module } # print interfaces return interfaces def connect_to_server(server=None,port=None): if server is None: server = os.environ.get("COBBLER_SERVER","") if server == "": raise InfoException("--server must be specified") if port is None: port = 25151 connect_ok = 0 try_urls = [ "http://%s/cobbler_api" % (server), "https://%s/cobbler_api" % (server), ] for url in try_urls: print "- looking for Cobbler at %s" % url server = __try_connect(url) if server is not None: return server raise InfoException ("Could not find Cobbler.") def create_xendomains_symlink(name): """ Create an /etc/xen/auto/<name> symlink for use with "xendomains"-style VM boot upon dom0 reboot. """ src = "/etc/xen/%s" % name dst = "/etc/xen/auto/%s" % name # check that xen config file exists and create symlink if os.path.exists(src) and os.access(os.path.dirname(dst), os.W_OK): os.symlink(src, dst) else: raise InfoException("Could not create /etc/xen/auto/%s symlink. Please check write permissions and ownership" % name) def libvirt_enable_autostart(domain_name): import libvirt try: conn = libvirt.open("qemu:///system") conn.listDefinedDomains() domain = conn.lookupByName(domain_name) domain.setAutostart(1) except: raise InfoException("libvirt could not find domain %s" % domain_name) if not domain.autostart: raise InfoException("Could not enable autostart on domain %s." % domain_name) def make_floppy(kickstart): (fd, floppy_path) = tempfile.mkstemp(suffix='.floppy', prefix='tmp', dir="/tmp") print "- creating floppy image at %s" % floppy_path # create the floppy image file cmd = "dd if=/dev/zero of=%s bs=1440 count=1024" % floppy_path print "- %s" % cmd rc = os.system(cmd) if not rc == 0: raise InfoException("dd failed") # vfatify cmd = "mkdosfs %s" % floppy_path print "- %s" % cmd rc = os.system(cmd) if not rc == 0: raise InfoException("mkdosfs failed") # mount the floppy mount_path = tempfile.mkdtemp(suffix=".mnt", prefix='tmp', dir="/tmp") cmd = "mount -o loop -t vfat %s %s" % (floppy_path, mount_path) print "- %s" % cmd rc = os.system(cmd) if not rc == 0: raise InfoException("mount failed") # download the kickstart file onto the mounted floppy print "- downloading %s" % kickstart save_file = os.path.join(mount_path, "unattended.txt") urlgrabber.urlgrab(kickstart,filename=save_file) # umount cmd = "umount %s" % mount_path print "- %s" % cmd rc = os.system(cmd) if not rc == 0: raise InfoException("umount failed") # return the path to the completed disk image to pass to virtinst return floppy_path def sync_file(ofile, nfile, uid, gid, mode): sub_process.call(['/usr/bin/diff', ofile, nfile]) shutil.copy(nfile, ofile) os.chmod(ofile,mode) os.chown(ofile,uid,gid) #class ServerProxy(xmlrpclib.ServerProxy): # # def __init__(self, url=None): # try: # xmlrpclib.ServerProxy.__init__(self, url, allow_none=True) # except: # # for RHEL3's xmlrpclib -- cobblerd should strip Nones anyway # xmlrpclib.ServerProxy.__init__(self, url) def __try_connect(url): try: xmlrpc_server = xmlrpclib.Server(url) xmlrpc_server.ping() return xmlrpc_server except: traceback.print_exc() return None
gpl-2.0
3,835,868,868,866,504,700
28.549091
126
0.580852
false
h4wkmoon/shinken
shinken/macroresolver.py
1
17498
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # Gregory Starck, [email protected] # Hartmut Goebel, [email protected] # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Shinken is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with Shinken. If not, see <http://www.gnu.org/licenses/>. # This class resolve Macro in commands by looking at the macros list # in Class of elements. It give a property that call be callable or not. # It not callable, it's a simple property and replace the macro with the value # If callable, it's a method that is called to get the value. for example, to # get the number of service in a host, you call a method to get the # len(host.services) import re import time from shinken.borg import Borg class MacroResolver(Borg): """Please Add a Docstring to describe the class here""" my_type = 'macroresolver' # Global macros macros = { 'TOTALHOSTSUP': '_get_total_hosts_up', 'TOTALHOSTSDOWN': '_get_total_hosts_down', 'TOTALHOSTSUNREACHABLE': '_get_total_hosts_unreachable', 'TOTALHOSTSDOWNUNHANDLED': '_get_total_hosts_unhandled', 'TOTALHOSTSUNREACHABLEUNHANDLED': '_get_total_hosts_unreachable_unhandled', 'TOTALHOSTPROBLEMS': '_get_total_host_problems', 'TOTALHOSTPROBLEMSUNHANDLED': '_get_total_host_problems_unhandled', 'TOTALSERVICESOK': '_get_total_service_ok', 'TOTALSERVICESWARNING': '_get_total_services_warning', 'TOTALSERVICESCRITICAL': '_get_total_services_critical', 'TOTALSERVICESUNKNOWN': '_get_total_services_unknown', 'TOTALSERVICESWARNINGUNHANDLED': '_get_total_services_warning_unhandled', 'TOTALSERVICESCRITICALUNHANDLED': '_get_total_services_critical_unhandled', 'TOTALSERVICESUNKNOWNUNHANDLED': '_get_total_services_unknown_unhandled', 'TOTALSERVICEPROBLEMS': '_get_total_service_problems', 'TOTALSERVICEPROBLEMSUNHANDLED': '_get_total_service_problems_unhandled', 'LONGDATETIME': '_get_long_date_time', 'SHORTDATETIME': '_get_short_date_time', 'DATE': '_get_date', 'TIME': '_get_time', 'TIMET': '_get_timet', 'PROCESSSTARTTIME': '_get_process_start_time', 'EVENTSTARTTIME': '_get_events_start_time', } # This must be called ONCE. It just put links for elements # by scheduler def init(self, conf): # For searching class and elements for ondemand # we need link to types self.conf = conf self.lists_on_demand = [] self.hosts = conf.hosts # For special void host_name handling... self.host_class = self.hosts.inner_class self.lists_on_demand.append(self.hosts) self.services = conf.services self.contacts = conf.contacts self.lists_on_demand.append(self.contacts) self.hostgroups = conf.hostgroups self.lists_on_demand.append(self.hostgroups) self.commands = conf.commands self.servicegroups = conf.servicegroups self.lists_on_demand.append(self.servicegroups) self.contactgroups = conf.contactgroups self.lists_on_demand.append(self.contactgroups) self.illegal_macro_output_chars = conf.illegal_macro_output_chars self.output_macros = ['HOSTOUTPUT', 'HOSTPERFDATA', 'HOSTACKAUTHOR', 'HOSTACKCOMMENT', 'SERVICEOUTPUT', 'SERVICEPERFDATA', 'SERVICEACKAUTHOR', 'SERVICEACKCOMMENT'] # Try cache :) #self.cache = {} # Return all macros of a string, so cut the $ # And create a dict with it: # val: value, not set here # type: type of macro, like class one, or ARGN one def _get_macros(self, s): #if s in self.cache: # return self.cache[s] p = re.compile(r'(\$)') elts = p.split(s) macros = {} in_macro = False for elt in elts: if elt == '$': in_macro = not in_macro elif in_macro: macros[elt] = {'val': '', 'type': 'unknown'} #self.cache[s] = macros if '' in macros: del macros[''] return macros # Get a value from a property of a element # Prop can be a function or a property # So we call it or not def _get_value_from_element(self, elt, prop): try: value = getattr(elt, prop) if callable(value): return unicode(value()) else: return unicode(value) except AttributeError, exp: # Return no value return '' except UnicodeError, exp: if isinstance(value, str): return unicode(value, 'utf8', errors='ignore') else: return '' # For some macros, we need to delete unwanted characters def _delete_unwanted_caracters(self, s): for c in self.illegal_macro_output_chars: s = s.replace(c, '') return s # return a dict with all environment variable came from # the macros of the datas object def get_env_macros(self, data): env = {} for o in data: cls = o.__class__ macros = cls.macros for macro in macros: if macro.startswith("USER"): break #print "Macro in %s: %s" % (o.__class__, macro) prop = macros[macro] value = self._get_value_from_element(o, prop) env['NAGIOS_%s' % macro] = value if hasattr(o, 'customs'): # make NAGIOS__HOSTMACADDR from _MACADDR for cmacro in o.customs: env['NAGIOS__' + o.__class__.__name__.upper() + cmacro[1:].upper()] = o.customs[cmacro] return env # This function will look at elements in data (and args if it filled) # to replace the macros in c_line with real value. def resolve_simple_macros_in_string(self, c_line, data, args=None): # Now we prepare the classes for looking at the class.macros data.append(self) # For getting global MACROS if hasattr(self, 'conf'): data.append(self.conf) # For USERN macros clss = [d.__class__ for d in data] # we should do some loops for nested macros # like $USER1$ hiding like a ninja in a $ARG2$ Macro. And if # $USER1$ is pointing to $USER34$ etc etc, we should loop # until we reach the bottom. So the last loop is when we do # not still have macros :) still_got_macros = True nb_loop = 0 while still_got_macros: nb_loop += 1 # Ok, we want the macros in the command line macros = self._get_macros(c_line) # We can get out if we do not have macros this loop still_got_macros = (len(macros) != 0) #print "Still go macros:", still_got_macros # Put in the macros the type of macro for all macros self._get_type_of_macro(macros, clss) # Now we get values from elements for macro in macros: # If type ARGN, look at ARGN cutting if macros[macro]['type'] == 'ARGN' and args is not None: macros[macro]['val'] = self._resolve_argn(macro, args) macros[macro]['type'] = 'resolved' # If class, get value from properties if macros[macro]['type'] == 'class': cls = macros[macro]['class'] for elt in data: if elt is not None and elt.__class__ == cls: prop = cls.macros[macro] macros[macro]['val'] = self._get_value_from_element(elt, prop) # Now check if we do not have a 'output' macro. If so, we must # delete all special characters that can be dangerous if macro in self.output_macros: macros[macro]['val'] = self._delete_unwanted_caracters(macros[macro]['val']) if macros[macro]['type'] == 'CUSTOM': cls_type = macros[macro]['class'] # Beware : only cut the first _HOST value, so the macro name can have it on it... macro_name = re.split('_' + cls_type, macro, 1)[1].upper() # Ok, we've got the macro like MAC_ADDRESS for _HOSTMAC_ADDRESS # Now we get the element in data that have the type HOST # and we check if it got the custom value for elt in data: if elt is not None and elt.__class__.my_type.upper() == cls_type: if '_' + macro_name in elt.customs: macros[macro]['val'] = elt.customs['_' + macro_name] # Then look on the macromodulations, in reserver order, so # the last to set, will be the firt to have. (yes, don't want to play # with break and such things sorry...) mms = getattr(elt, 'macromodulations', []) for mm in mms[::-1]: # Look if the modulation got the value, but also if it's currently active if '_' + macro_name in mm.customs and mm.is_active(): macros[macro]['val'] = mm.customs['_' + macro_name] if macros[macro]['type'] == 'ONDEMAND': macros[macro]['val'] = self._resolve_ondemand(macro, data) # We resolved all we can, now replace the macro in the command call for macro in macros: c_line = c_line.replace('$'+macro+'$', macros[macro]['val']) # A $$ means we want a $, it's not a macro! # We replace $$ by a big dirty thing to be sure to not misinterpret it c_line = c_line.replace("$$", "DOUBLEDOLLAR") if nb_loop > 32: # too much loop, we exit still_got_macros = False # We now replace the big dirty token we made by only a simple $ c_line = c_line.replace("DOUBLEDOLLAR", "$") #print "Retuning c_line", c_line.strip() return c_line.strip() # Resolve a command with macro by looking at data classes.macros # And get macro from item properties. def resolve_command(self, com, data): c_line = com.command.command_line return self.resolve_simple_macros_in_string(c_line, data, args=com.args) # For all Macros in macros, set the type by looking at the # MACRO name (ARGN? -> argn_type, # HOSTBLABLA -> class one and set Host in class) # _HOSTTOTO -> HOST CUSTOM MACRO TOTO # $SERVICESTATEID:srv-1:Load$ -> MACRO SERVICESTATEID of # the service Load of host srv-1 def _get_type_of_macro(self, macros, clss): for macro in macros: # ARGN Macros if re.match('ARG\d', macro): macros[macro]['type'] = 'ARGN' continue # USERN macros # are managed in the Config class, so no # need to look that here elif re.match('_HOST\w', macro): macros[macro]['type'] = 'CUSTOM' macros[macro]['class'] = 'HOST' continue elif re.match('_SERVICE\w', macro): macros[macro]['type'] = 'CUSTOM' macros[macro]['class'] = 'SERVICE' # value of macro: re.split('_HOST', '_HOSTMAC_ADDRESS')[1] continue elif re.match('_CONTACT\w', macro): macros[macro]['type'] = 'CUSTOM' macros[macro]['class'] = 'CONTACT' continue # On demand macro elif len(macro.split(':')) > 1: macros[macro]['type'] = 'ONDEMAND' continue # OK, classical macro... for cls in clss: if macro in cls.macros: macros[macro]['type'] = 'class' macros[macro]['class'] = cls continue # Resolve MACROS for the ARGN def _resolve_argn(self, macro, args): # first, get the number of args id = None r = re.search('ARG(?P<id>\d+)', macro) if r is not None: id = int(r.group('id')) - 1 try: return args[id] except IndexError: return '' # Resolve on-demand macro, quite hard in fact def _resolve_ondemand(self, macro, data): #print "\nResolving macro", macro elts = macro.split(':') nb_parts = len(elts) macro_name = elts[0] # Len 3 == service, 2 = all others types... if nb_parts == 3: val = '' #print "Got a Service on demand asking...", elts (host_name, service_description) = (elts[1], elts[2]) # host_name can be void, so it's the host in data # that is important. We use our self.host_class to # find the host in the data :) if host_name == '': for elt in data: if elt is not None and elt.__class__ == self.host_class: host_name = elt.host_name # Ok now we get service s = self.services.find_srv_by_name_and_hostname(host_name, service_description) if s is not None: cls = s.__class__ prop = cls.macros[macro_name] val = self._get_value_from_element(s, prop) #print "Got val:", val return val # Ok, service was easy, now hard part else: val = '' elt_name = elts[1] # Special case: elt_name can be void # so it's the host where it apply if elt_name == '': for elt in data: if elt is not None and elt.__class__ == self.host_class: elt_name = elt.host_name for list in self.lists_on_demand: cls = list.inner_class # We search our type by looking at the macro if macro_name in cls.macros: prop = cls.macros[macro_name] i = list.find_by_name(elt_name) if i is not None: val = self._get_value_from_element(i, prop) # Ok we got our value :) break return val return '' # Get Fri 15 May 11:42:39 CEST 2009 def _get_long_date_time(self): return time.strftime("%a %d %b %H:%M:%S %Z %Y").decode('UTF-8', 'ignore') # Get 10-13-2000 00:30:28 def _get_short_date_time(self): return time.strftime("%d-%m-%Y %H:%M:%S") # Get 10-13-2000 def _get_date(self): return time.strftime("%d-%m-%Y") # Get 00:30:28 def _get_time(self): return time.strftime("%H:%M:%S") # Get epoch time def _get_timet(self): return str(int(time.time())) def _get_total_hosts_up(self): return len([h for h in self.hosts if h.state == 'UP']) def _get_total_hosts_down(self): return len([h for h in self.hosts if h.state == 'DOWN']) def _get_total_hosts_unreachable(self): return len([h for h in self.hosts if h.state == 'UNREACHABLE']) # TODO def _get_total_hosts_unreachable_unhandled(self): return 0 def _get_total_hosts_problems(self): return len([h for h in self.hosts if h.is_problem]) def _get_total_hosts_problems_unhandled(self): return 0 def _get_total_service_ok(self): return len([s for s in self.services if s.state == 'OK']) def _get_total_services_warning(self): return len([s for s in self.services if s.state == 'WARNING']) def _get_total_services_critical(self): return len([s for s in self.services if s.state == 'CRITICAL']) def _get_total_services_unknown(self): return len([s for s in self.services if s.state == 'UNKNOWN']) # TODO def _get_total_services_warning_unhandled(self): return 0 def _get_total_services_critical_unhandled(self): return 0 def _get_total_services_unknown_unhandled(self): return 0 def _get_total_service_problems(self): return len([s for s in self.services if s.is_problem]) def _get_total_service_problems_unhandled(self): return 0 def _get_process_start_time(self): return 0 def _get_events_start_time(self): return 0
agpl-3.0
-1,762,913,324,187,749,400
39.133028
171
0.552349
false
bbondy/brianbondy.gae
libs/markdown/extensions/meta.py
1
2697
#!usr/bin/python """ Meta Data Extension for Python-Markdown ======================================= This extension adds Meta Data handling to markdown. Basic Usage: >>> import markdown >>> text = '''Title: A Test Doc. ... Author: Waylan Limberg ... John Doe ... Blank_Data: ... ... The body. This is paragraph one. ... ''' >>> md = markdown.Markdown(['meta']) >>> md.convert(text) u'<p>The body. This is paragraph one.</p>' >>> md.Meta {u'blank_data': [u''], u'author': [u'Waylan Limberg', u'John Doe'], u'title': [u'A Test Doc.']} Make sure text without Meta Data still works (markdown < 1.6b returns a <p>). >>> text = ' Some Code - not extra lines of meta data.' >>> md = markdown.Markdown(['meta']) >>> md.convert(text) u'<pre><code>Some Code - not extra lines of meta data.\\n</code></pre>' >>> md.Meta {} Copyright 2007-2008 [Waylan Limberg](http://achinghead.com). Project website: <http://www.freewisdom.org/project/python-markdown/Meta-Data> Contact: [email protected] License: BSD (see ../docs/LICENSE for details) """ import markdown, re # Global Vars META_RE = re.compile(r'^[ ]{0,3}(?P<key>[A-Za-z0-9_-]+):\s*(?P<value>.*)') META_MORE_RE = re.compile(r'^[ ]{4,}(?P<value>.*)') class MetaExtension (markdown.Extension): """ Meta-Data extension for Python-Markdown. """ def extendMarkdown(self, md, md_globals): """ Add MetaPreprocessor to Markdown instance. """ md.preprocessors.add("meta", MetaPreprocessor(md), "_begin") class MetaPreprocessor(markdown.preprocessors.Preprocessor): """ Get Meta-Data. """ def run(self, lines): """ Parse Meta-Data and store in Markdown.Meta. """ meta = {} key = None while 1: line = lines.pop(0) if line.strip() == '': break # blank line - done m1 = META_RE.match(line) if m1: key = m1.group('key').lower().strip() meta[key] = [m1.group('value').strip()] else: m2 = META_MORE_RE.match(line) if m2 and key: # Add another line to existing key meta[key].append(m2.group('value').strip()) else: lines.insert(0, line) break # no meta data - done self.markdown.Meta = meta return lines def makeExtension(configs={}): return MetaExtension(configs=configs) if __name__ == "__main__": import doctest doctest.testmod()
mit
-9,115,914,859,540,492,000
27.966667
99
0.531702
false
shadowmint/nwidget
lib/cocos2d-0.5.5/test/test_transition_fadebl.py
1
1224
# This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # testinfo = "s, t 0.5, s, t 1, s, t 1.5, s, t 2.1, s, q" tags = "FadeBLTransition" import cocos from cocos.director import director from cocos.actions import * from cocos.layer import * from cocos.scenes import * from cocos.sprite import * import pyglet from pyglet.gl import * class BackgroundLayer(cocos.layer.Layer): def __init__(self): super(BackgroundLayer, self).__init__() self.img = pyglet.resource.image('background_image.png') def draw( self ): glColor4ub(255, 255, 255, 255) glPushMatrix() self.transform() self.img.blit(0,0) glPopMatrix() def main(): director.init( resizable=True ) scene1 = cocos.scene.Scene() scene2 = cocos.scene.Scene() colorl = ColorLayer(32,32,255,255) sprite = Sprite( 'grossini.png', (320,240) ) colorl.add( sprite ) scene1.add( BackgroundLayer(), z=0 ) scene2.add( colorl, z=0 ) director.run( FadeBLTransition( scene1, 2, scene2) ) if __name__ == '__main__': main()
apache-2.0
-6,601,661,051,400,266,000
24.608696
72
0.619281
false
akanouras/dm-tool
dm_tool.py
1
11221
#! /usr/bin/env python # -*- coding:utf-8 -*- from __future__ import print_function # , unicode_literals # Based on dm-tool.c from the LightDM project. # Original Author: Robert Ancell <[email protected]> # Copyright (C) 2013 Antonis Kanouras <[email protected]> # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. See http://www.gnu.org/copyleft/gpl.html the full text of the # license. # Constants __version__ = '1.6.0.metadosis0' __all__ = ['DMTool'] COMMANDS_HELP = '''\ Commands: switch-to-greeter Switch to the greeter switch-to-user USERNAME [SESSION] Switch to a user session switch-to-guest [SESSION] Switch to a guest session lock Lock the current seat list-seats List the active seats add-nested-seat [XEPHYR_ARGS...] Start a nested display add-local-x-seat DISPLAY_NUMBER Add a local X seat add-seat TYPE [NAME=VALUE...] Add a dynamic seat ''' import os import sys import errno import signal import traceback import argparse import collections import itertools from io import StringIO import dbus # Python 3 compatibility try: unicode except NameError: unicode = str u = unicode def get_free_display_number(): '''Get a unique display number. It's racy, but the only reliable method to get one.''' for display_number in itertools.count(): try: os.stat('/tmp/.X{0}-lock'.format(display_number)) except OSError as e: if e.errno == errno.ENOENT: return display_number else: raise class DBusFormats(collections.defaultdict): 'Dict of dbus.types.*: (format, formatter)' default_factory = lambda: ("{0}{1}={2}", lambda x: x) default_formats = { dbus.String: ("{0}{1}='{2}'", lambda x: x), dbus.Boolean: ("{0}{1}={2}", lambda x: u(bool(x)).lower()), } def __init__(self, default_format=None, default_formats=None): if default_format is not None: self.default_factory = default_format if default_formats is not None: self.default_formats = default_formats self.update(self.default_formats) class DMTool(object): __doc__ = COMMANDS_HELP # Dict of method: path _dbus_paths = { 'SwitchToGreeter': '/org/freedesktop/DisplayManager/Seat', 'SwitchToUser': '/org/freedesktop/DisplayManager/Seat', 'SwitchToGuest': '/org/freedesktop/DisplayManager/Seat', 'Lock': '/org/freedesktop/DisplayManager/Seat', 'AddLocalXSeat': '/org/freedesktop/DisplayManager', 'AddSeat': '/org/freedesktop/DisplayManager', } _dbus_formats = DBusFormats() def __init__(self, bus=None): 'bus must be a dbus.*Bus instance' if not os.environ.get('XDG_SEAT_PATH', '').startswith( '/org/freedesktop/DisplayManager/Seat'): raise Exception('Not running inside a display manager,' ' XDG_SEAT_PATH is invalid or not defined') if bus is None: bus = dbus.SystemBus() self._bus = bus def __call__(self, command, *args, **kwargs): 'Call a command argv-style, see self.__doc__ for details' command = getattr(self, command.replace('-', '_')) return command(*args, **kwargs) @staticmethod def _path_to_interface(path): return path.rstrip('0123456789').lstrip('/').replace('/', '.') def _get_proxy(self, path): return self._bus.get_object('org.freedesktop.DisplayManager', path) def _dbus_call(self, method, *args, **kwargs): 'Call one of the predefined dbus methods' object_path = self._dbus_paths[method] interface = self._path_to_interface(object_path) if object_path == '/org/freedesktop/DisplayManager/Seat': object_path = os.environ['XDG_SEAT_PATH'] proxy = self._get_proxy(object_path) method = proxy.get_dbus_method( method, dbus_interface=interface) return method(*args, **kwargs) @classmethod def _get_commands(self): 'Returns a dict of command: description' return {cmd.replace('_', '-'): getattr(self, cmd).__doc__ for cmd in dir(self) if not cmd.startswith('_')} def switch_to_greeter(self): 'Switch to the greeter' return self._dbus_call('SwitchToGreeter') def switch_to_user(self, username, session=None): 'Switch to a user session' return self._dbus_call('SwitchToUser', username, session or '') def switch_to_guest(self, session=None): 'Switch to a guest session' return self._dbus_call('SwitchToGuest', session or '') def lock(self): 'Lock the current seat' return self._dbus_call('Lock') def list_seats(self): 'List the active seats' def get_properties(proxy): interface = self._path_to_interface(proxy.object_path) return proxy.GetAll(interface, dbus_interface=dbus.PROPERTIES_IFACE) def get_name_from_path(path): return path.split('/org/freedesktop/DisplayManager/')[-1] def print_item(key, value, indent=0, file=None): fmt, formatter = self._dbus_formats[type(value)] print(u(fmt).format(' ' * indent, key, formatter(value)), file=file) def print_path(path, exclude=None, indent=0, file=None): path_proxy = self._get_proxy(path) path_name = get_name_from_path(path) print(u('{0}{1}').format(' ' * indent, path_name), file=file) indent += 2 descend_paths = [] path_properties = get_properties(path_proxy) for key, value in sorted(path_properties.items()): if value == exclude: continue if isinstance(value, dbus.Array): if len(value) > 0 and isinstance(value[0], dbus.ObjectPath): descend_paths += value continue print_item(key, value, indent=indent, file=file) for descend_path in descend_paths: print_path(descend_path, exclude=path, indent=indent, file=file) output = StringIO() dm_proxy = self._get_proxy('/org/freedesktop/DisplayManager') seats = get_properties(dm_proxy)['Seats'] for seat in sorted(seats): print_path(seat, file=output) return output.getvalue().rstrip('\n') def add_nested_seat(self, *xephyr_args): 'Start a nested display' def xephyr_signal_handler(sig, frame): # Fugly, nonlocal (Py3K+) would make this prettier xephyr_signal_handler.was_called = True def setup_xephyr_handler(): xephyr_signal_handler.original_handler = signal.getsignal(signal.SIGUSR1) xephyr_signal_handler.was_called = False signal.signal(signal.SIGUSR1, xephyr_signal_handler) def wait_for_xephyr(pid): try: os.waitpid(pid, 0) except: # On purpose pass signal.signal(signal.SIGUSR1, xephyr_signal_handler.original_handler) return xephyr_signal_handler.was_called xephyr_argv = ['Xephyr'] # Determine the display number to use for Xephyr for arg in xephyr_args: if arg.startswith(':'): try: xephyr_display_number = int(arg.lstrip(':')) break except ValueError: continue else: xephyr_display_number = get_free_display_number() xephyr_argv += ':{0}'.format(xephyr_display_number) xephyr_argv.extend(xephyr_args) # Wait for signal from Xephyr when it is ready setup_xephyr_handler() # Spawn Xephyr xephyr_pid = os.fork() if xephyr_pid == 0: # In child os.closerange(0, 1023) # This makes X(ephyr) SIGUSR1 its parent when ready. signal.signal(signal.SIGUSR1, signal.SIG_IGN) try: os.execvp(xephyr_argv[0], xephyr_argv) except OSError as e: sys.exit(e.errno) # Wait for Xephyr to signal us if wait_for_xephyr(xephyr_pid): try: return self._dbus_call('AddLocalXSeat', xephyr_display_number) except Exception as e: os.kill(xephyr_pid, signal.SIGQUIT) raise Exception('Unable to add seat: {0}'.format(e)) else: raise Exception('Xephyr launch failed') def add_local_x_seat(self, display_number): 'Add a local X seat' return self._dbus_call('AddLocalXSeat', int(display_number)) def add_seat(self, type, *args, **kwargs): 'Add a dynamic seat' # AddSeat expects a list of tuples properties = [tuple(arg.split('=', 1)) if not isinstance(arg, tuple) else arg for arg in args] + kwargs.items() return self._dbus_call('AddSeat', type, properties) def get_parser(): parser = argparse.ArgumentParser( description='Display Manager tool', usage='%(prog)s [OPTION...] COMMAND [ARGS...]', epilog=COMMANDS_HELP, add_help=False, formatter_class=argparse.RawDescriptionHelpFormatter) options = parser.add_argument_group('Options') options.add_argument('-h', '--help', help='Show help options', action='help') options.add_argument('-v', '--version', help='Show release version', action='version', version='%(prog)s {0}'.format(__version__)) options.add_argument('--debug', dest='debug', action='store_true', help='Show debugging information') options.add_argument('--session-bus', dest='session_bus', action='store_true', help='Use session D-Bus') parser.add_argument('command', metavar='COMMAND', choices=DMTool._get_commands(), help=argparse.SUPPRESS) parser.add_argument('rest', metavar='ARGS', nargs='*', help=argparse.SUPPRESS) return parser def main(): parser = get_parser() args, unparsed = parser.parse_known_args() command_args = args.rest + unparsed bus = dbus.SessionBus() if args.session_bus else dbus.SystemBus() dmtool = DMTool(bus) try: print(dmtool(args.command, *command_args) or '') except Exception as e: if args.debug: traceback.print_exc() else: print(e, file=sys.stderr) if isinstance(e, TypeError): parser.print_help() return os.EX_USAGE else: return 1 if __name__ == '__main__': sys.exit(main())
gpl-3.0
4,424,071,183,432,009,000
33.420245
85
0.583014
false
jrtaal/pyramid_handlebars
test/test_renderers.py
1
9484
''' Created on 3 mei 2012 @author: jacco ''' import unittest import os from lifeshare.lib.renderers import stackdict from lifeshare.lib.renderers.ajax_renderer import AjaxRendererFactory from lifeshare.lib.renderers.pybars_renderer import PybarsRendererFactory from pyramid import testing from pyramid.threadlocal import get_current_registry from pyramid.i18n import TranslationStringFactory class RendererInfoFixture(object): def __init__(self, name, registry): self.registry = registry self.settings = registry.settings self.name = name self.package = self class RendererTest(unittest.TestCase): def setUp(self): from ..test import settings from sqlalchemy.ext.declarative import declarative_base settings['pybars.directories'] = "lifeshare.lib.test:templates" settings['osiris.store.sqla_base'] = declarative_base() config = testing.setUp(settings=settings) self.config = config #self.config.include('lifeshare.app') #self.config.include('lifeshare.api.api') self.config.add_translation_dirs('lifeshare:locale') config.add_renderer('.bar', 'lifeshare.lib.renderers.pybars_renderer.PybarsRendererFactory') import lifeshare.templates.deps as template_deps def master_get_globals(): return {} ajax_template_factory = AjaxRendererFactory( dependencies = template_deps.deps, get_globals = master_get_globals) ajax_master_template_factory = AjaxRendererFactory( master ="jsbase.bar", dependencies = template_deps.deps, get_globals = master_get_globals) config.add_renderer('.ajax', ajax_master_template_factory) config.add_renderer('ajax', ajax_master_template_factory) #config.add_renderer('.ajax-nomaster', ajax_template_factory) self.registry = get_current_registry() #self.registry.settings["pybars.directories"] = "lifeshare:templates/handlebars" def tearDown(self): testing.tearDown() def test_types(self): sd = stackdict({'a':1,'b':2}) sd['c']=3 self.assertEqual(sd['a'], 1) self.assertEqual(sd['b'], 2) self.assertEqual(sd['c'], 3) sd.push( dict(a = 9, d=4)) self.assertEqual(sd['a'], 9) self.assertEqual(sd['d'], 4) sd.pop() self.assertEqual(sd['a'], 1) self.assertEqual(set(sd.keys()), set(['a','b','c'])) self.assertEqual(set(sd.iterkeys()), set(['a','b','c'])) self.assertEqual(set(sd.iteritems()), set([ ('a', 1),('b', 2),('c',3)])) def get_request(self): request = testing.DummyRequest() from lifeshare.lib.renderers.acceptparse import AnnotatedMIMEAccept import time request.accept = AnnotatedMIMEAccept("text/html") request._request_time = time.time() return request def test_pybars(self): request = self.get_request() renderer = PybarsRendererFactory(RendererInfoFixture("test.bar", self.registry)) response = renderer( {"value1": "Test Value", "value2" : ["Value 2a", "Value 2b"], "value3" : u"Videos\xc3" } , dict(request=request, registry = self.registry)) #print ">" + response + "<" self.assertEqual(response, u"""Begin Child Value 1: Test Value Value 2: - Value 2a - Value 2b Videos\xc3 End Child """) def test_ajaxrenderer(self): from lifeshare.templates.deps import deps def get_globals(request): return {} factory = AjaxRendererFactory("test_master.bar", deps, get_globals = get_globals) renderer = factory(RendererInfoFixture("test.bar.ajax", self.registry)) request = self.get_request() request.is_xhr = False request.user = None system = dict(request = request, registry = self.registry ) response = renderer({ "title" : "Test Title", "preamble":"", "body": "BODY", "resource": { "value1": "Test Value", "value2" : ["Value 2a", "Value 2b"], "value3" : u"BLA\xc0" }} , system) #print ">" + response + "<" self.assertEqual(response , u"""Master Title: Test Title Begin Body Begin Child Value 1: Test Value Value 2: - Value 2a - Value 2b BLA\xc0 End Child End Body End Master """) def test_path(self): pass def test_ajaxjson(self): from lifeshare.templates.deps import deps def get_globals(request): return {} data = { "title" : "Test Title", "preamble":"", "body": "BODY", "resource": { "value1": "Test Value", "value2" : ["Value 2a", "Value 2b"], "value3" : u"BLA\xc0" }} factory = AjaxRendererFactory("test_master.bar", deps, get_globals = get_globals) renderer = factory(RendererInfoFixture("test.bar.ajax", self.registry)) request = self.get_request() request.is_xhr = True request.view_name = "json" request.user = None system = dict(request = request, registry = self.registry ) response = renderer( data , system) self.assertEqual(response , """{"body": "BODY", "path": "/", "preamble": "", "resource": {"value3": "BLA\\u00c0", "value2": ["Value 2a", "Value 2b"], "value1": "Test Value"}, "title": "Test Title"}""") request.view_name = "test" response = renderer( data, system) self.assertEqual(str(response), """Master Title: Test Title Begin Body <pre>{'body': 'BODY', 'path': '/', 'preamble': '', 'resource': {'value1': 'Test Value', 'value2': ('Value 2a', 'Value 2b'), 'value3': u'BLA\\xc0'}, 'title': 'Test Title'}</pre> End Body End Master """) request.view_name = "ajax" response = renderer( data, system) #print ">" + response + "<" self.assertEqual(str(response), """{"body": "Begin Child\\n Value 1:\\n Test Value\\n Value 2:\\n \\n - Value 2a\\n \\n - Value 2b\\n \\n BLA\u00c0\\nEnd Child\\n", "resource": {"value3": "BLA\u00c0", "value2": ["Value 2a", "Value 2b"], "value1": "Test Value"}, "title": "Test Title", "path": "/", "preamble": ""}""") request.view_name = "ajaxp" response = renderer( data, system) #print ">" + response + "<" self.assertEqual(str(response), """load({"body": "Begin Child\\n Value 1:\\n Test Value\\n Value 2:\\n \\n - Value 2a\\n \\n - Value 2b\\n \\n BLA\\u00c0\\nEnd Child\\n", "resource": {"value3": "BLA\\u00c0", "value2": ["Value 2a", "Value 2b"], "value1": "Test Value"}, "title": "Test Title", "path": "/", "preamble": ""})""") request.view_name = "ajaxtest" response = renderer( data, system) #print ">" + response + "<" self.assertEqual(str(response), """{'body': u'Begin Child\\n Value 1:\\n Test Value\\n Value 2:\\n \\n - Value 2a\\n \\n - Value 2b\\n \\n BLA\\xc0\\nEnd Child\\n',\n 'path': '/',\n 'preamble': '',\n 'resource': {'value1': 'Test Value', 'value2': ('Value 2a', 'Value 2b'), 'value3': u'BLA\\xc0'},\n 'title': 'Test Title'}""") def test_i18n_bars(self): renderer = PybarsRendererFactory(RendererInfoFixture("i18ntest.bar", self.registry)) _ = TranslationStringFactory("Lifeshare") for locale in ("nl", "en") : request = self.get_request() request._LOCALE_ = locale response = renderer( {"n": 1, "o": 2, "a" : ["1","2",_("Video")], "b" : ["1","2",_("Videos")], "NAME" : "Jacco" } , dict(request=request, registry = self.registry)) #print "LOCALE", locale #print response if locale in ("nl", "nl_NL"): self.assertEqual(response[0:20], u"Welkom bij Lifeshare") if locale in ("en", "en_US"): self.assertEqual(response[0:20], u"Welcome to Lifeshare") #self.assertEqual(response[0:8] , "Value 1:") def test_subdir_template(self): import pdb; pdb.set_trace() request = self.get_request() renderer = PybarsRendererFactory(RendererInfoFixture("test_embed.bar", self.registry)) response = renderer( {"value1": "Test Value", "value2" : ["Value 2a", "Value 2b"], "value3" : u"Videos\xc3" } , dict(request=request, registry = self.registry)) print response def test_localize_template(self): from lifeshare.lib.renderers.handlebars_i18n import extract_handlebars, translate_handlebars from pyramid.i18n import get_localizer tmp = open(os.path.join(os.path.dirname(__file__), "templates/i18ntest.bar")) strings = extract_handlebars(tmp,[],[],{}) self.assertEqual(strings[1][2], u"English") self.assertEqual(strings[2][2], u"Dutch") tmp.seek(0) request = self.get_request() request._LOCALE_ = "nl" localizer = get_localizer(request) tmp2 = translate_handlebars(tmp.read(), localizer, "Lifeshare") self.assertEqual(tmp2[0:114], """Welkom bij Lifeshare <div class="row-fluid"> <div class="span4">EngelsNederlands</div> <div class="span8">""")
mit
4,120,112,888,118,071,300
34.924242
333
0.578132
false
ceball/param
setup.py
1
2666
import os from setuptools import setup ########## autover ########## def get_setup_version(reponame): """Use autover to get up to date version.""" # importing self into setup.py is unorthodox, but param has no # required dependencies outside of python from param.version import Version return Version.setup_version(os.path.dirname(__file__),reponame,archive_commit="$Format:%h$") ########## dependencies ########## extras_require = { # pip doesn't support tests_require # (https://github.com/pypa/pip/issues/1197) 'tests': [ 'nose', 'flake8', ] } extras_require['all'] = sorted(set(sum(extras_require.values(), []))) ########## metadata for setuptools ########## setup_args = dict( name='param', version=get_setup_version("param"), description='Make your Python code clearer and more reliable by declaring Parameters.', long_description=open('README.rst').read() if os.path.isfile('README.rst') else 'Consult README.rst', author="HoloViz", author_email="[email protected]", maintainer="HoloViz", maintainer_email="[email protected]", platforms=['Windows', 'Mac OS X', 'Linux'], license='BSD', url='http://param.holoviz.org/', packages=["param","numbergen"], provides=["param","numbergen"], include_package_data = True, python_requires=">=2.7", install_requires=[], extras_require=extras_require, tests_require=extras_require['tests'], project_urls={ "Documentation": "https://param.holoviz.org/", "Releases": "https://github.com/holoviz/param/releases", "Bug Tracker": "https://github.com/holoviz/param/issues", "Source Code": "https://github.com/holoviz/param", "Panel Examples": "https://panel.holoviz.org/user_guide/Param.html", }, classifiers=[ "License :: OSI Approved :: BSD License", "Development Status :: 5 - Production/Stable", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Operating System :: OS Independent", "Intended Audience :: Science/Research", "Intended Audience :: Developers", "Natural Language :: English", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries"] ) if __name__=="__main__": setup(**setup_args)
bsd-3-clause
-6,838,050,883,231,067,000
32.746835
105
0.615904
false
robmadole/jig
src/jig/output.py
1
15443
# coding=utf-8 import sys import codecs from functools import wraps from StringIO import StringIO from contextlib import contextmanager from jig.exc import ForcedExit # Message types INFO = u'info' WARN = u'warn' STOP = u'stop' def strip_paint(payload): """ Removes any console specific color characters. Where ``payload`` is a string containing special characters used to print colored output to the terminal. Returns a unicode string without the paint. """ strip = [u'\x1b[31;1m', u'\x1b[32;1m', u'\x1b[33;1m', u'\x1b[39;22m'] for paint in strip: payload = payload.replace(paint, '') return payload def lookup_type(strtype): """ Returns the actual type for a string message representation of it. For example:: >>> lookup_type('Info') u'info' >>> lookup_type('warn') u'warn' >>> lookup_type('s') u'stop' It will default to ``INFO``. >>> lookup_type('unknown'): u'info' """ strtype = unicode(strtype) or u'' mt = strtype.lower() if mt.startswith(u'i'): return INFO if mt.startswith(u'w'): return WARN if mt.startswith(u's'): return STOP # Default to INFO return INFO def _get_hint(hint): """ Retrieves a hint by the given name from :module:`jig.commands.hints`. :param string hintname: the ALL_CAPS constant defined in the hints module :rtype: list """ from jig.commands import hints try: return getattr(hints, hint) except AttributeError: return hint def utf8_writer(filelike): """ Wrap a file-like object with a UTF-8 wrapper. :param file filelike: the file-like object to wrap """ return codecs.getwriter('utf_8')(filelike) class Message(object): """ Represents one message that a plugin is communicating to the user. """ def __init__(self, plugin, type=INFO, body='', file=None, line=None): """ Create a message object associated with a plugin. All messages must be associated with the Plugin ``plugin`` that was responsible for creating them. """ self.plugin = plugin self.type = type self.body = body self.file = file self.line = line def __repr__(self): reprstr = '<{cls} type="{t}", body={b}, file={f}, line={l}>' return reprstr.format( cls=self.__class__.__name__, t=self.type, b=repr(self.body), f=repr(self.file), l=self.line) def __eq__(self, other): """ If type, body, file, and line attributes are the same they are equal. """ try: attrs = ('type', 'body', 'file', 'line') for attr in attrs: if not getattr(self, attr) == getattr(other, attr): return False except AttributeError: # If the other object is missing an attribute they can't be equal. return False return True @property def type(self): return self._type @type.setter def type(self, value): self._type = lookup_type(value) class Error(Message): """ An error message related to a plugin's results. """ def __init__(self, *args, **kwargs): if 'type' not in kwargs: # Default to stop for errors kwargs['type'] = 'stop' super(Error, self).__init__(*args, **kwargs) class ConsoleView(object): """ Main view used to handle output to the console. """ def __init__(self, collect_output=False, exit_on_exception=True, stdout=None, stderr=None): # Do we collect output? False means we print it out self.collect_output = collect_output self.exit_on_exception = exit_on_exception self.init_collector(stdout=stdout, stderr=stderr) def init_collector(self, stdout=None, stderr=None): self._collect = { 'stdout': stdout or StringIO(), 'stderr': stderr or StringIO()} @contextmanager def out(self): try: stdout = utf8_writer(sys.stdout) fo = self._collect['stdout'] if self.collect_output else stdout yield lambda line: fo.write(unicode(line) + u'\n') except Exception as e: stderr = utf8_writer(sys.stderr) fo = self._collect['stderr'] if self.collect_output else stderr fo.write(unicode(e) + u'\n') if hasattr(e, 'hint'): fo.write(unicode(_get_hint(e.hint)) + u'\n') try: retcode = e.retcode except AttributeError: # This exception does not have a return code, assume 1 retcode = 1 if self.exit_on_exception: sys.exit(retcode) # pragma: no cover else: raise ForcedExit(retcode) def print_help(self, commands): """ Format and print help for using the console script. """ with self.out() as printer: printer('usage: jig [-h] COMMAND') printer('') printer('optional arguments:') printer(' -h, --help show this help message and exit') printer('') printer('jig commands:') for command in commands: name = command.__module__.split('.')[-1] description = command.parser.description printer(' {name:12}{description}'.format( name=name, description=description)) printer('') printer('See `jig COMMAND --help` for more information') class ResultsCollator(object): """ Collects and combines plugin results into a unified summary. """ def __init__(self, results): # Decorate our message methods setattr( self, '_commit_specific_message', self.iterresults(self._commit_specific_message)) setattr( self, '_file_specific_message', self.iterresults(self._file_specific_message)) setattr( self, '_line_specific_message', self.iterresults(self._line_specific_message)) self._results = results self._plugins = set() self._reporters = set() self._counts = {INFO: 0, WARN: 0, STOP: 0} self._errors = [] # Pre-compute our messages (collate) self._cm = list(self._commit_specific_message()) self._fm = list(self._file_specific_message()) self._lm = list(self._line_specific_message()) @property def messages(self): """ Messages by type for the plugin results. Return a tuple of messages by type based on the results that were provided when initializing the collator. Each tuple contains a generator object which will return ``jig.output.Message`` objects. The tuple has a length of 3 and is in this order: 1. Commit specific messages 2. File specific messages 3. Line specific messages """ return (self._cm, self._fm, self._lm) @property def plugins(self): """ Provides a set of plugins that were present in the results. This method will return a plugin regardless of whether it yielded messages or not. """ return self._plugins @property def reporters(self): """ Provides a set of plugins that yielded messages. This method will only provide something other than an empty set when the commit, file, or line specific message methods have been called. """ return self._reporters @property def counts(self): """ Tally of the type of messages from the results. Returns a dictionary like:: {u'info': 5, u'warn': 0, u'stop', 1} """ return self._counts @property def errors(self): """ Errors that were generated during collation. Errors are found when a piece of data given to one of the collators is of a type that can't be understood. Returns a list of ``jig.output.Error`` objects. """ return self._errors def iterresults(self, func): """ Decorator that iterates through results. This simplifies some of the boilerplate for our collation. The decorated function must be a generator that yields ``Message`` or ``Error`` object. It will sift errors and collect those into a separate container. The ``Message`` objects then be returned to the caller. """ @wraps(func) def wrapper(*args, **kwargs): for plugin, result in self._results.items(): self._plugins.add(plugin) retcode, stdout, stderr = result if not retcode == 0: error = Error(plugin) error.body = stderr or stdout self._errors.append(error) # Remove this plugin since it's an error. If we don't do # this we'll end up reporting on this 3 times. del self._results[plugin] continue for message in list(func(plugin, stdout)): if isinstance(message, Error): self._errors.append(message) try: del self._results[plugin] except KeyError: pass continue # pragma: no cover self._reporters.add(plugin) self._counts[message.type] += 1 yield message return wrapper def _commit_specific_message(self, plugin, obj): """ Look for plugins that are reporting generic messages. These messages are not specific to any file or line number. They generally come from plugins that are inspecting the commit as a whole and reporting on some characteristic. A good example of this would be a plugin that checked to see if any modifications were made to a docs directory if modifications were also made to a src directory. Basically, a "did you write/update the docs" message. """ if not obj: # This is falsy, there is nothing of interest here return if isinstance(obj, dict): # This is for file or line specific messages return if isinstance(obj, basestring): # Straight up message, normalize this for our loop obj = [obj] if isinstance(obj, list): # It's a list of [TYPE, BODY] for m in obj: if not m: continue if isinstance(m, basestring): # Straight up message, normalize this for our loop yield Message(plugin, body=m) continue if not isinstance(m, list) or len(m) != 2: yield Error(plugin, body=m) continue if not m[1]: # Empty message body, this isn't useful continue yield Message(plugin, type=m[0], body=m[1]) # We understood this, so no need to continue return # This object is not understood yield Error(plugin, body=obj) def _file_specific_message(self, plugin, obj): """ Look for plugins that are reporting file specific messages. These messages are specific to a file but not necessarily to a line number. In general they apply to a condition that is present that affects the whole file. An example of this would be detecting underscores or camel case in the filename. """ if not isinstance(obj, dict): # This is not a file specific messages return for filename, group in obj.items(): if isinstance(group, basestring): group = [group] if not isinstance(group, list): yield Error(plugin, body=group, file=filename) continue for msg in group: if isinstance(msg, basestring): msg = [msg] if not isinstance(msg, list): yield Error(plugin, body=msg, file=filename) continue if len(msg) == 0: # There is nothing here of interest continue if len(msg) == 1: # Should default to info type if not msg[0]: continue yield Message(plugin, body=msg[0], file=filename) continue if len(msg) == 2: if not msg[1]: continue # In the format of [TYPE, BODY] yield Message( plugin, body=msg[1], type=msg[0], file=filename) continue if len(msg) == 3: if not msg[2]: continue # In the format of [LINE, TYPE, BODY] if msg[0] is not None: # This is line specific, skip this continue yield Message( plugin, body=msg[2], type=msg[1], file=filename) continue # This object is not understood yield Error(plugin, body=obj) def _line_specific_message(self, plugin, obj): """ Look for plugins that are reporting line specific messages. For plugins wishing to identify specific lines, they use line specific messages. For example, you may have a JavaScript plugin that reports the existence of ``console.log`` on line 45. This allows the developer to pinpoint the problem much quicker than file or commit specific messages. There is a lack of error handling in this method. The commit and file specific handlers take care of error handling for us. This method gets to be pretty clean. """ if not isinstance(obj, dict): # This is not a file or line specific messages return for filename, group in obj.items(): if isinstance(group, basestring): group = [group] for msg in group: if isinstance(msg, basestring): msg = [msg] if 0 <= len(msg) <= 2: # There is nothing here of interest continue if msg[0] is None: # This is not line specific continue if not msg[2]: # The body is empty continue # In the format of [LINE, TYPE, BODY] yield Message( plugin, body=msg[2], type=msg[1], file=filename, line=msg[0]) continue
bsd-2-clause
4,069,934,028,138,322,000
30.324544
79
0.538885
false
dtaht/ns-3-dev-old
src/wimax/bindings/modulegen__gcc_ILP32.py
1
738879
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'], 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') ## 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']) ## 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'], 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') ## random-variable.h (module 'core'): ns3::RandomVariable [class] module.add_class('RandomVariable', import_from_module='ns.core') ## rng-seed-manager.h (module 'core'): ns3::RngSeedManager [class] module.add_class('RngSeedManager', import_from_module='ns.core') ## 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') ## random-variable.h (module 'core'): ns3::SequentialVariable [class] module.add_class('SequentialVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## 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') ## 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']) ## random-variable.h (module 'core'): ns3::TriangularVariable [class] module.add_class('TriangularVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## 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) ## random-variable.h (module 'core'): ns3::UniformVariable [class] module.add_class('UniformVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## wimax-tlv.h (module 'wimax'): ns3::VectorTlvValue [class] module.add_class('VectorTlvValue', parent=root_module['ns3::TlvValue']) ## random-variable.h (module 'core'): ns3::WeibullVariable [class] module.add_class('WeibullVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## 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']) ## random-variable.h (module 'core'): ns3::ZetaVariable [class] module.add_class('ZetaVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## random-variable.h (module 'core'): ns3::ZipfVariable [class] module.add_class('ZipfVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## 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') ## 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']) ## random-variable.h (module 'core'): ns3::ConstantVariable [class] module.add_class('ConstantVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## 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']) ## random-variable.h (module 'core'): ns3::DeterministicVariable [class] module.add_class('DeterministicVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## random-variable.h (module 'core'): ns3::EmpiricalVariable [class] module.add_class('EmpiricalVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## random-variable.h (module 'core'): ns3::ErlangVariable [class] module.add_class('ErlangVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## random-variable.h (module 'core'): ns3::ExponentialVariable [class] module.add_class('ExponentialVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## random-variable.h (module 'core'): ns3::GammaVariable [class] module.add_class('GammaVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## header.h (module 'network'): ns3::Header [class] module.add_class('Header', import_from_module='ns.network', parent=root_module['ns3::Chunk']) ## random-variable.h (module 'core'): ns3::IntEmpiricalVariable [class] module.add_class('IntEmpiricalVariable', import_from_module='ns.core', parent=root_module['ns3::EmpiricalVariable']) ## 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']) ## random-variable.h (module 'core'): ns3::LogNormalVariable [class] module.add_class('LogNormalVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## 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']) ## random-variable.h (module 'core'): ns3::NormalVariable [class] module.add_class('NormalVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## 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']) ## random-variable.h (module 'core'): ns3::ParetoVariable [class] module.add_class('ParetoVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariable']) ## 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']) ## 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']) ## 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::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', ['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']) ## 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']) ## 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']) ## 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']) ## 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']) ## dl-mac-messages.h (module 'wimax'): ns3::Dcd [class] module.add_class('Dcd', parent=root_module['ns3::Header']) ## 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']) ## attribute.h (module 'core'): ns3::EmptyAttributeValue [class] module.add_class('EmptyAttributeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## 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> >']) ## 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']) ## 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']) ## 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']) ## 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.h (module 'core'): ns3::RandomVariableChecker [class] module.add_class('RandomVariableChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## random-variable.h (module 'core'): ns3::RandomVariableValue [class] module.add_class('RandomVariableValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## 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::TimeChecker [class] module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## 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::vector< ns3::ServiceFlow * >', 'ns3::ServiceFlow *', container_type='vector') module.add_container('std::vector< bool >', 'bool', container_type='vector') module.add_container('ns3::bvec', 'bool', container_type='vector') module.add_container('std::vector< ns3::DlFramePrefixIe >', 'ns3::DlFramePrefixIe', container_type='vector') module.add_container('std::list< ns3::Ptr< ns3::Packet > >', 'ns3::Ptr< ns3::Packet >', container_type='list') module.add_container('std::vector< ns3::SSRecord * >', 'ns3::SSRecord *', container_type='vector') module.add_container('std::vector< ns3::OfdmUlBurstProfile >', 'ns3::OfdmUlBurstProfile', container_type='vector') module.add_container('std::list< ns3::OfdmUlMapIe >', 'ns3::OfdmUlMapIe', container_type='list') module.add_container('std::list< ns3::Ptr< ns3::UlJob > >', 'ns3::Ptr< ns3::UlJob >', container_type='list') module.add_container('std::list< ns3::Ptr< ns3::Packet const > >', 'ns3::Ptr< ns3::Packet const >', container_type='list') module.add_container('std::deque< ns3::WimaxMacQueue::QueueElement >', 'ns3::WimaxMacQueue::QueueElement', container_type='dequeue') module.add_container('std::list< std::pair< ns3::OfdmDlMapIe *, ns3::Ptr< ns3::PacketBurst > > >', 'std::pair< ns3::OfdmDlMapIe *, ns3::Ptr< ns3::PacketBurst > >', container_type='list') module.add_container('std::vector< ns3::Ptr< ns3::WimaxConnection > >', 'ns3::Ptr< ns3::WimaxConnection >', container_type='vector') module.add_container('std::vector< ns3::OfdmDlBurstProfile >', 'ns3::OfdmDlBurstProfile', container_type='vector') module.add_container('std::list< ns3::OfdmDlMapIe >', 'ns3::OfdmDlMapIe', container_type='list') typehandlers.add_type_alias('ns3::RngSeedManager', 'ns3::SeedManager') typehandlers.add_type_alias('ns3::RngSeedManager*', 'ns3::SeedManager*') typehandlers.add_type_alias('ns3::RngSeedManager&', 'ns3::SeedManager&') module.add_typedef(root_module['ns3::RngSeedManager'], 'SeedManager') typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *', 'ns3::LogNodePrinter') typehandlers.add_type_alias('void ( * ) ( std::ostream & ) **', 'ns3::LogNodePrinter*') typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *&', 'ns3::LogNodePrinter&') typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *', 'ns3::LogTimePrinter') typehandlers.add_type_alias('void ( * ) ( std::ostream & ) **', 'ns3::LogTimePrinter*') typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *&', 'ns3::LogTimePrinter&') typehandlers.add_type_alias('std::vector< bool, std::allocator< bool > >', 'ns3::bvec') typehandlers.add_type_alias('std::vector< bool, std::allocator< bool > >*', 'ns3::bvec*') typehandlers.add_type_alias('std::vector< bool, std::allocator< bool > >&', '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 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_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_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_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_Ns3RandomVariable_methods(root_module, root_module['ns3::RandomVariable']) register_Ns3RngSeedManager_methods(root_module, root_module['ns3::RngSeedManager']) 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_Ns3SequentialVariable_methods(root_module, root_module['ns3::SequentialVariable']) 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_Ns3TlvValue_methods(root_module, root_module['ns3::TlvValue']) register_Ns3TosTlvValue_methods(root_module, root_module['ns3::TosTlvValue']) register_Ns3TriangularVariable_methods(root_module, root_module['ns3::TriangularVariable']) 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_Ns3UniformVariable_methods(root_module, root_module['ns3::UniformVariable']) register_Ns3VectorTlvValue_methods(root_module, root_module['ns3::VectorTlvValue']) register_Ns3WeibullVariable_methods(root_module, root_module['ns3::WeibullVariable']) register_Ns3WimaxHelper_methods(root_module, root_module['ns3::WimaxHelper']) register_Ns3ZetaVariable_methods(root_module, root_module['ns3::ZetaVariable']) register_Ns3ZipfVariable_methods(root_module, root_module['ns3::ZipfVariable']) 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_Ns3ConstantVariable_methods(root_module, root_module['ns3::ConstantVariable']) register_Ns3CsParamVectorTlvValue_methods(root_module, root_module['ns3::CsParamVectorTlvValue']) register_Ns3DeterministicVariable_methods(root_module, root_module['ns3::DeterministicVariable']) register_Ns3EmpiricalVariable_methods(root_module, root_module['ns3::EmpiricalVariable']) register_Ns3ErlangVariable_methods(root_module, root_module['ns3::ErlangVariable']) register_Ns3ExponentialVariable_methods(root_module, root_module['ns3::ExponentialVariable']) register_Ns3GammaVariable_methods(root_module, root_module['ns3::GammaVariable']) register_Ns3Header_methods(root_module, root_module['ns3::Header']) register_Ns3IntEmpiricalVariable_methods(root_module, root_module['ns3::IntEmpiricalVariable']) register_Ns3Ipv4AddressTlvValue_methods(root_module, root_module['ns3::Ipv4AddressTlvValue']) register_Ns3Ipv4AddressTlvValueIpv4Addr_methods(root_module, root_module['ns3::Ipv4AddressTlvValue::ipv4Addr']) register_Ns3LogNormalVariable_methods(root_module, root_module['ns3::LogNormalVariable']) register_Ns3MacHeaderType_methods(root_module, root_module['ns3::MacHeaderType']) register_Ns3ManagementMessageType_methods(root_module, root_module['ns3::ManagementMessageType']) register_Ns3NormalVariable_methods(root_module, root_module['ns3::NormalVariable']) 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_Ns3ParetoVariable_methods(root_module, root_module['ns3::ParetoVariable']) 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_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_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__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_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_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_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_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_Ns3Dcd_methods(root_module, root_module['ns3::Dcd']) 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_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue']) register_Ns3EventImpl_methods(root_module, root_module['ns3::EventImpl']) 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_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_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_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_Ns3RandomVariableChecker_methods(root_module, root_module['ns3::RandomVariableChecker']) register_Ns3RandomVariableValue_methods(root_module, root_module['ns3::RandomVariableValue']) register_Ns3SimpleOfdmWimaxPhy_methods(root_module, root_module['ns3::SimpleOfdmWimaxPhy']) register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) 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']) 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'): 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'): 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_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::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() [member function] cls.add_method('IsIpv4MappedAddress', 'bool', []) ## 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::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::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::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(char const * name) [constructor] cls.add_constructor([param('char const *', 'name')]) ## log.h (module 'core'): void ns3::LogComponent::Disable(ns3::LogLevel level) [member function] cls.add_method('Disable', 'void', [param('ns3::LogLevel', 'level')]) ## log.h (module 'core'): void ns3::LogComponent::Enable(ns3::LogLevel level) [member function] cls.add_method('Enable', 'void', [param('ns3::LogLevel', 'level')]) ## log.h (module 'core'): void ns3::LogComponent::EnvVarCheck(char const * name) [member function] cls.add_method('EnvVarCheck', 'void', [param('char const *', 'name')]) ## log.h (module 'core'): bool ns3::LogComponent::IsEnabled(ns3::LogLevel level) const [member function] cls.add_method('IsEnabled', 'bool', [param('ns3::LogLevel', '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) 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 & attribute) const [member function] cls.add_method('GetAttributeFailSafe', 'bool', [param('std::string', 'name'), param('ns3::AttributeValue &', 'attribute')], 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', []) 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_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=65535, 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='65535'), 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_Ns3RandomVariable_methods(root_module, cls): cls.add_output_stream_operator() ## random-variable.h (module 'core'): ns3::RandomVariable::RandomVariable() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): ns3::RandomVariable::RandomVariable(ns3::RandomVariable const & o) [copy constructor] cls.add_constructor([param('ns3::RandomVariable const &', 'o')]) ## random-variable.h (module 'core'): uint32_t ns3::RandomVariable::GetInteger() const [member function] cls.add_method('GetInteger', 'uint32_t', [], is_const=True) ## random-variable.h (module 'core'): double ns3::RandomVariable::GetValue() const [member function] cls.add_method('GetValue', 'double', [], is_const=True) return def register_Ns3RngSeedManager_methods(root_module, cls): ## rng-seed-manager.h (module 'core'): ns3::RngSeedManager::RngSeedManager() [constructor] cls.add_constructor([]) ## rng-seed-manager.h (module 'core'): ns3::RngSeedManager::RngSeedManager(ns3::RngSeedManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::RngSeedManager const &', 'arg0')]) ## rng-seed-manager.h (module 'core'): static uint64_t ns3::RngSeedManager::GetNextStreamIndex() [member function] cls.add_method('GetNextStreamIndex', 'uint64_t', [], is_static=True) ## rng-seed-manager.h (module 'core'): static uint64_t ns3::RngSeedManager::GetRun() [member function] cls.add_method('GetRun', 'uint64_t', [], is_static=True) ## rng-seed-manager.h (module 'core'): static uint32_t ns3::RngSeedManager::GetSeed() [member function] cls.add_method('GetSeed', 'uint32_t', [], is_static=True) ## rng-seed-manager.h (module 'core'): static void ns3::RngSeedManager::SetRun(uint64_t run) [member function] cls.add_method('SetRun', 'void', [param('uint64_t', 'run')], is_static=True) ## rng-seed-manager.h (module 'core'): static void ns3::RngSeedManager::SetSeed(uint32_t seed) [member function] cls.add_method('SetSeed', 'void', [param('uint32_t', 'seed')], is_static=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_Ns3SequentialVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::SequentialVariable::SequentialVariable(ns3::SequentialVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::SequentialVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::SequentialVariable::SequentialVariable(double f, double l, double i=1, uint32_t c=1) [constructor] cls.add_constructor([param('double', 'f'), param('double', 'l'), param('double', 'i', default_value='1'), param('uint32_t', 'c', default_value='1')]) ## random-variable.h (module 'core'): ns3::SequentialVariable::SequentialVariable(double f, double l, ns3::RandomVariable const & i, uint32_t c=1) [constructor] cls.add_constructor([param('double', 'f'), param('double', 'l'), param('ns3::RandomVariable const &', 'i'), param('uint32_t', 'c', default_value='1')]) 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_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_Ns3TriangularVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::TriangularVariable::TriangularVariable(ns3::TriangularVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::TriangularVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::TriangularVariable::TriangularVariable() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): ns3::TriangularVariable::TriangularVariable(double s, double l, double mean) [constructor] cls.add_constructor([param('double', 's'), param('double', 'l'), param('double', 'mean')]) 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')]) ## 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'): 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'): 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::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'): 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::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_Ns3UniformVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::UniformVariable::UniformVariable(ns3::UniformVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::UniformVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::UniformVariable::UniformVariable() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): ns3::UniformVariable::UniformVariable(double s, double l) [constructor] cls.add_constructor([param('double', 's'), param('double', 'l')]) ## random-variable.h (module 'core'): uint32_t ns3::UniformVariable::GetInteger(uint32_t s, uint32_t l) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 's'), param('uint32_t', 'l')]) ## random-variable.h (module 'core'): double ns3::UniformVariable::GetValue() const [member function] cls.add_method('GetValue', 'double', [], is_const=True) ## random-variable.h (module 'core'): double ns3::UniformVariable::GetValue(double s, double l) [member function] cls.add_method('GetValue', 'double', [param('double', 's'), param('double', 'l')]) 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_Ns3WeibullVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::WeibullVariable::WeibullVariable(ns3::WeibullVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::WeibullVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::WeibullVariable::WeibullVariable() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): ns3::WeibullVariable::WeibullVariable(double m) [constructor] cls.add_constructor([param('double', 'm')]) ## random-variable.h (module 'core'): ns3::WeibullVariable::WeibullVariable(double m, double s) [constructor] cls.add_constructor([param('double', 'm'), param('double', 's')]) ## random-variable.h (module 'core'): ns3::WeibullVariable::WeibullVariable(double m, double s, double b) [constructor] cls.add_constructor([param('double', 'm'), param('double', 's'), param('double', 'b')]) 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'): 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_Ns3ZetaVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::ZetaVariable::ZetaVariable(ns3::ZetaVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::ZetaVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::ZetaVariable::ZetaVariable(double alpha) [constructor] cls.add_constructor([param('double', 'alpha')]) ## random-variable.h (module 'core'): ns3::ZetaVariable::ZetaVariable() [constructor] cls.add_constructor([]) return def register_Ns3ZipfVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::ZipfVariable::ZipfVariable(ns3::ZipfVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::ZipfVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::ZipfVariable::ZipfVariable(long int N, double alpha) [constructor] cls.add_constructor([param('long int', 'N'), param('double', 'alpha')]) ## random-variable.h (module 'core'): ns3::ZipfVariable::ZipfVariable() [constructor] cls.add_constructor([]) 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_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', '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 &', 'right')) cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right')) cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right')) cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right')) cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right')) cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right')) cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right')) cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right')) cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right')) cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right')) cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right')) cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right')) cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right')) cls.add_binary_comparison_operator('<') cls.add_binary_comparison_operator('>') cls.add_inplace_numeric_operator('*=', param('ns3::int64x64_t const &', 'right')) cls.add_inplace_numeric_operator('-=', param('ns3::int64x64_t const &', 'right')) cls.add_inplace_numeric_operator('/=', param('ns3::int64x64_t const &', 'right')) cls.add_output_stream_operator() cls.add_binary_comparison_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(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')]) 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_Ns3ConstantVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::ConstantVariable::ConstantVariable(ns3::ConstantVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::ConstantVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::ConstantVariable::ConstantVariable() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): ns3::ConstantVariable::ConstantVariable(double c) [constructor] cls.add_constructor([param('double', 'c')]) ## random-variable.h (module 'core'): void ns3::ConstantVariable::SetConstant(double c) [member function] cls.add_method('SetConstant', 'void', [param('double', 'c')]) 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_Ns3DeterministicVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::DeterministicVariable::DeterministicVariable(ns3::DeterministicVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::DeterministicVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::DeterministicVariable::DeterministicVariable(double * d, uint32_t c) [constructor] cls.add_constructor([param('double *', 'd'), param('uint32_t', 'c')]) return def register_Ns3EmpiricalVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::EmpiricalVariable::EmpiricalVariable(ns3::EmpiricalVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::EmpiricalVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::EmpiricalVariable::EmpiricalVariable() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): void ns3::EmpiricalVariable::CDF(double v, double c) [member function] cls.add_method('CDF', 'void', [param('double', 'v'), param('double', 'c')]) return def register_Ns3ErlangVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::ErlangVariable::ErlangVariable(ns3::ErlangVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::ErlangVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::ErlangVariable::ErlangVariable() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): ns3::ErlangVariable::ErlangVariable(unsigned int k, double lambda) [constructor] cls.add_constructor([param('unsigned int', 'k'), param('double', 'lambda')]) ## random-variable.h (module 'core'): double ns3::ErlangVariable::GetValue() const [member function] cls.add_method('GetValue', 'double', [], is_const=True) ## random-variable.h (module 'core'): double ns3::ErlangVariable::GetValue(unsigned int k, double lambda) const [member function] cls.add_method('GetValue', 'double', [param('unsigned int', 'k'), param('double', 'lambda')], is_const=True) return def register_Ns3ExponentialVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::ExponentialVariable::ExponentialVariable(ns3::ExponentialVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::ExponentialVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::ExponentialVariable::ExponentialVariable() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): ns3::ExponentialVariable::ExponentialVariable(double m) [constructor] cls.add_constructor([param('double', 'm')]) ## random-variable.h (module 'core'): ns3::ExponentialVariable::ExponentialVariable(double m, double b) [constructor] cls.add_constructor([param('double', 'm'), param('double', 'b')]) return def register_Ns3GammaVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::GammaVariable::GammaVariable(ns3::GammaVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::GammaVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::GammaVariable::GammaVariable() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): ns3::GammaVariable::GammaVariable(double alpha, double beta) [constructor] cls.add_constructor([param('double', 'alpha'), param('double', 'beta')]) ## random-variable.h (module 'core'): double ns3::GammaVariable::GetValue() const [member function] cls.add_method('GetValue', 'double', [], is_const=True) ## random-variable.h (module 'core'): double ns3::GammaVariable::GetValue(double alpha, double beta) const [member function] cls.add_method('GetValue', 'double', [param('double', 'alpha'), param('double', 'beta')], is_const=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_Ns3IntEmpiricalVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::IntEmpiricalVariable::IntEmpiricalVariable(ns3::IntEmpiricalVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::IntEmpiricalVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::IntEmpiricalVariable::IntEmpiricalVariable() [constructor] cls.add_constructor([]) 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_Ns3LogNormalVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::LogNormalVariable::LogNormalVariable(ns3::LogNormalVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::LogNormalVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::LogNormalVariable::LogNormalVariable(double mu, double sigma) [constructor] cls.add_constructor([param('double', 'mu'), param('double', 'sigma')]) 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_Ns3NormalVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::NormalVariable::NormalVariable(ns3::NormalVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::NormalVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::NormalVariable::NormalVariable() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): ns3::NormalVariable::NormalVariable(double m, double v) [constructor] cls.add_constructor([param('double', 'm'), param('double', 'v')]) ## random-variable.h (module 'core'): ns3::NormalVariable::NormalVariable(double m, double v, double b) [constructor] cls.add_constructor([param('double', 'm'), param('double', 'v'), param('double', 'b')]) 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::Start() [member function] cls.add_method('Start', '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::DoStart() [member function] cls.add_method('DoStart', '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_Ns3ParetoVariable_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::ParetoVariable::ParetoVariable(ns3::ParetoVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::ParetoVariable const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::ParetoVariable::ParetoVariable() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): ns3::ParetoVariable::ParetoVariable(double m) [constructor] cls.add_constructor([param('double', 'm')]) ## random-variable.h (module 'core'): ns3::ParetoVariable::ParetoVariable(double m, double s) [constructor] cls.add_constructor([param('double', 'm'), param('double', 's')]) ## random-variable.h (module 'core'): ns3::ParetoVariable::ParetoVariable(double m, double s, double b) [constructor] cls.add_constructor([param('double', 'm'), param('double', 's'), param('double', 'b')]) ## random-variable.h (module 'core'): ns3::ParetoVariable::ParetoVariable(std::pair<double,double> params) [constructor] cls.add_constructor([param('std::pair< double, double >', 'params')]) ## random-variable.h (module 'core'): ns3::ParetoVariable::ParetoVariable(std::pair<double,double> params, double b) [constructor] cls.add_constructor([param('std::pair< double, double >', 'params'), param('double', 'b')]) 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'): 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'): 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) 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) 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) 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_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__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) return def register_Ns3Time_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) cls.add_binary_comparison_operator('<') cls.add_binary_comparison_operator('>') cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right')) cls.add_output_stream_operator() cls.add_binary_comparison_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(std::string const & s) [constructor] cls.add_constructor([param('std::string const &', 's')]) ## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor] cls.add_constructor([param('ns3::int64x64_t const &', 'value')]) ## 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 & from, ns3::Time::Unit timeUnit) [member function] cls.add_method('From', 'ns3::Time', [param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')], is_static=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::FromDouble(double value, ns3::Time::Unit timeUnit) [member function] cls.add_method('FromDouble', 'ns3::Time', [param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')], is_static=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function] cls.add_method('FromInteger', 'ns3::Time', [param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')], is_static=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'): 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'): 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'): 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 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'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', [param('ns3::Time::Unit', 'timeUnit')], is_const=True) ## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function] cls.add_method('ToDouble', 'double', [param('ns3::Time::Unit', 'timeUnit')], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function] cls.add_method('ToInteger', 'int64_t', [param('ns3::Time::Unit', 'timeUnit')], 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_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::SetLambda(double frequency, double speed) [member function] cls.add_method('SetLambda', 'void', [param('double', 'frequency'), param('double', 'speed')]) ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetLambda(double lambda) [member function] cls.add_method('SetLambda', 'void', [param('double', 'lambda')]) ## 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::GetLambda() const [member function] cls.add_method('GetLambda', '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) 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_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_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'): 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 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 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_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_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_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_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_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_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) 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::SetLambda(double frequency, double speed) [member function] cls.add_method('SetLambda', 'void', [param('double', 'frequency'), param('double', 'speed')]) ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetLambda(double lambda) [member function] cls.add_method('SetLambda', 'void', [param('double', 'lambda')]) ## 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::SetMinDistance(double minDistance) [member function] cls.add_method('SetMinDistance', 'void', [param('double', 'minDistance')]) ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetMinDistance() const [member function] cls.add_method('GetMinDistance', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetLambda() const [member function] cls.add_method('GetLambda', '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) 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) 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 arg0) [member function] cls.add_method('SetDefaultLoss', 'void', [param('double', 'arg0')]) ## 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) 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) 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::DoStart() [member function] cls.add_method('DoStart', 'void', [], visibility='protected', 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'): uint8_t const * ns3::Packet::PeekData() const [member function] cls.add_method('PeekData', 'uint8_t const *', [], deprecated=True, 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'): 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> arg0) [member function] cls.add_method('SetNixVector', 'void', [param('ns3::Ptr< ns3::NixVector >', 'arg0')]) return def register_Ns3RandomVariableChecker_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::RandomVariableChecker::RandomVariableChecker() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): ns3::RandomVariableChecker::RandomVariableChecker(ns3::RandomVariableChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::RandomVariableChecker const &', 'arg0')]) return def register_Ns3RandomVariableValue_methods(root_module, cls): ## random-variable.h (module 'core'): ns3::RandomVariableValue::RandomVariableValue() [constructor] cls.add_constructor([]) ## random-variable.h (module 'core'): ns3::RandomVariableValue::RandomVariableValue(ns3::RandomVariableValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::RandomVariableValue const &', 'arg0')]) ## random-variable.h (module 'core'): ns3::RandomVariableValue::RandomVariableValue(ns3::RandomVariable const & value) [constructor] cls.add_constructor([param('ns3::RandomVariable const &', 'value')]) ## random-variable.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::RandomVariableValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## random-variable.h (module 'core'): bool ns3::RandomVariableValue::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) ## random-variable.h (module 'core'): ns3::RandomVariable ns3::RandomVariableValue::Get() const [member function] cls.add_method('Get', 'ns3::RandomVariable', [], is_const=True) ## random-variable.h (module 'core'): std::string ns3::RandomVariableValue::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) ## random-variable.h (module 'core'): void ns3::RandomVariableValue::Set(ns3::RandomVariable const & value) [member function] cls.add_method('Set', 'void', [param('ns3::RandomVariable const &', 'value')]) 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'): 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_Ns3TimeChecker_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] cls.add_constructor([]) ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) 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'): 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'): 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_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_internal(module.get_submodule('internal'), root_module) return def register_functions_ns3_FatalImpl(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()
gpl-2.0
8,624,872,013,894,432,000
63.379106
748
0.607677
false