repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
hcasse/maat
refs/heads/master
make.py
1
#!/usr/bin/python from maat import * import maat.config as config import maat.std as std doc = goal("doc", ["doc/manual.thot"], "cd doc; ../../thot/thot.py manual.thot -DHTML_TEMPLATE=theme/template.html -DHTML_ONE_FILE_PER=chapter") doc.DESCRIPTION = "Build the manual of Maat." autodoc = goal("autodoc", [], [ "mkdir -p autodoc", "epydoc --html maat -o autodoc/ -v" ]) autodoc.DESCRIPTION = "Build the automatic documentation of Maat for developers."
prestontunnellwilson/summer2013
refs/heads/master
afterTestv2.py
1
#current as of 8/8/13 #most recent changes: #general cleanup #AFTER the first TESTING EDITION -> scratched that since cylinder wasn't showing up (accidentally put invisible in visibleArrowCylinder()) #ideas include: making an average leg angle for left and right legs # to reduce jumps in trackers resulting in steps #compare angles of both feet between trackers. Match angle closest to the other (see sortAngle). # If the difference is greater than (45?) degrees, the one of the kinects is freaking out so do not # change anything (either start or stop moving). #using a system similar to Wendt et al. where we measure how fast foot position # (could we use angle instead?) changes. move person forward based on difference # between current leg angle and last leg angle. make sure that leg angle is greater # than threshold so we don't move incredibly small amounts when standing still? # also need to make sure that our turning algorithm is super bueno. Or maybe the difference has to be # greater than a certain threshold. We could use exponential function or polynomial so that the greater # the difference, the faster/farther the person moves. We could also say that if the difference was greater # than a really big threshold, to disregard it, like for jumps. Have a boolean for positive, so random # decreases in angles won't cause strangeness. But at the same time, the foot has to come back down. # So the boolean for positive does not seem like such a good idea import viz import viztask import vizjoy import vizinfo import vizshape import vizact import os import math import random import datetime import time import linecache #Brings up menu for HMD etc. viz.go(viz.PROMPT) # Get and validate a subject ID test = True sight = test validID = False while not (validID): try: #Prompt the user for an ID number subjectID = int(viz.input('Input Subject ID Number')) RESULTS_DIRECTORY = 'C:\Users\Administrator\Downloads' #Validate the subject ID number outFilePath = '%s\Subject_%s.txt' %(RESULTS_DIRECTORY, str(subjectID)) if os.path.exists(outFilePath) or subjectID is '': yes = viz.ask('The Subject ID Number ' + str(subjectID) + ' already exists. Pick a new one?') if not yes: raise 'Exiting...' else: validID = True print "we have a valid ide!" except ValueError: print('Subject ID number must be an integer') if test: subjectInitial = 'test' else: subjectInitial = (viz.input('Input subject inital')) #Determine whether or not trial recording is enabled #recordingEnabled = viz.get(viz.OPTION2) recordingEnabled = not test #print recordingEnabled if recordingEnabled: print "we are recorders!" dirPath = './Results/Subject_%s' % (str(subjectID)) if(not os.path.exists(dirPath)): print "making directory!" os.makedirs(dirPath) recordFile = open('Results\Subject_%s\Research2013_%s.txt ' % (str(subjectID), subjectInitial), 'w') debugPath = './AfterTestTesting' if (not os.path.exists(debugPath)): os.makedirs(debugPath) debugFile = open(debugPath + '/test%s.txt'%(str(subjectID)), 'w') ##################Get height############################### if test: PART_HEIGHT = 2 else: PART_HEIGHT=viz.input("Enter Subject Height in Meters:") recordFile.write('Height:'+ str(PART_HEIGHT) + '\n') recordFile.write('Object,Object Name,StartX,StartY,StartZ,Start Angle,Angle Turned,Angle Needed,Time,turningerror,movedwhileTurning\n') HEIGHT_TO_STRIDE = .414 strideLength = 1 print "strideLength = %f" %strideLength tracker = viz.add('intersense.dls') ''' *************************** KINECT CODE ***************************** ''' #myHead = vrpn.addTracker( 'Tracker0@localhost', HEAD) HEAD = 0 NECK = 1 TORSO = 2 WAIST = 3 LEFTCOLLAR = 4 LEFTSHOULDER = 5 LEFTELBOW = 6 LEFTWRIST = 7 LEFTHAND = 8 LEFTFINGERTIP = 9 RIGHTCOLLAR = 10 RIGHTSHOULDER = 11 RIGHTELBOW = 12 RIGHTWRIST = 13 RIGHTHAND = 14 RIGHTFINGERTIP = 15 LEFTHIP = 16 LEFTKNEE = 17 LEFTANKLE = 18 LEFTFOOT = 19 RIGHTHIP = 20 RIGHTKNEE = 21 RIGHTANKLE = 22 RIGHTFOOT = 23 # Store trackers, links, and vizshape objects trackers = [] trackersB = [] trueTrackers = [] # Start vrpn vrpn = viz.addExtension('vrpn7.dle') #desktop trackerLocationA = 'Tracker0@10.10.38.160' #laptop trackerLocationB = 'Tracker0@10.10.35.180' for i in range (24): trackers.append(vrpn.addTracker(trackerLocationA,i)) trackersB.append(vrpn.addTracker(trackerLocationB,i)) trueTrackers = trackers #######################view stuff###################### view = viz.MainView view.collision(viz.OFF) viz.eyeheight(PART_HEIGHT) view.setPosition(0,PART_HEIGHT,0) viz.link(tracker, view) #########################step stuff######################## foot = False #false left foot, true right foot, mostly used for debugging aIsTrue = False RIDICULOUS = 56 ###################gaze angle stuff####################### finalYaw = 0 previousYaw = 0 turning = 0 stepCount = 0 ########################foot angle stuff##################### aveFootAngle1 = 0 aveFootAngle2 = 0 footAngle1 = [] footAngle2 = [] FOOTANGLEARRAYLENGTH = 10 ####################different file stuff##################### comp = 2 if comp == 1: #we are using the laptop commonAddress = 'C:\\Users\\prestontunnellwilson\\Downloads\\Research2013\\Viz4Obj\\' elif comp == 2: #we are using betsy's laptop commonAddress = 'C:\\Users\\Williams\\Downloads\\Objects\\' else: commonAddress = 'C:\\Users\\Administrator\\Downloads\\Objects\\' #################reading in file stuff################### #Targetfile = open('targetobjectorder.txt', 'r') # opens target order #Conditionfile = open('conditionorder.txt','r') #opens condition order """******************Addresses******************""" #could use a for loop, have an array for the specific filles and a #string for the ending. then we could just display the name of the target ojbectEnding = '.WRL' #address 0 dogAddress = 'THEREALDOG' chairAddress = 'thechair' barrelAddress = 'THEBARREL' birdAddress = 'thebirds' plantAddress = 'plant' shieldAddress = 'shield' #address 1 bookshelfAddress = 'bookshelf' harpAddress = 'HARP' chaliceAddress = 'THECHALICE' clockAddress = 'THECLOCK' crateAddress = 'THEBOX' phoneboothAddress = 'THEPHONEBOOTH' #address 2 piggybankAddress = 'THEPIGGYBANK' treasurechestAddress = 'THETREASURECHEST' urnAddress = 'THEURN' washingmachineAddress = 'THEWASHINGMACHINE' watchAddress = 'watch' wheelbarrowAddress = 'wheelbarrow' #this file name is wheelbarrow.ive """*****************************************************""" addresses0 = [dogAddress, chairAddress, barrelAddress, birdAddress, plantAddress, shieldAddress] addresses1 = [bookshelfAddress, harpAddress, chaliceAddress,clockAddress, crateAddress,phoneboothAddress] addresses2 = [piggybankAddress, treasurechestAddress,urnAddress,washingmachineAddress,watchAddress, wheelbarrowAddress] #contains the objects pointed to in addresses slopefromthreeto5 = .7718232131 xdif = .5 objects = [] objectAddresses = [addresses0,addresses1, addresses2] objectFiles = [] objectHeight = 0 #Create locations for all of the objects in the envirnoment masterObjectLocations = [[-1.04082, objectHeight, 24], [-8.44218,objectHeight, 4.5714], [-15.2653,objectHeight, -9.90476], [1.04082,objectHeight, -11.8095], [12.6054,objectHeight, -21.7143], [15.6122 + xdif,objectHeight, -9.71429 + xdif * slopefromthreeto5]] dojo = viz.addChild("ground_grass.osgb") dojo.setScale(1.5,1.5,1.5) sky = viz.addChild("sky_day.osgb") #Add a joystick joystick = vizjoy.add() objectSet = 0 testingHeight = 0 #positions of cylinders for people to walk to and use to orient selves masterTargetLocations = [[-17, testingHeight, 1.3333], [-7.17007, testingHeight, -11.2381], [1.04082, testingHeight, -23.8095], [8.21088, testingHeight, -15.619], [6.82313, testingHeight, -3.80952], [15.2653, testingHeight, 2.47619]] targetLocations = [] #positions of arrows for people to face towards offset = 2 fournegrecslope = -.7224 arrowHeight = 1.5 masterArrowLocations = [[masterTargetLocations[0][0], arrowHeight, masterTargetLocations[0][2] + offset], [masterTargetLocations[1][0] + math.cos(math.pi / 4.25) * offset, arrowHeight, masterTargetLocations[1][2] + math.sin(math.pi / 4.25) * offset], [masterTargetLocations[2][0] + offset, arrowHeight, masterTargetLocations[2][2]], [masterTargetLocations[3][0], arrowHeight, masterTargetLocations[3][2] - offset], [masterTargetLocations[4][0] - offset, arrowHeight, masterTargetLocations[4][2] - fournegrecslope * offset], [masterTargetLocations[5][0] - offset, arrowHeight, masterTargetLocations[5][2]]] fileStartIndex = 0 #how much to rotate each target: target0 is rotated 45 degrees with each rotation targetRotations = [45, 180, 30, 310, 100, 350] angleIndex = 0 #from each spot corresponding to index in list, turn to these targets #note that these are not randomized yet masterTargetObjects = [[0,1,2], [0,2,3], [2,3,5], [3,4,5], [0,3,5], [0,4,5]] targetObjects = [] targetPosition = [0,0,0] #order in which to call the objects at the testing locations #make sure that len(targetObjectsOrder) % len(targetObjects) == 0 # and len(targetObjectsOrder) % len(targetObjects[0]) == 0 #NOTE: this is the order for the corresponding set for masterTargetObjects # ie, if the sixth set is first, the sixth set of the current targetOrder # would be used, not the first set targetOrder = [[1,2,0, 2,0,1, 2,0,1, 1,2,0, 2,0,1, 2,0,1], [2,1,0, 2,1,0, 0,2,1, 0,2,1, 0,1,2, 0,2,1], [0,1,2, 0,1,2, 0,1,2, 0,1,2, 0,1,2, 0,1,2]] #order in which to go to testing locations # where locationCounter is incremented each time a location is finished (all 3 objects are called) # and targetCounter incrementes after each target locationOrder = [[1,4,2,3,5,0], [5,4,3,0,2,1], [0,1,2,3,4,5]] #reset targetCounter and locationCounter after a condition is finished targetCounter = 0 #keeps track of which index to use in targetObjects locationCounter = 0 #keeps track of which testing location to use condition = [0,1,2] #order in which to do conditions: 0-joystick, 1-wip, 2-wipscaled currentCondition = 0 #keeps track of current condition; also used in locationOrder[conditionCounter][locationCounter] #to call something in targetObjects: #targetObjects[locationOrder[conditionCounter][locationCounter]][targerOrder[conditionCounter][targetCounter]] currentTarget = 0 rotation = 0 #angle target starts out facing and angle target turns to turnAngle = 0 startAngle = 0 startTime = time.clock() #amount of rounds completed. once fifteen is reached, new condition testsCompleted = 0 #0-observe,1-walk,2-turn,3-reorient currentState = 0 locationFinished = False cylinder = viz.add('cylinder.wrl') cylinder.setPosition(masterTargetLocations[0]) cylinderScale = (4,3,4) cylinderTransparency = .5 cylinder.setScale(cylinderScale) cylinder.alpha(cylinderTransparency) cylinder.visible(viz.OFF) arrow = viz.add('arrow.wrl') #arrow.setScale(0.05, 0.3, 0.05) arrow.setPosition(0,0.7,0.25) arrow.alpha(0.8) arrow.visible(viz.OFF) #############################File Functions############### #reads the file locationOrder. it returns a big array that has 3 smaller arrays of 5 numbers #should be used for LocationOrderObjects def LocationOrder(fileName, lines = 1): MODerator = subjectID % 12 * lines list = [] index = 0 debug = False if debug: print MODerator print MODerator + lines MODerator +=1 #since line number starts with 1 instead of 0 for number_index in range(MODerator, MODerator + lines): #print "inside for loop" if lines != 1: list.append([]) real_line = linecache.getline(fileName, number_index) if real_line == '\n': real_line = linecache.getline(fileName, number_index+1) for character in real_line: #print "inside the other loop" if(character == ' '): pass elif(character == '\n'): pass else: if lines != 1: list[index].append(int(character)) else: list.append(int(character)) index += 1 return list #assigns variables read from LocationOrderReader, #ConditionOrderReader, and TargetOrderReader def FileReader(): global condition, targetOrder, locationOrder condition = LocationOrder("conditions.txt") targetOrder = LocationOrder("indexOrder.txt",3) locationOrder = LocationOrder("random.txt",3) debug = False if debug: print "starting debug" print condition print targetOrder print locationOrder ################################################################## #*****************************Angle Functions********************** def unitVector(x,y,z): vecMag = math.sqrt(x*x+y*y+z*z) return x/vecMag, y/vecMag, z/vecMag # function that takes three positions and returns angle between AB and AC def getAngle(A, B, C): if (A == B and B == C and C == (0,0,0)): return 0 vectorAB = B[0] - A[0], B[1] - A[1], B[2] - A[2] vectorAC = C[0] - A[0], C[1] - A[1], C[2] - A[2] dot = dotProduct(vectorAB, vectorAC) magAB = magnitude(vectorAB) magAC = magnitude(vectorAC) try: theta = math.acos(dot / magAB / magAC) except ZeroDivisionError: return 0 return math.degrees(theta) def get2Angle(A, B, C): if (A == B and B == C and C == (0,0,0)): return 0 vectorAB = B[0] - A[0], B[1] - A[1], B[2] - A[2] vectorAC = C[0] - A[0], C[1] - A[1], C[2] - A[2] dot = TwoDotProduct(vectorAB, vectorAC) magAB = TwoMagnitude(vectorAB) magAC = TwoMagnitude(vectorAC) try: theta = math.acos(dot / magAB / magAC) except ZeroDivisionError: return 0 return math.degrees(theta) #gets angle between two vectors #as of 8/7/2013 not called def getVAngle(vectA, vectB): if (vectA == vectB and vectB == (0,0,0)): return 0 dot = dotProduct(vectA, vectB) magA = magnitude(vectA) magB = magnitude(vectB) try: theta = math.acos(dot / magA / magB) except ZeroDivisionError: return 0 return math.degrees(theta) #returns dot product disregarding y. def TwoDotProduct(vectA, vectB): xA = vectA[0] zA = vectA[2] xB = vectB[0] zB = vectB[2] return xA*xB + zA*zB #returns magnitude disregarding y def TwoMagnitude(vect): x = vect[0] z = vect[2] return math.sqrt(x*x + z*z) #takes in a vector, returns magnitude of that vector def magnitude(vect): x = vect[0] y = vect[1] z = vect[2] return math.sqrt(x*x + y*y + z*z) #takes in two vectors, returns dot product of vectors def dotProduct(vectA, vectB): xA = vectA[0] yA = vectA[1] zA = vectA[2] xB = vectB[0] yB = vectB[1] zB = vectB[2] return xA*xB + yA*yB + zA*zB #takes in three points and returns normal vector #as of 8/7/2013 not called def crossProduct(pA, pB, pC): x1 = pB[0] - pA[0] y1 = pB[1] - pA[1] z1 = pB[2] - pA[2] x2 = pC[0] - pA[0] y2 = pC[1] - pA[1] z2 = pC[2] - pA[2] return y1 * z2 - z1 * y2, x1 * z2 - x2 * z1, x1 * y2 - x2 * y1 #############################step detection and move functions### def switchCam(): global trueTrackers, aIsTrue global quadrant oldTracker = aIsTrue debug = True distA = abs(trackers[RIGHTHIP].getPosition()[0] - trackers[LEFTHIP].getPosition()[0]) distB = abs(trackersB[RIGHTHIP].getPosition()[0] - trackersB[LEFTHIP].getPosition()[0]) if distA > distB: aIsTrue = True trueTrackers = trackers else: aIsTrue = False trueTrackers = trackersB if debug and oldTracker is not aIsTrue: print "we are using tracker A: ", aIsTrue wait = True def checkTurning(): global previousYaw, previousTime, turning, wait angleThreshold = 3 #if turning and wait then wait to update turning if turning and wait: wait = False #else either we are ready or we weren't turning else: turning = ((finalYaw < (previousYaw - angleThreshold)) or (finalYaw > (previousYaw + angleThreshold))) previousYaw = finalYaw wait = turning def sortAngle(ang1, ang2, benchmark1, benchmark2): difangAbench1 = abs(benchmark1 - ang1) difangAbench2 = abs(benchmark2 - ang1) difangBbench1 = abs(benchmark1 - ang2) difangBbench2 = abs(benchmark2 - ang2) #if ang1 is best fit for bench1 and bench1's best fit is ang1 return (difangAbench1 < difangBbench1 and difangAbench1 < difangAbench2) def getAverage(array1): notStepping = 176.14159 total = 0 for x in array1: total += x try: ret = total / len(array1) except(ZeroDivisionError): #have to return a number bigger than threshold so we don't move return notStepping #I have not met someone who is so flexible that ze can do this if ret == 0: return notStepping #else we have actual data return ret def updateFeetAngle(ang1, ang2): global aveFootAngle1, aveFootAngle2, footAngle1, footAngle2 #if there is some sort of issue with tracking, return. We don't want zero's in here if ang1 == ang2 and ang2 == 0: return #if ang1 belongs with footAngle1 if (sortAngle(ang1, ang2, aveFootAngle1, aveFootAngle2)): footAngle1.append(ang1) footAngle2.append(ang2) #else ang1 belongs with footAngle2 else: footAngle1.append(ang2) footAngle2.append(ang1) if len(footAngle1) >= FOOTANGLEARRAYLENGTH: footAngle1.pop(0) footAngle2.pop(0) #update the averages aveFootAngle1 = getAverage(footAngle1) aveFootAngle2 = getAverage(footAngle2) off = 11 #precise amount off ERROR = (43- off) * -1 #AMOUNT OF DEGREES to correct movement def step(): global stepCount, finalYaw scalar = 1 SCALED_CONDITION = 2 TRANSLATE_SCALAR = 2 #how much to scale on physical step to if condition[currentCondition] == SCALED_CONDITION: scalar = TRANSLATE_SCALAR move(scalar) stepCount += 1 print "here is stepcount: ", stepCount moving = False checkStepOut = "" def checkStep(): global finalYaw global foot global trueTrackers, turning global checkStepOut, moving JOYSTICK_CONDITION = 0 if condition[currentCondition] == JOYSTICK_CONDITION: return finalYaw = tracker.getData()[3] # evaluate flag_outB if flag_side_cam is turned on switchCam() angleInfo = True #check to make sure data is accurate leftFootHeight = trueTrackers[LEFTANKLE].getPosition()[1] leftKneeHeight = trueTrackers[LEFTKNEE].getPosition()[1] leftHipHeight = trueTrackers[LEFTHIP].getPosition()[1] rightFootHeight = trueTrackers[RIGHTANKLE].getPosition()[1] rightKneeHeight = trueTrackers[RIGHTKNEE].getPosition()[1] rightHipHeight = trueTrackers[RIGHTHIP].getPosition()[1] if(leftFootHeight > leftHipHeight or rightFootHeight > rightHipHeight or leftFootHeight > leftKneeHeight or rightFootHeight > rightKneeHeight): return angleR = getAngle(trueTrackers[RIGHTKNEE].getPosition(), trueTrackers[RIGHTHIP].getPosition(), trueTrackers[RIGHTANKLE].getPosition()) angleL = getAngle(trueTrackers[LEFTKNEE].getPosition(), trueTrackers[LEFTHIP].getPosition(), trueTrackers[LEFTANKLE].getPosition()) updateFeetAngle(angleR, angleL) debug = False if debug: print aveFootAngle1 print aveFootAngle2 debugFile.write("ang1 " + str(footAngle1) + "\n") debugFile.write("ang2 " + str(footAngle2) + "\n\n") #current as of 8/7/2013 angleThreshold = 145 printangle = False if printangle: print "this is the right angle", angleR print "this is the left angle", angleL stepInfo = True bigAngle = 165 if moving and ((aveFootAngle1 >= bigAngle and aveFootAngle2 >= bigAngle) or turning): moving = False view.velocity(0,0,0) if not moving and (aveFootAngle1 < angleThreshold or aveFootAngle2 < angleThreshold) and not turning: if stepInfo: out = 'STEPPING!STEPPING!STEPPING!STEPPING!' if debug: print "we are using tracker A: ",aIsTrue print "we are stepping with right foot: ",foot print "this is the angle: ",angleL, angleR moving = True #continue to move if we are moving if moving: step() foot = not foot if stepInfo: out = checkStepOut #else print why we weren't moving else: if stepInfo: if angleL > angleThreshold or angleR > angleThreshold: if foot: out = "right foot " else: out = "left foot " out += "was not high enough" elif turning: out = "you were turning!" else: out = "how did you get here???" #print out what happened if stepInfo and out != checkStepOut: checkStepOut = out print checkStepOut pause = False def move(scale = 1): if pause: return data = tracker.getData() alpha =data[3] + ERROR #adding 45 degrees seems to correct direction x,y,z = unitVector(math.sin(math.radians(alpha)), 0, math.cos(math.radians(alpha))) x0, y0, z0 = viz.MainView.getPosition() #mode can be viz.speed or viz.time. value is the arg before it #if mode == time, value is amount of time it takes #if mode == speed, value is velocity to move #maybe wouldn't need error if set ori_mask to viz.HEAD_ORI update = vizact.goto([x*strideLength*scale+x0, y0, z*strideLength*scale+z0], 2, mode = viz.SPEED, ori_mask = viz.BODY_ORI) viz.MainView.runAction(update) #viz.MainView.velocity(0,0,0) """******************joystick functions*********""" def UpdateJoystick(): global view y_threshold = 0.2 #Get the joystick position x,y,z = joystick.getPosition() #Move the viewpoint forward/backward based on y-axis value if y < -y_threshold: # viz.MainView.move(x0*translateScalar,0,z0 * translateScalar,viz.BODY_ORI) #trying to move similarly to step move() #UpdateJoystick every frame def checkOption1(): JOYSTICK_CONDITION = 0 if condition[currentCondition] == JOYSTICK_CONDITION: #print "before first ontimer" UpdateJoystick() #print "after first ontimer" #-------------------------------------------------------------- #this function rotates the position of the objects by the #given amount around the origin #-------------------------------------------------------------- def rotate(angle, positions): #find the rotation matrix for the given angle radians = math.radians(angle) rotation = [[math.cos(radians), -math.sin(radians)], [math.sin(radians), math.cos(radians)]] newLocation = [] #multiply all the locations by the matrix for x in range(len(positions)): newX = positions[x][0] * rotation[0][0] + positions[x][2] * rotation[0][1] newY = positions[x][0] * rotation[1][0] + positions[x][2] * rotation[1][1] newLocation.append([newX, positions[x][1], newY]) return newLocation #-------------------------------------------------------------- #this function roatates the objects about the dojo #watch out for non-square coordinate environments. something to think about #as of 8/7/2013, not used #-------------------------------------------------------------- def rotateObjects(angle): # global rotation, objectLocations, objects # rotation = (rotation + angle) % 360 # newPositions = rotate(rotation, objectLocations) # for x in range(len(newPositions)): # objects[x].setPosition(newPositions[x]) dojo.setAxisAngle([0,1,0, angle], viz.REL_LOCAL) invisibleArrowCylinder() for x in range(len(objects)): temp_angle = objects[x].getEuler()[0] temp_angle += targetRotations[x] objects[x].setEuler(temp_angle,0,0) #myMessage = Message('Objects rotated to %d degrees' % rotation, 1) #viztask.schedule(myMessage.display()) #-------------------------------------------------------------- #this function changes the objects on the pillar #as of 8/7/2013, not used #we switch objects between positions, so unnecessary. Also, failing # to account for how objects have moved when the prompt "please turn to face". # Keeping track of a simple offset would fix the problem, but still, it would # be unnecessary. #-------------------------------------------------------------- def moveObjects(indexAmount): global objects, objectFiles, objectSet #loop through all of the pillars and delete their children and replace them with the new object for x in range(len(objects)): objects[x].setPosition(objectLocations[(indexAmount + x) % len(objectFiles[objectSet])]) #------------------------------------ #this function switches out the set of objects used #----------------------------------------------------- def changeObjects(): global fileStartIndex, objects, objectFiles, objectSet debug = False objectSet = (objectSet + 1) % len(objectFiles) if debug: print "here is len(objects): %d" %len(objects) for x in range(len(objects)): temp = objectFiles[objectSet][x] temp.setPosition(objects[x].getPosition()) objects[x].visible(viz.OFF) temp.visible(viz.ON) objects[x] = temp #sets order in which to go to testing locations and in which order to call objects for each # testing location def getCurrentTestingLocationOrder(): global targetLocations global arrowLocations global targetObjects debug = False info = True targetLocations = [] arrowLocations = [] targetObjects = [] currentLocationOrder = locationOrder[currentCondition] if debug: print "currentLocationOrder",currentLocationOrder for i in range(len(masterTargetObjects)): arrowLocations.append([]) targetLocations.append([]) targetObjects.append([]) currentTargetObjectIndex = currentLocationOrder[i] currentTargetObject = masterTargetObjects[currentTargetObjectIndex] if debug: print currentTargetObject print currentTargetObjectIndex for j in range(len(masterTargetObjects[i])): indexTargetOrder = currentTargetObjectIndex * len(currentTargetObject) + j nextObjectIndex = targetOrder[currentCondition][indexTargetOrder] if debug: print indexTargetOrder print nextObjectIndex targetLocations[i].append(masterTargetLocations[locationOrder[currentCondition][i]][j]) arrowLocations[i].append(masterArrowLocations[locationOrder[currentCondition][i]][j]) targetObjects[i].append(currentTargetObject[nextObjectIndex]) if debug: print targetLocations print arrowLocations print targetObjects if info: print targetObjects print locationOrder[currentCondition] printOrderObjects() def changeConditions(): global currentState, targetToFace, fileStartIndex, currentTarget global targetToFace, view, currentCondition keyEvent('h') keyEvent('o') #keyEvent('r') #keyEvent('m') currentTarget = fileStartIndex = 0 currentState = targetToFace = 0 changeState(currentState) view.setPosition(0,PART_HEIGHT,0) angleArray = [45,90,45] #currentviewYaw = view.getEuler()[0] hackoffset = 0 if (angleIndex == 1): hackoffset = 45 view.setEuler(angleArray[angleIndex] + hackoffset,0,0) currentCondition += 1 if currentCondition > 2: print "finished with testing!" currentCondition %= 3 getCurrentTestingLocationOrder() #makes things visible or not def visibleScenery(): global dojo, sky dojo.visible(viz.ON) sky.visible(viz.ON) def invisibleScenery(): global dojo, sky dojo.visible(viz.OFF) sky.visible(viz.OFF) def visibleArrowCylinder(): global cylinder, arrow arrow.visible(viz.ON) cylinder.visible(viz.ON) def invisibleArrowCylinder(): global cylinder, arrow arrow.visible(viz.OFF) cylinder.visible(viz.OFF) #-------------------------------------------------------------- #this function updates the scene to correspond with the given #state of the experiment #-------------------------------------------------------------- def changeState(state): global objects, objectLocations, targetLocations, targetRotations, currentTarget, rotation, startPosition, objectSet global cylinder, arrow, targetToFace, objectFiles, startFileIndex, targetObjects, targetPosition, startAngle global recordFile, angleIndex #print 'Changing state to: %d' % state debug = False #-------------------------------------------------------------- #A state of 0 corresponds to showing all of the objects and no target if(state == 0): if recordingEnabled: recordFile.write('currentCondition: %d\n' %condition[currentCondition]) visibleScenery() keyEvent('s') invisibleArrowCylinder() #-------------------------------------------------------------- #A state of 1 corresponds to showing the target and waiting for the participant to #walk toward the target and face the right direction elif(state == 1): if debug: print 'Target Number: %d' % currentTarget #Calculate the position of the cylinder print targetLocations targetPosition = rotate(rotation, targetLocations)[currentTarget] targetRotation = targetRotations[currentTarget] + rotation cylinder.setPosition(targetPosition) angleArray = [45,90,45] #Calculate the position of the arrow #arrowZ = targetPosition[0] + 1 * math.sin(math.radians(targetRotation + rotation)) #arrowX = targetPosition[2] + 1 * math.cos(math.radians(targetRotation + rotation)) #arrow.setPosition(arrowX, arrow.getPosition()[1], arrowZ) arrowPosition = rotate(rotation, arrowLocations)[currentTarget] arrow.setPosition(arrowPosition) cylinder.setEuler(targetRotation) #show all of the objects and the cylinder and the arrow visibleScenery() keyEvent('s') visibleArrowCylinder() if debug: print "arrow should be on" #-------------------------------------------------------------- #A state of 2 corresponds to hiding the scene and waiting for the #participant to finish turning elif(state == 2): global startTime if not sight: invisibleScenery() keyEvent('h') invisibleArrowCylinder() startPosition = view.getPosition() startAngle = view.getEuler()[0] + ERROR startTime = time.clock() if debug: #this is a very important print statement print 'StartIndex: %d, Index: %d' % (fileStartIndex, (fileStartIndex + targetObjects[currentTarget][targetToFace]) % len(objectFiles[objectSet])) viztask.schedule(ShowMessage('Please turn to face %s' % objectAddresses[objectSet][(fileStartIndex + targetObjects[currentTarget][targetToFace]) % len(objectFiles[objectSet])])) #-------------------------------------------------------------- #A state of 3 corresponds to showing only the cylinder and arrow #so that the participant can be reoriented to the starting position elif(state == 3): if not sight: invisibleScenery() keyEvent('h') visibleArrowCylinder() if debug: print "arrow should be on" def ShowMessage(mystring): info = vizinfo.add(mystring) messagePos = (.5, .5) #change if want message in dif spot info.translate(messagePos) yield viztask.waitTime(2) info.visible(0) def printOrderObjects(): for set in targetObjects: for obj in set: print objectAddresses[currentCondition][obj] #as of 8/7/2013, never called def objPos(): global objects for x in range (len(objects)): print objects[x].getPosition() def redoTrial(trial): global currentState, currentTarget, targetToFace, locationFinished #make arrows disappear and display objects currentState = 0 #make arrow and cylinder position that of trial to redo currentTarget = trial #reset so that we start at the beginning again, it should be -1 #no need to have it if set global currentState to 0 #targetToFace = -1 locationFinished = False changeState(currentState) #-------------------------------------------------------------- #this function handles all of the keyboard input #-------------------------------------------------------------- def keyEvent(key): global rotation, objectLocations, objects, cylinder, arrow, currentTarget, targetRotations, objectFiles, objectSet global startPosition, startAngle, targetPosition, pptLink, height, pptLink, recordingEnabled, recordFile global targetLocations, targetObjects global PART_HEIGHT global testsCompleted global fileStartIndex, angleIndex global example, horse, exapmleCylinder global locationFinished #print key #Rotate all of the objects in the scene # if(key == 'r'): # print 'YOU PRESSED R! WHAT ARE YOU DOING?' # angleArray = [45,90,45] # newPos = rotate(angleArray[angleIndex],targetLocations) # for ii in range(len(newPos)): # arrowPosition = rotate(angleArray[angleIndex], arrowLocations)[currentTarget] # arrow.setPosition(arrowPosition) # objects[ii].setPosition(newPos[ii]) # # angleIndex = (angleIndex + 1) % len(angleArray) #Change the pillars the objects are on # elif(key == 'm'): # print "inside of m" # fileStartIndex = (fileStartIndex + 1) % len(objects) # moveObjects(fileStartIndex) # #Show the target to walk toward # elif(key == 't'): # global targetLocations, arrow # currentTarget = (currentTarget + 1) % len(targetLocations) # targetPosition = rotate(rotation, targetLocations)[currentTarget] # targetRotation = targetRotations[currentTarget] + rotation # cylinder.setPosition(targetPosition) # arrowX = targetPosition[0] + 0.3 * math.cos(math.radians(targetRotation + rotation)) # arrowZ = targetPosition[2] + 0.3 * math.sin(math.radians(targetRotation + rotation)) # #arrow.setPosition(arrowX, arrow.getPosition()[1], arrowZ) # arrow.setPosition([-9.873720169067383, 0.5, 3.1146695613861084]) # cylinder.setEuler(targetRotations[currentTarget] + rotation) # cylinder.visible(viz.ON) # arrow.visible(viz.ON) # #hide the objects if(key == 'h'): for x in range (len(objects)): objects[x].visible(viz.OFF) #show the objects elif(key == 's'): for x in range (len(objects)): objects[x].visible(viz.ON) #switch the set of objects elif(key == 'o'): print"inside of o" changeObjects() #when a condition is done, push the almighty button elif(key == 'a'): changeConditions() #update the state elif(key == ' '): global currentState, targetToFace, targetObjects, turnAngle debug = False if debug: print "current view angle: ", view.getEuler()[0] + ERROR print currentState #Show the next target to walk toward if(currentState == 0): currentState = 1 if(recordingEnabled): recordFile.write('Target: %d\n' % currentTarget) changeState(currentState) #Hide the scene and let the participant turn elif(currentState == 1): targetToFace = -1 currentState = 3 #print 'Object Index: %d, Total Objects: %d' % (targetToFace, len(targetObjects[currentTarget])) changeState(currentState) #Show the arrow to reorient the participant elif(currentState == 2): global startTime timeDifference = time.clock() - startTime currentPosition = view.getPosition() movedTurned = False if startPosition != currentPosition: print "WARNING! STARTPOSITION IS NOT CURRENTPOSITION" movedTurned = True print startPosition print view.getPosition() #calculate the angle turned and the angle desired objectPosition = rotate(rotation, masterObjectLocations) objectNumber = targetObjects[currentTarget][targetToFace] destX = objectPosition[targetObjects[currentTarget][targetToFace]][0] - startPosition[0] destY = objectPosition[targetObjects[currentTarget][targetToFace]][2] - startPosition[2] mag = math.sqrt(destX*destX + destY*destY) normX = destX / mag normY = destY / mag startY = math.cos(math.radians(startAngle)) startX = math.sin(math.radians(startAngle)) endY = math.cos(math.radians(view.getEuler()[0] + ERROR)) endX = math.sin(math.radians(view.getEuler()[0] + ERROR)) dotNeeded = normX * startX + normY * startY dotTurned = startX * endX + startY * endY angleNeeded = math.degrees(math.acos(dotNeeded)) angleTurned = math.degrees(math.acos(dotTurned)) #print 'StartX: %f, StartY: %f, DestX: %f, DestY: %f, EndX: %f, EndY: %f' % (startX, startY, destX, destY, endX, endY) print 'Angle Needed: %f, Angle Turned: %f' % (angleNeeded, angleTurned) #not used as of 8/7/2013. Used to show file reader where to get info #see mod360.py for a way to use number of commas instead delim1 = '$' delim2 = '^' if(recordingEnabled): recordFile.write('%d,%s,%f,%f,%f,%f,%f,%f,%s%f%s, %s%f%s, %s\n' % (objectNumber, objectAddresses[currentCondition][(fileStartIndex + targetObjects[currentTarget][targetToFace]) % len(objectFiles[objectSet])], startPosition[0],startPosition[1],startPosition[2],startAngle,angleTurned,angleNeeded,delim1,timeDifference,delim1,delim2,abs(angleNeeded - angleTurned),delim2,movedTurned)) currentState = 3 if(targetToFace + 1 >= len(targetObjects[currentTarget])): currentTarget = (currentTarget + 1) % len(targetObjects) locationFinished = True changeState(currentState) #Hide everything again and let the participant turn toward the new target elif(currentState == 3): if locationFinished: currentState = 0 locationFinished = False changeState(currentState) targetToFace = targetToFace + 1 if debug: print "here is target to face: ",targetToFace testsCompleted += 1 #print 'here is testscompleted: %d' %testsCompleted #print 'here is len of amount of targets: %d' % len(targetObjects[currentTarget]) #if not finished with round if(targetToFace < len(targetObjects[currentTarget])): currentState = 2 if debug: print 'Object Index: %d, Total Objects: %d' % (targetToFace, len(targetObjects[currentTarget])) #move on to next rotation else: print "move onto next location!" currentState = 0 changeState(currentState) elif key == 'p': global pause pause = not pause elif key == 'd': pos = view.getPosition() update = vizact.goto([pos[0], pos[1] -1, pos[2]], 2, mode = viz.SPEED, ori_mask = viz.BODY_ORI) viz.MainView.runAction(update) elif key == 'e': example = not example if example: keyEvent('h') horse.visible(viz.ON) exapmleCylinder.visible(viz.ON) else: keyEvent('s') horse.visible(viz.OFF) exapmleCylinder.visible(viz.OFF) #if trial was messed up, redo that trial afterwards by pressing the number corresponding to that trial elif key == '1' or key == '2' or key == '3' or key == '3' or key == '4' or key == '5' or key == '0': redoTrial(int(key)) else: print view.getPosition() #objects to be used in example horse = viz.add('horse.wrl') horse.setPosition(-2,0,2) exapmleCylinder = viz.add('cylinder.wrl') exapmleCylinder.alpha(cylinderTransparency) exapmleCylinder.setScale(cylinderScale) exapmleCylinder.color(1,0,0) exapmleCylinder.setPosition(3, 0, 3) """/////////////////////////////////////////////////////////////////////////////////////""" def initializeLocations(): global objects for x in range(len(masterObjectLocations)): objects.append(objectFiles[objectSet][x]) objects[x].setPosition(masterObjectLocations[x]) objects[x].alpha = 0.0 objects[x].visible(viz.ON) def initializeObjectFiles(): global objectFiles for i in range(len(objectAddresses)): objectFiles.append([]) for j in range(len(objectAddresses[i])): #account for wheelbarro.ive ending tempending = ojbectEnding if (i == 2 and j == 5): tempending = '.ive' objectFiles[i].append(viz.add(commonAddress + objectAddresses[i][j] + tempending)) objectFiles[i][j].visible(viz.OFF) def update(): global currentState, arrow, cylinder, view, targetRotations, rotation, objects global targetObjects, currentTarget, targetToFace, targetPosition if(currentState == 1 or currentState == 3): #see if the participant is close enough to the cylinder x = view.getPosition()[0] - targetPosition[0] y = view.getPosition()[2] - targetPosition[2] distSqrd = x*x + y*y radius = 1.2 #print 'ViewX: %f, ViewY: %f, TarX: %f, TarY: %f, Dist: %f' % (view.getPosition()[0], view.getPosition()[2], targetLocations[currentTarget][0], targetLocations[currentTarget][2], distSqrd) if(distSqrd <= radius): cylinder.color(0,1,0) #find the angle between the participant's view and the arrow #might have to add error in angle needed... pointA = view.getPosition()[0] + math.sin(math.radians(view.getEuler()[0] + ERROR)),0,view.getPosition()[2] + math.cos(math.radians(view.getEuler()[0] + ERROR)) angle = get2Angle(view.getPosition(), pointA, arrow.getPosition()) #angle += ERROR debug = False if debug: print "here is angle %d " %angle print "here is pointA",pointA print "here is the yaw %d", view.getEuler()[0] #print 'Angle: %f, Object Angle: %f' % (angle, targetRotations[currentTarget] + rotation) #print 'X: %f, Y: %f' % (cylinder.getPosition()[0] + math.sin(math.radians(cylinder.getEuler()[0])), cylinder.getPosition()[2] + math.cos(math.radians(cylinder.getEuler()[0])) - view.getPosition()[2]) if(angle <= 10.0): arrow.color(0,1,0) else: arrow.color(1,0,0) else: cylinder.color(1,0,0) arrow.color(1,0,0) elif example: global exapmleCylinder x = view.getPosition()[0] - exapmleCylinder.getPosition()[0] y = view.getPosition()[2] - exapmleCylinder.getPosition()[2] distsqrd = x*x + y*y if distsqrd <= .8: exapmleCylinder.color(0,1,0) else: exapmleCylinder.color(1,0,0) FileReader() initializeObjectFiles() initializeLocations() getCurrentTestingLocationOrder() debugInitialize = False if debugInitialize: print targetLocations print targetObjects example = False keyEvent('e') #rotate once #keyEvent('r') view.setEuler(45,0,0) vizact.ontimer(0, checkStep) vizact.ontimer(0, checkOption1) vizact.ontimer(0.2, update) vizact.ontimer(0.2,checkTurning) viz.callback(viz.KEYBOARD_EVENT, keyEvent) print "outside of all ontimers"
wbc2010/django1.2.5
refs/heads/master
django1.2.5/django/contrib/databrowse/plugins/calendars.py
62
from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.contrib.databrowse.sites import DatabrowsePlugin from django.shortcuts import render_to_response from django.utils.text import capfirst from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe from django.views.generic import date_based from django.utils import datetime_safe class CalendarPlugin(DatabrowsePlugin): def __init__(self, field_names=None): self.field_names = field_names def field_dict(self, model): """ Helper function that returns a dictionary of all DateFields or DateTimeFields in the given model. If self.field_names is set, it takes take that into account when building the dictionary. """ if self.field_names is None: return dict([(f.name, f) for f in model._meta.fields if isinstance(f, models.DateField)]) else: return dict([(f.name, f) for f in model._meta.fields if isinstance(f, models.DateField) and f.name in self.field_names]) def model_index_html(self, request, model, site): fields = self.field_dict(model) if not fields: return u'' return mark_safe(u'<p class="filter"><strong>View calendar by:</strong> %s</p>' % \ u', '.join(['<a href="calendars/%s/">%s</a>' % (f.name, force_unicode(capfirst(f.verbose_name))) for f in fields.values()])) def urls(self, plugin_name, easy_instance_field): if isinstance(easy_instance_field.field, models.DateField): d = easy_instance_field.raw_value return [mark_safe(u'%s%s/%s/%s/%s/%s/' % ( easy_instance_field.model.url(), plugin_name, easy_instance_field.field.name, str(d.year), datetime_safe.new_date(d).strftime('%b').lower(), d.day))] def model_view(self, request, model_databrowse, url): self.model, self.site = model_databrowse.model, model_databrowse.site self.fields = self.field_dict(self.model) # If the model has no DateFields, there's no point in going further. if not self.fields: raise http.Http404('The requested model has no calendars.') if url is None: return self.homepage_view(request) url_bits = url.split('/') if self.fields.has_key(url_bits[0]): return self.calendar_view(request, self.fields[url_bits[0]], *url_bits[1:]) raise http.Http404('The requested page does not exist.') def homepage_view(self, request): easy_model = EasyModel(self.site, self.model) field_list = self.fields.values() field_list.sort(lambda x, y: cmp(x.verbose_name, y.verbose_name)) return render_to_response('databrowse/calendar_homepage.html', {'root_url': self.site.root_url, 'model': easy_model, 'field_list': field_list}) def calendar_view(self, request, field, year=None, month=None, day=None): easy_model = EasyModel(self.site, self.model) queryset = easy_model.get_query_set() extra_context = {'root_url': self.site.root_url, 'model': easy_model, 'field': field} if day is not None: return date_based.archive_day(request, year, month, day, queryset, field.name, template_name='databrowse/calendar_day.html', allow_empty=False, allow_future=True, extra_context=extra_context) elif month is not None: return date_based.archive_month(request, year, month, queryset, field.name, template_name='databrowse/calendar_month.html', allow_empty=False, allow_future=True, extra_context=extra_context) elif year is not None: return date_based.archive_year(request, year, queryset, field.name, template_name='databrowse/calendar_year.html', allow_empty=False, allow_future=True, extra_context=extra_context) else: return date_based.archive_index(request, queryset, field.name, template_name='databrowse/calendar_main.html', allow_empty=True, allow_future=True, extra_context=extra_context) assert False, ('%s, %s, %s, %s' % (field, year, month, day))
vex1023/vxData
refs/heads/master
setup.py
1
from __future__ import print_function import os import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import vxData as source_packages here = os.path.abspath(os.path.dirname(__file__)) # 包名称 name = 'vxData' # 版本号从源代码包里获取 version = source_packages.__version__ # 项目首页 home_pages = 'http://github.com/' # 作者相关信息 author = source_packages.__author__ author_email = source_packages.__email__ # 项目简介 description = 'A股交易数据包' # 测试用例 test_suite = 'vxData.tests.test_API' # 项目分类 classifiers = [ 'Programming Language :: Python3.4', 'Programming Language :: Python3.5', 'Development Status :: 4 - Beta', 'Natural Language :: Chinese', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: The MIT License (MIT)', 'Operating System :: OS Independent', 'Topic :: Software Development :: Libraries :: Python Modules', ] requirements = ['requests', 'pandas', 'vxUtils'] readme = None long_description = '' if os.path.exists('README.rst'): readme = 'README.rst' elif os.path.exists('README.md'): readme = 'README.md' if readme: with open(readme, 'rb') as f: long_description = f.read().decode('utf-8') class PyTest(TestCommand): user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")] def initialize_options(self): TestCommand.initialize_options(self) self.pytest_args = [] def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errcode = pytest.main(self.test_args) sys.exit(errcode) setup( name=name, version=version, url=home_pages, license='The MIT License (MIT)', author=author, tests_require=['pytest'], install_requires=requirements, cmdclass={'test': PyTest}, author_email=author_email, description=description, long_description=long_description, packages=find_packages(), include_package_data=True, platforms='any', test_suite=test_suite, #classifiers=classifiers, extras_require={ 'testing': ['pytest'], } )
shliujing/v2ex
refs/heads/master
mapreduce/lib/blobstore/__init__.py
38
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """Blobstore API module.""" from blobstore import *
coldmind/django
refs/heads/master
tests/generic_views/test_base.py
269
from __future__ import unicode_literals import time import unittest from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import resolve from django.http import HttpResponse from django.test import RequestFactory, SimpleTestCase, override_settings from django.test.utils import require_jinja2 from django.views.generic import RedirectView, TemplateView, View from . import views class SimpleView(View): """ A simple view with a docstring. """ def get(self, request): return HttpResponse('This is a simple view') class SimplePostView(SimpleView): post = SimpleView.get class PostOnlyView(View): def post(self, request): return HttpResponse('This view only accepts POST') class CustomizableView(SimpleView): parameter = {} def decorator(view): view.is_decorated = True return view class DecoratedDispatchView(SimpleView): @decorator def dispatch(self, request, *args, **kwargs): return super(DecoratedDispatchView, self).dispatch(request, *args, **kwargs) class AboutTemplateView(TemplateView): def get(self, request): return self.render_to_response({}) def get_template_names(self): return ['generic_views/about.html'] class AboutTemplateAttributeView(TemplateView): template_name = 'generic_views/about.html' def get(self, request): return self.render_to_response(context={}) class InstanceView(View): def get(self, request): return self class ViewTest(unittest.TestCase): rf = RequestFactory() def _assert_simple(self, response): self.assertEqual(response.status_code, 200) self.assertEqual(response.content, b'This is a simple view') def test_no_init_kwargs(self): """ Test that a view can't be accidentally instantiated before deployment """ try: SimpleView(key='value').as_view() self.fail('Should not be able to instantiate a view') except AttributeError: pass def test_no_init_args(self): """ Test that a view can't be accidentally instantiated before deployment """ try: SimpleView.as_view('value') self.fail('Should not be able to use non-keyword arguments instantiating a view') except TypeError: pass def test_pathological_http_method(self): """ The edge case of a http request that spoofs an existing method name is caught. """ self.assertEqual(SimpleView.as_view()( self.rf.get('/', REQUEST_METHOD='DISPATCH') ).status_code, 405) def test_get_only(self): """ Test a view which only allows GET doesn't allow other methods. """ self._assert_simple(SimpleView.as_view()(self.rf.get('/'))) self.assertEqual(SimpleView.as_view()(self.rf.post('/')).status_code, 405) self.assertEqual(SimpleView.as_view()( self.rf.get('/', REQUEST_METHOD='FAKE') ).status_code, 405) def test_get_and_head(self): """ Test a view which supplies a GET method also responds correctly to HEAD. """ self._assert_simple(SimpleView.as_view()(self.rf.get('/'))) response = SimpleView.as_view()(self.rf.head('/')) self.assertEqual(response.status_code, 200) def test_head_no_get(self): """ Test a view which supplies no GET method responds to HEAD with HTTP 405. """ response = PostOnlyView.as_view()(self.rf.head('/')) self.assertEqual(response.status_code, 405) def test_get_and_post(self): """ Test a view which only allows both GET and POST. """ self._assert_simple(SimplePostView.as_view()(self.rf.get('/'))) self._assert_simple(SimplePostView.as_view()(self.rf.post('/'))) self.assertEqual(SimplePostView.as_view()( self.rf.get('/', REQUEST_METHOD='FAKE') ).status_code, 405) def test_invalid_keyword_argument(self): """ Test that view arguments must be predefined on the class and can't be named like a HTTP method. """ # Check each of the allowed method names for method in SimpleView.http_method_names: kwargs = dict(((method, "value"),)) self.assertRaises(TypeError, SimpleView.as_view, **kwargs) # Check the case view argument is ok if predefined on the class... CustomizableView.as_view(parameter="value") # ...but raises errors otherwise. self.assertRaises(TypeError, CustomizableView.as_view, foobar="value") def test_calling_more_than_once(self): """ Test a view can only be called once. """ request = self.rf.get('/') view = InstanceView.as_view() self.assertNotEqual(view(request), view(request)) def test_class_attributes(self): """ Test that the callable returned from as_view() has proper docstring, name and module. """ self.assertEqual(SimpleView.__doc__, SimpleView.as_view().__doc__) self.assertEqual(SimpleView.__name__, SimpleView.as_view().__name__) self.assertEqual(SimpleView.__module__, SimpleView.as_view().__module__) def test_dispatch_decoration(self): """ Test that attributes set by decorators on the dispatch method are also present on the closure. """ self.assertTrue(DecoratedDispatchView.as_view().is_decorated) def test_options(self): """ Test that views respond to HTTP OPTIONS requests with an Allow header appropriate for the methods implemented by the view class. """ request = self.rf.options('/') view = SimpleView.as_view() response = view(request) self.assertEqual(200, response.status_code) self.assertTrue(response['Allow']) def test_options_for_get_view(self): """ Test that a view implementing GET allows GET and HEAD. """ request = self.rf.options('/') view = SimpleView.as_view() response = view(request) self._assert_allows(response, 'GET', 'HEAD') def test_options_for_get_and_post_view(self): """ Test that a view implementing GET and POST allows GET, HEAD, and POST. """ request = self.rf.options('/') view = SimplePostView.as_view() response = view(request) self._assert_allows(response, 'GET', 'HEAD', 'POST') def test_options_for_post_view(self): """ Test that a view implementing POST allows POST. """ request = self.rf.options('/') view = PostOnlyView.as_view() response = view(request) self._assert_allows(response, 'POST') def _assert_allows(self, response, *expected_methods): "Assert allowed HTTP methods reported in the Allow response header" response_allows = set(response['Allow'].split(', ')) self.assertEqual(set(expected_methods + ('OPTIONS',)), response_allows) def test_args_kwargs_request_on_self(self): """ Test a view only has args, kwargs & request once `as_view` has been called. """ bare_view = InstanceView() view = InstanceView.as_view()(self.rf.get('/')) for attribute in ('args', 'kwargs', 'request'): self.assertNotIn(attribute, dir(bare_view)) self.assertIn(attribute, dir(view)) def test_direct_instantiation(self): """ It should be possible to use the view by directly instantiating it without going through .as_view() (#21564). """ view = PostOnlyView() response = view.dispatch(self.rf.head('/')) self.assertEqual(response.status_code, 405) @override_settings(ROOT_URLCONF='generic_views.urls') class TemplateViewTest(SimpleTestCase): rf = RequestFactory() def _assert_about(self, response): response.render() self.assertEqual(response.status_code, 200) self.assertContains(response, '<h1>About</h1>') def test_get(self): """ Test a view that simply renders a template on GET """ self._assert_about(AboutTemplateView.as_view()(self.rf.get('/about/'))) def test_head(self): """ Test a TemplateView responds correctly to HEAD """ response = AboutTemplateView.as_view()(self.rf.head('/about/')) self.assertEqual(response.status_code, 200) def test_get_template_attribute(self): """ Test a view that renders a template on GET with the template name as an attribute on the class. """ self._assert_about(AboutTemplateAttributeView.as_view()(self.rf.get('/about/'))) def test_get_generic_template(self): """ Test a completely generic view that renders a template on GET with the template name as an argument at instantiation. """ self._assert_about(TemplateView.as_view(template_name='generic_views/about.html')(self.rf.get('/about/'))) def test_template_name_required(self): """ A template view must provide a template name. """ self.assertRaises(ImproperlyConfigured, self.client.get, '/template/no_template/') @require_jinja2 def test_template_engine(self): """ A template view may provide a template engine. """ request = self.rf.get('/using/') view = TemplateView.as_view(template_name='generic_views/using.html') self.assertEqual(view(request).render().content, b'DTL\n') view = TemplateView.as_view(template_name='generic_views/using.html', template_engine='django') self.assertEqual(view(request).render().content, b'DTL\n') view = TemplateView.as_view(template_name='generic_views/using.html', template_engine='jinja2') self.assertEqual(view(request).render().content, b'Jinja2\n') def test_template_params(self): """ A generic template view passes kwargs as context. """ response = self.client.get('/template/simple/bar/') self.assertEqual(response.status_code, 200) self.assertEqual(response.context['foo'], 'bar') self.assertIsInstance(response.context['view'], View) def test_extra_template_params(self): """ A template view can be customized to return extra context. """ response = self.client.get('/template/custom/bar/') self.assertEqual(response.status_code, 200) self.assertEqual(response.context['foo'], 'bar') self.assertEqual(response.context['key'], 'value') self.assertIsInstance(response.context['view'], View) def test_cached_views(self): """ A template view can be cached """ response = self.client.get('/template/cached/bar/') self.assertEqual(response.status_code, 200) time.sleep(1.0) response2 = self.client.get('/template/cached/bar/') self.assertEqual(response2.status_code, 200) self.assertEqual(response.content, response2.content) time.sleep(2.0) # Let the cache expire and test again response2 = self.client.get('/template/cached/bar/') self.assertEqual(response2.status_code, 200) self.assertNotEqual(response.content, response2.content) def test_content_type(self): response = self.client.get('/template/content_type/') self.assertEqual(response['Content-Type'], 'text/plain') def test_resolve_view(self): match = resolve('/template/content_type/') self.assertIs(match.func.view_class, TemplateView) self.assertEqual(match.func.view_initkwargs['content_type'], 'text/plain') def test_resolve_login_required_view(self): match = resolve('/template/login_required/') self.assertIs(match.func.view_class, TemplateView) @override_settings(ROOT_URLCONF='generic_views.urls') class RedirectViewTest(SimpleTestCase): rf = RequestFactory() def test_no_url(self): "Without any configuration, returns HTTP 410 GONE" response = RedirectView.as_view()(self.rf.get('/foo/')) self.assertEqual(response.status_code, 410) def test_default_redirect(self): "Default is a temporary redirect" response = RedirectView.as_view(url='/bar/')(self.rf.get('/foo/')) self.assertEqual(response.status_code, 302) self.assertEqual(response.url, '/bar/') def test_permanent_redirect(self): "Permanent redirects are an option" response = RedirectView.as_view(url='/bar/', permanent=True)(self.rf.get('/foo/')) self.assertEqual(response.status_code, 301) self.assertEqual(response.url, '/bar/') def test_temporary_redirect(self): "Temporary redirects are an option" response = RedirectView.as_view(url='/bar/', permanent=False)(self.rf.get('/foo/')) self.assertEqual(response.status_code, 302) self.assertEqual(response.url, '/bar/') def test_include_args(self): "GET arguments can be included in the redirected URL" response = RedirectView.as_view(url='/bar/')(self.rf.get('/foo/')) self.assertEqual(response.status_code, 302) self.assertEqual(response.url, '/bar/') response = RedirectView.as_view(url='/bar/', query_string=True)(self.rf.get('/foo/?pork=spam')) self.assertEqual(response.status_code, 302) self.assertEqual(response.url, '/bar/?pork=spam') def test_include_urlencoded_args(self): "GET arguments can be URL-encoded when included in the redirected URL" response = RedirectView.as_view(url='/bar/', query_string=True)( self.rf.get('/foo/?unicode=%E2%9C%93')) self.assertEqual(response.status_code, 302) self.assertEqual(response.url, '/bar/?unicode=%E2%9C%93') def test_parameter_substitution(self): "Redirection URLs can be parameterized" response = RedirectView.as_view(url='/bar/%(object_id)d/')(self.rf.get('/foo/42/'), object_id=42) self.assertEqual(response.status_code, 302) self.assertEqual(response.url, '/bar/42/') def test_named_url_pattern(self): "Named pattern parameter should reverse to the matching pattern" response = RedirectView.as_view(pattern_name='artist_detail')(self.rf.get('/foo/'), pk=1) self.assertEqual(response.status_code, 302) self.assertEqual(response['Location'], '/detail/artist/1/') def test_named_url_pattern_using_args(self): response = RedirectView.as_view(pattern_name='artist_detail')(self.rf.get('/foo/'), 1) self.assertEqual(response.status_code, 302) self.assertEqual(response['Location'], '/detail/artist/1/') def test_wrong_named_url_pattern(self): "A wrong pattern name returns 410 GONE" response = RedirectView.as_view(pattern_name='wrong.pattern_name')(self.rf.get('/foo/')) self.assertEqual(response.status_code, 410) def test_redirect_POST(self): "Default is a temporary redirect" response = RedirectView.as_view(url='/bar/')(self.rf.post('/foo/')) self.assertEqual(response.status_code, 302) self.assertEqual(response.url, '/bar/') def test_redirect_HEAD(self): "Default is a temporary redirect" response = RedirectView.as_view(url='/bar/')(self.rf.head('/foo/')) self.assertEqual(response.status_code, 302) self.assertEqual(response.url, '/bar/') def test_redirect_OPTIONS(self): "Default is a temporary redirect" response = RedirectView.as_view(url='/bar/')(self.rf.options('/foo/')) self.assertEqual(response.status_code, 302) self.assertEqual(response.url, '/bar/') def test_redirect_PUT(self): "Default is a temporary redirect" response = RedirectView.as_view(url='/bar/')(self.rf.put('/foo/')) self.assertEqual(response.status_code, 302) self.assertEqual(response.url, '/bar/') def test_redirect_PATCH(self): "Default is a temporary redirect" response = RedirectView.as_view(url='/bar/')(self.rf.patch('/foo/')) self.assertEqual(response.status_code, 302) self.assertEqual(response.url, '/bar/') def test_redirect_DELETE(self): "Default is a temporary redirect" response = RedirectView.as_view(url='/bar/')(self.rf.delete('/foo/')) self.assertEqual(response.status_code, 302) self.assertEqual(response.url, '/bar/') def test_redirect_when_meta_contains_no_query_string(self): "regression for #16705" # we can't use self.rf.get because it always sets QUERY_STRING response = RedirectView.as_view(url='/bar/')(self.rf.request(PATH_INFO='/foo/')) self.assertEqual(response.status_code, 302) def test_direct_instantiation(self): """ It should be possible to use the view without going through .as_view() (#21564). """ view = RedirectView() response = view.dispatch(self.rf.head('/foo/')) self.assertEqual(response.status_code, 410) class GetContextDataTest(unittest.TestCase): def test_get_context_data_super(self): test_view = views.CustomContextView() context = test_view.get_context_data(kwarg_test='kwarg_value') # the test_name key is inserted by the test classes parent self.assertIn('test_name', context) self.assertEqual(context['kwarg_test'], 'kwarg_value') self.assertEqual(context['custom_key'], 'custom_value') # test that kwarg overrides values assigned higher up context = test_view.get_context_data(test_name='test_value') self.assertEqual(context['test_name'], 'test_value') def test_object_at_custom_name_in_context_data(self): # Checks 'pony' key presence in dict returned by get_context_date test_view = views.CustomSingleObjectView() test_view.context_object_name = 'pony' context = test_view.get_context_data() self.assertEqual(context['pony'], test_view.object) def test_object_in_get_context_data(self): # Checks 'object' key presence in dict returned by get_context_date #20234 test_view = views.CustomSingleObjectView() context = test_view.get_context_data() self.assertEqual(context['object'], test_view.object) class UseMultipleObjectMixinTest(unittest.TestCase): rf = RequestFactory() def test_use_queryset_from_view(self): test_view = views.CustomMultipleObjectMixinView() test_view.get(self.rf.get('/')) # Don't pass queryset as argument context = test_view.get_context_data() self.assertEqual(context['object_list'], test_view.queryset) def test_overwrite_queryset(self): test_view = views.CustomMultipleObjectMixinView() test_view.get(self.rf.get('/')) queryset = [{'name': 'Lennon'}, {'name': 'Ono'}] self.assertNotEqual(test_view.queryset, queryset) # Overwrite the view's queryset with queryset from kwarg context = test_view.get_context_data(object_list=queryset) self.assertEqual(context['object_list'], queryset) class SingleObjectTemplateResponseMixinTest(unittest.TestCase): def test_template_mixin_without_template(self): """ We want to makes sure that if you use a template mixin, but forget the template, it still tells you it's ImproperlyConfigured instead of TemplateDoesNotExist. """ view = views.TemplateResponseWithoutTemplate() self.assertRaises(ImproperlyConfigured, view.get_template_names)
huard/scipy-work
refs/heads/master
scipy/sparse/linalg/setupscons.py
12
#!/usr/bin/env python def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('linalg',parent_package,top_path, setup_name = 'setupscons.py') config.add_subpackage(('isolve')) config.add_subpackage(('dsolve')) config.add_subpackage(('eigen')) config.add_data_dir('tests') return config if __name__ == '__main__': from numpy.distutils.core import setup setup(**configuration(top_path='').todict())
TkTech/pytextql
refs/heads/master
tests/test_overwrite.py
1
# -*- coding: utf-8 -*- import os import os.path import sqlite3 import tempfile import nose.tools as tools from pytextql import core @tools.raises(core.TableExists) def test_overwrite_none(): """ Ensure an error is raised if the table already exists in the given database. """ try: __, tmp_path = tempfile.mkstemp() with core._open_db(db_path=tmp_path) as db: db.row_factory = sqlite3.Row core._create_table( db, 'tbl1', ['test', 'test_two'] ) with core._open_db(db_path=tmp_path) as db: db.row_factory = sqlite3.Row core._create_table( db, 'tbl1', ['test', 'test_two'] ) finally: os.remove(tmp_path) def test_overwrite_success(): """ Ensure that no error is raised if the table already exists in the given database if overwrite is ``True``. """ try: __, tmp_path = tempfile.mkstemp() with core._open_db(db_path=tmp_path) as db: db.row_factory = sqlite3.Row core._create_table( db, 'tbl1', ['test', 'test_two'] ) with core._open_db(db_path=tmp_path) as db: db.row_factory = sqlite3.Row core._create_table( db, 'tbl1', ['test', 'test_two'], overwrite=True ) finally: os.remove(tmp_path)
sunqm/pyscf
refs/heads/master
pyscf/soscf/ciah.py
1
#!/usr/bin/env python # Copyright 2014-2021 The PySCF Developers. 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. # # Author: Qiming Sun <osirpt.sun@gmail.com> # import sys import numpy import scipy.linalg from pyscf import lib from pyscf.lib import logger from pyscf import __config__ def expmat(a): return scipy.linalg.expm(a) class CIAHOptimizer(lib.StreamObject): conv_tol_grad = getattr(__config__, 'soscf_ciah_CIAHOptimizer_conv_tol_grad', 1e-4) max_stepsize = getattr(__config__, 'soscf_ciah_CIAHOptimizer_max_stepsize', .05) max_iters = getattr(__config__, 'soscf_ciah_CIAHOptimizer_max_iters', 10) kf_interval = getattr(__config__, 'soscf_ciah_CIAHOptimizer_kf_interval', 5) kf_trust_region = getattr(__config__, 'soscf_ciah_CIAHOptimizer_kf_trust_region', 5) ah_start_tol = getattr(__config__, 'soscf_ciah_CIAHOptimizer_ah_start_tol', 5.) ah_start_cycle = getattr(__config__, 'soscf_ciah_CIAHOptimizer_ah_start_cycle', 1) ah_level_shift = getattr(__config__, 'soscf_ciah_CIAHOptimizer_ah_level_shift', 0) ah_conv_tol = getattr(__config__, 'soscf_ciah_CIAHOptimizer_ah_conv_tol', 1e-12) ah_lindep = getattr(__config__, 'soscf_ciah_CIAHOptimizer_ah_lindep', 1e-14) ah_max_cycle = getattr(__config__, 'soscf_ciah_CIAHOptimizer_ah_max_cycle', 30) ah_trust_region = getattr(__config__, 'soscf_ciah_CIAHOptimizer_ah_trust_region', 3.) def __init__(self): self._keys = set(('conv_tol_grad', 'max_stepsize', 'max_iters', 'kf_interval', 'kf_trust_region', 'ah_start_tol', 'ah_start_cycle', 'ah_level_shift', 'ah_conv_tol', 'ah_lindep', 'ah_max_cycle', 'ah_trust_region')) def gen_g_hop(self, u): pass def pack_uniq_var(self, mat): nmo = mat.shape[0] idx = numpy.tril_indices(nmo, -1) return mat[idx] def unpack_uniq_var(self, v): nmo = int(numpy.sqrt(v.size*2)) + 1 idx = numpy.tril_indices(nmo, -1) mat = numpy.zeros((nmo,nmo)) mat[idx] = v return mat - mat.conj().T def extract_rotation(self, dr, u0=1): dr = self.unpack_uniq_var(dr) return numpy.dot(u0, expmat(dr)) def get_grad(self, u): pass def cost_function(self, u): pass def rotate_orb_cc(iah, u0, conv_tol_grad=None, verbose=logger.NOTE): t2m = (logger.process_clock(), logger.perf_counter()) if isinstance(verbose, logger.Logger): log = verbose else: log = logger.Logger(sys.stdout, verbose) if conv_tol_grad is None: conv_tol_grad = iah.conv_tol_grad g_orb, h_op, h_diag = iah.gen_g_hop(u0) g_kf = g_orb norm_gkf = norm_gorb = numpy.linalg.norm(g_orb) log.debug(' |g|= %4.3g (keyframe)', norm_gorb) t3m = log.timer('gen h_op', *t2m) if h_diag is None: def precond(x, e): return x else: def precond(x, e): hdiagd = h_diag-(e-iah.ah_level_shift) hdiagd[abs(hdiagd)<1e-8] = 1e-8 x = x/hdiagd return x def scale_down_step(dxi, hdxi, norm_gorb): dxmax = abs(dxi).max() if dxmax > iah.max_stepsize: scale = iah.max_stepsize / dxmax log.debug1('Scale rotation by %g', scale) dxi *= scale hdxi *= scale return dxi, hdxi class Statistic: def __init__(self): self.imic = 0 self.tot_hop = 0 self.tot_kf = 0 kf_trust_region = iah.kf_trust_region g_op = lambda: g_orb x0_guess = g_orb while True: stat = Statistic() dr = 0 ikf = 0 ukf = 1 for ah_conv, ihop, w, dxi, hdxi, residual, seig \ in davidson_cc(h_op, g_op, precond, x0_guess, tol=iah.ah_conv_tol, max_cycle=iah.ah_max_cycle, lindep=iah.ah_lindep, verbose=log): stat.tot_hop = ihop norm_residual = numpy.linalg.norm(residual) if (ah_conv or ihop == iah.ah_max_cycle or # make sure to use the last step ((norm_residual < iah.ah_start_tol) and (ihop >= iah.ah_start_cycle)) or (seig < iah.ah_lindep)): stat.imic += 1 dxmax = abs(dxi).max() dxi, hdxi = scale_down_step(dxi, hdxi, norm_gorb) dr = dr + dxi g_orb = g_orb + hdxi norm_dr = numpy.linalg.norm(dr) norm_gorb = numpy.linalg.norm(g_orb) log.debug(' imic %d(%d) |g|= %4.3g |dxi|= %4.3g ' 'max(|x|)= %4.3g |dr|= %4.3g eig= %4.3g seig= %4.3g', stat.imic, ihop, norm_gorb, numpy.linalg.norm(dxi), dxmax, norm_dr, w, seig) max_cycle = max(iah.max_iters, iah.max_iters-int(numpy.log(norm_gkf+1e-9)*2)) log.debug1('Set max_cycle %d', max_cycle) ikf += 1 if stat.imic > 3 and norm_gorb > norm_gkf*iah.ah_trust_region: g_orb = g_orb - hdxi dr -= dxi norm_gorb = numpy.linalg.norm(g_orb) log.debug('|g| >> keyframe, Restore previouse step') break elif (stat.imic >= max_cycle or norm_gorb < conv_tol_grad*.2): break elif (ikf > 2 and # avoid frequent keyframe (ikf >= max(iah.kf_interval, iah.kf_interval-numpy.log(norm_dr+1e-9)) or # Insert keyframe if the keyframe and the esitimated g_orb are too different norm_gorb < norm_gkf/kf_trust_region)): ikf = 0 ukf = iah.extract_rotation(dr, ukf) dr[:] = 0 g_kf1 = iah.get_grad(u0.dot(ukf)) stat.tot_kf += 1 norm_gkf1 = numpy.linalg.norm(g_kf1) norm_dg = numpy.linalg.norm(g_kf1-g_orb) log.debug('Adjust keyframe g_orb to |g|= %4.3g ' '|g-correction|= %4.3g', norm_gkf1, norm_dg) if (norm_dg < norm_gorb*iah.ah_trust_region # kf not too diff #or norm_gkf1 < norm_gkf # grad is decaying # close to solution or norm_gkf1 < conv_tol_grad*iah.ah_trust_region): kf_trust_region = min(max(norm_gorb/(norm_dg+1e-9), iah.kf_trust_region), 10) log.debug1('Set kf_trust_region = %g', kf_trust_region) g_orb = g_kf = g_kf1 norm_gorb = norm_gkf = norm_gkf1 else: g_orb = g_orb - hdxi dr -= dxi norm_gorb = numpy.linalg.norm(g_orb) log.debug('Out of trust region. Restore previouse step') break u = iah.extract_rotation(dr, ukf) log.debug(' tot inner=%d |g|= %4.3g |u-1|= %4.3g', stat.imic, norm_gorb, numpy.linalg.norm(numpy.tril(u,-1))) h_op = h_diag = None t3m = log.timer('aug_hess in %d inner iters' % stat.imic, *t3m) u0 = (yield u, g_kf, stat) g_kf, h_op, h_diag = iah.gen_g_hop(u0) norm_gkf = numpy.linalg.norm(g_kf) norm_dg = numpy.linalg.norm(g_kf-g_orb) log.debug(' |g|= %4.3g (keyframe), |g-correction|= %4.3g', norm_gkf, norm_dg) kf_trust_region = min(max(norm_gorb/(norm_dg+1e-9), iah.kf_trust_region), 10) log.debug1('Set kf_trust_region = %g', kf_trust_region) g_orb = g_kf norm_gorb = norm_gkf x0_guess = dxi def davidson_cc(h_op, g_op, precond, x0, tol=1e-10, xs=[], ax=[], max_cycle=30, lindep=1e-14, dot=numpy.dot, verbose=logger.WARN): if isinstance(verbose, logger.Logger): log = verbose else: log = logger.Logger(sys.stdout, verbose) toloose = numpy.sqrt(tol) # the first trial vector is (1,0,0,...), which is not included in xs xs = list(xs) ax = list(ax) nx = len(xs) max_cycle = min(max_cycle, x0.size) heff = numpy.zeros((max_cycle+nx+1,max_cycle+nx+1), dtype=x0.dtype) ovlp = numpy.eye(max_cycle+nx+1, dtype=x0.dtype) if nx == 0: xs.append(x0) ax.append(h_op(x0)) else: for i in range(1, nx+1): for j in range(1, i+1): heff[i,j] = dot(xs[i-1].conj(), ax[j-1]) ovlp[i,j] = dot(xs[i-1].conj(), xs[j-1]) heff[1:i,i] = heff[i,1:i].conj() ovlp[1:i,i] = ovlp[i,1:i].conj() w_t = 0 for istep in range(max_cycle): g = g_op() nx = len(xs) for i in range(nx): heff[i+1,0] = dot(xs[i].conj(), g) heff[nx,i+1] = dot(xs[nx-1].conj(), ax[i]) ovlp[nx,i+1] = dot(xs[nx-1].conj(), xs[i]) heff[0,:nx+1] = heff[:nx+1,0].conj() heff[1:nx,nx] = heff[nx,1:nx].conj() ovlp[1:nx,nx] = ovlp[nx,1:nx].conj() nvec = nx + 1 #s0 = scipy.linalg.eigh(ovlp[:nvec,:nvec])[0][0] #if s0 < lindep: # yield True, istep, w_t, xtrial, hx, dx, s0 # break wlast = w_t xtrial, w_t, v_t, index, seig = \ _regular_step(heff[:nvec,:nvec], ovlp[:nvec,:nvec], xs, lindep, log) s0 = seig[0] hx = _dgemv(v_t[1:], ax) # note g*v_t[0], as the first trial vector is (1,0,0,...) dx = hx + g*v_t[0] - w_t * v_t[0]*xtrial norm_dx = numpy.linalg.norm(dx) log.debug1('... AH step %d index= %d |dx|= %.5g eig= %.5g v[0]= %.5g lindep= %.5g', istep+1, index, norm_dx, w_t, v_t[0].real, s0) hx *= 1/v_t[0] # == h_op(xtrial) if (abs(w_t-wlast) < tol and norm_dx < toloose) or s0 < lindep: # Avoid adding more trial vectors if hessian converged yield True, istep+1, w_t, xtrial, hx, dx, s0 if s0 < lindep or norm_dx < lindep:# or numpy.linalg.norm(xtrial) < lindep: # stop the iteration because eigenvectors would be barely updated break else: yield False, istep+1, w_t, xtrial, hx, dx, s0 x0 = precond(dx, w_t) xs.append(x0) ax.append(h_op(x0)) def _regular_step(heff, ovlp, xs, lindep, log): try: e, c = scipy.linalg.eigh(heff[1:,1:], ovlp[1:,1:]) except scipy.linalg.LinAlgError: e, c = lib.safe_eigh(heff[1:,1:], ovlp[1:,1:], lindep)[:2] if numpy.any(e < -1e-5): log.debug('Negative hessians found %s', e[e<0]) w, v, seig = lib.safe_eigh(heff, ovlp, lindep) if log.verbose >= logger.DEBUG3: numpy.set_printoptions(3, linewidth=1000) log.debug3('v[0] %s', v[0]) log.debug3('AH eigs %s', w) numpy.set_printoptions(8, linewidth=75) #if e[0] < -.1: # sel = 0 #else: # There exists systems that the first eigenvalue of AH is -inf. # Dynamically choosing the eigenvectors may be better. idx = numpy.where(abs(v[0]) > 0.1)[0] sel = idx[0] log.debug1('CIAH eigen-sel %s', sel) w_t = w[sel] xtrial = _dgemv(v[1:,sel]/v[0,sel], xs) return xtrial, w_t, v[:,sel], sel, seig def _dgemv(v, m): vm = v[0] * m[0] for i,vi in enumerate(v[1:]): vm += vi * m[i+1] return vm
YangSongzhou/django
refs/heads/master
tests/auth_tests/models/custom_permissions.py
295
""" The CustomPermissionsUser users email as the identifier, but uses the normal Django permissions model. This allows us to check that the PermissionsMixin includes everything that is needed to interact with the ModelBackend. """ from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin from django.contrib.auth.tests.custom_user import ( CustomUserManager, RemoveGroupsAndPermissions, ) from django.db import models from django.utils.encoding import python_2_unicode_compatible class CustomPermissionsUserManager(CustomUserManager): def create_superuser(self, email, password, date_of_birth): u = self.create_user(email, password=password, date_of_birth=date_of_birth) u.is_superuser = True u.save(using=self._db) return u with RemoveGroupsAndPermissions(): @python_2_unicode_compatible class CustomPermissionsUser(AbstractBaseUser, PermissionsMixin): email = models.EmailField(verbose_name='email address', max_length=255, unique=True) date_of_birth = models.DateField() custom_objects = CustomPermissionsUserManager() USERNAME_FIELD = 'email' REQUIRED_FIELDS = ['date_of_birth'] class Meta: app_label = 'auth' def get_full_name(self): return self.email def get_short_name(self): return self.email def __str__(self): return self.email
ptroja/spark2014
refs/heads/master
testsuite/gnatprove/tests/N228-005__update_multidim_unconstr_array_auto/test.py
184
from test_support import * prove_all()
kvar/ansible
refs/heads/seas_master_2.9.5
lib/ansible/modules/monitoring/statusio_maintenance.py
92
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Benjamin Copeland (@bhcopeland) <ben@copeland.me.uk> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' module: statusio_maintenance short_description: Create maintenance windows for your status.io dashboard description: - Creates a maintenance window for status.io - Deletes a maintenance window for status.io notes: - You can use the apiary API url (http://docs.statusio.apiary.io/) to capture API traffic - Use start_date and start_time with minutes to set future maintenance window version_added: "2.2" author: Benjamin Copeland (@bhcopeland) <ben@copeland.me.uk> options: title: description: - A descriptive title for the maintenance window default: "A new maintenance window" desc: description: - Message describing the maintenance window default: "Created by Ansible" state: description: - Desired state of the package. default: "present" choices: ["present", "absent"] api_id: description: - Your unique API ID from status.io required: true api_key: description: - Your unique API Key from status.io required: true statuspage: description: - Your unique StatusPage ID from status.io required: true url: description: - Status.io API URL. A private apiary can be used instead. default: "https://api.status.io" components: description: - The given name of your component (server name) aliases: ['component'] containers: description: - The given name of your container (data center) aliases: ['container'] all_infrastructure_affected: description: - If it affects all components and containers type: bool default: 'no' automation: description: - Automatically start and end the maintenance window type: bool default: 'no' maintenance_notify_now: description: - Notify subscribers now type: bool default: 'no' maintenance_notify_72_hr: description: - Notify subscribers 72 hours before maintenance start time type: bool default: 'no' maintenance_notify_24_hr: description: - Notify subscribers 24 hours before maintenance start time type: bool default: 'no' maintenance_notify_1_hr: description: - Notify subscribers 1 hour before maintenance start time type: bool default: 'no' maintenance_id: description: - The maintenance id number when deleting a maintenance window minutes: description: - The length of time in UTC that the maintenance will run \ (starting from playbook runtime) default: 10 start_date: description: - Date maintenance is expected to start (Month/Day/Year) (UTC) - End Date is worked out from start_date + minutes start_time: description: - Time maintenance is expected to start (Hour:Minutes) (UTC) - End Time is worked out from start_time + minutes ''' EXAMPLES = ''' - name: Create a maintenance window for 10 minutes on server1, with automation to stop the maintenance statusio_maintenance: title: Router Upgrade from ansible desc: Performing a Router Upgrade components: server1.example.com api_id: api_id api_key: api_key statuspage: statuspage_id maintenance_notify_1_hr: True automation: True - name: Create a maintenance window for 60 minutes on server1 and server2 statusio_maintenance: title: Routine maintenance desc: Some security updates components: - server1.example.com - server2.example.com minutes: 60 api_id: api_id api_key: api_key statuspage: statuspage_id maintenance_notify_1_hr: True automation: True delegate_to: localhost - name: Create a future maintenance window for 24 hours to all hosts inside the Primary Data Center statusio_maintenance: title: Data center downtime desc: Performing a Upgrade to our data center components: Primary Data Center api_id: api_id api_key: api_key statuspage: statuspage_id start_date: 01/01/2016 start_time: 12:00 minutes: 1440 - name: Delete a maintenance window statusio_maintenance: title: Remove a maintenance window maintenance_id: 561f90faf74bc94a4700087b statuspage: statuspage_id api_id: api_id api_key: api_key state: absent ''' # TODO: Add RETURN documentation. RETURN = ''' # ''' import datetime import json from ansible.module_utils.basic import AnsibleModule from ansible.module_utils._text import to_native from ansible.module_utils.urls import open_url def get_api_auth_headers(api_id, api_key, url, statuspage): headers = { "x-api-id": api_id, "x-api-key": api_key, "Content-Type": "application/json" } try: response = open_url( url + "/v2/component/list/" + statuspage, headers=headers) data = json.loads(response.read()) if data['status']['message'] == 'Authentication failed': return 1, None, None, "Authentication failed: " \ "Check api_id/api_key and statuspage id." else: auth_headers = headers auth_content = data except Exception as e: return 1, None, None, to_native(e) return 0, auth_headers, auth_content, None def get_component_ids(auth_content, components): host_ids = [] lower_components = [x.lower() for x in components] for result in auth_content["result"]: if result['name'].lower() in lower_components: data = { "component_id": result["_id"], "container_id": result["containers"][0]["_id"] } host_ids.append(data) lower_components.remove(result['name'].lower()) if len(lower_components): # items not found in the api return 1, None, lower_components return 0, host_ids, None def get_container_ids(auth_content, containers): host_ids = [] lower_containers = [x.lower() for x in containers] for result in auth_content["result"]: if result["containers"][0]["name"].lower() in lower_containers: data = { "component_id": result["_id"], "container_id": result["containers"][0]["_id"] } host_ids.append(data) lower_containers.remove(result["containers"][0]["name"].lower()) if len(lower_containers): # items not found in the api return 1, None, lower_containers return 0, host_ids, None def get_date_time(start_date, start_time, minutes): returned_date = [] if start_date and start_time: try: datetime.datetime.strptime(start_date, '%m/%d/%Y') returned_date.append(start_date) except (NameError, ValueError): return 1, None, "Not a valid start_date format." try: datetime.datetime.strptime(start_time, '%H:%M') returned_date.append(start_time) except (NameError, ValueError): return 1, None, "Not a valid start_time format." try: # Work out end date/time based on minutes date_time_start = datetime.datetime.strptime( start_time + start_date, '%H:%M%m/%d/%Y') delta = date_time_start + datetime.timedelta(minutes=minutes) returned_date.append(delta.strftime("%m/%d/%Y")) returned_date.append(delta.strftime("%H:%M")) except (NameError, ValueError): return 1, None, "Couldn't work out a valid date" else: now = datetime.datetime.utcnow() delta = now + datetime.timedelta(minutes=minutes) # start_date returned_date.append(now.strftime("%m/%d/%Y")) returned_date.append(now.strftime("%H:%M")) # end_date returned_date.append(delta.strftime("%m/%d/%Y")) returned_date.append(delta.strftime("%H:%M")) return 0, returned_date, None def create_maintenance(auth_headers, url, statuspage, host_ids, all_infrastructure_affected, automation, title, desc, returned_date, maintenance_notify_now, maintenance_notify_72_hr, maintenance_notify_24_hr, maintenance_notify_1_hr): returned_dates = [[x] for x in returned_date] component_id = [] container_id = [] for val in host_ids: component_id.append(val['component_id']) container_id.append(val['container_id']) try: values = json.dumps({ "statuspage_id": statuspage, "components": component_id, "containers": container_id, "all_infrastructure_affected": str(int(all_infrastructure_affected)), "automation": str(int(automation)), "maintenance_name": title, "maintenance_details": desc, "date_planned_start": returned_dates[0], "time_planned_start": returned_dates[1], "date_planned_end": returned_dates[2], "time_planned_end": returned_dates[3], "maintenance_notify_now": str(int(maintenance_notify_now)), "maintenance_notify_72_hr": str(int(maintenance_notify_72_hr)), "maintenance_notify_24_hr": str(int(maintenance_notify_24_hr)), "maintenance_notify_1_hr": str(int(maintenance_notify_1_hr)) }) response = open_url( url + "/v2/maintenance/schedule", data=values, headers=auth_headers) data = json.loads(response.read()) if data["status"]["error"] == "yes": return 1, None, data["status"]["message"] except Exception as e: return 1, None, to_native(e) return 0, None, None def delete_maintenance(auth_headers, url, statuspage, maintenance_id): try: values = json.dumps({ "statuspage_id": statuspage, "maintenance_id": maintenance_id, }) response = open_url( url=url + "/v2/maintenance/delete", data=values, headers=auth_headers) data = json.loads(response.read()) if data["status"]["error"] == "yes": return 1, None, "Invalid maintenance_id" except Exception as e: return 1, None, to_native(e) return 0, None, None def main(): module = AnsibleModule( argument_spec=dict( api_id=dict(required=True), api_key=dict(required=True, no_log=True), statuspage=dict(required=True), state=dict(required=False, default='present', choices=['present', 'absent']), url=dict(default='https://api.status.io', required=False), components=dict(type='list', required=False, default=None, aliases=['component']), containers=dict(type='list', required=False, default=None, aliases=['container']), all_infrastructure_affected=dict(type='bool', default=False, required=False), automation=dict(type='bool', default=False, required=False), title=dict(required=False, default='A new maintenance window'), desc=dict(required=False, default='Created by Ansible'), minutes=dict(type='int', required=False, default=10), maintenance_notify_now=dict(type='bool', default=False, required=False), maintenance_notify_72_hr=dict(type='bool', default=False, required=False), maintenance_notify_24_hr=dict(type='bool', default=False, required=False), maintenance_notify_1_hr=dict(type='bool', default=False, required=False), maintenance_id=dict(required=False, default=None), start_date=dict(default=None, required=False), start_time=dict(default=None, required=False) ), supports_check_mode=True, ) api_id = module.params['api_id'] api_key = module.params['api_key'] statuspage = module.params['statuspage'] state = module.params['state'] url = module.params['url'] components = module.params['components'] containers = module.params['containers'] all_infrastructure_affected = module.params['all_infrastructure_affected'] automation = module.params['automation'] title = module.params['title'] desc = module.params['desc'] minutes = module.params['minutes'] maintenance_notify_now = module.params['maintenance_notify_now'] maintenance_notify_72_hr = module.params['maintenance_notify_72_hr'] maintenance_notify_24_hr = module.params['maintenance_notify_24_hr'] maintenance_notify_1_hr = module.params['maintenance_notify_1_hr'] maintenance_id = module.params['maintenance_id'] start_date = module.params['start_date'] start_time = module.params['start_time'] if state == "present": if api_id and api_key: (rc, auth_headers, auth_content, error) = \ get_api_auth_headers(api_id, api_key, url, statuspage) if rc != 0: module.fail_json(msg="Failed to get auth keys: %s" % error) else: auth_headers = {} auth_content = {} if minutes or start_time and start_date: (rc, returned_date, error) = get_date_time( start_date, start_time, minutes) if rc != 0: module.fail_json(msg="Failed to set date/time: %s" % error) if not components and not containers: return module.fail_json(msg="A Component or Container must be " "defined") elif components and containers: return module.fail_json(msg="Components and containers cannot " "be used together") else: if components: (rc, host_ids, error) = get_component_ids(auth_content, components) if rc != 0: module.fail_json(msg="Failed to find component %s" % error) if containers: (rc, host_ids, error) = get_container_ids(auth_content, containers) if rc != 0: module.fail_json(msg="Failed to find container %s" % error) if module.check_mode: module.exit_json(changed=True) else: (rc, _, error) = create_maintenance( auth_headers, url, statuspage, host_ids, all_infrastructure_affected, automation, title, desc, returned_date, maintenance_notify_now, maintenance_notify_72_hr, maintenance_notify_24_hr, maintenance_notify_1_hr) if rc == 0: module.exit_json(changed=True, result="Successfully created " "maintenance") else: module.fail_json(msg="Failed to create maintenance: %s" % error) if state == "absent": if api_id and api_key: (rc, auth_headers, auth_content, error) = \ get_api_auth_headers(api_id, api_key, url, statuspage) if rc != 0: module.fail_json(msg="Failed to get auth keys: %s" % error) else: auth_headers = {} if module.check_mode: module.exit_json(changed=True) else: (rc, _, error) = delete_maintenance( auth_headers, url, statuspage, maintenance_id) if rc == 0: module.exit_json( changed=True, result="Successfully deleted maintenance" ) else: module.fail_json( msg="Failed to delete maintenance: %s" % error) if __name__ == '__main__': main()
lkeijser/stonevpn
refs/heads/master
StoneVPN/__init__.py
1
STONEVPN_VERSION = '0.4.16'
twobraids/crontabber
refs/heads/master
crontabber/tests/test_crontabber.py
1
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import re import sys import datetime import time import unittest import collections from cStringIO import StringIO import mock import psycopg2 from nose.plugins.attrib import attr from nose.tools import eq_, ok_, assert_raises from crontabber import app, base, __version__ from crontabber.datetimeutil import utc_now from configman import Namespace from crontabber.mixins import ( as_backfill_cron_app, with_postgres_transactions, with_postgres_connection_as_argument, with_single_postgres_transaction ) from .base import IntegrationTestCaseBase # ============================================================================= class _Item(object): def __init__(self, name, depends_on): self.app_name = name self.depends_on = depends_on class TestReordering(unittest.TestCase): def test_basic_already_right(self): sequence = [ _Item('A', []), _Item('B', ['A']), _Item('C', ['B']), ] new_sequence = base.reorder_dag(sequence) new_names = [x.app_name for x in new_sequence] eq_(new_names, ['A', 'B', 'C']) def test_three_levels(self): sequence = [ _Item('A', []), _Item('B', ['A']), _Item('D', ['B', 'C']), _Item('C', ['B']), ] new_sequence = base.reorder_dag(sequence) new_names = [x.app_name for x in new_sequence] eq_(new_names, ['A', 'B', 'C', 'D']) def test_basic_completely_reversed(self): sequence = [ _Item('C', ['B']), _Item('B', ['A']), _Item('A', []), ] new_sequence = base.reorder_dag(sequence) new_names = [x.app_name for x in new_sequence] eq_(new_names, ['A', 'B', 'C']) def test_basic_sloppy_depends_on(self): sequence = [ _Item('C', ('B',)), _Item('B', 'A'), _Item('A', None), ] new_sequence = base.reorder_dag(sequence) new_names = [x.app_name for x in new_sequence] eq_(new_names, ['A', 'B', 'C']) def test_two_trees(self): sequence = [ _Item('C', ['B']), _Item('B', ['A']), _Item('A', []), _Item('X', ['Y']), _Item('Y', []), ] new_sequence = base.reorder_dag(sequence) new_names = [x.app_name for x in new_sequence] ok_( new_names.index('A') < new_names.index('B') < new_names.index('C') ) ok_( new_names.index('Y') < new_names.index('X') ) def test_circular_no_roots(self): sequence = [ _Item('C', ['B']), _Item('B', ['A']), _Item('A', ['C']), ] assert_raises( base.CircularDAGError, base.reorder_dag, sequence ) def test_circular_one_root_still_circular(self): sequence = [ _Item('C', ['B']), _Item('X', ['Y']), _Item('Y', []), _Item('B', ['A']), _Item('A', ['C']), ] assert_raises( base.CircularDAGError, base.reorder_dag, sequence ) # ============================================================================= @attr(integration='postgres') class TestStateDatabase(IntegrationTestCaseBase): def setUp(self): super(TestStateDatabase, self).setUp() self.database = app.JobStateDatabase(self.config.crontabber) def test_has_data(self): ok_(not self.database.has_data()) self.database['foo'] = { 'next_run': utc_now(), 'last_run': utc_now(), 'first_run': utc_now(), 'depends_on': [], 'error_count': 0, 'last_error': {} } ok_(self.database.has_data()) def test_iterate_app_names(self): app_names = set() for app_name in self.database: app_names.add(app_name) eq_(app_names, set()) self.database['foo'] = { 'next_run': utc_now(), 'last_run': utc_now(), 'first_run': utc_now(), 'depends_on': [], 'error_count': 0, 'last_error': {} } self.database['bar'] = { 'next_run': utc_now(), 'last_run': utc_now(), 'first_run': utc_now(), 'depends_on': [], 'error_count': 0, 'last_error': {} } app_names = set() for app_name in self.database: app_names.add(app_name) eq_(app_names, set(['foo', 'bar'])) def test_keys_values_items(self): foo = { 'next_run': utc_now(), 'last_run': utc_now(), 'first_run': utc_now(), 'last_success': utc_now(), 'depends_on': [], 'error_count': 0, 'last_error': {} } self.database['foo'] = foo bar = { 'next_run': utc_now(), 'last_run': utc_now(), 'first_run': utc_now(), 'last_success': None, 'depends_on': [], 'error_count': 0, 'last_error': {} } self.database['bar'] = bar eq_(set(['foo', 'bar']), set(self.database.keys())) items = dict(self.database.items()) eq_(items['foo'], foo) eq_(items['bar'], bar) values = self.database.values() eq_(len(values), 2) ok_(foo in values) ok_(bar in values) def test_contains(self): ok_('foo' not in self.database) self.database['foo'] = { 'next_run': utc_now(), 'last_run': utc_now(), 'first_run': utc_now(), 'depends_on': [], 'error_count': 0, 'last_error': {} } ok_('foo' in self.database) def test_getitem_and_setitem(self): data = { 'next_run': utc_now(), 'last_run': utc_now(), 'first_run': utc_now(), 'last_success': None, 'depends_on': [], 'error_count': 0, 'last_error': {} } self.database['foo'] = data eq_(self.database['foo'], data) def test_copy_and_update(self): foo = { 'next_run': utc_now(), 'last_run': utc_now(), 'first_run': utc_now(), 'last_success': utc_now(), 'depends_on': ['bar'], 'error_count': 1, 'last_error': {} } bar = { 'next_run': utc_now(), 'last_run': utc_now(), 'first_run': utc_now(), 'last_success': None, 'depends_on': [], 'error_count': 2, 'last_error': {} } self.database['foo'] = foo self.database['bar'] = bar stuff = self.database.copy() eq_(stuff['foo'], foo) eq_(stuff['bar'], bar) stuff['foo']['error_count'] = 10 self.database.update(stuff) new_foo = self.database['foo'] eq_(new_foo, dict(foo, error_count=10)) def test_get(self): foo = { 'next_run': utc_now(), 'last_run': utc_now(), 'first_run': utc_now(), 'last_success': None, 'depends_on': [], 'error_count': 0, 'last_error': {} } self.database['foo'] = foo eq_(self.database.get('foo'), foo) eq_(self.database.get('bar', 'default'), 'default') def test_pop(self): foo = { 'next_run': utc_now(), 'last_run': utc_now(), 'first_run': utc_now(), 'last_success': None, 'depends_on': [], 'error_count': 0, 'last_error': {} } self.database['foo'] = foo popped_foo = self.database.pop('foo') eq_(popped_foo, foo) ok_('foo' not in self.database) assert not self.database.has_data() popped = self.database.pop('foo', 'default') eq_(popped, 'default') assert_raises(KeyError, self.database.pop, 'bar') # ============================================================================= @attr(integration='postgres') class TestCrontabber(IntegrationTestCaseBase): def setUp(self): super(TestCrontabber, self).setUp() cursor = self.conn.cursor() cursor.execute(""" DROP TABLE IF EXISTS test_cron_victim; CREATE TABLE test_cron_victim ( id serial primary key, time timestamp DEFAULT current_timestamp ); """) self.conn.commit() def tearDown(self): cursor = self.conn.cursor() cursor.execute(""" DROP TABLE IF EXISTS test_cron_victim; """) self.conn.commit() super(TestCrontabber, self).tearDown() def test_basic_run_job(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.BasicJob|7d' ) def fmt(d): return d.split('.')[0] with config_manager.context() as config: tab = app.CronTabber(config) config['job'] = 'unheard-of-app-name' assert_raises( app.JobNotFoundError, tab.main, ) config['job'] = 'basic-job' assert tab.main() == 0 config.logger.info.assert_called_with('Ran BasicJob') infos = [x[0][0] for x in config.logger.info.call_args_list] # check that this was written to the JSON file # and that the next_run is going to be 1 day from now structure = self._load_structure() information = structure['basic-job'] eq_(information['error_count'], 0) eq_(information['last_error'], {}) today = utc_now() one_week = today + datetime.timedelta(days=7) self.assertAlmostEqual(today, information['last_run']) self.assertAlmostEqual(today, information['last_run']) self.assertAlmostEqual(one_week, information['next_run']) self.assertAlmostEqual( information['last_run'], information['last_success'] ) # run it again and nothing should happen count_infos = len([x for x in infos if 'Ran BasicJob' in x]) assert count_infos > 0 tab.run_one('basic-job') infos = [x[0][0] for x in config.logger.info.call_args_list] count_infos_after = len([x for x in infos if 'Ran BasicJob' in x]) eq_(count_infos, count_infos_after) # force it the second time tab.run_one('basic-job', force=True) ok_('Ran BasicJob' in infos) infos = [x[0][0] for x in config.logger.info.call_args_list] count_infos_after_second = len([x for x in infos if 'Ran BasicJob' in x]) eq_(count_infos_after_second, count_infos + 1) logs = self._load_logs() eq_(len(logs['basic-job']), 2) ok_(logs['basic-job'][0]['success']) ok_(logs['basic-job'][0]['duration']) def test_run_job_by_class_path(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.BasicJob|30m' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_one('crontabber.tests.test_crontabber.BasicJob') config.logger.info.assert_called_with('Ran BasicJob') def test_basic_run_all(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.FooJob|3d\n' 'crontabber.tests.test_crontabber.BarJob|4d' ) with config_manager.context() as config: tab = app.CronTabber(config) assert tab.main() == 0 infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] ok_('Ran FooJob' in infos) ok_('Ran BarJob' in infos) ok_(infos.index('Ran FooJob') < infos.index('Ran BarJob')) count = len(infos) tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] count_after = len(infos) eq_(count, count_after) # wind the clock forward by three days combined_state = tab.job_state_database.copy() self._wind_clock(combined_state, days=3) tab.job_state_database.update(combined_state) tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] eq_(infos[-1], 'Ran FooJob') count_after_after = len(infos) eq_(count_after + 1, count_after_after) def test_run_into_error_first_time(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.TroubleJob|7d\n', extra_value_source={ 'crontabber.error_retry_time': '100' } ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() structure = self._load_structure() information = structure['trouble'] eq_(information['error_count'], 1) ok_(information['last_error']) ok_(not information.get('last_success'), {}) today = utc_now() self.assertAlmostEqual(today, information['last_run']) _next_run = utc_now() + datetime.timedelta(seconds=100) self.assertAlmostEqual(_next_run, information['next_run']) # list the output old_stdout = sys.stdout new_stdout = StringIO() sys.stdout = new_stdout config['list-jobs'] = True try: assert tab.main() == 0 finally: sys.stdout = old_stdout output = new_stdout.getvalue() last_success_line = [x for x in output.splitlines() if 'Last success' in x][0] ok_('no previous successful run' in last_success_line) logs = self._load_logs() eq_(len(logs['trouble']), 1) ok_(not logs['trouble'][0]['success']) ok_(logs['trouble'][0]['duration']) ok_(logs['trouble'][0]['exc_type']) ok_(logs['trouble'][0]['exc_value']) ok_(logs['trouble'][0]['exc_traceback']) def test_run_all_with_failing_dependency(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.TroubleJob|1d\n' 'crontabber.tests.test_crontabber.SadJob|1d\n' 'crontabber.tests.test_crontabber.BasicJob|1d\n' 'crontabber.tests.test_crontabber.FooJob|1d' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] eq_( infos, ['Ran BasicJob', 'Ran TroubleJob', 'Ran FooJob'] ) # note how SadJob couldn't be run! # let's see what information we have structure = self._load_structure() assert structure ok_('basic-job' in structure) ok_('trouble' in structure) ok_('sad' not in structure) eq_(structure['trouble']['error_count'], 1) err = structure['trouble']['last_error'] ok_('NameError' in err['traceback']) ok_('NameError' in err['type']) ok_('Trouble!!' in err['value']) # you can't run the sad job either count_before = len(infos) tab.run_one('sad') infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] count_after = len(infos) eq_(count_before, count_after) # unless you force it tab.run_one('sad', force=True) infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] count_after_after = len(infos) eq_(count_after + 1, count_after_after) def test_run_all_basic_with_failing_dependency_without_errors(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.BarJob|1d' ) # the BarJob one depends on FooJob but suppose that FooJob # hasn't never run with config_manager.context() as config: tab = app.CronTabber(config) assert_raises( base.CircularDAGError, tab.run_all ) def test_run_all_with_failing_dependency_without_errors_but_old(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.FooJob|1d\n' 'crontabber.tests.test_crontabber.BarJob|1d' ) # the BarJob one depends on FooJob but suppose that FooJob # has run for but a very long time ago with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] # obvious eq_(infos, ['Ran FooJob', 'Ran BarJob']) combined_state = tab.job_state_database.copy() self._wind_clock(combined_state, days=1, seconds=1) tab.job_state_database.update(combined_state) # this forces in crontabber instance to reload the JSON file tab._job_state_database = None tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] # obvious eq_( infos, ['Ran FooJob', 'Ran BarJob', 'Ran FooJob', 'Ran BarJob'] ) # repeat combined_state = tab.job_state_database.copy() self._wind_clock(combined_state, days=2) tab.job_state_database.update(combined_state) # now, let's say FooJob hasn't errored but instead we try to run # the dependent and it shouldn't allow it tab.run_one('bar') infos_before = infos[:] infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] eq_(infos, infos_before) def test_depends_on_recorded_in_state(self): # set up a couple of jobs that depend on each other config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.FooJob|1d\n' 'crontabber.tests.test_crontabber.BarJob|1d\n' 'crontabber.tests.test_crontabber.FooBarJob|1d' ) # the BarJob one depends on FooJob but suppose that FooJob # has run for but a very long time ago with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() structure = self._load_structure() assert 'foo' in structure assert 'bar' in structure assert 'foobar' in structure eq_(structure['foo']['depends_on'], []) eq_(structure['bar']['depends_on'], ['foo']) eq_(structure['foobar']['depends_on'], ['foo', 'bar']) @mock.patch('crontabber.app.utc_now') def test_basic_run_job_with_hour(self, mocked_utc_now): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.BasicJob|7d|03:00\n' 'crontabber.tests.test_crontabber.FooJob|1:45' ) # Pretend it's 04:00 UTC def mock_utc_now(): n = utc_now() return n.replace(hour=4, minute=0) mocked_utc_now.side_effect = mock_utc_now with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] structure = self._load_structure() assert 'basic-job' in structure information = structure['basic-job'] eq_( information['next_run'].strftime('%H:%M:%S'), '03:00:00' ) assert 'foo' in structure information = structure['foo'] eq_( information['next_run'].strftime('%H:%M:%S'), '01:45:00' ) @mock.patch('crontabber.app.utc_now') def test_list_jobs(self, mocked_utc_now): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.SadJob|5h\n' 'crontabber.tests.test_crontabber.TroubleJob|1d\n' 'crontabber.tests.test_crontabber.BasicJob|7d|03:00\n' 'crontabber.tests.test_crontabber.FooJob|2d' ) # Pretend it's 04:00 UTC def mock_utc_now(): n = utc_now() return n.replace(hour=4) mocked_utc_now.side_effect = mock_utc_now with config_manager.context() as config: tab = app.CronTabber(config) old_stdout = sys.stdout new_stdout = StringIO() sys.stdout = new_stdout try: tab.list_jobs() finally: sys.stdout = old_stdout output = new_stdout.getvalue() eq_(output.count('Class:'), 4) eq_( 4, len(re.findall('App name:\s+(trouble|basic-job|foo|sad)', output, re.I)) ) eq_( 4, len(re.findall('No previous run info', output, re.I)) ) tab.run_all() assert 'sad' not in tab.job_state_database assert 'basic-job' in tab.job_state_database assert 'foo' in tab.job_state_database assert 'trouble' in tab.job_state_database old_stdout = sys.stdout new_stdout = StringIO() sys.stdout = new_stdout try: tab.list_jobs() finally: sys.stdout = old_stdout output = new_stdout.getvalue() # sad job won't be run since its depdendent keeps failing eq_( 1, len(re.findall('No previous run info', output, re.I)) ) # split them up so that we can investigate each block of output outputs = {} for block in re.split('={5,80}', output)[1:]: key = re.findall('App name:\s+([\w-]+)', block)[0] outputs[key] = block ok_(re.findall('No previous run info', outputs['sad'], re.I)) ok_(re.findall('Error', outputs['trouble'], re.I)) ok_(re.findall('1 time', outputs['trouble'], re.I)) ok_(re.findall('raise NameError', outputs['trouble'], re.I)) # since the exception type and exception value is also displayed # in the output we can expect these to be shown twice eq_(outputs['trouble'].count('NameError'), 2) eq_(outputs['trouble'].count('Trouble!!'), 2) ok_(re.findall('7d @ 03:00', outputs['basic-job'], re.I)) def test_configtest_ok(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.FooJob|3d\n' 'crontabber.tests.test_crontabber.BarJob|4d' ) with config_manager.context() as config: tab = app.CronTabber(config) old_stderr = sys.stderr new_stderr = StringIO() sys.stderr = new_stderr old_stdout = sys.stdout new_stdout = StringIO() sys.stdout = new_stdout config['configtest'] = True try: assert tab.main() == 0 finally: sys.stderr = old_stderr sys.stdout = old_stdout ok_(not new_stderr.getvalue()) ok_(not new_stdout.getvalue()) def test_configtest_not_found(self): assert_raises( app.JobNotFoundError, self._setup_config_manager, 'crontabber.tests.test_crontabber.YYYYYY|3d' ) def test_configtest_definition_error(self): assert_raises( app.JobDescriptionError, self._setup_config_manager, 'crontabber.tests.test_crontabber.FooJob' ) def test_configtest_bad_frequency(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.FooJob|3e' ) with config_manager.context() as config: tab = app.CronTabber(config) old_stderr = sys.stderr new_stderr = StringIO() sys.stderr = new_stderr try: ok_(not tab.configtest()) finally: sys.stderr = old_stderr output = new_stderr.getvalue() ok_('FrequencyDefinitionError' in output) # twice per not found eq_(output.count('FrequencyDefinitionError'), 2) ok_('Error value: e' in output) def test_configtest_bad_time(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.FooJob|24:59\n' 'crontabber.tests.test_crontabber.BasicJob|23:60' ) with config_manager.context() as config: tab = app.CronTabber(config) old_stderr = sys.stderr new_stderr = StringIO() sys.stderr = new_stderr try: ok_(not tab.configtest()) finally: sys.stderr = old_stderr output = new_stderr.getvalue() ok_('TimeDefinitionError' in output) # twice per not found eq_(output.count('TimeDefinitionError'), 2 + 2) ok_('24:59' in output) def test_configtest_bad_time_invariance(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.FooJob|3h|23:59' ) with config_manager.context() as config: tab = app.CronTabber(config) old_stderr = sys.stderr new_stderr = StringIO() sys.stderr = new_stderr try: ok_(not tab.configtest()) finally: sys.stderr = old_stderr output = new_stderr.getvalue() ok_('FrequencyDefinitionError' in output) # twice per not found ok_(output.count('FrequencyDefinitionError')) ok_('23:59' in output) @mock.patch('crontabber.app.utc_now') @mock.patch('crontabber.base.utc_now') def test_basic_job_at_specific_hour(self, mocked_utc_now, mocked_utc_now_2): # let's pretend the clock is 09:00 and try to run this # the first time, then nothing should happen config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.FooJob|1d|10:00' ) # Pretend it's 09:00 UTC def mock_utc_now(): n = utc_now() return n.replace(hour=9, minute=0) mocked_utc_now.side_effect = mock_utc_now mocked_utc_now_2.side_effect = mock_utc_now with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() # if it never ran, no json_file would have been created ok_(not self._load_structure()) # Pretend it's now 10:30 UTC def mock_utc_now_2(): n = utc_now() return n.replace(hour=10, minute=30) mocked_utc_now.side_effect = mock_utc_now_2 mocked_utc_now_2.side_effect = mock_utc_now_2 with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() structure = self._load_structure() assert structure information = structure['foo'] eq_( information['first_run'].strftime('%H:%M'), '10:30' ) eq_( information['last_run'].strftime('%H:%M'), '10:30' ) eq_( information['last_success'].strftime('%H:%M'), '10:30' ) eq_( information['next_run'].strftime('%H:%M'), '10:00' ) # Pretend it's now 1 day later def mock_utc_now_3(): n = utc_now() n = n.replace(hour=10, minute=30) return n + datetime.timedelta(days=1) mocked_utc_now.side_effect = mock_utc_now_3 mocked_utc_now_2.side_effect = mock_utc_now_3 with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() structure = self._load_structure() assert structure information = structure['foo'] assert not information['last_error'] eq_( information['first_run'].strftime('%H:%M'), '10:30' ) eq_( information['last_run'].strftime('%H:%M'), '10:30' ) eq_( information['last_success'].strftime('%H:%M'), '10:30' ) eq_( information['next_run'].strftime('%H:%M'), '10:00' ) infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] assert len(infos) == 2, infos @mock.patch('crontabber.app.utc_now') @mock.patch('crontabber.base.utc_now') def test_backfill_job_at_specific_hour(self, mocked_utc_now, mocked_utc_now_2): # let's pretend the clock is 09:00 and try to run this # the first time, then nothing should happen config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.FooBackfillJob|1d|10:00' ) # Pretend it's 09:00 UTC def mock_utc_now(): n = utc_now() return n.replace(hour=9, minute=0) mocked_utc_now.side_effect = mock_utc_now mocked_utc_now_2.side_effect = mock_utc_now with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() # if it never ran, no json_file would have been created structure = self._load_structure() ok_(not structure) infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] assert len(infos) == 0, infos # Pretend it's now 10:30 UTC def mock_utc_now_2(): n = utc_now() return n.replace(hour=10, minute=30) mocked_utc_now.side_effect = mock_utc_now_2 mocked_utc_now_2.side_effect = mock_utc_now_2 with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() structure = self._load_structure() ok_(structure) information = structure['foo-backfill'] assert not information['last_error'] eq_( information['first_run'].strftime('%H:%M'), '10:30' ) eq_( information['last_run'].strftime('%H:%M'), '10:30' ) eq_( information['last_success'].strftime('%H:%M'), '10:30' ) eq_( information['next_run'].strftime('%H:%M'), '10:00' ) infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] assert len(infos) == 1, infos # Pretend it's now 1 day later def mock_utc_now_3(): n = utc_now() n = n.replace(hour=10, minute=30) return n + datetime.timedelta(days=1) mocked_utc_now.side_effect = mock_utc_now_3 mocked_utc_now_2.side_effect = mock_utc_now_3 with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() structure = self._load_structure() ok_(structure) information = structure['foo-backfill'] assert not information['last_error'] eq_( information['first_run'].strftime('%H:%M'), '10:30' ) eq_( information['last_run'].strftime('%H:%M'), '10:30' ) eq_( information['last_success'].strftime('%H:%M'), '10:00' ) eq_( information['next_run'].strftime('%H:%M'), '10:00' ) infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] assert len(infos) == 2, infos def test_execute_postgres_based_job(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.PostgresSampleJob|1d' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() config.logger.info.assert_called_with('Ran PostgresSampleJob') structure = self._load_structure() assert structure['sample-pg-job'] ok_(not structure['sample-pg-job']['last_error']) def test_execute_postgres_transaction_managed_job(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.' 'PostgresTransactionSampleJob|1d' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() (config.logger.info .assert_called_with('Ran PostgresTransactionSampleJob')) structure = self._load_structure() assert structure['sample-transaction-pg-job'] ok_( not structure['sample-transaction-pg-job']['last_error'] ) def test_execute_failing_postgres_based_job(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.BrokenPostgresSampleJob|1d' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] ok_('Ran PostgresSampleJob' not in infos) information = tab.job_state_database['broken-pg-job'] ok_(information['last_error']) ok_( 'ProgrammingError' in information['last_error']['type'] ) def test_execute_failing_postgres_transaction_managed_job(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.' 'BrokenPostgresTransactionManagedSampleJob|1d' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] ok_('Ran PostgresTransactionSampleJob' not in infos) information = \ tab.job_state_database['broken-transaction-managed-pg-job'] ok_(information['last_error']) ok_( 'ProgrammingError' in information['last_error']['type'] ) def test_own_required_config_job(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber' '.OwnRequiredConfigSampleJob|1d' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] ok_( 'Ran OwnRequiredConfigSampleJob(%r)' % 'bugz.mozilla.org' in infos ) def test_own_required_config_job_overriding_config(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber' '.OwnRequiredConfigSampleJob|1d', extra_value_source={ 'crontabber.class-OwnRequiredConfigSampleJob.bugsy_url': 'bugs.peterbe.com' } ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] ok_( 'Ran OwnRequiredConfigSampleJob(%r)' % 'bugs.peterbe.com' in infos ) def test_automatic_backfill_basic_job(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.FooBackfillJob|1d' ) def fmt(d): return d.split('.')[0] # first just run it as is with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() structure = self._load_structure() information = structure['foo-backfill'] eq_(information['first_run'], information['last_run']) # last_success might be a few microseconds off self.assertAlmostEqual( information['last_run'], information['last_success'] ) ok_(not information['last_error']) infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] eq_(len(infos), 1) # now, pretend the last 2 days have failed interval = datetime.timedelta(days=2) state = tab.job_state_database['foo-backfill'] state['first_run'] -= interval state['last_success'] -= interval state = self._wind_clock(state, days=1) tab.job_state_database['foo-backfill'] = state tab.run_all() previous_infos = infos infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] infos = [x for x in infos if x not in previous_infos] infos.sort() # last success was 2 days ago plus today assert len(infos) == 3 today = utc_now() yesterday = today - datetime.timedelta(days=1) day_before_yesterday = today - datetime.timedelta(days=2) for each in (today, yesterday, day_before_yesterday): formatted = each.strftime('%Y-%m-%d') ok_( [x for x in infos if formatted in x] ) def test_backfilling_failling_midway(self): """ this test simulates when you have something like this: Monday: Success Tuesday: Failure Wednesday: Failure Thursday: today! When encountering this on the Thursday it will run (in order): Tuesday, Wednesday, Thursday Suppose then that something goes wrong on the Wednesday. Then, if so, we don't want to run Tueday again and Thursday shouldn't even be attempted. """ config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber' '.CertainDayHaterBackfillJob|1d' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() app_name = CertainDayHaterBackfillJob.app_name # now, pretend the last 2 days have failed interval = datetime.timedelta(days=2) state = tab.job_state_database[app_name] state['first_run'] -= interval state['last_success'] -= interval self._wind_clock(state, days=1) tab.job_state_database[app_name] = state CertainDayHaterBackfillJob.fail_on = ( tab.job_state_database[app_name]['first_run'] + interval ) first_last_success = \ tab.job_state_database[app_name]['last_success'] tab.run_all() # now, we expect the new last_success to be 1 day more new_last_success = tab.job_state_database[app_name]['last_success'] eq_((new_last_success - first_last_success).days, 1) def test_backfilling_postgres_based_job(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.PGBackfillJob|1d' ) def fmt(d): return d.split('.')[0] # first just run it as is with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() structure = self._load_structure() information = structure['pg-backfill'] # app_name of PGBackfillJob # Note, these are strings of dates eq_(information['first_run'], information['last_run']) # last_success might be a few microseconds off self.assertAlmostEqual( information['last_run'], information['last_success'] ) ok_(not information['last_error']) infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] eq_(len(infos), 1) # now, pretend the last 2 days have failed interval = datetime.timedelta(days=2) state = tab.job_state_database['pg-backfill'] state['first_run'] -= interval state['last_success'] -= interval self._wind_clock(state, days=1) tab.job_state_database['pg-backfill'] = state tab.run_all() previous_infos = infos infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] infos = [x for x in infos if x not in previous_infos] infos.sort() # last success was 2 days ago plus today assert len(infos) == 3 today = utc_now() yesterday = today - datetime.timedelta(days=1) day_before_yesterday = today - datetime.timedelta(days=2) for each in (today, yesterday, day_before_yesterday): formatted = each.strftime('%Y-%m-%d') ok_( [x for x in infos if formatted in x] ) def test_run_with_excess_whitespace(self): # this test asserts a found bug where excess newlines # caused configuration exceptions config_manager = self._setup_config_manager( '\n \n' ' crontabber.tests.test_crontabber.BasicJob|7d\n\t \n' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() structure = self._load_structure() information = structure['basic-job'] ok_(information['last_success']) ok_(not information['last_error']) def test_commented_out_jobs_from_option(self): config_manager = self._setup_config_manager(''' crontabber.tests.test_crontabber.FooJob|3d # crontabber.tests.test_crontabber.BarJob|4d ''') with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() structure = self._load_structure() ok_('foo' in structure) ok_('bar' not in structure) eq_(structure.keys(), ['foo']) # the reason we need to mock both is because both # app.CronTabber and crontabber.base imports utc_now @mock.patch('crontabber.app.utc_now') @mock.patch('crontabber.base.utc_now') @mock.patch('time.sleep') def test_backfilling_with_configured_time_slow_job(self, time_sleep, mocked_utc_now, mocked_utc_now_2): """ see https://bugzilla.mozilla.org/show_bug.cgi?id=781010 What we're simulating here is that the time when we get around to run this particular job is variable. It's configured to run at 18:00 but the first time it doesn't get around to running it until 18:02:00. For example, crontabber kicks in at 18:00:00 but it takes 2 minutes to run something before this job. The next day, the jobs before this one only takes 1 minute which means we get around to this job at 18:01:00 instead. If that's the case it should correct the hour/minute part so that the backfilling doesn't think 24 hours hasn't gone since the last time. Phew! """ config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.SlowBackfillJob|1d|18:00' ) SlowBackfillJob.times_used = [] _extra_time = [] def mocked_sleep(seconds): _extra_time.append(datetime.timedelta(seconds=seconds)) now_time = utc_now() now_time = now_time.replace(hour=18, minute=2, second=0) def mock_utc_now(): n = now_time for e in _extra_time: n += e return n time_sleep.side_effect = mocked_sleep mocked_utc_now.side_effect = mock_utc_now mocked_utc_now_2.side_effect = mock_utc_now with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() assert len(SlowBackfillJob.times_used) == 1 _dates_used = [x.strftime('%d') for x in SlowBackfillJob.times_used] assert len(set(_dates_used)) == 1 structure = self._load_structure() information = structure['slow-backfill'] eq_( information['next_run'].strftime('%H:%M:%S'), '18:00:00' ) eq_( information['first_run'].strftime('%H:%M:%S'), '18:02:00' ) eq_( information['last_run'].strftime('%H:%M:%S'), '18:02:00' ) eq_( information['last_success'].strftime('%H:%M:%S'), '18:02:00' ) eq_( app.utc_now().strftime('%H:%M:%S'), '18:02:01' ) # a day goes by... _extra_time.append(datetime.timedelta(days=1)) # but this time, the crontab wakes up a minute earlier now_time = now_time.replace(minute=1) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() assert len(SlowBackfillJob.times_used) == 2 _dates_used = [x.strftime('%d') for x in SlowBackfillJob.times_used] assert len(set(_dates_used)) == 2 structure = self._load_structure() information = structure['slow-backfill'] eq_( information['next_run'].strftime('%H:%M:%S'), '18:00:00' ) eq_( information['last_run'].strftime('%H:%M:%S'), '18:01:01' ) eq_( information['last_success'].strftime('%H:%M:%S'), '18:00:00' ) @mock.patch('crontabber.app.utc_now') @mock.patch('crontabber.base.utc_now') @mock.patch('time.sleep') def test_slow_backfilled_timed_daily_job(self, time_sleep, mocked_utc_now, mocked_utc_now_2): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.SlowBackfillJob|1d|10:00' ) SlowBackfillJob.times_used = [] _extra_time = [] def mocked_sleep(seconds): _extra_time.append(datetime.timedelta(seconds=seconds)) # pretend it's 11AM UTC def mock_utc_now(): n = utc_now() n = n.replace(hour=11) for e in _extra_time: n += e return n time_sleep.side_effect = mocked_sleep mocked_utc_now.side_effect = mock_utc_now mocked_utc_now_2.side_effect = mock_utc_now with config_manager.context() as config: tab = app.CronTabber(config) time_before = app.utc_now() tab.run_all() eq_(len(SlowBackfillJob.times_used), 1) time_after = app.utc_now() # double-checking assert (time_after - time_before).seconds == 1 structure = self._load_structure() information = structure['slow-backfill'] ok_(information['last_success']) ok_(not information['last_error']) # easy eq_( information['next_run'].strftime('%H:%M:%S'), '10:00:00' ) eq_(information['first_run'], information['last_run']) # pretend one day passes _extra_time.append(datetime.timedelta(days=1)) time_later = app.utc_now() assert (time_later - time_after).days == 1 assert (time_later - time_after).seconds == 0 assert (time_later - time_before).days == 1 assert (time_later - time_before).seconds == 1 tab.run_all() eq_(len(SlowBackfillJob.times_used), 2) structure = self._load_structure() information = structure['slow-backfill'] # another day passes _extra_time.append(datetime.timedelta(days=1)) # also, simulate that it starts a second earlier this time _extra_time.append(-datetime.timedelta(seconds=1)) tab.run_all() assert len(SlowBackfillJob.times_used) == 3 structure = self._load_structure() information = structure['slow-backfill'] @mock.patch('crontabber.base.utc_now') @mock.patch('crontabber.app.utc_now') @mock.patch('time.sleep') def test_slow_backfilled_timed_daily_job_first_failure(self, time_sleep, mocked_utc_now, mocked_utc_now_2): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.SlowBackfillJob|1d|10:00' ) SlowBackfillJob.times_used = [] _extra_time = [] def mocked_sleep(seconds): _extra_time.append(datetime.timedelta(seconds=seconds)) # pretend it's 11AM UTC def mock_utc_now(): n = utc_now() n = n.replace(hour=11) for e in _extra_time: n += e return n time_sleep.side_effect = mocked_sleep mocked_utc_now.side_effect = mock_utc_now mocked_utc_now_2.side_effect = mock_utc_now with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() eq_(len(SlowBackfillJob.times_used), 1) state = tab.job_state_database['slow-backfill'] del state['last_success'] tab.job_state_database['slow-backfill'] = state _extra_time.append(datetime.timedelta(days=1)) _extra_time.append(-datetime.timedelta(seconds=1)) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() eq_(len(SlowBackfillJob.times_used), 2) def test_reset_job(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.BasicJob|1d\n' 'crontabber.tests.test_crontabber.FooJob|1d' ) BasicJob.times_used = [] with config_manager.context() as config: tab = app.CronTabber(config) config['reset-job'] = 'never-heard-of' assert_raises( app.JobNotFoundError, tab.main, ) config['reset-job'] = 'basic-job' assert tab.main() == 0 config.logger.warning.assert_called_with('App already reset') # run them config['reset-job'] = None assert tab.main() == 0 eq_(len(BasicJob.times_used), 1) structure = self._load_structure() assert 'basic-job' in structure config['reset-job'] = 'basic-job' assert tab.main() == 0 config.logger.info.assert_called_with('App reset') structure = self._load_structure() ok_('basic-job' not in structure) def test_nagios_ok(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.BasicJob|1d\n' 'crontabber.tests.test_crontabber.FooJob|1d' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() stream = StringIO() exit_code = tab.nagios(stream=stream) eq_(exit_code, 0) eq_(stream.getvalue(), 'OK - All systems nominal\n') def test_nagios_warning(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.BasicJob|1d\n' 'crontabber.tests.test_crontabber.BackfillbasedTrouble|1d' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() stream = StringIO() exit_code = tab.nagios(stream=stream) eq_(exit_code, 1) output = stream.getvalue() ok_('WARNING' in output) ok_('backfill-trouble' in output) ok_('BackfillbasedTrouble' in output) ok_('NameError' in output) ok_('bla bla' in output) # run it a second time # wind the clock forward state = tab.job_state_database['backfill-trouble'] self._wind_clock(state, days=1) tab.job_state_database['backfill-trouble'] = state state = tab.job_state_database['basic-job'] self._wind_clock(state, days=1) tab.job_state_database['basic-job'] = state # this forces in crontabber instance to reload the JSON file tab._job_state_database = None tab.run_all() stream = StringIO() exit_code = tab.nagios(stream=stream) eq_(exit_code, 2) output = stream.getvalue() ok_('CRITICAL' in output) ok_('backfill-trouble' in output) ok_('BackfillbasedTrouble' in output) ok_('NameError' in output) ok_('bla bla' in output) def test_nagios_critical(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.BasicJob|1d\n' 'crontabber.tests.test_crontabber.TroubleJob|1d' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() stream = StringIO() exit_code = tab.nagios(stream=stream) eq_(exit_code, 2) output = stream.getvalue() ok_('CRITICAL' in output) ok_('trouble' in output) ok_('TroubleJob' in output) ok_('NameError' in output) ok_('Trouble!!' in output) def test_nagios_multiple_messages(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.TroubleJob|1d\n' 'crontabber.tests.test_crontabber.MoreTroubleJob|1d' ) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() stream = StringIO() exit_code = tab.nagios(stream=stream) eq_(exit_code, 2) output = stream.getvalue() eq_(len(output.strip().splitlines()), 1) eq_(output.count('CRITICAL'), 1) ok_('trouble' in output) ok_('more-trouble' in output) ok_('TroubleJob' in output) ok_('MoreTroubleJob' in output) ok_('NameError' in output) ok_('Trouble!!' in output) def test_print_version(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.BasicJob|1d\n' 'crontabber.tests.test_crontabber.FooJob|1d' ) with config_manager.context() as config: tab = app.CronTabber(config) #tab.run_all() stream = StringIO() tab.print_version(stream=stream) eq_('%s\n' % __version__, stream.getvalue()) def test_reorder_dag_on_joblist(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.FooBarJob|1d\n' 'crontabber.tests.test_crontabber.BarJob|1d\n' 'crontabber.tests.test_crontabber.FooJob|1d' ) # looking at the dependencies, since FooJob doesn't depend on anything # it should be run first, then BarJob and lastly FooBarJob because # FooBarJob depends on FooJob and BarJob. with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() structure = self._load_structure() ok_('foo' in structure) ok_('bar' in structure) ok_('foobar' in structure) ok_( structure['foo']['last_run'] < structure['bar']['last_run'] < structure['foobar']['last_run'] ) def test_retry_errors_sooner(self): """ FooBarBackfillJob depends on FooBackfillJob and BarBackfillJob BarBackfillJob depends on FooBackfillJob FooBackfillJob doesn't depend on anything We'll want to pretend that BarBackfillJob (second to run) fails and notice that FooBarBackfillJob won't run. Then we wind the clock forward 5 minutes and run all again, this time, the FooBackfillJob shouldn't need to run but BarBackfillJob and FooBackfillJob should both run twice """ config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.BarBackfillJob|1d\n' 'crontabber.tests.test_crontabber.FooBackfillJob|1d\n' 'crontabber.tests.test_crontabber.FooBarBackfillJob|1d', extra_value_source={ # crontabber already has a good default for this but by # being explict like this we not only show that it can be # changed, we also make it clear what the unit test is # supposed to do. 'crontabber.error_retry_time': '3600' # 1 hour } ) # first we need to hack-about so that BarBackfillJob fails only # once. class SomeError(Exception): pass def nosy_run(self, date): dates_used[self.__class__].append(date) if self.__class__ == BarBackfillJob: if len(dates_used[self.__class__]) == 1: # first time run, simulate trouble raise SomeError("something went wrong") return originals[self.__class__](self, date) classes = BarBackfillJob, FooBackfillJob, FooBarBackfillJob originals = {} dates_used = collections.defaultdict(list) for klass in classes: originals[klass] = klass.run klass.run = nosy_run try: with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() eq_(len(dates_used[FooBackfillJob]), 1) eq_(len(dates_used[FooBackfillJob]), 1) # never gets there because dependency fails eq_(len(dates_used[FooBarBackfillJob]), 0) structure = self._load_structure() assert structure['foo-backfill'] assert not structure['foo-backfill']['last_error'] next_date = utc_now() + datetime.timedelta(days=1) self.assertAlmostEqual( next_date, structure['foo-backfill']['next_run'] ) assert structure['bar-backfill'] assert structure['bar-backfill']['last_error'] next_date = utc_now() + datetime.timedelta(hours=1) self.assertAlmostEqual( next_date, structure['bar-backfill']['next_run'] ) assert 'foobar-backfill' not in structure # Now, let the magic happen, we pretend time passes by 2 hours # and run all jobs again combined_state = tab.job_state_database.copy() self._wind_clock(combined_state, hours=2) tab.job_state_database.update(combined_state) # here, we go two hours later tab.run_all() # Here's the magic sauce! The FooBarBackfillJob had to wait # two hours to run after FooBackfillJob but it should # have been given the same date input as when FooBackfillJob # ran. eq_(len(dates_used[FooBackfillJob]), 1) eq_(len(dates_used[FooBackfillJob]), 1) eq_(len(dates_used[FooBarBackfillJob]), 1) # use this formatter so that we don't have to compare # datetimes with microseconds format = lambda x: x.strftime('%Y%m%d %H:%M %Z') eq_( format(dates_used[FooBackfillJob][0]), format(dates_used[FooBarBackfillJob][0]) ) # also check the others eq_( format(dates_used[BarBackfillJob][0]), format(dates_used[FooBarBackfillJob][0]) ) structure = self._load_structure() ok_(structure['foo-backfill']) ok_(not structure['foo-backfill']['last_error']) ok_(structure['bar-backfill']) ok_(not structure['bar-backfill']['last_error']) ok_(structure['foobar-backfill']) ok_(not structure['foobar-backfill']['last_error']) finally: for klass in classes: klass.run = originals[klass] @mock.patch('raven.Client') def test_sentry_sending(self, raven_client_mocked): FAKE_DSN = 'https://24131e9070324cdf99d@errormill.mozilla.org/XX' config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.TroubleJob|7d', extra_value_source={ 'sentry.dsn': FAKE_DSN, } ) get_ident_calls = [] def fake_get_ident(exception): get_ident_calls.append(exception) return '123456789' mocked_client = mock.MagicMock() mocked_client.get_ident.side_effect = fake_get_ident def fake_client(dsn): assert dsn == FAKE_DSN return mocked_client raven_client_mocked.side_effect = fake_client with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() config.logger.info.assert_any_call( 'Error captured in Sentry. Reference: 123456789', ) structure = self._load_structure() assert structure['trouble']['last_error'] ok_(get_ident_calls) @mock.patch('raven.Client') def test_sentry_failing(self, raven_client_mocked): FAKE_DSN = 'https://24131e9070324cdf99d@errormill.mozilla.org/XX' config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.TroubleJob|7d', extra_value_source={ 'sentry.dsn': FAKE_DSN, } ) def fake_get_ident(exception): raise NameError('waldo') mocked_client = mock.MagicMock() mocked_client.get_ident.side_effect = fake_get_ident def fake_client(dsn): assert dsn == FAKE_DSN return mocked_client raven_client_mocked.side_effect = fake_client with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() config.logger.debug.assert_any_call( 'Failed to capture and send error to Sentry', exc_info=True ) structure = self._load_structure() assert structure['trouble']['last_error'] def test_postgres_job(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber.PostgresSampleJob|1d' ) cur = self.conn.cursor() cur.execute('select * from test_cron_victim') ok_(not cur.fetchall()) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] ok_('Ran PostgresSampleJob' in infos) cur = self.conn.cursor() cur.execute('select * from test_cron_victim') ok_(cur.fetchall()) structure = self._load_structure() assert structure information = structure['sample-pg-job'] ok_(information['next_run']) ok_(information['last_run']) ok_(information['first_run']) ok_(not information.get('last_error')) def test_postgres_job_with_broken(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber' '.BrokenPostgresSampleJob|1d\n' 'crontabber.tests.test_crontabber' '.PostgresSampleJob|1d' ) cur = self.conn.cursor() cur.execute('select * from test_cron_victim') ok_(not cur.fetchall()) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] ok_('Ran PostgresSampleJob' in infos) cur = self.conn.cursor() cur.execute('select * from test_cron_victim') # Note! The BrokenPostgresSampleJob actually does an insert first # before it raises the ProgrammingError. The following test # makes sure to test that the rollback of the transaction works eq_(len(cur.fetchall()), 1) out = StringIO() tab.list_jobs(stream=out) output = out.getvalue() outputs = {} for block in re.split('={5,80}', output)[1:]: key = re.findall('App name:\s+([\w-]+)', block)[0] outputs[key] = block ok_('Error' in outputs['broken-pg-job']) ok_('ProgrammingError' in outputs['broken-pg-job']) ok_('Error' not in outputs['sample-pg-job']) def test_postgres_job_with_backfill_basic(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber' '.PostgresBackfillSampleJob|1d' ) cur = self.conn.cursor() cur.execute('select * from test_cron_victim') ok_(not cur.fetchall()) with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] eq_(len(infos), 1) cur = self.conn.cursor() cur.execute('select * from test_cron_victim') ok_(cur.fetchall()) def test_postgres_job_with_backfill_3_days_back(self): config_manager = self._setup_config_manager( 'crontabber.tests.test_crontabber' '.PostgresBackfillSampleJob|1d' ) def fmt(d): wo_microseconds = d.split('.')[0] # because it has happened, it can happen again. # the number of microseconds between 'last_run' and 'last_success' # can be so many it rounds to a different second, so let's drop # the last second too return wo_microseconds[:-1] # first just run it as is with config_manager.context() as config: tab = app.CronTabber(config) tab.run_all() cur = self.conn.cursor() cur.execute('select count(*) from test_cron_victim') count, = cur.fetchall()[0] eq_(count, 1) structure = self._load_structure() app_name = PostgresBackfillSampleJob.app_name information = structure[app_name] # Note, these are strings of dates eq_(information['first_run'], information['last_run']) # last_success might be a few microseconds off self.assertAlmostEqual( information['last_run'], information['last_success'] ) ok_(not information['last_error']) infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] eq_(len(infos), 1) # now, pretend the last 2 days have failed interval = datetime.timedelta(days=2) state = tab.job_state_database[app_name] state['first_run'] -= interval state['last_success'] -= interval self._wind_clock(state, days=1) tab.job_state_database[app_name] = state tab.run_all() previous_infos = infos infos = [x[0][0] for x in config.logger.info.call_args_list] infos = [x for x in infos if x.startswith('Ran ')] infos = [x for x in infos if x not in previous_infos] infos.sort() # last success was 2 days ago plus today assert len(infos) == 3 cur.execute('select time from test_cron_victim') records = cur.fetchall() eq_(len(records), 4) today = utc_now() yesterday = today - datetime.timedelta(days=1) day_before_yesterday = today - datetime.timedelta(days=2) for each in (today, yesterday, day_before_yesterday): formatted = each.strftime('%Y-%m-%d') ok_([x for x in infos if formatted in x]) # ============================================================================= # Various mock jobs that the tests depend on class _Job(base.BaseCronApp): def run(self): assert self.app_name self.config.logger.info("Ran %s" % self.__class__.__name__) @with_postgres_transactions() @with_postgres_connection_as_argument() class _PGJob(_Job): def run(self, connection): _Job.run(self) @with_postgres_transactions() @with_single_postgres_transaction() class _PGTransactionManagedJob(_Job): def run(self, connection): _Job.run(self) class BasicJob(_Job): app_name = 'basic-job' times_used = [] def run(self): self.times_used.append(1) super(BasicJob, self).run() class FooJob(_Job): app_name = 'foo' class BarJob(_Job): app_name = 'bar' depends_on = 'foo' class FooBarJob(_Job): app_name = 'foobar' depends_on = ('foo', 'bar') class SlowJob(_Job): # an app that takes a whole second to run app_name = 'slow-job' def run(self): time.sleep(1) # time.sleep() is a mock function by the way super(SlowJob, self).run() class TroubleJob(_Job): app_name = 'trouble' def run(self): super(TroubleJob, self).run() raise NameError("Trouble!!") class MoreTroubleJob(TroubleJob): app_name = 'more-trouble' class SadJob(_Job): app_name = 'sad' depends_on = 'trouble', # <-- note: a tuple class PostgresSampleJob(_PGJob): app_name = 'sample-pg-job' def run(self, connection): cursor = connection.cursor() cursor.execute('INSERT INTO test_cron_victim (time) VALUES (now())') # need this because this is not a TransactionManaged subclass cursor.execute('COMMIT') super(PostgresSampleJob, self).run(connection) class PostgresTransactionSampleJob(_PGTransactionManagedJob): app_name = 'sample-transaction-pg-job' def run(self, connection): cursor = connection.cursor() cursor.execute('INSERT INTO test_cron_victim (time) VALUES (now())') super(PostgresTransactionSampleJob, self).run(connection) class BrokenPostgresSampleJob(_PGJob): app_name = 'broken-pg-job' def run(self, connection): cursor = connection.cursor() cursor.execute('INSERT INTO test_cron_victim (time) VALUES (now())') raise psycopg2.ProgrammingError("Egads!") class BrokenPostgresTransactionManagedSampleJob(_PGTransactionManagedJob): app_name = 'broken-transaction-managed-pg-job' def run(self, connection): cursor = connection.cursor() cursor.execute('INSERT INTO test_cron_victim (time) VALUES (now())') raise psycopg2.ProgrammingError("Egads!") class OwnRequiredConfigSampleJob(_Job): app_name = 'bugsy' app_description = 'has its own config' required_config = Namespace() required_config.add_option( 'bugsy_url', default='bugz.mozilla.org' ) def run(self): self.config.logger.info( "Ran %s(%r)" % (self.__class__.__name__, self.config.bugsy_url) ) @as_backfill_cron_app class _BackfillJob(_Job): def run(self, date): assert isinstance(date, datetime.datetime) assert self.app_name self.config.logger.info( "Ran %s(%s, %s)" % (self.__class__.__name__, date, id(date)) ) class FooBackfillJob(_BackfillJob): app_name = 'foo-backfill' class BarBackfillJob(_BackfillJob): app_name = 'bar-backfill' depends_on = 'foo-backfill' class FooBarBackfillJob(_BackfillJob): app_name = 'foobar-backfill' depends_on = ('foo-backfill', 'bar-backfill') class BackfillbasedTrouble(_BackfillJob): app_name = 'backfill-trouble' def run(self, date): raise NameError('bla bla') class CertainDayHaterBackfillJob(_BackfillJob): app_name = 'certain-day-hater-backfill' fail_on = None def run(self, date): if ( self.fail_on and date.strftime('%m%d') == self.fail_on.strftime('%m%d') ): raise Exception("bad date!") class SlowBackfillJob(_BackfillJob): app_name = 'slow-backfill' times_used = [] def run(self, date): self.times_used.append(date) time.sleep(1) super(SlowBackfillJob, self).run(date) @with_postgres_transactions() @with_postgres_connection_as_argument() @as_backfill_cron_app class PGBackfillJob(_Job): app_name = 'pg-backfill' def run(self, connection, date): assert isinstance(date, datetime.datetime) assert self.app_name # The reason for using `id(date)` is because of the way the tests # winds back the clock from the previous last_success # so that: # 2012-04-27 17:13:56.700184+00:00 # becomes: # 2012-04-24 17:13:56.700184+00:00 # And since the winding back in the test is "unnatural" the numbers # in the dates are actually the same but the instances are different self.config.logger.info( "Ran %s(%s, %r)" % (self.__class__.__name__, date, id(date)) ) @with_postgres_transactions() @with_postgres_connection_as_argument() @as_backfill_cron_app class PostgresBackfillSampleJob(_Job): app_name = 'sample-pg-job-backfill' def run(self, connection, date): cursor = connection.cursor() cursor.execute('INSERT INTO test_cron_victim (time) VALUES (%s)', (date.strftime('%Y-%m-%d %H:%M:%S'),)) # need this because this is not a TransactionManaged subclass cursor.execute('COMMIT') self.config.logger.info( "Ran %s(%s, %r)" % (self.__class__.__name__, date, id(date)) )
milinbhakta/flaskjinja
refs/heads/master
flask1/Lib/site-packages/wheel/test/test_wheelfile.py
238
import wheel.install import hashlib try: from StringIO import StringIO except ImportError: from io import BytesIO as StringIO import zipfile import pytest def test_verifying_zipfile(): if not hasattr(zipfile.ZipExtFile, '_update_crc'): pytest.skip('No ZIP verification. Missing ZipExtFile._update_crc.') sio = StringIO() zf = zipfile.ZipFile(sio, 'w') zf.writestr("one", b"first file") zf.writestr("two", b"second file") zf.writestr("three", b"third file") zf.close() # In default mode, VerifyingZipFile checks the hash of any read file # mentioned with set_expected_hash(). Files not mentioned with # set_expected_hash() are not checked. vzf = wheel.install.VerifyingZipFile(sio, 'r') vzf.set_expected_hash("one", hashlib.sha256(b"first file").digest()) vzf.set_expected_hash("three", "blurble") vzf.open("one").read() vzf.open("two").read() try: vzf.open("three").read() except wheel.install.BadWheelFile: pass else: raise Exception("expected exception 'BadWheelFile()'") # In strict mode, VerifyingZipFile requires every read file to be # mentioned with set_expected_hash(). vzf.strict = True try: vzf.open("two").read() except wheel.install.BadWheelFile: pass else: raise Exception("expected exception 'BadWheelFile()'") vzf.set_expected_hash("two", None) vzf.open("two").read() def test_pop_zipfile(): sio = StringIO() zf = wheel.install.VerifyingZipFile(sio, 'w') zf.writestr("one", b"first file") zf.writestr("two", b"second file") zf.close() try: zf.pop() except RuntimeError: pass # already closed else: raise Exception("expected RuntimeError") zf = wheel.install.VerifyingZipFile(sio, 'a') zf.pop() zf.close() zf = wheel.install.VerifyingZipFile(sio, 'r') assert len(zf.infolist()) == 1
KNNSpeed/hockeylauncher
refs/heads/master
Adafruit-Motor-HAT-Python-Library/build/lib.linux-armv6l-2.7/Adafruit_MotorHAT/Adafruit_I2C.py
116
#!/usr/bin/python import re import smbus # =========================================================================== # Adafruit_I2C Class # =========================================================================== class Adafruit_I2C(object): @staticmethod def getPiRevision(): "Gets the version number of the Raspberry Pi board" # Revision list available at: http://elinux.org/RPi_HardwareHistory#Board_Revision_History try: with open('/proc/cpuinfo', 'r') as infile: for line in infile: # Match a line of the form "Revision : 0002" while ignoring extra # info in front of the revsion (like 1000 when the Pi was over-volted). match = re.match('Revision\s+:\s+.*(\w{4})$', line) if match and match.group(1) in ['0000', '0002', '0003']: # Return revision 1 if revision ends with 0000, 0002 or 0003. return 1 elif match: # Assume revision 2 if revision ends with any other 4 chars. return 2 # Couldn't find the revision, assume revision 0 like older code for compatibility. return 0 except: return 0 @staticmethod def getPiI2CBusNumber(): # Gets the I2C bus number /dev/i2c# return 1 if Adafruit_I2C.getPiRevision() > 1 else 0 def __init__(self, address, busnum=-1, debug=False): self.address = address # By default, the correct I2C bus is auto-detected using /proc/cpuinfo # Alternatively, you can hard-code the bus version below: # self.bus = smbus.SMBus(0); # Force I2C0 (early 256MB Pi's) # self.bus = smbus.SMBus(1); # Force I2C1 (512MB Pi's) self.bus = smbus.SMBus(busnum if busnum >= 0 else Adafruit_I2C.getPiI2CBusNumber()) self.debug = debug def reverseByteOrder(self, data): "Reverses the byte order of an int (16-bit) or long (32-bit) value" # Courtesy Vishal Sapre byteCount = len(hex(data)[2:].replace('L','')[::2]) val = 0 for i in range(byteCount): val = (val << 8) | (data & 0xff) data >>= 8 return val def errMsg(self): print "Error accessing 0x%02X: Check your I2C address" % self.address return -1 def write8(self, reg, value): "Writes an 8-bit value to the specified register/address" try: self.bus.write_byte_data(self.address, reg, value) if self.debug: print "I2C: Wrote 0x%02X to register 0x%02X" % (value, reg) except IOError, err: return self.errMsg() def write16(self, reg, value): "Writes a 16-bit value to the specified register/address pair" try: self.bus.write_word_data(self.address, reg, value) if self.debug: print ("I2C: Wrote 0x%02X to register pair 0x%02X,0x%02X" % (value, reg, reg+1)) except IOError, err: return self.errMsg() def writeRaw8(self, value): "Writes an 8-bit value on the bus" try: self.bus.write_byte(self.address, value) if self.debug: print "I2C: Wrote 0x%02X" % value except IOError, err: return self.errMsg() def writeList(self, reg, list): "Writes an array of bytes using I2C format" try: if self.debug: print "I2C: Writing list to register 0x%02X:" % reg print list self.bus.write_i2c_block_data(self.address, reg, list) except IOError, err: return self.errMsg() def readList(self, reg, length): "Read a list of bytes from the I2C device" try: results = self.bus.read_i2c_block_data(self.address, reg, length) if self.debug: print ("I2C: Device 0x%02X returned the following from reg 0x%02X" % (self.address, reg)) print results return results except IOError, err: return self.errMsg() def readU8(self, reg): "Read an unsigned byte from the I2C device" try: result = self.bus.read_byte_data(self.address, reg) if self.debug: print ("I2C: Device 0x%02X returned 0x%02X from reg 0x%02X" % (self.address, result & 0xFF, reg)) return result except IOError, err: return self.errMsg() def readS8(self, reg): "Reads a signed byte from the I2C device" try: result = self.bus.read_byte_data(self.address, reg) if result > 127: result -= 256 if self.debug: print ("I2C: Device 0x%02X returned 0x%02X from reg 0x%02X" % (self.address, result & 0xFF, reg)) return result except IOError, err: return self.errMsg() def readU16(self, reg, little_endian=True): "Reads an unsigned 16-bit value from the I2C device" try: result = self.bus.read_word_data(self.address,reg) # Swap bytes if using big endian because read_word_data assumes little # endian on ARM (little endian) systems. if not little_endian: result = ((result << 8) & 0xFF00) + (result >> 8) if (self.debug): print "I2C: Device 0x%02X returned 0x%04X from reg 0x%02X" % (self.address, result & 0xFFFF, reg) return result except IOError, err: return self.errMsg() def readS16(self, reg, little_endian=True): "Reads a signed 16-bit value from the I2C device" try: result = self.readU16(reg,little_endian) if result > 32767: result -= 65536 return result except IOError, err: return self.errMsg() if __name__ == '__main__': try: bus = Adafruit_I2C(address=0) print "Default I2C bus is accessible" except: print "Error accessing default I2C bus"
SlimRemix/android_external_chromium_org
refs/heads/lp5.1
third_party/markdown/extensions/meta.py
109
# markdown is released under the BSD license # Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) # Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) # Copyright 2004 Manfred Stienstra (the original version) # # 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 the <organization> 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 PYTHON MARKDOWN PROJECT ''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 ANY CONTRIBUTORS TO THE PYTHON MARKDOWN PROJECT # 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. """ 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']) >>> print md.convert(text) <p>The body. This is paragraph one.</p> >>> print 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']) >>> print md.convert(text) <pre><code>Some Code - not extra lines of meta data. </code></pre> >>> md.Meta {} Copyright 2007-2008 [Waylan Limberg](http://achinghead.com). Project website: <http://packages.python.org/Markdown/meta_data.html> Contact: markdown@freewisdom.org License: BSD (see ../LICENSE.md for details) """ from __future__ import absolute_import from __future__ import unicode_literals from . import Extension from ..preprocessors import Preprocessor import 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 (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(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() value = m1.group('value').strip() try: meta[key].append(value) except KeyError: meta[key] = [value] 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)
dwcarder/sdn-ix-demo
refs/heads/master
exabgp-3.4.3/lib/exabgp/bgp/message/update/nlri/cidr.py
3
# encoding: utf-8 """ prefix.py Created by Thomas Mangin on 2013-08-07. Copyright (c) 2009-2013 Exa Networks. All rights reserved. """ import math from exabgp.protocol.ip import IP class CIDR (object): EOR = False # we can not define slots here as otherwise it conflict in Prefix # __slots__ = ['packed','mask','_ip'] _mask_to_bytes = {} @staticmethod def size (mask): return CIDR._mask_to_bytes.get(mask,0) # have a .raw for the ip # have a .mask for the mask # have a .bgp with the bgp wire format of the prefix def __init__(self,packed,mask): self.packed = packed self.mask = mask self._ip = None def getip (self): if not self._ip: self._ip = IP.ntop(self.packed) return self._ip ip = property(getip) def __str__ (self): return self.prefix() def prefix (self): return "%s/%s" % (self.ip,self.mask) def pack (self): return chr(self.mask) + self.packed[:CIDR.size(self.mask)] def packed_ip(self): return self.packed[:CIDR.size(self.mask)] # July 2014: should never be called as it is for the RIB code only # def index (self): # return self.pack() def __len__ (self): return CIDR.size(self.mask) + 1 def __cmp__ (self,other): if not isinstance(other,self.__class__): return -1 if self.packed != other.packed: return -1 if self.mask != other.mask: return -1 return 0 def __hash__(self): return hash(chr(self.mask)+self.packed) for netmask in range(0,129): CIDR._mask_to_bytes[netmask] = int(math.ceil(float(netmask)/8))
alfa-addon/addon
refs/heads/master
plugin.video.alfa/channels/supergoku.py
1
# -*- coding: utf-8 -*- import sys import re import datetime from bs4 import BeautifulSoup from core.tmdb import Tmdb from core import httptools, scrapertools, servertools, tmdb, jsontools from core.scrapertools import unescape from core.item import Item, InfoLabels from platformcode import config, logger, platformtools from channelselector import get_thumb from lib import strptime_fix host = 'https://supergoku.com' IDIOMAS = {'VOSE': 'VOSE', 'LAT': 'Latino'} list_language = list(IDIOMAS.keys()) def mainlist(item): logger.info() itemlist = [] itemlist.append( Item( action = "newest", channel = item.channel, fanart = item.fanart, title = "Nuevos capítulos", thumbnail = get_thumb("new episodes", auto=True), ) ) itemlist.append( Item( action = "list_all", channel = item.channel, fanart = item.fanart, param = "recomended", title = "Animes recomendados", thumbnail = get_thumb("recomended", auto=True), url = host ) ) itemlist.append( Item( action = "list_all", channel = item.channel, fanart = item.fanart, param = "popular", title = "Animes populares", thumbnail = get_thumb("favorites", auto=True), url = host ) ) itemlist.append( Item( action = "list_all", channel = item.channel, fanart = item.fanart, param = "more_watched", title = "Animes mas vistos", thumbnail = get_thumb("more watched", auto=True), url = host + '/tvshows/' ) ) itemlist.append( Item( action = "list_all", channel = item.channel, fanart = item.fanart, param = "", title = "Animes", thumbnail = get_thumb("anime", auto=True), url = host + '/categoria/anime/' ) ) itemlist.append( Item( action = "list_all", channel = item.channel, fanart = item.fanart, param = "", title = "Películas", thumbnail = get_thumb("movies", auto=True), url = host + '/categoria/pelicula/' ) ) itemlist.append( Item( action = "list_all", channel = item.channel, fanart = item.fanart, param = "", title = "OVAs", thumbnail = get_thumb("anime", auto=True), url = host + '/categoria/ova/' ) ) itemlist.append( Item( action = "list_all", channel = item.channel, fanart = item.fanart, param = "", title = "ONAs", thumbnail = get_thumb("anime", auto=True), url = host + '/categoria/ona/' ) ) itemlist.append( Item( action = "list_all", channel = item.channel, fanart = item.fanart, param = "", title = "Cortos", thumbnail = get_thumb("anime", auto=True), url = host + '/categoria/corto/' ) ) itemlist.append( Item( action = "list_all", channel = item.channel, fanart = item.fanart, param = "", title = "Especiales", thumbnail = get_thumb("anime", auto=True), url = host + '/categoria/especial/' ) ) itemlist.append( Item( action = "filter_by_selection", channel = item.channel, fanart = item.fanart, param = "genres", title = "Géneros", thumbnail = get_thumb("genres", auto=True), url = host + '/tvshows/' ) ) itemlist.append( Item( action = "filter_by_selection", channel = item.channel, fanart = item.fanart, param = "airtime", title = "Filtrar por año/estado", thumbnail = get_thumb("year", auto=True), url = host + '/tvshows/' ) ) itemlist.append( Item( action = "list_all", channel = item.channel, fanart = item.fanart, param = "allanimes", title = "Todos los animes", thumbnail = get_thumb("all", auto=True), url = host + '/tvshows/' ) ) itemlist.append( Item( action = "search", channel = item.channel, fanart = item.fanart, title = "Buscar", thumbnail = get_thumb("search", auto=True), url = host + '/?s=' ) ) return itemlist def create_soup(url, post=None, headers=None): logger.info() data = httptools.downloadpage(url, post=post, headers=headers).data soup = BeautifulSoup(data, "html5lib", from_encoding="utf-8") return soup def newest(item): item.param = "newepisodes" item.url = host return list_all(item) def filter_by_selection(item): logger.info() itemlist = [] data = httptools.downloadpage(item.url).data soup = create_soup(item.url) if item.param == "genres": section = soup.find('ul', class_ = 'genres falsescroll') elif item.param == "airtime": section = soup.find('ul', class_ = 'releases falsescroll') for article in section.children: itemlist.append( Item( action = 'list_all', channel = item.channel, param = '', title = str(article.a.string), url = str(article.a['href']) ) ) return itemlist def labeler(item): logger.info() oldtitle = '' if item.contentSerieName: oldtitle = item.contentSerieName else: oldtitle = item.contentTitle # Excepción(es) por algunas cosas que TMDB suele retornar erróneamente. # Estas en particular, las retorna mal en muchos de los canales que se busca cuando no hay año correcto year_exceptions = {'(?i)Yuru Camp': '2018', '(?i)One Piece': '1999', '(?i)Shingeki no Kyojin': '2013', '(?i)Higurashi no Naku Koro ni': '2020'} title_exceptions = {'(?i)Bem': 'Bem: Become Human'} title = item.infoLabels['title'] for title_exc, title_replace in title_exceptions.items(): if scrapertools.find_single_match(title, title_exc): if item.contentTitle: item.contentTitle = title_replace if item.contentSerieName: item.contentSerieName = title_replace for title_exc, year_replace in year_exceptions.items(): if scrapertools.find_single_match(title, title_exc): item.infoLabels['year'] = year_replace tmdb.set_infoLabels(item, seekTmdb = True) if not item.infoLabels['tmdb_id']: oldcontentType = item.contentType year = item.infoLabels['year'] #---Probamos como serie pero sin el año---# item.contentTitle = '' item.contentType = 'tv' item.contentSerieName = oldtitle item.infoLabels['year'] = '' tmdb.set_infoLabels(item, seekTmdb = True) if not item.infoLabels['tmdb_id']: #---Probamos si es película en vez de serie (con año)---# item.contentSerieName = '' item.contentTitle = oldtitle item.contentType = 'movie' item.infoLabels['year'] = year item.infoLabels['filtro'] = scrapertools.find_single_match(item.fanart, '(?is)/[^/]+\.(?:jpg|png)') tmdb.set_infoLabels(item, seekTmdb = True) if not item.infoLabels['tmdb_id']: special_rubbish = ['(?is)(:.+?)'] #---Si aún no da, tratamos con casos especiales---# item.contentType = oldcontentType if oldcontentType == 'tv': item.contentSerieName = oldtitle item.contentTitle = '' else: item.contentSerieName = '' item.contentTitle = oldtitle if item.contentSerieName: for rubbish in special_rubbish: item.contentSerieName = re.sub(rubbish, '', oldtitle) tmdb.set_infoLabels(item, seekTmdb = True) if item.infoLabels['tmdb_id']: break else: #---Con título especial, probamos si es película en vez de serie---# item.contentSerieName = '' item.contentTitle = oldtitle item.contentType = 'movie' tmdb.set_infoLabels(item, seekTmdb = True) if not item.infoLabels['tmdb_id']: #---Con título especial, probamos como serie pero sin el año---# item.contentSerieName = oldtitle item.contentTitle = '' item.contentType = oldcontentType item.infoLabels['year'] = '' tmdb.set_infoLabels(item, seekTmdb = True) else: for rubbish in special_rubbish: item.contentSerieName = re.sub(rubbish, '', oldtitle) return tmdb.set_infoLabels(item, seekTmdb = True) if item.infoLabels['tmdb_id']: break else: #---Con título especial, probamos si es serie en vez de película---# item.contentSerieName = oldtitle item.contentTitle = '' item.contentType = 'tv' tmdb.set_infoLabels(item, seekTmdb = True) if not item.infoLabels['tmdb_id']: #---Con título especial, probamos como pelicula pero sin el año---# item.contentSerieName = '' item.contentTitle = oldtitle item.contentType = oldcontentType item.infoLabels['year'] = '' tmdb.set_infoLabels(item, seekTmdb = True) if not item.infoLabels['tmdb_id']: item.contentType = oldcontentType if item.contentType == 'tv': item.contentSerieName = oldtitle else: item.contentTitle = oldtitle return item def set_infoLabels_async(itemlist): import threading threads_num = config.get_setting("tmdb_threads", default=20) semaforo = threading.Semaphore(threads_num) lock = threading.Lock() r_list = list() i = 0 l_hilo = list() def sub_thread(_item, _i): semaforo.acquire() ret = labeler(_item) semaforo.release() r_list.append((_i, _item, ret)) for item in itemlist: t = threading.Thread(target = sub_thread, args = (item, i)) t.start() i += 1 l_hilo.append(t) # esperar q todos los hilos terminen for x in l_hilo: x.join() # Ordenar lista de resultados por orden de llamada para mantener el mismo orden q itemlist r_list.sort(key=lambda i: i[0]) # Reconstruir y devolver la lista solo con los resultados de las llamadas individuales return [ii[2] for ii in r_list] def process_title(old_title, getWithTags = False, get_contentTitle = False, get_lang = False): logger.info() stupid_little_things = {'(?is)[\–]+':'', '(?is)[\/]+':'', '(?is)([\(]).+?([\)])':'', '(?is)\s+\s':' ', '\(':'', '\)':''} trash = {'(?is)ova[s]?':'[OVA]', '(?is)(?:\(|\))':'', '(?is)Pelicula':'[Película]', '(?is)(Audio latino|latino)':'LAT', '(?is)Sub Español':'VOSE', '(?is)Fandub':'[Fandub]', '(?is)Mini anime':'', '(?is)(Especiales|Especial)':'[Especiales]', '(?i)\d\w\w Season':''} # title_rubbish = ['(?is)(\s?(?:19|20)\d\d)', '(?is)\s[0-9].+?\s.*?(?:Season)?'] for pattern, replacement in stupid_little_things.items(): old_title = re.sub(pattern, replacement, old_title) old_title = old_title.strip() contentTitle = old_title title = old_title langs = [] for pattern, key in list(trash.items()): if scrapertools.find_single_match(contentTitle, pattern): if key in IDIOMAS: langs.append(key) title = re.sub(pattern, '[{}]'.format(IDIOMAS[key]), contentTitle) else: title = re.sub(pattern, '[{}]'.format(key), contentTitle) contentTitle = contentTitle.replace(pattern.split(')')[1], '') contentTitle = contentTitle.strip() title = title.strip() if getWithTags and get_contentTitle and get_lang: return title, contentTitle, langs elif getWithTags and get_contentTitle: return title, contentTitle elif getWithTags and get_contentTitle: return title, langs elif getWithTags: return title else: return contentTitle def get_next_page(data): pattern = '<span class=.current.+?a href=["|\'](.+?)["|\'] class="inactive"' match = scrapertools.find_single_match(data, pattern) if match != '': return match else: return False def list_all(item): logger.info() itemlist = [] data = httptools.downloadpage(item.url).data soup = create_soup(item.url) sectionptn = '' pattern = '' matches = [] genericvalues = {'recomended': True, 'more_watched': True, 'popular': True, 'search': True, 'newepisodes': False, 'allanimes': False, '': False} #==================Fase 1: Detección de patrones==================# # Obtenemos la sección especifica (evita conflictos con regex) # # Verificamos qué parte de la función se llama # # para usar el patrón corecto (o generalizamos) # # Reciclamos patrones donde sea posible # # ===== Patrones de novedades (nuevos episodios) ===== if item.param == 'newepisodes': section = soup.find('div', class_='animation-2 items') elif genericvalues[item.param] == True: if item.param == 'recomended' or item.param == 'more_watched': if item.param == 'recomended': # == Patrones de recomendados == section = soup.find('div', id='slider-tvshows') elif item.param == 'more_watched': # == Patrones de mas vistos == section = soup.find('div', class_='items featured') elif item.param == 'popular': # == Patrones de populares == section = soup.find('div', class_='items featured') elif item.param == 'search': # == Patrones de resultados de búsqueda == section = soup.find('div', class_='search-page') elif item.param == 'allanimes': section = soup.find('div', id='archive-content') else: section = soup.find('div', class_='items') articles = section.find_all('article') for article in articles: match = [] if item.param == 'newepisodes': thumb = article.find('img', class_='lazyload')['data-src'] url = article.find('a')['href'] epnum = scrapertools.find_single_match(article.find('div', class_='epiposter').text, '\d+$') title = article.find('div', class_='data').text match = [thumb, url, epnum, title] elif genericvalues[item.param] == True: thumb = article.find('img', class_='lazyload')['data-src'] fanart = scrapertools.find_single_match(article.find('noscript'), 'src="([^"]+)') if item.param == 'recomended' or item.param == 'more_watched' or item.param == 'popular': url = article.find('a')['href'] title = article.find('div', class_='data').find('h3').text elif item.param == 'search': # == Patrones de resultados de búsqueda == url = article.find('div', class_='title').find('a')['href'] title = article.find('div', class_='title').text match = [thumb, fanart, url, title] else: # == Patrón genérico para páginas comunes == thumb = scrapertools.find_single_match(article.find('noscript').text, 'src=["\'](.+?)[\'"]') contentType = article.find('div', class_='CategoriaEnPoster').text status = article.find('div', class_='estadoposter').text url = article.find('div', class_='data').find('a')['href'] title = article.find('div', class_='data').find('h3').text airdate = '' year = '' plot = article.find('div', class_='texto').text genres = article.find('div', class_='genres') if article.find("div", class_="data"): if article.find("div", class_="data").find("span"): airdate = article.find("div", class_="data").find("span").text.strip() match = [thumb, contentType, status, url, title, airdate, year, plot, genres] matches.append(match) #==============Fase 2: Asignación de valores==============# # Como cada sección da distintos niveles de información, # # se necesita un ciclo for diferente según el caso # listitem = Item() logger.info("item.param: "+str(item.param)) # >>>> Ciclo para nuevos episodios (lleva directo a findvideos) <<<< # if item.param == "newepisodes": for scpthumb, scpurl, scpepnum, scptitle in matches: conType = '' infoLabels = {} title, contentTitle, langs = process_title(scptitle.strip(), getWithTags = True, get_contentTitle = True, get_lang = True) if scpepnum is not '': infoLabels['episode'] = int(scpepnum) conType = 'tvshow' else: conType = 'movie' # -----Casi nunca devuelve temporada, pero en raro caso que sí----- # scpseason = scrapertools.find_single_match(scpurl, 'season.(\d+)') if str(scpseason) is not None: infoLabels['season'] = scpseason else: infoLabels['season'] = None itemlist.append( Item( action = "findvideos", channel = item.channel, contentSerieName = contentTitle, contentTitle = contentTitle, contentType = conType, infoLabels = infoLabels, language = langs, title = title, thumbnail = scpthumb, url = scpurl ) ) # >>>> Ciclo para secciones similares (dan 4 variables en mismo orden) <<<< # elif genericvalues[item.param]: for scpthumb, scpfanart, scpurl, scptitle in matches: title, contentTitle, langs = process_title(scptitle.strip(), getWithTags = True, get_contentTitle = True, get_lang = True) itemlist.append( Item( action = "seasons", channel = item.channel, contentSerieName = contentTitle, contentTitle = contentTitle, contentType = 'tvshow', language = langs, title = title, thumbnail = scpthumb, url = scpurl ) ) # >>>> Ciclo para secciones genéricas (casi cualquier página fuera de la principal) <<<< # else: for scpthumb, scpcontentType, scpstatus, scpurl, scptitle, scpairdate, scpyear, scpplot, scpgenres in matches: tagged_title, title, langs = process_title(scptitle.strip(), getWithTags = True, get_contentTitle = True, get_lang = True) infoLabels = {"status": scpstatus.strip().title()} if scpairdate: date = datetime.datetime.strptime(scpairdate, "%b. %d, %Y") infoLabels['year'] = date.strftime("%Y") if scpgenres: genmatch = scpgenres.find_all('a') if len(genmatch) > 0: genre = ", ".join([x.text.strip() for x in genmatch]) infoLabels['genre'] = genre.strip() new_item = Item( action = "seasons", channel = item.channel, infoLabels = infoLabels, language = langs, param = item.param, plot = scpplot, title = tagged_title, thumbnail = scpthumb, url = scpurl ) if scpcontentType == 'pelicula' or 'pelicula' in item.url: new_item.contentType = 'movie' new_item.contentTitle = title if "date" in locals(): infoLabels['release_date'] = date.strftime("%Y/%m/%d") else: new_item.contentType = 'tv' new_item.contentSerieName = title if "date" in locals(): infoLabels['first_air_date'] = date.strftime("%Y/%m/%d") infoLabels['premiered'] = infoLabels['first_air_date'] itemlist.append(new_item) #================================Fase 3: Corrección de valores============================# #----------Corregir si es una película en vez de serie o casos raros en el título---------# #---Corregir el título según tmdb y limpiar según el contenido (si es serie o película)---# # set_infoLabels_async(itemlist) for i in itemlist: #---Quitamos números de episodio y espacios inútiles---# if i.contentType == 'movie': i.contentTitle = i.infoLabels['title'] i.contentSerieName = '' else: i.contentSerieName = i.infoLabels['title'] i.contentTitle = '' if i.infoLabels['episode']: pretext = '' if i.infoLabels['season'] is not '': pretext += 'S' + str(i.infoLabels['season']) pretext += 'E' + str(i.infoLabels['episode']) i.title = pretext + ': ' + i.title # tmdb.set_infoLabels_itemlist(itemlist, force_no_year=True) #======================Fase 4: Asignación de paginador (si aplica)======================# #---Si se encuentra otra página, se agrega un paginador (solo los items con páginas)---# if not genericvalues[item.param]: nextpage = get_next_page(data) if nextpage: itemlist.append( Item( action = 'list_all', channel = item.channel, param = item.param, title = '[COLOR=yellow]Siguiente página >[/COLOR]', url = nextpage ) ) return itemlist def seasons(item, add_to_videolibrary = False): logger.info() itemlist = [] soup = create_soup(item.url) section = soup.find('div', id='seasons') for article in section.children: if not article.find('li', class_="none"): contentType = item.contentType infoLabels = item.infoLabels title = item.title seasontitle = str(article.find('span', class_='title').contents[0]) if not infoLabels['last_air_date'] and not infoLabels['premiered']: date = article.find('span', class_='title').i.text date = datetime.datetime.strptime(date, "%b. %d, %Y") infoLabels['last_air_date'] = date.strftime("%Y/%m/%d") infoLabels['premiered'] = infoLabels['last_air_date'] if not infoLabels['plot']: plot = str(soup.find('div', id='info').find('div', class_='wp-content').p.contents[0]) if plot: infoLabels['plot'] = plot # --- Si buscamos nº de temporada y es película, devolverá la cadena 'PELI' en vez de número --- # if 'PELI' in seasontitle: contentType = 'movie' else: if 'Especial' in item.title: seasonnum = '0' else: seasonnum = scrapertools.find_single_match(seasontitle, '(?is)\s(\d+)') if seasonnum: contentType = 'tvshow' infoLabels['season'] = int(seasonnum) if int(seasonnum) == 0: title = 'Especiales de ' + item.contentSerieName else: title = 'Temporada ' + str(seasonnum) else: contentType = 'movie' itemlist.append( item.clone( action = 'episodesxseason', contentType = contentType, episode_data = str(article), infoLabels = infoLabels, title = title ) ) tmdb.set_infoLabels_itemlist(itemlist, seekTmdb = True) itemlist.reverse() # Empieza por el último capítulo, así que se revierte la lista if len(itemlist) == 1 and not add_to_videolibrary: itemlist = episodesxseason(itemlist[0], add_to_videolibrary) if len(itemlist) > 0 and config.get_videolibrary_support() and not itemlist[0].contentType == 'movie' and not add_to_videolibrary: itemlist.append( Item( action = "add_serie_to_library", channel = item.channel, contentSerieName = item.contentSerieName, extra = "episodios", title = '[COLOR yellow]{}[/COLOR]'.format(config.get_localized_string(70092)), url = item.url ) ) return itemlist def episodios(item): logger.info() itemlist = [] if not item.contentType == 'movie': seasons_list = seasons(item, True) for season in seasons_list: itemlist.extend(episodesxseason(season, True)) else: itemlist.extend(findvideos(item, True)) return itemlist def episodesxseason(item, add_to_videolibrary = False): logger.info() itemlist = [] if item.episode_data or item.param == 'pager': soup = BeautifulSoup(item.episode_data, "html5lib", from_encoding="utf-8") else: soup = create_soup(item.url) soup = soup.find('div', id='episodes') seasons = soup.find_all('div', class_='se-c') for season in seasons: seasonnum = scrapertools.find_single_match(str(season.find('span', class_='title').contents[0]), '(?is)\s(\d+)') if seasonnum: if item.infoLabels['season'] == int(seasonnum): soup = season episodes = soup.find('ul', class_='episodios') remainingitems = None if len(episodes.contents) > 30 and not add_to_videolibrary: remainingitems = BeautifulSoup('<ul class="episodios"></ul>', "html5lib", from_encoding="utf-8") remainingcount = int(len(episodes.contents) - 30) i = 0 while i < remainingcount: remainingitems.find('ul', class_='episodios').append(episodes.li.extract()) i += 1 for episode in episodes.children: contentType = item.contentType infoLabels = item.infoLabels infoLabels['title'] = '' epname = str(episode.find('div', class_='episodiotitle').a.string) epnum = scrapertools.find_single_match(epname, '(?is)(\d+)') title = str(episode.find(class_='episodiotitle').a.string) if not contentType == 'movie': if 'MOVIE' in epnum: contentType = 'movie' elif epnum: infoLabels['episode'] = int(epnum) itemlist.append( item.clone( action = 'findvideos', contentType = contentType, infoLabels = infoLabels, title = title, thumbnail = str(episode.find('img', class_='lazyload')['data-src']), url = str(episode.find(class_='episodiotitle').a['href']) ) ) itemlist.reverse() tmdb.set_infoLabels(itemlist, seekTmdb = True) for i in itemlist: if i.infoLabels['episode'] and i.infoLabels['title']: ss_and_ep = scrapertools.get_season_and_episode('{}x{}'.format(str(i.infoLabels['season']), str(i.infoLabels['episode']))) i.title = '{}: {}'.format(ss_and_ep, i.infoLabels['title']) elif i.infoLabels['episode']: ss_and_ep = scrapertools.get_season_and_episode('{}x{}'.format(str(i.infoLabels['season']), str(i.infoLabels['episode']))) i.title = '{}: {}'.format(ss_and_ep, i.title) if remainingitems: itemlist.append( item.clone( action = 'episodesxseason', episode_data = str(remainingitems), param = 'pager', title = '[COLOR=yellow]Siguiente página >[/COLOR]' ) ) if len(itemlist) == 1 and (not add_to_videolibrary or item.contentType == 'movie'): return findvideos(itemlist[0], add_to_videolibrary) else: return itemlist def findvideos(item, add_to_videolibrary = False): logger.info() itemlist = [] data = httptools.downloadpage(item.url).data base_url = '{}/wp-json/dooplayer/v1/post/'.format(host) postnum = scrapertools.find_single_match(data, '(?is)data-post=.(\d+).*?') srcsection = scrapertools.find_single_match(data, '(?is)playeroptionsul.+?</ul>') srccount = scrapertools.find_multiple_matches(srcsection, '(?is)<li .+?data-nume=["|\'](.+?)["|\']') urls = '' for i in range(len(srccount)): composed_url = '{}{}?type=tv&source={}'.format(base_url, postnum, srccount[i]) response = jsontools.load(httptools.downloadpage(composed_url).data) if not response['embed_url'].startswith('http'): response['embed_url'] = 'https:{}'.format(response['embed_url']) urls = '{}{}\n'.format(urls, response['embed_url']) temp_item = item itemlist.extend(servertools.find_video_items(item = temp_item, data = urls)) itemlist = servertools.get_servers_itemlist(itemlist, None, True) for it in itemlist: it.title = '[{}] {}'.format(it.server.title(), it.contentTitle) if len(itemlist) > 0 and config.get_videolibrary_support() and not add_to_videolibrary \ and item.contentTitle and item.contentType == 'movie': itemlist.append( Item( action = "add_pelicula_to_library", channel = item.channel, contentTitle = item.contentTitle, extra = "episodios", title = '[COLOR yellow]{}[/COLOR]'.format(config.get_localized_string(70092)), url = item.url ) ) return itemlist def search(item, text): logger.info() itemlist = [] if text != '': try: text = scrapertools.slugify(text) text = text.replace('-', '+') item.url += text item.param = "search" return list_all(item) except: for line in sys.exc_info(): logger.error("%s" % line) return itemlist
openshift/openshift-tools
refs/heads/prod
ansible/roles/lib_openshift_3.2/build/lib/user.py
13
# pylint: skip-file # pylint: disable=too-many-instance-attributes class UserConfig(object): ''' Handle user options ''' # pylint: disable=too-many-arguments def __init__(self, namespace, kubeconfig, username, full_name, ): ''' constructor for handling user options ''' self.kubeconfig = kubeconfig self.namespace = namespace self.username = username self.full_name = full_name self.data = {} self.create_dict() def create_dict(self): ''' return a user as a dict ''' self.data['apiVersion'] = 'v1' self.data['fullName'] = self.full_name self.data['groups'] = None self.data['identities'] = None self.data['kind'] = 'User' self.data['metadata'] = {} self.data['metadata']['name'] = self.username # pylint: disable=too-many-instance-attributes class User(Yedit): ''' Class to wrap the oc command line tools ''' kind = 'user' def __init__(self, content): '''User constructor''' super(User, self).__init__(content=content)
Kolyan-1/MSc-Thesis-Code
refs/heads/master
dev_profiling2.py
1
###################################### # # Nikolai Rozanov (C) 2017-Present # # nikolai.rozanov@gmail.com # ##################################### from Data.synthetic1 import blobs, gaussian, circle from Utils.plotting import plot2D, plot2,plotfunc from NP.Kernels.Kernels import GAUSSIAN_KERNEL from NP.TESTS.HSIC import HSIC, HSIC_TEST # from TESTS.TESTS import import time import numpy as np X = circle(10,0.05) gaussian_params = 0.5 #getting the Kernels k = GAUSSIAN_KERNEL(X[:,0],gaussian_params) l = GAUSSIAN_KERNEL(X[:,1],gaussian_params) #getting the HSIC measure hsic = HSIC(k,l) c = k.get_matrix() a,b = hsic.get_central_matrix() print(a) print(c) #getting the treshholds h0 = HSIC_TEST(hsic,0.05) tresh, dist = h0.get_treshold(True,1000) powerb = h0.get_tstat() powers = h0.get_tstat(True) print(powerb) print(powers) print(tresh) h0.reset(0.2,0.2) tresh, dist = h0.get_treshold(True,1000) powerb = h0.get_tstat() powers = h0.get_tstat(True) print(powerb) print(powers) print(tresh) # plotfunc(np.sort(dist))
dbckz/ansible
refs/heads/devel
lib/ansible/module_utils/pycompat24.py
90
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete work. # # Copyright (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com> # Copyright (c) 2015, Marius Gedminas # # 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. # # 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 HOLDER 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. # import sys def get_exception(): """Get the current exception. This code needs to work on Python 2.4 through 3.x, so we cannot use "except Exception, e:" (SyntaxError on Python 3.x) nor "except Exception as e:" (SyntaxError on Python 2.4-2.5). Instead we must use :: except Exception: e = get_exception() """ return sys.exc_info()[1] try: # Python 2.6+ from ast import literal_eval except ImportError: # a replacement for literal_eval that works with python 2.4. from: # https://mail.python.org/pipermail/python-list/2009-September/551880.html # which is essentially a cut/paste from an earlier (2.6) version of python's # ast.py from compiler import ast, parse from ansible.module_utils.six import binary_type, string_types, text_type def literal_eval(node_or_string): """ Safely evaluate an expression node or a string containing a Python expression. The string or node provided may only consist of the following Python literal structures: strings, numbers, tuples, lists, dicts, booleans, and None. """ _safe_names = {'None': None, 'True': True, 'False': False} if isinstance(node_or_string, string_types): node_or_string = parse(node_or_string, mode='eval') if isinstance(node_or_string, ast.Expression): node_or_string = node_or_string.node def _convert(node): # Okay to use long here because this is only for python 2.4 and 2.5 if isinstance(node, ast.Const) and isinstance(node.value, (text_type, binary_type, int, float, long, complex)): return node.value elif isinstance(node, ast.Tuple): return tuple(map(_convert, node.nodes)) elif isinstance(node, ast.List): return list(map(_convert, node.nodes)) elif isinstance(node, ast.Dict): return dict((_convert(k), _convert(v)) for k, v in node.items()) elif isinstance(node, ast.Name): if node.name in _safe_names: return _safe_names[node.name] elif isinstance(node, ast.UnarySub): return -_convert(node.expr) raise ValueError('malformed string') return _convert(node_or_string) __all__ = ('get_exception', 'literal_eval')
thispc/download-manager
refs/heads/master
module/plugins/hoster/X7To.py
7
# -*- coding: utf-8 -*- from ..internal.DeadHoster import DeadHoster class X7To(DeadHoster): __name__ = "X7To" __type__ = "hoster" __version__ = "0.46" __status__ = "stable" __pattern__ = r'http://(?:www\.)?x7\.to/' __config__ = [] # @TODO: Remove in 0.4.10 __description__ = """X7.to hoster plugin""" __license__ = "GPLv3" __authors__ = [("ernieb", "ernieb")]
LukeC92/iris
refs/heads/latest
docs/iris/src/sphinxext/generate_package_rst.py
14
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any later version. # # Iris 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 Iris. If not, see <http://www.gnu.org/licenses/>. from __future__ import (absolute_import, division, print_function) from six.moves import (filter, input, map, range, zip) # noqa import os import sys import re import inspect document_dict = { # Use autoclass for classes. 'class': ''' {object_docstring} .. .. autoclass:: {object_name} :members: :undoc-members: :inherited-members: ''', 'function': ''' .. autofunction:: {object_name} ''', # For everything else, let automodule do some magic... None: ''' .. autodata:: {object_name} '''} horizontal_sep = ''' .. raw:: html <p class="hr_p"><a href="#">&uarr;&#32&#32 top &#32&#32&uarr;</a></p> <!-- ----------- .. raw:: html --> ''' def lookup_object_type(obj): if inspect.isclass(obj): return 'class' elif inspect.isfunction(obj): return 'function' else: return None def auto_doc_module(file_path, import_name, root_package, package_toc=None, title=None): doc = r'''.. _{import_name}: {title_underline} {title} {title_underline} {sidebar} .. currentmodule:: {root_package} .. automodule:: {import_name} In this module: {module_elements} ''' if package_toc: sidebar = ''' .. sidebar:: Modules in this package {package_toc_tree} '''.format(package_toc_tree=package_toc) else: sidebar = '' try: mod = __import__(import_name) except ImportError as e: message = r'''.. error:: This module could not be imported. Some dependencies are missing:: ''' + str(e) return doc.format(title=title or import_name, title_underline='=' * len(title or import_name), import_name=import_name, root_package=root_package, sidebar=sidebar, module_elements=message) mod = sys.modules[import_name] elems = dir(mod) if '__all__' in elems: document_these = [(attr_name, getattr(mod, attr_name)) for attr_name in mod.__all__] else: document_these = [(attr_name, getattr(mod, attr_name)) for attr_name in elems if (not attr_name.startswith('_') and not inspect.ismodule(getattr(mod, attr_name)))] def is_from_this_module(arg): name = arg[0] obj = arg[1] return (hasattr(obj, '__module__') and obj.__module__ == mod.__name__) sort_order = {'class': 2, 'function': 1} # Sort them according to sort_order dict. def sort_key(arg): name = arg[0] obj = arg[1] return sort_order.get(lookup_object_type(obj), 0) document_these = filter(is_from_this_module, document_these) document_these = sorted(document_these, key=sort_key) lines = [] for element, obj in document_these: object_name = import_name + '.' + element obj_content = document_dict[lookup_object_type(obj)].format( object_name=object_name, object_name_header_line='+' * len(object_name), object_docstring=inspect.getdoc(obj)) lines.append(obj_content) lines = horizontal_sep.join(lines) module_elements = '\n'.join(' * :py:obj:`{}`'.format(element) for element, obj in document_these) lines = doc + lines return lines.format(title=title or import_name, title_underline='=' * len(title or import_name), import_name=import_name, root_package=root_package, sidebar=sidebar, module_elements=module_elements) def auto_doc_package(file_path, import_name, root_package, sub_packages): max_depth = 1 if import_name == 'iris' else 2 package_toc = '\n '.join(sub_packages) package_toc = ''' .. toctree:: :maxdepth: {:d} :titlesonly: {} '''.format(max_depth, package_toc) if '.' in import_name: title = None else: title = import_name.capitalize() + ' reference documentation' return auto_doc_module(file_path, import_name, root_package, package_toc=package_toc, title=title) def auto_package_build(app): root_package = app.config.autopackage_name if root_package is None: raise ValueError('set the autopackage_name variable in the ' 'conf.py file') if not isinstance(root_package, list): raise ValueError('autopackage was expecting a list of packages to ' 'document e.g. ["itertools"]') for package in root_package: do_package(package) def do_package(package_name): out_dir = package_name + os.path.sep # Import the root package. If this fails then an import error will be # raised. module = __import__(package_name) root_package = package_name rootdir = os.path.dirname(module.__file__) package_folder = [] module_folders = {} for root, subFolders, files in os.walk(rootdir): for fname in files: name, ext = os.path.splitext(fname) # Skip some non-relevant files. if (fname.startswith('.') or fname.startswith('#') or re.search('^_[^_]', fname) or fname.find('.svn') >= 0 or not (ext in ['.py', '.so'])): continue # Handle new shared library naming conventions if ext == '.so': name = name.split('.', 1)[0] rel_path = root_package + \ os.path.join(root, fname).split(rootdir)[-1] mod_folder = root_package + \ os.path.join(root).split(rootdir)[-1].replace('/', '.') # Only add this package to folder list if it contains an __init__ # script. if name == '__init__': package_folder.append([mod_folder, rel_path]) else: import_name = mod_folder + '.' + name mf_list = module_folders.setdefault(mod_folder, []) mf_list.append((import_name, rel_path)) if not os.path.exists(out_dir): os.makedirs(out_dir) for package, package_path in package_folder: if '._' in package or 'test' in package: continue paths = [] for spackage, spackage_path in package_folder: # Ignore this packages, packages that are not children of this # one, test packages, private packages, and packages that are # subpackages of subpackages (they'll be part of the subpackage). if spackage == package: continue if not spackage.startswith(package): continue if spackage.count('.') > package.count('.') + 1: continue if 'test' in spackage: continue split_path = spackage.rsplit('.', 2)[-2:] if any(part[0] == '_' for part in split_path): continue paths.append(os.path.join(*split_path) + '.rst') paths.extend(os.path.join(os.path.basename(os.path.dirname(path)), os.path.basename(path).split('.', 1)[0]) for imp_name, path in module_folders.get(package, [])) paths.sort() doc = auto_doc_package(package_path, package, root_package, paths) package_dir = out_dir + package.replace('.', os.path.sep) if not os.path.exists(package_dir): os.makedirs(out_dir + package.replace('.', os.path.sep)) out_path = package_dir + '.rst' if not os.path.exists(out_path): print('Creating non-existent document {} ...'.format(out_path)) with open(out_path, 'w') as fh: fh.write(doc) else: with open(out_path, 'r') as fh: existing_content = ''.join(fh.readlines()) if doc != existing_content: print('Creating out of date document {} ...'.format( out_path)) with open(out_path, 'w') as fh: fh.write(doc) for import_name, module_path in module_folders.get(package, []): doc = auto_doc_module(module_path, import_name, root_package) out_path = out_dir + import_name.replace('.', os.path.sep) + '.rst' if not os.path.exists(out_path): print('Creating non-existent document {} ...'.format( out_path)) with open(out_path, 'w') as fh: fh.write(doc) else: with open(out_path, 'r') as fh: existing_content = ''.join(fh.readlines()) if doc != existing_content: print('Creating out of date document {} ...'.format( out_path)) with open(out_path, 'w') as fh: fh.write(doc) def setup(app): app.connect('builder-inited', auto_package_build) app.add_config_value('autopackage_name', None, 'env')
Sorsly/subtle
refs/heads/master
google-cloud-sdk/platform/gsutil/third_party/rsa/rsa/__init__.py
50
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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. """RSA module Module for calculating large primes, and RSA encryption, decryption, signing and verification. Includes generating public and private keys. WARNING: this implementation does not use random padding, compression of the cleartext input to prevent repetitions, or other common security improvements. Use with care. If you want to have a more secure implementation, use the functions from the ``rsa.pkcs1`` module. """ __author__ = "Sybren Stuvel, Barry Mead and Yesudeep Mangalapilly" __date__ = "2014-02-22" __version__ = '3.1.4' from rsa.key import newkeys, PrivateKey, PublicKey from rsa.pkcs1 import encrypt, decrypt, sign, verify, DecryptionError, \ VerificationError # Do doctest if we're run directly if __name__ == "__main__": import doctest doctest.testmod() __all__ = ["newkeys", "encrypt", "decrypt", "sign", "verify", 'PublicKey', 'PrivateKey', 'DecryptionError', 'VerificationError']
lancezlin/ml_template_py
refs/heads/master
lib/python2.7/site-packages/bleach/encoding.py
32
import datetime from decimal import Decimal import types import six def is_protected_type(obj): """Determine if the object instance is of a protected type. Objects of protected types are preserved as-is when passed to force_unicode(strings_only=True). """ return isinstance(obj, ( six.integer_types + (types.NoneType, datetime.datetime, datetime.date, datetime.time, float, Decimal)) ) def force_unicode(s, encoding='utf-8', strings_only=False, errors='strict'): """ Similar to smart_text, except that lazy instances are resolved to strings, rather than kept as lazy objects. If strings_only is True, don't convert (some) non-string-like objects. """ # Handle the common case first, saves 30-40% when s is an instance of # six.text_type. This function gets called often in that setting. if isinstance(s, six.text_type): return s if strings_only and is_protected_type(s): return s try: if not isinstance(s, six.string_types): if hasattr(s, '__unicode__'): s = s.__unicode__() else: if six.PY3: if isinstance(s, bytes): s = six.text_type(s, encoding, errors) else: s = six.text_type(s) else: s = six.text_type(bytes(s), encoding, errors) else: # Note: We use .decode() here, instead of six.text_type(s, # encoding, errors), so that if s is a SafeBytes, it ends up being # a SafeText at the end. s = s.decode(encoding, errors) except UnicodeDecodeError as e: if not isinstance(s, Exception): raise UnicodeDecodeError(*e.args) else: # If we get to here, the caller has passed in an Exception # subclass populated with non-ASCII bytestring data without a # working unicode method. Try to handle this without raising a # further exception by individually forcing the exception args # to unicode. s = ' '.join([force_unicode(arg, encoding, strings_only, errors) for arg in s]) return s
Erotemic/ubelt
refs/heads/master
tests/test_import.py
1
# -*- coding: utf-8 -*- import itertools as it from os.path import join import ubelt as ub import sys import pytest from ubelt.util_import import PythonPathContext def test_import_modpath_basic(): assert 'testmod' not in sys.modules with ub.TempDir() as temp: modpath = join(temp.dpath, 'testmod.py') text = ub.codeblock( ''' a = 'value' ''') ub.writeto(modpath, text) assert temp.dpath not in sys.path module = ub.import_module_from_path(modpath) assert temp.dpath not in sys.path, 'pythonpath should remain clean' assert module.a == 'value' assert module.__file__ == modpath assert module.__name__ == 'testmod' assert 'testmod' in sys.modules def test_import_modpath_package(): assert '_tmproot373.sub1.sub2.testmod' not in sys.modules temp = ub.TempDir().start() # with ub.TempDir() as temp: if True: dpath = temp.dpath # Create a dummy package heirachy root = ub.ensuredir((dpath, '_tmproot373')) sub1 = ub.ensuredir((root, 'sub1')) sub2 = ub.ensuredir((sub1, 'sub2')) ub.touch(join(root, '__init__.py')) ub.touch(join(sub1, '__init__.py')) ub.touch(join(sub2, '__init__.py')) modpath = join(sub2, 'testmod.py') text = ub.codeblock( ''' a = 'value' ''') ub.writeto(modpath, text) assert temp.dpath not in sys.path module = ub.import_module_from_path(modpath) assert temp.dpath not in sys.path, 'pythonpath should remain clean' assert module.a == 'value' assert module.__file__ == modpath assert module.__name__ == '_tmproot373.sub1.sub2.testmod' assert '_tmproot373.sub1.sub2.testmod' in sys.modules assert '_tmproot373.sub1.sub2' in sys.modules assert '_tmproot373' in sys.modules def test_import_modname_builtin(): module = ub.import_module_from_name('ast') import ast assert module is ast def _static_modname_to_modpath(modname, **kwargs): # Calls ub.modname_to_modpath with checks had = modname in sys.modules try: modpath = ub.modname_to_modpath(modname, **kwargs) except ValueError: modpath = None if not had: assert modname not in sys.modules, ( '{} should not be imported'.format(modname)) return modpath def test_modname_to_modpath_single(): with ub.TempDir() as temp: dpath = temp.dpath # Single module single = ub.touch(join(dpath, '_tmpsingle.py')) single_main = ub.touch(join(dpath, '__main__.py')) with PythonPathContext(dpath): assert single == _static_modname_to_modpath('_tmpsingle') assert single == _static_modname_to_modpath('_tmpsingle', hide_init=True, hide_main=False) assert single == _static_modname_to_modpath('_tmpsingle', hide_init=False, hide_main=False) assert single == _static_modname_to_modpath('_tmpsingle', hide_init=False, hide_main=True) # Weird module named main not in a package assert _static_modname_to_modpath('__main__') == single_main assert _static_modname_to_modpath('__main__', hide_init=True, hide_main=False) == single_main assert _static_modname_to_modpath('__main__', hide_init=False, hide_main=False) == single_main assert _static_modname_to_modpath('__main__', hide_init=False, hide_main=True) == single_main def test_modname_to_modpath_package(): """ CommandLine: pytest testing/test_static.py::test_modname_to_modpath_package Ignore: import sys sys.path.append('/home/joncrall/code/xdoctest/testing') from test_static import * temp = ub.TempDir() temp.__enter__() sys.path.append(temp.dpath) temp.__exit__(None, None, None) """ with ub.TempDir() as temp: dpath = temp.dpath # Create a dummy package heirachy root = ub.ensuredir((dpath, '_tmproot927')) sub1 = ub.ensuredir((root, 'sub1')) sub2 = ub.ensuredir((sub1, 'sub2')) root_init = ub.touch(join(root, '__init__.py')) sub1_init = ub.touch(join(sub1, '__init__.py')) sub2_init = ub.touch(join(sub2, '__init__.py')) mod0 = ub.touch(join(root, 'mod0.py')) mod1 = ub.touch(join(sub1, 'mod1.py')) mod2 = ub.touch(join(sub2, 'mod2.py')) root_main = ub.touch(join(root, '__main__.py')) sub2_main = ub.touch(join(sub2, '__main__.py')) bad1 = ub.ensuredir((root, 'bad1')) bad2 = ub.ensuredir((sub1, 'bad2')) ub.touch(join(bad1, 'b0.py')) ub.touch(join(bad2, 'b0.py')) with PythonPathContext(dpath): # Bad module directories should return None assert _static_modname_to_modpath('_tmproot927.bad1') is None assert _static_modname_to_modpath('_tmproot927.sub1.bad1') is None assert _static_modname_to_modpath('_tmproot927.bad1.b0') is None assert _static_modname_to_modpath('_tmproot927.sub1.bad1.b1') is None assert _static_modname_to_modpath('_tmproot927.bad1') is None # package modules are accessable by the full path assert root == _static_modname_to_modpath('_tmproot927') assert sub1 == _static_modname_to_modpath('_tmproot927.sub1') assert sub2 == _static_modname_to_modpath('_tmproot927.sub1.sub2') assert mod0 == _static_modname_to_modpath('_tmproot927.mod0') assert mod1 == _static_modname_to_modpath('_tmproot927.sub1.mod1') assert mod2 == _static_modname_to_modpath('_tmproot927.sub1.sub2.mod2') # specifying a suffix will not work assert _static_modname_to_modpath('sub1') is None assert _static_modname_to_modpath('sub1.sub2') is None assert _static_modname_to_modpath('mod0') is None assert _static_modname_to_modpath('sub1.mod1') is None assert _static_modname_to_modpath('sub1.sub2.mod2') is None # Specify init if available assert root_init == _static_modname_to_modpath('_tmproot927', hide_init=False) if 1: # Test init assert _static_modname_to_modpath('_tmproot927', hide_init=False) == root_init assert _static_modname_to_modpath('_tmproot927.__init__', hide_init=False) == root_init assert _static_modname_to_modpath('_tmproot927.__main__', hide_init=False, hide_main=True) == root # Test main assert _static_modname_to_modpath('_tmproot927', hide_main=False) == root assert _static_modname_to_modpath('_tmproot927.__init__', hide_main=False) == root assert _static_modname_to_modpath('_tmproot927.__main__', hide_main=False) == root_main # Test init and main both false assert _static_modname_to_modpath('_tmproot927.__init__') == root assert _static_modname_to_modpath('_tmproot927.__main__', hide_main=True) == root # Test init and main both true assert _static_modname_to_modpath('_tmproot927', hide_init=False, hide_main=False) == root_init assert _static_modname_to_modpath('_tmproot927.__init__', hide_init=False, hide_main=False) == root_init assert _static_modname_to_modpath('_tmproot927.__main__', hide_init=False, hide_main=False) == root_main if 2: # Test in a nested directory # Test init assert _static_modname_to_modpath('_tmproot927.sub1.sub2', hide_init=False) == sub2_init assert _static_modname_to_modpath('_tmproot927.sub1.sub2.__init__', hide_init=False) == sub2_init assert _static_modname_to_modpath('_tmproot927.sub1.sub2.__main__', hide_init=False, hide_main=True) == sub2 # Test main assert _static_modname_to_modpath('_tmproot927.sub1.sub2', hide_main=False) == sub2 assert _static_modname_to_modpath('_tmproot927.sub1.sub2.__main__', hide_main=False) == sub2_main assert _static_modname_to_modpath('_tmproot927.sub1.sub2.__init__', hide_main=False) == sub2 # Test init and main both false assert _static_modname_to_modpath('_tmproot927.sub1.sub2.__init__', hide_main=True) == sub2 assert _static_modname_to_modpath('_tmproot927.sub1.sub2.__main__', hide_main=True) == sub2 # Test init and main both true assert _static_modname_to_modpath('_tmproot927.sub1.sub2', hide_init=False, hide_main=False) == sub2_init assert _static_modname_to_modpath('_tmproot927.sub1.sub2.__init__', hide_init=False, hide_main=False) == sub2_init assert _static_modname_to_modpath('_tmproot927.sub1.sub2.__main__', hide_init=False, hide_main=False) == sub2_main if 3: # Test in a nested directory with __init__ but no __main__ # Test init assert _static_modname_to_modpath('_tmproot927.sub1', hide_init=False) == sub1_init assert _static_modname_to_modpath('_tmproot927.sub1.__init__', hide_init=False) == sub1_init assert _static_modname_to_modpath('_tmproot927.sub1.__main__', hide_init=False) is None # Test main assert _static_modname_to_modpath('_tmproot927.sub1', hide_main=False) == sub1 assert _static_modname_to_modpath('_tmproot927.sub1.__main__', hide_main=False) is None assert _static_modname_to_modpath('_tmproot927.sub1.__init__', hide_main=False) == sub1 # Test init and main both false assert _static_modname_to_modpath('_tmproot927.sub1.__init__') == sub1 assert _static_modname_to_modpath('_tmproot927.sub1.__main__') is None # Test init and main both true assert _static_modname_to_modpath('_tmproot927.sub1', hide_init=False, hide_main=False) == sub1_init assert _static_modname_to_modpath('_tmproot927.sub1.__init__', hide_init=False, hide_main=False) == sub1_init assert _static_modname_to_modpath('_tmproot927.sub1.__main__', hide_init=False, hide_main=False) is None assert '_tmproot927' not in sys.modules assert '_tmproot927.mod0' not in sys.modules assert '_tmproot927.sub1' not in sys.modules assert '_tmproot927.sub1.mod1' not in sys.modules assert '_tmproot927.sub1.sub2' not in sys.modules assert '_tmproot927.sub1.mod2.mod2' not in sys.modules def test_modname_to_modpath_namespace(): """ Ignore: import sys sys.path.append('/home/joncrall/code/xdoctest/testing') from test_static import * temp = ub.TempDir() temp.__enter__() sys.path.append(temp.dpath) temp.__exit__(None, None, None) %timeit _syspath_modname_to_modpath('xdoctest.static_analysis') %timeit _pkgutil_modname_to_modpath('xdoctest.static_analysis') """ with ub.TempDir() as temp: dpath = temp.dpath # Some "bad" non-module directories tmpbad = ub.ensuredir((dpath, '_tmpbad')) # Make a submodule of a bad directory, look good. sub_bad = ub.ensuredir((tmpbad, 'sub_bad')) ub.touch(join(tmpbad, '_inbad.py')) subbad = ub.touch(join(sub_bad, '__init__.py')) # NOQA b0 = ub.touch(join(sub_bad, 'b0.py')) # NOQA with PythonPathContext(dpath): assert _static_modname_to_modpath('_tmpbad') is None # Tricky case, these modules look good outside of _tmpbad WOW, you # can actually import this and it works, but pkgloader still # returns None so we should too. assert _static_modname_to_modpath('_tmpbad.sub_bad') is None assert _static_modname_to_modpath('_tmpbad.sub_bad.b0') is None # We should be able to statically find all of the good module # directories. # this should all be static import sys assert '_tmpsingle' not in sys.modules assert '_tmpbad' not in sys.modules def test_package_submodules(): """ CommandLine: pytest testing/test_static.py::test_package_submodules -s xdoctest -m ~/code/ubelt/tests/test_import.py test_package_submodules pass Ignore: import sys sys.path.append('/home/joncrall/code/xdoctest/testing') from test_static import * temp = ub.TempDir() temp.__enter__() sys.path.append(temp.dpath) temp.__exit__(None, None, None) """ from xdoctest import static_analysis as static with ub.TempDir() as temp: dpath = temp.dpath # Create a dummy package heirachy root = ub.ensuredir((dpath, '_tmproot927')) sub1 = ub.ensuredir((root, 'sub1')) sub2 = ub.ensuredir((sub1, 'sub2')) root_init = ub.touch(join(root, '__init__.py')) sub1_init = ub.touch(join(sub1, '__init__.py')) sub2_init = ub.touch(join(sub2, '__init__.py')) mod0 = ub.touch(join(root, 'mod0.py')) mod1 = ub.touch(join(sub1, 'mod1.py')) mod2 = ub.touch(join(sub2, 'mod2.py')) root_main = ub.touch(join(root, '__main__.py')) sub2_main = ub.touch(join(sub2, '__main__.py')) bad1 = ub.ensuredir((root, 'bad1')) bad2 = ub.ensuredir((sub1, 'bad2')) b0 = ub.touch(join(bad1, 'b0.py')) b1 = ub.touch(join(bad2, 'b1.py')) with PythonPathContext(dpath): subpaths = sorted(static.package_modpaths(root, with_pkg=True)) # should only return files not directories assert root_init in subpaths assert sub1_init in subpaths assert sub2_init in subpaths assert root not in subpaths assert sub1 not in subpaths assert sub2 not in subpaths assert root_main in subpaths assert sub2_main in subpaths assert mod0 in subpaths assert mod1 in subpaths assert mod2 in subpaths assert bad1 not in subpaths assert b0 not in subpaths assert b1 not in subpaths assert '_tmproot927' not in sys.modules assert '_tmproot927.mod0' not in sys.modules assert '_tmproot927.sub1' not in sys.modules assert '_tmproot927.sub1.mod1' not in sys.modules assert '_tmproot927.sub1.sub2' not in sys.modules assert '_tmproot927.sub1.mod2.mod2' not in sys.modules def test_modpath_to_modname(): """ CommandLine: pytest testing/test_static.py::test_modpath_to_modname -s python testing/test_static.py test_modpath_to_modname """ with ub.TempDir() as temp: dpath = temp.dpath # Create a dummy package heirachy root = ub.ensuredir((dpath, '_tmproot927')) sub1 = ub.ensuredir((root, 'sub1')) sub2 = ub.ensuredir((sub1, 'sub2')) root_init = ub.touch(join(root, '__init__.py')) sub1_init = ub.touch(join(sub1, '__init__.py')) sub2_init = ub.touch(join(sub2, '__init__.py')) mod0 = ub.touch(join(root, 'mod0.py')) mod1 = ub.touch(join(sub1, 'mod1.py')) mod2 = ub.touch(join(sub2, 'mod2.py')) root_main = ub.touch(join(root, '__main__.py')) sub2_main = ub.touch(join(sub2, '__main__.py')) bad1 = ub.ensuredir((root, 'bad1')) bad2 = ub.ensuredir((sub1, 'bad2')) b0 = ub.touch(join(bad1, 'b0.py')) b1 = ub.touch(join(bad2, 'b1.py')) import os ub.modpath_to_modname(root, relativeto=os.path.dirname(dpath)) # TODO: assert correct output with PythonPathContext(dpath): assert ub.modpath_to_modname(root) == '_tmproot927' assert ub.modpath_to_modname(sub1) == '_tmproot927.sub1' assert ub.modpath_to_modname(sub2) == '_tmproot927.sub1.sub2' assert ub.modpath_to_modname(mod0) == '_tmproot927.mod0' assert ub.modpath_to_modname(mod1) == '_tmproot927.sub1.mod1' assert ub.modpath_to_modname(mod2) == '_tmproot927.sub1.sub2.mod2' assert ub.modpath_to_modname(root_init) == '_tmproot927' assert ub.modpath_to_modname(sub1_init) == '_tmproot927.sub1' assert ub.modpath_to_modname(sub2_init) == '_tmproot927.sub1.sub2' assert ub.modpath_to_modname(root_init, hide_init=False) == '_tmproot927.__init__' assert ub.modpath_to_modname(sub1_init, hide_init=False) == '_tmproot927.sub1.__init__' assert ub.modpath_to_modname(sub2_init, hide_init=False) == '_tmproot927.sub1.sub2.__init__' assert ub.modpath_to_modname(root, hide_main=True, hide_init=False) == '_tmproot927.__init__' assert ub.modpath_to_modname(sub1, hide_main=True, hide_init=False) == '_tmproot927.sub1.__init__' assert ub.modpath_to_modname(sub2, hide_main=True, hide_init=False) == '_tmproot927.sub1.sub2.__init__' assert ub.modpath_to_modname(root, hide_main=False, hide_init=False) == '_tmproot927.__init__' assert ub.modpath_to_modname(sub1, hide_main=False, hide_init=False) == '_tmproot927.sub1.__init__' assert ub.modpath_to_modname(sub2, hide_main=False, hide_init=False) == '_tmproot927.sub1.sub2.__init__' assert ub.modpath_to_modname(root, hide_main=False, hide_init=True) == '_tmproot927' assert ub.modpath_to_modname(sub1, hide_main=False, hide_init=True) == '_tmproot927.sub1' assert ub.modpath_to_modname(sub2, hide_main=False, hide_init=True) == '_tmproot927.sub1.sub2' assert ub.modpath_to_modname(root_main, hide_main=False, hide_init=True) == '_tmproot927.__main__' assert ub.modpath_to_modname(sub2_main, hide_main=False, hide_init=True) == '_tmproot927.sub1.sub2.__main__' assert ub.modpath_to_modname(root_main, hide_main=False, hide_init=True) == '_tmproot927.__main__' assert ub.modpath_to_modname(sub2_main, hide_main=False, hide_init=True) == '_tmproot927.sub1.sub2.__main__' assert ub.modpath_to_modname(root_main, hide_main=True, hide_init=True) == '_tmproot927' assert ub.modpath_to_modname(sub2_main, hide_main=True, hide_init=True) == '_tmproot927.sub1.sub2' assert ub.modpath_to_modname(root_main, hide_main=True, hide_init=False) == '_tmproot927' assert ub.modpath_to_modname(sub2_main, hide_main=True, hide_init=False) == '_tmproot927.sub1.sub2' # Non-existant / invalid modules should always be None for a, b in it.product([True, False], [True, False]): with pytest.raises(ValueError): ub.modpath_to_modname(join(sub1, '__main__.py'), hide_main=a, hide_init=b) assert ub.modpath_to_modname(b0, hide_main=a, hide_init=b) == 'b0' assert ub.modpath_to_modname(b1, hide_main=a, hide_init=b) == 'b1' with pytest.raises(ValueError): ub.modpath_to_modname(bad1, hide_main=a, hide_init=b) with pytest.raises(ValueError): ub.modpath_to_modname(bad2, hide_main=a, hide_init=b) assert '_tmproot927' not in sys.modules assert '_tmproot927.mod0' not in sys.modules assert '_tmproot927.sub1' not in sys.modules assert '_tmproot927.sub1.mod1' not in sys.modules assert '_tmproot927.sub1.sub2' not in sys.modules assert '_tmproot927.sub1.mod2.mod2' not in sys.modules def test_splitmodpath(): with pytest.raises(ValueError): ub.split_modpath('does/not/exists/module.py') ub.split_modpath('does/not/exists/module.py', check=False) if __name__ == '__main__': r""" CommandLine: pytest ubelt/tests/test_import.py """ import xdoctest xdoctest.doctest_module(__file__)
robovm/robovm-studio
refs/heads/master
python/testData/inspections/PyMethodMayBeStaticInspection/trueNegative.py
83
__author__ = 'ktisha' class Child(Base): def f(self): self.test = 1
af1rst/bite-project
refs/heads/master
deps/gdata-python-client/samples/apps/marketplace_sample/gdata/apps/emailsettings/client.py
22
#!/usr/bin/python2.4 # # Copyright 2010 Google Inc. 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. """EmailSettingsClient simplifies Email Settings API calls. EmailSettingsClient extends gdata.client.GDClient to ease interaction with the Google Apps Email Settings API. These interactions include the ability to create labels, filters, aliases, and update web-clip, forwarding, POP, IMAP, vacation-responder, signature, language, and general settings, and retrieve labels, send-as, forwarding, pop, imap, vacation and signature settings. """ __author__ = 'Claudio Cherubino <ccherubino@google.com>' import urllib import gdata.apps.emailsettings.data import gdata.client # Email Settings URI template # The strings in this template are eventually replaced with the API version, # Google Apps domain name, username, and settingID, respectively. EMAIL_SETTINGS_URI_TEMPLATE = '/a/feeds/emailsettings/%s/%s/%s/%s' # The settingID value for the label requests SETTING_ID_LABEL = 'label' # The settingID value for the filter requests SETTING_ID_FILTER = 'filter' # The settingID value for the send-as requests SETTING_ID_SENDAS = 'sendas' # The settingID value for the webclip requests SETTING_ID_WEBCLIP = 'webclip' # The settingID value for the forwarding requests SETTING_ID_FORWARDING = 'forwarding' # The settingID value for the POP requests SETTING_ID_POP = 'pop' # The settingID value for the IMAP requests SETTING_ID_IMAP = 'imap' # The settingID value for the vacation responder requests SETTING_ID_VACATION_RESPONDER = 'vacation' # The settingID value for the signature requests SETTING_ID_SIGNATURE = 'signature' # The settingID value for the language requests SETTING_ID_LANGUAGE = 'language' # The settingID value for the general requests SETTING_ID_GENERAL = 'general' # The settingID value for the delegation requests SETTING_ID_DELEGATION = 'delegation' # The KEEP action for the email settings ACTION_KEEP = 'KEEP' # The ARCHIVE action for the email settings ACTION_ARCHIVE = 'ARCHIVE' # The DELETE action for the email settings ACTION_DELETE = 'DELETE' # The ALL_MAIL setting for POP enable_for property POP_ENABLE_FOR_ALL_MAIL = 'ALL_MAIL' # The MAIL_FROM_NOW_ON setting for POP enable_for property POP_ENABLE_FOR_MAIL_FROM_NOW_ON = 'MAIL_FROM_NOW_ON' class EmailSettingsClient(gdata.client.GDClient): """Client extension for the Google Email Settings API service. Attributes: host: string The hostname for the Email Settings API service. api_version: string The version of the Email Settings API. """ host = 'apps-apis.google.com' api_version = '2.0' auth_service = 'apps' auth_scopes = gdata.gauth.AUTH_SCOPES['apps'] ssl = True def __init__(self, domain, auth_token=None, **kwargs): """Constructs a new client for the Email Settings API. Args: domain: string The Google Apps domain with Email Settings. auth_token: (optional) gdata.gauth.ClientLoginToken, AuthSubToken, or OAuthToken which authorizes this client to edit the email settings. kwargs: The other parameters to pass to the gdata.client.GDClient constructor. """ gdata.client.GDClient.__init__(self, auth_token=auth_token, **kwargs) self.domain = domain def make_email_settings_uri(self, username, setting_id): """Creates the URI for the Email Settings API call. Using this client's Google Apps domain, create the URI to setup email settings for the given user in that domain. If params are provided, append them as GET params. Args: username: string The name of the user affected by this setting. setting_id: string The key of the setting to be configured. Returns: A string giving the URI for Email Settings API calls for this client's Google Apps domain. """ if '@' in username: username, domain = username.split('@', 1) else: domain = self.domain uri = EMAIL_SETTINGS_URI_TEMPLATE % (self.api_version, domain, username, setting_id) return uri MakeEmailSettingsUri = make_email_settings_uri def create_label(self, username, name, **kwargs): """Creates a label with the given properties. Args: username: string The name of the user. name: string The name of the label. kwargs: The other parameters to pass to gdata.client.GDClient.post(). Returns: gdata.apps.emailsettings.data.EmailSettingsLabel of the new resource. """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_LABEL) new_label = gdata.apps.emailsettings.data.EmailSettingsLabel( uri=uri, name=name) return self.post(new_label, uri, **kwargs) CreateLabel = create_label def retrieve_labels(self, username, **kwargs): """Retrieves email labels for the specified username Args: username: string The name of the user to get the labels for Returns: A gdata.data.GDFeed of the user's email labels """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_LABEL) return self.GetFeed(uri, auth_token=None, query=None, **kwargs) RetrieveLabels = retrieve_labels def delete_label(self, username, label, **kwargs): """Delete a label from the specified account. Args: username: string Name of the user label: string Name of the label to be deleted Returns: An atom.http_core.HttpResponse() with the result of the request """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_LABEL) uri = '/'.join([uri, urllib.quote_plus(label)]) return self.delete(uri, **kwargs) DeleteLabel = delete_label def create_filter(self, username, from_address=None, to_address=None, subject=None, has_the_word=None, does_not_have_the_word=None, has_attachments=None, label=None, mark_as_read=None, archive=None, **kwargs): """Creates a filter with the given properties. Args: username: string The name of the user. from_address: string The source email address for the filter. to_address: string (optional) The destination email address for the filter. subject: string (optional) The value the email must have in its subject to be filtered. has_the_word: string (optional) The value the email must have in its subject or body to be filtered. does_not_have_the_word: string (optional) The value the email cannot have in its subject or body to be filtered. has_attachments: string (optional) A boolean string representing whether the email must have an attachment to be filtered. label: string (optional) The name of the label to apply to messages matching the filter criteria. mark_as_read: Boolean (optional) Whether or not to mark messages matching the filter criteria as read. archive: Boolean (optional) Whether or not to move messages matching to Archived state. kwargs: The other parameters to pass to gdata.client.GDClient.post(). Returns: gdata.apps.emailsettings.data.EmailSettingsFilter of the new resource. """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_FILTER) new_filter = gdata.apps.emailsettings.data.EmailSettingsFilter( uri=uri, from_address=from_address, to_address=to_address, subject=subject, has_the_word=has_the_word, does_not_have_the_word=does_not_have_the_word, has_attachments=has_attachments, label=label, mark_as_read=mark_as_read, archive=archive) return self.post(new_filter, uri, **kwargs) CreateFilter = create_filter def create_send_as(self, username, name, address, reply_to=None, make_default=None, **kwargs): """Creates a send-as alias with the given properties. Args: username: string The name of the user. name: string The name that will appear in the "From" field. address: string The email address that appears as the origination address for emails sent by this user. reply_to: string (optional) The address to be used as the reply-to address in email sent using the alias. make_default: Boolean (optional) Whether or not this alias should become the default alias for this user. kwargs: The other parameters to pass to gdata.client.GDClient.post(). Returns: gdata.apps.emailsettings.data.EmailSettingsSendAsAlias of the new resource. """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_SENDAS) new_alias = gdata.apps.emailsettings.data.EmailSettingsSendAsAlias( uri=uri, name=name, address=address, reply_to=reply_to, make_default=make_default) return self.post(new_alias, uri, **kwargs) CreateSendAs = create_send_as def retrieve_send_as(self, username, **kwargs): """Retrieves send-as aliases for the specified username Args: username: string The name of the user to get the send-as for Returns: A gdata.data.GDFeed of the user's send-as alias settings """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_SENDAS) return self.GetFeed(uri, auth_token=None, query=None, **kwargs) RetrieveSendAs = retrieve_send_as def update_webclip(self, username, enable, **kwargs): """Enable/Disable Google Mail web clip. Args: username: string The name of the user. enable: Boolean Whether to enable showing Web clips. kwargs: The other parameters to pass to the update method. Returns: gdata.apps.emailsettings.data.EmailSettingsWebClip of the updated resource. """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_WEBCLIP) new_webclip = gdata.apps.emailsettings.data.EmailSettingsWebClip( uri=uri, enable=enable) return self.update(new_webclip, **kwargs) UpdateWebclip = update_webclip def update_forwarding(self, username, enable, forward_to=None, action=None, **kwargs): """Update Google Mail Forwarding settings. Args: username: string The name of the user. enable: Boolean Whether to enable incoming email forwarding. forward_to: (optional) string The address email will be forwarded to. action: string (optional) The action to perform after forwarding an email (ACTION_KEEP, ACTION_ARCHIVE, ACTION_DELETE). kwargs: The other parameters to pass to the update method. Returns: gdata.apps.emailsettings.data.EmailSettingsForwarding of the updated resource """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_FORWARDING) new_forwarding = gdata.apps.emailsettings.data.EmailSettingsForwarding( uri=uri, enable=enable, forward_to=forward_to, action=action) return self.update(new_forwarding, **kwargs) UpdateForwarding = update_forwarding def retrieve_forwarding(self, username, **kwargs): """Retrieves forwarding settings for the specified username Args: username: string The name of the user to get the forwarding settings for Returns: A gdata.data.GDEntry of the user's email forwarding settings """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_FORWARDING) return self.GetEntry(uri, auth_token=None, query=None, **kwargs) RetrieveForwarding = retrieve_forwarding def update_pop(self, username, enable, enable_for=None, action=None, **kwargs): """Update Google Mail POP settings. Args: username: string The name of the user. enable: Boolean Whether to enable incoming POP3 access. enable_for: string (optional) Whether to enable POP3 for all mail (POP_ENABLE_FOR_ALL_MAIL), or mail from now on (POP_ENABLE_FOR_MAIL_FROM_NOW_ON). action: string (optional) What Google Mail should do with its copy of the email after it is retrieved using POP (ACTION_KEEP, ACTION_ARCHIVE, ACTION_DELETE). kwargs: The other parameters to pass to the update method. Returns: gdata.apps.emailsettings.data.EmailSettingsPop of the updated resource. """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_POP) new_pop = gdata.apps.emailsettings.data.EmailSettingsPop( uri=uri, enable=enable, enable_for=enable_for, action=action) return self.update(new_pop, **kwargs) UpdatePop = update_pop def retrieve_pop(self, username, **kwargs): """Retrieves POP settings for the specified username Args: username: string The name of the user to get the POP settings for Returns: A gdata.data.GDEntry of the user's POP settings """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_POP) return self.GetEntry(uri, auth_token=None, query=None, **kwargs) RetrievePop = retrieve_pop def update_imap(self, username, enable, **kwargs): """Update Google Mail IMAP settings. Args: username: string The name of the user. enable: Boolean Whether to enable IMAP access.language kwargs: The other parameters to pass to the update method. Returns: gdata.apps.emailsettings.data.EmailSettingsImap of the updated resource. """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_IMAP) new_imap = gdata.apps.emailsettings.data.EmailSettingsImap( uri=uri, enable=enable) return self.update(new_imap, **kwargs) UpdateImap = update_imap def retrieve_imap(self, username, **kwargs): """Retrieves imap settings for the specified username Args: username: string The name of the user to get the imap settings for Returns: A gdata.data.GDEntry of the user's IMAP settings """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_IMAP) return self.GetEntry(uri, auth_token=None, query=None, **kwargs) RetrieveImap = retrieve_imap def update_vacation(self, username, enable, subject=None, message=None, start_date=None, end_date=None, contacts_only=None, domain_only=None, **kwargs): """Update Google Mail vacation-responder settings. Args: username: string The name of the user. enable: Boolean Whether to enable the vacation responder. subject: string (optional) The subject line of the vacation responder autoresponse. message: string (optional) The message body of the vacation responder autoresponse. startDate: string (optional) The start date of the vacation responder autoresponse. endDate: string (optional) The end date of the vacation responder autoresponse. contacts_only: Boolean (optional) Whether to only send autoresponses to known contacts. domain_only: Boolean (optional) Whether to only send autoresponses to users in the primary domain. kwargs: The other parameters to pass to the update method. Returns: gdata.apps.emailsettings.data.EmailSettingsVacationResponder of the updated resource. """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_VACATION_RESPONDER) new_vacation = gdata.apps.emailsettings.data.EmailSettingsVacationResponder( uri=uri, enable=enable, subject=subject, message=message, start_date=start_date, end_date=end_date, contacts_only=contacts_only, domain_only=domain_only) return self.update(new_vacation, **kwargs) UpdateVacation = update_vacation def retrieve_vacation(self, username, **kwargs): """Retrieves vacation settings for the specified username Args: username: string The name of the user to get the vacation settings for Returns: A gdata.data.GDEntry of the user's vacation auto-responder settings """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_VACATION_RESPONDER) return self.GetEntry(uri, auth_token=None, query=None, **kwargs) RetrieveVacation = retrieve_vacation def update_signature(self, username, signature, **kwargs): """Update Google Mail signature. Args: username: string The name of the user. signature: string The signature to be appended to outgoing messages. kwargs: The other parameters to pass to the update method. Returns: gdata.apps.emailsettings.data.EmailSettingsSignature of the updated resource. """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_SIGNATURE) new_signature = gdata.apps.emailsettings.data.EmailSettingsSignature( uri=uri, signature=signature) return self.update(new_signature, **kwargs) UpdateSignature = update_signature def retrieve_signature(self, username, **kwargs): """Retrieves signature settings for the specified username Args: username: string The name of the user to get the signature settings for Returns: A gdata.data.GDEntry of the user's signature settings """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_SIGNATURE) return self.GetEntry(uri, auth_token=None, query=None, **kwargs) RetrieveSignature = retrieve_signature def update_language(self, username, language, **kwargs): """Update Google Mail language settings. Args: username: string The name of the user. language: string The language tag for Google Mail's display language. kwargs: The other parameters to pass to the update method. Returns: gdata.apps.emailsettings.data.EmailSettingsLanguage of the updated resource. """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_LANGUAGE) new_language = gdata.apps.emailsettings.data.EmailSettingsLanguage( uri=uri, language=language) return self.update(new_language, **kwargs) UpdateLanguage = update_language def update_general_settings(self, username, page_size=None, shortcuts=None, arrows=None, snippets=None, use_unicode=None, **kwargs): """Update Google Mail general settings. Args: username: string The name of the user. page_size: int (optional) The number of conversations to be shown per page. shortcuts: Boolean (optional) Whether to enable keyboard shortcuts. arrows: Boolean (optional) Whether to display arrow-shaped personal indicators next to email sent specifically to the user. snippets: Boolean (optional) Whether to display snippets of the messages in the inbox and when searching. use_unicode: Boolean (optional) Whether to use UTF-8 (unicode) encoding for all outgoing messages. kwargs: The other parameters to pass to the update method. Returns: gdata.apps.emailsettings.data.EmailSettingsGeneral of the updated resource. """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_GENERAL) new_general = gdata.apps.emailsettings.data.EmailSettingsGeneral( uri=uri, page_size=page_size, shortcuts=shortcuts, arrows=arrows, snippets=snippets, use_unicode=use_unicode) return self.update(new_general, **kwargs) UpdateGeneralSettings = update_general_settings def add_email_delegate(self, username, address, **kwargs): """Add an email delegate to the mail account Args: username: string The name of the user address: string The email address of the delegated account """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_DELEGATION) new_delegation = gdata.apps.emailsettings.data.EmailSettingsDelegation( uri=uri, address=address) return self.post(new_delegation, uri, **kwargs) AddEmailDelegate = add_email_delegate def retrieve_email_delegates(self, username, **kwargs): """Retrieve a feed of the email delegates for the specified username Args: username: string The name of the user to get the email delegates for Returns: A gdata.data.GDFeed of the user's email delegates """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_DELEGATION) return self.GetFeed(uri, auth_token=None, query=None, **kwargs) RetrieveEmailDelegates = retrieve_email_delegates def delete_email_delegate(self, username, address, **kwargs): """Delete an email delegate from the specified account Args: username: string The name of the user address: string The email address of the delegated account """ uri = self.MakeEmailSettingsUri(username=username, setting_id=SETTING_ID_DELEGATION) uri = uri + '/' + address return self.delete(uri, **kwargs) DeleteEmailDelegate = delete_email_delegate
Anlim/decode-Django
refs/heads/master
Django-1.5.1/django/conf/locale/de/formats.py
107
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j. F Y H:i:s' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j. F' SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATETIME_FORMAT = 'd.m.Y H:i:s' FIRST_DAY_OF_WEEK = 1 # Monday # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = ( '%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06' # '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006' ) DATETIME_INPUT_FORMATS = ( '%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' '%d.%m.%Y %H:%M', # '25.10.2006 14:30' '%d.%m.%Y', # '25.10.2006' ) DECIMAL_SEPARATOR = ',' THOUSAND_SEPARATOR = '.' NUMBER_GROUPING = 3
sporkchops81/titleplant
refs/heads/master
modeltest.py
1
#!/bin/python import model import unittest class People(unittest.TestCase): def test_return_name(self): name = 'William R Cunningham Jr' man = model.Individual('William', 'R', 'Cunningham', 'Jr', 'M') self.assertEqual(man.name(), name) def test_return_shortname(self): name = 'William Cunningham' man = model.Individual('William', 'R', 'Cunningham', 'Jr', 'M') self.assertEqual(man.short_name(), name) class Database(unittest.TestCase): def test_tables(self): conn = model.MainModel('titleplant') self.assertTrue(isinstance(conn.list_tables, tuple)) if __name__ == '__main__': unittest.main()
wwj718/edx-video
refs/heads/master
lms/djangoapps/django_comment_client/tests/test_utils.py
6
from django.test import TestCase from student.tests.factories import UserFactory, CourseEnrollmentFactory from django_comment_common.models import Role, Permission from factories import RoleFactory import django_comment_client.utils as utils class DictionaryTestCase(TestCase): def test_extract(self): d = {'cats': 'meow', 'dogs': 'woof'} k = ['cats', 'dogs', 'hamsters'] expected = {'cats': 'meow', 'dogs': 'woof', 'hamsters': None} self.assertEqual(utils.extract(d, k), expected) def test_strip_none(self): d = {'cats': 'meow', 'dogs': 'woof', 'hamsters': None} expected = {'cats': 'meow', 'dogs': 'woof'} self.assertEqual(utils.strip_none(d), expected) def test_strip_blank(self): d = {'cats': 'meow', 'dogs': 'woof', 'hamsters': ' ', 'yetis': ''} expected = {'cats': 'meow', 'dogs': 'woof'} self.assertEqual(utils.strip_blank(d), expected) def test_merge_dict(self): d1 = {'cats': 'meow', 'dogs': 'woof'} d2 = {'lions': 'roar', 'ducks': 'quack'} expected = {'cats': 'meow', 'dogs': 'woof', 'lions': 'roar', 'ducks': 'quack'} self.assertEqual(utils.merge_dict(d1, d2), expected) class AccessUtilsTestCase(TestCase): def setUp(self): self.course_id = 'edX/toy/2012_Fall' self.student_role = RoleFactory(name='Student', course_id=self.course_id) self.moderator_role = RoleFactory(name='Moderator', course_id=self.course_id) self.student1 = UserFactory(username='student', email='student@edx.org') self.student1_enrollment = CourseEnrollmentFactory(user=self.student1) self.student_role.users.add(self.student1) self.student2 = UserFactory(username='student2', email='student2@edx.org') self.student2_enrollment = CourseEnrollmentFactory(user=self.student2) self.moderator = UserFactory(username='moderator', email='staff@edx.org', is_staff=True) self.moderator_enrollment = CourseEnrollmentFactory(user=self.moderator) self.moderator_role.users.add(self.moderator) def test_get_role_ids(self): ret = utils.get_role_ids(self.course_id) expected = {u'Moderator': [3], u'Student': [1, 2], 'Staff': [3]} self.assertEqual(ret, expected) def test_has_forum_access(self): ret = utils.has_forum_access('student', self.course_id, 'Student') self.assertTrue(ret) ret = utils.has_forum_access('not_a_student', self.course_id, 'Student') self.assertFalse(ret) ret = utils.has_forum_access('student', self.course_id, 'NotARole') self.assertFalse(ret)
librato/librato-python-web
refs/heads/master
librato_python_web/tools/agent_config.py
1
# Copyright (c) 2015. Librato, 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 Librato, Inc. nor the names of project 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 LIBRATO, INC. 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. import logging import json import os import sys import argparse LIBRATO_HOSTNAME = "metrics-api.librato.com" logger = logging.getLogger(__name__) python_agent_conf = './agent-conf.json' config_options = [ 'daemonize', 'debug', 'create', 'expire', 'flush_interval', 'hostname', 'user', 'api_token', 'metrics_hostname', 'no_aggregate_counters', 'pct', 'pidfile', 'port', 'app_id', 'restart', 'stop', 'integration' ] required_options = [ ('user', 'Librato user email'), ('api_token', 'Librato api token'), ('app_id', 'Unique ID for application'), ('integration', 'Librato integration (django, flask)'), ('metrics_hostname', 'Librato metrics API URL') ] defaults = { "daemonize": False, "debug": False, "create": False, "expire": 0, "hostname": "localhost", "pidfile": '/var/run/solarwinds-python-statsd.pid', "port": 8142, "pct": 95, "flush_interval": 60000, 'no_aggregate_counters': False, 'metrics_hostname': LIBRATO_HOSTNAME, 'integration': 'django' } class _globals(object): config_path = "./agent-conf.json" class config_info(object): pass def load_config(args=sys.argv[1:], use_env=True): """ Load configuration with the following priority """ """ a. Command line params """ """ b. Configuration file """ """ c. Baked in defaults, where appropriate """ parser = argparse.ArgumentParser() parser.add_argument('-d', '--debug', help='debug mode') parser.add_argument('--config-path', help='configuration file path (default: {})'.format(python_agent_conf), default=python_agent_conf) parser.add_argument('-c', '--create', help='create librato space (default: false)') parser.add_argument('-H', '--hostname', help='hostname to run on (default: localhost') parser.add_argument('-p', '--port', help='port to run on (default: 8142)', type=int) parser.add_argument('-u', '--user', dest='user', help='librato user email') parser.add_argument('--api-token', dest='api_token', help='librato api token') parser.add_argument('--flush-interval', help='how often to send data to librato in milli-seconds (default: 60000)', type=int) parser.add_argument('--no-aggregate-counters', help='should statsd report counters as absolute instead of count/sec', action='store_true') parser.add_argument('-t', '--pct', help='stats pct threshold (default: 95)', type=int) parser.add_argument('-D', '--daemon', dest='daemonize', action='store_true', help='daemonize') parser.add_argument('--pidfile', help='pid file') parser.add_argument('--restart', action='store_true', help='restart a running daemon') parser.add_argument('--stop', action='store_true', help='stop a running daemon') parser.add_argument('--expire', help='time-to-live for old stats (in secs)', type=int) parser.add_argument('--app-id', help='unique id for application') parser.add_argument('-M', '--metrics-hostname', help='Librato metrics API URL') parser.add_argument('-I', '--integration', help='Librato Python integration (django, flask or cherrypy)') options = parser.parse_args(args) _globals.config_path = options.config_path # Drop the null values argparse supplies new_options = config_info() for f in config_options: if hasattr(options, f): val = getattr(options, f) if val is not None: setattr(new_options, f, val) options = new_options if use_env: update_config_from_env(options) update_config_from_config_file(options) # Use baked in defaults for key in defaults: if not hasattr(options, key): setattr(options, key, defaults.get(key)) setattr(options, 'integration', getattr(options, 'integration', 'django').lower()) return options def update_config_from_env(options=None): options = options or config_info() for attr, var in [("user", "LIBRATO_USER"), ("api_token", "LIBRATO_TOKEN"), ("app_id", "LIBRATO_APP_ID"), ("integration", "LIBRATO_INTEGRATION")]: if var in os.environ: setattr(options, attr, os.environ[var]) if "LIBRATO_INSTRUMENTATION_PORT" in os.environ: setattr(options, "port", int(os.environ["LIBRATO_INSTRUMENTATION_PORT"])) return options def update_config_from_config_file(options=None, config_file=None): if not config_file: config_file = _globals.config_path options = options or config_info() if os.path.isfile(config_file): with open(config_file) as conf: agent_conf = json.load(conf) for key in config_options: if key in agent_conf and not hasattr(options, key): setattr(options, key, agent_conf.get(key)) else: logger.info("Config file %s doesn't exist", config_file) return options def update_config_file(agent_settings, config_file=None): if not config_file: config_file = _globals.config_path with open(config_file, 'w') as conf: json.dump(agent_settings, conf, indent=3) def validate_config(options): errors = [] for (key, desc) in required_options: if not hasattr(options, key): errors.append('{} [{}] must be specified.'.format(key, desc)) return len(errors) == 0, errors
all-of-us/raw-data-repository
refs/heads/devel
rdr_service/lib_fhir/fhirclient_1_0_6/models/identifier.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/Identifier) on 2016-06-23. # 2016, SMART Health IT. from . import element class Identifier(element.Element): """ An identifier intended for computation. A technical identifier - identifies some entity uniquely and unambiguously. """ resource_name = "Identifier" def __init__(self, jsondict=None, strict=True): """ Initialize all valid properties. :raises: FHIRValidationError on validation errors, unless strict is False :param dict jsondict: A JSON dictionary to use for initialization :param bool strict: If True (the default), invalid variables will raise a TypeError """ self.assigner = None """ Organization that issued id (may be just text). Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """ self.period = None """ Time period when id is/was valid for use. Type `Period` (represented as `dict` in JSON). """ self.system = None """ The namespace for the identifier. Type `str`. """ self.type = None """ Description of identifier. Type `CodeableConcept` (represented as `dict` in JSON). """ self.use = None """ usual | official | temp | secondary (If known). Type `str`. """ self.value = None """ The value that is unique. Type `str`. """ super(Identifier, self).__init__(jsondict=jsondict, strict=strict) def elementProperties(self): js = super(Identifier, self).elementProperties() js.extend([ ("assigner", "assigner", fhirreference.FHIRReference, False, None, False), ("period", "period", period.Period, False, None, False), ("system", "system", str, False, None, False), ("type", "type", codeableconcept.CodeableConcept, False, None, False), ("use", "use", str, False, None, False), ("value", "value", str, False, None, False), ]) return js from . import codeableconcept from . import fhirreference from . import period
eocasio/pyfpdf
refs/heads/master
tests/issue65.py
18
"Test issue 65: twitter.png error (urlopen, transparency, internal regex error)" from fpdf import FPDF, FPDF_VERSION pdf=FPDF() pdf.compress = False pdf.add_page() png = "https://g.twimg.com/Twitter_logo_blue.png" pdf.image(png, x = 15, y = 15) fn = 'issue65.pdf' pdf.output(fn,'F') import os try: os.startfile(fn) except: os.system("xdg-open \"%s\"" % fn)
gnychis/gnuradio-3.5.0-dmr
refs/heads/master
gnuradio-core/src/python/gnuradio/blks2impl/channel_model.py
17
#!/usr/bin/env python # # Copyright 2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # from gnuradio import gr # This block is now a C++ hierarchical block, gr.channel_model channel_model = gr.channel_model
MarsZone/DreamLand
refs/heads/master
templates/example_cn/server/conf/settings.py
2
""" Evennia settings file. The full options are found in the default settings file found here: {EVENNIA_SETTINGS_DEFAULT} {MUDDERY_SETTINGS_DEFAULT} Note: Don't copy more from the default file than you actually intend to change; this will make sure that you don't overload upstream updates unnecessarily. """ # Use the defaults from Evennia unless explicitly overridden import os from evennia.settings_default import * from muddery.settings_default import * ###################################################################### # Evennia base server config ###################################################################### # This is a security setting protecting against host poisoning # attacks. It defaults to allowing all. In production, make # sure to change this to your actual host addresses/IPs. ALLOWED_HOSTS = {ALLOWED_HOSTS} # The webserver sits behind a Portal proxy. This is a list # of tuples (proxyport,serverport) used. The proxyports are what # the Portal proxy presents to the world. The serverports are # the internal ports the proxy uses to forward data to the Server-side # webserver (these should not be publicly open) WEBSERVER_PORTS = {WEBSERVER_PORTS} # Server-side websocket port to open for the webclient. WEBSOCKET_CLIENT_PORT = {WEBSOCKET_CLIENT_PORT} # The game server opens an AMP port so that the portal can # communicate with it. AMP_PORT = {AMP_PORT} # Language code for this installation. All choices can be found here: # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes LANGUAGE_CODE = 'zh-cn' ###################################################################### # Django web features ###################################################################### # The secret key is randomly seeded upon creation. It is used to sign # Django's cookies. Do not share this with anyone. Changing it will # log out all active web browsing sessions. Game web client sessions # may survive. SECRET_KEY = {SECRET_KEY} ###################################################################### # Default statement sets ###################################################################### # Skill functions set SKILL_FUNC_SET = "statements.statement_func_set.SkillFuncSet"
wakiyamap/electrum-mona
refs/heads/master
electrum_mona/gui/qt/watchtower_dialog.py
1
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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. from PyQt5.QtGui import QStandardItemModel, QStandardItem from PyQt5.QtCore import Qt from PyQt5.QtWidgets import (QDialog, QVBoxLayout, QPushButton, QLabel) from electrum_mona.i18n import _ from .util import MyTreeView, Buttons class WatcherList(MyTreeView): def __init__(self, parent): super().__init__(parent, self.create_menu, stretch_column=0) self.setModel(QStandardItemModel(self)) self.setSortingEnabled(True) self.update() def create_menu(self, x): pass def update(self): if self.parent.lnwatcher is None: return self.model().clear() self.update_headers({0:_('Outpoint'), 1:_('Tx'), 2:_('Status')}) lnwatcher = self.parent.lnwatcher l = lnwatcher.list_sweep_tx() for outpoint in l: n = lnwatcher.get_num_tx(outpoint) status = lnwatcher.get_channel_status(outpoint) items = [QStandardItem(e) for e in [outpoint, "%d"%n, status]] self.model().insertRow(self.model().rowCount(), items) size = lnwatcher.sweepstore.filesize() self.parent.size_label.setText('Database size: %.2f Mb'%(size/1024/1024.)) class WatchtowerDialog(QDialog): def __init__(self, gui_object): QDialog.__init__(self) self.gui_object = gui_object self.config = gui_object.config self.network = gui_object.daemon.network assert self.network self.lnwatcher = self.network.local_watchtower self.setWindowTitle(_('Watchtower')) self.setMinimumSize(600, 20) self.size_label = QLabel() self.watcher_list = WatcherList(self) vbox = QVBoxLayout(self) vbox.addWidget(self.size_label) vbox.addWidget(self.watcher_list) b = QPushButton(_('Close')) b.clicked.connect(self.close) vbox.addLayout(Buttons(b)) self.watcher_list.update() def is_hidden(self): return self.isMinimized() or self.isHidden() def show_or_hide(self): if self.is_hidden(): self.bring_to_top() else: self.hide() def bring_to_top(self): self.show() self.raise_() def closeEvent(self, event): self.gui_object.watchtower_dialog = None event.accept()
arthurdejong/python-stdnum
refs/heads/master
stdnum/lu/__init__.py
1
# __init__.py - collection of Luxembourgian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # This library 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. # # This library 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 this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 USA """Collection of Luxembourgian numbers.""" # provide vat as an alias from stdnum.lu import tva as vat # noqa: F401
Resly/pipeline
refs/heads/master
jupyterhub.ml/notebooks/zz_old/TensorFlow/GoogleTraining/workshop_sections/transfer_learning/cloudml/setup.py
4
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from setuptools import find_packages from setuptools import setup REQUIRED_PACKAGES = [ ] setup( name='trainer', version='0.1', author = 'Google', author_email = 'cloudml-feedback@google.com', install_requires=REQUIRED_PACKAGES, packages=find_packages(), include_package_data=True, description='Google Cloud Machine Learning flowers example', requires=[] )
JackDanger/sentry
refs/heads/master
tests/sentry/lang/native/test_applecrashreport.py
1
from __future__ import absolute_import from sentry.lang.native.applecrashreport import AppleCrashReport def test_get_threads_apple_string(): acr = AppleCrashReport(threads=[ {'crashed': True, 'current': True, 'id': 1, 'name': None, 'stacktrace': {'frames': [ {'abs_path': '/Users/haza/Projects/sentry-swift/Sources/ios/SentrySwizzle.swift', 'colno': 0, 'filename': 'SentrySwizzle.swift', 'function': '@objc UIApplication.sentryClient_sendAction(Selector, to : AnyObject?, from : AnyObject?, for : UIEvent?) -> Bool', 'image_addr': '0x2c8000', 'in_app': False, 'instruction_addr': '0x31caa4', 'lineno': 0, 'object_addr': '0x2c8000', 'package': '/private/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/Frameworks/SentrySwift.framework/SentrySwift', 'symbol': '_TToFE11SentrySwiftCSo13UIApplication23sentryClient_sendActionfTV10ObjectiveC8Selector2toGSqPs9AnyObject__4fromGSqPS3___3forGSqCSo7UIEvent__Sb', 'symbol_addr': '0x31ca38'}, {'abs_path': '/Users/haza/Projects/sentry-swift/Sources/ios/SentrySwizzle.swift', 'colno': 84, 'filename': 'SentrySwizzle.swift', 'function': 'UIApplication.sentryClient_sendAction(Selector, to : AnyObject?, from : AnyObject?, for : UIEvent?) -> Bool', 'image_addr': '0x2c8000', 'in_app': False, 'instruction_addr': '0x31c3e8', 'lineno': 92, 'object_addr': '0x2c8000', 'package': '/private/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/Frameworks/SentrySwift.framework/SentrySwift', 'symbol': '_TFE11SentrySwiftCSo13UIApplication23sentryClient_sendActionfTV10ObjectiveC8Selector2toGSqPs9AnyObject__4fromGSqPS3___3forGSqCSo7UIEvent__Sb', 'symbol_addr': '0x31b9f8'}] }}, {'crashed': False, 'current': False, 'id': 2, 'name': 'com.apple.test', 'stacktrace': {'frames': [ {'abs_path': '/Users/haza/Projects/sentry-swift/Examples/SwiftExample/SwiftExample/ViewController.swift', 'colno': 0, 'filename': 'ViewController.swift', 'function': '@objc ViewController.onClickFatalError(AnyObject) -> ()', 'image_addr': '0xf0000', 'in_app': True, 'instruction_addr': '0xf6cd4', 'lineno': 0, 'object_addr': '0xf0000', 'package': '/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/SwiftExample', 'symbol': '_TToFC12SwiftExample14ViewController17onClickFatalErrorfPs9AnyObject_T_', 'symbol_addr': '0xf6c98'}, {'abs_path': '/Users/haza/Projects/sentry-swift/Examples/SwiftExample/SwiftExample/ViewController.swift', 'colno': 36, 'filename': 'ViewController.swift', 'function': 'ViewController.onClickFatalError(AnyObject) -> ()', 'image_addr': '0xf0000', 'in_app': True, 'instruction_addr': '0xf6c78', 'lineno': 110, 'object_addr': '0xf0000', 'package': '/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/SwiftExample', 'symbol': '_TFC12SwiftExample14ViewController17onClickFatalErrorfPs9AnyObject_T_', 'symbol_addr': '0xf6c04'}] }}, ]) threads = acr.get_threads_apple_string() assert threads == 'Thread 1 name: \n\ Thread 1 Crashed:\n\ 0 SentrySwift 0x31c3e8 0x2c8000 + 2544\n\ 1 SentrySwift 0x31caa4 0x2c8000 + 108\n\n\ Thread 2 name: com.apple.test\n\ 0 SwiftExample 0xf6c78 0xf0000 + 116\n\ 1 SwiftExample 0xf6cd4 0xf0000 + 60' def test_get_threads_apple_string_symbolicated(): acr = AppleCrashReport(symbolicated=True, threads=[ {'crashed': True, 'current': True, 'id': 1, 'name': None, 'stacktrace': {'frames': [ {'abs_path': '/Users/haza/Projects/sentry-swift/Sources/ios/SentrySwizzle.swift', 'colno': 0, 'filename': 'SentrySwizzle.swift', 'function': '@objc UIApplication.sentryClient_sendAction(Selector, to : AnyObject?, from : AnyObject?, for : UIEvent?) -> Bool', 'image_addr': '0x2c8000', 'in_app': False, 'instruction_addr': '0x31caa4', 'lineno': 0, 'object_addr': '0x2c8000', 'package': '/private/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/Frameworks/SentrySwift.framework/SentrySwift', 'symbol': '_TToFE11SentrySwiftCSo13UIApplication23sentryClient_sendActionfTV10ObjectiveC8Selector2toGSqPs9AnyObject__4fromGSqPS3___3forGSqCSo7UIEvent__Sb', 'symbol_addr': '0x31ca38'}, {'abs_path': '/Users/haza/Projects/sentry-swift/Sources/ios/SentrySwizzle.swift', 'colno': 84, 'filename': 'SentrySwizzle.swift', 'function': 'UIApplication.sentryClient_sendAction(Selector, to : AnyObject?, from : AnyObject?, for : UIEvent?) -> Bool', 'image_addr': '0x2c8000', 'in_app': False, 'instruction_addr': '0x31c3e8', 'lineno': 92, 'object_addr': '0x2c8000', 'package': '/private/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/Frameworks/SentrySwift.framework/SentrySwift', 'symbol': '_TFE11SentrySwiftCSo13UIApplication23sentryClient_sendActionfTV10ObjectiveC8Selector2toGSqPs9AnyObject__4fromGSqPS3___3forGSqCSo7UIEvent__Sb', 'symbol_addr': '0x31b9f8'}] }}, {'crashed': False, 'current': False, 'id': 2, 'name': 'com.apple.test', 'stacktrace': {'frames': [ {'abs_path': '/Users/haza/Projects/sentry-swift/Examples/SwiftExample/SwiftExample/ViewController.swift', 'colno': 0, 'filename': 'ViewController.swift', 'function': '@objc ViewController.onClickFatalError(AnyObject) -> ()', 'image_addr': '0xf0000', 'in_app': True, 'instruction_addr': '0xf6cd4', 'lineno': 0, 'object_addr': '0xf0000', 'package': '/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/SwiftExample', 'symbol': '_TToFC12SwiftExample14ViewController17onClickFatalErrorfPs9AnyObject_T_', 'symbol_addr': '0xf6c98'}, {'colno': 36, 'image_addr': '0xf0000', 'in_app': True, 'instruction_addr': '0xf6c78', 'lineno': 110, 'object_addr': '0xf0000', 'symbol_addr': '0xf6c04'}] }}, ]) threads = acr.get_threads_apple_string() assert threads.rstrip() == '''\ Thread 1 name: \n\ Thread 1 Crashed: 0 SentrySwift 0x31c3e8 UIApplication.sentryClient_sendAction(Selector, to : AnyObject?, from : AnyObject?, for : UIEvent?) -> Bool (SentrySwizzle.swift:92) 1 SentrySwift 0x31caa4 @objc UIApplication.sentryClient_sendAction(Selector, to : AnyObject?, from : AnyObject?, for : UIEvent?) -> Bool Thread 2 name: com.apple.test 0 <unknown> 0xf6c78 <unknown> + 116 1 SwiftExample 0xf6cd4 @objc ViewController.onClickFatalError(AnyObject) -> ()''' # 0 libswiftCore.dylib 0x0000000100556cc4 0x1003f8000 + 1436868 # 1 libswiftCore.dylib 0x0000000100556cc4 0x1003f8000 + 1436868 # 2 SentrySwift 0x0000000100312308 @objc SentryClient.crash() -> () (Sentry.swift:0) # 3 SwiftExample 0x00000001000f6c78 ViewController.onClickFatalError(AnyObject) -> () (ViewController.swift:110) # 4 SwiftExample 0x00000001000f6cd4 @objc ViewController.onClickFatalError(AnyObject) -> () (ViewController.swift:0) # 5 UIKit 0x000000018755fd30 -[UIApplication sendAction:to:from:forEvent:] + 96 # 6 SentrySwift 0x000000010031c3e8 UIApplication.sentryClient_sendAction(Selector, to : AnyObject?, from : AnyObject?, for : UIEvent?) -> Bool (SentrySwizzle.swift:92) # 7 SentrySwift 0x000000010031caa4 @objc UIApplication.sentryClient_sendAction(Selector, to : AnyObject?, from : AnyObject?, for : UIEvent?) -> Bool (SentrySwizzle.swift:0) # 0 libswiftCore.dylib 0x0000000100556cc4 0x1003f8000 + 1436868 # 1 libswiftCore.dylib 0x0000000100556cc4 0x1003f8000 + 1436868 # 2 SentrySwift 0x0000000100312308 0x1002c8000 + 303880 # 3 SwiftExample 0x00000001000f6c78 0x1000f0000 + 27768 # 4 SwiftExample 0x00000001000f6cd4 0x1000f0000 + 27860 # 5 UIKit 0x000000018755fd30 0x18751b000 + 281904 # 6 SentrySwift 0x000000010031c3e8 0x1002c8000 + 345064 # 7 SentrySwift 0x000000010031caa4 0x1002c8000 + 346788 def test_get_thread_apple_string(): acr = AppleCrashReport() thread = acr.get_thread_apple_string({ 'crashed': True, 'current': False, 'id': 1, 'name': None, 'stacktrace': {'frames': [ {'abs_path': '/Users/haza/Projects/sentry-swift/Sources/ios/SentrySwizzle.swift', 'colno': 0, 'filename': 'SentrySwizzle.swift', 'function': '@objc UIApplication.sentryClient_sendAction(Selector, to : AnyObject?, from : AnyObject?, for : UIEvent?) -> Bool', 'image_addr': '0x2c8000', 'in_app': False, 'instruction_addr': '0x31caa4', 'lineno': 0, 'object_addr': '0x2c8000', 'package': '/private/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/Frameworks/SentrySwift.framework/SentrySwift', 'symbol': '_TToFE11SentrySwiftCSo13UIApplication23sentryClient_sendActionfTV10ObjectiveC8Selector2toGSqPs9AnyObject__4fromGSqPS3___3forGSqCSo7UIEvent__Sb', 'symbol_addr': '0x31ca38'}, {'abs_path': '/Users/haza/Projects/sentry-swift/Sources/ios/SentrySwizzle.swift', 'colno': 84, 'filename': 'SentrySwizzle.swift', 'function': 'UIApplication.sentryClient_sendAction(Selector, to : AnyObject?, from : AnyObject?, for : UIEvent?) -> Bool', 'image_addr': '0x2c8000', 'in_app': False, 'instruction_addr': '0x31c3e8', 'lineno': 92, 'object_addr': '0x2c8000', 'package': '/private/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/Frameworks/SentrySwift.framework/SentrySwift', 'symbol': '_TFE11SentrySwiftCSo13UIApplication23sentryClient_sendActionfTV10ObjectiveC8Selector2toGSqPs9AnyObject__4fromGSqPS3___3forGSqCSo7UIEvent__Sb', 'symbol_addr': '0x31b9f8'}, {'function': '<redacted>', 'image_addr': '0x8751b000', 'in_app': False, 'instruction_addr': '0x8755fd30', 'package': '/System/Library/Frameworks/UIKit.framework/UIKit', 'symbol_addr': '0x8755fcd0'}, {'abs_path': '/Users/haza/Projects/sentry-swift/Examples/SwiftExample/SwiftExample/ViewController.swift', 'colno': 0, 'filename': 'ViewController.swift', 'function': '@objc ViewController.onClickFatalError(AnyObject) -> ()', 'image_addr': '0xf0000', 'in_app': True, 'instruction_addr': '0xf6cd4', 'lineno': 0, 'object_addr': '0xf0000', 'package': '/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/SwiftExample', 'symbol': '_TToFC12SwiftExample14ViewController17onClickFatalErrorfPs9AnyObject_T_', 'symbol_addr': '0xf6c98'}, {'abs_path': '/Users/haza/Projects/sentry-swift/Examples/SwiftExample/SwiftExample/ViewController.swift', 'colno': 36, 'filename': 'ViewController.swift', 'function': 'ViewController.onClickFatalError(AnyObject) -> ()', 'image_addr': '0xf0000', 'in_app': True, 'instruction_addr': '0xf6c78', 'lineno': 110, 'object_addr': '0xf0000', 'package': '/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/SwiftExample', 'symbol': '_TFC12SwiftExample14ViewController17onClickFatalErrorfPs9AnyObject_T_', 'symbol_addr': '0xf6c04'}, {'abs_path': '/Users/haza/Projects/sentry-swift/Sources/Sentry.swift', 'colno': 0, 'filename': 'Sentry.swift', 'function': '@objc SentryClient.crash() -> ()', 'image_addr': '0x2c8000', 'in_app': False, 'instruction_addr': '0x312308', 'lineno': 0, 'object_addr': '0x2c8000', 'package': '/private/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/Frameworks/SentrySwift.framework/SentrySwift', 'symbol': '_TToFC11SentrySwift12SentryClient5crashfT_T_', 'symbol_addr': '0x312280'}, {'function': 'specialized _assertionFailed(StaticString, String, StaticString, UInt) -> ()', 'image_addr': '0x3f8000', 'in_app': False, 'instruction_addr': '0x556cc4', 'package': '/private/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/Frameworks/libswiftCore.dylib', 'symbol_addr': '0x556c24'}, {'function': 'specialized _assertionFailed(StaticString, String, StaticString, UInt) -> ()', 'image_addr': '0x3f8000', 'in_app': False, 'instruction_addr': '0x556cc4', 'package': '/private/var/containers/Bundle/Application/06EA18D0-49C5-452C-B431-92B1098FB4AD/SwiftExample.app/Frameworks/libswiftCore.dylib', 'symbol_addr': '0x556c24'} ]} }) # TODO(hazat): the address here in a real crash is 0x0000000100556cc4 but we just get 0x556cc4 assert thread == 'Thread 1 name: \n\ Thread 1 Crashed:\n\ 0 libswiftCore.dylib 0x556cc4 0x3f8000 + 160\n\ 1 libswiftCore.dylib 0x556cc4 0x3f8000 + 160\n\ 2 SentrySwift 0x312308 0x2c8000 + 136\n\ 3 SwiftExample 0xf6c78 0xf0000 + 116\n\ 4 SwiftExample 0xf6cd4 0xf0000 + 60\n\ 5 UIKit 0x8755fd30 0x8751b000 + 96\n\ 6 SentrySwift 0x31c3e8 0x2c8000 + 2544\n\ 7 SentrySwift 0x31caa4 0x2c8000 + 108' def test__convert_frame_to_apple_string(): acr = AppleCrashReport() frame = acr._convert_frame_to_apple_string(frame={'abs_path': None, 'colno': 0, 'function': 'SentryClient.crash() -> ()', 'image_addr': '0xabd7000', 'in_app': False, 'instruction_addr': '0xac24ab6', 'lineno': 0, 'package': '/Users/haza/Library/Developer/CoreSimulator/Devices/DDB32F4C-97CF-4E2B-BD10-EB940553F223/data/Containers/Bundle/Application/4C903BE8-ED5E-414A-AC42-2D4ACCACE781/SwiftExample.app/Frameworks/SentrySwift.framework/SentrySwift', 'symbol': '_TFC11SentrySwift12SentryClient5crashfT_T_', 'symbol_addr': '0xac24a10' }) assert frame == '0 SentrySwift 0xac24ab6 0xabd7000 + 166' acr2 = AppleCrashReport(symbolicated=True) frame_symbolicated = acr2._convert_frame_to_apple_string(frame={'abs_path': None, 'colno': 0, 'function': 'SentryClient.crash() -> ()', 'image_addr': '0xabd7000', 'in_app': False, 'instruction_addr': '0xac24ab6', 'lineno': 0, 'package': '/Users/haza/Library/Developer/CoreSimulator/Devices/DDB32F4C-97CF-4E2B-BD10-EB940553F223/data/Containers/Bundle/Application/4C903BE8-ED5E-414A-AC42-2D4ACCACE781/SwiftExample.app/Frameworks/SentrySwift.framework/SentrySwift', 'symbol': '_TFC11SentrySwift12SentryClient5crashfT_T_', 'symbol_addr': '0xac24a10' }, number=1) assert frame_symbolicated == '1 SentrySwift 0xac24ab6 SentryClient.crash() -> ()' def test_get_binary_images_apple_string(): acr = AppleCrashReport(debug_images=[ {'cpu_subtype': 3, 'cpu_type': 16777223, 'image_addr': '0x141c5000', 'image_size': 20480, 'image_vmaddr': '0x0', 'name': '/Users/haza/Library/Developer/CoreSimulator/Devices/DDB32F4C-97CF-4E2B-BD10-EB940553F223/data/Containers/Bundle/Application/8C286977-D498-44FF-B7BE-42BFE3DE38BD/SwiftExample.app/Frameworks/libswiftContacts.dylib', 'type': 'apple', 'uuid': '4B5A054F-B7A1-3AD0-81E1-513B4DBE2A33'}, {'cpu_subtype': 3, 'cpu_type': 16777223, 'image_addr': '0x1400c000', 'image_size': 266240, 'image_vmaddr': '0x0', 'name': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/ContentIndex.framework/ContentIndex', 'type': 'apple', 'uuid': '766DFB14-72EE-32D2-8961-687D32548F2B'}, {'cpu_subtype': 3, 'cpu_type': 16777223, 'image_addr': '0x1406f000', 'image_size': 913408, 'image_vmaddr': '0x0', 'name': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/CorePDF.framework/CorePDF', 'type': 'apple', 'uuid': 'BE602DC1-D3A0-3389-B8F4-922C37DEA3DC'} ], context={ 'device': { 'arch': 'x86', 'family': 'iPhone', 'freeMemory': 169684992, 'memorySize': 17179869184, 'model': 'iPhone9,1', 'simulator': True, 'storageSize': 249695305728, 'type': 'device', 'usableMemory': 14919622656 }, 'os': { 'build': '16C67', 'bundleID': 'com.rokkincat.SentryExample', 'bundleVersion': '2', 'kernel_version': 'Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64', 'name': 'iOS', 'type': 'os', 'version': '10.2' } }) binary_images = acr.get_binary_images_apple_string() assert binary_images == 'Binary Images:\n\ 0x1400c000 - 0x1404cfff ContentIndex x86 <766dfb1472ee32d28961687d32548f2b> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/ContentIndex.framework/ContentIndex\n\ 0x1406f000 - 0x1414dfff CorePDF x86 <be602dc1d3a03389b8f4922c37dea3dc> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/CorePDF.framework/CorePDF\n\ 0x141c5000 - 0x141c9fff libswiftContacts.dylib x86 <4b5a054fb7a13ad081e1513b4dbe2a33> /Users/haza/Library/Developer/CoreSimulator/Devices/DDB32F4C-97CF-4E2B-BD10-EB940553F223/data/Containers/Bundle/Application/8C286977-D498-44FF-B7BE-42BFE3DE38BD/SwiftExample.app/Frameworks/libswiftContacts.dylib' def test__convert_debug_meta_to_binary_image_row(): acr = AppleCrashReport(context={'device': {'arch': 'x86', 'family': 'iPhone', 'freeMemory': 169684992, 'memorySize': 17179869184, 'model': 'iPhone9,1', 'simulator': True, 'storageSize': 249695305728, 'type': 'device', 'usableMemory': 14919622656 }, 'os': {'build': '16C67', 'bundleID': 'com.rokkincat.SentryExample', 'bundleVersion': '2', 'kernel_version': 'Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64', 'name': 'iOS', 'type': 'os', 'version': '10.2' } }) binary_image = acr._convert_debug_meta_to_binary_image_row(debug_image={ 'cpu_subtype': 3, 'cpu_type': 16777223, 'image_addr': '0xd69a000', 'image_size': 495616, 'image_vmaddr': '0x0', 'name': '/Users/haza/Library/Developer/CoreSimulator/Devices/DDB32F4C-97CF-4E2B-BD10-EB940553F223/data/Containers/Bundle/Application/8F8140DF-B25B-4088-B5FB-57F474A49CD6/SwiftExample.app/Frameworks/SentrySwift.framework/SentrySwift', 'type': 'apple', 'uuid': 'B427AE1D-BF36-3B50-936F-D78A7D1C8340' }) assert binary_image == '0xd69a000 - 0xd712fff SentrySwift x86 <b427ae1dbf363b50936fd78a7d1c8340> /Users/haza/Library/Developer/CoreSimulator/Devices/DDB32F4C-97CF-4E2B-BD10-EB940553F223/data/Containers/Bundle/Application/8F8140DF-B25B-4088-B5FB-57F474A49CD6/SwiftExample.app/Frameworks/SentrySwift.framework/SentrySwift' def test__get_exception_info(): acr = AppleCrashReport(exception=[{ "value": "Attempted to dereference garbage pointer 0x10.", "mechanism": { "posix_signal": { "name": "SIGBUS", "code_name": "BUS_NOOP", "signal": 10, "code": 0 }, "relevant_address": "0x10", "mach_exception": { "exception": 1, "exception_name": "EXC_BAD_ACCESS", "subcode": 8, "code": 16 } }, "type": "EXC_BAD_ACCESS", "thread_id": 0 }]) exception_info = acr._get_exception_info() assert exception_info == 'Exception Type: EXC_BAD_ACCESS (SIGBUS)\n\ Exception Codes: BUS_NOOP at 0x10\n\ Crashed Thread: 0\n\n\ Application Specific Information:\n\ Attempted to dereference garbage pointer 0x10.' def test__get_exception_info_partial(): acr = AppleCrashReport(exception=[{ "value": "Attempted to dereference garbage pointer 0x10.", "mechanism": { "posix_signal": None, "mach_exception": None, }, "type": "EXC_BAD_ACCESS", "thread_id": 0 }]) exception_info = acr._get_exception_info() assert exception_info == '\ Crashed Thread: 0\n\n\ Application Specific Information:\n\ Attempted to dereference garbage pointer 0x10.'
2014c2g23/2015cda-w17
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/_testcapi.py
742
CHAR_MAX = 127 CHAR_MIN = -128 DBL_MAX = 1.7976931348623157e+308 DBL_MIN = 2.2250738585072014e-308 FLT_MAX = 3.4028234663852886e+38 FLT_MIN = 1.1754943508222875e-38 INT_MAX = 2147483647 INT_MIN = -2147483648 LLONG_MAX = 9223372036854775807 LLONG_MIN = -9223372036854775808 LONG_MAX = 2147483647 LONG_MIN = -2147483648 PY_SSIZE_T_MAX = 2147483647 PY_SSIZE_T_MIN = -2147483648 SHRT_MAX = 32767 SHRT_MIN = -32768 SIZEOF_PYGC_HEAD = 16 UCHAR_MAX = 255 UINT_MAX = 4294967295 ULLONG_MAX = 18446744073709551615 ULONG_MAX = 4294967295 USHRT_MAX = 65535 __loader__ = "<_frozen_importlib.ExtensionFileLoader object at 0x00C98DD0>" def _pending_threadfunc(*args,**kw): pass class _test_structmembersType(object): pass def _test_thread_state(*args,**kw): pass def argparsing(*args,**kw): pass def code_newempty(*args,**kw): pass def codec_incrementaldecoder(*args,**kw): pass def codec_incrementalencoder(*args,**kw): pass def crash_no_current_thread(*args,**kw): pass class error(Exception): pass def exception_print(*args,**kw): pass def getargs_B(*args,**kw): pass def getargs_H(*args,**kw): pass def getargs_I(*args,**kw): pass def getargs_K(*args,**kw): pass def getargs_L(*args,**kw): pass def getargs_Z(*args,**kw): pass def getargs_Z_hash(*args,**kw): pass def getargs_b(*args,**kw): pass def getargs_c(*args,**kw): pass def getargs_h(*args,**kw): pass def getargs_i(*args,**kw): pass def getargs_k(*args,**kw): pass def getargs_keyword_only(*args,**kw): pass def getargs_keywords(*args,**kw): pass def getargs_l(*args,**kw): pass def getargs_n(*args,**kw): pass def getargs_p(*args,**kw): pass def getargs_s(*args,**kw): pass def getargs_s_hash(*args,**kw): pass def getargs_s_star(*args,**kw): pass def getargs_tuple(*args,**kw): pass def getargs_u(*args,**kw): pass def getargs_u_hash(*args,**kw): pass def getargs_w_star(*args,**kw): pass def getargs_y(*args,**kw): pass def getargs_y_hash(*args,**kw): pass def getargs_y_star(*args,**kw): pass def getargs_z(*args,**kw): pass def getargs_z_hash(*args,**kw): pass def getargs_z_star(*args,**kw): pass class instancemethod(object): pass def make_exception_with_doc(*args,**kw): pass def make_memoryview_from_NULL_pointer(*args,**kw): pass def parse_tuple_and_keywords(*args,**kw): pass def pytime_object_to_time_t(*args,**kw): pass def pytime_object_to_timespec(*args,**kw): pass def pytime_object_to_timeval(*args,**kw): pass def raise_exception(*args,**kw): pass def raise_memoryerror(*args,**kw): pass def run_in_subinterp(*args,**kw): pass def set_exc_info(*args,**kw): pass def test_L_code(*args,**kw): pass def test_Z_code(*args,**kw): pass def test_capsule(*args,**kw): pass def test_config(*args,**kw): pass def test_datetime_capi(*args,**kw): pass def test_dict_iteration(*args,**kw): pass def test_empty_argparse(*args,**kw): pass def test_k_code(*args,**kw): pass def test_lazy_hash_inheritance(*args,**kw): pass def test_list_api(*args,**kw): pass def test_long_and_overflow(*args,**kw): pass def test_long_api(*args,**kw): pass def test_long_as_double(*args,**kw): pass def test_long_as_size_t(*args,**kw): pass def test_long_long_and_overflow(*args,**kw): pass def test_long_numbits(*args,**kw): pass def test_longlong_api(*args,**kw): pass def test_null_strings(*args,**kw): pass def test_s_code(*args,**kw): pass def test_string_from_format(*args,**kw): pass def test_string_to_double(*args,**kw): pass def test_u_code(*args,**kw): pass def test_unicode_compare_with_ascii(*args,**kw): pass def test_widechar(*args,**kw): pass def test_with_docstring(*args,**kw): """This is a pretty normal docstring.""" pass def traceback_print(*args,**kw): pass def unicode_aswidechar(*args,**kw): pass def unicode_aswidecharstring(*args,**kw): pass def unicode_encodedecimal(*args,**kw): pass def unicode_transformdecimaltoascii(*args,**kw): pass
xiangel/hue
refs/heads/master
apps/rdbms/src/rdbms/conf.py
1198
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
seankelly/buildbot
refs/heads/master
master/buildbot/worker/manager.py
11
# This file is part of Buildbot. Buildbot 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, version 2. # # 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. # # Copyright Buildbot Team Members from __future__ import absolute_import from __future__ import print_function from twisted.internet import defer from twisted.python import log from buildbot.process.measured_service import MeasuredBuildbotServiceManager from buildbot.util import misc from buildbot.util import service from buildbot.worker.protocols import pb as bbpb class WorkerRegistration(object): __slots__ = ['master', 'worker', 'pbReg'] def __init__(self, master, worker): self.master = master self.worker = worker def __repr__(self): return "<%s for %r>" % (self.__class__.__name__, self.worker.workername) @defer.inlineCallbacks def unregister(self): bs = self.worker # update with portStr=None to remove any registration in place yield self.master.workers.pb.updateRegistration( bs.workername, bs.password, None) yield self.master.workers._unregister(self) @defer.inlineCallbacks def update(self, worker_config, global_config): # For most protocols, there's nothing to do, but for PB we must # update the registration in case the port or password has changed. if 'pb' in global_config.protocols: self.pbReg = yield self.master.workers.pb.updateRegistration( worker_config.workername, worker_config.password, global_config.protocols['pb']['port']) def getPBPort(self): return self.pbReg.getPort() class WorkerManager(MeasuredBuildbotServiceManager): name = "WorkerManager" managed_services_name = "workers" config_attr = "workers" PING_TIMEOUT = 10 reconfig_priority = 127 def __init__(self, master): service.AsyncMultiService.__init__(self) self.pb = bbpb.Listener() self.pb.setServiceParent(master) # WorkerRegistration instances keyed by worker name self.registrations = {} # connection objects keyed by worker name self.connections = {} @property def workers(self): # self.workers contains a ready Worker instance for each # potential worker, i.e. all the ones listed in the config file. # If the worker is connected, self.workers[workername].worker will # contain a RemoteReference to their Bot instance. If it is not # connected, that attribute will hold None. # workers attribute is actually just an alias to multiService's # namedService return self.namedServices def getWorkerByName(self, workerName): return self.registrations[workerName].worker def register(self, worker): # TODO: doc that reg.update must be called, too workerName = worker.workername reg = WorkerRegistration(self.master, worker) self.registrations[workerName] = reg return defer.succeed(reg) def _unregister(self, registration): del self.registrations[registration.worker.workername] @defer.inlineCallbacks def newConnection(self, conn, workerName): if workerName in self.connections: log.msg("Got duplication connection from '%s'" " starting arbitration procedure" % workerName) old_conn = self.connections[workerName] try: yield misc.cancelAfter(self.PING_TIMEOUT, old_conn.remotePrint("master got a duplicate connection")) # if we get here then old connection is still alive, and new # should be rejected raise RuntimeError("rejecting duplicate worker") except defer.CancelledError: old_conn.loseConnection() log.msg("Connected worker '%s' ping timed out after %d seconds" % (workerName, self.PING_TIMEOUT)) except RuntimeError: raise except Exception as e: old_conn.loseConnection() log.msg("Got error while trying to ping connected worker %s:" "%s" % (workerName, e)) log.msg("Old connection for '%s' was lost, accepting new" % workerName) try: yield conn.remotePrint(message="attached") info = yield conn.remoteGetWorkerInfo() log.msg("Got workerinfo from '%s'" % workerName) except Exception as e: log.msg("Failed to communicate with worker '%s'\n" "%s" % (workerName, e)) raise conn.info = info self.connections[workerName] = conn def remove(): del self.connections[workerName] conn.notifyOnDisconnect(remove) # accept the connection defer.returnValue(True)
JuliaSprenger/python-odmltables
refs/heads/master
odmltables/gui/converterpages.py
1
# -*- coding: utf-8 -*- import copy import sys import os import subprocess import xlwt from future.utils import iteritems from PyQt5.QtCore import Qt import PyQt5.QtWidgets as Qtw import PyQt5.QtGui as Qtg from .pageutils import QIWizardPage, clearLayout, get_property, get_rgb, shorten_path from odmltables import odml_table, odml_xls_table, odml_csv_table, xls_style class LoadFilePage(QIWizardPage): def __init__(self, parent=None, filename=None): super(LoadFilePage, self).__init__(parent) if filename is None: self.inputfilename = '' else: self.inputfilename = filename self.settings.register('inputfilename', self, useconfig=False) # Set up layout self.layout = Qtw.QVBoxLayout() self.setLayout(self.layout) def initializePage(self): self.setTitle("Select an input file") self.setSubTitle("Select the file you want to convert and specify the" " output format you want to generate") vbox = self.layout # Adding input part topLabel = Qtw.QLabel(self.tr("Choose a file to load")) topLabel.setWordWrap(True) vbox.addWidget(topLabel) # vbox.addSpacing(10) # Add first horizontal box self.buttonbrowse = Qtw.QPushButton("Browse") self.buttonbrowse.clicked.connect(self.handlebuttonbrowse) self.inputfile = Qtw.QLabel(self.inputfilename) self.inputfile.setWordWrap(True) hbox1 = Qtw.QHBoxLayout() hbox1.addWidget(self.buttonbrowse) hbox1.addWidget(self.inputfile) hbox1.addStretch() vbox.addLayout(hbox1) self.cbcustominput = Qtw.QCheckBox('I changed the column names in the' ' input table.') self.cbcustominput.setEnabled(False) self.settings.register('CBcustominput', self.cbcustominput) vbox.addWidget(self.cbcustominput) vbox.addStretch() # adding configuration selection configlabel = Qtw.QLabel('Load a configuration from a previous run') vbox.addWidget(configlabel) self.configselection = Qtw.QComboBox() self.configselection.addItems(self.settings.get_all_config_names()) self.configselection.insertItem(0, '-- No configuration --') self.configselection.setCurrentIndex(0) self.configselection.activated.connect(self.selectconfig) vbox.addWidget(self.configselection) # adding separator horizontalLine = Qtw.QFrame() horizontalLine.setFrameStyle(Qtw.QFrame.HLine) horizontalLine.setSizePolicy(Qtw.QSizePolicy.Expanding, Qtw.QSizePolicy.Minimum) vbox.addWidget(horizontalLine) # Adding output part bottomLabel = Qtw.QLabel(self.tr("Select an output format")) bottomLabel.setWordWrap(True) vbox.addWidget(bottomLabel) vbox.addWidget(bottomLabel) # Add second horizontal box self.rbuttonxls = Qtw.QRadioButton(self.tr("xls")) self.rbuttoncsv = Qtw.QRadioButton(self.tr("csv")) self.rbuttonodml = Qtw.QRadioButton(self.tr("odml")) self.settings.register('RBoutputxls', self.rbuttonxls) self.settings.register('RBoutputcsv', self.rbuttoncsv) self.settings.register('RBoutputodml', self.rbuttonodml) hbox2 = Qtw.QHBoxLayout() hbox2.addWidget(self.rbuttonxls) hbox2.addSpacing(50) hbox2.addWidget(self.rbuttoncsv) hbox2.addSpacing(50) hbox2.addWidget(self.rbuttonodml) hbox2.addStretch() vbox.addLayout(hbox2) vbox.addStretch() def selectconfig(self): if self.configselection.currentIndex() != 0: self.settings.load_config(str(self.configselection.currentText())) # loading output format choice self.settings.register('RBoutputxls', self.rbuttonxls) self.settings.register('RBoutputcsv', self.rbuttoncsv) self.settings.register('RBoutputodml', self.rbuttonodml) self.settings.register('CBcustominput', self.cbcustominput) self.settings.register('inputfilename', self, useconfig=False) short_filename = shorten_path(self.settings.get_object('inputfilename')) self.inputfile.setText(short_filename) # self.settings.get_object('RBoutputxls') def handlebuttonbrowse(self): dlg = Qtw.QFileDialog() fn = self.settings.get_object('inputfilename') if fn: dlg.selectFile(fn) if dlg.exec_(): self.inputfilename = str(dlg.selectedFiles()[0]) self.settings.register('inputfilename', self, useconfig=False) self.inputfile.setText(shorten_path(self.inputfilename)) if str(self.inputfilename[-4:]) in ['.xls', '.csv']: self.cbcustominput.setEnabled(True) else: self.cbcustominput.setEnabled(False) if not (self.rbuttonxls.isChecked() or self.rbuttoncsv.isChecked() or self.rbuttonodml.isChecked()): if str(self.inputfilename[-4:]) in ['.xls', '.csv']: self.rbuttonodml.setChecked(True) elif (str(self.inputfilename[-5:]) in ['.odml'] or str(self.inputfilename[-4:]) in ['.xml']): self.rbuttonxls.setChecked(True) def validatePage(self): if not any((self.settings.get_object('RBoutputxls').isChecked(), self.settings.get_object('RBoutputcsv').isChecked(), self.settings.get_object('RBoutputodml').isChecked())): Qtw.QMessageBox.warning(self, 'Select a format', 'You need to select a ' 'table format to ' 'continue.') return 0 if ((not self.settings.is_registered('inputfilename')) or (not self.settings.get_object('inputfilename'))): Qtw.QMessageBox.warning(self, 'Select an input file', 'You need to select' ' an input file to ' 'continue.') return 0 elif self.settings.get_object('inputfilename').split('.')[-1] not in \ ['xls', 'csv', 'odml', 'xml']: Qtw.QMessageBox.warning(self, 'Wrong input format', 'The input file has to be an ".xls", ".csv", ".odml" or ' '".xml" file.') return 0 return 1 def nextId(self): if ((self.inputfilename[-5:] != '.odml') and (self.settings.get_object('CBcustominput').isChecked())): return self.wizard().PageCustomInputHeader elif not self.settings.get_object('RBoutputodml').isChecked(): return self.wizard().PageHeaderOrder else: return self.wizard().PageSaveFile # if self.inputfilename[-5:] != '.odml': # if self.settings.get_object('CBcustominput').isChecked(): # return self.wizard().PageCustomInputHeader # else: # return self.wizard().PageHeaderOrder # else: # if (self.settings.get_object('RBoutputxls').isChecked() or # self.settings.get_object('RBoutputcsv').isChecked()): # # return self.wizard().PageHeaderOrder # # else: # return self.wizard().PageSaveFile class CustomInputHeaderPage(QIWizardPage): def __init__(self, parent=None): super(CustomInputHeaderPage, self).__init__(parent) self.setTitle("Provide information about your input file") self.setSubTitle("Which titles were used for which odml column in you " "input file. Select the corresponding odml columns.") # Set up layout self.vbox = Qtw.QVBoxLayout() self.setLayout(self.vbox) # self.vbox = QVBoxLayout() # self.layout.addLayout(self.vbox) def initializePage(self): # Set up layout vbox = Qtw.QVBoxLayout() clearLayout(self.layout()) self.layout().addLayout(vbox) # Adding input part topLabel = Qtw.QLabel(self.tr("Provide the column types used in the input " "table")) topLabel.setWordWrap(True) vbox.addSpacing(20) vbox.addWidget(topLabel) vbox.addSpacing(20) self.grid = Qtw.QGridLayout() vbox.addLayout(self.grid) # self.setLayout(vbox) # get header names from input file load_from = str(self.settings.get_object('inputfilename')) if load_from.endswith('.xls'): inputxlsheaders = odml_table.OdmlTable.get_xls_header(load_from) elif load_from.endswith('.csv'): inputxlsheaders = odml_table.OdmlTable.get_csv_header(load_from) else: raise TypeError('Header can be only read for xls or csv files.') odtables = odml_table.OdmlTable() header_names = list(odtables._header_titles.values()) self.headerlabels = [] self.customheaders = [] for h, header in enumerate(inputxlsheaders): # set up individual row for header association h_label = Qtw.QLabel(header) dd_list = Qtw.QComboBox() dd_list.addItems(header_names) # Preselect fitting header name if possible if header in header_names: ind = header_names.index(header) dd_list.setCurrentIndex(ind) self.grid.addWidget(h_label, h, 0) self.grid.addWidget(dd_list, h, 1) self.headerlabels.append(h_label) self.customheaders.append(dd_list) self.settings.register('headerlabels', self.headerlabels) self.settings.register('customheaders', self.customheaders) self.update() def validatePage(self): header_names = [] # check for duplicate headers for h in self.customheaders: header_name = h.currentText() if header_name in header_names: Qtw.QMessageBox.warning(self, self.tr("Non-unique headers"), self.tr("Header assignment has" " to be unique. '%s' has been" " assigned multiple times" % header_name)) return 0 header_names.append(header_name) # check for mandatory headers mandatory_headers = ['Path to Section', 'Property Name', 'Value', 'odML Data Type'] for mand_head in mandatory_headers: if mand_head not in header_names: Qtw.QMessageBox.warning(self, self.tr("Incomplete headers"), self.tr("You need to have the mandatory" " headers %s in you table to be" " able to reconstruct an odml" "" % mandatory_headers)) return 0 return 1 def nextId(self): if self.settings.get_object('RBoutputodml').isChecked(): return self.wizard().PageSaveFile return self.wizard().PageHeaderOrder class HeaderOrderPage(QIWizardPage): def __init__(self, parent=None): super(HeaderOrderPage, self).__init__(parent) self.setTitle("Customize the output table") self.setSubTitle("Select the columns for the output table by putting " "them in the list of selected columns and arranging " "the order using the buttons to the right") # Set up layout vbox = Qtw.QVBoxLayout() self.setLayout(vbox) topLabel = Qtw.QLabel(self.tr("Select the columns for the output table")) topLabel.setWordWrap(True) vbox.addWidget(topLabel) vbox.addSpacing(20) hbox0 = Qtw.QHBoxLayout() hbox0.addStretch() hbox0.addWidget(Qtw.QLabel('available columns')) hbox0.addStretch() hbox0.addSpacing(90) hbox0.addWidget(Qtw.QLabel('selected columns')) hbox0.addStretch() hbox0.addSpacing(30) vbox.addLayout(hbox0) # Adding input part odtables = odml_table.OdmlTable() self.header_names = list(odtables._header_titles.values()) # generating selection lists self.header_list = Qtw.QListWidget() self.header_list.setSelectionMode(3) self.header_list.itemDoubleClicked.connect(self.itemdoubleclicked) self.selection_list = Qtw.QListWidget() self.selection_list.setSelectionMode(3) self.selection_list.itemDoubleClicked.connect(self.itemdoubleclicked) toright = Qtw.QToolButton() toright.setArrowType(Qt.RightArrow) toright.clicked.connect(self.toright) toleft = Qtw.QToolButton() toleft.setArrowType(Qt.LeftArrow) toleft.clicked.connect(self.toleft) hbox = Qtw.QHBoxLayout() hbox.addWidget(self.header_list) vboxbuttons = Qtw.QVBoxLayout() vboxbuttons.addStretch() vboxbuttons.addWidget(toright) vboxbuttons.addSpacing(30) vboxbuttons.addWidget(toleft) vboxbuttons.addStretch() hbox.addLayout(vboxbuttons) vbox.addLayout(hbox) default_selection_list = ['Path to Section', 'Property Name', 'Value', 'odML Data Type'] self.mandatory_headers = copy.deepcopy(default_selection_list) for i, h in enumerate(self.header_names): if h not in default_selection_list: item = Qtw.QListWidgetItem() item.setText(h) self.header_list.addItem(item) else: item = Qtw.QListWidgetItem() item.setText(h) self.selection_list.addItem(item) hbox.addWidget(self.selection_list) # adding up and down buttons up = Qtw.QToolButton() up.setArrowType(Qt.UpArrow) up.clicked.connect(self.up) down = Qtw.QToolButton() down.setArrowType(Qt.DownArrow) down.clicked.connect(self.down) vboxbuttons2 = Qtw.QVBoxLayout() vboxbuttons2.addStretch() vboxbuttons2.addWidget(up) vboxbuttons2.addSpacing(30) vboxbuttons2.addWidget(down) vboxbuttons2.addStretch() hbox.addLayout(vboxbuttons2) vbox.addSpacing(20) def initializePage(self): # Set up layout self.settings.register('LWselectedcolumns', self.selection_list) self.settings.register('LWnonselectedcolumns', self.header_list) def toright(self): # sort rows in descending order in order to compensate shifting # due to takeItem rows = sorted( [index.row() for index in self.header_list.selectedIndexes()], reverse=True) for row in rows: self.selection_list.addItem(self.header_list.takeItem(row)) def toleft(self): # sort rows in descending order in order to compensate shifting # due to takeItem rows = sorted([index.row() for index in self.selection_list.selectedIndexes()], reverse=True) for row in rows: self.header_list.addItem(self.selection_list.takeItem(row)) def up(self): currentRow = self.selection_list.currentRow() currentItem = self.selection_list.takeItem(currentRow) self.selection_list.insertItem(currentRow - 1, currentItem) self.selection_list.setCurrentRow(currentRow - 1) def down(self): currentRow = self.selection_list.currentRow() currentItem = self.selection_list.takeItem(currentRow) self.selection_list.insertItem(currentRow + 1, currentItem) self.selection_list.setCurrentRow(currentRow + 1) def itemdoubleclicked(self): sender = self.sender() if sender == self.header_list: self.toright() elif sender == self.selection_list: self.toleft() else: raise ValueError('Unknown sender') def validatePage(self): # check number of selected headers if self.settings.get_object('LWselectedcolumns').count() < 1: Qtw.QMessageBox.warning(self, self.tr("No header selected"), self.tr("You need to select at least one header" " to generate a table representation " "of an odml.")) return 0 selectedheaderstrings = [] for itemid in list(range(self.settings.get_object( 'LWselectedcolumns').count())): selectedheaderstrings.append(self.settings.get_object( 'LWselectedcolumns').item(itemid).text()) missing_headers = [] for mand_header in self.mandatory_headers: if mand_header not in selectedheaderstrings: missing_headers.append(mand_header) if missing_headers != []: Qtw.QMessageBox.warning(self, self.tr("Incomplete odml"), self.tr("You need to include the headers %s " " in your table if you want to be " "able to generate an odml from the table." % ( missing_headers))) return 1 class CustomColumnNamesPage(QIWizardPage): def __init__(self, parent=None): super(CustomColumnNamesPage, self).__init__(parent) # Set up layout vbox = Qtw.QVBoxLayout() self.setLayout(vbox) self.setTitle("Customize the output table") self.setSubTitle("Define the titles to be displayed for the " "different odml columns in your output table") def initializePage(self): # Set up layout vbox = Qtw.QVBoxLayout() clearLayout(self.layout()) self.layout().addLayout(vbox) topLabel = Qtw.QLabel(self.tr("Customize header names of output table")) topLabel.setWordWrap(True) vbox.addWidget(topLabel) vbox.addSpacing(20) self.grid = Qtw.QGridLayout() vbox.addLayout(self.grid) # Adding input part # get selected columns from HeaderOrderPage selectedheaderstrings = [] for itemid in list(range(self.settings.get_object( 'LWselectedcolumns').count())): selectedheaderstrings.append(self.settings.get_object( 'LWselectedcolumns').item(itemid).text()) # show marking option only for xls output enable_marking = False if self.settings.get_object('RBoutputxls').isChecked(): enable_marking = True # clear grid while self.grid.count(): item = self.grid.takeAt(0) widget = item.widget() widget.deleteLater() # self.grid.removeWidget(widget) self.grid.invalidate() self.customheaderlabels = [] self.columnmarkings = False headerlabel = Qtw.QLabel('Odml Header') headerlabel.setStyleSheet('font: bold 14px') self.grid.addWidget(headerlabel, 0, 0) customlabel = Qtw.QLabel('Customized Label') customlabel.setStyleSheet('font: bold 14px') self.grid.addWidget(customlabel, 0, 1) if enable_marking: markinglabel = Qtw.QLabel('Highlight Column') markinglabel.setStyleSheet('font: bold 14px') self.grid.addWidget(markinglabel, 0, 2) for h, selheaderstr in enumerate(selectedheaderstrings): label = Qtw.QLabel(selheaderstr) customheader = Qtw.QLineEdit() customheader.setText(selheaderstr) self.customheaderlabels.append(customheader) self.grid.addWidget(label, h + 1, 0) self.grid.addWidget(customheader, h + 1, 1) if enable_marking: cbmarking = Qtw.QCheckBox() self.grid.addWidget(cbmarking, h + 1, 2) if self.columnmarkings == False: self.columnmarkings = [] self.columnmarkings.append(cbmarking) self.grid.setAlignment(cbmarking, Qt.AlignCenter) try: self.settings.register('customheaderlabels', self.customheaderlabels) self.settings.register('columnmarkings', self) except IndexError: self.settings.register('customheaderlabels', self.customheaderlabels, useconfig=False) self.settings.register('columnmarkings', self.columnmarkings, useconfig=False) def validatePage(self): # get manually entered labels customlabels = [le.text() for le in self.settings.get_object('customheaderlabels')] if any([label == '' for label in customlabels]): Qtw.QMessageBox.warning(self, self.tr("Empty header name"), self.tr( "You need to provide a unique, " "non empty " "name for each of your selected " "headers")) return 0 for l, label in enumerate(customlabels): if label in customlabels[:l] + customlabels[l + 1:]: Qtw.QMessageBox.warning(self, self.tr("Ambiguous header name"), self.tr( "You used '%s' as label for " "multiple " "headers. " " You need to provide a unique " " name for each of your selected " "headers" % ( label))) return 0 return 1 def nextId(self): if self.settings.get_object('RBoutputxls').isChecked(): return self.wizard().currentId() + 1 else: return self.wizard().PageSaveFile class ColorPatternPage(QIWizardPage): def __init__(self, parent=None): super(ColorPatternPage, self).__init__(parent) self.setTitle("Customize the output table") self.setSubTitle("Select the color pattern and style to be used in " "the xls table") # Set up layout self.vbox = Qtw.QVBoxLayout() self.setLayout(self.vbox) def initializePage(self): # Set up layout vbox = Qtw.QVBoxLayout() clearLayout(self.layout()) self.layout().addLayout(vbox) # adding pattern selection part topLabel = Qtw.QLabel(self.tr("Which color pattern shall be used?")) topLabel.setWordWrap(True) vbox.addWidget(topLabel) vbox.addSpacing(20) self.rbalternating = Qtw.QRadioButton('alternating') self.rbcheckerboard = Qtw.QRadioButton('checkerboard') self.rbnopattern = Qtw.QRadioButton('no pattern') patterngroup = Qtw.QButtonGroup(vbox) patterngroup.addButton(self.rbalternating) patterngroup.addButton(self.rbcheckerboard) patterngroup.addButton(self.rbnopattern) self.rbalternating.setChecked(True) self.rbnopattern.toggled.connect(self.updatelayout) self.settings.register('RBalternating', self.rbalternating) self.settings.register('RBcheckerboard', self.rbcheckerboard) self.settings.register('RBnopattern', self.rbnopattern) vbox.addWidget(self.rbalternating) vbox.addWidget(self.rbcheckerboard) vbox.addWidget(self.rbnopattern) vbox.addSpacing(40) # adding style switch part self.bottomLabel = Qtw.QLabel(self.tr("When shall the style switch? " "Beginning of a new")) self.bottomLabel.setWordWrap(True) # self.bottomLabel.setEnabled(False) vbox.addWidget(self.bottomLabel) vbox.addSpacing(20) self.rbsection = Qtw.QRadioButton('Section') self.rbproperty = Qtw.QRadioButton('Property') self.rbvalue = Qtw.QRadioButton('Value') self.rbsection.setChecked(True) # self.rbsection.setEnabled(False) # self.rbproperty.setEnabled(False) # self.rbvalue.setEnabled(False) self.settings.register('RBsection', self.rbsection) self.settings.register('RBproperty', self.rbproperty) self.settings.register('RBvalue', self.rbvalue) changegroup = Qtw.QButtonGroup(vbox) changegroup.addButton(self.rbsection) changegroup.addButton(self.rbproperty) changegroup.addButton(self.rbvalue) vbox.addWidget(self.rbsection) vbox.addWidget(self.rbproperty) vbox.addWidget(self.rbvalue) def updatelayout(self): if self.rbnopattern.isChecked(): self.bottomLabel.setEnabled(False) self.rbsection.setEnabled(False) self.rbproperty.setEnabled(False) self.rbvalue.setEnabled(False) else: self.bottomLabel.setEnabled(True) self.rbsection.setEnabled(True) self.rbproperty.setEnabled(True) self.rbvalue.setEnabled(True) class ChangeStylePage(QIWizardPage): def __init__(self, parent=None): super(ChangeStylePage, self).__init__(parent) self.setTitle("Customize the output table") self.setSubTitle("Select the color colors and fontstyles to be used " "in the xls table") # Set up layout self.vbox = Qtw.QVBoxLayout() self.setLayout(self.vbox) def initializePage(self): # Set up layout vbox = Qtw.QVBoxLayout() clearLayout(self.layout()) self.layout().addLayout(vbox) # adding pattern selection part topLabel = Qtw.QLabel(self.tr("Click on a field to choose the style for " "this field")) topLabel.setWordWrap(True) vbox.addWidget(topLabel) vbox.addSpacing(20) hbox = Qtw.QHBoxLayout() hbox.setAlignment(Qt.AlignCenter) texts = ['Header', 'Standard\nRow 1', 'Standard\nRow 2', 'Marked \nRow 1', 'Marked \nRow 2', 'Default Value'] default_styles = [ 'color: rgb(255,255,255); background-color: rgb(51,51,51); ' 'font:bold', 'color: rgb(255,255,255); background-color: rgb(0,128,0)', 'color: rgb(255,255,255); background-color: rgb(0,0,128)', 'color: rgb(0,0,0); background-color: rgb(204,255,204)', 'color: rgb(0,0,0); background-color: rgb(204,255,255)', 'color: rgb(0,0,0); background-color: rgb(255,0,0)'] common_default = "; padding-left: 5px; padding-right: 5px;" \ " padding-top: 5px; padding-bottom: 5px;" \ " border-color: rgb(255,0,0)" # ''padding: 6px' positions = [(0, 0, 1, 2), (1, 0), (2, 0), (1, 1), (2, 1), (3, 0, 1, 2)] self.tablebuttons = [None] * len(texts) gridtable = Qtw.QGridLayout() for i in list(range(len(self.tablebuttons))): self.tablebuttons[i] = Qtw.QPushButton() self.tablebuttons[i].setText(texts[i]) self.tablebuttons[i].setStyleSheet(default_styles[i]) self.tablebuttons[i].setStyleSheet( self.tablebuttons[i].styleSheet() + common_default) self.tablebuttons[i].setAutoFillBackground(True) self.tablebuttons[i].clicked.connect(self.updatesettings) gridtable.addWidget(self.tablebuttons[i], *positions[i]) self.cbhighlightdefaults = Qtw.QCheckBox('Highlight default values') self.cbhighlightdefaults.setChecked(True) # add spacer for invisible 'default value' button self.spacer = Qtw.QSpacerItem(10, 0) gridtable.setSpacing(0) vstretcher = Qtw.QVBoxLayout() vstretcher.addStretch(1) vstretcher.addLayout(gridtable) vstretcher.addSpacerItem(self.spacer) vstretcher.addSpacing(10) vstretcher.addWidget(self.cbhighlightdefaults) vstretcher.addStretch(1) hbox.addLayout(vstretcher) # adding separator verticalLine = Qtw.QFrame() verticalLine.setFrameStyle(Qtw.QFrame.VLine) verticalLine.setSizePolicy(Qtw.QSizePolicy.Minimum, Qtw.QSizePolicy.Expanding) hbox.addWidget(verticalLine) self.cbbgcolor = ColorListWidget() self.cbfontcolor = ColorListWidget() self.cbboldfont = Qtw.QCheckBox('bold') self.cbboldfont.setStyleSheet('font:bold') self.cbitalicfont = Qtw.QCheckBox('italic') self.cbitalicfont.setStyleSheet('font:italic') gridsettings = Qtw.QGridLayout() self.settingstitle = Qtw.QLabel() self.settingstitle.setText('-') self.settingstitle.setStyleSheet('font:bold 16px') gridsettings.addWidget(self.settingstitle, 0, 0, 1, 1) gridsettings.addWidget(Qtw.QLabel('Backgroundcolor'), 1, 0) gridsettings.addWidget(self.cbbgcolor, 1, 1) gridsettings.addWidget(Qtw.QLabel('Fontcolor'), 2, 0) gridsettings.addWidget(self.cbfontcolor, 2, 1) gridsettings.addWidget(Qtw.QLabel('Fontstyle'), 3, 0) gridsettings.addWidget(self.cbboldfont, 3, 1) gridsettings.addWidget(self.cbitalicfont, 4, 1) gridsettings.setSpacing(0) gridsettings.setAlignment(Qt.AlignCenter) hbox.addLayout(gridsettings) vbox.addLayout(hbox) self.currentbutton = self.tablebuttons[0] for i in list(range(len(self.tablebuttons))): self.settings.register(texts[i], self.tablebuttons[i]) self.cbitalicfont.toggled.connect(self.updatetable) self.cbboldfont.toggled.connect(self.updatetable) self.cbhighlightdefaults.toggled.connect(self.updatedefaultbutton) self.settings.register('CBhighlightdefaults', self.cbhighlightdefaults) self.cbbgcolor.currentIndexChanged.connect(self.updatetable) self.settings.register('CBbgcolor', self.cbbgcolor, useconfig=False) self.cbfontcolor.currentIndexChanged.connect(self.updatetable) self.settings.register('CBfontcolor', self.cbfontcolor, useconfig=False) def updatesettings(self): sender = self.sender() self.currentbutton = sender # show selected button sender.setStyleSheet(sender.styleSheet() + '; border: 2px solid red') # unselect other buttons for button in self.tablebuttons: if button != sender: button.setStyleSheet(self.removestyle(button.styleSheet(), 'border')) # update header of selection part (right part) self.settingstitle.setText(sender.text().replace('\n', ' ')) # update backgroundcolor color = get_rgb(get_property(sender.styleSheet(), 'background-color')) index = self.cbbgcolor.xlwt_rgbcolors.index(color) if index >= 0: self.cbbgcolor.setCurrentIndex(index) else: pass # update fontcolor color = get_rgb(get_property(sender.styleSheet(), 'color')) index = self.cbfontcolor.xlwt_rgbcolors.index(color) if index >= 0: self.cbfontcolor.setCurrentIndex(index) else: pass # update font style font_style = get_property(sender.styleSheet(), 'font') if font_style == None: font_style = '' self.cbboldfont.setChecked('bold' in font_style) self.cbitalicfont.setChecked('italic' in font_style) def updatetable(self): sender = self.sender() # updates from comboboxes if sender in [self.cbbgcolor, self.cbfontcolor]: if sender == self.cbbgcolor: to_update = 'background-color' new_style_value = 'rgb%s;' % ( str(self.cbbgcolor.get_current_rgb())) elif sender == self.cbfontcolor: to_update = 'color' new_style_value = 'rgb%s;' % ( str(self.cbfontcolor.get_current_rgb())) self.currentbutton.setStyleSheet( self.removestyle(self.currentbutton.styleSheet(), to_update) + '; %s:%s' % (to_update, new_style_value)) # updates from checkboxes elif sender in [self.cbboldfont, self.cbitalicfont]: new_style = self.currentbutton.styleSheet() if sender == self.cbboldfont: new_value = 'bold' elif sender == self.cbitalicfont: new_value = 'italic' new_style.replace(new_value, '') if sender.isChecked(): if 'font:' in new_style: new_style.replace('font:', 'font: %s ' % new_value) else: new_style += '; font:%s' % new_value elif get_property(new_style, 'font').strip(' ') == '': new_style.replace('font:', '') self.currentbutton.setStyleSheet(new_style) def removestyle(self, style, property): styles = [str(s) for s in style.split(';')] s = 0 while s < len(styles): if styles[s].strip(' ').startswith(property + ':'): styles.pop(s) styles = [s.strip(' ').rstrip(' ') for s in styles if s.strip(' ') != ''] else: s += 1 return '; '.join(styles) def updatedefaultbutton(self): self.layout().activate() self.tablebuttons[5].setVisible(self.cbhighlightdefaults.isChecked()) if self.cbhighlightdefaults.isChecked(): height = 0 else: height = self.tablebuttons[5].height() self.spacer.changeSize(self.tablebuttons[5].width(), height, Qtw.QSizePolicy.Fixed, Qtw.QSizePolicy.Fixed) self.layout().invalidate() class SaveFilePage(QIWizardPage): def __init__(self, parent=None): super(SaveFilePage, self).__init__(parent) self.setTitle("Save the result") self.setSubTitle("Select a location to save your file. You can save the" " settings made during this generation with a custom " "configuration name. This configuration can be used " "in future runs of the gui.") # Set up layout self.vbox = Qtw.QVBoxLayout() self.setLayout(self.vbox) def add_new_conf(self, configlist): item = Qtw.QListWidgetItem() item.setFlags(item.flags() | Qt.ItemIsEditable) item.setText('<Click here enter a new configuration name>') configlist.insertItem(-1, item) def newconfname(self): sender = self.sender().currentItem() if sender.text() == '<Click here enter a new configuration name>': sender.setText('') def deleteconfname(self): if self.configlist.currentItem() == None: Qtw.QMessageBox.warning(self, 'No configuration selected', 'You need to select a configuration in' ' order to delete it.') else: conf_name = str(self.configlist.currentItem().text()) quit_msg = "Are you sure you want to delete the configuration " \ "'%s'?" % (conf_name) reply = Qtw.QMessageBox.question(self, 'Message', quit_msg, Qtw.QMessageBox.Yes, Qtw.QMessageBox.No) if reply == Qtw.QMessageBox.Yes: self.configlist.takeItem(self.configlist.currentRow()) self.settings.delete_config(conf_name) else: pass def initializePage(self): # Set up layout vbox = Qtw.QVBoxLayout() clearLayout(self.layout()) self.layout().addLayout(vbox) # adding pattern selection part self.topLabel = Qtw.QLabel(self.tr("Where do you want to save your file?")) self.topLabel.setWordWrap(True) vbox.addWidget(self.topLabel) # vbox.addSpacing(40) # Add first horizontal box self.buttonbrowse = Qtw.QPushButton("Save file") self.buttonbrowse.clicked.connect(self.handlebuttonbrowse) self.buttonbrowse.setFocus() self.outputfilename = '' self.outputfile = Qtw.QLabel(self.outputfilename) self.outputfile.setWordWrap(True) self.buttonshow = Qtw.QPushButton("Open file") self.buttonshow.clicked.connect(self.show_file) self.buttonshow.setEnabled(False) self.buttonsaveconfig = Qtw.QPushButton("Save configuration") self.buttonsaveconfig.clicked.connect(self.saveconfig) self.buttondeleteconfig = Qtw.QPushButton("Delete configuration") self.buttondeleteconfig.clicked.connect(self.deleteconfname) hbox = Qtw.QHBoxLayout() hbox.addWidget(self.buttonbrowse) hbox.addWidget(self.outputfile) hbox.addStretch() vbox.addLayout(hbox) # vbox.addSpacing(10) vbox.addWidget(self.buttonshow) vbox.addStretch() # adding separator horizontalLine = Qtw.QFrame() horizontalLine.setFrameStyle(Qtw.QFrame.HLine) horizontalLine.setSizePolicy(Qtw.QSizePolicy.Expanding, Qtw.QSizePolicy.Minimum) vbox.addWidget(horizontalLine) vbox.addWidget(Qtw.QLabel('You can save the configuration used in ' 'this run')) grid = Qtw.QGridLayout() self.configlist = Qtw.QListWidget() self.configlist.itemActivated.connect(self.newconfname) self.add_new_conf(self.configlist) grid.addWidget(self.configlist, 0, 0, 1, 2) grid.addWidget(self.buttonsaveconfig, 1, 0) grid.addWidget(self.buttondeleteconfig, 1, 1) vbox.addLayout(grid) self.settings.register('outputfilename', self, useconfig=False) short_filename = shorten_path(self.outputfilename) self.outputfile.setText(short_filename) if self.settings.get_object('RBoutputxls').isChecked(): self.expected_extensions = ['.xls'] elif self.settings.get_object('RBoutputcsv').isChecked(): self.expected_extensions = ['.csv'] elif self.settings.get_object('RBoutputodml').isChecked(): self.expected_extensions = ['.odml', '.xml'] else: raise ValueError('Can not save file without selection of ' 'output format.') self.topLabel.setText("Where do you want to save your %s file?" % '/'.join([ext.strip('.') for ext in self.expected_extensions])) self.configlist.addItems(self.settings.get_all_config_names()) self.issaved = False def handlebuttonbrowse(self): dlg = Qtw.QFileDialog() dlg.setFileMode(Qtw.QFileDialog.AnyFile) dlg.setAcceptMode(Qtw.QFileDialog.AcceptSave) dlg.setLabelText(Qtw.QFileDialog.Accept, "Generate File") dlg.setDefaultSuffix(self.expected_extensions[0].strip('.')) inputfilename = self.settings.get_object('inputfilename') dirname = os.path.dirname(inputfilename) suggested_filename = os.path.splitext(os.path.basename( inputfilename))[0] + self.expected_extensions[0] dlg.setDirectory(dirname) dlg.selectFile(suggested_filename) filternames = ["%s files (*%s)" % (ext.strip('.'), ext) for ext in self.expected_extensions] filternames += ['all files (*)'] dlg.setNameFilters(filternames) # filenames = [] if dlg.exec_(): self.outputfilename = str(dlg.selectedFiles()[0]) # extending filename if no extension is present if (self.outputfilename != '' and os.path.splitext(self.outputfilename)[1] == ''): self.outputfilename += self.expected_extensions[0] short_filename = shorten_path(self.outputfilename) self.outputfile.setText(short_filename) if ((os.path.splitext(self.outputfilename)[ 1] not in self.expected_extensions) and (os.path.splitext(self.outputfilename)[1] != '')): Qtw.QMessageBox.warning(self, 'Wrong file format', 'The output file format is supposed to be "%s",' ' but you selected "%s"' '' % (' or '.join(self.expected_extension), os.path.splitext(self.outputfilename)[1])) self.handlebuttonbrowse() elif self.outputfilename != '': self.issaved = True convert(self.settings) print('Complete!') self.buttonshow.setEnabled(True) def show_file(self): platform = sys.platform if platform.startswith('linux'): subprocess.Popen(["nohup", "see", self.outputfilename]) elif platform == 'darwin': subprocess.Popen(["open", self.outputfilename]) elif platform.startswith('win'): subprocess.Popen(["start", self.outputfilename]) else: raise ValueError('Unknown operating platform "{}".'.format(platform)) def saveconfig(self): if ((self.configlist.currentItem() == None) or (str(self.configlist.currentItem().text()) in ['', '<Click here enter a new configuration name>'])): Qtw.QMessageBox.warning(self, 'No configuration name selected', 'You need to select a name for your ' 'configuration if you want to save it or ' 'define a new one (<Click here enter a new ' 'configuration name>)') else: config_name = str(self.configlist.currentItem().text()) curritem = self.configlist.currentItem() if self.configlist.currentRow() != 0: self.configlist.item(0).setText( '<Click here enter a new configuration name>') elif config_name in self.settings.get_all_config_names(): Qtw.QMessageBox.warning(self, 'Configuration already exists', 'You need to chose a new name for your ' 'configuration.' 'The name "%s" already exists' % config_name) else: curritem.setFlags((Qt.ItemIsSelectable | Qt.ItemIsEnabled)) self.add_new_conf(self.configlist) self.settings.config_name = config_name self.settings.save_config() def validatePage(self): if self.issaved == False: quit_msg = "Are you sure you want to exit the program without " \ "saving your file?" reply = Qtw.QMessageBox.question(self, 'Message', quit_msg, Qtw.QMessageBox.Yes, Qtw.QMessageBox.No) if reply == Qtw.QMessageBox.No: return 0 return 1 class ColorListWidget(Qtw.QComboBox): _xlwt_rgbcolors = [ (0, 0, 0), (255, 255, 255), (255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 0), (255, 0, 255), (0, 255, 255), (0, 0, 0), (255, 255, 255), (255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 0), (255, 0, 255), (0, 255, 255), (128, 0, 0), (0, 128, 0), (0, 0, 128), (128, 128, 0), (128, 0, 128), (0, 128, 128), (192, 192, 192), (128, 128, 128), (153, 153, 255), (153, 51, 102), (255, 255, 204), (204, 255, 255), (102, 0, 102), (255, 128, 128), (0, 102, 204), (204, 204, 255), (0, 0, 128), (255, 0, 255), (255, 255, 0), (0, 255, 255), (128, 0, 128), (128, 0, 0), (0, 128, 128), (0, 0, 255), (0, 204, 255), (204, 255, 255), (204, 255, 204), (255, 255, 153), (153, 204, 255), (255, 153, 204), (204, 153, 255), (255, 204, 153), (51, 102, 255), (51, 204, 204), (153, 204, 0), (255, 204, 0), (255, 153, 0), (255, 102, 0), (102, 102, 153), (150, 150, 150), (0, 51, 102), (51, 153, 102), (0, 51, 0), (51, 51, 0), (153, 51, 0), (153, 51, 102), (51, 51, 153), (51, 51, 51) ] def __init__(self): super(ColorListWidget, self).__init__() cmap = xlwt.Style.colour_map self.xlwt_colornames = [] self.xlwt_color_index = [] self.xlwt_rgbcolors = [] # self._xlwt_colorlabels = [] for i in list(range(64)): cnames = [name for (name, index) in list(cmap.items()) if index == i] # self._xlwt_colorlabels.append(cnames[0] if len(cnames)>0 else '') if cnames != []: self.xlwt_colornames.append(', '.join(cnames)) self.xlwt_color_index.append(i) self.xlwt_rgbcolors.append(self._xlwt_rgbcolors[i]) for i, xlwtcolor in enumerate(self.xlwt_colornames): self.insertItem(i, xlwtcolor) self.setItemData(i, Qtg.QColor(*self.xlwt_rgbcolors[i]), Qt.DecorationRole) def get_current_rgb(self): return self.xlwt_rgbcolors[self.currentIndex()] def convert(settings): # generate odmltables object table = None if os.path.splitext(settings.get_object('outputfilename'))[1] == '.xls': table = odml_xls_table.OdmlXlsTable() elif os.path.splitext(settings.get_object('outputfilename'))[1] == '.csv': table = odml_csv_table.OdmlCsvTable() elif os.path.splitext(settings.get_object('outputfilename'))[1] == '.odml': table = odml_table.OdmlTable() else: raise ValueError('Unknown output file extension "%s"' '' % os.path.splitext(settings.get_object( 'outputfilename'))[1]) # setting xls_table or csv_table headers if necessary title_translator = {v: k for k, v in iteritems(table._header_titles)} if ((os.path.splitext(settings.get_object('inputfilename'))[1] in ['.xls', '.csv']) and (settings.get_object('CBcustominput').isChecked())): inputheaderlabels = [str(l.text()) for l in settings.get_object('headerlabels')] inputcustomheaders = [str(cb.currentText()) for cb in settings.get_object('customheaders')] inputcolumnnames = [title_translator[label] for label in inputcustomheaders] table.change_header_titles(**dict(zip(inputcolumnnames, inputheaderlabels))) # loading input file if os.path.splitext(settings.get_object('inputfilename'))[1] == '.xls': table.load_from_xls_table(settings.get_object('inputfilename')) elif os.path.splitext(settings.get_object('inputfilename'))[1] == '.csv': table.load_from_csv_table(settings.get_object('inputfilename')) elif os.path.splitext(settings.get_object('inputfilename'))[1] in ['.odml', '.xml']: table.load_from_file(settings.get_object('inputfilename')) else: raise ValueError('Unknown input file extension "%s"' '' % os.path.splitext(settings.get_object('inputfilename'))[1]) # setting custom header selection and custom header titles if necessary if (os.path.splitext(settings.get_object('outputfilename'))[1] in ['.xls', '.csv']): # setting custom header columns output_headers = [title_translator[str(settings.get_object( 'LWselectedcolumns').item(index).text())] for index in list(range(settings.get_object( 'LWselectedcolumns').count()))] table.change_header(**dict(zip(output_headers, list(range(1, len(output_headers) + 1))))) # setting custom header labels # if settings.get_object('CBcustomheader').isChecked(): customoutputlabels = [str(le.text()) for le in settings.get_object('customheaderlabels')] table.change_header_titles( **dict(zip(output_headers, customoutputlabels))) # adding extra layout specifications to xls output files if os.path.splitext(settings.get_object('outputfilename'))[1] == '.xls': # marking columns marked_columns = [cb.isChecked() for cb in settings.get_object('columnmarkings')] if any(marked_columns): table.mark_columns(*[h for i, h in enumerate(output_headers) if marked_columns[i]]) # setting color pattern and changing point if settings.get_object('RBalternating').isChecked(): table.pattern = 'alternating' elif settings.get_object('RBcheckerboard').isChecked(): table.pattern = 'checkerboard' if settings.get_object('RBnopattern').isChecked(): table.changing_point = None elif settings.get_object('RBsection').isChecked(): table.changing_point = "sections" elif settings.get_object('RBproperty').isChecked(): table.changing_point = "properties" elif settings.get_object('RBvalue').isChecked(): table.changing_point = "values" style_names = ['header_style', 'first_style', 'second_style', 'first_marked_style', 'second_marked_style', 'highlight_style'] style_labels = ['Header', 'Standard\nRow 1', 'Standard\nRow 2', 'Marked \nRow 1', 'Marked \nRow 2', 'Default Value'] style_buttons = [settings.get_object(style_label) for style_label in style_labels] for i, style_name in enumerate(style_names): style_button = style_buttons[i] # get background color rgb_tuple = get_rgb(get_property(style_button.styleSheet(), 'background-color')) index = settings.get_object( 'CBbgcolor').xlwt_rgbcolors.index(rgb_tuple) bgcolor = settings.get_object('CBbgcolor').xlwt_colornames[ index].split(',')[0] # get font color rgb_tuple = get_rgb(get_property(style_button.styleSheet(), 'color')) index = settings.get_object( 'CBfontcolor').xlwt_rgbcolors.index(rgb_tuple) fontcolor = settings.get_object( 'CBfontcolor').xlwt_colornames[index].split(',')[0] # get font properties font_properties = '' font_string = get_property(style_button.styleSheet(), 'font') if 'bold' in font_string: font_properties += 'bold 1' if 'italic' in font_string: if font_properties != '': font_properties += ', ' font_properties += 'italic 1' # construct style style = xls_style.XlsStyle(backcolor=bgcolor, fontcolor=fontcolor, fontstyle=font_properties) setattr(table, style_name, style) # setting highlight defaults table.highlight_defaults = settings.get_object( 'CBhighlightdefaults').isChecked() # saving file if os.path.splitext(settings.get_object('outputfilename'))[1] in ['.xls', '.csv']: table.write2file(settings.get_object('outputfilename')) elif os.path.splitext(settings.get_object('outputfilename'))[1] in ['.odml', '.xml']: table.write2odml(settings.get_object('outputfilename'))
freedomtan/tensorflow
refs/heads/master
tensorflow/python/training/saver_test.py
8
# Copyright 2015 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. # ============================================================================= """Tests for tensorflow.python.training.saver.py.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import glob import math import os import random import time import numpy as np import six from google.protobuf.any_pb2 import Any from tensorflow.core.protobuf import config_pb2 from tensorflow.core.protobuf import meta_graph_pb2 from tensorflow.core.protobuf import queue_runner_pb2 from tensorflow.core.protobuf import rewriter_config_pb2 from tensorflow.core.protobuf import saver_pb2 from tensorflow.python.client import session 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 dtypes from tensorflow.python.framework import errors from tensorflow.python.framework import errors_impl from tensorflow.python.framework import function from tensorflow.python.framework import graph_io from tensorflow.python.framework import meta_graph from tensorflow.python.framework import ops as ops_lib from tensorflow.python.framework import test_util from tensorflow.python.lib.io import file_io from tensorflow.python.ops import array_ops from tensorflow.python.ops import control_flow_ops from tensorflow.python.ops import data_flow_ops from tensorflow.python.ops import gradients_impl from tensorflow.python.ops import math_ops from tensorflow.python.ops import nn_ops from tensorflow.python.ops import partitioned_variables from tensorflow.python.ops import random_ops from tensorflow.python.ops import resource_variable_ops from tensorflow.python.ops import sparse_ops from tensorflow.python.ops import variable_scope from tensorflow.python.ops import variables import tensorflow.python.ops.nn_grad # pylint: disable=unused-import from tensorflow.python.platform import gfile from tensorflow.python.platform import test from tensorflow.python.summary import summary from tensorflow.python.training import adam from tensorflow.python.training import checkpoint_management from tensorflow.python.training import gradient_descent from tensorflow.python.training import py_checkpoint_reader from tensorflow.python.training import queue_runner_impl from tensorflow.python.training import saver as saver_module from tensorflow.python.training import saver_test_utils from tensorflow.python.training.tracking import base as trackable_base from tensorflow.python.util import compat class SaverTest(test.TestCase): def basicSaveRestore(self, variable_op): save_path = os.path.join(self.get_temp_dir(), "basic_save_restore") with self.session(graph=ops_lib.Graph()) as sess: # Build a graph with 2 parameter nodes, and Save and # Restore nodes for them. v0 = variable_op(10.0, name="v0") v1 = variable_op(20.0, name="v1") v2 = saver_test_utils.CheckpointedOp(name="v2") v2_init = v2.insert("k1", 30.0) # Initialize all variables if not context.executing_eagerly(): self.evaluate([variables.global_variables_initializer(), v2_init]) # Check that the parameter nodes have been initialized. self.assertEqual(10.0, self.evaluate(v0)) self.assertEqual(20.0, self.evaluate(v1)) self.assertEqual(b"k1", self.evaluate(v2.keys())) self.assertEqual(30.0, self.evaluate(v2.values())) # Save the initialized values in the file at "save_path" save = saver_module.Saver( { "v0": v0, "v1": v1, "v2": v2.saveable }, restore_sequentially=True) val = save.save(sess, save_path) self.assertTrue(isinstance(val, six.string_types)) self.assertEqual(save_path, val) # Start a second session. In that session the parameter nodes # have not been initialized either. with self.session(graph=ops_lib.Graph()) as sess: v0 = variable_op(-1.0, name="v0") v1 = variable_op(-1.0, name="v1") v2 = saver_test_utils.CheckpointedOp(name="v2") # Assert that the variables are not initialized. if not context.executing_eagerly(): self.assertEqual( len(variables.report_uninitialized_variables().eval()), 2) self.assertEqual(0, len(self.evaluate(v2.keys()))) self.assertEqual(0, len(self.evaluate(v2.values()))) # Restore the saved values in the parameter nodes. save = saver_module.Saver({"v0": v0, "v1": v1, "v2": v2.saveable}) save.restore(sess, save_path) # Check that the parameter nodes have been restored. self.assertEqual(10.0, self.evaluate(v0)) self.assertEqual(20.0, self.evaluate(v1)) self.assertEqual(b"k1", self.evaluate(v2.keys())) self.assertEqual(30.0, self.evaluate(v2.values())) # Build another graph with 2 nodes, initialized # differently, and a Restore node for them. with self.session(graph=ops_lib.Graph()) as sess: v0_2 = variable_op(1000.0, name="v0") v1_2 = variable_op(2000.0, name="v1") v2_2 = saver_test_utils.CheckpointedOp(name="v2") v2_init = v2_2.insert("k1000", 3000.0) # Check that the parameter nodes have been initialized. if not context.executing_eagerly(): init_all_op = [variables.global_variables_initializer(), v2_init] self.evaluate(init_all_op) # TODO(xpan): Why _mutable_hash_table_v2 doesn't create empty # table as it claims in eager mode? self.assertEqual(b"k1000", self.evaluate(v2_2.keys())) self.assertEqual(3000.0, self.evaluate(v2_2.values())) self.assertEqual(1000.0, self.evaluate(v0_2)) self.assertEqual(2000.0, self.evaluate(v1_2)) # Restore the values saved earlier in the parameter nodes. save2 = saver_module.Saver({"v0": v0_2, "v1": v1_2, "v2": v2_2.saveable}) save2.restore(sess, save_path) # Check that the parameter nodes have been restored. self.assertEqual(10.0, self.evaluate(v0_2)) self.assertEqual(20.0, self.evaluate(v1_2)) self.assertEqual(b"k1", self.evaluate(v2_2.keys())) self.assertEqual(30.0, self.evaluate(v2_2.values())) def testBasic(self): self.basicSaveRestore(variables.Variable) @test_util.run_in_graph_and_eager_modes def testResourceBasic(self): self.basicSaveRestore(resource_variable_ops.ResourceVariable) def testResourceColocation(self): # train.Saver is V1 only API. with ops_lib.Graph().as_default(): partitioner = partitioned_variables.fixed_size_partitioner(num_shards=2) with ops_lib.device("/job:ps/device:GPU:0"): v = variable_scope.get_variable( "v0", shape=[10, 2], partitioner=partitioner, use_resource=True) saver_module.Saver({"v0": v}).build() save_op = None for op in ops_lib.get_default_graph().get_operations(): if op.type == "SaveV2": save_op = op break assert save_op is not None for save_inp in save_op.inputs[3:]: # Input to SaveV2 op is placed on CPU of the same device as # the Variable. self.assertEqual("/job:ps/device:CPU:0", save_inp.device) def testResourceVariableReadOpsAddedDeterministically(self): graph_defs = [] num_graphs = 10 for _ in range(num_graphs): with ops_lib.Graph().as_default() as g: for i in range(20): resource_variable_ops.ResourceVariable(i, name="var%s" % i) saver_module.Saver() graph_defs.append(g.as_graph_def()) for i in range(num_graphs - 1): self.assertEqual(graph_defs[i], graph_defs[i + 1]) def testEagerBasic(self): with context.eager_mode(): ckpt_prefix = os.path.join(self.get_temp_dir(), "ckpt") v1 = resource_variable_ops.ResourceVariable(3.14, name="v1") v2 = resource_variable_ops.ResourceVariable([1, 2], name="v2") save = saver_module.Saver([v1, v2]) save.save(None, ckpt_prefix) v1.assign(0.0) v2.assign([0, 0]) self.assertNear(0.0, self.evaluate(v1), 1e-5) self.assertAllEqual([0, 0], self.evaluate(v2)) save.restore(None, ckpt_prefix) self.assertNear(3.14, self.evaluate(v1), 1e-5) self.assertAllEqual([1, 2], self.evaluate(v2)) def testEagerGraphCompatibility(self): # Save from graph mode and restore from eager mode. graph_ckpt_prefix = os.path.join(self.get_temp_dir(), "graph_ckpt") with context.graph_mode(): with self.session(graph=ops_lib.Graph()) as sess: # Create a graph model and save the checkpoint. w1 = resource_variable_ops.ResourceVariable(1.0, name="w1") w2 = resource_variable_ops.ResourceVariable(2.0, name="w2") graph_saver = saver_module.Saver([w1, w2]) self.evaluate(variables.global_variables_initializer()) graph_saver.save(sess, graph_ckpt_prefix) with context.eager_mode(): ops_lib._default_graph_stack.reset() # pylint: disable=protected-access ops_lib.reset_default_graph() w1 = resource_variable_ops.ResourceVariable(0.0, name="w1") w2 = resource_variable_ops.ResourceVariable(0.0, name="w2") graph_saver = saver_module.Saver([w1, w2]) graph_saver.restore(None, graph_ckpt_prefix) self.assertAllEqual(self.evaluate(w1), 1.0) self.assertAllEqual(self.evaluate(w2), 2.0) # Save from eager mode and restore from graph mode. eager_ckpt_prefix = os.path.join(self.get_temp_dir(), "eager_ckpt") with context.eager_mode(): ops_lib._default_graph_stack.reset() # pylint: disable=protected-access ops_lib.reset_default_graph() w3 = resource_variable_ops.ResourceVariable(3.0, name="w3") w4 = resource_variable_ops.ResourceVariable(4.0, name="w4") graph_saver = saver_module.Saver([w3, w4]) graph_saver.save(None, eager_ckpt_prefix) with context.graph_mode(): with self.session(graph=ops_lib.Graph()) as sess: w3 = resource_variable_ops.ResourceVariable(0.0, name="w3") w4 = resource_variable_ops.ResourceVariable(0.0, name="w4") graph_saver = saver_module.Saver([w3, w4]) self.evaluate(variables.global_variables_initializer()) graph_saver.restore(sess, eager_ckpt_prefix) self.assertAllEqual(w3, 3.0) self.assertAllEqual(w4, 4.0) @test_util.run_in_graph_and_eager_modes def testResourceSaveRestoreCachingDevice(self): save_path = os.path.join(self.get_temp_dir(), "resource_cache") with self.session(graph=ops_lib.Graph()) as sess: v = resource_variable_ops.ResourceVariable([1], caching_device="/cpu:0", name="v") if context.executing_eagerly(): sess = None else: self.evaluate(variables.global_variables_initializer()) save = saver_module.Saver([v]) save.save(sess, save_path) save2 = saver_module.Saver([v]) save2.restore(sess, save_path) self.assertEqual(self.evaluate(v), [1]) def testNoAdditionalOpsAddedBySaverForResourceVariablesOutsideSaveScope(self): with ops_lib.Graph().as_default() as g: v = resource_variable_ops.ResourceVariable(1.0, name="v") with ops_lib.name_scope("saver1"): saver_module.Saver() with ops_lib.name_scope("saver2"): saver_module.Saver({"name": v}) ops_in_saver1_scope_but_not_save_scope = [ op for op in g.get_operations() if (op.name.startswith("saver1/") and not op.name.startswith("saver1/save/"))] self.assertEqual(ops_in_saver1_scope_but_not_save_scope, []) ops_in_saver2_scope_but_not_save_scope = [ op for op in g.get_operations() if (op.name.startswith("saver2/") and not op.name.startswith("saver2/save/"))] self.assertEqual(ops_in_saver2_scope_but_not_save_scope, []) def testSaveCopyRestoreWithSaveRelativePaths(self): """Save, copy checkpoint dir and restore from copied dir. This only works for save_relative_paths=True. """ save_dir1 = os.path.join(self.get_temp_dir(), "save_dir1") os.mkdir(save_dir1) save_path1 = os.path.join(save_dir1, "save_copy_restore") # train.Saver is V1 only API. with ops_lib.Graph().as_default(): # Build a graph with 2 parameter nodes, and Save and # Restore nodes for them. v0 = variables.VariableV1(10.0, name="v0") v1 = variables.VariableV1(20.0, name="v1") v2 = saver_test_utils.CheckpointedOp(name="v2") v2_init = v2.insert("k1", 30.0) save = saver_module.Saver( var_list={ "v0": v0, "v1": v1, "v2": v2.saveable }, restore_sequentially=True, save_relative_paths=True) init_all_op = [variables.global_variables_initializer(), v2_init] with self.cached_session() as sess: # Initialize all variables self.evaluate(init_all_op) # Check that the parameter nodes have been initialized. self.assertEqual(10.0, self.evaluate(v0)) self.assertEqual(20.0, self.evaluate(v1)) self.assertEqual(b"k1", self.evaluate(v2.keys())) self.assertEqual(30.0, self.evaluate(v2.values())) # Save the initialized values in the file at "save_path" val = save.save(sess, save_path1) self.assertTrue(isinstance(val, six.string_types)) self.assertEqual(save_path1, val) self.assertEqual( checkpoint_management.latest_checkpoint(save_dir1), save_path1) save_dir2 = os.path.join(self.get_temp_dir(), "save_dir2") os.renames(save_dir1, save_dir2) save_path2 = os.path.join(save_dir2, "save_copy_restore") self.assertEqual( checkpoint_management.latest_checkpoint(save_dir2), save_path2) # Start a second session. In that session the parameter nodes # have not been initialized either. with self.cached_session() as sess: v0 = variables.VariableV1(-1.0, name="v0") v1 = variables.VariableV1(-1.0, name="v1") v2 = saver_test_utils.CheckpointedOp(name="v2") save = saver_module.Saver({"v0": v0, "v1": v1, "v2": v2.saveable}) # Assert that the variables are not initialized. self.assertEqual( len(variables.report_uninitialized_variables().eval()), 2) self.assertEqual(0, len(self.evaluate(v2.keys()))) self.assertEqual(0, len(self.evaluate(v2.values()))) # Restore the saved values in the parameter nodes. save.restore(sess, save_path2) # Check that the parameter nodes have been restored. self.assertEqual(10.0, self.evaluate(v0)) self.assertEqual(20.0, self.evaluate(v1)) self.assertEqual(b"k1", self.evaluate(v2.keys())) self.assertEqual(30.0, self.evaluate(v2.values())) def testFilenameTensor(self): # train.Saver is V1 only API. with ops_lib.Graph().as_default(): v0 = variables.VariableV1(0, name="v0") filename = b"somerandomfilename" save = saver_module.Saver({"v0": v0}, filename=filename) with self.cached_session() as sess: tensor = sess.graph.get_tensor_by_name( save.saver_def.filename_tensor_name) self.assertEqual(self.evaluate(tensor), filename) def testInvalidPath(self): v0 = variables.VariableV1(0, name="v0") for ver in (saver_pb2.SaverDef.V1, saver_pb2.SaverDef.V2): with self.cached_session() as sess: save = saver_module.Saver({"v0": v0}, write_version=ver) with self.assertRaisesRegex( ValueError, "The passed save_path is not a valid checkpoint:"): save.restore(sess, "invalid path") @test_util.run_v1_only("train.Saver is V1 only API.") def testInt64(self): save_path = os.path.join(self.get_temp_dir(), "int64") with self.cached_session() as sess: # Build a graph with 1 node, and save and restore for them. v = variables.VariableV1(np.int64(15), name="v") save = saver_module.Saver({"v": v}, restore_sequentially=True) self.evaluate(variables.global_variables_initializer()) # Save the initialized values in the file at "save_path" val = save.save(sess, save_path) self.assertTrue(isinstance(val, six.string_types)) self.assertEqual(save_path, val) with self.cached_session() as sess: v = variables.VariableV1(np.int64(-1), name="v") save = saver_module.Saver({"v": v}) with self.assertRaisesWithPredicateMatch( errors_impl.OpError, lambda e: "uninitialized value v" in e.message): self.evaluate(v) # Restore the saved values in the parameter nodes. save.restore(sess, save_path) # Check that the parameter nodes have been restored. self.assertEqual(np.int64(15), self.evaluate(v)) def testSomeErrors(self): with ops_lib.Graph().as_default(): v0 = variables.VariableV1([10.0], name="v0") v1 = variables.VariableV1([20.0], name="v1") v2 = variables.VariableV1([20.0], name="v2") v2._set_save_slice_info( variables.Variable.SaveSliceInfo("v1", [1], [0], [1])) # By default the name used for "v2" will be "v1" and raise an error. with self.assertRaisesRegex(ValueError, "same name: v1"): saver_module.Saver([v0, v1, v2]) # The names are different and will work. saver_module.Saver({"vee1": v1, "other": [v2]}) # Partitioned variables also cause name conflicts. p_v1 = variable_scope.get_variable( "p_v1", shape=[4, 5], partitioner=partitioned_variables.fixed_size_partitioner( num_shards=2)) p_v2 = variable_scope.get_variable( "p_v2", shape=[4, 5], partitioner=partitioned_variables.fixed_size_partitioner( num_shards=2)) p_v2._name = "p_v1" with self.assertRaisesRegex(ValueError, "same name: p_v1"): saver_module.Saver([p_v1, p_v2]) def testSameName(self): with ops_lib.Graph().as_default(): v0 = variables.VariableV1([10.0], name="v0") v2 = saver_test_utils.CheckpointedOp(name="v2") # Saving one variable under two names raises an error. with self.assertRaisesRegex( ValueError, "The same saveable will be restored with two names: v0"): saver_module.Saver({"v0": v0, "v0too": v0}) # Ditto for custom saveables. with self.assertRaisesRegex( ValueError, "The same saveable will be restored with two names: v2"): saver_module.Saver({"v2": v2.saveable, "v2too": v2.saveable}) # Verify non-duplicate names work. saver_module.Saver({"v0": v0, "v2": v2.saveable}) @test_util.run_v1_only("train.Saver and VariableV1 are V1 only APIs.") def testBasicsWithListOfVariables(self): save_path = os.path.join(self.get_temp_dir(), "basics_with_list") with self.session(graph=ops_lib.Graph()) as sess: # Build a graph with 2 parameter nodes, and Save and # Restore nodes for them. v0 = variables.VariableV1(10.0, name="v0") v1 = variables.VariableV1(20.0, name="v1") v2 = saver_test_utils.CheckpointedOp(name="v2") v2_init = v2.insert("k1", 30.0) save = saver_module.Saver([v0, v1, v2.saveable]) self.evaluate(variables.global_variables_initializer()) v2_init.run() # Check that the parameter nodes have been initialized. self.assertEqual(10.0, self.evaluate(v0)) self.assertEqual(20.0, self.evaluate(v1)) self.assertEqual(b"k1", self.evaluate(v2.keys())) self.assertEqual(30.0, self.evaluate(v2.values())) # Save the initialized values in the file at "save_path" val = save.save(sess, save_path) self.assertTrue(isinstance(val, six.string_types)) self.assertEqual(save_path, val) # Start a second session. In that session the variables # have not been initialized either. with self.session(graph=ops_lib.Graph()) as sess: v0 = variables.VariableV1(-1.0, name="v0") v1 = variables.VariableV1(-1.0, name="v1") v2 = saver_test_utils.CheckpointedOp(name="v2") save = saver_module.Saver([v0, v1, v2.saveable]) with self.assertRaisesWithPredicateMatch( errors_impl.OpError, lambda e: "uninitialized value v0" in e.message): self.evaluate(v0) with self.assertRaisesWithPredicateMatch( errors_impl.OpError, lambda e: "uninitialized value v1" in e.message): self.evaluate(v1) self.assertEqual(0, len(self.evaluate(v2.keys()))) self.assertEqual(0, len(self.evaluate(v2.values()))) # Restore the saved values in the parameter nodes. save.restore(sess, save_path) # Check that the parameter nodes have been restored. self.assertEqual(10.0, self.evaluate(v0)) self.assertEqual(20.0, self.evaluate(v1)) self.assertEqual(b"k1", self.evaluate(v2.keys())) self.assertEqual(30.0, self.evaluate(v2.values())) # Build another graph with 2 nodes, initialized # differently, and a Restore node for them. with self.session(graph=ops_lib.Graph()) as sess: v0_2 = variables.VariableV1(1000.0, name="v0") v1_2 = variables.VariableV1(2000.0, name="v1") v2_2 = saver_test_utils.CheckpointedOp(name="v2") save2 = saver_module.Saver([v0_2, v1_2, v2_2.saveable]) v2_2.insert("k1000", 3000.0).run() self.evaluate(variables.global_variables_initializer()) # Check that the parameter nodes have been initialized. self.assertEqual(1000.0, self.evaluate(v0_2)) self.assertEqual(2000.0, self.evaluate(v1_2)) self.assertEqual(b"k1000", self.evaluate(v2_2.keys())) self.assertEqual(3000.0, self.evaluate(v2_2.values())) # Restore the values saved earlier in the parameter nodes. save2.restore(sess, save_path) # Check that the parameter nodes have been restored. self.assertEqual(10.0, self.evaluate(v0_2)) self.assertEqual(20.0, self.evaluate(v1_2)) self.assertEqual(b"k1", self.evaluate(v2_2.keys())) self.assertEqual(30.0, self.evaluate(v2_2.values())) def _SaveAndLoad(self, var_name, var_value, other_value, save_path): with self.session(graph=ops_lib.Graph()) as sess: var = resource_variable_ops.ResourceVariable(var_value, name=var_name) save = saver_module.Saver({var_name: var}) if not context.executing_eagerly(): self.evaluate(var.initializer) val = save.save(sess, save_path) self.assertEqual(save_path, val) with self.session(graph=ops_lib.Graph()) as sess: var = resource_variable_ops.ResourceVariable(other_value, name=var_name) save = saver_module.Saver({var_name: var}) save.restore(sess, save_path) self.assertAllClose(var_value, self.evaluate(var)) def testCacheRereadsFile(self): save_path = os.path.join(self.get_temp_dir(), "cache_rereads") # Save and reload one Variable named "var0". self._SaveAndLoad("var0", 0.0, 1.0, save_path) # Save and reload one Variable named "var1" in the same file. # The cached readers should know to re-read the file. self._SaveAndLoad("var1", 1.1, 2.2, save_path) def testAllowEmpty(self): save_path = os.path.join(self.get_temp_dir(), "allow_empty") # train.Saver is V1 only API. with ops_lib.Graph().as_default(), self.cached_session() as sess: _ = constant_op.constant(1) save = saver_module.Saver(allow_empty=True) val = save.save(sess, save_path) self.assertIsNone(val) with ops_lib.Graph().as_default(), self.cached_session() as sess: save = saver_module.Saver(allow_empty=True) save.restore(sess, save_path) def testGPU(self): if not test.is_gpu_available(): return save_path = os.path.join(self.get_temp_dir(), "gpu") with session.Session("", graph=ops_lib.Graph()) as sess: with sess.graph.device(test.gpu_device_name()): v0_1 = variables.VariableV1(123.45) save = saver_module.Saver({"v0": v0_1}) self.evaluate(variables.global_variables_initializer()) save.save(sess, save_path) with session.Session("", graph=ops_lib.Graph()) as sess: with sess.graph.device(test.gpu_device_name()): v0_2 = variables.VariableV1(543.21) save = saver_module.Saver({"v0": v0_2}) self.evaluate(variables.global_variables_initializer()) def testSharedServerOnGPU(self): if not test.is_gpu_available(): return save_path = os.path.join(self.get_temp_dir(), "gpu") with session.Session("", graph=ops_lib.Graph()) as sess: with sess.graph.device(test.gpu_device_name()): v0_1 = variables.VariableV1(123.45) save = saver_module.Saver({"v0": v0_1}, sharded=True, allow_empty=True) self.evaluate(variables.global_variables_initializer()) save.save(sess, save_path) with session.Session("", graph=ops_lib.Graph()) as sess: with sess.graph.device(test.gpu_device_name()): v0_2 = variables.VariableV1(543.21) save = saver_module.Saver({"v0": v0_2}, sharded=True, allow_empty=True) self.evaluate(variables.global_variables_initializer()) def testVariables(self): save_path = os.path.join(self.get_temp_dir(), "variables") with session.Session("", graph=ops_lib.Graph()) as sess: one = variables.VariableV1(1.0) twos = variables.VariableV1([2.0, 2.0, 2.0]) v2 = saver_test_utils.CheckpointedOp(name="v2") init = variables.global_variables_initializer() save = saver_module.Saver() init.run() v2.insert("k1", 3.0).run() save.save(sess, save_path) with session.Session("", graph=ops_lib.Graph()) as sess: one = variables.VariableV1(0.0) twos = variables.VariableV1([0.0, 0.0, 0.0]) v2 = saver_test_utils.CheckpointedOp(name="v2") # Saver with no arg, defaults to 'all variables'. save = saver_module.Saver() save.restore(sess, save_path) self.assertAllClose(1.0, self.evaluate(one)) self.assertAllClose([2.0, 2.0, 2.0], self.evaluate(twos)) self.assertEqual(b"k1", self.evaluate(v2.keys())) self.assertEqual(3.0, self.evaluate(v2.values())) def testVarListShouldBeEmptyInDeferredBuild(self): with ops_lib.Graph().as_default(): v = variables.VariableV1(1.0) with self.assertRaisesRegex(ValueError, "defer_build"): saver_module.Saver([v], defer_build=True) def testBuildShouldBeCalledBeforeSaveInCaseOfDeferBuild(self): save_path = os.path.join(self.get_temp_dir(), "error_deferred_build") with ops_lib.Graph().as_default(), session.Session() as sess: variables.VariableV1(1.0) saver = saver_module.Saver(defer_build=True) with self.assertRaisesRegex(RuntimeError, "build"): saver.save(sess, save_path) def testDeferredBuild(self): save_path = os.path.join(self.get_temp_dir(), "deferred_build") with session.Session("", graph=ops_lib.Graph()) as sess: one = variables.VariableV1(1.0) save = saver_module.Saver(defer_build=True) # if build is not deferred, saver cannot save the `twos`. twos = variables.VariableV1([2.0, 2.0, 2.0]) init = variables.global_variables_initializer() save.build() init.run() save.save(sess, save_path) with session.Session("", graph=ops_lib.Graph()) as sess: one = variables.VariableV1(0.0) twos = variables.VariableV1([0.0, 0.0, 0.0]) # Saver with no arg, defaults to 'all variables'. save = saver_module.Saver() save.restore(sess, save_path) self.assertAllClose(1.0, self.evaluate(one)) self.assertAllClose([2.0, 2.0, 2.0], self.evaluate(twos)) @test_util.run_v1_only("train.Saver is V1 only API.") def testReshape(self): save_path = os.path.join(self.get_temp_dir(), "variables_reshape") with session.Session("", graph=ops_lib.Graph()) as sess: var = variables.VariableV1([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]) init = variables.global_variables_initializer() save = saver_module.Saver() init.run() save.save(sess, save_path) # Error when restoring with default reshape=False with session.Session("", graph=ops_lib.Graph()) as sess: var = variables.VariableV1([[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]) save = saver_module.Saver() with self.assertRaisesRegex( errors_impl.InvalidArgumentError, "Assign requires shapes of both tensors to match."): save.restore(sess, save_path) # Restored to new shape with reshape=True with session.Session("", graph=ops_lib.Graph()) as sess: var = variables.VariableV1([[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]) save = saver_module.Saver(reshape=True) save.restore(sess, save_path) self.assertAllClose([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], self.evaluate(var)) @test_util.run_in_graph_and_eager_modes def testSaveWithGlobalStep(self, pad_step_number=False): save_path = os.path.join(self.get_temp_dir(), "ckpt_with_global_step") global_step_int = 5 # Save and reload one Variable named "var0". self._SaveAndLoad("var0", 0.0, 1.0, save_path) for use_tensor in [True, False]: with self.session(graph=ops_lib.Graph()): var = resource_variable_ops.ResourceVariable(1.0, name="var0") save = saver_module.Saver( { var._shared_name: var }, pad_step_number=pad_step_number) if context.executing_eagerly(): sess = None else: self.evaluate(var.initializer) sess = ops_lib.get_default_session() if use_tensor: global_step = constant_op.constant(global_step_int) val = save.save(sess, save_path, global_step=global_step) else: val = save.save(sess, save_path, global_step=global_step_int) if pad_step_number: expected_save_path = "%s-%s" % (save_path, "{:08d}".format(global_step_int)) else: expected_save_path = "%s-%d" % (save_path, global_step_int) self.assertEqual(expected_save_path, val) def testSaveWithGlobalStepWithPadding(self): self.testSaveWithGlobalStep(pad_step_number=True) def testSaveToNonexistingPath(self): file_io.write_string_to_file( os.path.join(self.get_temp_dir(), "actually_a_file"), "") paths = [ os.path.join(self.get_temp_dir(), "nonexisting_dir/path"), os.path.join(self.get_temp_dir(), "other_nonexisting_dir/path1/path2"), os.path.join(self.get_temp_dir(), "actually_a_file/path"), ] for save_path in paths: # Build a graph with 2 parameter nodes, and Save and # Restore nodes for them. v0 = variables.VariableV1(10.0, name="v0") v1 = variables.VariableV1(20.0, name="v1") save = saver_module.Saver({"v0": v0, "v1": v1}, restore_sequentially=True) init_all_op = variables.global_variables_initializer() # In the case where the parent directory doesn't exist, whether or not the # save succeeds or fails is implementation dependent. Therefore we allow # both cases. try: with self.cached_session() as sess: # Initialize all variables self.evaluate(init_all_op) # Check that the parameter nodes have been initialized. self.assertEqual(10.0, self.evaluate(v0)) self.assertEqual(20.0, self.evaluate(v1)) # Save the graph. save.save(sess, save_path) with self.cached_session() as sess: # Restore the saved values in the parameter nodes. save.restore(sess, save_path) # Check that the parameter nodes have been restored. self.assertEqual(10.0, self.evaluate(v0)) self.assertEqual(20.0, self.evaluate(v1)) except ValueError as exc: error_msg_template = "Parent directory of {} doesn't exist, can't save." self.assertEqual(error_msg_template.format(save_path), str(exc)) def testSaveToURI(self): # ParseURI functions don't work on Windows yet. # TODO(jhseu): Remove this check when it works. if os.name == "nt": self.skipTest("Local URI support doesn't work on Windows") save_path = "file://" + os.path.join(self.get_temp_dir(), "uri") # Build a graph with 2 parameter nodes, and Save and # Restore nodes for them. v0 = variables.VariableV1(10.0, name="v0") v1 = variables.VariableV1(20.0, name="v1") save = saver_module.Saver({"v0": v0, "v1": v1}, restore_sequentially=True) init_all_op = variables.global_variables_initializer() with self.cached_session() as sess: # Initialize all variables self.evaluate(init_all_op) # Check that the parameter nodes have been initialized. self.assertEqual(10.0, self.evaluate(v0)) self.assertEqual(20.0, self.evaluate(v1)) save.save(sess, save_path) def testSaveRestoreAndValidateVariableDtype(self): for variable_op in [ variables.Variable, resource_variable_ops.ResourceVariable ]: save_path = os.path.join(self.get_temp_dir(), "basic_save_restore") # Build the first session. with self.session(graph=ops_lib.Graph()) as sess: v0 = variable_op(10.0, name="v0", dtype=dtypes.float32) if not context.executing_eagerly(): self.evaluate([variables.global_variables_initializer()]) save = saver_module.Saver({"v0": v0}) save.save(sess, save_path) # Start a second session. with self.session(graph=ops_lib.Graph()) as sess: v0_wrong_dtype = variable_op(1, name="v0", dtype=dtypes.int32) # Restore the saved value with different dtype # in the parameter nodes. save = saver_module.Saver({"v0": v0_wrong_dtype}) with self.assertRaisesRegex(errors.InvalidArgumentError, "original dtype"): save.restore(sess, save_path) # Test restoring large tensors (triggers a thread pool) def testRestoreLargeTensors(self): save_dir = self.get_temp_dir() def _model(): small_v = [variable_scope.get_variable( "small%d" % i, shape=[10, 2], use_resource=True) for i in range(5)] large_v = [variable_scope.get_variable( "large%d" % i, shape=[32000, 1000], use_resource=True) for i in range(3)] return small_v + large_v save_graph = ops_lib.Graph() with save_graph.as_default(), self.session(graph=save_graph) as sess: orig_vars = _model() self.evaluate(variables.global_variables_initializer()) save = saver_module.Saver(max_to_keep=1) self.evaluate(variables.global_variables_initializer()) save.save(sess, save_dir) orig_vals = self.evaluate(orig_vars) restore_graph = ops_lib.Graph() with restore_graph.as_default(), self.session( graph=restore_graph) as sess: restored_vars = _model() save = saver_module.Saver(max_to_keep=1) save.restore(sess, save_dir) restored_vals = self.evaluate(restored_vars) for orig, restored in zip(orig_vals, restored_vals): self.assertAllEqual(orig, restored) class SaveRestoreShardedTest(test.TestCase): _WRITE_VERSION = saver_pb2.SaverDef.V1 def _get_test_dir(self, dirname): test_dir = os.path.join(self.get_temp_dir(), dirname) gfile.MakeDirs(test_dir) return test_dir def testBasics(self): save_path = os.path.join(self.get_temp_dir(), "sharded_basics") # Build a graph with 2 parameter nodes on different devices. with session.Session( target="", config=config_pb2.ConfigProto(device_count={"CPU": 2})) as sess: with sess.graph.device("/cpu:0"): v0 = variables.VariableV1(10, name="v0") t0 = saver_test_utils.CheckpointedOp(name="t0") with sess.graph.device("/cpu:1"): v1 = variables.VariableV1(20, name="v1") t1 = saver_test_utils.CheckpointedOp(name="t1") save = saver_module.Saver( { "v0": v0, "v1": v1, "t0": t0.saveable, "t1": t1.saveable }, write_version=self._WRITE_VERSION, sharded=True) self.evaluate(variables.global_variables_initializer()) t0.insert("k1", 30.0).run() t1.insert("k2", 40.0).run() val = save.save(sess, save_path) if save._write_version is saver_pb2.SaverDef.V1: self.assertEqual(save_path + "-?????-of-00002", val) else: self.assertEqual(save_path, val) meta_graph_filename = checkpoint_management.meta_graph_filename(val) self.assertEqual(save_path + ".meta", meta_graph_filename) if save._write_version is saver_pb2.SaverDef.V1: # Restore different ops from shard 0 of the saved files. with session.Session( target="", config=config_pb2.ConfigProto(device_count={"CPU": 2})) as sess: with sess.graph.device("/cpu:0"): v0 = variables.VariableV1(111, name="v0") t0 = saver_test_utils.CheckpointedOp(name="t0") save = saver_module.Saver( { "v0": v0, "t0": t0.saveable }, write_version=self._WRITE_VERSION, sharded=True) self.evaluate(variables.global_variables_initializer()) t0.insert("k11", 33.0).run() self.assertEqual(111, self.evaluate(v0)) self.assertEqual(b"k11", self.evaluate(t0.keys())) self.assertEqual(33.0, self.evaluate(t0.values())) save.restore(sess, save_path + "-00000-of-00002") self.assertEqual(10, self.evaluate(v0)) self.assertEqual(b"k1", self.evaluate(t0.keys())) self.assertEqual(30.0, self.evaluate(t0.values())) # Restore different ops from shard 1 of the saved files. with session.Session( target="", config=config_pb2.ConfigProto(device_count={"CPU": 2})) as sess: with sess.graph.device("/cpu:0"): v1 = variables.VariableV1(222) t1 = saver_test_utils.CheckpointedOp(name="t1") save = saver_module.Saver( { "v1": v1, "t1": t1.saveable }, write_version=self._WRITE_VERSION, sharded=True) self.evaluate(variables.global_variables_initializer()) t1.insert("k22", 44.0).run() self.assertEqual(222, self.evaluate(v1)) self.assertEqual(b"k22", self.evaluate(t1.keys())) self.assertEqual(44.0, self.evaluate(t1.values())) save.restore(sess, save_path + "-00001-of-00002") self.assertEqual(20, self.evaluate(v1)) self.assertEqual(b"k2", self.evaluate(t1.keys())) self.assertEqual(40.0, self.evaluate(t1.values())) # Now try a restore with the sharded filename. with session.Session( target="", config=config_pb2.ConfigProto(device_count={"CPU": 2})) as sess: with sess.graph.device("/cpu:0"): v0 = variables.VariableV1(111, name="v0") t0 = saver_test_utils.CheckpointedOp(name="t0") with sess.graph.device("/cpu:1"): v1 = variables.VariableV1(222, name="v1") t1 = saver_test_utils.CheckpointedOp(name="t1") save = saver_module.Saver( { "v0": v0, "v1": v1, "t0": t0.saveable, "t1": t1.saveable }, write_version=self._WRITE_VERSION, sharded=True) self.evaluate(variables.global_variables_initializer()) t0.insert("k11", 33.0).run() t1.insert("k22", 44.0).run() self.assertEqual(111, self.evaluate(v0)) self.assertEqual(222, self.evaluate(v1)) self.assertEqual(b"k11", self.evaluate(t0.keys())) self.assertEqual(33.0, self.evaluate(t0.values())) self.assertEqual(b"k22", self.evaluate(t1.keys())) self.assertEqual(44.0, self.evaluate(t1.values())) save_path = os.path.join(self.get_temp_dir(), "sharded_basics") if save._write_version is saver_pb2.SaverDef.V1: save.restore(sess, save_path + "-?????-of-?????") else: save.restore(sess, save_path) self.assertEqual(10, self.evaluate(v0)) self.assertEqual(20, self.evaluate(v1)) self.assertEqual(b"k1", self.evaluate(t0.keys())) self.assertEqual(30.0, self.evaluate(t0.values())) self.assertEqual(b"k2", self.evaluate(t1.keys())) self.assertEqual(40.0, self.evaluate(t1.values())) if save._write_version is saver_pb2.SaverDef.V1: self.assertEqual( checkpoint_management.latest_checkpoint(self.get_temp_dir()), os.path.join(self.get_temp_dir(), "sharded_basics-?????-of-00002")) else: self.assertEqual( checkpoint_management.latest_checkpoint(self.get_temp_dir()), os.path.join(self.get_temp_dir(), "sharded_basics")) def testSaverDef(self): # train.Saver is V1 only API. with ops_lib.Graph().as_default(), self.cached_session(): v0 = variables.VariableV1(123, name="v0") save = saver_module.Saver({"v0": v0}, sharded=True) sd = save.as_saver_def() self.assertTrue(sd.sharded) def _testPartitionedVariables(self, use_resource): var_full_shape = [10, 3] # Allows save/restore mechanism to work w/ different slicings. var_name = "my_var" saved_dir = self._get_test_dir("partitioned_variables") saved_path = os.path.join(saved_dir, "ckpt") call_saver_with_dict = False # updated by test loop below def _save(partitioner=None): # train.Saver is V1 only API. with ops_lib.Graph().as_default(), self.session() as sess: # Calls .eval() to return the ndarray that makes up the full variable. rnd = random_ops.random_uniform(var_full_shape).eval() if partitioner: vs = [ variable_scope.get_variable( var_name, shape=var_full_shape, initializer=rnd, partitioner=partitioner, use_resource=use_resource) ] else: if use_resource: vs = [resource_variable_ops.ResourceVariable(rnd, name=var_name)] else: vs = [variables.VariableV1(rnd, name=var_name)] self.evaluate(variables.global_variables_initializer()) if call_saver_with_dict: saver = saver_module.Saver({var_name: vs[0]}) else: saver = saver_module.Saver(vs) actual_path = saver.save(sess, saved_path) self.assertEqual(saved_path, actual_path) return rnd def _restore(partitioner=None): # train.Saver is V1 only API. with ops_lib.Graph().as_default(), self.session() as sess: if partitioner: new_vs = [ variable_scope.get_variable( var_name, shape=var_full_shape, initializer=array_ops.zeros(var_full_shape), partitioner=partitioner) ] else: new_vs = [ variables.VariableV1( array_ops.zeros( shape=var_full_shape), # != original contents. name=var_name) ] self.evaluate(variables.global_variables_initializer()) if call_saver_with_dict: saver = saver_module.Saver({ var_name: new_vs[0] }) else: saver = saver_module.Saver(new_vs) saver.restore(sess, saved_path) if partitioner: return new_vs[0].as_tensor().eval() else: return new_vs[0].eval() for call_saver_with_dict in {False, True}: # Save PartitionedVariable and restore into full variable. saved_full = _save( partitioner=partitioned_variables.fixed_size_partitioner( num_shards=2)) restored_full = _restore() self.assertAllEqual(saved_full, restored_full) # Restores into the same number of partitions. restored_full = _restore( partitioner=partitioned_variables.fixed_size_partitioner( num_shards=2)) self.assertAllEqual(saved_full, restored_full) # Restores into a different number of partitions. restored_full = _restore( partitioner=partitioned_variables.fixed_size_partitioner( num_shards=3)) self.assertAllEqual(saved_full, restored_full) # Now, saves a full variable and restores PartitionedVariable. saved_full = _save() restored_full = _restore( partitioner=partitioned_variables.fixed_size_partitioner( num_shards=3)) self.assertAllEqual(saved_full, restored_full) def testPartitionedVariable(self): self._testPartitionedVariables(use_resource=False) def testPartitionedResourceVariable(self): self._testPartitionedVariables(use_resource=True) class SaveRestoreShardedTestV2(SaveRestoreShardedTest): _WRITE_VERSION = saver_pb2.SaverDef.V2 def testIterators(self): save_path = os.path.join(self.get_temp_dir(), "sharded_iterators") # Build a graph with 2 parameter nodes on different devices and save. with session.Session( target="", config=config_pb2.ConfigProto(device_count={"CPU": 2})) as sess: with sess.graph.device("/cpu:0"): ds0 = dataset_ops.Dataset.range(10) it0 = dataset_ops.make_initializable_iterator(ds0) get_next0 = it0.get_next() saveable0 = iterator_ops._IteratorSaveable( it0._iterator_resource, name="saveable_it0") with sess.graph.device("/cpu:1"): ds1 = dataset_ops.Dataset.range(20) it1 = dataset_ops.make_initializable_iterator(ds1) get_next1 = it1.get_next() saveable1 = iterator_ops._IteratorSaveable( it1._iterator_resource, name="saveable_it1") saver = saver_module.Saver({ "it0": saveable0, "it1": saveable1 }, write_version=self._WRITE_VERSION, sharded=True) self.evaluate(it0.initializer) self.evaluate(it1.initializer) self.assertEqual(0, self.evaluate(get_next0)) self.assertEqual(1, self.evaluate(get_next0)) self.assertEqual(0, self.evaluate(get_next1)) val = saver.save(sess, save_path) self.assertEqual(save_path, val) data_files = glob.glob(save_path + ".data*") self.assertEqual(2, len(data_files)) # Restore with session.Session( target="", config=config_pb2.ConfigProto(device_count={"CPU": 2})) as sess: with sess.graph.device("/cpu:0"): ds0 = dataset_ops.Dataset.range(10) it0 = dataset_ops.make_initializable_iterator(ds0) get_next0 = it0.get_next() saveable0 = iterator_ops._IteratorSaveable( it0._iterator_resource, name="saveable_it0") with sess.graph.device("/cpu:1"): ds1 = dataset_ops.Dataset.range(20) it1 = dataset_ops.make_initializable_iterator(ds1) get_next1 = it1.get_next() saveable1 = iterator_ops._IteratorSaveable( it1._iterator_resource, name="saveable_it1") saver = saver_module.Saver({ "it0": saveable0, "it1": saveable1 }, write_version=self._WRITE_VERSION, sharded=True) self.evaluate(it0.initializer) self.evaluate(it1.initializer) saver.restore(sess, save_path) self.assertEqual(2, self.evaluate(get_next0)) self.assertEqual(1, self.evaluate(get_next1)) def testIteratorsUnshardedRestore(self): save_path = os.path.join(self.get_temp_dir(), "restore_unsharded_iterators") # Build a graph with 2 parameter nodes on different devices and save. with session.Session( target="", config=config_pb2.ConfigProto(device_count={"CPU": 2})) as sess: with sess.graph.device("/cpu:0"): ds0 = dataset_ops.Dataset.range(10) it0 = dataset_ops.make_initializable_iterator(ds0) get_next0 = it0.get_next() saveable0 = iterator_ops._IteratorSaveable( it0._iterator_resource, name="saveable_it0") with sess.graph.device("/cpu:1"): ds1 = dataset_ops.Dataset.range(20) it1 = dataset_ops.make_initializable_iterator(ds1) get_next1 = it1.get_next() saveable1 = iterator_ops._IteratorSaveable( it1._iterator_resource, name="saveable_it1") saver = saver_module.Saver({ "it0": saveable0, "it1": saveable1 }, write_version=self._WRITE_VERSION, sharded=True) self.evaluate(it0.initializer) self.evaluate(it1.initializer) self.assertEqual(0, self.evaluate(get_next0)) self.assertEqual(1, self.evaluate(get_next0)) self.assertEqual(0, self.evaluate(get_next1)) val = saver.save(sess, save_path) self.assertEqual(save_path, val) data_files = glob.glob(save_path + ".data*") self.assertEqual(2, len(data_files)) # Restore with session.Session( target="", config=config_pb2.ConfigProto(device_count={"CPU": 2})) as sess: with sess.graph.device("/cpu:0"): ds0 = dataset_ops.Dataset.range(10) it0 = dataset_ops.make_initializable_iterator(ds0) get_next0 = it0.get_next() saveable0 = iterator_ops._IteratorSaveable( it0._iterator_resource, name="saveable_it0") with sess.graph.device("/cpu:1"): ds1 = dataset_ops.Dataset.range(20) it1 = dataset_ops.make_initializable_iterator(ds1) get_next1 = it1.get_next() saveable1 = iterator_ops._IteratorSaveable( it1._iterator_resource, name="saveable_it1") saver = saver_module.Saver({ "it0": saveable0, "it1": saveable1 }, write_version=self._WRITE_VERSION, sharded=False) self.evaluate(it0.initializer) self.evaluate(it1.initializer) saver.restore(sess, save_path) self.assertEqual(2, self.evaluate(get_next0)) self.assertEqual(1, self.evaluate(get_next1)) class MaxToKeepTest(test.TestCase): def _get_test_dir(self, dirname): test_dir = os.path.join(self.get_temp_dir(), dirname) gfile.MakeDirs(test_dir) return test_dir def assertCheckpointState(self, model_checkpoint_path, all_model_checkpoint_paths, save_dir): checkpoint_state = checkpoint_management.get_checkpoint_state(save_dir) self.assertEqual(checkpoint_state.model_checkpoint_path, model_checkpoint_path) self.assertEqual(checkpoint_state.all_model_checkpoint_paths, all_model_checkpoint_paths) def testMaxToKeepEager(self): with context.eager_mode(): save_dir = self._get_test_dir("max_to_keep_eager") v = variable_scope.variable(10.0, name="v") save = saver_module.Saver({"v": v}, max_to_keep=2) self.evaluate(variables.global_variables_initializer()) if not context.executing_eagerly(): self.assertEqual([], save.last_checkpoints) s1 = save.save(None, os.path.join(save_dir, "s1")) self.assertEqual([s1], save.last_checkpoints) self.assertTrue(checkpoint_management.checkpoint_exists(s1)) self.assertCheckpointState( model_checkpoint_path=s1, all_model_checkpoint_paths=[s1], save_dir=save_dir) s2 = save.save(None, os.path.join(save_dir, "s2")) self.assertEqual([s1, s2], save.last_checkpoints) self.assertTrue(checkpoint_management.checkpoint_exists(s1)) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertCheckpointState( model_checkpoint_path=s2, all_model_checkpoint_paths=[s1, s2], save_dir=save_dir) s3 = save.save(None, os.path.join(save_dir, "s3")) self.assertEqual([s2, s3], save.last_checkpoints) self.assertFalse(checkpoint_management.checkpoint_exists(s1)) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertTrue(checkpoint_management.checkpoint_exists(s3)) self.assertCheckpointState( model_checkpoint_path=s3, all_model_checkpoint_paths=[s2, s3], save_dir=save_dir) # Create a second helper, identical to the first. save2 = saver_module.Saver({"v": v}, max_to_keep=2) save2.set_last_checkpoints(save.last_checkpoints) # Exercise the first helper. # Adding s2 again (old s2 is removed first, then new s2 appended) s2 = save.save(None, os.path.join(save_dir, "s2")) self.assertEqual([s3, s2], save.last_checkpoints) self.assertFalse(checkpoint_management.checkpoint_exists(s1)) self.assertTrue(checkpoint_management.checkpoint_exists(s3)) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertCheckpointState( model_checkpoint_path=s2, all_model_checkpoint_paths=[s3, s2], save_dir=save_dir) # Adding s1 (s3 should now be deleted as oldest in list) s1 = save.save(None, os.path.join(save_dir, "s1")) self.assertEqual([s2, s1], save.last_checkpoints) self.assertFalse(checkpoint_management.checkpoint_exists(s3)) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertCheckpointState( model_checkpoint_path=s1, all_model_checkpoint_paths=[s2, s1], save_dir=save_dir) s2 = save2.save(None, os.path.join(save_dir, "s2")) self.assertEqual([s3, s2], save2.last_checkpoints) # Created by the first helper. self.assertTrue(checkpoint_management.checkpoint_exists(s1)) # Deleted by the first helper. self.assertFalse(checkpoint_management.checkpoint_exists(s3)) def testNonSharded(self): save_dir = self._get_test_dir("max_to_keep_non_sharded") # train.Saver is V1 only API. with ops_lib.Graph().as_default(), self.cached_session() as sess: v = variables.VariableV1(10.0, name="v") save = saver_module.Saver({"v": v}, max_to_keep=2) self.evaluate(variables.global_variables_initializer()) self.assertEqual([], save.last_checkpoints) s1 = save.save(sess, os.path.join(save_dir, "s1")) self.assertEqual([s1], save.last_checkpoints) self.assertTrue(checkpoint_management.checkpoint_exists(s1)) self.assertCheckpointState( model_checkpoint_path=s1, all_model_checkpoint_paths=[s1], save_dir=save_dir) s2 = save.save(sess, os.path.join(save_dir, "s2")) self.assertEqual([s1, s2], save.last_checkpoints) self.assertTrue(checkpoint_management.checkpoint_exists(s1)) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertCheckpointState( model_checkpoint_path=s2, all_model_checkpoint_paths=[s1, s2], save_dir=save_dir) s3 = save.save(sess, os.path.join(save_dir, "s3")) self.assertEqual([s2, s3], save.last_checkpoints) self.assertFalse(checkpoint_management.checkpoint_exists(s1)) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertTrue(checkpoint_management.checkpoint_exists(s3)) self.assertCheckpointState( model_checkpoint_path=s3, all_model_checkpoint_paths=[s2, s3], save_dir=save_dir) # Create a second helper, identical to the first. save2 = saver_module.Saver(saver_def=save.as_saver_def()) save2.set_last_checkpoints(save.last_checkpoints) # Create a third helper, with the same configuration but no knowledge of # previous checkpoints. save3 = saver_module.Saver(saver_def=save.as_saver_def()) # Exercise the first helper. # Adding s2 again (old s2 is removed first, then new s2 appended) s2 = save.save(sess, os.path.join(save_dir, "s2")) self.assertEqual([s3, s2], save.last_checkpoints) self.assertFalse(checkpoint_management.checkpoint_exists(s1)) self.assertFalse( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s1))) self.assertTrue(checkpoint_management.checkpoint_exists(s3)) self.assertTrue( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s3))) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertTrue( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s2))) self.assertCheckpointState( model_checkpoint_path=s2, all_model_checkpoint_paths=[s3, s2], save_dir=save_dir) # Adding s1 (s3 should now be deleted as oldest in list) s1 = save.save(sess, os.path.join(save_dir, "s1")) self.assertEqual([s2, s1], save.last_checkpoints) self.assertFalse(checkpoint_management.checkpoint_exists(s3)) self.assertFalse( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s3))) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertTrue( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s2))) self.assertTrue(checkpoint_management.checkpoint_exists(s1)) self.assertTrue( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s1))) self.assertCheckpointState( model_checkpoint_path=s1, all_model_checkpoint_paths=[s2, s1], save_dir=save_dir) # Exercise the second helper. # Adding s2 again (old s2 is removed first, then new s2 appended) s2 = save2.save(sess, os.path.join(save_dir, "s2")) self.assertEqual([s3, s2], save2.last_checkpoints) # Created by the first helper. self.assertTrue(checkpoint_management.checkpoint_exists(s1)) self.assertTrue( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s1))) # Deleted by the first helper. self.assertFalse(checkpoint_management.checkpoint_exists(s3)) self.assertFalse( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s3))) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertTrue( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s2))) self.assertCheckpointState( model_checkpoint_path=s2, all_model_checkpoint_paths=[s3, s2], save_dir=save_dir) # Adding s1 (s3 should now be deleted as oldest in list) s1 = save2.save(sess, os.path.join(save_dir, "s1")) self.assertEqual([s2, s1], save2.last_checkpoints) self.assertFalse(checkpoint_management.checkpoint_exists(s3)) self.assertFalse( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s3))) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertTrue( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s2))) self.assertTrue(checkpoint_management.checkpoint_exists(s1)) self.assertTrue( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s1))) self.assertCheckpointState( model_checkpoint_path=s1, all_model_checkpoint_paths=[s2, s1], save_dir=save_dir) # Exercise the third helper. # Adding s2 again (but helper is unaware of previous s2) s2 = save3.save(sess, os.path.join(save_dir, "s2")) self.assertEqual([s2], save3.last_checkpoints) # Created by the first helper. self.assertTrue(checkpoint_management.checkpoint_exists(s1)) self.assertTrue( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s1))) # Deleted by the first helper. self.assertFalse(checkpoint_management.checkpoint_exists(s3)) self.assertFalse( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s3))) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertTrue( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s2))) # Even though the file for s1 exists, this saver isn't aware of it, which # is why it doesn't end up in the checkpoint state. self.assertCheckpointState( model_checkpoint_path=s2, all_model_checkpoint_paths=[s2], save_dir=save_dir) # Adding s1 (s3 should not be deleted because helper is unaware of it) s1 = save3.save(sess, os.path.join(save_dir, "s1")) self.assertEqual([s2, s1], save3.last_checkpoints) self.assertFalse(checkpoint_management.checkpoint_exists(s3)) self.assertFalse( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s3))) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertTrue( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s2))) self.assertTrue(checkpoint_management.checkpoint_exists(s1)) self.assertTrue( checkpoint_management.checkpoint_exists( checkpoint_management.meta_graph_filename(s1))) self.assertCheckpointState( model_checkpoint_path=s1, all_model_checkpoint_paths=[s2, s1], save_dir=save_dir) def testSharded(self): save_dir = self._get_test_dir("max_to_keep_sharded") with session.Session( target="", config=config_pb2.ConfigProto(device_count={"CPU": 2})) as sess: with sess.graph.device("/cpu:0"): v0 = variables.VariableV1(111, name="v0") with sess.graph.device("/cpu:1"): v1 = variables.VariableV1(222, name="v1") save = saver_module.Saver( { "v0": v0, "v1": v1 }, sharded=True, max_to_keep=2) self.evaluate(variables.global_variables_initializer()) self.assertEqual([], save.last_checkpoints) s1 = save.save(sess, os.path.join(save_dir, "s1")) self.assertEqual([s1], save.last_checkpoints) if save._write_version is saver_pb2.SaverDef.V1: self.assertEqual(2, len(gfile.Glob(s1))) else: self.assertEqual(4, len(gfile.Glob(s1 + "*"))) self.assertTrue( gfile.Exists(checkpoint_management.meta_graph_filename(s1))) s2 = save.save(sess, os.path.join(save_dir, "s2")) self.assertEqual([s1, s2], save.last_checkpoints) if save._write_version is saver_pb2.SaverDef.V1: self.assertEqual(2, len(gfile.Glob(s1))) else: self.assertEqual(4, len(gfile.Glob(s1 + "*"))) self.assertTrue( gfile.Exists(checkpoint_management.meta_graph_filename(s1))) if save._write_version is saver_pb2.SaverDef.V1: self.assertEqual(2, len(gfile.Glob(s2))) else: self.assertEqual(4, len(gfile.Glob(s2 + "*"))) self.assertTrue( gfile.Exists(checkpoint_management.meta_graph_filename(s2))) s3 = save.save(sess, os.path.join(save_dir, "s3")) self.assertEqual([s2, s3], save.last_checkpoints) self.assertEqual(0, len(gfile.Glob(s1 + "*"))) self.assertFalse( gfile.Exists(checkpoint_management.meta_graph_filename(s1))) if save._write_version is saver_pb2.SaverDef.V1: self.assertEqual(2, len(gfile.Glob(s2))) else: self.assertEqual(4, len(gfile.Glob(s2 + "*"))) self.assertTrue( gfile.Exists(checkpoint_management.meta_graph_filename(s2))) if save._write_version is saver_pb2.SaverDef.V1: self.assertEqual(2, len(gfile.Glob(s3))) else: self.assertEqual(4, len(gfile.Glob(s3 + "*"))) self.assertTrue( gfile.Exists(checkpoint_management.meta_graph_filename(s3))) def testNoMaxToKeep(self): save_dir = self._get_test_dir("no_max_to_keep") save_dir2 = self._get_test_dir("max_to_keep_0") with self.cached_session() as sess: v = variables.VariableV1(10.0, name="v") self.evaluate(variables.global_variables_initializer()) # Test max_to_keep being None. save = saver_module.Saver({"v": v}, max_to_keep=None) self.assertEqual([], save.last_checkpoints) s1 = save.save(sess, os.path.join(save_dir, "s1")) self.assertEqual([], save.last_checkpoints) self.assertTrue(checkpoint_management.checkpoint_exists(s1)) s2 = save.save(sess, os.path.join(save_dir, "s2")) self.assertEqual([], save.last_checkpoints) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) # Test max_to_keep being 0. save2 = saver_module.Saver({"v": v}, max_to_keep=0) self.assertEqual([], save2.last_checkpoints) s1 = save2.save(sess, os.path.join(save_dir2, "s1")) self.assertEqual([], save2.last_checkpoints) self.assertTrue(checkpoint_management.checkpoint_exists(s1)) s2 = save2.save(sess, os.path.join(save_dir2, "s2")) self.assertEqual([], save2.last_checkpoints) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) def testNoMetaGraph(self): save_dir = self._get_test_dir("no_meta_graph") with self.cached_session() as sess: v = variables.VariableV1(10.0, name="v") save = saver_module.Saver({"v": v}) self.evaluate(variables.global_variables_initializer()) s1 = save.save(sess, os.path.join(save_dir, "s1"), write_meta_graph=False) self.assertTrue(checkpoint_management.checkpoint_exists(s1)) self.assertFalse( gfile.Exists(checkpoint_management.meta_graph_filename(s1))) class RecoverLastCheckpointsTest(test.TestCase): def _get_test_dir(self, dirname): test_dir = os.path.join(self.get_temp_dir(), dirname) gfile.MakeDirs(test_dir) return test_dir def assertCheckpointState(self, model_checkpoint_path, all_model_checkpoint_paths, save_dir): checkpoint_state = checkpoint_management.get_checkpoint_state(save_dir) self.assertEqual(checkpoint_state.model_checkpoint_path, model_checkpoint_path) self.assertEqual(checkpoint_state.all_model_checkpoint_paths, all_model_checkpoint_paths) def test_recover_last_checkpoints(self): with context.eager_mode(): save_dir = self._get_test_dir("recover_last_checkpoints") v = variable_scope.variable(10.0, name="v") save = saver_module.Saver({"v": v}, max_to_keep=10) self.evaluate(variables.global_variables_initializer()) self.assertEqual([], save.last_checkpoints) s1 = save.save(None, os.path.join(save_dir, "ckpt-1")) s2 = save.save(None, os.path.join(save_dir, "ckpt-2")) s3 = save.save(None, os.path.join(save_dir, "ckpt-3")) self.assertEqual([s1, s2, s3], save.last_checkpoints) self.assertTrue(checkpoint_management.checkpoint_exists(s1)) self.assertTrue(checkpoint_management.checkpoint_exists(s2)) self.assertTrue(checkpoint_management.checkpoint_exists(s3)) self.assertCheckpointState( model_checkpoint_path=s3, all_model_checkpoint_paths=[s1, s2, s3], save_dir=save_dir) # Create another saver and recover last checkpoints. save2 = saver_module.Saver({"v": v}, max_to_keep=10) self.assertEqual([], save2.last_checkpoints) save2.recover_last_checkpoints([s1, s2, s3]) self.assertEqual([s1, s2, s3], save2.last_checkpoints) # Remove a checkpoint and check that last checkpoints are # restored correctly. for fname in gfile.Glob("{}*".format(s1)): gfile.Remove(fname) self.assertFalse(checkpoint_management.checkpoint_exists(s1)) # Create another saver and recover last checkpoints. The removed # checkpoint would be correctly omitted. save3 = saver_module.Saver({"v": v}, max_to_keep=10) self.assertEqual([], save3.last_checkpoints) save3.recover_last_checkpoints([s1, s2, s3]) self.assertEqual([s2, s3], save3.last_checkpoints) s4 = save3.save(None, os.path.join(save_dir, "ckpt-4")) self.assertCheckpointState( model_checkpoint_path=s4, all_model_checkpoint_paths=[s2, s3, s4], save_dir=save_dir) class KeepCheckpointEveryNHoursTest(test.TestCase): def _get_test_dir(self, dirname): test_dir = os.path.join(self.get_temp_dir(), dirname) gfile.MakeDirs(test_dir) return test_dir @test_util.run_in_graph_and_eager_modes @test.mock.patch.object(saver_module, "time") def testNonSharded(self, mock_time): save_dir = self._get_test_dir("keep_checkpoint_every_n_hours") with self.cached_session() as sess: v = variable_scope.variable([10.0], name="v") # Run the initializer NOW to avoid the 0.5s overhead of the first Run() # call, which throws the test timing off in fastbuild mode. self.evaluate(variables.global_variables_initializer()) # Create a saver that will keep the last 2 checkpoints plus one every 0.7 # seconds. start_time = time.time() mock_time.time.return_value = start_time save = saver_module.Saver( { "v": v }, max_to_keep=2, keep_checkpoint_every_n_hours=0.7 / 3600) self.assertEqual([], save.last_checkpoints) # Wait till 1 seconds have elapsed so s1 will be old enough to keep. # sleep may return early, don't trust it. mock_time.time.return_value = start_time + 1.0 s1 = save.save(sess, os.path.join(save_dir, "s1")) self.assertEqual([s1], save.last_checkpoints) s2 = save.save(sess, os.path.join(save_dir, "s2")) self.assertEqual([s1, s2], save.last_checkpoints) # We now have 2 'last_checkpoints': [s1, s2]. The next call to Save(), # would normally delete s1, because max_to_keep is 2. However, s1 is # older than 0.7s so we must keep it. s3 = save.save(sess, os.path.join(save_dir, "s3")) self.assertEqual([s2, s3], save.last_checkpoints) # s1 should still be here, we are Not checking now to reduce time # variance in the test. # We now have 2 'last_checkpoints': [s2, s3], and s1 on disk. The next # call to Save(), will delete s2, because max_to_keep is 2, and because # we already kept the old s1. s2 is very close in time to s1 so it gets # deleted. s4 = save.save(sess, os.path.join(save_dir, "s4")) self.assertEqual([s3, s4], save.last_checkpoints) # Check that s1 is still here, but s2 is gone. self.assertTrue(checkpoint_management.checkpoint_exists(s1)) self.assertFalse(checkpoint_management.checkpoint_exists(s2)) self.assertTrue(checkpoint_management.checkpoint_exists(s3)) self.assertTrue(checkpoint_management.checkpoint_exists(s4)) class SaveRestoreWithVariableNameMap(test.TestCase): def _testNonReshape(self, variable_op): save_path = os.path.join(self.get_temp_dir(), "non_reshape") with self.session(graph=ops_lib.Graph()) as sess: # Build a graph with 2 parameter nodes, and Save and # Restore nodes for them. v0 = variable_op(10.0, name="v0") v1 = variable_op(20.0, name="v1") save = saver_module.Saver({"save_prefix/v0": v0, "save_prefix/v1": v1}) self.evaluate(variables.global_variables_initializer()) # Check that the parameter nodes have been initialized. self.assertEqual(10.0, self.evaluate(v0)) self.assertEqual(20.0, self.evaluate(v1)) # Save the initialized values in the file at "save_path" # Use a variable name map to set the saved tensor names val = save.save(sess, save_path) self.assertTrue(isinstance(val, six.string_types)) self.assertEqual(save_path, val) # Verify that the original names are not in the Saved file save = saver_module.Saver({"v0": v0, "v1": v1}) with self.assertRaisesOpError("not found in checkpoint"): save.restore(sess, save_path) # Verify that the mapped names are present in the Saved file and can be # Restored using remapped names. with self.session(graph=ops_lib.Graph()) as sess: v0 = variable_op(-1.0, name="v0") v1 = variable_op(-1.0, name="v1") if not context.executing_eagerly(): with self.assertRaisesOpError("uninitialized"): self.evaluate(v0) with self.assertRaisesOpError("uninitialized"): self.evaluate(v1) save = saver_module.Saver({"save_prefix/v0": v0, "save_prefix/v1": v1}) save.restore(sess, save_path) # Check that the parameter nodes have been restored. if not context.executing_eagerly(): self.assertEqual(10.0, self.evaluate(v0)) self.assertEqual(20.0, self.evaluate(v1)) # Add a prefix to the node names in the current graph and Restore using # remapped names. with self.session(graph=ops_lib.Graph()) as sess: v0 = variable_op(-1.0, name="restore_prefix/v0") v1 = variable_op(-1.0, name="restore_prefix/v1") if not context.executing_eagerly(): with self.assertRaisesOpError("uninitialized"): self.evaluate(v0) with self.assertRaisesOpError("uninitialized"): self.evaluate(v1) # Restore the saved values in the parameter nodes. save = saver_module.Saver({"save_prefix/v0": v0, "save_prefix/v1": v1}) save.restore(sess, save_path) # Check that the parameter nodes have been restored. self.assertEqual(10.0, self.evaluate(v0)) self.assertEqual(20.0, self.evaluate(v1)) @test_util.run_in_graph_and_eager_modes def testNonReshapeResourceVariable(self): self._testNonReshape(resource_variable_ops.ResourceVariable) def testNonReshapeVariable(self): self._testNonReshape(variables.Variable) class MetaGraphTest(test.TestCase): def _get_test_dir(self, dirname): test_dir = os.path.join(self.get_temp_dir(), dirname) gfile.MakeDirs(test_dir) return test_dir @test_util.run_v1_only( "Queue-based input pipelines have been replaced by `tf.data` " "and not supported in V2.") def testAddCollectionDef(self): test_dir = self._get_test_dir("good_collection") filename = os.path.join(test_dir, "metafile") with self.cached_session(): # Creates a graph. v0 = variables.VariableV1(1.0, name="v0") control_flow_ops.cond( math_ops.less(v0, 10), lambda: math_ops.add(v0, 1), lambda: math_ops.subtract(v0, 1)) control_flow_ops.while_loop(lambda i: math_ops.less(i, 10), lambda i: math_ops.add(i, 1), [v0]) var = variables.VariableV1(constant_op.constant(0, dtype=dtypes.int64)) count_up_to = var.count_up_to(3) input_queue = data_flow_ops.FIFOQueue( 30, dtypes.float32, shared_name="collection_queue") qr = queue_runner_impl.QueueRunner(input_queue, [count_up_to]) variables.global_variables_initializer() # Creates a saver. save = saver_module.Saver({"v0": v0}) # Adds a set of collections. ops_lib.add_to_collection("int_collection", 3) ops_lib.add_to_collection("float_collection", 3.5) ops_lib.add_to_collection("string_collection", "hello") ops_lib.add_to_collection("variable_collection", v0) # Add QueueRunners. queue_runner_impl.add_queue_runner(qr) # Adds user_defined proto in three formats: string, bytes and Any. queue_runner = queue_runner_pb2.QueueRunnerDef(queue_name="test_queue") ops_lib.add_to_collection("user_defined_string_collection", str(queue_runner)) ops_lib.add_to_collection("user_defined_bytes_collection", queue_runner.SerializeToString()) any_buf = Any() any_buf.Pack(queue_runner) ops_lib.add_to_collection("user_defined_any_collection", any_buf) # Generates MetaGraphDef. meta_graph_def = save.export_meta_graph(filename) self.assertTrue(meta_graph_def.HasField("saver_def")) self.assertTrue(meta_graph_def.HasField("graph_def")) self.assertTrue(meta_graph_def.HasField("meta_info_def")) self.assertNotEqual(meta_graph_def.meta_info_def.tensorflow_version, "") self.assertNotEqual(meta_graph_def.meta_info_def.tensorflow_git_version, "") collection_def = meta_graph_def.collection_def self.assertEqual(len(collection_def), 12) with ops_lib.Graph().as_default(): # Restores from MetaGraphDef. new_saver = saver_module.import_meta_graph(filename) # Generates a new MetaGraphDef. new_meta_graph_def = new_saver.export_meta_graph() # It should be the same as the original. test_util.assert_meta_graph_protos_equal( self, meta_graph_def, new_meta_graph_def) def testAddCollectionDefFails(self): with self.cached_session(): # Creates a graph. v0 = variables.VariableV1(10.0, name="v0") # Creates a saver. save = saver_module.Saver({"v0": v0}) # Generates MetaGraphDef. meta_graph_def = meta_graph_pb2.MetaGraphDef() # Verifies that collection with unsupported key will not be added. ops_lib.add_to_collection(save, 3) save._add_collection_def(meta_graph_def, save) self.assertEqual(len(meta_graph_def.collection_def), 0) # Verifies that collection where item type does not match expected # type will not be added. ops_lib.add_to_collection("int_collection", 3) ops_lib.add_to_collection("int_collection", 3.5) save._add_collection_def(meta_graph_def, "int_collection") self.assertEqual(len(meta_graph_def.collection_def), 0) def _testMultiSaverCollectionSave(self, test_dir): filename = os.path.join(test_dir, "metafile") saver0_ckpt = os.path.join(test_dir, "saver0.ckpt") saver1_ckpt = os.path.join(test_dir, "saver1.ckpt") with self.session(graph=ops_lib.Graph()) as sess: # Creates a graph. v0 = variables.VariableV1([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], name="v0") v1 = variables.VariableV1(11.0, name="v1") # Creates 2 savers. saver0 = saver_module.Saver({"v0": v0}, name="saver0") saver1 = saver_module.Saver({"v1": v1}, name="saver1") ops_lib.add_to_collection("savers", saver0) ops_lib.add_to_collection("savers", saver1) self.evaluate(variables.global_variables_initializer()) # Saves to different checkpoints. saver0.save(sess, saver0_ckpt) saver1.save(sess, saver1_ckpt) # Generates MetaGraphDef. meta_graph_def = saver_module.export_meta_graph(filename) meta_graph_def0 = saver0.export_meta_graph() meta_graph_def1 = saver1.export_meta_graph() # Verifies that there is no saver_def in meta_graph_def. self.assertFalse(meta_graph_def.HasField("saver_def")) # Verifies that there is saver_def in meta_graph_def0 and 1. self.assertTrue(meta_graph_def0.HasField("saver_def")) self.assertTrue(meta_graph_def1.HasField("saver_def")) # Verifies SAVERS is saved as bytes_list for meta_graph_def. collection_def = meta_graph_def.collection_def["savers"] kind = collection_def.WhichOneof("kind") self.assertEqual(kind, "bytes_list") # Verifies that there are 2 entries in SAVERS collection. savers = getattr(collection_def, kind) self.assertEqual(2, len(savers.value)) # Verifies SAVERS collection is saved as bytes_list for meta_graph_def0. collection_def = meta_graph_def0.collection_def["savers"] kind = collection_def.WhichOneof("kind") self.assertEqual(kind, "bytes_list") # Verifies that there are 2 entries in SAVERS collection. savers = getattr(collection_def, kind) self.assertEqual(2, len(savers.value)) def _testMultiSaverCollectionRestore(self, test_dir): filename = os.path.join(test_dir, "metafile") saver0_ckpt = os.path.join(test_dir, "saver0.ckpt") saver1_ckpt = os.path.join(test_dir, "saver1.ckpt") with self.session(graph=ops_lib.Graph()) as sess: # Imports from meta_graph. saver_module.import_meta_graph(filename) # Retrieves SAVERS collection. Verifies there are 2 entries. savers = ops_lib.get_collection("savers") self.assertEqual(2, len(savers)) # Retrieves saver0. Verifies that new_saver0 can restore v0, but not v1. new_saver0 = savers[0] new_saver0.restore(sess, saver0_ckpt) v0 = sess.graph.get_tensor_by_name("v0:0") v1 = sess.graph.get_tensor_by_name("v1:0") self.assertAllEqual([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], self.evaluate(v0)) self.assertEqual([3, 2], v0.get_shape()) self.assertEqual([], v1.get_shape()) with self.assertRaisesWithPredicateMatch( errors_impl.OpError, lambda e: "uninitialized value v1" in e.message): self.evaluate(v1) # Retrieves saver1. Verifies that new_saver1 can restore v1. new_saver1 = savers[1] new_saver1.restore(sess, saver1_ckpt) v1 = sess.graph.get_tensor_by_name("v1:0") self.assertEqual(11.0, self.evaluate(v1)) @test_util.run_v1_only( "Exporting/importing meta graphs is only supported in V1.") def testMultiSaverCollection(self): test_dir = self._get_test_dir("saver_collection") self._testMultiSaverCollectionSave(test_dir) self._testMultiSaverCollectionRestore(test_dir) @test_util.run_v1_only( "Exporting/importing meta graphs is only supported in V1.") def testClearExtraneousSavers(self): test_dir = self._get_test_dir("clear_extraneous_savers") filename = os.path.join(test_dir, "metafile") saver0_ckpt = os.path.join(test_dir, "saver0.ckpt") saver1_ckpt = os.path.join(test_dir, "saver1.ckpt") with self.session(graph=ops_lib.Graph()) as sess: # Creates a graph. v0 = variables.VariableV1([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], name="v0") v1 = variables.VariableV1(11.0, name="v1") # Creates 2 savers. saver0 = saver_module.Saver({"v0": v0}, name="saver0") saver1 = saver_module.Saver({"v1": v1}, name="saver1") ops_lib.add_to_collection("savers", saver0) ops_lib.add_to_collection("savers", saver1) self.evaluate(variables.global_variables_initializer()) # Saves to different checkpoints. saver0.save(sess, saver0_ckpt) saver1.save(sess, saver1_ckpt) # Generates MetaGraphDef. meta_graph_def = saver_module.export_meta_graph(filename) meta_graph_def0 = saver0.export_meta_graph() meta_graph_def1 = saver1.export_meta_graph(clear_extraneous_savers=True) # Verifies that there is no saver_def in meta_graph_def. self.assertFalse(meta_graph_def.HasField("saver_def")) # Verifies that there is saver_def in meta_graph_def0 and 1. self.assertTrue(meta_graph_def0.HasField("saver_def")) self.assertTrue(meta_graph_def1.HasField("saver_def")) # Verifies SAVERS is saved as bytes_list for meta_graph_def. collection_def = meta_graph_def.collection_def["savers"] kind = collection_def.WhichOneof("kind") self.assertEqual(kind, "bytes_list") # Verifies that there are 2 entries in SAVERS collection. savers = getattr(collection_def, kind) self.assertEqual(2, len(savers.value)) # Verifies SAVERS collection is saved as bytes_list for meta_graph_def1. collection_def = meta_graph_def1.collection_def["savers"] kind = collection_def.WhichOneof("kind") self.assertEqual(kind, "bytes_list") # Verifies that there is 1 entry in SAVERS collection. savers = getattr(collection_def, kind) self.assertEqual(1, len(savers.value)) # Verifies that saver0 graph nodes are omitted from the saver1 export self.assertEqual(33, len(meta_graph_def0.graph_def.node)) self.assertEqual(21, len(meta_graph_def1.graph_def.node)) def testBinaryAndTextFormat(self): test_dir = self._get_test_dir("binary_and_text") filename = os.path.join(test_dir, "metafile") # train.Saver is V1 only API. with ops_lib.Graph().as_default(), self.session(): # Creates a graph. variables.VariableV1(10.0, name="v0") # Exports the graph as binary format. saver_module.export_meta_graph(filename, as_text=False) with ops_lib.Graph().as_default(), self.session(): # Imports the binary format graph. saver = saver_module.import_meta_graph(filename) self.assertIsNotNone(saver) # Exports the graph as text format. saver.export_meta_graph(filename, as_text=True) with ops_lib.Graph().as_default(), self.session(): # Imports the text format graph. saver_module.import_meta_graph(filename) # Writes wrong contents to the file. graph_io.write_graph(saver.as_saver_def(), os.path.dirname(filename), os.path.basename(filename)) with ops_lib.Graph().as_default(), self.session(): # Import should fail. with self.assertRaisesWithPredicateMatch(IOError, lambda e: "Cannot parse file"): saver_module.import_meta_graph(filename) # Deletes the file gfile.Remove(filename) with self.assertRaisesWithPredicateMatch(IOError, lambda e: "does not exist"): saver_module.import_meta_graph(filename) @test_util.run_v1_only( "Exporting/importing meta graphs is only supported in V1.") def testSliceVariable(self): test_dir = self._get_test_dir("slice_saver") filename = os.path.join(test_dir, "metafile") with self.cached_session(): v1 = variables.VariableV1([20.0], name="v1") v2 = variables.VariableV1([20.0], name="v2") v2._set_save_slice_info( variables.Variable.SaveSliceInfo("v1", [1], [0], [1])) # The names are different and will work. slice_saver = saver_module.Saver({"first": v1, "second": v2}) self.evaluate(variables.global_variables_initializer()) # Exports to meta_graph meta_graph_def = slice_saver.export_meta_graph(filename) with ops_lib.Graph().as_default(): # Restores from MetaGraphDef. new_saver = saver_module.import_meta_graph(filename) self.assertIsNotNone(new_saver) # Generates a new MetaGraphDef. new_meta_graph_def = new_saver.export_meta_graph() # It should be the same as the original. test_util.assert_meta_graph_protos_equal(self, meta_graph_def, new_meta_graph_def) def _testGraphExtensionSave(self, test_dir): filename = os.path.join(test_dir, "metafile") saver0_ckpt = os.path.join(test_dir, "saver0.ckpt") # Creates an inference graph. # Hidden 1 images = constant_op.constant(1.2, dtypes.float32, shape=[100, 28]) with ops_lib.name_scope("hidden1"): weights = variables.VariableV1( random_ops.truncated_normal( [28, 128], stddev=1.0 / math.sqrt(float(28))), name="weights") # The use of control_flow_ops.cond here is purely for adding test coverage # the save and restore of control flow context (which doesn't make any # sense here from a machine learning perspective). The typical biases is # a simple Variable without the conditions. biases = variables.VariableV1( control_flow_ops.cond( math_ops.less(random.random(), 0.5), lambda: array_ops.ones([128]), lambda: array_ops.zeros([128])), name="biases") hidden1 = nn_ops.relu(math_ops.matmul(images, weights) + biases) # Hidden 2 with ops_lib.name_scope("hidden2"): weights = variables.VariableV1( random_ops.truncated_normal( [128, 32], stddev=1.0 / math.sqrt(float(128))), name="weights") # The use of control_flow_ops.while_loop here is purely for adding test # coverage the save and restore of control flow context (which doesn't # make any sense here from a machine learning perspective). The typical # biases is a simple Variable without the conditions. def loop_cond(it, _): return it < 2 def loop_body(it, biases): biases += constant_op.constant(0.1, shape=[32]) return it + 1, biases _, biases = control_flow_ops.while_loop( loop_cond, loop_body, [constant_op.constant(0), variables.VariableV1(array_ops.zeros([32]))]) hidden2 = nn_ops.relu(math_ops.matmul(hidden1, weights) + biases) # Linear with ops_lib.name_scope("softmax_linear"): weights = variables.VariableV1( random_ops.truncated_normal( [32, 10], stddev=1.0 / math.sqrt(float(32))), name="weights") biases = variables.VariableV1(array_ops.zeros([10]), name="biases") logits = math_ops.matmul(hidden2, weights) + biases ops_lib.add_to_collection("logits", logits) init_all_op = variables.global_variables_initializer() with self.cached_session() as sess: # Initializes all the variables. self.evaluate(init_all_op) # Runs to logit. self.evaluate(logits) # Creates a saver. saver0 = saver_module.Saver() saver0.save(sess, saver0_ckpt) # Generates MetaGraphDef. saver0.export_meta_graph(filename) def _testGraphExtensionRestore(self, test_dir): filename = os.path.join(test_dir, "metafile") train_filename = os.path.join(test_dir, "train_metafile") saver0_ckpt = os.path.join(test_dir, "saver0.ckpt") with self.session(graph=ops_lib.Graph()) as sess: # Restores from MetaGraphDef. new_saver = saver_module.import_meta_graph(filename) # Generates a new MetaGraphDef. new_saver.export_meta_graph() # Restores from checkpoint. new_saver.restore(sess, saver0_ckpt) # Adds loss and train. labels = constant_op.constant(0, dtypes.int32, shape=[100], name="labels") batch_size = array_ops.size(labels) labels = array_ops.expand_dims(labels, 1) indices = array_ops.expand_dims(math_ops.range(0, batch_size), 1) concated = array_ops.concat([indices, labels], 1) onehot_labels = sparse_ops.sparse_to_dense( concated, array_ops.stack([batch_size, 10]), 1.0, 0.0) logits = ops_lib.get_collection("logits")[0] cross_entropy = nn_ops.softmax_cross_entropy_with_logits( labels=onehot_labels, logits=logits, name="xentropy") loss = math_ops.reduce_mean(cross_entropy, name="xentropy_mean") summary.scalar("loss", loss) # Creates the gradient descent optimizer with the given learning rate. optimizer = gradient_descent.GradientDescentOptimizer(0.01) # Runs train_op. train_op = optimizer.minimize(loss) ops_lib.add_to_collection("train_op", train_op) # Runs train_op. self.evaluate(train_op) # Generates MetaGraphDef. saver_module.export_meta_graph(train_filename) def _testRestoreFromTrainGraphWithControlContext(self, test_dir): train_filename = os.path.join(test_dir, "train_metafile") saver0_ckpt = os.path.join(test_dir, "saver0.ckpt") with self.session(graph=ops_lib.Graph()) as sess: # Restores from MetaGraphDef. new_saver = saver_module.import_meta_graph(train_filename) # Restores from checkpoint. new_saver.restore(sess, saver0_ckpt) train_op = ops_lib.get_collection("train_op")[0] self.evaluate(train_op) def testGraphExtension(self): test_dir = self._get_test_dir("graph_extension") # train.Saver and train.import_meta_graph are V1 only APIs. with ops_lib.Graph().as_default(): self._testGraphExtensionSave(test_dir) self._testGraphExtensionRestore(test_dir) self._testRestoreFromTrainGraphWithControlContext(test_dir) def _testGradientSerDes(self, graph_fn): """Tests that gradients can be computed after exporting and importing. Builds a graph, exports it, and verifies that it can be imported and the gradient can be built and run correctly. Args: graph_fn: takes a single float Tensor argument as input, outputs a single Tensor """ test_dir = self._get_test_dir("nested_control_flow") filename = os.path.join(test_dir, "metafile") saver_ckpt = os.path.join(test_dir, "saver.ckpt") # Create while loop using `outer_body_fn`. with ops_lib.Graph().as_default(): var = variables.VariableV1(0.0) var_name = var.name output = graph_fn(var) output_name = output.name init_op = variables.global_variables_initializer() # Generate a MetaGraphDef containing the while loop. with session.Session() as sess: self.evaluate(init_op) self.evaluate(output) saver = saver_module.Saver() saver.save(sess, saver_ckpt) saver.export_meta_graph(filename) # Build and run the gradients of the while loop. We use this below to # verify that the gradients are correct with an imported MetaGraphDef. grad = gradients_impl.gradients([output], [var]) # Turn off constant folding to avoid breaking testNestedControlFlowSerDes. # It appears that a missing control dependency in the gradient graph # causes the fetch node to not be triggered. no_constfold_config = config_pb2.ConfigProto() no_constfold_config.graph_options.rewrite_options.constant_folding = ( rewriter_config_pb2.RewriterConfig.OFF) with session.Session(config=no_constfold_config) as sess: self.evaluate(init_op) expected_grad_value = self.evaluate(grad) # Restore the MetaGraphDef into a new Graph. with ops_lib.Graph().as_default(): with session.Session() as sess: saver = saver_module.import_meta_graph(filename) saver.restore(sess, saver_ckpt) # Make sure we can still build gradients and get the same result. var = ops_lib.get_default_graph().get_tensor_by_name(var_name) output = ops_lib.get_default_graph().get_tensor_by_name(output_name) grad = gradients_impl.gradients([output], [var]) init_op = variables.global_variables_initializer() with session.Session(config=no_constfold_config) as sess: self.evaluate(init_op) actual_grad_value = self.evaluate(grad) self.assertEqual(expected_grad_value, actual_grad_value) def _testWhileLoopAndGradientSerDes(self, outer_body_fn): # Build a while loop with `outer_body_fn`, export it, and verify that it can # be imported and the gradient can be built and run correctly. # pylint: disable=g-long-lambda return self._testGradientSerDes( lambda x: control_flow_ops.while_loop( lambda i, y: i < 5, outer_body_fn, [0, x])[1]) # pylint: enable=g-long-lambda def testNestedWhileLoopsSerDes(self): # Test two simple nested while loops. def body(i, x): _, r = control_flow_ops.while_loop(lambda j, y: j < 3, lambda j, y: (j + 1, y + x), [0, 0.0]) return i + 1, x + r self._testWhileLoopAndGradientSerDes(body) def testNestedControlFlowSerDes(self): # Test while loop in a cond in a while loop. # pylint: disable=g-long-lambda def body(i, x): cond_result = control_flow_ops.cond( i > 0, lambda: control_flow_ops.while_loop( lambda j, y: j < 3, lambda j, y: (j + 1, y + x), [0, 0.0])[1], lambda: x) return i + 1, cond_result # pylint: enable=g-long-lambda self._testWhileLoopAndGradientSerDes(body) def testNestedCondsSerDes(self): # Test conds in a cond. # pylint: disable=g-long-lambda self._testGradientSerDes(lambda x: control_flow_ops.cond( x > 0, lambda: control_flow_ops.cond(x > 3, lambda: array_ops.identity(x), lambda: math_ops.multiply(x, 2.0)), lambda: control_flow_ops.cond(x < -3, lambda: constant_op.constant(1.0), lambda: math_ops.multiply(x, -1.0)))) # pylint: enable=g-long-lambda @test_util.run_v1_only("This exercises Tensor.op which is meaningless in V2.") def testStrippedOpListDef(self): with self.cached_session(): # Creates a graph. v0 = variables.VariableV1(0.0) var = variables.VariableV1(10.0) math_ops.add(v0, var) @function.Defun(dtypes.float32) def minus_one(x): return x - 1 minus_one(array_ops.identity(v0)) save = saver_module.Saver({"v0": v0}) variables.global_variables_initializer() # Generates MetaGraphDef. meta_graph_def = save.export_meta_graph() ops = [o.name for o in meta_graph_def.meta_info_def.stripped_op_list.op] if save._write_version is saver_pb2.SaverDef.V1: self.assertEqual(ops, [ "Add", "Assign", "Const", "Identity", "NoOp", "PlaceholderWithDefault", "RestoreV2", "SaveSlices", "Sub", "VariableV2" ]) else: self.assertEqual(ops, [ "Add", "Assign", "Const", "Identity", "NoOp", "PlaceholderWithDefault", "RestoreV2", "SaveV2", "Sub", "VariableV2" ]) # Test calling stripped_op_list_for_graph directly op_list = meta_graph.stripped_op_list_for_graph(meta_graph_def.graph_def) self.assertEqual(ops, [o.name for o in op_list.op]) for o in op_list.op: self.assertEqual(o.summary, "") self.assertEqual(o.description, "") def testStripDefaultValuedAttrs(self): """Verifies that default valued attrs are stripped, unless disabled.""" # With strip_default_attrs enabled, attributes "T" (float32) and "Tout" # (complex64) in the "Complex" op must be removed. # train.Saver and train.export_meta_graph are V1 only APIs. with ops_lib.Graph().as_default(), self.cached_session(): real_num = variables.VariableV1(1.0, dtype=dtypes.float32, name="real") imag_num = variables.VariableV1(2.0, dtype=dtypes.float32, name="imag") math_ops.complex(real_num, imag_num, name="complex") save = saver_module.Saver({"real_num": real_num, "imag_num": imag_num}) variables.global_variables_initializer() meta_graph_def = save.export_meta_graph(strip_default_attrs=True) node_def = test_util.get_node_def_from_graph("complex", meta_graph_def.graph_def) self.assertNotIn("T", node_def.attr) self.assertNotIn("Tout", node_def.attr) # With strip_default_attrs disabled, attributes "T" (float32) and "Tout" # (complex64) in the "Complex" op must *not* be removed, even if they map # to their defaults. with ops_lib.Graph().as_default(), self.session(): real_num = variables.VariableV1(1.0, dtype=dtypes.float32, name="real") imag_num = variables.VariableV1(2.0, dtype=dtypes.float32, name="imag") math_ops.complex(real_num, imag_num, name="complex") save = saver_module.Saver({"real_num": real_num, "imag_num": imag_num}) variables.global_variables_initializer() meta_graph_def = save.export_meta_graph(strip_default_attrs=False) node_def = test_util.get_node_def_from_graph("complex", meta_graph_def.graph_def) self.assertIn("T", node_def.attr) self.assertIn("Tout", node_def.attr) def testImportIntoNamescope(self): # Test that we can import a meta graph into a namescope. test_dir = self._get_test_dir("import_into_namescope") filename = os.path.join(test_dir, "ckpt") # train.Saver is V1 only API. with ops_lib.Graph().as_default(): image = array_ops.placeholder(dtypes.float32, [None, 784], name="image") label = array_ops.placeholder(dtypes.float32, [None, 10], name="label") with session.Session() as sess: weights = variables.VariableV1( random_ops.random_uniform([784, 10]), name="weights") bias = variables.VariableV1(array_ops.zeros([10]), name="bias") logit = nn_ops.relu( math_ops.matmul(image, weights) + bias, name="logits") nn_ops.softmax(logit, name="prediction") cost = nn_ops.softmax_cross_entropy_with_logits( labels=label, logits=logit, name="cost") adam.AdamOptimizer().minimize(cost, name="optimize") saver = saver_module.Saver() self.evaluate(variables.global_variables_initializer()) saver.save(sess, filename) graph = ops_lib.Graph() with session.Session(graph=graph) as sess: new_saver = saver_module.import_meta_graph( filename + ".meta", graph=graph, import_scope="new_model") new_saver.restore(sess, filename) sess.run(["new_model/optimize"], { "new_model/image:0": np.random.random([1, 784]), "new_model/label:0": np.random.randint( 10, size=[1, 10]) }) def testImportIntoNamescopeWithoutVariables(self): # Save a simple graph that contains no variables into a checkpoint. test_dir = self._get_test_dir("no_vars_graph") filename = os.path.join(test_dir, "ckpt") graph_1 = ops_lib.Graph() with session.Session(graph=graph_1) as sess: constant_op.constant([1, 2, 3], name="x") constant_op.constant([1, 2, 3], name="y") saver = saver_module.Saver(allow_empty=True) saver.save(sess, filename) # Create a fresh graph. graph_2 = ops_lib.Graph() with session.Session(graph=graph_2) as sess: # Restore the above checkpoint under scope "subgraph_1". new_saver_1 = saver_module.import_meta_graph( filename + ".meta", graph=graph_2, import_scope="subgraph_1") # There are no variables to restore, so import_meta_graph should not # return a Saver. self.assertIsNone(new_saver_1) # Create a variable in graph_2 under scope "my_scope". variables.VariableV1(array_ops.zeros([10]), name="my_scope/my_var") self.evaluate(variables.global_variables_initializer()) # Restore the checkpoint into a different scope "subgraph_2". new_saver_2 = saver_module.import_meta_graph( filename + ".meta", graph=graph_2, import_scope="subgraph_2") # Because the variable does not live in scope "subgraph_2", # import_meta_graph should not attempt to restore the variable. So, # import_meta_graph still won't return a Saver instance. self.assertIsNone(new_saver_2) # However, if we restore the checkpoint under scope "my_scope", # import_meta_graph will detect the variable and return a Saver for # restoring it. This should happen even when the variable does not # originate from graph_1. new_saver_3 = saver_module.import_meta_graph( filename + ".meta", graph=graph_2, import_scope="my_scope") self.assertIsInstance(new_saver_3, saver_module.Saver) def testImportIntoImplicitNamescope(self): # Test that we can import a meta graph into an implicit namescope. test_dir = self._get_test_dir("import_into_namescope") filename = os.path.join(test_dir, "ckpt") # train.Saver is V1 only API. with ops_lib.Graph().as_default(): image = array_ops.placeholder(dtypes.float32, [None, 784], name="image") label = array_ops.placeholder(dtypes.float32, [None, 10], name="label") with session.Session() as sess: weights = variables.VariableV1( random_ops.random_uniform([784, 10]), name="weights") bias = variables.VariableV1(array_ops.zeros([10]), name="bias") logit = nn_ops.relu( math_ops.matmul(image, weights) + bias, name="logits") nn_ops.softmax(logit, name="prediction") cost = nn_ops.softmax_cross_entropy_with_logits( labels=label, logits=logit, name="cost") adam.AdamOptimizer().minimize(cost, name="optimize") saver = saver_module.Saver() self.evaluate(variables.global_variables_initializer()) saver.save(sess, filename) graph = ops_lib.Graph() with session.Session(graph=graph) as sess: with ops_lib.name_scope("new_model"): new_saver = saver_module.import_meta_graph( filename + ".meta", graph=graph) new_saver.restore(sess, filename) sess.run(["new_model/optimize"], { "new_model/image:0": np.random.random([1, 784]), "new_model/label:0": np.random.randint( 10, size=[1, 10]) }) def testClearDevicesOnImport(self): # Test that we import a graph without its devices and run successfully. with ops_lib.Graph().as_default(): with ops_lib.device("/job:ps/replica:0/task:0/device:GPU:0"): image = array_ops.placeholder(dtypes.float32, [None, 784], name="image") label = array_ops.placeholder(dtypes.float32, [None, 10], name="label") weights = variables.VariableV1( random_ops.random_uniform([784, 10]), name="weights") bias = variables.VariableV1(array_ops.zeros([10]), name="bias") logit = nn_ops.relu(math_ops.matmul(image, weights) + bias) nn_ops.softmax(logit, name="prediction") cost = nn_ops.softmax_cross_entropy_with_logits(labels=label, logits=logit) adam.AdamOptimizer().minimize(cost, name="optimize") meta_graph_def = saver_module.export_meta_graph() with session.Session(graph=ops_lib.Graph()) as sess: saver_module.import_meta_graph( meta_graph_def, clear_devices=False, import_scope="new_model") # Device refers to GPU, which is not available here. with self.assertRaises(errors_impl.InvalidArgumentError): self.evaluate(variables.global_variables_initializer()) with session.Session(graph=ops_lib.Graph()) as sess: saver_module.import_meta_graph( meta_graph_def, clear_devices=True, import_scope="new_model") self.evaluate(variables.global_variables_initializer()) sess.run(["new_model/optimize"], { "new_model/image:0": np.random.random([1, 784]), "new_model/label:0": np.random.randint( 10, size=[1, 10]) }) def testClearDevicesOnExport(self): # Test that we export a graph without its devices and run successfully. with ops_lib.Graph().as_default(): with ops_lib.device("/job:ps/replica:0/task:0/device:GPU:0"): image = array_ops.placeholder(dtypes.float32, [None, 784], name="image") label = array_ops.placeholder(dtypes.float32, [None, 10], name="label") weights = variables.VariableV1( random_ops.random_uniform([784, 10]), name="weights") bias = variables.VariableV1(array_ops.zeros([10]), name="bias") logit = nn_ops.relu(math_ops.matmul(image, weights) + bias) nn_ops.softmax(logit, name="prediction") cost = nn_ops.softmax_cross_entropy_with_logits(labels=label, logits=logit) adam.AdamOptimizer().minimize(cost, name="optimize") meta_graph_def = saver_module.export_meta_graph(clear_devices=True) graph_io.write_graph(meta_graph_def, self.get_temp_dir(), "meta_graph.pbtxt") with session.Session(graph=ops_lib.Graph()) as sess: saver_module.import_meta_graph(meta_graph_def, import_scope="new_model") self.evaluate(variables.global_variables_initializer()) sess.run(["new_model/optimize"], { "new_model/image:0": np.random.random([1, 784]), "new_model/label:0": np.random.randint( 10, size=[1, 10]) }) def testPreserveDatasetAndFunctions(self): with ops_lib.Graph().as_default() as g: dataset = dataset_ops.Dataset.range(10).map(lambda x: x * x) iterator = dataset_ops.make_one_shot_iterator(dataset) next_element = iterator.get_next() _ = array_ops.identity(next_element, name="output") # Generate three MetaGraphDef protos using different code paths. meta_graph_def_simple = saver_module.export_meta_graph() meta_graph_def_devices_cleared = saver_module.export_meta_graph( clear_devices=True) meta_graph_def_from_graph_def = saver_module.export_meta_graph( clear_devices=True, graph_def=g.as_graph_def()) for meta_graph_def in [meta_graph_def_simple, meta_graph_def_devices_cleared, meta_graph_def_from_graph_def]: with session.Session(graph=ops_lib.Graph()) as sess: saver_module.import_meta_graph(meta_graph_def, import_scope="new_model") self.evaluate(variables.global_variables_initializer()) for i in range(10): self.assertEqual(i * i, sess.run("new_model/output:0")) with self.assertRaises(errors.OutOfRangeError): sess.run("new_model/output:0") class CheckpointReaderTest(test.TestCase): _WRITE_VERSION = saver_pb2.SaverDef.V1 def testDebugString(self): # Builds a graph. v0 = variables.VariableV1( [[1, 2, 3], [4, 5, 6]], dtype=dtypes.float32, name="v0") v1 = variables.VariableV1( [[[1], [2]], [[3], [4]], [[5], [6]]], dtype=dtypes.float32, name="v1") init_all_op = variables.global_variables_initializer() save = saver_module.Saver( { "v0": v0, "v1": v1 }, write_version=self._WRITE_VERSION) save_path = os.path.join(self.get_temp_dir(), "ckpt_for_debug_string" + str(self._WRITE_VERSION)) with self.cached_session() as sess: self.evaluate(init_all_op) # Saves a checkpoint. save.save(sess, save_path) # Creates a reader. reader = py_checkpoint_reader.NewCheckpointReader(save_path) # Verifies that the tensors exist. self.assertTrue(reader.has_tensor("v0")) self.assertTrue(reader.has_tensor("v1")) debug_string = reader.debug_string() # Verifies that debug string contains the right strings. self.assertTrue(compat.as_bytes("v0 (DT_FLOAT) [2,3]") in debug_string) self.assertTrue(compat.as_bytes("v1 (DT_FLOAT) [3,2,1]") in debug_string) # Verifies get_variable_to_shape_map() returns the correct information. var_map = reader.get_variable_to_shape_map() self.assertEqual([2, 3], var_map["v0"]) self.assertEqual([3, 2, 1], var_map["v1"]) # Verifies get_tensor() returns the tensor value. v0_tensor = reader.get_tensor("v0") v1_tensor = reader.get_tensor("v1") self.assertAllEqual(v0, v0_tensor) self.assertAllEqual(v1, v1_tensor) # Verifies get_tensor() fails for non-existent tensors. with self.assertRaisesRegex(errors.NotFoundError, "v3 not found in checkpoint"): reader.get_tensor("v3") def testNonexistentPath(self): with self.assertRaisesRegex(errors.NotFoundError, "Unsuccessful TensorSliceReader"): py_checkpoint_reader.NewCheckpointReader("non-existent") class CheckpointReaderForV2Test(CheckpointReaderTest): _WRITE_VERSION = saver_pb2.SaverDef.V2 class WriteGraphTest(test.TestCase): def _get_test_dir(self, dirname): test_dir = os.path.join(self.get_temp_dir(), dirname) gfile.MakeDirs(test_dir) return test_dir def testWriteGraph(self): test_dir = self._get_test_dir("write_graph_dir") variables.VariableV1( [[1, 2, 3], [4, 5, 6]], dtype=dtypes.float32, name="v0") path = graph_io.write_graph(ops_lib.get_default_graph(), os.path.join(test_dir, "l1"), "graph.pbtxt") truth = os.path.join(test_dir, "l1", "graph.pbtxt") self.assertEqual(path, truth) self.assertTrue(os.path.exists(path)) def testRecursiveCreate(self): test_dir = self._get_test_dir("deep_dir") variables.VariableV1( [[1, 2, 3], [4, 5, 6]], dtype=dtypes.float32, name="v0") path = graph_io.write_graph(ops_lib.get_default_graph().as_graph_def(), os.path.join(test_dir, "l1", "l2", "l3"), "graph.pbtxt") truth = os.path.join(test_dir, "l1", "l2", "l3", "graph.pbtxt") self.assertEqual(path, truth) self.assertTrue(os.path.exists(path)) class ScopedGraphTest(test.TestCase): def _get_test_dir(self, dirname): test_dir = os.path.join(self.get_temp_dir(), dirname) gfile.MakeDirs(test_dir) return test_dir def _testScopedSave(self, test_dir, exported_filename, ckpt_filename): graph = ops_lib.Graph() with graph.as_default(): # Creates an inference graph. # Hidden 1 images = constant_op.constant( 1.2, dtypes.float32, shape=[100, 28], name="images") with ops_lib.name_scope("hidden1"): weights1 = variables.VariableV1( random_ops.truncated_normal( [28, 128], stddev=1.0 / math.sqrt(float(28))), name="weights") # The use of control_flow_ops.cond here is purely for adding test # coverage the save and restore of control flow context (which doesn't # make any sense here from a machine learning perspective). The typical # biases is a simple Variable without the conditions. biases1 = variables.VariableV1( control_flow_ops.cond( math_ops.less(random.random(), 0.5), lambda: array_ops.ones([128]), lambda: array_ops.zeros([128])), name="biases") hidden1 = nn_ops.relu(math_ops.matmul(images, weights1) + biases1) # Hidden 2 with ops_lib.name_scope("hidden2"): weights2 = variables.VariableV1( random_ops.truncated_normal( [128, 32], stddev=1.0 / math.sqrt(float(128))), name="weights") # The use of control_flow_ops.while_loop here is purely for adding test # coverage the save and restore of control flow context (which doesn't # make any sense here from a machine learning perspective). The typical # biases is a simple Variable without the conditions. def loop_cond(it, _): return it < 2 def loop_body(it, biases2): biases2 += constant_op.constant(0.1, shape=[32]) return it + 1, biases2 _, biases2 = control_flow_ops.while_loop(loop_cond, loop_body, [ constant_op.constant(0), variables.VariableV1(array_ops.zeros([32])) ]) hidden2 = nn_ops.relu(math_ops.matmul(hidden1, weights2) + biases2) # Linear with ops_lib.name_scope("softmax_linear"): weights3 = variables.VariableV1( random_ops.truncated_normal( [32, 10], stddev=1.0 / math.sqrt(float(32))), name="weights") biases3 = variables.VariableV1(array_ops.zeros([10]), name="biases") logits = math_ops.matmul(hidden2, weights3) + biases3 ops_lib.add_to_collection("logits", logits) # Adds user_defined proto in three formats: string, bytes and Any. # Any proto should just pass through. queue_runner = queue_runner_pb2.QueueRunnerDef(queue_name="test_queue") ops_lib.add_to_collection("user_defined_string_collection", str(queue_runner)) ops_lib.add_to_collection("user_defined_bytes_collection", queue_runner.SerializeToString()) any_buf = Any() any_buf.Pack(queue_runner) ops_lib.add_to_collection("user_defined_any_collection", any_buf) _, var_list = meta_graph.export_scoped_meta_graph( filename=os.path.join(test_dir, exported_filename), graph=ops_lib.get_default_graph(), export_scope="hidden1") self.assertEqual(["biases:0", "weights:0"], sorted(var_list.keys())) with graph.as_default(), self.session() as sess: self.evaluate(variables.global_variables_initializer()) saver = saver_module.Saver(var_list=var_list, max_to_keep=1) saver.save(sess, os.path.join(test_dir, ckpt_filename), write_state=False) def _testScopedRestore(self, test_dir, exported_filename, new_exported_filename, ckpt_filename): graph = ops_lib.Graph() # Create all the missing inputs. with graph.as_default(): new_image = constant_op.constant( 1.2, dtypes.float32, shape=[100, 28], name="images") var_list = meta_graph.import_scoped_meta_graph( os.path.join(test_dir, exported_filename), graph=graph, input_map={"$unbound_inputs_images": new_image}, import_scope="new_hidden1") self.assertEqual(["biases:0", "weights:0"], sorted(var_list.keys())) hidden1 = graph.as_graph_element("new_hidden1/Relu:0") weights1 = graph.as_graph_element("new_hidden1/weights:0") biases1 = graph.as_graph_element("new_hidden1/biases:0") with graph.as_default(): # Hidden 2 with ops_lib.name_scope("hidden2"): weights = variables.VariableV1( random_ops.truncated_normal( [128, 32], stddev=1.0 / math.sqrt(float(128))), name="weights") # The use of control_flow_ops.while_loop here is purely for adding test # coverage the save and restore of control flow context (which doesn't # make any sense here from a machine learning perspective). The typical # biases is a simple Variable without the conditions. def loop_cond(it, _): return it < 2 def loop_body(it, biases): biases += constant_op.constant(0.1, shape=[32]) return it + 1, biases _, biases = control_flow_ops.while_loop(loop_cond, loop_body, [ constant_op.constant(0), variables.VariableV1(array_ops.zeros([32])) ]) hidden2 = nn_ops.relu(math_ops.matmul(hidden1, weights) + biases) # Linear with ops_lib.name_scope("softmax_linear"): weights = variables.VariableV1( random_ops.truncated_normal( [32, 10], stddev=1.0 / math.sqrt(float(32))), name="weights") biases = variables.VariableV1(array_ops.zeros([10]), name="biases") logits = math_ops.matmul(hidden2, weights) + biases ops_lib.add_to_collection("logits", logits) # The rest of the variables. rest_variables = list( set(variables.global_variables()) - set(var_list.keys())) init_rest_op = variables.variables_initializer(rest_variables) with graph.as_default(), self.session() as sess: saver = saver_module.Saver(var_list=var_list, max_to_keep=1) saver.restore(sess, os.path.join(test_dir, ckpt_filename)) # Verify that we have restored weights1 and biases1. self.evaluate([weights1, biases1]) # Initialize the rest of the variables and run logits. self.evaluate(init_rest_op) self.evaluate(logits) # Verifies that we can save the subgraph under "hidden1" and restore it # into "new_hidden1" in the new graph. def testScopedSaveAndRestore(self): test_dir = self._get_test_dir("scoped_export_import") ckpt_filename = "ckpt" self._testScopedSave(test_dir, "exported_hidden1.pbtxt", ckpt_filename) self._testScopedRestore(test_dir, "exported_hidden1.pbtxt", "exported_new_hidden1.pbtxt", ckpt_filename) # Verifies that we can copy the subgraph under "hidden1" and copy it # to different name scope in the same graph or different graph. def testCopyScopedGraph(self): test_dir = self._get_test_dir("scoped_copy") saver0_ckpt = os.path.join(test_dir, "saver0.ckpt") graph1 = ops_lib.Graph() with graph1.as_default(): with ops_lib.name_scope("hidden1"): images = constant_op.constant( 1.0, dtypes.float32, shape=[3, 2], name="images") weights1 = variables.VariableV1( [[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]], name="weights") biases1 = variables.VariableV1([0.1] * 3, name="biases") nn_ops.relu(math_ops.matmul(images, weights1) + biases1, name="relu") # Run the graph and save scoped checkpoint. with graph1.as_default(), self.session(graph=graph1) as sess: self.evaluate(variables.global_variables_initializer()) _, var_list_1 = meta_graph.export_scoped_meta_graph( export_scope="hidden1") saver = saver_module.Saver(var_list=var_list_1, max_to_keep=1) saver.save(sess, saver0_ckpt, write_state=False) expected = np.reshape([[5.0999999, 7.0999999, 9.10000038] * 3], (3, 3)) # Verifies copy to the same graph with the same name fails. with graph1.as_default(): with self.assertRaisesWithPredicateMatch( ValueError, lambda e: "need to be different" in str(e)): meta_graph.copy_scoped_meta_graph( from_scope="hidden1", to_scope="hidden1") # Verifies copy to the same graph. with graph1.as_default(): var_list_2 = meta_graph.copy_scoped_meta_graph( from_scope="hidden1", to_scope="hidden2") with graph1.as_default(), self.session(graph=graph1) as sess: saver1 = saver_module.Saver(var_list=var_list_1, max_to_keep=1) saver1.restore(sess, saver0_ckpt) saver2 = saver_module.Saver(var_list=var_list_2, max_to_keep=1) saver2.restore(sess, saver0_ckpt) self.assertAllClose(expected, sess.run("hidden1/relu:0")) self.assertAllClose(expected, sess.run("hidden2/relu:0")) # Verifies copy to different graph. graph2 = ops_lib.Graph() with graph2.as_default(): new_var_list_1 = meta_graph.copy_scoped_meta_graph( from_scope="hidden1", to_scope="new_hidden1", from_graph=graph1, to_graph=graph2) with self.session() as sess: saver3 = saver_module.Saver(var_list=new_var_list_1, max_to_keep=1) saver3.restore(sess, saver0_ckpt) self.assertAllClose(expected, sess.run("new_hidden1/relu:0")) def testExportGraphDefWithScope(self): test_dir = self._get_test_dir("export_graph_def") saver0_ckpt = os.path.join(test_dir, "saver0.ckpt") graph1 = ops_lib.Graph() with graph1.as_default(): with ops_lib.name_scope("hidden1"): images = constant_op.constant( 1.0, dtypes.float32, shape=[3, 2], name="images") weights1 = variables.VariableV1( [[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]], name="weights") biases1 = variables.VariableV1([0.1] * 3, name="biases") nn_ops.relu(math_ops.matmul(images, weights1) + biases1, name="relu") # Run the graph and save scoped checkpoint. with self.session(graph=graph1) as sess: self.evaluate(variables.global_variables_initializer()) _, var_list_1 = meta_graph.export_scoped_meta_graph( graph_def=graph1.as_graph_def(), export_scope="hidden1") saver = saver_module.Saver(var_list=var_list_1, max_to_keep=1) saver.save(sess, saver0_ckpt, write_state=False) expected = np.reshape([[5.0999999, 7.0999999, 9.10000038] * 3], (3, 3)) # Verifies that we can run successfully after restoring. graph2 = ops_lib.Graph() with graph2.as_default(): new_var_list_1 = meta_graph.copy_scoped_meta_graph( from_scope="hidden1", to_scope="new_hidden1", from_graph=graph1, to_graph=graph2) with self.session(graph=graph2) as sess: saver3 = saver_module.Saver(var_list=new_var_list_1, max_to_keep=1) saver3.restore(sess, saver0_ckpt) self.assertAllClose(expected, sess.run("new_hidden1/relu:0")) def testSerializeSaverWithScope(self): test_dir = self._get_test_dir("export_graph_def") saver1_ckpt = os.path.join(test_dir, "saver1.ckpt") saver2_ckpt = os.path.join(test_dir, "saver2.ckpt") graph = ops_lib.Graph() with graph.as_default(): with ops_lib.name_scope("hidden1"): variable1 = variables.VariableV1([1.0], name="variable1") saver1 = saver_module.Saver(var_list=[variable1]) graph.add_to_collection(ops_lib.GraphKeys.SAVERS, saver1) with ops_lib.name_scope("hidden2"): variable2 = variables.VariableV1([2.0], name="variable2") saver2 = saver_module.Saver(var_list=[variable2], name="hidden2/") graph.add_to_collection(ops_lib.GraphKeys.SAVERS, saver2) with self.session(graph=graph) as sess: self.evaluate(variables.global_variables_initializer()) saver1.save(sess, saver1_ckpt, write_state=False) saver2.save(sess, saver2_ckpt, write_state=False) graph1 = ops_lib.Graph() with graph1.as_default(): var_dict1 = meta_graph.copy_scoped_meta_graph( from_scope="hidden1", to_scope="new_hidden1", from_graph=graph, to_graph=graph1) self.assertEqual(1, len(var_dict1)) saver_list1 = graph1.get_collection(ops_lib.GraphKeys.SAVERS) self.assertEqual(1, len(saver_list1)) with self.session(graph=graph1) as sess: saver_list1[0].restore(sess, saver1_ckpt) self.assertEqual(1.0, self.evaluate(var_dict1["variable1:0"])) graph2 = ops_lib.Graph() with graph2.as_default(): var_dict2 = meta_graph.copy_scoped_meta_graph( from_scope="hidden2", to_scope="new_hidden2", from_graph=graph, to_graph=graph2) self.assertEqual(1, len(var_dict2)) saver_list2 = graph2.get_collection(ops_lib.GraphKeys.SAVERS) self.assertEqual(1, len(saver_list2)) with self.session(graph=graph2) as sess: saver_list2[0].restore(sess, saver2_ckpt) self.assertEqual(2.0, self.evaluate(var_dict2["variable2:0"])) class _OwnsAVariableSimple(trackable_base.Trackable): """A Trackable object which can be saved using a tf.train.Saver.""" def __init__(self): self.non_dep_variable = variable_scope.get_variable( name="non_dep_variable", initializer=6., use_resource=True) def _gather_saveables_for_checkpoint(self): return {trackable_base.VARIABLE_VALUE_KEY: self.non_dep_variable} # The Saver sorts by name before parsing, so we need a name property. @property def name(self): return self.non_dep_variable.name class _MirroringSaveable( saver_module.BaseSaverBuilder.ResourceVariableSaveable): def __init__(self, primary_variable, mirrored_variable, name): self._primary_variable = primary_variable self._mirrored_variable = mirrored_variable super(_MirroringSaveable, self).__init__( self._primary_variable, "", name) def restore(self, restored_tensors, restored_shapes): """Restore the same value into both variables.""" tensor, = restored_tensors return control_flow_ops.group( self._primary_variable.assign(tensor), self._mirrored_variable.assign(tensor)) class _OwnsMirroredVariables(trackable_base.Trackable): """A Trackable object which returns a more complex SaveableObject.""" def __init__(self): self.non_dep_variable = variable_scope.get_variable( name="non_dep_variable", initializer=6., use_resource=True) self.mirrored = variable_scope.get_variable( name="mirrored", initializer=15., use_resource=True) def _gather_saveables_for_checkpoint(self): def _saveable_factory(name=self.non_dep_variable.name): return _MirroringSaveable( primary_variable=self.non_dep_variable, mirrored_variable=self.mirrored, name=name) return {trackable_base.VARIABLE_VALUE_KEY: _saveable_factory} # The Saver sorts by name before parsing, so we need a name property. @property def name(self): return self.non_dep_variable.name class TrackableCompatibilityTests(test.TestCase): # TODO(allenl): Track down python3 reference cycles in these tests. @test_util.run_in_graph_and_eager_modes def testNotSaveableButIsTrackable(self): v = _OwnsAVariableSimple() test_dir = self.get_temp_dir() prefix = os.path.join(test_dir, "ckpt") for saver in (saver_module.Saver(var_list=[v]), saver_module.Saver(var_list={"v": v})): with self.cached_session() as sess: self.evaluate(v.non_dep_variable.assign(42.)) save_path = saver.save(sess, prefix) self.evaluate(v.non_dep_variable.assign(43.)) saver.restore(sess, save_path) self.assertEqual(42., self.evaluate(v.non_dep_variable)) @test_util.run_in_graph_and_eager_modes def testMoreComplexSaveableReturned(self): v = _OwnsMirroredVariables() test_dir = self.get_temp_dir() prefix = os.path.join(test_dir, "ckpt") self.evaluate(v.non_dep_variable.assign(42.)) for saver in (saver_module.Saver(var_list=[v]), saver_module.Saver(var_list={"v": v})): with self.cached_session() as sess: save_path = saver.save(sess, prefix) self.evaluate(v.non_dep_variable.assign(43.)) self.evaluate(v.mirrored.assign(44.)) saver.restore(sess, save_path) self.assertEqual(42., self.evaluate(v.non_dep_variable)) self.assertEqual(42., self.evaluate(v.mirrored)) def testSingleTensorEvaluation(self): class _CountingSaveable(saver_module.BaseSaverBuilder.SaveableObject): def __init__(self, name): self.eval_count = 0 def _tensor(): self.eval_count += 1 return constant_op.constant([1.]) dummy_op = constant_op.constant([2.]) super(_CountingSaveable, self).__init__( dummy_op, [saver_module.BaseSaverBuilder.SaveSpec( _tensor, "", name, dtype=dummy_op.dtype, device=dummy_op.device)], name) def restore(self, restored_tensors, restored_shapes): """Restore the same value into both variables.""" pass with context.eager_mode(): v = _CountingSaveable("foo") saver = saver_module.Saver(var_list=[v]) test_dir = self.get_temp_dir() prefix = os.path.join(test_dir, "ckpt") with self.cached_session() as sess: save_path = saver.save(sess, prefix) self.assertEqual(1, v.eval_count) saver.restore(sess, save_path) self.assertEqual(1, v.eval_count) def testVariableNotFoundErrorRaised(self): # Restore does some tricky exception handling to figure out if it should # load an object-based checkpoint. Tests that the exception handling isn't # too broad. checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") a = resource_variable_ops.ResourceVariable(1., name="a") b = resource_variable_ops.ResourceVariable(1., name="b") a_saver = saver_module.Saver([a]) b_saver = saver_module.Saver([b]) with self.cached_session() as sess: self.evaluate(a.initializer) save_path = a_saver.save(sess=sess, save_path=checkpoint_prefix) with self.assertRaisesRegex(errors.NotFoundError, "Key b not found in checkpoint"): b_saver.restore(sess=sess, save_path=save_path) with self.assertRaises(errors.NotFoundError) as cs: b_saver.restore(sess=sess, save_path=save_path) # Make sure we don't have a confusing "During handling of the above # exception" block in Python 3. self.assertNotIn("NewCheckpointReader", cs.exception.message) @test_util.run_v1_only("train.Saver is V1 only API.") def testGraphChangedForRestoreErrorRaised(self): checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") with ops_lib.Graph().as_default() as g: a = variables.VariableV1(1., name="a") a_saver = saver_module.Saver([a]) with self.session(graph=g) as sess: self.evaluate(a.initializer) save_path = a_saver.save(sess=sess, save_path=checkpoint_prefix) with ops_lib.Graph().as_default() as g: a = variables.VariableV1([1.], name="a") a_saver = saver_module.Saver([a]) with self.session(graph=g) as sess: with self.assertRaisesRegex( errors.InvalidArgumentError, "a mismatch between the current graph and the graph"): a_saver.restore(sess=sess, save_path=save_path) if __name__ == "__main__": test.main()
tobiasgehring/qudi
refs/heads/master
gui/manager/threadwidget.py
7
# -*- coding: utf-8 -*- """ This file contains the Qudi remote widget class. Qudi 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. Qudi 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 Qudi. If not, see <http://www.gnu.org/licenses/>. Copyright (c) the Qudi Developers. See the COPYRIGHT.txt file at the top-level directory of this distribution and at <https://github.com/Ulm-IQO/qudi/> """ from qtpy.QtWidgets import QWidget from qtpy import uic import os class ThreadWidget(QWidget): def __init__(self): super().__init__() this_dir = os.path.dirname(__file__) ui_file = os.path.join(this_dir, 'ui_threadwidget.ui') # Load it uic.loadUi(ui_file, self)
davygeek/vitess
refs/heads/master
test/mysql_server_test.py
4
#!/usr/bin/env python # # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Ensures the vtgate MySQL server protocol plugin works as expected. We use table ACLs to verify the user name authenticated by the connector is set properly. """ import socket import unittest import MySQLdb import environment import utils import tablet import warnings # single shard / 2 tablets shard_0_master = tablet.Tablet() shard_0_slave = tablet.Tablet() table_acl_config = environment.tmproot + '/table_acl_config.json' mysql_auth_server_static = (environment.tmproot + '/mysql_auth_server_static.json') def setUpModule(): try: environment.topo_server().setup() # setup all processes setup_procs = [ shard_0_master.init_mysql(), shard_0_slave.init_mysql(), ] utils.wait_procs(setup_procs) utils.run_vtctl(['CreateKeyspace', 'test_keyspace']) shard_0_master.init_tablet('replica', 'test_keyspace', '0') shard_0_slave.init_tablet('replica', 'test_keyspace', '0') # create databases so vttablet can start behaving normally shard_0_master.create_db('vt_test_keyspace') shard_0_slave.create_db('vt_test_keyspace') except: tearDownModule() raise def tearDownModule(): utils.required_teardown() if utils.options.skip_teardown: return shard_0_master.kill_vttablet() shard_0_slave.kill_vttablet() teardown_procs = [ shard_0_master.teardown_mysql(), shard_0_slave.teardown_mysql(), ] utils.wait_procs(teardown_procs, raise_on_error=False) environment.topo_server().teardown() utils.kill_sub_processes() utils.remove_tmp_files() shard_0_master.remove_tree() shard_0_slave.remove_tree() create_vt_insert_test = '''create table vt_insert_test ( id bigint auto_increment, msg varchar(64), keyspace_id bigint(20) unsigned NOT NULL, data longblob, primary key (id) ) Engine=InnoDB''' class TestMySQL(unittest.TestCase): """This test makes sure the MySQL server connector is correct. """ MYSQL_OPTION_MULTI_STATEMENTS_ON = 0 MYSQL_OPTION_MULTI_STATEMENTS_OFF = 1 def test_mysql_connector(self): with open(table_acl_config, 'w') as fd: fd.write("""{ "table_groups": [ { "table_names_or_prefixes": ["vt_insert_test", "dual"], "readers": ["vtgate client 1"], "writers": ["vtgate client 1"], "admins": ["vtgate client 1"] } ] } """) with open(mysql_auth_server_static, 'w') as fd: fd.write("""{ "testuser1": { "Password": "testpassword1", "UserData": "vtgate client 1" }, "testuser2": { "Password": "testpassword2", "UserData": "vtgate client 2" } } """) # start the tablets shard_0_master.start_vttablet(wait_for_state='NOT_SERVING', table_acl_config=table_acl_config) shard_0_slave.start_vttablet(wait_for_state='NOT_SERVING', table_acl_config=table_acl_config) # setup replication utils.run_vtctl(['InitShardMaster', '-force', 'test_keyspace/0', shard_0_master.tablet_alias], auto_log=True) utils.run_vtctl(['ApplySchema', '-sql', create_vt_insert_test, 'test_keyspace']) for t in [shard_0_master, shard_0_slave]: utils.run_vtctl(['RunHealthCheck', t.tablet_alias]) # start vtgate utils.VtGate(mysql_server=True).start( extra_args=['-mysql_auth_server_impl', 'static', '-mysql_server_query_timeout', '1s', '-mysql_auth_server_static_file', mysql_auth_server_static]) # We use gethostbyname('localhost') so we don't presume # of the IP format (travis is only IP v4, really). params = dict(host=socket.gethostbyname('localhost'), port=utils.vtgate.mysql_port, user='testuser1', passwd='testpassword1', db='test_keyspace') # 'vtgate client 1' is authorized to access vt_insert_test conn = MySQLdb.Connect(**params) cursor = conn.cursor() cursor.execute('select * from vt_insert_test', {}) cursor.close() # Test multi-statement support. It should only work when # COM_SET_OPTION has set the options to 0 conn.set_server_option(self.MYSQL_OPTION_MULTI_STATEMENTS_ON) cursor = conn.cursor() cursor.execute("select 1; select 2") self.assertEquals(((1L,),), cursor.fetchall()) self.assertEquals(1, cursor.nextset()) self.assertEquals(((2L,),), cursor.fetchall()) self.assertEquals(None, cursor.nextset()) cursor.close() conn.set_server_option(self.MYSQL_OPTION_MULTI_STATEMENTS_OFF) # Multi-statement support should not work without the # option enabled cursor = conn.cursor() try: cursor.execute("select 1; select 2") self.fail('Execute went through') except MySQLdb.OperationalError, e: s = str(e) self.assertIn('syntax error', s) cursor.close() # verify that queries work end-to-end with large grpc messages largeComment = 'L' * ((4 * 1024 * 1024) + 1) cursor = conn.cursor() cursor.execute('insert into vt_insert_test (id, msg, keyspace_id, data) values(%s, %s, %s, %s) /* %s */', (1, 'large blob', 123, 'LLL', largeComment)) cursor.close() cursor = conn.cursor() cursor.execute('select * from vt_insert_test where id = 1'); if cursor.rowcount != 1: self.fail('expected 1 row got ' + str(cursor.rowcount)) for (id, msg, keyspace_id, blob) in cursor: if blob != 'LLL': self.fail('blob did not match \'LLL\'') cursor.close() hugeBlob = 'L' * (environment.grpc_max_message_size + 1) cursor = conn.cursor() try: cursor.execute('insert into vt_insert_test (id, msg, keyspace_id, data) values(%s, %s, %s, %s)', (2, 'huge blob', 123, hugeBlob)) self.fail('Execute went through') except MySQLdb.OperationalError, e: s = str(e) self.assertIn('trying to send message larger than max', s) conn.close() # 'vtgate client' this query should timeout conn = MySQLdb.Connect(**params) try: cursor = conn.cursor() cursor.execute('SELECT SLEEP(5)', {}) self.fail('Execute went through') except MySQLdb.OperationalError, e: s = str(e) # 1317 is DeadlineExceeded error code self.assertIn('1317', s) conn.close() # this query should fail due to the bogus field conn = MySQLdb.Connect(**params) try: cursor = conn.cursor() cursor.execute('SELECT invalid_field from vt_insert_test', {}) self.fail('Execute went through') except MySQLdb.OperationalError, e: s = str(e) # 1054 is BadFieldError code self.assertIn('1054', s) # this query should trigger a warning not an error with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") cursor.execute('SELECT /*vt+ SCATTER_ERRORS_AS_WARNINGS */ invalid_field from vt_insert_test', {}) if cursor.rowcount != 0: self.fail('expected 0 rows got ' + str(cursor.rowcount)) if len(w) != 1: print 'unexpected warnings: ', w # and the next query should get the warnings cursor.execute('SHOW WARNINGS', {}) if cursor.rowcount != 1: print 'expected 1 warning row, got ' + str(cursor.rowcount) for (_, code, message) in cursor: self.assertEqual(code, 1054) self.assertIn('errno 1054', message) self.assertIn('Unknown column', message) # test with a query timeout error with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") cursor.execute('SELECT /*vt+ SCATTER_ERRORS_AS_WARNINGS QUERY_TIMEOUT_MS=1 */ sleep(1) from vt_insert_test', {}) if cursor.rowcount != 0: self.fail('expected 0 rows got ' + str(cursor.rowcount)) if len(w) != 1: print 'unexpected warnings: ', w cursor.execute('SHOW WARNINGS', {}) if cursor.rowcount != 1: print 'expected 1 warning row, got ' + str(cursor.rowcount) for (_, code, message) in cursor: self.assertEqual(code, 1317) self.assertIn('context deadline exceeded', message) # any non-show query clears the warnings cursor.execute('SELECT 1 from vt_insert_test limit 1', {}) cursor.execute('SHOW WARNINGS', {}) if cursor.rowcount != 0: print 'expected 0 warnings row, got ' + str(cursor.rowcount) # 'vtgate client 2' is not authorized to access vt_insert_test params['user'] = 'testuser2' params['passwd'] = 'testpassword2' conn = MySQLdb.Connect(**params) try: cursor = conn.cursor() cursor.execute('select * from vt_insert_test', {}) self.fail('Execute went through') except MySQLdb.OperationalError, e: s = str(e) self.assertIn('table acl error', s) self.assertIn('cannot run PASS_SELECT on table', s) conn.close() if __name__ == '__main__': utils.main()
thaumos/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/_ec2_ami_find.py
29
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['removed'], 'supported_by': 'community'} from ansible.module_utils.common.removed import removed_module if __name__ == '__main__': removed_module(removed_in='2.9')
log2timeline/dfvfs
refs/heads/main
tests/vfs/encrypted_stream_file_entry.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the encrypted stream file entry implementation.""" import unittest from dfvfs.lib import definitions from dfvfs.path import factory as path_spec_factory from dfvfs.resolver import context from dfvfs.resolver import resolver from dfvfs.vfs import encrypted_stream_file_entry from dfvfs.vfs import encrypted_stream_file_system from tests import test_lib as shared_test_lib class EncryptedStreamFileEntryTest(shared_test_lib.BaseTestCase): """Tests for the encrypted stream file entry.""" _RC4_KEY = b'rc4test' def setUp(self): """Sets up the needed objects used throughout the test.""" self._resolver_context = context.Context() test_path = self._GetTestFilePath(['syslog.rc4']) self._SkipIfPathNotExists(test_path) test_os_path_spec = path_spec_factory.Factory.NewPathSpec( definitions.TYPE_INDICATOR_OS, location=test_path) self._encrypted_stream_path_spec = path_spec_factory.Factory.NewPathSpec( definitions.TYPE_INDICATOR_ENCRYPTED_STREAM, encryption_method=definitions.ENCRYPTION_METHOD_RC4, parent=test_os_path_spec) resolver.Resolver.key_chain.SetCredential( self._encrypted_stream_path_spec, 'key', self._RC4_KEY) self._file_system = encrypted_stream_file_system.EncryptedStreamFileSystem( self._resolver_context, self._encrypted_stream_path_spec) self._file_system.Open() def tearDown(self): """Cleans up the needed objects used throughout the test.""" self._resolver_context.Empty() def testInitialize(self): """Test the __init__ function.""" file_entry = encrypted_stream_file_entry.EncryptedStreamFileEntry( self._resolver_context, self._file_system, self._encrypted_stream_path_spec) self.assertIsNotNone(file_entry) def testSize(self): """Test the size property.""" file_entry = encrypted_stream_file_entry.EncryptedStreamFileEntry( self._resolver_context, self._file_system, self._encrypted_stream_path_spec) self.assertIsNotNone(file_entry) self.assertEqual(file_entry.size, 1247) def testGetFileEntryByPathSpec(self): """Test the get a file entry by path specification functionality.""" file_entry = self._file_system.GetFileEntryByPathSpec( self._encrypted_stream_path_spec) self.assertIsNotNone(file_entry) def testGetParentFileEntry(self): """Tests the GetParentFileEntry function.""" file_entry = self._file_system.GetFileEntryByPathSpec( self._encrypted_stream_path_spec) self.assertIsNotNone(file_entry) parent_file_entry = file_entry.GetParentFileEntry() self.assertIsNone(parent_file_entry) def testGetStat(self): """Tests the GetStat function.""" file_entry = self._file_system.GetFileEntryByPathSpec( self._encrypted_stream_path_spec) self.assertIsNotNone(file_entry) stat_object = file_entry.GetStat() self.assertIsNotNone(stat_object) self.assertEqual(stat_object.type, stat_object.TYPE_FILE) self.assertEqual(stat_object.size, 1247) def testIsFunctions(self): """Test the Is? functions.""" file_entry = self._file_system.GetFileEntryByPathSpec( self._encrypted_stream_path_spec) self.assertIsNotNone(file_entry) self.assertTrue(file_entry.IsRoot()) self.assertTrue(file_entry.IsVirtual()) self.assertTrue(file_entry.IsAllocated()) self.assertFalse(file_entry.IsDevice()) self.assertFalse(file_entry.IsDirectory()) self.assertTrue(file_entry.IsFile()) self.assertFalse(file_entry.IsLink()) self.assertFalse(file_entry.IsPipe()) self.assertFalse(file_entry.IsSocket()) def testSubFileEntries(self): """Test the sub file entries iteration functionality.""" file_entry = self._file_system.GetFileEntryByPathSpec( self._encrypted_stream_path_spec) self.assertIsNotNone(file_entry) self.assertEqual(file_entry.number_of_sub_file_entries, 0) expected_sub_file_entry_names = [] sub_file_entry_names = [] for sub_file_entry in file_entry.sub_file_entries: sub_file_entry_names.append(sub_file_entry.name) self.assertEqual( len(sub_file_entry_names), len(expected_sub_file_entry_names)) self.assertEqual( sorted(sub_file_entry_names), expected_sub_file_entry_names) if __name__ == '__main__': unittest.main()
sumanthha/fundafriend
refs/heads/master
django/conf/urls/i18n.py
97
from django.conf import settings from django.conf.urls import patterns from django.core.urlresolvers import LocaleRegexURLResolver def i18n_patterns(prefix, *args): """ Adds the language code prefix to every URL pattern within this function. This may only be used in the root URLconf, not in an included URLconf. """ pattern_list = patterns(prefix, *args) if not settings.USE_I18N: return pattern_list return [LocaleRegexURLResolver(pattern_list)] urlpatterns = patterns('', (r'^setlang/$', 'django.views.i18n.set_language'), )
toontownfunserver/Panda3D-1.9.0
refs/heads/master
direct/distributed/CartesianGridBase.py
11
from pandac.PandaModules import Vec3 # Utility functions that are useful to both AI and client CartesianGrid code class CartesianGridBase: def isValidZone(self, zoneId): def checkBounds(self=self, zoneId=zoneId): if ((zoneId < self.startingZone) or (zoneId > self.startingZone + self.gridSize * self.gridSize - 1)): return 0 return 1 if self.style == "Cartesian": return checkBounds() elif self.style == "CartesianStated": if zoneId >= 0 and zoneId < self.startingZone: return 1 else: return checkBounds() else: return 0 def getZoneFromXYZ(self, pos, wantRowAndCol=False): # NOTE: pos should be relative to our own grid origin # Convert a 3d position to a zone dx = self.cellWidth * self.gridSize * .5 x = pos[0] + dx y = pos[1] + dx col = x // self.cellWidth row = y // self.cellWidth # Compute which zone we are in zoneId = int(self.startingZone + ((row * self.gridSize) + col)) if (wantRowAndCol): return (zoneId,col,row) else: return zoneId def getGridSizeFromSphereRadius(self, sphereRadius, cellWidth, gridRadius): # NOTE: This ensures that the grid is at least a "gridRadius" number # of cells larger than the trigger sphere that loads the grid. This # gives us some room to start setting interest to the grid before we # expect to see any objects on it. sphereRadius = max(sphereRadius, gridRadius*cellWidth) return 2 * (sphereRadius // cellWidth) def getGridSizeFromSphere(self, sphereRadius, spherePos, cellWidth, gridRadius): # NOTE: This ensures that the grid is at least a "gridRadius" number # of cells larger than the trigger sphere that loads the grid. This # gives us some room to start setting interest to the grid before we # expect to see any objects on it. xMax = abs(spherePos[0])+sphereRadius yMax = abs(spherePos[1])+sphereRadius sphereRadius = Vec3(xMax,yMax,0).length() # sphereRadius = max(sphereRadius, gridRadius*cellWidth) return max(2 * (sphereRadius // cellWidth), 1) def getZoneCellOrigin(self, zoneId): # It returns the origin of the zoneCell # Origin is the top-left corner of zoneCell dx = self.cellWidth * self.gridSize * .5 zone = zoneId - self.startingZone row = zone // self.gridSize col = zone % self.gridSize x = col * self.cellWidth - dx y = row * self.cellWidth - dx return (x, y, 0) def getZoneCellOriginCenter(self, zoneId): # Variant of the getZoneCellOrigin. It # returns the center of the zoneCell dx = self.cellWidth * self.gridSize * .5 center = self.cellWidth * 0.5 zone = zoneId - self.startingZone row = zone // self.gridSize col = zone % self.gridSize x = col * self.cellWidth - dx + center y = row * self.cellWidth - dx + center return (x, y, 0) #-------------------------------------------------------------------------- # Function: utility function to get all zones in a ring of given radius # around the given zoneId (so if given a zoneId 34342 and a # radius of 3, a list of all zones exactly 3 grids away from # zone 34342 will be returned) # Parameters: zoneId, center zone to find surrounding zones of # radius, how far from zoneId to find zones of for it them # Changes: # Returns: #-------------------------------------------------------------------------- def getConcentricZones(self, zoneId, radius): zones = [] #currZone = zoneId + radius #numZones = (2 * radius * 8) + 2 # start at upper left zone = zoneId - self.startingZone row = zone // self.gridSize col = zone % self.gridSize leftOffset = min(col, radius) rightOffset = min(self.gridSize - (col + 1), radius) topOffset = min(row, radius) bottomOffset = min(self.gridSize - (row + 1), radius) #print "starting examination of grid circle of radius %s"%radius ulZone = zoneId - leftOffset - topOffset * self.gridSize #print "left offset is %s and radius is %s"%(leftOffset,radius) for currCol in range(int(rightOffset + leftOffset + 1)): if ((currCol == 0 and leftOffset == radius) or (currCol == rightOffset + leftOffset and rightOffset == radius)): # at either left or right edge of area, look at all rows possibleRows = range(int(bottomOffset + topOffset + 1)) else: # in a middle column, only look at top and bottom rows possibleRows = [] if (topOffset == radius): possibleRows.append(0) if (bottomOffset == radius): possibleRows.append(bottomOffset + topOffset) #print "on column %s and looking at rows %s"%(currCol,possibleRows) for currRow in possibleRows: newZone = ulZone + (currRow * self.gridSize) + currCol zones.append(int(newZone)) #print " examining zone %s"%newZone return zones
Grassboy/plugin.video.plurkTrend
refs/heads/master
youtube_dl/extractor/auengine.py
2
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( compat_urllib_parse, determine_ext, ExtractorError, ) class AUEngineIE(InfoExtractor): _TEST = { 'url': 'http://auengine.com/embed.php?file=lfvlytY6&w=650&h=370', 'file': 'lfvlytY6.mp4', 'md5': '48972bdbcf1a3a2f5533e62425b41d4f', 'info_dict': { 'title': '[Commie]The Legend of the Legendary Heroes - 03 - Replication Eye (Alpha Stigma)[F9410F5A]' } } _VALID_URL = r'(?:http://)?(?:www\.)?auengine\.com/embed\.php\?.*?file=([^&]+).*?' def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) video_id = mobj.group(1) webpage = self._download_webpage(url, video_id) title = self._html_search_regex(r'<title>(?P<title>.+?)</title>', webpage, 'title') title = title.strip() links = re.findall(r'\s(?:file|url):\s*["\']([^\'"]+)["\']', webpage) links = map(compat_urllib_parse.unquote, links) thumbnail = None video_url = None for link in links: if link.endswith('.png'): thumbnail = link elif '/videos/' in link: video_url = link if not video_url: raise ExtractorError(u'Could not find video URL') ext = '.' + determine_ext(video_url) if ext == title[-len(ext):]: title = title[:-len(ext)] return { 'id': video_id, 'url': video_url, 'title': title, 'thumbnail': thumbnail, }
tanmaykm/edx-platform
refs/heads/master
openedx/core/djangoapps/content/course_overviews/migrations/0009_readd_facebook_url.py
58
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models, connection def table_description(): """Handle Mysql/Pg vs Sqlite""" # django's mysql/pg introspection.get_table_description tries to select * # from table and fails during initial migrations from scratch. # sqlite does not have this failure, so we can use the API. # For not-sqlite, query information-schema directly with code lifted # from the internals of django.db.backends.mysql.introspection.py if connection.vendor == 'sqlite': fields = connection.introspection.get_table_description(connection.cursor(), 'course_overviews_courseoverview') return [f.name for f in fields] else: cursor = connection.cursor() cursor.execute(""" SELECT column_name FROM information_schema.columns WHERE table_name = 'course_overviews_courseoverview' AND table_schema = DATABASE()""") rows = cursor.fetchall() return [r[0] for r in rows] class Migration(migrations.Migration): dependencies = [ ('course_overviews', '0008_remove_courseoverview_facebook_url'), ] # An original version of 0008 removed the facebook_url field We need to # handle the case where our noop 0008 ran AND the case where the original # 0008 ran. We do that by using the standard information_schema to find out # what columns exist. _meta is unavailable as the column has already been # removed from the model operations = [] fields = table_description() # during a migration from scratch, fields will be empty, but we do not want to add # an additional facebook_url if fields and not any(f == 'facebook_url' for f in fields): operations += migrations.AddField( model_name='courseoverview', name='facebook_url', field=models.TextField(null=True), ),
dcalacci/love-in-the-time-of-communism
refs/heads/master
src/stats.py
1
#!usr/bin/env python import math, nltk.data, os from nltk.tokenize.punkt import PunktWordTokenizer from testimonyUtils import get_speech_acts def get_sens_from_speechact(speechact): tokenizer = nltk.data.load('tokenizers/punkt/english.pickle') return tokenizer.tokenize(speechact) def get_tokens_from_speechact(speechact): return PunktWordTokenizer().tokenize(speechact) def are_close(a, b): import Levenshtein return Levenshtein.ratio(a, b) > 0.6 def tf(word, doc): """ augmented frequency tf. doc must be an iterable list of words. """ def freq(w, d): count = 0 for word in doc: if are_close(w, word): count+=1 return count max_freq = max(map(lambda w: freq(w, doc), doc)) return 0.5 + ((0.5 + freq(word, doc)) / max_freq) def idf(word, docs): "each doc in docs must be an iterable list of words" def occurs(word, doc): for w in doc: if are_close(word, w): return True return False num_occurrences = map(lambda d: occurs(word, d), docs).count(True) return math.log(len(docs) / (1 + num_occurrences)) def tf_idf(word, doc, docs): return tf(word, doc) * idf(word, docs) def tf_idf_speechacts(filepath): path = os.path.join(os.getcwd(), filepath) for f in os.listdir(filepath): f = os.path.join(path, f) speechacts = get_speech_acts(f) # s is a list of tuples: (name, speechacts) where speechacts # is a string, and each speech act is separated by a newline s = [(name, "\n".join(speech)) for name, speech in speechacts.items()] for t in s: words = get_tokens_from_speechact(t[1]) name = t[0] # split all speechacts into words # go through each word, compute tf-idf score # go through top words, see if they mean anything in liwc. # maybe develop utilities
wanghaven/readthedocs.org
refs/heads/master
readthedocs/core/management/commands/reindex_elasticsearch.py
26
import logging from optparse import make_option from django.core.management.base import BaseCommand from django.conf import settings from readthedocs.builds.constants import LATEST from readthedocs.builds.models import Version from readthedocs.search import parse_json from readthedocs.restapi.utils import index_search_request log = logging.getLogger(__name__) class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('-p', dest='project', default='', help='Project to index'), ) def handle(self, *args, **options): ''' Build/index all versions or a single project's version ''' project = options['project'] if project: queryset = Version.objects.public(project__slug=project) log.info("Building all versions for %s" % project) elif getattr(settings, 'INDEX_ONLY_LATEST', True): queryset = Version.objects.public().filter(slug=LATEST) else: queryset = Version.objects.public() for version in queryset: log.info("Reindexing %s" % version) try: commit = version.project.vcs_repo(version.slug).commit except: # This will happen on prod commit = None try: page_list = parse_json.process_all_json_files(version, build_dir=False) index_search_request( version=version, page_list=page_list, commit=commit, project_scale=0, page_scale=0, section=False, delete=False) except Exception: log.error('Build failed for %s' % version, exc_info=True)
fu012343210/pokeminer
refs/heads/master
web.py
1
# -*- coding: utf-8 -*- from datetime import datetime import argparse import json import requests from flask import Flask, request, render_template from requests.packages.urllib3.exceptions import InsecureRequestWarning import config import db import utils from names import POKEMON_NAMES requests.packages.urllib3.disable_warnings(InsecureRequestWarning) # Check whether config has all necessary attributes REQUIRED_SETTINGS = ( 'TRASH_IDS', 'AREA_NAME', 'REPORT_SINCE', 'SCAN_RADIUS', 'MAP_PROVIDER_URL', 'MAP_PROVIDER_ATTRIBUTION', 'DISABLE_WORKERS', ) for setting_name in REQUIRED_SETTINGS: if not hasattr(config, setting_name): raise RuntimeError('Please set "{}" in config'.format(setting_name)) def get_args(): parser = argparse.ArgumentParser() parser.add_argument( '-H', '--host', help='Set web server listening host', default='127.0.0.1' ) parser.add_argument( '-P', '--port', type=int, help='Set web server listening port', default=5000 ) parser.add_argument( '-d', '--debug', help='Debug Mode', action='store_true' ) parser.add_argument( '-A', '--after', type=int, help='Get all sightings after a certain time', default=0 ) parser.set_defaults(DEBUG=True) return parser.parse_args() app = Flask(__name__, template_folder='templates') @app.route('/data') def pokemon_data(): return json.dumps(get_pokemarkers()) @app.route('/discord') def discord(): """Gets all the PokeMarkers via REST""" return json.dumps(get_pokeDiscord()) @app.route('/workers_data') def workers_data(): return json.dumps({ 'points': get_worker_markers(), 'scan_radius': config.SCAN_RADIUS, }) @app.route('/') def fullmap(): map_center = utils.get_map_center() return render_template( 'newmap.html', area_name=config.AREA_NAME, map_center=map_center, map_provider_url=config.MAP_PROVIDER_URL, map_provider_attribution=config.MAP_PROVIDER_ATTRIBUTION, ) def get_pokeDiscord(): data = [] # Get the Pokemon out of the Database session = db.Session() pokemons = db.get_sightings(session) session.close() for pokemon in pokemons: name = POKEMON_NAMES[pokemon.pokemon_id] datestr = datetime.fromtimestamp(pokemon.expire_timestamp) dateoutput = datestr.strftime("%H:%M:%S") data.append({ 'type': 'pokemon', 'name': name, 'key': '{}-{}'.format(pokemon.pokemon_id, pokemon.spawn_id), 'disappear_time': pokemon.expire_timestamp, 'icon': 'static/icons/%d.png' % pokemon.pokemon_id, 'lat': pokemon.lat, 'lng': pokemon.lon, 'pokemon_id': pokemon.pokemon_id, 'ATK_IV': pokemon.ATK_IV, 'DEF_IV': pokemon.DEF_IV, 'STA_IV': pokemon.STA_IV }) return data def get_pokemarkers(): markers = [] session = db.Session() if args.after == 0: pokemons = db.get_sightings(session) else: pokemons = db.get_sightings_after(session, args.after) forts = db.get_forts(session) pokestops = db.get_pokestops(session) session.close() for pokemon in pokemons: markers.append({ 'id': 'pokemon-{}'.format(pokemon.id), 'type': 'pokemon', 'trash': pokemon.pokemon_id in config.TRASH_IDS, 'name': POKEMON_NAMES[pokemon.pokemon_id], 'pokemon_id': pokemon.pokemon_id, 'lat': pokemon.lat, 'lon': pokemon.lon, 'expires_at': pokemon.expire_timestamp, }) for fort in forts: if fort['guard_pokemon_id']: pokemon_name = POKEMON_NAMES[fort['guard_pokemon_id']] else: pokemon_name = 'Empty' markers.append({ 'id': 'fort-{}'.format(fort['fort_id']), 'sighting_id': fort['id'], 'type': 'fort', 'prestige': fort['prestige'], 'pokemon_id': fort['guard_pokemon_id'], 'pokemon_name': pokemon_name, 'team': fort['team'], 'lat': fort['lat'], 'lon': fort['lon'], }) for pokestop in pokestops: markers.append({ 'id': 'stop-{}'.format(pokestop['id']), 'type': 'pokestop', 'lat': pokestop['lat'], 'lon': pokestop['lon'], }) return markers def get_worker_markers(): markers = [] points = utils.get_points_per_worker() # Worker start points for worker_no, worker_points in enumerate(points): coords = utils.get_start_coords(worker_no) if (worker_no not in config.DISABLE_WORKERS): markers.append({ 'lat': coords[0], 'lon': coords[1], 'type': 'worker', 'worker_no': worker_no, }) # Circles for i, point in enumerate(worker_points): markers.append({ 'lat': point[0], 'lon': point[1], 'type': 'worker_point', 'worker_no': worker_no, 'point_no': i, }) return markers @app.route('/report') def report_main(): session = db.Session() top_pokemon = db.get_top_pokemon(session) bottom_pokemon = db.get_top_pokemon(session, order='ASC') bottom_sightings = db.get_all_sightings( session, [r[0] for r in bottom_pokemon] ) stage2_pokemon = db.get_stage2_pokemon(session) if stage2_pokemon: stage2_sightings = db.get_all_sightings( session, [r[0] for r in stage2_pokemon] ) else: stage2_sightings = [] js_data = { 'charts_data': { 'punchcard': db.get_punch_card(session), 'top30': [(POKEMON_NAMES[r[0]], r[1]) for r in top_pokemon], 'bottom30': [ (POKEMON_NAMES[r[0]], r[1]) for r in bottom_pokemon ], 'stage2': [ (POKEMON_NAMES[r[0]], r[1]) for r in stage2_pokemon ], }, 'maps_data': { 'bottom30': [sighting_to_marker(s) for s in bottom_sightings], 'stage2': [sighting_to_marker(s) for s in stage2_sightings], }, 'map_center': utils.get_map_center(), 'zoom': 13, } icons = { 'top30': [(r[0], POKEMON_NAMES[r[0]]) for r in top_pokemon], 'bottom30': [(r[0], POKEMON_NAMES[r[0]]) for r in bottom_pokemon], 'stage2': [(r[0], POKEMON_NAMES[r[0]]) for r in stage2_pokemon], 'nonexistent': [ (r, POKEMON_NAMES[r]) for r in db.get_nonexistent_pokemon(session) ] } session_stats = db.get_session_stats(session) session.close() area = utils.get_scan_area() return render_template( 'report.html', current_date=datetime.now(), area_name=config.AREA_NAME, area_size=area, total_spawn_count=session_stats['count'], spawns_per_hour=session_stats['per_hour'], session_start=session_stats['start'], session_end=session_stats['end'], session_length_hours=int(session_stats['length_hours']), js_data=js_data, icons=icons, google_maps_key=config.GOOGLE_MAPS_KEY, ) @app.route('/report/<int:pokemon_id>') def report_single(pokemon_id): session = db.Session() session_stats = db.get_session_stats(session) js_data = { 'charts_data': { 'hours': db.get_spawns_per_hour(session, pokemon_id), }, 'map_center': utils.get_map_center(), 'zoom': 13, } session.close() return render_template( 'report_single.html', current_date=datetime.now(), area_name=config.AREA_NAME, area_size=utils.get_scan_area(), pokemon_id=pokemon_id, pokemon_name=POKEMON_NAMES[pokemon_id], total_spawn_count=db.get_total_spawns_count(session, pokemon_id), session_start=session_stats['start'], session_end=session_stats['end'], session_length_hours=int(session_stats['length_hours']), google_maps_key=config.GOOGLE_MAPS_KEY, js_data=js_data, ) def sighting_to_marker(sighting): return { 'icon': '/static/icons/{}.png'.format(sighting.pokemon_id), 'lat': sighting.lat, 'lon': sighting.lon, } @app.route('/report/heatmap') def report_heatmap(): session = db.Session() pokemon_id = request.args.get('id') points = db.get_all_spawn_coords(session, pokemon_id=pokemon_id) session.close() return json.dumps(points) @app.route('/report/heatmap/time_based') def report_time_based_heatmap(): session = db.Session() pokemon_id = request.args.get('id') time_data = db.get_spawns_per_minute(session, pokemon_id) session.close() return json.dumps(time_data) if __name__ == '__main__': args = get_args() app.run(debug=True, threaded=True, host=args.host, port=args.port)
rapilabs/django
refs/heads/master
tests/migrations/test_migrations_squashed_complex/3_squashed_5.py
770
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): replaces = [ ("migrations", "3_auto"), ("migrations", "4_auto"), ("migrations", "5_auto"), ] dependencies = [("migrations", "2_auto")] operations = [ migrations.RunPython(migrations.RunPython.noop) ]
LeslieW/or-tools2
refs/heads/master
examples/python/pyls_api.py
30
from ortools.constraint_solver import pywrapcp from google.apputils import app import gflags import random class OneVarLns(pywrapcp.PyLns): """One Var LNS.""" def __init__(self, vars): pywrapcp.PyLns.__init__(self, vars) self.__index = 0 def InitFragments(self): self.__index = 0 def NextFragment(self): if self.__index < self.Size(): self.__index += 1 return [self.__index - 1] else: return [] class MoveOneVar(pywrapcp.IntVarLocalSearchOperator): """Move one var up or down.""" def __init__(self, vars): pywrapcp.IntVarLocalSearchOperator.__init__(self, vars) self.__index = 0 self.__up = False def OneNeighbor(self): current_value = self.OldValue(self.__index) if self.__up: self.SetValue(self.__index, current_value + 1) self.__index = (self.__index + 1) % self.Size() else: self.SetValue(self.__index, current_value - 1) self.__up = not self.__up return True def OnStart(self): pass def IsIncremental(self): return False class SumFilter(pywrapcp.IntVarLocalSearchFilter): """Filter to speed up LS computation.""" def __init__(self, vars): pywrapcp.IntVarLocalSearchFilter.__init__(self, vars) self.__sum = 0 def OnSynchronize(self, delta): self.__sum = sum(self.Value(index) for index in range(self.Size())) def Accept(self, delta, _): solution_delta = delta.IntVarContainer() solution_delta_size = solution_delta.Size() for i in range(solution_delta_size): if not solution_delta.Element(i).Activated(): return True new_sum = self.__sum for i in range(solution_delta_size): element = solution_delta.Element(i) int_var = element.Var() touched_var_index = self.IndexFromVar(int_var) old_value = self.Value(touched_var_index) new_value = element.Value() new_sum += new_value - old_value return new_sum < self.__sum def IsIncremental(self): return False def Solve(type): solver = pywrapcp.Solver('Solve') vars = [solver.IntVar(0, 4) for _ in range(4)] sum_var = solver.Sum(vars) obj = solver.Minimize(sum_var, 1) db = solver.Phase(vars, solver.CHOOSE_FIRST_UNBOUND, solver.ASSIGN_MAX_VALUE) ls = None if type == 0: # LNS print 'Large Neighborhood Search' one_var_lns = OneVarLns(vars) ls_params = solver.LocalSearchPhaseParameters(one_var_lns, db) ls = solver.LocalSearchPhase(vars, db, ls_params) elif type == 1: # LS print 'Local Search' move_one_var = MoveOneVar(vars) ls_params = solver.LocalSearchPhaseParameters(move_one_var, db) ls = solver.LocalSearchPhase(vars, db, ls_params) else: print 'Local Search with Filter' move_one_var = MoveOneVar(vars) sum_filter = SumFilter(vars) ls_params = solver.LocalSearchPhaseParameters(move_one_var, db, None, [sum_filter]) ls = solver.LocalSearchPhase(vars, db, ls_params) collector = solver.LastSolutionCollector() collector.Add(vars) collector.AddObjective(sum_var) log = solver.SearchLog(1000, obj) solver.Solve(ls, [collector, obj, log]) print 'Objective value = %d' % collector.ObjectiveValue(0) def main(_): Solve(0) Solve(1) Solve(2) if __name__ == '__main__': app.run()
googleapis/python-workflows
refs/heads/master
google/cloud/workflows_v1/services/workflows/transports/grpc.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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 warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union from google.api_core import grpc_helpers # type: ignore from google.api_core import operations_v1 # type: ignore from google.api_core import gapic_v1 # type: ignore import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore import grpc # type: ignore from google.cloud.workflows_v1.types import workflows from google.longrunning import operations_pb2 # type: ignore from .base import WorkflowsTransport, DEFAULT_CLIENT_INFO class WorkflowsGrpcTransport(WorkflowsTransport): """gRPC backend transport for Workflows. Workflows is used to deploy and execute workflow programs. Workflows makes sure the program executes reliably, despite hardware and networking interruptions. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation and call it. It sends protocol buffers over the wire using gRPC (which is built on top of HTTP/2); the ``grpcio`` package must be installed. """ _stubs: Dict[str, Callable] def __init__( self, *, host: str = "workflows.googleapis.com", credentials: ga_credentials.Credentials = None, credentials_file: str = None, scopes: Sequence[str] = None, channel: grpc.Channel = None, api_mtls_endpoint: str = None, client_cert_source: Callable[[], Tuple[bytes, bytes]] = None, ssl_channel_credentials: grpc.ChannelCredentials = None, client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, quota_project_id: Optional[str] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, always_use_jwt_access: Optional[bool] = False, ) -> None: """Instantiate the transport. Args: host (Optional[str]): The hostname to connect to. credentials (Optional[google.auth.credentials.Credentials]): The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. This argument is ignored if ``channel`` is provided. credentials_file (Optional[str]): A file with credentials that can be loaded with :func:`google.auth.load_credentials_from_file`. This argument is ignored if ``channel`` is provided. scopes (Optional(Sequence[str])): A list of scopes. This argument is ignored if ``channel`` is provided. channel (Optional[grpc.Channel]): A ``Channel`` instance through which to make calls. api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials for grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, both in PEM format. It is used to configure mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. client_info (google.api_core.gapic_v1.client_info.ClientInfo): The client info used to send a user-agent string along with API requests. If ``None``, then default info will be used. Generally, you only need to set this if you're developing your own client library. always_use_jwt_access (Optional[bool]): Whether self signed JWT should be used for service account credentials. Raises: google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport creation failed for any reason. google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials`` and ``credentials_file`` are passed. """ self._grpc_channel = None self._ssl_channel_credentials = ssl_channel_credentials self._stubs: Dict[str, Callable] = {} self._operations_client = None if api_mtls_endpoint: warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning) if client_cert_source: warnings.warn("client_cert_source is deprecated", DeprecationWarning) if channel: # Ignore credentials if a channel was passed. credentials = False # If a channel was explicitly provided, set it. self._grpc_channel = channel self._ssl_channel_credentials = None else: if api_mtls_endpoint: host = api_mtls_endpoint # Create SSL credentials with client_cert_source or application # default SSL credentials. if client_cert_source: cert, key = client_cert_source() self._ssl_channel_credentials = grpc.ssl_channel_credentials( certificate_chain=cert, private_key=key ) else: self._ssl_channel_credentials = SslCredentials().ssl_credentials else: if client_cert_source_for_mtls and not ssl_channel_credentials: cert, key = client_cert_source_for_mtls() self._ssl_channel_credentials = grpc.ssl_channel_credentials( certificate_chain=cert, private_key=key ) # The base transport sets the host, credentials and scopes super().__init__( host=host, credentials=credentials, credentials_file=credentials_file, scopes=scopes, quota_project_id=quota_project_id, client_info=client_info, always_use_jwt_access=always_use_jwt_access, ) if not self._grpc_channel: self._grpc_channel = type(self).create_channel( self._host, credentials=self._credentials, credentials_file=credentials_file, scopes=self._scopes, ssl_credentials=self._ssl_channel_credentials, quota_project_id=quota_project_id, options=[ ("grpc.max_send_message_length", -1), ("grpc.max_receive_message_length", -1), ], ) # Wrap messages. This must be done after self._grpc_channel exists self._prep_wrapped_messages(client_info) @classmethod def create_channel( cls, host: str = "workflows.googleapis.com", credentials: ga_credentials.Credentials = None, credentials_file: str = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, **kwargs, ) -> grpc.Channel: """Create and return a gRPC channel object. Args: host (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. credentials_file (Optional[str]): A file with credentials that can be loaded with :func:`google.auth.load_credentials_from_file`. This argument is mutually exclusive with credentials. scopes (Optional[Sequence[str]]): A optional list of scopes needed for this service. These are only used when credentials are not specified and are passed to :func:`google.auth.default`. quota_project_id (Optional[str]): An optional project to use for billing and quota. kwargs (Optional[dict]): Keyword arguments, which are passed to the channel creation. Returns: grpc.Channel: A gRPC channel object. Raises: google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials`` and ``credentials_file`` are passed. """ return grpc_helpers.create_channel( host, credentials=credentials, credentials_file=credentials_file, quota_project_id=quota_project_id, default_scopes=cls.AUTH_SCOPES, scopes=scopes, default_host=cls.DEFAULT_HOST, **kwargs, ) @property def grpc_channel(self) -> grpc.Channel: """Return the channel designed to connect to this service. """ return self._grpc_channel @property def operations_client(self) -> operations_v1.OperationsClient: """Create the client designed to process long-running operations. This property caches on the instance; repeated calls return the same client. """ # Sanity check: Only create a new client if we do not already have one. if self._operations_client is None: self._operations_client = operations_v1.OperationsClient(self.grpc_channel) # Return the client from cache. return self._operations_client @property def list_workflows( self, ) -> Callable[[workflows.ListWorkflowsRequest], workflows.ListWorkflowsResponse]: r"""Return a callable for the list workflows method over gRPC. Lists Workflows in a given project and location. The default order is not specified. Returns: Callable[[~.ListWorkflowsRequest], ~.ListWorkflowsResponse]: A function that, when called, will call the underlying RPC on the server. """ # Generate a "stub function" on-the-fly which will actually make # the request. # gRPC handles serialization and deserialization, so we just need # to pass in the functions for each. if "list_workflows" not in self._stubs: self._stubs["list_workflows"] = self.grpc_channel.unary_unary( "/google.cloud.workflows.v1.Workflows/ListWorkflows", request_serializer=workflows.ListWorkflowsRequest.serialize, response_deserializer=workflows.ListWorkflowsResponse.deserialize, ) return self._stubs["list_workflows"] @property def get_workflow( self, ) -> Callable[[workflows.GetWorkflowRequest], workflows.Workflow]: r"""Return a callable for the get workflow method over gRPC. Gets details of a single Workflow. Returns: Callable[[~.GetWorkflowRequest], ~.Workflow]: A function that, when called, will call the underlying RPC on the server. """ # Generate a "stub function" on-the-fly which will actually make # the request. # gRPC handles serialization and deserialization, so we just need # to pass in the functions for each. if "get_workflow" not in self._stubs: self._stubs["get_workflow"] = self.grpc_channel.unary_unary( "/google.cloud.workflows.v1.Workflows/GetWorkflow", request_serializer=workflows.GetWorkflowRequest.serialize, response_deserializer=workflows.Workflow.deserialize, ) return self._stubs["get_workflow"] @property def create_workflow( self, ) -> Callable[[workflows.CreateWorkflowRequest], operations_pb2.Operation]: r"""Return a callable for the create workflow method over gRPC. Creates a new workflow. If a workflow with the specified name already exists in the specified project and location, the long running operation will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. Returns: Callable[[~.CreateWorkflowRequest], ~.Operation]: A function that, when called, will call the underlying RPC on the server. """ # Generate a "stub function" on-the-fly which will actually make # the request. # gRPC handles serialization and deserialization, so we just need # to pass in the functions for each. if "create_workflow" not in self._stubs: self._stubs["create_workflow"] = self.grpc_channel.unary_unary( "/google.cloud.workflows.v1.Workflows/CreateWorkflow", request_serializer=workflows.CreateWorkflowRequest.serialize, response_deserializer=operations_pb2.Operation.FromString, ) return self._stubs["create_workflow"] @property def delete_workflow( self, ) -> Callable[[workflows.DeleteWorkflowRequest], operations_pb2.Operation]: r"""Return a callable for the delete workflow method over gRPC. Deletes a workflow with the specified name. This method also cancels and deletes all running executions of the workflow. Returns: Callable[[~.DeleteWorkflowRequest], ~.Operation]: A function that, when called, will call the underlying RPC on the server. """ # Generate a "stub function" on-the-fly which will actually make # the request. # gRPC handles serialization and deserialization, so we just need # to pass in the functions for each. if "delete_workflow" not in self._stubs: self._stubs["delete_workflow"] = self.grpc_channel.unary_unary( "/google.cloud.workflows.v1.Workflows/DeleteWorkflow", request_serializer=workflows.DeleteWorkflowRequest.serialize, response_deserializer=operations_pb2.Operation.FromString, ) return self._stubs["delete_workflow"] @property def update_workflow( self, ) -> Callable[[workflows.UpdateWorkflowRequest], operations_pb2.Operation]: r"""Return a callable for the update workflow method over gRPC. Updates an existing workflow. Running this method has no impact on already running executions of the workflow. A new revision of the workflow may be created as a result of a successful update operation. In that case, such revision will be used in new workflow executions. Returns: Callable[[~.UpdateWorkflowRequest], ~.Operation]: A function that, when called, will call the underlying RPC on the server. """ # Generate a "stub function" on-the-fly which will actually make # the request. # gRPC handles serialization and deserialization, so we just need # to pass in the functions for each. if "update_workflow" not in self._stubs: self._stubs["update_workflow"] = self.grpc_channel.unary_unary( "/google.cloud.workflows.v1.Workflows/UpdateWorkflow", request_serializer=workflows.UpdateWorkflowRequest.serialize, response_deserializer=operations_pb2.Operation.FromString, ) return self._stubs["update_workflow"] __all__ = ("WorkflowsGrpcTransport",)
atdaemon/pip
refs/heads/master
pip/__main__.py
834
from __future__ import absolute_import import os import sys # If we are running from a wheel, add the wheel to sys.path # This allows the usage python pip-*.whl/pip install pip-*.whl if __package__ == '': # __file__ is pip-*.whl/pip/__main__.py # first dirname call strips of '/__main__.py', second strips off '/pip' # Resulting path is the name of the wheel itself # Add that to sys.path so we can import pip path = os.path.dirname(os.path.dirname(__file__)) sys.path.insert(0, path) import pip # noqa if __name__ == '__main__': sys.exit(pip.main())
pschmitt/home-assistant
refs/heads/dev
homeassistant/components/serial_pm/sensor.py
16
"""Support for particulate matter sensors connected to a serial port.""" import logging from pmsensor import serial_pm as pm import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONF_NAME import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity _LOGGER = logging.getLogger(__name__) CONF_BRAND = "brand" CONF_SERIAL_DEVICE = "serial_device" PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( { vol.Required(CONF_BRAND): cv.string, vol.Required(CONF_SERIAL_DEVICE): cv.string, vol.Optional(CONF_NAME): cv.string, } ) def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the available PM sensors.""" try: coll = pm.PMDataCollector( config.get(CONF_SERIAL_DEVICE), pm.SUPPORTED_SENSORS[config.get(CONF_BRAND)] ) except KeyError: _LOGGER.error( "Brand %s not supported\n supported brands: %s", config.get(CONF_BRAND), pm.SUPPORTED_SENSORS.keys(), ) return except OSError as err: _LOGGER.error( "Could not open serial connection to %s (%s)", config.get(CONF_SERIAL_DEVICE), err, ) return dev = [] for pmname in coll.supported_values(): if config.get(CONF_NAME) is not None: name = "{} PM{}".format(config.get(CONF_NAME), pmname) else: name = f"PM{pmname}" dev.append(ParticulateMatterSensor(coll, name, pmname)) add_entities(dev) class ParticulateMatterSensor(Entity): """Representation of an Particulate matter sensor.""" def __init__(self, pmDataCollector, name, pmname): """Initialize a new PM sensor.""" self._name = name self._pmname = pmname self._state = None self._collector = pmDataCollector @property def name(self): """Return the name of the sensor.""" return self._name @property def state(self): """Return the state of the sensor.""" return self._state @property def unit_of_measurement(self): """Return the unit of measurement of this entity, if any.""" return CONCENTRATION_MICROGRAMS_PER_CUBIC_METER def update(self): """Read from sensor and update the state.""" _LOGGER.debug("Reading data from PM sensor") try: self._state = self._collector.read_data()[self._pmname] except KeyError: _LOGGER.error("Could not read PM%s value", self._pmname)
andsor/gridjug
refs/heads/master
setup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup file for gridjug. This file was generated with PyScaffold 2.2.1, a tool that easily puts up a scaffold for your new Python project. Learn more under: http://pyscaffold.readthedocs.org/ """ import inspect import os import sys from distutils.cmd import Command from distutils.filelist import FileList import setuptools from setuptools import setup # For Python 2/3 compatibility, pity we can't use six.moves here try: # try Python 3 imports first import configparser except ImportError: # then fall back to Python 2 import ConfigParser as configparser __location__ = os.path.join(os.getcwd(), os.path.dirname( inspect.getfile(inspect.currentframe()))) # Are we building on ReadTheDocs? on_rtd = os.environ.get('READTHEDOCS', None) == 'True' # determine root package and package path if namespace package is used pyscaffold_version = "2.2.1" package = "gridjug" namespace = [] root_pkg = namespace[0] if namespace else package if namespace: pkg_path = os.path.join(*namespace[-1].split('.') + [package]) else: pkg_path = package def version2str(version): if version.exact or not version.distance > 0: return version.format_with('{tag}') else: distance = version.distance version = str(version.tag) if '.dev' in version: version, tail = version.rsplit('.dev', 1) assert tail == '0', 'own dev numbers are unsupported' return '{}.post0.dev{}'.format(version, distance) def local_version2str(version): if version.exact: if version.dirty: return version.format_with('+dirty') else: return '' else: if version.dirty: return version.format_with('+{node}.dirty') else: return version.format_with('+{node}') class ObjKeeper(type): instances = {} def __init__(cls, name, bases, dct): cls.instances[cls] = [] def __call__(cls, *args, **kwargs): cls.instances[cls].append(super(ObjKeeper, cls).__call__(*args, **kwargs)) return cls.instances[cls][-1] def capture_objs(cls): from six import add_metaclass module = inspect.getmodule(cls) name = cls.__name__ keeper_class = add_metaclass(ObjKeeper)(cls) setattr(module, name, keeper_class) cls = getattr(module, name) return keeper_class.instances[cls] def get_install_requirements(path): with open(os.path.join(__location__, path)) as fh: content = fh.read() return [req for req in content.splitlines() if req != ''] def read(fname): with open(os.path.join(__location__, fname)) as fh: content = fh.read() return content def str2bool(val): return val.lower() in ("yes", "true") def get_items(parser, section): try: items = parser.items(section) except configparser.NoSectionError: return [] return items def prepare_console_scripts(dct): return ['{cmd} = {func}'.format(cmd=k, func=v) for k, v in dct.items()] def prepare_extras_require(dct): return {k: [r.strip() for r in v.split(',')] for k, v in dct.items()} def prepare_data_files(dct): def get_files(pattern): filelist = FileList() if '**' in pattern: pattern = pattern.replace('**', '*') anchor = False else: anchor = True filelist.include_pattern(pattern, anchor) return filelist.files return [(k, [f for p in v.split(',') for f in get_files(p.strip())]) for k, v in dct.items()] def read_setup_cfg(): config = configparser.SafeConfigParser(allow_no_value=True) config_file = os.path.join(__location__, 'setup.cfg') with open(config_file, 'r') as f: config.readfp(f) metadata = dict(config.items('metadata')) classifiers = metadata.get('classifiers', '') metadata['classifiers'] = [item.strip() for item in classifiers.split(',')] console_scripts = dict(get_items(config, 'console_scripts')) console_scripts = prepare_console_scripts(console_scripts) extras_require = dict(get_items(config, 'extras_require')) extras_require = prepare_extras_require(extras_require) data_files = dict(get_items(config, 'data_files')) data_files = prepare_data_files(data_files) package_data = metadata.get('package_data', '') package_data = [item.strip() for item in package_data.split(',') if item] metadata['package_data'] = package_data return metadata, console_scripts, extras_require, data_files def build_cmd_docs(): try: from sphinx.setup_command import BuildDoc except ImportError: class NoSphinx(Command): user_options = [] def initialize_options(self): raise RuntimeError("Sphinx documentation is not installed, " "run: pip install sphinx") return NoSphinx class cmd_docs(BuildDoc): def set_version(self): from setuptools_scm import get_version self.release = get_version() self.version = self.release.split('-', 1)[0] def run(self): self.set_version() if self.builder == "doctest": import sphinx.ext.doctest as doctest # Capture the DocTestBuilder class in order to return the total # number of failures when exiting ref = capture_objs(doctest.DocTestBuilder) BuildDoc.run(self) errno = ref[-1].total_failures sys.exit(errno) else: BuildDoc.run(self) return cmd_docs # Assemble everything and call setup(...) def setup_package(): docs_path = os.path.join(__location__, "docs") docs_build_path = os.path.join(docs_path, "_build") needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv) pytest_runner = ['pytest-runner'] if needs_pytest else [] install_reqs = ( get_install_requirements("requirements.txt") if not on_rtd else [] ) metadata, console_scripts, extras_require, data_files = read_setup_cfg() command_options = { 'docs': {'project': ('setup.py', package), 'build_dir': ('setup.py', docs_build_path), 'config_dir': ('setup.py', docs_path), 'source_dir': ('setup.py', docs_path)}, 'doctest': {'project': ('setup.py', package), 'build_dir': ('setup.py', docs_build_path), 'config_dir': ('setup.py', docs_path), 'source_dir': ('setup.py', docs_path), 'builder': ('setup.py', 'doctest')} } setup(name=package, url=metadata['url'], description=metadata['description'], author=metadata['author'], author_email=metadata['author_email'], license=metadata['license'], long_description=read('README.rst'), classifiers=metadata['classifiers'], test_suite='tests', packages=setuptools.find_packages(exclude=['tests', 'tests.*']), namespace_packages=namespace, install_requires=install_reqs, setup_requires=['six', 'setuptools_scm'] + pytest_runner, extras_require=extras_require, cmdclass={'docs': build_cmd_docs(), 'doctest': build_cmd_docs()}, tests_require=['pytest-cov', 'pytest'], package_data={package: metadata['package_data']}, data_files=data_files, command_options=command_options, entry_points={'console_scripts': console_scripts}, use_scm_version={'version_scheme': version2str, 'local_scheme': local_version2str}, zip_safe=False) # do not zip egg file after setup.py install if __name__ == "__main__": setup_package()
ssvsergeyev/ZenPacks.zenoss.AWS
refs/heads/develop
ZenPacks/zenoss/AWS/EC2VPCSubnet.py
1
############################################################################## # # Copyright (C) Zenoss, Inc. 2013, all rights reserved. # # This content is made available according to terms specified in # License.zenoss under the directory where your Zenoss product is installed. # ############################################################################## from zope.component import adapts from zope.interface import implements from Products.ZenRelations.RelSchema import ToOne, ToMany, ToManyCont from Products.Zuul.catalog.paths import DefaultPathReporter, relPath from Products.Zuul.decorators import info from Products.Zuul.form import schema from Products.Zuul.infos import ProxyProperty from Products.Zuul.infos.component import ComponentInfo from Products.Zuul.interfaces.component import IComponentInfo from Products.Zuul.utils import ZuulMessageFactory as _t from ZenPacks.zenoss.AWS import CLASS_NAME, MODULE_NAME from ZenPacks.zenoss.AWS.AWSComponent import AWSComponent from ZenPacks.zenoss.AWS.utils import updateToMany, updateToOne class EC2VPCSubnet(AWSComponent): ''' Model class for EC2VPCSubnet. ''' meta_type = portal_type = 'EC2VPCSubnet' available_ip_address_count = None cidr_block = None defaultForAz = None mapPublicIpOnLaunch = None state = None _properties = AWSComponent._properties + ( {'id': 'available_ip_address_count', 'type': 'int'}, {'id': 'cidr_block', 'type': 'string'}, {'id': 'defaultForAz', 'type': 'boolean'}, {'id': 'mapPublicIpOnLaunch', 'type': 'boolean'}, {'id': 'state', 'type': 'string'}, ) _relations = AWSComponent._relations + ( ('region', ToOne(ToManyCont, MODULE_NAME['EC2Region'], 'vpc_subnets')), ('vpc', ToOne(ToMany, MODULE_NAME['EC2VPC'], 'vpc_subnets')), ('zone', ToOne(ToMany, MODULE_NAME['EC2Zone'], 'vpc_subnets')), ('instances', ToMany(ToOne, MODULE_NAME['EC2Instance'], 'vpc_subnet')), ) def getRegionId(self): return self.region().id def getVPCId(self): vpc = self.vpc() if vpc: return vpc.id def setVPCId(self, id_): updateToOne( self.vpc, self.region().vpcs, CLASS_NAME['EC2VPC'], id_ ) def getZoneId(self): zone = self.zone() if zone: return zone.id def setZoneId(self, id_): updateToOne( self.zone, self.region().zones, CLASS_NAME['EC2Zone'], id_ ) def getInstanceIds(self): return sorted(self.instances.objectIds()) def setInstanceIds(self, ids): updateToMany( relationship=self.instances, root=self.region().instances, type_=CLASS_NAME['EC2Instance'], ids=ids ) class IEC2VPCSubnetInfo(IComponentInfo): ''' API Info interface for EC2VPCSubnet. ''' state = schema.TextLine(title=_t(u'State')) account = schema.Entity(title=_t(u'Account')) region = schema.Entity(title=_t(u'Region')) zone = schema.Entity(title=_t(u'Zone')) vpc = schema.Entity(title=_t(u'VPC')) instance_count = schema.Int(title=_t(u'Number of Instances')) cidr_block = schema.TextLine(title=_t(u'CIDR Block')) available_ip_address_count = schema.Int( title=_t(u'Number of Available IP Addresses') ) defaultForAz = schema.Bool(title=_t(u'Default for Zone')) mapPublicIpOnLaunch = schema.Bool(title=_t(u'Map Public IP on Launch')) class EC2VPCSubnetInfo(ComponentInfo): ''' API Info adapter factory for EC2VPCSubnet. ''' implements(IEC2VPCSubnetInfo) adapts(EC2VPCSubnet) state = ProxyProperty('state') cidr_block = ProxyProperty('cidr_block') available_ip_address_count = ProxyProperty('available_ip_address_count') defaultForAz = ProxyProperty('defaultForAz') mapPublicIpOnLaunch = ProxyProperty('mapPublicIpOnLaunch') @property @info def account(self): return self._object.device() @property @info def region(self): return self._object.region() @property @info def zone(self): return self._object.zone() @property @info def vpc(self): return self._object.vpc() @property def instance_count(self): return self._object.instances.countObjects() class EC2VPCSubnetPathReporter(DefaultPathReporter): ''' Path reporter for EC2VPCSubnet. ''' def getPaths(self): paths = super(EC2VPCSubnetPathReporter, self).getPaths() zone = self.context.zone() if zone: paths.extend(relPath(zone, 'region')) vpc = self.context.vpc() if vpc: paths.extend(relPath(vpc, 'region')) return paths
Tjorriemorrie/trading
refs/heads/master
21_gae_kelly/binary/models.py
2
from google.appengine.ext import ndb CURRENCIES = ['EURUSD'] TIME_FRAMES = ['5', '10', '15', '20', '25', '30', '35', '40', '45', '50', '55', '60'] # TIME_FRAMES = ['1'] TRADE_BASES = ['payout', 'directional'] TRADE_AIMS = ['higher', 'lower'] class Q(ndb.Model): data = ndb.PickleProperty(compressed=False) visits = ndb.PickleProperty(compressed=False) updated_at = ndb.DateTimeProperty(auto_now=True) created_at = ndb.DateTimeProperty(auto_now_add=True) class Run(ndb.Model): currency = ndb.StringProperty() time_frame = ndb.StringProperty() trade_base = ndb.StringProperty() trade_aim = ndb.StringProperty() is_finished = ndb.BooleanProperty(default=False) is_win = ndb.BooleanProperty() binary_ref = ndb.StringProperty() parent_run = ndb.KeyProperty(kind='Run') step = ndb.IntegerProperty() payout = ndb.FloatProperty() probability = ndb.FloatProperty() stake = ndb.FloatProperty() stake_parent = ndb.FloatProperty(default=0.) stake_net = ndb.FloatProperty() profit = ndb.FloatProperty() profit_parent = ndb.FloatProperty(default=0.) profit_net = ndb.FloatProperty() ended_at = ndb.DateTimeProperty() updated_at = ndb.DateTimeProperty(auto_now=True) created_at = ndb.DateTimeProperty(auto_now_add=True) def getState(self): return '_'.join([self.currency, self.time_frame, self.trade_base, self.trade_aim])
kdwink/intellij-community
refs/heads/master
python/testData/inspections/PyPep8NamingInspection/importLowerAsNonLower.py
74
from x import y as <weak_warning descr="Lowercase variable imported as non lowercase">TEST</weak_warning>
buntyke/Flask
refs/heads/master
microblog/flask/lib/python2.7/site-packages/markupsafe/_compat.py
864
# -*- coding: utf-8 -*- """ markupsafe._compat ~~~~~~~~~~~~~~~~~~ Compatibility module for different Python versions. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys PY2 = sys.version_info[0] == 2 if not PY2: text_type = str string_types = (str,) unichr = chr int_types = (int,) iteritems = lambda x: iter(x.items()) else: text_type = unicode string_types = (str, unicode) unichr = unichr int_types = (int, long) iteritems = lambda x: x.iteritems()
steveYeah/amqpeek
refs/heads/master
tests/unit/cli/test_format_queues.py
1
"""Tests for the correct reading of the queue config.""" from copy import deepcopy from amqpeek.cli import build_queue_data class TestFormatQueues: """Tests parsing of queue config.""" def test_dedup_queue_config(self, config_data: dict) -> None: """Tests handling of duplicate config entries in different formats. my_queue is defined twice, both in queues and queue_limits build_queue_data should dedup queues defined twice if their limits are the same """ result = build_queue_data(config_data) assert isinstance(result, list) assert len(result) == 2 expected_queues = [("my_queue", 0), ("my_other_queue", 1)] for excepted_queue in expected_queues: assert excepted_queue in result def test_just_queue_config(self, config_data: dict) -> None: """Test that queue config is parsed correctly.""" config_data = deepcopy(config_data) del config_data["queue_limits"] result = build_queue_data(config_data) assert result == [("my_queue", 0)] def test_just_queue_limits_config(self, config_data: dict) -> None: """Test that queue limits config is parsed correctly.""" config_data = deepcopy(config_data) del config_data["queues"] result = build_queue_data(config_data) assert len(result) == 2 expected_queues = [("my_queue", 0), ("my_other_queue", 1)] for excepted_queue in expected_queues: assert excepted_queue in result def test_no_queue_config(self) -> None: """Test handling of no queue config.""" result = build_queue_data({}) assert result == []
noironetworks/horizon
refs/heads/master
openstack_auth/user.py
1
# 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 datetime import logging from django.contrib.auth import models from django.db import models as db_models from keystoneauth1 import exceptions as keystone_exceptions import six from openstack_auth import utils LOG = logging.getLogger(__name__) def set_session_from_user(request, user): request.session['token'] = user.token request.session['user_id'] = user.id request.session['region_endpoint'] = user.endpoint request.session['services_region'] = user.services_region # Update the user object cached in the request request._cached_user = user request.user = user def unset_session_user_variables(request): request.session['token'] = None request.session['user_id'] = None request.session['region_endpoint'] = None request.session['services_region'] = None # Update the user object cached in the request request._cached_user = None request.user = None def create_user_from_token(request, token, endpoint, services_region=None): # if the region is provided, use that, otherwise use the preferred region svc_region = services_region or \ utils.default_services_region(token.serviceCatalog, request, endpoint) return User(id=token.user['id'], token=token, user=token.user['name'], password_expires_at=token.user['password_expires_at'], user_domain_id=token.user_domain_id, # We need to consider already logged-in users with an old # version of Token without user_domain_name. user_domain_name=getattr(token, 'user_domain_name', None), project_id=token.project['id'], project_name=token.project['name'], domain_id=token.domain['id'], domain_name=token.domain['name'], enabled=True, service_catalog=token.serviceCatalog, roles=token.roles, endpoint=endpoint, services_region=svc_region, is_federated=getattr(token, 'is_federated', False), unscoped_token=getattr(token, 'unscoped_token', request.session.get('unscoped_token'))) class Token(object): """Encapsulates the AccessInfo object from keystoneclient. Token object provides a consistent interface for accessing the keystone token information and service catalog. Added for maintaining backward compatibility with horizon that expects Token object in the user object. """ def __init__(self, auth_ref, unscoped_token=None): # User-related attributes user = {'id': auth_ref.user_id, 'name': auth_ref.username} data = getattr(auth_ref, '_data', {}) expiration_date = data.get('token', {}).get('user', {})\ .get('password_expires_at') user['password_expires_at'] = expiration_date self.user = user self.user_domain_id = auth_ref.user_domain_id self.user_domain_name = auth_ref.user_domain_name # Token-related attributes self.id = auth_ref.auth_token self.unscoped_token = unscoped_token self.expires = auth_ref.expires # Project-related attributes project = {} project['id'] = auth_ref.project_id project['name'] = auth_ref.project_name project['is_admin_project'] = getattr(auth_ref, 'is_admin_project', False) project['domain_id'] = getattr(auth_ref, 'project_domain_id', None) self.project = project self.tenant = self.project # Domain-related attributes domain = {} domain['id'] = auth_ref.domain_id domain['name'] = auth_ref.domain_name self.domain = domain # Federation-related attributes self.is_federated = auth_ref.is_federated self.roles = [{'name': role} for role in auth_ref.role_names] self.serviceCatalog = auth_ref.service_catalog.catalog class User(models.AbstractBaseUser, models.AnonymousUser): """A User class with some extra special sauce for Keystone. In addition to the standard Django user attributes, this class also has the following: .. attribute:: token The Keystone token object associated with the current user/tenant. The token object is deprecated, user auth_ref instead. .. attribute:: tenant_id The id of the Keystone tenant for the current user/token. The tenant_id keyword argument is deprecated, use project_id instead. .. attribute:: tenant_name The name of the Keystone tenant for the current user/token. The tenant_name keyword argument is deprecated, use project_name instead. .. attribute:: project_id The id of the Keystone project for the current user/token. .. attribute:: project_name The name of the Keystone project for the current user/token. .. attribute:: service_catalog The ``ServiceCatalog`` data returned by Keystone. .. attribute:: roles A list of dictionaries containing role names and ids as returned by Keystone. .. attribute:: services_region A list of non-identity service endpoint regions extracted from the service catalog. .. attribute:: user_domain_id The domain id of the current user. .. attribute:: user_domain_name The domain name of the current user. .. attribute:: domain_id The id of the Keystone domain scoped for the current user/token. .. attribute:: is_federated Whether user is federated Keystone user. (Boolean) .. attribute:: unscoped_token Unscoped Keystone token. .. attribute:: password_expires_at Password expiration date. This attribute could be None when using keystone version < 3.0 or if the feature is not enabled in keystone. """ keystone_user_id = db_models.CharField(primary_key=True, max_length=255) USERNAME_FIELD = 'keystone_user_id' def __init__(self, id=None, token=None, user=None, tenant_id=None, service_catalog=None, tenant_name=None, roles=None, authorized_tenants=None, endpoint=None, enabled=False, services_region=None, user_domain_id=None, user_domain_name=None, domain_id=None, domain_name=None, project_id=None, project_name=None, is_federated=False, unscoped_token=None, password=None, password_expires_at=None): self.id = id self.pk = id self.token = token self.keystone_user_id = id self.username = user self.user_domain_id = user_domain_id self.user_domain_name = user_domain_name self.domain_id = domain_id self.domain_name = domain_name self.project_id = project_id or tenant_id self.project_name = project_name or tenant_name self.service_catalog = service_catalog self._services_region = ( services_region or utils.default_services_region(service_catalog) ) self.roles = roles or [] self.endpoint = endpoint self.enabled = enabled self._authorized_tenants = authorized_tenants self.is_federated = is_federated self.password_expires_at = password_expires_at # Unscoped token is used for listing user's project that works # for both federated and keystone user. self.unscoped_token = unscoped_token # List of variables to be deprecated. self.tenant_id = self.project_id self.tenant_name = self.project_name # Required by AbstractBaseUser self.password = None def __unicode__(self): return self.username def __repr__(self): return "<%s: %s>" % (self.__class__.__name__, self.username) def is_token_expired(self, margin=None): """Determine if the token is expired. :returns: ``True`` if the token is expired, ``False`` if not, and ``None`` if there is no token set. :param margin: A security time margin in seconds before real expiration. Will return ``True`` if the token expires in less than ``margin`` seconds of time. A default margin can be set by the TOKEN_TIMEOUT_MARGIN in the django settings. """ if self.token is None: return None return not utils.is_token_valid(self.token, margin) @property def is_authenticated(self): """Checks for a valid authentication.""" if (self.token is not None and utils.is_token_valid(self.token)): return True else: return False @property def is_anonymous(self): """Return if the user is not authenticated. :returns: ``True`` if not authenticated,``False`` otherwise. """ return not self.is_authenticated @property def is_active(self): return self.enabled @property def is_superuser(self): """Evaluates whether this user has admin privileges. :returns: ``True`` or ``False``. """ admin_roles = utils.get_admin_roles() user_roles = {role['name'].lower() for role in self.roles} return not admin_roles.isdisjoint(user_roles) @property def authorized_tenants(self): """Returns a memoized list of tenants this user may access.""" if self.is_authenticated and self._authorized_tenants is None: endpoint = self.endpoint try: self._authorized_tenants = utils.get_project_list( user_id=self.id, auth_url=endpoint, token=self.unscoped_token, is_federated=self.is_federated) except (keystone_exceptions.ClientException, keystone_exceptions.AuthorizationFailure): LOG.exception('Unable to retrieve project list.') return self._authorized_tenants or [] @authorized_tenants.setter def authorized_tenants(self, tenant_list): self._authorized_tenants = tenant_list @property def services_region(self): return self._services_region @services_region.setter def services_region(self, region): self._services_region = region @property def available_services_regions(self): """Returns list of unique region name values in service catalog.""" regions = [] if self.service_catalog: for service in self.service_catalog: service_type = service.get('type') if service_type is None or service_type == 'identity': continue for endpoint in service.get('endpoints', []): region = utils.get_endpoint_region(endpoint) if region not in regions: regions.append(region) return regions def save(*args, **kwargs): # Presume we can't write to Keystone. pass def delete(*args, **kwargs): # Presume we can't write to Keystone. pass # Check for OR'd permission rules, check that user has one of the # required permission. def has_a_matching_perm(self, perm_list, obj=None): """Returns True if the user has one of the specified permissions. If object is passed, it checks if the user has any of the required perms for this object. """ # If there are no permissions to check, just return true if not perm_list: return True # Check that user has at least one of the required permissions. for perm in perm_list: if self.has_perm(perm, obj): return True return False # Override the default has_perms method. Allowing for more # complex combinations of permissions. Will check for logical AND of # all top level permissions. Will use logical OR for all first level # tuples (check that use has one permissions in the tuple) # # Examples: # Checks for all required permissions # ('openstack.roles.admin', 'openstack.roles.L3-support') # # Checks for admin AND (L2 or L3) # ('openstack.roles.admin', ('openstack.roles.L3-support', # 'openstack.roles.L2-support'),) def has_perms(self, perm_list, obj=None): """Returns True if the user has all of the specified permissions. Tuples in the list will possess the required permissions if the user has a permissions matching one of the elements of that tuple """ # If there are no permissions to check, just return true if not perm_list: return True for perm in perm_list: if isinstance(perm, six.string_types): # check that the permission matches if not self.has_perm(perm, obj): return False else: # check that a permission in the tuple matches if not self.has_a_matching_perm(perm, obj): return False return True def time_until_expiration(self): """Returns the number of remaining days until user's password expires. Calculates the number days until the user must change their password, once the password expires the user will not able to log in until an admin changes its password. """ if self.password_expires_at is not None: expiration_date = datetime.datetime.strptime( self.password_expires_at, "%Y-%m-%dT%H:%M:%S.%f") return expiration_date - datetime.datetime.now() class Meta(object): app_label = 'openstack_auth'
michaelgallacher/intellij-community
refs/heads/master
python/testData/refactoring/move/relativeImportsInsideMovedModule/before/src/pkg1/subpkg1/mod1.py
79
from .. import subpkg2 from ..subpkg2 import mod2 from ..subpkg2.mod2 import VAR from . import mod3 # malformed imports from from import from ..subpkg2 import # absolute imports import pkg1.subpkg2 as foo from pkg1 import subpkg2 as bar print(subpkg2, mod3, mod2, foo, bar, VAR)
40223114/0519
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/_dummy_thread.py
742
"""Drop-in replacement for the thread module. Meant to be used as a brain-dead substitute so that threaded code does not need to be rewritten for when the thread module is not present. Suggested usage is:: try: import _thread except ImportError: import _dummy_thread as _thread """ # Exports only things specified by thread documentation; # skipping obsolete synonyms allocate(), start_new(), exit_thread(). __all__ = ['error', 'start_new_thread', 'exit', 'get_ident', 'allocate_lock', 'interrupt_main', 'LockType'] # A dummy value TIMEOUT_MAX = 2**31 # NOTE: this module can be imported early in the extension building process, # and so top level imports of other modules should be avoided. Instead, all # imports are done when needed on a function-by-function basis. Since threads # are disabled, the import lock should not be an issue anyway (??). error = RuntimeError def start_new_thread(function, args, kwargs={}): """Dummy implementation of _thread.start_new_thread(). Compatibility is maintained by making sure that ``args`` is a tuple and ``kwargs`` is a dictionary. If an exception is raised and it is SystemExit (which can be done by _thread.exit()) it is caught and nothing is done; all other exceptions are printed out by using traceback.print_exc(). If the executed function calls interrupt_main the KeyboardInterrupt will be raised when the function returns. """ if type(args) != type(tuple()): raise TypeError("2nd arg must be a tuple") if type(kwargs) != type(dict()): raise TypeError("3rd arg must be a dict") global _main _main = False try: function(*args, **kwargs) except SystemExit: pass except: import traceback traceback.print_exc() _main = True global _interrupt if _interrupt: _interrupt = False raise KeyboardInterrupt def exit(): """Dummy implementation of _thread.exit().""" raise SystemExit def get_ident(): """Dummy implementation of _thread.get_ident(). Since this module should only be used when _threadmodule is not available, it is safe to assume that the current process is the only thread. Thus a constant can be safely returned. """ return -1 def allocate_lock(): """Dummy implementation of _thread.allocate_lock().""" return LockType() def stack_size(size=None): """Dummy implementation of _thread.stack_size().""" if size is not None: raise error("setting thread stack size not supported") return 0 class LockType(object): """Class implementing dummy implementation of _thread.LockType. Compatibility is maintained by maintaining self.locked_status which is a boolean that stores the state of the lock. Pickling of the lock, though, should not be done since if the _thread module is then used with an unpickled ``lock()`` from here problems could occur from this class not having atomic methods. """ def __init__(self): self.locked_status = False def acquire(self, waitflag=None, timeout=-1): """Dummy implementation of acquire(). For blocking calls, self.locked_status is automatically set to True and returned appropriately based on value of ``waitflag``. If it is non-blocking, then the value is actually checked and not set if it is already acquired. This is all done so that threading.Condition's assert statements aren't triggered and throw a little fit. """ if waitflag is None or waitflag: self.locked_status = True return True else: if not self.locked_status: self.locked_status = True return True else: if timeout > 0: import time time.sleep(timeout) return False __enter__ = acquire def __exit__(self, typ, val, tb): self.release() def release(self): """Release the dummy lock.""" # XXX Perhaps shouldn't actually bother to test? Could lead # to problems for complex, threaded code. if not self.locked_status: raise error self.locked_status = False return True def locked(self): return self.locked_status # Used to signal that interrupt_main was called in a "thread" _interrupt = False # True when not executing in a "thread" _main = True def interrupt_main(): """Set _interrupt flag to True to have start_new_thread raise KeyboardInterrupt upon exiting.""" if _main: raise KeyboardInterrupt else: global _interrupt _interrupt = True
chand3040/sree_odoo
refs/heads/master
openerp/addons/auth_openid/controllers/__init__.py
443
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). # # 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 main # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
DaniilLeksin/theblog
refs/heads/master
env/lib/python2.7/site-packages/django/conf/locale/mk/formats.py
43
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j. F Y H:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j. F' SHORT_DATE_FORMAT = 'j.m.Y' SHORT_DATETIME_FORMAT = 'j.m.Y H:i' FIRST_DAY_OF_WEEK = 1 # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see http://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = ( '%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06' '%d. %m. %Y', '%d. %m. %y', # '25. 10. 2006', '25. 10. 06' ) DATETIME_INPUT_FORMATS = ( '%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' '%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' '%d.%m.%Y %H:%M', # '25.10.2006 14:30' '%d.%m.%Y', # '25.10.2006' '%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' '%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' '%d.%m.%y %H:%M', # '25.10.06 14:30' '%d.%m.%y', # '25.10.06' '%d. %m. %Y %H:%M:%S', # '25. 10. 2006 14:30:59' '%d. %m. %Y %H:%M:%S.%f', # '25. 10. 2006 14:30:59.000200' '%d. %m. %Y %H:%M', # '25. 10. 2006 14:30' '%d. %m. %Y', # '25. 10. 2006' '%d. %m. %y %H:%M:%S', # '25. 10. 06 14:30:59' '%d. %m. %y %H:%M:%S.%f', # '25. 10. 06 14:30:59.000200' '%d. %m. %y %H:%M', # '25. 10. 06 14:30' '%d. %m. %y', # '25. 10. 06' ) DECIMAL_SEPARATOR = ',' THOUSAND_SEPARATOR = '.' NUMBER_GROUPING = 3
Teamxrtc/webrtc-streaming-node
refs/heads/master
third_party/depot_tools/external_bin/gsutil/gsutil_4.15/gsutil/gslib/commands/cat.py
32
# -*- coding: utf-8 -*- # Copyright 2011 Google Inc. All Rights Reserved. # Copyright 2011, Nexenta Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Implementation of Unix-like cat command for cloud storage providers.""" from __future__ import absolute_import import re from gslib.cat_helper import CatHelper from gslib.command import Command from gslib.command_argument import CommandArgument from gslib.cs_api_map import ApiSelector from gslib.exception import CommandException from gslib.util import NO_MAX _SYNOPSIS = """ gsutil cat [-h] url... """ _DETAILED_HELP_TEXT = (""" <B>SYNOPSIS</B> """ + _SYNOPSIS + """ <B>DESCRIPTION</B> The cat command outputs the contents of one or more URLs to stdout. It is equivalent to doing: gsutil cp url... - (The final '-' causes gsutil to stream the output to stdout.) <B>WARNING: DATA INTEGRITY CHECKING NOT DONE</B> The gsutil cat command does not compute a checksum of the downloaded data. Therefore, we recommend that users either perform their own validation of the output of gsutil cat or use gsutil cp or rsync (both of which perform integrity checking automatically). <B>OPTIONS</B> -h Prints short header for each object. For example: gsutil cat -h gs://bucket/meeting_notes/2012_Feb/*.txt This would print a header with the object name before the contents of each text object that matched the wildcard. -r range Causes gsutil to output just the specified byte range of the object. Ranges are can be of these forms: start-end (e.g., -r 256-5939) start- (e.g., -r 256-) -numbytes (e.g., -r -5) where offsets start at 0, start-end means to return bytes start through end (inclusive), start- means to return bytes start through the end of the object, and -numbytes means to return the last numbytes of the object. For example: gsutil cat -r 256-939 gs://bucket/object returns bytes 256 through 939, while: gsutil cat -r -5 gs://bucket/object returns the final 5 bytes of the object. """) class CatCommand(Command): """Implementation of gsutil cat command.""" # Command specification. See base class for documentation. command_spec = Command.CreateCommandSpec( 'cat', command_name_aliases=[], usage_synopsis=_SYNOPSIS, min_args=1, max_args=NO_MAX, supported_sub_args='hr:', file_url_ok=False, provider_url_ok=False, urls_start_arg=0, gs_api_support=[ApiSelector.XML, ApiSelector.JSON], gs_default_api=ApiSelector.JSON, argparse_arguments=[ CommandArgument.MakeZeroOrMoreCloudURLsArgument() ] ) # Help specification. See help_provider.py for documentation. help_spec = Command.HelpSpec( help_name='cat', help_name_aliases=[], help_type='command_help', help_one_line_summary='Concatenate object content to stdout', help_text=_DETAILED_HELP_TEXT, subcommand_help_text={}, ) # Command entry point. def RunCommand(self): """Command entry point for the cat command.""" show_header = False request_range = None start_byte = 0 end_byte = None if self.sub_opts: for o, a in self.sub_opts: if o == '-h': show_header = True elif o == '-r': request_range = a.strip() range_matcher = re.compile( '^(?P<start>[0-9]+)-(?P<end>[0-9]*)$|^(?P<endslice>-[0-9]+)$') range_match = range_matcher.match(request_range) if not range_match: raise CommandException('Invalid range (%s)' % request_range) if range_match.group('start'): start_byte = long(range_match.group('start')) if range_match.group('end'): end_byte = long(range_match.group('end')) if range_match.group('endslice'): start_byte = long(range_match.group('endslice')) else: self.RaiseInvalidArgumentException() return CatHelper(self).CatUrlStrings(self.args, show_header=show_header, start_byte=start_byte, end_byte=end_byte)
venicegeo/eventkit-cloud
refs/heads/master
eventkit_cloud/tasks/migrations/migrations_pre_1_2_4/0023_auto_20170825_1416.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-25 14:16 import uuid from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tasks', '0022_auto_20170802_1234'), ] operations = [ migrations.AlterField( model_name='exportprovidertask', name='uid', field=models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, unique=True), ), migrations.AlterField( model_name='exportrun', name='uid', field=models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, unique=True), ), migrations.AlterField( model_name='exporttask', name='uid', field=models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, unique=True), ), migrations.AlterField( model_name='finalizerunhooktaskrecord', name='uid', field=models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, unique=True), ), ]
conorpp/napkis
refs/heads/master
napkis/deployment/python2.7/django/db/backends/postgresql_psycopg2/version.py
331
""" Extracts the version of the PostgreSQL server. """ import re # This reg-exp is intentionally fairly flexible here. # Needs to be able to handle stuff like: # PostgreSQL 8.3.6 # EnterpriseDB 8.3 # PostgreSQL 8.3 beta4 # PostgreSQL 8.4beta1 VERSION_RE = re.compile(r'\S+ (\d+)\.(\d+)\.?(\d+)?') def _parse_version(text): "Internal parsing method. Factored out for testing purposes." major, major2, minor = VERSION_RE.search(text).groups() try: return int(major) * 10000 + int(major2) * 100 + int(minor) except (ValueError, TypeError): return int(major) * 10000 + int(major2) * 100 def get_version(connection): """ Returns an integer representing the major, minor and revision number of the server. Format is the one used for the return value of libpq PQServerVersion()/``server_version`` connection attribute (available in newer psycopg2 versions.) For example, 80304 for 8.3.4. The last two digits will be 00 in the case of releases (e.g., 80400 for 'PostgreSQL 8.4') or in the case of beta and prereleases (e.g. 90100 for 'PostgreSQL 9.1beta2'). PQServerVersion()/``server_version`` doesn't execute a query so try that first, then fallback to a ``SELECT version()`` query. """ if hasattr(connection, 'server_version'): return connection.server_version else: cursor = connection.cursor() cursor.execute("SELECT version()") return _parse_version(cursor.fetchone()[0])
cesarmarinhorj/ansible
refs/heads/devel
test/units/plugins/action/test_add_host.py
28
import unittest from ansible.plugins.action import add_host class TestAddHost(unittest.TestCase): def test_hostname(self): host, port = add_host._parse_ip_host_and_port('some-remote-host') assert host == 'some-remote-host' assert port is None def test_hostname_with_port(self): host, port = add_host._parse_ip_host_and_port('some-remote-host:80') assert host == 'some-remote-host' assert port == '80' def test_parse_ip_host_and_port_v4(self): host, port = add_host._parse_ip_host_and_port('8.8.8.8') assert host == '8.8.8.8' assert port is None def test_parse_ip_host_and_port_v4_and_port(self): host, port = add_host._parse_ip_host_and_port('8.8.8.8:80') assert host == '8.8.8.8' assert port == '80' def test_parse_ip_host_and_port_v6(self): host, port = add_host._parse_ip_host_and_port( 'dead:beef:dead:beef:dead:beef:dead:beef' ) assert host == 'dead:beef:dead:beef:dead:beef:dead:beef' assert port is None def test_parse_ip_host_and_port_v6_with_brackets(self): host, port = add_host._parse_ip_host_and_port( '[dead:beef:dead:beef:dead:beef:dead:beef]' ) assert host == 'dead:beef:dead:beef:dead:beef:dead:beef' assert port is None def test_parse_ip_host_and_port_v6_with_brackets_and_port(self): host, port = add_host._parse_ip_host_and_port( '[dead:beef:dead:beef:dead:beef:dead:beef]:80' ) assert host == 'dead:beef:dead:beef:dead:beef:dead:beef' assert port == '80'
caioariede/django-pipeline
refs/heads/master
pipeline/compressors/closure.py
47
from __future__ import unicode_literals from pipeline.conf import settings from pipeline.compressors import SubProcessCompressor class ClosureCompressor(SubProcessCompressor): def compress_js(self, js): command = '%s %s' % (settings.PIPELINE_CLOSURE_BINARY, settings.PIPELINE_CLOSURE_ARGUMENTS) return self.execute_command(command, js)
UOMx/edx-platform
refs/heads/master
openedx/core/djangoapps/common_views/xblock.py
33
""" Common views dedicated to rendering xblocks. """ from __future__ import absolute_import import logging import mimetypes import pkg_resources from xblock.core import XBlock from django.conf import settings from django.http import Http404, HttpResponse log = logging.getLogger(__name__) def xblock_resource(request, block_type, uri): # pylint: disable=unused-argument """ Return a package resource for the specified XBlock. """ try: xblock_class = XBlock.load_class(block_type, select=settings.XBLOCK_SELECT_FUNCTION) # Note: in debug mode, return any file rather than going through the XBlock which # will only return public files. This allows unbundled files to be served up # during development. if settings.DEBUG: content = pkg_resources.resource_stream(xblock_class.__module__, uri) else: content = xblock_class.open_local_resource(uri) except IOError: log.info('Failed to load xblock resource', exc_info=True) raise Http404 except Exception: log.error('Failed to load xblock resource', exc_info=True) raise Http404 mimetype, _ = mimetypes.guess_type(uri) return HttpResponse(content, content_type=mimetype)
1900/pyspider
refs/heads/master
scheduler/__init__.py
7
from scheduler import Scheduler
2014c2g5/2014c2
refs/heads/master
exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/pprint.py
96
# Author: Fred L. Drake, Jr. # fdrake@acm.org # # This is a simple little module I wrote to make life easier. I didn't # see anything quite like it in the library, though I may have overlooked # something. I wrote this when I was trying to read some heavily nested # tuples with fairly non-descriptive content. This is modeled very much # after Lisp/Scheme - style pretty-printing of lists. If you find it # useful, thank small children who sleep at night. """Support to pretty-print lists, tuples, & dictionaries recursively. Very simple, but useful, especially in debugging data structures. Classes ------- PrettyPrinter() Handle pretty-printing operations onto a stream using a configured set of formatting parameters. Functions --------- pformat() Format a Python object into a pretty-printed representation. pprint() Pretty-print a Python object to a stream [default is sys.stdout]. saferepr() Generate a 'standard' repr()-like value, but protect against recursive data structures. """ import sys as _sys from collections import OrderedDict as _OrderedDict from io import StringIO as _StringIO __all__ = ["pprint","pformat","isreadable","isrecursive","saferepr", "PrettyPrinter"] # cache these for faster access: _commajoin = ", ".join _id = id _len = len _type = type def pprint(object, stream=None, indent=1, width=80, depth=None): """Pretty-print a Python object to a stream [default is sys.stdout].""" printer = PrettyPrinter( stream=stream, indent=indent, width=width, depth=depth) printer.pprint(object) def pformat(object, indent=1, width=80, depth=None): """Format a Python object into a pretty-printed representation.""" return PrettyPrinter(indent=indent, width=width, depth=depth).pformat(object) def saferepr(object): """Version of repr() which can handle recursive data structures.""" return _safe_repr(object, {}, None, 0)[0] def isreadable(object): """Determine if saferepr(object) is readable by eval().""" return _safe_repr(object, {}, None, 0)[1] def isrecursive(object): """Determine if object requires a recursive representation.""" return _safe_repr(object, {}, None, 0)[2] class _safe_key: """Helper function for key functions when sorting unorderable objects. The wrapped-object will fallback to an Py2.x style comparison for unorderable types (sorting first comparing the type name and then by the obj ids). Does not work recursively, so dict.items() must have _safe_key applied to both the key and the value. """ __slots__ = ['obj'] def __init__(self, obj): self.obj = obj def __lt__(self, other): try: rv = self.obj.__lt__(other.obj) except TypeError: rv = NotImplemented if rv is NotImplemented: rv = (str(type(self.obj)), id(self.obj)) < \ (str(type(other.obj)), id(other.obj)) return rv def _safe_tuple(t): "Helper function for comparing 2-tuples" return _safe_key(t[0]), _safe_key(t[1]) class PrettyPrinter: def __init__(self, indent=1, width=80, depth=None, stream=None): """Handle pretty printing operations onto a stream using a set of configured parameters. indent Number of spaces to indent for each level of nesting. width Attempted maximum number of columns in the output. depth The maximum depth to print out nested structures. stream The desired output stream. If omitted (or false), the standard output stream available at construction will be used. """ indent = int(indent) width = int(width) assert indent >= 0, "indent must be >= 0" assert depth is None or depth > 0, "depth must be > 0" assert width, "width must be != 0" self._depth = depth self._indent_per_level = indent self._width = width if stream is not None: self._stream = stream else: self._stream = _sys.stdout def pprint(self, object): self._format(object, self._stream, 0, 0, {}, 0) self._stream.write("\n") def pformat(self, object): sio = _StringIO() self._format(object, sio, 0, 0, {}, 0) return sio.getvalue() def isrecursive(self, object): return self.format(object, {}, 0, 0)[2] def isreadable(self, object): s, readable, recursive = self.format(object, {}, 0, 0) return readable and not recursive def _format(self, object, stream, indent, allowance, context, level): level = level + 1 objid = _id(object) if objid in context: stream.write(_recursion(object)) self._recursive = True self._readable = False return rep = self._repr(object, context, level - 1) typ = _type(object) sepLines = _len(rep) > (self._width - 1 - indent - allowance) write = stream.write if self._depth and level > self._depth: write(rep) return if sepLines: r = getattr(typ, "__repr__", None) if issubclass(typ, dict): write('{') if self._indent_per_level > 1: write((self._indent_per_level - 1) * ' ') length = _len(object) if length: context[objid] = 1 indent = indent + self._indent_per_level if issubclass(typ, _OrderedDict): items = list(object.items()) else: items = sorted(object.items(), key=_safe_tuple) key, ent = items[0] rep = self._repr(key, context, level) write(rep) write(': ') self._format(ent, stream, indent + _len(rep) + 2, allowance + 1, context, level) if length > 1: for key, ent in items[1:]: rep = self._repr(key, context, level) write(',\n%s%s: ' % (' '*indent, rep)) self._format(ent, stream, indent + _len(rep) + 2, allowance + 1, context, level) indent = indent - self._indent_per_level del context[objid] write('}') return if ((issubclass(typ, list) and r is list.__repr__) or (issubclass(typ, tuple) and r is tuple.__repr__) or (issubclass(typ, set) and r is set.__repr__) or (issubclass(typ, frozenset) and r is frozenset.__repr__) ): length = _len(object) if issubclass(typ, list): write('[') endchar = ']' elif issubclass(typ, tuple): write('(') endchar = ')' else: if not length: write(rep) return if typ is set: write('{') endchar = '}' else: write(typ.__name__) write('({') endchar = '})' indent += len(typ.__name__) + 1 object = sorted(object, key=_safe_key) if self._indent_per_level > 1: write((self._indent_per_level - 1) * ' ') if length: context[objid] = 1 indent = indent + self._indent_per_level self._format(object[0], stream, indent, allowance + 1, context, level) if length > 1: for ent in object[1:]: write(',\n' + ' '*indent) self._format(ent, stream, indent, allowance + 1, context, level) indent = indent - self._indent_per_level del context[objid] if issubclass(typ, tuple) and length == 1: write(',') write(endchar) return write(rep) def _repr(self, object, context, level): repr, readable, recursive = self.format(object, context.copy(), self._depth, level) if not readable: self._readable = False if recursive: self._recursive = True return repr def format(self, object, context, maxlevels, level): """Format object for a specific context, returning a string and flags indicating whether the representation is 'readable' and whether the object represents a recursive construct. """ return _safe_repr(object, context, maxlevels, level) # Return triple (repr_string, isreadable, isrecursive). def _safe_repr(object, context, maxlevels, level): typ = _type(object) if typ is str: if 'locale' not in _sys.modules: return repr(object), True, False if "'" in object and '"' not in object: closure = '"' quotes = {'"': '\\"'} else: closure = "'" quotes = {"'": "\\'"} qget = quotes.get sio = _StringIO() write = sio.write for char in object: if char.isalpha(): write(char) else: write(qget(char, repr(char)[1:-1])) return ("%s%s%s" % (closure, sio.getvalue(), closure)), True, False r = getattr(typ, "__repr__", None) if issubclass(typ, dict) and r is dict.__repr__: if not object: return "{}", True, False objid = _id(object) if maxlevels and level >= maxlevels: return "{...}", False, objid in context if objid in context: return _recursion(object), False, True context[objid] = 1 readable = True recursive = False components = [] append = components.append level += 1 saferepr = _safe_repr items = sorted(object.items(), key=_safe_tuple) for k, v in items: krepr, kreadable, krecur = saferepr(k, context, maxlevels, level) vrepr, vreadable, vrecur = saferepr(v, context, maxlevels, level) append("%s: %s" % (krepr, vrepr)) readable = readable and kreadable and vreadable if krecur or vrecur: recursive = True del context[objid] return "{%s}" % _commajoin(components), readable, recursive if (issubclass(typ, list) and r is list.__repr__) or \ (issubclass(typ, tuple) and r is tuple.__repr__): if issubclass(typ, list): if not object: return "[]", True, False format = "[%s]" elif _len(object) == 1: format = "(%s,)" else: if not object: return "()", True, False format = "(%s)" objid = _id(object) if maxlevels and level >= maxlevels: return format % "...", False, objid in context if objid in context: return _recursion(object), False, True context[objid] = 1 readable = True recursive = False components = [] append = components.append level += 1 for o in object: orepr, oreadable, orecur = _safe_repr(o, context, maxlevels, level) append(orepr) if not oreadable: readable = False if orecur: recursive = True del context[objid] return format % _commajoin(components), readable, recursive rep = repr(object) return rep, (rep and not rep.startswith('<')), False def _recursion(object): return ("<Recursion on %s with id=%s>" % (_type(object).__name__, _id(object))) def _perfcheck(object=None): import time if object is None: object = [("string", (1, 2), [3, 4], {5: 6, 7: 8})] * 100000 p = PrettyPrinter() t1 = time.time() _safe_repr(object, {}, None, 0) t2 = time.time() p.pformat(object) t3 = time.time() print("_safe_repr:", t2 - t1) print("pformat:", t3 - t2) if __name__ == "__main__": _perfcheck()
olegnev/dx-toolkit
refs/heads/master
src/python/dxpy/templating/__init__.py
2
# Copyright (C) 2013-2015 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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.
ericzhou2008/zulip
refs/heads/master
confirmation/util.py
126
# -*- coding: utf-8 -*- # Copyright: (c) 2008, Jarek Zgoda <jarek.zgoda@gmail.com> __revision__ = '$Id: util.py 3 2008-11-18 07:33:52Z jarek.zgoda $' from django.conf import settings def get_status_field(app_label, model_name): model = '%s.%s' % (app_label, model_name) mapping = getattr(settings, 'STATUS_FIELDS', {}) return mapping.get(model, 'status')
seken/nink
refs/heads/master
pyglet/libs/x11/xinerama.py
46
'''Wrapper for Xinerama Generated with: tools/genwrappers.py xinerama Do not modify this file. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import ctypes from ctypes import * import pyglet.lib _lib = pyglet.lib.load_library('Xinerama') _int_types = (c_int16, c_int32) if hasattr(ctypes, 'c_int64'): # Some builds of ctypes apparently do not have c_int64 # defined; it's a pretty good bet that these builds do not # have 64-bit pointers. _int_types += (ctypes.c_int64,) for t in _int_types: if sizeof(t) == sizeof(c_size_t): c_ptrdiff_t = t class c_void(Structure): # c_void_p is a buggy return type, converting to int, so # POINTER(None) == c_void_p is actually written as # POINTER(c_void), so it can be treated as a real pointer. _fields_ = [('dummy', c_int)] import pyglet.libs.x11.xlib class struct_anon_93(Structure): __slots__ = [ 'screen_number', 'x_org', 'y_org', 'width', 'height', ] struct_anon_93._fields_ = [ ('screen_number', c_int), ('x_org', c_short), ('y_org', c_short), ('width', c_short), ('height', c_short), ] XineramaScreenInfo = struct_anon_93 # /usr/include/X11/extensions/Xinerama.h:40 Display = pyglet.libs.x11.xlib.Display # /usr/include/X11/extensions/Xinerama.h:44 XineramaQueryExtension = _lib.XineramaQueryExtension XineramaQueryExtension.restype = c_int XineramaQueryExtension.argtypes = [POINTER(Display), POINTER(c_int), POINTER(c_int)] # /usr/include/X11/extensions/Xinerama.h:50 XineramaQueryVersion = _lib.XineramaQueryVersion XineramaQueryVersion.restype = c_int XineramaQueryVersion.argtypes = [POINTER(Display), POINTER(c_int), POINTER(c_int)] # /usr/include/X11/extensions/Xinerama.h:56 XineramaIsActive = _lib.XineramaIsActive XineramaIsActive.restype = c_int XineramaIsActive.argtypes = [POINTER(Display)] # /usr/include/X11/extensions/Xinerama.h:67 XineramaQueryScreens = _lib.XineramaQueryScreens XineramaQueryScreens.restype = POINTER(XineramaScreenInfo) XineramaQueryScreens.argtypes = [POINTER(Display), POINTER(c_int)] __all__ = ['XineramaScreenInfo', 'XineramaQueryExtension', 'XineramaQueryVersion', 'XineramaIsActive', 'XineramaQueryScreens']
aescwork/sqlitemgr
refs/heads/master
tests/delete_table_test.py
1
import unittest import os import sys sys.path.append("../sqlitemgr/") import sqlitemgr as sqm class DeleteTableTest(unittest.TestCase): """ Test if delete_table was successful by checking if the name of the target table is in the list returned by executing "SELECT name FROM sqlite_master WHERE type='table'" against the database. Then call fetchall on the cursor object, and if "nuts" does not appear in the returned list, the deletion of the table was successful. The database will only have one table: nuts """ def setUp(self): self.sm = sqm.SQLiteMgr("../fixtures/fruit.db") self.sm.set_table_statement("CREATE TABLE IF NOT EXISTS nuts(Nmbr INT PRIMARY KEY, Called TEXT UNIQUE, Description TEXT)").create_table() self.table_exists = self.check_sqlite_master() # should return True self.sm.table = "nuts" self.sm.delete_table() self.table_exists_after_delete = self.check_sqlite_master() # should return False def test_table_exists(self): self.assertEqual(self.table_exists, True) def test_delete_table(self): self.assertEqual(self.table_exists_after_delete, False) def test_result(self): self.assertEqual(self.sm.result, "OK") self.assertEqual(self.sm.status, "In SQLiteMgr delete_table, deleted table nuts") def tearDown(self): self.sm.__del__() def check_sqlite_master(self): # the statement after return evaluates to either True or False return "nuts" in [item[0] for item in self.sm.cursor.execute("SELECT name FROM sqlite_master WHERE type='table';").fetchall()] if __name__ == '__main__': unittest.main()
luotao1/Paddle
refs/heads/develop
python/paddle/distributed/fleet/meta_optimizers/recompute_optimizer.py
1
# Copyright (c) 2019 PaddlePaddle 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 from paddle.fluid.optimizer import RecomputeOptimizer as RO from .meta_optimizer_base import MetaOptimizerBase class RecomputeOptimizer(MetaOptimizerBase): def __init__(self, optimizer): super(RecomputeOptimizer, self).__init__(optimizer) self.inner_opt = optimizer self.wrapped_opt = None # we do not allow meta optimizer to be inner optimizer currently self.meta_optimizers_white_list = [ "LarsOptimizer", "LambOptimizer", "GraphExecutionOptimizer", "DGCOptimizer", ] self.meta_optimizers_black_list = [] def _set_basic_info(self, loss, role_maker, user_defined_optimizer, user_defined_strategy): super(RecomputeOptimizer, self)._set_basic_info( loss, role_maker, user_defined_optimizer, user_defined_strategy) def _init_wrapped_opt(self): if self.wrapped_opt is not None: return configs = self.user_defined_strategy.recompute_configs self.wrapped_opt = RO(self.inner_opt) self.wrapped_opt._set_checkpoints(list(configs["checkpoints"])) if configs["enable_offload"]: self.wrapped_opt._enable_offload() # TODO(JZ-LIANG) might found a way to infer the checkpoint shape automatically checkpoint_shapes = list(configs["checkpoint_shape"]) self.wrapped_opt.checkpoint_shape = checkpoint_shapes def _can_apply(self): if not self.role_maker._is_collective: return False if self.user_defined_strategy.recompute == True: if len(self.user_defined_strategy.recompute_configs[ "checkpoints"]) == 0: return False else: return True def _disable_strategy(self, dist_strategy): dist_strategy.recompute = False dist_strategy.recompute_configs = {} def _enable_strategy(self, dist_strategy, context): # we do not support automatically recompute checkpoints currently return def backward(self, loss, startup_program=None, parameter_list=None, no_grad_set=None, callbacks=None): # maybe inner_opt of other meta optimizer self._init_wrapped_opt() return self.wrapped_opt.backward(loss, startup_program, parameter_list, no_grad_set, callbacks) def apply_gradients(self, params_grads): return self.wrapped_opt.apply_gradients(params_grads=params_grads) def apply_optimize(self, loss, startup_program, params_grads): return self.wrapped_opt.apply_optimize( loss, startup_program=startup_program, params_grads=params_grads) def minimize_impl(self, loss, startup_program=None, parameter_list=None, no_grad_set=None): self._init_wrapped_opt() optimize_ops, params_grads = \ self.wrapped_opt.minimize(loss, startup_program, parameter_list, no_grad_set) return optimize_ops, params_grads
chengduoZH/Paddle
refs/heads/develop
python/paddle/fluid/tests/unittests/test_generate_proposal_labels_op.py
2
# Copyright (c) 2018 PaddlePaddle 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. from __future__ import print_function import unittest import numpy as np import sys import math import paddle.fluid as fluid from op_test import OpTest def generate_proposal_labels_in_python( rpn_rois, gt_classes, is_crowd, gt_boxes, im_info, batch_size_per_im, fg_fraction, fg_thresh, bg_thresh_hi, bg_thresh_lo, bbox_reg_weights, class_nums, is_cls_agnostic, is_cascade_rcnn): rois = [] labels_int32 = [] bbox_targets = [] bbox_inside_weights = [] bbox_outside_weights = [] lod = [] assert len(rpn_rois) == len( im_info), 'batch size of rpn_rois and ground_truth is not matched' for im_i in range(len(im_info)): frcn_blobs = _sample_rois(rpn_rois[im_i], gt_classes[im_i], is_crowd[im_i], gt_boxes[im_i], im_info[im_i], batch_size_per_im, fg_fraction, fg_thresh, bg_thresh_hi, bg_thresh_lo, bbox_reg_weights, class_nums, is_cls_agnostic, is_cascade_rcnn) lod.append(frcn_blobs['rois'].shape[0]) rois.append(frcn_blobs['rois']) labels_int32.append(frcn_blobs['labels_int32']) bbox_targets.append(frcn_blobs['bbox_targets']) bbox_inside_weights.append(frcn_blobs['bbox_inside_weights']) bbox_outside_weights.append(frcn_blobs['bbox_outside_weights']) return rois, labels_int32, bbox_targets, bbox_inside_weights, bbox_outside_weights, lod def _sample_rois(rpn_rois, gt_classes, is_crowd, gt_boxes, im_info, batch_size_per_im, fg_fraction, fg_thresh, bg_thresh_hi, bg_thresh_lo, bbox_reg_weights, class_nums, is_cls_agnostic, is_cascade_rcnn): rois_per_image = int(batch_size_per_im) fg_rois_per_im = int(np.round(fg_fraction * rois_per_image)) # Roidb im_scale = im_info[2] inv_im_scale = 1. / im_scale rpn_rois = rpn_rois * inv_im_scale if is_cascade_rcnn: rpn_rois = rpn_rois[gt_boxes.shape[0]:, :] boxes = np.vstack([gt_boxes, rpn_rois]) gt_overlaps = np.zeros((boxes.shape[0], class_nums)) box_to_gt_ind_map = np.zeros((boxes.shape[0]), dtype=np.int32) if len(gt_boxes) > 0: proposal_to_gt_overlaps = _bbox_overlaps(boxes, gt_boxes) overlaps_argmax = proposal_to_gt_overlaps.argmax(axis=1) overlaps_max = proposal_to_gt_overlaps.max(axis=1) # Boxes which with non-zero overlap with gt boxes overlapped_boxes_ind = np.where(overlaps_max > 0)[0] overlapped_boxes_gt_classes = gt_classes[overlaps_argmax[ overlapped_boxes_ind]] gt_overlaps[overlapped_boxes_ind, overlapped_boxes_gt_classes] = overlaps_max[ overlapped_boxes_ind] box_to_gt_ind_map[overlapped_boxes_ind] = overlaps_argmax[ overlapped_boxes_ind] crowd_ind = np.where(is_crowd)[0] gt_overlaps[crowd_ind] = -1 max_overlaps = gt_overlaps.max(axis=1) max_classes = gt_overlaps.argmax(axis=1) # Cascade RCNN Decode Filter if is_cascade_rcnn: ws = boxes[:, 2] - boxes[:, 0] + 1 hs = boxes[:, 3] - boxes[:, 1] + 1 keep = np.where((ws > 0) & (hs > 0))[0] boxes = boxes[keep] fg_inds = np.where(max_overlaps >= fg_thresh)[0] bg_inds = np.where((max_overlaps < bg_thresh_hi) & (max_overlaps >= bg_thresh_lo))[0] fg_rois_per_this_image = fg_inds.shape[0] bg_rois_per_this_image = bg_inds.shape[0] else: # Foreground fg_inds = np.where(max_overlaps >= fg_thresh)[0] fg_rois_per_this_image = np.minimum(fg_rois_per_im, fg_inds.shape[0]) # Sample foreground if there are too many if fg_inds.shape[0] > fg_rois_per_this_image: fg_inds = np.random.choice( fg_inds, size=fg_rois_per_this_image, replace=False) fg_inds = fg_inds[:fg_rois_per_this_image] # Background bg_inds = np.where((max_overlaps < bg_thresh_hi) & (max_overlaps >= bg_thresh_lo))[0] bg_rois_per_this_image = rois_per_image - fg_rois_per_this_image bg_rois_per_this_image = np.minimum(bg_rois_per_this_image, bg_inds.shape[0]) # Sample background if there are too many if bg_inds.shape[0] > bg_rois_per_this_image: bg_inds = np.random.choice( bg_inds, size=bg_rois_per_this_image, replace=False) bg_inds = bg_inds[:bg_rois_per_this_image] keep_inds = np.append(fg_inds, bg_inds) sampled_labels = max_classes[keep_inds] sampled_labels[fg_rois_per_this_image:] = 0 sampled_boxes = boxes[keep_inds] sampled_gts = gt_boxes[box_to_gt_ind_map[keep_inds]] sampled_gts[fg_rois_per_this_image:, :] = gt_boxes[0] bbox_label_targets = _compute_targets(sampled_boxes, sampled_gts, sampled_labels, bbox_reg_weights) bbox_targets, bbox_inside_weights = _expand_bbox_targets( bbox_label_targets, class_nums, is_cls_agnostic) bbox_outside_weights = np.array( bbox_inside_weights > 0, dtype=bbox_inside_weights.dtype) # Scale rois sampled_rois = sampled_boxes * im_scale # Faster RCNN blobs frcn_blobs = dict( rois=sampled_rois, labels_int32=sampled_labels, bbox_targets=bbox_targets, bbox_inside_weights=bbox_inside_weights, bbox_outside_weights=bbox_outside_weights) return frcn_blobs def _bbox_overlaps(roi_boxes, gt_boxes): w1 = np.maximum(roi_boxes[:, 2] - roi_boxes[:, 0] + 1, 0) h1 = np.maximum(roi_boxes[:, 3] - roi_boxes[:, 1] + 1, 0) w2 = np.maximum(gt_boxes[:, 2] - gt_boxes[:, 0] + 1, 0) h2 = np.maximum(gt_boxes[:, 3] - gt_boxes[:, 1] + 1, 0) area1 = w1 * h1 area2 = w2 * h2 overlaps = np.zeros((roi_boxes.shape[0], gt_boxes.shape[0])) for ind1 in range(roi_boxes.shape[0]): for ind2 in range(gt_boxes.shape[0]): inter_x1 = np.maximum(roi_boxes[ind1, 0], gt_boxes[ind2, 0]) inter_y1 = np.maximum(roi_boxes[ind1, 1], gt_boxes[ind2, 1]) inter_x2 = np.minimum(roi_boxes[ind1, 2], gt_boxes[ind2, 2]) inter_y2 = np.minimum(roi_boxes[ind1, 3], gt_boxes[ind2, 3]) inter_w = np.maximum(inter_x2 - inter_x1 + 1, 0) inter_h = np.maximum(inter_y2 - inter_y1 + 1, 0) inter_area = inter_w * inter_h iou = inter_area / (area1[ind1] + area2[ind2] - inter_area) overlaps[ind1, ind2] = iou return overlaps def _compute_targets(roi_boxes, gt_boxes, labels, bbox_reg_weights): assert roi_boxes.shape[0] == gt_boxes.shape[0] assert roi_boxes.shape[1] == 4 assert gt_boxes.shape[1] == 4 targets = np.zeros(roi_boxes.shape) bbox_reg_weights = np.asarray(bbox_reg_weights) targets = _box_to_delta( ex_boxes=roi_boxes, gt_boxes=gt_boxes, weights=bbox_reg_weights) return np.hstack([labels[:, np.newaxis], targets]).astype( np.float32, copy=False) def _box_to_delta(ex_boxes, gt_boxes, weights): ex_w = ex_boxes[:, 2] - ex_boxes[:, 0] + 1 ex_h = ex_boxes[:, 3] - ex_boxes[:, 1] + 1 ex_ctr_x = ex_boxes[:, 0] + 0.5 * ex_w ex_ctr_y = ex_boxes[:, 1] + 0.5 * ex_h gt_w = gt_boxes[:, 2] - gt_boxes[:, 0] + 1 gt_h = gt_boxes[:, 3] - gt_boxes[:, 1] + 1 gt_ctr_x = gt_boxes[:, 0] + 0.5 * gt_w gt_ctr_y = gt_boxes[:, 1] + 0.5 * gt_h dx = (gt_ctr_x - ex_ctr_x) / ex_w / weights[0] dy = (gt_ctr_y - ex_ctr_y) / ex_h / weights[1] dw = (np.log(gt_w / ex_w)) / weights[2] dh = (np.log(gt_h / ex_h)) / weights[3] targets = np.vstack([dx, dy, dw, dh]).transpose() return targets def _expand_bbox_targets(bbox_targets_input, class_nums, is_cls_agnostic): class_labels = bbox_targets_input[:, 0] fg_inds = np.where(class_labels > 0)[0] #if is_cls_agnostic: # class_labels = [1 if ll > 0 else 0 for ll in class_labels] # class_labels = np.array(class_labels, dtype=np.int32) # class_nums = 2 bbox_targets = np.zeros((class_labels.shape[0], 4 * class_nums if not is_cls_agnostic else 4 * 2)) bbox_inside_weights = np.zeros(bbox_targets.shape) for ind in fg_inds: class_label = int(class_labels[ind]) if not is_cls_agnostic else 1 start_ind = class_label * 4 end_ind = class_label * 4 + 4 bbox_targets[ind, start_ind:end_ind] = bbox_targets_input[ind, 1:] bbox_inside_weights[ind, start_ind:end_ind] = (1.0, 1.0, 1.0, 1.0) return bbox_targets, bbox_inside_weights class TestGenerateProposalLabelsOp(OpTest): def set_data(self): self.init_test_params() self.init_test_input() self.init_test_output() self.inputs = { 'RpnRois': (self.rpn_rois[0], self.rpn_rois_lod), 'GtClasses': (self.gt_classes[0], self.gts_lod), 'IsCrowd': (self.is_crowd[0], self.gts_lod), 'GtBoxes': (self.gt_boxes[0], self.gts_lod), 'ImInfo': self.im_info } self.attrs = { 'batch_size_per_im': self.batch_size_per_im, 'fg_fraction': self.fg_fraction, 'fg_thresh': self.fg_thresh, 'bg_thresh_hi': self.bg_thresh_hi, 'bg_thresh_lo': self.bg_thresh_lo, 'bbox_reg_weights': self.bbox_reg_weights, 'class_nums': self.class_nums, 'use_random': False, 'is_cls_agnostic': self.is_cls_agnostic, 'is_cascade_rcnn': self.is_cascade_rcnn } self.outputs = { 'Rois': (self.rois, [self.lod]), 'LabelsInt32': (self.labels_int32, [self.lod]), 'BboxTargets': (self.bbox_targets, [self.lod]), 'BboxInsideWeights': (self.bbox_inside_weights, [self.lod]), 'BboxOutsideWeights': (self.bbox_outside_weights, [self.lod]), } def test_check_output(self): self.check_output() def setUp(self): self.op_type = 'generate_proposal_labels' self.set_data() def init_test_params(self): self.batch_size_per_im = 512 self.fg_fraction = 0.25 self.fg_thresh = 0.5 self.bg_thresh_hi = 0.5 self.bg_thresh_lo = 0.0 self.bbox_reg_weights = [0.1, 0.1, 0.2, 0.2] #self.class_nums = 81 self.is_cls_agnostic = False #True self.is_cascade_rcnn = True self.class_nums = 2 if self.is_cls_agnostic else 81 def init_test_input(self): np.random.seed(0) gt_nums = 6 # Keep same with batch_size_per_im for unittest proposal_nums = 2000 if not self.is_cascade_rcnn else 512 #self.batch_size_per_im - gt_nums images_shape = [[64, 64]] self.im_info = np.ones((len(images_shape), 3)).astype(np.float32) for i in range(len(images_shape)): self.im_info[i, 0] = images_shape[i][0] self.im_info[i, 1] = images_shape[i][1] self.im_info[i, 2] = 0.8 #scale self.rpn_rois, self.rpn_rois_lod = _generate_proposals(images_shape, proposal_nums) ground_truth, self.gts_lod = _generate_groundtruth( images_shape, self.class_nums, gt_nums) self.gt_classes = [gt['gt_classes'] for gt in ground_truth] self.gt_boxes = [gt['boxes'] for gt in ground_truth] self.is_crowd = [gt['is_crowd'] for gt in ground_truth] def init_test_output(self): self.rois, self.labels_int32, self.bbox_targets, \ self.bbox_inside_weights, self.bbox_outside_weights, \ self.lod = generate_proposal_labels_in_python( self.rpn_rois, self.gt_classes, self.is_crowd, self.gt_boxes, self.im_info, self.batch_size_per_im, self.fg_fraction, self.fg_thresh, self.bg_thresh_hi, self.bg_thresh_lo, self.bbox_reg_weights, self.class_nums, self.is_cls_agnostic, self.is_cascade_rcnn ) self.rois = np.vstack(self.rois) self.labels_int32 = np.hstack(self.labels_int32) self.labels_int32 = self.labels_int32[:, np.newaxis] self.bbox_targets = np.vstack(self.bbox_targets) self.bbox_inside_weights = np.vstack(self.bbox_inside_weights) self.bbox_outside_weights = np.vstack(self.bbox_outside_weights) def _generate_proposals(images_shape, proposal_nums): rpn_rois = [] rpn_rois_lod = [] num_proposals = 0 for i, image_shape in enumerate(images_shape): proposals = _generate_boxes(image_shape, proposal_nums) rpn_rois.append(proposals) num_proposals = len(proposals) rpn_rois_lod.append(num_proposals) return rpn_rois, [rpn_rois_lod] def _generate_groundtruth(images_shape, class_nums, gt_nums): ground_truth = [] gts_lod = [] num_gts = 0 for i, image_shape in enumerate(images_shape): # Avoid background gt_classes = np.random.randint( low=1, high=class_nums, size=gt_nums).astype(np.int32) gt_boxes = _generate_boxes(image_shape, gt_nums) is_crowd = np.zeros((gt_nums), dtype=np.int32) is_crowd[0] = 1 ground_truth.append( dict( gt_classes=gt_classes, boxes=gt_boxes, is_crowd=is_crowd)) num_gts += len(gt_classes) gts_lod.append(num_gts) return ground_truth, [gts_lod] def _generate_boxes(image_size, box_nums): width = image_size[0] height = image_size[1] xywh = np.random.rand(box_nums, 4) xy1 = xywh[:, [0, 1]] * image_size wh = xywh[:, [2, 3]] * (image_size - xy1) xy2 = xy1 + wh boxes = np.hstack([xy1, xy2]) boxes[:, [0, 2]] = np.minimum(width - 1., np.maximum(0., boxes[:, [0, 2]])) boxes[:, [1, 3]] = np.minimum(height - 1., np.maximum(0., boxes[:, [1, 3]])) return boxes.astype(np.float32) if __name__ == '__main__': unittest.main()
openzim/zimfarm
refs/heads/master
dispatcher/backend/src/tests/integration/routes/languages/test_language.py
1
import pytest class TestLanguagesList: def test_list_languages_no_param(self, client, schedules): """Test list languages""" url = "/languages/" response = client.get(url) assert response.status_code == 200 response_json = response.get_json() assert "items" in response_json assert len(response_json["items"]) == 3 for item in response_json["items"]: assert isinstance(item["code"], str) assert isinstance(item["name_en"], str) assert isinstance(item["name_native"], str) @pytest.mark.parametrize( "skip, limit, expected", [(0, 1, 1), (1, 10, 2), (0, 100, 3)] ) def test_list_languages_with_param(self, client, schedules, skip, limit, expected): """Test list languages with skip and limit""" url = "/languages/?skip={}&limit={}".format(skip, limit) response = client.get(url) assert response.status_code == 200 response_json = response.get_json() assert "items" in response_json assert len(response_json["items"]) == expected @pytest.mark.parametrize("skip, limit", [("", 10), (5, "abc")]) def test_list_languages_with_bad_param(self, client, schedules, skip, limit): """Test list languages with skip and limit""" url = "/languages/?skip={}&limit={}".format(skip, limit) response = client.get(url) assert response.status_code == 400
kumarrus/voltdb
refs/heads/master
lib/python/voltcli/voltdb.d/compile.py
7
# This file is part of VoltDB. # Copyright (C) 2008-2015 VoltDB Inc. # # This file contains original code and/or modifications of original code. # Any modifications made by VoltDB Inc. are licensed under the following # terms and conditions: # # 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 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 os from voltcli import utility # Main Java class. VoltCompiler = 'org.voltdb.compiler.VoltCompiler' # Command meta-data. @VOLT.Command( # Descriptions for help screen. description = 'Compile schema and stored procedures to build an application catalog.', description2 = 'At least one DDL file is required unless a project file is provided.', # Command line options. options = ( VOLT.StringOption('-c', '--classpath', 'classpath', 'additional colon-separated Java CLASSPATH directories'), VOLT.StringOption('-o', '--output', 'catalog', 'the output application catalog jar file', default = 'catalog.jar'), VOLT.StringOption('-p', '--project', 'project', 'the project file, e.g. project.xml (deprecated)') ), # Command line arguments. arguments = ( VOLT.PathArgument('ddl', 'DDL file(s)', exists = True, min_count = 0, max_count = None) ) ) # Command implementation. def compile(runner): # Check that there's something to compile. if not runner.opts.project and not runner.opts.ddl: runner.abort_with_help('Either project or DDL files must be specified.') # Explicit extensions allow VoltCompiler.main() to discriminate between the # new and old style argument lists, i.e. with and without a project file. # Checking here enables better error messages. if not runner.opts.catalog.lower().endswith('.jar'): runner.abort('Output catalog file "%s" does not have a ".jar" extension.' % runner.opts.catalog) if runner.opts.project and not runner.opts.project.lower().endswith('.xml'): runner.abort('Project file "%s" does not have a ".xml" extension.' % runner.opts.project) # Verbose argument display. if runner.is_verbose(): params = ['Output catalog file: %s' % runner.opts.catalog] if runner.opts.project: params.append('Project file: %s' % runner.opts.project) if runner.opts.ddl: params.append('DDL files:') params.append(runner.opts.ddl) runner.verbose_info('Compilation parameters:', params) # Build the positional and keyword argument lists and invoke the compiler args = [] if runner.opts.project: args.append(runner.opts.project) args.append(runner.opts.catalog) if runner.opts.ddl: args.extend(runner.opts.ddl) # Add procedures to classpath cpath = 'procedures' if runner.opts.classpath: cpath = 'procedures:' + runner.opts.classpath kwargs = dict(classpath = cpath) runner.java_execute(VoltCompiler, None, *args, **kwargs)
lenw/ansible-modules-core
refs/heads/devel
cloud/rackspace/rax_cdb_database.py
157
#!/usr/bin/python -tt # This file is part of Ansible # # Ansible 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. # # Ansible 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 Ansible. If not, see <http://www.gnu.org/licenses/>. # This is a DOCUMENTATION stub specific to this module, it extends # a documentation fragment located in ansible.utils.module_docs_fragments DOCUMENTATION = ''' module: rax_cdb_database short_description: 'create / delete a database in the Cloud Databases' description: - create / delete a database in the Cloud Databases. version_added: "1.8" options: cdb_id: description: - The databases server UUID default: null name: description: - Name to give to the database default: null character_set: description: - Set of symbols and encodings default: 'utf8' collate: description: - Set of rules for comparing characters in a character set default: 'utf8_general_ci' state: description: - Indicate desired state of the resource choices: ['present', 'absent'] default: present author: "Simon JAILLET (@jails)" extends_documentation_fragment: rackspace ''' EXAMPLES = ''' - name: Build a database in Cloud Databases tasks: - name: Database build request local_action: module: rax_cdb_database credentials: ~/.raxpub region: IAD cdb_id: 323e7ce0-9cb0-11e3-a5e2-0800200c9a66 name: db1 state: present register: rax_db_database ''' try: import pyrax HAS_PYRAX = True except ImportError: HAS_PYRAX = False def find_database(instance, name): try: database = instance.get_database(name) except Exception: return False return database def save_database(module, cdb_id, name, character_set, collate): cdb = pyrax.cloud_databases try: instance = cdb.get(cdb_id) except Exception, e: module.fail_json(msg='%s' % e.message) changed = False database = find_database(instance, name) if not database: try: database = instance.create_database(name=name, character_set=character_set, collate=collate) except Exception, e: module.fail_json(msg='%s' % e.message) else: changed = True module.exit_json(changed=changed, action='create', database=rax_to_dict(database)) def delete_database(module, cdb_id, name): cdb = pyrax.cloud_databases try: instance = cdb.get(cdb_id) except Exception, e: module.fail_json(msg='%s' % e.message) changed = False database = find_database(instance, name) if database: try: database.delete() except Exception, e: module.fail_json(msg='%s' % e.message) else: changed = True module.exit_json(changed=changed, action='delete', database=rax_to_dict(database)) def rax_cdb_database(module, state, cdb_id, name, character_set, collate): # act on the state if state == 'present': save_database(module, cdb_id, name, character_set, collate) elif state == 'absent': delete_database(module, cdb_id, name) def main(): argument_spec = rax_argument_spec() argument_spec.update( dict( cdb_id=dict(type='str', required=True), name=dict(type='str', required=True), character_set=dict(type='str', default='utf8'), collate=dict(type='str', default='utf8_general_ci'), state=dict(default='present', choices=['present', 'absent']) ) ) module = AnsibleModule( argument_spec=argument_spec, required_together=rax_required_together(), ) if not HAS_PYRAX: module.fail_json(msg='pyrax is required for this module') cdb_id = module.params.get('cdb_id') name = module.params.get('name') character_set = module.params.get('character_set') collate = module.params.get('collate') state = module.params.get('state') setup_rax_module(module, pyrax) rax_cdb_database(module, state, cdb_id, name, character_set, collate) # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.rax import * # invoke the module main()
ojengwa/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/templates/filters.py
52
# coding: utf-8 """ Tests for template filters (as opposed to template tags). The tests are hidden inside a function so that things like timestamps and timezones are only evaluated at the moment of execution and will therefore be consistent. """ from __future__ import unicode_literals from datetime import date, datetime, time, timedelta from django.test.utils import str_prefix from django.utils.tzinfo import LocalTimezone, FixedOffset from django.utils.safestring import mark_safe from django.utils.encoding import python_2_unicode_compatible # These two classes are used to test auto-escaping of __unicode__ output. @python_2_unicode_compatible class UnsafeClass: def __str__(self): return 'you & me' @python_2_unicode_compatible class SafeClass: def __str__(self): return mark_safe('you &gt; me') # RESULT SYNTAX -- # 'template_name': ('template contents', 'context dict', # 'expected string output' or Exception class) def get_filter_tests(): now = datetime.now() now_tz = datetime.now(LocalTimezone(now)) now_tz_i = datetime.now(FixedOffset((3 * 60) + 15)) # imaginary time zone today = date.today() return { # Default compare with datetime.now() 'filter-timesince01' : ('{{ a|timesince }}', {'a': datetime.now() + timedelta(minutes=-1, seconds = -10)}, '1 minute'), 'filter-timesince02' : ('{{ a|timesince }}', {'a': datetime.now() - timedelta(days=1, minutes = 1)}, '1 day'), 'filter-timesince03' : ('{{ a|timesince }}', {'a': datetime.now() - timedelta(hours=1, minutes=25, seconds = 10)}, '1 hour, 25 minutes'), # Compare to a given parameter 'filter-timesince04' : ('{{ a|timesince:b }}', {'a':now - timedelta(days=2), 'b':now - timedelta(days=1)}, '1 day'), 'filter-timesince05' : ('{{ a|timesince:b }}', {'a':now - timedelta(days=2, minutes=1), 'b':now - timedelta(days=2)}, '1 minute'), # Check that timezone is respected 'filter-timesince06' : ('{{ a|timesince:b }}', {'a':now_tz - timedelta(hours=8), 'b':now_tz}, '8 hours'), # Regression for #7443 'filter-timesince07': ('{{ earlier|timesince }}', { 'earlier': now - timedelta(days=7) }, '1 week'), 'filter-timesince08': ('{{ earlier|timesince:now }}', { 'now': now, 'earlier': now - timedelta(days=7) }, '1 week'), 'filter-timesince09': ('{{ later|timesince }}', { 'later': now + timedelta(days=7) }, '0 minutes'), 'filter-timesince10': ('{{ later|timesince:now }}', { 'now': now, 'later': now + timedelta(days=7) }, '0 minutes'), # Ensures that differing timezones are calculated correctly 'filter-timesince11' : ('{{ a|timesince }}', {'a': now}, '0 minutes'), 'filter-timesince12' : ('{{ a|timesince }}', {'a': now_tz}, '0 minutes'), 'filter-timesince13' : ('{{ a|timesince }}', {'a': now_tz_i}, '0 minutes'), 'filter-timesince14' : ('{{ a|timesince:b }}', {'a': now_tz, 'b': now_tz_i}, '0 minutes'), 'filter-timesince15' : ('{{ a|timesince:b }}', {'a': now, 'b': now_tz_i}, ''), 'filter-timesince16' : ('{{ a|timesince:b }}', {'a': now_tz_i, 'b': now}, ''), # Regression for #9065 (two date objects). 'filter-timesince17' : ('{{ a|timesince:b }}', {'a': today, 'b': today}, '0 minutes'), 'filter-timesince18' : ('{{ a|timesince:b }}', {'a': today, 'b': today + timedelta(hours=24)}, '1 day'), # Default compare with datetime.now() 'filter-timeuntil01' : ('{{ a|timeuntil }}', {'a':datetime.now() + timedelta(minutes=2, seconds = 10)}, '2 minutes'), 'filter-timeuntil02' : ('{{ a|timeuntil }}', {'a':(datetime.now() + timedelta(days=1, seconds = 10))}, '1 day'), 'filter-timeuntil03' : ('{{ a|timeuntil }}', {'a':(datetime.now() + timedelta(hours=8, minutes=10, seconds = 10))}, '8 hours, 10 minutes'), # Compare to a given parameter 'filter-timeuntil04' : ('{{ a|timeuntil:b }}', {'a':now - timedelta(days=1), 'b':now - timedelta(days=2)}, '1 day'), 'filter-timeuntil05' : ('{{ a|timeuntil:b }}', {'a':now - timedelta(days=2), 'b':now - timedelta(days=2, minutes=1)}, '1 minute'), # Regression for #7443 'filter-timeuntil06': ('{{ earlier|timeuntil }}', { 'earlier': now - timedelta(days=7) }, '0 minutes'), 'filter-timeuntil07': ('{{ earlier|timeuntil:now }}', { 'now': now, 'earlier': now - timedelta(days=7) }, '0 minutes'), 'filter-timeuntil08': ('{{ later|timeuntil }}', { 'later': now + timedelta(days=7, hours=1) }, '1 week'), 'filter-timeuntil09': ('{{ later|timeuntil:now }}', { 'now': now, 'later': now + timedelta(days=7) }, '1 week'), # Ensures that differing timezones are calculated correctly 'filter-timeuntil10' : ('{{ a|timeuntil }}', {'a': now_tz_i}, '0 minutes'), 'filter-timeuntil11' : ('{{ a|timeuntil:b }}', {'a': now_tz_i, 'b': now_tz}, '0 minutes'), # Regression for #9065 (two date objects). 'filter-timeuntil12' : ('{{ a|timeuntil:b }}', {'a': today, 'b': today}, '0 minutes'), 'filter-timeuntil13' : ('{{ a|timeuntil:b }}', {'a': today, 'b': today - timedelta(hours=24)}, '1 day'), 'filter-addslash01': ("{% autoescape off %}{{ a|addslashes }} {{ b|addslashes }}{% endautoescape %}", {"a": "<a>'", "b": mark_safe("<a>'")}, r"<a>\' <a>\'"), 'filter-addslash02': ("{{ a|addslashes }} {{ b|addslashes }}", {"a": "<a>'", "b": mark_safe("<a>'")}, r"&lt;a&gt;\&#39; <a>\'"), 'filter-capfirst01': ("{% autoescape off %}{{ a|capfirst }} {{ b|capfirst }}{% endautoescape %}", {"a": "fred>", "b": mark_safe("fred&gt;")}, "Fred> Fred&gt;"), 'filter-capfirst02': ("{{ a|capfirst }} {{ b|capfirst }}", {"a": "fred>", "b": mark_safe("fred&gt;")}, "Fred&gt; Fred&gt;"), # Note that applying fix_ampsersands in autoescape mode leads to # double escaping. 'filter-fix_ampersands01': ("{% autoescape off %}{{ a|fix_ampersands }} {{ b|fix_ampersands }}{% endautoescape %}", {"a": "a&b", "b": mark_safe("a&b")}, "a&amp;b a&amp;b"), 'filter-fix_ampersands02': ("{{ a|fix_ampersands }} {{ b|fix_ampersands }}", {"a": "a&b", "b": mark_safe("a&b")}, "a&amp;amp;b a&amp;b"), 'filter-floatformat01': ("{% autoescape off %}{{ a|floatformat }} {{ b|floatformat }}{% endautoescape %}", {"a": "1.42", "b": mark_safe("1.42")}, "1.4 1.4"), 'filter-floatformat02': ("{{ a|floatformat }} {{ b|floatformat }}", {"a": "1.42", "b": mark_safe("1.42")}, "1.4 1.4"), # The contents of "linenumbers" is escaped according to the current # autoescape setting. 'filter-linenumbers01': ("{{ a|linenumbers }} {{ b|linenumbers }}", {"a": "one\n<two>\nthree", "b": mark_safe("one\n&lt;two&gt;\nthree")}, "1. one\n2. &lt;two&gt;\n3. three 1. one\n2. &lt;two&gt;\n3. three"), 'filter-linenumbers02': ("{% autoescape off %}{{ a|linenumbers }} {{ b|linenumbers }}{% endautoescape %}", {"a": "one\n<two>\nthree", "b": mark_safe("one\n&lt;two&gt;\nthree")}, "1. one\n2. <two>\n3. three 1. one\n2. &lt;two&gt;\n3. three"), 'filter-lower01': ("{% autoescape off %}{{ a|lower }} {{ b|lower }}{% endautoescape %}", {"a": "Apple & banana", "b": mark_safe("Apple &amp; banana")}, "apple & banana apple &amp; banana"), 'filter-lower02': ("{{ a|lower }} {{ b|lower }}", {"a": "Apple & banana", "b": mark_safe("Apple &amp; banana")}, "apple &amp; banana apple &amp; banana"), # The make_list filter can destroy existing escaping, so the results are # escaped. 'filter-make_list01': ("{% autoescape off %}{{ a|make_list }}{% endautoescape %}", {"a": mark_safe("&")}, str_prefix("[%(_)s'&']")), 'filter-make_list02': ("{{ a|make_list }}", {"a": mark_safe("&")}, str_prefix("[%(_)s&#39;&amp;&#39;]")), 'filter-make_list03': ('{% autoescape off %}{{ a|make_list|stringformat:"s"|safe }}{% endautoescape %}', {"a": mark_safe("&")}, str_prefix("[%(_)s'&']")), 'filter-make_list04': ('{{ a|make_list|stringformat:"s"|safe }}', {"a": mark_safe("&")}, str_prefix("[%(_)s'&']")), # Running slugify on a pre-escaped string leads to odd behavior, # but the result is still safe. 'filter-slugify01': ("{% autoescape off %}{{ a|slugify }} {{ b|slugify }}{% endautoescape %}", {"a": "a & b", "b": mark_safe("a &amp; b")}, "a-b a-amp-b"), 'filter-slugify02': ("{{ a|slugify }} {{ b|slugify }}", {"a": "a & b", "b": mark_safe("a &amp; b")}, "a-b a-amp-b"), # Notice that escaping is applied *after* any filters, so the string # formatting here only needs to deal with pre-escaped characters. 'filter-stringformat01': ('{% autoescape off %}.{{ a|stringformat:"5s" }}. .{{ b|stringformat:"5s" }}.{% endautoescape %}', {"a": "a<b", "b": mark_safe("a<b")}, ". a<b. . a<b."), 'filter-stringformat02': ('.{{ a|stringformat:"5s" }}. .{{ b|stringformat:"5s" }}.', {"a": "a<b", "b": mark_safe("a<b")}, ". a&lt;b. . a<b."), # Test the title filter 'filter-title1' : ('{{ a|title }}', {'a' : 'JOE\'S CRAB SHACK'}, 'Joe&#39;s Crab Shack'), 'filter-title2' : ('{{ a|title }}', {'a' : '555 WEST 53RD STREET'}, '555 West 53rd Street'), 'filter-truncatewords01': ('{% autoescape off %}{{ a|truncatewords:"2" }} {{ b|truncatewords:"2"}}{% endautoescape %}', {"a": "alpha & bravo", "b": mark_safe("alpha &amp; bravo")}, "alpha & ... alpha &amp; ..."), 'filter-truncatewords02': ('{{ a|truncatewords:"2" }} {{ b|truncatewords:"2"}}', {"a": "alpha & bravo", "b": mark_safe("alpha &amp; bravo")}, "alpha &amp; ... alpha &amp; ..."), 'filter-truncatechars01': ('{{ a|truncatechars:5 }}', {'a': "Testing, testing"}, "Te..."), 'filter-truncatechars02': ('{{ a|truncatechars:7 }}', {'a': "Testing"}, "Testing"), # The "upper" filter messes up entities (which are case-sensitive), # so it's not safe for non-escaping purposes. 'filter-upper01': ('{% autoescape off %}{{ a|upper }} {{ b|upper }}{% endautoescape %}', {"a": "a & b", "b": mark_safe("a &amp; b")}, "A & B A &AMP; B"), 'filter-upper02': ('{{ a|upper }} {{ b|upper }}', {"a": "a & b", "b": mark_safe("a &amp; b")}, "A &amp; B A &amp;AMP; B"), 'filter-urlize01': ('{% autoescape off %}{{ a|urlize }} {{ b|urlize }}{% endautoescape %}', {"a": "http://example.com/?x=&y=", "b": mark_safe("http://example.com?x=&amp;y=")}, '<a href="http://example.com/?x=&y=" rel="nofollow">http://example.com/?x=&y=</a> <a href="http://example.com?x=&amp;y=" rel="nofollow">http://example.com?x=&amp;y=</a>'), 'filter-urlize02': ('{{ a|urlize }} {{ b|urlize }}', {"a": "http://example.com/?x=&y=", "b": mark_safe("http://example.com?x=&amp;y=")}, '<a href="http://example.com/?x=&amp;y=" rel="nofollow">http://example.com/?x=&amp;y=</a> <a href="http://example.com?x=&amp;y=" rel="nofollow">http://example.com?x=&amp;y=</a>'), 'filter-urlize03': ('{% autoescape off %}{{ a|urlize }}{% endautoescape %}', {"a": mark_safe("a &amp; b")}, 'a &amp; b'), 'filter-urlize04': ('{{ a|urlize }}', {"a": mark_safe("a &amp; b")}, 'a &amp; b'), # This will lead to a nonsense result, but at least it won't be # exploitable for XSS purposes when auto-escaping is on. 'filter-urlize05': ('{% autoescape off %}{{ a|urlize }}{% endautoescape %}', {"a": "<script>alert('foo')</script>"}, "<script>alert('foo')</script>"), 'filter-urlize06': ('{{ a|urlize }}', {"a": "<script>alert('foo')</script>"}, '&lt;script&gt;alert(&#39;foo&#39;)&lt;/script&gt;'), # mailto: testing for urlize 'filter-urlize07': ('{{ a|urlize }}', {"a": "Email me at me@example.com"}, 'Email me at <a href="mailto:me@example.com">me@example.com</a>'), 'filter-urlize08': ('{{ a|urlize }}', {"a": "Email me at <me@example.com>"}, 'Email me at &lt;<a href="mailto:me@example.com">me@example.com</a>&gt;'), 'filter-urlizetrunc01': ('{% autoescape off %}{{ a|urlizetrunc:"8" }} {{ b|urlizetrunc:"8" }}{% endautoescape %}', {"a": '"Unsafe" http://example.com/x=&y=', "b": mark_safe('&quot;Safe&quot; http://example.com?x=&amp;y=')}, '"Unsafe" <a href="http://example.com/x=&y=" rel="nofollow">http:...</a> &quot;Safe&quot; <a href="http://example.com?x=&amp;y=" rel="nofollow">http:...</a>'), 'filter-urlizetrunc02': ('{{ a|urlizetrunc:"8" }} {{ b|urlizetrunc:"8" }}', {"a": '"Unsafe" http://example.com/x=&y=', "b": mark_safe('&quot;Safe&quot; http://example.com?x=&amp;y=')}, '&quot;Unsafe&quot; <a href="http://example.com/x=&amp;y=" rel="nofollow">http:...</a> &quot;Safe&quot; <a href="http://example.com?x=&amp;y=" rel="nofollow">http:...</a>'), 'filter-wordcount01': ('{% autoescape off %}{{ a|wordcount }} {{ b|wordcount }}{% endautoescape %}', {"a": "a & b", "b": mark_safe("a &amp; b")}, "3 3"), 'filter-wordcount02': ('{{ a|wordcount }} {{ b|wordcount }}', {"a": "a & b", "b": mark_safe("a &amp; b")}, "3 3"), 'filter-wordwrap01': ('{% autoescape off %}{{ a|wordwrap:"3" }} {{ b|wordwrap:"3" }}{% endautoescape %}', {"a": "a & b", "b": mark_safe("a & b")}, "a &\nb a &\nb"), 'filter-wordwrap02': ('{{ a|wordwrap:"3" }} {{ b|wordwrap:"3" }}', {"a": "a & b", "b": mark_safe("a & b")}, "a &amp;\nb a &\nb"), 'filter-ljust01': ('{% autoescape off %}.{{ a|ljust:"5" }}. .{{ b|ljust:"5" }}.{% endautoescape %}', {"a": "a&b", "b": mark_safe("a&b")}, ".a&b . .a&b ."), 'filter-ljust02': ('.{{ a|ljust:"5" }}. .{{ b|ljust:"5" }}.', {"a": "a&b", "b": mark_safe("a&b")}, ".a&amp;b . .a&b ."), 'filter-rjust01': ('{% autoescape off %}.{{ a|rjust:"5" }}. .{{ b|rjust:"5" }}.{% endautoescape %}', {"a": "a&b", "b": mark_safe("a&b")}, ". a&b. . a&b."), 'filter-rjust02': ('.{{ a|rjust:"5" }}. .{{ b|rjust:"5" }}.', {"a": "a&b", "b": mark_safe("a&b")}, ". a&amp;b. . a&b."), 'filter-center01': ('{% autoescape off %}.{{ a|center:"5" }}. .{{ b|center:"5" }}.{% endautoescape %}', {"a": "a&b", "b": mark_safe("a&b")}, ". a&b . . a&b ."), 'filter-center02': ('.{{ a|center:"5" }}. .{{ b|center:"5" }}.', {"a": "a&b", "b": mark_safe("a&b")}, ". a&amp;b . . a&b ."), 'filter-cut01': ('{% autoescape off %}{{ a|cut:"x" }} {{ b|cut:"x" }}{% endautoescape %}', {"a": "x&y", "b": mark_safe("x&amp;y")}, "&y &amp;y"), 'filter-cut02': ('{{ a|cut:"x" }} {{ b|cut:"x" }}', {"a": "x&y", "b": mark_safe("x&amp;y")}, "&amp;y &amp;y"), 'filter-cut03': ('{% autoescape off %}{{ a|cut:"&" }} {{ b|cut:"&" }}{% endautoescape %}', {"a": "x&y", "b": mark_safe("x&amp;y")}, "xy xamp;y"), 'filter-cut04': ('{{ a|cut:"&" }} {{ b|cut:"&" }}', {"a": "x&y", "b": mark_safe("x&amp;y")}, "xy xamp;y"), # Passing ';' to cut can break existing HTML entities, so those strings # are auto-escaped. 'filter-cut05': ('{% autoescape off %}{{ a|cut:";" }} {{ b|cut:";" }}{% endautoescape %}', {"a": "x&y", "b": mark_safe("x&amp;y")}, "x&y x&ampy"), 'filter-cut06': ('{{ a|cut:";" }} {{ b|cut:";" }}', {"a": "x&y", "b": mark_safe("x&amp;y")}, "x&amp;y x&amp;ampy"), # The "escape" filter works the same whether autoescape is on or off, # but it has no effect on strings already marked as safe. 'filter-escape01': ('{{ a|escape }} {{ b|escape }}', {"a": "x&y", "b": mark_safe("x&y")}, "x&amp;y x&y"), 'filter-escape02': ('{% autoescape off %}{{ a|escape }} {{ b|escape }}{% endautoescape %}', {"a": "x&y", "b": mark_safe("x&y")}, "x&amp;y x&y"), # It is only applied once, regardless of the number of times it # appears in a chain. 'filter-escape03': ('{% autoescape off %}{{ a|escape|escape }}{% endautoescape %}', {"a": "x&y"}, "x&amp;y"), 'filter-escape04': ('{{ a|escape|escape }}', {"a": "x&y"}, "x&amp;y"), # Force_escape is applied immediately. It can be used to provide # double-escaping, for example. 'filter-force-escape01': ('{% autoescape off %}{{ a|force_escape }}{% endautoescape %}', {"a": "x&y"}, "x&amp;y"), 'filter-force-escape02': ('{{ a|force_escape }}', {"a": "x&y"}, "x&amp;y"), 'filter-force-escape03': ('{% autoescape off %}{{ a|force_escape|force_escape }}{% endautoescape %}', {"a": "x&y"}, "x&amp;amp;y"), 'filter-force-escape04': ('{{ a|force_escape|force_escape }}', {"a": "x&y"}, "x&amp;amp;y"), # Because the result of force_escape is "safe", an additional # escape filter has no effect. 'filter-force-escape05': ('{% autoescape off %}{{ a|force_escape|escape }}{% endautoescape %}', {"a": "x&y"}, "x&amp;y"), 'filter-force-escape06': ('{{ a|force_escape|escape }}', {"a": "x&y"}, "x&amp;y"), 'filter-force-escape07': ('{% autoescape off %}{{ a|escape|force_escape }}{% endautoescape %}', {"a": "x&y"}, "x&amp;y"), 'filter-force-escape08': ('{{ a|escape|force_escape }}', {"a": "x&y"}, "x&amp;y"), # The contents in "linebreaks" and "linebreaksbr" are escaped # according to the current autoescape setting. 'filter-linebreaks01': ('{{ a|linebreaks }} {{ b|linebreaks }}', {"a": "x&\ny", "b": mark_safe("x&\ny")}, "<p>x&amp;<br />y</p> <p>x&<br />y</p>"), 'filter-linebreaks02': ('{% autoescape off %}{{ a|linebreaks }} {{ b|linebreaks }}{% endautoescape %}', {"a": "x&\ny", "b": mark_safe("x&\ny")}, "<p>x&<br />y</p> <p>x&<br />y</p>"), 'filter-linebreaksbr01': ('{{ a|linebreaksbr }} {{ b|linebreaksbr }}', {"a": "x&\ny", "b": mark_safe("x&\ny")}, "x&amp;<br />y x&<br />y"), 'filter-linebreaksbr02': ('{% autoescape off %}{{ a|linebreaksbr }} {{ b|linebreaksbr }}{% endautoescape %}', {"a": "x&\ny", "b": mark_safe("x&\ny")}, "x&<br />y x&<br />y"), 'filter-safe01': ("{{ a }} -- {{ a|safe }}", {"a": "<b>hello</b>"}, "&lt;b&gt;hello&lt;/b&gt; -- <b>hello</b>"), 'filter-safe02': ("{% autoescape off %}{{ a }} -- {{ a|safe }}{% endautoescape %}", {"a": "<b>hello</b>"}, "<b>hello</b> -- <b>hello</b>"), 'filter-safeseq01': ('{{ a|join:", " }} -- {{ a|safeseq|join:", " }}', {"a": ["&", "<"]}, "&amp;, &lt; -- &, <"), 'filter-safeseq02': ('{% autoescape off %}{{ a|join:", " }} -- {{ a|safeseq|join:", " }}{% endautoescape %}', {"a": ["&", "<"]}, "&, < -- &, <"), 'filter-removetags01': ('{{ a|removetags:"a b" }} {{ b|removetags:"a b" }}', {"a": "<a>x</a> <p><b>y</b></p>", "b": mark_safe("<a>x</a> <p><b>y</b></p>")}, "x &lt;p&gt;y&lt;/p&gt; x <p>y</p>"), 'filter-removetags02': ('{% autoescape off %}{{ a|removetags:"a b" }} {{ b|removetags:"a b" }}{% endautoescape %}', {"a": "<a>x</a> <p><b>y</b></p>", "b": mark_safe("<a>x</a> <p><b>y</b></p>")}, "x <p>y</p> x <p>y</p>"), 'filter-striptags01': ('{{ a|striptags }} {{ b|striptags }}', {"a": "<a>x</a> <p><b>y</b></p>", "b": mark_safe("<a>x</a> <p><b>y</b></p>")}, "x y x y"), 'filter-striptags02': ('{% autoescape off %}{{ a|striptags }} {{ b|striptags }}{% endautoescape %}', {"a": "<a>x</a> <p><b>y</b></p>", "b": mark_safe("<a>x</a> <p><b>y</b></p>")}, "x y x y"), 'filter-first01': ('{{ a|first }} {{ b|first }}', {"a": ["a&b", "x"], "b": [mark_safe("a&b"), "x"]}, "a&amp;b a&b"), 'filter-first02': ('{% autoescape off %}{{ a|first }} {{ b|first }}{% endautoescape %}', {"a": ["a&b", "x"], "b": [mark_safe("a&b"), "x"]}, "a&b a&b"), 'filter-last01': ('{{ a|last }} {{ b|last }}', {"a": ["x", "a&b"], "b": ["x", mark_safe("a&b")]}, "a&amp;b a&b"), 'filter-last02': ('{% autoescape off %}{{ a|last }} {{ b|last }}{% endautoescape %}', {"a": ["x", "a&b"], "b": ["x", mark_safe("a&b")]}, "a&b a&b"), 'filter-random01': ('{{ a|random }} {{ b|random }}', {"a": ["a&b", "a&b"], "b": [mark_safe("a&b"), mark_safe("a&b")]}, "a&amp;b a&b"), 'filter-random02': ('{% autoescape off %}{{ a|random }} {{ b|random }}{% endautoescape %}', {"a": ["a&b", "a&b"], "b": [mark_safe("a&b"), mark_safe("a&b")]}, "a&b a&b"), 'filter-slice01': ('{{ a|slice:"1:3" }} {{ b|slice:"1:3" }}', {"a": "a&b", "b": mark_safe("a&b")}, "&amp;b &b"), 'filter-slice02': ('{% autoescape off %}{{ a|slice:"1:3" }} {{ b|slice:"1:3" }}{% endautoescape %}', {"a": "a&b", "b": mark_safe("a&b")}, "&b &b"), 'filter-unordered_list01': ('{{ a|unordered_list }}', {"a": ["x>", [["<y", []]]]}, "\t<li>x&gt;\n\t<ul>\n\t\t<li>&lt;y</li>\n\t</ul>\n\t</li>"), 'filter-unordered_list02': ('{% autoescape off %}{{ a|unordered_list }}{% endautoescape %}', {"a": ["x>", [["<y", []]]]}, "\t<li>x>\n\t<ul>\n\t\t<li><y</li>\n\t</ul>\n\t</li>"), 'filter-unordered_list03': ('{{ a|unordered_list }}', {"a": ["x>", [[mark_safe("<y"), []]]]}, "\t<li>x&gt;\n\t<ul>\n\t\t<li><y</li>\n\t</ul>\n\t</li>"), 'filter-unordered_list04': ('{% autoescape off %}{{ a|unordered_list }}{% endautoescape %}', {"a": ["x>", [[mark_safe("<y"), []]]]}, "\t<li>x>\n\t<ul>\n\t\t<li><y</li>\n\t</ul>\n\t</li>"), 'filter-unordered_list05': ('{% autoescape off %}{{ a|unordered_list }}{% endautoescape %}', {"a": ["x>", [["<y", []]]]}, "\t<li>x>\n\t<ul>\n\t\t<li><y</li>\n\t</ul>\n\t</li>"), # Literal string arguments to the default filter are always treated as # safe strings, regardless of the auto-escaping state. # # Note: we have to use {"a": ""} here, otherwise the invalid template # variable string interferes with the test result. 'filter-default01': ('{{ a|default:"x<" }}', {"a": ""}, "x<"), 'filter-default02': ('{% autoescape off %}{{ a|default:"x<" }}{% endautoescape %}', {"a": ""}, "x<"), 'filter-default03': ('{{ a|default:"x<" }}', {"a": mark_safe("x>")}, "x>"), 'filter-default04': ('{% autoescape off %}{{ a|default:"x<" }}{% endautoescape %}', {"a": mark_safe("x>")}, "x>"), 'filter-default_if_none01': ('{{ a|default:"x<" }}', {"a": None}, "x<"), 'filter-default_if_none02': ('{% autoescape off %}{{ a|default:"x<" }}{% endautoescape %}', {"a": None}, "x<"), 'filter-phone2numeric01': ('{{ a|phone2numeric }} {{ b|phone2numeric }}', {"a": "<1-800-call-me>", "b": mark_safe("<1-800-call-me>") }, "&lt;1-800-2255-63&gt; <1-800-2255-63>"), 'filter-phone2numeric02': ('{% autoescape off %}{{ a|phone2numeric }} {{ b|phone2numeric }}{% endautoescape %}', {"a": "<1-800-call-me>", "b": mark_safe("<1-800-call-me>") }, "<1-800-2255-63> <1-800-2255-63>"), 'filter-phone2numeric03': ('{{ a|phone2numeric }}', {"a": "How razorback-jumping frogs can level six piqued gymnasts!"}, "469 729672225-5867464 37647 226 53835 749 747833 49662787!"), # Ensure iriencode keeps safe strings: 'filter-iriencode01': ('{{ url|iriencode }}', {'url': '?test=1&me=2'}, '?test=1&amp;me=2'), 'filter-iriencode02': ('{% autoescape off %}{{ url|iriencode }}{% endautoescape %}', {'url': '?test=1&me=2'}, '?test=1&me=2'), 'filter-iriencode03': ('{{ url|iriencode }}', {'url': mark_safe('?test=1&me=2')}, '?test=1&me=2'), 'filter-iriencode04': ('{% autoescape off %}{{ url|iriencode }}{% endautoescape %}', {'url': mark_safe('?test=1&me=2')}, '?test=1&me=2'), # urlencode 'filter-urlencode01': ('{{ url|urlencode }}', {'url': '/test&"/me?/'}, '/test%26%22/me%3F/'), 'filter-urlencode02': ('/test/{{ urlbit|urlencode:"" }}/', {'urlbit': 'escape/slash'}, '/test/escape%2Fslash/'), # Chaining a bunch of safeness-preserving filters should not alter # the safe status either way. 'chaining01': ('{{ a|capfirst|center:"7" }}.{{ b|capfirst|center:"7" }}', {"a": "a < b", "b": mark_safe("a < b")}, " A &lt; b . A < b "), 'chaining02': ('{% autoescape off %}{{ a|capfirst|center:"7" }}.{{ b|capfirst|center:"7" }}{% endautoescape %}', {"a": "a < b", "b": mark_safe("a < b")}, " A < b . A < b "), # Using a filter that forces a string back to unsafe: 'chaining03': ('{{ a|cut:"b"|capfirst }}.{{ b|cut:"b"|capfirst }}', {"a": "a < b", "b": mark_safe("a < b")}, "A &lt; .A < "), 'chaining04': ('{% autoescape off %}{{ a|cut:"b"|capfirst }}.{{ b|cut:"b"|capfirst }}{% endautoescape %}', {"a": "a < b", "b": mark_safe("a < b")}, "A < .A < "), # Using a filter that forces safeness does not lead to double-escaping 'chaining05': ('{{ a|escape|capfirst }}', {"a": "a < b"}, "A &lt; b"), 'chaining06': ('{% autoescape off %}{{ a|escape|capfirst }}{% endautoescape %}', {"a": "a < b"}, "A &lt; b"), # Force to safe, then back (also showing why using force_escape too # early in a chain can lead to unexpected results). 'chaining07': ('{{ a|force_escape|cut:";" }}', {"a": "a < b"}, "a &amp;lt b"), 'chaining08': ('{% autoescape off %}{{ a|force_escape|cut:";" }}{% endautoescape %}', {"a": "a < b"}, "a &lt b"), 'chaining09': ('{{ a|cut:";"|force_escape }}', {"a": "a < b"}, "a &lt; b"), 'chaining10': ('{% autoescape off %}{{ a|cut:";"|force_escape }}{% endautoescape %}', {"a": "a < b"}, "a &lt; b"), 'chaining11': ('{{ a|cut:"b"|safe }}', {"a": "a < b"}, "a < "), 'chaining12': ('{% autoescape off %}{{ a|cut:"b"|safe }}{% endautoescape %}', {"a": "a < b"}, "a < "), 'chaining13': ('{{ a|safe|force_escape }}', {"a": "a < b"}, "a &lt; b"), 'chaining14': ('{% autoescape off %}{{ a|safe|force_escape }}{% endautoescape %}', {"a": "a < b"}, "a &lt; b"), # Filters decorated with stringfilter still respect is_safe. 'autoescape-stringfilter01': (r'{{ unsafe|capfirst }}', {'unsafe': UnsafeClass()}, 'You &amp; me'), 'autoescape-stringfilter02': (r'{% autoescape off %}{{ unsafe|capfirst }}{% endautoescape %}', {'unsafe': UnsafeClass()}, 'You & me'), 'autoescape-stringfilter03': (r'{{ safe|capfirst }}', {'safe': SafeClass()}, 'You &gt; me'), 'autoescape-stringfilter04': (r'{% autoescape off %}{{ safe|capfirst }}{% endautoescape %}', {'safe': SafeClass()}, 'You &gt; me'), 'escapejs01': (r'{{ a|escapejs }}', {'a': 'testing\r\njavascript \'string" <b>escaping</b>'}, 'testing\\u000D\\u000Ajavascript \\u0027string\\u0022 \\u003Cb\\u003Eescaping\\u003C/b\\u003E'), 'escapejs02': (r'{% autoescape off %}{{ a|escapejs }}{% endautoescape %}', {'a': 'testing\r\njavascript \'string" <b>escaping</b>'}, 'testing\\u000D\\u000Ajavascript \\u0027string\\u0022 \\u003Cb\\u003Eescaping\\u003C/b\\u003E'), # length filter. 'length01': ('{{ list|length }}', {'list': ['4', None, True, {}]}, '4'), 'length02': ('{{ list|length }}', {'list': []}, '0'), 'length03': ('{{ string|length }}', {'string': ''}, '0'), 'length04': ('{{ string|length }}', {'string': 'django'}, '6'), # Invalid uses that should fail silently. 'length05': ('{{ int|length }}', {'int': 7}, ''), 'length06': ('{{ None|length }}', {'None': None}, ''), # length_is filter. 'length_is01': ('{% if some_list|length_is:"4" %}Four{% endif %}', {'some_list': ['4', None, True, {}]}, 'Four'), 'length_is02': ('{% if some_list|length_is:"4" %}Four{% else %}Not Four{% endif %}', {'some_list': ['4', None, True, {}, 17]}, 'Not Four'), 'length_is03': ('{% if mystring|length_is:"4" %}Four{% endif %}', {'mystring': 'word'}, 'Four'), 'length_is04': ('{% if mystring|length_is:"4" %}Four{% else %}Not Four{% endif %}', {'mystring': 'Python'}, 'Not Four'), 'length_is05': ('{% if mystring|length_is:"4" %}Four{% else %}Not Four{% endif %}', {'mystring': ''}, 'Not Four'), 'length_is06': ('{% with var|length as my_length %}{{ my_length }}{% endwith %}', {'var': 'django'}, '6'), # Boolean return value from length_is should not be coerced to a string 'length_is07': (r'{% if "X"|length_is:0 %}Length is 0{% else %}Length not 0{% endif %}', {}, 'Length not 0'), 'length_is08': (r'{% if "X"|length_is:1 %}Length is 1{% else %}Length not 1{% endif %}', {}, 'Length is 1'), # Invalid uses that should fail silently. 'length_is09': ('{{ var|length_is:"fish" }}', {'var': 'django'}, ''), 'length_is10': ('{{ int|length_is:"1" }}', {'int': 7}, ''), 'length_is11': ('{{ none|length_is:"1" }}', {'none': None}, ''), 'join01': (r'{{ a|join:", " }}', {'a': ['alpha', 'beta & me']}, 'alpha, beta &amp; me'), 'join02': (r'{% autoescape off %}{{ a|join:", " }}{% endautoescape %}', {'a': ['alpha', 'beta & me']}, 'alpha, beta & me'), 'join03': (r'{{ a|join:" &amp; " }}', {'a': ['alpha', 'beta & me']}, 'alpha &amp; beta &amp; me'), 'join04': (r'{% autoescape off %}{{ a|join:" &amp; " }}{% endautoescape %}', {'a': ['alpha', 'beta & me']}, 'alpha &amp; beta & me'), # Test that joining with unsafe joiners don't result in unsafe strings (#11377) 'join05': (r'{{ a|join:var }}', {'a': ['alpha', 'beta & me'], 'var': ' & '}, 'alpha &amp; beta &amp; me'), 'join06': (r'{{ a|join:var }}', {'a': ['alpha', 'beta & me'], 'var': mark_safe(' & ')}, 'alpha & beta &amp; me'), 'join07': (r'{{ a|join:var|lower }}', {'a': ['Alpha', 'Beta & me'], 'var': ' & ' }, 'alpha &amp; beta &amp; me'), 'join08': (r'{{ a|join:var|lower }}', {'a': ['Alpha', 'Beta & me'], 'var': mark_safe(' & ')}, 'alpha & beta &amp; me'), 'date01': (r'{{ d|date:"m" }}', {'d': datetime(2008, 1, 1)}, '01'), 'date02': (r'{{ d|date }}', {'d': datetime(2008, 1, 1)}, 'Jan. 1, 2008'), #Ticket 9520: Make sure |date doesn't blow up on non-dates 'date03': (r'{{ d|date:"m" }}', {'d': 'fail_string'}, ''), # ISO date formats 'date04': (r'{{ d|date:"o" }}', {'d': datetime(2008, 12, 29)}, '2009'), 'date05': (r'{{ d|date:"o" }}', {'d': datetime(2010, 1, 3)}, '2009'), # Timezone name 'date06': (r'{{ d|date:"e" }}', {'d': datetime(2009, 3, 12, tzinfo=FixedOffset(30))}, '+0030'), 'date07': (r'{{ d|date:"e" }}', {'d': datetime(2009, 3, 12)}, ''), # Ticket 19370: Make sure |date doesn't blow up on a midnight time object 'date08': (r'{{ t|date:"H:i" }}', {'t': time(0, 1)}, '00:01'), 'date09': (r'{{ t|date:"H:i" }}', {'t': time(0, 0)}, '00:00'), # Tests for #11687 and #16676 'add01': (r'{{ i|add:"5" }}', {'i': 2000}, '2005'), 'add02': (r'{{ i|add:"napis" }}', {'i': 2000}, ''), 'add03': (r'{{ i|add:16 }}', {'i': 'not_an_int'}, ''), 'add04': (r'{{ i|add:"16" }}', {'i': 'not_an_int'}, 'not_an_int16'), 'add05': (r'{{ l1|add:l2 }}', {'l1': [1, 2], 'l2': [3, 4]}, '[1, 2, 3, 4]'), 'add06': (r'{{ t1|add:t2 }}', {'t1': (3, 4), 't2': (1, 2)}, '(3, 4, 1, 2)'), 'add07': (r'{{ d|add:t }}', {'d': date(2000, 1, 1), 't': timedelta(10)}, 'Jan. 11, 2000'), }
kalxas/QGIS
refs/heads/master
python/plugins/db_manager/db_manager_plugin.py
31
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@gmail.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ """ from builtins import object from qgis.PyQt.QtCore import Qt from qgis.PyQt.QtWidgets import QAction, QApplication from qgis.PyQt.QtGui import QIcon from qgis.core import ( QgsProject, QgsMapLayerType, QgsDataSourceUri, QgsApplication ) from . import resources_rc # NOQA class DBManagerPlugin(object): def __init__(self, iface): self.iface = iface self.dlg = None def initGui(self): self.action = QAction(QgsApplication.getThemeIcon('dbmanager.svg'), QApplication.translate("DBManagerPlugin", "DB Manager…"), self.iface.mainWindow()) self.action.setObjectName("dbManager") self.action.triggered.connect(self.run) # Add toolbar button and menu item if hasattr(self.iface, 'addDatabaseToolBarIcon'): self.iface.addDatabaseToolBarIcon(self.action) else: self.iface.addToolBarIcon(self.action) if hasattr(self.iface, 'addPluginToDatabaseMenu'): self.iface.addPluginToDatabaseMenu(QApplication.translate("DBManagerPlugin", None), self.action) else: self.iface.addPluginToMenu(QApplication.translate("DBManagerPlugin", "DB Manager"), self.action) self.layerAction = QAction(QgsApplication.getThemeIcon('dbmanager.svg'), QApplication.translate("DBManagerPlugin", "Update SQL Layer…"), self.iface.mainWindow()) self.layerAction.setObjectName("dbManagerUpdateSqlLayer") self.layerAction.triggered.connect(self.onUpdateSqlLayer) self.iface.addCustomActionForLayerType(self.layerAction, "", QgsMapLayerType.VectorLayer, False) for l in list(QgsProject.instance().mapLayers().values()): self.onLayerWasAdded(l) QgsProject.instance().layerWasAdded.connect(self.onLayerWasAdded) def unload(self): # Remove the plugin menu item and icon if hasattr(self.iface, 'databaseMenu'): self.iface.databaseMenu().removeAction(self.action) else: self.iface.removePluginMenu(QApplication.translate("DBManagerPlugin", "DB Manager"), self.action) if hasattr(self.iface, 'removeDatabaseToolBarIcon'): self.iface.removeDatabaseToolBarIcon(self.action) else: self.iface.removeToolBarIcon(self.action) self.iface.removeCustomActionForLayerType(self.layerAction) QgsProject.instance().layerWasAdded.disconnect(self.onLayerWasAdded) if self.dlg is not None: self.dlg.close() def onLayerWasAdded(self, aMapLayer): # Be able to update every Db layer from Postgres, Spatialite and Oracle if hasattr(aMapLayer, 'dataProvider') and aMapLayer.dataProvider() and aMapLayer.dataProvider().name() in ['postgres', 'spatialite', 'oracle']: self.iface.addCustomActionForLayer(self.layerAction, aMapLayer) # virtual has QUrl source # url = QUrl(QUrl.fromPercentEncoding(l.source())) # url.queryItemValue('query') # url.queryItemValue('uid') # url.queryItemValue('geometry') def onUpdateSqlLayer(self): # Be able to update every Db layer from Postgres, Spatialite and Oracle l = self.iface.activeLayer() if l.dataProvider().name() in ['postgres', 'spatialite', 'oracle']: self.run() self.dlg.runSqlLayerWindow(l) # virtual has QUrl source # url = QUrl(QUrl.fromPercentEncoding(l.source())) # url.queryItemValue('query') # url.queryItemValue('uid') # url.queryItemValue('geometry') def run(self): # keep opened only one instance if self.dlg is None: from .db_manager import DBManager self.dlg = DBManager(self.iface) self.dlg.destroyed.connect(self.onDestroyed) self.dlg.show() self.dlg.raise_() self.dlg.setWindowState(self.dlg.windowState() & ~Qt.WindowMinimized) self.dlg.activateWindow() def onDestroyed(self, obj): self.dlg = None
EIT-ICT-RICH/ns-3-dev-TSCH
refs/heads/master
src/wifi/bindings/modulegen__gcc_ILP32.py
2
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.wifi', cpp_namespace='::ns3') return root_module def register_types(module): root_module = module.get_root() ## propagation-environment.h (module 'propagation'): ns3::EnvironmentType [enumeration] module.add_enum('EnvironmentType', ['UrbanEnvironment', 'SubUrbanEnvironment', 'OpenAreasEnvironment'], import_from_module='ns.propagation') ## qos-utils.h (module 'wifi'): ns3::AcIndex [enumeration] module.add_enum('AcIndex', ['AC_BE', 'AC_BK', 'AC_VI', 'AC_VO', 'AC_BE_NQOS', 'AC_UNDEF']) ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacType [enumeration] module.add_enum('WifiMacType', ['WIFI_MAC_CTL_RTS', 'WIFI_MAC_CTL_CTS', 'WIFI_MAC_CTL_ACK', 'WIFI_MAC_CTL_BACKREQ', 'WIFI_MAC_CTL_BACKRESP', 'WIFI_MAC_CTL_CTLWRAPPER', 'WIFI_MAC_MGT_BEACON', 'WIFI_MAC_MGT_ASSOCIATION_REQUEST', 'WIFI_MAC_MGT_ASSOCIATION_RESPONSE', 'WIFI_MAC_MGT_DISASSOCIATION', 'WIFI_MAC_MGT_REASSOCIATION_REQUEST', 'WIFI_MAC_MGT_REASSOCIATION_RESPONSE', 'WIFI_MAC_MGT_PROBE_REQUEST', 'WIFI_MAC_MGT_PROBE_RESPONSE', 'WIFI_MAC_MGT_AUTHENTICATION', 'WIFI_MAC_MGT_DEAUTHENTICATION', 'WIFI_MAC_MGT_ACTION', 'WIFI_MAC_MGT_ACTION_NO_ACK', 'WIFI_MAC_MGT_MULTIHOP_ACTION', 'WIFI_MAC_DATA', 'WIFI_MAC_DATA_CFACK', 'WIFI_MAC_DATA_CFPOLL', 'WIFI_MAC_DATA_CFACK_CFPOLL', 'WIFI_MAC_DATA_NULL', 'WIFI_MAC_DATA_NULL_CFACK', 'WIFI_MAC_DATA_NULL_CFPOLL', 'WIFI_MAC_DATA_NULL_CFACK_CFPOLL', 'WIFI_MAC_QOSDATA', 'WIFI_MAC_QOSDATA_CFACK', 'WIFI_MAC_QOSDATA_CFPOLL', 'WIFI_MAC_QOSDATA_CFACK_CFPOLL', 'WIFI_MAC_QOSDATA_NULL', 'WIFI_MAC_QOSDATA_NULL_CFPOLL', 'WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL']) ## propagation-environment.h (module 'propagation'): ns3::CitySize [enumeration] module.add_enum('CitySize', ['SmallCity', 'MediumCity', 'LargeCity'], import_from_module='ns.propagation') ## wifi-preamble.h (module 'wifi'): ns3::WifiPreamble [enumeration] module.add_enum('WifiPreamble', ['WIFI_PREAMBLE_LONG', 'WIFI_PREAMBLE_SHORT', 'WIFI_PREAMBLE_HT_MF', 'WIFI_PREAMBLE_HT_GF']) ## wifi-mode.h (module 'wifi'): ns3::WifiModulationClass [enumeration] module.add_enum('WifiModulationClass', ['WIFI_MOD_CLASS_UNKNOWN', 'WIFI_MOD_CLASS_IR', 'WIFI_MOD_CLASS_FHSS', 'WIFI_MOD_CLASS_DSSS', 'WIFI_MOD_CLASS_ERP_PBCC', 'WIFI_MOD_CLASS_DSSS_OFDM', 'WIFI_MOD_CLASS_ERP_OFDM', 'WIFI_MOD_CLASS_OFDM', 'WIFI_MOD_CLASS_HT']) ## wifi-phy-standard.h (module 'wifi'): ns3::WifiPhyStandard [enumeration] module.add_enum('WifiPhyStandard', ['WIFI_PHY_STANDARD_80211a', 'WIFI_PHY_STANDARD_80211b', 'WIFI_PHY_STANDARD_80211g', 'WIFI_PHY_STANDARD_80211_10MHZ', 'WIFI_PHY_STANDARD_80211_5MHZ', 'WIFI_PHY_STANDARD_holland', 'WIFI_PHY_STANDARD_80211n_2_4GHZ', 'WIFI_PHY_STANDARD_80211n_5GHZ']) ## qos-tag.h (module 'wifi'): ns3::UserPriority [enumeration] module.add_enum('UserPriority', ['UP_BK', 'UP_BE', 'UP_EE', 'UP_CL', 'UP_VI', 'UP_VO', 'UP_NC']) ## wifi-mode.h (module 'wifi'): ns3::WifiCodeRate [enumeration] module.add_enum('WifiCodeRate', ['WIFI_CODE_RATE_UNDEFINED', 'WIFI_CODE_RATE_3_4', 'WIFI_CODE_RATE_2_3', 'WIFI_CODE_RATE_1_2', 'WIFI_CODE_RATE_5_6']) ## edca-txop-n.h (module 'wifi'): ns3::TypeOfStation [enumeration] module.add_enum('TypeOfStation', ['STA', 'AP', 'ADHOC_STA', 'MESH', 'HT_STA', 'HT_AP', 'HT_ADHOC_STA', 'OCB']) ## ctrl-headers.h (module 'wifi'): ns3::BlockAckType [enumeration] module.add_enum('BlockAckType', ['BASIC_BLOCK_ACK', 'COMPRESSED_BLOCK_ACK', 'MULTI_TID_BLOCK_ACK']) ## 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') ## athstats-helper.h (module 'wifi'): ns3::AthstatsHelper [class] module.add_class('AthstatsHelper') ## 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']) ## block-ack-manager.h (module 'wifi'): ns3::Bar [struct] module.add_class('Bar') ## block-ack-agreement.h (module 'wifi'): ns3::BlockAckAgreement [class] module.add_class('BlockAckAgreement') ## block-ack-cache.h (module 'wifi'): ns3::BlockAckCache [class] module.add_class('BlockAckCache') ## block-ack-manager.h (module 'wifi'): ns3::BlockAckManager [class] module.add_class('BlockAckManager') ## 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') ## capability-information.h (module 'wifi'): ns3::CapabilityInformation [class] module.add_class('CapabilityInformation') ## dcf-manager.h (module 'wifi'): ns3::DcfManager [class] module.add_class('DcfManager') ## dcf-manager.h (module 'wifi'): ns3::DcfState [class] module.add_class('DcfState', allow_subclassing=True) ## dsss-error-rate-model.h (module 'wifi'): ns3::DsssErrorRateModel [class] module.add_class('DsssErrorRateModel') ## event-id.h (module 'core'): ns3::EventId [class] module.add_class('EventId', import_from_module='ns.core') ## hash.h (module 'core'): ns3::Hasher [class] module.add_class('Hasher', import_from_module='ns.core') ## interference-helper.h (module 'wifi'): ns3::InterferenceHelper [class] module.add_class('InterferenceHelper') ## interference-helper.h (module 'wifi'): ns3::InterferenceHelper::SnrPer [struct] module.add_class('SnrPer', outer_class=root_module['ns3::InterferenceHelper']) ## 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') ## 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']) ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener [class] module.add_class('MacLowBlockAckEventListener', allow_subclassing=True) ## mac-low.h (module 'wifi'): ns3::MacLowDcfListener [class] module.add_class('MacLowDcfListener', allow_subclassing=True) ## mac-low.h (module 'wifi'): ns3::MacLowTransmissionListener [class] module.add_class('MacLowTransmissionListener', allow_subclassing=True) ## mac-low.h (module 'wifi'): ns3::MacLowTransmissionParameters [class] module.add_class('MacLowTransmissionParameters') ## mac-rx-middle.h (module 'wifi'): ns3::MacRxMiddle [class] module.add_class('MacRxMiddle') ## 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') ## originator-block-ack-agreement.h (module 'wifi'): ns3::OriginatorBlockAckAgreement [class] module.add_class('OriginatorBlockAckAgreement', parent=root_module['ns3::BlockAckAgreement']) ## originator-block-ack-agreement.h (module 'wifi'): ns3::OriginatorBlockAckAgreement::State [enumeration] module.add_enum('State', ['PENDING', 'ESTABLISHED', 'INACTIVE', 'UNSUCCESSFUL'], outer_class=root_module['ns3::OriginatorBlockAckAgreement']) ## packet-metadata.h (module 'network'): ns3::PacketMetadata [class] module.add_class('PacketMetadata', import_from_module='ns.network') ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item [struct] module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata']) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item [enumeration] module.add_enum('', ['PAYLOAD', 'HEADER', 'TRAILER'], outer_class=root_module['ns3::PacketMetadata::Item'], import_from_module='ns.network') ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator [class] module.add_class('ItemIterator', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata']) ## packet.h (module 'network'): ns3::PacketTagIterator [class] module.add_class('PacketTagIterator', import_from_module='ns.network') ## packet.h (module 'network'): ns3::PacketTagIterator::Item [class] module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagIterator']) ## packet-tag-list.h (module 'network'): ns3::PacketTagList [class] module.add_class('PacketTagList', import_from_module='ns.network') ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct] module.add_class('TagData', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagList']) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData_e [enumeration] module.add_enum('TagData_e', ['MAX_SIZE'], outer_class=root_module['ns3::PacketTagList::TagData'], import_from_module='ns.network') ## pcap-file.h (module 'network'): ns3::PcapFile [class] module.add_class('PcapFile', import_from_module='ns.network') ## trace-helper.h (module 'network'): ns3::PcapHelper [class] module.add_class('PcapHelper', import_from_module='ns.network') ## trace-helper.h (module 'network'): ns3::PcapHelper [enumeration] module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network') ## trace-helper.h (module 'network'): ns3::PcapHelperForDevice [class] module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network') ## propagation-cache.h (module 'propagation'): ns3::PropagationCache<ns3::JakesProcess> [class] module.add_class('PropagationCache', import_from_module='ns.propagation', template_parameters=['ns3::JakesProcess']) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo [struct] module.add_class('RateInfo') ## 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') ## status-code.h (module 'wifi'): ns3::StatusCode [class] module.add_class('StatusCode') ## tag.h (module 'network'): ns3::Tag [class] module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase']) ## tag-buffer.h (module 'network'): ns3::TagBuffer [class] module.add_class('TagBuffer', import_from_module='ns.network') ## nstime.h (module 'core'): ns3::TimeWithUnit [class] module.add_class('TimeWithUnit', import_from_module='ns.core') ## 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']) ## vector.h (module 'core'): ns3::Vector2D [class] module.add_class('Vector2D', import_from_module='ns.core') ## vector.h (module 'core'): ns3::Vector3D [class] module.add_class('Vector3D', import_from_module='ns.core') ## wifi-helper.h (module 'wifi'): ns3::WifiHelper [class] module.add_class('WifiHelper', allow_subclassing=True) ## wifi-helper.h (module 'wifi'): ns3::WifiMacHelper [class] module.add_class('WifiMacHelper', allow_subclassing=True) ## wifi-mode.h (module 'wifi'): ns3::WifiMode [class] module.add_class('WifiMode') ## wifi-mode.h (module 'wifi'): ns3::WifiModeFactory [class] module.add_class('WifiModeFactory') ## wifi-helper.h (module 'wifi'): ns3::WifiPhyHelper [class] module.add_class('WifiPhyHelper', allow_subclassing=True) ## wifi-phy.h (module 'wifi'): ns3::WifiPhyListener [class] module.add_class('WifiPhyListener', allow_subclassing=True) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStation [struct] module.add_class('WifiRemoteStation') ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationInfo [class] module.add_class('WifiRemoteStationInfo') ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState [struct] module.add_class('WifiRemoteStationState') ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState [enumeration] module.add_enum('', ['BRAND_NEW', 'DISASSOC', 'WAIT_ASSOC_TX_OK', 'GOT_ASSOC_TX_OK'], outer_class=root_module['ns3::WifiRemoteStationState']) ## wifi-tx-vector.h (module 'wifi'): ns3::WifiTxVector [class] module.add_class('WifiTxVector') ## yans-wifi-helper.h (module 'wifi'): ns3::YansWifiChannelHelper [class] module.add_class('YansWifiChannelHelper') ## yans-wifi-helper.h (module 'wifi'): ns3::YansWifiPhyHelper [class] module.add_class('YansWifiPhyHelper', parent=[root_module['ns3::WifiPhyHelper'], root_module['ns3::PcapHelperForDevice'], root_module['ns3::AsciiTraceHelperForDevice']]) ## yans-wifi-helper.h (module 'wifi'): ns3::YansWifiPhyHelper::SupportedPcapDataLinkTypes [enumeration] module.add_enum('SupportedPcapDataLinkTypes', ['DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO'], outer_class=root_module['ns3::YansWifiPhyHelper']) ## empty.h (module 'core'): ns3::empty [class] module.add_class('empty', import_from_module='ns.core') ## int64x64-double.h (module 'core'): ns3::int64x64_t [class] module.add_class('int64x64_t', import_from_module='ns.core') ## int64x64-double.h (module 'core'): ns3::int64x64_t::impl_type [enumeration] module.add_enum('impl_type', ['int128_impl', 'cairo_impl', 'ld_impl'], outer_class=root_module['ns3::int64x64_t'], import_from_module='ns.core') ## chunk.h (module 'network'): ns3::Chunk [class] module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase']) ## header.h (module 'network'): ns3::Header [class] module.add_class('Header', import_from_module='ns.network', parent=root_module['ns3::Chunk']) ## mgt-headers.h (module 'wifi'): ns3::MgtAddBaRequestHeader [class] module.add_class('MgtAddBaRequestHeader', parent=root_module['ns3::Header']) ## mgt-headers.h (module 'wifi'): ns3::MgtAddBaResponseHeader [class] module.add_class('MgtAddBaResponseHeader', parent=root_module['ns3::Header']) ## mgt-headers.h (module 'wifi'): ns3::MgtAssocRequestHeader [class] module.add_class('MgtAssocRequestHeader', parent=root_module['ns3::Header']) ## mgt-headers.h (module 'wifi'): ns3::MgtAssocResponseHeader [class] module.add_class('MgtAssocResponseHeader', parent=root_module['ns3::Header']) ## mgt-headers.h (module 'wifi'): ns3::MgtDelBaHeader [class] module.add_class('MgtDelBaHeader', parent=root_module['ns3::Header']) ## mgt-headers.h (module 'wifi'): ns3::MgtProbeRequestHeader [class] module.add_class('MgtProbeRequestHeader', parent=root_module['ns3::Header']) ## mgt-headers.h (module 'wifi'): ns3::MgtProbeResponseHeader [class] module.add_class('MgtProbeResponseHeader', parent=root_module['ns3::Header']) ## nqos-wifi-mac-helper.h (module 'wifi'): ns3::NqosWifiMacHelper [class] module.add_class('NqosWifiMacHelper', parent=root_module['ns3::WifiMacHelper']) ## 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']) ## pcap-file-wrapper.h (module 'network'): ns3::PcapFileWrapper [class] module.add_class('PcapFileWrapper', import_from_module='ns.network', parent=root_module['ns3::Object']) ## propagation-delay-model.h (module 'propagation'): ns3::PropagationDelayModel [class] module.add_class('PropagationDelayModel', import_from_module='ns.propagation', 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']) ## qos-tag.h (module 'wifi'): ns3::QosTag [class] module.add_class('QosTag', parent=root_module['ns3::Tag']) ## qos-wifi-mac-helper.h (module 'wifi'): ns3::QosWifiMacHelper [class] module.add_class('QosWifiMacHelper', parent=root_module['ns3::WifiMacHelper']) ## propagation-delay-model.h (module 'propagation'): ns3::RandomPropagationDelayModel [class] module.add_class('RandomPropagationDelayModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationDelayModel']) ## propagation-loss-model.h (module 'propagation'): ns3::RandomPropagationLossModel [class] module.add_class('RandomPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## random-variable-stream.h (module 'core'): ns3::RandomVariableStream [class] module.add_class('RandomVariableStream', import_from_module='ns.core', parent=root_module['ns3::Object']) ## propagation-loss-model.h (module 'propagation'): ns3::RangePropagationLossModel [class] module.add_class('RangePropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## random-variable-stream.h (module 'core'): ns3::SequentialRandomVariable [class] module.add_class('SequentialRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeAccessor', 'ns3::empty', 'ns3::DefaultDeleter<ns3::AttributeAccessor>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeChecker', 'ns3::empty', 'ns3::DefaultDeleter<ns3::AttributeChecker>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter<ns3::AttributeValue>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter<ns3::CallbackImplBase>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter<ns3::EventImpl>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter<ns3::Hash::Implementation>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::InterferenceHelper::Event, ns3::empty, ns3::DefaultDeleter<ns3::InterferenceHelper::Event> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::InterferenceHelper::Event', 'ns3::empty', 'ns3::DefaultDeleter<ns3::InterferenceHelper::Event>'], 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')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::WifiInformationElement, ns3::empty, ns3::DefaultDeleter<ns3::WifiInformationElement> > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::WifiInformationElement', 'ns3::empty', 'ns3::DefaultDeleter<ns3::WifiInformationElement>'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## snr-tag.h (module 'wifi'): ns3::SnrTag [class] module.add_class('SnrTag', parent=root_module['ns3::Tag']) ## propagation-loss-model.h (module 'propagation'): ns3::ThreeLogDistancePropagationLossModel [class] module.add_class('ThreeLogDistancePropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## nstime.h (module 'core'): ns3::Time [class] module.add_class('Time', import_from_module='ns.core') ## nstime.h (module 'core'): ns3::Time::Unit [enumeration] module.add_enum('Unit', ['Y', 'D', 'H', 'MIN', 'S', 'MS', 'US', 'NS', 'PS', 'FS', 'LAST'], outer_class=root_module['ns3::Time'], import_from_module='ns.core') ## nstime.h (module 'core'): ns3::Time [class] root_module['ns3::Time'].implicitly_converts_to(root_module['ns3::int64x64_t']) ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor [class] module.add_class('TraceSourceAccessor', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >']) ## trailer.h (module 'network'): ns3::Trailer [class] module.add_class('Trailer', import_from_module='ns.network', parent=root_module['ns3::Chunk']) ## random-variable-stream.h (module 'core'): ns3::TriangularRandomVariable [class] module.add_class('TriangularRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## propagation-loss-model.h (module 'propagation'): ns3::TwoRayGroundPropagationLossModel [class] module.add_class('TwoRayGroundPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## random-variable-stream.h (module 'core'): ns3::UniformRandomVariable [class] module.add_class('UniformRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## random-variable-stream.h (module 'core'): ns3::WeibullRandomVariable [class] module.add_class('WeibullRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader [class] module.add_class('WifiActionHeader', parent=root_module['ns3::Header']) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::CategoryValue [enumeration] module.add_enum('CategoryValue', ['BLOCK_ACK', 'MESH_PEERING_MGT', 'MESH_LINK_METRIC', 'MESH_PATH_SELECTION', 'MESH_INTERWORKING', 'MESH_RESOURCE_COORDINATION', 'MESH_PROXY_FORWARDING', 'VENDOR_SPECIFIC_ACTION'], outer_class=root_module['ns3::WifiActionHeader']) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::PeerLinkMgtActionValue [enumeration] module.add_enum('PeerLinkMgtActionValue', ['PEER_LINK_OPEN', 'PEER_LINK_CONFIRM', 'PEER_LINK_CLOSE'], outer_class=root_module['ns3::WifiActionHeader']) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::LinkMetricActionValue [enumeration] module.add_enum('LinkMetricActionValue', ['LINK_METRIC_REQUEST', 'LINK_METRIC_REPORT'], outer_class=root_module['ns3::WifiActionHeader']) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::PathSelectionActionValue [enumeration] module.add_enum('PathSelectionActionValue', ['PATH_SELECTION'], outer_class=root_module['ns3::WifiActionHeader']) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::InterworkActionValue [enumeration] module.add_enum('InterworkActionValue', ['PORTAL_ANNOUNCEMENT'], outer_class=root_module['ns3::WifiActionHeader']) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::ResourceCoordinationActionValue [enumeration] module.add_enum('ResourceCoordinationActionValue', ['CONGESTION_CONTROL_NOTIFICATION', 'MDA_SETUP_REQUEST', 'MDA_SETUP_REPLY', 'MDAOP_ADVERTISMENT_REQUEST', 'MDAOP_ADVERTISMENTS', 'MDAOP_SET_TEARDOWN', 'BEACON_TIMING_REQUEST', 'BEACON_TIMING_RESPONSE', 'TBTT_ADJUSTMENT_REQUEST', 'MESH_CHANNEL_SWITCH_ANNOUNCEMENT'], outer_class=root_module['ns3::WifiActionHeader']) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::BlockAckActionValue [enumeration] module.add_enum('BlockAckActionValue', ['BLOCK_ACK_ADDBA_REQUEST', 'BLOCK_ACK_ADDBA_RESPONSE', 'BLOCK_ACK_DELBA'], outer_class=root_module['ns3::WifiActionHeader']) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::ActionValue [union] module.add_class('ActionValue', outer_class=root_module['ns3::WifiActionHeader']) ## wifi-information-element.h (module 'wifi'): ns3::WifiInformationElement [class] module.add_class('WifiInformationElement', parent=root_module['ns3::SimpleRefCount< ns3::WifiInformationElement, ns3::empty, ns3::DefaultDeleter<ns3::WifiInformationElement> >']) ## wifi-information-element-vector.h (module 'wifi'): ns3::WifiInformationElementVector [class] module.add_class('WifiInformationElementVector', parent=root_module['ns3::Header']) ## wifi-mac.h (module 'wifi'): ns3::WifiMac [class] module.add_class('WifiMac', parent=root_module['ns3::Object']) ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacHeader [class] module.add_class('WifiMacHeader', parent=root_module['ns3::Header']) ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacHeader::QosAckPolicy [enumeration] module.add_enum('QosAckPolicy', ['NORMAL_ACK', 'NO_ACK', 'NO_EXPLICIT_ACK', 'BLOCK_ACK'], outer_class=root_module['ns3::WifiMacHeader']) ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacHeader::AddressType [enumeration] module.add_enum('AddressType', ['ADDR1', 'ADDR2', 'ADDR3', 'ADDR4'], outer_class=root_module['ns3::WifiMacHeader']) ## wifi-mac-queue.h (module 'wifi'): ns3::WifiMacQueue [class] module.add_class('WifiMacQueue', parent=root_module['ns3::Object']) ## wifi-mac-trailer.h (module 'wifi'): ns3::WifiMacTrailer [class] module.add_class('WifiMacTrailer', parent=root_module['ns3::Trailer']) ## wifi-phy.h (module 'wifi'): ns3::WifiPhy [class] module.add_class('WifiPhy', parent=root_module['ns3::Object']) ## wifi-phy.h (module 'wifi'): ns3::WifiPhy::State [enumeration] module.add_enum('State', ['IDLE', 'CCA_BUSY', 'TX', 'RX', 'SWITCHING', 'SLEEP'], outer_class=root_module['ns3::WifiPhy']) ## wifi-phy-state-helper.h (module 'wifi'): ns3::WifiPhyStateHelper [class] module.add_class('WifiPhyStateHelper', parent=root_module['ns3::Object']) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationManager [class] module.add_class('WifiRemoteStationManager', parent=root_module['ns3::Object']) ## yans-wifi-phy.h (module 'wifi'): ns3::YansWifiPhy [class] module.add_class('YansWifiPhy', parent=root_module['ns3::WifiPhy']) ## random-variable-stream.h (module 'core'): ns3::ZetaRandomVariable [class] module.add_class('ZetaRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## random-variable-stream.h (module 'core'): ns3::ZipfRandomVariable [class] module.add_class('ZipfRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## aarf-wifi-manager.h (module 'wifi'): ns3::AarfWifiManager [class] module.add_class('AarfWifiManager', parent=root_module['ns3::WifiRemoteStationManager']) ## aarfcd-wifi-manager.h (module 'wifi'): ns3::AarfcdWifiManager [class] module.add_class('AarfcdWifiManager', parent=root_module['ns3::WifiRemoteStationManager']) ## amrr-wifi-manager.h (module 'wifi'): ns3::AmrrWifiManager [class] module.add_class('AmrrWifiManager', parent=root_module['ns3::WifiRemoteStationManager']) ## amsdu-subframe-header.h (module 'wifi'): ns3::AmsduSubframeHeader [class] module.add_class('AmsduSubframeHeader', parent=root_module['ns3::Header']) ## arf-wifi-manager.h (module 'wifi'): ns3::ArfWifiManager [class] module.add_class('ArfWifiManager', parent=root_module['ns3::WifiRemoteStationManager']) ## athstats-helper.h (module 'wifi'): ns3::AthstatsWifiTraceSink [class] module.add_class('AthstatsWifiTraceSink', parent=root_module['ns3::Object']) ## 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> >']) ## 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']) ## cara-wifi-manager.h (module 'wifi'): ns3::CaraWifiManager [class] module.add_class('CaraWifiManager', parent=root_module['ns3::WifiRemoteStationManager']) ## channel.h (module 'network'): ns3::Channel [class] module.add_class('Channel', import_from_module='ns.network', parent=root_module['ns3::Object']) ## random-variable-stream.h (module 'core'): ns3::ConstantRandomVariable [class] module.add_class('ConstantRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## constant-rate-wifi-manager.h (module 'wifi'): ns3::ConstantRateWifiManager [class] module.add_class('ConstantRateWifiManager', parent=root_module['ns3::WifiRemoteStationManager']) ## propagation-delay-model.h (module 'propagation'): ns3::ConstantSpeedPropagationDelayModel [class] module.add_class('ConstantSpeedPropagationDelayModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationDelayModel']) ## cost231-propagation-loss-model.h (module 'propagation'): ns3::Cost231PropagationLossModel [class] module.add_class('Cost231PropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## ctrl-headers.h (module 'wifi'): ns3::CtrlBAckRequestHeader [class] module.add_class('CtrlBAckRequestHeader', parent=root_module['ns3::Header']) ## ctrl-headers.h (module 'wifi'): ns3::CtrlBAckResponseHeader [class] module.add_class('CtrlBAckResponseHeader', parent=root_module['ns3::Header']) ## dcf.h (module 'wifi'): ns3::Dcf [class] module.add_class('Dcf', parent=root_module['ns3::Object']) ## random-variable-stream.h (module 'core'): ns3::DeterministicRandomVariable [class] module.add_class('DeterministicRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## double.h (module 'core'): ns3::DoubleValue [class] module.add_class('DoubleValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## edca-txop-n.h (module 'wifi'): ns3::EdcaTxopN [class] module.add_class('EdcaTxopN', parent=root_module['ns3::Dcf']) ## random-variable-stream.h (module 'core'): ns3::EmpiricalRandomVariable [class] module.add_class('EmpiricalRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## attribute.h (module 'core'): ns3::EmptyAttributeValue [class] module.add_class('EmptyAttributeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## random-variable-stream.h (module 'core'): ns3::ErlangRandomVariable [class] module.add_class('ErlangRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## error-rate-model.h (module 'wifi'): ns3::ErrorRateModel [class] module.add_class('ErrorRateModel', parent=root_module['ns3::Object']) ## event-impl.h (module 'core'): ns3::EventImpl [class] module.add_class('EventImpl', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >']) ## random-variable-stream.h (module 'core'): ns3::ExponentialRandomVariable [class] module.add_class('ExponentialRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## supported-rates.h (module 'wifi'): ns3::ExtendedSupportedRatesIE [class] module.add_class('ExtendedSupportedRatesIE', parent=root_module['ns3::WifiInformationElement']) ## propagation-loss-model.h (module 'propagation'): ns3::FixedRssLossModel [class] module.add_class('FixedRssLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## propagation-loss-model.h (module 'propagation'): ns3::FriisPropagationLossModel [class] module.add_class('FriisPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## random-variable-stream.h (module 'core'): ns3::GammaRandomVariable [class] module.add_class('GammaRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## ht-capabilities.h (module 'wifi'): ns3::HtCapabilities [class] module.add_class('HtCapabilities', parent=root_module['ns3::WifiInformationElement']) ## ht-capabilities.h (module 'wifi'): ns3::HtCapabilitiesChecker [class] module.add_class('HtCapabilitiesChecker', parent=root_module['ns3::AttributeChecker']) ## ht-capabilities.h (module 'wifi'): ns3::HtCapabilitiesValue [class] module.add_class('HtCapabilitiesValue', parent=root_module['ns3::AttributeValue']) ## ht-wifi-mac-helper.h (module 'wifi'): ns3::HtWifiMacHelper [class] module.add_class('HtWifiMacHelper', parent=root_module['ns3::QosWifiMacHelper']) ## ideal-wifi-manager.h (module 'wifi'): ns3::IdealWifiManager [class] module.add_class('IdealWifiManager', parent=root_module['ns3::WifiRemoteStationManager']) ## 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']) ## itu-r-1411-los-propagation-loss-model.h (module 'propagation'): ns3::ItuR1411LosPropagationLossModel [class] module.add_class('ItuR1411LosPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## itu-r-1411-nlos-over-rooftop-propagation-loss-model.h (module 'propagation'): ns3::ItuR1411NlosOverRooftopPropagationLossModel [class] module.add_class('ItuR1411NlosOverRooftopPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## jakes-process.h (module 'propagation'): ns3::JakesProcess [class] module.add_class('JakesProcess', import_from_module='ns.propagation', parent=root_module['ns3::Object']) ## jakes-propagation-loss-model.h (module 'propagation'): ns3::JakesPropagationLossModel [class] module.add_class('JakesPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## kun-2600-mhz-propagation-loss-model.h (module 'propagation'): ns3::Kun2600MhzPropagationLossModel [class] module.add_class('Kun2600MhzPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## propagation-loss-model.h (module 'propagation'): ns3::LogDistancePropagationLossModel [class] module.add_class('LogDistancePropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## random-variable-stream.h (module 'core'): ns3::LogNormalRandomVariable [class] module.add_class('LogNormalRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## mac48-address.h (module 'network'): ns3::Mac48AddressChecker [class] module.add_class('Mac48AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## mac48-address.h (module 'network'): ns3::Mac48AddressValue [class] module.add_class('Mac48AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## mac-low.h (module 'wifi'): ns3::MacLow [class] module.add_class('MacLow', parent=root_module['ns3::Object']) ## propagation-loss-model.h (module 'propagation'): ns3::MatrixPropagationLossModel [class] module.add_class('MatrixPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## mgt-headers.h (module 'wifi'): ns3::MgtBeaconHeader [class] module.add_class('MgtBeaconHeader', parent=root_module['ns3::MgtProbeResponseHeader']) ## minstrel-wifi-manager.h (module 'wifi'): ns3::MinstrelWifiManager [class] module.add_class('MinstrelWifiManager', parent=root_module['ns3::WifiRemoteStationManager']) ## mobility-model.h (module 'mobility'): ns3::MobilityModel [class] module.add_class('MobilityModel', import_from_module='ns.mobility', parent=root_module['ns3::Object']) ## msdu-aggregator.h (module 'wifi'): ns3::MsduAggregator [class] module.add_class('MsduAggregator', parent=root_module['ns3::Object']) ## 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') ## nist-error-rate-model.h (module 'wifi'): ns3::NistErrorRateModel [class] module.add_class('NistErrorRateModel', parent=root_module['ns3::ErrorRateModel']) ## nix-vector.h (module 'network'): ns3::NixVector [class] module.add_class('NixVector', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >']) ## node.h (module 'network'): ns3::Node [class] module.add_class('Node', import_from_module='ns.network', parent=root_module['ns3::Object']) ## random-variable-stream.h (module 'core'): ns3::NormalRandomVariable [class] module.add_class('NormalRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker [class] module.add_class('ObjectFactoryChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## object-factory.h (module 'core'): ns3::ObjectFactoryValue [class] module.add_class('ObjectFactoryValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## okumura-hata-propagation-loss-model.h (module 'propagation'): ns3::OkumuraHataPropagationLossModel [class] module.add_class('OkumuraHataPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## onoe-wifi-manager.h (module 'wifi'): ns3::OnoeWifiManager [class] module.add_class('OnoeWifiManager', parent=root_module['ns3::WifiRemoteStationManager']) ## output-stream-wrapper.h (module 'network'): ns3::OutputStreamWrapper [class] module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >']) ## packet.h (module 'network'): ns3::Packet [class] module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >']) ## random-variable-stream.h (module 'core'): ns3::ParetoRandomVariable [class] module.add_class('ParetoRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## regular-wifi-mac.h (module 'wifi'): ns3::RegularWifiMac [class] module.add_class('RegularWifiMac', parent=root_module['ns3::WifiMac']) ## rraa-wifi-manager.h (module 'wifi'): ns3::RraaWifiManager [class] module.add_class('RraaWifiManager', parent=root_module['ns3::WifiRemoteStationManager']) ## ssid.h (module 'wifi'): ns3::Ssid [class] module.add_class('Ssid', parent=root_module['ns3::WifiInformationElement']) ## ssid.h (module 'wifi'): ns3::SsidChecker [class] module.add_class('SsidChecker', parent=root_module['ns3::AttributeChecker']) ## ssid.h (module 'wifi'): ns3::SsidValue [class] module.add_class('SsidValue', parent=root_module['ns3::AttributeValue']) ## sta-wifi-mac.h (module 'wifi'): ns3::StaWifiMac [class] module.add_class('StaWifiMac', parent=root_module['ns3::RegularWifiMac']) ## supported-rates.h (module 'wifi'): ns3::SupportedRates [class] module.add_class('SupportedRates', parent=root_module['ns3::WifiInformationElement']) ## 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']) ## vector.h (module 'core'): ns3::Vector2DChecker [class] module.add_class('Vector2DChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## vector.h (module 'core'): ns3::Vector2DValue [class] module.add_class('Vector2DValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## vector.h (module 'core'): ns3::Vector3DChecker [class] module.add_class('Vector3DChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## vector.h (module 'core'): ns3::Vector3DValue [class] module.add_class('Vector3DValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## wifi-channel.h (module 'wifi'): ns3::WifiChannel [class] module.add_class('WifiChannel', parent=root_module['ns3::Channel']) ## wifi-mode.h (module 'wifi'): ns3::WifiModeChecker [class] module.add_class('WifiModeChecker', parent=root_module['ns3::AttributeChecker']) ## wifi-mode.h (module 'wifi'): ns3::WifiModeValue [class] module.add_class('WifiModeValue', parent=root_module['ns3::AttributeValue']) ## wifi-net-device.h (module 'wifi'): ns3::WifiNetDevice [class] module.add_class('WifiNetDevice', parent=root_module['ns3::NetDevice']) ## yans-error-rate-model.h (module 'wifi'): ns3::YansErrorRateModel [class] module.add_class('YansErrorRateModel', parent=root_module['ns3::ErrorRateModel']) ## yans-wifi-channel.h (module 'wifi'): ns3::YansWifiChannel [class] module.add_class('YansWifiChannel', parent=root_module['ns3::WifiChannel']) ## 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']) ## adhoc-wifi-mac.h (module 'wifi'): ns3::AdhocWifiMac [class] module.add_class('AdhocWifiMac', parent=root_module['ns3::RegularWifiMac']) ## ap-wifi-mac.h (module 'wifi'): ns3::ApWifiMac [class] module.add_class('ApWifiMac', parent=root_module['ns3::RegularWifiMac']) ## dca-txop.h (module 'wifi'): ns3::DcaTxop [class] module.add_class('DcaTxop', parent=root_module['ns3::Dcf']) module.add_container('ns3::WifiModeList', 'ns3::WifiMode', container_type=u'vector') module.add_container('ns3::WifiMcsList', 'unsigned char', container_type=u'vector') module.add_container('std::list< std::pair< ns3::Ptr< ns3::Packet >, ns3::AmsduSubframeHeader > >', 'std::pair< ns3::Ptr< ns3::Packet >, ns3::AmsduSubframeHeader >', container_type=u'list') typehandlers.add_type_alias(u'std::vector< unsigned char, std::allocator< unsigned char > >', u'ns3::WifiMcsList') typehandlers.add_type_alias(u'std::vector< unsigned char, std::allocator< unsigned char > >*', u'ns3::WifiMcsList*') typehandlers.add_type_alias(u'std::vector< unsigned char, std::allocator< unsigned char > >&', u'ns3::WifiMcsList&') typehandlers.add_type_alias(u'uint8_t', u'ns3::WifiInformationElementId') typehandlers.add_type_alias(u'uint8_t*', u'ns3::WifiInformationElementId*') typehandlers.add_type_alias(u'uint8_t&', u'ns3::WifiInformationElementId&') typehandlers.add_type_alias(u'__gnu_cxx::__normal_iterator< ns3::WifiMode const *, std::vector< ns3::WifiMode, std::allocator< ns3::WifiMode > > >', u'ns3::WifiModeListIterator') typehandlers.add_type_alias(u'__gnu_cxx::__normal_iterator< ns3::WifiMode const *, std::vector< ns3::WifiMode, std::allocator< ns3::WifiMode > > >*', u'ns3::WifiModeListIterator*') typehandlers.add_type_alias(u'__gnu_cxx::__normal_iterator< ns3::WifiMode const *, std::vector< ns3::WifiMode, std::allocator< ns3::WifiMode > > >&', u'ns3::WifiModeListIterator&') typehandlers.add_type_alias(u'ns3::Vector3D', u'ns3::Vector') typehandlers.add_type_alias(u'ns3::Vector3D*', u'ns3::Vector*') typehandlers.add_type_alias(u'ns3::Vector3D&', u'ns3::Vector&') module.add_typedef(root_module['ns3::Vector3D'], 'Vector') typehandlers.add_type_alias(u'std::vector< ns3::RateInfo, std::allocator< ns3::RateInfo > >', u'ns3::MinstrelRate') typehandlers.add_type_alias(u'std::vector< ns3::RateInfo, std::allocator< ns3::RateInfo > >*', u'ns3::MinstrelRate*') typehandlers.add_type_alias(u'std::vector< ns3::RateInfo, std::allocator< ns3::RateInfo > >&', u'ns3::MinstrelRate&') typehandlers.add_type_alias(u'std::vector< ns3::WifiMode, std::allocator< ns3::WifiMode > >', u'ns3::WifiModeList') typehandlers.add_type_alias(u'std::vector< ns3::WifiMode, std::allocator< ns3::WifiMode > >*', u'ns3::WifiModeList*') typehandlers.add_type_alias(u'std::vector< ns3::WifiMode, std::allocator< ns3::WifiMode > >&', u'ns3::WifiModeList&') typehandlers.add_type_alias(u'ns3::Vector3DValue', u'ns3::VectorValue') typehandlers.add_type_alias(u'ns3::Vector3DValue*', u'ns3::VectorValue*') typehandlers.add_type_alias(u'ns3::Vector3DValue&', u'ns3::VectorValue&') module.add_typedef(root_module['ns3::Vector3DValue'], 'VectorValue') typehandlers.add_type_alias(u'std::vector< std::vector< unsigned int, std::allocator< unsigned int > >, std::allocator< std::vector< unsigned int, std::allocator< unsigned int > > > >', u'ns3::SampleRate') typehandlers.add_type_alias(u'std::vector< std::vector< unsigned int, std::allocator< unsigned int > >, std::allocator< std::vector< unsigned int, std::allocator< unsigned int > > > >*', u'ns3::SampleRate*') typehandlers.add_type_alias(u'std::vector< std::vector< unsigned int, std::allocator< unsigned int > >, std::allocator< std::vector< unsigned int, std::allocator< unsigned int > > > >&', u'ns3::SampleRate&') typehandlers.add_type_alias(u'ns3::Vector3DChecker', u'ns3::VectorChecker') typehandlers.add_type_alias(u'ns3::Vector3DChecker*', u'ns3::VectorChecker*') typehandlers.add_type_alias(u'ns3::Vector3DChecker&', u'ns3::VectorChecker&') module.add_typedef(root_module['ns3::Vector3DChecker'], 'VectorChecker') typehandlers.add_type_alias(u'__gnu_cxx::__normal_iterator< unsigned char const *, std::vector< unsigned char, std::allocator< unsigned char > > >', u'ns3::WifiMcsListIterator') typehandlers.add_type_alias(u'__gnu_cxx::__normal_iterator< unsigned char const *, std::vector< unsigned char, std::allocator< unsigned char > > >*', u'ns3::WifiMcsListIterator*') typehandlers.add_type_alias(u'__gnu_cxx::__normal_iterator< unsigned char const *, std::vector< unsigned char, std::allocator< unsigned char > > >&', u'ns3::WifiMcsListIterator&') ## Register a nested module for the namespace FatalImpl nested_module = module.add_cpp_namespace('FatalImpl') register_types_ns3_FatalImpl(nested_module) ## Register a nested module for the namespace Hash nested_module = module.add_cpp_namespace('Hash') register_types_ns3_Hash(nested_module) ## Register a nested module for the namespace internal nested_module = module.add_cpp_namespace('internal') register_types_ns3_internal(nested_module) def register_types_ns3_FatalImpl(module): root_module = module.get_root() def register_types_ns3_Hash(module): root_module = module.get_root() ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >']) typehandlers.add_type_alias(u'uint64_t ( * ) ( char const *, size_t ) *', u'ns3::Hash::Hash64Function_ptr') typehandlers.add_type_alias(u'uint64_t ( * ) ( char const *, size_t ) **', u'ns3::Hash::Hash64Function_ptr*') typehandlers.add_type_alias(u'uint64_t ( * ) ( char const *, size_t ) *&', u'ns3::Hash::Hash64Function_ptr&') typehandlers.add_type_alias(u'uint32_t ( * ) ( char const *, size_t ) *', u'ns3::Hash::Hash32Function_ptr') typehandlers.add_type_alias(u'uint32_t ( * ) ( char const *, size_t ) **', u'ns3::Hash::Hash32Function_ptr*') typehandlers.add_type_alias(u'uint32_t ( * ) ( char const *, size_t ) *&', u'ns3::Hash::Hash32Function_ptr&') ## Register a nested module for the namespace Function nested_module = module.add_cpp_namespace('Function') register_types_ns3_Hash_Function(nested_module) def register_types_ns3_Hash_Function(module): root_module = module.get_root() ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) def register_types_ns3_internal(module): root_module = module.get_root() def register_methods(root_module): register_Ns3Address_methods(root_module, root_module['ns3::Address']) register_Ns3AsciiTraceHelper_methods(root_module, root_module['ns3::AsciiTraceHelper']) register_Ns3AsciiTraceHelperForDevice_methods(root_module, root_module['ns3::AsciiTraceHelperForDevice']) register_Ns3AthstatsHelper_methods(root_module, root_module['ns3::AthstatsHelper']) register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList']) register_Ns3AttributeConstructionListItem_methods(root_module, root_module['ns3::AttributeConstructionList::Item']) register_Ns3Bar_methods(root_module, root_module['ns3::Bar']) register_Ns3BlockAckAgreement_methods(root_module, root_module['ns3::BlockAckAgreement']) register_Ns3BlockAckCache_methods(root_module, root_module['ns3::BlockAckCache']) register_Ns3BlockAckManager_methods(root_module, root_module['ns3::BlockAckManager']) 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_Ns3CapabilityInformation_methods(root_module, root_module['ns3::CapabilityInformation']) register_Ns3DcfManager_methods(root_module, root_module['ns3::DcfManager']) register_Ns3DcfState_methods(root_module, root_module['ns3::DcfState']) register_Ns3DsssErrorRateModel_methods(root_module, root_module['ns3::DsssErrorRateModel']) register_Ns3EventId_methods(root_module, root_module['ns3::EventId']) register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3InterferenceHelper_methods(root_module, root_module['ns3::InterferenceHelper']) register_Ns3InterferenceHelperSnrPer_methods(root_module, root_module['ns3::InterferenceHelper::SnrPer']) 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_Ns3Mac48Address_methods(root_module, root_module['ns3::Mac48Address']) register_Ns3MacLowBlockAckEventListener_methods(root_module, root_module['ns3::MacLowBlockAckEventListener']) register_Ns3MacLowDcfListener_methods(root_module, root_module['ns3::MacLowDcfListener']) register_Ns3MacLowTransmissionListener_methods(root_module, root_module['ns3::MacLowTransmissionListener']) register_Ns3MacLowTransmissionParameters_methods(root_module, root_module['ns3::MacLowTransmissionParameters']) register_Ns3MacRxMiddle_methods(root_module, root_module['ns3::MacRxMiddle']) 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_Ns3OriginatorBlockAckAgreement_methods(root_module, root_module['ns3::OriginatorBlockAckAgreement']) 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_Ns3PropagationCache__Ns3JakesProcess_methods(root_module, root_module['ns3::PropagationCache< ns3::JakesProcess >']) register_Ns3RateInfo_methods(root_module, root_module['ns3::RateInfo']) 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_Ns3StatusCode_methods(root_module, root_module['ns3::StatusCode']) register_Ns3Tag_methods(root_module, root_module['ns3::Tag']) register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer']) register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit']) register_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_Ns3Vector2D_methods(root_module, root_module['ns3::Vector2D']) register_Ns3Vector3D_methods(root_module, root_module['ns3::Vector3D']) register_Ns3WifiHelper_methods(root_module, root_module['ns3::WifiHelper']) register_Ns3WifiMacHelper_methods(root_module, root_module['ns3::WifiMacHelper']) register_Ns3WifiMode_methods(root_module, root_module['ns3::WifiMode']) register_Ns3WifiModeFactory_methods(root_module, root_module['ns3::WifiModeFactory']) register_Ns3WifiPhyHelper_methods(root_module, root_module['ns3::WifiPhyHelper']) register_Ns3WifiPhyListener_methods(root_module, root_module['ns3::WifiPhyListener']) register_Ns3WifiRemoteStation_methods(root_module, root_module['ns3::WifiRemoteStation']) register_Ns3WifiRemoteStationInfo_methods(root_module, root_module['ns3::WifiRemoteStationInfo']) register_Ns3WifiRemoteStationState_methods(root_module, root_module['ns3::WifiRemoteStationState']) register_Ns3WifiTxVector_methods(root_module, root_module['ns3::WifiTxVector']) register_Ns3YansWifiChannelHelper_methods(root_module, root_module['ns3::YansWifiChannelHelper']) register_Ns3YansWifiPhyHelper_methods(root_module, root_module['ns3::YansWifiPhyHelper']) register_Ns3Empty_methods(root_module, root_module['ns3::empty']) register_Ns3Int64x64_t_methods(root_module, root_module['ns3::int64x64_t']) register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk']) register_Ns3Header_methods(root_module, root_module['ns3::Header']) register_Ns3MgtAddBaRequestHeader_methods(root_module, root_module['ns3::MgtAddBaRequestHeader']) register_Ns3MgtAddBaResponseHeader_methods(root_module, root_module['ns3::MgtAddBaResponseHeader']) register_Ns3MgtAssocRequestHeader_methods(root_module, root_module['ns3::MgtAssocRequestHeader']) register_Ns3MgtAssocResponseHeader_methods(root_module, root_module['ns3::MgtAssocResponseHeader']) register_Ns3MgtDelBaHeader_methods(root_module, root_module['ns3::MgtDelBaHeader']) register_Ns3MgtProbeRequestHeader_methods(root_module, root_module['ns3::MgtProbeRequestHeader']) register_Ns3MgtProbeResponseHeader_methods(root_module, root_module['ns3::MgtProbeResponseHeader']) register_Ns3NqosWifiMacHelper_methods(root_module, root_module['ns3::NqosWifiMacHelper']) register_Ns3Object_methods(root_module, root_module['ns3::Object']) register_Ns3ObjectAggregateIterator_methods(root_module, root_module['ns3::Object::AggregateIterator']) register_Ns3PcapFileWrapper_methods(root_module, root_module['ns3::PcapFileWrapper']) register_Ns3PropagationDelayModel_methods(root_module, root_module['ns3::PropagationDelayModel']) register_Ns3PropagationLossModel_methods(root_module, root_module['ns3::PropagationLossModel']) register_Ns3QosTag_methods(root_module, root_module['ns3::QosTag']) register_Ns3QosWifiMacHelper_methods(root_module, root_module['ns3::QosWifiMacHelper']) register_Ns3RandomPropagationDelayModel_methods(root_module, root_module['ns3::RandomPropagationDelayModel']) register_Ns3RandomPropagationLossModel_methods(root_module, root_module['ns3::RandomPropagationLossModel']) register_Ns3RandomVariableStream_methods(root_module, root_module['ns3::RandomVariableStream']) register_Ns3RangePropagationLossModel_methods(root_module, root_module['ns3::RangePropagationLossModel']) register_Ns3SequentialRandomVariable_methods(root_module, root_module['ns3::SequentialRandomVariable']) register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >']) register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >']) register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >']) register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >']) register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >']) register_Ns3SimpleRefCount__Ns3InterferenceHelperEvent_Ns3Empty_Ns3DefaultDeleter__lt__ns3InterferenceHelperEvent__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::InterferenceHelper::Event, ns3::empty, ns3::DefaultDeleter<ns3::InterferenceHelper::Event> >']) 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_Ns3SimpleRefCount__Ns3WifiInformationElement_Ns3Empty_Ns3DefaultDeleter__lt__ns3WifiInformationElement__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::WifiInformationElement, ns3::empty, ns3::DefaultDeleter<ns3::WifiInformationElement> >']) register_Ns3SnrTag_methods(root_module, root_module['ns3::SnrTag']) register_Ns3ThreeLogDistancePropagationLossModel_methods(root_module, root_module['ns3::ThreeLogDistancePropagationLossModel']) register_Ns3Time_methods(root_module, root_module['ns3::Time']) register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor']) register_Ns3Trailer_methods(root_module, root_module['ns3::Trailer']) register_Ns3TriangularRandomVariable_methods(root_module, root_module['ns3::TriangularRandomVariable']) register_Ns3TwoRayGroundPropagationLossModel_methods(root_module, root_module['ns3::TwoRayGroundPropagationLossModel']) register_Ns3UniformRandomVariable_methods(root_module, root_module['ns3::UniformRandomVariable']) register_Ns3WeibullRandomVariable_methods(root_module, root_module['ns3::WeibullRandomVariable']) register_Ns3WifiActionHeader_methods(root_module, root_module['ns3::WifiActionHeader']) register_Ns3WifiActionHeaderActionValue_methods(root_module, root_module['ns3::WifiActionHeader::ActionValue']) register_Ns3WifiInformationElement_methods(root_module, root_module['ns3::WifiInformationElement']) register_Ns3WifiInformationElementVector_methods(root_module, root_module['ns3::WifiInformationElementVector']) register_Ns3WifiMac_methods(root_module, root_module['ns3::WifiMac']) register_Ns3WifiMacHeader_methods(root_module, root_module['ns3::WifiMacHeader']) register_Ns3WifiMacQueue_methods(root_module, root_module['ns3::WifiMacQueue']) register_Ns3WifiMacTrailer_methods(root_module, root_module['ns3::WifiMacTrailer']) register_Ns3WifiPhy_methods(root_module, root_module['ns3::WifiPhy']) register_Ns3WifiPhyStateHelper_methods(root_module, root_module['ns3::WifiPhyStateHelper']) register_Ns3WifiRemoteStationManager_methods(root_module, root_module['ns3::WifiRemoteStationManager']) register_Ns3YansWifiPhy_methods(root_module, root_module['ns3::YansWifiPhy']) register_Ns3ZetaRandomVariable_methods(root_module, root_module['ns3::ZetaRandomVariable']) register_Ns3ZipfRandomVariable_methods(root_module, root_module['ns3::ZipfRandomVariable']) register_Ns3AarfWifiManager_methods(root_module, root_module['ns3::AarfWifiManager']) register_Ns3AarfcdWifiManager_methods(root_module, root_module['ns3::AarfcdWifiManager']) register_Ns3AmrrWifiManager_methods(root_module, root_module['ns3::AmrrWifiManager']) register_Ns3AmsduSubframeHeader_methods(root_module, root_module['ns3::AmsduSubframeHeader']) register_Ns3ArfWifiManager_methods(root_module, root_module['ns3::ArfWifiManager']) register_Ns3AthstatsWifiTraceSink_methods(root_module, root_module['ns3::AthstatsWifiTraceSink']) 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_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_Ns3CaraWifiManager_methods(root_module, root_module['ns3::CaraWifiManager']) register_Ns3Channel_methods(root_module, root_module['ns3::Channel']) register_Ns3ConstantRandomVariable_methods(root_module, root_module['ns3::ConstantRandomVariable']) register_Ns3ConstantRateWifiManager_methods(root_module, root_module['ns3::ConstantRateWifiManager']) register_Ns3ConstantSpeedPropagationDelayModel_methods(root_module, root_module['ns3::ConstantSpeedPropagationDelayModel']) register_Ns3Cost231PropagationLossModel_methods(root_module, root_module['ns3::Cost231PropagationLossModel']) register_Ns3CtrlBAckRequestHeader_methods(root_module, root_module['ns3::CtrlBAckRequestHeader']) register_Ns3CtrlBAckResponseHeader_methods(root_module, root_module['ns3::CtrlBAckResponseHeader']) register_Ns3Dcf_methods(root_module, root_module['ns3::Dcf']) register_Ns3DeterministicRandomVariable_methods(root_module, root_module['ns3::DeterministicRandomVariable']) register_Ns3DoubleValue_methods(root_module, root_module['ns3::DoubleValue']) register_Ns3EdcaTxopN_methods(root_module, root_module['ns3::EdcaTxopN']) register_Ns3EmpiricalRandomVariable_methods(root_module, root_module['ns3::EmpiricalRandomVariable']) register_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue']) register_Ns3ErlangRandomVariable_methods(root_module, root_module['ns3::ErlangRandomVariable']) register_Ns3ErrorRateModel_methods(root_module, root_module['ns3::ErrorRateModel']) register_Ns3EventImpl_methods(root_module, root_module['ns3::EventImpl']) register_Ns3ExponentialRandomVariable_methods(root_module, root_module['ns3::ExponentialRandomVariable']) register_Ns3ExtendedSupportedRatesIE_methods(root_module, root_module['ns3::ExtendedSupportedRatesIE']) register_Ns3FixedRssLossModel_methods(root_module, root_module['ns3::FixedRssLossModel']) register_Ns3FriisPropagationLossModel_methods(root_module, root_module['ns3::FriisPropagationLossModel']) register_Ns3GammaRandomVariable_methods(root_module, root_module['ns3::GammaRandomVariable']) register_Ns3HtCapabilities_methods(root_module, root_module['ns3::HtCapabilities']) register_Ns3HtCapabilitiesChecker_methods(root_module, root_module['ns3::HtCapabilitiesChecker']) register_Ns3HtCapabilitiesValue_methods(root_module, root_module['ns3::HtCapabilitiesValue']) register_Ns3HtWifiMacHelper_methods(root_module, root_module['ns3::HtWifiMacHelper']) register_Ns3IdealWifiManager_methods(root_module, root_module['ns3::IdealWifiManager']) 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_Ns3ItuR1411LosPropagationLossModel_methods(root_module, root_module['ns3::ItuR1411LosPropagationLossModel']) register_Ns3ItuR1411NlosOverRooftopPropagationLossModel_methods(root_module, root_module['ns3::ItuR1411NlosOverRooftopPropagationLossModel']) register_Ns3JakesProcess_methods(root_module, root_module['ns3::JakesProcess']) register_Ns3JakesPropagationLossModel_methods(root_module, root_module['ns3::JakesPropagationLossModel']) register_Ns3Kun2600MhzPropagationLossModel_methods(root_module, root_module['ns3::Kun2600MhzPropagationLossModel']) register_Ns3LogDistancePropagationLossModel_methods(root_module, root_module['ns3::LogDistancePropagationLossModel']) register_Ns3LogNormalRandomVariable_methods(root_module, root_module['ns3::LogNormalRandomVariable']) register_Ns3Mac48AddressChecker_methods(root_module, root_module['ns3::Mac48AddressChecker']) register_Ns3Mac48AddressValue_methods(root_module, root_module['ns3::Mac48AddressValue']) register_Ns3MacLow_methods(root_module, root_module['ns3::MacLow']) register_Ns3MatrixPropagationLossModel_methods(root_module, root_module['ns3::MatrixPropagationLossModel']) register_Ns3MgtBeaconHeader_methods(root_module, root_module['ns3::MgtBeaconHeader']) register_Ns3MinstrelWifiManager_methods(root_module, root_module['ns3::MinstrelWifiManager']) register_Ns3MobilityModel_methods(root_module, root_module['ns3::MobilityModel']) register_Ns3MsduAggregator_methods(root_module, root_module['ns3::MsduAggregator']) register_Ns3NakagamiPropagationLossModel_methods(root_module, root_module['ns3::NakagamiPropagationLossModel']) register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice']) register_Ns3NistErrorRateModel_methods(root_module, root_module['ns3::NistErrorRateModel']) register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector']) register_Ns3Node_methods(root_module, root_module['ns3::Node']) register_Ns3NormalRandomVariable_methods(root_module, root_module['ns3::NormalRandomVariable']) register_Ns3ObjectFactoryChecker_methods(root_module, root_module['ns3::ObjectFactoryChecker']) register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue']) register_Ns3OkumuraHataPropagationLossModel_methods(root_module, root_module['ns3::OkumuraHataPropagationLossModel']) register_Ns3OnoeWifiManager_methods(root_module, root_module['ns3::OnoeWifiManager']) register_Ns3OutputStreamWrapper_methods(root_module, root_module['ns3::OutputStreamWrapper']) register_Ns3Packet_methods(root_module, root_module['ns3::Packet']) register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable']) register_Ns3RegularWifiMac_methods(root_module, root_module['ns3::RegularWifiMac']) register_Ns3RraaWifiManager_methods(root_module, root_module['ns3::RraaWifiManager']) register_Ns3Ssid_methods(root_module, root_module['ns3::Ssid']) register_Ns3SsidChecker_methods(root_module, root_module['ns3::SsidChecker']) register_Ns3SsidValue_methods(root_module, root_module['ns3::SsidValue']) register_Ns3StaWifiMac_methods(root_module, root_module['ns3::StaWifiMac']) register_Ns3SupportedRates_methods(root_module, root_module['ns3::SupportedRates']) 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_Ns3Vector2DChecker_methods(root_module, root_module['ns3::Vector2DChecker']) register_Ns3Vector2DValue_methods(root_module, root_module['ns3::Vector2DValue']) register_Ns3Vector3DChecker_methods(root_module, root_module['ns3::Vector3DChecker']) register_Ns3Vector3DValue_methods(root_module, root_module['ns3::Vector3DValue']) register_Ns3WifiChannel_methods(root_module, root_module['ns3::WifiChannel']) register_Ns3WifiModeChecker_methods(root_module, root_module['ns3::WifiModeChecker']) register_Ns3WifiModeValue_methods(root_module, root_module['ns3::WifiModeValue']) register_Ns3WifiNetDevice_methods(root_module, root_module['ns3::WifiNetDevice']) register_Ns3YansErrorRateModel_methods(root_module, root_module['ns3::YansErrorRateModel']) register_Ns3YansWifiChannel_methods(root_module, root_module['ns3::YansWifiChannel']) register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker']) register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue']) register_Ns3AdhocWifiMac_methods(root_module, root_module['ns3::AdhocWifiMac']) register_Ns3ApWifiMac_methods(root_module, root_module['ns3::ApWifiMac']) register_Ns3DcaTxop_methods(root_module, root_module['ns3::DcaTxop']) register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3Address_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('<') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## address.h (module 'network'): ns3::Address::Address() [constructor] cls.add_constructor([]) ## address.h (module 'network'): ns3::Address::Address(uint8_t type, uint8_t const * buffer, uint8_t len) [constructor] cls.add_constructor([param('uint8_t', 'type'), param('uint8_t const *', 'buffer'), param('uint8_t', 'len')]) ## address.h (module 'network'): ns3::Address::Address(ns3::Address const & address) [copy constructor] cls.add_constructor([param('ns3::Address const &', 'address')]) ## address.h (module 'network'): bool ns3::Address::CheckCompatible(uint8_t type, uint8_t len) const [member function] cls.add_method('CheckCompatible', 'bool', [param('uint8_t', 'type'), param('uint8_t', 'len')], is_const=True) ## address.h (module 'network'): uint32_t ns3::Address::CopyAllFrom(uint8_t const * buffer, uint8_t len) [member function] cls.add_method('CopyAllFrom', 'uint32_t', [param('uint8_t const *', 'buffer'), param('uint8_t', 'len')]) ## address.h (module 'network'): uint32_t ns3::Address::CopyAllTo(uint8_t * buffer, uint8_t len) const [member function] cls.add_method('CopyAllTo', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint8_t', 'len')], is_const=True) ## address.h (module 'network'): uint32_t ns3::Address::CopyFrom(uint8_t const * buffer, uint8_t len) [member function] cls.add_method('CopyFrom', 'uint32_t', [param('uint8_t const *', 'buffer'), param('uint8_t', 'len')]) ## address.h (module 'network'): uint32_t ns3::Address::CopyTo(uint8_t * buffer) const [member function] cls.add_method('CopyTo', 'uint32_t', [param('uint8_t *', 'buffer')], is_const=True) ## address.h (module 'network'): void ns3::Address::Deserialize(ns3::TagBuffer buffer) [member function] cls.add_method('Deserialize', 'void', [param('ns3::TagBuffer', 'buffer')]) ## address.h (module 'network'): uint8_t ns3::Address::GetLength() const [member function] cls.add_method('GetLength', 'uint8_t', [], is_const=True) ## address.h (module 'network'): uint32_t ns3::Address::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## address.h (module 'network'): bool ns3::Address::IsInvalid() const [member function] cls.add_method('IsInvalid', 'bool', [], is_const=True) ## address.h (module 'network'): bool ns3::Address::IsMatchingType(uint8_t type) const [member function] cls.add_method('IsMatchingType', 'bool', [param('uint8_t', 'type')], is_const=True) ## address.h (module 'network'): static uint8_t ns3::Address::Register() [member function] cls.add_method('Register', 'uint8_t', [], is_static=True) ## address.h (module 'network'): void ns3::Address::Serialize(ns3::TagBuffer buffer) const [member function] cls.add_method('Serialize', 'void', [param('ns3::TagBuffer', 'buffer')], is_const=True) return def register_Ns3AsciiTraceHelper_methods(root_module, cls): ## trace-helper.h (module 'network'): ns3::AsciiTraceHelper::AsciiTraceHelper(ns3::AsciiTraceHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::AsciiTraceHelper const &', 'arg0')]) ## trace-helper.h (module 'network'): ns3::AsciiTraceHelper::AsciiTraceHelper() [constructor] cls.add_constructor([]) ## trace-helper.h (module 'network'): ns3::Ptr<ns3::OutputStreamWrapper> ns3::AsciiTraceHelper::CreateFileStream(std::string filename, std::_Ios_Openmode filemode=std::ios_base::out) [member function] cls.add_method('CreateFileStream', 'ns3::Ptr< ns3::OutputStreamWrapper >', [param('std::string', 'filename'), param('std::_Ios_Openmode', 'filemode', default_value='std::ios_base::out')]) ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDequeueSinkWithContext(ns3::Ptr<ns3::OutputStreamWrapper> file, std::string context, ns3::Ptr<ns3::Packet const> 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<ns3::Packet const> 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<ns3::Packet const> 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<ns3::Packet const> 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<ns3::Packet const> 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<ns3::Packet const> 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<ns3::Packet const> 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<ns3::Packet const> 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_Ns3AthstatsHelper_methods(root_module, cls): ## athstats-helper.h (module 'wifi'): ns3::AthstatsHelper::AthstatsHelper(ns3::AthstatsHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::AthstatsHelper const &', 'arg0')]) ## athstats-helper.h (module 'wifi'): ns3::AthstatsHelper::AthstatsHelper() [constructor] cls.add_constructor([]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsHelper::EnableAthstats(std::string filename, uint32_t nodeid, uint32_t deviceid) [member function] cls.add_method('EnableAthstats', 'void', [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsHelper::EnableAthstats(std::string filename, ns3::Ptr<ns3::NetDevice> nd) [member function] cls.add_method('EnableAthstats', 'void', [param('std::string', 'filename'), param('ns3::Ptr< ns3::NetDevice >', 'nd')]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsHelper::EnableAthstats(std::string filename, ns3::NetDeviceContainer d) [member function] cls.add_method('EnableAthstats', 'void', [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd')]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsHelper::EnableAthstats(std::string filename, ns3::NodeContainer n) [member function] cls.add_method('EnableAthstats', 'void', [param('std::string', 'filename'), param('ns3::NodeContainer', 'n')]) 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_Ns3Bar_methods(root_module, cls): ## block-ack-manager.h (module 'wifi'): ns3::Bar::Bar(ns3::Bar const & arg0) [copy constructor] cls.add_constructor([param('ns3::Bar const &', 'arg0')]) ## block-ack-manager.h (module 'wifi'): ns3::Bar::Bar() [constructor] cls.add_constructor([]) ## block-ack-manager.h (module 'wifi'): ns3::Bar::Bar(ns3::Ptr<ns3::Packet const> packet, ns3::Mac48Address recipient, uint8_t tid, bool immediate) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid'), param('bool', 'immediate')]) ## block-ack-manager.h (module 'wifi'): ns3::Bar::bar [variable] cls.add_instance_attribute('bar', 'ns3::Ptr< ns3::Packet const >', is_const=False) ## block-ack-manager.h (module 'wifi'): ns3::Bar::immediate [variable] cls.add_instance_attribute('immediate', 'bool', is_const=False) ## block-ack-manager.h (module 'wifi'): ns3::Bar::recipient [variable] cls.add_instance_attribute('recipient', 'ns3::Mac48Address', is_const=False) ## block-ack-manager.h (module 'wifi'): ns3::Bar::tid [variable] cls.add_instance_attribute('tid', 'uint8_t', is_const=False) return def register_Ns3BlockAckAgreement_methods(root_module, cls): ## block-ack-agreement.h (module 'wifi'): ns3::BlockAckAgreement::BlockAckAgreement(ns3::BlockAckAgreement const & arg0) [copy constructor] cls.add_constructor([param('ns3::BlockAckAgreement const &', 'arg0')]) ## block-ack-agreement.h (module 'wifi'): ns3::BlockAckAgreement::BlockAckAgreement() [constructor] cls.add_constructor([]) ## block-ack-agreement.h (module 'wifi'): ns3::BlockAckAgreement::BlockAckAgreement(ns3::Mac48Address peer, uint8_t tid) [constructor] cls.add_constructor([param('ns3::Mac48Address', 'peer'), param('uint8_t', 'tid')]) ## block-ack-agreement.h (module 'wifi'): uint16_t ns3::BlockAckAgreement::GetBufferSize() const [member function] cls.add_method('GetBufferSize', 'uint16_t', [], is_const=True) ## block-ack-agreement.h (module 'wifi'): ns3::Mac48Address ns3::BlockAckAgreement::GetPeer() const [member function] cls.add_method('GetPeer', 'ns3::Mac48Address', [], is_const=True) ## block-ack-agreement.h (module 'wifi'): uint16_t ns3::BlockAckAgreement::GetStartingSequence() const [member function] cls.add_method('GetStartingSequence', 'uint16_t', [], is_const=True) ## block-ack-agreement.h (module 'wifi'): uint16_t ns3::BlockAckAgreement::GetStartingSequenceControl() const [member function] cls.add_method('GetStartingSequenceControl', 'uint16_t', [], is_const=True) ## block-ack-agreement.h (module 'wifi'): uint8_t ns3::BlockAckAgreement::GetTid() const [member function] cls.add_method('GetTid', 'uint8_t', [], is_const=True) ## block-ack-agreement.h (module 'wifi'): uint16_t ns3::BlockAckAgreement::GetTimeout() const [member function] cls.add_method('GetTimeout', 'uint16_t', [], is_const=True) ## block-ack-agreement.h (module 'wifi'): bool ns3::BlockAckAgreement::IsAmsduSupported() const [member function] cls.add_method('IsAmsduSupported', 'bool', [], is_const=True) ## block-ack-agreement.h (module 'wifi'): bool ns3::BlockAckAgreement::IsImmediateBlockAck() const [member function] cls.add_method('IsImmediateBlockAck', 'bool', [], is_const=True) ## block-ack-agreement.h (module 'wifi'): void ns3::BlockAckAgreement::SetAmsduSupport(bool supported) [member function] cls.add_method('SetAmsduSupport', 'void', [param('bool', 'supported')]) ## block-ack-agreement.h (module 'wifi'): void ns3::BlockAckAgreement::SetBufferSize(uint16_t bufferSize) [member function] cls.add_method('SetBufferSize', 'void', [param('uint16_t', 'bufferSize')]) ## block-ack-agreement.h (module 'wifi'): void ns3::BlockAckAgreement::SetDelayedBlockAck() [member function] cls.add_method('SetDelayedBlockAck', 'void', []) ## block-ack-agreement.h (module 'wifi'): void ns3::BlockAckAgreement::SetImmediateBlockAck() [member function] cls.add_method('SetImmediateBlockAck', 'void', []) ## block-ack-agreement.h (module 'wifi'): void ns3::BlockAckAgreement::SetStartingSequence(uint16_t seq) [member function] cls.add_method('SetStartingSequence', 'void', [param('uint16_t', 'seq')]) ## block-ack-agreement.h (module 'wifi'): void ns3::BlockAckAgreement::SetTimeout(uint16_t timeout) [member function] cls.add_method('SetTimeout', 'void', [param('uint16_t', 'timeout')]) return def register_Ns3BlockAckCache_methods(root_module, cls): ## block-ack-cache.h (module 'wifi'): ns3::BlockAckCache::BlockAckCache() [constructor] cls.add_constructor([]) ## block-ack-cache.h (module 'wifi'): ns3::BlockAckCache::BlockAckCache(ns3::BlockAckCache const & arg0) [copy constructor] cls.add_constructor([param('ns3::BlockAckCache const &', 'arg0')]) ## block-ack-cache.h (module 'wifi'): void ns3::BlockAckCache::FillBlockAckBitmap(ns3::CtrlBAckResponseHeader * blockAckHeader) [member function] cls.add_method('FillBlockAckBitmap', 'void', [param('ns3::CtrlBAckResponseHeader *', 'blockAckHeader')]) ## block-ack-cache.h (module 'wifi'): void ns3::BlockAckCache::Init(uint16_t winStart, uint16_t winSize) [member function] cls.add_method('Init', 'void', [param('uint16_t', 'winStart'), param('uint16_t', 'winSize')]) ## block-ack-cache.h (module 'wifi'): void ns3::BlockAckCache::UpdateWithBlockAckReq(uint16_t startingSeq) [member function] cls.add_method('UpdateWithBlockAckReq', 'void', [param('uint16_t', 'startingSeq')]) ## block-ack-cache.h (module 'wifi'): void ns3::BlockAckCache::UpdateWithMpdu(ns3::WifiMacHeader const * hdr) [member function] cls.add_method('UpdateWithMpdu', 'void', [param('ns3::WifiMacHeader const *', 'hdr')]) return def register_Ns3BlockAckManager_methods(root_module, cls): ## block-ack-manager.h (module 'wifi'): ns3::BlockAckManager::BlockAckManager() [constructor] cls.add_constructor([]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::CreateAgreement(ns3::MgtAddBaRequestHeader const * reqHdr, ns3::Mac48Address recipient) [member function] cls.add_method('CreateAgreement', 'void', [param('ns3::MgtAddBaRequestHeader const *', 'reqHdr'), param('ns3::Mac48Address', 'recipient')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::DestroyAgreement(ns3::Mac48Address recipient, uint8_t tid) [member function] cls.add_method('DestroyAgreement', 'void', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')]) ## block-ack-manager.h (module 'wifi'): bool ns3::BlockAckManager::ExistsAgreement(ns3::Mac48Address recipient, uint8_t tid) const [member function] cls.add_method('ExistsAgreement', 'bool', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')], is_const=True) ## block-ack-manager.h (module 'wifi'): bool ns3::BlockAckManager::ExistsAgreementInState(ns3::Mac48Address recipient, uint8_t tid, ns3::OriginatorBlockAckAgreement::State state) const [member function] cls.add_method('ExistsAgreementInState', 'bool', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid'), param('ns3::OriginatorBlockAckAgreement::State', 'state')], is_const=True) ## block-ack-manager.h (module 'wifi'): uint32_t ns3::BlockAckManager::GetNBufferedPackets(ns3::Mac48Address recipient, uint8_t tid) const [member function] cls.add_method('GetNBufferedPackets', 'uint32_t', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')], is_const=True) ## block-ack-manager.h (module 'wifi'): uint32_t ns3::BlockAckManager::GetNRetryNeededPackets(ns3::Mac48Address recipient, uint8_t tid) const [member function] cls.add_method('GetNRetryNeededPackets', 'uint32_t', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')], is_const=True) ## block-ack-manager.h (module 'wifi'): ns3::Ptr<ns3::Packet const> ns3::BlockAckManager::GetNextPacket(ns3::WifiMacHeader & hdr) [member function] cls.add_method('GetNextPacket', 'ns3::Ptr< ns3::Packet const >', [param('ns3::WifiMacHeader &', 'hdr')]) ## block-ack-manager.h (module 'wifi'): uint32_t ns3::BlockAckManager::GetNextPacketSize() const [member function] cls.add_method('GetNextPacketSize', 'uint32_t', [], is_const=True) ## block-ack-manager.h (module 'wifi'): uint16_t ns3::BlockAckManager::GetSeqNumOfNextRetryPacket(ns3::Mac48Address recipient, uint8_t tid) const [member function] cls.add_method('GetSeqNumOfNextRetryPacket', 'uint16_t', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')], is_const=True) ## block-ack-manager.h (module 'wifi'): bool ns3::BlockAckManager::HasBar(ns3::Bar & bar) [member function] cls.add_method('HasBar', 'bool', [param('ns3::Bar &', 'bar')]) ## block-ack-manager.h (module 'wifi'): bool ns3::BlockAckManager::HasOtherFragments(uint16_t sequenceNumber) const [member function] cls.add_method('HasOtherFragments', 'bool', [param('uint16_t', 'sequenceNumber')], is_const=True) ## block-ack-manager.h (module 'wifi'): bool ns3::BlockAckManager::HasPackets() const [member function] cls.add_method('HasPackets', 'bool', [], is_const=True) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::NotifyAgreementEstablished(ns3::Mac48Address recipient, uint8_t tid, uint16_t startingSeq) [member function] cls.add_method('NotifyAgreementEstablished', 'void', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid'), param('uint16_t', 'startingSeq')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::NotifyAgreementUnsuccessful(ns3::Mac48Address recipient, uint8_t tid) [member function] cls.add_method('NotifyAgreementUnsuccessful', 'void', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::NotifyGotBlockAck(ns3::CtrlBAckResponseHeader const * blockAck, ns3::Mac48Address recipient) [member function] cls.add_method('NotifyGotBlockAck', 'void', [param('ns3::CtrlBAckResponseHeader const *', 'blockAck'), param('ns3::Mac48Address', 'recipient')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::NotifyMpduTransmission(ns3::Mac48Address recipient, uint8_t tid, uint16_t nextSeqNumber) [member function] cls.add_method('NotifyMpduTransmission', 'void', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid'), param('uint16_t', 'nextSeqNumber')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::SetBlockAckInactivityCallback(ns3::Callback<void, ns3::Mac48Address, unsigned char, bool, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetBlockAckInactivityCallback', 'void', [param('ns3::Callback< void, ns3::Mac48Address, unsigned char, bool, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::SetBlockAckThreshold(uint8_t nPackets) [member function] cls.add_method('SetBlockAckThreshold', 'void', [param('uint8_t', 'nPackets')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::SetBlockAckType(ns3::BlockAckType bAckType) [member function] cls.add_method('SetBlockAckType', 'void', [param('ns3::BlockAckType', 'bAckType')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::SetBlockDestinationCallback(ns3::Callback<void, ns3::Mac48Address, unsigned char, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetBlockDestinationCallback', 'void', [param('ns3::Callback< void, ns3::Mac48Address, unsigned char, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::SetMaxPacketDelay(ns3::Time maxDelay) [member function] cls.add_method('SetMaxPacketDelay', 'void', [param('ns3::Time', 'maxDelay')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::SetQueue(ns3::Ptr<ns3::WifiMacQueue> queue) [member function] cls.add_method('SetQueue', 'void', [param('ns3::Ptr< ns3::WifiMacQueue >', 'queue')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::SetTxMiddle(ns3::MacTxMiddle * txMiddle) [member function] cls.add_method('SetTxMiddle', 'void', [param('ns3::MacTxMiddle *', 'txMiddle')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::SetUnblockDestinationCallback(ns3::Callback<void, ns3::Mac48Address, unsigned char, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetUnblockDestinationCallback', 'void', [param('ns3::Callback< void, ns3::Mac48Address, unsigned char, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::StorePacket(ns3::Ptr<ns3::Packet const> packet, ns3::WifiMacHeader const & hdr, ns3::Time tStamp) [member function] cls.add_method('StorePacket', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const &', 'hdr'), param('ns3::Time', 'tStamp')]) ## block-ack-manager.h (module 'wifi'): bool ns3::BlockAckManager::SwitchToBlockAckIfNeeded(ns3::Mac48Address recipient, uint8_t tid, uint16_t startingSeq) [member function] cls.add_method('SwitchToBlockAckIfNeeded', 'bool', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid'), param('uint16_t', 'startingSeq')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::TearDownBlockAck(ns3::Mac48Address recipient, uint8_t tid) [member function] cls.add_method('TearDownBlockAck', 'void', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')]) ## block-ack-manager.h (module 'wifi'): void ns3::BlockAckManager::UpdateAgreement(ns3::MgtAddBaResponseHeader const * respHdr, ns3::Mac48Address recipient) [member function] cls.add_method('UpdateAgreement', 'void', [param('ns3::MgtAddBaResponseHeader const *', 'respHdr'), param('ns3::Mac48Address', 'recipient')]) return def register_Ns3Buffer_methods(root_module, cls): ## buffer.h (module 'network'): ns3::Buffer::Buffer() [constructor] cls.add_constructor([]) ## buffer.h (module 'network'): ns3::Buffer::Buffer(uint32_t dataSize) [constructor] cls.add_constructor([param('uint32_t', 'dataSize')]) ## buffer.h (module 'network'): ns3::Buffer::Buffer(uint32_t dataSize, bool initialize) [constructor] cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')]) ## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor] cls.add_constructor([param('ns3::Buffer const &', 'o')]) ## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function] cls.add_method('AddAtEnd', 'bool', [param('uint32_t', 'end')]) ## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function] cls.add_method('AddAtEnd', 'void', [param('ns3::Buffer const &', 'o')]) ## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function] cls.add_method('AddAtStart', 'bool', [param('uint32_t', 'start')]) ## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function] cls.add_method('Begin', 'ns3::Buffer::Iterator', [], is_const=True) ## buffer.h (module 'network'): void ns3::Buffer::CopyData(std::ostream * os, uint32_t size) const [member function] cls.add_method('CopyData', 'void', [param('std::ostream *', 'os'), param('uint32_t', 'size')], is_const=True) ## buffer.h (module 'network'): uint32_t ns3::Buffer::CopyData(uint8_t * buffer, uint32_t size) const [member function] cls.add_method('CopyData', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint32_t', 'size')], is_const=True) ## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFragment(uint32_t start, uint32_t length) const [member function] cls.add_method('CreateFragment', 'ns3::Buffer', [param('uint32_t', 'start'), param('uint32_t', 'length')], is_const=True) ## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function] cls.add_method('CreateFullCopy', 'ns3::Buffer', [], is_const=True) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function] cls.add_method('Deserialize', 'uint32_t', [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) ## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::End() const [member function] cls.add_method('End', 'ns3::Buffer::Iterator', [], is_const=True) ## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function] cls.add_method('GetCurrentEndOffset', 'int32_t', [], is_const=True) ## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function] cls.add_method('GetCurrentStartOffset', 'int32_t', [], is_const=True) ## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSize() const [member function] cls.add_method('GetSize', 'uint32_t', [], is_const=True) ## buffer.h (module 'network'): uint8_t const * ns3::Buffer::PeekData() const [member function] cls.add_method('PeekData', 'uint8_t const *', [], is_const=True) ## buffer.h (module 'network'): void ns3::Buffer::RemoveAtEnd(uint32_t end) [member function] cls.add_method('RemoveAtEnd', 'void', [param('uint32_t', 'end')]) ## buffer.h (module 'network'): void ns3::Buffer::RemoveAtStart(uint32_t start) [member function] cls.add_method('RemoveAtStart', 'void', [param('uint32_t', 'start')]) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], is_const=True) return def register_Ns3BufferIterator_methods(root_module, cls): ## buffer.h (module 'network'): ns3::Buffer::Iterator::Iterator(ns3::Buffer::Iterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::Buffer::Iterator const &', 'arg0')]) ## buffer.h (module 'network'): ns3::Buffer::Iterator::Iterator() [constructor] cls.add_constructor([]) ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size) [member function] cls.add_method('CalculateIpChecksum', 'uint16_t', [param('uint16_t', 'size')]) ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size, uint32_t initialChecksum) [member function] cls.add_method('CalculateIpChecksum', 'uint16_t', [param('uint16_t', 'size'), param('uint32_t', 'initialChecksum')]) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::GetDistanceFrom(ns3::Buffer::Iterator const & o) const [member function] cls.add_method('GetDistanceFrom', 'uint32_t', [param('ns3::Buffer::Iterator const &', 'o')], is_const=True) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::GetSize() const [member function] cls.add_method('GetSize', 'uint32_t', [], is_const=True) ## buffer.h (module 'network'): bool ns3::Buffer::Iterator::IsEnd() const [member function] cls.add_method('IsEnd', 'bool', [], is_const=True) ## buffer.h (module 'network'): bool ns3::Buffer::Iterator::IsStart() const [member function] cls.add_method('IsStart', 'bool', [], is_const=True) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Next() [member function] cls.add_method('Next', 'void', []) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Next(uint32_t delta) [member function] cls.add_method('Next', 'void', [param('uint32_t', 'delta')]) ## buffer.h (module 'network'): uint8_t ns3::Buffer::Iterator::PeekU8() [member function] cls.add_method('PeekU8', 'uint8_t', []) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev() [member function] cls.add_method('Prev', 'void', []) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev(uint32_t delta) [member function] cls.add_method('Prev', 'void', [param('uint32_t', 'delta')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Read(uint8_t * buffer, uint32_t size) [member function] cls.add_method('Read', 'void', [param('uint8_t *', 'buffer'), param('uint32_t', 'size')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Read(ns3::Buffer::Iterator start, uint32_t size) [member function] cls.add_method('Read', 'void', [param('ns3::Buffer::Iterator', 'start'), param('uint32_t', 'size')]) ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadLsbtohU16() [member function] cls.add_method('ReadLsbtohU16', 'uint16_t', []) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadLsbtohU32() [member function] cls.add_method('ReadLsbtohU32', 'uint32_t', []) ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadLsbtohU64() [member function] cls.add_method('ReadLsbtohU64', 'uint64_t', []) ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadNtohU16() [member function] cls.add_method('ReadNtohU16', 'uint16_t', []) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadNtohU32() [member function] cls.add_method('ReadNtohU32', 'uint32_t', []) ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadNtohU64() [member function] cls.add_method('ReadNtohU64', 'uint64_t', []) ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadU16() [member function] cls.add_method('ReadU16', 'uint16_t', []) ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadU32() [member function] cls.add_method('ReadU32', 'uint32_t', []) ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadU64() [member function] cls.add_method('ReadU64', 'uint64_t', []) ## buffer.h (module 'network'): uint8_t ns3::Buffer::Iterator::ReadU8() [member function] cls.add_method('ReadU8', 'uint8_t', []) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Write(uint8_t const * buffer, uint32_t size) [member function] cls.add_method('Write', 'void', [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Write(ns3::Buffer::Iterator start, ns3::Buffer::Iterator end) [member function] cls.add_method('Write', 'void', [param('ns3::Buffer::Iterator', 'start'), param('ns3::Buffer::Iterator', 'end')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU16(uint16_t data) [member function] cls.add_method('WriteHtolsbU16', 'void', [param('uint16_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU32(uint32_t data) [member function] cls.add_method('WriteHtolsbU32', 'void', [param('uint32_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU64(uint64_t data) [member function] cls.add_method('WriteHtolsbU64', 'void', [param('uint64_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU16(uint16_t data) [member function] cls.add_method('WriteHtonU16', 'void', [param('uint16_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU32(uint32_t data) [member function] cls.add_method('WriteHtonU32', 'void', [param('uint32_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU64(uint64_t data) [member function] cls.add_method('WriteHtonU64', 'void', [param('uint64_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU16(uint16_t data) [member function] cls.add_method('WriteU16', 'void', [param('uint16_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU32(uint32_t data) [member function] cls.add_method('WriteU32', 'void', [param('uint32_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU64(uint64_t data) [member function] cls.add_method('WriteU64', 'void', [param('uint64_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU8(uint8_t data) [member function] cls.add_method('WriteU8', 'void', [param('uint8_t', 'data')]) ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU8(uint8_t data, uint32_t len) [member function] cls.add_method('WriteU8', 'void', [param('uint8_t', 'data'), param('uint32_t', 'len')]) return def register_Ns3ByteTagIterator_methods(root_module, cls): ## packet.h (module 'network'): ns3::ByteTagIterator::ByteTagIterator(ns3::ByteTagIterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::ByteTagIterator const &', 'arg0')]) ## packet.h (module 'network'): bool ns3::ByteTagIterator::HasNext() const [member function] cls.add_method('HasNext', 'bool', [], is_const=True) ## packet.h (module 'network'): ns3::ByteTagIterator::Item ns3::ByteTagIterator::Next() [member function] cls.add_method('Next', 'ns3::ByteTagIterator::Item', []) return def register_Ns3ByteTagIteratorItem_methods(root_module, cls): ## packet.h (module 'network'): ns3::ByteTagIterator::Item::Item(ns3::ByteTagIterator::Item const & arg0) [copy constructor] cls.add_constructor([param('ns3::ByteTagIterator::Item const &', 'arg0')]) ## packet.h (module 'network'): uint32_t ns3::ByteTagIterator::Item::GetEnd() const [member function] cls.add_method('GetEnd', 'uint32_t', [], is_const=True) ## packet.h (module 'network'): uint32_t ns3::ByteTagIterator::Item::GetStart() const [member function] cls.add_method('GetStart', 'uint32_t', [], is_const=True) ## packet.h (module 'network'): void ns3::ByteTagIterator::Item::GetTag(ns3::Tag & tag) const [member function] cls.add_method('GetTag', 'void', [param('ns3::Tag &', 'tag')], is_const=True) ## packet.h (module 'network'): ns3::TypeId ns3::ByteTagIterator::Item::GetTypeId() const [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_const=True) return def register_Ns3ByteTagList_methods(root_module, cls): ## byte-tag-list.h (module 'network'): ns3::ByteTagList::ByteTagList() [constructor] cls.add_constructor([]) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::ByteTagList(ns3::ByteTagList const & o) [copy constructor] cls.add_constructor([param('ns3::ByteTagList const &', 'o')]) ## byte-tag-list.h (module 'network'): ns3::TagBuffer ns3::ByteTagList::Add(ns3::TypeId tid, uint32_t bufferSize, int32_t start, int32_t end) [member function] cls.add_method('Add', 'ns3::TagBuffer', [param('ns3::TypeId', 'tid'), param('uint32_t', 'bufferSize'), param('int32_t', 'start'), param('int32_t', 'end')]) ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Add(ns3::ByteTagList const & o) [member function] cls.add_method('Add', 'void', [param('ns3::ByteTagList const &', 'o')]) ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function] cls.add_method('AddAtEnd', 'void', [param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')]) ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function] cls.add_method('AddAtStart', 'void', [param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')]) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function] cls.add_method('Begin', 'ns3::ByteTagList::Iterator', [param('int32_t', 'offsetStart'), param('int32_t', 'offsetEnd')], is_const=True) ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::RemoveAll() [member function] cls.add_method('RemoveAll', 'void', []) return def register_Ns3ByteTagListIterator_methods(root_module, cls): ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Iterator(ns3::ByteTagList::Iterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::ByteTagList::Iterator const &', 'arg0')]) ## byte-tag-list.h (module 'network'): uint32_t ns3::ByteTagList::Iterator::GetOffsetStart() const [member function] cls.add_method('GetOffsetStart', 'uint32_t', [], is_const=True) ## byte-tag-list.h (module 'network'): bool ns3::ByteTagList::Iterator::HasNext() const [member function] cls.add_method('HasNext', 'bool', [], is_const=True) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item ns3::ByteTagList::Iterator::Next() [member function] cls.add_method('Next', 'ns3::ByteTagList::Iterator::Item', []) return def register_Ns3ByteTagListIteratorItem_methods(root_module, cls): ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::Item(ns3::ByteTagList::Iterator::Item const & arg0) [copy constructor] cls.add_constructor([param('ns3::ByteTagList::Iterator::Item const &', 'arg0')]) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::Item(ns3::TagBuffer buf) [constructor] cls.add_constructor([param('ns3::TagBuffer', 'buf')]) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::buf [variable] cls.add_instance_attribute('buf', 'ns3::TagBuffer', is_const=False) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::end [variable] cls.add_instance_attribute('end', 'int32_t', is_const=False) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::size [variable] cls.add_instance_attribute('size', 'uint32_t', is_const=False) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::start [variable] cls.add_instance_attribute('start', 'int32_t', is_const=False) ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::tid [variable] cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) return def register_Ns3CallbackBase_methods(root_module, cls): ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase(ns3::CallbackBase const & arg0) [copy constructor] cls.add_constructor([param('ns3::CallbackBase const &', 'arg0')]) ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase() [constructor] cls.add_constructor([]) ## callback.h (module 'core'): ns3::Ptr<ns3::CallbackImplBase> ns3::CallbackBase::GetImpl() const [member function] cls.add_method('GetImpl', 'ns3::Ptr< ns3::CallbackImplBase >', [], is_const=True) ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase(ns3::Ptr<ns3::CallbackImplBase> impl) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::CallbackImplBase >', 'impl')], visibility='protected') ## callback.h (module 'core'): static std::string ns3::CallbackBase::Demangle(std::string const & mangled) [member function] cls.add_method('Demangle', 'std::string', [param('std::string const &', 'mangled')], is_static=True, visibility='protected') return def register_Ns3CapabilityInformation_methods(root_module, cls): ## capability-information.h (module 'wifi'): ns3::CapabilityInformation::CapabilityInformation(ns3::CapabilityInformation const & arg0) [copy constructor] cls.add_constructor([param('ns3::CapabilityInformation const &', 'arg0')]) ## capability-information.h (module 'wifi'): ns3::CapabilityInformation::CapabilityInformation() [constructor] cls.add_constructor([]) ## capability-information.h (module 'wifi'): ns3::Buffer::Iterator ns3::CapabilityInformation::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')]) ## capability-information.h (module 'wifi'): uint32_t ns3::CapabilityInformation::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## capability-information.h (module 'wifi'): bool ns3::CapabilityInformation::IsEss() const [member function] cls.add_method('IsEss', 'bool', [], is_const=True) ## capability-information.h (module 'wifi'): bool ns3::CapabilityInformation::IsIbss() const [member function] cls.add_method('IsIbss', 'bool', [], is_const=True) ## capability-information.h (module 'wifi'): ns3::Buffer::Iterator ns3::CapabilityInformation::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True) ## capability-information.h (module 'wifi'): void ns3::CapabilityInformation::SetEss() [member function] cls.add_method('SetEss', 'void', []) ## capability-information.h (module 'wifi'): void ns3::CapabilityInformation::SetIbss() [member function] cls.add_method('SetIbss', 'void', []) return def register_Ns3DcfManager_methods(root_module, cls): ## dcf-manager.h (module 'wifi'): ns3::DcfManager::DcfManager(ns3::DcfManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::DcfManager const &', 'arg0')]) ## dcf-manager.h (module 'wifi'): ns3::DcfManager::DcfManager() [constructor] cls.add_constructor([]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::Add(ns3::DcfState * dcf) [member function] cls.add_method('Add', 'void', [param('ns3::DcfState *', 'dcf')]) ## dcf-manager.h (module 'wifi'): ns3::Time ns3::DcfManager::GetEifsNoDifs() const [member function] cls.add_method('GetEifsNoDifs', 'ns3::Time', [], is_const=True) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifyAckTimeoutResetNow() [member function] cls.add_method('NotifyAckTimeoutResetNow', 'void', []) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifyAckTimeoutStartNow(ns3::Time duration) [member function] cls.add_method('NotifyAckTimeoutStartNow', 'void', [param('ns3::Time', 'duration')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifyCtsTimeoutResetNow() [member function] cls.add_method('NotifyCtsTimeoutResetNow', 'void', []) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifyCtsTimeoutStartNow(ns3::Time duration) [member function] cls.add_method('NotifyCtsTimeoutStartNow', 'void', [param('ns3::Time', 'duration')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifyMaybeCcaBusyStartNow(ns3::Time duration) [member function] cls.add_method('NotifyMaybeCcaBusyStartNow', 'void', [param('ns3::Time', 'duration')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifyNavResetNow(ns3::Time duration) [member function] cls.add_method('NotifyNavResetNow', 'void', [param('ns3::Time', 'duration')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifyNavStartNow(ns3::Time duration) [member function] cls.add_method('NotifyNavStartNow', 'void', [param('ns3::Time', 'duration')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifyRxEndErrorNow() [member function] cls.add_method('NotifyRxEndErrorNow', 'void', []) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifyRxEndOkNow() [member function] cls.add_method('NotifyRxEndOkNow', 'void', []) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifyRxStartNow(ns3::Time duration) [member function] cls.add_method('NotifyRxStartNow', 'void', [param('ns3::Time', 'duration')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifySleepNow() [member function] cls.add_method('NotifySleepNow', 'void', []) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifySwitchingStartNow(ns3::Time duration) [member function] cls.add_method('NotifySwitchingStartNow', 'void', [param('ns3::Time', 'duration')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifyTxStartNow(ns3::Time duration) [member function] cls.add_method('NotifyTxStartNow', 'void', [param('ns3::Time', 'duration')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::NotifyWakeupNow() [member function] cls.add_method('NotifyWakeupNow', 'void', []) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::RequestAccess(ns3::DcfState * state) [member function] cls.add_method('RequestAccess', 'void', [param('ns3::DcfState *', 'state')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::SetEifsNoDifs(ns3::Time eifsNoDifs) [member function] cls.add_method('SetEifsNoDifs', 'void', [param('ns3::Time', 'eifsNoDifs')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::SetSifs(ns3::Time sifs) [member function] cls.add_method('SetSifs', 'void', [param('ns3::Time', 'sifs')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::SetSlot(ns3::Time slotTime) [member function] cls.add_method('SetSlot', 'void', [param('ns3::Time', 'slotTime')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::SetupLowListener(ns3::Ptr<ns3::MacLow> low) [member function] cls.add_method('SetupLowListener', 'void', [param('ns3::Ptr< ns3::MacLow >', 'low')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfManager::SetupPhyListener(ns3::Ptr<ns3::WifiPhy> phy) [member function] cls.add_method('SetupPhyListener', 'void', [param('ns3::Ptr< ns3::WifiPhy >', 'phy')]) return def register_Ns3DcfState_methods(root_module, cls): ## dcf-manager.h (module 'wifi'): ns3::DcfState::DcfState(ns3::DcfState const & arg0) [copy constructor] cls.add_constructor([param('ns3::DcfState const &', 'arg0')]) ## dcf-manager.h (module 'wifi'): ns3::DcfState::DcfState() [constructor] cls.add_constructor([]) ## dcf-manager.h (module 'wifi'): uint32_t ns3::DcfState::GetAifsn() const [member function] cls.add_method('GetAifsn', 'uint32_t', [], is_const=True) ## dcf-manager.h (module 'wifi'): uint32_t ns3::DcfState::GetCw() const [member function] cls.add_method('GetCw', 'uint32_t', [], is_const=True) ## dcf-manager.h (module 'wifi'): uint32_t ns3::DcfState::GetCwMax() const [member function] cls.add_method('GetCwMax', 'uint32_t', [], is_const=True) ## dcf-manager.h (module 'wifi'): uint32_t ns3::DcfState::GetCwMin() const [member function] cls.add_method('GetCwMin', 'uint32_t', [], is_const=True) ## dcf-manager.h (module 'wifi'): bool ns3::DcfState::IsAccessRequested() const [member function] cls.add_method('IsAccessRequested', 'bool', [], is_const=True) ## dcf-manager.h (module 'wifi'): void ns3::DcfState::ResetCw() [member function] cls.add_method('ResetCw', 'void', []) ## dcf-manager.h (module 'wifi'): void ns3::DcfState::SetAifsn(uint32_t aifsn) [member function] cls.add_method('SetAifsn', 'void', [param('uint32_t', 'aifsn')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfState::SetCwMax(uint32_t maxCw) [member function] cls.add_method('SetCwMax', 'void', [param('uint32_t', 'maxCw')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfState::SetCwMin(uint32_t minCw) [member function] cls.add_method('SetCwMin', 'void', [param('uint32_t', 'minCw')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfState::StartBackoffNow(uint32_t nSlots) [member function] cls.add_method('StartBackoffNow', 'void', [param('uint32_t', 'nSlots')]) ## dcf-manager.h (module 'wifi'): void ns3::DcfState::UpdateFailedCw() [member function] cls.add_method('UpdateFailedCw', 'void', []) ## dcf-manager.h (module 'wifi'): void ns3::DcfState::DoNotifyAccessGranted() [member function] cls.add_method('DoNotifyAccessGranted', 'void', [], is_pure_virtual=True, visibility='private', is_virtual=True) ## dcf-manager.h (module 'wifi'): void ns3::DcfState::DoNotifyChannelSwitching() [member function] cls.add_method('DoNotifyChannelSwitching', 'void', [], is_pure_virtual=True, visibility='private', is_virtual=True) ## dcf-manager.h (module 'wifi'): void ns3::DcfState::DoNotifyCollision() [member function] cls.add_method('DoNotifyCollision', 'void', [], is_pure_virtual=True, visibility='private', is_virtual=True) ## dcf-manager.h (module 'wifi'): void ns3::DcfState::DoNotifyInternalCollision() [member function] cls.add_method('DoNotifyInternalCollision', 'void', [], is_pure_virtual=True, visibility='private', is_virtual=True) return def register_Ns3DsssErrorRateModel_methods(root_module, cls): ## dsss-error-rate-model.h (module 'wifi'): ns3::DsssErrorRateModel::DsssErrorRateModel() [constructor] cls.add_constructor([]) ## dsss-error-rate-model.h (module 'wifi'): ns3::DsssErrorRateModel::DsssErrorRateModel(ns3::DsssErrorRateModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::DsssErrorRateModel const &', 'arg0')]) ## dsss-error-rate-model.h (module 'wifi'): static double ns3::DsssErrorRateModel::DqpskFunction(double x) [member function] cls.add_method('DqpskFunction', 'double', [param('double', 'x')], is_static=True) ## dsss-error-rate-model.h (module 'wifi'): static double ns3::DsssErrorRateModel::GetDsssDbpskSuccessRate(double sinr, uint32_t nbits) [member function] cls.add_method('GetDsssDbpskSuccessRate', 'double', [param('double', 'sinr'), param('uint32_t', 'nbits')], is_static=True) ## dsss-error-rate-model.h (module 'wifi'): static double ns3::DsssErrorRateModel::GetDsssDqpskCck11SuccessRate(double sinr, uint32_t nbits) [member function] cls.add_method('GetDsssDqpskCck11SuccessRate', 'double', [param('double', 'sinr'), param('uint32_t', 'nbits')], is_static=True) ## dsss-error-rate-model.h (module 'wifi'): static double ns3::DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate(double sinr, uint32_t nbits) [member function] cls.add_method('GetDsssDqpskCck5_5SuccessRate', 'double', [param('double', 'sinr'), param('uint32_t', 'nbits')], is_static=True) ## dsss-error-rate-model.h (module 'wifi'): static double ns3::DsssErrorRateModel::GetDsssDqpskSuccessRate(double sinr, uint32_t nbits) [member function] cls.add_method('GetDsssDqpskSuccessRate', 'double', [param('double', 'sinr'), param('uint32_t', 'nbits')], is_static=True) return def register_Ns3EventId_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('==') ## event-id.h (module 'core'): ns3::EventId::EventId(ns3::EventId const & arg0) [copy constructor] cls.add_constructor([param('ns3::EventId const &', 'arg0')]) ## event-id.h (module 'core'): ns3::EventId::EventId() [constructor] cls.add_constructor([]) ## event-id.h (module 'core'): ns3::EventId::EventId(ns3::Ptr<ns3::EventImpl> const & impl, uint64_t ts, uint32_t context, uint32_t uid) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::EventImpl > const &', 'impl'), param('uint64_t', 'ts'), param('uint32_t', 'context'), param('uint32_t', 'uid')]) ## event-id.h (module 'core'): void ns3::EventId::Cancel() [member function] cls.add_method('Cancel', 'void', []) ## event-id.h (module 'core'): uint32_t ns3::EventId::GetContext() const [member function] cls.add_method('GetContext', 'uint32_t', [], is_const=True) ## event-id.h (module 'core'): uint64_t ns3::EventId::GetTs() const [member function] cls.add_method('GetTs', 'uint64_t', [], is_const=True) ## event-id.h (module 'core'): uint32_t ns3::EventId::GetUid() const [member function] cls.add_method('GetUid', 'uint32_t', [], is_const=True) ## event-id.h (module 'core'): bool ns3::EventId::IsExpired() const [member function] cls.add_method('IsExpired', 'bool', [], is_const=True) ## event-id.h (module 'core'): bool ns3::EventId::IsRunning() const [member function] cls.add_method('IsRunning', 'bool', [], is_const=True) ## event-id.h (module 'core'): ns3::EventImpl * ns3::EventId::PeekEventImpl() const [member function] cls.add_method('PeekEventImpl', 'ns3::EventImpl *', [], is_const=True) return def register_Ns3Hasher_methods(root_module, cls): ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] cls.add_constructor([]) ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr<ns3::Hash::Implementation> hp) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')]) ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] cls.add_method('GetHash32', 'uint32_t', [param('std::string const', 's')]) ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')]) ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] cls.add_method('GetHash64', 'uint64_t', [param('std::string const', 's')]) ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] cls.add_method('clear', 'ns3::Hasher &', []) return def register_Ns3InterferenceHelper_methods(root_module, cls): ## interference-helper.h (module 'wifi'): ns3::InterferenceHelper::InterferenceHelper(ns3::InterferenceHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::InterferenceHelper const &', 'arg0')]) ## interference-helper.h (module 'wifi'): ns3::InterferenceHelper::InterferenceHelper() [constructor] cls.add_constructor([]) ## interference-helper.h (module 'wifi'): ns3::Ptr<ns3::InterferenceHelper::Event> ns3::InterferenceHelper::Add(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble, ns3::Time duration, double rxPower, ns3::WifiTxVector txvector) [member function] cls.add_method('Add', 'ns3::Ptr< ns3::InterferenceHelper::Event >', [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble'), param('ns3::Time', 'duration'), param('double', 'rxPower'), param('ns3::WifiTxVector', 'txvector')]) ## interference-helper.h (module 'wifi'): ns3::InterferenceHelper::SnrPer ns3::InterferenceHelper::CalculateSnrPer(ns3::Ptr<ns3::InterferenceHelper::Event> event) [member function] cls.add_method('CalculateSnrPer', 'ns3::InterferenceHelper::SnrPer', [param('ns3::Ptr< ns3::InterferenceHelper::Event >', 'event')]) ## interference-helper.h (module 'wifi'): void ns3::InterferenceHelper::EraseEvents() [member function] cls.add_method('EraseEvents', 'void', []) ## interference-helper.h (module 'wifi'): ns3::Time ns3::InterferenceHelper::GetEnergyDuration(double energyW) [member function] cls.add_method('GetEnergyDuration', 'ns3::Time', [param('double', 'energyW')]) ## interference-helper.h (module 'wifi'): ns3::Ptr<ns3::ErrorRateModel> ns3::InterferenceHelper::GetErrorRateModel() const [member function] cls.add_method('GetErrorRateModel', 'ns3::Ptr< ns3::ErrorRateModel >', [], is_const=True) ## interference-helper.h (module 'wifi'): double ns3::InterferenceHelper::GetNoiseFigure() const [member function] cls.add_method('GetNoiseFigure', 'double', [], is_const=True) ## interference-helper.h (module 'wifi'): void ns3::InterferenceHelper::NotifyRxEnd() [member function] cls.add_method('NotifyRxEnd', 'void', []) ## interference-helper.h (module 'wifi'): void ns3::InterferenceHelper::NotifyRxStart() [member function] cls.add_method('NotifyRxStart', 'void', []) ## interference-helper.h (module 'wifi'): void ns3::InterferenceHelper::SetErrorRateModel(ns3::Ptr<ns3::ErrorRateModel> rate) [member function] cls.add_method('SetErrorRateModel', 'void', [param('ns3::Ptr< ns3::ErrorRateModel >', 'rate')]) ## interference-helper.h (module 'wifi'): void ns3::InterferenceHelper::SetNoiseFigure(double value) [member function] cls.add_method('SetNoiseFigure', 'void', [param('double', 'value')]) return def register_Ns3InterferenceHelperSnrPer_methods(root_module, cls): ## interference-helper.h (module 'wifi'): ns3::InterferenceHelper::SnrPer::SnrPer() [constructor] cls.add_constructor([]) ## interference-helper.h (module 'wifi'): ns3::InterferenceHelper::SnrPer::SnrPer(ns3::InterferenceHelper::SnrPer const & arg0) [copy constructor] cls.add_constructor([param('ns3::InterferenceHelper::SnrPer const &', 'arg0')]) ## interference-helper.h (module 'wifi'): ns3::InterferenceHelper::SnrPer::per [variable] cls.add_instance_attribute('per', 'double', is_const=False) ## interference-helper.h (module 'wifi'): ns3::InterferenceHelper::SnrPer::snr [variable] cls.add_instance_attribute('snr', 'double', is_const=False) return def register_Ns3Ipv4Address_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('<') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## ipv4-address.h (module 'network'): ns3::Ipv4Address::Ipv4Address(ns3::Ipv4Address const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4Address const &', 'arg0')]) ## ipv4-address.h (module 'network'): ns3::Ipv4Address::Ipv4Address() [constructor] cls.add_constructor([]) ## ipv4-address.h (module 'network'): ns3::Ipv4Address::Ipv4Address(uint32_t address) [constructor] cls.add_constructor([param('uint32_t', 'address')]) ## ipv4-address.h (module 'network'): ns3::Ipv4Address::Ipv4Address(char const * address) [constructor] cls.add_constructor([param('char const *', 'address')]) ## ipv4-address.h (module 'network'): ns3::Ipv4Address ns3::Ipv4Address::CombineMask(ns3::Ipv4Mask const & mask) const [member function] cls.add_method('CombineMask', 'ns3::Ipv4Address', [param('ns3::Ipv4Mask const &', 'mask')], is_const=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::ConvertFrom(ns3::Address const & address) [member function] cls.add_method('ConvertFrom', 'ns3::Ipv4Address', [param('ns3::Address const &', 'address')], is_static=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::Deserialize(uint8_t const * buf) [member function] cls.add_method('Deserialize', 'ns3::Ipv4Address', [param('uint8_t const *', 'buf')], is_static=True) ## ipv4-address.h (module 'network'): uint32_t ns3::Ipv4Address::Get() const [member function] cls.add_method('Get', 'uint32_t', [], is_const=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::GetAny() [member function] cls.add_method('GetAny', 'ns3::Ipv4Address', [], is_static=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::GetBroadcast() [member function] cls.add_method('GetBroadcast', 'ns3::Ipv4Address', [], is_static=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::GetLoopback() [member function] cls.add_method('GetLoopback', 'ns3::Ipv4Address', [], is_static=True) ## ipv4-address.h (module 'network'): ns3::Ipv4Address ns3::Ipv4Address::GetSubnetDirectedBroadcast(ns3::Ipv4Mask const & mask) const [member function] cls.add_method('GetSubnetDirectedBroadcast', 'ns3::Ipv4Address', [param('ns3::Ipv4Mask const &', 'mask')], is_const=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Address ns3::Ipv4Address::GetZero() [member function] cls.add_method('GetZero', 'ns3::Ipv4Address', [], is_static=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Address::IsBroadcast() const [member function] cls.add_method('IsBroadcast', 'bool', [], is_const=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Address::IsEqual(ns3::Ipv4Address const & other) const [member function] cls.add_method('IsEqual', 'bool', [param('ns3::Ipv4Address const &', 'other')], is_const=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Address::IsLocalMulticast() const [member function] cls.add_method('IsLocalMulticast', 'bool', [], is_const=True) ## ipv4-address.h (module 'network'): static bool ns3::Ipv4Address::IsMatchingType(ns3::Address const & address) [member function] cls.add_method('IsMatchingType', 'bool', [param('ns3::Address const &', 'address')], is_static=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Address::IsMulticast() const [member function] cls.add_method('IsMulticast', 'bool', [], is_const=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Address::IsSubnetDirectedBroadcast(ns3::Ipv4Mask const & mask) const [member function] cls.add_method('IsSubnetDirectedBroadcast', 'bool', [param('ns3::Ipv4Mask const &', 'mask')], is_const=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4Address::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4Address::Serialize(uint8_t * buf) const [member function] cls.add_method('Serialize', 'void', [param('uint8_t *', 'buf')], is_const=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4Address::Set(uint32_t address) [member function] cls.add_method('Set', 'void', [param('uint32_t', 'address')]) ## ipv4-address.h (module 'network'): void ns3::Ipv4Address::Set(char const * address) [member function] cls.add_method('Set', 'void', [param('char const *', 'address')]) return def register_Ns3Ipv4Mask_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## ipv4-address.h (module 'network'): ns3::Ipv4Mask::Ipv4Mask(ns3::Ipv4Mask const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4Mask const &', 'arg0')]) ## ipv4-address.h (module 'network'): ns3::Ipv4Mask::Ipv4Mask() [constructor] cls.add_constructor([]) ## ipv4-address.h (module 'network'): ns3::Ipv4Mask::Ipv4Mask(uint32_t mask) [constructor] cls.add_constructor([param('uint32_t', 'mask')]) ## ipv4-address.h (module 'network'): ns3::Ipv4Mask::Ipv4Mask(char const * mask) [constructor] cls.add_constructor([param('char const *', 'mask')]) ## ipv4-address.h (module 'network'): uint32_t ns3::Ipv4Mask::Get() const [member function] cls.add_method('Get', 'uint32_t', [], is_const=True) ## ipv4-address.h (module 'network'): uint32_t ns3::Ipv4Mask::GetInverse() const [member function] cls.add_method('GetInverse', 'uint32_t', [], is_const=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Mask ns3::Ipv4Mask::GetLoopback() [member function] cls.add_method('GetLoopback', 'ns3::Ipv4Mask', [], is_static=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Mask ns3::Ipv4Mask::GetOnes() [member function] cls.add_method('GetOnes', 'ns3::Ipv4Mask', [], is_static=True) ## ipv4-address.h (module 'network'): uint16_t ns3::Ipv4Mask::GetPrefixLength() const [member function] cls.add_method('GetPrefixLength', 'uint16_t', [], is_const=True) ## ipv4-address.h (module 'network'): static ns3::Ipv4Mask ns3::Ipv4Mask::GetZero() [member function] cls.add_method('GetZero', 'ns3::Ipv4Mask', [], is_static=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Mask::IsEqual(ns3::Ipv4Mask other) const [member function] cls.add_method('IsEqual', 'bool', [param('ns3::Ipv4Mask', 'other')], is_const=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4Mask::IsMatch(ns3::Ipv4Address a, ns3::Ipv4Address b) const [member function] cls.add_method('IsMatch', 'bool', [param('ns3::Ipv4Address', 'a'), param('ns3::Ipv4Address', 'b')], is_const=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4Mask::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4Mask::Set(uint32_t mask) [member function] cls.add_method('Set', 'void', [param('uint32_t', 'mask')]) return def register_Ns3Ipv6Address_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('<') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address() [constructor] cls.add_constructor([]) ## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address(char const * address) [constructor] cls.add_constructor([param('char const *', 'address')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address(uint8_t * address) [constructor] cls.add_constructor([param('uint8_t *', 'address')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address(ns3::Ipv6Address const & addr) [copy constructor] cls.add_constructor([param('ns3::Ipv6Address const &', 'addr')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address(ns3::Ipv6Address const * addr) [constructor] cls.add_constructor([param('ns3::Ipv6Address const *', 'addr')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Address ns3::Ipv6Address::CombinePrefix(ns3::Ipv6Prefix const & prefix) [member function] cls.add_method('CombinePrefix', 'ns3::Ipv6Address', [param('ns3::Ipv6Prefix const &', 'prefix')]) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::ConvertFrom(ns3::Address const & address) [member function] cls.add_method('ConvertFrom', 'ns3::Ipv6Address', [param('ns3::Address const &', 'address')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::Deserialize(uint8_t const * buf) [member function] cls.add_method('Deserialize', 'ns3::Ipv6Address', [param('uint8_t const *', 'buf')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetAllHostsMulticast() [member function] cls.add_method('GetAllHostsMulticast', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetAllNodesMulticast() [member function] cls.add_method('GetAllNodesMulticast', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetAllRoutersMulticast() [member function] cls.add_method('GetAllRoutersMulticast', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetAny() [member function] cls.add_method('GetAny', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6Address::GetBytes(uint8_t * buf) const [member function] cls.add_method('GetBytes', 'void', [param('uint8_t *', 'buf')], is_const=True) ## ipv6-address.h (module 'network'): ns3::Ipv4Address ns3::Ipv6Address::GetIpv4MappedAddress() const [member function] cls.add_method('GetIpv4MappedAddress', 'ns3::Ipv4Address', [], is_const=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetLoopback() [member function] cls.add_method('GetLoopback', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetOnes() [member function] cls.add_method('GetOnes', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::GetZero() [member function] cls.add_method('GetZero', 'ns3::Ipv6Address', [], is_static=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsAllHostsMulticast() const [member function] cls.add_method('IsAllHostsMulticast', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsAllNodesMulticast() const [member function] cls.add_method('IsAllNodesMulticast', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsAllRoutersMulticast() const [member function] cls.add_method('IsAllRoutersMulticast', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsAny() const [member function] cls.add_method('IsAny', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsDocumentation() const [member function] cls.add_method('IsDocumentation', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function] cls.add_method('IsEqual', 'bool', [param('ns3::Ipv6Address const &', 'other')], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsIpv4MappedAddress() const [member function] cls.add_method('IsIpv4MappedAddress', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsLinkLocal() const [member function] cls.add_method('IsLinkLocal', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsLinkLocalMulticast() const [member function] cls.add_method('IsLinkLocalMulticast', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsLocalhost() const [member function] cls.add_method('IsLocalhost', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): static bool ns3::Ipv6Address::IsMatchingType(ns3::Address const & address) [member function] cls.add_method('IsMatchingType', 'bool', [param('ns3::Address const &', 'address')], is_static=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsMulticast() const [member function] cls.add_method('IsMulticast', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsSolicitedMulticast() const [member function] cls.add_method('IsSolicitedMulticast', 'bool', [], is_const=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac16Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac16Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac64Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac64Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac16Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac16Address', 'mac')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'mac')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac64Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac64Address', 'mac')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress(ns3::Ipv4Address addr) [member function] cls.add_method('MakeIpv4MappedAddress', 'ns3::Ipv6Address', [param('ns3::Ipv4Address', 'addr')], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeSolicitedAddress(ns3::Ipv6Address addr) [member function] cls.add_method('MakeSolicitedAddress', 'ns3::Ipv6Address', [param('ns3::Ipv6Address', 'addr')], is_static=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6Address::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6Address::Serialize(uint8_t * buf) const [member function] cls.add_method('Serialize', 'void', [param('uint8_t *', 'buf')], is_const=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6Address::Set(char const * address) [member function] cls.add_method('Set', 'void', [param('char const *', 'address')]) ## ipv6-address.h (module 'network'): void ns3::Ipv6Address::Set(uint8_t * address) [member function] cls.add_method('Set', 'void', [param('uint8_t *', 'address')]) return def register_Ns3Ipv6Prefix_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix::Ipv6Prefix() [constructor] cls.add_constructor([]) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix::Ipv6Prefix(uint8_t * prefix) [constructor] cls.add_constructor([param('uint8_t *', 'prefix')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix::Ipv6Prefix(char const * prefix) [constructor] cls.add_constructor([param('char const *', 'prefix')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix::Ipv6Prefix(uint8_t prefix) [constructor] cls.add_constructor([param('uint8_t', 'prefix')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix::Ipv6Prefix(ns3::Ipv6Prefix const & prefix) [copy constructor] cls.add_constructor([param('ns3::Ipv6Prefix const &', 'prefix')]) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix::Ipv6Prefix(ns3::Ipv6Prefix const * prefix) [constructor] cls.add_constructor([param('ns3::Ipv6Prefix const *', 'prefix')]) ## ipv6-address.h (module 'network'): void ns3::Ipv6Prefix::GetBytes(uint8_t * buf) const [member function] cls.add_method('GetBytes', 'void', [param('uint8_t *', 'buf')], is_const=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Prefix ns3::Ipv6Prefix::GetLoopback() [member function] cls.add_method('GetLoopback', 'ns3::Ipv6Prefix', [], is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Prefix ns3::Ipv6Prefix::GetOnes() [member function] cls.add_method('GetOnes', 'ns3::Ipv6Prefix', [], is_static=True) ## ipv6-address.h (module 'network'): uint8_t ns3::Ipv6Prefix::GetPrefixLength() const [member function] cls.add_method('GetPrefixLength', 'uint8_t', [], is_const=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Prefix ns3::Ipv6Prefix::GetZero() [member function] cls.add_method('GetZero', 'ns3::Ipv6Prefix', [], is_static=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Prefix::IsEqual(ns3::Ipv6Prefix const & other) const [member function] cls.add_method('IsEqual', 'bool', [param('ns3::Ipv6Prefix const &', 'other')], is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Prefix::IsMatch(ns3::Ipv6Address a, ns3::Ipv6Address b) const [member function] cls.add_method('IsMatch', 'bool', [param('ns3::Ipv6Address', 'a'), param('ns3::Ipv6Address', 'b')], is_const=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6Prefix::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True) return def register_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_Ns3MacLowBlockAckEventListener_methods(root_module, cls): ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener::MacLowBlockAckEventListener(ns3::MacLowBlockAckEventListener const & arg0) [copy constructor] cls.add_constructor([param('ns3::MacLowBlockAckEventListener const &', 'arg0')]) ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener::MacLowBlockAckEventListener() [constructor] cls.add_constructor([]) ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::BlockAckInactivityTimeout(ns3::Mac48Address originator, uint8_t tid) [member function] cls.add_method('BlockAckInactivityTimeout', 'void', [param('ns3::Mac48Address', 'originator'), param('uint8_t', 'tid')], is_pure_virtual=True, is_virtual=True) return def register_Ns3MacLowDcfListener_methods(root_module, cls): ## mac-low.h (module 'wifi'): ns3::MacLowDcfListener::MacLowDcfListener(ns3::MacLowDcfListener const & arg0) [copy constructor] cls.add_constructor([param('ns3::MacLowDcfListener const &', 'arg0')]) ## mac-low.h (module 'wifi'): ns3::MacLowDcfListener::MacLowDcfListener() [constructor] cls.add_constructor([]) ## mac-low.h (module 'wifi'): void ns3::MacLowDcfListener::AckTimeoutReset() [member function] cls.add_method('AckTimeoutReset', 'void', [], is_pure_virtual=True, is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowDcfListener::AckTimeoutStart(ns3::Time duration) [member function] cls.add_method('AckTimeoutStart', 'void', [param('ns3::Time', 'duration')], is_pure_virtual=True, is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowDcfListener::CtsTimeoutReset() [member function] cls.add_method('CtsTimeoutReset', 'void', [], is_pure_virtual=True, is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowDcfListener::CtsTimeoutStart(ns3::Time duration) [member function] cls.add_method('CtsTimeoutStart', 'void', [param('ns3::Time', 'duration')], is_pure_virtual=True, is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowDcfListener::NavReset(ns3::Time duration) [member function] cls.add_method('NavReset', 'void', [param('ns3::Time', 'duration')], is_pure_virtual=True, is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowDcfListener::NavStart(ns3::Time duration) [member function] cls.add_method('NavStart', 'void', [param('ns3::Time', 'duration')], is_pure_virtual=True, is_virtual=True) return def register_Ns3MacLowTransmissionListener_methods(root_module, cls): ## mac-low.h (module 'wifi'): ns3::MacLowTransmissionListener::MacLowTransmissionListener(ns3::MacLowTransmissionListener const & arg0) [copy constructor] cls.add_constructor([param('ns3::MacLowTransmissionListener const &', 'arg0')]) ## mac-low.h (module 'wifi'): ns3::MacLowTransmissionListener::MacLowTransmissionListener() [constructor] cls.add_constructor([]) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionListener::Cancel() [member function] cls.add_method('Cancel', 'void', [], is_pure_virtual=True, is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionListener::EndTxNoAck() [member function] cls.add_method('EndTxNoAck', 'void', [], is_pure_virtual=True, is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionListener::GotAck(double snr, ns3::WifiMode txMode) [member function] cls.add_method('GotAck', 'void', [param('double', 'snr'), param('ns3::WifiMode', 'txMode')], is_pure_virtual=True, is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionListener::GotBlockAck(ns3::CtrlBAckResponseHeader const * blockAck, ns3::Mac48Address source) [member function] cls.add_method('GotBlockAck', 'void', [param('ns3::CtrlBAckResponseHeader const *', 'blockAck'), param('ns3::Mac48Address', 'source')], is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionListener::GotCts(double snr, ns3::WifiMode txMode) [member function] cls.add_method('GotCts', 'void', [param('double', 'snr'), param('ns3::WifiMode', 'txMode')], is_pure_virtual=True, is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionListener::MissedAck() [member function] cls.add_method('MissedAck', 'void', [], is_pure_virtual=True, is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionListener::MissedBlockAck() [member function] cls.add_method('MissedBlockAck', 'void', [], is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionListener::MissedCts() [member function] cls.add_method('MissedCts', 'void', [], is_pure_virtual=True, is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionListener::StartNext() [member function] cls.add_method('StartNext', 'void', [], is_pure_virtual=True, is_virtual=True) return def register_Ns3MacLowTransmissionParameters_methods(root_module, cls): cls.add_output_stream_operator() ## mac-low.h (module 'wifi'): ns3::MacLowTransmissionParameters::MacLowTransmissionParameters(ns3::MacLowTransmissionParameters const & arg0) [copy constructor] cls.add_constructor([param('ns3::MacLowTransmissionParameters const &', 'arg0')]) ## mac-low.h (module 'wifi'): ns3::MacLowTransmissionParameters::MacLowTransmissionParameters() [constructor] cls.add_constructor([]) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::DisableAck() [member function] cls.add_method('DisableAck', 'void', []) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::DisableNextData() [member function] cls.add_method('DisableNextData', 'void', []) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::DisableOverrideDurationId() [member function] cls.add_method('DisableOverrideDurationId', 'void', []) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::DisableRts() [member function] cls.add_method('DisableRts', 'void', []) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::EnableAck() [member function] cls.add_method('EnableAck', 'void', []) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::EnableBasicBlockAck() [member function] cls.add_method('EnableBasicBlockAck', 'void', []) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::EnableCompressedBlockAck() [member function] cls.add_method('EnableCompressedBlockAck', 'void', []) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::EnableFastAck() [member function] cls.add_method('EnableFastAck', 'void', []) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::EnableMultiTidBlockAck() [member function] cls.add_method('EnableMultiTidBlockAck', 'void', []) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::EnableNextData(uint32_t size) [member function] cls.add_method('EnableNextData', 'void', [param('uint32_t', 'size')]) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::EnableOverrideDurationId(ns3::Time durationId) [member function] cls.add_method('EnableOverrideDurationId', 'void', [param('ns3::Time', 'durationId')]) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::EnableRts() [member function] cls.add_method('EnableRts', 'void', []) ## mac-low.h (module 'wifi'): void ns3::MacLowTransmissionParameters::EnableSuperFastAck() [member function] cls.add_method('EnableSuperFastAck', 'void', []) ## mac-low.h (module 'wifi'): ns3::Time ns3::MacLowTransmissionParameters::GetDurationId() const [member function] cls.add_method('GetDurationId', 'ns3::Time', [], is_const=True) ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowTransmissionParameters::GetNextPacketSize() const [member function] cls.add_method('GetNextPacketSize', 'uint32_t', [], is_const=True) ## mac-low.h (module 'wifi'): bool ns3::MacLowTransmissionParameters::HasDurationId() const [member function] cls.add_method('HasDurationId', 'bool', [], is_const=True) ## mac-low.h (module 'wifi'): bool ns3::MacLowTransmissionParameters::HasNextPacket() const [member function] cls.add_method('HasNextPacket', 'bool', [], is_const=True) ## mac-low.h (module 'wifi'): bool ns3::MacLowTransmissionParameters::MustSendRts() const [member function] cls.add_method('MustSendRts', 'bool', [], is_const=True) ## mac-low.h (module 'wifi'): bool ns3::MacLowTransmissionParameters::MustWaitAck() const [member function] cls.add_method('MustWaitAck', 'bool', [], is_const=True) ## mac-low.h (module 'wifi'): bool ns3::MacLowTransmissionParameters::MustWaitBasicBlockAck() const [member function] cls.add_method('MustWaitBasicBlockAck', 'bool', [], is_const=True) ## mac-low.h (module 'wifi'): bool ns3::MacLowTransmissionParameters::MustWaitCompressedBlockAck() const [member function] cls.add_method('MustWaitCompressedBlockAck', 'bool', [], is_const=True) ## mac-low.h (module 'wifi'): bool ns3::MacLowTransmissionParameters::MustWaitFastAck() const [member function] cls.add_method('MustWaitFastAck', 'bool', [], is_const=True) ## mac-low.h (module 'wifi'): bool ns3::MacLowTransmissionParameters::MustWaitMultiTidBlockAck() const [member function] cls.add_method('MustWaitMultiTidBlockAck', 'bool', [], is_const=True) ## mac-low.h (module 'wifi'): bool ns3::MacLowTransmissionParameters::MustWaitNormalAck() const [member function] cls.add_method('MustWaitNormalAck', 'bool', [], is_const=True) ## mac-low.h (module 'wifi'): bool ns3::MacLowTransmissionParameters::MustWaitSuperFastAck() const [member function] cls.add_method('MustWaitSuperFastAck', 'bool', [], is_const=True) return def register_Ns3MacRxMiddle_methods(root_module, cls): ## mac-rx-middle.h (module 'wifi'): ns3::MacRxMiddle::MacRxMiddle(ns3::MacRxMiddle const & arg0) [copy constructor] cls.add_constructor([param('ns3::MacRxMiddle const &', 'arg0')]) ## mac-rx-middle.h (module 'wifi'): ns3::MacRxMiddle::MacRxMiddle() [constructor] cls.add_constructor([]) ## mac-rx-middle.h (module 'wifi'): void ns3::MacRxMiddle::Receive(ns3::Ptr<ns3::Packet> packet, ns3::WifiMacHeader const * hdr) [member function] cls.add_method('Receive', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr')]) ## mac-rx-middle.h (module 'wifi'): void ns3::MacRxMiddle::SetForwardCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet>, ns3::WifiMacHeader const*, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetForwardCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::WifiMacHeader const *, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) 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_Ns3OriginatorBlockAckAgreement_methods(root_module, cls): ## originator-block-ack-agreement.h (module 'wifi'): ns3::OriginatorBlockAckAgreement::OriginatorBlockAckAgreement(ns3::OriginatorBlockAckAgreement const & arg0) [copy constructor] cls.add_constructor([param('ns3::OriginatorBlockAckAgreement const &', 'arg0')]) ## originator-block-ack-agreement.h (module 'wifi'): ns3::OriginatorBlockAckAgreement::OriginatorBlockAckAgreement() [constructor] cls.add_constructor([]) ## originator-block-ack-agreement.h (module 'wifi'): ns3::OriginatorBlockAckAgreement::OriginatorBlockAckAgreement(ns3::Mac48Address recipient, uint8_t tid) [constructor] cls.add_constructor([param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')]) ## originator-block-ack-agreement.h (module 'wifi'): void ns3::OriginatorBlockAckAgreement::CompleteExchange() [member function] cls.add_method('CompleteExchange', 'void', []) ## originator-block-ack-agreement.h (module 'wifi'): bool ns3::OriginatorBlockAckAgreement::IsBlockAckRequestNeeded() const [member function] cls.add_method('IsBlockAckRequestNeeded', 'bool', [], is_const=True) ## originator-block-ack-agreement.h (module 'wifi'): bool ns3::OriginatorBlockAckAgreement::IsEstablished() const [member function] cls.add_method('IsEstablished', 'bool', [], is_const=True) ## originator-block-ack-agreement.h (module 'wifi'): bool ns3::OriginatorBlockAckAgreement::IsInactive() const [member function] cls.add_method('IsInactive', 'bool', [], is_const=True) ## originator-block-ack-agreement.h (module 'wifi'): bool ns3::OriginatorBlockAckAgreement::IsPending() const [member function] cls.add_method('IsPending', 'bool', [], is_const=True) ## originator-block-ack-agreement.h (module 'wifi'): bool ns3::OriginatorBlockAckAgreement::IsUnsuccessful() const [member function] cls.add_method('IsUnsuccessful', 'bool', [], is_const=True) ## originator-block-ack-agreement.h (module 'wifi'): void ns3::OriginatorBlockAckAgreement::NotifyMpduTransmission(uint16_t nextSeqNumber) [member function] cls.add_method('NotifyMpduTransmission', 'void', [param('uint16_t', 'nextSeqNumber')]) ## originator-block-ack-agreement.h (module 'wifi'): void ns3::OriginatorBlockAckAgreement::SetState(ns3::OriginatorBlockAckAgreement::State state) [member function] cls.add_method('SetState', 'void', [param('ns3::OriginatorBlockAckAgreement::State', 'state')]) return def register_Ns3PacketMetadata_methods(root_module, cls): ## packet-metadata.h (module 'network'): ns3::PacketMetadata::PacketMetadata(uint64_t uid, uint32_t size) [constructor] cls.add_constructor([param('uint64_t', 'uid'), param('uint32_t', 'size')]) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::PacketMetadata(ns3::PacketMetadata const & o) [copy constructor] cls.add_constructor([param('ns3::PacketMetadata const &', 'o')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddAtEnd(ns3::PacketMetadata const & o) [member function] cls.add_method('AddAtEnd', 'void', [param('ns3::PacketMetadata const &', 'o')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddHeader(ns3::Header const & header, uint32_t size) [member function] cls.add_method('AddHeader', 'void', [param('ns3::Header const &', 'header'), param('uint32_t', 'size')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddPaddingAtEnd(uint32_t end) [member function] cls.add_method('AddPaddingAtEnd', 'void', [param('uint32_t', 'end')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddTrailer(ns3::Trailer const & trailer, uint32_t size) [member function] cls.add_method('AddTrailer', 'void', [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')]) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator ns3::PacketMetadata::BeginItem(ns3::Buffer buffer) const [member function] cls.add_method('BeginItem', 'ns3::PacketMetadata::ItemIterator', [param('ns3::Buffer', 'buffer')], is_const=True) ## packet-metadata.h (module 'network'): ns3::PacketMetadata ns3::PacketMetadata::CreateFragment(uint32_t start, uint32_t end) const [member function] cls.add_method('CreateFragment', 'ns3::PacketMetadata', [param('uint32_t', 'start'), param('uint32_t', 'end')], is_const=True) ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::Deserialize(uint8_t const * buffer, uint32_t size) [member function] cls.add_method('Deserialize', 'uint32_t', [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) ## packet-metadata.h (module 'network'): static void ns3::PacketMetadata::Enable() [member function] cls.add_method('Enable', 'void', [], is_static=True) ## packet-metadata.h (module 'network'): static void ns3::PacketMetadata::EnableChecking() [member function] cls.add_method('EnableChecking', 'void', [], is_static=True) ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## packet-metadata.h (module 'network'): uint64_t ns3::PacketMetadata::GetUid() const [member function] cls.add_method('GetUid', 'uint64_t', [], is_const=True) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveAtEnd(uint32_t end) [member function] cls.add_method('RemoveAtEnd', 'void', [param('uint32_t', 'end')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveAtStart(uint32_t start) [member function] cls.add_method('RemoveAtStart', 'void', [param('uint32_t', 'start')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveHeader(ns3::Header const & header, uint32_t size) [member function] cls.add_method('RemoveHeader', 'void', [param('ns3::Header const &', 'header'), param('uint32_t', 'size')]) ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveTrailer(ns3::Trailer const & trailer, uint32_t size) [member function] cls.add_method('RemoveTrailer', 'void', [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')]) ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], is_const=True) return def register_Ns3PacketMetadataItem_methods(root_module, cls): ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::Item() [constructor] cls.add_constructor([]) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::Item(ns3::PacketMetadata::Item const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketMetadata::Item const &', 'arg0')]) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::current [variable] cls.add_instance_attribute('current', 'ns3::Buffer::Iterator', is_const=False) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentSize [variable] cls.add_instance_attribute('currentSize', 'uint32_t', is_const=False) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentTrimedFromEnd [variable] cls.add_instance_attribute('currentTrimedFromEnd', 'uint32_t', is_const=False) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentTrimedFromStart [variable] cls.add_instance_attribute('currentTrimedFromStart', 'uint32_t', is_const=False) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::isFragment [variable] cls.add_instance_attribute('isFragment', 'bool', is_const=False) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::tid [variable] cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) return def register_Ns3PacketMetadataItemIterator_methods(root_module, cls): ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata::ItemIterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketMetadata::ItemIterator const &', 'arg0')]) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata const * metadata, ns3::Buffer buffer) [constructor] cls.add_constructor([param('ns3::PacketMetadata const *', 'metadata'), param('ns3::Buffer', 'buffer')]) ## packet-metadata.h (module 'network'): bool ns3::PacketMetadata::ItemIterator::HasNext() const [member function] cls.add_method('HasNext', 'bool', [], is_const=True) ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item ns3::PacketMetadata::ItemIterator::Next() [member function] cls.add_method('Next', 'ns3::PacketMetadata::Item', []) return def register_Ns3PacketTagIterator_methods(root_module, cls): ## packet.h (module 'network'): ns3::PacketTagIterator::PacketTagIterator(ns3::PacketTagIterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketTagIterator const &', 'arg0')]) ## packet.h (module 'network'): bool ns3::PacketTagIterator::HasNext() const [member function] cls.add_method('HasNext', 'bool', [], is_const=True) ## packet.h (module 'network'): ns3::PacketTagIterator::Item ns3::PacketTagIterator::Next() [member function] cls.add_method('Next', 'ns3::PacketTagIterator::Item', []) return def register_Ns3PacketTagIteratorItem_methods(root_module, cls): ## packet.h (module 'network'): ns3::PacketTagIterator::Item::Item(ns3::PacketTagIterator::Item const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketTagIterator::Item const &', 'arg0')]) ## packet.h (module 'network'): void ns3::PacketTagIterator::Item::GetTag(ns3::Tag & tag) const [member function] cls.add_method('GetTag', 'void', [param('ns3::Tag &', 'tag')], is_const=True) ## packet.h (module 'network'): ns3::TypeId ns3::PacketTagIterator::Item::GetTypeId() const [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_const=True) return def register_Ns3PacketTagList_methods(root_module, cls): ## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList() [constructor] cls.add_constructor([]) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList(ns3::PacketTagList const & o) [copy constructor] cls.add_constructor([param('ns3::PacketTagList const &', 'o')]) ## packet-tag-list.h (module 'network'): void ns3::PacketTagList::Add(ns3::Tag const & tag) const [member function] cls.add_method('Add', 'void', [param('ns3::Tag const &', 'tag')], is_const=True) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData const * ns3::PacketTagList::Head() const [member function] cls.add_method('Head', 'ns3::PacketTagList::TagData const *', [], is_const=True) ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Peek(ns3::Tag & tag) const [member function] cls.add_method('Peek', 'bool', [param('ns3::Tag &', 'tag')], is_const=True) ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Remove(ns3::Tag & tag) [member function] cls.add_method('Remove', 'bool', [param('ns3::Tag &', 'tag')]) ## packet-tag-list.h (module 'network'): void ns3::PacketTagList::RemoveAll() [member function] cls.add_method('RemoveAll', 'void', []) ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Replace(ns3::Tag & tag) [member function] cls.add_method('Replace', 'bool', [param('ns3::Tag &', 'tag')]) return def register_Ns3PacketTagListTagData_methods(root_module, cls): ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData() [constructor] cls.add_constructor([]) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData(ns3::PacketTagList::TagData const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketTagList::TagData const &', 'arg0')]) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::count [variable] cls.add_instance_attribute('count', 'uint32_t', is_const=False) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::data [variable] cls.add_instance_attribute('data', 'uint8_t [ 20 ]', is_const=False) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::next [variable] cls.add_instance_attribute('next', 'ns3::PacketTagList::TagData *', is_const=False) ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::tid [variable] cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) return def register_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<ns3::Packet const> 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<ns3::Packet const> p) [member function] cls.add_method('Write', 'void', [param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Header &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')]) ## pcap-file.h (module 'network'): ns3::PcapFile::SNAPLEN_DEFAULT [variable] cls.add_static_attribute('SNAPLEN_DEFAULT', 'uint32_t const', is_const=True) ## pcap-file.h (module 'network'): ns3::PcapFile::ZONE_DEFAULT [variable] cls.add_static_attribute('ZONE_DEFAULT', 'int32_t const', is_const=True) return def register_Ns3PcapHelper_methods(root_module, cls): ## trace-helper.h (module 'network'): ns3::PcapHelper::PcapHelper(ns3::PcapHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::PcapHelper const &', 'arg0')]) ## trace-helper.h (module 'network'): ns3::PcapHelper::PcapHelper() [constructor] cls.add_constructor([]) ## trace-helper.h (module 'network'): ns3::Ptr<ns3::PcapFileWrapper> ns3::PcapHelper::CreateFile(std::string filename, std::_Ios_Openmode filemode, uint32_t dataLinkType, uint32_t snapLen=std::numeric_limits<unsigned int>::max(), int32_t tzCorrection=0) [member function] cls.add_method('CreateFile', 'ns3::Ptr< ns3::PcapFileWrapper >', [param('std::string', 'filename'), param('std::_Ios_Openmode', 'filemode'), param('uint32_t', 'dataLinkType'), param('uint32_t', 'snapLen', default_value='std::numeric_limits<unsigned int>::max()'), param('int32_t', 'tzCorrection', default_value='0')]) ## trace-helper.h (module 'network'): std::string ns3::PcapHelper::GetFilenameFromDevice(std::string prefix, ns3::Ptr<ns3::NetDevice> device, bool useObjectNames=true) [member function] cls.add_method('GetFilenameFromDevice', 'std::string', [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('bool', 'useObjectNames', default_value='true')]) ## trace-helper.h (module 'network'): std::string ns3::PcapHelper::GetFilenameFromInterfacePair(std::string prefix, ns3::Ptr<ns3::Object> object, uint32_t interface, bool useObjectNames=true) [member function] cls.add_method('GetFilenameFromInterfacePair', 'std::string', [param('std::string', 'prefix'), param('ns3::Ptr< ns3::Object >', 'object'), param('uint32_t', 'interface'), param('bool', 'useObjectNames', default_value='true')]) return def register_Ns3PcapHelperForDevice_methods(root_module, cls): ## trace-helper.h (module 'network'): ns3::PcapHelperForDevice::PcapHelperForDevice(ns3::PcapHelperForDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::PcapHelperForDevice const &', 'arg0')]) ## trace-helper.h (module 'network'): ns3::PcapHelperForDevice::PcapHelperForDevice() [constructor] cls.add_constructor([]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false, bool explicitFilename=false) [member function] cls.add_method('EnablePcap', 'void', [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false'), param('bool', 'explicitFilename', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, std::string ndName, bool promiscuous=false, bool explicitFilename=false) [member function] cls.add_method('EnablePcap', 'void', [param('std::string', 'prefix'), param('std::string', 'ndName'), param('bool', 'promiscuous', default_value='false'), param('bool', 'explicitFilename', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::NetDeviceContainer d, bool promiscuous=false) [member function] cls.add_method('EnablePcap', 'void', [param('std::string', 'prefix'), param('ns3::NetDeviceContainer', 'd'), param('bool', 'promiscuous', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::NodeContainer n, bool promiscuous=false) [member function] cls.add_method('EnablePcap', 'void', [param('std::string', 'prefix'), param('ns3::NodeContainer', 'n'), param('bool', 'promiscuous', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, uint32_t nodeid, uint32_t deviceid, bool promiscuous=false) [member function] cls.add_method('EnablePcap', 'void', [param('std::string', 'prefix'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid'), param('bool', 'promiscuous', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcapAll(std::string prefix, bool promiscuous=false) [member function] cls.add_method('EnablePcapAll', 'void', [param('std::string', 'prefix'), param('bool', 'promiscuous', default_value='false')]) ## trace-helper.h (module 'network'): void ns3::PcapHelperForDevice::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous, bool explicitFilename) [member function] cls.add_method('EnablePcapInternal', 'void', [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous'), param('bool', 'explicitFilename')], is_pure_virtual=True, is_virtual=True) return def register_Ns3PropagationCache__Ns3JakesProcess_methods(root_module, cls): ## propagation-cache.h (module 'propagation'): ns3::PropagationCache<ns3::JakesProcess>::PropagationCache(ns3::PropagationCache<ns3::JakesProcess> const & arg0) [copy constructor] cls.add_constructor([param('ns3::PropagationCache< ns3::JakesProcess > const &', 'arg0')]) ## propagation-cache.h (module 'propagation'): ns3::PropagationCache<ns3::JakesProcess>::PropagationCache() [constructor] cls.add_constructor([]) ## propagation-cache.h (module 'propagation'): void ns3::PropagationCache<ns3::JakesProcess>::AddPathData(ns3::Ptr<ns3::JakesProcess> data, ns3::Ptr<ns3::MobilityModel const> a, ns3::Ptr<ns3::MobilityModel const> b, uint32_t modelUid) [member function] cls.add_method('AddPathData', 'void', [param('ns3::Ptr< ns3::JakesProcess >', 'data'), param('ns3::Ptr< ns3::MobilityModel const >', 'a'), param('ns3::Ptr< ns3::MobilityModel const >', 'b'), param('uint32_t', 'modelUid')]) ## propagation-cache.h (module 'propagation'): ns3::Ptr<ns3::JakesProcess> ns3::PropagationCache<ns3::JakesProcess>::GetPathData(ns3::Ptr<ns3::MobilityModel const> a, ns3::Ptr<ns3::MobilityModel const> b, uint32_t modelUid) [member function] cls.add_method('GetPathData', 'ns3::Ptr< ns3::JakesProcess >', [param('ns3::Ptr< ns3::MobilityModel const >', 'a'), param('ns3::Ptr< ns3::MobilityModel const >', 'b'), param('uint32_t', 'modelUid')]) return def register_Ns3RateInfo_methods(root_module, cls): ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::RateInfo() [constructor] cls.add_constructor([]) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::RateInfo(ns3::RateInfo const & arg0) [copy constructor] cls.add_constructor([param('ns3::RateInfo const &', 'arg0')]) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::adjustedRetryCount [variable] cls.add_instance_attribute('adjustedRetryCount', 'uint32_t', is_const=False) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::attemptHist [variable] cls.add_instance_attribute('attemptHist', 'uint64_t', is_const=False) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::ewmaProb [variable] cls.add_instance_attribute('ewmaProb', 'uint32_t', is_const=False) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::numRateAttempt [variable] cls.add_instance_attribute('numRateAttempt', 'uint32_t', is_const=False) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::numRateSuccess [variable] cls.add_instance_attribute('numRateSuccess', 'uint32_t', is_const=False) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::perfectTxTime [variable] cls.add_instance_attribute('perfectTxTime', 'ns3::Time', is_const=False) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::prevNumRateAttempt [variable] cls.add_instance_attribute('prevNumRateAttempt', 'uint32_t', is_const=False) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::prevNumRateSuccess [variable] cls.add_instance_attribute('prevNumRateSuccess', 'uint32_t', is_const=False) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::prob [variable] cls.add_instance_attribute('prob', 'uint32_t', is_const=False) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::retryCount [variable] cls.add_instance_attribute('retryCount', 'uint32_t', is_const=False) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::successHist [variable] cls.add_instance_attribute('successHist', 'uint64_t', is_const=False) ## minstrel-wifi-manager.h (module 'wifi'): ns3::RateInfo::throughput [variable] cls.add_instance_attribute('throughput', 'uint32_t', is_const=False) 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_Ns3StatusCode_methods(root_module, cls): cls.add_output_stream_operator() ## status-code.h (module 'wifi'): ns3::StatusCode::StatusCode(ns3::StatusCode const & arg0) [copy constructor] cls.add_constructor([param('ns3::StatusCode const &', 'arg0')]) ## status-code.h (module 'wifi'): ns3::StatusCode::StatusCode() [constructor] cls.add_constructor([]) ## status-code.h (module 'wifi'): ns3::Buffer::Iterator ns3::StatusCode::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')]) ## status-code.h (module 'wifi'): uint32_t ns3::StatusCode::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## status-code.h (module 'wifi'): bool ns3::StatusCode::IsSuccess() const [member function] cls.add_method('IsSuccess', 'bool', [], is_const=True) ## status-code.h (module 'wifi'): ns3::Buffer::Iterator ns3::StatusCode::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True) ## status-code.h (module 'wifi'): void ns3::StatusCode::SetFailure() [member function] cls.add_method('SetFailure', 'void', []) ## status-code.h (module 'wifi'): void ns3::StatusCode::SetSuccess() [member function] cls.add_method('SetSuccess', 'void', []) return def register_Ns3Tag_methods(root_module, cls): ## tag.h (module 'network'): ns3::Tag::Tag() [constructor] cls.add_constructor([]) ## tag.h (module 'network'): ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor] cls.add_constructor([param('ns3::Tag const &', 'arg0')]) ## tag.h (module 'network'): void ns3::Tag::Deserialize(ns3::TagBuffer i) [member function] cls.add_method('Deserialize', 'void', [param('ns3::TagBuffer', 'i')], is_pure_virtual=True, is_virtual=True) ## tag.h (module 'network'): uint32_t ns3::Tag::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## tag.h (module 'network'): static ns3::TypeId ns3::Tag::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## tag.h (module 'network'): void ns3::Tag::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_pure_virtual=True, is_const=True, is_virtual=True) ## tag.h (module 'network'): void ns3::Tag::Serialize(ns3::TagBuffer i) const [member function] cls.add_method('Serialize', 'void', [param('ns3::TagBuffer', 'i')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3TagBuffer_methods(root_module, cls): ## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(ns3::TagBuffer const & arg0) [copy constructor] cls.add_constructor([param('ns3::TagBuffer const &', 'arg0')]) ## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(uint8_t * start, uint8_t * end) [constructor] cls.add_constructor([param('uint8_t *', 'start'), param('uint8_t *', 'end')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::CopyFrom(ns3::TagBuffer o) [member function] cls.add_method('CopyFrom', 'void', [param('ns3::TagBuffer', 'o')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::Read(uint8_t * buffer, uint32_t size) [member function] cls.add_method('Read', 'void', [param('uint8_t *', 'buffer'), param('uint32_t', 'size')]) ## tag-buffer.h (module 'network'): double ns3::TagBuffer::ReadDouble() [member function] cls.add_method('ReadDouble', 'double', []) ## tag-buffer.h (module 'network'): uint16_t ns3::TagBuffer::ReadU16() [member function] cls.add_method('ReadU16', 'uint16_t', []) ## tag-buffer.h (module 'network'): uint32_t ns3::TagBuffer::ReadU32() [member function] cls.add_method('ReadU32', 'uint32_t', []) ## tag-buffer.h (module 'network'): uint64_t ns3::TagBuffer::ReadU64() [member function] cls.add_method('ReadU64', 'uint64_t', []) ## tag-buffer.h (module 'network'): uint8_t ns3::TagBuffer::ReadU8() [member function] cls.add_method('ReadU8', 'uint8_t', []) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::TrimAtEnd(uint32_t trim) [member function] cls.add_method('TrimAtEnd', 'void', [param('uint32_t', 'trim')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::Write(uint8_t const * buffer, uint32_t size) [member function] cls.add_method('Write', 'void', [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteDouble(double v) [member function] cls.add_method('WriteDouble', 'void', [param('double', 'v')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU16(uint16_t data) [member function] cls.add_method('WriteU16', 'void', [param('uint16_t', 'data')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU32(uint32_t data) [member function] cls.add_method('WriteU32', 'void', [param('uint32_t', 'data')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU64(uint64_t v) [member function] cls.add_method('WriteU64', 'void', [param('uint64_t', 'v')]) ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU8(uint8_t v) [member function] cls.add_method('WriteU8', 'void', [param('uint8_t', 'v')]) return def register_Ns3TimeWithUnit_methods(root_module, cls): cls.add_output_stream_operator() ## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor] cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')]) ## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor] cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')]) return def register_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, std::string callback="(not yet documented)") [member function] cls.add_method('AddTraceSource', 'ns3::TypeId', [param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor'), param('std::string', 'callback', default_value='"(not yet documented)"')]) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation ns3::TypeId::GetAttribute(uint32_t i) const [member function] cls.add_method('GetAttribute', 'ns3::TypeId::AttributeInformation', [param('uint32_t', 'i')], is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetAttributeFullName(uint32_t i) const [member function] cls.add_method('GetAttributeFullName', 'std::string', [param('uint32_t', 'i')], is_const=True) ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetAttributeN() const [member function] cls.add_method('GetAttributeN', 'uint32_t', [], is_const=True) ## type-id.h (module 'core'): ns3::Callback<ns3::ObjectBase*,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ns3::TypeId::GetConstructor() const [member function] cls.add_method('GetConstructor', 'ns3::Callback< ns3::ObjectBase *, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', [], is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetGroupName() const [member function] cls.add_method('GetGroupName', 'std::string', [], is_const=True) ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] cls.add_method('GetHash', 'uint32_t', [], is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', [], is_const=True) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::GetParent() const [member function] cls.add_method('GetParent', 'ns3::TypeId', [], is_const=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::GetRegistered(uint32_t i) [member function] cls.add_method('GetRegistered', 'ns3::TypeId', [param('uint32_t', 'i')], is_static=True) ## type-id.h (module 'core'): static uint32_t ns3::TypeId::GetRegisteredN() [member function] cls.add_method('GetRegisteredN', 'uint32_t', [], is_static=True) ## type-id.h (module 'core'): std::size_t ns3::TypeId::GetSize() const [member function] cls.add_method('GetSize', 'std::size_t', [], is_const=True) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation ns3::TypeId::GetTraceSource(uint32_t i) const [member function] cls.add_method('GetTraceSource', 'ns3::TypeId::TraceSourceInformation', [param('uint32_t', 'i')], is_const=True) ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetTraceSourceN() const [member function] cls.add_method('GetTraceSourceN', 'uint32_t', [], is_const=True) ## type-id.h (module 'core'): uint16_t ns3::TypeId::GetUid() const [member function] cls.add_method('GetUid', 'uint16_t', [], is_const=True) ## type-id.h (module 'core'): bool ns3::TypeId::HasConstructor() const [member function] cls.add_method('HasConstructor', 'bool', [], is_const=True) ## type-id.h (module 'core'): bool ns3::TypeId::HasParent() const [member function] cls.add_method('HasParent', 'bool', [], is_const=True) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::HideFromDocumentation() [member function] cls.add_method('HideFromDocumentation', 'ns3::TypeId', []) ## type-id.h (module 'core'): bool ns3::TypeId::IsChildOf(ns3::TypeId other) const [member function] cls.add_method('IsChildOf', 'bool', [param('ns3::TypeId', 'other')], is_const=True) ## type-id.h (module 'core'): bool ns3::TypeId::LookupAttributeByName(std::string name, ns3::TypeId::AttributeInformation * info) const [member function] cls.add_method('LookupAttributeByName', 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] cls.add_method('LookupByHash', 'ns3::TypeId', [param('uint32_t', 'hash')], is_static=True) ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] cls.add_method('LookupByHashFailSafe', 'bool', [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', [param('std::string', 'name')], is_static=True) ## type-id.h (module 'core'): ns3::Ptr<ns3::TraceSourceAccessor const> ns3::TypeId::LookupTraceSourceByName(std::string name) const [member function] cls.add_method('LookupTraceSourceByName', 'ns3::Ptr< ns3::TraceSourceAccessor const >', [param('std::string', 'name')], is_const=True) ## type-id.h (module 'core'): bool ns3::TypeId::MustHideFromDocumentation() const [member function] cls.add_method('MustHideFromDocumentation', 'bool', [], is_const=True) ## type-id.h (module 'core'): bool ns3::TypeId::SetAttributeInitialValue(uint32_t i, ns3::Ptr<ns3::AttributeValue const> initialValue) [member function] cls.add_method('SetAttributeInitialValue', 'bool', [param('uint32_t', 'i'), param('ns3::Ptr< ns3::AttributeValue const >', 'initialValue')]) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetGroupName(std::string groupName) [member function] cls.add_method('SetGroupName', 'ns3::TypeId', [param('std::string', 'groupName')]) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetParent(ns3::TypeId tid) [member function] cls.add_method('SetParent', 'ns3::TypeId', [param('ns3::TypeId', 'tid')]) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetSize(std::size_t size) [member function] cls.add_method('SetSize', 'ns3::TypeId', [param('std::size_t', 'size')]) ## type-id.h (module 'core'): void ns3::TypeId::SetUid(uint16_t tid) [member function] cls.add_method('SetUid', 'void', [param('uint16_t', 'tid')]) return def register_Ns3TypeIdAttributeInformation_methods(root_module, cls): ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::AttributeInformation() [constructor] cls.add_constructor([]) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::AttributeInformation(ns3::TypeId::AttributeInformation const & arg0) [copy constructor] cls.add_constructor([param('ns3::TypeId::AttributeInformation const &', 'arg0')]) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::accessor [variable] cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::AttributeAccessor const >', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::checker [variable] cls.add_instance_attribute('checker', 'ns3::Ptr< ns3::AttributeChecker const >', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::flags [variable] cls.add_instance_attribute('flags', 'uint32_t', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::help [variable] cls.add_instance_attribute('help', 'std::string', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::initialValue [variable] cls.add_instance_attribute('initialValue', 'ns3::Ptr< ns3::AttributeValue const >', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::name [variable] cls.add_instance_attribute('name', 'std::string', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::originalInitialValue [variable] cls.add_instance_attribute('originalInitialValue', 'ns3::Ptr< ns3::AttributeValue const >', is_const=False) return def register_Ns3TypeIdTraceSourceInformation_methods(root_module, cls): ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::TraceSourceInformation() [constructor] cls.add_constructor([]) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::TraceSourceInformation(ns3::TypeId::TraceSourceInformation const & arg0) [copy constructor] cls.add_constructor([param('ns3::TypeId::TraceSourceInformation const &', 'arg0')]) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::accessor [variable] cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::TraceSourceAccessor const >', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::callback [variable] cls.add_instance_attribute('callback', 'std::string', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::help [variable] cls.add_instance_attribute('help', 'std::string', is_const=False) ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::name [variable] cls.add_instance_attribute('name', 'std::string', is_const=False) return def register_Ns3Vector2D_methods(root_module, cls): cls.add_output_stream_operator() ## vector.h (module 'core'): ns3::Vector2D::Vector2D(ns3::Vector2D const & arg0) [copy constructor] cls.add_constructor([param('ns3::Vector2D const &', 'arg0')]) ## vector.h (module 'core'): ns3::Vector2D::Vector2D(double _x, double _y) [constructor] cls.add_constructor([param('double', '_x'), param('double', '_y')]) ## vector.h (module 'core'): ns3::Vector2D::Vector2D() [constructor] cls.add_constructor([]) ## vector.h (module 'core'): ns3::Vector2D::x [variable] cls.add_instance_attribute('x', 'double', is_const=False) ## vector.h (module 'core'): ns3::Vector2D::y [variable] cls.add_instance_attribute('y', 'double', is_const=False) return def register_Ns3Vector3D_methods(root_module, cls): cls.add_output_stream_operator() ## vector.h (module 'core'): ns3::Vector3D::Vector3D(ns3::Vector3D const & arg0) [copy constructor] cls.add_constructor([param('ns3::Vector3D const &', 'arg0')]) ## vector.h (module 'core'): ns3::Vector3D::Vector3D(double _x, double _y, double _z) [constructor] cls.add_constructor([param('double', '_x'), param('double', '_y'), param('double', '_z')]) ## vector.h (module 'core'): ns3::Vector3D::Vector3D() [constructor] cls.add_constructor([]) ## vector.h (module 'core'): ns3::Vector3D::x [variable] cls.add_instance_attribute('x', 'double', is_const=False) ## vector.h (module 'core'): ns3::Vector3D::y [variable] cls.add_instance_attribute('y', 'double', is_const=False) ## vector.h (module 'core'): ns3::Vector3D::z [variable] cls.add_instance_attribute('z', 'double', is_const=False) return def register_Ns3WifiHelper_methods(root_module, cls): ## wifi-helper.h (module 'wifi'): ns3::WifiHelper::WifiHelper(ns3::WifiHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiHelper const &', 'arg0')]) ## wifi-helper.h (module 'wifi'): ns3::WifiHelper::WifiHelper() [constructor] cls.add_constructor([]) ## wifi-helper.h (module 'wifi'): int64_t ns3::WifiHelper::AssignStreams(ns3::NetDeviceContainer c, int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('ns3::NetDeviceContainer', 'c'), param('int64_t', 'stream')]) ## wifi-helper.h (module 'wifi'): static ns3::WifiHelper ns3::WifiHelper::Default() [member function] cls.add_method('Default', 'ns3::WifiHelper', [], is_static=True) ## wifi-helper.h (module 'wifi'): static void ns3::WifiHelper::EnableLogComponents() [member function] cls.add_method('EnableLogComponents', 'void', [], is_static=True) ## wifi-helper.h (module 'wifi'): ns3::NetDeviceContainer ns3::WifiHelper::Install(ns3::WifiPhyHelper const & phy, ns3::WifiMacHelper const & mac, ns3::NodeContainer c) const [member function] cls.add_method('Install', 'ns3::NetDeviceContainer', [param('ns3::WifiPhyHelper const &', 'phy'), param('ns3::WifiMacHelper const &', 'mac'), param('ns3::NodeContainer', 'c')], is_const=True, is_virtual=True) ## wifi-helper.h (module 'wifi'): ns3::NetDeviceContainer ns3::WifiHelper::Install(ns3::WifiPhyHelper const & phy, ns3::WifiMacHelper const & mac, ns3::Ptr<ns3::Node> node) const [member function] cls.add_method('Install', 'ns3::NetDeviceContainer', [param('ns3::WifiPhyHelper const &', 'phy'), param('ns3::WifiMacHelper const &', 'mac'), param('ns3::Ptr< ns3::Node >', 'node')], is_const=True, is_virtual=True) ## wifi-helper.h (module 'wifi'): ns3::NetDeviceContainer ns3::WifiHelper::Install(ns3::WifiPhyHelper const & phy, ns3::WifiMacHelper const & mac, std::string nodeName) const [member function] cls.add_method('Install', 'ns3::NetDeviceContainer', [param('ns3::WifiPhyHelper const &', 'phy'), param('ns3::WifiMacHelper const &', 'mac'), param('std::string', 'nodeName')], is_const=True, is_virtual=True) ## wifi-helper.h (module 'wifi'): void ns3::WifiHelper::SetRemoteStationManager(std::string type, std::string n0="", ns3::AttributeValue const & v0=ns3::EmptyAttributeValue(), std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue(), std::string n5="", ns3::AttributeValue const & v5=ns3::EmptyAttributeValue(), std::string n6="", ns3::AttributeValue const & v6=ns3::EmptyAttributeValue(), std::string n7="", ns3::AttributeValue const & v7=ns3::EmptyAttributeValue()) [member function] cls.add_method('SetRemoteStationManager', 'void', [param('std::string', 'type'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')]) ## wifi-helper.h (module 'wifi'): void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard standard) [member function] cls.add_method('SetStandard', 'void', [param('ns3::WifiPhyStandard', 'standard')], is_virtual=True) return def register_Ns3WifiMacHelper_methods(root_module, cls): ## wifi-helper.h (module 'wifi'): ns3::WifiMacHelper::WifiMacHelper() [constructor] cls.add_constructor([]) ## wifi-helper.h (module 'wifi'): ns3::WifiMacHelper::WifiMacHelper(ns3::WifiMacHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiMacHelper const &', 'arg0')]) ## wifi-helper.h (module 'wifi'): ns3::Ptr<ns3::WifiMac> ns3::WifiMacHelper::Create() const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::WifiMac >', [], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3WifiMode_methods(root_module, cls): cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## wifi-mode.h (module 'wifi'): ns3::WifiMode::WifiMode(ns3::WifiMode const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiMode const &', 'arg0')]) ## wifi-mode.h (module 'wifi'): ns3::WifiMode::WifiMode() [constructor] cls.add_constructor([]) ## wifi-mode.h (module 'wifi'): ns3::WifiMode::WifiMode(std::string name) [constructor] cls.add_constructor([param('std::string', 'name')]) ## wifi-mode.h (module 'wifi'): uint32_t ns3::WifiMode::GetBandwidth() const [member function] cls.add_method('GetBandwidth', 'uint32_t', [], is_const=True) ## wifi-mode.h (module 'wifi'): ns3::WifiCodeRate ns3::WifiMode::GetCodeRate() const [member function] cls.add_method('GetCodeRate', 'ns3::WifiCodeRate', [], is_const=True) ## wifi-mode.h (module 'wifi'): uint8_t ns3::WifiMode::GetConstellationSize() const [member function] cls.add_method('GetConstellationSize', 'uint8_t', [], is_const=True) ## wifi-mode.h (module 'wifi'): uint64_t ns3::WifiMode::GetDataRate() const [member function] cls.add_method('GetDataRate', 'uint64_t', [], is_const=True) ## wifi-mode.h (module 'wifi'): ns3::WifiModulationClass ns3::WifiMode::GetModulationClass() const [member function] cls.add_method('GetModulationClass', 'ns3::WifiModulationClass', [], is_const=True) ## wifi-mode.h (module 'wifi'): uint64_t ns3::WifiMode::GetPhyRate() const [member function] cls.add_method('GetPhyRate', 'uint64_t', [], is_const=True) ## wifi-mode.h (module 'wifi'): uint32_t ns3::WifiMode::GetUid() const [member function] cls.add_method('GetUid', 'uint32_t', [], is_const=True) ## wifi-mode.h (module 'wifi'): std::string ns3::WifiMode::GetUniqueName() const [member function] cls.add_method('GetUniqueName', 'std::string', [], is_const=True) ## wifi-mode.h (module 'wifi'): bool ns3::WifiMode::IsMandatory() const [member function] cls.add_method('IsMandatory', 'bool', [], is_const=True) return def register_Ns3WifiModeFactory_methods(root_module, cls): ## wifi-mode.h (module 'wifi'): ns3::WifiModeFactory::WifiModeFactory(ns3::WifiModeFactory const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiModeFactory const &', 'arg0')]) ## wifi-mode.h (module 'wifi'): static ns3::WifiMode ns3::WifiModeFactory::CreateWifiMode(std::string uniqueName, ns3::WifiModulationClass modClass, bool isMandatory, uint32_t bandwidth, uint32_t dataRate, ns3::WifiCodeRate codingRate, uint8_t constellationSize) [member function] cls.add_method('CreateWifiMode', 'ns3::WifiMode', [param('std::string', 'uniqueName'), param('ns3::WifiModulationClass', 'modClass'), param('bool', 'isMandatory'), param('uint32_t', 'bandwidth'), param('uint32_t', 'dataRate'), param('ns3::WifiCodeRate', 'codingRate'), param('uint8_t', 'constellationSize')], is_static=True) return def register_Ns3WifiPhyHelper_methods(root_module, cls): ## wifi-helper.h (module 'wifi'): ns3::WifiPhyHelper::WifiPhyHelper() [constructor] cls.add_constructor([]) ## wifi-helper.h (module 'wifi'): ns3::WifiPhyHelper::WifiPhyHelper(ns3::WifiPhyHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiPhyHelper const &', 'arg0')]) ## wifi-helper.h (module 'wifi'): ns3::Ptr<ns3::WifiPhy> ns3::WifiPhyHelper::Create(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::WifiNetDevice> device) const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::WifiPhy >', [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::WifiNetDevice >', 'device')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3WifiPhyListener_methods(root_module, cls): ## wifi-phy.h (module 'wifi'): ns3::WifiPhyListener::WifiPhyListener() [constructor] cls.add_constructor([]) ## wifi-phy.h (module 'wifi'): ns3::WifiPhyListener::WifiPhyListener(ns3::WifiPhyListener const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiPhyListener const &', 'arg0')]) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifyMaybeCcaBusyStart(ns3::Time duration) [member function] cls.add_method('NotifyMaybeCcaBusyStart', 'void', [param('ns3::Time', 'duration')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifyRxEndError() [member function] cls.add_method('NotifyRxEndError', 'void', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifyRxEndOk() [member function] cls.add_method('NotifyRxEndOk', 'void', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifyRxStart(ns3::Time duration) [member function] cls.add_method('NotifyRxStart', 'void', [param('ns3::Time', 'duration')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifySleep() [member function] cls.add_method('NotifySleep', 'void', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifySwitchingStart(ns3::Time duration) [member function] cls.add_method('NotifySwitchingStart', 'void', [param('ns3::Time', 'duration')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifyTxStart(ns3::Time duration, double txPowerDbm) [member function] cls.add_method('NotifyTxStart', 'void', [param('ns3::Time', 'duration'), param('double', 'txPowerDbm')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifyWakeup() [member function] cls.add_method('NotifyWakeup', 'void', [], is_pure_virtual=True, is_virtual=True) return def register_Ns3WifiRemoteStation_methods(root_module, cls): ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStation::WifiRemoteStation() [constructor] cls.add_constructor([]) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStation::WifiRemoteStation(ns3::WifiRemoteStation const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiRemoteStation const &', 'arg0')]) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStation::m_slrc [variable] cls.add_instance_attribute('m_slrc', 'uint32_t', is_const=False) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStation::m_ssrc [variable] cls.add_instance_attribute('m_ssrc', 'uint32_t', is_const=False) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStation::m_state [variable] cls.add_instance_attribute('m_state', 'ns3::WifiRemoteStationState *', is_const=False) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStation::m_tid [variable] cls.add_instance_attribute('m_tid', 'uint8_t', is_const=False) return def register_Ns3WifiRemoteStationInfo_methods(root_module, cls): ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationInfo::WifiRemoteStationInfo(ns3::WifiRemoteStationInfo const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiRemoteStationInfo const &', 'arg0')]) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationInfo::WifiRemoteStationInfo() [constructor] cls.add_constructor([]) ## wifi-remote-station-manager.h (module 'wifi'): double ns3::WifiRemoteStationInfo::GetFrameErrorRate() const [member function] cls.add_method('GetFrameErrorRate', 'double', [], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationInfo::NotifyTxFailed() [member function] cls.add_method('NotifyTxFailed', 'void', []) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationInfo::NotifyTxSuccess(uint32_t retryCounter) [member function] cls.add_method('NotifyTxSuccess', 'void', [param('uint32_t', 'retryCounter')]) return def register_Ns3WifiRemoteStationState_methods(root_module, cls): ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::WifiRemoteStationState() [constructor] cls.add_constructor([]) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::WifiRemoteStationState(ns3::WifiRemoteStationState const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiRemoteStationState const &', 'arg0')]) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_address [variable] cls.add_instance_attribute('m_address', 'ns3::Mac48Address', is_const=False) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_greenfield [variable] cls.add_instance_attribute('m_greenfield', 'bool', is_const=False) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_info [variable] cls.add_instance_attribute('m_info', 'ns3::WifiRemoteStationInfo', is_const=False) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_operationalMcsSet [variable] cls.add_instance_attribute('m_operationalMcsSet', 'ns3::WifiMcsList', is_const=False) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_operationalRateSet [variable] cls.add_instance_attribute('m_operationalRateSet', 'ns3::WifiModeList', is_const=False) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_rx [variable] cls.add_instance_attribute('m_rx', 'uint32_t', is_const=False) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_shortGuardInterval [variable] cls.add_instance_attribute('m_shortGuardInterval', 'bool', is_const=False) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_stbc [variable] cls.add_instance_attribute('m_stbc', 'bool', is_const=False) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_tx [variable] cls.add_instance_attribute('m_tx', 'uint32_t', is_const=False) return def register_Ns3WifiTxVector_methods(root_module, cls): cls.add_output_stream_operator() ## wifi-tx-vector.h (module 'wifi'): ns3::WifiTxVector::WifiTxVector(ns3::WifiTxVector const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiTxVector const &', 'arg0')]) ## wifi-tx-vector.h (module 'wifi'): ns3::WifiTxVector::WifiTxVector() [constructor] cls.add_constructor([]) ## wifi-tx-vector.h (module 'wifi'): ns3::WifiTxVector::WifiTxVector(ns3::WifiMode mode, uint8_t powerLevel, uint8_t retries, bool shortGuardInterval, uint8_t nss, uint8_t ness, bool stbc) [constructor] cls.add_constructor([param('ns3::WifiMode', 'mode'), param('uint8_t', 'powerLevel'), param('uint8_t', 'retries'), param('bool', 'shortGuardInterval'), param('uint8_t', 'nss'), param('uint8_t', 'ness'), param('bool', 'stbc')]) ## wifi-tx-vector.h (module 'wifi'): ns3::WifiMode ns3::WifiTxVector::GetMode() const [member function] cls.add_method('GetMode', 'ns3::WifiMode', [], is_const=True) ## wifi-tx-vector.h (module 'wifi'): uint8_t ns3::WifiTxVector::GetNess() const [member function] cls.add_method('GetNess', 'uint8_t', [], is_const=True) ## wifi-tx-vector.h (module 'wifi'): uint8_t ns3::WifiTxVector::GetNss() const [member function] cls.add_method('GetNss', 'uint8_t', [], is_const=True) ## wifi-tx-vector.h (module 'wifi'): uint8_t ns3::WifiTxVector::GetRetries() const [member function] cls.add_method('GetRetries', 'uint8_t', [], is_const=True) ## wifi-tx-vector.h (module 'wifi'): uint8_t ns3::WifiTxVector::GetTxPowerLevel() const [member function] cls.add_method('GetTxPowerLevel', 'uint8_t', [], is_const=True) ## wifi-tx-vector.h (module 'wifi'): bool ns3::WifiTxVector::IsShortGuardInterval() const [member function] cls.add_method('IsShortGuardInterval', 'bool', [], is_const=True) ## wifi-tx-vector.h (module 'wifi'): bool ns3::WifiTxVector::IsStbc() const [member function] cls.add_method('IsStbc', 'bool', [], is_const=True) ## wifi-tx-vector.h (module 'wifi'): void ns3::WifiTxVector::SetMode(ns3::WifiMode mode) [member function] cls.add_method('SetMode', 'void', [param('ns3::WifiMode', 'mode')]) ## wifi-tx-vector.h (module 'wifi'): void ns3::WifiTxVector::SetNess(uint8_t ness) [member function] cls.add_method('SetNess', 'void', [param('uint8_t', 'ness')]) ## wifi-tx-vector.h (module 'wifi'): void ns3::WifiTxVector::SetNss(uint8_t nss) [member function] cls.add_method('SetNss', 'void', [param('uint8_t', 'nss')]) ## wifi-tx-vector.h (module 'wifi'): void ns3::WifiTxVector::SetRetries(uint8_t retries) [member function] cls.add_method('SetRetries', 'void', [param('uint8_t', 'retries')]) ## wifi-tx-vector.h (module 'wifi'): void ns3::WifiTxVector::SetShortGuardInterval(bool guardinterval) [member function] cls.add_method('SetShortGuardInterval', 'void', [param('bool', 'guardinterval')]) ## wifi-tx-vector.h (module 'wifi'): void ns3::WifiTxVector::SetStbc(bool stbc) [member function] cls.add_method('SetStbc', 'void', [param('bool', 'stbc')]) ## wifi-tx-vector.h (module 'wifi'): void ns3::WifiTxVector::SetTxPowerLevel(uint8_t powerlevel) [member function] cls.add_method('SetTxPowerLevel', 'void', [param('uint8_t', 'powerlevel')]) return def register_Ns3YansWifiChannelHelper_methods(root_module, cls): ## yans-wifi-helper.h (module 'wifi'): ns3::YansWifiChannelHelper::YansWifiChannelHelper(ns3::YansWifiChannelHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::YansWifiChannelHelper const &', 'arg0')]) ## yans-wifi-helper.h (module 'wifi'): ns3::YansWifiChannelHelper::YansWifiChannelHelper() [constructor] cls.add_constructor([]) ## yans-wifi-helper.h (module 'wifi'): void ns3::YansWifiChannelHelper::AddPropagationLoss(std::string name, std::string n0="", ns3::AttributeValue const & v0=ns3::EmptyAttributeValue(), std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue(), std::string n5="", ns3::AttributeValue const & v5=ns3::EmptyAttributeValue(), std::string n6="", ns3::AttributeValue const & v6=ns3::EmptyAttributeValue(), std::string n7="", ns3::AttributeValue const & v7=ns3::EmptyAttributeValue()) [member function] cls.add_method('AddPropagationLoss', 'void', [param('std::string', 'name'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')]) ## yans-wifi-helper.h (module 'wifi'): int64_t ns3::YansWifiChannelHelper::AssignStreams(ns3::Ptr<ns3::YansWifiChannel> c, int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('ns3::Ptr< ns3::YansWifiChannel >', 'c'), param('int64_t', 'stream')]) ## yans-wifi-helper.h (module 'wifi'): ns3::Ptr<ns3::YansWifiChannel> ns3::YansWifiChannelHelper::Create() const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::YansWifiChannel >', [], is_const=True) ## yans-wifi-helper.h (module 'wifi'): static ns3::YansWifiChannelHelper ns3::YansWifiChannelHelper::Default() [member function] cls.add_method('Default', 'ns3::YansWifiChannelHelper', [], is_static=True) ## yans-wifi-helper.h (module 'wifi'): void ns3::YansWifiChannelHelper::SetPropagationDelay(std::string name, std::string n0="", ns3::AttributeValue const & v0=ns3::EmptyAttributeValue(), std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue(), std::string n5="", ns3::AttributeValue const & v5=ns3::EmptyAttributeValue(), std::string n6="", ns3::AttributeValue const & v6=ns3::EmptyAttributeValue(), std::string n7="", ns3::AttributeValue const & v7=ns3::EmptyAttributeValue()) [member function] cls.add_method('SetPropagationDelay', 'void', [param('std::string', 'name'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')]) return def register_Ns3YansWifiPhyHelper_methods(root_module, cls): ## yans-wifi-helper.h (module 'wifi'): ns3::YansWifiPhyHelper::YansWifiPhyHelper(ns3::YansWifiPhyHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::YansWifiPhyHelper const &', 'arg0')]) ## yans-wifi-helper.h (module 'wifi'): ns3::YansWifiPhyHelper::YansWifiPhyHelper() [constructor] cls.add_constructor([]) ## yans-wifi-helper.h (module 'wifi'): static ns3::YansWifiPhyHelper ns3::YansWifiPhyHelper::Default() [member function] cls.add_method('Default', 'ns3::YansWifiPhyHelper', [], is_static=True) ## yans-wifi-helper.h (module 'wifi'): void ns3::YansWifiPhyHelper::Set(std::string name, ns3::AttributeValue const & v) [member function] cls.add_method('Set', 'void', [param('std::string', 'name'), param('ns3::AttributeValue const &', 'v')]) ## yans-wifi-helper.h (module 'wifi'): void ns3::YansWifiPhyHelper::SetChannel(ns3::Ptr<ns3::YansWifiChannel> channel) [member function] cls.add_method('SetChannel', 'void', [param('ns3::Ptr< ns3::YansWifiChannel >', 'channel')]) ## yans-wifi-helper.h (module 'wifi'): void ns3::YansWifiPhyHelper::SetChannel(std::string channelName) [member function] cls.add_method('SetChannel', 'void', [param('std::string', 'channelName')]) ## yans-wifi-helper.h (module 'wifi'): void ns3::YansWifiPhyHelper::SetErrorRateModel(std::string name, std::string n0="", ns3::AttributeValue const & v0=ns3::EmptyAttributeValue(), std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue(), std::string n5="", ns3::AttributeValue const & v5=ns3::EmptyAttributeValue(), std::string n6="", ns3::AttributeValue const & v6=ns3::EmptyAttributeValue(), std::string n7="", ns3::AttributeValue const & v7=ns3::EmptyAttributeValue()) [member function] cls.add_method('SetErrorRateModel', 'void', [param('std::string', 'name'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')]) ## yans-wifi-helper.h (module 'wifi'): void ns3::YansWifiPhyHelper::SetPcapDataLinkType(ns3::YansWifiPhyHelper::SupportedPcapDataLinkTypes dlt) [member function] cls.add_method('SetPcapDataLinkType', 'void', [param('ns3::YansWifiPhyHelper::SupportedPcapDataLinkTypes', 'dlt')]) ## yans-wifi-helper.h (module 'wifi'): ns3::Ptr<ns3::WifiPhy> ns3::YansWifiPhyHelper::Create(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::WifiNetDevice> device) const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::WifiPhy >', [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::WifiNetDevice >', 'device')], is_const=True, visibility='private', is_virtual=True) ## yans-wifi-helper.h (module 'wifi'): void ns3::YansWifiPhyHelper::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) ## yans-wifi-helper.h (module 'wifi'): void ns3::YansWifiPhyHelper::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')], visibility='private', is_virtual=True) return def register_Ns3Empty_methods(root_module, cls): ## empty.h (module 'core'): ns3::empty::empty() [constructor] cls.add_constructor([]) ## empty.h (module 'core'): ns3::empty::empty(ns3::empty const & arg0) [copy constructor] cls.add_constructor([param('ns3::empty const &', 'arg0')]) return def register_Ns3Int64x64_t_methods(root_module, cls): cls.add_binary_comparison_operator('<=') cls.add_binary_comparison_operator('!=') cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', u'right')) cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', u'right')) cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', u'right')) cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', u'right')) cls.add_unary_numeric_operator('-') cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', u'right')) cls.add_binary_comparison_operator('<') cls.add_binary_comparison_operator('>') cls.add_inplace_numeric_operator('*=', param('ns3::int64x64_t const &', u'right')) cls.add_inplace_numeric_operator('-=', param('ns3::int64x64_t const &', u'right')) cls.add_inplace_numeric_operator('/=', param('ns3::int64x64_t const &', u'right')) cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') cls.add_binary_comparison_operator('>=') ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t() [constructor] cls.add_constructor([]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(double v) [constructor] cls.add_constructor([param('double', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long double v) [constructor] cls.add_constructor([param('long double', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(int v) [constructor] cls.add_constructor([param('int', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long int v) [constructor] cls.add_constructor([param('long int', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long long int v) [constructor] cls.add_constructor([param('long long int', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(unsigned int v) [constructor] cls.add_constructor([param('unsigned int', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long unsigned int v) [constructor] cls.add_constructor([param('long unsigned int', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long long unsigned int v) [constructor] cls.add_constructor([param('long long unsigned int', 'v')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(int64_t hi, uint64_t lo) [constructor] cls.add_constructor([param('int64_t', 'hi'), param('uint64_t', 'lo')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(ns3::int64x64_t const & o) [copy constructor] cls.add_constructor([param('ns3::int64x64_t const &', 'o')]) ## int64x64-double.h (module 'core'): double ns3::int64x64_t::GetDouble() const [member function] cls.add_method('GetDouble', 'double', [], is_const=True) ## int64x64-double.h (module 'core'): int64_t ns3::int64x64_t::GetHigh() const [member function] cls.add_method('GetHigh', 'int64_t', [], is_const=True) ## int64x64-double.h (module 'core'): uint64_t ns3::int64x64_t::GetLow() const [member function] cls.add_method('GetLow', 'uint64_t', [], is_const=True) ## int64x64-double.h (module 'core'): static ns3::int64x64_t ns3::int64x64_t::Invert(uint64_t v) [member function] cls.add_method('Invert', 'ns3::int64x64_t', [param('uint64_t', 'v')], is_static=True) ## int64x64-double.h (module 'core'): void ns3::int64x64_t::MulByInvert(ns3::int64x64_t const & o) [member function] cls.add_method('MulByInvert', 'void', [param('ns3::int64x64_t const &', 'o')]) ## int64x64-double.h (module 'core'): ns3::int64x64_t::implementation [variable] cls.add_static_attribute('implementation', 'ns3::int64x64_t::impl_type const', is_const=True) return def register_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_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_Ns3MgtAddBaRequestHeader_methods(root_module, cls): ## mgt-headers.h (module 'wifi'): ns3::MgtAddBaRequestHeader::MgtAddBaRequestHeader(ns3::MgtAddBaRequestHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::MgtAddBaRequestHeader const &', 'arg0')]) ## mgt-headers.h (module 'wifi'): ns3::MgtAddBaRequestHeader::MgtAddBaRequestHeader() [constructor] cls.add_constructor([]) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtAddBaRequestHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mgt-headers.h (module 'wifi'): uint16_t ns3::MgtAddBaRequestHeader::GetBufferSize() const [member function] cls.add_method('GetBufferSize', 'uint16_t', [], is_const=True) ## mgt-headers.h (module 'wifi'): ns3::TypeId ns3::MgtAddBaRequestHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtAddBaRequestHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): uint16_t ns3::MgtAddBaRequestHeader::GetStartingSequence() const [member function] cls.add_method('GetStartingSequence', 'uint16_t', [], is_const=True) ## mgt-headers.h (module 'wifi'): uint8_t ns3::MgtAddBaRequestHeader::GetTid() const [member function] cls.add_method('GetTid', 'uint8_t', [], is_const=True) ## mgt-headers.h (module 'wifi'): uint16_t ns3::MgtAddBaRequestHeader::GetTimeout() const [member function] cls.add_method('GetTimeout', 'uint16_t', [], is_const=True) ## mgt-headers.h (module 'wifi'): static ns3::TypeId ns3::MgtAddBaRequestHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mgt-headers.h (module 'wifi'): bool ns3::MgtAddBaRequestHeader::IsAmsduSupported() const [member function] cls.add_method('IsAmsduSupported', 'bool', [], is_const=True) ## mgt-headers.h (module 'wifi'): bool ns3::MgtAddBaRequestHeader::IsImmediateBlockAck() const [member function] cls.add_method('IsImmediateBlockAck', 'bool', [], is_const=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaRequestHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaRequestHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaRequestHeader::SetAmsduSupport(bool supported) [member function] cls.add_method('SetAmsduSupport', 'void', [param('bool', 'supported')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaRequestHeader::SetBufferSize(uint16_t size) [member function] cls.add_method('SetBufferSize', 'void', [param('uint16_t', 'size')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaRequestHeader::SetDelayedBlockAck() [member function] cls.add_method('SetDelayedBlockAck', 'void', []) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaRequestHeader::SetImmediateBlockAck() [member function] cls.add_method('SetImmediateBlockAck', 'void', []) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaRequestHeader::SetStartingSequence(uint16_t seq) [member function] cls.add_method('SetStartingSequence', 'void', [param('uint16_t', 'seq')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaRequestHeader::SetTid(uint8_t tid) [member function] cls.add_method('SetTid', 'void', [param('uint8_t', 'tid')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaRequestHeader::SetTimeout(uint16_t timeout) [member function] cls.add_method('SetTimeout', 'void', [param('uint16_t', 'timeout')]) return def register_Ns3MgtAddBaResponseHeader_methods(root_module, cls): ## mgt-headers.h (module 'wifi'): ns3::MgtAddBaResponseHeader::MgtAddBaResponseHeader(ns3::MgtAddBaResponseHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::MgtAddBaResponseHeader const &', 'arg0')]) ## mgt-headers.h (module 'wifi'): ns3::MgtAddBaResponseHeader::MgtAddBaResponseHeader() [constructor] cls.add_constructor([]) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtAddBaResponseHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mgt-headers.h (module 'wifi'): uint16_t ns3::MgtAddBaResponseHeader::GetBufferSize() const [member function] cls.add_method('GetBufferSize', 'uint16_t', [], is_const=True) ## mgt-headers.h (module 'wifi'): ns3::TypeId ns3::MgtAddBaResponseHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtAddBaResponseHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): ns3::StatusCode ns3::MgtAddBaResponseHeader::GetStatusCode() const [member function] cls.add_method('GetStatusCode', 'ns3::StatusCode', [], is_const=True) ## mgt-headers.h (module 'wifi'): uint8_t ns3::MgtAddBaResponseHeader::GetTid() const [member function] cls.add_method('GetTid', 'uint8_t', [], is_const=True) ## mgt-headers.h (module 'wifi'): uint16_t ns3::MgtAddBaResponseHeader::GetTimeout() const [member function] cls.add_method('GetTimeout', 'uint16_t', [], is_const=True) ## mgt-headers.h (module 'wifi'): static ns3::TypeId ns3::MgtAddBaResponseHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mgt-headers.h (module 'wifi'): bool ns3::MgtAddBaResponseHeader::IsAmsduSupported() const [member function] cls.add_method('IsAmsduSupported', 'bool', [], is_const=True) ## mgt-headers.h (module 'wifi'): bool ns3::MgtAddBaResponseHeader::IsImmediateBlockAck() const [member function] cls.add_method('IsImmediateBlockAck', 'bool', [], is_const=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaResponseHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaResponseHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaResponseHeader::SetAmsduSupport(bool supported) [member function] cls.add_method('SetAmsduSupport', 'void', [param('bool', 'supported')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaResponseHeader::SetBufferSize(uint16_t size) [member function] cls.add_method('SetBufferSize', 'void', [param('uint16_t', 'size')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaResponseHeader::SetDelayedBlockAck() [member function] cls.add_method('SetDelayedBlockAck', 'void', []) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaResponseHeader::SetImmediateBlockAck() [member function] cls.add_method('SetImmediateBlockAck', 'void', []) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaResponseHeader::SetStatusCode(ns3::StatusCode code) [member function] cls.add_method('SetStatusCode', 'void', [param('ns3::StatusCode', 'code')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaResponseHeader::SetTid(uint8_t tid) [member function] cls.add_method('SetTid', 'void', [param('uint8_t', 'tid')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAddBaResponseHeader::SetTimeout(uint16_t timeout) [member function] cls.add_method('SetTimeout', 'void', [param('uint16_t', 'timeout')]) return def register_Ns3MgtAssocRequestHeader_methods(root_module, cls): ## mgt-headers.h (module 'wifi'): ns3::MgtAssocRequestHeader::MgtAssocRequestHeader(ns3::MgtAssocRequestHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::MgtAssocRequestHeader const &', 'arg0')]) ## mgt-headers.h (module 'wifi'): ns3::MgtAssocRequestHeader::MgtAssocRequestHeader() [constructor] cls.add_constructor([]) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtAssocRequestHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mgt-headers.h (module 'wifi'): ns3::HtCapabilities ns3::MgtAssocRequestHeader::GetHtCapabilities() const [member function] cls.add_method('GetHtCapabilities', 'ns3::HtCapabilities', [], is_const=True) ## mgt-headers.h (module 'wifi'): ns3::TypeId ns3::MgtAssocRequestHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): uint16_t ns3::MgtAssocRequestHeader::GetListenInterval() const [member function] cls.add_method('GetListenInterval', 'uint16_t', [], is_const=True) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtAssocRequestHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): ns3::Ssid ns3::MgtAssocRequestHeader::GetSsid() const [member function] cls.add_method('GetSsid', 'ns3::Ssid', [], is_const=True) ## mgt-headers.h (module 'wifi'): ns3::SupportedRates ns3::MgtAssocRequestHeader::GetSupportedRates() const [member function] cls.add_method('GetSupportedRates', 'ns3::SupportedRates', [], is_const=True) ## mgt-headers.h (module 'wifi'): static ns3::TypeId ns3::MgtAssocRequestHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtAssocRequestHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtAssocRequestHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtAssocRequestHeader::SetHtCapabilities(ns3::HtCapabilities htcapabilities) [member function] cls.add_method('SetHtCapabilities', 'void', [param('ns3::HtCapabilities', 'htcapabilities')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAssocRequestHeader::SetListenInterval(uint16_t interval) [member function] cls.add_method('SetListenInterval', 'void', [param('uint16_t', 'interval')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAssocRequestHeader::SetSsid(ns3::Ssid ssid) [member function] cls.add_method('SetSsid', 'void', [param('ns3::Ssid', 'ssid')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAssocRequestHeader::SetSupportedRates(ns3::SupportedRates rates) [member function] cls.add_method('SetSupportedRates', 'void', [param('ns3::SupportedRates', 'rates')]) return def register_Ns3MgtAssocResponseHeader_methods(root_module, cls): ## mgt-headers.h (module 'wifi'): ns3::MgtAssocResponseHeader::MgtAssocResponseHeader(ns3::MgtAssocResponseHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::MgtAssocResponseHeader const &', 'arg0')]) ## mgt-headers.h (module 'wifi'): ns3::MgtAssocResponseHeader::MgtAssocResponseHeader() [constructor] cls.add_constructor([]) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtAssocResponseHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mgt-headers.h (module 'wifi'): ns3::HtCapabilities ns3::MgtAssocResponseHeader::GetHtCapabilities() const [member function] cls.add_method('GetHtCapabilities', 'ns3::HtCapabilities', [], is_const=True) ## mgt-headers.h (module 'wifi'): ns3::TypeId ns3::MgtAssocResponseHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtAssocResponseHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): ns3::StatusCode ns3::MgtAssocResponseHeader::GetStatusCode() [member function] cls.add_method('GetStatusCode', 'ns3::StatusCode', []) ## mgt-headers.h (module 'wifi'): ns3::SupportedRates ns3::MgtAssocResponseHeader::GetSupportedRates() [member function] cls.add_method('GetSupportedRates', 'ns3::SupportedRates', []) ## mgt-headers.h (module 'wifi'): static ns3::TypeId ns3::MgtAssocResponseHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtAssocResponseHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtAssocResponseHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtAssocResponseHeader::SetHtCapabilities(ns3::HtCapabilities htcapabilities) [member function] cls.add_method('SetHtCapabilities', 'void', [param('ns3::HtCapabilities', 'htcapabilities')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAssocResponseHeader::SetStatusCode(ns3::StatusCode code) [member function] cls.add_method('SetStatusCode', 'void', [param('ns3::StatusCode', 'code')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtAssocResponseHeader::SetSupportedRates(ns3::SupportedRates rates) [member function] cls.add_method('SetSupportedRates', 'void', [param('ns3::SupportedRates', 'rates')]) return def register_Ns3MgtDelBaHeader_methods(root_module, cls): ## mgt-headers.h (module 'wifi'): ns3::MgtDelBaHeader::MgtDelBaHeader(ns3::MgtDelBaHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::MgtDelBaHeader const &', 'arg0')]) ## mgt-headers.h (module 'wifi'): ns3::MgtDelBaHeader::MgtDelBaHeader() [constructor] cls.add_constructor([]) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtDelBaHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mgt-headers.h (module 'wifi'): ns3::TypeId ns3::MgtDelBaHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtDelBaHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): uint8_t ns3::MgtDelBaHeader::GetTid() const [member function] cls.add_method('GetTid', 'uint8_t', [], is_const=True) ## mgt-headers.h (module 'wifi'): static ns3::TypeId ns3::MgtDelBaHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mgt-headers.h (module 'wifi'): bool ns3::MgtDelBaHeader::IsByOriginator() const [member function] cls.add_method('IsByOriginator', 'bool', [], is_const=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtDelBaHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtDelBaHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtDelBaHeader::SetByOriginator() [member function] cls.add_method('SetByOriginator', 'void', []) ## mgt-headers.h (module 'wifi'): void ns3::MgtDelBaHeader::SetByRecipient() [member function] cls.add_method('SetByRecipient', 'void', []) ## mgt-headers.h (module 'wifi'): void ns3::MgtDelBaHeader::SetTid(uint8_t arg0) [member function] cls.add_method('SetTid', 'void', [param('uint8_t', 'arg0')]) return def register_Ns3MgtProbeRequestHeader_methods(root_module, cls): ## mgt-headers.h (module 'wifi'): ns3::MgtProbeRequestHeader::MgtProbeRequestHeader() [constructor] cls.add_constructor([]) ## mgt-headers.h (module 'wifi'): ns3::MgtProbeRequestHeader::MgtProbeRequestHeader(ns3::MgtProbeRequestHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::MgtProbeRequestHeader const &', 'arg0')]) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtProbeRequestHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mgt-headers.h (module 'wifi'): ns3::HtCapabilities ns3::MgtProbeRequestHeader::GetHtCapabilities() const [member function] cls.add_method('GetHtCapabilities', 'ns3::HtCapabilities', [], is_const=True) ## mgt-headers.h (module 'wifi'): ns3::TypeId ns3::MgtProbeRequestHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtProbeRequestHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): ns3::Ssid ns3::MgtProbeRequestHeader::GetSsid() const [member function] cls.add_method('GetSsid', 'ns3::Ssid', [], is_const=True) ## mgt-headers.h (module 'wifi'): ns3::SupportedRates ns3::MgtProbeRequestHeader::GetSupportedRates() const [member function] cls.add_method('GetSupportedRates', 'ns3::SupportedRates', [], is_const=True) ## mgt-headers.h (module 'wifi'): static ns3::TypeId ns3::MgtProbeRequestHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtProbeRequestHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtProbeRequestHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtProbeRequestHeader::SetHtCapabilities(ns3::HtCapabilities htcapabilities) [member function] cls.add_method('SetHtCapabilities', 'void', [param('ns3::HtCapabilities', 'htcapabilities')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtProbeRequestHeader::SetSsid(ns3::Ssid ssid) [member function] cls.add_method('SetSsid', 'void', [param('ns3::Ssid', 'ssid')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtProbeRequestHeader::SetSupportedRates(ns3::SupportedRates rates) [member function] cls.add_method('SetSupportedRates', 'void', [param('ns3::SupportedRates', 'rates')]) return def register_Ns3MgtProbeResponseHeader_methods(root_module, cls): ## mgt-headers.h (module 'wifi'): ns3::MgtProbeResponseHeader::MgtProbeResponseHeader(ns3::MgtProbeResponseHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::MgtProbeResponseHeader const &', 'arg0')]) ## mgt-headers.h (module 'wifi'): ns3::MgtProbeResponseHeader::MgtProbeResponseHeader() [constructor] cls.add_constructor([]) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtProbeResponseHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mgt-headers.h (module 'wifi'): uint64_t ns3::MgtProbeResponseHeader::GetBeaconIntervalUs() const [member function] cls.add_method('GetBeaconIntervalUs', 'uint64_t', [], is_const=True) ## mgt-headers.h (module 'wifi'): ns3::HtCapabilities ns3::MgtProbeResponseHeader::GetHtCapabilities() const [member function] cls.add_method('GetHtCapabilities', 'ns3::HtCapabilities', [], is_const=True) ## mgt-headers.h (module 'wifi'): ns3::TypeId ns3::MgtProbeResponseHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): uint32_t ns3::MgtProbeResponseHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): ns3::Ssid ns3::MgtProbeResponseHeader::GetSsid() const [member function] cls.add_method('GetSsid', 'ns3::Ssid', [], is_const=True) ## mgt-headers.h (module 'wifi'): ns3::SupportedRates ns3::MgtProbeResponseHeader::GetSupportedRates() const [member function] cls.add_method('GetSupportedRates', 'ns3::SupportedRates', [], is_const=True) ## mgt-headers.h (module 'wifi'): uint64_t ns3::MgtProbeResponseHeader::GetTimestamp() [member function] cls.add_method('GetTimestamp', 'uint64_t', []) ## mgt-headers.h (module 'wifi'): static ns3::TypeId ns3::MgtProbeResponseHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtProbeResponseHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtProbeResponseHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::MgtProbeResponseHeader::SetBeaconIntervalUs(uint64_t us) [member function] cls.add_method('SetBeaconIntervalUs', 'void', [param('uint64_t', 'us')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtProbeResponseHeader::SetHtCapabilities(ns3::HtCapabilities htcapabilities) [member function] cls.add_method('SetHtCapabilities', 'void', [param('ns3::HtCapabilities', 'htcapabilities')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtProbeResponseHeader::SetSsid(ns3::Ssid ssid) [member function] cls.add_method('SetSsid', 'void', [param('ns3::Ssid', 'ssid')]) ## mgt-headers.h (module 'wifi'): void ns3::MgtProbeResponseHeader::SetSupportedRates(ns3::SupportedRates rates) [member function] cls.add_method('SetSupportedRates', 'void', [param('ns3::SupportedRates', 'rates')]) return def register_Ns3NqosWifiMacHelper_methods(root_module, cls): ## nqos-wifi-mac-helper.h (module 'wifi'): ns3::NqosWifiMacHelper::NqosWifiMacHelper(ns3::NqosWifiMacHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::NqosWifiMacHelper const &', 'arg0')]) ## nqos-wifi-mac-helper.h (module 'wifi'): ns3::NqosWifiMacHelper::NqosWifiMacHelper() [constructor] cls.add_constructor([]) ## nqos-wifi-mac-helper.h (module 'wifi'): static ns3::NqosWifiMacHelper ns3::NqosWifiMacHelper::Default() [member function] cls.add_method('Default', 'ns3::NqosWifiMacHelper', [], is_static=True) ## nqos-wifi-mac-helper.h (module 'wifi'): void ns3::NqosWifiMacHelper::SetType(std::string type, std::string n0="", ns3::AttributeValue const & v0=ns3::EmptyAttributeValue(), std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue(), std::string n5="", ns3::AttributeValue const & v5=ns3::EmptyAttributeValue(), std::string n6="", ns3::AttributeValue const & v6=ns3::EmptyAttributeValue(), std::string n7="", ns3::AttributeValue const & v7=ns3::EmptyAttributeValue()) [member function] cls.add_method('SetType', 'void', [param('std::string', 'type'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')], is_virtual=True) ## nqos-wifi-mac-helper.h (module 'wifi'): ns3::Ptr<ns3::WifiMac> ns3::NqosWifiMacHelper::Create() const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::WifiMac >', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3Object_methods(root_module, cls): ## object.h (module 'core'): ns3::Object::Object() [constructor] cls.add_constructor([]) ## object.h (module 'core'): void ns3::Object::AggregateObject(ns3::Ptr<ns3::Object> other) [member function] cls.add_method('AggregateObject', 'void', [param('ns3::Ptr< ns3::Object >', 'other')]) ## object.h (module 'core'): void ns3::Object::Dispose() [member function] cls.add_method('Dispose', 'void', []) ## object.h (module 'core'): ns3::Object::AggregateIterator ns3::Object::GetAggregateIterator() const [member function] cls.add_method('GetAggregateIterator', 'ns3::Object::AggregateIterator', [], is_const=True) ## object.h (module 'core'): ns3::TypeId ns3::Object::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## object.h (module 'core'): static ns3::TypeId ns3::Object::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## object.h (module 'core'): void ns3::Object::Initialize() [member function] cls.add_method('Initialize', 'void', []) ## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor] cls.add_constructor([param('ns3::Object const &', 'o')], visibility='protected') ## object.h (module 'core'): void ns3::Object::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function] cls.add_method('DoInitialize', 'void', [], visibility='protected', is_virtual=True) ## object.h (module 'core'): void ns3::Object::NotifyNewAggregate() [member function] cls.add_method('NotifyNewAggregate', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3ObjectAggregateIterator_methods(root_module, cls): ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator(ns3::Object::AggregateIterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::Object::AggregateIterator const &', 'arg0')]) ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator() [constructor] cls.add_constructor([]) ## object.h (module 'core'): bool ns3::Object::AggregateIterator::HasNext() const [member function] cls.add_method('HasNext', 'bool', [], is_const=True) ## object.h (module 'core'): ns3::Ptr<ns3::Object const> ns3::Object::AggregateIterator::Next() [member function] cls.add_method('Next', 'ns3::Ptr< ns3::Object const >', []) return def register_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<ns3::Packet const> 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<ns3::Packet const> 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_Ns3PropagationDelayModel_methods(root_module, cls): ## propagation-delay-model.h (module 'propagation'): ns3::PropagationDelayModel::PropagationDelayModel() [constructor] cls.add_constructor([]) ## propagation-delay-model.h (module 'propagation'): ns3::PropagationDelayModel::PropagationDelayModel(ns3::PropagationDelayModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::PropagationDelayModel const &', 'arg0')]) ## propagation-delay-model.h (module 'propagation'): int64_t ns3::PropagationDelayModel::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')]) ## propagation-delay-model.h (module 'propagation'): ns3::Time ns3::PropagationDelayModel::GetDelay(ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('GetDelay', 'ns3::Time', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_pure_virtual=True, is_const=True, is_virtual=True) ## propagation-delay-model.h (module 'propagation'): static ns3::TypeId ns3::PropagationDelayModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-delay-model.h (module 'propagation'): int64_t ns3::PropagationDelayModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], is_pure_virtual=True, visibility='private', is_virtual=True) return def register_Ns3PropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::PropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::PropagationLossModel::PropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): void ns3::PropagationLossModel::SetNext(ns3::Ptr<ns3::PropagationLossModel> next) [member function] cls.add_method('SetNext', 'void', [param('ns3::Ptr< ns3::PropagationLossModel >', 'next')]) ## propagation-loss-model.h (module 'propagation'): ns3::Ptr<ns3::PropagationLossModel> ns3::PropagationLossModel::GetNext() [member function] cls.add_method('GetNext', 'ns3::Ptr< ns3::PropagationLossModel >', []) ## propagation-loss-model.h (module 'propagation'): double ns3::PropagationLossModel::CalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('CalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::PropagationLossModel::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')]) ## propagation-loss-model.h (module 'propagation'): double ns3::PropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::PropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], is_pure_virtual=True, visibility='private', is_virtual=True) return def register_Ns3QosTag_methods(root_module, cls): ## qos-tag.h (module 'wifi'): ns3::QosTag::QosTag(ns3::QosTag const & arg0) [copy constructor] cls.add_constructor([param('ns3::QosTag const &', 'arg0')]) ## qos-tag.h (module 'wifi'): ns3::QosTag::QosTag() [constructor] cls.add_constructor([]) ## qos-tag.h (module 'wifi'): ns3::QosTag::QosTag(uint8_t tid) [constructor] cls.add_constructor([param('uint8_t', 'tid')]) ## qos-tag.h (module 'wifi'): void ns3::QosTag::Deserialize(ns3::TagBuffer i) [member function] cls.add_method('Deserialize', 'void', [param('ns3::TagBuffer', 'i')], is_virtual=True) ## qos-tag.h (module 'wifi'): ns3::TypeId ns3::QosTag::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## qos-tag.h (module 'wifi'): uint32_t ns3::QosTag::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## qos-tag.h (module 'wifi'): uint8_t ns3::QosTag::GetTid() const [member function] cls.add_method('GetTid', 'uint8_t', [], is_const=True) ## qos-tag.h (module 'wifi'): static ns3::TypeId ns3::QosTag::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## qos-tag.h (module 'wifi'): void ns3::QosTag::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## qos-tag.h (module 'wifi'): void ns3::QosTag::Serialize(ns3::TagBuffer i) const [member function] cls.add_method('Serialize', 'void', [param('ns3::TagBuffer', 'i')], is_const=True, is_virtual=True) ## qos-tag.h (module 'wifi'): void ns3::QosTag::SetTid(uint8_t tid) [member function] cls.add_method('SetTid', 'void', [param('uint8_t', 'tid')]) ## qos-tag.h (module 'wifi'): void ns3::QosTag::SetUserPriority(ns3::UserPriority up) [member function] cls.add_method('SetUserPriority', 'void', [param('ns3::UserPriority', 'up')]) return def register_Ns3QosWifiMacHelper_methods(root_module, cls): ## qos-wifi-mac-helper.h (module 'wifi'): ns3::QosWifiMacHelper::QosWifiMacHelper(ns3::QosWifiMacHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::QosWifiMacHelper const &', 'arg0')]) ## qos-wifi-mac-helper.h (module 'wifi'): ns3::QosWifiMacHelper::QosWifiMacHelper() [constructor] cls.add_constructor([]) ## qos-wifi-mac-helper.h (module 'wifi'): static ns3::QosWifiMacHelper ns3::QosWifiMacHelper::Default() [member function] cls.add_method('Default', 'ns3::QosWifiMacHelper', [], is_static=True) ## qos-wifi-mac-helper.h (module 'wifi'): void ns3::QosWifiMacHelper::SetBlockAckInactivityTimeoutForAc(ns3::AcIndex ac, uint16_t timeout) [member function] cls.add_method('SetBlockAckInactivityTimeoutForAc', 'void', [param('ns3::AcIndex', 'ac'), param('uint16_t', 'timeout')]) ## qos-wifi-mac-helper.h (module 'wifi'): void ns3::QosWifiMacHelper::SetBlockAckThresholdForAc(ns3::AcIndex ac, uint8_t threshold) [member function] cls.add_method('SetBlockAckThresholdForAc', 'void', [param('ns3::AcIndex', 'ac'), param('uint8_t', 'threshold')]) ## qos-wifi-mac-helper.h (module 'wifi'): void ns3::QosWifiMacHelper::SetMsduAggregatorForAc(ns3::AcIndex ac, std::string type, std::string n0="", ns3::AttributeValue const & v0=ns3::EmptyAttributeValue(), std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue()) [member function] cls.add_method('SetMsduAggregatorForAc', 'void', [param('ns3::AcIndex', 'ac'), param('std::string', 'type'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()')]) ## qos-wifi-mac-helper.h (module 'wifi'): void ns3::QosWifiMacHelper::SetType(std::string type, std::string n0="", ns3::AttributeValue const & v0=ns3::EmptyAttributeValue(), std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue(), std::string n5="", ns3::AttributeValue const & v5=ns3::EmptyAttributeValue(), std::string n6="", ns3::AttributeValue const & v6=ns3::EmptyAttributeValue(), std::string n7="", ns3::AttributeValue const & v7=ns3::EmptyAttributeValue()) [member function] cls.add_method('SetType', 'void', [param('std::string', 'type'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')], is_virtual=True) ## qos-wifi-mac-helper.h (module 'wifi'): ns3::Ptr<ns3::WifiMac> ns3::QosWifiMacHelper::Create() const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::WifiMac >', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3RandomPropagationDelayModel_methods(root_module, cls): ## propagation-delay-model.h (module 'propagation'): ns3::RandomPropagationDelayModel::RandomPropagationDelayModel(ns3::RandomPropagationDelayModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::RandomPropagationDelayModel const &', 'arg0')]) ## propagation-delay-model.h (module 'propagation'): ns3::RandomPropagationDelayModel::RandomPropagationDelayModel() [constructor] cls.add_constructor([]) ## propagation-delay-model.h (module 'propagation'): ns3::Time ns3::RandomPropagationDelayModel::GetDelay(ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('GetDelay', 'ns3::Time', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, is_virtual=True) ## propagation-delay-model.h (module 'propagation'): static ns3::TypeId ns3::RandomPropagationDelayModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-delay-model.h (module 'propagation'): int64_t ns3::RandomPropagationDelayModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3RandomPropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::RandomPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::RandomPropagationLossModel::RandomPropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): double ns3::RandomPropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::RandomPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3RandomVariableStream_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::RandomVariableStream::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::RandomVariableStream::RandomVariableStream() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): void ns3::RandomVariableStream::SetStream(int64_t stream) [member function] cls.add_method('SetStream', 'void', [param('int64_t', 'stream')]) ## random-variable-stream.h (module 'core'): int64_t ns3::RandomVariableStream::GetStream() const [member function] cls.add_method('GetStream', 'int64_t', [], is_const=True) ## random-variable-stream.h (module 'core'): void ns3::RandomVariableStream::SetAntithetic(bool isAntithetic) [member function] cls.add_method('SetAntithetic', 'void', [param('bool', 'isAntithetic')]) ## random-variable-stream.h (module 'core'): bool ns3::RandomVariableStream::IsAntithetic() const [member function] cls.add_method('IsAntithetic', 'bool', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::RandomVariableStream::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_pure_virtual=True, is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::RandomVariableStream::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_pure_virtual=True, is_virtual=True) ## random-variable-stream.h (module 'core'): ns3::RngStream * ns3::RandomVariableStream::Peek() const [member function] cls.add_method('Peek', 'ns3::RngStream *', [], is_const=True, visibility='protected') return def register_Ns3RangePropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::RangePropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::RangePropagationLossModel::RangePropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): double ns3::RangePropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::RangePropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3SequentialRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::SequentialRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::SequentialRandomVariable::SequentialRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::SequentialRandomVariable::GetMin() const [member function] cls.add_method('GetMin', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::SequentialRandomVariable::GetMax() const [member function] cls.add_method('GetMax', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): ns3::Ptr<ns3::RandomVariableStream> ns3::SequentialRandomVariable::GetIncrement() const [member function] cls.add_method('GetIncrement', 'ns3::Ptr< ns3::RandomVariableStream >', [], is_const=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::SequentialRandomVariable::GetConsecutive() const [member function] cls.add_method('GetConsecutive', 'uint32_t', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::SequentialRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::SequentialRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >::SimpleRefCount(ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter< ns3::AttributeAccessor > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >::SimpleRefCount(ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter< ns3::AttributeChecker > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >::SimpleRefCount(ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter< ns3::AttributeValue > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >::SimpleRefCount(ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter< ns3::CallbackImplBase > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >::SimpleRefCount(ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter< ns3::EventImpl > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >::SimpleRefCount(ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SimpleRefCount__Ns3InterferenceHelperEvent_Ns3Empty_Ns3DefaultDeleter__lt__ns3InterferenceHelperEvent__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::InterferenceHelper::Event, ns3::empty, ns3::DefaultDeleter<ns3::InterferenceHelper::Event> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::InterferenceHelper::Event, ns3::empty, ns3::DefaultDeleter<ns3::InterferenceHelper::Event> >::SimpleRefCount(ns3::SimpleRefCount<ns3::InterferenceHelper::Event, ns3::empty, ns3::DefaultDeleter<ns3::InterferenceHelper::Event> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::InterferenceHelper::Event, ns3::empty, ns3::DefaultDeleter< ns3::InterferenceHelper::Event > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::InterferenceHelper::Event, ns3::empty, ns3::DefaultDeleter<ns3::InterferenceHelper::Event> >::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_Ns3SimpleRefCount__Ns3WifiInformationElement_Ns3Empty_Ns3DefaultDeleter__lt__ns3WifiInformationElement__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::WifiInformationElement, ns3::empty, ns3::DefaultDeleter<ns3::WifiInformationElement> >::SimpleRefCount() [constructor] cls.add_constructor([]) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::WifiInformationElement, ns3::empty, ns3::DefaultDeleter<ns3::WifiInformationElement> >::SimpleRefCount(ns3::SimpleRefCount<ns3::WifiInformationElement, ns3::empty, ns3::DefaultDeleter<ns3::WifiInformationElement> > const & o) [copy constructor] cls.add_constructor([param('ns3::SimpleRefCount< ns3::WifiInformationElement, ns3::empty, ns3::DefaultDeleter< ns3::WifiInformationElement > > const &', 'o')]) ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::WifiInformationElement, ns3::empty, ns3::DefaultDeleter<ns3::WifiInformationElement> >::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], is_static=True) return def register_Ns3SnrTag_methods(root_module, cls): ## snr-tag.h (module 'wifi'): ns3::SnrTag::SnrTag(ns3::SnrTag const & arg0) [copy constructor] cls.add_constructor([param('ns3::SnrTag const &', 'arg0')]) ## snr-tag.h (module 'wifi'): ns3::SnrTag::SnrTag() [constructor] cls.add_constructor([]) ## snr-tag.h (module 'wifi'): ns3::SnrTag::SnrTag(double snr) [constructor] cls.add_constructor([param('double', 'snr')]) ## snr-tag.h (module 'wifi'): void ns3::SnrTag::Deserialize(ns3::TagBuffer i) [member function] cls.add_method('Deserialize', 'void', [param('ns3::TagBuffer', 'i')], is_virtual=True) ## snr-tag.h (module 'wifi'): double ns3::SnrTag::Get() const [member function] cls.add_method('Get', 'double', [], is_const=True) ## snr-tag.h (module 'wifi'): ns3::TypeId ns3::SnrTag::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## snr-tag.h (module 'wifi'): uint32_t ns3::SnrTag::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## snr-tag.h (module 'wifi'): static ns3::TypeId ns3::SnrTag::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## snr-tag.h (module 'wifi'): void ns3::SnrTag::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## snr-tag.h (module 'wifi'): void ns3::SnrTag::Serialize(ns3::TagBuffer i) const [member function] cls.add_method('Serialize', 'void', [param('ns3::TagBuffer', 'i')], is_const=True, is_virtual=True) ## snr-tag.h (module 'wifi'): void ns3::SnrTag::Set(double snr) [member function] cls.add_method('Set', 'void', [param('double', 'snr')]) return def register_Ns3ThreeLogDistancePropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::ThreeLogDistancePropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::ThreeLogDistancePropagationLossModel::ThreeLogDistancePropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): double ns3::ThreeLogDistancePropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::ThreeLogDistancePropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3Time_methods(root_module, cls): cls.add_binary_comparison_operator('<=') cls.add_binary_comparison_operator('!=') cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', u'right')) cls.add_binary_numeric_operator('*', root_module['ns3::Time'], root_module['ns3::Time'], param('int64_t const &', u'right')) cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', u'right')) cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', u'right')) cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::Time'], param('int64_t const &', u'right')) cls.add_binary_comparison_operator('<') cls.add_binary_comparison_operator('>') cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', u'right')) cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') cls.add_binary_comparison_operator('>=') ## nstime.h (module 'core'): ns3::Time::Time() [constructor] cls.add_constructor([]) ## nstime.h (module 'core'): ns3::Time::Time(ns3::Time const & o) [copy constructor] cls.add_constructor([param('ns3::Time const &', 'o')]) ## nstime.h (module 'core'): ns3::Time::Time(double v) [constructor] cls.add_constructor([param('double', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(int v) [constructor] cls.add_constructor([param('int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(long int v) [constructor] cls.add_constructor([param('long int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(long long int v) [constructor] cls.add_constructor([param('long long int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(unsigned int v) [constructor] cls.add_constructor([param('unsigned int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(long unsigned int v) [constructor] cls.add_constructor([param('long unsigned int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor] cls.add_constructor([param('long long unsigned int', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor] cls.add_constructor([param('ns3::int64x64_t const &', 'v')]) ## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor] cls.add_constructor([param('std::string const &', 's')]) ## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function] cls.add_method('As', 'ns3::TimeWithUnit', [param('ns3::Time::Unit const', 'unit')], is_const=True) ## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function] cls.add_method('Compare', 'int', [param('ns3::Time const &', 'o')], is_const=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function] cls.add_method('From', 'ns3::Time', [param('ns3::int64x64_t const &', 'value')], is_static=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function] cls.add_method('From', 'ns3::Time', [param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')], is_static=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function] cls.add_method('FromDouble', 'ns3::Time', [param('double', 'value'), param('ns3::Time::Unit', 'unit')], is_static=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function] cls.add_method('FromInteger', 'ns3::Time', [param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')], is_static=True) ## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function] cls.add_method('GetDays', 'double', [], is_const=True) ## nstime.h (module 'core'): double ns3::Time::GetDouble() const [member function] cls.add_method('GetDouble', 'double', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetFemtoSeconds() const [member function] cls.add_method('GetFemtoSeconds', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): double ns3::Time::GetHours() const [member function] cls.add_method('GetHours', 'double', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetInteger() const [member function] cls.add_method('GetInteger', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetMicroSeconds() const [member function] cls.add_method('GetMicroSeconds', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetMilliSeconds() const [member function] cls.add_method('GetMilliSeconds', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): double ns3::Time::GetMinutes() const [member function] cls.add_method('GetMinutes', 'double', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetNanoSeconds() const [member function] cls.add_method('GetNanoSeconds', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetPicoSeconds() const [member function] cls.add_method('GetPicoSeconds', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): static ns3::Time::Unit ns3::Time::GetResolution() [member function] cls.add_method('GetResolution', 'ns3::Time::Unit', [], is_static=True) ## nstime.h (module 'core'): double ns3::Time::GetSeconds() const [member function] cls.add_method('GetSeconds', 'double', [], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::GetTimeStep() const [member function] cls.add_method('GetTimeStep', 'int64_t', [], is_const=True) ## nstime.h (module 'core'): double ns3::Time::GetYears() const [member function] cls.add_method('GetYears', 'double', [], is_const=True) ## nstime.h (module 'core'): bool ns3::Time::IsNegative() const [member function] cls.add_method('IsNegative', 'bool', [], is_const=True) ## nstime.h (module 'core'): bool ns3::Time::IsPositive() const [member function] cls.add_method('IsPositive', 'bool', [], is_const=True) ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyNegative() const [member function] cls.add_method('IsStrictlyNegative', 'bool', [], is_const=True) ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyPositive() const [member function] cls.add_method('IsStrictlyPositive', 'bool', [], is_const=True) ## nstime.h (module 'core'): bool ns3::Time::IsZero() const [member function] cls.add_method('IsZero', 'bool', [], is_const=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] cls.add_method('Max', 'ns3::Time', [], is_static=True) ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] cls.add_method('Min', 'ns3::Time', [], is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] cls.add_method('StaticInit', 'bool', [], is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function] cls.add_method('To', 'ns3::int64x64_t', [param('ns3::Time::Unit', 'unit')], is_const=True) ## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function] cls.add_method('ToDouble', 'double', [param('ns3::Time::Unit', 'unit')], is_const=True) ## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function] cls.add_method('ToInteger', 'int64_t', [param('ns3::Time::Unit', 'unit')], is_const=True) return def register_Ns3TraceSourceAccessor_methods(root_module, cls): ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor::TraceSourceAccessor(ns3::TraceSourceAccessor const & arg0) [copy constructor] cls.add_constructor([param('ns3::TraceSourceAccessor const &', 'arg0')]) ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor::TraceSourceAccessor() [constructor] cls.add_constructor([]) ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::Connect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function] cls.add_method('Connect', 'bool', [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')], is_pure_virtual=True, is_const=True, is_virtual=True) ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::ConnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function] cls.add_method('ConnectWithoutContext', 'bool', [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')], is_pure_virtual=True, is_const=True, is_virtual=True) ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::Disconnect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function] cls.add_method('Disconnect', 'bool', [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')], is_pure_virtual=True, is_const=True, is_virtual=True) ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::DisconnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function] cls.add_method('DisconnectWithoutContext', 'bool', [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3Trailer_methods(root_module, cls): cls.add_output_stream_operator() ## trailer.h (module 'network'): ns3::Trailer::Trailer() [constructor] cls.add_constructor([]) ## trailer.h (module 'network'): ns3::Trailer::Trailer(ns3::Trailer const & arg0) [copy constructor] cls.add_constructor([param('ns3::Trailer const &', 'arg0')]) ## trailer.h (module 'network'): uint32_t ns3::Trailer::Deserialize(ns3::Buffer::Iterator end) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'end')], is_pure_virtual=True, is_virtual=True) ## trailer.h (module 'network'): uint32_t ns3::Trailer::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## trailer.h (module 'network'): static ns3::TypeId ns3::Trailer::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## trailer.h (module 'network'): void ns3::Trailer::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_pure_virtual=True, is_const=True, is_virtual=True) ## trailer.h (module 'network'): void ns3::Trailer::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3TriangularRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::TriangularRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::TriangularRandomVariable::TriangularRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetMean() const [member function] cls.add_method('GetMean', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetMin() const [member function] cls.add_method('GetMin', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetMax() const [member function] cls.add_method('GetMax', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetValue(double mean, double min, double max) [member function] cls.add_method('GetValue', 'double', [param('double', 'mean'), param('double', 'min'), param('double', 'max')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::TriangularRandomVariable::GetInteger(uint32_t mean, uint32_t min, uint32_t max) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mean'), param('uint32_t', 'min'), param('uint32_t', 'max')]) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::TriangularRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3TwoRayGroundPropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::TwoRayGroundPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::TwoRayGroundPropagationLossModel::TwoRayGroundPropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function] cls.add_method('SetFrequency', 'void', [param('double', 'frequency')]) ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetSystemLoss(double systemLoss) [member function] cls.add_method('SetSystemLoss', 'void', [param('double', 'systemLoss')]) ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetMinDistance(double minDistance) [member function] cls.add_method('SetMinDistance', 'void', [param('double', 'minDistance')]) ## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetMinDistance() const [member function] cls.add_method('GetMinDistance', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetFrequency() const [member function] cls.add_method('GetFrequency', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetSystemLoss() const [member function] cls.add_method('GetSystemLoss', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetHeightAboveZ(double heightAboveZ) [member function] cls.add_method('SetHeightAboveZ', 'void', [param('double', 'heightAboveZ')]) ## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::TwoRayGroundPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3UniformRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::UniformRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::UniformRandomVariable::UniformRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::UniformRandomVariable::GetMin() const [member function] cls.add_method('GetMin', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::UniformRandomVariable::GetMax() const [member function] cls.add_method('GetMax', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::UniformRandomVariable::GetValue(double min, double max) [member function] cls.add_method('GetValue', 'double', [param('double', 'min'), param('double', 'max')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::UniformRandomVariable::GetInteger(uint32_t min, uint32_t max) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'min'), param('uint32_t', 'max')]) ## random-variable-stream.h (module 'core'): double ns3::UniformRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::UniformRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3WeibullRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::WeibullRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::WeibullRandomVariable::WeibullRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetScale() const [member function] cls.add_method('GetScale', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetShape() const [member function] cls.add_method('GetShape', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetBound() const [member function] cls.add_method('GetBound', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetValue(double scale, double shape, double bound) [member function] cls.add_method('GetValue', 'double', [param('double', 'scale'), param('double', 'shape'), param('double', 'bound')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::WeibullRandomVariable::GetInteger(uint32_t scale, uint32_t shape, uint32_t bound) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'scale'), param('uint32_t', 'shape'), param('uint32_t', 'bound')]) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::WeibullRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3WifiActionHeader_methods(root_module, cls): ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::WifiActionHeader(ns3::WifiActionHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiActionHeader const &', 'arg0')]) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::WifiActionHeader() [constructor] cls.add_constructor([]) ## mgt-headers.h (module 'wifi'): uint32_t ns3::WifiActionHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::ActionValue ns3::WifiActionHeader::GetAction() [member function] cls.add_method('GetAction', 'ns3::WifiActionHeader::ActionValue', []) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::CategoryValue ns3::WifiActionHeader::GetCategory() [member function] cls.add_method('GetCategory', 'ns3::WifiActionHeader::CategoryValue', []) ## mgt-headers.h (module 'wifi'): ns3::TypeId ns3::WifiActionHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): uint32_t ns3::WifiActionHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): static ns3::TypeId ns3::WifiActionHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mgt-headers.h (module 'wifi'): void ns3::WifiActionHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::WifiActionHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## mgt-headers.h (module 'wifi'): void ns3::WifiActionHeader::SetAction(ns3::WifiActionHeader::CategoryValue type, ns3::WifiActionHeader::ActionValue action) [member function] cls.add_method('SetAction', 'void', [param('ns3::WifiActionHeader::CategoryValue', 'type'), param('ns3::WifiActionHeader::ActionValue', 'action')]) return def register_Ns3WifiActionHeaderActionValue_methods(root_module, cls): ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::ActionValue::ActionValue() [constructor] cls.add_constructor([]) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::ActionValue::ActionValue(ns3::WifiActionHeader::ActionValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiActionHeader::ActionValue const &', 'arg0')]) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::ActionValue::blockAck [variable] cls.add_instance_attribute('blockAck', 'ns3::WifiActionHeader::BlockAckActionValue', is_const=False) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::ActionValue::interwork [variable] cls.add_instance_attribute('interwork', 'ns3::WifiActionHeader::InterworkActionValue', is_const=False) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::ActionValue::linkMetrtic [variable] cls.add_instance_attribute('linkMetrtic', 'ns3::WifiActionHeader::LinkMetricActionValue', is_const=False) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::ActionValue::pathSelection [variable] cls.add_instance_attribute('pathSelection', 'ns3::WifiActionHeader::PathSelectionActionValue', is_const=False) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::ActionValue::peerLink [variable] cls.add_instance_attribute('peerLink', 'ns3::WifiActionHeader::PeerLinkMgtActionValue', is_const=False) ## mgt-headers.h (module 'wifi'): ns3::WifiActionHeader::ActionValue::resourceCoordination [variable] cls.add_instance_attribute('resourceCoordination', 'ns3::WifiActionHeader::ResourceCoordinationActionValue', is_const=False) return def register_Ns3WifiInformationElement_methods(root_module, cls): cls.add_binary_comparison_operator('<') cls.add_binary_comparison_operator('==') ## wifi-information-element.h (module 'wifi'): ns3::WifiInformationElement::WifiInformationElement() [constructor] cls.add_constructor([]) ## wifi-information-element.h (module 'wifi'): ns3::WifiInformationElement::WifiInformationElement(ns3::WifiInformationElement const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiInformationElement const &', 'arg0')]) ## wifi-information-element.h (module 'wifi'): ns3::Buffer::Iterator ns3::WifiInformationElement::Deserialize(ns3::Buffer::Iterator i) [member function] cls.add_method('Deserialize', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'i')]) ## wifi-information-element.h (module 'wifi'): ns3::Buffer::Iterator ns3::WifiInformationElement::DeserializeIfPresent(ns3::Buffer::Iterator i) [member function] cls.add_method('DeserializeIfPresent', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'i')]) ## wifi-information-element.h (module 'wifi'): uint8_t ns3::WifiInformationElement::DeserializeInformationField(ns3::Buffer::Iterator start, uint8_t length) [member function] cls.add_method('DeserializeInformationField', 'uint8_t', [param('ns3::Buffer::Iterator', 'start'), param('uint8_t', 'length')], is_pure_virtual=True, is_virtual=True) ## wifi-information-element.h (module 'wifi'): ns3::WifiInformationElementId ns3::WifiInformationElement::ElementId() const [member function] cls.add_method('ElementId', 'ns3::WifiInformationElementId', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-information-element.h (module 'wifi'): uint8_t ns3::WifiInformationElement::GetInformationFieldSize() const [member function] cls.add_method('GetInformationFieldSize', 'uint8_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-information-element.h (module 'wifi'): uint16_t ns3::WifiInformationElement::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint16_t', [], is_const=True) ## wifi-information-element.h (module 'wifi'): void ns3::WifiInformationElement::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## wifi-information-element.h (module 'wifi'): ns3::Buffer::Iterator ns3::WifiInformationElement::Serialize(ns3::Buffer::Iterator i) const [member function] cls.add_method('Serialize', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'i')], is_const=True) ## wifi-information-element.h (module 'wifi'): void ns3::WifiInformationElement::SerializeInformationField(ns3::Buffer::Iterator start) const [member function] cls.add_method('SerializeInformationField', 'void', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3WifiInformationElementVector_methods(root_module, cls): cls.add_binary_comparison_operator('==') ## wifi-information-element-vector.h (module 'wifi'): ns3::WifiInformationElementVector::WifiInformationElementVector(ns3::WifiInformationElementVector const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiInformationElementVector const &', 'arg0')]) ## wifi-information-element-vector.h (module 'wifi'): ns3::WifiInformationElementVector::WifiInformationElementVector() [constructor] cls.add_constructor([]) ## wifi-information-element-vector.h (module 'wifi'): bool ns3::WifiInformationElementVector::AddInformationElement(ns3::Ptr<ns3::WifiInformationElement> element) [member function] cls.add_method('AddInformationElement', 'bool', [param('ns3::Ptr< ns3::WifiInformationElement >', 'element')]) ## wifi-information-element-vector.h (module 'wifi'): __gnu_cxx::__normal_iterator<ns3::Ptr<ns3::WifiInformationElement>*,std::vector<ns3::Ptr<ns3::WifiInformationElement>, std::allocator<ns3::Ptr<ns3::WifiInformationElement> > > > ns3::WifiInformationElementVector::Begin() [member function] cls.add_method('Begin', '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::WifiInformationElement >, std::vector< ns3::Ptr< ns3::WifiInformationElement > > >', []) ## wifi-information-element-vector.h (module 'wifi'): uint32_t ns3::WifiInformationElementVector::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## wifi-information-element-vector.h (module 'wifi'): uint32_t ns3::WifiInformationElementVector::DeserializeSingleIe(ns3::Buffer::Iterator start) [member function] cls.add_method('DeserializeSingleIe', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## wifi-information-element-vector.h (module 'wifi'): __gnu_cxx::__normal_iterator<ns3::Ptr<ns3::WifiInformationElement>*,std::vector<ns3::Ptr<ns3::WifiInformationElement>, std::allocator<ns3::Ptr<ns3::WifiInformationElement> > > > ns3::WifiInformationElementVector::End() [member function] cls.add_method('End', '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::WifiInformationElement >, std::vector< ns3::Ptr< ns3::WifiInformationElement > > >', []) ## wifi-information-element-vector.h (module 'wifi'): ns3::Ptr<ns3::WifiInformationElement> ns3::WifiInformationElementVector::FindFirst(ns3::WifiInformationElementId id) const [member function] cls.add_method('FindFirst', 'ns3::Ptr< ns3::WifiInformationElement >', [param('ns3::WifiInformationElementId', 'id')], is_const=True) ## wifi-information-element-vector.h (module 'wifi'): ns3::TypeId ns3::WifiInformationElementVector::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## wifi-information-element-vector.h (module 'wifi'): uint32_t ns3::WifiInformationElementVector::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wifi-information-element-vector.h (module 'wifi'): static ns3::TypeId ns3::WifiInformationElementVector::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wifi-information-element-vector.h (module 'wifi'): void ns3::WifiInformationElementVector::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## wifi-information-element-vector.h (module 'wifi'): void ns3::WifiInformationElementVector::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## wifi-information-element-vector.h (module 'wifi'): void ns3::WifiInformationElementVector::SetMaxSize(uint16_t size) [member function] cls.add_method('SetMaxSize', 'void', [param('uint16_t', 'size')]) ## wifi-information-element-vector.h (module 'wifi'): uint32_t ns3::WifiInformationElementVector::GetSize() const [member function] cls.add_method('GetSize', 'uint32_t', [], is_const=True, visibility='protected') return def register_Ns3WifiMac_methods(root_module, cls): ## wifi-mac.h (module 'wifi'): ns3::WifiMac::WifiMac() [constructor] cls.add_constructor([]) ## wifi-mac.h (module 'wifi'): ns3::WifiMac::WifiMac(ns3::WifiMac const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiMac const &', 'arg0')]) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::ConfigureStandard(ns3::WifiPhyStandard standard) [member function] cls.add_method('ConfigureStandard', 'void', [param('ns3::WifiPhyStandard', 'standard')]) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::Enqueue(ns3::Ptr<ns3::Packet const> packet, ns3::Mac48Address to, ns3::Mac48Address from) [member function] cls.add_method('Enqueue', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::Enqueue(ns3::Ptr<ns3::Packet const> packet, ns3::Mac48Address to) [member function] cls.add_method('Enqueue', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'to')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): ns3::Time ns3::WifiMac::GetAckTimeout() const [member function] cls.add_method('GetAckTimeout', 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): ns3::Mac48Address ns3::WifiMac::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Mac48Address', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): ns3::Time ns3::WifiMac::GetBasicBlockAckTimeout() const [member function] cls.add_method('GetBasicBlockAckTimeout', 'ns3::Time', [], is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): ns3::Mac48Address ns3::WifiMac::GetBssid() const [member function] cls.add_method('GetBssid', 'ns3::Mac48Address', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): ns3::Time ns3::WifiMac::GetCompressedBlockAckTimeout() const [member function] cls.add_method('GetCompressedBlockAckTimeout', 'ns3::Time', [], is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): ns3::Time ns3::WifiMac::GetCtsTimeout() const [member function] cls.add_method('GetCtsTimeout', 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): ns3::Time ns3::WifiMac::GetEifsNoDifs() const [member function] cls.add_method('GetEifsNoDifs', 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): ns3::Time ns3::WifiMac::GetMaxPropagationDelay() const [member function] cls.add_method('GetMaxPropagationDelay', 'ns3::Time', [], is_const=True) ## wifi-mac.h (module 'wifi'): ns3::Time ns3::WifiMac::GetMsduLifetime() const [member function] cls.add_method('GetMsduLifetime', 'ns3::Time', [], is_const=True) ## wifi-mac.h (module 'wifi'): ns3::Time ns3::WifiMac::GetPifs() const [member function] cls.add_method('GetPifs', 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): ns3::Time ns3::WifiMac::GetRifs() const [member function] cls.add_method('GetRifs', 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): ns3::Time ns3::WifiMac::GetSifs() const [member function] cls.add_method('GetSifs', 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): ns3::Time ns3::WifiMac::GetSlot() const [member function] cls.add_method('GetSlot', 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): ns3::Ssid ns3::WifiMac::GetSsid() const [member function] cls.add_method('GetSsid', 'ns3::Ssid', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): static ns3::TypeId ns3::WifiMac::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::NotifyPromiscRx(ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NotifyPromiscRx', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::NotifyRx(ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NotifyRx', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::NotifyRxDrop(ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NotifyRxDrop', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::NotifyTx(ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NotifyTx', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::NotifyTxDrop(ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NotifyTxDrop', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetAckTimeout(ns3::Time ackTimeout) [member function] cls.add_method('SetAckTimeout', 'void', [param('ns3::Time', 'ackTimeout')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetAddress(ns3::Mac48Address address) [member function] cls.add_method('SetAddress', 'void', [param('ns3::Mac48Address', 'address')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetBasicBlockAckTimeout(ns3::Time blockAckTimeout) [member function] cls.add_method('SetBasicBlockAckTimeout', 'void', [param('ns3::Time', 'blockAckTimeout')], is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetCompressedBlockAckTimeout(ns3::Time blockAckTimeout) [member function] cls.add_method('SetCompressedBlockAckTimeout', 'void', [param('ns3::Time', 'blockAckTimeout')], is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetCtsTimeout(ns3::Time ctsTimeout) [member function] cls.add_method('SetCtsTimeout', 'void', [param('ns3::Time', 'ctsTimeout')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetEifsNoDifs(ns3::Time eifsNoDifs) [member function] cls.add_method('SetEifsNoDifs', 'void', [param('ns3::Time', 'eifsNoDifs')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetForwardUpCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet>, ns3::Mac48Address, ns3::Mac48Address, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> upCallback) [member function] cls.add_method('SetForwardUpCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::Mac48Address, ns3::Mac48Address, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'upCallback')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetLinkDownCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> linkDown) [member function] cls.add_method('SetLinkDownCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'linkDown')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetLinkUpCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> linkUp) [member function] cls.add_method('SetLinkUpCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'linkUp')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetMaxPropagationDelay(ns3::Time delay) [member function] cls.add_method('SetMaxPropagationDelay', 'void', [param('ns3::Time', 'delay')]) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetPifs(ns3::Time pifs) [member function] cls.add_method('SetPifs', 'void', [param('ns3::Time', 'pifs')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetPromisc() [member function] cls.add_method('SetPromisc', 'void', [], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetRifs(ns3::Time rifs) [member function] cls.add_method('SetRifs', 'void', [param('ns3::Time', 'rifs')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetSifs(ns3::Time sifs) [member function] cls.add_method('SetSifs', 'void', [param('ns3::Time', 'sifs')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetSlot(ns3::Time slotTime) [member function] cls.add_method('SetSlot', 'void', [param('ns3::Time', 'slotTime')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetSsid(ns3::Ssid ssid) [member function] cls.add_method('SetSsid', 'void', [param('ns3::Ssid', 'ssid')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetWifiPhy(ns3::Ptr<ns3::WifiPhy> phy) [member function] cls.add_method('SetWifiPhy', 'void', [param('ns3::Ptr< ns3::WifiPhy >', 'phy')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::SetWifiRemoteStationManager(ns3::Ptr<ns3::WifiRemoteStationManager> stationManager) [member function] cls.add_method('SetWifiRemoteStationManager', 'void', [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'stationManager')], is_pure_virtual=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): bool ns3::WifiMac::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::ConfigureDcf(ns3::Ptr<ns3::Dcf> dcf, uint32_t cwmin, uint32_t cwmax, ns3::AcIndex ac) [member function] cls.add_method('ConfigureDcf', 'void', [param('ns3::Ptr< ns3::Dcf >', 'dcf'), param('uint32_t', 'cwmin'), param('uint32_t', 'cwmax'), param('ns3::AcIndex', 'ac')], visibility='protected') ## wifi-mac.h (module 'wifi'): void ns3::WifiMac::FinishConfigureStandard(ns3::WifiPhyStandard standard) [member function] cls.add_method('FinishConfigureStandard', 'void', [param('ns3::WifiPhyStandard', 'standard')], is_pure_virtual=True, visibility='private', is_virtual=True) return def register_Ns3WifiMacHeader_methods(root_module, cls): ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacHeader::WifiMacHeader(ns3::WifiMacHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiMacHeader const &', 'arg0')]) ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacHeader::WifiMacHeader() [constructor] cls.add_constructor([]) ## wifi-mac-header.h (module 'wifi'): uint32_t ns3::WifiMacHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## wifi-mac-header.h (module 'wifi'): ns3::Mac48Address ns3::WifiMacHeader::GetAddr1() const [member function] cls.add_method('GetAddr1', 'ns3::Mac48Address', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): ns3::Mac48Address ns3::WifiMacHeader::GetAddr2() const [member function] cls.add_method('GetAddr2', 'ns3::Mac48Address', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): ns3::Mac48Address ns3::WifiMacHeader::GetAddr3() const [member function] cls.add_method('GetAddr3', 'ns3::Mac48Address', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): ns3::Mac48Address ns3::WifiMacHeader::GetAddr4() const [member function] cls.add_method('GetAddr4', 'ns3::Mac48Address', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): ns3::Time ns3::WifiMacHeader::GetDuration() const [member function] cls.add_method('GetDuration', 'ns3::Time', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): uint16_t ns3::WifiMacHeader::GetFragmentNumber() const [member function] cls.add_method('GetFragmentNumber', 'uint16_t', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): ns3::TypeId ns3::WifiMacHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacHeader::QosAckPolicy ns3::WifiMacHeader::GetQosAckPolicy() const [member function] cls.add_method('GetQosAckPolicy', 'ns3::WifiMacHeader::QosAckPolicy', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): uint8_t ns3::WifiMacHeader::GetQosTid() const [member function] cls.add_method('GetQosTid', 'uint8_t', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): uint8_t ns3::WifiMacHeader::GetQosTxopLimit() const [member function] cls.add_method('GetQosTxopLimit', 'uint8_t', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): uint16_t ns3::WifiMacHeader::GetRawDuration() const [member function] cls.add_method('GetRawDuration', 'uint16_t', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): uint16_t ns3::WifiMacHeader::GetSequenceControl() const [member function] cls.add_method('GetSequenceControl', 'uint16_t', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): uint16_t ns3::WifiMacHeader::GetSequenceNumber() const [member function] cls.add_method('GetSequenceNumber', 'uint16_t', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): uint32_t ns3::WifiMacHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wifi-mac-header.h (module 'wifi'): uint32_t ns3::WifiMacHeader::GetSize() const [member function] cls.add_method('GetSize', 'uint32_t', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacType ns3::WifiMacHeader::GetType() const [member function] cls.add_method('GetType', 'ns3::WifiMacType', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): static ns3::TypeId ns3::WifiMacHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wifi-mac-header.h (module 'wifi'): char const * ns3::WifiMacHeader::GetTypeString() const [member function] cls.add_method('GetTypeString', 'char const *', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsAck() const [member function] cls.add_method('IsAck', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsAction() const [member function] cls.add_method('IsAction', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsAssocReq() const [member function] cls.add_method('IsAssocReq', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsAssocResp() const [member function] cls.add_method('IsAssocResp', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsAuthentication() const [member function] cls.add_method('IsAuthentication', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsBeacon() const [member function] cls.add_method('IsBeacon', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsBlockAck() const [member function] cls.add_method('IsBlockAck', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsBlockAckReq() const [member function] cls.add_method('IsBlockAckReq', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsCfpoll() const [member function] cls.add_method('IsCfpoll', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsCtl() const [member function] cls.add_method('IsCtl', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsCts() const [member function] cls.add_method('IsCts', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsData() const [member function] cls.add_method('IsData', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsDeauthentication() const [member function] cls.add_method('IsDeauthentication', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsDisassociation() const [member function] cls.add_method('IsDisassociation', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsFromDs() const [member function] cls.add_method('IsFromDs', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsMgt() const [member function] cls.add_method('IsMgt', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsMoreFragments() const [member function] cls.add_method('IsMoreFragments', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsMultihopAction() const [member function] cls.add_method('IsMultihopAction', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsProbeReq() const [member function] cls.add_method('IsProbeReq', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsProbeResp() const [member function] cls.add_method('IsProbeResp', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsQosAck() const [member function] cls.add_method('IsQosAck', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsQosAmsdu() const [member function] cls.add_method('IsQosAmsdu', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsQosBlockAck() const [member function] cls.add_method('IsQosBlockAck', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsQosData() const [member function] cls.add_method('IsQosData', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsQosEosp() const [member function] cls.add_method('IsQosEosp', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsQosNoAck() const [member function] cls.add_method('IsQosNoAck', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsReassocReq() const [member function] cls.add_method('IsReassocReq', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsReassocResp() const [member function] cls.add_method('IsReassocResp', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsRetry() const [member function] cls.add_method('IsRetry', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsRts() const [member function] cls.add_method('IsRts', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsToDs() const [member function] cls.add_method('IsToDs', 'bool', [], is_const=True) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAction() [member function] cls.add_method('SetAction', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAddr1(ns3::Mac48Address address) [member function] cls.add_method('SetAddr1', 'void', [param('ns3::Mac48Address', 'address')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAddr2(ns3::Mac48Address address) [member function] cls.add_method('SetAddr2', 'void', [param('ns3::Mac48Address', 'address')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAddr3(ns3::Mac48Address address) [member function] cls.add_method('SetAddr3', 'void', [param('ns3::Mac48Address', 'address')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAddr4(ns3::Mac48Address address) [member function] cls.add_method('SetAddr4', 'void', [param('ns3::Mac48Address', 'address')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAssocReq() [member function] cls.add_method('SetAssocReq', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAssocResp() [member function] cls.add_method('SetAssocResp', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetBeacon() [member function] cls.add_method('SetBeacon', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetBlockAck() [member function] cls.add_method('SetBlockAck', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetBlockAckReq() [member function] cls.add_method('SetBlockAckReq', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetDsFrom() [member function] cls.add_method('SetDsFrom', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetDsNotFrom() [member function] cls.add_method('SetDsNotFrom', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetDsNotTo() [member function] cls.add_method('SetDsNotTo', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetDsTo() [member function] cls.add_method('SetDsTo', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetDuration(ns3::Time duration) [member function] cls.add_method('SetDuration', 'void', [param('ns3::Time', 'duration')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetFragmentNumber(uint8_t frag) [member function] cls.add_method('SetFragmentNumber', 'void', [param('uint8_t', 'frag')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetId(uint16_t id) [member function] cls.add_method('SetId', 'void', [param('uint16_t', 'id')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetMoreFragments() [member function] cls.add_method('SetMoreFragments', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetMultihopAction() [member function] cls.add_method('SetMultihopAction', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetNoMoreFragments() [member function] cls.add_method('SetNoMoreFragments', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetNoOrder() [member function] cls.add_method('SetNoOrder', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetNoRetry() [member function] cls.add_method('SetNoRetry', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetOrder() [member function] cls.add_method('SetOrder', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetProbeReq() [member function] cls.add_method('SetProbeReq', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetProbeResp() [member function] cls.add_method('SetProbeResp', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosAckPolicy(ns3::WifiMacHeader::QosAckPolicy policy) [member function] cls.add_method('SetQosAckPolicy', 'void', [param('ns3::WifiMacHeader::QosAckPolicy', 'policy')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosAmsdu() [member function] cls.add_method('SetQosAmsdu', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosBlockAck() [member function] cls.add_method('SetQosBlockAck', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosEosp() [member function] cls.add_method('SetQosEosp', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosNoAck() [member function] cls.add_method('SetQosNoAck', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosNoAmsdu() [member function] cls.add_method('SetQosNoAmsdu', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosNoEosp() [member function] cls.add_method('SetQosNoEosp', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosNormalAck() [member function] cls.add_method('SetQosNormalAck', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosTid(uint8_t tid) [member function] cls.add_method('SetQosTid', 'void', [param('uint8_t', 'tid')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosTxopLimit(uint8_t txop) [member function] cls.add_method('SetQosTxopLimit', 'void', [param('uint8_t', 'txop')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetRawDuration(uint16_t duration) [member function] cls.add_method('SetRawDuration', 'void', [param('uint16_t', 'duration')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetRetry() [member function] cls.add_method('SetRetry', 'void', []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetSequenceNumber(uint16_t seq) [member function] cls.add_method('SetSequenceNumber', 'void', [param('uint16_t', 'seq')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetType(ns3::WifiMacType type) [member function] cls.add_method('SetType', 'void', [param('ns3::WifiMacType', 'type')]) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetTypeData() [member function] cls.add_method('SetTypeData', 'void', []) return def register_Ns3WifiMacQueue_methods(root_module, cls): ## wifi-mac-queue.h (module 'wifi'): ns3::WifiMacQueue::WifiMacQueue(ns3::WifiMacQueue const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiMacQueue const &', 'arg0')]) ## wifi-mac-queue.h (module 'wifi'): ns3::WifiMacQueue::WifiMacQueue() [constructor] cls.add_constructor([]) ## wifi-mac-queue.h (module 'wifi'): ns3::Ptr<ns3::Packet const> ns3::WifiMacQueue::Dequeue(ns3::WifiMacHeader * hdr) [member function] cls.add_method('Dequeue', 'ns3::Ptr< ns3::Packet const >', [param('ns3::WifiMacHeader *', 'hdr')]) ## wifi-mac-queue.h (module 'wifi'): ns3::Ptr<ns3::Packet const> ns3::WifiMacQueue::DequeueByTidAndAddress(ns3::WifiMacHeader * hdr, uint8_t tid, ns3::WifiMacHeader::AddressType type, ns3::Mac48Address addr) [member function] cls.add_method('DequeueByTidAndAddress', 'ns3::Ptr< ns3::Packet const >', [param('ns3::WifiMacHeader *', 'hdr'), param('uint8_t', 'tid'), param('ns3::WifiMacHeader::AddressType', 'type'), param('ns3::Mac48Address', 'addr')]) ## wifi-mac-queue.h (module 'wifi'): ns3::Ptr<ns3::Packet const> ns3::WifiMacQueue::DequeueFirstAvailable(ns3::WifiMacHeader * hdr, ns3::Time & tStamp, ns3::QosBlockedDestinations const * blockedPackets) [member function] cls.add_method('DequeueFirstAvailable', 'ns3::Ptr< ns3::Packet const >', [param('ns3::WifiMacHeader *', 'hdr'), param('ns3::Time &', 'tStamp'), param('ns3::QosBlockedDestinations const *', 'blockedPackets')]) ## wifi-mac-queue.h (module 'wifi'): void ns3::WifiMacQueue::Enqueue(ns3::Ptr<ns3::Packet const> packet, ns3::WifiMacHeader const & hdr) [member function] cls.add_method('Enqueue', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const &', 'hdr')]) ## wifi-mac-queue.h (module 'wifi'): void ns3::WifiMacQueue::Flush() [member function] cls.add_method('Flush', 'void', []) ## wifi-mac-queue.h (module 'wifi'): ns3::Time ns3::WifiMacQueue::GetMaxDelay() const [member function] cls.add_method('GetMaxDelay', 'ns3::Time', [], is_const=True) ## wifi-mac-queue.h (module 'wifi'): uint32_t ns3::WifiMacQueue::GetMaxSize() const [member function] cls.add_method('GetMaxSize', 'uint32_t', [], is_const=True) ## wifi-mac-queue.h (module 'wifi'): uint32_t ns3::WifiMacQueue::GetNPacketsByTidAndAddress(uint8_t tid, ns3::WifiMacHeader::AddressType type, ns3::Mac48Address addr) [member function] cls.add_method('GetNPacketsByTidAndAddress', 'uint32_t', [param('uint8_t', 'tid'), param('ns3::WifiMacHeader::AddressType', 'type'), param('ns3::Mac48Address', 'addr')]) ## wifi-mac-queue.h (module 'wifi'): uint32_t ns3::WifiMacQueue::GetSize() [member function] cls.add_method('GetSize', 'uint32_t', []) ## wifi-mac-queue.h (module 'wifi'): static ns3::TypeId ns3::WifiMacQueue::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wifi-mac-queue.h (module 'wifi'): bool ns3::WifiMacQueue::IsEmpty() [member function] cls.add_method('IsEmpty', 'bool', []) ## wifi-mac-queue.h (module 'wifi'): ns3::Ptr<ns3::Packet const> ns3::WifiMacQueue::Peek(ns3::WifiMacHeader * hdr) [member function] cls.add_method('Peek', 'ns3::Ptr< ns3::Packet const >', [param('ns3::WifiMacHeader *', 'hdr')]) ## wifi-mac-queue.h (module 'wifi'): ns3::Ptr<ns3::Packet const> ns3::WifiMacQueue::PeekByTidAndAddress(ns3::WifiMacHeader * hdr, uint8_t tid, ns3::WifiMacHeader::AddressType type, ns3::Mac48Address addr) [member function] cls.add_method('PeekByTidAndAddress', 'ns3::Ptr< ns3::Packet const >', [param('ns3::WifiMacHeader *', 'hdr'), param('uint8_t', 'tid'), param('ns3::WifiMacHeader::AddressType', 'type'), param('ns3::Mac48Address', 'addr')]) ## wifi-mac-queue.h (module 'wifi'): ns3::Ptr<ns3::Packet const> ns3::WifiMacQueue::PeekFirstAvailable(ns3::WifiMacHeader * hdr, ns3::Time & tStamp, ns3::QosBlockedDestinations const * blockedPackets) [member function] cls.add_method('PeekFirstAvailable', 'ns3::Ptr< ns3::Packet const >', [param('ns3::WifiMacHeader *', 'hdr'), param('ns3::Time &', 'tStamp'), param('ns3::QosBlockedDestinations const *', 'blockedPackets')]) ## wifi-mac-queue.h (module 'wifi'): void ns3::WifiMacQueue::PushFront(ns3::Ptr<ns3::Packet const> packet, ns3::WifiMacHeader const & hdr) [member function] cls.add_method('PushFront', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const &', 'hdr')]) ## wifi-mac-queue.h (module 'wifi'): bool ns3::WifiMacQueue::Remove(ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('Remove', 'bool', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-mac-queue.h (module 'wifi'): void ns3::WifiMacQueue::SetMaxDelay(ns3::Time delay) [member function] cls.add_method('SetMaxDelay', 'void', [param('ns3::Time', 'delay')]) ## wifi-mac-queue.h (module 'wifi'): void ns3::WifiMacQueue::SetMaxSize(uint32_t maxSize) [member function] cls.add_method('SetMaxSize', 'void', [param('uint32_t', 'maxSize')]) ## wifi-mac-queue.h (module 'wifi'): void ns3::WifiMacQueue::Cleanup() [member function] cls.add_method('Cleanup', 'void', [], visibility='protected', is_virtual=True) ## wifi-mac-queue.h (module 'wifi'): ns3::Mac48Address ns3::WifiMacQueue::GetAddressForPacket(ns3::WifiMacHeader::AddressType type, std::_List_iterator<ns3::WifiMacQueue::Item> it) [member function] cls.add_method('GetAddressForPacket', 'ns3::Mac48Address', [param('ns3::WifiMacHeader::AddressType', 'type'), param('std::_List_iterator< ns3::WifiMacQueue::Item >', 'it')], visibility='protected') return def register_Ns3WifiMacTrailer_methods(root_module, cls): ## wifi-mac-trailer.h (module 'wifi'): ns3::WifiMacTrailer::WifiMacTrailer(ns3::WifiMacTrailer const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiMacTrailer const &', 'arg0')]) ## wifi-mac-trailer.h (module 'wifi'): ns3::WifiMacTrailer::WifiMacTrailer() [constructor] cls.add_constructor([]) ## wifi-mac-trailer.h (module 'wifi'): uint32_t ns3::WifiMacTrailer::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## wifi-mac-trailer.h (module 'wifi'): ns3::TypeId ns3::WifiMacTrailer::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## wifi-mac-trailer.h (module 'wifi'): uint32_t ns3::WifiMacTrailer::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## wifi-mac-trailer.h (module 'wifi'): static ns3::TypeId ns3::WifiMacTrailer::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wifi-mac-trailer.h (module 'wifi'): void ns3::WifiMacTrailer::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## wifi-mac-trailer.h (module 'wifi'): void ns3::WifiMacTrailer::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_Ns3WifiPhy_methods(root_module, cls): ## wifi-phy.h (module 'wifi'): ns3::WifiPhy::WifiPhy(ns3::WifiPhy const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiPhy const &', 'arg0')]) ## wifi-phy.h (module 'wifi'): ns3::WifiPhy::WifiPhy() [constructor] cls.add_constructor([]) ## wifi-phy.h (module 'wifi'): int64_t ns3::WifiPhy::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): double ns3::WifiPhy::CalculateSnr(ns3::WifiMode txMode, double ber) const [member function] cls.add_method('CalculateSnr', 'double', [param('ns3::WifiMode', 'txMode'), param('double', 'ber')], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): static ns3::Time ns3::WifiPhy::CalculateTxDuration(uint32_t size, ns3::WifiTxVector txvector, ns3::WifiPreamble preamble) [member function] cls.add_method('CalculateTxDuration', 'ns3::Time', [param('uint32_t', 'size'), param('ns3::WifiTxVector', 'txvector'), param('ns3::WifiPreamble', 'preamble')], is_static=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::ConfigureStandard(ns3::WifiPhyStandard standard) [member function] cls.add_method('ConfigureStandard', 'void', [param('ns3::WifiPhyStandard', 'standard')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): uint32_t ns3::WifiPhy::GetBssMembershipSelector(uint32_t selector) const [member function] cls.add_method('GetBssMembershipSelector', 'uint32_t', [param('uint32_t', 'selector')], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): ns3::Ptr<ns3::WifiChannel> ns3::WifiPhy::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::WifiChannel >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::GetChannelBonding() const [member function] cls.add_method('GetChannelBonding', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): uint16_t ns3::WifiPhy::GetChannelNumber() const [member function] cls.add_method('GetChannelNumber', 'uint16_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::GetDelayUntilIdle() [member function] cls.add_method('GetDelayUntilIdle', 'ns3::Time', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetDsssRate11Mbps() [member function] cls.add_method('GetDsssRate11Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetDsssRate1Mbps() [member function] cls.add_method('GetDsssRate1Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetDsssRate2Mbps() [member function] cls.add_method('GetDsssRate2Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetDsssRate5_5Mbps() [member function] cls.add_method('GetDsssRate5_5Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetErpOfdmRate12Mbps() [member function] cls.add_method('GetErpOfdmRate12Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetErpOfdmRate18Mbps() [member function] cls.add_method('GetErpOfdmRate18Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetErpOfdmRate24Mbps() [member function] cls.add_method('GetErpOfdmRate24Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetErpOfdmRate36Mbps() [member function] cls.add_method('GetErpOfdmRate36Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetErpOfdmRate48Mbps() [member function] cls.add_method('GetErpOfdmRate48Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetErpOfdmRate54Mbps() [member function] cls.add_method('GetErpOfdmRate54Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetErpOfdmRate6Mbps() [member function] cls.add_method('GetErpOfdmRate6Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetErpOfdmRate9Mbps() [member function] cls.add_method('GetErpOfdmRate9Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): uint32_t ns3::WifiPhy::GetFrequency() const [member function] cls.add_method('GetFrequency', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::GetGreenfield() const [member function] cls.add_method('GetGreenfield', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::GetGuardInterval() const [member function] cls.add_method('GetGuardInterval', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::GetLastRxStartTime() const [member function] cls.add_method('GetLastRxStartTime', 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::GetLdpc() const [member function] cls.add_method('GetLdpc', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetMFPlcpHeaderMode(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] cls.add_method('GetMFPlcpHeaderMode', 'ns3::WifiMode', [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], is_static=True) ## wifi-phy.h (module 'wifi'): uint8_t ns3::WifiPhy::GetMcs(uint8_t mcs) const [member function] cls.add_method('GetMcs', 'uint8_t', [param('uint8_t', 'mcs')], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): ns3::WifiModeList ns3::WifiPhy::GetMembershipSelectorModes(uint32_t selector) [member function] cls.add_method('GetMembershipSelectorModes', 'ns3::WifiModeList', [param('uint32_t', 'selector')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): ns3::WifiMode ns3::WifiPhy::GetMode(uint32_t mode) const [member function] cls.add_method('GetMode', 'ns3::WifiMode', [param('uint32_t', 'mode')], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): uint32_t ns3::WifiPhy::GetNBssMembershipSelectors() const [member function] cls.add_method('GetNBssMembershipSelectors', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): uint8_t ns3::WifiPhy::GetNMcs() const [member function] cls.add_method('GetNMcs', 'uint8_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): uint32_t ns3::WifiPhy::GetNModes() const [member function] cls.add_method('GetNModes', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): uint32_t ns3::WifiPhy::GetNTxPower() const [member function] cls.add_method('GetNTxPower', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): uint32_t ns3::WifiPhy::GetNumberOfReceiveAntennas() const [member function] cls.add_method('GetNumberOfReceiveAntennas', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): uint32_t ns3::WifiPhy::GetNumberOfTransmitAntennas() const [member function] cls.add_method('GetNumberOfTransmitAntennas', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate108MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate108MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate120MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate120MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate121_5MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate121_5MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate12Mbps() [member function] cls.add_method('GetOfdmRate12Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate12MbpsBW10MHz() [member function] cls.add_method('GetOfdmRate12MbpsBW10MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate12MbpsBW5MHz() [member function] cls.add_method('GetOfdmRate12MbpsBW5MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate135MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate135MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate135MbpsBW40MHzShGi() [member function] cls.add_method('GetOfdmRate135MbpsBW40MHzShGi', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate13MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate13MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate13_5MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate13_5MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate13_5MbpsBW5MHz() [member function] cls.add_method('GetOfdmRate13_5MbpsBW5MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate14_4MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate14_4MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate150MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate150MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate15MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate15MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate18Mbps() [member function] cls.add_method('GetOfdmRate18Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate18MbpsBW10MHz() [member function] cls.add_method('GetOfdmRate18MbpsBW10MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate19_5MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate19_5MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate1_5MbpsBW5MHz() [member function] cls.add_method('GetOfdmRate1_5MbpsBW5MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate21_7MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate21_7MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate24Mbps() [member function] cls.add_method('GetOfdmRate24Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate24MbpsBW10MHz() [member function] cls.add_method('GetOfdmRate24MbpsBW10MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate26MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate26MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate27MbpsBW10MHz() [member function] cls.add_method('GetOfdmRate27MbpsBW10MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate27MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate27MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate28_9MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate28_9MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate2_25MbpsBW5MHz() [member function] cls.add_method('GetOfdmRate2_25MbpsBW5MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate30MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate30MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate36Mbps() [member function] cls.add_method('GetOfdmRate36Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate39MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate39MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate3MbpsBW10MHz() [member function] cls.add_method('GetOfdmRate3MbpsBW10MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate3MbpsBW5MHz() [member function] cls.add_method('GetOfdmRate3MbpsBW5MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate40_5MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate40_5MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate43_3MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate43_3MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate45MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate45MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate48Mbps() [member function] cls.add_method('GetOfdmRate48Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate4_5MbpsBW10MHz() [member function] cls.add_method('GetOfdmRate4_5MbpsBW10MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate4_5MbpsBW5MHz() [member function] cls.add_method('GetOfdmRate4_5MbpsBW5MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate52MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate52MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate54Mbps() [member function] cls.add_method('GetOfdmRate54Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate54MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate54MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate57_8MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate57_8MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate58_5MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate58_5MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate60MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate60MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate65MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate65MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate65MbpsBW20MHzShGi() [member function] cls.add_method('GetOfdmRate65MbpsBW20MHzShGi', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate6Mbps() [member function] cls.add_method('GetOfdmRate6Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate6MbpsBW10MHz() [member function] cls.add_method('GetOfdmRate6MbpsBW10MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate6MbpsBW5MHz() [member function] cls.add_method('GetOfdmRate6MbpsBW5MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate6_5MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate6_5MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate72_2MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate72_2MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate7_2MbpsBW20MHz() [member function] cls.add_method('GetOfdmRate7_2MbpsBW20MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate81MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate81MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate90MbpsBW40MHz() [member function] cls.add_method('GetOfdmRate90MbpsBW40MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate9Mbps() [member function] cls.add_method('GetOfdmRate9Mbps', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate9MbpsBW10MHz() [member function] cls.add_method('GetOfdmRate9MbpsBW10MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetOfdmRate9MbpsBW5MHz() [member function] cls.add_method('GetOfdmRate9MbpsBW5MHz', 'ns3::WifiMode', [], is_static=True) ## wifi-phy.h (module 'wifi'): static double ns3::WifiPhy::GetPayloadDurationMicroSeconds(uint32_t size, ns3::WifiTxVector txvector) [member function] cls.add_method('GetPayloadDurationMicroSeconds', 'double', [param('uint32_t', 'size'), param('ns3::WifiTxVector', 'txvector')], is_static=True) ## wifi-phy.h (module 'wifi'): static uint32_t ns3::WifiPhy::GetPlcpHeaderDurationMicroSeconds(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] cls.add_method('GetPlcpHeaderDurationMicroSeconds', 'uint32_t', [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetPlcpHeaderMode(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] cls.add_method('GetPlcpHeaderMode', 'ns3::WifiMode', [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], is_static=True) ## wifi-phy.h (module 'wifi'): static uint32_t ns3::WifiPhy::GetPlcpHtSigHeaderDurationMicroSeconds(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] cls.add_method('GetPlcpHtSigHeaderDurationMicroSeconds', 'uint32_t', [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], is_static=True) ## wifi-phy.h (module 'wifi'): static uint32_t ns3::WifiPhy::GetPlcpHtTrainingSymbolDurationMicroSeconds(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble, ns3::WifiTxVector txvector) [member function] cls.add_method('GetPlcpHtTrainingSymbolDurationMicroSeconds', 'uint32_t', [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble'), param('ns3::WifiTxVector', 'txvector')], is_static=True) ## wifi-phy.h (module 'wifi'): static uint32_t ns3::WifiPhy::GetPlcpPreambleDurationMicroSeconds(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] cls.add_method('GetPlcpPreambleDurationMicroSeconds', 'uint32_t', [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], is_static=True) ## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::GetStateDuration() [member function] cls.add_method('GetStateDuration', 'ns3::Time', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::GetStbc() const [member function] cls.add_method('GetStbc', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): double ns3::WifiPhy::GetTxPowerEnd() const [member function] cls.add_method('GetTxPowerEnd', 'double', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): double ns3::WifiPhy::GetTxPowerStart() const [member function] cls.add_method('GetTxPowerStart', 'double', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): static ns3::TypeId ns3::WifiPhy::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::IsModeSupported(ns3::WifiMode mode) const [member function] cls.add_method('IsModeSupported', 'bool', [param('ns3::WifiMode', 'mode')], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::IsStateBusy() [member function] cls.add_method('IsStateBusy', 'bool', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::IsStateCcaBusy() [member function] cls.add_method('IsStateCcaBusy', 'bool', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::IsStateIdle() [member function] cls.add_method('IsStateIdle', 'bool', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::IsStateRx() [member function] cls.add_method('IsStateRx', 'bool', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::IsStateSleep() [member function] cls.add_method('IsStateSleep', 'bool', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::IsStateSwitching() [member function] cls.add_method('IsStateSwitching', 'bool', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::IsStateTx() [member function] cls.add_method('IsStateTx', 'bool', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): ns3::WifiMode ns3::WifiPhy::McsToWifiMode(uint8_t mcs) [member function] cls.add_method('McsToWifiMode', 'ns3::WifiMode', [param('uint8_t', 'mcs')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyMonitorSniffRx(ns3::Ptr<ns3::Packet const> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm) [member function] cls.add_method('NotifyMonitorSniffRx', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('bool', 'isShortPreamble'), param('double', 'signalDbm'), param('double', 'noiseDbm')]) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyMonitorSniffTx(ns3::Ptr<ns3::Packet const> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, uint8_t txPower) [member function] cls.add_method('NotifyMonitorSniffTx', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('bool', 'isShortPreamble'), param('uint8_t', 'txPower')]) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyRxBegin(ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NotifyRxBegin', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyRxDrop(ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NotifyRxDrop', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyRxEnd(ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NotifyRxEnd', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyTxBegin(ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NotifyTxBegin', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyTxDrop(ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NotifyTxDrop', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyTxEnd(ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NotifyTxEnd', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::RegisterListener(ns3::WifiPhyListener * listener) [member function] cls.add_method('RegisterListener', 'void', [param('ns3::WifiPhyListener *', 'listener')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::ResumeFromSleep() [member function] cls.add_method('ResumeFromSleep', 'void', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SendPacket(ns3::Ptr<ns3::Packet const> packet, ns3::WifiTxVector txvector, ns3::WifiPreamble preamble) [member function] cls.add_method('SendPacket', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiTxVector', 'txvector'), param('ns3::WifiPreamble', 'preamble')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetChannelBonding(bool channelbonding) [member function] cls.add_method('SetChannelBonding', 'void', [param('bool', 'channelbonding')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetChannelNumber(uint16_t id) [member function] cls.add_method('SetChannelNumber', 'void', [param('uint16_t', 'id')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetFrequency(uint32_t freq) [member function] cls.add_method('SetFrequency', 'void', [param('uint32_t', 'freq')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetGreenfield(bool greenfield) [member function] cls.add_method('SetGreenfield', 'void', [param('bool', 'greenfield')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetGuardInterval(bool guardInterval) [member function] cls.add_method('SetGuardInterval', 'void', [param('bool', 'guardInterval')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetLdpc(bool ldpc) [member function] cls.add_method('SetLdpc', 'void', [param('bool', 'ldpc')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetNumberOfReceiveAntennas(uint32_t rx) [member function] cls.add_method('SetNumberOfReceiveAntennas', 'void', [param('uint32_t', 'rx')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetNumberOfTransmitAntennas(uint32_t tx) [member function] cls.add_method('SetNumberOfTransmitAntennas', 'void', [param('uint32_t', 'tx')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetReceiveErrorCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet const>, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetReceiveErrorCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetReceiveOkCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet>, double, ns3::WifiMode, ns3::WifiPreamble, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetReceiveOkCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::WifiMode, ns3::WifiPreamble, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetSleepMode() [member function] cls.add_method('SetSleepMode', 'void', [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetStbc(bool stbc) [member function] cls.add_method('SetStbc', 'void', [param('bool', 'stbc')], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h (module 'wifi'): uint32_t ns3::WifiPhy::WifiModeToMcs(ns3::WifiMode mode) [member function] cls.add_method('WifiModeToMcs', 'uint32_t', [param('ns3::WifiMode', 'mode')], is_pure_virtual=True, is_virtual=True) return def register_Ns3WifiPhyStateHelper_methods(root_module, cls): ## wifi-phy-state-helper.h (module 'wifi'): ns3::WifiPhyStateHelper::WifiPhyStateHelper(ns3::WifiPhyStateHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiPhyStateHelper const &', 'arg0')]) ## wifi-phy-state-helper.h (module 'wifi'): ns3::WifiPhyStateHelper::WifiPhyStateHelper() [constructor] cls.add_constructor([]) ## wifi-phy-state-helper.h (module 'wifi'): ns3::Time ns3::WifiPhyStateHelper::GetDelayUntilIdle() [member function] cls.add_method('GetDelayUntilIdle', 'ns3::Time', []) ## wifi-phy-state-helper.h (module 'wifi'): ns3::Time ns3::WifiPhyStateHelper::GetLastRxStartTime() const [member function] cls.add_method('GetLastRxStartTime', 'ns3::Time', [], is_const=True) ## wifi-phy-state-helper.h (module 'wifi'): ns3::WifiPhy::State ns3::WifiPhyStateHelper::GetState() [member function] cls.add_method('GetState', 'ns3::WifiPhy::State', []) ## wifi-phy-state-helper.h (module 'wifi'): ns3::Time ns3::WifiPhyStateHelper::GetStateDuration() [member function] cls.add_method('GetStateDuration', 'ns3::Time', []) ## wifi-phy-state-helper.h (module 'wifi'): static ns3::TypeId ns3::WifiPhyStateHelper::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wifi-phy-state-helper.h (module 'wifi'): bool ns3::WifiPhyStateHelper::IsStateBusy() [member function] cls.add_method('IsStateBusy', 'bool', []) ## wifi-phy-state-helper.h (module 'wifi'): bool ns3::WifiPhyStateHelper::IsStateCcaBusy() [member function] cls.add_method('IsStateCcaBusy', 'bool', []) ## wifi-phy-state-helper.h (module 'wifi'): bool ns3::WifiPhyStateHelper::IsStateIdle() [member function] cls.add_method('IsStateIdle', 'bool', []) ## wifi-phy-state-helper.h (module 'wifi'): bool ns3::WifiPhyStateHelper::IsStateRx() [member function] cls.add_method('IsStateRx', 'bool', []) ## wifi-phy-state-helper.h (module 'wifi'): bool ns3::WifiPhyStateHelper::IsStateSleep() [member function] cls.add_method('IsStateSleep', 'bool', []) ## wifi-phy-state-helper.h (module 'wifi'): bool ns3::WifiPhyStateHelper::IsStateSwitching() [member function] cls.add_method('IsStateSwitching', 'bool', []) ## wifi-phy-state-helper.h (module 'wifi'): bool ns3::WifiPhyStateHelper::IsStateTx() [member function] cls.add_method('IsStateTx', 'bool', []) ## wifi-phy-state-helper.h (module 'wifi'): void ns3::WifiPhyStateHelper::RegisterListener(ns3::WifiPhyListener * listener) [member function] cls.add_method('RegisterListener', 'void', [param('ns3::WifiPhyListener *', 'listener')]) ## wifi-phy-state-helper.h (module 'wifi'): void ns3::WifiPhyStateHelper::SetReceiveErrorCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet const>, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetReceiveErrorCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## wifi-phy-state-helper.h (module 'wifi'): void ns3::WifiPhyStateHelper::SetReceiveOkCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet>, double, ns3::WifiMode, ns3::WifiPreamble, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetReceiveOkCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::WifiMode, ns3::WifiPreamble, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## wifi-phy-state-helper.h (module 'wifi'): void ns3::WifiPhyStateHelper::SwitchFromRxEndError(ns3::Ptr<ns3::Packet const> packet, double snr) [member function] cls.add_method('SwitchFromRxEndError', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('double', 'snr')]) ## wifi-phy-state-helper.h (module 'wifi'): void ns3::WifiPhyStateHelper::SwitchFromRxEndOk(ns3::Ptr<ns3::Packet> packet, double snr, ns3::WifiMode mode, ns3::WifiPreamble preamble) [member function] cls.add_method('SwitchFromRxEndOk', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'snr'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble')]) ## wifi-phy-state-helper.h (module 'wifi'): void ns3::WifiPhyStateHelper::SwitchFromSleep(ns3::Time duration) [member function] cls.add_method('SwitchFromSleep', 'void', [param('ns3::Time', 'duration')]) ## wifi-phy-state-helper.h (module 'wifi'): void ns3::WifiPhyStateHelper::SwitchMaybeToCcaBusy(ns3::Time duration) [member function] cls.add_method('SwitchMaybeToCcaBusy', 'void', [param('ns3::Time', 'duration')]) ## wifi-phy-state-helper.h (module 'wifi'): void ns3::WifiPhyStateHelper::SwitchToChannelSwitching(ns3::Time switchingDuration) [member function] cls.add_method('SwitchToChannelSwitching', 'void', [param('ns3::Time', 'switchingDuration')]) ## wifi-phy-state-helper.h (module 'wifi'): void ns3::WifiPhyStateHelper::SwitchToRx(ns3::Time rxDuration) [member function] cls.add_method('SwitchToRx', 'void', [param('ns3::Time', 'rxDuration')]) ## wifi-phy-state-helper.h (module 'wifi'): void ns3::WifiPhyStateHelper::SwitchToSleep() [member function] cls.add_method('SwitchToSleep', 'void', []) ## wifi-phy-state-helper.h (module 'wifi'): void ns3::WifiPhyStateHelper::SwitchToTx(ns3::Time txDuration, ns3::Ptr<ns3::Packet const> packet, double txPowerDbm, ns3::WifiTxVector txVector, ns3::WifiPreamble preamble) [member function] cls.add_method('SwitchToTx', 'void', [param('ns3::Time', 'txDuration'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('double', 'txPowerDbm'), param('ns3::WifiTxVector', 'txVector'), param('ns3::WifiPreamble', 'preamble')]) ## wifi-phy-state-helper.h (module 'wifi'): ns3::WifiPhyStateHelper::m_stateLogger [variable] cls.add_instance_attribute('m_stateLogger', 'ns3::TracedCallback< ns3::Time, ns3::Time, ns3::WifiPhy::State, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', is_const=False) return def register_Ns3WifiRemoteStationManager_methods(root_module, cls): ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationManager::WifiRemoteStationManager(ns3::WifiRemoteStationManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiRemoteStationManager const &', 'arg0')]) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationManager::WifiRemoteStationManager() [constructor] cls.add_constructor([]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::AddBasicMcs(uint8_t mcs) [member function] cls.add_method('AddBasicMcs', 'void', [param('uint8_t', 'mcs')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::AddBasicMode(ns3::WifiMode mode) [member function] cls.add_method('AddBasicMode', 'void', [param('ns3::WifiMode', 'mode')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::AddStationHtCapabilities(ns3::Mac48Address from, ns3::HtCapabilities htcapabilities) [member function] cls.add_method('AddStationHtCapabilities', 'void', [param('ns3::Mac48Address', 'from'), param('ns3::HtCapabilities', 'htcapabilities')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::AddSupportedMcs(ns3::Mac48Address address, uint8_t mcs) [member function] cls.add_method('AddSupportedMcs', 'void', [param('ns3::Mac48Address', 'address'), param('uint8_t', 'mcs')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::AddSupportedMode(ns3::Mac48Address address, ns3::WifiMode mode) [member function] cls.add_method('AddSupportedMode', 'void', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'mode')]) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiTxVector ns3::WifiRemoteStationManager::DoGetCtsToSelfTxVector() [member function] cls.add_method('DoGetCtsToSelfTxVector', 'ns3::WifiTxVector', []) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiTxVector ns3::WifiRemoteStationManager::GetAckTxVector(ns3::Mac48Address address, ns3::WifiMode dataMode) [member function] cls.add_method('GetAckTxVector', 'ns3::WifiTxVector', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'dataMode')]) ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::GetBasicMcs(uint32_t i) const [member function] cls.add_method('GetBasicMcs', 'uint8_t', [param('uint32_t', 'i')], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiMode ns3::WifiRemoteStationManager::GetBasicMode(uint32_t i) const [member function] cls.add_method('GetBasicMode', 'ns3::WifiMode', [param('uint32_t', 'i')], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiTxVector ns3::WifiRemoteStationManager::GetBlockAckTxVector(ns3::Mac48Address address, ns3::WifiMode dataMode) [member function] cls.add_method('GetBlockAckTxVector', 'ns3::WifiTxVector', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'dataMode')]) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiTxVector ns3::WifiRemoteStationManager::GetCtsToSelfTxVector(ns3::WifiMacHeader const * header, ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('GetCtsToSelfTxVector', 'ns3::WifiTxVector', [param('ns3::WifiMacHeader const *', 'header'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiTxVector ns3::WifiRemoteStationManager::GetCtsTxVector(ns3::Mac48Address address, ns3::WifiMode rtsMode) [member function] cls.add_method('GetCtsTxVector', 'ns3::WifiTxVector', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'rtsMode')]) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiTxVector ns3::WifiRemoteStationManager::GetDataTxVector(ns3::Mac48Address address, ns3::WifiMacHeader const * header, ns3::Ptr<ns3::Packet const> packet, uint32_t fullPacketSize) [member function] cls.add_method('GetDataTxVector', 'ns3::WifiTxVector', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fullPacketSize')]) ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::GetDefaultMcs() const [member function] cls.add_method('GetDefaultMcs', 'uint8_t', [], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiMode ns3::WifiRemoteStationManager::GetDefaultMode() const [member function] cls.add_method('GetDefaultMode', 'ns3::WifiMode', [], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::GetDefaultTxPowerLevel() const [member function] cls.add_method('GetDefaultTxPowerLevel', 'uint8_t', [], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetFragmentOffset(ns3::Mac48Address address, ns3::WifiMacHeader const * header, ns3::Ptr<ns3::Packet const> packet, uint32_t fragmentNumber) [member function] cls.add_method('GetFragmentOffset', 'uint32_t', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fragmentNumber')]) ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetFragmentSize(ns3::Mac48Address address, ns3::WifiMacHeader const * header, ns3::Ptr<ns3::Packet const> packet, uint32_t fragmentNumber) [member function] cls.add_method('GetFragmentSize', 'uint32_t', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fragmentNumber')]) ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetFragmentationThreshold() const [member function] cls.add_method('GetFragmentationThreshold', 'uint32_t', [], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::GetGreenfieldSupported(ns3::Mac48Address address) const [member function] cls.add_method('GetGreenfieldSupported', 'bool', [param('ns3::Mac48Address', 'address')], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationInfo ns3::WifiRemoteStationManager::GetInfo(ns3::Mac48Address address) [member function] cls.add_method('GetInfo', 'ns3::WifiRemoteStationInfo', [param('ns3::Mac48Address', 'address')]) ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetMaxSlrc() const [member function] cls.add_method('GetMaxSlrc', 'uint32_t', [], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetMaxSsrc() const [member function] cls.add_method('GetMaxSsrc', 'uint32_t', [], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetNBasicMcs() const [member function] cls.add_method('GetNBasicMcs', 'uint32_t', [], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetNBasicModes() const [member function] cls.add_method('GetNBasicModes', 'uint32_t', [], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiMode ns3::WifiRemoteStationManager::GetNonUnicastMode() const [member function] cls.add_method('GetNonUnicastMode', 'ns3::WifiMode', [], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetNumberOfTransmitAntennas() [member function] cls.add_method('GetNumberOfTransmitAntennas', 'uint32_t', []) ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetRtsCtsThreshold() const [member function] cls.add_method('GetRtsCtsThreshold', 'uint32_t', [], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiTxVector ns3::WifiRemoteStationManager::GetRtsTxVector(ns3::Mac48Address address, ns3::WifiMacHeader const * header, ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('GetRtsTxVector', 'ns3::WifiTxVector', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-remote-station-manager.h (module 'wifi'): static ns3::TypeId ns3::WifiRemoteStationManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::HasHtSupported() const [member function] cls.add_method('HasHtSupported', 'bool', [], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::IsAssociated(ns3::Mac48Address address) const [member function] cls.add_method('IsAssociated', 'bool', [param('ns3::Mac48Address', 'address')], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::IsBrandNew(ns3::Mac48Address address) const [member function] cls.add_method('IsBrandNew', 'bool', [param('ns3::Mac48Address', 'address')], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::IsLastFragment(ns3::Mac48Address address, ns3::WifiMacHeader const * header, ns3::Ptr<ns3::Packet const> packet, uint32_t fragmentNumber) [member function] cls.add_method('IsLastFragment', 'bool', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fragmentNumber')]) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::IsWaitAssocTxOk(ns3::Mac48Address address) const [member function] cls.add_method('IsWaitAssocTxOk', 'bool', [param('ns3::Mac48Address', 'address')], is_const=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::NeedCtsToSelf(ns3::WifiTxVector txVector) [member function] cls.add_method('NeedCtsToSelf', 'bool', [param('ns3::WifiTxVector', 'txVector')]) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::NeedDataRetransmission(ns3::Mac48Address address, ns3::WifiMacHeader const * header, ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NeedDataRetransmission', 'bool', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::NeedFragmentation(ns3::Mac48Address address, ns3::WifiMacHeader const * header, ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NeedFragmentation', 'bool', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::NeedRts(ns3::Mac48Address address, ns3::WifiMacHeader const * header, ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NeedRts', 'bool', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::NeedRtsRetransmission(ns3::Mac48Address address, ns3::WifiMacHeader const * header, ns3::Ptr<ns3::Packet const> packet) [member function] cls.add_method('NeedRtsRetransmission', 'bool', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::PrepareForQueue(ns3::Mac48Address address, ns3::WifiMacHeader const * header, ns3::Ptr<ns3::Packet const> packet, uint32_t fullPacketSize) [member function] cls.add_method('PrepareForQueue', 'void', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fullPacketSize')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::RecordDisassociated(ns3::Mac48Address address) [member function] cls.add_method('RecordDisassociated', 'void', [param('ns3::Mac48Address', 'address')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::RecordGotAssocTxFailed(ns3::Mac48Address address) [member function] cls.add_method('RecordGotAssocTxFailed', 'void', [param('ns3::Mac48Address', 'address')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::RecordGotAssocTxOk(ns3::Mac48Address address) [member function] cls.add_method('RecordGotAssocTxOk', 'void', [param('ns3::Mac48Address', 'address')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::RecordWaitAssocTxOk(ns3::Mac48Address address) [member function] cls.add_method('RecordWaitAssocTxOk', 'void', [param('ns3::Mac48Address', 'address')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::ReportDataFailed(ns3::Mac48Address address, ns3::WifiMacHeader const * header) [member function] cls.add_method('ReportDataFailed', 'void', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::ReportDataOk(ns3::Mac48Address address, ns3::WifiMacHeader const * header, double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] cls.add_method('ReportDataOk', 'void', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::ReportFinalDataFailed(ns3::Mac48Address address, ns3::WifiMacHeader const * header) [member function] cls.add_method('ReportFinalDataFailed', 'void', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::ReportFinalRtsFailed(ns3::Mac48Address address, ns3::WifiMacHeader const * header) [member function] cls.add_method('ReportFinalRtsFailed', 'void', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::ReportRtsFailed(ns3::Mac48Address address, ns3::WifiMacHeader const * header) [member function] cls.add_method('ReportRtsFailed', 'void', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::ReportRtsOk(ns3::Mac48Address address, ns3::WifiMacHeader const * header, double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] cls.add_method('ReportRtsOk', 'void', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::ReportRxOk(ns3::Mac48Address address, ns3::WifiMacHeader const * header, double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('ReportRxOk', 'void', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMacHeader const *', 'header'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::Reset() [member function] cls.add_method('Reset', 'void', []) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::Reset(ns3::Mac48Address address) [member function] cls.add_method('Reset', 'void', [param('ns3::Mac48Address', 'address')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::SetDefaultTxPowerLevel(uint8_t txPower) [member function] cls.add_method('SetDefaultTxPowerLevel', 'void', [param('uint8_t', 'txPower')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::SetFragmentationThreshold(uint32_t threshold) [member function] cls.add_method('SetFragmentationThreshold', 'void', [param('uint32_t', 'threshold')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::SetHtSupported(bool enable) [member function] cls.add_method('SetHtSupported', 'void', [param('bool', 'enable')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::SetMaxSlrc(uint32_t maxSlrc) [member function] cls.add_method('SetMaxSlrc', 'void', [param('uint32_t', 'maxSlrc')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::SetMaxSsrc(uint32_t maxSsrc) [member function] cls.add_method('SetMaxSsrc', 'void', [param('uint32_t', 'maxSsrc')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::SetRtsCtsThreshold(uint32_t threshold) [member function] cls.add_method('SetRtsCtsThreshold', 'void', [param('uint32_t', 'threshold')]) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::SetupPhy(ns3::Ptr<ns3::WifiPhy> phy) [member function] cls.add_method('SetupPhy', 'void', [param('ns3::Ptr< ns3::WifiPhy >', 'phy')], is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::GetGreenfield(ns3::WifiRemoteStation const * station) const [member function] cls.add_method('GetGreenfield', 'bool', [param('ns3::WifiRemoteStation const *', 'station')], is_const=True, visibility='protected') ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetLongRetryCount(ns3::WifiRemoteStation const * station) const [member function] cls.add_method('GetLongRetryCount', 'uint32_t', [param('ns3::WifiRemoteStation const *', 'station')], is_const=True, visibility='protected') ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::GetMcsSupported(ns3::WifiRemoteStation const * station, uint32_t i) const [member function] cls.add_method('GetMcsSupported', 'uint8_t', [param('ns3::WifiRemoteStation const *', 'station'), param('uint32_t', 'i')], is_const=True, visibility='protected') ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetNMcsSupported(ns3::WifiRemoteStation const * station) const [member function] cls.add_method('GetNMcsSupported', 'uint32_t', [param('ns3::WifiRemoteStation const *', 'station')], is_const=True, visibility='protected') ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetNSupported(ns3::WifiRemoteStation const * station) const [member function] cls.add_method('GetNSupported', 'uint32_t', [param('ns3::WifiRemoteStation const *', 'station')], is_const=True, visibility='protected') ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetNumberOfReceiveAntennas(ns3::WifiRemoteStation const * station) const [member function] cls.add_method('GetNumberOfReceiveAntennas', 'uint32_t', [param('ns3::WifiRemoteStation const *', 'station')], is_const=True, visibility='protected') ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetNumberOfTransmitAntennas(ns3::WifiRemoteStation const * station) const [member function] cls.add_method('GetNumberOfTransmitAntennas', 'uint32_t', [param('ns3::WifiRemoteStation const *', 'station')], is_const=True, visibility='protected') ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::GetShortGuardInterval(ns3::WifiRemoteStation const * station) const [member function] cls.add_method('GetShortGuardInterval', 'bool', [param('ns3::WifiRemoteStation const *', 'station')], is_const=True, visibility='protected') ## wifi-remote-station-manager.h (module 'wifi'): uint32_t ns3::WifiRemoteStationManager::GetShortRetryCount(ns3::WifiRemoteStation const * station) const [member function] cls.add_method('GetShortRetryCount', 'uint32_t', [param('ns3::WifiRemoteStation const *', 'station')], is_const=True, visibility='protected') ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::GetStbc(ns3::WifiRemoteStation const * station) const [member function] cls.add_method('GetStbc', 'bool', [param('ns3::WifiRemoteStation const *', 'station')], is_const=True, visibility='protected') ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiMode ns3::WifiRemoteStationManager::GetSupported(ns3::WifiRemoteStation const * station, uint32_t i) const [member function] cls.add_method('GetSupported', 'ns3::WifiMode', [param('ns3::WifiRemoteStation const *', 'station'), param('uint32_t', 'i')], is_const=True, visibility='protected') ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStation * ns3::WifiRemoteStationManager::DoCreateStation() const [member function] cls.add_method('DoCreateStation', 'ns3::WifiRemoteStation *', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::DoGetAckTxGuardInterval(ns3::Mac48Address address, ns3::WifiMode ackMode) [member function] cls.add_method('DoGetAckTxGuardInterval', 'bool', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'ackMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::DoGetAckTxNess(ns3::Mac48Address address, ns3::WifiMode ackMode) [member function] cls.add_method('DoGetAckTxNess', 'uint8_t', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'ackMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::DoGetAckTxNss(ns3::Mac48Address address, ns3::WifiMode ackMode) [member function] cls.add_method('DoGetAckTxNss', 'uint8_t', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'ackMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::DoGetAckTxPowerLevel(ns3::Mac48Address address, ns3::WifiMode ackMode) [member function] cls.add_method('DoGetAckTxPowerLevel', 'uint8_t', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'ackMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::DoGetAckTxStbc(ns3::Mac48Address address, ns3::WifiMode ackMode) [member function] cls.add_method('DoGetAckTxStbc', 'bool', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'ackMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::DoGetBlockAckTxGuardInterval(ns3::Mac48Address address, ns3::WifiMode blockAckMode) [member function] cls.add_method('DoGetBlockAckTxGuardInterval', 'bool', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'blockAckMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::DoGetBlockAckTxNess(ns3::Mac48Address address, ns3::WifiMode blockAckMode) [member function] cls.add_method('DoGetBlockAckTxNess', 'uint8_t', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'blockAckMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::DoGetBlockAckTxNss(ns3::Mac48Address address, ns3::WifiMode blockAckMode) [member function] cls.add_method('DoGetBlockAckTxNss', 'uint8_t', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'blockAckMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::DoGetBlockAckTxPowerLevel(ns3::Mac48Address address, ns3::WifiMode blockAckMode) [member function] cls.add_method('DoGetBlockAckTxPowerLevel', 'uint8_t', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'blockAckMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::DoGetBlockAckTxStbc(ns3::Mac48Address address, ns3::WifiMode blockAckMode) [member function] cls.add_method('DoGetBlockAckTxStbc', 'bool', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'blockAckMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::DoGetCtsTxGuardInterval(ns3::Mac48Address address, ns3::WifiMode ctsMode) [member function] cls.add_method('DoGetCtsTxGuardInterval', 'bool', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'ctsMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::DoGetCtsTxNess(ns3::Mac48Address address, ns3::WifiMode ctsMode) [member function] cls.add_method('DoGetCtsTxNess', 'uint8_t', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'ctsMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::DoGetCtsTxNss(ns3::Mac48Address address, ns3::WifiMode ctsMode) [member function] cls.add_method('DoGetCtsTxNss', 'uint8_t', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'ctsMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): uint8_t ns3::WifiRemoteStationManager::DoGetCtsTxPowerLevel(ns3::Mac48Address address, ns3::WifiMode ctsMode) [member function] cls.add_method('DoGetCtsTxPowerLevel', 'uint8_t', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'ctsMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::DoGetCtsTxStbc(ns3::Mac48Address address, ns3::WifiMode ctsMode) [member function] cls.add_method('DoGetCtsTxStbc', 'bool', [param('ns3::Mac48Address', 'address'), param('ns3::WifiMode', 'ctsMode')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiTxVector ns3::WifiRemoteStationManager::DoGetDataTxVector(ns3::WifiRemoteStation * station, uint32_t size) [member function] cls.add_method('DoGetDataTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station'), param('uint32_t', 'size')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiTxVector ns3::WifiRemoteStationManager::DoGetRtsTxVector(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoGetRtsTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::DoNeedDataRetransmission(ns3::WifiRemoteStation * station, ns3::Ptr<ns3::Packet const> packet, bool normally) [member function] cls.add_method('DoNeedDataRetransmission', 'bool', [param('ns3::WifiRemoteStation *', 'station'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('bool', 'normally')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::DoNeedFragmentation(ns3::WifiRemoteStation * station, ns3::Ptr<ns3::Packet const> packet, bool normally) [member function] cls.add_method('DoNeedFragmentation', 'bool', [param('ns3::WifiRemoteStation *', 'station'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('bool', 'normally')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::DoNeedRts(ns3::WifiRemoteStation * station, ns3::Ptr<ns3::Packet const> packet, bool normally) [member function] cls.add_method('DoNeedRts', 'bool', [param('ns3::WifiRemoteStation *', 'station'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('bool', 'normally')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::DoNeedRtsRetransmission(ns3::WifiRemoteStation * station, ns3::Ptr<ns3::Packet const> packet, bool normally) [member function] cls.add_method('DoNeedRtsRetransmission', 'bool', [param('ns3::WifiRemoteStation *', 'station'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('bool', 'normally')], visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::DoReportDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::DoReportDataOk(ns3::WifiRemoteStation * station, double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] cls.add_method('DoReportDataOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::DoReportFinalDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::DoReportFinalRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::DoReportRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::DoReportRtsOk(ns3::WifiRemoteStation * station, double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] cls.add_method('DoReportRtsOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): void ns3::WifiRemoteStationManager::DoReportRxOk(ns3::WifiRemoteStation * station, double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('DoReportRxOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], is_pure_virtual=True, visibility='private', is_virtual=True) ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::IsLowLatency() const [member function] cls.add_method('IsLowLatency', 'bool', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) return def register_Ns3YansWifiPhy_methods(root_module, cls): ## yans-wifi-phy.h (module 'wifi'): ns3::YansWifiPhy::YansWifiPhy(ns3::YansWifiPhy const & arg0) [copy constructor] cls.add_constructor([param('ns3::YansWifiPhy const &', 'arg0')]) ## yans-wifi-phy.h (module 'wifi'): ns3::YansWifiPhy::YansWifiPhy() [constructor] cls.add_constructor([]) ## yans-wifi-phy.h (module 'wifi'): int64_t ns3::YansWifiPhy::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): double ns3::YansWifiPhy::CalculateSnr(ns3::WifiMode txMode, double ber) const [member function] cls.add_method('CalculateSnr', 'double', [param('ns3::WifiMode', 'txMode'), param('double', 'ber')], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::ConfigureStandard(ns3::WifiPhyStandard standard) [member function] cls.add_method('ConfigureStandard', 'void', [param('ns3::WifiPhyStandard', 'standard')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): uint32_t ns3::YansWifiPhy::GetBssMembershipSelector(uint32_t selector) const [member function] cls.add_method('GetBssMembershipSelector', 'uint32_t', [param('uint32_t', 'selector')], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): double ns3::YansWifiPhy::GetCcaMode1Threshold() const [member function] cls.add_method('GetCcaMode1Threshold', 'double', [], is_const=True) ## yans-wifi-phy.h (module 'wifi'): ns3::Ptr<ns3::WifiChannel> ns3::YansWifiPhy::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::WifiChannel >', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::GetChannelBonding() const [member function] cls.add_method('GetChannelBonding', 'bool', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): double ns3::YansWifiPhy::GetChannelFrequencyMhz() const [member function] cls.add_method('GetChannelFrequencyMhz', 'double', [], is_const=True) ## yans-wifi-phy.h (module 'wifi'): uint16_t ns3::YansWifiPhy::GetChannelNumber() const [member function] cls.add_method('GetChannelNumber', 'uint16_t', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): ns3::Time ns3::YansWifiPhy::GetDelayUntilIdle() [member function] cls.add_method('GetDelayUntilIdle', 'ns3::Time', [], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): ns3::Ptr<ns3::Object> ns3::YansWifiPhy::GetDevice() const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::Object >', [], is_const=True) ## yans-wifi-phy.h (module 'wifi'): double ns3::YansWifiPhy::GetEdThreshold() const [member function] cls.add_method('GetEdThreshold', 'double', [], is_const=True) ## yans-wifi-phy.h (module 'wifi'): ns3::Ptr<ns3::ErrorRateModel> ns3::YansWifiPhy::GetErrorRateModel() const [member function] cls.add_method('GetErrorRateModel', 'ns3::Ptr< ns3::ErrorRateModel >', [], is_const=True) ## yans-wifi-phy.h (module 'wifi'): uint32_t ns3::YansWifiPhy::GetFrequency() const [member function] cls.add_method('GetFrequency', 'uint32_t', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::GetGreenfield() const [member function] cls.add_method('GetGreenfield', 'bool', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::GetGuardInterval() const [member function] cls.add_method('GetGuardInterval', 'bool', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): ns3::Time ns3::YansWifiPhy::GetLastRxStartTime() const [member function] cls.add_method('GetLastRxStartTime', 'ns3::Time', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::GetLdpc() const [member function] cls.add_method('GetLdpc', 'bool', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): uint8_t ns3::YansWifiPhy::GetMcs(uint8_t mcs) const [member function] cls.add_method('GetMcs', 'uint8_t', [param('uint8_t', 'mcs')], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): ns3::WifiModeList ns3::YansWifiPhy::GetMembershipSelectorModes(uint32_t selector) [member function] cls.add_method('GetMembershipSelectorModes', 'ns3::WifiModeList', [param('uint32_t', 'selector')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): ns3::Ptr<ns3::Object> ns3::YansWifiPhy::GetMobility() [member function] cls.add_method('GetMobility', 'ns3::Ptr< ns3::Object >', []) ## yans-wifi-phy.h (module 'wifi'): ns3::WifiMode ns3::YansWifiPhy::GetMode(uint32_t mode) const [member function] cls.add_method('GetMode', 'ns3::WifiMode', [param('uint32_t', 'mode')], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): uint32_t ns3::YansWifiPhy::GetNBssMembershipSelectors() const [member function] cls.add_method('GetNBssMembershipSelectors', 'uint32_t', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): uint8_t ns3::YansWifiPhy::GetNMcs() const [member function] cls.add_method('GetNMcs', 'uint8_t', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): uint32_t ns3::YansWifiPhy::GetNModes() const [member function] cls.add_method('GetNModes', 'uint32_t', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): uint32_t ns3::YansWifiPhy::GetNTxPower() const [member function] cls.add_method('GetNTxPower', 'uint32_t', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): uint32_t ns3::YansWifiPhy::GetNumberOfReceiveAntennas() const [member function] cls.add_method('GetNumberOfReceiveAntennas', 'uint32_t', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): uint32_t ns3::YansWifiPhy::GetNumberOfTransmitAntennas() const [member function] cls.add_method('GetNumberOfTransmitAntennas', 'uint32_t', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): double ns3::YansWifiPhy::GetRxGain() const [member function] cls.add_method('GetRxGain', 'double', [], is_const=True) ## yans-wifi-phy.h (module 'wifi'): double ns3::YansWifiPhy::GetRxNoiseFigure() const [member function] cls.add_method('GetRxNoiseFigure', 'double', [], is_const=True) ## yans-wifi-phy.h (module 'wifi'): ns3::Time ns3::YansWifiPhy::GetStateDuration() [member function] cls.add_method('GetStateDuration', 'ns3::Time', [], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::GetStbc() const [member function] cls.add_method('GetStbc', 'bool', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): double ns3::YansWifiPhy::GetTxGain() const [member function] cls.add_method('GetTxGain', 'double', [], is_const=True) ## yans-wifi-phy.h (module 'wifi'): double ns3::YansWifiPhy::GetTxPowerEnd() const [member function] cls.add_method('GetTxPowerEnd', 'double', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): double ns3::YansWifiPhy::GetTxPowerStart() const [member function] cls.add_method('GetTxPowerStart', 'double', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): static ns3::TypeId ns3::YansWifiPhy::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::IsMcsSupported(ns3::WifiMode mode) [member function] cls.add_method('IsMcsSupported', 'bool', [param('ns3::WifiMode', 'mode')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::IsModeSupported(ns3::WifiMode mode) const [member function] cls.add_method('IsModeSupported', 'bool', [param('ns3::WifiMode', 'mode')], is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::IsStateBusy() [member function] cls.add_method('IsStateBusy', 'bool', [], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::IsStateCcaBusy() [member function] cls.add_method('IsStateCcaBusy', 'bool', [], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::IsStateIdle() [member function] cls.add_method('IsStateIdle', 'bool', [], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::IsStateRx() [member function] cls.add_method('IsStateRx', 'bool', [], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::IsStateSleep() [member function] cls.add_method('IsStateSleep', 'bool', [], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::IsStateSwitching() [member function] cls.add_method('IsStateSwitching', 'bool', [], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): bool ns3::YansWifiPhy::IsStateTx() [member function] cls.add_method('IsStateTx', 'bool', [], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): ns3::WifiMode ns3::YansWifiPhy::McsToWifiMode(uint8_t mcs) [member function] cls.add_method('McsToWifiMode', 'ns3::WifiMode', [param('uint8_t', 'mcs')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::RegisterListener(ns3::WifiPhyListener * listener) [member function] cls.add_method('RegisterListener', 'void', [param('ns3::WifiPhyListener *', 'listener')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::ResumeFromSleep() [member function] cls.add_method('ResumeFromSleep', 'void', [], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SendPacket(ns3::Ptr<ns3::Packet const> packet, ns3::WifiTxVector txvector, ns3::WifiPreamble preamble) [member function] cls.add_method('SendPacket', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiTxVector', 'txvector'), param('ns3::WifiPreamble', 'preamble')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetCcaMode1Threshold(double threshold) [member function] cls.add_method('SetCcaMode1Threshold', 'void', [param('double', 'threshold')]) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetChannel(ns3::Ptr<ns3::YansWifiChannel> channel) [member function] cls.add_method('SetChannel', 'void', [param('ns3::Ptr< ns3::YansWifiChannel >', 'channel')]) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetChannelBonding(bool channelbonding) [member function] cls.add_method('SetChannelBonding', 'void', [param('bool', 'channelbonding')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetChannelNumber(uint16_t id) [member function] cls.add_method('SetChannelNumber', 'void', [param('uint16_t', 'id')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetDevice(ns3::Ptr<ns3::Object> device) [member function] cls.add_method('SetDevice', 'void', [param('ns3::Ptr< ns3::Object >', 'device')]) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetEdThreshold(double threshold) [member function] cls.add_method('SetEdThreshold', 'void', [param('double', 'threshold')]) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetErrorRateModel(ns3::Ptr<ns3::ErrorRateModel> rate) [member function] cls.add_method('SetErrorRateModel', 'void', [param('ns3::Ptr< ns3::ErrorRateModel >', 'rate')]) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetFrequency(uint32_t freq) [member function] cls.add_method('SetFrequency', 'void', [param('uint32_t', 'freq')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetGreenfield(bool greenfield) [member function] cls.add_method('SetGreenfield', 'void', [param('bool', 'greenfield')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetGuardInterval(bool guardInterval) [member function] cls.add_method('SetGuardInterval', 'void', [param('bool', 'guardInterval')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetLdpc(bool ldpc) [member function] cls.add_method('SetLdpc', 'void', [param('bool', 'ldpc')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetMobility(ns3::Ptr<ns3::Object> mobility) [member function] cls.add_method('SetMobility', 'void', [param('ns3::Ptr< ns3::Object >', 'mobility')]) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetNTxPower(uint32_t n) [member function] cls.add_method('SetNTxPower', 'void', [param('uint32_t', 'n')]) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetNumberOfReceiveAntennas(uint32_t rx) [member function] cls.add_method('SetNumberOfReceiveAntennas', 'void', [param('uint32_t', 'rx')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetNumberOfTransmitAntennas(uint32_t tx) [member function] cls.add_method('SetNumberOfTransmitAntennas', 'void', [param('uint32_t', 'tx')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetReceiveErrorCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet const>, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetReceiveErrorCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetReceiveOkCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet>, double, ns3::WifiMode, ns3::WifiPreamble, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetReceiveOkCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::WifiMode, ns3::WifiPreamble, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetRxGain(double gain) [member function] cls.add_method('SetRxGain', 'void', [param('double', 'gain')]) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetRxNoiseFigure(double noiseFigureDb) [member function] cls.add_method('SetRxNoiseFigure', 'void', [param('double', 'noiseFigureDb')]) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetSleepMode() [member function] cls.add_method('SetSleepMode', 'void', [], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetStbc(bool stbc) [member function] cls.add_method('SetStbc', 'void', [param('bool', 'stbc')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetTxGain(double gain) [member function] cls.add_method('SetTxGain', 'void', [param('double', 'gain')]) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetTxPowerEnd(double end) [member function] cls.add_method('SetTxPowerEnd', 'void', [param('double', 'end')]) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::SetTxPowerStart(double start) [member function] cls.add_method('SetTxPowerStart', 'void', [param('double', 'start')]) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::StartReceivePacket(ns3::Ptr<ns3::Packet> packet, double rxPowerDbm, ns3::WifiTxVector txVector, ns3::WifiPreamble preamble) [member function] cls.add_method('StartReceivePacket', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'rxPowerDbm'), param('ns3::WifiTxVector', 'txVector'), param('ns3::WifiPreamble', 'preamble')]) ## yans-wifi-phy.h (module 'wifi'): uint32_t ns3::YansWifiPhy::WifiModeToMcs(ns3::WifiMode mode) [member function] cls.add_method('WifiModeToMcs', 'uint32_t', [param('ns3::WifiMode', 'mode')], is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): void ns3::YansWifiPhy::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) return def register_Ns3ZetaRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ZetaRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ZetaRandomVariable::ZetaRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::ZetaRandomVariable::GetAlpha() const [member function] cls.add_method('GetAlpha', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ZetaRandomVariable::GetValue(double alpha) [member function] cls.add_method('GetValue', 'double', [param('double', 'alpha')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZetaRandomVariable::GetInteger(uint32_t alpha) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'alpha')]) ## random-variable-stream.h (module 'core'): double ns3::ZetaRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZetaRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3ZipfRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ZipfRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ZipfRandomVariable::ZipfRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZipfRandomVariable::GetN() const [member function] cls.add_method('GetN', 'uint32_t', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ZipfRandomVariable::GetAlpha() const [member function] cls.add_method('GetAlpha', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ZipfRandomVariable::GetValue(uint32_t n, double alpha) [member function] cls.add_method('GetValue', 'double', [param('uint32_t', 'n'), param('double', 'alpha')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZipfRandomVariable::GetInteger(uint32_t n, uint32_t alpha) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'n'), param('uint32_t', 'alpha')]) ## random-variable-stream.h (module 'core'): double ns3::ZipfRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZipfRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3AarfWifiManager_methods(root_module, cls): ## aarf-wifi-manager.h (module 'wifi'): ns3::AarfWifiManager::AarfWifiManager(ns3::AarfWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::AarfWifiManager const &', 'arg0')]) ## aarf-wifi-manager.h (module 'wifi'): ns3::AarfWifiManager::AarfWifiManager() [constructor] cls.add_constructor([]) ## aarf-wifi-manager.h (module 'wifi'): static ns3::TypeId ns3::AarfWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## aarf-wifi-manager.h (module 'wifi'): ns3::WifiRemoteStation * ns3::AarfWifiManager::DoCreateStation() const [member function] cls.add_method('DoCreateStation', 'ns3::WifiRemoteStation *', [], is_const=True, visibility='private', is_virtual=True) ## aarf-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::AarfWifiManager::DoGetDataTxVector(ns3::WifiRemoteStation * station, uint32_t size) [member function] cls.add_method('DoGetDataTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station'), param('uint32_t', 'size')], visibility='private', is_virtual=True) ## aarf-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::AarfWifiManager::DoGetRtsTxVector(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoGetRtsTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## aarf-wifi-manager.h (module 'wifi'): void ns3::AarfWifiManager::DoReportDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## aarf-wifi-manager.h (module 'wifi'): void ns3::AarfWifiManager::DoReportDataOk(ns3::WifiRemoteStation * station, double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] cls.add_method('DoReportDataOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], visibility='private', is_virtual=True) ## aarf-wifi-manager.h (module 'wifi'): void ns3::AarfWifiManager::DoReportFinalDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## aarf-wifi-manager.h (module 'wifi'): void ns3::AarfWifiManager::DoReportFinalRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## aarf-wifi-manager.h (module 'wifi'): void ns3::AarfWifiManager::DoReportRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## aarf-wifi-manager.h (module 'wifi'): void ns3::AarfWifiManager::DoReportRtsOk(ns3::WifiRemoteStation * station, double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] cls.add_method('DoReportRtsOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='private', is_virtual=True) ## aarf-wifi-manager.h (module 'wifi'): void ns3::AarfWifiManager::DoReportRxOk(ns3::WifiRemoteStation * station, double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('DoReportRxOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='private', is_virtual=True) ## aarf-wifi-manager.h (module 'wifi'): bool ns3::AarfWifiManager::IsLowLatency() const [member function] cls.add_method('IsLowLatency', 'bool', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3AarfcdWifiManager_methods(root_module, cls): ## aarfcd-wifi-manager.h (module 'wifi'): ns3::AarfcdWifiManager::AarfcdWifiManager(ns3::AarfcdWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::AarfcdWifiManager const &', 'arg0')]) ## aarfcd-wifi-manager.h (module 'wifi'): ns3::AarfcdWifiManager::AarfcdWifiManager() [constructor] cls.add_constructor([]) ## aarfcd-wifi-manager.h (module 'wifi'): static ns3::TypeId ns3::AarfcdWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## aarfcd-wifi-manager.h (module 'wifi'): ns3::WifiRemoteStation * ns3::AarfcdWifiManager::DoCreateStation() const [member function] cls.add_method('DoCreateStation', 'ns3::WifiRemoteStation *', [], is_const=True, visibility='private', is_virtual=True) ## aarfcd-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::AarfcdWifiManager::DoGetDataTxVector(ns3::WifiRemoteStation * station, uint32_t size) [member function] cls.add_method('DoGetDataTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station'), param('uint32_t', 'size')], visibility='private', is_virtual=True) ## aarfcd-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::AarfcdWifiManager::DoGetRtsTxVector(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoGetRtsTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## aarfcd-wifi-manager.h (module 'wifi'): bool ns3::AarfcdWifiManager::DoNeedRts(ns3::WifiRemoteStation * station, ns3::Ptr<ns3::Packet const> packet, bool normally) [member function] cls.add_method('DoNeedRts', 'bool', [param('ns3::WifiRemoteStation *', 'station'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('bool', 'normally')], visibility='private', is_virtual=True) ## aarfcd-wifi-manager.h (module 'wifi'): void ns3::AarfcdWifiManager::DoReportDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## aarfcd-wifi-manager.h (module 'wifi'): void ns3::AarfcdWifiManager::DoReportDataOk(ns3::WifiRemoteStation * station, double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] cls.add_method('DoReportDataOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], visibility='private', is_virtual=True) ## aarfcd-wifi-manager.h (module 'wifi'): void ns3::AarfcdWifiManager::DoReportFinalDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## aarfcd-wifi-manager.h (module 'wifi'): void ns3::AarfcdWifiManager::DoReportFinalRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## aarfcd-wifi-manager.h (module 'wifi'): void ns3::AarfcdWifiManager::DoReportRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## aarfcd-wifi-manager.h (module 'wifi'): void ns3::AarfcdWifiManager::DoReportRtsOk(ns3::WifiRemoteStation * station, double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] cls.add_method('DoReportRtsOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='private', is_virtual=True) ## aarfcd-wifi-manager.h (module 'wifi'): void ns3::AarfcdWifiManager::DoReportRxOk(ns3::WifiRemoteStation * station, double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('DoReportRxOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='private', is_virtual=True) ## aarfcd-wifi-manager.h (module 'wifi'): bool ns3::AarfcdWifiManager::IsLowLatency() const [member function] cls.add_method('IsLowLatency', 'bool', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3AmrrWifiManager_methods(root_module, cls): ## amrr-wifi-manager.h (module 'wifi'): ns3::AmrrWifiManager::AmrrWifiManager(ns3::AmrrWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::AmrrWifiManager const &', 'arg0')]) ## amrr-wifi-manager.h (module 'wifi'): ns3::AmrrWifiManager::AmrrWifiManager() [constructor] cls.add_constructor([]) ## amrr-wifi-manager.h (module 'wifi'): static ns3::TypeId ns3::AmrrWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## amrr-wifi-manager.h (module 'wifi'): ns3::WifiRemoteStation * ns3::AmrrWifiManager::DoCreateStation() const [member function] cls.add_method('DoCreateStation', 'ns3::WifiRemoteStation *', [], is_const=True, visibility='private', is_virtual=True) ## amrr-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::AmrrWifiManager::DoGetDataTxVector(ns3::WifiRemoteStation * station, uint32_t size) [member function] cls.add_method('DoGetDataTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station'), param('uint32_t', 'size')], visibility='private', is_virtual=True) ## amrr-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::AmrrWifiManager::DoGetRtsTxVector(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoGetRtsTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## amrr-wifi-manager.h (module 'wifi'): void ns3::AmrrWifiManager::DoReportDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## amrr-wifi-manager.h (module 'wifi'): void ns3::AmrrWifiManager::DoReportDataOk(ns3::WifiRemoteStation * station, double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] cls.add_method('DoReportDataOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], visibility='private', is_virtual=True) ## amrr-wifi-manager.h (module 'wifi'): void ns3::AmrrWifiManager::DoReportFinalDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## amrr-wifi-manager.h (module 'wifi'): void ns3::AmrrWifiManager::DoReportFinalRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## amrr-wifi-manager.h (module 'wifi'): void ns3::AmrrWifiManager::DoReportRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## amrr-wifi-manager.h (module 'wifi'): void ns3::AmrrWifiManager::DoReportRtsOk(ns3::WifiRemoteStation * station, double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] cls.add_method('DoReportRtsOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='private', is_virtual=True) ## amrr-wifi-manager.h (module 'wifi'): void ns3::AmrrWifiManager::DoReportRxOk(ns3::WifiRemoteStation * station, double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('DoReportRxOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='private', is_virtual=True) ## amrr-wifi-manager.h (module 'wifi'): bool ns3::AmrrWifiManager::IsLowLatency() const [member function] cls.add_method('IsLowLatency', 'bool', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3AmsduSubframeHeader_methods(root_module, cls): ## amsdu-subframe-header.h (module 'wifi'): ns3::AmsduSubframeHeader::AmsduSubframeHeader(ns3::AmsduSubframeHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::AmsduSubframeHeader const &', 'arg0')]) ## amsdu-subframe-header.h (module 'wifi'): ns3::AmsduSubframeHeader::AmsduSubframeHeader() [constructor] cls.add_constructor([]) ## amsdu-subframe-header.h (module 'wifi'): uint32_t ns3::AmsduSubframeHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## amsdu-subframe-header.h (module 'wifi'): ns3::Mac48Address ns3::AmsduSubframeHeader::GetDestinationAddr() const [member function] cls.add_method('GetDestinationAddr', 'ns3::Mac48Address', [], is_const=True) ## amsdu-subframe-header.h (module 'wifi'): ns3::TypeId ns3::AmsduSubframeHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## amsdu-subframe-header.h (module 'wifi'): uint16_t ns3::AmsduSubframeHeader::GetLength() const [member function] cls.add_method('GetLength', 'uint16_t', [], is_const=True) ## amsdu-subframe-header.h (module 'wifi'): uint32_t ns3::AmsduSubframeHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## amsdu-subframe-header.h (module 'wifi'): ns3::Mac48Address ns3::AmsduSubframeHeader::GetSourceAddr() const [member function] cls.add_method('GetSourceAddr', 'ns3::Mac48Address', [], is_const=True) ## amsdu-subframe-header.h (module 'wifi'): static ns3::TypeId ns3::AmsduSubframeHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::SetDestinationAddr(ns3::Mac48Address to) [member function] cls.add_method('SetDestinationAddr', 'void', [param('ns3::Mac48Address', 'to')]) ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::SetLength(uint16_t arg0) [member function] cls.add_method('SetLength', 'void', [param('uint16_t', 'arg0')]) ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::SetSourceAddr(ns3::Mac48Address to) [member function] cls.add_method('SetSourceAddr', 'void', [param('ns3::Mac48Address', 'to')]) return def register_Ns3ArfWifiManager_methods(root_module, cls): ## arf-wifi-manager.h (module 'wifi'): ns3::ArfWifiManager::ArfWifiManager(ns3::ArfWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::ArfWifiManager const &', 'arg0')]) ## arf-wifi-manager.h (module 'wifi'): ns3::ArfWifiManager::ArfWifiManager() [constructor] cls.add_constructor([]) ## arf-wifi-manager.h (module 'wifi'): static ns3::TypeId ns3::ArfWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## arf-wifi-manager.h (module 'wifi'): ns3::WifiRemoteStation * ns3::ArfWifiManager::DoCreateStation() const [member function] cls.add_method('DoCreateStation', 'ns3::WifiRemoteStation *', [], is_const=True, visibility='private', is_virtual=True) ## arf-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::ArfWifiManager::DoGetDataTxVector(ns3::WifiRemoteStation * station, uint32_t size) [member function] cls.add_method('DoGetDataTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station'), param('uint32_t', 'size')], visibility='private', is_virtual=True) ## arf-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::ArfWifiManager::DoGetRtsTxVector(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoGetRtsTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## arf-wifi-manager.h (module 'wifi'): void ns3::ArfWifiManager::DoReportDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## arf-wifi-manager.h (module 'wifi'): void ns3::ArfWifiManager::DoReportDataOk(ns3::WifiRemoteStation * station, double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] cls.add_method('DoReportDataOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], visibility='private', is_virtual=True) ## arf-wifi-manager.h (module 'wifi'): void ns3::ArfWifiManager::DoReportFinalDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## arf-wifi-manager.h (module 'wifi'): void ns3::ArfWifiManager::DoReportFinalRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## arf-wifi-manager.h (module 'wifi'): void ns3::ArfWifiManager::DoReportRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## arf-wifi-manager.h (module 'wifi'): void ns3::ArfWifiManager::DoReportRtsOk(ns3::WifiRemoteStation * station, double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] cls.add_method('DoReportRtsOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='private', is_virtual=True) ## arf-wifi-manager.h (module 'wifi'): void ns3::ArfWifiManager::DoReportRxOk(ns3::WifiRemoteStation * station, double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('DoReportRxOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='private', is_virtual=True) ## arf-wifi-manager.h (module 'wifi'): bool ns3::ArfWifiManager::IsLowLatency() const [member function] cls.add_method('IsLowLatency', 'bool', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3AthstatsWifiTraceSink_methods(root_module, cls): ## athstats-helper.h (module 'wifi'): ns3::AthstatsWifiTraceSink::AthstatsWifiTraceSink(ns3::AthstatsWifiTraceSink const & arg0) [copy constructor] cls.add_constructor([param('ns3::AthstatsWifiTraceSink const &', 'arg0')]) ## athstats-helper.h (module 'wifi'): ns3::AthstatsWifiTraceSink::AthstatsWifiTraceSink() [constructor] cls.add_constructor([]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsWifiTraceSink::DevRxTrace(std::string context, ns3::Ptr<ns3::Packet const> p) [member function] cls.add_method('DevRxTrace', 'void', [param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsWifiTraceSink::DevTxTrace(std::string context, ns3::Ptr<ns3::Packet const> p) [member function] cls.add_method('DevTxTrace', 'void', [param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')]) ## athstats-helper.h (module 'wifi'): static ns3::TypeId ns3::AthstatsWifiTraceSink::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsWifiTraceSink::Open(std::string const & name) [member function] cls.add_method('Open', 'void', [param('std::string const &', 'name')]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsWifiTraceSink::PhyRxErrorTrace(std::string context, ns3::Ptr<ns3::Packet const> packet, double snr) [member function] cls.add_method('PhyRxErrorTrace', 'void', [param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('double', 'snr')]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsWifiTraceSink::PhyRxOkTrace(std::string context, ns3::Ptr<ns3::Packet const> packet, double snr, ns3::WifiMode mode, ns3::WifiPreamble preamble) [member function] cls.add_method('PhyRxOkTrace', 'void', [param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('double', 'snr'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble')]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsWifiTraceSink::PhyStateTrace(std::string context, ns3::Time start, ns3::Time duration, ns3::WifiPhy::State state) [member function] cls.add_method('PhyStateTrace', 'void', [param('std::string', 'context'), param('ns3::Time', 'start'), param('ns3::Time', 'duration'), param('ns3::WifiPhy::State', 'state')]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsWifiTraceSink::PhyTxTrace(std::string context, ns3::Ptr<ns3::Packet const> packet, ns3::WifiMode mode, ns3::WifiPreamble preamble, uint8_t txPower) [member function] cls.add_method('PhyTxTrace', 'void', [param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble'), param('uint8_t', 'txPower')]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsWifiTraceSink::TxDataFailedTrace(std::string context, ns3::Mac48Address address) [member function] cls.add_method('TxDataFailedTrace', 'void', [param('std::string', 'context'), param('ns3::Mac48Address', 'address')]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsWifiTraceSink::TxFinalDataFailedTrace(std::string context, ns3::Mac48Address address) [member function] cls.add_method('TxFinalDataFailedTrace', 'void', [param('std::string', 'context'), param('ns3::Mac48Address', 'address')]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsWifiTraceSink::TxFinalRtsFailedTrace(std::string context, ns3::Mac48Address address) [member function] cls.add_method('TxFinalRtsFailedTrace', 'void', [param('std::string', 'context'), param('ns3::Mac48Address', 'address')]) ## athstats-helper.h (module 'wifi'): void ns3::AthstatsWifiTraceSink::TxRtsFailedTrace(std::string context, ns3::Mac48Address address) [member function] cls.add_method('TxRtsFailedTrace', 'void', [param('std::string', 'context'), param('ns3::Mac48Address', 'address')]) 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_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_Ns3CaraWifiManager_methods(root_module, cls): ## cara-wifi-manager.h (module 'wifi'): ns3::CaraWifiManager::CaraWifiManager(ns3::CaraWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::CaraWifiManager const &', 'arg0')]) ## cara-wifi-manager.h (module 'wifi'): ns3::CaraWifiManager::CaraWifiManager() [constructor] cls.add_constructor([]) ## cara-wifi-manager.h (module 'wifi'): static ns3::TypeId ns3::CaraWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## cara-wifi-manager.h (module 'wifi'): ns3::WifiRemoteStation * ns3::CaraWifiManager::DoCreateStation() const [member function] cls.add_method('DoCreateStation', 'ns3::WifiRemoteStation *', [], is_const=True, visibility='private', is_virtual=True) ## cara-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::CaraWifiManager::DoGetDataTxVector(ns3::WifiRemoteStation * station, uint32_t size) [member function] cls.add_method('DoGetDataTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station'), param('uint32_t', 'size')], visibility='private', is_virtual=True) ## cara-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::CaraWifiManager::DoGetRtsTxVector(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoGetRtsTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## cara-wifi-manager.h (module 'wifi'): bool ns3::CaraWifiManager::DoNeedRts(ns3::WifiRemoteStation * station, ns3::Ptr<ns3::Packet const> packet, bool normally) [member function] cls.add_method('DoNeedRts', 'bool', [param('ns3::WifiRemoteStation *', 'station'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('bool', 'normally')], visibility='private', is_virtual=True) ## cara-wifi-manager.h (module 'wifi'): void ns3::CaraWifiManager::DoReportDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## cara-wifi-manager.h (module 'wifi'): void ns3::CaraWifiManager::DoReportDataOk(ns3::WifiRemoteStation * station, double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] cls.add_method('DoReportDataOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], visibility='private', is_virtual=True) ## cara-wifi-manager.h (module 'wifi'): void ns3::CaraWifiManager::DoReportFinalDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## cara-wifi-manager.h (module 'wifi'): void ns3::CaraWifiManager::DoReportFinalRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## cara-wifi-manager.h (module 'wifi'): void ns3::CaraWifiManager::DoReportRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## cara-wifi-manager.h (module 'wifi'): void ns3::CaraWifiManager::DoReportRtsOk(ns3::WifiRemoteStation * station, double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] cls.add_method('DoReportRtsOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='private', is_virtual=True) ## cara-wifi-manager.h (module 'wifi'): void ns3::CaraWifiManager::DoReportRxOk(ns3::WifiRemoteStation * station, double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('DoReportRxOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='private', is_virtual=True) ## cara-wifi-manager.h (module 'wifi'): bool ns3::CaraWifiManager::IsLowLatency() const [member function] cls.add_method('IsLowLatency', 'bool', [], is_const=True, visibility='private', is_virtual=True) 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_Ns3ConstantRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ConstantRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ConstantRandomVariable::ConstantRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::ConstantRandomVariable::GetConstant() const [member function] cls.add_method('GetConstant', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ConstantRandomVariable::GetValue(double constant) [member function] cls.add_method('GetValue', 'double', [param('double', 'constant')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ConstantRandomVariable::GetInteger(uint32_t constant) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'constant')]) ## random-variable-stream.h (module 'core'): double ns3::ConstantRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ConstantRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3ConstantRateWifiManager_methods(root_module, cls): ## constant-rate-wifi-manager.h (module 'wifi'): ns3::ConstantRateWifiManager::ConstantRateWifiManager(ns3::ConstantRateWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::ConstantRateWifiManager const &', 'arg0')]) ## constant-rate-wifi-manager.h (module 'wifi'): ns3::ConstantRateWifiManager::ConstantRateWifiManager() [constructor] cls.add_constructor([]) ## constant-rate-wifi-manager.h (module 'wifi'): static ns3::TypeId ns3::ConstantRateWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## constant-rate-wifi-manager.h (module 'wifi'): ns3::WifiRemoteStation * ns3::ConstantRateWifiManager::DoCreateStation() const [member function] cls.add_method('DoCreateStation', 'ns3::WifiRemoteStation *', [], is_const=True, visibility='private', is_virtual=True) ## constant-rate-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::ConstantRateWifiManager::DoGetDataTxVector(ns3::WifiRemoteStation * station, uint32_t size) [member function] cls.add_method('DoGetDataTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station'), param('uint32_t', 'size')], visibility='private', is_virtual=True) ## constant-rate-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::ConstantRateWifiManager::DoGetRtsTxVector(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoGetRtsTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## constant-rate-wifi-manager.h (module 'wifi'): void ns3::ConstantRateWifiManager::DoReportDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## constant-rate-wifi-manager.h (module 'wifi'): void ns3::ConstantRateWifiManager::DoReportDataOk(ns3::WifiRemoteStation * station, double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] cls.add_method('DoReportDataOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], visibility='private', is_virtual=True) ## constant-rate-wifi-manager.h (module 'wifi'): void ns3::ConstantRateWifiManager::DoReportFinalDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## constant-rate-wifi-manager.h (module 'wifi'): void ns3::ConstantRateWifiManager::DoReportFinalRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## constant-rate-wifi-manager.h (module 'wifi'): void ns3::ConstantRateWifiManager::DoReportRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## constant-rate-wifi-manager.h (module 'wifi'): void ns3::ConstantRateWifiManager::DoReportRtsOk(ns3::WifiRemoteStation * station, double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] cls.add_method('DoReportRtsOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='private', is_virtual=True) ## constant-rate-wifi-manager.h (module 'wifi'): void ns3::ConstantRateWifiManager::DoReportRxOk(ns3::WifiRemoteStation * station, double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('DoReportRxOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='private', is_virtual=True) ## constant-rate-wifi-manager.h (module 'wifi'): bool ns3::ConstantRateWifiManager::IsLowLatency() const [member function] cls.add_method('IsLowLatency', 'bool', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3ConstantSpeedPropagationDelayModel_methods(root_module, cls): ## propagation-delay-model.h (module 'propagation'): ns3::ConstantSpeedPropagationDelayModel::ConstantSpeedPropagationDelayModel(ns3::ConstantSpeedPropagationDelayModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::ConstantSpeedPropagationDelayModel const &', 'arg0')]) ## propagation-delay-model.h (module 'propagation'): ns3::ConstantSpeedPropagationDelayModel::ConstantSpeedPropagationDelayModel() [constructor] cls.add_constructor([]) ## propagation-delay-model.h (module 'propagation'): ns3::Time ns3::ConstantSpeedPropagationDelayModel::GetDelay(ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('GetDelay', 'ns3::Time', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, is_virtual=True) ## propagation-delay-model.h (module 'propagation'): double ns3::ConstantSpeedPropagationDelayModel::GetSpeed() const [member function] cls.add_method('GetSpeed', 'double', [], is_const=True) ## propagation-delay-model.h (module 'propagation'): static ns3::TypeId ns3::ConstantSpeedPropagationDelayModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-delay-model.h (module 'propagation'): void ns3::ConstantSpeedPropagationDelayModel::SetSpeed(double speed) [member function] cls.add_method('SetSpeed', 'void', [param('double', 'speed')]) ## propagation-delay-model.h (module 'propagation'): int64_t ns3::ConstantSpeedPropagationDelayModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3Cost231PropagationLossModel_methods(root_module, cls): ## cost231-propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::Cost231PropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## cost231-propagation-loss-model.h (module 'propagation'): ns3::Cost231PropagationLossModel::Cost231PropagationLossModel() [constructor] cls.add_constructor([]) ## cost231-propagation-loss-model.h (module 'propagation'): double ns3::Cost231PropagationLossModel::GetLoss(ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('GetLoss', 'double', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True) ## cost231-propagation-loss-model.h (module 'propagation'): void ns3::Cost231PropagationLossModel::SetBSAntennaHeight(double height) [member function] cls.add_method('SetBSAntennaHeight', 'void', [param('double', 'height')]) ## cost231-propagation-loss-model.h (module 'propagation'): void ns3::Cost231PropagationLossModel::SetSSAntennaHeight(double height) [member function] cls.add_method('SetSSAntennaHeight', 'void', [param('double', 'height')]) ## cost231-propagation-loss-model.h (module 'propagation'): void ns3::Cost231PropagationLossModel::SetLambda(double lambda) [member function] cls.add_method('SetLambda', 'void', [param('double', 'lambda')]) ## cost231-propagation-loss-model.h (module 'propagation'): void ns3::Cost231PropagationLossModel::SetLambda(double frequency, double speed) [member function] cls.add_method('SetLambda', 'void', [param('double', 'frequency'), param('double', 'speed')]) ## cost231-propagation-loss-model.h (module 'propagation'): void ns3::Cost231PropagationLossModel::SetMinDistance(double minDistance) [member function] cls.add_method('SetMinDistance', 'void', [param('double', 'minDistance')]) ## cost231-propagation-loss-model.h (module 'propagation'): double ns3::Cost231PropagationLossModel::GetBSAntennaHeight() const [member function] cls.add_method('GetBSAntennaHeight', 'double', [], is_const=True) ## cost231-propagation-loss-model.h (module 'propagation'): double ns3::Cost231PropagationLossModel::GetSSAntennaHeight() const [member function] cls.add_method('GetSSAntennaHeight', 'double', [], is_const=True) ## cost231-propagation-loss-model.h (module 'propagation'): double ns3::Cost231PropagationLossModel::GetMinDistance() const [member function] cls.add_method('GetMinDistance', 'double', [], is_const=True) ## cost231-propagation-loss-model.h (module 'propagation'): double ns3::Cost231PropagationLossModel::GetLambda() const [member function] cls.add_method('GetLambda', 'double', [], is_const=True) ## cost231-propagation-loss-model.h (module 'propagation'): double ns3::Cost231PropagationLossModel::GetShadowing() [member function] cls.add_method('GetShadowing', 'double', []) ## cost231-propagation-loss-model.h (module 'propagation'): void ns3::Cost231PropagationLossModel::SetShadowing(double shadowing) [member function] cls.add_method('SetShadowing', 'void', [param('double', 'shadowing')]) ## cost231-propagation-loss-model.h (module 'propagation'): double ns3::Cost231PropagationLossModel::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) ## cost231-propagation-loss-model.h (module 'propagation'): int64_t ns3::Cost231PropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3CtrlBAckRequestHeader_methods(root_module, cls): ## ctrl-headers.h (module 'wifi'): ns3::CtrlBAckRequestHeader::CtrlBAckRequestHeader(ns3::CtrlBAckRequestHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::CtrlBAckRequestHeader const &', 'arg0')]) ## ctrl-headers.h (module 'wifi'): ns3::CtrlBAckRequestHeader::CtrlBAckRequestHeader() [constructor] cls.add_constructor([]) ## ctrl-headers.h (module 'wifi'): uint32_t ns3::CtrlBAckRequestHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## ctrl-headers.h (module 'wifi'): ns3::TypeId ns3::CtrlBAckRequestHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## ctrl-headers.h (module 'wifi'): uint32_t ns3::CtrlBAckRequestHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## ctrl-headers.h (module 'wifi'): uint16_t ns3::CtrlBAckRequestHeader::GetStartingSequence() const [member function] cls.add_method('GetStartingSequence', 'uint16_t', [], is_const=True) ## ctrl-headers.h (module 'wifi'): uint16_t ns3::CtrlBAckRequestHeader::GetStartingSequenceControl() const [member function] cls.add_method('GetStartingSequenceControl', 'uint16_t', [], is_const=True) ## ctrl-headers.h (module 'wifi'): uint8_t ns3::CtrlBAckRequestHeader::GetTidInfo() const [member function] cls.add_method('GetTidInfo', 'uint8_t', [], is_const=True) ## ctrl-headers.h (module 'wifi'): static ns3::TypeId ns3::CtrlBAckRequestHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## ctrl-headers.h (module 'wifi'): bool ns3::CtrlBAckRequestHeader::IsBasic() const [member function] cls.add_method('IsBasic', 'bool', [], is_const=True) ## ctrl-headers.h (module 'wifi'): bool ns3::CtrlBAckRequestHeader::IsCompressed() const [member function] cls.add_method('IsCompressed', 'bool', [], is_const=True) ## ctrl-headers.h (module 'wifi'): bool ns3::CtrlBAckRequestHeader::IsMultiTid() const [member function] cls.add_method('IsMultiTid', 'bool', [], is_const=True) ## ctrl-headers.h (module 'wifi'): bool ns3::CtrlBAckRequestHeader::MustSendHtImmediateAck() const [member function] cls.add_method('MustSendHtImmediateAck', 'bool', [], is_const=True) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckRequestHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckRequestHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckRequestHeader::SetHtImmediateAck(bool immediateAck) [member function] cls.add_method('SetHtImmediateAck', 'void', [param('bool', 'immediateAck')]) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckRequestHeader::SetStartingSequence(uint16_t seq) [member function] cls.add_method('SetStartingSequence', 'void', [param('uint16_t', 'seq')]) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckRequestHeader::SetTidInfo(uint8_t tid) [member function] cls.add_method('SetTidInfo', 'void', [param('uint8_t', 'tid')]) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckRequestHeader::SetType(ns3::BlockAckType type) [member function] cls.add_method('SetType', 'void', [param('ns3::BlockAckType', 'type')]) return def register_Ns3CtrlBAckResponseHeader_methods(root_module, cls): ## ctrl-headers.h (module 'wifi'): ns3::CtrlBAckResponseHeader::CtrlBAckResponseHeader(ns3::CtrlBAckResponseHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::CtrlBAckResponseHeader const &', 'arg0')]) ## ctrl-headers.h (module 'wifi'): ns3::CtrlBAckResponseHeader::CtrlBAckResponseHeader() [constructor] cls.add_constructor([]) ## ctrl-headers.h (module 'wifi'): uint32_t ns3::CtrlBAckResponseHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## ctrl-headers.h (module 'wifi'): uint16_t const * ns3::CtrlBAckResponseHeader::GetBitmap() const [member function] cls.add_method('GetBitmap', 'uint16_t const *', [], is_const=True) ## ctrl-headers.h (module 'wifi'): uint64_t ns3::CtrlBAckResponseHeader::GetCompressedBitmap() const [member function] cls.add_method('GetCompressedBitmap', 'uint64_t', [], is_const=True) ## ctrl-headers.h (module 'wifi'): ns3::TypeId ns3::CtrlBAckResponseHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## ctrl-headers.h (module 'wifi'): uint32_t ns3::CtrlBAckResponseHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## ctrl-headers.h (module 'wifi'): uint16_t ns3::CtrlBAckResponseHeader::GetStartingSequence() const [member function] cls.add_method('GetStartingSequence', 'uint16_t', [], is_const=True) ## ctrl-headers.h (module 'wifi'): uint16_t ns3::CtrlBAckResponseHeader::GetStartingSequenceControl() const [member function] cls.add_method('GetStartingSequenceControl', 'uint16_t', [], is_const=True) ## ctrl-headers.h (module 'wifi'): uint8_t ns3::CtrlBAckResponseHeader::GetTidInfo() const [member function] cls.add_method('GetTidInfo', 'uint8_t', [], is_const=True) ## ctrl-headers.h (module 'wifi'): static ns3::TypeId ns3::CtrlBAckResponseHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## ctrl-headers.h (module 'wifi'): bool ns3::CtrlBAckResponseHeader::IsBasic() const [member function] cls.add_method('IsBasic', 'bool', [], is_const=True) ## ctrl-headers.h (module 'wifi'): bool ns3::CtrlBAckResponseHeader::IsCompressed() const [member function] cls.add_method('IsCompressed', 'bool', [], is_const=True) ## ctrl-headers.h (module 'wifi'): bool ns3::CtrlBAckResponseHeader::IsFragmentReceived(uint16_t seq, uint8_t frag) const [member function] cls.add_method('IsFragmentReceived', 'bool', [param('uint16_t', 'seq'), param('uint8_t', 'frag')], is_const=True) ## ctrl-headers.h (module 'wifi'): bool ns3::CtrlBAckResponseHeader::IsMultiTid() const [member function] cls.add_method('IsMultiTid', 'bool', [], is_const=True) ## ctrl-headers.h (module 'wifi'): bool ns3::CtrlBAckResponseHeader::IsPacketReceived(uint16_t seq) const [member function] cls.add_method('IsPacketReceived', 'bool', [param('uint16_t', 'seq')], is_const=True) ## ctrl-headers.h (module 'wifi'): bool ns3::CtrlBAckResponseHeader::MustSendHtImmediateAck() const [member function] cls.add_method('MustSendHtImmediateAck', 'bool', [], is_const=True) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckResponseHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckResponseHeader::ResetBitmap() [member function] cls.add_method('ResetBitmap', 'void', []) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckResponseHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckResponseHeader::SetHtImmediateAck(bool immediateAck) [member function] cls.add_method('SetHtImmediateAck', 'void', [param('bool', 'immediateAck')]) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckResponseHeader::SetReceivedFragment(uint16_t seq, uint8_t frag) [member function] cls.add_method('SetReceivedFragment', 'void', [param('uint16_t', 'seq'), param('uint8_t', 'frag')]) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckResponseHeader::SetReceivedPacket(uint16_t seq) [member function] cls.add_method('SetReceivedPacket', 'void', [param('uint16_t', 'seq')]) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckResponseHeader::SetStartingSequence(uint16_t seq) [member function] cls.add_method('SetStartingSequence', 'void', [param('uint16_t', 'seq')]) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckResponseHeader::SetStartingSequenceControl(uint16_t seqControl) [member function] cls.add_method('SetStartingSequenceControl', 'void', [param('uint16_t', 'seqControl')]) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckResponseHeader::SetTidInfo(uint8_t tid) [member function] cls.add_method('SetTidInfo', 'void', [param('uint8_t', 'tid')]) ## ctrl-headers.h (module 'wifi'): void ns3::CtrlBAckResponseHeader::SetType(ns3::BlockAckType type) [member function] cls.add_method('SetType', 'void', [param('ns3::BlockAckType', 'type')]) return def register_Ns3Dcf_methods(root_module, cls): ## dcf.h (module 'wifi'): ns3::Dcf::Dcf() [constructor] cls.add_constructor([]) ## dcf.h (module 'wifi'): ns3::Dcf::Dcf(ns3::Dcf const & arg0) [copy constructor] cls.add_constructor([param('ns3::Dcf const &', 'arg0')]) ## dcf.h (module 'wifi'): uint32_t ns3::Dcf::GetAifsn() const [member function] cls.add_method('GetAifsn', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## dcf.h (module 'wifi'): uint32_t ns3::Dcf::GetMaxCw() const [member function] cls.add_method('GetMaxCw', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## dcf.h (module 'wifi'): uint32_t ns3::Dcf::GetMinCw() const [member function] cls.add_method('GetMinCw', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## dcf.h (module 'wifi'): static ns3::TypeId ns3::Dcf::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## dcf.h (module 'wifi'): void ns3::Dcf::SetAifsn(uint32_t aifsn) [member function] cls.add_method('SetAifsn', 'void', [param('uint32_t', 'aifsn')], is_pure_virtual=True, is_virtual=True) ## dcf.h (module 'wifi'): void ns3::Dcf::SetMaxCw(uint32_t maxCw) [member function] cls.add_method('SetMaxCw', 'void', [param('uint32_t', 'maxCw')], is_pure_virtual=True, is_virtual=True) ## dcf.h (module 'wifi'): void ns3::Dcf::SetMinCw(uint32_t minCw) [member function] cls.add_method('SetMinCw', 'void', [param('uint32_t', 'minCw')], is_pure_virtual=True, is_virtual=True) return def register_Ns3DeterministicRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::DeterministicRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::DeterministicRandomVariable::DeterministicRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): void ns3::DeterministicRandomVariable::SetValueArray(double * values, uint64_t length) [member function] cls.add_method('SetValueArray', 'void', [param('double *', 'values'), param('uint64_t', 'length')]) ## random-variable-stream.h (module 'core'): double ns3::DeterministicRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::DeterministicRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3DoubleValue_methods(root_module, cls): ## double.h (module 'core'): ns3::DoubleValue::DoubleValue() [constructor] cls.add_constructor([]) ## double.h (module 'core'): ns3::DoubleValue::DoubleValue(ns3::DoubleValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::DoubleValue const &', 'arg0')]) ## double.h (module 'core'): ns3::DoubleValue::DoubleValue(double const & value) [constructor] cls.add_constructor([param('double const &', 'value')]) ## double.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::DoubleValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## double.h (module 'core'): bool ns3::DoubleValue::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) ## double.h (module 'core'): double ns3::DoubleValue::Get() const [member function] cls.add_method('Get', 'double', [], is_const=True) ## double.h (module 'core'): std::string ns3::DoubleValue::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) ## double.h (module 'core'): void ns3::DoubleValue::Set(double const & value) [member function] cls.add_method('Set', 'void', [param('double const &', 'value')]) return def register_Ns3EdcaTxopN_methods(root_module, cls): ## edca-txop-n.h (module 'wifi'): static ns3::TypeId ns3::EdcaTxopN::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## edca-txop-n.h (module 'wifi'): ns3::EdcaTxopN::EdcaTxopN() [constructor] cls.add_constructor([]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], is_virtual=True) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetLow(ns3::Ptr<ns3::MacLow> low) [member function] cls.add_method('SetLow', 'void', [param('ns3::Ptr< ns3::MacLow >', 'low')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetTxMiddle(ns3::MacTxMiddle * txMiddle) [member function] cls.add_method('SetTxMiddle', 'void', [param('ns3::MacTxMiddle *', 'txMiddle')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetManager(ns3::DcfManager * manager) [member function] cls.add_method('SetManager', 'void', [param('ns3::DcfManager *', 'manager')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetTxOkCallback(ns3::Callback<void, ns3::WifiMacHeader const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetTxOkCallback', 'void', [param('ns3::Callback< void, ns3::WifiMacHeader const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetTxFailedCallback(ns3::Callback<void, ns3::WifiMacHeader const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetTxFailedCallback', 'void', [param('ns3::Callback< void, ns3::WifiMacHeader const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetWifiRemoteStationManager(ns3::Ptr<ns3::WifiRemoteStationManager> remoteManager) [member function] cls.add_method('SetWifiRemoteStationManager', 'void', [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'remoteManager')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetTypeOfStation(ns3::TypeOfStation type) [member function] cls.add_method('SetTypeOfStation', 'void', [param('ns3::TypeOfStation', 'type')]) ## edca-txop-n.h (module 'wifi'): ns3::TypeOfStation ns3::EdcaTxopN::GetTypeOfStation() const [member function] cls.add_method('GetTypeOfStation', 'ns3::TypeOfStation', [], is_const=True) ## edca-txop-n.h (module 'wifi'): ns3::Ptr<ns3::WifiMacQueue> ns3::EdcaTxopN::GetQueue() const [member function] cls.add_method('GetQueue', 'ns3::Ptr< ns3::WifiMacQueue >', [], is_const=True) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetMinCw(uint32_t minCw) [member function] cls.add_method('SetMinCw', 'void', [param('uint32_t', 'minCw')], is_virtual=True) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetMaxCw(uint32_t maxCw) [member function] cls.add_method('SetMaxCw', 'void', [param('uint32_t', 'maxCw')], is_virtual=True) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetAifsn(uint32_t aifsn) [member function] cls.add_method('SetAifsn', 'void', [param('uint32_t', 'aifsn')], is_virtual=True) ## edca-txop-n.h (module 'wifi'): uint32_t ns3::EdcaTxopN::GetMinCw() const [member function] cls.add_method('GetMinCw', 'uint32_t', [], is_const=True, is_virtual=True) ## edca-txop-n.h (module 'wifi'): uint32_t ns3::EdcaTxopN::GetMaxCw() const [member function] cls.add_method('GetMaxCw', 'uint32_t', [], is_const=True, is_virtual=True) ## edca-txop-n.h (module 'wifi'): uint32_t ns3::EdcaTxopN::GetAifsn() const [member function] cls.add_method('GetAifsn', 'uint32_t', [], is_const=True, is_virtual=True) ## edca-txop-n.h (module 'wifi'): ns3::Ptr<ns3::MacLow> ns3::EdcaTxopN::Low() [member function] cls.add_method('Low', 'ns3::Ptr< ns3::MacLow >', []) ## edca-txop-n.h (module 'wifi'): ns3::Ptr<ns3::MsduAggregator> ns3::EdcaTxopN::GetMsduAggregator() const [member function] cls.add_method('GetMsduAggregator', 'ns3::Ptr< ns3::MsduAggregator >', [], is_const=True) ## edca-txop-n.h (module 'wifi'): bool ns3::EdcaTxopN::NeedsAccess() const [member function] cls.add_method('NeedsAccess', 'bool', [], is_const=True) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::NotifyAccessGranted() [member function] cls.add_method('NotifyAccessGranted', 'void', []) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::NotifyInternalCollision() [member function] cls.add_method('NotifyInternalCollision', 'void', []) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::NotifyCollision() [member function] cls.add_method('NotifyCollision', 'void', []) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::NotifyChannelSwitching() [member function] cls.add_method('NotifyChannelSwitching', 'void', []) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::GotCts(double snr, ns3::WifiMode txMode) [member function] cls.add_method('GotCts', 'void', [param('double', 'snr'), param('ns3::WifiMode', 'txMode')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::MissedCts() [member function] cls.add_method('MissedCts', 'void', []) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::GotAck(double snr, ns3::WifiMode txMode) [member function] cls.add_method('GotAck', 'void', [param('double', 'snr'), param('ns3::WifiMode', 'txMode')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::GotBlockAck(ns3::CtrlBAckResponseHeader const * blockAck, ns3::Mac48Address recipient) [member function] cls.add_method('GotBlockAck', 'void', [param('ns3::CtrlBAckResponseHeader const *', 'blockAck'), param('ns3::Mac48Address', 'recipient')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::MissedBlockAck() [member function] cls.add_method('MissedBlockAck', 'void', []) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::GotAddBaResponse(ns3::MgtAddBaResponseHeader const * respHdr, ns3::Mac48Address recipient) [member function] cls.add_method('GotAddBaResponse', 'void', [param('ns3::MgtAddBaResponseHeader const *', 'respHdr'), param('ns3::Mac48Address', 'recipient')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::GotDelBaFrame(ns3::MgtDelBaHeader const * delBaHdr, ns3::Mac48Address recipient) [member function] cls.add_method('GotDelBaFrame', 'void', [param('ns3::MgtDelBaHeader const *', 'delBaHdr'), param('ns3::Mac48Address', 'recipient')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::MissedAck() [member function] cls.add_method('MissedAck', 'void', []) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::StartNext() [member function] cls.add_method('StartNext', 'void', []) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::Cancel() [member function] cls.add_method('Cancel', 'void', []) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::EndTxNoAck() [member function] cls.add_method('EndTxNoAck', 'void', []) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::RestartAccessIfNeeded() [member function] cls.add_method('RestartAccessIfNeeded', 'void', []) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::StartAccessIfNeeded() [member function] cls.add_method('StartAccessIfNeeded', 'void', []) ## edca-txop-n.h (module 'wifi'): bool ns3::EdcaTxopN::NeedRts() [member function] cls.add_method('NeedRts', 'bool', []) ## edca-txop-n.h (module 'wifi'): bool ns3::EdcaTxopN::NeedRtsRetransmission() [member function] cls.add_method('NeedRtsRetransmission', 'bool', []) ## edca-txop-n.h (module 'wifi'): bool ns3::EdcaTxopN::NeedDataRetransmission() [member function] cls.add_method('NeedDataRetransmission', 'bool', []) ## edca-txop-n.h (module 'wifi'): bool ns3::EdcaTxopN::NeedFragmentation() const [member function] cls.add_method('NeedFragmentation', 'bool', [], is_const=True) ## edca-txop-n.h (module 'wifi'): uint32_t ns3::EdcaTxopN::GetNextFragmentSize() [member function] cls.add_method('GetNextFragmentSize', 'uint32_t', []) ## edca-txop-n.h (module 'wifi'): uint32_t ns3::EdcaTxopN::GetFragmentSize() [member function] cls.add_method('GetFragmentSize', 'uint32_t', []) ## edca-txop-n.h (module 'wifi'): uint32_t ns3::EdcaTxopN::GetFragmentOffset() [member function] cls.add_method('GetFragmentOffset', 'uint32_t', []) ## edca-txop-n.h (module 'wifi'): bool ns3::EdcaTxopN::IsLastFragment() const [member function] cls.add_method('IsLastFragment', 'bool', [], is_const=True) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::NextFragment() [member function] cls.add_method('NextFragment', 'void', []) ## edca-txop-n.h (module 'wifi'): ns3::Ptr<ns3::Packet> ns3::EdcaTxopN::GetFragmentPacket(ns3::WifiMacHeader * hdr) [member function] cls.add_method('GetFragmentPacket', 'ns3::Ptr< ns3::Packet >', [param('ns3::WifiMacHeader *', 'hdr')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetAccessCategory(ns3::AcIndex ac) [member function] cls.add_method('SetAccessCategory', 'void', [param('ns3::AcIndex', 'ac')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::Queue(ns3::Ptr<ns3::Packet const> packet, ns3::WifiMacHeader const & hdr) [member function] cls.add_method('Queue', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const &', 'hdr')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetMsduAggregator(ns3::Ptr<ns3::MsduAggregator> aggr) [member function] cls.add_method('SetMsduAggregator', 'void', [param('ns3::Ptr< ns3::MsduAggregator >', 'aggr')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::PushFront(ns3::Ptr<ns3::Packet const> packet, ns3::WifiMacHeader const & hdr) [member function] cls.add_method('PushFront', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const &', 'hdr')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::CompleteConfig() [member function] cls.add_method('CompleteConfig', 'void', []) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetBlockAckThreshold(uint8_t threshold) [member function] cls.add_method('SetBlockAckThreshold', 'void', [param('uint8_t', 'threshold')]) ## edca-txop-n.h (module 'wifi'): uint8_t ns3::EdcaTxopN::GetBlockAckThreshold() const [member function] cls.add_method('GetBlockAckThreshold', 'uint8_t', [], is_const=True) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SetBlockAckInactivityTimeout(uint16_t timeout) [member function] cls.add_method('SetBlockAckInactivityTimeout', 'void', [param('uint16_t', 'timeout')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::SendDelbaFrame(ns3::Mac48Address addr, uint8_t tid, bool byOriginator) [member function] cls.add_method('SendDelbaFrame', 'void', [param('ns3::Mac48Address', 'addr'), param('uint8_t', 'tid'), param('bool', 'byOriginator')]) ## edca-txop-n.h (module 'wifi'): int64_t ns3::EdcaTxopN::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')]) ## edca-txop-n.h (module 'wifi'): void ns3::EdcaTxopN::DoInitialize() [member function] cls.add_method('DoInitialize', 'void', [], visibility='private', is_virtual=True) return def register_Ns3EmpiricalRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): ns3::EmpiricalRandomVariable::EmpiricalRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::CDF(double v, double c) [member function] cls.add_method('CDF', 'void', [param('double', 'v'), param('double', 'c')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::EmpiricalRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::EmpiricalRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function] cls.add_method('Interpolate', 'double', [param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')], visibility='private', is_virtual=True) ## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function] cls.add_method('Validate', 'void', [], visibility='private', is_virtual=True) return def register_Ns3EmptyAttributeValue_methods(root_module, cls): ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue(ns3::EmptyAttributeValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::EmptyAttributeValue const &', 'arg0')]) ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue() [constructor] cls.add_constructor([]) ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::EmptyAttributeValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, visibility='private', is_virtual=True) ## attribute.h (module 'core'): bool ns3::EmptyAttributeValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], visibility='private', is_virtual=True) ## attribute.h (module 'core'): std::string ns3::EmptyAttributeValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, visibility='private', is_virtual=True) return def register_Ns3ErlangRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ErlangRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ErlangRandomVariable::ErlangRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ErlangRandomVariable::GetK() const [member function] cls.add_method('GetK', 'uint32_t', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ErlangRandomVariable::GetLambda() const [member function] cls.add_method('GetLambda', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ErlangRandomVariable::GetValue(uint32_t k, double lambda) [member function] cls.add_method('GetValue', 'double', [param('uint32_t', 'k'), param('double', 'lambda')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ErlangRandomVariable::GetInteger(uint32_t k, uint32_t lambda) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'k'), param('uint32_t', 'lambda')]) ## random-variable-stream.h (module 'core'): double ns3::ErlangRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ErlangRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3ErrorRateModel_methods(root_module, cls): ## error-rate-model.h (module 'wifi'): ns3::ErrorRateModel::ErrorRateModel() [constructor] cls.add_constructor([]) ## error-rate-model.h (module 'wifi'): ns3::ErrorRateModel::ErrorRateModel(ns3::ErrorRateModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::ErrorRateModel const &', 'arg0')]) ## error-rate-model.h (module 'wifi'): double ns3::ErrorRateModel::CalculateSnr(ns3::WifiMode txMode, double ber) const [member function] cls.add_method('CalculateSnr', 'double', [param('ns3::WifiMode', 'txMode'), param('double', 'ber')], is_const=True) ## error-rate-model.h (module 'wifi'): double ns3::ErrorRateModel::GetChunkSuccessRate(ns3::WifiMode mode, double snr, uint32_t nbits) const [member function] cls.add_method('GetChunkSuccessRate', 'double', [param('ns3::WifiMode', 'mode'), param('double', 'snr'), param('uint32_t', 'nbits')], is_pure_virtual=True, is_const=True, is_virtual=True) ## error-rate-model.h (module 'wifi'): static ns3::TypeId ns3::ErrorRateModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3EventImpl_methods(root_module, cls): ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl(ns3::EventImpl const & arg0) [copy constructor] cls.add_constructor([param('ns3::EventImpl const &', 'arg0')]) ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl() [constructor] cls.add_constructor([]) ## event-impl.h (module 'core'): void ns3::EventImpl::Cancel() [member function] cls.add_method('Cancel', 'void', []) ## event-impl.h (module 'core'): void ns3::EventImpl::Invoke() [member function] cls.add_method('Invoke', 'void', []) ## event-impl.h (module 'core'): bool ns3::EventImpl::IsCancelled() [member function] cls.add_method('IsCancelled', 'bool', []) ## event-impl.h (module 'core'): void ns3::EventImpl::Notify() [member function] cls.add_method('Notify', 'void', [], is_pure_virtual=True, visibility='protected', is_virtual=True) return def register_Ns3ExponentialRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ExponentialRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ExponentialRandomVariable::ExponentialRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::ExponentialRandomVariable::GetMean() const [member function] cls.add_method('GetMean', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ExponentialRandomVariable::GetBound() const [member function] cls.add_method('GetBound', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ExponentialRandomVariable::GetValue(double mean, double bound) [member function] cls.add_method('GetValue', 'double', [param('double', 'mean'), param('double', 'bound')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ExponentialRandomVariable::GetInteger(uint32_t mean, uint32_t bound) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mean'), param('uint32_t', 'bound')]) ## random-variable-stream.h (module 'core'): double ns3::ExponentialRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ExponentialRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3ExtendedSupportedRatesIE_methods(root_module, cls): ## supported-rates.h (module 'wifi'): ns3::ExtendedSupportedRatesIE::ExtendedSupportedRatesIE(ns3::ExtendedSupportedRatesIE const & arg0) [copy constructor] cls.add_constructor([param('ns3::ExtendedSupportedRatesIE const &', 'arg0')]) ## supported-rates.h (module 'wifi'): ns3::ExtendedSupportedRatesIE::ExtendedSupportedRatesIE() [constructor] cls.add_constructor([]) ## supported-rates.h (module 'wifi'): ns3::ExtendedSupportedRatesIE::ExtendedSupportedRatesIE(ns3::SupportedRates * rates) [constructor] cls.add_constructor([param('ns3::SupportedRates *', 'rates')]) ## supported-rates.h (module 'wifi'): uint8_t ns3::ExtendedSupportedRatesIE::DeserializeInformationField(ns3::Buffer::Iterator start, uint8_t length) [member function] cls.add_method('DeserializeInformationField', 'uint8_t', [param('ns3::Buffer::Iterator', 'start'), param('uint8_t', 'length')], is_virtual=True) ## supported-rates.h (module 'wifi'): ns3::WifiInformationElementId ns3::ExtendedSupportedRatesIE::ElementId() const [member function] cls.add_method('ElementId', 'ns3::WifiInformationElementId', [], is_const=True, is_virtual=True) ## supported-rates.h (module 'wifi'): uint8_t ns3::ExtendedSupportedRatesIE::GetInformationFieldSize() const [member function] cls.add_method('GetInformationFieldSize', 'uint8_t', [], is_const=True, is_virtual=True) ## supported-rates.h (module 'wifi'): uint16_t ns3::ExtendedSupportedRatesIE::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint16_t', [], is_const=True) ## supported-rates.h (module 'wifi'): ns3::Buffer::Iterator ns3::ExtendedSupportedRatesIE::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True) ## supported-rates.h (module 'wifi'): void ns3::ExtendedSupportedRatesIE::SerializeInformationField(ns3::Buffer::Iterator start) const [member function] cls.add_method('SerializeInformationField', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) return def register_Ns3FixedRssLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::FixedRssLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::FixedRssLossModel::FixedRssLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): void ns3::FixedRssLossModel::SetRss(double rss) [member function] cls.add_method('SetRss', 'void', [param('double', 'rss')]) ## propagation-loss-model.h (module 'propagation'): double ns3::FixedRssLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::FixedRssLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3FriisPropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::FriisPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::FriisPropagationLossModel::FriisPropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function] cls.add_method('SetFrequency', 'void', [param('double', 'frequency')]) ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetSystemLoss(double systemLoss) [member function] cls.add_method('SetSystemLoss', 'void', [param('double', 'systemLoss')]) ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetMinLoss(double minLoss) [member function] cls.add_method('SetMinLoss', 'void', [param('double', 'minLoss')]) ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetMinLoss() const [member function] cls.add_method('GetMinLoss', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetFrequency() const [member function] cls.add_method('GetFrequency', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetSystemLoss() const [member function] cls.add_method('GetSystemLoss', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::FriisPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3GammaRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::GammaRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::GammaRandomVariable::GammaRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::GammaRandomVariable::GetAlpha() const [member function] cls.add_method('GetAlpha', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::GammaRandomVariable::GetBeta() const [member function] cls.add_method('GetBeta', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::GammaRandomVariable::GetValue(double alpha, double beta) [member function] cls.add_method('GetValue', 'double', [param('double', 'alpha'), param('double', 'beta')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::GammaRandomVariable::GetInteger(uint32_t alpha, uint32_t beta) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'alpha'), param('uint32_t', 'beta')]) ## random-variable-stream.h (module 'core'): double ns3::GammaRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::GammaRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3HtCapabilities_methods(root_module, cls): cls.add_output_stream_operator() ## ht-capabilities.h (module 'wifi'): ns3::HtCapabilities::HtCapabilities(ns3::HtCapabilities const & arg0) [copy constructor] cls.add_constructor([param('ns3::HtCapabilities const &', 'arg0')]) ## ht-capabilities.h (module 'wifi'): ns3::HtCapabilities::HtCapabilities() [constructor] cls.add_constructor([]) ## ht-capabilities.h (module 'wifi'): uint8_t ns3::HtCapabilities::DeserializeInformationField(ns3::Buffer::Iterator start, uint8_t length) [member function] cls.add_method('DeserializeInformationField', 'uint8_t', [param('ns3::Buffer::Iterator', 'start'), param('uint8_t', 'length')], is_virtual=True) ## ht-capabilities.h (module 'wifi'): ns3::WifiInformationElementId ns3::HtCapabilities::ElementId() const [member function] cls.add_method('ElementId', 'ns3::WifiInformationElementId', [], is_const=True, is_virtual=True) ## ht-capabilities.h (module 'wifi'): uint8_t ns3::HtCapabilities::GetAmpduParameters() const [member function] cls.add_method('GetAmpduParameters', 'uint8_t', [], is_const=True) ## ht-capabilities.h (module 'wifi'): uint8_t ns3::HtCapabilities::GetGreenfield() const [member function] cls.add_method('GetGreenfield', 'uint8_t', [], is_const=True) ## ht-capabilities.h (module 'wifi'): uint16_t ns3::HtCapabilities::GetHtCapabilitiesInfo() const [member function] cls.add_method('GetHtCapabilitiesInfo', 'uint16_t', [], is_const=True) ## ht-capabilities.h (module 'wifi'): uint8_t ns3::HtCapabilities::GetInformationFieldSize() const [member function] cls.add_method('GetInformationFieldSize', 'uint8_t', [], is_const=True, is_virtual=True) ## ht-capabilities.h (module 'wifi'): uint8_t ns3::HtCapabilities::GetLdpc() const [member function] cls.add_method('GetLdpc', 'uint8_t', [], is_const=True) ## ht-capabilities.h (module 'wifi'): uint8_t * ns3::HtCapabilities::GetRxMcsBitmask() [member function] cls.add_method('GetRxMcsBitmask', 'uint8_t *', []) ## ht-capabilities.h (module 'wifi'): uint16_t ns3::HtCapabilities::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint16_t', [], is_const=True) ## ht-capabilities.h (module 'wifi'): uint8_t ns3::HtCapabilities::GetShortGuardInterval20() const [member function] cls.add_method('GetShortGuardInterval20', 'uint8_t', [], is_const=True) ## ht-capabilities.h (module 'wifi'): uint8_t ns3::HtCapabilities::GetSupportedChannelWidth() const [member function] cls.add_method('GetSupportedChannelWidth', 'uint8_t', [], is_const=True) ## ht-capabilities.h (module 'wifi'): uint64_t ns3::HtCapabilities::GetSupportedMcsSet1() const [member function] cls.add_method('GetSupportedMcsSet1', 'uint64_t', [], is_const=True) ## ht-capabilities.h (module 'wifi'): uint64_t ns3::HtCapabilities::GetSupportedMcsSet2() const [member function] cls.add_method('GetSupportedMcsSet2', 'uint64_t', [], is_const=True) ## ht-capabilities.h (module 'wifi'): bool ns3::HtCapabilities::IsSupportedMcs(uint8_t mcs) [member function] cls.add_method('IsSupportedMcs', 'bool', [param('uint8_t', 'mcs')]) ## ht-capabilities.h (module 'wifi'): ns3::Buffer::Iterator ns3::HtCapabilities::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True) ## ht-capabilities.h (module 'wifi'): void ns3::HtCapabilities::SerializeInformationField(ns3::Buffer::Iterator start) const [member function] cls.add_method('SerializeInformationField', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## ht-capabilities.h (module 'wifi'): void ns3::HtCapabilities::SetAmpduParameters(uint8_t ctrl) [member function] cls.add_method('SetAmpduParameters', 'void', [param('uint8_t', 'ctrl')]) ## ht-capabilities.h (module 'wifi'): void ns3::HtCapabilities::SetGreenfield(uint8_t greenfield) [member function] cls.add_method('SetGreenfield', 'void', [param('uint8_t', 'greenfield')]) ## ht-capabilities.h (module 'wifi'): void ns3::HtCapabilities::SetHtCapabilitiesInfo(uint16_t ctrl) [member function] cls.add_method('SetHtCapabilitiesInfo', 'void', [param('uint16_t', 'ctrl')]) ## ht-capabilities.h (module 'wifi'): void ns3::HtCapabilities::SetHtSupported(uint8_t htsupported) [member function] cls.add_method('SetHtSupported', 'void', [param('uint8_t', 'htsupported')]) ## ht-capabilities.h (module 'wifi'): void ns3::HtCapabilities::SetLdpc(uint8_t ldpc) [member function] cls.add_method('SetLdpc', 'void', [param('uint8_t', 'ldpc')]) ## ht-capabilities.h (module 'wifi'): void ns3::HtCapabilities::SetRxMcsBitmask(uint8_t index) [member function] cls.add_method('SetRxMcsBitmask', 'void', [param('uint8_t', 'index')]) ## ht-capabilities.h (module 'wifi'): void ns3::HtCapabilities::SetShortGuardInterval20(uint8_t shortguardinterval) [member function] cls.add_method('SetShortGuardInterval20', 'void', [param('uint8_t', 'shortguardinterval')]) ## ht-capabilities.h (module 'wifi'): void ns3::HtCapabilities::SetSupportedChannelWidth(uint8_t supportedchannelwidth) [member function] cls.add_method('SetSupportedChannelWidth', 'void', [param('uint8_t', 'supportedchannelwidth')]) ## ht-capabilities.h (module 'wifi'): void ns3::HtCapabilities::SetSupportedMcsSet(uint64_t ctrl1, uint64_t ctrl2) [member function] cls.add_method('SetSupportedMcsSet', 'void', [param('uint64_t', 'ctrl1'), param('uint64_t', 'ctrl2')]) return def register_Ns3HtCapabilitiesChecker_methods(root_module, cls): ## ht-capabilities.h (module 'wifi'): ns3::HtCapabilitiesChecker::HtCapabilitiesChecker() [constructor] cls.add_constructor([]) ## ht-capabilities.h (module 'wifi'): ns3::HtCapabilitiesChecker::HtCapabilitiesChecker(ns3::HtCapabilitiesChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::HtCapabilitiesChecker const &', 'arg0')]) return def register_Ns3HtCapabilitiesValue_methods(root_module, cls): ## ht-capabilities.h (module 'wifi'): ns3::HtCapabilitiesValue::HtCapabilitiesValue() [constructor] cls.add_constructor([]) ## ht-capabilities.h (module 'wifi'): ns3::HtCapabilitiesValue::HtCapabilitiesValue(ns3::HtCapabilitiesValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::HtCapabilitiesValue const &', 'arg0')]) ## ht-capabilities.h (module 'wifi'): ns3::HtCapabilitiesValue::HtCapabilitiesValue(ns3::HtCapabilities const & value) [constructor] cls.add_constructor([param('ns3::HtCapabilities const &', 'value')]) ## ht-capabilities.h (module 'wifi'): ns3::Ptr<ns3::AttributeValue> ns3::HtCapabilitiesValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## ht-capabilities.h (module 'wifi'): bool ns3::HtCapabilitiesValue::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) ## ht-capabilities.h (module 'wifi'): ns3::HtCapabilities ns3::HtCapabilitiesValue::Get() const [member function] cls.add_method('Get', 'ns3::HtCapabilities', [], is_const=True) ## ht-capabilities.h (module 'wifi'): std::string ns3::HtCapabilitiesValue::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) ## ht-capabilities.h (module 'wifi'): void ns3::HtCapabilitiesValue::Set(ns3::HtCapabilities const & value) [member function] cls.add_method('Set', 'void', [param('ns3::HtCapabilities const &', 'value')]) return def register_Ns3HtWifiMacHelper_methods(root_module, cls): ## ht-wifi-mac-helper.h (module 'wifi'): ns3::HtWifiMacHelper::HtWifiMacHelper(ns3::HtWifiMacHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::HtWifiMacHelper const &', 'arg0')]) ## ht-wifi-mac-helper.h (module 'wifi'): ns3::HtWifiMacHelper::HtWifiMacHelper() [constructor] cls.add_constructor([]) ## ht-wifi-mac-helper.h (module 'wifi'): static ns3::HtWifiMacHelper ns3::HtWifiMacHelper::Default() [member function] cls.add_method('Default', 'ns3::HtWifiMacHelper', [], is_static=True) return def register_Ns3IdealWifiManager_methods(root_module, cls): ## ideal-wifi-manager.h (module 'wifi'): ns3::IdealWifiManager::IdealWifiManager(ns3::IdealWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::IdealWifiManager const &', 'arg0')]) ## ideal-wifi-manager.h (module 'wifi'): ns3::IdealWifiManager::IdealWifiManager() [constructor] cls.add_constructor([]) ## ideal-wifi-manager.h (module 'wifi'): static ns3::TypeId ns3::IdealWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## ideal-wifi-manager.h (module 'wifi'): void ns3::IdealWifiManager::SetupPhy(ns3::Ptr<ns3::WifiPhy> phy) [member function] cls.add_method('SetupPhy', 'void', [param('ns3::Ptr< ns3::WifiPhy >', 'phy')], is_virtual=True) ## ideal-wifi-manager.h (module 'wifi'): ns3::WifiRemoteStation * ns3::IdealWifiManager::DoCreateStation() const [member function] cls.add_method('DoCreateStation', 'ns3::WifiRemoteStation *', [], is_const=True, visibility='private', is_virtual=True) ## ideal-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::IdealWifiManager::DoGetDataTxVector(ns3::WifiRemoteStation * station, uint32_t size) [member function] cls.add_method('DoGetDataTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station'), param('uint32_t', 'size')], visibility='private', is_virtual=True) ## ideal-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::IdealWifiManager::DoGetRtsTxVector(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoGetRtsTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## ideal-wifi-manager.h (module 'wifi'): void ns3::IdealWifiManager::DoReportDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## ideal-wifi-manager.h (module 'wifi'): void ns3::IdealWifiManager::DoReportDataOk(ns3::WifiRemoteStation * station, double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] cls.add_method('DoReportDataOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], visibility='private', is_virtual=True) ## ideal-wifi-manager.h (module 'wifi'): void ns3::IdealWifiManager::DoReportFinalDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## ideal-wifi-manager.h (module 'wifi'): void ns3::IdealWifiManager::DoReportFinalRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## ideal-wifi-manager.h (module 'wifi'): void ns3::IdealWifiManager::DoReportRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## ideal-wifi-manager.h (module 'wifi'): void ns3::IdealWifiManager::DoReportRtsOk(ns3::WifiRemoteStation * station, double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] cls.add_method('DoReportRtsOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='private', is_virtual=True) ## ideal-wifi-manager.h (module 'wifi'): void ns3::IdealWifiManager::DoReportRxOk(ns3::WifiRemoteStation * station, double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('DoReportRxOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='private', is_virtual=True) ## ideal-wifi-manager.h (module 'wifi'): bool ns3::IdealWifiManager::IsLowLatency() const [member function] cls.add_method('IsLowLatency', 'bool', [], is_const=True, visibility='private', is_virtual=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_Ns3ItuR1411LosPropagationLossModel_methods(root_module, cls): ## itu-r-1411-los-propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::ItuR1411LosPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## itu-r-1411-los-propagation-loss-model.h (module 'propagation'): ns3::ItuR1411LosPropagationLossModel::ItuR1411LosPropagationLossModel() [constructor] cls.add_constructor([]) ## itu-r-1411-los-propagation-loss-model.h (module 'propagation'): void ns3::ItuR1411LosPropagationLossModel::SetFrequency(double freq) [member function] cls.add_method('SetFrequency', 'void', [param('double', 'freq')]) ## itu-r-1411-los-propagation-loss-model.h (module 'propagation'): double ns3::ItuR1411LosPropagationLossModel::GetLoss(ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('GetLoss', 'double', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True) ## itu-r-1411-los-propagation-loss-model.h (module 'propagation'): double ns3::ItuR1411LosPropagationLossModel::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) ## itu-r-1411-los-propagation-loss-model.h (module 'propagation'): int64_t ns3::ItuR1411LosPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3ItuR1411NlosOverRooftopPropagationLossModel_methods(root_module, cls): ## itu-r-1411-nlos-over-rooftop-propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::ItuR1411NlosOverRooftopPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## itu-r-1411-nlos-over-rooftop-propagation-loss-model.h (module 'propagation'): ns3::ItuR1411NlosOverRooftopPropagationLossModel::ItuR1411NlosOverRooftopPropagationLossModel() [constructor] cls.add_constructor([]) ## itu-r-1411-nlos-over-rooftop-propagation-loss-model.h (module 'propagation'): void ns3::ItuR1411NlosOverRooftopPropagationLossModel::SetFrequency(double freq) [member function] cls.add_method('SetFrequency', 'void', [param('double', 'freq')]) ## itu-r-1411-nlos-over-rooftop-propagation-loss-model.h (module 'propagation'): double ns3::ItuR1411NlosOverRooftopPropagationLossModel::GetLoss(ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('GetLoss', 'double', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True) ## itu-r-1411-nlos-over-rooftop-propagation-loss-model.h (module 'propagation'): double ns3::ItuR1411NlosOverRooftopPropagationLossModel::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) ## itu-r-1411-nlos-over-rooftop-propagation-loss-model.h (module 'propagation'): int64_t ns3::ItuR1411NlosOverRooftopPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3JakesProcess_methods(root_module, cls): ## jakes-process.h (module 'propagation'): ns3::JakesProcess::JakesProcess(ns3::JakesProcess const & arg0) [copy constructor] cls.add_constructor([param('ns3::JakesProcess const &', 'arg0')]) ## jakes-process.h (module 'propagation'): ns3::JakesProcess::JakesProcess() [constructor] cls.add_constructor([]) ## jakes-process.h (module 'propagation'): void ns3::JakesProcess::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], is_virtual=True) ## jakes-process.h (module 'propagation'): double ns3::JakesProcess::GetChannelGainDb() const [member function] cls.add_method('GetChannelGainDb', 'double', [], is_const=True) ## jakes-process.h (module 'propagation'): std::complex<double> ns3::JakesProcess::GetComplexGain() const [member function] cls.add_method('GetComplexGain', 'std::complex< double >', [], is_const=True) ## jakes-process.h (module 'propagation'): static ns3::TypeId ns3::JakesProcess::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## jakes-process.h (module 'propagation'): void ns3::JakesProcess::SetPropagationLossModel(ns3::Ptr<const ns3::PropagationLossModel> model) [member function] cls.add_method('SetPropagationLossModel', 'void', [param('ns3::Ptr< ns3::PropagationLossModel const >', 'model')]) return def register_Ns3JakesPropagationLossModel_methods(root_module, cls): ## jakes-propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::JakesPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## jakes-propagation-loss-model.h (module 'propagation'): ns3::JakesPropagationLossModel::JakesPropagationLossModel() [constructor] cls.add_constructor([]) ## jakes-propagation-loss-model.h (module 'propagation'): double ns3::JakesPropagationLossModel::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) ## jakes-propagation-loss-model.h (module 'propagation'): int64_t ns3::JakesPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3Kun2600MhzPropagationLossModel_methods(root_module, cls): ## kun-2600-mhz-propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::Kun2600MhzPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## kun-2600-mhz-propagation-loss-model.h (module 'propagation'): ns3::Kun2600MhzPropagationLossModel::Kun2600MhzPropagationLossModel() [constructor] cls.add_constructor([]) ## kun-2600-mhz-propagation-loss-model.h (module 'propagation'): double ns3::Kun2600MhzPropagationLossModel::GetLoss(ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('GetLoss', 'double', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True) ## kun-2600-mhz-propagation-loss-model.h (module 'propagation'): double ns3::Kun2600MhzPropagationLossModel::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) ## kun-2600-mhz-propagation-loss-model.h (module 'propagation'): int64_t ns3::Kun2600MhzPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3LogDistancePropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::LogDistancePropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::LogDistancePropagationLossModel::LogDistancePropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): void ns3::LogDistancePropagationLossModel::SetPathLossExponent(double n) [member function] cls.add_method('SetPathLossExponent', 'void', [param('double', 'n')]) ## propagation-loss-model.h (module 'propagation'): double ns3::LogDistancePropagationLossModel::GetPathLossExponent() const [member function] cls.add_method('GetPathLossExponent', 'double', [], is_const=True) ## propagation-loss-model.h (module 'propagation'): void ns3::LogDistancePropagationLossModel::SetReference(double referenceDistance, double referenceLoss) [member function] cls.add_method('SetReference', 'void', [param('double', 'referenceDistance'), param('double', 'referenceLoss')]) ## propagation-loss-model.h (module 'propagation'): double ns3::LogDistancePropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::LogDistancePropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3LogNormalRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::LogNormalRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::LogNormalRandomVariable::LogNormalRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::LogNormalRandomVariable::GetMu() const [member function] cls.add_method('GetMu', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::LogNormalRandomVariable::GetSigma() const [member function] cls.add_method('GetSigma', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::LogNormalRandomVariable::GetValue(double mu, double sigma) [member function] cls.add_method('GetValue', 'double', [param('double', 'mu'), param('double', 'sigma')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::LogNormalRandomVariable::GetInteger(uint32_t mu, uint32_t sigma) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mu'), param('uint32_t', 'sigma')]) ## random-variable-stream.h (module 'core'): double ns3::LogNormalRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::LogNormalRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3Mac48AddressChecker_methods(root_module, cls): ## mac48-address.h (module 'network'): ns3::Mac48AddressChecker::Mac48AddressChecker() [constructor] cls.add_constructor([]) ## mac48-address.h (module 'network'): ns3::Mac48AddressChecker::Mac48AddressChecker(ns3::Mac48AddressChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Mac48AddressChecker const &', 'arg0')]) return def register_Ns3Mac48AddressValue_methods(root_module, cls): ## mac48-address.h (module 'network'): ns3::Mac48AddressValue::Mac48AddressValue() [constructor] cls.add_constructor([]) ## mac48-address.h (module 'network'): ns3::Mac48AddressValue::Mac48AddressValue(ns3::Mac48AddressValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Mac48AddressValue const &', 'arg0')]) ## mac48-address.h (module 'network'): ns3::Mac48AddressValue::Mac48AddressValue(ns3::Mac48Address const & value) [constructor] cls.add_constructor([param('ns3::Mac48Address const &', 'value')]) ## mac48-address.h (module 'network'): ns3::Ptr<ns3::AttributeValue> ns3::Mac48AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## mac48-address.h (module 'network'): bool ns3::Mac48AddressValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## mac48-address.h (module 'network'): ns3::Mac48Address ns3::Mac48AddressValue::Get() const [member function] cls.add_method('Get', 'ns3::Mac48Address', [], is_const=True) ## mac48-address.h (module 'network'): std::string ns3::Mac48AddressValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## mac48-address.h (module 'network'): void ns3::Mac48AddressValue::Set(ns3::Mac48Address const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Mac48Address const &', 'value')]) return def register_Ns3MacLow_methods(root_module, cls): ## mac-low.h (module 'wifi'): ns3::MacLow::MacLow(ns3::MacLow const & arg0) [copy constructor] cls.add_constructor([param('ns3::MacLow const &', 'arg0')]) ## mac-low.h (module 'wifi'): ns3::MacLow::MacLow() [constructor] cls.add_constructor([]) ## mac-low.h (module 'wifi'): ns3::Time ns3::MacLow::CalculateTransmissionTime(ns3::Ptr<ns3::Packet const> packet, ns3::WifiMacHeader const * hdr, ns3::MacLowTransmissionParameters const & parameters) const [member function] cls.add_method('CalculateTransmissionTime', 'ns3::Time', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr'), param('ns3::MacLowTransmissionParameters const &', 'parameters')], is_const=True) ## mac-low.h (module 'wifi'): void ns3::MacLow::CreateBlockAckAgreement(ns3::MgtAddBaResponseHeader const * respHdr, ns3::Mac48Address originator, uint16_t startingSeq) [member function] cls.add_method('CreateBlockAckAgreement', 'void', [param('ns3::MgtAddBaResponseHeader const *', 'respHdr'), param('ns3::Mac48Address', 'originator'), param('uint16_t', 'startingSeq')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::DestroyBlockAckAgreement(ns3::Mac48Address originator, uint8_t tid) [member function] cls.add_method('DestroyBlockAckAgreement', 'void', [param('ns3::Mac48Address', 'originator'), param('uint8_t', 'tid')]) ## mac-low.h (module 'wifi'): ns3::Time ns3::MacLow::GetAckTimeout() const [member function] cls.add_method('GetAckTimeout', 'ns3::Time', [], is_const=True) ## mac-low.h (module 'wifi'): ns3::Mac48Address ns3::MacLow::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Mac48Address', [], is_const=True) ## mac-low.h (module 'wifi'): ns3::Time ns3::MacLow::GetBasicBlockAckTimeout() const [member function] cls.add_method('GetBasicBlockAckTimeout', 'ns3::Time', [], is_const=True) ## mac-low.h (module 'wifi'): ns3::Mac48Address ns3::MacLow::GetBssid() const [member function] cls.add_method('GetBssid', 'ns3::Mac48Address', [], is_const=True) ## mac-low.h (module 'wifi'): ns3::Time ns3::MacLow::GetCompressedBlockAckTimeout() const [member function] cls.add_method('GetCompressedBlockAckTimeout', 'ns3::Time', [], is_const=True) ## mac-low.h (module 'wifi'): ns3::Time ns3::MacLow::GetCtsTimeout() const [member function] cls.add_method('GetCtsTimeout', 'ns3::Time', [], is_const=True) ## mac-low.h (module 'wifi'): bool ns3::MacLow::GetCtsToSelfSupported() const [member function] cls.add_method('GetCtsToSelfSupported', 'bool', [], is_const=True) ## mac-low.h (module 'wifi'): ns3::Time ns3::MacLow::GetPifs() const [member function] cls.add_method('GetPifs', 'ns3::Time', [], is_const=True) ## mac-low.h (module 'wifi'): ns3::Time ns3::MacLow::GetRifs() const [member function] cls.add_method('GetRifs', 'ns3::Time', [], is_const=True) ## mac-low.h (module 'wifi'): ns3::Time ns3::MacLow::GetSifs() const [member function] cls.add_method('GetSifs', 'ns3::Time', [], is_const=True) ## mac-low.h (module 'wifi'): ns3::Time ns3::MacLow::GetSlotTime() const [member function] cls.add_method('GetSlotTime', 'ns3::Time', [], is_const=True) ## mac-low.h (module 'wifi'): bool ns3::MacLow::IsPromisc() const [member function] cls.add_method('IsPromisc', 'bool', [], is_const=True) ## mac-low.h (module 'wifi'): void ns3::MacLow::NotifySleepNow() [member function] cls.add_method('NotifySleepNow', 'void', []) ## mac-low.h (module 'wifi'): void ns3::MacLow::NotifySwitchingStartNow(ns3::Time duration) [member function] cls.add_method('NotifySwitchingStartNow', 'void', [param('ns3::Time', 'duration')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::ReceiveError(ns3::Ptr<ns3::Packet const> packet, double rxSnr) [member function] cls.add_method('ReceiveError', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('double', 'rxSnr')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::ReceiveOk(ns3::Ptr<ns3::Packet> packet, double rxSnr, ns3::WifiMode txMode, ns3::WifiPreamble preamble) [member function] cls.add_method('ReceiveOk', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode'), param('ns3::WifiPreamble', 'preamble')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterBlockAckListenerForAc(ns3::AcIndex ac, ns3::MacLowBlockAckEventListener * listener) [member function] cls.add_method('RegisterBlockAckListenerForAc', 'void', [param('ns3::AcIndex', 'ac'), param('ns3::MacLowBlockAckEventListener *', 'listener')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterDcfListener(ns3::MacLowDcfListener * listener) [member function] cls.add_method('RegisterDcfListener', 'void', [param('ns3::MacLowDcfListener *', 'listener')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetAckTimeout(ns3::Time ackTimeout) [member function] cls.add_method('SetAckTimeout', 'void', [param('ns3::Time', 'ackTimeout')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetAddress(ns3::Mac48Address ad) [member function] cls.add_method('SetAddress', 'void', [param('ns3::Mac48Address', 'ad')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetBasicBlockAckTimeout(ns3::Time blockAckTimeout) [member function] cls.add_method('SetBasicBlockAckTimeout', 'void', [param('ns3::Time', 'blockAckTimeout')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetBssid(ns3::Mac48Address ad) [member function] cls.add_method('SetBssid', 'void', [param('ns3::Mac48Address', 'ad')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetCompressedBlockAckTimeout(ns3::Time blockAckTimeout) [member function] cls.add_method('SetCompressedBlockAckTimeout', 'void', [param('ns3::Time', 'blockAckTimeout')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetCtsTimeout(ns3::Time ctsTimeout) [member function] cls.add_method('SetCtsTimeout', 'void', [param('ns3::Time', 'ctsTimeout')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetCtsToSelfSupported(bool enable) [member function] cls.add_method('SetCtsToSelfSupported', 'void', [param('bool', 'enable')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetPhy(ns3::Ptr<ns3::WifiPhy> phy) [member function] cls.add_method('SetPhy', 'void', [param('ns3::Ptr< ns3::WifiPhy >', 'phy')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetPifs(ns3::Time pifs) [member function] cls.add_method('SetPifs', 'void', [param('ns3::Time', 'pifs')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetPromisc() [member function] cls.add_method('SetPromisc', 'void', []) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetRifs(ns3::Time rifs) [member function] cls.add_method('SetRifs', 'void', [param('ns3::Time', 'rifs')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetRxCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet>, ns3::WifiMacHeader const*, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetRxCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::WifiMacHeader const *, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetSifs(ns3::Time sifs) [member function] cls.add_method('SetSifs', 'void', [param('ns3::Time', 'sifs')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetSlotTime(ns3::Time slotTime) [member function] cls.add_method('SetSlotTime', 'void', [param('ns3::Time', 'slotTime')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::SetWifiRemoteStationManager(ns3::Ptr<ns3::WifiRemoteStationManager> manager) [member function] cls.add_method('SetWifiRemoteStationManager', 'void', [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'manager')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::StartTransmission(ns3::Ptr<ns3::Packet const> packet, ns3::WifiMacHeader const * hdr, ns3::MacLowTransmissionParameters parameters, ns3::MacLowTransmissionListener * listener) [member function] cls.add_method('StartTransmission', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr'), param('ns3::MacLowTransmissionParameters', 'parameters'), param('ns3::MacLowTransmissionListener *', 'listener')]) ## mac-low.h (module 'wifi'): ns3::WifiTxVector ns3::MacLow::GetDataTxVector(ns3::Ptr<ns3::Packet const> packet, ns3::WifiMacHeader const * hdr) const [member function] cls.add_method('GetDataTxVector', 'ns3::WifiTxVector', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr')], is_const=True, visibility='protected', is_virtual=True) ## mac-low.h (module 'wifi'): void ns3::MacLow::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) return def register_Ns3MatrixPropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::MatrixPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::MatrixPropagationLossModel::MatrixPropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): void ns3::MatrixPropagationLossModel::SetLoss(ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b, double loss, bool symmetric=true) [member function] cls.add_method('SetLoss', 'void', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b'), param('double', 'loss'), param('bool', 'symmetric', default_value='true')]) ## propagation-loss-model.h (module 'propagation'): void ns3::MatrixPropagationLossModel::SetDefaultLoss(double defaultLoss) [member function] cls.add_method('SetDefaultLoss', 'void', [param('double', 'defaultLoss')]) ## propagation-loss-model.h (module 'propagation'): double ns3::MatrixPropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::MatrixPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3MgtBeaconHeader_methods(root_module, cls): ## mgt-headers.h (module 'wifi'): ns3::MgtBeaconHeader::MgtBeaconHeader() [constructor] cls.add_constructor([]) ## mgt-headers.h (module 'wifi'): ns3::MgtBeaconHeader::MgtBeaconHeader(ns3::MgtBeaconHeader const & arg0) [copy constructor] cls.add_constructor([param('ns3::MgtBeaconHeader const &', 'arg0')]) return def register_Ns3MinstrelWifiManager_methods(root_module, cls): ## minstrel-wifi-manager.h (module 'wifi'): ns3::MinstrelWifiManager::MinstrelWifiManager(ns3::MinstrelWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::MinstrelWifiManager const &', 'arg0')]) ## minstrel-wifi-manager.h (module 'wifi'): ns3::MinstrelWifiManager::MinstrelWifiManager() [constructor] cls.add_constructor([]) ## minstrel-wifi-manager.h (module 'wifi'): int64_t ns3::MinstrelWifiManager::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')]) ## minstrel-wifi-manager.h (module 'wifi'): static ns3::TypeId ns3::MinstrelWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## minstrel-wifi-manager.h (module 'wifi'): void ns3::MinstrelWifiManager::SetupPhy(ns3::Ptr<ns3::WifiPhy> phy) [member function] cls.add_method('SetupPhy', 'void', [param('ns3::Ptr< ns3::WifiPhy >', 'phy')], is_virtual=True) ## minstrel-wifi-manager.h (module 'wifi'): ns3::WifiRemoteStation * ns3::MinstrelWifiManager::DoCreateStation() const [member function] cls.add_method('DoCreateStation', 'ns3::WifiRemoteStation *', [], is_const=True, visibility='private', is_virtual=True) ## minstrel-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::MinstrelWifiManager::DoGetDataTxVector(ns3::WifiRemoteStation * station, uint32_t size) [member function] cls.add_method('DoGetDataTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station'), param('uint32_t', 'size')], visibility='private', is_virtual=True) ## minstrel-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::MinstrelWifiManager::DoGetRtsTxVector(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoGetRtsTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## minstrel-wifi-manager.h (module 'wifi'): void ns3::MinstrelWifiManager::DoReportDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## minstrel-wifi-manager.h (module 'wifi'): void ns3::MinstrelWifiManager::DoReportDataOk(ns3::WifiRemoteStation * station, double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] cls.add_method('DoReportDataOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], visibility='private', is_virtual=True) ## minstrel-wifi-manager.h (module 'wifi'): void ns3::MinstrelWifiManager::DoReportFinalDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## minstrel-wifi-manager.h (module 'wifi'): void ns3::MinstrelWifiManager::DoReportFinalRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## minstrel-wifi-manager.h (module 'wifi'): void ns3::MinstrelWifiManager::DoReportRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## minstrel-wifi-manager.h (module 'wifi'): void ns3::MinstrelWifiManager::DoReportRtsOk(ns3::WifiRemoteStation * station, double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] cls.add_method('DoReportRtsOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='private', is_virtual=True) ## minstrel-wifi-manager.h (module 'wifi'): void ns3::MinstrelWifiManager::DoReportRxOk(ns3::WifiRemoteStation * station, double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('DoReportRxOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='private', is_virtual=True) ## minstrel-wifi-manager.h (module 'wifi'): bool ns3::MinstrelWifiManager::IsLowLatency() const [member function] cls.add_method('IsLowLatency', 'bool', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3MobilityModel_methods(root_module, cls): ## mobility-model.h (module 'mobility'): ns3::MobilityModel::MobilityModel(ns3::MobilityModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::MobilityModel const &', 'arg0')]) ## mobility-model.h (module 'mobility'): ns3::MobilityModel::MobilityModel() [constructor] cls.add_constructor([]) ## mobility-model.h (module 'mobility'): int64_t ns3::MobilityModel::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')]) ## mobility-model.h (module 'mobility'): double ns3::MobilityModel::GetDistanceFrom(ns3::Ptr<ns3::MobilityModel const> position) const [member function] cls.add_method('GetDistanceFrom', 'double', [param('ns3::Ptr< ns3::MobilityModel const >', 'position')], is_const=True) ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::GetPosition() const [member function] cls.add_method('GetPosition', 'ns3::Vector', [], is_const=True) ## mobility-model.h (module 'mobility'): double ns3::MobilityModel::GetRelativeSpeed(ns3::Ptr<ns3::MobilityModel const> other) const [member function] cls.add_method('GetRelativeSpeed', 'double', [param('ns3::Ptr< ns3::MobilityModel const >', 'other')], is_const=True) ## mobility-model.h (module 'mobility'): static ns3::TypeId ns3::MobilityModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::GetVelocity() const [member function] cls.add_method('GetVelocity', 'ns3::Vector', [], is_const=True) ## mobility-model.h (module 'mobility'): void ns3::MobilityModel::SetPosition(ns3::Vector const & position) [member function] cls.add_method('SetPosition', 'void', [param('ns3::Vector const &', 'position')]) ## mobility-model.h (module 'mobility'): void ns3::MobilityModel::NotifyCourseChange() const [member function] cls.add_method('NotifyCourseChange', 'void', [], is_const=True, visibility='protected') ## mobility-model.h (module 'mobility'): int64_t ns3::MobilityModel::DoAssignStreams(int64_t start) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'start')], visibility='private', is_virtual=True) ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::DoGetPosition() const [member function] cls.add_method('DoGetPosition', 'ns3::Vector', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::DoGetVelocity() const [member function] cls.add_method('DoGetVelocity', 'ns3::Vector', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## mobility-model.h (module 'mobility'): void ns3::MobilityModel::DoSetPosition(ns3::Vector const & position) [member function] cls.add_method('DoSetPosition', 'void', [param('ns3::Vector const &', 'position')], is_pure_virtual=True, visibility='private', is_virtual=True) return def register_Ns3MsduAggregator_methods(root_module, cls): ## msdu-aggregator.h (module 'wifi'): ns3::MsduAggregator::MsduAggregator() [constructor] cls.add_constructor([]) ## msdu-aggregator.h (module 'wifi'): ns3::MsduAggregator::MsduAggregator(ns3::MsduAggregator const & arg0) [copy constructor] cls.add_constructor([param('ns3::MsduAggregator const &', 'arg0')]) ## msdu-aggregator.h (module 'wifi'): bool ns3::MsduAggregator::Aggregate(ns3::Ptr<ns3::Packet const> packet, ns3::Ptr<ns3::Packet> aggregatedPacket, ns3::Mac48Address src, ns3::Mac48Address dest) [member function] cls.add_method('Aggregate', 'bool', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket'), param('ns3::Mac48Address', 'src'), param('ns3::Mac48Address', 'dest')], is_pure_virtual=True, is_virtual=True) ## msdu-aggregator.h (module 'wifi'): static std::list<std::pair<ns3::Ptr<ns3::Packet>, ns3::AmsduSubframeHeader>, std::allocator<std::pair<ns3::Ptr<ns3::Packet>, ns3::AmsduSubframeHeader> > > ns3::MsduAggregator::Deaggregate(ns3::Ptr<ns3::Packet> aggregatedPacket) [member function] cls.add_method('Deaggregate', 'std::list< std::pair< ns3::Ptr< ns3::Packet >, ns3::AmsduSubframeHeader > >', [param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket')], is_static=True) ## msdu-aggregator.h (module 'wifi'): static ns3::TypeId ns3::MsduAggregator::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3NakagamiPropagationLossModel_methods(root_module, cls): ## propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::NakagamiPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::NakagamiPropagationLossModel::NakagamiPropagationLossModel() [constructor] cls.add_constructor([]) ## propagation-loss-model.h (module 'propagation'): double ns3::NakagamiPropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoCalcRxPower', 'double', [param('double', 'txPowerDbm'), param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) ## propagation-loss-model.h (module 'propagation'): int64_t ns3::NakagamiPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3NetDevice_methods(root_module, cls): ## net-device.h (module 'network'): ns3::NetDevice::NetDevice() [constructor] cls.add_constructor([]) ## net-device.h (module 'network'): ns3::NetDevice::NetDevice(ns3::NetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::NetDevice const &', 'arg0')]) ## net-device.h (module 'network'): void ns3::NetDevice::AddLinkChangeCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('AddLinkChangeCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Address ns3::NetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Address ns3::NetDevice::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Ptr<ns3::Channel> ns3::NetDevice::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::Channel >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): uint32_t ns3::NetDevice::GetIfIndex() const [member function] cls.add_method('GetIfIndex', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): uint16_t ns3::NetDevice::GetMtu() const [member function] cls.add_method('GetMtu', 'uint16_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Address ns3::NetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv4Address', 'multicastGroup')], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Address ns3::NetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv6Address', 'addr')], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Ptr<ns3::Node> ns3::NetDevice::GetNode() const [member function] cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): static ns3::TypeId ns3::NetDevice::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsBridge() const [member function] cls.add_method('IsBridge', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsBroadcast() const [member function] cls.add_method('IsBroadcast', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsLinkUp() const [member function] cls.add_method('IsLinkUp', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsMulticast() const [member function] cls.add_method('IsMulticast', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsPointToPoint() const [member function] cls.add_method('IsPointToPoint', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::NeedsArp() const [member function] cls.add_method('NeedsArp', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Send', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::SendFrom(ns3::Ptr<ns3::Packet> packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('SendFrom', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetAddress(ns3::Address address) [member function] cls.add_method('SetAddress', 'void', [param('ns3::Address', 'address')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetIfIndex(uint32_t const index) [member function] cls.add_method('SetIfIndex', 'void', [param('uint32_t const', 'index')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::SetMtu(uint16_t const mtu) [member function] cls.add_method('SetMtu', 'bool', [param('uint16_t const', 'mtu')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetPromiscReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3NistErrorRateModel_methods(root_module, cls): ## nist-error-rate-model.h (module 'wifi'): ns3::NistErrorRateModel::NistErrorRateModel(ns3::NistErrorRateModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::NistErrorRateModel const &', 'arg0')]) ## nist-error-rate-model.h (module 'wifi'): ns3::NistErrorRateModel::NistErrorRateModel() [constructor] cls.add_constructor([]) ## nist-error-rate-model.h (module 'wifi'): double ns3::NistErrorRateModel::GetChunkSuccessRate(ns3::WifiMode mode, double snr, uint32_t nbits) const [member function] cls.add_method('GetChunkSuccessRate', 'double', [param('ns3::WifiMode', 'mode'), param('double', 'snr'), param('uint32_t', 'nbits')], is_const=True, is_virtual=True) ## nist-error-rate-model.h (module 'wifi'): static ns3::TypeId ns3::NistErrorRateModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3NixVector_methods(root_module, cls): cls.add_output_stream_operator() ## nix-vector.h (module 'network'): ns3::NixVector::NixVector() [constructor] cls.add_constructor([]) ## nix-vector.h (module 'network'): ns3::NixVector::NixVector(ns3::NixVector const & o) [copy constructor] cls.add_constructor([param('ns3::NixVector const &', 'o')]) ## nix-vector.h (module 'network'): void ns3::NixVector::AddNeighborIndex(uint32_t newBits, uint32_t numberOfBits) [member function] cls.add_method('AddNeighborIndex', 'void', [param('uint32_t', 'newBits'), param('uint32_t', 'numberOfBits')]) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::BitCount(uint32_t numberOfNeighbors) const [member function] cls.add_method('BitCount', 'uint32_t', [param('uint32_t', 'numberOfNeighbors')], is_const=True) ## nix-vector.h (module 'network'): ns3::Ptr<ns3::NixVector> ns3::NixVector::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::NixVector >', [], is_const=True) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Deserialize(uint32_t const * buffer, uint32_t size) [member function] cls.add_method('Deserialize', 'uint32_t', [param('uint32_t const *', 'buffer'), param('uint32_t', 'size')]) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::ExtractNeighborIndex(uint32_t numberOfBits) [member function] cls.add_method('ExtractNeighborIndex', 'uint32_t', [param('uint32_t', 'numberOfBits')]) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetRemainingBits() [member function] cls.add_method('GetRemainingBits', 'uint32_t', []) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Serialize(uint32_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', [param('uint32_t *', 'buffer'), param('uint32_t', 'maxSize')], is_const=True) return def register_Ns3Node_methods(root_module, cls): ## node.h (module 'network'): ns3::Node::Node(ns3::Node const & arg0) [copy constructor] cls.add_constructor([param('ns3::Node const &', 'arg0')]) ## node.h (module 'network'): ns3::Node::Node() [constructor] cls.add_constructor([]) ## node.h (module 'network'): ns3::Node::Node(uint32_t systemId) [constructor] cls.add_constructor([param('uint32_t', 'systemId')]) ## node.h (module 'network'): uint32_t ns3::Node::AddApplication(ns3::Ptr<ns3::Application> application) [member function] cls.add_method('AddApplication', 'uint32_t', [param('ns3::Ptr< ns3::Application >', 'application')]) ## node.h (module 'network'): uint32_t ns3::Node::AddDevice(ns3::Ptr<ns3::NetDevice> device) [member function] cls.add_method('AddDevice', 'uint32_t', [param('ns3::Ptr< ns3::NetDevice >', 'device')]) ## node.h (module 'network'): static bool ns3::Node::ChecksumEnabled() [member function] cls.add_method('ChecksumEnabled', 'bool', [], is_static=True) ## node.h (module 'network'): ns3::Ptr<ns3::Application> ns3::Node::GetApplication(uint32_t index) const [member function] cls.add_method('GetApplication', 'ns3::Ptr< ns3::Application >', [param('uint32_t', 'index')], is_const=True) ## node.h (module 'network'): ns3::Ptr<ns3::NetDevice> ns3::Node::GetDevice(uint32_t index) const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'index')], is_const=True) ## node.h (module 'network'): uint32_t ns3::Node::GetId() const [member function] cls.add_method('GetId', 'uint32_t', [], is_const=True) ## node.h (module 'network'): uint32_t ns3::Node::GetNApplications() const [member function] cls.add_method('GetNApplications', 'uint32_t', [], is_const=True) ## node.h (module 'network'): uint32_t ns3::Node::GetNDevices() const [member function] cls.add_method('GetNDevices', 'uint32_t', [], is_const=True) ## node.h (module 'network'): uint32_t ns3::Node::GetSystemId() const [member function] cls.add_method('GetSystemId', 'uint32_t', [], is_const=True) ## node.h (module 'network'): static ns3::TypeId ns3::Node::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## node.h (module 'network'): void ns3::Node::RegisterDeviceAdditionListener(ns3::Callback<void,ns3::Ptr<ns3::NetDevice>,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> listener) [member function] cls.add_method('RegisterDeviceAdditionListener', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'listener')]) ## node.h (module 'network'): void ns3::Node::RegisterProtocolHandler(ns3::Callback<void, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> handler, uint16_t protocolType, ns3::Ptr<ns3::NetDevice> device, bool promiscuous=false) [member function] cls.add_method('RegisterProtocolHandler', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'handler'), param('uint16_t', 'protocolType'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('bool', 'promiscuous', default_value='false')]) ## node.h (module 'network'): void ns3::Node::UnregisterDeviceAdditionListener(ns3::Callback<void,ns3::Ptr<ns3::NetDevice>,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> listener) [member function] cls.add_method('UnregisterDeviceAdditionListener', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'listener')]) ## node.h (module 'network'): void ns3::Node::UnregisterProtocolHandler(ns3::Callback<void, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> handler) [member function] cls.add_method('UnregisterProtocolHandler', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'handler')]) ## node.h (module 'network'): void ns3::Node::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) ## node.h (module 'network'): void ns3::Node::DoInitialize() [member function] cls.add_method('DoInitialize', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3NormalRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): ns3::NormalRandomVariable::INFINITE_VALUE [variable] cls.add_static_attribute('INFINITE_VALUE', 'double const', is_const=True) ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::NormalRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::NormalRandomVariable::NormalRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetMean() const [member function] cls.add_method('GetMean', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetVariance() const [member function] cls.add_method('GetVariance', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetBound() const [member function] cls.add_method('GetBound', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound=ns3::NormalRandomVariable::INFINITE_VALUE) [member function] cls.add_method('GetValue', 'double', [param('double', 'mean'), param('double', 'variance'), param('double', 'bound', default_value='ns3::NormalRandomVariable::INFINITE_VALUE')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::NormalRandomVariable::GetInteger(uint32_t mean, uint32_t variance, uint32_t bound) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mean'), param('uint32_t', 'variance'), param('uint32_t', 'bound')]) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::NormalRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3ObjectFactoryChecker_methods(root_module, cls): ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker() [constructor] cls.add_constructor([]) ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker(ns3::ObjectFactoryChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::ObjectFactoryChecker const &', 'arg0')]) return def register_Ns3ObjectFactoryValue_methods(root_module, cls): ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue() [constructor] cls.add_constructor([]) ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactoryValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::ObjectFactoryValue const &', 'arg0')]) ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactory const & value) [constructor] cls.add_constructor([param('ns3::ObjectFactory const &', 'value')]) ## object-factory.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::ObjectFactoryValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## object-factory.h (module 'core'): bool ns3::ObjectFactoryValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## object-factory.h (module 'core'): ns3::ObjectFactory ns3::ObjectFactoryValue::Get() const [member function] cls.add_method('Get', 'ns3::ObjectFactory', [], is_const=True) ## object-factory.h (module 'core'): std::string ns3::ObjectFactoryValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## object-factory.h (module 'core'): void ns3::ObjectFactoryValue::Set(ns3::ObjectFactory const & value) [member function] cls.add_method('Set', 'void', [param('ns3::ObjectFactory const &', 'value')]) return def register_Ns3OkumuraHataPropagationLossModel_methods(root_module, cls): ## okumura-hata-propagation-loss-model.h (module 'propagation'): static ns3::TypeId ns3::OkumuraHataPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## okumura-hata-propagation-loss-model.h (module 'propagation'): ns3::OkumuraHataPropagationLossModel::OkumuraHataPropagationLossModel() [constructor] cls.add_constructor([]) ## okumura-hata-propagation-loss-model.h (module 'propagation'): double ns3::OkumuraHataPropagationLossModel::GetLoss(ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('GetLoss', 'double', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True) ## okumura-hata-propagation-loss-model.h (module 'propagation'): double ns3::OkumuraHataPropagationLossModel::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) ## okumura-hata-propagation-loss-model.h (module 'propagation'): int64_t ns3::OkumuraHataPropagationLossModel::DoAssignStreams(int64_t stream) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'stream')], visibility='private', is_virtual=True) return def register_Ns3OnoeWifiManager_methods(root_module, cls): ## onoe-wifi-manager.h (module 'wifi'): ns3::OnoeWifiManager::OnoeWifiManager(ns3::OnoeWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::OnoeWifiManager const &', 'arg0')]) ## onoe-wifi-manager.h (module 'wifi'): ns3::OnoeWifiManager::OnoeWifiManager() [constructor] cls.add_constructor([]) ## onoe-wifi-manager.h (module 'wifi'): static ns3::TypeId ns3::OnoeWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## onoe-wifi-manager.h (module 'wifi'): ns3::WifiRemoteStation * ns3::OnoeWifiManager::DoCreateStation() const [member function] cls.add_method('DoCreateStation', 'ns3::WifiRemoteStation *', [], is_const=True, visibility='private', is_virtual=True) ## onoe-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::OnoeWifiManager::DoGetDataTxVector(ns3::WifiRemoteStation * station, uint32_t size) [member function] cls.add_method('DoGetDataTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station'), param('uint32_t', 'size')], visibility='private', is_virtual=True) ## onoe-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::OnoeWifiManager::DoGetRtsTxVector(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoGetRtsTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## onoe-wifi-manager.h (module 'wifi'): void ns3::OnoeWifiManager::DoReportDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## onoe-wifi-manager.h (module 'wifi'): void ns3::OnoeWifiManager::DoReportDataOk(ns3::WifiRemoteStation * station, double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] cls.add_method('DoReportDataOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], visibility='private', is_virtual=True) ## onoe-wifi-manager.h (module 'wifi'): void ns3::OnoeWifiManager::DoReportFinalDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## onoe-wifi-manager.h (module 'wifi'): void ns3::OnoeWifiManager::DoReportFinalRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## onoe-wifi-manager.h (module 'wifi'): void ns3::OnoeWifiManager::DoReportRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## onoe-wifi-manager.h (module 'wifi'): void ns3::OnoeWifiManager::DoReportRtsOk(ns3::WifiRemoteStation * station, double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] cls.add_method('DoReportRtsOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='private', is_virtual=True) ## onoe-wifi-manager.h (module 'wifi'): void ns3::OnoeWifiManager::DoReportRxOk(ns3::WifiRemoteStation * station, double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('DoReportRxOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='private', is_virtual=True) ## onoe-wifi-manager.h (module 'wifi'): bool ns3::OnoeWifiManager::IsLowLatency() const [member function] cls.add_method('IsLowLatency', 'bool', [], is_const=True, visibility='private', is_virtual=True) 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<ns3::Packet const> 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'): bool ns3::Packet::ReplacePacketTag(ns3::Tag & tag) [member function] cls.add_method('ReplacePacketTag', 'bool', [param('ns3::Tag &', 'tag')]) ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function] cls.add_method('SetNixVector', 'void', [param('ns3::Ptr< ns3::NixVector >', 'nixVector')]) return def register_Ns3ParetoRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ParetoRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ParetoRandomVariable::ParetoRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetMean() const [member function] cls.add_method('GetMean', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetShape() const [member function] cls.add_method('GetShape', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetBound() const [member function] cls.add_method('GetBound', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetValue(double mean, double shape, double bound) [member function] cls.add_method('GetValue', 'double', [param('double', 'mean'), param('double', 'shape'), param('double', 'bound')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ParetoRandomVariable::GetInteger(uint32_t mean, uint32_t shape, uint32_t bound) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mean'), param('uint32_t', 'shape'), param('uint32_t', 'bound')]) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ParetoRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3RegularWifiMac_methods(root_module, cls): ## regular-wifi-mac.h (module 'wifi'): static ns3::TypeId ns3::RegularWifiMac::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## regular-wifi-mac.h (module 'wifi'): ns3::RegularWifiMac::RegularWifiMac() [constructor] cls.add_constructor([]) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetSlot(ns3::Time slotTime) [member function] cls.add_method('SetSlot', 'void', [param('ns3::Time', 'slotTime')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetSifs(ns3::Time sifs) [member function] cls.add_method('SetSifs', 'void', [param('ns3::Time', 'sifs')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetEifsNoDifs(ns3::Time eifsNoDifs) [member function] cls.add_method('SetEifsNoDifs', 'void', [param('ns3::Time', 'eifsNoDifs')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetPifs(ns3::Time pifs) [member function] cls.add_method('SetPifs', 'void', [param('ns3::Time', 'pifs')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetRifs(ns3::Time rifs) [member function] cls.add_method('SetRifs', 'void', [param('ns3::Time', 'rifs')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetCtsTimeout(ns3::Time ctsTimeout) [member function] cls.add_method('SetCtsTimeout', 'void', [param('ns3::Time', 'ctsTimeout')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetAckTimeout(ns3::Time ackTimeout) [member function] cls.add_method('SetAckTimeout', 'void', [param('ns3::Time', 'ackTimeout')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Time ns3::RegularWifiMac::GetRifs() const [member function] cls.add_method('GetRifs', 'ns3::Time', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Time ns3::RegularWifiMac::GetPifs() const [member function] cls.add_method('GetPifs', 'ns3::Time', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Time ns3::RegularWifiMac::GetSifs() const [member function] cls.add_method('GetSifs', 'ns3::Time', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Time ns3::RegularWifiMac::GetSlot() const [member function] cls.add_method('GetSlot', 'ns3::Time', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Time ns3::RegularWifiMac::GetEifsNoDifs() const [member function] cls.add_method('GetEifsNoDifs', 'ns3::Time', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Time ns3::RegularWifiMac::GetCtsTimeout() const [member function] cls.add_method('GetCtsTimeout', 'ns3::Time', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Time ns3::RegularWifiMac::GetAckTimeout() const [member function] cls.add_method('GetAckTimeout', 'ns3::Time', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetCtsToSelfSupported(bool enable) [member function] cls.add_method('SetCtsToSelfSupported', 'void', [param('bool', 'enable')]) ## regular-wifi-mac.h (module 'wifi'): bool ns3::RegularWifiMac::GetCtsToSelfSupported() const [member function] cls.add_method('GetCtsToSelfSupported', 'bool', [], is_const=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Mac48Address ns3::RegularWifiMac::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Mac48Address', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Ssid ns3::RegularWifiMac::GetSsid() const [member function] cls.add_method('GetSsid', 'ns3::Ssid', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetAddress(ns3::Mac48Address address) [member function] cls.add_method('SetAddress', 'void', [param('ns3::Mac48Address', 'address')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetSsid(ns3::Ssid ssid) [member function] cls.add_method('SetSsid', 'void', [param('ns3::Ssid', 'ssid')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetBssid(ns3::Mac48Address bssid) [member function] cls.add_method('SetBssid', 'void', [param('ns3::Mac48Address', 'bssid')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Mac48Address ns3::RegularWifiMac::GetBssid() const [member function] cls.add_method('GetBssid', 'ns3::Mac48Address', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetPromisc() [member function] cls.add_method('SetPromisc', 'void', [], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::Enqueue(ns3::Ptr<ns3::Packet const> packet, ns3::Mac48Address to, ns3::Mac48Address from) [member function] cls.add_method('Enqueue', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): bool ns3::RegularWifiMac::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::Enqueue(ns3::Ptr<ns3::Packet const> packet, ns3::Mac48Address to) [member function] cls.add_method('Enqueue', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'to')], is_pure_virtual=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetWifiPhy(ns3::Ptr<ns3::WifiPhy> phy) [member function] cls.add_method('SetWifiPhy', 'void', [param('ns3::Ptr< ns3::WifiPhy >', 'phy')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Ptr<ns3::WifiPhy> ns3::RegularWifiMac::GetWifiPhy() const [member function] cls.add_method('GetWifiPhy', 'ns3::Ptr< ns3::WifiPhy >', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetWifiRemoteStationManager(ns3::Ptr<ns3::WifiRemoteStationManager> stationManager) [member function] cls.add_method('SetWifiRemoteStationManager', 'void', [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'stationManager')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Ptr<ns3::WifiRemoteStationManager> ns3::RegularWifiMac::GetWifiRemoteStationManager() const [member function] cls.add_method('GetWifiRemoteStationManager', 'ns3::Ptr< ns3::WifiRemoteStationManager >', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetForwardUpCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet>, ns3::Mac48Address, ns3::Mac48Address, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> upCallback) [member function] cls.add_method('SetForwardUpCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::Mac48Address, ns3::Mac48Address, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'upCallback')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetLinkUpCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> linkUp) [member function] cls.add_method('SetLinkUpCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'linkUp')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetLinkDownCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> linkDown) [member function] cls.add_method('SetLinkDownCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'linkDown')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetBasicBlockAckTimeout(ns3::Time blockAckTimeout) [member function] cls.add_method('SetBasicBlockAckTimeout', 'void', [param('ns3::Time', 'blockAckTimeout')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Time ns3::RegularWifiMac::GetBasicBlockAckTimeout() const [member function] cls.add_method('GetBasicBlockAckTimeout', 'ns3::Time', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetCompressedBlockAckTimeout(ns3::Time blockAckTimeout) [member function] cls.add_method('SetCompressedBlockAckTimeout', 'void', [param('ns3::Time', 'blockAckTimeout')], is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Time ns3::RegularWifiMac::GetCompressedBlockAckTimeout() const [member function] cls.add_method('GetCompressedBlockAckTimeout', 'ns3::Time', [], is_const=True, is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::DoInitialize() [member function] cls.add_method('DoInitialize', 'void', [], visibility='protected', is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): ns3::Ptr<ns3::DcaTxop> ns3::RegularWifiMac::GetDcaTxop() const [member function] cls.add_method('GetDcaTxop', 'ns3::Ptr< ns3::DcaTxop >', [], is_const=True, visibility='protected') ## regular-wifi-mac.h (module 'wifi'): ns3::Ptr<ns3::EdcaTxopN> ns3::RegularWifiMac::GetVOQueue() const [member function] cls.add_method('GetVOQueue', 'ns3::Ptr< ns3::EdcaTxopN >', [], is_const=True, visibility='protected') ## regular-wifi-mac.h (module 'wifi'): ns3::Ptr<ns3::EdcaTxopN> ns3::RegularWifiMac::GetVIQueue() const [member function] cls.add_method('GetVIQueue', 'ns3::Ptr< ns3::EdcaTxopN >', [], is_const=True, visibility='protected') ## regular-wifi-mac.h (module 'wifi'): ns3::Ptr<ns3::EdcaTxopN> ns3::RegularWifiMac::GetBEQueue() const [member function] cls.add_method('GetBEQueue', 'ns3::Ptr< ns3::EdcaTxopN >', [], is_const=True, visibility='protected') ## regular-wifi-mac.h (module 'wifi'): ns3::Ptr<ns3::EdcaTxopN> ns3::RegularWifiMac::GetBKQueue() const [member function] cls.add_method('GetBKQueue', 'ns3::Ptr< ns3::EdcaTxopN >', [], is_const=True, visibility='protected') ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::FinishConfigureStandard(ns3::WifiPhyStandard standard) [member function] cls.add_method('FinishConfigureStandard', 'void', [param('ns3::WifiPhyStandard', 'standard')], visibility='protected', is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetTypeOfStation(ns3::TypeOfStation type) [member function] cls.add_method('SetTypeOfStation', 'void', [param('ns3::TypeOfStation', 'type')], visibility='protected') ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::Receive(ns3::Ptr<ns3::Packet> packet, ns3::WifiMacHeader const * hdr) [member function] cls.add_method('Receive', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr')], visibility='protected', is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::TxOk(ns3::WifiMacHeader const & hdr) [member function] cls.add_method('TxOk', 'void', [param('ns3::WifiMacHeader const &', 'hdr')], visibility='protected', is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::TxFailed(ns3::WifiMacHeader const & hdr) [member function] cls.add_method('TxFailed', 'void', [param('ns3::WifiMacHeader const &', 'hdr')], visibility='protected', is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::ForwardUp(ns3::Ptr<ns3::Packet> packet, ns3::Mac48Address from, ns3::Mac48Address to) [member function] cls.add_method('ForwardUp', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Mac48Address', 'from'), param('ns3::Mac48Address', 'to')], visibility='protected') ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::DeaggregateAmsduAndForward(ns3::Ptr<ns3::Packet> aggregatedPacket, ns3::WifiMacHeader const * hdr) [member function] cls.add_method('DeaggregateAmsduAndForward', 'void', [param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket'), param('ns3::WifiMacHeader const *', 'hdr')], visibility='protected', is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SendAddBaResponse(ns3::MgtAddBaRequestHeader const * reqHdr, ns3::Mac48Address originator) [member function] cls.add_method('SendAddBaResponse', 'void', [param('ns3::MgtAddBaRequestHeader const *', 'reqHdr'), param('ns3::Mac48Address', 'originator')], visibility='protected', is_virtual=True) ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetQosSupported(bool enable) [member function] cls.add_method('SetQosSupported', 'void', [param('bool', 'enable')], visibility='protected') ## regular-wifi-mac.h (module 'wifi'): bool ns3::RegularWifiMac::GetQosSupported() const [member function] cls.add_method('GetQosSupported', 'bool', [], is_const=True, visibility='protected') ## regular-wifi-mac.h (module 'wifi'): void ns3::RegularWifiMac::SetHtSupported(bool enable) [member function] cls.add_method('SetHtSupported', 'void', [param('bool', 'enable')], visibility='protected') ## regular-wifi-mac.h (module 'wifi'): bool ns3::RegularWifiMac::GetHtSupported() const [member function] cls.add_method('GetHtSupported', 'bool', [], is_const=True, visibility='protected') return def register_Ns3RraaWifiManager_methods(root_module, cls): ## rraa-wifi-manager.h (module 'wifi'): ns3::RraaWifiManager::RraaWifiManager(ns3::RraaWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::RraaWifiManager const &', 'arg0')]) ## rraa-wifi-manager.h (module 'wifi'): ns3::RraaWifiManager::RraaWifiManager() [constructor] cls.add_constructor([]) ## rraa-wifi-manager.h (module 'wifi'): static ns3::TypeId ns3::RraaWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## rraa-wifi-manager.h (module 'wifi'): ns3::WifiRemoteStation * ns3::RraaWifiManager::DoCreateStation() const [member function] cls.add_method('DoCreateStation', 'ns3::WifiRemoteStation *', [], is_const=True, visibility='private', is_virtual=True) ## rraa-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::RraaWifiManager::DoGetDataTxVector(ns3::WifiRemoteStation * station, uint32_t size) [member function] cls.add_method('DoGetDataTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station'), param('uint32_t', 'size')], visibility='private', is_virtual=True) ## rraa-wifi-manager.h (module 'wifi'): ns3::WifiTxVector ns3::RraaWifiManager::DoGetRtsTxVector(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoGetRtsTxVector', 'ns3::WifiTxVector', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## rraa-wifi-manager.h (module 'wifi'): bool ns3::RraaWifiManager::DoNeedRts(ns3::WifiRemoteStation * st, ns3::Ptr<ns3::Packet const> packet, bool normally) [member function] cls.add_method('DoNeedRts', 'bool', [param('ns3::WifiRemoteStation *', 'st'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('bool', 'normally')], visibility='private', is_virtual=True) ## rraa-wifi-manager.h (module 'wifi'): void ns3::RraaWifiManager::DoReportDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## rraa-wifi-manager.h (module 'wifi'): void ns3::RraaWifiManager::DoReportDataOk(ns3::WifiRemoteStation * station, double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] cls.add_method('DoReportDataOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], visibility='private', is_virtual=True) ## rraa-wifi-manager.h (module 'wifi'): void ns3::RraaWifiManager::DoReportFinalDataFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalDataFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## rraa-wifi-manager.h (module 'wifi'): void ns3::RraaWifiManager::DoReportFinalRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportFinalRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## rraa-wifi-manager.h (module 'wifi'): void ns3::RraaWifiManager::DoReportRtsFailed(ns3::WifiRemoteStation * station) [member function] cls.add_method('DoReportRtsFailed', 'void', [param('ns3::WifiRemoteStation *', 'station')], visibility='private', is_virtual=True) ## rraa-wifi-manager.h (module 'wifi'): void ns3::RraaWifiManager::DoReportRtsOk(ns3::WifiRemoteStation * station, double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] cls.add_method('DoReportRtsOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='private', is_virtual=True) ## rraa-wifi-manager.h (module 'wifi'): void ns3::RraaWifiManager::DoReportRxOk(ns3::WifiRemoteStation * station, double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('DoReportRxOk', 'void', [param('ns3::WifiRemoteStation *', 'station'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='private', is_virtual=True) ## rraa-wifi-manager.h (module 'wifi'): bool ns3::RraaWifiManager::IsLowLatency() const [member function] cls.add_method('IsLowLatency', 'bool', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3Ssid_methods(root_module, cls): cls.add_output_stream_operator() ## ssid.h (module 'wifi'): ns3::Ssid::Ssid(ns3::Ssid const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ssid const &', 'arg0')]) ## ssid.h (module 'wifi'): ns3::Ssid::Ssid() [constructor] cls.add_constructor([]) ## ssid.h (module 'wifi'): ns3::Ssid::Ssid(std::string s) [constructor] cls.add_constructor([param('std::string', 's')]) ## ssid.h (module 'wifi'): ns3::Ssid::Ssid(char const * ssid, uint8_t length) [constructor] cls.add_constructor([param('char const *', 'ssid'), param('uint8_t', 'length')]) ## ssid.h (module 'wifi'): uint8_t ns3::Ssid::DeserializeInformationField(ns3::Buffer::Iterator start, uint8_t length) [member function] cls.add_method('DeserializeInformationField', 'uint8_t', [param('ns3::Buffer::Iterator', 'start'), param('uint8_t', 'length')], is_virtual=True) ## ssid.h (module 'wifi'): ns3::WifiInformationElementId ns3::Ssid::ElementId() const [member function] cls.add_method('ElementId', 'ns3::WifiInformationElementId', [], is_const=True, is_virtual=True) ## ssid.h (module 'wifi'): uint8_t ns3::Ssid::GetInformationFieldSize() const [member function] cls.add_method('GetInformationFieldSize', 'uint8_t', [], is_const=True, is_virtual=True) ## ssid.h (module 'wifi'): bool ns3::Ssid::IsBroadcast() const [member function] cls.add_method('IsBroadcast', 'bool', [], is_const=True) ## ssid.h (module 'wifi'): bool ns3::Ssid::IsEqual(ns3::Ssid const & o) const [member function] cls.add_method('IsEqual', 'bool', [param('ns3::Ssid const &', 'o')], is_const=True) ## ssid.h (module 'wifi'): char * ns3::Ssid::PeekString() const [member function] cls.add_method('PeekString', 'char *', [], is_const=True) ## ssid.h (module 'wifi'): void ns3::Ssid::SerializeInformationField(ns3::Buffer::Iterator start) const [member function] cls.add_method('SerializeInformationField', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) return def register_Ns3SsidChecker_methods(root_module, cls): ## ssid.h (module 'wifi'): ns3::SsidChecker::SsidChecker() [constructor] cls.add_constructor([]) ## ssid.h (module 'wifi'): ns3::SsidChecker::SsidChecker(ns3::SsidChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::SsidChecker const &', 'arg0')]) return def register_Ns3SsidValue_methods(root_module, cls): ## ssid.h (module 'wifi'): ns3::SsidValue::SsidValue() [constructor] cls.add_constructor([]) ## ssid.h (module 'wifi'): ns3::SsidValue::SsidValue(ns3::SsidValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::SsidValue const &', 'arg0')]) ## ssid.h (module 'wifi'): ns3::SsidValue::SsidValue(ns3::Ssid const & value) [constructor] cls.add_constructor([param('ns3::Ssid const &', 'value')]) ## ssid.h (module 'wifi'): ns3::Ptr<ns3::AttributeValue> ns3::SsidValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## ssid.h (module 'wifi'): bool ns3::SsidValue::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) ## ssid.h (module 'wifi'): ns3::Ssid ns3::SsidValue::Get() const [member function] cls.add_method('Get', 'ns3::Ssid', [], is_const=True) ## ssid.h (module 'wifi'): std::string ns3::SsidValue::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) ## ssid.h (module 'wifi'): void ns3::SsidValue::Set(ns3::Ssid const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Ssid const &', 'value')]) return def register_Ns3StaWifiMac_methods(root_module, cls): ## sta-wifi-mac.h (module 'wifi'): static ns3::TypeId ns3::StaWifiMac::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## sta-wifi-mac.h (module 'wifi'): ns3::StaWifiMac::StaWifiMac() [constructor] cls.add_constructor([]) ## sta-wifi-mac.h (module 'wifi'): void ns3::StaWifiMac::Enqueue(ns3::Ptr<ns3::Packet const> packet, ns3::Mac48Address to) [member function] cls.add_method('Enqueue', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'to')], is_virtual=True) ## sta-wifi-mac.h (module 'wifi'): void ns3::StaWifiMac::SetMaxMissedBeacons(uint32_t missed) [member function] cls.add_method('SetMaxMissedBeacons', 'void', [param('uint32_t', 'missed')]) ## sta-wifi-mac.h (module 'wifi'): void ns3::StaWifiMac::SetProbeRequestTimeout(ns3::Time timeout) [member function] cls.add_method('SetProbeRequestTimeout', 'void', [param('ns3::Time', 'timeout')]) ## sta-wifi-mac.h (module 'wifi'): void ns3::StaWifiMac::SetAssocRequestTimeout(ns3::Time timeout) [member function] cls.add_method('SetAssocRequestTimeout', 'void', [param('ns3::Time', 'timeout')]) ## sta-wifi-mac.h (module 'wifi'): void ns3::StaWifiMac::StartActiveAssociation() [member function] cls.add_method('StartActiveAssociation', 'void', []) ## sta-wifi-mac.h (module 'wifi'): void ns3::StaWifiMac::Receive(ns3::Ptr<ns3::Packet> packet, ns3::WifiMacHeader const * hdr) [member function] cls.add_method('Receive', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr')], visibility='private', is_virtual=True) return def register_Ns3SupportedRates_methods(root_module, cls): cls.add_output_stream_operator() ## supported-rates.h (module 'wifi'): ns3::SupportedRates::SupportedRates(ns3::SupportedRates const & arg0) [copy constructor] cls.add_constructor([param('ns3::SupportedRates const &', 'arg0')]) ## supported-rates.h (module 'wifi'): ns3::SupportedRates::SupportedRates() [constructor] cls.add_constructor([]) ## supported-rates.h (module 'wifi'): void ns3::SupportedRates::AddSupportedRate(uint32_t bs) [member function] cls.add_method('AddSupportedRate', 'void', [param('uint32_t', 'bs')]) ## supported-rates.h (module 'wifi'): uint8_t ns3::SupportedRates::DeserializeInformationField(ns3::Buffer::Iterator start, uint8_t length) [member function] cls.add_method('DeserializeInformationField', 'uint8_t', [param('ns3::Buffer::Iterator', 'start'), param('uint8_t', 'length')], is_virtual=True) ## supported-rates.h (module 'wifi'): ns3::WifiInformationElementId ns3::SupportedRates::ElementId() const [member function] cls.add_method('ElementId', 'ns3::WifiInformationElementId', [], is_const=True, is_virtual=True) ## supported-rates.h (module 'wifi'): uint8_t ns3::SupportedRates::GetInformationFieldSize() const [member function] cls.add_method('GetInformationFieldSize', 'uint8_t', [], is_const=True, is_virtual=True) ## supported-rates.h (module 'wifi'): uint8_t ns3::SupportedRates::GetNRates() const [member function] cls.add_method('GetNRates', 'uint8_t', [], is_const=True) ## supported-rates.h (module 'wifi'): uint32_t ns3::SupportedRates::GetRate(uint8_t i) const [member function] cls.add_method('GetRate', 'uint32_t', [param('uint8_t', 'i')], is_const=True) ## supported-rates.h (module 'wifi'): bool ns3::SupportedRates::IsBasicRate(uint32_t bs) const [member function] cls.add_method('IsBasicRate', 'bool', [param('uint32_t', 'bs')], is_const=True) ## supported-rates.h (module 'wifi'): bool ns3::SupportedRates::IsSupportedRate(uint32_t bs) const [member function] cls.add_method('IsSupportedRate', 'bool', [param('uint32_t', 'bs')], is_const=True) ## supported-rates.h (module 'wifi'): void ns3::SupportedRates::SerializeInformationField(ns3::Buffer::Iterator start) const [member function] cls.add_method('SerializeInformationField', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## supported-rates.h (module 'wifi'): void ns3::SupportedRates::SetBasicRate(uint32_t bs) [member function] cls.add_method('SetBasicRate', 'void', [param('uint32_t', 'bs')]) ## supported-rates.h (module 'wifi'): ns3::SupportedRates::extended [variable] cls.add_instance_attribute('extended', 'ns3::ExtendedSupportedRatesIE', is_const=False) 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_Ns3Vector2DChecker_methods(root_module, cls): ## vector.h (module 'core'): ns3::Vector2DChecker::Vector2DChecker() [constructor] cls.add_constructor([]) ## vector.h (module 'core'): ns3::Vector2DChecker::Vector2DChecker(ns3::Vector2DChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Vector2DChecker const &', 'arg0')]) return def register_Ns3Vector2DValue_methods(root_module, cls): ## vector.h (module 'core'): ns3::Vector2DValue::Vector2DValue() [constructor] cls.add_constructor([]) ## vector.h (module 'core'): ns3::Vector2DValue::Vector2DValue(ns3::Vector2DValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Vector2DValue const &', 'arg0')]) ## vector.h (module 'core'): ns3::Vector2DValue::Vector2DValue(ns3::Vector2D const & value) [constructor] cls.add_constructor([param('ns3::Vector2D const &', 'value')]) ## vector.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::Vector2DValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## vector.h (module 'core'): bool ns3::Vector2DValue::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) ## vector.h (module 'core'): ns3::Vector2D ns3::Vector2DValue::Get() const [member function] cls.add_method('Get', 'ns3::Vector2D', [], is_const=True) ## vector.h (module 'core'): std::string ns3::Vector2DValue::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) ## vector.h (module 'core'): void ns3::Vector2DValue::Set(ns3::Vector2D const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Vector2D const &', 'value')]) return def register_Ns3Vector3DChecker_methods(root_module, cls): ## vector.h (module 'core'): ns3::Vector3DChecker::Vector3DChecker() [constructor] cls.add_constructor([]) ## vector.h (module 'core'): ns3::Vector3DChecker::Vector3DChecker(ns3::Vector3DChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Vector3DChecker const &', 'arg0')]) return def register_Ns3Vector3DValue_methods(root_module, cls): ## vector.h (module 'core'): ns3::Vector3DValue::Vector3DValue() [constructor] cls.add_constructor([]) ## vector.h (module 'core'): ns3::Vector3DValue::Vector3DValue(ns3::Vector3DValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Vector3DValue const &', 'arg0')]) ## vector.h (module 'core'): ns3::Vector3DValue::Vector3DValue(ns3::Vector3D const & value) [constructor] cls.add_constructor([param('ns3::Vector3D const &', 'value')]) ## vector.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::Vector3DValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## vector.h (module 'core'): bool ns3::Vector3DValue::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) ## vector.h (module 'core'): ns3::Vector3D ns3::Vector3DValue::Get() const [member function] cls.add_method('Get', 'ns3::Vector3D', [], is_const=True) ## vector.h (module 'core'): std::string ns3::Vector3DValue::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) ## vector.h (module 'core'): void ns3::Vector3DValue::Set(ns3::Vector3D const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Vector3D const &', 'value')]) return def register_Ns3WifiChannel_methods(root_module, cls): ## wifi-channel.h (module 'wifi'): ns3::WifiChannel::WifiChannel() [constructor] cls.add_constructor([]) ## wifi-channel.h (module 'wifi'): ns3::WifiChannel::WifiChannel(ns3::WifiChannel const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiChannel const &', 'arg0')]) ## wifi-channel.h (module 'wifi'): static ns3::TypeId ns3::WifiChannel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3WifiModeChecker_methods(root_module, cls): ## wifi-mode.h (module 'wifi'): ns3::WifiModeChecker::WifiModeChecker() [constructor] cls.add_constructor([]) ## wifi-mode.h (module 'wifi'): ns3::WifiModeChecker::WifiModeChecker(ns3::WifiModeChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiModeChecker const &', 'arg0')]) return def register_Ns3WifiModeValue_methods(root_module, cls): ## wifi-mode.h (module 'wifi'): ns3::WifiModeValue::WifiModeValue() [constructor] cls.add_constructor([]) ## wifi-mode.h (module 'wifi'): ns3::WifiModeValue::WifiModeValue(ns3::WifiModeValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiModeValue const &', 'arg0')]) ## wifi-mode.h (module 'wifi'): ns3::WifiModeValue::WifiModeValue(ns3::WifiMode const & value) [constructor] cls.add_constructor([param('ns3::WifiMode const &', 'value')]) ## wifi-mode.h (module 'wifi'): ns3::Ptr<ns3::AttributeValue> ns3::WifiModeValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## wifi-mode.h (module 'wifi'): bool ns3::WifiModeValue::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) ## wifi-mode.h (module 'wifi'): ns3::WifiMode ns3::WifiModeValue::Get() const [member function] cls.add_method('Get', 'ns3::WifiMode', [], is_const=True) ## wifi-mode.h (module 'wifi'): std::string ns3::WifiModeValue::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) ## wifi-mode.h (module 'wifi'): void ns3::WifiModeValue::Set(ns3::WifiMode const & value) [member function] cls.add_method('Set', 'void', [param('ns3::WifiMode const &', 'value')]) return def register_Ns3WifiNetDevice_methods(root_module, cls): ## wifi-net-device.h (module 'wifi'): ns3::WifiNetDevice::WifiNetDevice(ns3::WifiNetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiNetDevice const &', 'arg0')]) ## wifi-net-device.h (module 'wifi'): ns3::WifiNetDevice::WifiNetDevice() [constructor] cls.add_constructor([]) ## wifi-net-device.h (module 'wifi'): void ns3::WifiNetDevice::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) ## wifi-net-device.h (module 'wifi'): ns3::Address ns3::WifiNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): ns3::Address ns3::WifiNetDevice::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): ns3::Ptr<ns3::Channel> ns3::WifiNetDevice::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): uint32_t ns3::WifiNetDevice::GetIfIndex() const [member function] cls.add_method('GetIfIndex', 'uint32_t', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): ns3::Ptr<ns3::WifiMac> ns3::WifiNetDevice::GetMac() const [member function] cls.add_method('GetMac', 'ns3::Ptr< ns3::WifiMac >', [], is_const=True) ## wifi-net-device.h (module 'wifi'): uint16_t ns3::WifiNetDevice::GetMtu() const [member function] cls.add_method('GetMtu', 'uint16_t', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): ns3::Address ns3::WifiNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv4Address', 'multicastGroup')], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): ns3::Address ns3::WifiNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv6Address', 'addr')], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): ns3::Ptr<ns3::Node> ns3::WifiNetDevice::GetNode() const [member function] cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): ns3::Ptr<ns3::WifiPhy> ns3::WifiNetDevice::GetPhy() const [member function] cls.add_method('GetPhy', 'ns3::Ptr< ns3::WifiPhy >', [], is_const=True) ## wifi-net-device.h (module 'wifi'): ns3::Ptr<ns3::WifiRemoteStationManager> ns3::WifiNetDevice::GetRemoteStationManager() const [member function] cls.add_method('GetRemoteStationManager', 'ns3::Ptr< ns3::WifiRemoteStationManager >', [], is_const=True) ## wifi-net-device.h (module 'wifi'): static ns3::TypeId ns3::WifiNetDevice::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## wifi-net-device.h (module 'wifi'): bool ns3::WifiNetDevice::IsBridge() const [member function] cls.add_method('IsBridge', 'bool', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): bool ns3::WifiNetDevice::IsBroadcast() const [member function] cls.add_method('IsBroadcast', 'bool', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): bool ns3::WifiNetDevice::IsLinkUp() const [member function] cls.add_method('IsLinkUp', 'bool', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): bool ns3::WifiNetDevice::IsMulticast() const [member function] cls.add_method('IsMulticast', 'bool', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): bool ns3::WifiNetDevice::IsPointToPoint() const [member function] cls.add_method('IsPointToPoint', 'bool', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): bool ns3::WifiNetDevice::NeedsArp() const [member function] cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): bool ns3::WifiNetDevice::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) ## wifi-net-device.h (module 'wifi'): bool ns3::WifiNetDevice::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) ## wifi-net-device.h (module 'wifi'): void ns3::WifiNetDevice::SetAddress(ns3::Address address) [member function] cls.add_method('SetAddress', 'void', [param('ns3::Address', 'address')], is_virtual=True) ## wifi-net-device.h (module 'wifi'): void ns3::WifiNetDevice::SetIfIndex(uint32_t const index) [member function] cls.add_method('SetIfIndex', 'void', [param('uint32_t const', 'index')], is_virtual=True) ## wifi-net-device.h (module 'wifi'): void ns3::WifiNetDevice::SetMac(ns3::Ptr<ns3::WifiMac> mac) [member function] cls.add_method('SetMac', 'void', [param('ns3::Ptr< ns3::WifiMac >', 'mac')]) ## wifi-net-device.h (module 'wifi'): bool ns3::WifiNetDevice::SetMtu(uint16_t const mtu) [member function] cls.add_method('SetMtu', 'bool', [param('uint16_t const', 'mtu')], is_virtual=True) ## wifi-net-device.h (module 'wifi'): void ns3::WifiNetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True) ## wifi-net-device.h (module 'wifi'): void ns3::WifiNetDevice::SetPhy(ns3::Ptr<ns3::WifiPhy> phy) [member function] cls.add_method('SetPhy', 'void', [param('ns3::Ptr< ns3::WifiPhy >', 'phy')]) ## wifi-net-device.h (module 'wifi'): void ns3::WifiNetDevice::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) ## wifi-net-device.h (module 'wifi'): void ns3::WifiNetDevice::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) ## wifi-net-device.h (module 'wifi'): void ns3::WifiNetDevice::SetRemoteStationManager(ns3::Ptr<ns3::WifiRemoteStationManager> manager) [member function] cls.add_method('SetRemoteStationManager', 'void', [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'manager')]) ## wifi-net-device.h (module 'wifi'): bool ns3::WifiNetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', [], is_const=True, is_virtual=True) ## wifi-net-device.h (module 'wifi'): void ns3::WifiNetDevice::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) ## wifi-net-device.h (module 'wifi'): void ns3::WifiNetDevice::DoInitialize() [member function] cls.add_method('DoInitialize', 'void', [], visibility='protected', is_virtual=True) ## wifi-net-device.h (module 'wifi'): void ns3::WifiNetDevice::ForwardUp(ns3::Ptr<ns3::Packet> packet, ns3::Mac48Address from, ns3::Mac48Address to) [member function] cls.add_method('ForwardUp', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Mac48Address', 'from'), param('ns3::Mac48Address', 'to')], visibility='protected') return def register_Ns3YansErrorRateModel_methods(root_module, cls): ## yans-error-rate-model.h (module 'wifi'): ns3::YansErrorRateModel::YansErrorRateModel(ns3::YansErrorRateModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::YansErrorRateModel const &', 'arg0')]) ## yans-error-rate-model.h (module 'wifi'): ns3::YansErrorRateModel::YansErrorRateModel() [constructor] cls.add_constructor([]) ## yans-error-rate-model.h (module 'wifi'): double ns3::YansErrorRateModel::GetChunkSuccessRate(ns3::WifiMode mode, double snr, uint32_t nbits) const [member function] cls.add_method('GetChunkSuccessRate', 'double', [param('ns3::WifiMode', 'mode'), param('double', 'snr'), param('uint32_t', 'nbits')], is_const=True, is_virtual=True) ## yans-error-rate-model.h (module 'wifi'): static ns3::TypeId ns3::YansErrorRateModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3YansWifiChannel_methods(root_module, cls): ## yans-wifi-channel.h (module 'wifi'): ns3::YansWifiChannel::YansWifiChannel(ns3::YansWifiChannel const & arg0) [copy constructor] cls.add_constructor([param('ns3::YansWifiChannel const &', 'arg0')]) ## yans-wifi-channel.h (module 'wifi'): ns3::YansWifiChannel::YansWifiChannel() [constructor] cls.add_constructor([]) ## yans-wifi-channel.h (module 'wifi'): void ns3::YansWifiChannel::Add(ns3::Ptr<ns3::YansWifiPhy> phy) [member function] cls.add_method('Add', 'void', [param('ns3::Ptr< ns3::YansWifiPhy >', 'phy')]) ## yans-wifi-channel.h (module 'wifi'): int64_t ns3::YansWifiChannel::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')]) ## yans-wifi-channel.h (module 'wifi'): ns3::Ptr<ns3::NetDevice> ns3::YansWifiChannel::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) ## yans-wifi-channel.h (module 'wifi'): uint32_t ns3::YansWifiChannel::GetNDevices() const [member function] cls.add_method('GetNDevices', 'uint32_t', [], is_const=True, is_virtual=True) ## yans-wifi-channel.h (module 'wifi'): static ns3::TypeId ns3::YansWifiChannel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## yans-wifi-channel.h (module 'wifi'): void ns3::YansWifiChannel::Send(ns3::Ptr<ns3::YansWifiPhy> sender, ns3::Ptr<ns3::Packet const> packet, double txPowerDbm, ns3::WifiTxVector txVector, ns3::WifiPreamble preamble) const [member function] cls.add_method('Send', 'void', [param('ns3::Ptr< ns3::YansWifiPhy >', 'sender'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('double', 'txPowerDbm'), param('ns3::WifiTxVector', 'txVector'), param('ns3::WifiPreamble', 'preamble')], is_const=True) ## yans-wifi-channel.h (module 'wifi'): void ns3::YansWifiChannel::SetPropagationDelayModel(ns3::Ptr<ns3::PropagationDelayModel> delay) [member function] cls.add_method('SetPropagationDelayModel', 'void', [param('ns3::Ptr< ns3::PropagationDelayModel >', 'delay')]) ## yans-wifi-channel.h (module 'wifi'): void ns3::YansWifiChannel::SetPropagationLossModel(ns3::Ptr<ns3::PropagationLossModel> loss) [member function] cls.add_method('SetPropagationLossModel', 'void', [param('ns3::Ptr< ns3::PropagationLossModel >', 'loss')]) 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_Ns3AdhocWifiMac_methods(root_module, cls): ## adhoc-wifi-mac.h (module 'wifi'): static ns3::TypeId ns3::AdhocWifiMac::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## adhoc-wifi-mac.h (module 'wifi'): ns3::AdhocWifiMac::AdhocWifiMac() [constructor] cls.add_constructor([]) ## adhoc-wifi-mac.h (module 'wifi'): void ns3::AdhocWifiMac::SetAddress(ns3::Mac48Address address) [member function] cls.add_method('SetAddress', 'void', [param('ns3::Mac48Address', 'address')], is_virtual=True) ## adhoc-wifi-mac.h (module 'wifi'): void ns3::AdhocWifiMac::SetLinkUpCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> linkUp) [member function] cls.add_method('SetLinkUpCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'linkUp')], is_virtual=True) ## adhoc-wifi-mac.h (module 'wifi'): void ns3::AdhocWifiMac::Enqueue(ns3::Ptr<ns3::Packet const> packet, ns3::Mac48Address to) [member function] cls.add_method('Enqueue', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'to')], is_virtual=True) ## adhoc-wifi-mac.h (module 'wifi'): void ns3::AdhocWifiMac::Receive(ns3::Ptr<ns3::Packet> packet, ns3::WifiMacHeader const * hdr) [member function] cls.add_method('Receive', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr')], visibility='private', is_virtual=True) return def register_Ns3ApWifiMac_methods(root_module, cls): ## ap-wifi-mac.h (module 'wifi'): static ns3::TypeId ns3::ApWifiMac::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## ap-wifi-mac.h (module 'wifi'): ns3::ApWifiMac::ApWifiMac() [constructor] cls.add_constructor([]) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::SetWifiRemoteStationManager(ns3::Ptr<ns3::WifiRemoteStationManager> stationManager) [member function] cls.add_method('SetWifiRemoteStationManager', 'void', [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'stationManager')], is_virtual=True) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::SetLinkUpCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> linkUp) [member function] cls.add_method('SetLinkUpCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'linkUp')], is_virtual=True) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::Enqueue(ns3::Ptr<ns3::Packet const> packet, ns3::Mac48Address to) [member function] cls.add_method('Enqueue', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'to')], is_virtual=True) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::Enqueue(ns3::Ptr<ns3::Packet const> packet, ns3::Mac48Address to, ns3::Mac48Address from) [member function] cls.add_method('Enqueue', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from')], is_virtual=True) ## ap-wifi-mac.h (module 'wifi'): bool ns3::ApWifiMac::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', [], is_const=True, is_virtual=True) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::SetAddress(ns3::Mac48Address address) [member function] cls.add_method('SetAddress', 'void', [param('ns3::Mac48Address', 'address')], is_virtual=True) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::SetBeaconInterval(ns3::Time interval) [member function] cls.add_method('SetBeaconInterval', 'void', [param('ns3::Time', 'interval')]) ## ap-wifi-mac.h (module 'wifi'): ns3::Time ns3::ApWifiMac::GetBeaconInterval() const [member function] cls.add_method('GetBeaconInterval', 'ns3::Time', [], is_const=True) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::StartBeaconing() [member function] cls.add_method('StartBeaconing', 'void', []) ## ap-wifi-mac.h (module 'wifi'): int64_t ns3::ApWifiMac::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')]) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::Receive(ns3::Ptr<ns3::Packet> packet, ns3::WifiMacHeader const * hdr) [member function] cls.add_method('Receive', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr')], visibility='private', is_virtual=True) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::TxOk(ns3::WifiMacHeader const & hdr) [member function] cls.add_method('TxOk', 'void', [param('ns3::WifiMacHeader const &', 'hdr')], visibility='private', is_virtual=True) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::TxFailed(ns3::WifiMacHeader const & hdr) [member function] cls.add_method('TxFailed', 'void', [param('ns3::WifiMacHeader const &', 'hdr')], visibility='private', is_virtual=True) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::DeaggregateAmsduAndForward(ns3::Ptr<ns3::Packet> aggregatedPacket, ns3::WifiMacHeader const * hdr) [member function] cls.add_method('DeaggregateAmsduAndForward', 'void', [param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket'), param('ns3::WifiMacHeader const *', 'hdr')], visibility='private', is_virtual=True) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) ## ap-wifi-mac.h (module 'wifi'): void ns3::ApWifiMac::DoInitialize() [member function] cls.add_method('DoInitialize', 'void', [], visibility='private', is_virtual=True) return def register_Ns3DcaTxop_methods(root_module, cls): ## dca-txop.h (module 'wifi'): static ns3::TypeId ns3::DcaTxop::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## dca-txop.h (module 'wifi'): ns3::DcaTxop::DcaTxop() [constructor] cls.add_constructor([]) ## dca-txop.h (module 'wifi'): void ns3::DcaTxop::SetLow(ns3::Ptr<ns3::MacLow> low) [member function] cls.add_method('SetLow', 'void', [param('ns3::Ptr< ns3::MacLow >', 'low')]) ## dca-txop.h (module 'wifi'): void ns3::DcaTxop::SetManager(ns3::DcfManager * manager) [member function] cls.add_method('SetManager', 'void', [param('ns3::DcfManager *', 'manager')]) ## dca-txop.h (module 'wifi'): void ns3::DcaTxop::SetWifiRemoteStationManager(ns3::Ptr<ns3::WifiRemoteStationManager> remoteManager) [member function] cls.add_method('SetWifiRemoteStationManager', 'void', [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'remoteManager')]) ## dca-txop.h (module 'wifi'): void ns3::DcaTxop::SetTxMiddle(ns3::MacTxMiddle * txMiddle) [member function] cls.add_method('SetTxMiddle', 'void', [param('ns3::MacTxMiddle *', 'txMiddle')]) ## dca-txop.h (module 'wifi'): void ns3::DcaTxop::SetTxOkCallback(ns3::Callback<void, ns3::WifiMacHeader const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetTxOkCallback', 'void', [param('ns3::Callback< void, ns3::WifiMacHeader const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## dca-txop.h (module 'wifi'): void ns3::DcaTxop::SetTxFailedCallback(ns3::Callback<void, ns3::WifiMacHeader const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] cls.add_method('SetTxFailedCallback', 'void', [param('ns3::Callback< void, ns3::WifiMacHeader const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## dca-txop.h (module 'wifi'): ns3::Ptr<ns3::WifiMacQueue> ns3::DcaTxop::GetQueue() const [member function] cls.add_method('GetQueue', 'ns3::Ptr< ns3::WifiMacQueue >', [], is_const=True) ## dca-txop.h (module 'wifi'): void ns3::DcaTxop::SetMinCw(uint32_t minCw) [member function] cls.add_method('SetMinCw', 'void', [param('uint32_t', 'minCw')], is_virtual=True) ## dca-txop.h (module 'wifi'): void ns3::DcaTxop::SetMaxCw(uint32_t maxCw) [member function] cls.add_method('SetMaxCw', 'void', [param('uint32_t', 'maxCw')], is_virtual=True) ## dca-txop.h (module 'wifi'): void ns3::DcaTxop::SetAifsn(uint32_t aifsn) [member function] cls.add_method('SetAifsn', 'void', [param('uint32_t', 'aifsn')], is_virtual=True) ## dca-txop.h (module 'wifi'): uint32_t ns3::DcaTxop::GetMinCw() const [member function] cls.add_method('GetMinCw', 'uint32_t', [], is_const=True, is_virtual=True) ## dca-txop.h (module 'wifi'): uint32_t ns3::DcaTxop::GetMaxCw() const [member function] cls.add_method('GetMaxCw', 'uint32_t', [], is_const=True, is_virtual=True) ## dca-txop.h (module 'wifi'): uint32_t ns3::DcaTxop::GetAifsn() const [member function] cls.add_method('GetAifsn', 'uint32_t', [], is_const=True, is_virtual=True) ## dca-txop.h (module 'wifi'): void ns3::DcaTxop::Queue(ns3::Ptr<ns3::Packet const> packet, ns3::WifiMacHeader const & hdr) [member function] cls.add_method('Queue', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const &', 'hdr')]) ## dca-txop.h (module 'wifi'): int64_t ns3::DcaTxop::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')]) ## dca-txop.h (module 'wifi'): void ns3::DcaTxop::DoInitialize() [member function] cls.add_method('DoInitialize', 'void', [], visibility='private', is_virtual=True) ## dca-txop.h (module 'wifi'): void ns3::DcaTxop::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) return def register_Ns3HashImplementation_methods(root_module, cls): ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] cls.add_constructor([]) ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_pure_virtual=True, is_virtual=True) ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] cls.add_method('clear', 'void', [], is_pure_virtual=True, is_virtual=True) return def register_Ns3HashFunctionFnv1a_methods(root_module, cls): ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] cls.add_constructor([]) ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] cls.add_method('clear', 'void', [], is_virtual=True) return def register_Ns3HashFunctionHash32_methods(root_module, cls): ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] cls.add_method('clear', 'void', [], is_virtual=True) return def register_Ns3HashFunctionHash64_methods(root_module, cls): ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] cls.add_method('clear', 'void', [], is_virtual=True) return def register_Ns3HashFunctionMurmur3_methods(root_module, cls): ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] cls.add_constructor([]) ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] cls.add_method('clear', 'void', [], is_virtual=True) return def register_functions(root_module): module = root_module ## ht-capabilities.h (module 'wifi'): extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeHtCapabilitiesChecker() [free function] module.add_function('MakeHtCapabilitiesChecker', 'ns3::Ptr< ns3::AttributeChecker const >', []) ## ssid.h (module 'wifi'): extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeSsidChecker() [free function] module.add_function('MakeSsidChecker', 'ns3::Ptr< ns3::AttributeChecker const >', []) ## wifi-mode.h (module 'wifi'): extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeWifiModeChecker() [free function] module.add_function('MakeWifiModeChecker', 'ns3::Ptr< ns3::AttributeChecker const >', []) ## qos-utils.h (module 'wifi'): extern uint8_t ns3::QosUtilsGetTidForPacket(ns3::Ptr<ns3::Packet const> packet) [free function] module.add_function('QosUtilsGetTidForPacket', 'uint8_t', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## qos-utils.h (module 'wifi'): extern bool ns3::QosUtilsIsOldPacket(uint16_t startingSeq, uint16_t seqNumber) [free function] module.add_function('QosUtilsIsOldPacket', 'bool', [param('uint16_t', 'startingSeq'), param('uint16_t', 'seqNumber')]) ## qos-utils.h (module 'wifi'): extern uint32_t ns3::QosUtilsMapSeqControlToUniqueInteger(uint16_t seqControl, uint16_t endSequence) [free function] module.add_function('QosUtilsMapSeqControlToUniqueInteger', 'uint32_t', [param('uint16_t', 'seqControl'), param('uint16_t', 'endSequence')]) ## qos-utils.h (module 'wifi'): extern ns3::AcIndex ns3::QosUtilsMapTidToAc(uint8_t tid) [free function] module.add_function('QosUtilsMapTidToAc', 'ns3::AcIndex', [param('uint8_t', 'tid')]) register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) register_functions_ns3_internal(module.get_submodule('internal'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return def register_functions_ns3_Hash(module, root_module): register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) return def register_functions_ns3_Hash_Function(module, root_module): return def register_functions_ns3_internal(module, root_module): return def main(): out = FileCodeSink(sys.stdout) root_module = module_init() register_types(root_module) register_methods(root_module) register_functions(root_module) root_module.generate(out) if __name__ == '__main__': main()
fener06/pyload
refs/heads/master
module/plugins/hoster/QuickshareCz.py
1
# -*- coding: utf-8 -*- """ 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/>. @author: zoidberg """ import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from pycurl import FOLLOWLOCATION class QuickshareCz(SimpleHoster): __name__ = "QuickshareCz" __type__ = "hoster" __pattern__ = r"http://.*quickshare.cz/stahnout-soubor/.*" __version__ = "0.53" __description__ = """Quickshare.cz""" __author_name__ = ("zoidberg") FILE_NAME_PATTERN = r'<th width="145px">Název:</th>\s*<td style="word-wrap:break-word;">(?P<N>[^<]+)</td>' FILE_SIZE_PATTERN = r'<th>Velikost:</th>\s*<td>(?P<S>[0-9.]+) (?P<U>[kKMG])i?B</td>' FILE_OFFLINE_PATTERN = r'<script type="text/javascript">location.href=\'/chyba\';</script>' def process(self, pyfile): self.html = self.load(pyfile.url, decode = True) self.getFileInfo() # parse js variables self.jsvars = dict((x, y.strip("'")) for x,y in re.findall(r"var (\w+) = ([0-9.]+|'[^']*')", self.html)) self.logDebug(self.jsvars) pyfile.name = self.jsvars['ID3'] # determine download type - free or premium if self.premium: if 'UU_prihlasen' in self.jsvars: if self.jsvars['UU_prihlasen'] == '0': self.logWarning('User not logged in') self.relogin(user) self.retry() elif float(self.jsvars['UU_kredit']) < float(self.jsvars['kredit_odecet']): self.logWarning('Not enough credit left') self.premium = False if self.premium: self.handlePremium() else: self.handleFree() check = self.checkDownload({"err": re.compile(r"\AChyba!")}, max_size=100) if check == "err": self.fail("File not found or plugin defect") def handleFree(self): # get download url download_url = '%s/download.php' % self.jsvars['server'] data = dict((x, self.jsvars[x]) for x in self.jsvars if x in ('ID1', 'ID2', 'ID3', 'ID4')) self.logDebug("FREE URL1:" + download_url, data) self.req.http.c.setopt(FOLLOWLOCATION, 0) self.load(download_url, post=data) self.header = self.req.http.header self.req.http.c.setopt(FOLLOWLOCATION, 1) found = re.search("Location\s*:\s*(.*)", self.header, re.I) if not found: self.fail('File not found') download_url = found.group(1) self.logDebug("FREE URL2:" + download_url) # check errors found = re.search(r'/chyba/(\d+)', download_url) if found: if found.group(1) == '1': self.retry(max_tries=60, wait_time=120, reason="This IP is already downloading") elif found.group(1) == '2': self.retry(max_tries=60, wait_time=60, reason="No free slots available") else: self.fail('Error %d' % found.group(1)) # download file self.download(download_url) def handlePremium(self): download_url = '%s/download_premium.php' % self.jsvars['server'] data = dict((x, self.jsvars[x]) for x in self.jsvars if x in ('ID1', 'ID2', 'ID4', 'ID5')) self.logDebug("PREMIUM URL:" + download_url, data) self.download(download_url, get=data) getInfo = create_getInfo(QuickshareCz)
jillesme/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py
122
# Copyright (c) 2011 Google 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 Google 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. import json import re import time from webkitpy.common.checkout.scm.detection import SCMDetector from webkitpy.common.checkout.changelog import ChangeLog from webkitpy.common.config.contributionareas import ContributionAreas from webkitpy.common.system.filesystem import FileSystem from webkitpy.common.system.executive import Executive from webkitpy.tool.multicommandtool import Command from webkitpy.tool import steps class AnalyzeChangeLog(Command): name = "analyze-changelog" help_text = "Experimental command for analyzing change logs." long_help = "This command parses changelogs in a specified directory and summarizes the result as JSON files." def __init__(self): options = [ steps.Options.changelog_count, ] Command.__init__(self, options=options) @staticmethod def _enumerate_changelogs(filesystem, dirname, changelog_count): changelogs = [filesystem.join(dirname, filename) for filename in filesystem.listdir(dirname) if re.match('^ChangeLog(-(\d{4}-\d{2}-\d{2}))?$', filename)] # Make sure ChangeLog shows up before ChangeLog-2011-01-01 changelogs = sorted(changelogs, key=lambda filename: filename + 'X', reverse=True) return changelogs[:changelog_count] @staticmethod def _generate_jsons(filesystem, jsons, output_dir): for filename in jsons: print ' Generating', filename filesystem.write_text_file(filesystem.join(output_dir, filename), json.dumps(jsons[filename], indent=2)) def execute(self, options, args, tool): filesystem = self._tool.filesystem if len(args) < 1 or not filesystem.exists(args[0]): print "Need the directory name to look for changelog as the first argument" return changelog_dir = filesystem.abspath(args[0]) if len(args) < 2 or not filesystem.exists(args[1]): print "Need the output directory name as the second argument" return output_dir = args[1] startTime = time.time() print 'Enumerating ChangeLog files...' changelogs = AnalyzeChangeLog._enumerate_changelogs(filesystem, changelog_dir, options.changelog_count) analyzer = ChangeLogAnalyzer(tool, changelogs) analyzer.analyze() print 'Generating json files...' json_files = { 'summary.json': analyzer.summary(), 'contributors.json': analyzer.contributors_statistics(), 'areas.json': analyzer.areas_statistics(), } AnalyzeChangeLog._generate_jsons(filesystem, json_files, output_dir) commands_dir = filesystem.dirname(filesystem.path_to_module(self.__module__)) print commands_dir filesystem.copyfile(filesystem.join(commands_dir, 'data/summary.html'), filesystem.join(output_dir, 'summary.html')) tick = time.time() - startTime print 'Finished in %02dm:%02ds' % (int(tick / 60), int(tick % 60)) class ChangeLogAnalyzer(object): def __init__(self, host, changelog_paths): self._changelog_paths = changelog_paths self._filesystem = host.filesystem self._contribution_areas = ContributionAreas(host.filesystem) self._scm = host.scm() self._parsed_revisions = {} self._contributors_statistics = {} self._areas_statistics = dict([(area, {'reviewed': 0, 'unreviewed': 0, 'contributors': {}}) for area in self._contribution_areas.names()]) self._summary = {'reviewed': 0, 'unreviewed': 0} self._longest_filename = max([len(path) - len(self._scm.checkout_root) for path in changelog_paths]) self._filename = '' self._length_of_previous_output = 0 def contributors_statistics(self): return self._contributors_statistics def areas_statistics(self): return self._areas_statistics def summary(self): return self._summary def _print_status(self, status): if self._length_of_previous_output: print "\r" + " " * self._length_of_previous_output, new_output = ('%' + str(self._longest_filename) + 's: %s') % (self._filename, status) print "\r" + new_output, self._length_of_previous_output = len(new_output) def _set_filename(self, filename): if self._filename: print self._filename = filename def analyze(self): for path in self._changelog_paths: self._set_filename(self._filesystem.relpath(path, self._scm.checkout_root)) with self._filesystem.open_text_file_for_reading(path) as changelog: self._print_status('Parsing entries...') number_of_parsed_entries = self._analyze_entries(ChangeLog.parse_entries_from_file(changelog), path) self._print_status('Done (%d entries)' % number_of_parsed_entries) print self._summary['contributors'] = len(self._contributors_statistics) self._summary['contributors_with_reviews'] = sum([1 for contributor in self._contributors_statistics.values() if contributor['reviews']['total']]) self._summary['contributors_without_reviews'] = self._summary['contributors'] - self._summary['contributors_with_reviews'] def _collect_statistics_for_contributor_area(self, area, contributor, contribution_type, reviewed): area_contributors = self._areas_statistics[area]['contributors'] if contributor not in area_contributors: area_contributors[contributor] = {'reviews': 0, 'reviewed': 0, 'unreviewed': 0} if contribution_type == 'patches': contribution_type = 'reviewed' if reviewed else 'unreviewed' area_contributors[contributor][contribution_type] += 1 def _collect_statistics_for_contributor(self, contributor, contribution_type, areas, touched_files, reviewed): if contributor not in self._contributors_statistics: self._contributors_statistics[contributor] = { 'reviews': {'total': 0, 'areas': {}, 'files': {}}, 'patches': {'reviewed': 0, 'unreviewed': 0, 'areas': {}, 'files': {}}} statistics = self._contributors_statistics[contributor][contribution_type] if contribution_type == 'reviews': statistics['total'] += 1 elif reviewed: statistics['reviewed'] += 1 else: statistics['unreviewed'] += 1 for area in areas: self._increment_dictionary_value(statistics['areas'], area) self._collect_statistics_for_contributor_area(area, contributor, contribution_type, reviewed) for touchedfile in touched_files: self._increment_dictionary_value(statistics['files'], touchedfile) def _increment_dictionary_value(self, dictionary, key): dictionary[key] = dictionary.get(key, 0) + 1 def _analyze_entries(self, entries, changelog_path): dirname = self._filesystem.dirname(changelog_path) i = 0 for i, entry in enumerate(entries): self._print_status('(%s) entries' % i) assert(entry.authors()) touchedfiles_for_entry = [self._filesystem.relpath(self._filesystem.join(dirname, name), self._scm.checkout_root) for name in entry.touched_files()] areas_for_entry = self._contribution_areas.areas_for_touched_files(touchedfiles_for_entry) authors_for_entry = entry.authors() reviewers_for_entry = entry.reviewers() for reviewer in reviewers_for_entry: self._collect_statistics_for_contributor(reviewer.full_name, 'reviews', areas_for_entry, touchedfiles_for_entry, reviewed=True) for author in authors_for_entry: self._collect_statistics_for_contributor(author['name'], 'patches', areas_for_entry, touchedfiles_for_entry, reviewed=bool(reviewers_for_entry)) for area in areas_for_entry: self._areas_statistics[area]['reviewed' if reviewers_for_entry else 'unreviewed'] += 1 self._summary['reviewed' if reviewers_for_entry else 'unreviewed'] += 1 self._print_status('(%s) entries' % i) return i
sproutcoin/sprouts
refs/heads/master
share/qt/extract_strings_qt.py
1294
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by xgettext. Return a list of (msgid,msgstr) tuples. """ messages = [] msgid = [] msgstr = [] in_msgid = False in_msgstr = False for line in text.split('\n'): line = line.rstrip('\r') if line.startswith('msgid '): if in_msgstr: messages.append((msgid, msgstr)) in_msgstr = False # message start in_msgid = True msgid = [line[6:]] elif line.startswith('msgstr '): in_msgid = False in_msgstr = True msgstr = [line[7:]] elif line.startswith('"'): if in_msgid: msgid.append(line) if in_msgstr: msgstr.append(line) if in_msgstr: messages.append((msgid, msgstr)) return messages files = glob.glob('src/*.cpp') + glob.glob('src/*.h') # xgettext -n --keyword=_ $FILES child = Popen(['xgettext','--output=-','-n','--keyword=_'] + files, stdout=PIPE) (out, err) = child.communicate() messages = parse_po(out) f = open(OUT_CPP, 'w') f.write("""#include <QtGlobal> // Automatically generated by extract_strings.py #ifdef __GNUC__ #define UNUSED __attribute__((unused)) #else #define UNUSED #endif """) f.write('static const char UNUSED *bitcoin_strings[] = {') for (msgid, msgstr) in messages: if msgid != EMPTY: f.write('QT_TRANSLATE_NOOP("bitcoin-core", %s),\n' % ('\n'.join(msgid))) f.write('};') f.close()
mhuwiler/rootauto
refs/heads/mhuwiler
interpreter/llvm/src/tools/clang/utils/ClangDataFormat.py
133
"""lldb data formatters for clang classes. Usage -- import this file in your ~/.lldbinit by adding this line: command script import /path/to/ClangDataFormat.py After that, instead of getting this: (lldb) p Tok.Loc (clang::SourceLocation) $0 = { (unsigned int) ID = 123582 } you'll get: (lldb) p Tok.Loc (clang::SourceLocation) $4 = "/usr/include/i386/_types.h:37:1" (offset: 123582, file, local) """ import lldb def __lldb_init_module(debugger, internal_dict): debugger.HandleCommand("type summary add -F ClangDataFormat.SourceLocation_summary clang::SourceLocation") debugger.HandleCommand("type summary add -F ClangDataFormat.QualType_summary clang::QualType") debugger.HandleCommand("type summary add -F ClangDataFormat.StringRef_summary llvm::StringRef") def SourceLocation_summary(srcloc, internal_dict): return SourceLocation(srcloc).summary() def QualType_summary(qualty, internal_dict): return QualType(qualty).summary() def StringRef_summary(strref, internal_dict): return StringRef(strref).summary() class SourceLocation(object): def __init__(self, srcloc): self.srcloc = srcloc self.ID = srcloc.GetChildAtIndex(0).GetValueAsUnsigned() self.frame = srcloc.GetFrame() def offset(self): return getValueFromExpression(self.srcloc, ".getOffset()").GetValueAsUnsigned() def isInvalid(self): return self.ID == 0 def isMacro(self): return getValueFromExpression(self.srcloc, ".isMacroID()").GetValueAsUnsigned() def isLocal(self, srcmgr_path): return self.frame.EvaluateExpression("(%s).isLocalSourceLocation(%s)" % (srcmgr_path, getExpressionPath(self.srcloc))).GetValueAsUnsigned() def getPrint(self, srcmgr_path): print_str = getValueFromExpression(self.srcloc, ".printToString(%s)" % srcmgr_path) return print_str.GetSummary() def summary(self): if self.isInvalid(): return "<invalid loc>" srcmgr_path = findObjectExpressionPath("clang::SourceManager", self.frame) if srcmgr_path: return "%s (offset: %d, %s, %s)" % (self.getPrint(srcmgr_path), self.offset(), "macro" if self.isMacro() else "file", "local" if self.isLocal(srcmgr_path) else "loaded") return "(offset: %d, %s)" % (self.offset(), "macro" if self.isMacro() else "file") class QualType(object): def __init__(self, qualty): self.qualty = qualty def getAsString(self): std_str = getValueFromExpression(self.qualty, ".getAsString()") return std_str.GetSummary() def summary(self): desc = self.getAsString() if desc == '"NULL TYPE"': return "<NULL TYPE>" return desc class StringRef(object): def __init__(self, strref): self.strref = strref self.Data_value = strref.GetChildAtIndex(0) self.Length = strref.GetChildAtIndex(1).GetValueAsUnsigned() def summary(self): if self.Length == 0: return '""' data = self.Data_value.GetPointeeData(0, self.Length) error = lldb.SBError() string = data.ReadRawData(error, 0, data.GetByteSize()) if error.Fail(): return None return '"%s"' % string # Key is a (function address, type name) tuple, value is the expression path for # an object with such a type name from inside that function. FramePathMapCache = {} def findObjectExpressionPath(typename, frame): func_addr = frame.GetFunction().GetStartAddress().GetFileAddress() key = (func_addr, typename) try: return FramePathMapCache[key] except KeyError: #print "CACHE MISS" path = None obj = findObject(typename, frame) if obj: path = getExpressionPath(obj) FramePathMapCache[key] = path return path def findObject(typename, frame): def getTypename(value): # FIXME: lldb should provide something like getBaseType ty = value.GetType() if ty.IsPointerType() or ty.IsReferenceType(): return ty.GetPointeeType().GetName() return ty.GetName() def searchForType(value, searched): tyname = getTypename(value) #print "SEARCH:", getExpressionPath(value), value.GetType().GetName() if tyname == typename: return value ty = value.GetType() if not (ty.IsPointerType() or ty.IsReferenceType() or # FIXME: lldb should provide something like getCanonicalType tyname.startswith("llvm::IntrusiveRefCntPtr<") or tyname.startswith("llvm::OwningPtr<")): return None # FIXME: Hashing for SBTypes does not seem to work correctly, uses the typename instead, # and not the canonical one unfortunately. if tyname in searched: return None searched.add(tyname) for i in range(value.GetNumChildren()): child = value.GetChildAtIndex(i, 0, False) found = searchForType(child, searched) if found: return found searched = set() value_list = frame.GetVariables(True, True, True, True) for val in value_list: found = searchForType(val, searched) if found: return found if not found.TypeIsPointerType() else found.Dereference() def getValueFromExpression(val, expr): return val.GetFrame().EvaluateExpression(getExpressionPath(val) + expr) def getExpressionPath(val): stream = lldb.SBStream() val.GetExpressionPath(stream) return stream.GetData()
40223136/20150616test1
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site-packages/spur.py
184
#coding: utf-8 import math # 導入數學函式後, 圓周率為 pi # deg 為角度轉為徑度的轉換因子 deg = math.pi/180. class Spur(object): def __init__(self, ctx): self.ctx = ctx def create_line(self, x1, y1, x2, y2, width=3, fill="red"): self.ctx.beginPath() self.ctx.lineWidth = width self.ctx.moveTo(x1, y1) self.ctx.lineTo(x2, y2) self.ctx.strokeStyle = fill self.ctx.stroke() # # 以下分別為正齒輪繪圖與主 tkinter 畫布繪圖 # # 定義一個繪正齒輪的繪圖函式 # midx 為齒輪圓心 x 座標 # midy 為齒輪圓心 y 座標 # rp 為節圓半徑, n 為齒數 # pa 為壓力角 (deg) # rot 為旋轉角 (deg) # 注意 n 為 52 齒時繪圖產生錯誤, 因為 base circle 與齒根圓大小未進行判斷, 必須要修正 def Gear(self, midx, midy, rp, n=20, pa=20, color="black"): # 齒輪漸開線分成 15 線段繪製 imax = 15 # 在輸入的畫布上繪製直線, 由圓心到節圓 y 軸頂點畫一直線 self.create_line(midx, midy, midx, midy-rp) # 畫出 rp 圓, 畫圓函式尚未定義 #create_oval(midx-rp, midy-rp, midx+rp, midy+rp, width=2) # a 為模數 (代表公制中齒的大小), 模數為節圓直徑(稱為節徑)除以齒數 # 模數也就是齒冠大小 a=2*rp/n # d 為齒根大小, 為模數的 1.157 或 1.25倍, 這裡採 1.25 倍 d=2.5*rp/n # ra 為齒輪的外圍半徑 ra=rp+a # 畫出 ra 圓, 畫圓函式尚未定義 #create_oval(midx-ra, midy-ra, midx+ra, midy+ra, width=1) # rb 則為齒輪的基圓半徑 # 基圓為漸開線長齒之基準圓 rb=rp*math.cos(pa*deg) # 畫出 rb 圓 (基圓), 畫圓函式尚未定義 #create_oval(midx-rb, midy-rb, midx+rb, midy+rb, width=1) # rd 為齒根圓半徑 rd=rp-d # 當 rd 大於 rb 時 # 畫出 rd 圓 (齒根圓), 畫圓函式尚未定義 #create_oval(midx-rd, midy-rd, midx+rd, midy+rd, width=1) # dr 則為基圓到齒頂圓半徑分成 imax 段後的每段半徑增量大小 # 將圓弧分成 imax 段來繪製漸開線 dr=(ra-rb)/imax # tan(pa*deg)-pa*deg 為漸開線函數 sigma=math.pi/(2*n)+math.tan(pa*deg)-pa*deg for j in range(n): ang=-2.*j*math.pi/n+sigma ang2=2.*j*math.pi/n+sigma lxd=midx+rd*math.sin(ang2-2.*math.pi/n) lyd=midy-rd*math.cos(ang2-2.*math.pi/n) for i in range(imax+1): r=rb+i*dr theta=math.sqrt((r*r)/(rb*rb)-1.) alpha=theta-math.atan(theta) xpt=r*math.sin(alpha-ang) ypt=r*math.cos(alpha-ang) xd=rd*math.sin(-ang) yd=rd*math.cos(-ang) # i=0 時, 繪線起點由齒根圓上的點, 作為起點 if(i==0): last_x = midx+xd last_y = midy-yd # 由左側齒根圓作為起點, 除第一點 (xd,yd) 齒根圓上的起點外, 其餘的 (xpt,ypt)則為漸開線上的分段點 self.create_line((midx+xpt),(midy-ypt),(last_x),(last_y),fill=color) # 最後一點, 則為齒頂圓 if(i==imax): lfx=midx+xpt lfy=midy-ypt last_x = midx+xpt last_y = midy-ypt # the line from last end of dedendum point to the recent # end of dedendum point # lxd 為齒根圓上的左側 x 座標, lyd 則為 y 座標 # 下列為齒根圓上用來近似圓弧的直線 self.create_line((lxd),(lyd),(midx+xd),(midy-yd),fill=color) for i in range(imax+1): r=rb+i*dr theta=math.sqrt((r*r)/(rb*rb)-1.) alpha=theta-math.atan(theta) xpt=r*math.sin(ang2-alpha) ypt=r*math.cos(ang2-alpha) xd=rd*math.sin(ang2) yd=rd*math.cos(ang2) # i=0 時, 繪線起點由齒根圓上的點, 作為起點 if(i==0): last_x = midx+xd last_y = midy-yd # 由右側齒根圓作為起點, 除第一點 (xd,yd) 齒根圓上的起點外, 其餘的 (xpt,ypt)則為漸開線上的分段點 self.create_line((midx+xpt),(midy-ypt),(last_x),(last_y),fill=color) # 最後一點, 則為齒頂圓 if(i==imax): rfx=midx+xpt rfy=midy-ypt last_x = midx+xpt last_y = midy-ypt # lfx 為齒頂圓上的左側 x 座標, lfy 則為 y 座標 # 下列為齒頂圓上用來近似圓弧的直線 self.create_line(lfx,lfy,rfx,rfy,fill=color)
shlomif/PySolFC
refs/heads/master
pysollib/games/grandfathersclock.py
1
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # ---------------------------------------------------------------------------## # # Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 2003 Mt. Hood Playing Card Co. # Copyright (C) 2005-2009 Skomoroh # # 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 pysollib.game import Game from pysollib.gamedb import GI, GameInfo, registerGame from pysollib.hint import CautiousDefaultHint, DefaultHint from pysollib.layout import Layout from pysollib.stack import \ AC_FoundationStack, \ BasicRowStack, \ DealRowTalonStack, \ InitialDealTalonStack, \ InvisibleStack, \ RK_RowStack, \ SC_RowStack, \ SS_FoundationStack, \ SS_RowStack, \ WasteStack, \ WasteTalonStack from pysollib.util import ACE, ANY_SUIT, JACK, KING, QUEEN class GrandfathersClock_Hint(CautiousDefaultHint): # FIXME: demo is not too clever in this game def _getDropCardScore(self, score, color, r, t, ncards): # drop all cards immediately return 92000, color # ************************************************************************ # * Grandfather's Clock # ************************************************************************ class GrandfathersClock(Game): Hint_Class = GrandfathersClock_Hint # # game layout # def createGame(self): # create layout l, s = Layout(self), self.s # set window # (piles up to 9 cards are fully playable in default window size) dh = max(3*l.YS//2+l.CH, l.YS+(9-1)*l.YOFFSET) self.setSize(10*l.XS+l.XM, l.YM+2*dh) # create stacks for i in range(2): x, y = l.XM, l.YM + i*dh for j in range(4): s.rows.append( RK_RowStack(x, y, self, max_move=1, max_accept=1)) x = x + l.XS y = l.YM + dh - l.CH // 2 self.setRegion(s.rows[:4], (-999, -999, x - l.XM // 2, y)) self.setRegion(s.rows[4:], (-999, y, x - l.XM // 2, 999999)) d = [(0, 0), (1, 0.15), (2, 0.5), (2.5, 1.5), (2, 2.5), (1, 2.85)] for i in range(len(d)): d.append((0 - d[i][0], 3 - d[i][1])) x0, y0 = l.XM, l.YM + dh - l.CH for i in range(12): j = (i + 5) % 12 x = int(round(x0 + (6.5+d[j][0]) * l.XS)) y = int(round(y0 + (-1.5+d[j][1]) * l.YS)) suit = (1, 2, 0, 3)[i % 4] s.foundations.append(SS_FoundationStack(x, y, self, suit, base_rank=i+1, mod=13, max_move=0)) s.talon = InitialDealTalonStack( self.width-l.XS, self.height-l.YS, self) # define stack-groups self.sg.openstacks = s.foundations + s.rows self.sg.talonstacks = [s.talon] self.sg.dropstacks = s.rows # # game overrides # def _shuffleHook(self, cards): # move clock cards to bottom of the Talon (i.e. last cards to be dealt) C, S, H, D = 0*13, 1*13, 2*13, 3*13 ids = (1+S, 2+H, 3+C, 4+D, 5+S, 6+H, 7+C, 8+D, 9+S, 10+H, 11+C, 12+D) clocks = [] for c in cards[:]: if c.id in ids: clocks.append(c) cards.remove(c) # sort clocks reverse by rank clocks.sort(key=lambda x: -x.rank) return clocks + cards def startGame(self): self.startDealSample() self.playSample("grandfathersclock", loop=1, priority=200) self._dealNumRows(4) self.s.talon.dealRow() self.s.talon.dealRow(rows=self.s.foundations) shallHighlightMatch = Game._shallHighlightMatch_RK def getHighlightPilesStacks(self): return () def getAutoStacks(self, event=None): # disable auto drop - this would ruin the whole gameplay return ((), (), ()) # ************************************************************************ # * Dial # ************************************************************************ class Dial(Game): def createGame(self): l, s = Layout(self), self.s self.setSize(l.XM+8*l.XS, l.YM+4*l.YS) x0, y0 = l.XM+2*l.XS, l.YM rank = 0 for xx, yy in ((3.5, 0.15), (4.5, 0.5), (5, 1.5), (4.5, 2.5), (3.5, 2.85), (2.5, 3), (1.5, 2.85), (0.5, 2.5), (0, 1.5), (0.5, 0.5), (1.5, 0.15), (2.5, 0), (2.5, 1.5), ): x = int(x0 + xx*l.XS) y = int(y0 + yy*l.YS) s.foundations.append( AC_FoundationStack( x, y, self, suit=ANY_SUIT, dir=0, max_cards=4, base_rank=rank, max_move=0)) rank += 1 x, y = l.XM, l.YM s.talon = WasteTalonStack(x, y, self, max_rounds=2) l.createText(s.talon, 's') l.createRoundText(s.talon, 'sss') x += l.XS s.waste = WasteStack(x, y, self) l.createText(s.waste, 's') l.defaultStackGroups() def startGame(self): self.startDealSample() self.s.talon.dealCards() # deal first card to WasteStack # ************************************************************************ # * Hemispheres # ************************************************************************ BLACK, RED = 0, 1 class Hemispheres_Hint(DefaultHint): def shallMovePile(self, from_stack, to_stack, pile, rpile): if not self._defaultShallMovePile(from_stack, to_stack, pile, rpile): return False if from_stack in self.game.s.rows and to_stack in self.game.s.rows: # check for loops return len(from_stack.cards) == 1 return True class Hemispheres_RowStack(SC_RowStack): def _canSwapPair(self, from_stack): if from_stack not in self.game.s.rows[4:]: return False if len(self.cards) != 1 or len(from_stack.cards) != 1: return False if self in self.game.s.rows[4:10]: alt_rows = self.game.s.rows[10:] color = RED else: alt_rows = self.game.s.rows[4:10] color = BLACK if from_stack not in alt_rows: return False c0, c1 = from_stack.cards[0], self.cards[0] return c0.color == color and c1.color != color def acceptsCards(self, from_stack, cards): if self._canSwapPair(from_stack): return True if not SC_RowStack.acceptsCards(self, from_stack, cards): return False if self in self.game.s.rows[4:10]: if cards[0].color == BLACK: return False return (from_stack in self.game.s.rows[4:10] or from_stack is self.game.s.waste) if self in self.game.s.rows[10:]: if cards[0].color == RED: return False return (from_stack in self.game.s.rows[10:] or from_stack is self.game.s.waste) return False def moveMove(self, ncards, to_stack, frames=-1, shadow=-1): if self._canSwapPair(to_stack): self._swapPairMove(ncards, to_stack, frames=-1, shadow=0) else: SC_RowStack.moveMove(self, ncards, to_stack, frames=frames, shadow=shadow) def _swapPairMove(self, n, other_stack, frames=-1, shadow=-1): game = self.game old_state = game.enterState(game.S_FILL) swap = game.s.internals[0] game.moveMove(n, self, swap, frames=0) game.moveMove(n, other_stack, self, frames=frames, shadow=shadow) game.moveMove(n, swap, other_stack, frames=0) game.leaveState(old_state) class Hemispheres(Game): Hint_Class = Hemispheres_Hint def createGame(self): l, s = Layout(self), self.s self.setSize(l.XM+9.5*l.XS, l.YM+5*l.YS) # internal stack (for swap) s.internals.append(InvisibleStack(self)) x0, y0 = l.XM+1.5*l.XS, l.YM # barriers for xx, yy in ((0, 2), (7, 2), (3.5, 0), (3.5, 4), ): x, y = x0+xx*l.XS, y0+yy*l.YS s.rows.append(BasicRowStack(x, y, self, max_accept=0)) # northern hemisphere (red) for xx, yy in ((0.5, 1), (1.5, 0.5), (2.5, 0.3), (4.5, 0.3), (5.5, 0.5), (6.5, 1), ): x, y = x0+xx*l.XS, y0+yy*l.YS stack = Hemispheres_RowStack(x, y, self, base_color=RED, max_move=1) stack.CARD_YOFFSET = 0 s.rows.append(stack) # southern hemisphere (black) for xx, yy in ((6.5, 3), (5.5, 3.5), (4.5, 3.8), (2.5, 3.8), (1.5, 3.5), (0.5, 3), ): x, y = x0+xx*l.XS, y0+yy*l.YS stack = Hemispheres_RowStack(x, y, self, base_color=BLACK, max_move=1, dir=1) stack.CARD_YOFFSET = 0 s.rows.append(stack) # foundations x, y = x0+2*l.XS, y0+1.5*l.YS for i in range(4): s.foundations.append(SS_FoundationStack(x, y, self, suit=2+i//2, max_move=0)) x += l.XS x, y = x0+2*l.XS, y+l.YS for i in range(4): s.foundations.append(SS_FoundationStack(x, y, self, suit=i//2, max_move=0, base_rank=KING, dir=-1)) x += l.XS # talon & waste x, y = l.XM, l.YM s.talon = WasteTalonStack(x, y, self, max_rounds=1) l.createText(s.talon, 'ne') y += l.YS s.waste = WasteStack(x, y, self) l.createText(s.waste, 'ne') l.defaultStackGroups() def _shuffleHook(self, cards): founds_cards = [] # foundations rows_cards = [] # rows for c in cards[:]: if c.rank in (ACE, KING): cond = ((c.rank == ACE and c.color == RED) or (c.rank == KING and c.color == BLACK)) if cond: cards.remove(c) founds_cards.append(c) elif c.deck == 0: cards.remove(c) rows_cards.append(c) founds_cards.sort(key=lambda x: (-x.rank, -x.suit)) rows_cards.sort(key=lambda x: (x.rank, x.suit)) return cards+rows_cards+founds_cards def startGame(self): self.s.talon.dealRow(rows=self.s.foundations, frames=0) self._startAndDealRowAndCards() def fillStack(self, stack): if stack in self.s.rows[4:] and not stack.cards: old_state = self.enterState(self.S_FILL) if not self.s.waste.cards: self.s.talon.dealCards() if self.s.waste.cards: self.s.waste.moveMove(1, stack) self.leaveState(old_state) def shallHighlightMatch(self, stack1, card1, stack2, card2): # by color return card1.color == card2.color and abs(card1.rank-card2.rank) == 1 # ************************************************************************ # * Big Ben # ************************************************************************ class BigBen_Talon(DealRowTalonStack): def dealCards(self, sound=False): if not self.cards: return 0 rows = [s for s in self.game.s.rows if len(s.cards) < 3] if not rows: # deal to the waste if sound and not self.game.demo: self.game.playSample("dealwaste") self.game.flipAndMoveMove(self, self.game.s.waste) return 1 # deal to the rows if sound and self.game.app.opt.animations: self.game.startDealSample() ncards = 0 while rows: n = self.dealRowAvail(rows=rows, sound=False) if not n: break ncards += n rows = [s for s in self.game.s.rows if len(s.cards) < 3] if sound: self.game.stopSamples() return ncards class BigBen_RowStack(SS_RowStack): def acceptsCards(self, from_stack, cards): if not SS_RowStack.acceptsCards(self, from_stack, cards): return False if len(self.cards) < 3: return False return True class BigBen(Game): Hint_Class = CautiousDefaultHint def createGame(self): l, s = Layout(self), self.s self.setSize(l.XM+12*l.XS, l.YM+5.5*l.YS) y = l.YM for i in range(2): x = l.XM for j in range(6): s.rows.append(BigBen_RowStack(x, y, self, max_move=1, mod=13)) x += l.XS y += 2.75*l.YS x0, y0 = l.XM+6*l.XS, l.YM rank = 1 for xx, yy in ( (0, 1.5), (0.5, 0.5), (1.5, 0.15), (2.5, 0), (3.5, 0.15), (4.5, 0.5), (5, 1.5), (4.5, 2.5), (3.5, 2.85), (2.5, 3), (1.5, 2.85), (0.5, 2.5), ): x = int(x0 + xx*l.XS) y = int(y0 + yy*l.YS) suit = (3, 0, 2, 1)[rank % 4] max_cards = rank <= 4 and 8 or 9 s.foundations.append(SS_FoundationStack(x, y, self, suit=suit, max_cards=max_cards, base_rank=rank, mod=13, max_move=0)) rank += 1 x, y = self.width-l.XS, self.height-l.YS s.talon = BigBen_Talon(x, y, self, max_rounds=1) l.createText(s.talon, 'n') x -= l.XS s.waste = WasteStack(x, y, self) l.createText(s.waste, 'n') l.defaultStackGroups() def _shuffleHook(self, cards): # move clock cards to top of the Talon (i.e. first cards to be dealt) C, S, H, D = list(range(4)) # suits t = [(1, C), (2, H), (3, S), (4, D), (5, C), (6, H), (7, S), (8, D), (9, C), (JACK, H), (QUEEN, S), (KING, D)] clocks = [] for c in cards[:]: if (c.rank, c.suit) in t: t.remove((c.rank, c.suit)) cards.remove(c) clocks.append(c) if not t: break # sort clocks reverse by rank clocks.sort(key=lambda x: -x.rank) return cards+clocks def startGame(self): self.startDealSample() self.s.talon.dealRow(rows=self.s.foundations, frames=4) for i in range(3): self.s.talon.dealRow(frames=4) def _autoDeal(self, sound=True): # don't deal a card to the waste if the waste is empty return 0 shallHighlightMatch = Game._shallHighlightMatch_SSW # ************************************************************************ # * Clock # ************************************************************************ class Clock_RowStack(RK_RowStack): def _numFaceDown(self): ncards = 0 for c in self.cards: if not c.face_up: ncards += 1 return ncards def acceptsCards(self, from_stack, cards): return cards[0].rank == self.id def moveMove(self, ncards, to_stack, frames=-1, shadow=-1): self._swapPairMove(ncards, to_stack, frames=-1, shadow=0) def _swapPairMove(self, n, other_stack, frames=-1, shadow=-1): is_king = other_stack.cards[-1].rank == KING game = self.game old_state = game.enterState(game.S_FILL) swap = game.s.internals[0] ncards = other_stack._numFaceDown() for i in range(ncards): game.moveMove(n, other_stack, swap, frames=0) game.moveMove(n, self, other_stack, frames=0) for i in range(ncards): game.moveMove(n, swap, other_stack, frames=0) game.flipMove(other_stack) game.moveMove(n, other_stack, self) if is_king: self._moveKingToBottom() game.leaveState(old_state) def _moveKingToBottom(self): # move king to bottom of stack game = self.game swap, swap2 = game.s.internals game.moveMove(1, self, swap2, frames=0) ncards = self._numFaceDown() for i in range(ncards): game.moveMove(1, self, swap, frames=0) game.moveMove(1, swap2, self, frames=0) for i in range(ncards): game.moveMove(1, swap, self, frames=0) if not self.cards[-1].face_up: game.flipMove(self) self._fillStack() def _fillStack(self): c = self.cards[-1] n = self._numFaceDown() if n == 0: return if c.face_up and c.rank == KING: self._moveKingToBottom() def canFlipCard(self): return False class Clock(Game): def createGame(self): # create layout l, s = Layout(self), self.s # set window dx = l.XS + 3*l.XOFFSET w = max(5.25*dx + l.XS, 5.5*dx) self.setSize(l.XM + w, l.YM + 4*l.YS) # create stacks for xx, yy in ( (3.25, 0.15), (4.25, 0.5), (4.5, 1.5), (4.25, 2.5), (3.25, 2.85), (2.25, 3), (1.25, 2.85), (0.25, 2.5), (0, 1.5), (0.25, 0.5), (1.25, 0.15), (2.25, 0), ): x = l.XM + xx*dx y = l.YM + yy*l.YS stack = Clock_RowStack(x, y, self, max_move=0) stack.CARD_XOFFSET, stack.CARD_YOFFSET = l.XOFFSET, 0 stack.SHRINK_FACTOR = 1 s.rows.append(stack) x, y = l.XM + 2.25*dx, l.YM + 1.5*l.YS stack = Clock_RowStack(x, y, self, max_move=1) stack.CARD_XOFFSET, stack.CARD_YOFFSET = l.XOFFSET, 0 stack.SHRINK_FACTOR = 1 s.rows.append(stack) x, y = self.width - l.XS, self.height - l.YS s.talon = InitialDealTalonStack(x, y, self) # create an invisible stacks s.internals.append(InvisibleStack(self)) s.internals.append(InvisibleStack(self)) # default l.defaultAll() def startGame(self): for i in range(3): self.s.talon.dealRow(frames=0, flip=False) self.startDealSample() self.s.talon.dealRow(flip=False) self.flipMove(self.s.rows[-1]) self.s.rows[-1]._fillStack() def isGameWon(self): for r in self.s.rows: if not r.cards[-1].face_up: return False return True def getHighlightPilesStacks(self): return () def getAutoStacks(self, event=None): return (), (), () # register the game registerGame(GameInfo(261, GrandfathersClock, "Grandfather's Clock", GI.GT_1DECK_TYPE | GI.GT_OPEN, 1, 0, GI.SL_BALANCED)) registerGame(GameInfo(682, Dial, "Dial", GI.GT_1DECK_TYPE, 1, 1, GI.SL_LUCK)) registerGame(GameInfo(690, Hemispheres, "Hemispheres", GI.GT_2DECK_TYPE, 2, 0, GI.SL_BALANCED, altnames=("The Four Continents",))) registerGame(GameInfo(697, BigBen, "Big Ben", GI.GT_2DECK_TYPE, 2, 0, GI.SL_BALANCED)) registerGame(GameInfo(737, Clock, "Clock", GI.GT_1DECK_TYPE, 1, 0, GI.SL_LUCK, altnames=("Travellers",)))
showliu/android_kernel_xiaomi_aries-1
refs/heads/cm-12.1
tools/perf/scripts/python/sctop.py
11180
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified, the display # will be refreshed every [interval] seconds. The default interval is # 3 seconds. import os, sys, thread, time sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * usage = "perf script -s sctop.py [comm] [interval]\n"; for_comm = None default_interval = 3 interval = default_interval if len(sys.argv) > 3: sys.exit(usage) if len(sys.argv) > 2: for_comm = sys.argv[1] interval = int(sys.argv[2]) elif len(sys.argv) > 1: try: interval = int(sys.argv[1]) except ValueError: for_comm = sys.argv[1] interval = default_interval syscalls = autodict() def trace_begin(): thread.start_new_thread(print_syscall_totals, (interval,)) pass def raw_syscalls__sys_enter(event_name, context, common_cpu, common_secs, common_nsecs, common_pid, common_comm, id, args): if for_comm is not None: if common_comm != for_comm: return try: syscalls[id] += 1 except TypeError: syscalls[id] = 1 def print_syscall_totals(interval): while 1: clear_term() if for_comm is not None: print "\nsyscall events for %s:\n\n" % (for_comm), else: print "\nsyscall events:\n\n", print "%-40s %10s\n" % ("event", "count"), print "%-40s %10s\n" % ("----------------------------------------", \ "----------"), for id, val in sorted(syscalls.iteritems(), key = lambda(k, v): (v, k), \ reverse = True): try: print "%-40s %10d\n" % (syscall_name(id), val), except TypeError: pass syscalls.clear() time.sleep(interval)