content
stringlengths
7
1.05M
# person = dict(first_name="Bob", last_name="Smith") person = { "first_name": "Bob", "last_name": "Smith", "age": 34, "jobs": { "programmer": "Sr. Developer", "crochet": "Magazine Editor for Crocheting" } } # person["jobs"]["programmer"] # person = dict([ # ("first_name", "Bob"), # ("last_name", "Smith"), # ]) # print(person) # del person["age"] # print(person) # print(person["first_name"]) # person["age"] = 32 # print(person) for key in person: print(key + ": " + str(person[key]))
# Personalizando a representação string de uma classe class MinhasCores(): def __init__(self): self.red = 50 self.green = 75 self.blue = 100 # TODO: Use getattr para retornar um valor de forma dinâmica # TODO: Use setattr para retornar um valor de forma dinâmica # TODO: Use dir para listar os atributos disponíveis def main(): # Criando uma instância de MinhasCores cores = MinhasCores() # TODO: Mostre o valor de um atributo # TODO: Defina o valor de um atributo # TODO: Acesse um atributo específico # TODO: Liste os atributos disponíveis if __name__ == "__main__": main()
""" Faça um programa que leia uma frase pelo teclado quantas vezes aparece letra A em que posição aparece primeiro em que posição aparece pela última vez """ frase = input('Digite uma frase: ') fraseLower = frase.lower() print('A letra A aparece {} vez(es).'.format(fraseLower.count('a'))) print('A letra A inicia a aparição na posição {}.'.format(fraseLower.strip().find('a')+1)) # FIND da esquerda para direita print('A letra A aparece a última vez na posição {}'.format(fraseLower.strip().rfind('a')+1)) # RFIND da direita para esquerda
k, q = map(int, input().split()) dp = [[0.0 for i in range(k + 1)] for j in range(10000)] dp[0][0] = 1.0 for i in range(1, 10000): for j in range(1, k + 1): dp[i][j] = dp[i - 1][j] * j / k + dp[i - 1][j - 1] * (k - j + 1) / k for t in range(q): p = int(input()) for i in range(10000): if p <= dp[i][k] * 2000: print(i) break
def readlist(file="day_05/input.txt"): with open(file, "r") as f: return [int(char) for char in f.readline().split(",")] def parse_instruction(instruction): sint = str(instruction).zfill(5) parm3 = bool(int(sint[0])) parm2 = bool(int(sint[1])) parm1 = bool(int(sint[2])) op = int(sint[-2:]) return op, parm1, parm2, parm3 def opcoder(): in_list = readlist() i = 0 inputs = 0 singleinput = 1 def parmnum(parm, num): if parm: return num else: return in_list[num] while in_list[i] != 99: op, parm1, parm2, parm3 = parse_instruction(in_list[i]) j = parmnum(parm1, i + 1) k = parmnum(parm2, i + 2) m = parmnum(parm3, i + 3) if op == 1: in_list[m] = in_list[j] + in_list[k] i += 4 elif op == 2: in_list[m] = in_list[j] * in_list[k] i += 4 elif op == 3: in_list[j] = singleinput inputs += 1 i += 2 elif op == 4: if in_list[j] != 0: print(in_list[j]) i += 2 else: raise (ValueError) assert inputs == 1 return True opcoder() def opcoder2(): in_list = readlist() i = 0 inputs = 0 singleinput = 5 def parmnum(parm, num): if parm: return num else: return in_list[num] while in_list[i] != 99: op, parm1, parm2, parm3 = parse_instruction(in_list[i]) j = parmnum(parm1, i + 1) k = parmnum(parm2, i + 2) m = parmnum(parm3, i + 3) if op == 1: in_list[m] = in_list[j] + in_list[k] i += 4 elif op == 2: in_list[m] = in_list[j] * in_list[k] i += 4 elif op == 3: in_list[j] = singleinput inputs += 1 i += 2 elif op == 4: print(in_list[j]) i += 2 elif op == 5: if in_list[j] != 0: i = in_list[k] else: i += 3 elif op == 6: if in_list[j] == 0: i = in_list[k] else: i += 3 elif op == 7: if in_list[j] < in_list[k]: in_list[m] = 1 else: in_list[m] = 0 i += 4 elif op == 8: if in_list[j] == in_list[k]: in_list[m] = 1 else: in_list[m] = 0 i += 4 else: raise (ValueError) assert inputs == 1 return True opcoder2()
#Bases Númericas - Conversão num = int(input('Digite um numero inteiro: ')) conversao = int(input( 'Selecione a base de conversão: \n 1.Binário \n 2.Octal \n 3.Hexadecimal\nDigite sua opção: ')) if conversao == 1: print('O numero convertido para binario : {}'.format(bin(num)[2:])) elif conversao == 2: print('O numero convertido para Octal : {}'.format(oct(num)[2:])) elif conversao ==3 : print('O numero convertido para Hexadecimal: {}'.format(hex(num)[2:])) else: print('opção inválida')
# https://projecteuler.net/problem=63 """ The reason i have choosen 25 is because any number which when is raised to the power of 25 gradually increases from 8 digits of 2^25 linearly(at first with a diffrence of 4(that is num_of_digit in 2^25 is 8 and 3^25 id 12) which starts halfening) ,hence all the sollution must lie for numbers below 25 only, since any number x^(any_num_greater_than_25) is greater than x^25. """ count=0 for i in range(1,25): for t in range(1,25): if len(str(t**i))==i: count+=1 print(count) # 49 -- answer
def cantApariciones(letra, cadena): cant=0 for i in range(len(cadena)): if (letra==cadena[i]): cant+=1 return (cant) def imprimeCantApariciones(cadena): listaAparecidos=[] for i in range(len(cadena)): letra=cadena[i] if (cantApariciones(letra,listaAparecidos)==0): print (letra, ": ", cantApariciones(letra,cadena)) listaAparecidos.append(letra) palabra=input("Ingrese una palabra") print(palabra) imprimeCantApariciones(palabra)
'''Desenvolva um programa que leia o primeiro termo e a razão de uma PA. No final, mostre os 10 primeiros termos dessa progressão.''' primeiroTermo = int(input("Qual o primeiro Termo da PA: ")) razao = int(input("Qual a razão dessa PA: ")) decimo = primeiroTermo + (10 - 1) * razao for c in range(primeiroTermo,decimo + razao,razao): print("{}".format(c), end=" -> ") print("FIM")
""" 2 If-Abfragen (Tag 1) 2.4 Überprüfe, ob ein vorher festgelegtes Jahr ein Schaltjahr ist. Hinweise: - Jahreszahl nicht durch 4 teilbar: kein Schaltjahr - Jahreszahl durch 4 teilbar: Schaltjahr - Jahreszahl durch 100 teilbar: kein Schaltjahr - Jahreszahl durch 400 teilbar: Schaltjahr Beispiele: - 2000, 2004 sind Schaltjahre - 1900, 2006 sind keine Schaltjahre """ def ist_schaltjahr(jahr): return (jahr % 4 == 0 and jahr % 100 != 0) or jahr % 400 == 0 if __name__ == '__main__': print(f'Das Jahr 1900 ist', " ein" if ist_schaltjahr(1900) else "kein", 'Schaltjahr.') print(f'Das Jahr 2000 ist', " ein" if ist_schaltjahr(2000) else "kein", 'Schaltjahr.') print(f'Das Jahr 2001 ist', " ein" if ist_schaltjahr(2001) else "kein", 'Schaltjahr.') print(f'Das Jahr 2004 ist', " ein" if ist_schaltjahr(2004) else "kein", 'Schaltjahr.') print(f'Das Jahr 2006 ist', " ein" if ist_schaltjahr(2006) else "kein", 'Schaltjahr.')
# ***************************************************************** # Copyright 2015 MIT Lincoln Laboratory # Project: SPAR # Authors: SY # Description: IBM TA2 batch class # # Modifications: # Date Name Modification # ---- ---- ------------ # 14 Nov 2012 SY Original Version # ***************************************************************** class IBMBatch(list): """ This class represents a batched input. """ def __str__(self): return "".join([str(int(inp_bit)) for inp_bit in self]) def get_num_values(self, value): """returns the number of instances of value in the batch""" num_values = 0 for elt in self: if elt == value: num_values += 1 return num_values
# _*_ coding: utf-8 _*_ # # Package: bookstore.src.core.repository.databases __all__ = ["book_repository", "db_repository", "mysql_repository"]
mock_history_data = { "coord": [50.0, 50.0], "list": [ { "main": {"aqi": 2}, "components": { "co": 270.367, "no": 5.867, "no2": 43.184, "o3": 4.783, "so2": 14.544, "pm2_5": 13.448, "pm10": 15.524, "nh3": 0.289, }, "dt": 1606482000, }, { "main": {"aqi": 2}, "components": { "co": 280.38, "no": 8.605, "no2": 42.155, "o3": 2.459, "so2": 14.901, "pm2_5": 15.103, "pm10": 17.249, "nh3": 0.162, }, "dt": 1606478400, }, ], } mock_pollution_data = { "coord": {"lon": 123.12, "lat": 49.28}, "list": [ { "main": {"aqi": 1}, "components": { "co": 310.42, "no": 0, "no2": 11.14, "o3": 35.76, "so2": 0.58, "pm2_5": 3.33, "pm10": 4.76, "nh3": 0.1, }, "dt": 1642748400, } ], } mock_forecast_data = { "coord": [50.0, 50.0], "list": [ { "main": {"aqi": 2}, "components": { "co": 270.367, "no": 5.867, "no2": 43.184, "o3": 4.783, "so2": 14.544, "pm2_5": 13.448, "pm10": 15.524, "nh3": 0.289, }, "dt": 1606482000, }, { "main": {"aqi": 2}, "components": { "co": 280.38, "no": 8.605, "no2": 42.155, "o3": 2.459, "so2": 14.901, "pm2_5": 15.103, "pm10": 17.249, "nh3": 0.162, }, "dt": 1606478400, }, ], } mock_api_invalid_key_error = { "cod": 401, "message": "Invalid API key. Please see \ http://openweathermap.org/faq#error401 for more info.", } mock_params = { "lat": 49.28, "lon": 123.12, "start": 1606488670, "end": 1606747870, "appid": "mock_api_key", } mock_incorrect_params = { "lat": "latitude_val", "lon": "longitude_val", "lat_oor": -100.0, "lon_oor": 181.0, "start": 1234.567, "end": 3.14159, "appid": "invalid_api_key", } mock_error_params = { "lat": "latitude_val", "lon": "longitude_val", "lat_oor": -100.0, "lon_oor": 181.0, "start": 1234.567, "end": 3.14159, "appid": "api_error", } mock_invalid_message = "Invalid API key. Please see \ http://openweathermap.org/faq#error401 for more info."
class Matrix: """ Square matrix """ def __init__(self, matrix): assert len(matrix) == len(matrix[0]), "expected a square matrix" self.container = matrix def __mul__(self, other): if not isinstance(other, Matrix): return TypeError assert len(self.container) == len(other.container) matrix = [] for i in range(len(self.container)): row = [] for j in range(len(self.container)): row.append(self.dotProduct(self.getRow(i), other.getCol(j))) matrix.append(row) return Matrix(matrix) def getRow(self, i): return self.container[i][0:len(self.container)] def getCol(self, i): col = [] for k in range(len(self.container)): col.append(self.container[k][i]) return col def dotProduct(self, row, col): value = 0 assert(len(row) == len(col)) for k in range(len(row)): value += (row[k]*col[k]) return value % 2 def is_identity(self): for k in range(len(self.container)): if self.container[k][k] == 0: return False return True def __repr__(self): return str(self.container)
#! /usr/bin/env python """Module with a dictionary and variables for storing constant parameters. Usage ----- from param import VLT_NACO VLT_NACO['diam'] """ VLT_SPHERE = { 'latitude' : -24.627, 'longitude' : -70.404, 'plsc' : 0.01225, # plate scale [arcsec]/px 'diam': 8.2, # telescope diameter [m] } VLT_NACO = { 'latitude' : -24.627, 'longitude' : -70.404, 'plsc': 0.027190, # plate scale [arcsec]/px 'diam': 8.2, # telescope diameter [m] 'lambdal' : 3.8e-6, # filter central wavelength [m] L band 'camera_filter' : 'Ll', # header keywords 'kw_categ' : 'HIERARCH ESO DPR CATG', # header keyword for calibration frames: 'CALIB' / 'SCIENCE' 'kw_type' : 'HIERARCH ESO DPR TYPE' # header keyword for frame type: 'FLAT,SKY' / 'DARK' / 'OBJECT' / 'SKY' } VLT_SINFONI = { 'latitude' : -24.627, 'longitude' : -70.404, # plsc: depending on the chosen mode, can also be: 0.125'' or 0.05'' 'plsc': 0.0125, # plate scale [arcsec]/px 'diam': 8.2, # telescope diameter [m] 'camera_filter' : 'H+K', 'lambdahk': 1.95e-6, # wavelength of the middle of H+K 'lambdah': 1.65e-6, # wavelength of the middle of H band 'lambdak': 2.166e-6, # wavelength of the Brackett gamma line (~middle of the K band) 'spec_res':5e-4, # spectral resolution in um (for H+K) # header keywords 'kw_categ' : 'HIERARCH ESO DPR CATG', # header keyword for calibration frames: 'CALIB' / 'SCIENCE' 'kw_type' : 'HIERARCH ESO DPR TYPE' # header keyword for frame type: 'FLAT,SKY' / 'DARK' / 'OBJECT' / 'SKY' } LBT = { 'latitude' : 32.70131, # LBT's latitude in degrees 'longitude' : -109.889064, # LBT's longitude in degrees 'lambdal' : 3.47e-6, # central wavelenght L cont2' band [m] 'plsc' : 0.0106, # plate scale [arcsec]/px 'diam' : 8.4, # telescope diameter [m] # header keywords 'lst': 'LBT_LST', # Local sidereal Time header keyword 'ra' : 'LBT_RA', # right ascension header keyword 'dec' : 'LBT_DEC', # declination header keyword 'altitude' : 'LBT_ALT', # altitude header keyword 'azimuth' : 'LBT_AZ', # azimuth header keyword 'exptime' : 'EXPTIME', # nominal total integration time per pixel header keyword 'acqtime' : 'ACQTIME', # total controller acquisition time header keyword 'filter' : 'LMIR_FW2' # filter } KECK_NIRC2 = { 'plsc_narrow' : 0.009942, # plate scale [arcsec]/px, narrow camera 'plsc_medium' : 0.019829, # plate scale [arcsec]/px, medium camera 'plsc_wide' : 0.039686, # plate scale [arcsec]/px, wide camera 'latitude' : 19.82636, # Keck's latitude in degrees # header keywords 'camera_name' : 'CAMNAME' # camera name bwt narrow, medium and wide }
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Filename: ClimbingStairs.py # @Author: olenji - lionhe0119@hotmail.com # @Description: # @Create: 2019-07-23 11:58 # @Last Modified: 2019-07-23 11:58 class Solution: def climbStairs(self, n: int) -> int: if n == 1: return 1 a = 1 b = 2 for i in range(n): b, a = a + b , b return b if __name__ == '__main__': s = Solution() print(s.climbStairs(10))
word = 'banana' count = 0 for letter in word: if letter == 'n': count = count + 1 print(count)
""" 1704. Determine if String Halves Are Alike Easy 151 10 Add to List Share You are given a string s of even length. Split this string into two halves of equal lengths, and let a be the first half and b be the second half. Two strings are alike if they have the same number of vowels ('a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'). Notice that s contains uppercase and lowercase letters. Return true if a and b are alike. Otherwise, return false. Example 1: Input: s = "book" Output: true Explanation: a = "bo" and b = "ok". a has 1 vowel and b has 1 vowel. Therefore, they are alike. Example 2: Input: s = "textbook" Output: false Explanation: a = "text" and b = "book". a has 1 vowel whereas b has 2. Therefore, they are not alike. Notice that the vowel o is counted twice. Example 3: Input: s = "MerryChristmas" Output: false Example 4: Input: s = "AbCdEfGh" Output: true Constraints: 2 <= s.length <= 1000 s.length is even. s consists of uppercase and lowercase letters. """ class Solution: def halvesAreAlike(self, s: str) -> bool: vowels = set('aeiouAEIOU') a = b = 0 i, j = 0, len(s)-1 while i < j: a += s[i] in vowels b += s[j] in vowels i += 1 j -= 1 return a == b
class Solution(object): def findRestaurant(self, list1, list2): """ :type list1: List[str] :type list2: List[str] :rtype: List[str] """ lookup = {} for i, s in enumerate(list1): lookup[s] = i result = [] min_sum = float("inf") for j, s in enumerate(list2): if j > min_sum: break if s in lookup: if j + lookup[s] < min_sum: result = [s] min_sum = j + lookup[s] elif j + lookup[s] == min_sum: result.append(s) return result list1 = ["Shogun","Tapioca Express","Burger King","KFC"] list2 = ["Piatti","The Grill at Torrey Pines","Hungry Hunter Steakhouse","Shogun"] print(Solution().findRestaurant(list1, list2))
n = int(input()) left_dp = [1] * (n + 1) right_dp = [1] * (n + 1) arr = list(map(int, input().split())) for i in range(1, n): for j in range(i): if arr[j] < arr[i]: left_dp[i] = max(left_dp[i], left_dp[j] + 1) for i in range(n - 2, -1, -1): for j in range(n - 1, i, -1): if arr[j] < arr[i]: right_dp[i] = max(right_dp[i], right_dp[j] + 1) result = 0 for i in range(n): result = max(result, left_dp[i] + right_dp[i] - 1) print(result)
#encoding:utf-8 subreddit = 'ani_bm' t_channel = '@cahaf_avir' def send_post(submission, r2t): return r2t.send_simple(submission)
class Computer: def __init__(self,name,size): self.brand = name self.size = size class Laptop(Computer): def __init__(self,name,size,model): super().__init__(name,size) self.model = model if __name__ == "__main__": abc = Laptop('MSI','15.6','GL Series') print("Name: {}".format(abc.brand)) print("Size: {}".format(abc.size)) print("Model: {}".format(abc.model))
def div_elem_list(list, divider): try: return [i /divider for i in list] except ZeroDivisionError as e: print(e, '- this is the error.') return list list = list(range(10)) divider = 0 print(div_elem_list(list, divider)) # que permiten que tu no vas a tener errores dentro # de tu codigo, y te permite manejar estas excepciones # para que tu codigo no falle cuando se encuentre con # estos errores. #All possible errors # except TypeError: # print("is thrown when an operation or function is applied to an object of an inappropriate type.") # except IndexError: # print("is thrown when trying to access an item at an invalid index.") # except KeyError: # print("is thrown when a key is not found.") # except ImportError: # print("Raised when the imported module is not found.") # except StopIteration: # print("is thrown when the next() function goes beyond the iterator items.") # except ValueError: # print("is thrown when a function's argument is of an inappropriate type.") # except NameError: # print("is thrown when an object could not be found.") # except ZeroDivisionError: # print("is thrown when the second operator in the division is zero.") # except KeyboardInterrupt: # print("is thrown when the user hits the interrupt key (normally Control-C) during the execution of the program.") # except MemoryError: # print("Raised when an operation runs out of memory.") # except FloatingPointError: # print("Raised when a floating point operation fails.") # except OverflowError: # print("Raised when the result of an arithmetic operation is too large to be represented.") # except ReferenceError: # print("Raised when a weak reference proxy is used to access a garbage collected referent.") # except TabError: # print("Raised when the indentation consists of inconsistent tabs and spaces.") # except SystemError: # print("Raised when the interpreter detects internal error.") # except RuntimeError: # print("Raised when an error does not fall under any other category.") # except: # print("Error detected can't be handled nor clasified.")
# Object change log actions OBJECT_CHANGE_ACTION_CREATE = 1 OBJECT_CHANGE_ACTION_UPDATE = 2 OBJECT_CHANGE_ACTION_DELETE = 3 OBJECT_CHANGE_ACTION_CHOICES = ( (OBJECT_CHANGE_ACTION_CREATE, "Created"), (OBJECT_CHANGE_ACTION_UPDATE, "Updated"), (OBJECT_CHANGE_ACTION_DELETE, "Deleted"), ) # User Actions Constants USER_ACTION_CREATE = 1 USER_ACTION_EDIT = 2 USER_ACTION_DELETE = 3 USER_ACTION_IMPORT = 4 USER_ACTION_BULK_DELETE = 5 USER_ACTION_BULK_EDIT = 6 USER_ACTION_CHOICES = ( (USER_ACTION_CREATE, "created"), (USER_ACTION_EDIT, "modified"), (USER_ACTION_DELETE, "deleted"), (USER_ACTION_IMPORT, "imported"), (USER_ACTION_BULK_DELETE, "bulk deleted"), (USER_ACTION_BULK_EDIT, "bulk modified"), )
class FileStructureHelper: def __init__(self, run_settings): self.run_settings = run_settings def get_project_directory(self): return self.run_settings.app_directory + '/projects/' + self.run_settings.project def get_config_file_path(self): return self.get_project_directory() + "/config.yaml"
""" Copyright (c) 2019-2020, the Decred developers See LICENSE for details """ class DecredError(Exception): pass
# The usual way numbers = [1, 2, 3, 4, 5, 6] new_numbers = [] for f in numbers: new_num = f + 1 new_numbers.append(new_num) print(new_numbers) # 6 lines!! # With list comperhension numbers = [1, 2, 3, 4, 5, 6] new_numbers = [n + 1 for n in numbers] print(new_numbers) # 3 lines!! # Using list comperhension with range() range_list = [item*2 for item in range(1, 5)] # Looping through a list of strings names = ['Alex', 'Beth', 'Dave', 'Carolinnie', 'dave', 'freddie'] short_names = [name for name in names if len(name) < 5] upper_names = [name.upper() for name in names]
""" Given a list, rotate the list to the right by k places, where k is non-negative. Example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. """ # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def rotateRight(self, head, k): """ :type head: ListNode :type k: int :rtype: ListNode """ """ Method 1: Iterative Function def rotateList logic works well Could be used for reference """ # if not head: # return [] # if not head.next: # return head # def rotateList(head): # dummy = current_ptr = ListNode(None) # dummy.next = head # current_ptr.next = head # while current_ptr.next.next != None: # current_ptr = current_ptr.next # last_ptr = current_ptr.next # last_ptr.next = head # current_ptr.next = None # dummy.next = last_ptr # return dummy.next # for _ in range(k): # head = rotateList(head) # return head """ Method 2: Iterative Function Works on the same logic as Method 1 with rotateTimes = k%length Your runtime beats 5.10 % of python submissions. """ if not head: return [] if not head.next: return head pointer = head length = 1 while pointer.next: pointer = pointer.next length += 1 rotateTimes = k % length if k == 0 or rotateTimes == 0: return head def rotateList(head): dummy = current_ptr = ListNode(None) dummy.next = head current_ptr.next = head while current_ptr.next.next != None: current_ptr = current_ptr.next last_ptr = current_ptr.next last_ptr.next = head current_ptr.next = None dummy.next = last_ptr return dummy.next for _ in range(rotateTimes): head = rotateList(head) return head
def sum_numbers(num1, num2): return num1 + num2 def multiply_numbers(num1, num2): return num1 * num2 def func_executor(*args): results = [] for arg in args: func, nums = arg results.append(func(*nums)) return results print(func_executor((sum_numbers, (1, 2)), (multiply_numbers, (2, 4))))
# -*- coding: utf-8 -*- ############################################################################# # Copyright Vlad Popovici <popovici@bioxlab.org> # # Licensed under the MIT License. See LICENSE file in root folder. ############################################################################# __author__ = "Vlad Popovici <popovici@bioxlab.org>" __version__ = 0.1 class Error(Exception): """Basic error exception for QPATH. Args: msg (str): Human-readable string describing the exception. code (:obj:`int`, optional): Error code. Attributes: msg (str): Human-readable string describing the exception. code (int): Error code. """ def __init__(self, msg, code=1, *args): self.message = "QPATH: " + msg self.code = code super(Error, self).__init__(msg, code, *args)
# def changeName(n): # n = 'ada' # name = 'yiğit' # changeName(name) # print(name) # def change(n): # n[0] = 'istanbul' # sehirler = ['ankara','izmir'] # change(sehirler[:]) # print(sehirler) def add(*params): # tuple kullanırken * tek yıldız kullanılır print(type(params)) sum = 0 for n in params: sum = sum +n return sum print(add(10,20,50)) print(add(10,20,30)) print(add(10,20,30,40,50,60,150,200)) def displayUser(**args): # dictionary kullanırken ** çift yıldız kullanılır print(type(args)) for key, value in args.items(): print('{} is {}'.format(key,value)) displayUser(name='Mehmet', age = 17, city = 'istanbul') displayUser(name='Hasan', age = 16, city = 'istanbul', phone = '05324851154') displayUser(name='Yiğit', age = 13, city = 'kocaeli', phone = '05356457896', email = 'hacı@gmail.com') def myFunc(a, b, c, *args, **kwargs): print(a) print(b) print(c) print(args) print(kwargs) myFunc(10, 20, 30, 40, 50, 60, 70, key1 = 'value 1', key2 = 'value 2')
class Solution: def matrixBlockSum(self, mat: List[List[int]], K: int) -> List[List[int]]: if not mat: return [] m = len(mat) n = len(mat[0]) get = lambda i, j: mat[i][j] if 0 <= i < m and 0 <= j < n else 0 row = lambda i, j: sum([get(i, y) for y in range(j - K, j + K + 1)]) col = lambda i, j: sum([get(x, j) for x in range(i - K, i + K + 1)]) answer = [[0] * n for _ in range(m)] for i in range(0, K + 1): for j in range(0, K + 1): answer[0][0] += get(i, j) for i in range(m): for j in range(n): if i == 0 and j == 0: continue if j == 0: answer[i][j] = answer[i - 1][j] - row(i - K - 1, j) + row(i + K, j) else: answer[i][j] = answer[i][j - 1] - col(i, j - K - 1) + col(i, j + K) return answer
'''Starlark rule for packaging Python 3 Google Cloud Functions.''' SRC_ZIP_EXTENSION = 'zip' SRC_PY_EXTENSION = 'py' MEMORY_VALUES = [ 128, 256, 512, 1024, 2048, 4096, ] MAX_TIMEOUT = 540 DEPLOY_SCRIPT_TEMPLATE = '''#!/usr/bin/env fish set gcf_archive (status --current-filename | sed 's/\.fish$/\.zip/' | xargs realpath) set temp_dir (mktemp -d) unzip $gcf_archive -d $temp_dir > /dev/null {gcloud_cmdline} --source $temp_dir rm -rf $temp_dir ''' def _compute_module_name(f): return f.basename.split('.')[0] def _compute_module_path(f): components = [] components.extend(f.dirname.split('/')) components.append(_compute_module_name(f)) return '.'.join(components) def _py_cloud_function_impl(ctx): src_zip = None src_py = None for f in ctx.attr.src.files.to_list(): if f.extension == SRC_ZIP_EXTENSION: src_zip = f if f.extension == SRC_PY_EXTENSION: src_py = f if not src_zip: fail('ZIP src input not found.', 'src') if not src_py: fail('PY src input not found.', 'src') args = [] args.extend([ '--src_zip_path', src_zip.path, '--module_name', ctx.attr.module or _compute_module_path(src_py), '--function_name', ctx.attr.entry, '--output_archive', ctx.outputs.code_archive.path, '--workspace_name', ctx.workspace_name, ]) if ctx.attr.requirements_file: if len(ctx.attr.requirements_file.files.to_list()) > 1: fail('There should be only 1 requirements file input.', 'requirements_file') args.extend([ '--requirements_file', ctx.attr.requirements_file.files.to_list()[0].path, ]) if ctx.attr.requirements: args.extend([ '--requirements', '\n'.join(ctx.attr.requirements), ]) gcloud_cmdline = [] gcloud_cmdline.extend(['gcloud']) if ctx.attr.gcloud_project: gcloud_cmdline.extend(['--project', ctx.attr.gcloud_project]) gcloud_cmdline.extend(['beta', 'functions', 'deploy']) gcloud_cmdline.append(ctx.attr.deploy_name or ctx.attr.entry) gcloud_cmdline.extend(['--runtime', 'python37']) gcloud_cmdline.extend(['--entry-point', ctx.attr.entry]) if ctx.attr.trigger_topic: gcloud_cmdline.extend(['--trigger-topic', ctx.attr.trigger_topic]) elif ctx.attr.trigger_bucket: gcloud_cmdline.extend(['--trigger-bucket', ctx.attr.trigger_bucket]) elif ctx.attr.trigger_event: gcloud_cmdline.extend(['--trigger-event', ctx.attr.trigger_event]) if ctx.attr.trigger_resource: gcloud_cmdline.extend(['--trigger-resource', ctx.attr.trigger_resource]) else: fail( 'If using trigger_event, trigger_resource should also be specified', 'trigger_resource') else: gcloud_cmdline.extend(['--trigger-http']) if ctx.attr.memory: gcloud_cmdline.extend(['--memory', '{}MB'.format(ctx.attr.memory)]) if ctx.attr.timeout: if ctx.attr.timeout > MAX_TIMEOUT: fail('Timeout exceeded maximum allowed value value: {}'.format(ctx.attr.timeout), 'timeout') gcloud_cmdline.extend(['--timeout', '{}s'.format(ctx.attr.timeout)]) if ctx.attr.environments_file: args.extend([ '--env_vars_file', ctx.attr.environments_file.files.to_list()[0].path, ]) gcloud_cmdline.extend(['--env-vars-file', '$temp_dir/.env.yaml']) if ctx.attr.region: gcloud_cmdline.extend(['--region', ctx.attr.region]) deploy_script_content = DEPLOY_SCRIPT_TEMPLATE.format(gcloud_cmdline=' '.join(gcloud_cmdline)) ctx.actions.write(output = ctx.outputs.deploy, content = deploy_script_content) if ctx.attr.debug: print('args: {}'.format(args)) inputs = ctx.attr.src.files.to_list() if ctx.attr.requirements_file: inputs += ctx.attr.requirements_file.files.to_list() if ctx.attr.environments_file: inputs += ctx.attr.environments_file.files.to_list() ctx.actions.run( inputs = inputs, outputs = [ctx.outputs.code_archive], arguments = args, progress_message = 'Creating cloud function deployment package %s' % ctx.outputs.code_archive.short_path, executable = ctx.executable._make_package_tool, ) runfiles = ctx.runfiles(files = [ctx.outputs.code_archive]) return [DefaultInfo(executable = ctx.outputs.deploy, runfiles = runfiles)] # 'bazel run' this rule to trigger deployment. py_cloud_function = rule( implementation = _py_cloud_function_impl, attrs = { 'src': attr.label(mandatory = True), 'module': attr.string(), # optional. Can be inferred. 'entry': attr.string(mandatory = True), 'requirements_file': attr.label(allow_files = True), 'requirements': attr.string_list(), 'environments_file': attr.label(allow_files = True), 'gcloud_project': attr.string(), 'region': attr.string(), 'deploy_name': attr.string(), 'trigger_topic': attr.string(), 'trigger_bucket': attr.string(), 'trigger_event': attr.string(), 'trigger_resource': attr.string(), 'memory': attr.int(values = MEMORY_VALUES, default = 256), 'timeout': attr.int(), 'debug': attr.bool(), '_make_package_tool': attr.label( executable = True, cfg = 'host', allow_files = True, default = Label('//infra/serverless:make_gcf_package'), ), }, outputs = { 'code_archive': '%{name}.zip', 'deploy': '%{name}.fish', }, executable = True, )
#!/usr/bin/python3 #Every instance of this class, represents a single word found in a message. class Word: def __init__(self, word): #The word itself. self.word = word #The number of times the word was found in a collection of ham messages. self.inHam = 0 #The number of times the word was found in a collection of spam messages. self.inSpam = 0 #P(word|ham) self.hamProbability = 0 #P(word|spam) self.spamProbability = 0 def compute_ham_probability(self, number_of_keywords, my_sum): #P(t | ling) = [1 + N(t, ling)] / [m + N(ling)] self.hamProbability= ( float( (1 + self.inHam) ) / float( (number_of_keywords + my_sum) ) ) def compute_spam_probability(self, number_of_keywords, my_sum): #P(t | spam) = [1 + N(t, spam)] / [m + N(spam)] self.spamProbability= ( float( (1 + self.inSpam) ) / float( (number_of_keywords + my_sum) ) ) def __eq__(self, other): return isinstance(other, self.__class__) and (other.word.lower() == self.word.lower()) def __hash__(self): return self.word.__hash__()
URL_LIST_ARTICLES = "../../../data/nytimes_news_articles.txt" URL_BASE_ARTICLE = "../../../data/articles/nytimes" URL_SPLIT_WORDS = "../../../data/split_words.json" URL_SORT = "../../../data/sort.json" URL_LIST_DICT = "../../../data/list_dict.json" URL_LIST_DOCID = "../../../data/list_doc_id.json" N_ARTICLE = 1000
# 914000220 if not "cmd=o" in sm.getQRValue(21002): sm.showFieldEffect("aran/tutorialGuide3") sm.systemMessage("You can use a Command Attack by pressing both the arrow key and the attack key after a Consecutive Attack.") sm.addQRValue(21002, "cmd=o")
class Curry: def __init__(self, f, params=[], length=None): self.f = f self.len = f.__code__.co_argcount if length is None else length self.params = params def __call__(self, *a): p = [*self.params, *a] return self.f(*p) if len(p) >= self.len else Curry(self.f, p, self.len) class Functor: def __rmatmul__(self, f): # fmap raise NotImplementedError class Applicative(Functor): @classmethod def _pure(cls, a): if cls == Applicative: raise NotImplementedError return cls._pure(a) def __mul__(self, a): # apply raise NotImplementedError def __lshift__(self, other): return lift2A(const)(self)(other) def __rshift__(self, other): return lift2A(flip(const))(self)(other) class Alternative(Applicative): @classmethod def _empty(cls): if cls == Alternative: raise NotImplementedError return cls._empty() def __or__(self, other): raise NotImplementedError class Monad(Functor): @classmethod def _ret(cls, a): raise NotImplementedError def __xor__(self, f): # bind raise NotImplementedError class Parser(Alternative, Monad): def __init__(self, f): self.p = f def __rmatmul__(self, f): def inner(s): return [(r, curry(f)(v)) for (r, v) in self.p(s)] return Parser(inner) @classmethod def _pure(cls, a): return Parser(lambda s, a=a: [(s, a)]) def __mul__(self, a): def inner(s): return sum(( [(ra, vf(va)) for (ra, va) in a.p(rf)] for (rf, vf) in self.p(s)), [] ) return Parser(inner) @classmethod def _empty(cls): return Parser(lambda s: []) def __or__(self, other): def inner(s): return self.p(s) + other.p(s) return Parser(inner) @classmethod def _ret(cls, a): return pure(a) def __xor__(self, f): # bind def inner(s): return sum((f(v).p(r) for (r, v) in self.p(s)), []) return Parser(inner) def many(p): def inner(s): return sum(( (lambda result: [(ro, [vo])] if not result else [(ro, [vo])] + [(ri, [vo, *vi]) for (ri, vi) in result] )(inner(ro)) for (ro, vo) in p.p(s) ), []) return Parser(inner) | pure([]) def string(s): return pure('') if not s else add @ char(s[0]) * string(s[1 :]) curry = lambda x, l=None: x if isinstance(x, Curry) else Curry(x, [], l) lift2A = curry(lambda f, fa, fb: f @ fa * fb) flip = curry(lambda f, a, b: f(b, a)) fmap = curry(lambda f, a: f @ a) add = curry(lambda a, b: a + b) prepend = curry(lambda a, b: [a, *b]) compose = curry(lambda f, g: lambda x: f(g(x))) eq = curry(lambda a, b: a == b) const = curry(lambda a, _: a) tup = curry(lambda a, b: (a, b)) join = curry(''.join, 1) debug = curry(print, 1) empty = Parser._empty() pure = Parser._pure wild = Parser(lambda s: [] if not s else [(s[1 :], s[0])]) pred = lambda p, w=wild: w ^ (lambda c: pure(c) if p(c) else empty) char = lambda comp: pred(eq(comp)) any_of = lambda x: pred(lambda c: c in x) none_of = lambda x: pred(lambda c: c not in x) between = curry(lambda start, end, p: start >> p << end) many1 = lambda p: p ^ (lambda x: many(p) ^ (lambda xs: pure([x, *xs]))) sep1 = curry( lambda p, s: p ^ (lambda x: many(s >> p) ^ (lambda xs: pure([x, *xs]))) ) sep = curry(lambda p, s: sep1(p, s) | pure([])) spaces = many(any_of('\n\t ')) wwrap = lambda p: spaces >> p << spaces digit = any_of('1234567890') end = Parser(lambda s: [('', '')] if not s else [])
# -*- coding: utf-8 -*- # This file is generated from NI-DCPower API metadata version 19.6.0d2 functions = { 'Abort': { 'documentation': { 'description': '\nTransitions the NI-DCPower session from the Running state to the\nCommitted state. If a sequence is running, it is stopped. Any\nconfiguration functions called after this function are not applied until\nthe niDCPower_Initiate function is called. If power output is enabled\nwhen you call the niDCPower_Abort function, the output channels remain\nin their current state and continue providing power.\n\nUse the niDCPower_ConfigureOutputEnabled function to disable power\noutput on a per channel basis. Use the niDCPower_reset function to\ndisable output on all channels.\n\nRefer to the `Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__ topic in\nthe *NI DC Power Supplies and SMUs Help* for information about the\nspecific NI-DCPower software states.\n\n**Related Topics:**\n\n`Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'AbortWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'CalAdjustCurrentLimit': { 'codegen_method': 'no', 'documentation': { 'description': '\nCalculates the calibration constants for the current limit for the\nspecified output channel and range. This function compares the array in\n**requestedOutputs** to the array in **measuredOutputs** and calculates\nthe calibration constants for the current limit returned by the device.\nRefer to the calibration procedure for the device you are calibrating\nfor detailed instructions on the appropriate use of this function. This\nfunction can only be called from an external calibration session.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument calibration session. **vi** is\nobtained from the niDCPower_InitExtCal function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': 'Specifies the channel name to which these calibration settings apply.' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the range to calibrate with these settings. Only one channel\nat a time may be calibrated.\n' }, 'name': 'range', 'type': 'ViReal64' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the number of elements in **requestedOutputs** and\n**measuredOutputs**.\n' }, 'name': 'numberOfMeasurements', 'type': 'ViUInt32' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies an array of the output values that were requested in the\nniDCPower_ConfigureCurrentLimit function.\n' }, 'name': 'requestedOutputs', 'size': { 'mechanism': 'len', 'value': 'numberOfMeasurements' }, 'type': 'ViReal64[]' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies an array of the output values measured by an external\nprecision digital multimeter.\n' }, 'name': 'measuredOutputs', 'size': { 'mechanism': 'len', 'value': 'numberOfMeasurements' }, 'type': 'ViReal64[]' } ], 'returns': 'ViStatus' }, 'CalAdjustCurrentMeasurement': { 'codegen_method': 'no', 'documentation': { 'description': '\nCalibrates the current measurements returned by the niDCPower_Measure\nfunction for the specified output channel. This function calculates new\ncalibration coefficients for the specified current measurement range\nbased on the **reportedOutputs** and **measuredOutputs**. Refer to the\ncalibration procedure for the device you are calibrating for detailed\ninstructions about the appropriate use of this function. This function\ncan only be called in an external calibration session.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument calibration session. **vi** is\nobtained from the niDCPower_InitExtCal function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel name to which these calibration settings\napply.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the range to calibrate with these settings. Only one channel\nat a time may be calibrated.\n' }, 'name': 'range', 'type': 'ViReal64' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the number of elements in **reportedOutputs** and\n**measuredOutputs**.\n' }, 'name': 'numberOfMeasurements', 'type': 'ViUInt32' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies an array of the output values that were returned by the\nniDCPower_Measure function.\n' }, 'name': 'reportedOutputs', 'size': { 'mechanism': 'len', 'value': 'numberOfMeasurements' }, 'type': 'ViReal64[]' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies an array of the output values measured by an external\nprecision digital multimeter.\n' }, 'name': 'measuredOutputs', 'size': { 'mechanism': 'len', 'value': 'numberOfMeasurements' }, 'type': 'ViReal64[]' } ], 'returns': 'ViStatus' }, 'CalAdjustInternalReference': { 'codegen_method': 'no', 'documentation': { 'description': '\nPrograms the adjusted reference value to the device. Refer to the\ncalibration procedure for the device you are calibrating for detailed\ninstructions on the appropriate use of this function. This function can\nonly be called from an external calibration session.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the internal reference to be adjusted.\n**Defined Values**:\n', 'table_body': [ [ 'NIDCPOWER_VAL_INTERNAL_REFERENCE_5V (1054)', 'Calibration pin connected to 5 V internal reference.' ], [ 'NIDCPOWER_VAL_INTERNAL_REFERENCE_100KOHM (1055)', 'Calibration pin connected to 100 kΩ internal reference.' ] ] }, 'name': 'internalReference', 'type': 'ViInt32' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the updated value of the internal reference that will be\nprogrammed to the device.\n' }, 'name': 'adjustedInternalReference', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'CalAdjustOutputResistance': { 'codegen_method': 'no', 'documentation': { 'description': '\nCompares the array in **requestedOutputs** to the array in\n**measuredOutputs** and calculates the calibration constants for the\noutput resistance of the specified channel. Refer to the calibration\nprocedure for the device you are calibrating for detailed instructions\non the appropriate use of this function. This function can only be\ncalled from an external calibration session.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument calibration session. **vi** is\nobtained from the niDCPower_InitExtCal function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel name to which these calibration settings\napply. Only one channel at a time can be calibrated.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the number of elements in **requestedOutputs** and\n**measuredOutputs**.\n' }, 'name': 'numberOfMeasurements', 'type': 'ViUInt32' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies an array of the output values that were requested in the\nniDCPower_ConfigureOutputResistance function.\n' }, 'name': 'requestedOutputs', 'size': { 'mechanism': 'len', 'value': 'numberOfMeasurements' }, 'type': 'ViReal64[]' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies an array of the output values measured by an external\nprecision digital multimeter.\n' }, 'name': 'measuredOutputs', 'size': { 'mechanism': 'len', 'value': 'numberOfMeasurements' }, 'type': 'ViReal64[]' } ], 'returns': 'ViStatus' }, 'CalAdjustResidualCurrentOffset': { 'codegen_method': 'no', 'documentation': { 'description': '\nCalculates the calibration constants for the residual current offsets\nfor the specified output channel. Residual offsets account for minor\noffset effects on the device that lie outside of the self-calibration\ncircuitry. These offsets can include multiplexer input offsets and\nleakage effects from internal switching.\n\nThis function requires that the output be open prior to it being\ninvoked.\n\nRefer to the calibration procedure for the device you are calibrating\nfor detailed instructions on the appropriate use of this function. This\nfunction can be called only in an external calibration session.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'CalAdjustResidualVoltageOffset': { 'codegen_method': 'no', 'documentation': { 'description': '\nCalculates the calibration constants for the residual voltage offsets\nfor the specified output channel. Residual offsets account for minor\noffset effects on the device that lie outside of the self-calibration\ncircuitry. These offsets can include multiplexer input offsets and\nleakage effects from internal switching.\n\nThis function requires that the output be shorted prior to it being\ninvoked.\n\nRefer to the calibration procedure for the device you are calibrating\nfor detailed instructions on the appropriate use of this function. This\nfunction can be called only in an external calibration session.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'CalAdjustVoltageLevel': { 'codegen_method': 'no', 'documentation': { 'description': '\nCalculates the calibration constants for the voltage level for the\nspecified output channel. This function compares the array in\n**requestedOutputs** to the array in **measuredOutputs** and calculates\nthe calibration constants for the voltage level of the output channel.\nRefer to the calibration procedure of the device you are calibrating for\ndetailed instructions on the appropriate use of this function. This\nfunction can be called only in an external calibration session.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument calibration session. **vi** is\nobtained from the niDCPower_InitExtCal function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': 'Specifies the output channel to which these calibration settings apply.' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the range to calibrate with these settings. Only one channel\nat a time may be calibrated.\n' }, 'name': 'range', 'type': 'ViReal64' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the number of elements in **requestedOutputs** and\n**measuredOutputs**.\n' }, 'name': 'numberOfMeasurements', 'type': 'ViUInt32' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies an array of the output values requested in the\nniDCPower_ConfigureVoltageLevel function.\n' }, 'name': 'requestedOutputs', 'size': { 'mechanism': 'len', 'value': 'numberOfMeasurements' }, 'type': 'ViReal64[]' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies an array of the output values measured by an external\nprecision digital multimeter.\n' }, 'name': 'measuredOutputs', 'size': { 'mechanism': 'len', 'value': 'numberOfMeasurements' }, 'type': 'ViReal64[]' } ], 'returns': 'ViStatus' }, 'CalAdjustVoltageMeasurement': { 'codegen_method': 'no', 'documentation': { 'description': '\nCalculates the calibration constants for the voltage measurements\nreturned by the niDCPower_Measure function for the specified output\nchannel. This function compares the array in **reportedOutputs** to the\narray in **measuredOutputs** and calculates the calibration constants\nfor the voltage measurements returned by the niDCPower_Measure\nfunction. Refer to the calibration procedure for the device you are\ncalibrating for detailed instructions on the appropriate use of this\nfunction. This function can only be called in an external calibration\nsession.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument calibration session. **vi** is\nobtained from the niDCPower_InitExtCal function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': 'Specifies the channel name to which these calibration settings apply.' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the range to calibrate with these settings. Only one channel\nat a time may be calibrated.\n' }, 'name': 'range', 'type': 'ViReal64' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the number of elements in **reportedOutputs** and\n**measuredOutputs**.\n' }, 'name': 'numberOfMeasurements', 'type': 'ViUInt32' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies an array of the output values that were returned by the\nniDCPower_Measure function.\n' }, 'name': 'reportedOutputs', 'size': { 'mechanism': 'len', 'value': 'numberOfMeasurements' }, 'type': 'ViReal64[]' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies an array of the output values measured by an external\nprecision digital multimeter.\n' }, 'name': 'measuredOutputs', 'size': { 'mechanism': 'len', 'value': 'numberOfMeasurements' }, 'type': 'ViReal64[]' } ], 'returns': 'ViStatus' }, 'CalSelfCalibrate': { 'documentation': { 'description': '\nPerforms a self-calibration upon the specified channel(s).\n\nThis function disables the output, performs several internal\ncalculations, and updates calibration values. The updated calibration\nvalues are written to the device hardware if the\nNIDCPOWER_ATTR_SELF_CALIBRATION_PERSISTENCE attribute is set to\nNIDCPOWER_VAL_WRITE_TO_EEPROM. Refer to the\nNIDCPOWER_ATTR_SELF_CALIBRATION_PERSISTENCE attribute topic for more\ninformation about the settings for this attribute.\n\nWhen calling niDCPower_CalSelfCalibrate with the PXIe-4162/4163,\nspecify all channels of your PXIe-4162/4163 with the channelName input.\nYou cannot self-calibrate a subset of PXIe-4162/4163 channels.\n\nRefer to the\n`Self-Calibration <REPLACE_DRIVER_SPECIFIC_URL_1(selfcal)>`__ topic for\nmore information about this function.\n\n**Related Topics:**\n\n`Self-Calibration <REPLACE_DRIVER_SPECIFIC_URL_1(selfcal)>`__\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' } ], 'python_name': 'self_cal', 'returns': 'ViStatus' }, 'ChangeExtCalPassword': { 'codegen_method': 'no', 'documentation': { 'description': '\nChanges the **password** that is required to initialize an external\ncalibration session. The **password** can be a maximum of four\nalphanumeric characters. If you call this function in a session,\n**password** is changed immediately. If you call this function in an\nexternal calibration session, **password** is changed only after you\nclose the session using the niDCPower_CloseExtCal function with\n**action** set to NIDCPOWER_VAL_COMMIT.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitExtCal or niDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': 'Specifies the previous password used to protect the calibration values.' }, 'name': 'oldPassword', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': 'Specifies the new password to use to protect the calibration values.' }, 'name': 'newPassword', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'ClearError': { 'codegen_method': 'no', 'documentation': { 'description': '\n| Clears the error code and error description for the IVI session. If\n the user specifies a valid IVI session for **vi**, this function\n clears the error information for the session. If the user passes\n VI_NULL for **vi**, this function clears the error information for\n the current execution thread. If the ViSession parameter is an invalid\n session, the function does nothing and returns an error.\n| The function clears the error code by setting it to VI_SUCCESS. If\n the error description string is non-NULL, the function de-allocates\n the error description string and sets the address to VI_NULL.\n| Maintaining the error information separately for each thread is useful\n if the user does not have a session handle to pass to the\n niDCPower_GetError function, which occurs when a call to\n niDCPower_InitializeWithChannels fails.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'ClearInterchangeWarnings': { 'codegen_method': 'no', 'documentation': { 'description': 'Clears the list of current interchange warnings.' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'CloseExtCal': { 'codegen_method': 'no', 'documentation': { 'description': '\nCloses the session specified in **vi** and deallocates the resources\nthat NI-DCPower reserved for calibration. Refer to the calibration\nprocedure for the device you are calibrating for detailed instructions\non the appropriate use of this function.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument calibration session. **vi** is\nobtained from the niDCPower_InitExtCal function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies how to use the calibration values from this session as the\nsession is closed.\n\n**Defined Values**:\n', 'table_body': [ [ 'NIDCPOWER_VAL_COMMIT (1002)', 'The new calibration constants are stored in the EEPROM.' ], [ 'NIDCPOWER_VAL_CANCEL (1001)', 'The old calibration constants are kept, and the new ones are discarded.' ] ] }, 'name': 'action', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'Commit': { 'documentation': { 'description': '\nApplies previously configured settings to the device. Calling this\nfunction moves the NI-DCPower session from the Uncommitted state into\nthe Committed state. After calling this function, modifying any\nattribute reverts the NI-DCPower session to the Uncommitted state. Use\nthe niDCPower_Initiate function to transition to the Running state.\nRefer to the `Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__ topic in\nthe *NI DC Power Supplies and SMUs Help* for details about the specific\nNI-DCPower software states.\n\n**Related Topics:**\n\n`Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'CommitWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'ConfigureApertureTime': { 'documentation': { 'description': '\nConfigures the aperture time on the specified channel(s).\n\nThe supported values depend on the **units**. Refer to the *Aperture\nTime* topic for your device in the *NI DC Power Supplies and SMUs Help*\nfor more information. In general, devices support discrete\n**apertureTime** values, and if you configure **apertureTime** to some\nunsupported value, NI-DCPower coerces it up to the next supported value.\n\nRefer to the *Measurement Configuration and Timing* or *DC Noise\nRejection* topic for your device in the *NI DC Power Supplies and SMUs\nHelp* for more information about how to configure your measurements.\n\n**Related Topics:**\n\n`Aperture Time <REPLACE_DRIVER_SPECIFIC_URL_1(aperture)>`__\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the aperture time. Refer to the *Aperture Time* topic for your\ndevice in the *NI DC Power Supplies and SMUs Help* for more information.\n' }, 'name': 'apertureTime', 'type': 'ViReal64' }, { 'default_value': 'ApertureTimeUnits.SECONDS', 'direction': 'in', 'documentation': { 'description': '\nSpecifies the units for **apertureTime**.\n**Defined Values**:\n', 'table_body': [ [ 'NIDCPOWER_VAL_SECONDS (1028)', 'Specifies seconds.' ], [ 'NIDCPOWER_VAL_POWER_LINE_CYCLES (1029)', 'Specifies Power Line Cycles.' ] ] }, 'enum': 'ApertureTimeUnits', 'name': 'units', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureAutoZero': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures auto zero for the device.\n\nRefer to the `NI PXI-4132 Auto\nZero <REPLACE_DRIVER_SPECIFIC_URL_1(4132_autozero)>`__ and `NI PXI-4132\nMeasurement Configuration and\nTiming <REPLACE_DRIVER_SPECIFIC_URL_1(4132_measureconfigtiming)>`__\ntopics in the *NI DC Power Supplies and SMUs Help* for more information\nabout how to configure your measurements.\n\n**Related Topics:**\n\n`Auto Zero <REPLACE_DRIVER_SPECIFIC_URL_1(autozero)>`__\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the auto-zero setting. Refer to the *Measurement Configuration\nand Timing* topic and the *Auto Zero* topic for your device for more\ninformation about how to configure your measurements.\n**Defined Values:**\n', 'table_body': [ [ 'NIDCPOWER_VAL_OFF (0)', 'Disables auto-zero.' ], [ 'NIDCPOWER_VAL_ONCE (1024)', 'Makes zero conversions following the first measurement after initiating the device. The device uses these zero conversions for the preceding measurement and future measurements until the device is reinitiated.' ], [ 'NIDCPOWER_VAL_ON (1)', 'Makes zero conversions for every measurement.' ] ] }, 'enum': 'AutoZero', 'name': 'autoZero', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureCurrentLevel': { 'codegen_method': 'no', 'documentation': { 'description': "\nConfigures the current level the device attempts to generate for the\nspecified channel(s). The channel must be enabled for the specified\ncurrent level to take effect. Refer to the\nniDCPower_ConfigureOutputEnabled function for more information about\nenabling the output channel.\n\nThe current level setting is applicable only if the output function of\nthe channel is set to NIDCPOWER_VAL_DC_CURRENT. Use\nnidcpower_ConfigureOutputFunction to set the output function. The\ndevice actively regulates the current at the specified level unless\ndoing so causes a voltage greater than the\nniDCPower_ConfigureVoltageLimit across the channels' output terminals.\n\n**Related Topics:**\n\n`Constant Current\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(constant_current)>`__\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the current level, in amps, to generate for the specified\nchannel(s).\n**Valid Values:**\nThe valid values for this parameter are defined by the current level\nrange that is configured using the niDCPower_ConfigureCurrentlevelRange\nfunction.\n' }, 'name': 'level', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigureCurrentLevelRange': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the current level range for the specified channel(s). The\nconfigured range defines the valid values the current level can be set\nto using the niDCPower_ConfigureCurrentLevel function. The current\nlevel range setting is applicable only if the output function of the\nchannel is set to NIDCPOWER_VAL_DC_CURRENT. Use\nnidcpower_ConfigureOutputFunction to set the output function.\n\nUse the NIDCPOWER_ATTR_CURRENT_LEVEL_AUTORANGE attribute to enable\nautomatic selection of the current level range.\n\n**Related Topics:**\n\n`Ranges <REPLACE_DRIVER_SPECIFIC_URL_1(ranges)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the current level range, in amps, for the specified channel.\nFor valid ranges, refer to the *ranges* topic for your device in the *NI\nDC Power Supplies and SMUs Help*.\n' }, 'name': 'range', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigureCurrentLimit': { 'codegen_method': 'no', 'documentation': { 'description': '\n| Configures the current limit for the specified channel(s). The channel\n must be enabled for the specified current limit to take effect. Refer\n to the niDCPower_ConfigureOutputEnabled function for more information\n about enabling the output channel.\n| The current limit is the current that the output should not exceed\n when generating the desired niDCPower_ConfigureVoltageLevel. The\n current limit setting is applicable only if the output function of the\n channel is set to NIDCPOWER_VAL_DC_VOLTAGE. Use\n nidcpower_ConfigureOutputFunction to set the output function.\n\n**Related Topics:**\n\n`Compliance <REPLACE_DRIVER_SPECIFIC_URL_1(compliance)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies how the output should behave when the current limit is\nreached.\n**Defined Values:**\n', 'table_body': [ [ 'NIDCPOWER_VAL_CURRENT_REGULATE', 'Controls output current so that it does not exceed the current limit. Power continues to generate even if the current limit is reached.' ] ] }, 'name': 'behavior', 'type': 'ViInt32' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the current limit, in amps, on the specified channel(s). The\nlimit is specified as a positive value, but symmetric positive and\nnegative limits are enforced simultaneously.\n**Valid Values:**\nThe valid values for this parameter are defined by the current limit\nrange that is configured using the niDCPower_ConfigureCurrentlimitRange\nfunction.\n' }, 'name': 'limit', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigureCurrentLimitRange': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the current limit range for the specified channel(s).The\nconfigured range defines the valid values the current limit can be set\nto using the niDCPower_ConfigureCurrentLimit function. The current\nlimit range setting is applicable only if the output function of the\nchannel is set to NIDCPOWER_VAL_DC_VOLTAGE. Use\nnidcpower_ConfigureOutputFunction to set the output function.\n\nUse the NIDCPOWER_ATTR_CURRENT_LIMIT_AUTORANGE attribute to enable\nautomatic selection of the current limit range.\n\n**Related Topics:**\n\n`Ranges <REPLACE_DRIVER_SPECIFIC_URL_1(ranges)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the current limit range, in amps, for the specified channel.\nFor valid ranges, refer to the *ranges* topic for your device in the *NI\nDC Power Supplies and SMUs Help*.\n' }, 'name': 'range', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigureDigitalEdgeMeasureTrigger': { 'codegen_method': 'no', 'documentation': { 'description': 'Configures the Measure trigger for digital edge triggering.', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the input terminal for the digital edge Measure trigger.\n\nYou can specify any valid input terminal for this function. Valid\nterminals are listed in MAX under the **Device Routes** tab. For\nPXIe-4162/4163, refer to the Signal Routing topic for the device to\ndetermine which routes are available. This information is not available\non a Device Routes tab in MAX.\n\nInput terminals can be specified in one of two ways. If the device is\nnamed Dev1 and your terminal is PXI_Trig0, you can specify the terminal\nwith the fully qualified terminal name, /Dev1/PXI_Trig0, or with the\nshortened terminal name, PXI_Trig0. The input terminal can also be a\nterminal from another device. For example, you can set the input\nterminal on Dev1 to be /Dev2/SourceCompleteEvent.\n' }, 'name': 'inputTerminal', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies whether to configure the Measure trigger to assert on the\nrising or falling edge.\n**Defined Values:**\n', 'table_body': [ [ 'NIDCPOWER_VAL_RISING (1016)', 'Asserts the trigger on the rising edge of the digital signal.' ], [ 'NIDCPOWER_VAL_FALLING (1017)', 'Asserts the trigger on the falling edge of the digital signal.' ] ] }, 'name': 'edge', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureDigitalEdgeMeasureTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'inputTerminal', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'edge', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureDigitalEdgePulseTrigger': { 'codegen_method': 'no', 'documentation': { 'description': 'Configures the Pulse trigger for digital edge triggering.', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the input terminal for the digital edge Pulse trigger.\n\nYou can specify any valid input terminal for this function. Valid\nterminals are listed in MAX under the **Device Routes** tab.\n\nInput terminals can be specified in one of two ways. If the device is\nnamed Dev1 and your terminal is PXI_Trig0, you can specify the terminal\nwith the fully qualified terminal name, /Dev1/PXI_Trig0, or with the\nshortened terminal name, PXI_Trig0. The input terminal can also be a\nterminal from another device. For example, you can set the input\nterminal on Dev1 to be /Dev2/SourceCompleteEvent.\n' }, 'name': 'inputTerminal', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies whether to configure the Pulse trigger to assert on the rising\nor falling edge.\n**Defined Values:**\n', 'table_body': [ [ 'NIDCPOWER_VAL_RISING (1016)', 'Asserts the trigger on the rising edge of the digital signal.' ], [ 'NIDCPOWER_VAL_FALLING (1017)', 'Asserts the trigger on the falling edge of the digital signal.' ] ] }, 'name': 'edge', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureDigitalEdgePulseTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'inputTerminal', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'edge', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureDigitalEdgeSequenceAdvanceTrigger': { 'codegen_method': 'no', 'documentation': { 'description': 'Configures the Sequence Advance trigger for digital edge triggering.', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the input terminal for the digital edge Sequence Advance\ntrigger.\n\nYou can specify any valid input terminal for this function. Valid\nterminals are listed in MAX under the **Device Routes** tab. For\nPXIe-4162/4163, refer to the Signal Routing topic for the device to\ndetermine which routes are available. This information is not available\non a Device Routes tab in MAX.\n\nInput terminals can be specified in one of two ways. If the device is\nnamed Dev1 and your terminal is PXI_Trig0, you can specify the terminal\nwith the fully qualified terminal name, /Dev1/PXI_Trig0, or with the\nshortened terminal name, PXI_Trig0. The input terminal can also be a\nterminal from another device. For example, you can set the input\nterminal on Dev1 to be /Dev2/SourceCompleteEvent.\n' }, 'name': 'inputTerminal', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies whether to configure the Sequence Advance trigger to assert on\nthe rising or falling edge.\n**Defined Values:**\n', 'table_body': [ [ 'NIDCPOWER_VAL_RISING (1016)', 'Asserts the trigger on the rising edge of the digital signal.' ], [ 'NIDCPOWER_VAL_FALLING (1017)', 'Asserts the trigger on the falling edge of the digital signal.' ] ] }, 'name': 'edge', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureDigitalEdgeSequenceAdvanceTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'inputTerminal', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'edge', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureDigitalEdgeSourceTrigger': { 'codegen_method': 'no', 'documentation': { 'description': 'Configures the Source trigger for digital edge triggering.', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the input terminal for the digital edge Source trigger.\n\nYou can specify any valid input terminal for this function. Valid\nterminals are listed in MAX under the **Device Routes** tab. For\nPXIe-4162/4163, refer to the Signal Routing topic for the device to\ndetermine which routes are available. This information is not available\non a Device Routes tab in MAX.\n\nInput terminals can be specified in one of two ways. If the device is\nnamed Dev1 and your terminal is PXI_Trig0, you can specify the terminal\nwith the fully qualified terminal name, /Dev1/PXI_Trig0, or with the\nshortened terminal name, PXI_Trig0. The input terminal can also be a\nterminal from another device. For example, you can set the input\nterminal on Dev1 to be /Dev2/SourceCompleteEvent.\n' }, 'name': 'inputTerminal', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies whether to configure the Source trigger to assert on the\nrising or falling edge.\n**Defined Values:**\n', 'table_body': [ [ 'NIDCPOWER_VAL_RISING (1016)', 'Asserts the trigger on the rising edge of the digital signal.' ], [ 'NIDCPOWER_VAL_FALLING (1017)', 'Asserts the trigger on the falling edge of the digital signal.' ] ] }, 'name': 'edge', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureDigitalEdgeSourceTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'inputTerminal', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'edge', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureDigitalEdgeStartTrigger': { 'codegen_method': 'no', 'documentation': { 'description': 'Configures the Start trigger for digital edge triggering.', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the input terminal for the digital edge Start trigger.\n\nYou can specify any valid input terminal for this function. Valid\nterminals are listed in MAX under the **Device Routes** tab. For\nPXIe-4162/4163, refer to the Signal Routing topic for the device to\ndetermine which routes are available. This information is not available\non a Device Routes tab in MAX.\n\nInput terminals can be specified in one of two ways. If the device is\nnamed Dev1 and your terminal is PXI_Trig0, you can specify the terminal\nwith the fully qualified terminal name, /Dev1/PXI_Trig0, or with the\nshortened terminal name, PXI_Trig0. The input terminal can also be a\nterminal from another device. For example, you can set the input\nterminal on Dev1 to be /Dev2/SourceCompleteEvent.\n' }, 'name': 'inputTerminal', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies whether to configure the Start trigger to assert on the rising\nor falling edge.\n**Defined Values:**\n', 'table_body': [ [ 'NIDCPOWER_VAL_RISING (1016)', 'Asserts the trigger on the rising edge of the digital signal.' ], [ 'NIDCPOWER_VAL_FALLING (1017)', 'Asserts the trigger on the falling edge of the digital signal.' ] ] }, 'name': 'edge', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureDigitalEdgeStartTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'inputTerminal', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'edge', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureOutputEnabled': { 'codegen_method': 'no', 'documentation': { 'description': '\nEnables or disables generation on the specified channel(s). Depending on\nthe selected output function, the voltage level, current level,or output\nresistance must be set in addition to enabling the output to generate\nthe desired level. For more information about configuring the output\nlevel, refer to niDCPower_ConfigureOutputFunction.\n', 'note': "\nIf the device is in the\n`Uncommitted <javascript:LaunchHelp('NI_DC_Power_Supplies_Help.chm::/programmingStates.html#uncommitted')>`__\nstate, enabling the output does not take effect until you call the\nniDCPower_Initiate function.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies whether the output is enabled or disabled.\n**Defined Values**:\n', 'table_body': [ [ 'VI_TRUE', 'Enables generation on the specified output channel(s).' ], [ 'VI_FALSE', 'Disables generation on the specified output channel(s). This parameter has no effect on the output disconnect relay. To toggle the relay, use the NIDCPOWER_ATTR_OUTPUT_CONNECTED attribute.' ] ] }, 'name': 'enabled', 'type': 'ViBoolean' } ], 'returns': 'ViStatus' }, 'ConfigureOutputFunction': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the function the device attempts to generate for the\nspecified channel(s).\n\nWhen NIDCPOWER_VAL_DC_VOLTAGE is selected, the device generates the\ndesired voltage level on the output as long as the output current is\nbelow the current limit. The following functions can be used to\nconfigure the channel when NIDCPOWER_VAL_DC_VOLTAGE is selected:\n\n- niDCPower_ConfigureVoltageLevel\n- niDCPower_ConfigureCurrentLimit\n- niDCPower_ConfigureVoltageLevelRange\n- niDCPower_ConfigureCurrentLimitRange\n\nWhen NIDCPOWER_VAL_DC_CURRENT is selected, the device generates the\ndesired current level on the output as long as the output voltage is\nbelow the voltage limit. The following functions can be used to\nconfigure the channel when NIDCPOWER_VAL_DC_CURRENT is selected:\n\n- niDCPower_ConfigureCurrentLevel\n- niDCPower_ConfigureVoltageLimit\n- niDCPower_ConfigureCurrentLevelRange\n- niDCPower_ConfigureVoltageLimitRange\n\nWhen NIDCPOWER_VAL_PULSE_VOLTAGE is selected, the device generates\npulses at the desired voltage levels on the output as long as the output\ncurrent is below the current limit. The following VIs can be used to\nconfigure the channel when NIDCPOWER_VAL_PULSE_VOLTAGE is selected:\n\n- niDCPower_ConfigurePulseVoltageLevel\n- niDCPower_ConfigurePulseBiasVoltageLevel\n- niDCPower_ConfigurePulseCurrentLimit\n- niDCPower_ConfigurePulseBiasCurrentLimit\n- niDCPower_ConfigurePulseVoltageLevelRange\n- niDCPower_ConfigurePulseCurrentLimitRange\n\nWhen NIDCPOWER_VAL_PULSE_CURRENT is selected, the device generates\npulses at the desired current levels on the output as long as the output\nvoltage is below the voltage limit. The following VIs can be used to\nconfigure the channel when NIDCPOWER_VAL_PULSE_CURRENT is selected:\n\n- niDCPower_ConfigurePulseCurrentLevel\n- niDCPower_ConfigurePulseBiasCurrentLevel\n- niDCPower_ConfigurePulseVoltageLimit\n- niDCPower_ConfigurePulseBiasVoltageLimit\n- niDCPower_ConfigurePulseCurrentLevelRange\n- niDCPower_ConfigurePulseVoltageLimitRange\n\n**Related Topics:**\n\n`Constant Voltage\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(constant_voltage)>`__\n\n`Constant Current\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(constant_current)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nConfigures the function to generate for the specified channel(s).\n**Defined Values**:\n', 'table_body': [ [ 'NIDCPOWER_VAL_DC_VOLTAGE (1006)', 'Sets the output function to DC voltage.' ], [ 'NIDCPOWER_VAL_DC_CURRENT (1007)', 'Sets the output function to DC current.' ], [ 'NIDCPOWER_VAL_PULSE_VOLTAGE (1049)', 'Sets the output function to pulse voltage.' ], [ 'NIDCPOWER_VAL_PULSE_CURRENT (1050)', 'Sets the output function to pulse current.' ] ] }, 'name': 'function', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureOutputRange': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures either the voltage level range or the current limit range. If\n**range type** is Voltage, the voltage level range is configured. If\n**range type** is Current, the current limit range is configured.\n\nThis function does not configure any of the DC Current output function\nsettings. Refer to the niDCPower_ConfigureOutputFunction function for\nmore information.\n\nThis is a deprecated function. You must use the following functions\ninstead of theniDCPower_ConfigureOutputRange function:\n\n- niDCPower_ConfigureVoltageLevel\n- niDCPower_ConfigureVoltageLimit\n- niDCPower_ConfigureCurrentLevel\n- niDCPower_ConfigureCurrentLimit\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the type of the range: voltage or current.\n**Defined Values**:\n', 'table_body': [ [ 'NIDCPOWER_VAL_RANGE_CURRENT (0)', 'NI-DCPower configures the current range.' ], [ 'NIDCPOWER_VAL_RANGE_VOLTAGE (1)', 'NI-DCPower configures the voltage range.' ] ] }, 'name': 'rangeType', 'type': 'ViInt32' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the range to calibrate with these settings. Only one channel\nat a time may be calibrated.\n' }, 'name': 'range', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigureOutputResistance': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the output resistance that the device attempts to generate\nfor the specified channel or channels. The channel must be enabled for\nthe specified output resistance to take effect.\n\nRefer to the nidcpower_ConfigureOutputEnabled function for more\ninformation about enabling the output channel.\n\nFor NI PXIe-4141/4143/4145 devices, output resistance is only supported\nif the output function of the channel is set to\nNIDCPOWER_VAL_DC_VOLTAGE using the niDCPower_ConfigureOutputFunction\nfunction.\n\nFor PXIe-4135, NI PXIe-4137, and NI PXIe-4139 devices, output resistance\nis supported if the output function of the channel is set to\nNIDCPOWER_VAL_DC_CURRENT or NIDCPOWER_VAL_DC_VOLTAGE using the\nniDCPower_ConfigureOutputFunction function.\n\nThe device actively regulates the current and voltage to reach the\nspecified output resistance, although in DC Voltage output mode, the\nvoltage at the output experiences a "virtual drop" that is proportional\nto its current. In DC Current output mode, the output experiences a\n"virtual leakage current" that is proportional to the output voltage.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output resistance, in ohms, for the specified channel.\nRefer to the `NI PXIe-4141 Programmable Output\nresistance <REPLACE_DRIVER_SPECIFIC_URL_1(4140_4141_progoutputresist)>`__,\n`NI PXIe-4143 Programmable Output\nresistance <REPLACE_DRIVER_SPECIFIC_URL_1(4142_4143_progoutputresist)>`__,\n`NI PXIe-4145 Programmable Output\nresistance <REPLACE_DRIVER_SPECIFIC_URL_1(4144_4145_progoutputresist)>`__,or\n`NI PXIe-4154 Programmable Output\nresistance <REPLACE_DRIVER_SPECIFIC_URL_1(4154_prog_output_resist)>`__\ntopic in the NI DC Power Supplies and SMUs Help for more information\nabout configuring output resistance.\n' }, 'name': 'resistance', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigureOvp': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'enabled', 'type': 'ViBoolean' }, { 'direction': 'in', 'name': 'limit', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePowerLineFrequency': { 'codegen_method': 'no', 'documentation': { 'description': '\nSpecifies the power line frequency for specified channel(s). NI-DCPower\nuses this value to select a timebase for setting the\nniDCPower_ConfigureApertureTime function in power line cycles (PLCs).\n\nRefer to the *Measurement Configuration and Timing* topic for your\ndevice in the *NI DC Power Supplies and SMUs Help* for more information\nabout how to configure your measurements.\n\n**Related Topics:**\n\n`Measurement Noise\nRejection <REPLACE_DRIVER_SPECIFIC_URL_1(noiserejectmeasure)>`__\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the power line frequency in hertz for specified channel(s).\nNI-DCPower uses this value to select a timebase for the\nNIDCPOWER_ATTR_APERTURE_TIME attribute. Refer to the *Measurement\nConfiguration and Timing* topic for your device for more information\nabout how to configure your measurements.\n**Defined Values**:\n', 'note': 'Set this parameter to the frequency of the AC power line.', 'table_body': [ [ 'NIDCPOWER_VAL_50_HERTZ (50.0)', 'Specifies 50 Hz.' ], [ 'NIDCPOWER_VAL_60_HERTZ (60.0)', 'Specifies 60 Hz.' ] ] }, 'name': 'powerlineFrequency', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePulseBiasCurrentLevel': { 'codegen_method': 'no', 'documentation': { 'description': "\nConfigures the pulse bias current level that the device attempts to\ngenerate for the specified channel(s) during the off phase of a pulse.\nThe channel must be enabled for the specified current level to take\neffect.\n\nRefer to the niDCPower_ConfigureOutputEnabled function for more\ninformation about enabling the output channel. The pulse current level\nsetting is applicable only if the channel is set to the\nNIDCPOWER_VAL_PULSE_CURRENT output function using the\nniDCPower_ConfigureOutputFunction function.\n\nThe device actively regulates the current at the specified level unless\ndoing so causes a voltage drop greater than the\nNIDCPOWER_ATTR_PULSE_BIAS_VOLTAGE_LIMIT across the channels' output\nterminals.\n", 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the pulse bias current level, in amps, on the specified\nchannel(s).\n**Valid Values:**\nThe valid values for this parameter are defined by the pulse current\nlevel range that is configured using the\nniDCPower_ConfigurePulseCurrentlevelRange function.\n' }, 'name': 'level', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePulseBiasCurrentLimit': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the pulse bias current limit for the specified channel(s).\nThe channel must be enabled for the specified current limit to take\neffect.\n\nRefer to the niDCPower_ConfigureOutputEnabled function for more\ninformation about enabling the output channel. The pulse bias current\nlimit is the current that the output must not exceed when generating the\ndesired NIDCPOWER_ATTR_pULSE_bIAS_vOLTAGE_lEVEL. The pulse bias\ncurrent limit setting is only applicable if the channel is set to the\nNIDCPOWER_VAL_PULSE_VOLTAGE output function using the\nniDCPower_ConfigureOutputFunction function.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the pulse bias current limit, in amps, on the specified\nchannel(s). The limit is specified as a positive value, but symmetric\npositive and negative limits are enforced simultaneously.\n**Valid Values:**\nThe valid values for this parameter are defined by the pulse current\nlimit range that is configured using the\nniDCPower_ConfigurePulseCurrentlimitRange function.\n' }, 'name': 'limit', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePulseBiasVoltageLevel': { 'codegen_method': 'no', 'documentation': { 'description': "\nConfigures the pulse bias voltage level that the device attempts to\ngenerate for the specified channel(s) during the off phase of a pulse.\nThe channel must be enabled for the specified voltage level to take\neffect.\n\nRefer to the niDCPower_ConfigureOutputEnabled function for more\ninformation about enabling the output channel. The pulse bias voltage\nlevel setting is applicable only if the channel is set to the\nNIDCPOWER_VAL_PULSE_VOLTAGE output function using the\nniDCPower_ConfigureOutputFunction function.\n\nThe device actively regulates the voltage at the specified level unless\ndoing so causes a current greater than the\nNIDCPOWER_ATTR_PULSE_BIAS_CURRENT_LIMIT through the channels'\noutput terminals.\n", 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the pulse bias voltage level, in volts, for the output channel\ngeneration.\n**Valid Values**:\nThe valid values for this parameter are defined by the pulse voltage\nlevel range that is selected using the\nniDCPower_ConfigurePulseVoltagelevelRange function.\n' }, 'name': 'level', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePulseBiasVoltageLimit': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the pulse bias voltage limit for the specified channel(s).\nThe channel must be enabled for the specified voltage limit to take\neffect.\n\nRefer to the niDCPower_ConfigureOutputEnabled function for more\ninformation about enabling the output channel. The pulse bias voltage\nlimit is the voltage that the output must not exceed when generating the\ndesired NIDCPOWER_ATTR_PULSE_bIAS_cURRENT_lEVEL. The pulse bias\nvoltage limit setting is only applicable if the channel is set to the\nNIDCPOWER_VAL_PULSE_CURRENT output function using the\nniDCPower_ConfigureOutputFunction function.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the pulse bias voltage limit, in volts, on the specified\nchannel(s). The limit is specified as a positive value, but symmetric\npositive and negative limits are enforced simultaneously.\n**Valid Values:**\nThe valid values for this parameter are defined by the pulse voltage\nlimit range that is configured using the\nniDCPower_ConfigurePulseVoltagelimitRange function.\n' }, 'name': 'limit', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePulseCurrentLevel': { 'codegen_method': 'no', 'documentation': { 'description': "\nConfigures the pulse current level that the device attempts to generate\nfor the specified channel(s) during the on phase of a pulse. The channel\nmust be enabled for the specified current level to take effect.\n\nRefer to the niDCPower_ConfigureOutputEnabled function for more\ninformation about enabling the output channel. The pulse current level\nsetting is applicable only if the channel is set to the\nNIDCPOWER_VAL_PULSE_CURRENT output function using the\nniDCPower_ConfigureOutputEnabled function.\n\nThe device actively regulates the current at the specified level unless\ndoing so causes a voltage drop greater than the\nNIDCPOWER_ATTR_PULSE_VOLTAGE_lIMIT across the channels' output\nterminals.\n", 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the pulse current level, in amps, on the specified channel(s).\n**Valid Values:**\nThe valid values for this parameter are defined by the pulse current\nlevel range that is configured using the\nniDCPower_ConfigurePulseCurrentlevelRange function.\n' }, 'name': 'level', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePulseCurrentLevelRange': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the pulse current level range for the specified channel(s).\n\nThe configured range defines the valid values to which you can set the\npulse current level and pulse bias current level using the\nniDCPower_ConfigurePulseCurrentLevel and\nniDCPower_ConfigurePulseBiasCurrentLevel functions. The pulse current\nlevel range setting is applicable only if the channel is set to the\nNIDCPOWER_VAL_PULSE_CURRENT output function using the\nniDCPower_ConfigureOutputFunction function.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the pulse current level range, in amps, on the specified\nchannel(s).\nFor valid ranges, refer to the *ranges* topic for your device in the *NI\nDC Power Supplies and SMUs Help*.\n' }, 'name': 'range', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePulseCurrentLimit': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the pulse current limit for the specified channel(s). The\nchannel must be enabled for the specified current limit to take effect.\n\nRefer to the niDCPower_ConfigureOutputEnabled function for more\ninformation about enabling the output channel. The pulse current limit\nis the current that the output must not exceed when generating the\ndesired NIDCPOWER_ATTR_PULSE_vOLTAGE_lEVEL. The pulse current limit\nsetting is only applicable if the channel is set to the\nNIDCPOWER_VAL_PULSE_VOLTAGE output function using the\nniDCPower_ConfigureOutputFunction function.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the pulse current limit, in amps, on the specified channel(s).\nThe limit is specified as a positive value, but symmetric positive and\nnegative limits are enforced simultaneously.\n**Valid Values:**\nThe valid values for this parameter are defined by the pulse current\nlimit range that is configured using the\nniDCPower_ConfigurePulseCurrentlimitRange function.\n' }, 'name': 'limit', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePulseCurrentLimitRange': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the pulse current limit range for the specified channel(s).\n\nThe configured range defines the valid values to which you can set the\npulse current limit and pulse bias current limit using the\nniDCPower_ConfigurePulseCurrentLimit and\nniDCPower_ConfigurePulseBiasCurrentLimit functions. The pulse current\nlimit range setting is applicable only if the channel is set to the\nNIDCPOWER_VAL_PULSE_VOLTAGE output function using the\nniDCPower_ConfigureOutputFunction function.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the pulse current limit range, in amps, on the specified\nchannel(s).\nFor valid ranges, refer to the *ranges* topic for your device in the *NI\nDC Power Supplies and SMUs Help*.\n' }, 'name': 'range', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePulseVoltageLevel': { 'codegen_method': 'no', 'documentation': { 'description': "\nConfigures the pulse voltage level that the device attempts to generate\nfor the specified channel(s) during the on phase of a pulse. The channel\nmust be enabled for the specified voltage level to take effect.\n\nRefer to the niDCPower_ConfigureOutputEnabled function for more\ninformation about enabling the output channel. The pulse voltage level\nsetting is applicable only if the channel is set to the\nNIDCPOWER_VAL_PULSE_VOLTAGE output function using the\nniDCPower_ConfigureOutputFunction function.\n\nThe device actively regulates the voltage at the specified level unless\ndoing so causes a current greater than the\nNIDCPOWER_ATTR_PULSE_cURRENT_lIMIT through the channels' output\nterminals.\n", 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the pulse voltage level, in volts, for the output channel\ngeneration.\n**Valid Values**:\nThe valid values for this parameter are defined by the voltage level\nrange that is selected using the\nniDCPower_ConfigurePulseVoltagelevelRange function.\n' }, 'name': 'level', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePulseVoltageLevelRange': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the pulse voltage level range for the specified channel(s).\n\nThe configured range defines the valid values to which you can set the\npulse voltage level and pulse bias voltage level using the\nniDCPower_ConfigurePulseVoltageLevel and\nniDCPower_ConfigurePulseBiasVoltageLevel functions. The pulse voltage\nlevel range setting is applicable only if the channel is set to the\nNIDCPOWER_VAL_PULSE_VOLTAGE output function using the\nniDCPower_ConfigureOutputFunction function.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the pulse voltage level range, in volts, on the specified\nchannel(s).\nFor valid ranges, refer to the *ranges* topic for your device in the *NI\nDC Power Supplies and SMUs Help*.\n' }, 'name': 'range', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePulseVoltageLimit': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the pulse voltage limit for the specified channel(s). The\nchannel must be enabled for the specified voltage limit to take effect.\n\nRefer to the niDCPower_ConfigureOutputEnabled function for more\ninformation about enabling the output channel. The pulse voltage limit\nis the voltage that the output must not exceed when generating the\ndesired NIDCPOWER_ATTR_PULSE_cURRENT_lEVEL. The pulse voltage limit\nsetting is only applicable if the channel is set to the\nNIDCPOWER_VAL_PULSE_CURRENT output function using the\nniDCPower_ConfigureOutputFunction function.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the pulse voltage limit, in volts, on the specified output\nchannel(s). The limit is specified as a positive value, but symmetric\npositive and negative limits are enforced simultaneously.\n**Valid Values:**\nThe valid values for this parameter are defined by the pulse voltage\nlimit range that is configured using the\nniDCPower_ConfigurePulseVoltagelimitRange function.\n' }, 'name': 'limit', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigurePulseVoltageLimitRange': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the pulse voltage limit range for the specified channel(s).\n\nThe configured range defines the valid values to which you can set the\npulse voltage limit and pulse bias voltage limit using the\nniDCPower_ConfigurePulseVoltageLimit and\nniDCPower_ConfigurePulseBiasVoltageLimit functions. The pulse voltage\nlimit range setting is applicable only if the channel is set to the\nNIDCPOWER_VAL_PULSE_CURRENT output function using the\nniDCPower_ConfigureOutputFunction function.\n\n.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the pulse voltage limit range, in volts, on the specified\nchannel(s).\nFor valid ranges, refer to the *ranges* topic for your device in the *NI\nDC Power Supplies and SMUs Help*.\n' }, 'name': 'range', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigureSense': { 'codegen_method': 'no', 'documentation': { 'description': '\nSpecifies whether to use\n`local <REPLACE_DRIVER_SPECIFIC_URL_2(local_and_remote_sense)>`__ or\n`remote <REPLACE_DRIVER_SPECIFIC_URL_2(local_and_remote_sense)>`__\nsensing of the output voltage on the specified channel(s). Refer to the\n*Devices* topic specific to your device in the *NI DC Power Supplies and\nSMUs* Help for more information about sensing voltage on supported\nchannels.\n\n**Related Topics:**\n\n`Local and Remote\nSense <REPLACE_DRIVER_SPECIFIC_URL_1(4112_localandremotesense)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies local or remote sensing on the specified channel(s).\n**Defined Values:**\n', 'table_body': [ [ 'NIDCPOWER_VAL_LOCAL (1008)', 'Local sensing' ], [ 'NIDCPOWER_VAL_REMOTE (1009)', 'Remote sensing' ] ] }, 'name': 'sense', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureSoftwareEdgeMeasureTrigger': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the Measure trigger for software triggering. Use the\nniDCPower_SendSoftwareEdgeTrigger function to assert the trigger\ncondition.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'ConfigureSoftwareEdgeMeasureTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'ConfigureSoftwareEdgePulseTrigger': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the Pulse trigger for software triggering. Use the\nniDCPower_SendSoftwareEdgeTrigger function to assert the trigger\ncondition.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'ConfigureSoftwareEdgePulseTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'ConfigureSoftwareEdgeSequenceAdvanceTrigger': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the Sequence Advance trigger for software triggering. Use the\nniDCPower_SendSoftwareEdgeTrigger function to assert the trigger\ncondition.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'ConfigureSoftwareEdgeSequenceAdvanceTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'ConfigureSoftwareEdgeSourceTrigger': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the Source trigger for software triggering. Use the\nniDCPower_SendSoftwareEdgeTrigger function to assert the trigger\ncondition.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'ConfigureSoftwareEdgeSourceTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'ConfigureSoftwareEdgeStartTrigger': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the Start trigger for software triggering. Use the\nniDCPower_SendSoftwareEdgeTrigger function to assert the trigger\ncondition.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'ConfigureSoftwareEdgeStartTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'ConfigureSourceMode': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the NIDCPOWER_ATTR_SOURCE_MODE attribute. Specifies\nwhether to run a single output point or a sequence. Refer to the `Single\nPoint Source Mode <REPLACE_DRIVER_SPECIFIC_URL_1(singlept)>`__ and\n`Sequence Source Mode <REPLACE_DRIVER_SPECIFIC_URL_1(sequencing)>`__\ntopics in the *NI DC Power Supplies and SMUs Help* for more information\nabout using this function.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the source mode for the NI-DCPower session.\n**Defined Values**:\n', 'table_body': [ [ 'NIDCPOWER_VAL_SINGLE_POINT (1020)', 'Applies a single source configuration.' ], [ 'NIDCPOWER_VAL_SEQUENCE (1021)', 'Applies a list of voltage or current configurations sequentially.' ] ] }, 'name': 'sourceMode', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureSourceModeWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'sourceMode', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'ConfigureVoltageLevel': { 'codegen_method': 'no', 'documentation': { 'description': "\nConfigures the voltage level the device attempts to generate for the\nspecified channel(s). The channel must be enabled for the specified\nvoltage level to take effect. Refer to the\nniDCPower_ConfigureOutputEnabled function for more information about\nenabling the output channel.\n\nThe voltage level setting is applicable only if the output function of\nthe channel is set to NIDCPOWER_VAL_DC_VOLTAGE. Use\nnidcpower_ConfigureOutputFunction to set the output function.\n\nThe device actively regulates the voltage at the specified level unless\ndoing so causes a current output greater than the\nNIDCPOWER_ATTR_CURRENT_LIMIT across the channels' output terminals.\n\n**Related Topics:**\n\n`Constant Voltage\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(constant_voltage)>`__\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the voltage level, in volts, for the output channel\ngeneration.\n**Valid Values**:\nThe valid values for this parameter are defined by the voltage level\nrange that is selected using the niDCPower_ConfigureVoltagelevelRange\nfunction.\n' }, 'name': 'level', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigureVoltageLevelRange': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the voltage level range for the specified channel(s). The\nconfigured range defines the valid values the voltage level can be set\nto using the niDCPower_ConfigureVoltageLevel function. The voltage\nlevel range setting is applicable only if the output function of the\nchannel is set to NIDCPOWER_VAL_DC_VOLTAGE. Use\nnidcpower_ConfigureOutputFunction to set the output function.\n\nUse the NIDCPOWER_ATTR_VOLTAGE_LEVEL_AUTORANGE attribute to enable\nautomatic selection of the voltage level range.\n\n**Related Topics:**\n\n`Ranges <REPLACE_DRIVER_SPECIFIC_URL_1(ranges)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the voltage level range, in volts, on the specified\nchannel(s).\nFor valid ranges, refer to the *ranges* topic for your device in the *NI\nDC Power Supplies and SMUs Help*.\n' }, 'name': 'range', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigureVoltageLimit': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the voltage limit for the specified channel(s). The channel\nmust be enabled for the specified voltage limit to take effect. Refer to\nthe niDCPower_ConfigureOutputEnabled function for more information\nabout enabling the output channel.\n\nThe voltage limit is the voltage that the output should not exceed when\ngenerating the desired niDCPower_ConfigureCurrentLevel. The voltage\nlimit setting is applicable only if the output function of the channel\nis set to NIDCPOWER_VAL_DC_CURRENT. Use\nnidcpower_ConfigureOutputFunction to set the output function.\n\n**Related Topics:**\n\n`Compliance <REPLACE_DRIVER_SPECIFIC_URL_1(compliance)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the voltage limit, in volts, on the specified output\nchannel(s). The limit is specified as a positive value, but symmetric\npositive and negative limits are enforced simultaneously.\n**Valid Values:**\nThe valid values for this parameter are defined by the voltage limit\nrange that is configured using the niDCPower_ConfigureVoltagelimitRange\nfunction.\n' }, 'name': 'limit', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConfigureVoltageLimitRange': { 'codegen_method': 'no', 'documentation': { 'description': '\nConfigures the voltage limit range for the specified channel(s). The\nconfigured range defines the valid values the voltage limit can be set\nto using the niDCPower_ConfigureVoltageLimit function. The voltage\nlimit range setting is applicable only if the output function of the\nchannel is set to NIDCPOWER_VAL_DC_CURRENT. Use\nnidcpower_ConfigureOutputFunction to set the output function.\n\nUse the NIDCPOWER_ATTR_VOLTAGE_LIMIT_AUTORANGE attribute to enable\nautomatic selection of the voltage limit range.\n\n**Related Topics:**\n\n`Ranges <REPLACE_DRIVER_SPECIFIC_URL_1(ranges)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the voltage limit range, in volts, on the specified\nchannel(s).\nFor valid ranges, refer to the *ranges* topic for your device in the *NI\nDC Power Supplies and SMUs Help*.\n' }, 'name': 'range', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ConnectInternalReference': { 'codegen_method': 'no', 'documentation': { 'description': '\nRoutes the internal reference to the calibration pin in preparation for\nadjustment. Refer to the calibration procedure for the device you are\ncalibrating for detailed instructions on the appropriate use of this\nfunction. This function can only be called from an external calibration\nsession.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the internal reference to be connected to the calibration pin.\n**Defined Values**:\n', 'table_body': [ [ 'NIDCPOWER_VAL_INTERNAL_REFERENCE_5V (1054)', 'Calibration pin connected to 5 V internal reference.' ], [ 'NIDCPOWER_VAL_INTERNAL_REFERENCE_100KOHM (1055)', 'Calibration pin connected to 100 kΩ internal reference.' ], [ 'NIDCPOWER_VAL_INTERNAL_REFERENCE_GROUND (1056)', 'Calibration pin connected to ground reference.' ], [ 'NIDCPOWER_VAL_INTERNAL_REFERENCE_NONE (1057)', 'Calibration pin disconnected from internal reference.' ] ] }, 'name': 'internalReference', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'CreateAdvancedSequence': { 'codegen_method': 'private', 'documentation': { 'description': '\nCreates an empty advanced sequence. Call the\nniDCPower_CreateAdvancedSequenceStep function to add steps to the\nactive advanced sequence.\n\nYou can create multiple advanced sequences in a session.\n\n**Support for this function**\n\nYou must set the source mode to Sequence to use this function.\n\nUsing the niDCPower_SetSequence function with Advanced Sequence\nfunctions is unsupported.\n\nUse this function in the Uncommitted or Committed programming states.\nRefer to the `Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__ topic in\nthe *NI DC Power Supplies and SMUs Help* for more information about\nNI-DCPower programming states.\n\n**Related Topics**:\n\n`Advanced Sequence\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(advancedsequencemode)>`__\n\n`Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__\n\nniDCPower_CreateAdvancedSequenceStep\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': 'Specifies the name of the sequence to create.' }, 'name': 'sequenceName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': 'Specifies the number of attributes in the attributeIDs array.' }, 'name': 'attributeIdCount', 'type': 'ViInt32' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the attributes you reconfigure per step in the advanced\nsequence. The following table lists which attributes can be configured\nin an advanced sequence for each NI-DCPower device that supports\nadvanced sequencing. A ✓ indicates that the attribute can be configured\nin advanced sequencing. An ✕ indicates that the attribute cannot be\nconfigured in advanced sequencing.\n', 'table_body': [ [ 'NIDCPOWER_ATTR_DC_NOISE_REJECTION', '✓', '✕', '✓', '✕', '✓', '✕', '✕', '✓' ], [ 'NIDCPOWER_ATTR_APERTURE_TIME', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_MEASURE_RECORD_LENGTH', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_SENSE', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_OVP_ENABLED', '✓', '✓', '✓', '✕', '✕', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_OVP_LIMIT', '✓', '✓', '✓', '✕', '✕', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_BIAS_DELAY', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_OFF_TIME', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_ON_TIME', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_SOURCE_DELAY', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_CURRENT_COMPENSATION_FREQUENCY', '✓', '✕', '✓', '✕', '✓', '✕', '✓', '✓' ], [ 'NIDCPOWER_ATTR_CURRENT_GAIN_BANDWIDTH', '✓', '✕', '✓', '✕', '✓', '✕', '✓', '✓' ], [ 'NIDCPOWER_ATTR_CURRENT_POLE_ZERO_RATIO', '✓', '✕', '✓', '✕', '✓', '✕', '✓', '✓' ], [ 'NIDCPOWER_ATTR_VOLTAGE_COMPENSATION_FREQUENCY', '✓', '✕', '✓', '✕', '✓', '✕', '✓', '✓' ], [ 'NIDCPOWER_ATTR_VOLTAGE_GAIN_BANDWIDTH', '✓', '✕', '✓', '✕', '✓', '✕', '✓', '✓' ], [ 'NIDCPOWER_ATTR_VOLTAGE_POLE_ZERO_RATIO', '✓', '✕', '✓', '✕', '✓', '✕', '✓', '✓' ], [ 'NIDCPOWER_ATTR_CURRENT_LEVEL', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_CURRENT_LEVEL_RANGE', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_VOLTAGE_LIMIT', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_VOLTAGE_LIMIT_HIGH', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✕' ], [ 'NIDCPOWER_ATTR_VOLTAGE_LIMIT_LOW', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✕' ], [ 'NIDCPOWER_ATTR_VOLTAGE_LIMIT_RANGE', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_CURRENT_LIMIT', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_CURRENT_LIMIT_HIGH', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✕' ], [ 'NIDCPOWER_ATTR_CURRENT_LIMIT_LOW', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✕' ], [ 'NIDCPOWER_ATTR_CURRENT_LIMIT_RANGE', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_VOLTAGE_LEVEL', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_VOLTAGE_LEVEL_RANGE', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_OUTPUT_ENABLED', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_OUTPUT_FUNCTION', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ], [ 'NIDCPOWER_ATTR_OUTPUT_RESISTANCE', '✓', '✕', '✓', '✕', '✓', '✕', '✓', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_BIAS_CURRENT_LEVEL', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_BIAS_VOLTAGE_LIMIT', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_BIAS_VOLTAGE_LIMIT_HIGH', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_BIAS_VOLTAGE_LIMIT_LOW', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_CURRENT_LEVEL', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_CURRENT_LEVEL_RANGE', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_VOLTAGE_LIMIT', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_VOLTAGE_LIMIT_HIGH', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_VOLTAGE_LIMIT_LOW', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_VOLTAGE_LIMIT_RANGE', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_BIAS_CURRENT_LIMIT', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_BIAS_CURRENT_LIMIT_HIGH', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_BIAS_CURRENT_LIMIT_LOW', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_BIAS_VOLTAGE_LEVEL', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_CURRENT_LIMIT', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_CURRENT_LIMIT_HIGH', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_CURRENT_LIMIT_LOW', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_CURRENT_LIMIT_RANGE', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_VOLTAGE_LEVEL', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_PULSE_VOLTAGE_LEVEL_RANGE', '✓', '✓', '✓', '✓', '✓', '✕', '✕', '✕' ], [ 'NIDCPOWER_ATTR_TRANSIENT_RESPONSE', '✓', '✓', '✓', '✓', '✓', '✓', '✓', '✓' ] ], 'table_header': [ 'Attribute', 'PXIe-4135', 'PXIe-4136', 'PXIe-4137', 'PXIe-4138', 'PXIe-4139', 'PXIe-4140/4142/4144', 'PXIe-4141/4143/4145', 'PXIe-4162/4163' ] }, 'name': 'attributeIds', 'size': { 'mechanism': 'len', 'value': 'attributeIdCount' }, 'type': 'ViInt32[]' }, { 'default_value': True, 'direction': 'in', 'documentation': { 'description': 'Specifies that this current sequence is active.' }, 'name': 'setAsActiveSequence', 'type': 'ViBoolean' } ], 'returns': 'ViStatus' }, 'CreateAdvancedSequenceCommitStepWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'setAsActiveStep', 'type': 'ViBoolean' } ], 'returns': 'ViStatus' }, 'CreateAdvancedSequenceStep': { 'codegen_method': 'private', 'documentation': { 'description': '\nCreates a new advanced sequence step in the advanced sequence specified\nby the Active advanced sequence. When you create an advanced sequence\nstep, each attribute you passed to the niDCPower_CreateAdvancedSequence\nfunction is reset to its default value for that step unless otherwise\nspecified.\n\n**Support for this Function**\n\nYou must set the source mode to Sequence to use this function.\n\nUsing the niDCPower_SetSequence function with Advanced Sequence\nfunctions is unsupported.\n\n**Related Topics**:\n\n`Advanced Sequence\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(advancedsequencemode)>`__\n\n`Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__\n\nniDCPower_CreateAdvancedSequence\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'default_value': True, 'direction': 'in', 'documentation': { 'description': 'Specifies that this current step in the active sequence is active.' }, 'name': 'setAsActiveStep', 'type': 'ViBoolean' } ], 'returns': 'ViStatus' }, 'CreateAdvancedSequenceStepWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'setAsActiveStep', 'type': 'ViBoolean' } ], 'returns': 'ViStatus' }, 'CreateAdvancedSequenceWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'sequenceName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'attributeIdCount', 'type': 'ViInt32' }, { 'direction': 'in', 'name': 'attributeIds', 'size': { 'mechanism': 'len', 'value': 'attributeIdCount' }, 'type': 'ViInt32[]' }, { 'direction': 'in', 'name': 'setAsActiveSequence', 'type': 'ViBoolean' } ], 'returns': 'ViStatus' }, 'DeleteAdvancedSequence': { 'codegen_method': 'private', 'documentation': { 'description': '\nDeletes a previously created advanced sequence and all the advanced\nsequence steps in the advanced sequence.\n\n**Support for this Function**\n\nYou must set the source mode to Sequence to use this function.\n\nUsing the niDCPower_SetSequence function with Advanced Sequence\nfunctions is unsupported.\n\n**Related Topics**:\n\n`Advanced Sequence\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(advancedsequencemode)>`__\n\n`Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': 'specifies the name of the sequence to delete.' }, 'name': 'sequenceName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'DeleteAdvancedSequenceWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'sequenceName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'Disable': { 'documentation': { 'description': '\nThis function performs the same actions as the niDCPower_reset\nfunction, except that this function also immediately sets the\nNIDCPOWER_ATTR_OUTPUT_ENABLED attribute to VI_FALSE.\n\nThis function opens the output relay on devices that have an output\nrelay.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'DisablePulseTrigger': { 'codegen_method': 'no', 'documentation': { 'description': '\nDisables the Pulse trigger. The device does not wait for a pulse trigger\nbefore performing a pulse operation. Refer to `Pulse\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(pulsemode)>`__ and `Sequence Source\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(sequencing)>`__ for more information\nabout the Pulse trigger.\n\nThis function is necessary only if you configured a Pulse trigger in the\npast and now want to disable it.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'DisablePulseTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'DisableSequenceAdvanceTrigger': { 'codegen_method': 'no', 'documentation': { 'description': '\nDisables the Sequence Advance trigger. The device does not wait for a\nSequence Advance trigger before advancing to the next iteration of the\nsequence. Refer to the `Sequence Source\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(sequencing)>`__ topic for more\ninformation about the Sequence Advance trigger.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'DisableSequenceAdvanceTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'DisableSourceTrigger': { 'codegen_method': 'no', 'documentation': { 'description': '\nDisables the Source trigger. The device does not wait for a source\ntrigger before performing a source operation. Refer to the `Single Point\nSource Mode <REPLACE_DRIVER_SPECIFIC_URL_1(singlept)>`__ and `Sequence\nSource Mode <REPLACE_DRIVER_SPECIFIC_URL_1(sequencing)>`__ topics for\nmore information about the Source trigger.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'DisableSourceTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'DisableStartTrigger': { 'codegen_method': 'no', 'documentation': { 'description': '\nDisables the Start trigger. The device does not wait for a Start trigger\nwhen starting generation or acquisition.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'DisableStartTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'ErrorQuery': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'name': 'errorCode', 'type': 'ViInt32' }, { 'direction': 'in', 'name': 'errorMessage', 'size': { 'mechanism': 'TBD', 'value': 'TBD' }, 'type': 'ViString[]' } ], 'returns': 'ViStatus' }, 'ExportAttributeConfigurationBuffer': { 'documentation': { 'description': '\nExports the attribute configuration of the session to the specified\nconfiguration buffer.\n\nYou can export and import session attribute configurations only between\ndevices with identical model numbers and the same number of configured\nchannels.\n\nThis function verifies that the attributes you have configured for the\nsession are valid. If the configuration is invalid, NI‑DCPower returns\nan error.\n\n**Support for this Function**\n\nCalling this function in `Sequence Source\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(sequencing)>`__ is unsupported.\n\n**Channel Mapping Behavior for Multichannel Sessions**\n\nWhen importing and exporting session attribute configurations between\nNI‑DCPower sessions that were initialized with different channels, the\nconfigurations of the exporting channels are mapped to the importing\nchannels in the order you specify in the **channelName** input to the\nniDCPower_InitializeWithChannels function.\n\nFor example, if your entry for **channelName** is 0,1 for the exporting\nsession and 1,2 for the importing session:\n\n- The configuration exported from channel 0 is imported into channel 1.\n- The configuration exported from channel 1 is imported into channel 2.\n\n**Related Topics:**\n\n`Using Properties and\nAttributes <REPLACE_DRIVER_SPECIFIC_URL_1(using_properties_and_attributes)>`__\n\n`Setting Properties and Attributes Before Reading\nThem <REPLACE_DRIVER_SPECIFIC_URL_1(setting_before_reading_attributes)>`__\n', 'note': '\nThis function will return an error if the total number of channels\ninitialized for the exporting session is not equal to the total number\nof channels initialized for the importing session.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the size, in bytes, of the byte array to export. If you enter\n0, this function returns the needed size.\n' }, 'name': 'size', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': '\nSpecifies the byte array buffer to be populated with the exported\nattribute configuration.\n' }, 'name': 'configuration', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'ViInt8[]' } ], 'returns': 'ViStatus' }, 'ExportAttributeConfigurationFile': { 'documentation': { 'description': '\nExports the attribute configuration of the session to the specified\nfile.\n\nYou can export and import session attribute configurations only between\ndevices with identical model numbers and the same number of configured\nchannels.\n\nThis function verifies that the attributes you have configured for the\nsession are valid. If the configuration is invalid, NI‑DCPower returns\nan error.\n\n**Support for this Function**\n\nCalling this function in `Sequence Source\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(sequencing)>`__ is unsupported.\n\n**Channel Mapping Behavior for Multichannel Sessions**\n\nWhen importing and exporting session attribute configurations between\nNI‑DCPower sessions that were initialized with different channels, the\nconfigurations of the exporting channels are mapped to the importing\nchannels in the order you specify in the **channelName** input to the\nniDCPower_InitializeWithChannels function.\n\nFor example, if your entry for **channelName** is 0,1 for the exporting\nsession and 1,2 for the importing session:\n\n- The configuration exported from channel 0 is imported into channel 1.\n- The configuration exported from channel 1 is imported into channel 2.\n\n**Related Topics:**\n\n`Using Properties and\nAttributes <REPLACE_DRIVER_SPECIFIC_URL_1(using_properties_and_attributes)>`__\n\n`Setting Properties and Attributes Before Reading\nThem <REPLACE_DRIVER_SPECIFIC_URL_1(setting_before_reading_attributes)>`__\n', 'note': '\nThis function will return an error if the total number of channels\ninitialized for the exporting session is not equal to the total number\nof channels initialized for the importing session.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the absolute path to the file to contain the exported\nattribute configuration. If you specify an empty or relative path, this\nfunction returns an error.\n**Default file extension:** .nidcpowerconfig\n' }, 'name': 'filePath', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'ExportSignal': { 'codegen_method': 'no', 'documentation': { 'description': '\nRoutes signals (triggers and events) to the output terminal you specify.\nThe route is created when the session is niDCPower_Commit.\n\n**Related Topics:**\n\n`Triggers <REPLACE_DRIVER_SPECIFIC_URL_1(trigger)>`__\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies which trigger or event to export.\n**Defined Values:**\n', 'table_body': [ [ 'NIDCPOWER_VAL_SOURCE_COMPLETE_EVENT (1030)', 'Exports the Source Complete event.' ], [ 'NIDCPOWER_VAL_MEASURE_COMPLETE_EVENT (1031)', 'Exports the Measure Complete event.' ], [ 'NIDCPOWER_VAL_SEQUENCE_ITERATION_COMPLETE_EVENT (1032)', 'Exports the Sequence Iteration Complete event.' ], [ 'NIDCPOWER_VAL_SEQUENCE_ENGINE_DONE_EVENT (1033)', 'Exports the Sequence Engine Done event.' ], [ 'NIDCPOWER_VAL_PULSE_COMPLETE_EVENT (1051)', 'Exports the Pulse Complete event.' ], [ 'NIDCPOWER_VAL_READY_FOR_PULSE_TRIGGER_EVENT (1052)', 'Exports the Ready Pulse Trigger event.' ], [ 'NIDCPOWER_VAL_START_TRIGGER (1034)', 'Exports the Start trigger.' ], [ 'NIDCPOWER_VAL_SOURCE_TRIGGER (1035)', 'Exports the Source trigger.' ], [ 'NIDCPOWER_VAL_MEASURE_TRIGGER (1036)', 'Exports the Measure trigger.' ], [ 'NIDCPOWER_VAL_SEQUENCE_ADVANCE_TRIGGER (1037)', 'Exports the Sequence Advance trigger.' ], [ 'NIDCPOWER_VAL_PULSE_TRIGGER (1053)', 'Exports the Pulse trigger.' ] ] }, 'enum': 'ExportSignal', 'name': 'signal', 'type': 'ViInt32' }, { 'default_value': '""', 'direction': 'in', 'documentation': { 'description': 'Reserved for future use. Pass in an empty string for this parameter.' }, 'name': 'signalIdentifier', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies where to export the selected signal.\n**Relative Terminals**:\n', 'table_body': [ [ '""', 'Do not export signal' ], [ '"PXI_Trig0"', 'PXI trigger line 0' ], [ '"PXI_Trig1"', 'PXI trigger line 1' ], [ '"PXI_Trig2"', 'PXI trigger line 2' ], [ '"PXI_Trig3"', 'PXI trigger line 3' ], [ '"PXI_Trig4"', 'PXI trigger line 4' ], [ '"PXI_Trig5"', 'PXI trigger line 5' ], [ '"PXI_Trig6"', 'PXI trigger line 6' ], [ '"PXI_Trig7"', 'PXI trigger line 7' ] ] }, 'name': 'outputTerminal', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'ExportSignalWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'signal', 'type': 'ViInt32' }, { 'direction': 'in', 'name': 'signalIdentifier', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'outputTerminal', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'FancyFetchMultiple': { 'codegen_method': 'python-only', 'documentation': { 'description': '\nReturns a list of named tuples (Measurement) that were\npreviously taken and are stored in the NI-DCPower buffer. This function\nshould not be used when the NIDCPOWER_ATTR_MEASURE_WHEN attribute is\nset to NIDCPOWER_VAL_ON_DEMAND. You must first call\nniDCPower_Initiate before calling this function.\n\nFields in Measurement:\n\n- **voltage** (float)\n- **current** (float)\n- **in_compliance** (bool)\n\n', 'note': 'This function is not supported on all devices. Refer to `Supported Functions by Device <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm, supportedfunctions)>`__ for more information about supported devices.' }, 'method_templates': [ { 'documentation_filename': 'default_method', 'method_python_name_suffix': '', 'session_filename': 'fancy_fetch' } ], 'parameters': [ { 'direction': 'in', 'documentation': { 'description': 'Identifies a particular instrument session. **vi** is obtained from the niDCPower_InitializeWithChannels function.' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViString' }, { 'direction': 'in', 'documentation': { 'description': 'Specifies the number of measurements to fetch.' }, 'name': 'count', 'type': 'ViInt32' }, { 'default_value': 'datetime.timedelta(seconds=1.0)', 'direction': 'in', 'documentation': { 'description': 'Specifies the maximum time allowed for this function to complete. If the function does not complete within this time interval, NI-DCPower returns an error.', 'note': 'When setting the timeout interval, ensure you take into account any triggers so that the timeout interval is long enough for your application.' }, 'name': 'timeout', 'python_api_converter_name': 'convert_timedelta_to_seconds', 'type': 'ViReal64', 'type_in_documentation': 'float in seconds or datetime.timedelta' }, { 'direction': 'out', 'documentation': { 'description': '\nList of named tuples with fields:\n\n- **voltage** (float)\n- **current** (float)\n- **in_compliance** (bool)\n' }, 'name': 'measurements', 'python_type': 'Measurement', 'size': { 'mechanism': 'python-code', 'value': None }, 'type': 'ViReal64[]' } ], 'python_name': 'fetch_multiple', 'returns': 'ViStatus' }, 'FancyMeasureMultiple': { 'codegen_method': 'python-only', 'documentation': { 'description': '\nReturns a list of named tuples (Measurement) containing the measured voltage\nand current values on the specified output channel(s). Each call to this function\nblocks other function calls until the measurements are returned from the device.\nThe order of the measurements returned in the array corresponds to the order\non the specified output channel(s).\n\nFields in Measurement:\n\n- **voltage** (float)\n- **current** (float)\n- **in_compliance** (bool) - Always None\n\n', 'note': 'This function is not supported on all devices. Refer to `Supported Functions by Device <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm, supportedfunctions)>`__ for more information about supported devices.' }, 'method_templates': [ { 'documentation_filename': 'default_method', 'method_python_name_suffix': '', 'session_filename': 'fancy_fetch' } ], 'parameters': [ { 'direction': 'in', 'documentation': { 'description': 'Identifies a particular instrument session. **vi** is obtained from the niDCPower_InitializeWithChannels function.' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViString' }, { 'direction': 'out', 'documentation': { 'description': '\nList of named tuples with fields:\n\n- **voltage** (float)\n- **current** (float)\n- **in_compliance** (bool) - Always None\n' }, 'name': 'measurements', 'python_type': 'Measurement', 'size': { 'mechanism': 'python-code', 'value': None }, 'type': 'ViReal64[]' } ], 'python_name': 'measure_multiple', 'returns': 'ViStatus' }, 'FetchMultiple': { 'codegen_method': 'private', 'documentation': { 'description': '\nReturns an array of voltage measurements, an array of current\nmeasurements, and an array of compliance measurements that were\npreviously taken and are stored in the NI-DCPower buffer. This function\nshould not be used when the NIDCPOWER_ATTR_MEASURE_WHEN attribute is\nset to NIDCPOWER_VAL_ON_DEMAND. You must first call\nniDCPower_Initiate before calling this function.\n\nRefer to the `Acquiring\nMeasurements <REPLACE_DRIVER_SPECIFIC_URL_1(acquiringmeasurements)>`__\nand `Compliance <REPLACE_DRIVER_SPECIFIC_URL_1(compliance)>`__ topics in\nthe *NI DC Power Supplies and SMUs Help* for more information about\nconfiguring this function.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'method_name_for_documentation': 'fetch_multiple', 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the maximum time allowed for this function to complete, in\nseconds. If the function does not complete within this time interval,\nNI-DCPower returns an error.\n', 'note': '\nWhen setting the timeout interval, ensure you take into account any\ntriggers so that the timeout interval is long enough for your\napplication.\n' }, 'name': 'timeout', 'python_api_converter_name': 'convert_timedelta_to_seconds', 'type': 'ViReal64', 'type_in_documentation': 'float in seconds or datetime.timedelta' }, { 'direction': 'in', 'documentation': { 'description': 'Specifies the number of measurements to fetch.' }, 'name': 'count', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns an array of voltage measurements. Ensure that sufficient space\nhas been allocated for the returned array.\n' }, 'name': 'voltageMeasurements', 'size': { 'mechanism': 'passed-in', 'value': 'count' }, 'type': 'ViReal64[]', 'use_array': True }, { 'direction': 'out', 'documentation': { 'description': '\nReturns an array of current measurements. Ensure that sufficient space\nhas been allocated for the returned array.\n' }, 'name': 'currentMeasurements', 'size': { 'mechanism': 'passed-in', 'value': 'count' }, 'type': 'ViReal64[]', 'use_array': True }, { 'direction': 'out', 'documentation': { 'description': '\nReturns an array of Boolean values indicating whether the output was in\ncompliance at the time the measurement was taken. Ensure that sufficient\nspace has been allocated for the returned array.\n' }, 'name': 'inCompliance', 'size': { 'mechanism': 'passed-in', 'value': 'count' }, 'type': 'ViBoolean[]' }, { 'direction': 'out', 'documentation': { 'description': '\nIndicates the number of measured values actually retrieved from the\ndevice.\n' }, 'name': 'actualCount', 'type': 'ViInt32', 'use_in_python_api': False } ], 'returns': 'ViStatus' }, 'GetAttributeViBoolean': { 'codegen_method': 'private', 'documentation': { 'description': '\n| Queries the value of a ViBoolean attribute.\n| You can use this function to get the values of device-specific\n attributes and inherent IVI attributes.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the ID of an attribute. From the function panel window, you\ncan use this control as follows.\n\n- In the function panel window, click on the control or press **Enter**\n or the spacebar to display a dialog box containing hierarchical list\n of the available attributes. Help text is shown for each attribute.\n Select an attribute by double-clicking on it or by selecting it and\n then pressing **Enter**.\n- A ring control at the top of the dialog box allows you to see all IVI\n attributes or only the attributes of type ViBoolean. If you choose to\n see all IVI attributes, the data types appear to the right of the\n attribute names in the list box. Attributes with data types other\n than ViBoolean are dim. If you select an attribute data type that is\n dim, LabWindows/CVI transfers you to the function panel for the\n corresponding function that is consistent with the data type.\n- If you want to enter a variable name, press **Ctrl**\\ +\\ **T** to\n change this ring control to a manual input box. If the attribute in\n this ring control has named constants as valid values, you can view\n the constants by moving to the value control and pressing **Enter**.\n' }, 'name': 'attributeId', 'type': 'ViAttr' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the current value of the attribute. Passes the address of a\nViBoolean variable.\nIf the attribute currently showing in the attribute ring control has\nconstants as valid values, you can view a list of the constants by\npressing **Enter** on this control. Select a value by double-clicking on\nit or by selecting it and then pressing **Enter**.\n' }, 'name': 'attributeValue', 'type': 'ViBoolean' } ], 'returns': 'ViStatus' }, 'GetAttributeViInt32': { 'codegen_method': 'private', 'documentation': { 'description': '\n| Queries the value of a ViInt32 attribute.\n| You can use this function to get the values of device-specific\n attributes and inherent IVI attributes.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the ID of an attribute. From the function panel window, you\ncan use this control as follows.\n\n- In the function panel window, click on the control or press **Enter**\n or the spacebar to display a dialog box containing hierarchical list\n of the available attributes. Help text is shown for each attribute.\n Select an attribute by double-clicking on it or by selecting it and\n then pressing **Enter**.\n- A ring control at the top of the dialog box allows you to see all IVI\n attributes or only the attributes of type ViInt32. If you choose to\n see all IVI attributes, the data types appear to the right of the\n attribute names in the list box. Attributes with data types other\n than ViInt32 are dim. If you select an attribute data type that is\n dim, LabWindows/CVI transfers you to the function panel for the\n corresponding function that is consistent with the data type.\n- If you want to enter a variable name, press **Ctrl**\\ +\\ **T** to\n change this ring control to a manual input box. If the attribute in\n this ring control has named constants as valid values, you can view\n the constants by moving to the value control and pressing **Enter**.\n' }, 'name': 'attributeId', 'type': 'ViAttr' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the current value of the attribute. Passes the address of a\nViInt32 variable.\nIf the attribute currently showing in the attribute ring control has\nconstants as valid values, you can view a list of the constants by\npressing **Enter** on this control. Select a value by double-clicking on\nit or by selecting it and then pressing **Enter**.\n' }, 'name': 'attributeValue', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'GetAttributeViInt64': { 'codegen_method': 'private', 'documentation': { 'description': '\n| Queries the value of a ViInt64 attribute.\n| You can use this function to get the values of device-specific\n attributes and inherent IVI attributes.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the ID of an attribute. From the function panel window, you\ncan use this control as follows.\n\n- In the function panel window, click on the control or press **Enter**\n or the spacebar to display a dialog box containing hierarchical list\n of the available attributes. Help text is shown for each attribute.\n Select an attribute by double-clicking on it or by selecting it and\n then pressing **Enter**.\n- A ring control at the top of the dialog box allows you to see all IVI\n attributes or only the attributes of type ViReal64. If you choose to\n see all IVI attributes, the data types appear to the right of the\n attribute names in the list box. Attributes with data types other\n than ViReal64 are dim. If you select an attribute data type that is\n dim, LabWindows/CVI transfers you to the function panel for the\n corresponding function that is consistent with the data type.\n- If you want to enter a variable name, press **Ctrl**\\ +\\ **T** to\n change this ring control to a manual input box. If the attribute in\n this ring control has named constants as valid values, you can view\n the constants by moving to the value control and pressing **Enter**.\n' }, 'name': 'attributeId', 'type': 'ViAttr' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the current value of the attribute. Passes the address of a\nViReal64 variable.\nIf the attribute currently showing in the attribute ring control has\nconstants as valid values, you can view a list of the constants by\npressing **Enter** on this control. Select a value by double-clicking on\nit or by selecting it and then pressing **Enter**.\n' }, 'name': 'attributeValue', 'type': 'ViInt64' } ], 'returns': 'ViStatus' }, 'GetAttributeViReal64': { 'codegen_method': 'private', 'documentation': { 'description': '\n| Queries the value of a ViReal64 attribute.\n| You can use this function to get the values of device-specific\n attributes and inherent IVI attributes.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the ID of an attribute. From the function panel window, you\ncan use this control as follows.\n\n- In the function panel window, click on the control or press **Enter**\n or the spacebar to display a dialog box containing hierarchical list\n of the available attributes. Help text is shown for each attribute.\n Select an attribute by double-clicking on it or by selecting it and\n then pressing **Enter**.\n- A ring control at the top of the dialog box allows you to see all IVI\n attributes or only the attributes of type ViReal64. If you choose to\n see all IVI attributes, the data types appear to the right of the\n attribute names in the list box. Attributes with data types other\n than ViReal64 are dim. If you select an attribute data type that is\n dim, LabWindows/CVI transfers you to the function panel for the\n corresponding function that is consistent with the data type.\n- If you want to enter a variable name, press **Ctrl**\\ +\\ **T** to\n change this ring control to a manual input box. If the attribute in\n this ring control has named constants as valid values, you can view\n the constants by moving to the value control and pressing **Enter**.\n' }, 'name': 'attributeId', 'type': 'ViAttr' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the current value of the attribute. Passes the address of a\nViReal64 variable.\nIf the attribute currently showing in the attribute ring control has\nconstants as valid values, you can view a list of the constants by\npressing **Enter** on this control. Select a value by double-clicking on\nit or by selecting it and then pressing **Enter**.\n' }, 'name': 'attributeValue', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'GetAttributeViSession': { 'codegen_method': 'no', 'documentation': { 'description': '\n| Queries the value of a ViSession attribute.\n| You can use this function to get the values of device-specific\n attributes and inherent IVI attributes.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the ID of an attribute. From the function panel window, you\ncan use this control as follows.\n\n- In the function panel window, click on the control or press **Enter**\n or the spacebar to display a dialog box containing hierarchical list\n of the available attributes. Help text is shown for each attribute.\n Select an attribute by double-clicking on it or by selecting it and\n then pressing **Enter**.\n- A ring control at the top of the dialog box allows you to see all IVI\n attributes or only the attributes of type ViSession. If you choose to\n see all IVI attributes, the data types appear to the right of the\n attribute names in the list box. Attributes with data types other\n than ViSession are dim. If you select an attribute data type that is\n dim, LabWindows/CVI transfers you to the function panel for the\n corresponding function that is consistent with the data type.\n- If you want to enter a variable name, press **Ctrl**\\ +\\ **T** to\n change this ring control to a manual input box. If the attribute in\n this ring control has named constants as valid values, you can view\n the constants by moving to the value control and pressing **Enter**.\n' }, 'name': 'attributeId', 'type': 'ViAttr' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the current value of the attribute. Passes the address of a\nViSession variable.\nIf the attribute currently showing in the attribute ring control has\nconstants as valid values, you can view a list of the constants by\npressing **Enter** on this control. Select a value by double-clicking on\nit or by selecting it and then pressing **Enter**.\n' }, 'name': 'attributeValue', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'GetAttributeViString': { 'codegen_method': 'private', 'documentation': { 'description': '\n| Queries the value of a ViString attribute.\n| You can use this function to get the values of device-specific\n attributes and inherent IVI attributes.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the ID of an attribute. From the function panel window, you\ncan use this control as follows.\n\n- In the function panel window, click on the control or press or the\n spacebar to display a dialog box containing hierarchical list of the\n available attributes. Help text is shown for each attribute. Select\n an attribute by double-clicking on it or by selecting it and then\n pressing .\n- A ring control at the top of the dialog box allows you to see all IVI\n attributes or only the attributes of type ViString. If you choose to\n see all IVI attributes, the data types appear to the right of the\n attribute names in the list box. Attributes with data types other\n than ViString are dimmed. If you select an attribute data type that\n is dimmed, LabWindows/CVI transfers you to the function panel for the\n corresponding function that is consistent with the data type.\n- If you want to enter a variable name, press to change this ring\n control to a manual input control. If the attribute in this ring\n control has named constants as valid values, you can view the\n constants by moving to the value control and pressing .\n' }, 'name': 'attributeId', 'type': 'ViAttr' }, { 'direction': 'in', 'documentation': { 'description': '\nPasses the number of bytes in the buffer and specifies the number of\nbytes in the ViChar array you specify for **value**. If the current\nvalue of **value**, including the terminating NUL byte, is larger than\nthe size you indicate in this parameter, the function copies (buffer\nsize - 1) bytes into the buffer, places an ASCII NUL byte at the end of\nthe buffer, and returns the buffer size you must pass to get the entire\nvalue. For example, if the value is 123456 and the buffer size is 4, the\nfunction places 123 into the buffer and returns 7.\nTo obtain the required buffer size, you can pass 0 for this attribute\nand VI_NULL for **value**. If you want the function to fill in the\nbuffer regardless of the number of bytes in the value, pass a negative\nnumber for this attribute.\n' }, 'name': 'bufferSize', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': '\nThe buffer in which the function returns the current value of the\nattribute. The buffer must be of type ViChar and have at least as many\nbytes as indicated in **bufSize**.\nIf the current value of the attribute, including the terminating NUL\nbyte, contains more bytes that you indicate in this attribute, the\nfunction copies (buffer size -1) bytes into the buffer, places an ASCII\nNUL byte at the end of the buffer, and returns the buffer size you must\npass to get the entire value. For example, if the value is 123456 and\nthe buffer size is 4, the function places 123 into the buffer and\nreturns 7.\nIf you specify 0 for **bufSize**, you can pass VI_NULL for this\nattribute.\nIf the attribute currently showing in the attribute ring control has\nconstants as valid values, you can view a list of the constants by\npressing on this control. Select a value by double-clicking on it or by\nselecting it and then pressing .\n' }, 'name': 'attributeValue', 'size': { 'mechanism': 'ivi-dance', 'value': 'bufferSize' }, 'type': 'ViChar[]' } ], 'returns': 'ViStatus' }, 'GetCalUserDefinedInfo': { 'codegen_method': 'no', 'documentation': { 'description': 'Returns the user-defined information in the device onboard EEPROM.' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitExtCal or niDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the user-defined information stored in the device onboard\nEEPROM.\n' }, 'name': 'info', 'size': { 'mechanism': 'fixed', 'value': 256 }, 'type': 'ViChar[]' } ], 'returns': 'ViStatus' }, 'GetCalUserDefinedInfoMaxSize': { 'codegen_method': 'no', 'documentation': { 'description': '\nReturns the maximum number of characters that can be used to store\nuser-defined information in the device onboard EEPROM.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitExtCal or niDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the number of characters that can be stored in the device\nonboard EEPROM.\n' }, 'name': 'infoSize', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'GetChannelName': { 'documentation': { 'description': '\nRetrieves the output **channelName** that corresponds to the requested\n**index**. Use the NIDCPOWER_ATTR_CHANNEL_COUNT attribute to\ndetermine the upper bound of valid values for **index**.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies which output channel name to return. The index values begin at\n1.\n' }, 'name': 'index', 'type': 'ViInt32' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the number of bytes in the ViChar array you specify for\n**channelName**. If the **channelName**, including the terminating NUL\nbyte, contains more bytes than you indicate in this attribute, the\nfunction copies (buffer size - 1) bytes into the buffer, places an ASCII\nNUL byte at the end of the buffer, and returns the buffer size you must\npass to get the entire value. For example, if the value is 123456 and\nthe buffer size is 4, the function places 123 into the buffer and\nreturns 7.\nIf you pass 0, you can pass VI_NULL for **channelName**.\n' }, 'name': 'bufferSize', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the output channel name that corresponds to **index**.' }, 'name': 'channelName', 'size': { 'mechanism': 'ivi-dance', 'value': 'bufferSize' }, 'type': 'ViChar[]' } ], 'returns': 'ViStatus' }, 'GetChannelNameFromString': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'index', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'bufferSize', 'type': 'ViInt32' }, { 'direction': 'out', 'name': 'channelName', 'size': { 'mechanism': 'ivi-dance', 'value': 'bufferSize' }, 'type': 'ViChar[]' } ], 'returns': 'ViStatus' }, 'GetError': { 'codegen_method': 'private', 'documentation': { 'description': '\n| Retrieves and then clears the IVI error information for the session or\n the current execution thread unless **bufferSize** is 0, in which case\n the function does not clear the error information. By passing 0 for\n the buffer size, you can ascertain the buffer size required to get the\n entire error description string and then call the function again with\n a sufficiently large buffer size.\n| If the user specifies a valid IVI session for **vi**, this function\n retrieves and then clears the error information for the session. If\n the user passes VI_NULL for **vi**, this function retrieves and then\n clears the error information for the current execution thread. If\n **vi** is an invalid session, the function does nothing and returns an\n error. Normally, the error information describes the first error that\n occurred since the user last called niDCPower_GetError or\n niDCPower_ClearError.\n' }, 'is_error_handling': True, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the error code for the session or execution thread.' }, 'name': 'code', 'type': 'ViStatus' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the number of bytes in the ViChar array you specify for\n**description**.\nIf the error description, including the terminating NUL byte, contains\nmore bytes than you indicate in this attribute, the function copies\n(buffer size - 1) bytes into the buffer, places an ASCII NUL byte at the\nend of the buffer, and returns the buffer size you must pass to get the\nentire value. For example, if the value is 123456 and the buffer size is\n4, the function places 123 into the buffer and returns 7.\nIf you pass 0 for this attribute, you can pass VI_NULL for\n**description**.\n' }, 'name': 'bufferSize', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the error description for the IVI session or execution thread.\nIf there is no description, the function returns an empty string.\nThe buffer must contain at least as many elements as the value you\nspecify with **bufferSize**. If the error description, including the\nterminating NUL byte, contains more bytes than you indicate with\n**bufferSize**, the function copies (buffer size - 1) bytes into the\nbuffer, places an ASCII NUL byte at the end of the buffer, and returns\nthe buffer size you must pass to get the entire value. For example, if\nthe value is 123456 and the buffer size is 4, the function places 123\ninto the buffer and returns 7.\nIf you pass 0 for **bufferSize**, you can pass VI_NULL for this\nattribute.\n' }, 'name': 'description', 'size': { 'mechanism': 'ivi-dance', 'value': 'bufferSize' }, 'type': 'ViChar[]' } ], 'returns': 'ViStatus', 'use_session_lock': False }, 'GetExtCalLastDateAndTime': { 'codegen_method': 'private', 'documentation': { 'description': '\nReturns the date and time of the last successful calibration. The time\nreturned is 24-hour (military) local time; for example, if the device\nwas calibrated at 2:30 PM, this function returns 14 for **hours** and 30\nfor **minutes**.\n' }, 'method_name_for_documentation': 'get_ext_cal_last_date_and_time', 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitExtCal or niDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the **year** the device was last calibrated.' }, 'name': 'year', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the **month** in which the device was last calibrated.' }, 'name': 'month', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the **day** on which the device was last calibrated.' }, 'name': 'day', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the **hour** (in 24-hour time) in which the device was last\ncalibrated.\n' }, 'name': 'hour', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the **minute** in which the device was last calibrated.' }, 'name': 'minute', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'GetExtCalLastTemp': { 'documentation': { 'description': '\nReturns the onboard **temperature** of the device, in degrees Celsius,\nduring the last successful external calibration.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitExtCal or niDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the onboard **temperature** of the device, in degrees Celsius,\nduring the last successful external calibration.\n' }, 'name': 'temperature', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'GetExtCalRecommendedInterval': { 'documentation': { 'description': '\nReturns the recommended maximum interval, in **months**, between\nexternal calibrations.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitExtCal or niDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': '\nSpecifies the recommended maximum interval, in **months**, between\nexternal calibrations.\n' }, 'name': 'months', 'python_api_converter_name': 'convert_month_to_timedelta', 'type': 'ViInt32', 'type_in_documentation': 'datetime.timedelta' } ], 'returns': 'ViStatus' }, 'GetLastExtCalLastDateAndTime': { 'codegen_method': 'python-only', 'documentation': { 'description': 'Returns the date and time of the last successful calibration.' }, 'method_templates': [ { 'documentation_filename': 'default_method', 'method_python_name_suffix': '', 'session_filename': 'datetime_wrappers' } ], 'parameters': [ { 'direction': 'in', 'documentation': { 'description': 'Identifies a particular instrument session. **vi** is obtained from the niDCPower_InitExtCal or niDCPower_InitializeWithChannels function.' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': 'Indicates date and time of the last calibration.' }, 'name': 'month', 'type': 'datetime.datetime' } ], 'python_name': 'get_ext_cal_last_date_and_time', 'real_datetime_call': 'GetExtCalLastDateAndTime', 'returns': 'ViStatus' }, 'GetLastSelfCalLastDateAndTime': { 'codegen_method': 'python-only', 'documentation': { 'description': 'Returns the date and time of the oldest successful self-calibration from among the channels in the session.', 'note': 'This function is not supported on all devices.' }, 'method_templates': [ { 'documentation_filename': 'default_method', 'method_python_name_suffix': '', 'session_filename': 'datetime_wrappers' } ], 'parameters': [ { 'direction': 'in', 'documentation': { 'description': 'Identifies a particular instrument session. **vi** is obtained from the niDCPower_InitExtCal or niDCPower_InitializeWithChannels function.' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the date and time the device was last calibrated.' }, 'name': 'month', 'type': 'datetime.datetime' } ], 'python_name': 'get_self_cal_last_date_and_time', 'real_datetime_call': 'GetSelfCalLastDateAndTime', 'returns': 'ViStatus' }, 'GetNextCoercionRecord': { 'codegen_method': 'no', 'documentation': { 'description': '\nReturns the coercion information associated with the IVI session and\nclears the earliest instance in which NI-DCPower coerced a value you\nspecified.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the number of bytes in the ViChar array you specify for\n**coercionRecord**. If the next coercion record string, including the\nterminating NUL byte, contains more bytes than you indicate in this\nattribute, the function copies (buffer size - 1) bytes into the buffer,\nplaces an ASCII NUL byte at the end of the buffer, and returns the\nbuffer size you must pass to get the entire value. For example, if the\nvalue is 123456 and the buffer size is 4, the function places 123 into\nthe buffer and returns 7.\nIf you pass 0, you can pass VI_NULL for **coercionRecord**.\n' }, 'name': 'bufferSize', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the next **coercionRecord** for the IVI session. If there are no\n**coercionRecords**, the function returns an empty string.\n' }, 'name': 'coercionRecord', 'size': { 'mechanism': 'ivi-dance', 'value': 'bufferSize' }, 'type': 'ViChar[]' } ], 'returns': 'ViStatus' }, 'GetNextInterchangeWarning': { 'codegen_method': 'no', 'documentation': { 'description': '\nThis function returns the interchangeability warning associated with the\nIVI session. It retrieves and clears the earliest instance in which the\nclass driver recorded an interchangeability warning. Interchangeability\nwarnings indicate that using your application with a different device\nmay cause a different behavior.\n\nNI-DCPower performs interchangeability checking when the\nNIDCPOWER_ATTR_INTERCHANGE_CHECK attribute is set to VI_TRUE. This\nfunction returns an empty string in warning if no interchangeability\nwarnings remain for the session. In general, NI-DCPower generates\ninterchangeability warnings when an attribute that affects the behavior\nof the device is in a state that you did not specify.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the number of bytes in the ViChar array you specify for\n**interchangeWarning**. If the next interchangeability warning string,\nincluding the terminating NUL byte, contains more bytes than you\nindicate in this attribute, the function copies (buffer size - 1) bytes\ninto the buffer, places an ASCII NUL byte at the end of the buffer, and\nreturns the buffer size you must pass to get the entire value. For\nexample, if the value is 123456 and the buffer size is 4, the function\nplaces 123 into the buffer and returns 7.\nIf you pass 0, you can pass VI_NULL for **interchangeWarning**.\n' }, 'name': 'bufferSize', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the next interchange warning for the IVI session. If there are\nno interchange warnings, the function returns an empty string.\n' }, 'name': 'interchangeWarning', 'size': { 'mechanism': 'ivi-dance', 'value': 'bufferSize' }, 'type': 'ViChar[]' } ], 'returns': 'ViStatus' }, 'GetSelfCalLastDateAndTime': { 'codegen_method': 'private', 'documentation': { 'description': '\nReturns the date and time of the oldest successful self-calibration from\namong the channels in the session.\n\nThe time returned is 24-hour (military) local time; for example, if you\nhave a session using channels 1 and 2, and a self-calibration was\nperformed on channel 1 at 2:30 PM, and a self-calibration was performed\non channel 2 at 3:00 PM on the same day, this function returns 14 for\n**hours** and 30 for **minutes**.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'method_name_for_documentation': 'get_self_cal_last_date_and_time', 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitExtCal or niDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the **year** the device was last calibrated.' }, 'name': 'year', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the **month** in which the device was last calibrated.' }, 'name': 'month', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the **day** on which the device was last calibrated.' }, 'name': 'day', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the **hour** (in 24-hour time) in which the device was last\ncalibrated.\n' }, 'name': 'hour', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the **minute** in which the device was last calibrated.' }, 'name': 'minute', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'GetSelfCalLastTemp': { 'documentation': { 'description': '\nReturns the onboard temperature of the device, in degrees Celsius,\nduring the oldest successful self-calibration from among the channels in\nthe session.\n\nFor example, if you have a session using channels 1 and 2, and you\nperform a self-calibration on channel 1 with a device temperature of 25\ndegrees Celsius at 2:00, and a self-calibration was performed on channel\n2 at 27 degrees Celsius at 3:00 on the same day, this function returns\n25 for the **temperature** parameter.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitExtCal or niDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the onboard **temperature** of the device, in degrees Celsius,\nduring the oldest successful calibration.\n' }, 'name': 'temperature', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ImportAttributeConfigurationBuffer': { 'documentation': { 'description': '\nImports an attribute configuration to the session from the specified\nconfiguration buffer.\n\nYou can export and import session attribute configurations only between\ndevices with identical model numbers and the same number of configured\nchannels.\n\n**Support for this Function**\n\nCalling this function in `Sequence Source\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(sequencing)>`__ is unsupported.\n\n**Channel Mapping Behavior for Multichannel Sessions**\n\nWhen importing and exporting session attribute configurations between\nNI‑DCPower sessions that were initialized with different channels, the\nconfigurations of the exporting channels are mapped to the importing\nchannels in the order you specify in the **channelName** input to the\nniDCPower_InitializeWithChannels function.\n\nFor example, if your entry for **channelName** is 0,1 for the exporting\nsession and 1,2 for the importing session:\n\n- The configuration exported from channel 0 is imported into channel 1.\n- The configuration exported from channel 1 is imported into channel 2.\n\n**Related Topics:**\n\n`Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__\n\n`Using Properties and\nAttributes <REPLACE_DRIVER_SPECIFIC_URL_1(using_properties_and_attributes)>`__\n\n`Setting Properties and Attributes Before Reading\nThem <REPLACE_DRIVER_SPECIFIC_URL_1(setting_before_reading_attributes)>`__\n', 'note': '\nThis function will return an error if the total number of channels\ninitialized for the exporting session is not equal to the total number\nof channels initialized for the importing session.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the size, in bytes, of the byte array to import. If you enter\n0, this function returns the needed size.\n' }, 'name': 'size', 'type': 'ViInt32' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the byte array buffer that contains the attribute\nconfiguration to import.\n' }, 'name': 'configuration', 'size': { 'mechanism': 'len', 'value': 'size' }, 'type': 'ViInt8[]' } ], 'returns': 'ViStatus' }, 'ImportAttributeConfigurationFile': { 'documentation': { 'description': '\nImports an attribute configuration to the session from the specified\nfile.\n\nYou can export and import session attribute configurations only between\ndevices with identical model numbers and the same number of configured\nchannels.\n\n**Support for this Function**\n\nCalling this function in `Sequence Source\nMode <REPLACE_DRIVER_SPECIFIC_URL_1(sequencing)>`__ is unsupported.\n\n**Channel Mapping Behavior for Multichannel Sessions**\n\nWhen importing and exporting session attribute configurations between\nNI‑DCPower sessions that were initialized with different channels, the\nconfigurations of the exporting channels are mapped to the importing\nchannels in the order you specify in the **channelName** input to the\nniDCPower_InitializeWithChannels function.\n\nFor example, if your entry for **channelName** is 0,1 for the exporting\nsession and 1,2 for the importing session:\n\n- The configuration exported from channel 0 is imported into channel 1.\n- The configuration exported from channel 1 is imported into channel 2.\n\n**Related Topics:**\n\n`Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__\n\n`Using Properties and\nAttributes <REPLACE_DRIVER_SPECIFIC_URL_1(using_properties_and_attributes)>`__\n\n`Setting Properties and Attributes Before Reading\nThem <REPLACE_DRIVER_SPECIFIC_URL_1(setting_before_reading_attributes)>`__\n', 'note': '\nThis function will return an error if the total number of channels\ninitialized for the exporting session is not equal to the total number\nof channels initialized for the importing session.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the absolute path to the file containing the attribute\nconfiguration to import. If you specify an empty or relative path, this\nfunction returns an error.\n**Default File Extension:** .nidcpowerconfig\n' }, 'name': 'filePath', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'InitExtCal': { 'codegen_method': 'no', 'documentation': { 'description': '\nIf **password** is valid, this function creates a new IVI instrument\ndriver session to the device specified in **resourceName** and returns\nan instrument handle you use to identify the device in all subsequent\nNI-DCPower function calls. This function also sends initialization\ncommands to set the device to the state necessary for the operation of\nNI-DCPower.\n\nOpening a calibration session always performs a reset. Refer to the\ncalibration procedure for the device you are calibrating for detailed\ninstructions on the appropriate use of this function. This function uses\nthe `deprecated programming state\nmodel <REPLACE_DRIVER_SPECIFIC_URL_1(initializedeprecatedmodel)>`__.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the **resourceName** assigned by Measurement & Automation\nExplorer (MAX), for example "PXI1Slot3" where "PXI1Slot3" is an\ninstrument\'s **resourceName**. **resourceName** can also be a logical\nIVI name.\n' }, 'name': 'resourceName', 'type': 'ViRsrc' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the **password** for opening a calibration session. The\ninitial password is factory configured to "NI". **password** can be a\nmaximum of four alphanumeric characters.\n' }, 'name': 'password', 'type': 'ViConstString' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns a handle that you use to identify the session in all subsequent\nNI-DCPower function calls.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'InitWithOptions': { 'codegen_method': 'no', 'documentation': { 'description': '\nThis function is deprecated. Use niDCPower_InitializeWithChannels\ninstead.\n\nCreates a new IVI instrument driver session to the device specified in\n**resourceName** and returns a session handle you use to identify the\ndevice in all subsequent NI-DCPower function calls. With this function,\nyou can optionally set the initial state of the following session\nattributes:\n\n- NIDCPOWER_ATTR_SIMULATE\n- NIDCPOWER_ATTR_DRIVER_SETUP\n- NIDCPOWER_ATTR_RANGE_CHECK\n- NIDCPOWER_ATTR_QUERY_INSTRUMENT_STATUS\n- NIDCPOWER_ATTR_CACHE\n- NIDCPOWER_ATTR_RECORD_COERCIONS\n\nThis function also sends initialization commands to set the device to\nthe state necessary for NI-DCPower to operate.\n\nTo place the device in a known start-up state when creating a new\nsession, set **resetDevice** to VI_TRUE. This action is equivalent to\nusing the niDCPower_reset function.\n\nTo open a session and leave the device in its existing configuration\nwithout passing through a transitional output state, set **resetDevice**\nto VI_FALSE, and immediately call the niDCPower_Abort function. Then\nconfigure the device as in the previous session changing only the\ndesired settings, and then call the niDCPower_Initiate function.\n\nRefer to the `deprecated programming state\nmodel <REPLACE_DRIVER_SPECIFIC_URL_1(initializedeprecatedmodel)>`__ for\ninformation about the specific software states.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the **resourceName** assigned by Measurement & Automation\nExplorer (MAX), for example "PXI1Slot3" where "PXI1Slot3" is an\ninstrument\'s **resourceName**. **resourceName** can also be a logical\nIVI name.\n' }, 'name': 'resourceName', 'type': 'ViRsrc' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies whether the device is queried to determine if the device is a\nvalid instrument for NI-DCPower.\n' }, 'name': 'idQuery', 'type': 'ViBoolean' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies whether to reset the device during the initialization\nprocedure.\n' }, 'name': 'resetDevice', 'type': 'ViBoolean' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the initial value of certain attributes for the session. The\nsyntax for **optionString** is a list of attributes with an assigned\nvalue where 1 is VI_TRUE and 0 is VI_FALSE. Each attribute/value\ncombination is delimited with a comma, as shown in the following\nexample:\n\n"Simulate=0,RangeCheck=1,QueryInstrStatus=0,Cache=1"\n\nIf you do not wire this input or pass an empty string, the session\nassigns the default values, shown in the example, for these attributes.\nYou do not have to specify a value for all the attributes. If you do not\nspecify a value for an attribute, the default value is used.\n\nFor more information about simulating a device, refer to `Simulating a\nPower Supply or SMU <REPLACE_DRIVER_SPECIFIC_URL_1(simulate)>`__.\n' }, 'name': 'optionString', 'type': 'ViString' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns a handle that you use to identify the device in all subsequent\nNI-DCPower function calls.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'InitializeWithChannels': { 'codegen_method': 'private', 'documentation': { 'description': '\nCreates and returns a new NI-DCPower session to the power supply or SMU\nspecified in **resource name** to be used in all subsequent NI-DCPower\nfunction calls. With this function, you can optionally set the initial\nstate of the following session attributes:\n\n- NIDCPOWER_ATTR_SIMULATE\n- NIDCPOWER_ATTR_DRIVER_SETUP\n\nAfter calling this function, the session will be in the Uncommitted\nstate. Refer to the `Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__ topic for\ndetails about specific software states.\n\nTo place the device in a known start-up state when creating a new\nsession, set **reset** to VI_TRUE. This action is equivalent to using\nthe niDCPower_reset function immediately after initializing the\nsession.\n\nTo open a session and leave the device in its existing configuration\nwithout passing through a transitional output state, set **reset** to\nVI_FALSE. Then configure the device as in the previous session,\nchanging only the desired settings, and then call the\nniDCPower_Initiate function.\n\n**Related Topics:**\n\n`Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__\n' }, 'method_name_for_documentation': '__init__', 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the **resourceName** assigned by Measurement & Automation\nExplorer (MAX), for example "PXI1Slot3" where "PXI1Slot3" is an\ninstrument\'s **resourceName**. **resourceName** can also be a logical\nIVI name.\n' }, 'name': 'resourceName', 'type': 'ViRsrc' }, { 'default_value': None, 'direction': 'in', 'documentation': { 'description': '\nSpecifies which output channel(s) to include in a new session. Specify\nmultiple channels by using a channel list or a channel range. A channel\nlist is a comma (,) separated sequence of channel names (for example,\n0,2 specifies channels 0 and 2). A channel range is a lower bound\nchannel followed by a hyphen (-) or colon (:) followed by an upper bound\nchannel (for example, 0-2 specifies channels 0, 1, and 2). In the\nRunning state, multiple output channel configurations are performed\nsequentially based on the order specified in this parameter. If you do\nnot specify any channels, by default all channels on the device are\nincluded in the session.\n' }, 'is_repeated_capability': False, 'name': 'channels', 'python_api_converter_name': 'convert_repeated_capabilities_from_init', 'type': 'ViConstString', 'type_in_documentation': 'str, list, range, tuple' }, { 'default_value': False, 'direction': 'in', 'documentation': { 'description': '\nSpecifies whether to reset the device during the initialization\nprocedure.\n' }, 'name': 'reset', 'type': 'ViBoolean' }, { 'default_value': '""', 'direction': 'in', 'documentation': { 'description': '\nSpecifies the initial value of certain attributes for the session. The\nsyntax for **optionString** is a list of attributes with an assigned\nvalue where 1 is VI_TRUE and 0 is VI_FALSE. For example:\n\n"Simulate=0"\n\nYou do not have to specify a value for all the attributes. If you do not\nspecify a value for an attribute, the default value is used.\n\nFor more information about simulating a device, refer to `Simulating a\nPower Supply or SMU <REPLACE_DRIVER_SPECIFIC_URL_1(simulate)>`__.\n' }, 'name': 'optionString', 'python_api_converter_name': 'convert_init_with_options_dictionary', 'type': 'ViConstString', 'type_in_documentation': 'dict' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns a session handle that you use to identify the device in all\nsubsequent NI-DCPower function calls.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus', 'use_session_lock': False }, 'InitializeWithIndependentChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'resourceName', 'type': 'ViRsrc' }, { 'direction': 'in', 'name': 'reset', 'type': 'ViBoolean' }, { 'direction': 'in', 'name': 'optionString', 'type': 'ViConstString' }, { 'direction': 'out', 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'Initiate': { 'codegen_method': 'private', 'documentation': { 'description': '\nStarts generation or acquisition, causing the NI-DCPower session to\nleave the Uncommitted state or Committed state and enter the Running\nstate. To return to the Committed state call the niDCPower_Abort\nfunction. Refer to the `Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__ topic in\nthe *NI DC Power Supplies and SMUs Help* for information about the\nspecific NI-DCPower software states.\n\n**Related Topics:**\n\n`Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__\n' }, 'method_name_for_documentation': 'initiate', 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'InitiateWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'InvalidateAllAttributes': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'LockSession': { 'documentation': { 'description': '\n| Obtains a multithread lock on the device session. Before doing so, the\n software waits until all other execution threads release their locks\n on the device session.\n| Other threads may have obtained a lock on this session for the\n following reasons:\n\n- The application called the niDCPower_LockSession function.\n- A call to NI-DCPower locked the session.\n- A call to the IVI engine locked the session.\n- After a call to the niDCPower_LockSession function returns\n successfully, no other threads can access the device session until\n you call the niDCPower_UnlockSession function.\n- Use the niDCPower_LockSession function and the\n niDCPower_UnlockSession function around a sequence of calls to\n instrument driver functions if you require that the device retain its\n settings through the end of the sequence.\n\nYou can safely make nested calls to the niDCPower_LockSession function\nwithin the same thread. To completely unlock the session, you must\nbalance each call to the niDCPower_LockSession function with a call to\nthe niDCPower_UnlockSession function. If, however, you use\n**Caller_Has_Lock** in all calls to the niDCPower_LockSession and\nniDCPower_UnlockSession function within a function, the IVI Library\nlocks the session only once within the function regardless of the number\nof calls you make to the niDCPower_LockSession function. This behavior\nallows you to call the niDCPower_UnlockSession function just once at\nthe end of the function.\n' }, 'method_templates': [ { 'documentation_filename': 'lock', 'method_python_name_suffix': '', 'session_filename': 'lock' } ], 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': '\n| This parameter is optional. If you do not want to use this parameter,\n pass VI_NULL.\n| Use this parameter in complex functions to keep track of whether you\n obtain a lock and therefore need to unlock the session. Pass the\n address of a local ViBoolean variable. In the declaration of the local\n variable, initialize it to VI_FALSE. Pass the address of the same\n local variable to any other calls you make to the\n niDCPower_LockSession function or the niDCPower_UnlockSession\n function in the same function.\n| The parameter is an input/output parameter. The niDCPower_LockSession\n and niDCPower_UnlockSession functions each inspect the current value\n and take the following actions.\n\n- If the value is VI_TRUE, the niDCPower_LockSession function does\n not lock the session again.\n- If the value is VI_FALSE, the niDCPower_LockSession function\n obtains the lock and sets the value of the parameter to VI_TRUE.\n- If the value is VI_FALSE, the niDCPower_UnlockSession function does\n not attempt to unlock the session.\n- If the value is VI_TRUE, the niDCPower_UnlockSession function\n releases the lock and sets the value of the parameter to VI_FALSE.\n\n| Thus, you can, call the niDCPower_UnlockSession function at the end\n of your function without worrying about whether you actually have the\n lock, as shown in the following example.\n| ViStatus TestFunc (ViSession vi, ViInt32 flags)\n {\n ViStatus error = VI_SUCCESS;\n ViBoolean haveLock = VI_FALSE;\n if (flags & BIT_1)\n {\n viCheckErr( niDCPower_LockSession(vi, &haveLock;));\n viCheckErr( TakeAction1(vi));\n if (flags & BIT_2)\n {\n viCheckErr( niDCPower_UnlockSession(vi, &haveLock;));\n viCheckErr( TakeAction2(vi));\n viCheckErr( niDCPower_LockSession(vi, &haveLock;);\n }\n if (flags & BIT_3)\n viCheckErr( TakeAction3(vi));\n }\n Error:\n /\\*At this point, you cannot really be sure that you have the lock.\n Fortunately, the haveLock variable takes care of that for you.\\*/\n niDCPower_UnlockSession(vi, &haveLock;);\n return error;\n| }\n' }, 'name': 'callerHasLock', 'type': 'ViBoolean' } ], 'python_name': 'lock', 'render_in_session_base': True, 'returns': 'ViStatus', 'use_session_lock': False }, 'Measure': { 'documentation': { 'description': '\nReturns the measured value of either the voltage or current on the\nspecified output channel. Each call to this function blocks other\nfunction calls until the hardware returns the **measurement**. To\nmeasure multiple output channels, use the niDCPower_MeasureMultiple\nfunction.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel to measure. Only one measurement at a time\nmay be made with the niDCPower_Measure function. Use the\nniDCPower_MeasureMultiple function to measure multiple channels.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies whether a voltage or current value is measured.\n**Defined Values**:\n', 'table_body': [ [ 'NIDCPOWER_VAL_MEASURE_VOLTAGE (1)', 'The device measures voltage.' ], [ 'NIDCPOWER_VAL_MEASURE_CURRENT (0)', 'The device measures current.' ] ] }, 'enum': 'MeasurementTypes', 'name': 'measurementType', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the value of the measurement, either in volts for voltage or\namps for current.\n' }, 'name': 'measurement', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'MeasureMultiple': { 'codegen_method': 'private', 'documentation': { 'description': '\nReturns arrays of the measured voltage and current values on the\nspecified output channel(s). Each call to this function blocks other\nfunction calls until the measurements are returned from the device. The\norder of the measurements returned in the array corresponds to the order\non the specified output channel(s).\n' }, 'method_name_for_documentation': 'measure_multiple', 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channels to measure. You can specify multiple\nchannels by using a channel list or a channel range. A channel list is a\ncomma (,) separated sequence of channel names (e.g. 0,2 specifies\nchannels 0 and 2). A channel range is a lower bound channel followed by\na hyphen (-) or colon (:) followed by an upper bound channel (e.g. 0-2\nspecifies channels 0, 1, and 2). If you do not specify a channel name,\nthe function uses all channels in the session.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns an array of voltage measurements. The measurements in the array\nare returned in the same order as the channels specified in\n**channelName**. Ensure that sufficient space has been allocated for the\nreturned array.\n' }, 'name': 'voltageMeasurements', 'size': { 'mechanism': 'python-code', 'value': 'self._parse_channel_count()' }, 'type': 'ViReal64[]', 'use_array': True }, { 'direction': 'out', 'documentation': { 'description': '\nReturns an array of current measurements. The measurements in the array\nare returned in the same order as the channels specified in\n**channelName**. Ensure that sufficient space has been allocated for the\nreturned array.\n' }, 'name': 'currentMeasurements', 'size': { 'mechanism': 'python-code', 'value': 'self._parse_channel_count()' }, 'type': 'ViReal64[]', 'use_array': True } ], 'returns': 'ViStatus' }, 'ParseChannelCount': { 'codegen_method': 'private', 'documentation': { 'description': 'Returns the number of channels.' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelsString', 'type': 'ViConstString' }, { 'direction': 'out', 'name': 'numberOfChannels', 'type': 'ViUInt32' } ], 'returns': 'ViStatus' }, 'QueryInCompliance': { 'documentation': { 'description': '\nQueries the specified output device to determine if it is operating at\nthe `compliance <REPLACE_DRIVER_SPECIFIC_URL_2(compliance)>`__ limit.\n\nThe compliance limit is the current limit when the output function is\nset to NIDCPOWER_VAL_DC_VOLTAGE. If the output is operating at the\ncompliance limit, the output reaches the current limit before the\ndesired voltage level. Refer to the niDCPower_ConfigureOutputFunction\nfunction and the niDCPower_ConfigureCurrentLimit function for more\ninformation about output function and current limit, respectively.\n\nThe compliance limit is the voltage limit when the output function is\nset to NIDCPOWER_VAL_DC_CURRENT. If the output is operating at the\ncompliance limit, the output reaches the voltage limit before the\ndesired current level. Refer to the niDCPower_ConfigureOutputFunction\nfunction and the niDCPower_ConfigureVoltageLimit function for more\ninformation about output function and voltage limit, respectively.\n\n**Related Topics:**\n\n`Compliance <REPLACE_DRIVER_SPECIFIC_URL_1(compliance)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel to query. Compliance status can only be\nqueried for one channel at a time.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'out', 'documentation': { 'description': 'Returns whether the device output channel is in compliance.' }, 'name': 'inCompliance', 'type': 'ViBoolean' } ], 'returns': 'ViStatus' }, 'QueryMaxCurrentLimit': { 'documentation': { 'description': '\nQueries the maximum current limit on an output channel if the output\nchannel is set to the specified **voltageLevel**.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel to query. The maximum current limit may\nonly be queried for one channel at a time.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the voltage level to use when calculating the\n**maxCurrentLimit**.\n' }, 'name': 'voltageLevel', 'type': 'ViReal64' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the maximum current limit that can be set with the specified\n**voltageLevel**.\n' }, 'name': 'maxCurrentLimit', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'QueryMaxVoltageLevel': { 'documentation': { 'description': '\nQueries the maximum voltage level on an output channel if the output\nchannel is set to the specified **currentLimit**.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel to query. The maximum voltage level may\nonly be queried for one channel at a time.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the current limit to use when calculating the\n**maxVoltageLevel**.\n' }, 'name': 'currentLimit', 'type': 'ViReal64' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the maximum voltage level that can be set on an output channel\nwith the specified **currentLimit**.\n' }, 'name': 'maxVoltageLevel', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'QueryMinCurrentLimit': { 'documentation': { 'description': '\nQueries the minimum current limit on an output channel if the output\nchannel is set to the specified **voltageLevel**.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel to query. The minimum current limit may\nonly be queried for one channel at a time.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the voltage level to use when calculating the\n**minCurrentLimit**.\n' }, 'name': 'voltageLevel', 'type': 'ViReal64' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the minimum current limit that can be set on an output channel\nwith the specified **voltageLevel**.\n' }, 'name': 'minCurrentLimit', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'QueryOutputState': { 'documentation': { 'description': '\nQueries the specified output channel to determine if the output channel\nis currently in the state specified by **outputState**.\n\n**Related Topics:**\n\n`Compliance <REPLACE_DRIVER_SPECIFIC_URL_1(compliance)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel to query. The output state may only be\nqueried for one channel at a time.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output state of the output channel that is being queried.\n**Defined Values**:\n', 'table_body': [ [ 'NIDCPOWER_VAL_OUTPUT_CONSTANT_VOLTAGE (0)', 'The device maintains a constant voltage by adjusting the current.' ], [ 'NIDCPOWER_VAL_OUTPUT_CONSTANT_CURRENT (1)', 'The device maintains a constant current by adjusting the voltage.' ] ] }, 'enum': 'OutputStates', 'name': 'outputState', 'type': 'ViInt32' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns whether the device output channel is in the specified output\nstate.\n' }, 'name': 'inState', 'type': 'ViBoolean' } ], 'returns': 'ViStatus' }, 'ReadCurrentTemperature': { 'documentation': { 'description': '\nReturns the current onboard **temperature**, in degrees Celsius, of the\ndevice.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitExtCal or niDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the onboard **temperature**, in degrees Celsius, of the device.' }, 'name': 'temperature', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'ResetDevice': { 'documentation': { 'description': '\nResets the device to a known state. The function disables power\ngeneration, resets session attributes to their default values, clears\nerrors such as overtemperature and unexpected loss of auxiliary power,\ncommits the session attributes, and leaves the session in the\nUncommitted state. This function also performs a hard reset on the\ndevice and driver software. This function has the same functionality as\nusing reset in Measurement & Automation Explorer. Refer to the\n`Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__ topic for\nmore information about NI-DCPower software states.\n\nThis will also open the output relay on devices that have an output\nrelay.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'ResetInterchangeCheck': { 'codegen_method': 'no', 'documentation': { 'description': '\nWhen developing a complex test system that consists of multiple test\nmodules, it is generally a good idea to design the test modules so that\nthey can run in any order. To do so requires ensuring that each test\nmodule completely configures the state of each instrument it uses. If a\nparticular test module does not completely configure the state of an\ninstrument, the state of the instrument depends on the configuration\nfrom a previously executed test module. If you execute the test modules\nin a different order, the behavior of the instrument and therefore the\nentire test module is likely to change. This change in behavior is\ngenerally instrument specific and represents an interchangeability\nproblem.\n\nYou can use this function to test for such cases. After you call this\nfunction, the interchangeability checking algorithms in the specific\ndriver ignore all previous configuration operations. By calling this\nfunction at the beginning of a test module, you can determine whether\nthe test module has dependencies on the operation of previously executed\ntest modules.\n\nThis function does not clear the interchangeability warnings from the\nlist of previously recorded interchangeability warnings. If you want to\nguarantee that the niDCPower_GetNextInterchangeWarning function only\nreturns those interchangeability warnings that are generated after\ncalling this function, you must clear the list of interchangeability\nwarnings. You can clear the interchangeability warnings list by\nrepeatedly calling the niDCPower_GetNextInterchangeWarning function\nuntil no more interchangeability warnings are returned. If you are not\ninterested in the content of those warnings, you can call the\nniDCPower_ClearInterchangeWarnings function.\n', 'note': '\nniDCPower_GetNextInterchangeWarning does not mark any attributes for\nan interchange check.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'ResetWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'ResetWithDefaults': { 'documentation': { 'description': "\nResets the device to a known state. This function disables power\ngeneration, resets session attributes to their default values, commits\nthe session attributes, and leaves the session in the\n`Running <javascript:LaunchHelp('NI_DC_Power_Supplies_Help.chm::/programmingStates.html#running')>`__\nstate. In addition to exhibiting the behavior of the niDCPower_reset\nfunction, this function can assign user-defined default values for\nconfigurable attributes from the IVI configuration.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'ResetWithDefaultsWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'SendSoftwareEdgeTrigger': { 'documentation': { 'description': '\nAsserts the specified trigger. This function can override an external\nedge trigger.\n\n**Related Topics:**\n\n`Triggers <REPLACE_DRIVER_SPECIFIC_URL_1(trigger)>`__\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies which trigger to assert.\n**Defined Values:**\n', 'table_body': [ [ 'NIDCPOWER_VAL_START_TRIGGER (1034)', 'Asserts the Start trigger.' ], [ 'NIDCPOWER_VAL_SOURCE_TRIGGER (1035)', 'Asserts the Source trigger.' ], [ 'NIDCPOWER_VAL_MEASURE_TRIGGER (1036)', 'Asserts the Measure trigger.' ], [ 'NIDCPOWER_VAL_SEQUENCE_ADVANCE_TRIGGER (1037)', 'Asserts the Sequence Advance trigger.' ], [ 'NIDCPOWER_VAL_PULSE_TRIGGER (1053', 'Asserts the Pulse trigger.' ] ] }, 'enum': 'SendSoftwareEdgeTriggerType', 'name': 'trigger', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'SendSoftwareEdgeTriggerWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'trigger', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'SetAttributeViBoolean': { 'codegen_method': 'private', 'documentation': { 'description': '\n| Sets the value of a ViBoolean attribute.\n| This is a low-level function that you can use to set the values of\n device-specific attributes and inherent IVI attributes.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the ID of an attribute. From the function panel window, you\ncan use this control as follows.\n\n- In the function panel window, click on the control or press **Enter**\n or the spacebar to display a dialog box containing hierarchical list\n of the available attributes. Attributes whose value cannot be set are\n dim. Help text is shown for each attribute. Select an attribute by\n double-clicking on it or by selecting it and then pressing **Enter**.\n- Read-only attributes appear dim in the list box. If you select a\n read-only attribute, an error message appears. A ring control at the\n top of the dialog box allows you to see all IVI attributes or only\n the attributes of type ViBoolean. If you choose to see all IVI\n attributes, the data types appear to the right of the attribute names\n in the list box. Attributes with data types other than ViBoolean are\n dim. If you select an attribute data type that is dim, LabWindows/CVI\n transfers you to the function panel for the corresponding function\n that is consistent with the data type.\n- If you want to enter a variable name, press **Ctrl**\\ +\\ **T** to\n change this ring control to a manual input box. If the attribute in\n this ring control has named constants as valid values, you can view\n the constants by moving to the value control and pressing **Enter**.\n' }, 'name': 'attributeId', 'type': 'ViAttr' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the value to which you want to set the attribute. If the\nattribute currently showing in the attribute ring control has constants\nas valid values, you can view a list of the constants by pressing\n**Enter** on this control. Select a value by double-clicking on it or by\nselecting it and then pressing **Enter**.\n', 'note': '\nSome of the values might not be valid depending upon the current\nsettings of the device session.\n' }, 'name': 'attributeValue', 'type': 'ViBoolean' } ], 'returns': 'ViStatus' }, 'SetAttributeViInt32': { 'codegen_method': 'private', 'documentation': { 'description': '\n| Sets the value of a ViInt32 attribute.\n| This is a low-level function that you can use to set the values of\n device-specific attributes and inherent IVI attributes.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the ID of an attribute. From the function panel window, you\ncan use this control as follows.\n\n- In the function panel window, click on the control or press **Enter**\n or the spacebar to display a dialog box containing hierarchical list\n of the available attributes. Attributes whose value cannot be set are\n dim. Help text is shown for each attribute. Select an attribute by\n double-clicking on it or by selecting it and then pressing **Enter**.\n- Read-only attributes appear dim in the list box. If you select a\n read-only attribute, an error message appears. A ring control at the\n top of the dialog box allows you to see all IVI attributes or only\n the attributes of type ViInt32. If you choose to see all IVI\n attributes, the data types appear to the right of the attribute names\n in the list box. Attributes with data types other than ViInt32 are\n dim. If you select an attribute data type that is dim, LabWindows/CVI\n transfers you to the function panel for the corresponding function\n that is consistent with the data type.\n- If you want to enter a variable name, press **Ctrl**\\ +\\ **T** to\n change this ring control to a manual input box. If the attribute in\n this ring control has named constants as valid values, you can view\n the constants by moving to the value control and pressing **Enter**.\n' }, 'name': 'attributeId', 'type': 'ViAttr' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the value to which you want to set the attribute. If the\nattribute currently showing in the attribute ring control has constants\nas valid values, you can view a list of the constants by pressing\n**Enter** on this control. Select a value by double-clicking on it or by\nselecting it and then pressing **Enter**.\n', 'note': '\nSome of the values might not be valid depending upon the current\nsettings of the device session.\n' }, 'name': 'attributeValue', 'type': 'ViInt32' } ], 'returns': 'ViStatus' }, 'SetAttributeViInt64': { 'codegen_method': 'private', 'documentation': { 'description': '\n| Sets the value of a ViInt64 attribute.\n| This is a low-level function that you can use to set the values of\n device-specific attributes and inherent IVI attributes.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the ID of an attribute. From the function panel window, you\ncan use this control as follows.\n\n- In the function panel window, click on the control or press **Enter**\n or the spacebar to display a dialog box containing hierarchical list\n of the available attributes. Attributes whose value cannot be set are\n dim. Help text is shown for each attribute. Select an attribute by\n double-clicking on it or by selecting it and then pressing **Enter**.\n- Read-only attributes appear dim in the list box. If you select a\n read-only attribute, an error message appears. A ring control at the\n top of the dialog box allows you to see all IVI attributes or only\n the attributes of type ViReal64. If you choose to see all IVI\n attributes, the data types appear to the right of the attribute names\n in the list box. Attributes with data types other than ViReal64 are\n dim. If you select an attribute data type that is dim, LabWindows/CVI\n transfers you to the function panel for the corresponding function\n that is consistent with the data type.\n- If you want to enter a variable name, press **Ctrl**\\ +\\ **T** to\n change this ring control to a manual input box. If the attribute in\n this ring control has named constants as valid values, you can view\n the constants by moving to the value control and pressing **Enter**.\n' }, 'name': 'attributeId', 'type': 'ViAttr' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the value to which you want to set the attribute. If the\nattribute currently showing in the attribute ring control has constants\nas valid values, you can view a list of the constants by pressing\n**Enter** on this control. Select a value by double-clicking on it or by\nselecting it and then pressing **Enter**.\n', 'note': '\nSome of the values might not be valid depending upon the current\nsettings of the device session.\n' }, 'name': 'attributeValue', 'type': 'ViInt64' } ], 'returns': 'ViStatus' }, 'SetAttributeViReal64': { 'codegen_method': 'private', 'documentation': { 'description': '\n| Sets the value of a ViReal64 attribute.\n| This is a low-level function that you can use to set the values of\n device-specific attributes and inherent IVI attributes.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the ID of an attribute. From the function panel window, you\ncan use this control as follows.\n\n- In the function panel window, click on the control or press **Enter**\n or the spacebar to display a dialog box containing hierarchical list\n of the available attributes. Attributes whose value cannot be set are\n dim. Help text is shown for each attribute. Select an attribute by\n double-clicking on it or by selecting it and then pressing **Enter**.\n- Read-only attributes appear dim in the list box. If you select a\n read-only attribute, an error message appears. A ring control at the\n top of the dialog box allows you to see all IVI attributes or only\n the attributes of type ViReal64. If you choose to see all IVI\n attributes, the data types appear to the right of the attribute names\n in the list box. Attributes with data types other than ViReal64 are\n dim. If you select an attribute data type that is dim, LabWindows/CVI\n transfers you to the function panel for the corresponding function\n that is consistent with the data type.\n- If you want to enter a variable name, press **Ctrl**\\ +\\ **T** to\n change this ring control to a manual input box. If the attribute in\n this ring control has named constants as valid values, you can view\n the constants by moving to the value control and pressing **Enter**.\n' }, 'name': 'attributeId', 'type': 'ViAttr' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the value to which you want to set the attribute. If the\nattribute currently showing in the attribute ring control has constants\nas valid values, you can view a list of the constants by pressing\n**Enter** on this control. Select a value by double-clicking on it or by\nselecting it and then pressing **Enter**.\n', 'note': '\nSome of the values might not be valid depending upon the current\nsettings of the device session.\n' }, 'name': 'attributeValue', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'SetAttributeViSession': { 'codegen_method': 'no', 'documentation': { 'description': '\n| Sets the value of a ViSession attribute.\n| This is a low-level function that you can use to set the values of\n device-specific attributes and inherent IVI attributes.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the ID of an attribute. From the function panel window, you\ncan use this control as follows.\n\n- In the function panel window, click on the control or press **Enter**\n or the spacebar to display a dialog box containing hierarchical list\n of the available attributes. Attributes whose value cannot be set are\n dim. Help text is shown for each attribute. Select an attribute by\n double-clicking on it or by selecting it and then pressing **Enter**.\n- Read-only attributes appear dim in the list box. If you select a\n read-only attribute, an error message appears. A ring control at the\n top of the dialog box allows you to see all IVI attributes or only\n the attributes of type ViSession. If you choose to see all IVI\n attributes, the data types appear to the right of the attribute names\n in the list box. Attributes with data types other than ViSession are\n dim. If you select an attribute data type that is dim, LabWindows/CVI\n transfers you to the function panel for the corresponding function\n that is consistent with the data type.\n- If you want to enter a variable name, press **Ctrl**\\ +\\ **T** to\n change this ring control to a manual input box. If the attribute in\n this ring control has named constants as valid values, you can view\n the constants by moving to the value control and pressing **Enter**.\n' }, 'name': 'attributeId', 'type': 'ViAttr' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the value to which you want to set the attribute. If the\nattribute currently showing in the attribute ring control has constants\nas valid values, you can view a list of the constants by pressing\n**Enter** on this control. Select a value by double-clicking on it or by\nselecting it and then pressing **Enter**.\n', 'note': '\nSome of the values might not be valid depending upon the current\nsettings of the device session.\n' }, 'name': 'attributeValue', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'SetAttributeViString': { 'codegen_method': 'private', 'documentation': { 'description': '\n| Sets the value of a ViString attribute.\n| This is a low-level function that you can use to set the values of\n device-specific attributes and inherent IVI attributes.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel(s) to which this configuration value\napplies. Specify multiple channels by using a channel list or a channel\nrange. A channel list is a comma (,) separated sequence of channel names\n(for example, 0,2 specifies channels 0 and 2). A channel range is a\nlower bound channel followed by a hyphen (-) or colon (:) followed by an\nupper bound channel (for example, 0-2 specifies channels 0, 1, and 2).\nIn the Running state, multiple output channel configurations are\nperformed sequentially based on the order specified in this parameter.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the ID of an attribute. From the function panel window, you\ncan use this control as follows.\n\n- In the function panel window, click on the control or press **Enter**\n or the spacebar to display a dialog box containing hierarchical list\n of the available attributes. Attributes whose value cannot be set are\n dim. Help text is shown for each attribute. Select an attribute by\n double-clicking on it or by selecting it and then pressing **Enter**.\n- Read-only attributes appear dim in the list box. If you select a\n read-only attribute, an error message appears. A ring control at the\n top of the dialog box allows you to see all IVI attributes or only\n the attributes of type ViString. If you choose to see all IVI\n attributes, the data types appear to the right of the attribute names\n in the list box. Attributes with data types other than ViString are\n dim. If you select an attribute data type that is dim, LabWindows/CVI\n transfers you to the function panel for the corresponding function\n that is consistent with the data type.\n- If you want to enter a variable name, press **Ctrl**\\ +\\ **T** to\n change this ring control to a manual input box. If the attribute in\n this ring control has named constants as valid values, you can view\n the constants by moving to the value control and pressing **Enter**.\n' }, 'name': 'attributeId', 'type': 'ViAttr' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the value to which you want to set the attribute. If the\nattribute currently showing in the attribute ring control has constants\nas valid values, you can view a list of the constants by pressing\n**Enter** on this control. Select a value by double-clicking on it or by\nselecting it and then pressing **Enter**.\n', 'note': '\nSome of the values might not be valid depending upon the current\nsettings of the device session.\n' }, 'name': 'attributeValue', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'SetCalUserDefinedInfo': { 'codegen_method': 'no', 'documentation': { 'description': '\nStores a user-defined string of characters in the device onboard EEPROM.\nIf the string is longer than the maximum allowable size, it is\ntruncated. This function overwrites any existing user-defined\ninformation.\n\nIf you call this function in a session, **info** is immediately changed.\nIf you call this function in an external calibration session, **info**\nis changed only after you close the session using the\nniDCPower_CloseExtCal function with **action** set to\nNIDCPOWER_VAL_COMMIT.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitExtCal or niDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': 'Specifies the string to store in the device onboard EEPROM.' }, 'name': 'info', 'type': 'ViConstString' } ], 'returns': 'ViStatus' }, 'SetSequence': { 'documentation': { 'description': '\nConfigures a series of voltage or current outputs and corresponding\nsource delays. The source mode must be set to\n`Sequence <REPLACE_DRIVER_SPECIFIC_URL_1(sequencing)>`__ for this\nfunction to take effect.\n\nRefer to the `Configuring the Source\nUnit <REPLACE_DRIVER_SPECIFIC_URL_1(configuringthesourceunit)>`__ topic\nin the *NI DC Power Supplies and SMUs Help* for more information about\nhow to configure your device.\n\nUse this function in the Uncommitted or Committed programming states.\nRefer to the `Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__ topic in\nthe *NI DC Power Supplies and SMUs Help* for more information about\nNI-DCPower programming states.\n', 'note': "\nThis function is not supported on all devices. Refer to `Supported\nFunctions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the output channel to which this configuration value applies.\nYou can only set a sequence for one channel at a time.\n' }, 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the series of voltage levels or current levels, depending on\nthe configured `output\nfunction <REPLACE_DRIVER_SPECIFIC_URL_1(programming_output)>`__.\n**Valid values**:\nThe valid values for this parameter are defined by the voltage level\nrange or current level range.\n' }, 'name': 'values', 'size': { 'mechanism': 'len', 'value': 'size' }, 'type': 'ViReal64[]' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the source delay that follows the configuration of each value\nin the sequence.\n**Valid Values**:\nThe valid values are between 0 and 167 seconds.\n' }, 'name': 'sourceDelays', 'size': { 'mechanism': 'len', 'value': 'size' }, 'type': 'ViReal64[]' }, { 'direction': 'in', 'documentation': { 'description': '\nThe number of elements in the Values and the Source Delays arrays. The\nValues and Source Delays arrays should have the same size.\n' }, 'name': 'size', 'type': 'ViUInt32' } ], 'returns': 'ViStatus' }, 'UnlockSession': { 'documentation': { 'description': '\nReleases a lock that you acquired on an device session using\nniDCPower_LockSession. Refer to niDCPower_LockSession for additional\ninformation on session locks.\n' }, 'method_templates': [ { 'documentation_filename': 'unlock', 'method_python_name_suffix': '', 'session_filename': 'unlock' } ], 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': '\n| This attribute is optional. If you do not want to use this attribute,\n pass VI_NULL.\n| Use this attribute in complex functions to keep track of whether you\n obtain a lock and therefore need to unlock the session.\n| Pass the address of a local ViBoolean variable. In the declaration of\n the local variable, initialize it to VI_FALSE. Pass the address of\n the same local variable to any other calls you make to\n niDCPower_LockSession or niDCPower_UnlockSessionin the same\n function.\n| The parameter is an input/output parameter. niDCPower_LockSession and\n niDCPower_UnlockSessioneach inspect the current value and take the\n following actions.\n\n- If the value is VI_TRUE, niDCPower_LockSession does not lock the\n session again.\n- If the value is VI_FALSE, niDCPower_LockSession obtains the lock\n and sets the value of the parameter to VI_TRUE.\n- If the value is VI_FALSE, niDCPower_UnlockSessiondoes not attempt\n to unlock the session.\n- If the value is VI_TRUE, niDCPower_UnlockSessionreleases the lock\n and sets the value of the parameter to VI_FALSE.\n\n| Thus, you can, call niDCPower_UnlockSession at the end of your\n function without worrying about whether you actually have the lock, as\n the following example shows.\n| ViStatus TestFunc (ViSession vi, ViInt32 flags)\n {\n ViStatus error = VI_SUCCESS;\n ViBoolean haveLock = VI_FALSE;\n if (flags & BIT_1)\n {\n viCheckErr( niDCPower_LockSession(vi, &haveLock;));\n viCheckErr( TakeAction1(vi));\n if (flags & BIT_2)\n {\n viCheckErr( niDCPower_UnlockSession(vi, &haveLock;));\n viCheckErr( TakeAction2(vi));\n viCheckErr( niDCPower_LockSession(vi, &haveLock;);\n }\n if (flags & BIT_3)\n viCheckErr( TakeAction3(vi));\n }\n Error:\n /\\*At this point, you cannot really be sure that you have the lock.\n Fortunately, the haveLock variable takes care of that for you.\\*/\n niDCPower_UnlockSession(vi, &haveLock;);\n return error;\n }\n' }, 'name': 'callerHasLock', 'type': 'ViBoolean' } ], 'python_name': 'unlock', 'render_in_session_base': True, 'returns': 'ViStatus', 'use_session_lock': False }, 'WaitForEvent': { 'documentation': { 'description': '\nWaits until the device has generated the specified event.\n\nThe session monitors whether each type of event has occurred at least\nonce since the last time this function or the niDCPower_Initiate\nfunction were called. If an event has only been generated once and you\ncall this function successively, the function times out. Individual\nevents must be generated between separate calls of this function.\n', 'note': "\nRefer to `Supported Functions by\nDevice <REPLACE_DRIVER_SPECIFIC_URL_2(nidcpowercref.chm',%20'supportedfunctions)>`__\nfor more information about supported devices.\n" }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies which event to wait for.\n**Defined Values:**\n', 'table_body': [ [ 'NIDCPOWER_VAL_SOURCE_COMPLETE_EVENT (1030)', 'Waits for the Source Complete event.' ], [ 'NIDCPOWER_VAL_MEASURE_COMPLETE_EVENT (1031)', 'Waits for the Measure Complete event.' ], [ 'NIDCPOWER_VAL_SEQUENCE_ITERATION_COMPLETE_EVENT (1032)', 'Waits for the Sequence Iteration Complete event.' ], [ 'NIDCPOWER_VAL_SEQUENCE_ENGINE_DONE_EVENT (1033)', 'Waits for the Sequence Engine Done event.' ], [ 'NIDCPOWER_VAL_PULSE_COMPLETE_EVENT (1051 )', 'Waits for the Pulse Complete event.' ], [ 'NIDCPOWER_VAL_READY_FOR_PULSE_TRIGGER_EVENT (1052)', 'Waits for the Ready for Pulse Trigger event.' ] ] }, 'enum': 'Event', 'name': 'eventId', 'type': 'ViInt32' }, { 'default_value': 'datetime.timedelta(seconds=10.0)', 'direction': 'in', 'documentation': { 'description': '\nSpecifies the maximum time allowed for this function to complete, in\nseconds. If the function does not complete within this time interval,\nNI-DCPower returns an error.\n', 'note': '\nWhen setting the timeout interval, ensure you take into account any\ntriggers so that the timeout interval is long enough for your\napplication.\n' }, 'name': 'timeout', 'python_api_converter_name': 'convert_timedelta_to_seconds', 'type': 'ViReal64', 'type_in_documentation': 'float in seconds or datetime.timedelta' } ], 'returns': 'ViStatus' }, 'WaitForEventWithChannels': { 'codegen_method': 'no', 'documentation': { 'description': 'TBD' }, 'parameters': [ { 'direction': 'in', 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'name': 'channelName', 'type': 'ViConstString' }, { 'direction': 'in', 'name': 'eventId', 'type': 'ViInt32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'ViReal64' } ], 'returns': 'ViStatus' }, 'close': { 'codegen_method': 'private', 'documentation': { 'description': '\nCloses the session specified in **vi** and deallocates the resources\nthat NI-DCPower reserves. If power output is enabled when you call this\nfunction, the output channels remain in their existing state and\ncontinue providing power. Use the niDCPower_ConfigureOutputEnabled\nfunction to disable power output on a per channel basis. Use the\nniDCPower_reset function to disable power output on all channel(s).\n\n**Related Topics:**\n\n`Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus', 'use_session_lock': False }, 'error_message': { 'codegen_method': 'private', 'documentation': { 'description': '\nConverts a status code returned by an instrument driver function into a\nuser-readable string.\n' }, 'is_error_handling': True, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the **status** parameter that is returned from any of the\nNI-DCPower functions.\n' }, 'name': 'errorCode', 'type': 'ViStatus' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the user-readable message string that corresponds to the status\ncode you specify.\nYou must pass a ViChar array with at least 256 bytes.\n' }, 'name': 'errorMessage', 'size': { 'mechanism': 'fixed', 'value': 256 }, 'type': 'ViChar[]' } ], 'returns': 'ViStatus', 'use_session_lock': False }, 'fancy_self_test': { 'codegen_method': 'python-only', 'documentation': { 'description': '\nPerforms the device self-test routine and returns the test result(s).\nCalling this function implicitly calls the niDCPower_reset function.\n\nWhen calling niDCPower_self_test with the PXIe-4162/4163, specify all\nchannels of your PXIe-4162/4163 with the channels input of\nniDCPower_InitializeWithChannels. You cannot self test a subset of\nPXIe-4162/4163 channels.\n\nRaises `SelfTestError` on self test failure. Attributes on exception object:\n\n- code - failure code from driver\n- message - status message from driver\n', 'table_body': [ [ '0', 'Self test passed.' ], [ '1', 'Self test failed.' ] ], 'table_header': [ 'Self-Test Code', 'Description' ] }, 'method_templates': [ { 'documentation_filename': 'default_method', 'method_python_name_suffix': '', 'session_filename': 'fancy_self_test' } ], 'parameters': [ { 'direction': 'in', 'documentation': { 'description': 'Identifies a particular instrument session. **vi** is obtained from the niDCPower_InitializeWithChannels function.' }, 'name': 'vi', 'type': 'ViSession' } ], 'python_name': 'self_test', 'returns': 'ViStatus' }, 'init': { 'codegen_method': 'no', 'documentation': { 'description': '\nThis function is deprecated. Use niDCPower_InitializeWithChannels\ninstead.\n\nCreates a new IVI instrument driver session to the device specified in\n**resourceName** and returns a session handle you use to identify the\ndevice in all subsequent NI-DCPower function calls. This function also\nsends initialization commands to set the device to the state necessary\nfor the operation of NI-DCPower.\n\nTo place the device in a known start-up state when creating a new\nsession, set **resetDevice** to VI_TRUE. This action is equivalent to\nusing the niDCPower_reset function.\n\nTo open a session and leave the device in its existing configuration\nwithout passing through a transitional output state, set **resetDevice**\nto VI_FALSE, and immediately call the niDCPower_Abort function. Then\nconfigure the device as in the previous session, changing only the\ndesired settings, and then call the niDCPower_Initiate function. Refer\nto the `deprecated programming state\nmodel <REPLACE_DRIVER_SPECIFIC_URL_1(initializedeprecatedmodel)>`__ for\ninformation about the specific software states.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nSpecifies the **resourceName** assigned by Measurement & Automation\nExplorer (MAX), for example "PXI1Slot3" where "PXI1Slot3" is an\ninstrument\'s **resourceName**. **resourceName** can also be a logical\nIVI name.\n' }, 'name': 'resourceName', 'type': 'ViRsrc' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies whether the device is queried to determine if the device is a\nvalid instrument for NI-DCPower.\n**Defined Values**:\n', 'table_body': [ [ 'VI_TRUE (1)', 'Perform ID query.' ], [ 'VI_FALSE (0)', 'Do not perform ID query.' ] ] }, 'name': 'idQuery', 'type': 'ViBoolean' }, { 'direction': 'in', 'documentation': { 'description': '\nSpecifies whether to reset the device during the initialization\nprocedure.\n**Defined Values**:\n', 'table_body': [ [ 'VI_TRUE (1)', 'Reset the device.' ], [ 'VI_FALSE (0)', 'Do not reset the device.' ] ] }, 'name': 'resetDevice', 'type': 'ViBoolean' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns a session handle that you use to identify the session in all\nsubsequent NI-DCPower function calls.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'reset': { 'documentation': { 'description': '\nResets the device to a known state. This function disables power\ngeneration, resets session attributes to their default values, commits\nthe session attributes, and leaves the session in the Uncommitted state.\nRefer to the `Programming\nStates <REPLACE_DRIVER_SPECIFIC_URL_1(programmingstates)>`__ topic for\nmore information about NI-DCPower software states.\n' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' } ], 'returns': 'ViStatus' }, 'revision_query': { 'codegen_method': 'no', 'documentation': { 'description': 'Returns the revision information of NI-DCPower and the device firmware.' }, 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the driver revision information for NI-DCPower.' }, 'name': 'instrumentDriverRevision', 'size': { 'mechanism': 'fixed', 'value': 256 }, 'type': 'ViChar[]' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns firmware revision information for the device you are using. The\nsize of this array must be at least 256 bytes.\n' }, 'name': 'firmwareRevision', 'size': { 'mechanism': 'fixed', 'value': 256 }, 'type': 'ViChar[]' } ], 'returns': 'ViStatus' }, 'self_test': { 'codegen_method': 'private', 'documentation': { 'description': '\nPerforms the device self-test routine and returns the test result(s).\nCalling this function implicitly calls the niDCPower_reset function.\n\nWhen calling niDCPower_self_test with the PXIe-4162/4163, specify all\nchannels of your PXIe-4162/4163 with the channels input of\nniDCPower_InitializeWithChannels. You cannot self test a subset of\nPXIe-4162/4163 channels.\n' }, 'method_name_for_documentation': 'self_test', 'parameters': [ { 'direction': 'in', 'documentation': { 'description': '\nIdentifies a particular instrument session. **vi** is obtained from the\nniDCPower_InitializeWithChannels function.\n' }, 'name': 'vi', 'type': 'ViSession' }, { 'direction': 'out', 'documentation': { 'description': 'Returns the value result from the device self-test.', 'table_body': [ [ '0', 'Self test passed.' ], [ '1', 'Self test failed.' ] ], 'table_header': [ 'Self-Test Code', 'Description' ] }, 'name': 'selfTestResult', 'type': 'ViInt16' }, { 'direction': 'out', 'documentation': { 'description': '\nReturns the self-test result message. The size of this array must be at\nleast 256 bytes.\n' }, 'name': 'selfTestMessage', 'size': { 'mechanism': 'fixed', 'value': 256 }, 'type': 'ViChar[]' } ], 'returns': 'ViStatus' } }
''' #basic data types a = int(input()) b = float(input()) c = "I'm a boy" print(c) #casting------converting one datatype to another type a = 1.22222 print(int(a)) #flowchartXXXX----conditionals----if/else x = 'Ronaldo is better than Messi' try: print('Ronaldo' in s) except: print('sorry--not execute') ''' #list////string--- #x = 'silence' #print(x[2]+x[1]+x[0]+x[5]) ''' #nested if/else mark = int(input()) if mark >= 50: ask = input("What is Python??") if ask == 'language': print('pass') else: print('copy') else: print('fail') '''
# 此处可 import 模块 """ @param string line 为单行测试数据 @return string 处理后的结果 """ def solution(line): # 缩进请使用 4 个空格,遵循 PEP8 规范 # please write your code here # return 'your_answer' while 'mi' in line: line = line.replace('mi', '') return line aa = solution('fwfddqhmpcmmmiiiijfrmiimmmmmirwbte') print(aa)
#Given a non-empty string and an int n, return a new string where the char at index n has been removed. The value of n will be a valid index of a char in the original string (i.e. n will be in the range 0..len(str)-1 inclusive). #missing_char('kitten', 1) → 'ktten' #missing_char('kitten', 0) → 'itten' #missing_char('kitten', 4) → 'kittn' def missing_char(string, n): answer = '' for letter in string: if letter != string[n]: answer += letter return answer #or ''' def missing_char(str, n): front = str[:n] # up to but not including n back = str[n+1:] # n+1 through end of string return front + back '''
#!/usr/bin/env python # _*_coding:utf-8 _*_ #@Time    :2019/4/24 0024 下午 10:06 #@Author  :喜欢二福的沧月君(necydcy@gmail.com) #@FileName: Climbing_ladder.py #@Software: PyCharm """ (八)、爬楼梯 【题目描述】 假设一段楼梯共n(n>1)个台阶,小朋友一步最多能上3个台阶,那么小朋友上这段楼梯一共有多少种方法。 """ def climb(num): if num==1: return 1 if num==2: return 2 if num==3: return 4 else: sum=climb(num-1)+climb(num-2)+climb(num-3) return sum print(climb(int(input())))
class SubsystemA(object): def operation_a1(self): print("Operation a1") def operation_a2(self): print("Operation a2") class SubsystemB(object): def operation_b1(self): print("Operation b1") def operation_b2(self): print("Operation b2") class SubsystemC(object): def operation_c1(self): print("Operation c1") def operation_c2(self): print("Operation c2") class Facade(object): def __init__(self): self.subsystem_a = SubsystemA() self.subsystem_b = SubsystemB() self.subsystem_c = SubsystemC() def operation1(self): self.subsystem_a.operation_a1() self.subsystem_b.operation_b1() self.subsystem_c.operation_c1() def operation2(self): self.subsystem_a.operation_a2() self.subsystem_b.operation_b2() self.subsystem_c.operation_c2() if __name__ == '__main__': facade = Facade() facade.operation1() facade.operation2()
# Copyright 2004-2009 Joe Wreschnig, Michael Urman, Steven Robertson # 2011,2013 Nick Boultbee # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation def decode(s, charset="utf-8"): """Decode a string; if an error occurs, replace characters and append a note to the string.""" try: return s.decode(charset) except UnicodeError: return s.decode(charset, "replace") + " " + _("[Invalid Encoding]") def encode(s, charset="utf-8"): """Encode a string; if an error occurs, replace characters and append a note to the string.""" try: return s.encode(charset) except UnicodeError: return (s + " " + _("[Invalid Encoding]")).encode(charset, "replace") def split_escape(string, sep, maxsplit=None, escape_char="\\"): """Like unicode/str.split but allows for the separator to be escaped If passed unicode/str will only return list of unicode/str. Borrowed from Mutagen's mid3v2 """ assert len(sep) == 1 assert len(escape_char) == 1 # don't allow auto decoding of 'string' if isinstance(string, bytes): assert not isinstance(sep, unicode) if maxsplit is None: maxsplit = len(string) empty = type(string)("") result = [] current = empty escaped = False for char in string: if escaped: if char != escape_char and char != sep: current += escape_char current += char escaped = False else: if char == escape_char: escaped = True elif char == sep and len(result) < maxsplit: result.append(current) current = empty else: current += char result.append(current) return result def join_escape(values, sep, escape_char="\\"): """Join str/unicode so that it can be split with split_escape. In case values is empty, the result has the type of `sep`. otherwise it has the type of values. Be aware that split_escape(join_escape([])) will result in ['']. """ assert len(sep) == 1 assert len(escape_char) == 1 # don't allow auto decoding of 'values' if values and isinstance(values[0], bytes): assert not isinstance(sep, unicode) escaped = [] for value in values: value = value.replace(escape_char, escape_char + escape_char) value = value.replace(sep, escape_char + sep) escaped.append(value) return sep.join(escaped)
class Cashier: def __init__(self, n, discount, products, prices): self.n = n self.now = n self.dc = discount self.pds = products self.pcs = prices def getBill(self, product, amount): money = 0 for i in range(len(product)): money += self.pcs[self.pds.index(product[i])] * amount[i] self.now -= 1 if self.now == 0: money = money - (self.dc * money) / 100 self.now = self.n return money
s = b'abcdefgabc' print(s) print('c:', s.rindex(b'c')) print('c:', s.index(b'c')) #print('z:', s.rindex(b'z'))#ValueError: subsection not found s = bytearray(b'abcdefgabc') print(s) print('c:', s.rindex(bytearray(b'c'))) print('c:', s.index(bytearray(b'c'))) #print('z:', s.rindex(bytearray(b'z')))#ValueError: subsection not found
def bubblesort(vals): changed = True while changed: changed = False for i in range(len(vals) - 1): if vals[i] > vals[i + 1]: changed = True vals[i], vals[i + 1] = vals[i + 1], vals[i] # Yield gives the "state" yield vals vals = [int(x) for x in input().split()] for state in bubblesort(vals): print(*state)
#!/usr/bin/env python # -*- coding: utf-8 -*- # This script contains functions that don't belong to a specific category. # The buffer_size function computes a buffer around the input ee.Element # whilst the get_metrics function returns the accuracy metrics of the input # classifier and test set. # # Author: Davide Lomeo, # Email: davide.lomeo20@imperial.ac.uk # GitHub: https://github.com/acse-2020/acse2020-acse9-finalreport-acse-dl1420-3 # Date: 19 July 2021 # Version: 0.1.0 __all__ = ['buffer_size', 'get_metrics'] def buffer_size(size): """ Function that uses the concept of currying to help the .map() method take more than one argument. The function uses the input 'size' and call a nested function to create a buffer around the centroid of the feature parsed by the .map() method.The geometry of the parsed feature is modified in place. Parameters ---------- size : int Distance of the buffering in meters Returns ------- ee.element.Element Feature with a buffer of 'size' around its centroid """ def create_buffer(feature): """Child function that creates the buffer of 'size' meters""" return feature.buffer(size) return create_buffer def get_metrics(classifier, test_dataset, class_columns_name, metrics=['error_matrix'], decimal=4): """ Function that requires a trained classifier and a test set to return a dictionary that contains the chosen metrics. metrics available are: 'train_accuracy', 'test_accuracy', 'kappa_coefficient', 'producers_accuracy', 'consumers_accuracy', 'error_matrix'. NOTE: use this function carefully, especially if wanting to return more than one of the available metrics. This is because the values are retrieved directly from the Google sevrer using the method .getInfo() and it may take up to 15 minutes to get all the metrics. Parameters ---------- classifier : ee.classifier.Classifier Trained classifier needed to evaluate the test set test_dataset : ee.featurecollection.FeatureCollection Feature Collction that needed to evaluate the classifier class_column_name : string Name of the classification column in the input Collection metrics : list, optional List of metrics to return as a dictionary decimal : int, optional Number of decimals for each figure Returns ------- dictionary A dictionary containing the selected metrics """ try: # Clssification of the test dataset test = test_dataset.classify(classifier) # Accuracy of the training dataset classifier training_accuracy = classifier.confusionMatrix().accuracy() # Error matrix of the test set error_matrix = test.errorMatrix(class_columns_name, 'classification') # Computing consumers and producers accuracies producers_accuracy = error_matrix.producersAccuracy() consumers_accuracy = error_matrix.consumersAccuracy() except AttributeError: print(""" Error: one of the inputs is invalid. Please only input a ee.Classifier, a ee.FeatureCollection and a string respectively""") return None metrics_dict = {} for i in metrics: if i == 'train_accuracy': metrics_dict[i] = round(training_accuracy.getInfo(), decimal) elif i == 'test_accuracy:': metrics_dict[i] = round(error_matrix.accuracy().getInfo(), decimal) elif i == 'kappa_coefficient:': metrics_dict[i] = round(error_matrix.kappa().getInfo(), decimal) elif i == 'producers_accuracy': metrics_dict[i] = producers_accuracy.getInfo() for i, j in enumerate(metrics_dict['producers_accuracy'][0]): metrics_dict['producers_accuracy'][0][i] = round(j, decimal) elif i == 'consumers_accuracy': metrics_dict[i] = consumers_accuracy.getInfo() for i, j in enumerate(metrics_dict['consumers_accuracy'][0]): metrics_dict['consumers_accuracy'][0][i] = round(j, decimal) elif i == 'error_matrix': metrics_dict[i] = error_matrix.getInfo() else: print( "'{}' isn't a valid metric. Please correct the input".format(i) ) return None return metrics_dict
r = '\033[31m' # red b = '\033[34m' # blue g = '\033[32m' # green y = '\033[33m' # yellow f = '\33[m' bb = '\033[44m' # backgournd blue def tela(mensagem, colunatxt=5): espaco = bb + ' ' + f mensagem = bb + y + mensagem for i in range(12): print('') if i == 5: print(espaco * colunatxt + mensagem + espaco*(50 - (len(mensagem)-colunatxt)), end='') else: for ii in range(50): print(espaco, end='') print() tela('aqui tem uma mensagem escrita')
"""This package contains components for working with switches.""" __all__ = ( "momentary_switch", "momentary_switch_component", "switch", "switch_state", "switch_state_change_event", "toggle_switch", "toggle_switch_component" )
tst = int(input()) ids = [ int(w) for w in input().split(',') if w != 'x' ] def wait_time(bus_id): return (bus_id - tst % bus_id, bus_id) min_id = min(map(wait_time, ids)) print(f"{min_id=}")
# Aiden Baker # 2/12/2021 # DoNow103 print(2*3*5) print("abc") print("abc"+"bde")
name = "ServerName" user = "mongo" japd = None host = "hostname" port = 27017 auth = False auth_db = "admin" use_arg = True use_uri = False repset = "ReplicaSet" repset_hosts = ["host1:27017", "host2:27017"]
def solution(xs): """Returns integer representing maximum power output of solar panel array Args: xs: List of integers representing power output of each of the solar panels in a given array """ negatives = [] smallest_negative = None positives = [] contains_panel_with_zero_power = False if isinstance(xs, list) and not xs: raise IndexError("xs must be a non-empty list. Empty list received.") for x in xs: if x > 0: positives.append(x) if x < 0: if not smallest_negative or abs(smallest_negative) > abs(x): smallest_negative = x negatives.append(x) if x == 0: contains_panel_with_zero_power = True if not positives and len(negatives) == 1: # Best-case scenario is zero power output for panel array. Looking bad. if contains_panel_with_zero_power: max_power = 0 else: # Panel array is draining power. Ouch. max_power = negatives.pop() return str(max_power) # Ensures panels with negative outputs are in pairs to take # advantage of the panels' wave stabilizer, which makes paired # negative-output panels have a positive output together if positives and len(negatives) % 2 != 0: negatives.remove(smallest_negative) max_power = 1 # initialize for multiplication panel_outputs = positives panel_outputs.extend(negatives) for output in panel_outputs: max_power *= output return str(max_power)
class GlobalConfig: def __init__(self): self.logger_name = "ecom" self.log_level = "INFO" self.vocab_filename = "products.vocab" self.labels_filename = "labels.vocab" self.model_filename = "classifier.mdl" gconf = GlobalConfig()
def fact(n): if n > 0: return (n*fact(n - 1)) else: return 1 print(fact(5))
""" Maria acabou de iniciar seu curso de graduação na faculdade de medicina e precisa de sua ajuda para organizar os experimentos de um laboratório o qual ela é responsável. Ela quer saber no final do ano, quantas cobaias foram utilizadas no laboratório e o percentual de cada tipo de cobaia utilizada. Este laboratório em especial utiliza três tipos de cobaias: sapos, ratos e coelhos. Para obter estas informações, ela sabe exatamente o número de experimentos que foram realizados, o tipo de cobaia utilizada e a quantidade de cobaias utilizadas em cada experimento. Entrada A primeira linha de entrada contém um valor inteiro N que indica os vários casos de teste que vem a seguir. Cada caso de teste contém um inteiro Quantia (1 ≤ Quantia ≤ 15) que representa a quantidade de cobaias utilizadas e um caractere Tipo ('C', 'R' ou 'S'), indicando o tipo de cobaia (R:Rato S:Sapo C:Coelho). Saída Apresente o total de cobaias utilizadas, o total de cada tipo de cobaia utilizada e o percentual de cada uma em relação ao total de cobaias utilizadas, sendo que o percentual deve ser apresentado com dois dígitos após o ponto. """ class Cobaia: cobaias_usadas = 0 especies = {} def __init__(self, quantidade=0, *, abrev, nome): self.nome = nome self.abrev = abrev self._usados = quantidade Cobaia.especies[abrev] = self @property def quantidade(self): return self._usados @quantidade.setter def add_quantidade(self, quantidade): self._usados += quantidade Cobaia.cobaias_usadas += quantidade @classmethod def numero_de_especies(cls): len_ = len(cls.especies) return len_ @classmethod def mostrar_total_de_cobaias(cls): msg = f"Total: {cls.cobaias_usadas} cobaias" print(msg) @classmethod def mostrar_total_de_cobaias_por_especies(cls): for cobaia in cls.especies.values(): msg = f"Total de {cobaia.nome}: {cobaia.quantidade}" print(msg) if cobaia.quantidade != 0 else None @classmethod def mostrar_porcentagem_de_cobaias_usadas_por_especies(cls): quant_total = cls.cobaias_usadas for cobaia in cls.especies.values(): nome = cobaia.nome quant = cobaia.quantidade porcent = quant / quant_total * 100 msg = f"Percentual de {nome}: {round(porcent, 2):.2f} %" print(msg) coelhos = Cobaia(abrev="C", nome="coelhos") ratos = Cobaia(abrev="R", nome="ratos") sapos = Cobaia(abrev='S', nome="sapos") for e in range(numero_de_experimentos := int(input(""))): quantidade, abrev = input('').split() cobaia = Cobaia.especies[abrev.upper()] cobaia.add_quantidade = int(quantidade) Cobaia.mostrar_total_de_cobaias() Cobaia.mostrar_total_de_cobaias_por_especies() Cobaia.mostrar_porcentagem_de_cobaias_usadas_por_especies()
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Nov 3 14:39:32 2020 @author: zo """ def tokenizer_and_model_config_mismatch(config, tokenizer): """ Check for tokenizer and model config miss match. Args: config: model config. tokenizer: tokenizer. Raises: ValueError: A special token id in config is different from tokenizer. """ id_check_list = ['bos_token_id', 'eos_token_id', 'pad_token_id', 'mask_token_id', 'unk_token_id'] for id_type in id_check_list: if getattr(config, id_type) != getattr(tokenizer, id_type): # We should tell how to resolve it. raise ValueError('A special token id in config is different from tokenizer') def block_size_exceed_max_position_embeddings(config, block_size): # This will cause position ids automatically create from model # to go beyond embedding size of position id embedding. # And return not so useful error. # This sound like a bug in transformers library. # If we got this error the work around for now id to set # `max_position_embeddings` of model config to be higher than or equal to # `max_seq_len + config.pad_token_id + 1` at least to avoid problem. if(block_size > config.max_position_embeddings + config.pad_token_id + 1): recommend_block_size = config.max_position_embeddings + config.pad_token_id + 1 raise ValueError(f'This block size will cause error due to max_position_embeddings. ' f'Use this block_size={recommend_block_size} or ' f'increase max_position_embeddings')
def est_positif(n: int) -> bool: """ Description: Vérifie si un nombre est positif. Paramètres: n: {int} -- Nombre à vérifier Retourne: {bool} -- True si positif, false sinon Exemple: >>> est_positif(1) True >>> est_positif(-1) False 10000000000000000000000000000000 équivaut à 2^31 soit 2_147_483_648 11111111111111111111111111111111 équivaut à 2^31-1 soit 2_147_483_647 """ return n >> 31 == 0
#!/usr/bin/env python3 class Service: def __init__(self, kube_connector, resource): self.__resource = resource self.__kube_connector = kube_connector self.__extract_meta() def __extract_meta(self): self.namespace = self.__resource.metadata.namespace self.name = self.__resource.metadata.name self.selector = self.__resource.spec.selector self.labels = self.__resource.metadata.labels if self.__resource.metadata.labels else {}
BOT_NAME = 'AmazonHeadSetScraping' SPIDER_MODULES = ['AmazonHeadSetScraping.spiders'] NEWSPIDER_MODULE = 'AmazonHeadSetScraping.spiders' USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0' DOWNLOAD_DELAY = 3 DOWNLOAD_TIMEOUT = 30 RANDOMIZE_DOWNLOAD_DELAY = True REACTOR_THREADPOOL_MAXSIZE = 8 CONCURRENT_REQUESTS = 16 CONCURRENT_REQUESTS_PER_DOMAIN = 16 CONCURRENT_REQUESTS_PER_IP = 16 AUTOTHROTTLE_ENABLED = True AUTOTHROTTLE_START_DELAY = 1 AUTOTHROTTLE_MAX_DELAY = 3 AUTOTHROTTLE_TARGET_CONCURRENCY = 8 AUTOTHROTTLE_DEBUG = True RETRY_ENABLED = True RETRY_TIMES = 3 RETRY_HTTP_CODES = [500, 502, 503, 504, 400, 401, 403, 404, 405, 406, 407, 408, 409, 410, 429] DOWNLOADER_MIDDLEWARES = { 'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware': None, 'scrapy.spidermiddlewares.referer.RefererMiddleware': 80, 'scrapy.downloadermiddlewares.retry.RetryMiddleware': 90, 'scrapy_fake_useragent.middleware.RandomUserAgentMiddleware': 120, 'scrapy.downloadermiddlewares.cookies.CookiesMiddleware': 130, 'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware': 810, 'scrapy.downloadermiddlewares.redirect.RedirectMiddleware': 900, }
#!/usr/bin/python DIR = "data_tmp/" FILES = {} FILES['20_avg'] = [] FILES['40_avg'] = [] FILES['50_avg'] = [] FILES['60_avg'] = [] FILES['80_avg'] = [] FILES['20_opt'] = [] FILES['40_opt'] = [] FILES['50_opt'] = [] FILES['60_opt'] = [] FILES['80_opt'] = [] FILES['20_avg'].append("04_attk2_avg20_20_test") FILES['20_avg'].append("04_attk2_avg20_40_test") FILES['20_avg'].append("04_attk2_avg20_60_test") FILES['20_avg'].append("04_attk2_avg20_80_test") FILES['40_avg'].append("04_attk2_avg40_20_test") FILES['40_avg'].append("04_attk2_avg40_40_test") FILES['40_avg'].append("04_attk2_avg40_60_test") FILES['40_avg'].append("04_attk2_avg40_80_test") FILES['50_avg'].append("04_attk2_avg50_20_test") FILES['50_avg'].append("04_attk2_avg50_40_test") FILES['50_avg'].append("04_attk2_avg50_60_test") FILES['50_avg'].append("04_attk2_avg50_80_test") FILES['60_avg'].append("04_attk2_avg60_20_test") FILES['60_avg'].append("04_attk2_avg60_40_test") FILES['60_avg'].append("04_attk2_avg60_60_test") FILES['60_avg'].append("04_attk2_avg60_80_test") FILES['80_avg'].append("04_attk2_avg80_20_test") FILES['80_avg'].append("04_attk2_avg80_40_test") FILES['80_avg'].append("04_attk2_avg80_60_test") FILES['80_avg'].append("04_attk2_avg80_80_test") FILES['20_opt'].append("05_attk2_opt20_20_test") FILES['20_opt'].append("05_attk2_opt20_40_test") FILES['20_opt'].append("05_attk2_opt20_60_test") FILES['20_opt'].append("05_attk2_opt20_80_test") FILES['40_opt'].append("05_attk2_opt40_20_test") FILES['40_opt'].append("05_attk2_opt40_40_test") FILES['40_opt'].append("05_attk2_opt40_60_test") FILES['40_opt'].append("05_attk2_opt40_80_test") FILES['50_opt'].append("05_attk2_opt50_20_test") FILES['50_opt'].append("05_attk2_opt50_40_test") FILES['50_opt'].append("05_attk2_opt50_60_test") FILES['50_opt'].append("05_attk2_opt50_80_test") FILES['60_opt'].append("05_attk2_opt60_20_test") FILES['60_opt'].append("05_attk2_opt60_40_test") FILES['60_opt'].append("05_attk2_opt60_60_test") FILES['60_opt'].append("05_attk2_opt60_80_test") FILES['80_opt'].append("05_attk2_opt80_20_test") FILES['80_opt'].append("05_attk2_opt80_40_test") FILES['80_opt'].append("05_attk2_opt80_60_test") FILES['80_opt'].append("05_attk2_opt80_80_test") # AVG nums = [] for id in ['20_avg', '40_avg', '50_avg', '60_avg', '80_avg']: for ff in FILES[id]: with open(DIR + ff, 'r') as f: print("Working on " + ff) lines = f.readlines() nums.append(lines[4].split()[2]) f.close() with open(DIR + "09-workers-data-avg.txt", 'w') as f: f.write('- - "20% Data Alteration" - "40% Data Alteration" - "50% Data Alteration" - "60% Data Alteration" - "80% Data Alteration "\n') f.write("20 20% " + nums[0] + " " + nums[1] + " " + nums[2] + " " + nums[3] + "\n") f.write("40 40% " + nums[4] + " " + nums[5] + " " + nums[6] + " " + nums[7] + "\n") f.write("50 50% " + nums[8] + " " + nums[9] + " " + nums[10] + " " + nums[11] + "\n") f.write("60 60% " + nums[12] + " " + nums[13] + " " + nums[14] + " " + nums[15] + "\n") f.write("80 80% " + nums[16] + " " + nums[17] + " " + nums[17] + " " + nums[19] + "\n") f.close() # OPT nums = [] for id in ['20_opt', '40_opt', '50_opt', '60_opt', '80_opt']: for ff in FILES[id]: with open(DIR + ff, 'r') as f: print("Working on " + ff) lines = f.readlines() nums.append(lines[4].split()[2]) f.close() with open(DIR + "09-workers-data-opt.txt", 'w') as f: f.write('- - "20% Data Alteration" - "40% Data Alteration" - "50% Data Alteration" - "60% Data Alteration" - "80% Data Alteration "\n') f.write("20 20% " + nums[0] + " " + nums[1] + " " + nums[2] + " " + nums[3] + "\n") f.write("40 40% " + nums[4] + " " + nums[5] + " " + nums[6] + " " + nums[7] + "\n") f.write("50 50% " + nums[8] + " " + nums[9] + " " + nums[10] + " " + nums[11] + "\n") f.write("60 60% " + nums[12] + " " + nums[13] + " " + nums[14] + " " + nums[15] + "\n") f.write("80 80% " + nums[16] + " " + nums[17] + " " + nums[17] + " " + nums[19] + "\n") f.close()
class Int32CollectionConverter(TypeConverter): """ Converts an System.Windows.Media.Int32Collection to and from other data types. Int32CollectionConverter() """ def CanConvertFrom(self,*__args): """ CanConvertFrom(self: Int32CollectionConverter,context: ITypeDescriptorContext,sourceType: Type) -> bool Determines if the converter can convert an object of the given type to an instance of System.Windows.Media.Int32Collection. context: Describes the context information of a type. sourceType: The type of the source that is being evaluated for conversion. Returns: true if the converter can convert the provided type to an instance of System.Windows.Media.Int32Collection; otherwise,false. """ pass def CanConvertTo(self,*__args): """ CanConvertTo(self: Int32CollectionConverter,context: ITypeDescriptorContext,destinationType: Type) -> bool Determines if the converter can convert an System.Windows.Media.Int32Collection to a given data type. context: The context information of a type. destinationType: The desired type to evaluate the conversion to. Returns: true if an System.Windows.Media.Int32Collection can convert to destinationType; otherwise false. """ pass def ConvertFrom(self,*__args): """ ConvertFrom(self: Int32CollectionConverter,context: ITypeDescriptorContext,culture: CultureInfo,value: object) -> object Attempts to convert a specified object to an System.Windows.Media.Int32Collection instance. context: Context information used for conversion. culture: Cultural information that is respected during conversion. value: The object being converted. Returns: A new instance of System.Windows.Media.Int32Collection. """ pass def ConvertTo(self,*__args): """ ConvertTo(self: Int32CollectionConverter,context: ITypeDescriptorContext,culture: CultureInfo,value: object,destinationType: Type) -> object Attempts to convert an instance of System.Windows.Media.Int32Collection to a specified type. context: Context information used for conversion. culture: Cultural information that is respected during conversion. value: System.Windows.Media.Int32Collection to convert. destinationType: Type being evaluated for conversion. Returns: A new instance of the destinationType. """ pass
def list_of_lists(l, n): q = len(l) // n r = len(l) % n if r == 0: return [l[i * n:(i + 1) * n] for i in range(q)] else: return [l[i * n:(i + 1) * n] if i <= q else l[i * n:i * n + r] for i in range(q + 1)]
"""Type stubs for gi.repository.GLib.""" class Error(Exception): """Horrific GLib Error God Object.""" @property def message(self) -> str: ... class MainLoop: def run(self) -> None: ... def quit(self) -> None: ...
class PrefixList: """ The PrefixList holds the data received from routing registries and the validation results of this data. """ def __init__(self, name): self.name = name self.members = {} def __iter__(self): for asn in self.members: yield self.members[asn] def add_member(self, member): if member.asn in self.members: return memb = { "asn": member.asn, "permit": None, "inet": [], "inet6": [] } for prefix in member.inet: p = { "prefix": prefix, "permit": None } memb["inet"].append(p) for prefix in member.inet6: p = { "prefix": prefix, "permit": None } memb["inet6"].append(p) self.members[member.asn] = memb @classmethod def from_asset(cls, asset): obj = PrefixList(asset.name) for member in asset: obj.add_member(member) return obj def debug(self): for asn in self.members: member = self.members[asn] print("AS{}: {}".format(asn, member["permit"])) for i in member["inet"]: print("--{}: {}".format(i["prefix"], i["permit"])) for i in member["inet6"]: print("--{}: {}".format(i["prefix"], i["permit"]))
def find_common_number(*args): result = args[0] for arr in args: result = insect_array(result, arr) return result def union_array(arr1, arr2): return list(set.union(arr1, arr2)) def insect_array(arr1, arr2): return list(set(arr1) & set(arr2)) arr1 = [1,5,10,20,40,80] arr2 = [6,27,20,80,100] arr3 = [3,4,15,20,30,70,80,120] print(find_common_number(arr1, arr2, arr3))
# Question 2 # Convert all units of time into seconds. day = float(input("Enter number of days: ")) hour = float(input("Enter number of hours: ")) minute = float(input("Enter number of minutes: ")) second = float(input("Enter number of seconds: ")) day = day * 3600 * 24 hour *= 3600 minute *= 60 second = day + hour + minute + second print("Time: " + str(round((second),2)) +" seconds. ")
""" An administrator is a special kind of user. Write a class called Admin that inherits from the User class you wrote in Exercise 9-3 (page 166) or Exercise 9-5 (page 171). Add an attribute, privileges, that stores a list of strings like "can add post", "can delete post", "can ban user", and so on. Write a method called show_privileges() that lists the administrator’s set of privileges. Create an instance of Admin, and call your method. """ class User(object): """Representa un usuario.""" def __init__(self, first_name, last_name, age): self.first_name = first_name self.last_name = last_name self.age = age self.login_attempts = 0 def describe_user(self): """ method that prints a summary of the user’s information """ description = "Nombre: " + self.first_name.title()+ "\nApellido: "+ self.last_name.title()+ "\nEdad: "+ str(self.age) return description def greet_user(self): """ method that prints a personalized greeting to the user""" print("¡Bienvenid@ " + self. first_name.title()+ ' '+self.last_name.title()+'!') def increment_login_attempts(self): self.login_attempts+=1 def reset_login_attempts(self): self.login_attempts=0 class Admin(User): """Representa un tipo de usuario, especificamente un administrador .""" def __init__(self, first_name, last_name, age): super(Admin, self).__init__(first_name, last_name, age) self.privileges = [] def set_privileges(self, *privileges): self.privileges=privileges def show_privileges(self): """ method that lists the administrator’s set of privileges """ print("\nEl administrador tiene los siguienes privilegios: ") for privilege in self.privileges: print("- "+ privilege) usuario = User('karla', 'berlanga', 21) print(usuario.describe_user()) usuario.greet_user() print("\n") print("Administrador") administrador = Admin('pablo', 'garza', 21) print(administrador.describe_user()) administrador.set_privileges('can add post', 'can delete post', 'can ban user') administrador.show_privileges()
text = """ ar-EG* Female "Microsoft Server Speech Text to Speech Voice (ar-EG, Hoda)" ar-SA Male "Microsoft Server Speech Text to Speech Voice (ar-SA, Naayf)" ca-ES Female "Microsoft Server Speech Text to Speech Voice (ca-ES, HerenaRUS)" cs-CZ Male "Microsoft Server Speech Text to Speech Voice (cs-CZ, Vit)" da-DK Female "Microsoft Server Speech Text to Speech Voice (da-DK, HelleRUS)" de-AT Male "Microsoft Server Speech Text to Speech Voice (de-AT, Michael)" de-CH Male "Microsoft Server Speech Text to Speech Voice (de-CH, Karsten)" de-DE Female "Microsoft Server Speech Text to Speech Voice (de-DE, Hedda) " de-DE Female "Microsoft Server Speech Text to Speech Voice (de-DE, HeddaRUS)" de-DE Male "Microsoft Server Speech Text to Speech Voice (de-DE, Stefan, Apollo) " el-GR Male "Microsoft Server Speech Text to Speech Voice (el-GR, Stefanos)" en-AU Female "Microsoft Server Speech Text to Speech Voice (en-AU, Catherine) " en-AU Female "Microsoft Server Speech Text to Speech Voice (en-AU, HayleyRUS)" en-CA Female "Microsoft Server Speech Text to Speech Voice (en-CA, Linda)" en-CA Female "Microsoft Server Speech Text to Speech Voice (en-CA, HeatherRUS)" en-GB Female "Microsoft Server Speech Text to Speech Voice (en-GB, Susan, Apollo)" en-GB Female "Microsoft Server Speech Text to Speech Voice (en-GB, HazelRUS)" en-GB Male "Microsoft Server Speech Text to Speech Voice (en-GB, George, Apollo)" en-IE Male "Microsoft Server Speech Text to Speech Voice (en-IE, Shaun)" en-IN Female "Microsoft Server Speech Text to Speech Voice (en-IN, Heera, Apollo)" en-IN Female "Microsoft Server Speech Text to Speech Voice (en-IN, PriyaRUS)" en-IN Male "Microsoft Server Speech Text to Speech Voice (en-IN, Ravi, Apollo)" en-US Female "Microsoft Server Speech Text to Speech Voice (en-US, ZiraRUS)" en-US Female "Microsoft Server Speech Text to Speech Voice (en-US, JessaRUS)" en-US Male "Microsoft Server Speech Text to Speech Voice (en-US, BenjaminRUS)" es-ES Female "Microsoft Server Speech Text to Speech Voice (es-ES, Laura, Apollo)" es-ES Female "Microsoft Server Speech Text to Speech Voice (es-ES, HelenaRUS)" es-ES Male "Microsoft Server Speech Text to Speech Voice (es-ES, Pablo, Apollo)" es-MX Female "Microsoft Server Speech Text to Speech Voice (es-MX, HildaRUS)" es-MX Male "Microsoft Server Speech Text to Speech Voice (es-MX, Raul, Apollo)" fi-FI Female "Microsoft Server Speech Text to Speech Voice (fi-FI, HeidiRUS)" fr-CA Female "Microsoft Server Speech Text to Speech Voice (fr-CA, Caroline)" fr-CA Female "Microsoft Server Speech Text to Speech Voice (fr-CA, HarmonieRUS)" fr-CH Male "Microsoft Server Speech Text to Speech Voice (fr-CH, Guillaume)" fr-FR Female "Microsoft Server Speech Text to Speech Voice (fr-FR, Julie, Apollo)" fr-FR Female "Microsoft Server Speech Text to Speech Voice (fr-FR, HortenseRUS)" fr-FR Male "Microsoft Server Speech Text to Speech Voice (fr-FR, Paul, Apollo)" he-IL Male "Microsoft Server Speech Text to Speech Voice (he-IL, Asaf)" hi-IN Female "Microsoft Server Speech Text to Speech Voice (hi-IN, Kalpana, Apollo)" hi-IN Female "Microsoft Server Speech Text to Speech Voice (hi-IN, Kalpana)" hi-IN Male "Microsoft Server Speech Text to Speech Voice (hi-IN, Hemant)" hu-HU Male "Microsoft Server Speech Text to Speech Voice (hu-HU, Szabolcs)" id-ID Male "Microsoft Server Speech Text to Speech Voice (id-ID, Andika)" it-IT Male "Microsoft Server Speech Text to Speech Voice (it-IT, Cosimo, Apollo)" ja-JP Female "Microsoft Server Speech Text to Speech Voice (ja-JP, Ayumi, Apollo)" ja-JP Male "Microsoft Server Speech Text to Speech Voice (ja-JP, Ichiro, Apollo)" ja-JP Female "Microsoft Server Speech Text to Speech Voice (ja-JP, HarukaRUS)" ja-JP Female "Microsoft Server Speech Text to Speech Voice (ja-JP, LuciaRUS)" ja-JP Male "Microsoft Server Speech Text to Speech Voice (ja-JP, EkaterinaRUS)" ko-KR Female "Microsoft Server Speech Text to Speech Voice (ko-KR, HeamiRUS)" nb-NO Female "Microsoft Server Speech Text to Speech Voice (nb-NO, HuldaRUS)" nl-NL Female "Microsoft Server Speech Text to Speech Voice (nl-NL, HannaRUS)" pl-PL Female "Microsoft Server Speech Text to Speech Voice (pl-PL, PaulinaRUS)" pt-BR Female "Microsoft Server Speech Text to Speech Voice (pt-BR, HeloisaRUS)" pt-BR Male "Microsoft Server Speech Text to Speech Voice (pt-BR, Daniel, Apollo)" pt-PT Female "Microsoft Server Speech Text to Speech Voice (pt-PT, HeliaRUS)" ro-RO Male "Microsoft Server Speech Text to Speech Voice (ro-RO, Andrei)" ru-RU Female "Microsoft Server Speech Text to Speech Voice (ru-RU, Irina, Apollo)" ru-RU Male "Microsoft Server Speech Text to Speech Voice (ru-RU, Pavel, Apollo)" sk-SK Male "Microsoft Server Speech Text to Speech Voice (sk-SK, Filip)" sv-SE Female "Microsoft Server Speech Text to Speech Voice (sv-SE, HedvigRUS)" th-TH Male "Microsoft Server Speech Text to Speech Voice (th-TH, Pattara)" tr-TR Female "Microsoft Server Speech Text to Speech Voice (tr-TR, SedaRUS)" zh-CN Female "Microsoft Server Speech Text to Speech Voice (zh-CN, HuihuiRUS)" zh-CN Female "Microsoft Server Speech Text to Speech Voice (zh-CN, Yaoyao, Apollo)" zh-CN Male "Microsoft Server Speech Text to Speech Voice (zh-CN, Kangkang, Apollo)" zh-HK Female "Microsoft Server Speech Text to Speech Voice (zh-HK, Tracy, Apollo)" zh-HK Female "Microsoft Server Speech Text to Speech Voice (zh-HK, TracyRUS)" zh-HK Male "Microsoft Server Speech Text to Speech Voice (zh-HK, Danny, Apollo)" zh-TW Female "Microsoft Server Speech Text to Speech Voice (zh-TW, Yating, Apollo)" zh-TW Female "Microsoft Server Speech Text to Speech Voice (zh-TW, HanHanRUS)" zh-TW Male "Microsoft Server Speech Text to Speech Voice (zh-TW, Zhiwei, Apollo)" """ def clean(vals): for i in range(3): vals[i] = vals[i].strip().replace('*', '').replace('"', '') return vals def get_lang_dict(): lang_dict = {} for i in text.splitlines()[1:-1]: vals = clean(i.split('\t')) if lang_dict.get(vals[0], None) == None: lang_dict[vals[0]] = {} lang_dict[vals[0]][vals[1]] = vals[2] return lang_dict
class Solution: def allPathsSourceTarget(self, graph: List[List[int]]) -> List[List[int]]: """ 0 1 2. 3 [[1,2],[3],[3],[]] ^ paths = [[0, 1, 3], [0,2,3]] path = """ end = len(graph)-1 @lru_cache(maxsize=None) def dfs_bottomup(node): if node == end: return [[node]] paths = [] for next_node in graph[node]: for path in dfs_bottomup(next_node): paths.append( [node] + path) return paths return dfs_bottomup(0) def allPathsSourceTarget1(self, graph: List[List[int]]) -> List[List[int]]: """ TC - O(V*E) SC - O(V*E) """ start = 0 end = len(graph) - 1 paths = [] self.dfs_topdown(graph, start, end, paths, [0]) return paths def dfs(self, graph, node, end, paths, path): if node == end: paths.append(path[:]) return if not (0 <= node <= end): return for next_node in graph[node]: path.append(next_node) self.dfs(graph, next_node, end, paths, path) path.pop()
class QueueMember: def __init__(self, number): self.number = number self.next = self self.prev = self def set_next(self, next): self.next = next def get_next(self): return self.next def set_prev(self, prev): self.prev = prev def get_prev(self): return self.prev def insert_after(self, new_next): new_next.set_next(self.next) new_next.set_prev(self) self.next.set_prev(new_next) self.set_next(new_next) def remove(self): if not self.last(): self.next.set_prev(self.prev) self.prev.set_next(self.next) def last(self): return self.next == self def main(): while True: input_string = input() if input_string == '0 0 0': return N, k, m = [int(x) for x in input_string.split()] dole_queue = None for i in range(N): if dole_queue is None: dole_queue = QueueMember(i + 1) else: dole_queue.insert_after(QueueMember(i + 1)) dole_queue = dole_queue.get_next() officer_1 = dole_queue officer_2 = dole_queue.get_next() output_string = '' while True: for _ in range(k): officer_1 = officer_1.get_next() for _ in range(m): officer_2 = officer_2.get_prev() if officer_1 == officer_2: output_string += (' ' + str(officer_1.number))[-3:] if officer_1.last(): print(output_string) break officer_1 = officer_1.get_prev() officer_2 = officer_2.get_next() officer_2.get_prev().remove() else: output_string += (' ' + str(officer_1.number))[-3:] officer_1 = officer_1.get_prev() officer_1.get_next().remove() output_string += (' ' + str(officer_2.number))[-3:] if officer_2.last(): print(output_string) break if officer_1 == officer_2: officer_1 = officer_1.get_prev() officer_2 = officer_2.get_next() officer_2.get_prev().remove() output_string += ',' main()
class AgedPeer: def __init__(self, address, age=0): self.address = address self.age = age def __eq__(self, other): if isinstance(other, AgedPeer): return self.address == other.address return False @staticmethod def from_json(json_object): return AgedPeer(json_object['address'], json_object['age'])
# (C) Datadog, Inc. 2020-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) EVENT_SOURCE = 'DatadogTest' EVENT_ID = 9000 EVENT_CATEGORY = 42 INSTANCE = { 'legacy_mode': False, 'timeout': 2, 'path': 'Application', 'filters': {'source': [EVENT_SOURCE]}, }
""" Entradas Sueldo_bruto-->float-->sa Salidas Categoria-->int-->c Sueldo_neto-->float-->sn """ sa=float(input("Digite el salario bruto: ")) sn=0.0#float if(sa>=5_000_000): sn=(sa*0.10)+sa c=1 elif(sa<5_000_000 and sa>=4_300_000): sn=(sa*0.15)+sa c=2 elif(sa<4_300_000 and sa>=3_600_000): sn=(sa*0.20)+sa c=3 elif(sa<3_600_000 and sa>=2_000_000): sn=(sa*0.40)+sa c=4 elif(sa<2_000_000 and sa>=900_000): sn=(sa*0.60)+sa c=5 print("La categoria es: "+str(c)) print("El sueldo neto es de: $","{:.0f}".format(sn))
# 3/15 num_of_pages = int(input()) # < 10000 visited = set() shortest_path = 0 instructions = [list(map(int, input().split()))[1:] for _ in range(num_of_pages)] def choose_paths(page, history): if page not in visited: visited.add(page) if not len(instructions[page - 1]): # if this page doesn't need to lead ot any more (it is an ending) global shortest_path if shortest_path == 0 or len(history) + 1 < shortest_path: shortest_path = len(history) + 1 return history.append(page) for p in filter(lambda x: x not in history, instructions[page - 1]): choose_paths(p, history) history.pop() return choose_paths(1, []) print("Y" if len(visited) == len(instructions) else "N") print(shortest_path)
conn_info = {'host': 'vertica.server.ip.address', 'port': 5433, 'user': 'readonlyuser', 'password': 'XXXXXX', 'database': '', # 10 minutes timeout on queries 'read_timeout': 600, # default throw error on invalid UTF-8 results 'unicode_error': 'strict', # SSL is disabled by default 'ssl': False, 'connection_timeout': 5 # connection timeout is not enabled by default }
class DoubleLinklist: class _node: __slots__ = ['val', 'next', 'prev'] def __init__(self, val: int, next, prev): self.val = val self.next = next self.prev = prev def __init__(self): self.head = None self.size = 0 def insert(self, x: int) -> None: if self.head is None: self.head = self._node(x, None, None) self.head.next = self.head self.head.prev = self.head self.size += 1 else: tail = self.head.prev new_node = self._node(x, self.head, self.head.prev) tail.next = new_node self.head.prev = new_node self.size += 1 def delete(self, x: int) -> None: # 默认删除节点必然在链表内 if self.size == 0: return else: p = self.head if p.val == x: tail = self.head.prev self.head = self.head.next self.head.prev = tail tail.next = self.head else: while p.val != x: p = p.next p.prev.next = p.next p.next.prev = p.prev self.size -= 1 if __name__ == '__main__': l = DoubleLinklist() n = int(input()) m = int(input()) for i in range(0, n): l.insert(i+1) cnt = 0 p = l.head while l.size > 1: # print(p.val) cnt += 1 if cnt == m: l.delete(p.val) cnt = 0 """ i = l.size t = l.head while i > 0: print(t.val, end=' ') t = t.next i -= 1 print() """ p = p.next print(l.head.val)
# Created by MechAviv # Quest ID :: 25562 # Fostering the Dark sm.setSpeakerID(0) sm.flipDialoguePlayerAsSpeaker() sm.setSpeakerType(3) sm.sendNext("Dark magic is so much easier than light...") sm.setSpeakerID(0) sm.flipDialoguePlayerAsSpeaker() sm.setSpeakerType(3) sm.sendSay("But I do not fully understand it. With every minor touch, I feel the lust for destruction well up within me. It would be foolish to use this power without more understanding.") sm.setSpeakerID(0) sm.removeEscapeButton() sm.flipDialoguePlayerAsSpeaker() sm.setSpeakerType(3) sm.sendSay("It's time I left this forest and found some answers.") sm.setSpeakerID(0) sm.removeEscapeButton() sm.flipDialoguePlayerAsSpeaker() sm.setSpeakerType(3) sm.sendSay("The world has changed in the last few centuries. Thankfully, I have a map I can check by pressing #b#e[W] (basic key setting) or [N] (secondary key settings)#n#k.") sm.startQuest(25562) sm.completeQuest(25562) sm.giveExp(900) sm.startQuest(25559)
num = cont = soma = 0 num = int(input('Digite um número: ')) while num != 999: soma += num cont += 1 num = int(input('Digite um número: ')) print('O total de números digitados foi {} que somados é igual a {}.'.format(cont, soma))
# (n, k) represent nCk # (N+M-1, N-1)-(N+M-1, N) = (N-M)/(N+M) * (N+M, N) def solution(): T = int(input()) for i in range(T): N, M = map(float, input().split(' ')) print('Case #%d: %f' % (i+1, (N-M)/(N+M))) solution()
class HttpException(Exception): """ A base exception designed to support all API error handling. All exceptions should inherit from this or a subclass of it (depending on the usage), this will allow all apps and libraries to maintain a common exception chain """ def __init__(self, message, debug_message=None, code=None, status=500): super().__init__(message) self.status = status self.code = code self.message = message self.debug_message = debug_message def marshal(self): return { "code": self.code, "message": self.message, "debug_message": self.debug_message, } @classmethod def reraise(cls, message, debug_message=None, code=None, status=500): raise cls( message=message, code=code, debug_message=debug_message, status=status, ) class HttpCodeException(HttpException): status = None code = None message = None def __init__(self, debug_message=None): super().__init__(self.message, debug_message, self.code, self.status) class ServerException(HttpCodeException): status = 500 class BadRequestException(HttpCodeException): status = 400 class UnauthorisedException(HttpCodeException): status = 401 class NotFoundException(HttpCodeException): status = 404
# Find len of ll. k = k%l. Then mode l-k-1 steps and break the ll. Add the remaining part of the LL in the front. # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def rotateRight(self, head: ListNode, k: int) -> ListNode: l, ptr = 0, head while ptr: l += 1 ptr = ptr.next if l==0 or k%l==0: return head k = k % l ptr = head for _ in range(l-k-1): ptr = ptr.next new_head = ptr.next ptr.next = None ptr = new_head while ptr.next: ptr = ptr.next ptr.next = head return new_head
MY_MAC = "" MY_IP = "" IFACE = "" GATEWAY_MAC = "" _SRC_DST = {} PROTO = "" CMD = "" STOP_SNIFF = False
"""Top-level package for Image to LaTeX.""" __author__ = """Oscar Arbelaez""" __email__ = 'odarbelaeze@gmail.com' __version__ = '0.2.1'
# Convert the temperature from Fahrenheit to Celsius in the # function below. You can use this formula: # C = (F - 32) * 5/9 # Round the returned result to 3 decimal places. # You don't have to handle input, just implement the function # below. # Also, make sure your function returns the value. Please do NOT # print anything. # put your python code here def fahrenheit_to_celsius(fahrenheit): return round((fahrenheit - 32) * 5 / 9, 3)
task = ''' Реализовать базовый класс Worker (работник), в котором определить атрибуты: name, surname, position (должность), income (доход). Последний атрибут должен быть защищенным и ссылаться на словарь, содержащий элементы: оклад и премия, например, {"wage": wage, "bonus": bonus}. Создать класс Position (должность) на базе класса Worker. В классе Position реализовать методы получения полного имени сотрудника (get_full_name) и дохода с учетом премии (get_total_income). Проверить работу примера на реальных данных (создать экземпляры класса Position, передать данные, проверить значения атрибутов, вызвать методы экземпляров). ''' class Worker: def __init__(self, name, surname, position, wage, bonus): self.name = name self.surname = surname self.position = position self.income = {"wage": wage, "bonus": bonus} class Position(Worker): def get_full_name(self): return self.name + ' ' + self.surname def get_total_income(self): return self.income['wage'] + self.income['bonus'] if __name__ == '__main__': print(task) position = Position('Иван', 'Иванов', 'программист', 150000, 30000) print(position.get_full_name()) print(position.get_total_income())
""" Sponge Knowledge Base Action metadata Record type - sub-arguments """ def createBookRecordType(name): return RecordType(name, [ IntegerType("id").withNullable().withLabel("Identifier").withFeature("visible", False), StringType("author").withLabel("Author"), StringType("title").withLabel("Title"), ]) class Library(Action): def onConfigure(self): self.withArgs([ ListType("books").withLabel("Books").withProvided(ProvidedMeta().withValue()).withFeatures({ "createAction":SubAction("RecordCreateBook"), "updateAction":SubAction("RecordUpdateBook").withArg("book", "@this"), }).withElement( createBookRecordType("book").withAnnotated() ) ]).withNoResult() def onCall(self, search, order, books): return None def onProvideArgs(self, context): if "books" in context.provide: context.provided["books"] = ProvidedValue().withValue([ {"id":1, "author":"James Joyce", "title":"Ulysses"}, {"id":2, "author":"Arthur Conan Doyle", "title":"Adventures of Sherlock Holmes"} ]) class RecordCreateBook(Action): def onConfigure(self): self.withArgs([ createBookRecordType("book").withLabel("Book").withFields([ StringType("author").withProvided(ProvidedMeta().withValueSet(ValueSetMeta().withNotLimited())), ]) ]).withNoResult() def onCall(self, book): pass def onProvideArgs(self, context): if "book.author" in context.provide: context.provided["book.author"] = ProvidedValue().withValueSet(["James Joyce", "Arthur Conan Doyle"]) class RecordUpdateBook(Action): def onConfigure(self): self.withArg( createBookRecordType("book").withAnnotated().withProvided(ProvidedMeta().withValue().withDependency("book.id")).withFields([ StringType("author").withProvided(ProvidedMeta().withValueSet(ValueSetMeta().withNotLimited())), ]) ).withNoResult() def onProvideArgs(self, context): if "book" in context.provide: context.provided["book"] = ProvidedValue().withValue(AnnotatedValue({"id":context.current["book.id"], "author":"James Joyce", "title":"Ulysses"})) if "book.author" in context.provide: context.provided["book.author"] = ProvidedValue().withValueSet(["James Joyce", "Arthur Conan Doyle"]) def onCall(self, book): pass
def zero(f=lambda a: a): return f(0) def one(f=lambda a: a): return f(1) def two(f=lambda a: a): return f(2) def three(f=lambda a: a): return f(3) def four(f=lambda a: a): return f(4) def five(f=lambda a: a): return f(5) def six(f=lambda a: a): return f(6) def seven(f=lambda a: a): return f(7) def eight(f=lambda a: a): return f(8) def nine(f=lambda a: a): return f(9) def plus(f): return lambda a: a + f def minus(f): return lambda a: a - f def times(f): return lambda a: a * f def divided_by(f): return lambda a: a // f def test(): assert seven(times(five())) == 35 assert four(plus(nine())) == 13 assert eight(minus(three())) == 5 assert six(divided_by(two())) == 3 pass if __name__ == "__main__": test() pass
""" Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". """ class Solution(object): def addBinary(self, a, b): """ :type a: str :type b: str :rtype: str """ list_a = [int(i) for i in a[::-1]] list_b = [int(i) for i in b[::-1]] la = len(list_a) lb = len(list_b) # Pad zeroes if la < lb: list_a += [0 for i in range(lb - la)] la = len(list_a) else: list_b += [0 for i in range(la - lb)] lb = len(list_b) carry = 0 res = [] for i in range(la): t = (list_a[i] + list_b[i] + carry) % 2 carry = (list_a[i] + list_b[i] + carry) / 2 res.append(t) if carry == 1: res.append(1) return ''.join([str(d) for d in res[::-1]])
# coding=utf-8 """Hive: microservice powering social networks on the dPay blockchain. Hive is a "consensus interpretation" layer for the dPay blockchain, maintaining the state of social features such as post feeds, follows, and communities. Written in Python, it synchronizes an SQL database with chain state, providing developers with a more flexible/extensible alternative to the raw dpayd API. """
print("Nombre del alumno; Sharlene Miorzlava Cervantes Vazquez") print("lugar de residencia: El refugio de Agua zarca") print("Fecha de Nacimiento: 24 de enero del año 2002") print("Color favorito: Verde") print("Animal Favorito: Panda") print("¿Que es un Programa? Es una serie de instruccionespreviamente codificadas, las cuales permitenrealizar una tarea especifica en una computadora. Ha esta serie de intrucciones previamente codificadas, se les conoce como codigo fuente") print("¿Por que es importante la programacion? Porque gracias a ella se han desarrollado herramientas y soluciones que le han facilitado la vida al hombre, un claro ejemplo de esto es la comunicacion, tener todo a la mano.") print("Herencia: Heredar atributos y metodos de otra clase; Jerarquias que presentan la relacion ordenada de las clases que estan relacionadas, reutilizacin de codigos o programas") print("Poliformismo: Formas y estapas diferentes, es la habilidad de un objeto de realidar una accion de diferentes maneras utilizando metodos igual") print("Abstraccion: Principio por el cual se descarta toda aquella informacion que no resulta relevante en un contexto en particular, entatizando algunos de las detalles o propiedades de los objetos") print("Almecenar y orgamizar las caractersticas y funcionalidades de los objetos representadolas por medio de atribulos y metodos; garantiza la integridad de los datos que contiene un objeto, osea que los dotos sean correctos")
def ChangeText(s): print('ChangeText() received:', s) decoded = s.decode("utf-16-le") print('Decoded:', decoded) returned = None if decoded == 'hello': returned = 'world' if returned is None: return None else: b = returned.encode("utf-16-le") + b'\0\0' return b if __name__ == '__main__': print(ChangeText(b'h\0e\0l\0l\0o\0')) input()
print("""interface GigabitEthernet0/3.100\nvlan 100\nnameif wireless_user-v100\nsecurity-level 75\nip addr 10.1.100.1 255.255.255.0 interface GigabitEthernet0/3.101\nvlan 101\nnameif wireless_user-v101\nsecurity-level 75\nip addr 10.1.101.1 255.255.255.0 interface GigabitEthernet0/3.102\nvlan 102\nnameif wireless_user-v102\nsecurity-level 75\nip addr 10.1.102.1 255.255.255.0 interface GigabitEthernet0/3.103\nvlan 103\nnameif wireless_user-v103\nsecurity-level 75\nip addr 10.1.103.1 255.255.255.0 interface GigabitEthernet0/3.104\nvlan 104\nnameif wireless_user-v104\nsecurity-level 75\nip addr 10.1.104.1 255.255.255.0 interface GigabitEthernet0/3.105\nvlan 105\nnameif wireless_user-v105\nsecurity-level 75\nip addr 10.1.105.1 255.255.255.0 interface GigabitEthernet0/3.106\nvlan 106\nnameif wireless_user-v106\nsecurity-level 75\nip addr 10.1.106.1 255.255.255.0 interface GigabitEthernet0/3.107\nvlan 107\nnameif wireless_user-v107\nsecurity-level 75\nip addr 10.1.107.1 255.255.255.0 interface GigabitEthernet0/3.108\nvlan 108\nnameif wireless_user-v108\nsecurity-level 75\nip addr 10.1.108.1 255.255.255.0 interface GigabitEthernet0/3.109\nvlan 109\nnameif wireless_user-v109\nsecurity-level 75\nip addr 10.1.109.1 255.255.255.0 interface GigabitEthernet0/3.110\nvlan 110\nnameif wireless_user-v110\nsecurity-level 75\nip addr 10.1.110.1 255.255.255.0 interface GigabitEthernet0/3.111\nvlan 111\nnameif wireless_user-v111\nsecurity-level 75\nip addr 10.1.111.1 255.255.255.0 interface GigabitEthernet0/3.112\nvlan 112\nnameif wireless_user-v112\nsecurity-level 75\nip addr 10.1.112.1 255.255.255.0 interface GigabitEthernet0/3.113\nvlan 113\nnameif wireless_user-v113\nsecurity-level 75\nip addr 10.1.113.1 255.255.255.0 interface GigabitEthernet0/3.114\nvlan 114\nnameif wireless_user-v114\nsecurity-level 75\nip addr 10.1.114.1 255.255.255.0 interface GigabitEthernet0/3.115\nvlan 115\nnameif wireless_user-v115\nsecurity-level 75\nip addr 10.1.115.1 255.255.255.0 interface GigabitEthernet0/3.116\nvlan 116\nnameif wireless_user-v116\nsecurity-level 75\nip addr 10.1.116.1 255.255.255.0 interface GigabitEthernet0/3.117\nvlan 117\nnameif wireless_user-v117\nsecurity-level 75\nip addr 10.1.117.1 255.255.255.0 interface GigabitEthernet0/3.118\nvlan 118\nnameif wireless_user-v118\nsecurity-level 75\nip addr 10.1.118.1 255.255.255.0 interface GigabitEthernet0/3.119\nvlan 119\nnameif wireless_user-v119\nsecurity-level 75\nip addr 10.1.119.1 255.255.255.0 interface GigabitEthernet0/3.120\nvlan 120\nnameif wireless_user-v120\nsecurity-level 75\nip addr 10.1.120.1 255.255.255.0 interface GigabitEthernet0/3.121\nvlan 121\nnameif wireless_user-v121\nsecurity-level 75\nip addr 10.1.121.1 255.255.255.0 interface GigabitEthernet0/3.122\nvlan 122\nnameif wireless_user-v122\nsecurity-level 75\nip addr 10.1.122.1 255.255.255.0 interface GigabitEthernet0/3.123\nvlan 123\nnameif wireless_user-v123\nsecurity-level 75\nip addr 10.1.123.1 255.255.255.0 interface GigabitEthernet0/3.124\nvlan 124\nnameif wireless_user-v124\nsecurity-level 75\nip addr 10.1.124.1 255.255.255.0 interface GigabitEthernet0/3.125\nvlan 125\nnameif wireless_user-v125\nsecurity-level 75\nip addr 10.1.125.1 255.255.255.0 interface GigabitEthernet0/3.126\nvlan 126\nnameif wireless_user-v126\nsecurity-level 75\nip addr 10.1.126.1 255.255.255.0 interface GigabitEthernet0/3.127\nvlan 127\nnameif wireless_user-v127\nsecurity-level 75\nip addr 10.1.127.1 255.255.255.0 interface GigabitEthernet0/3.128\nvlan 128\nnameif wireless_user-v128\nsecurity-level 75\nip addr 10.1.128.1 255.255.255.0 interface GigabitEthernet0/3.129\nvlan 129\nnameif wireless_user-v129\nsecurity-level 75\nip addr 10.1.129.1 255.255.255.0 interface GigabitEthernet0/3.130\nvlan 130\nnameif wireless_user-v130\nsecurity-level 75\nip addr 10.1.130.1 255.255.255.0 interface GigabitEthernet0/3.131\nvlan 131\nnameif wireless_user-v131\nsecurity-level 75\nip addr 10.1.131.1 255.255.255.0 interface GigabitEthernet0/3.132\nvlan 132\nnameif wireless_user-v132\nsecurity-level 75\nip addr 10.1.132.1 255.255.255.0 interface GigabitEthernet0/3.133\nvlan 133\nnameif wireless_user-v133\nsecurity-level 75\nip addr 10.1.133.1 255.255.255.0 interface GigabitEthernet0/3.134\nvlan 134\nnameif wireless_user-v134\nsecurity-level 75\nip addr 10.1.134.1 255.255.255.0 interface GigabitEthernet0/3.135\nvlan 135\nnameif wireless_user-v135\nsecurity-level 75\nip addr 10.1.135.1 255.255.255.0 interface GigabitEthernet0/3.136\nvlan 136\nnameif wireless_user-v136\nsecurity-level 75\nip addr 10.1.136.1 255.255.255.0 interface GigabitEthernet0/3.137\nvlan 137\nnameif wireless_user-v137\nsecurity-level 75\nip addr 10.1.137.1 255.255.255.0 interface GigabitEthernet0/3.138\nvlan 138\nnameif wireless_user-v138\nsecurity-level 75\nip addr 10.1.138.1 255.255.255.0 interface GigabitEthernet0/3.139\nvlan 139\nnameif wireless_user-v139\nsecurity-level 75\nip addr 10.1.139.1 255.255.255.0 interface GigabitEthernet0/3.140\nvlan 140\nnameif wireless_user-v140\nsecurity-level 75\nip addr 10.1.140.1 255.255.255.0 interface GigabitEthernet0/3.141\nvlan 141\nnameif wireless_user-v141\nsecurity-level 75\nip addr 10.1.141.1 255.255.255.0 interface GigabitEthernet0/3.142\nvlan 142\nnameif wireless_user-v142\nsecurity-level 75\nip addr 10.1.142.1 255.255.255.0 interface GigabitEthernet0/3.143\nvlan 143\nnameif wireless_user-v143\nsecurity-level 75\nip addr 10.1.143.1 255.255.255.0 interface GigabitEthernet0/3.144\nvlan 144\nnameif wireless_user-v144\nsecurity-level 75\nip addr 10.1.144.1 255.255.255.0 interface GigabitEthernet0/3.145\nvlan 145\nnameif wireless_user-v145\nsecurity-level 75\nip addr 10.1.145.1 255.255.255.0 interface GigabitEthernet0/3.146\nvlan 146\nnameif wireless_user-v146\nsecurity-level 75\nip addr 10.1.146.1 255.255.255.0 interface GigabitEthernet0/3.147\nvlan 147\nnameif wireless_user-v147\nsecurity-level 75\nip addr 10.1.147.1 255.255.255.0 interface GigabitEthernet0/3.148\nvlan 148\nnameif wireless_user-v148\nsecurity-level 75\nip addr 10.1.148.1 255.255.255.0 interface GigabitEthernet0/3.149\nvlan 149\nnameif wireless_user-v149\nsecurity-level 75\nip addr 10.1.149.1 255.255.255.0 interface GigabitEthernet0/3.150\nvlan 150\nnameif server-v150\nsecurity-level 75\nip addr 10.1.150.1 255.255.255.0 interface GigabitEthernet0/3.151\nvlan 151\nnameif server-v151\nsecurity-level 75\nip addr 10.1.151.1 255.255.255.0 interface GigabitEthernet0/3.152\nvlan 152\nnameif server-v152\nsecurity-level 75\nip addr 10.1.152.1 255.255.255.0 interface GigabitEthernet0/3.153\nvlan 153\nnameif server-v153\nsecurity-level 75\nip addr 10.1.153.1 255.255.255.0 interface GigabitEthernet0/3.154\nvlan 154\nnameif server-v154\nsecurity-level 75\nip addr 10.1.154.1 255.255.255.0 interface GigabitEthernet0/3.155\nvlan 155\nnameif server-v155\nsecurity-level 75\nip addr 10.1.155.1 255.255.255.0 interface GigabitEthernet0/3.156\nvlan 156\nnameif server-v156\nsecurity-level 75\nip addr 10.1.156.1 255.255.255.0 interface GigabitEthernet0/3.157\nvlan 157\nnameif server-v157\nsecurity-level 75\nip addr 10.1.157.1 255.255.255.0 interface GigabitEthernet0/3.158\nvlan 158\nnameif server-v158\nsecurity-level 75\nip addr 10.1.158.1 255.255.255.0 interface GigabitEthernet0/3.159\nvlan 159\nnameif server-v159\nsecurity-level 75\nip addr 10.1.159.1 255.255.255.0 interface GigabitEthernet0/3.160\nvlan 160\nnameif server-v160\nsecurity-level 75\nip addr 10.1.160.1 255.255.255.0 interface GigabitEthernet0/3.161\nvlan 161\nnameif server-v161\nsecurity-level 75\nip addr 10.1.161.1 255.255.255.0 interface GigabitEthernet0/3.162\nvlan 162\nnameif server-v162\nsecurity-level 75\nip addr 10.1.162.1 255.255.255.0 interface GigabitEthernet0/3.163\nvlan 163\nnameif server-v163\nsecurity-level 75\nip addr 10.1.163.1 255.255.255.0 interface GigabitEthernet0/3.164\nvlan 164\nnameif server-v164\nsecurity-level 75\nip addr 10.1.164.1 255.255.255.0 interface GigabitEthernet0/3.165\nvlan 165\nnameif server-v165\nsecurity-level 75\nip addr 10.1.165.1 255.255.255.0 interface GigabitEthernet0/3.166\nvlan 166\nnameif server-v166\nsecurity-level 75\nip addr 10.1.166.1 255.255.255.0 interface GigabitEthernet0/3.167\nvlan 167\nnameif server-v167\nsecurity-level 75\nip addr 10.1.167.1 255.255.255.0 interface GigabitEthernet0/3.168\nvlan 168\nnameif server-v168\nsecurity-level 75\nip addr 10.1.168.1 255.255.255.0 interface GigabitEthernet0/3.169\nvlan 169\nnameif server-v169\nsecurity-level 75\nip addr 10.1.169.1 255.255.255.0 interface GigabitEthernet0/3.170\nvlan 170\nnameif server-v170\nsecurity-level 75\nip addr 10.1.170.1 255.255.255.0 interface GigabitEthernet0/3.171\nvlan 171\nnameif server-v171\nsecurity-level 75\nip addr 10.1.171.1 255.255.255.0 interface GigabitEthernet0/3.172\nvlan 172\nnameif server-v172\nsecurity-level 75\nip addr 10.1.172.1 255.255.255.0 interface GigabitEthernet0/3.173\nvlan 173\nnameif server-v173\nsecurity-level 75\nip addr 10.1.173.1 255.255.255.0 interface GigabitEthernet0/3.174\nvlan 174\nnameif server-v174\nsecurity-level 75\nip addr 10.1.174.1 255.255.255.0 interface GigabitEthernet0/3.175\nvlan 175\nnameif server-v175\nsecurity-level 75\nip addr 10.1.175.1 255.255.255.0 interface GigabitEthernet0/3.176\nvlan 176\nnameif server-v176\nsecurity-level 75\nip addr 10.1.176.1 255.255.255.0 interface GigabitEthernet0/3.177\nvlan 177\nnameif server-v177\nsecurity-level 75\nip addr 10.1.177.1 255.255.255.0 interface GigabitEthernet0/3.178\nvlan 178\nnameif server-v178\nsecurity-level 75\nip addr 10.1.178.1 255.255.255.0 interface GigabitEthernet0/3.179\nvlan 179\nnameif server-v179\nsecurity-level 75\nip addr 10.1.179.1 255.255.255.0 interface GigabitEthernet0/3.180\nvlan 180\nnameif server-v180\nsecurity-level 75\nip addr 10.1.180.1 255.255.255.0 interface GigabitEthernet0/3.181\nvlan 181\nnameif server-v181\nsecurity-level 75\nip addr 10.1.181.1 255.255.255.0 interface GigabitEthernet0/3.182\nvlan 182\nnameif server-v182\nsecurity-level 75\nip addr 10.1.182.1 255.255.255.0 interface GigabitEthernet0/3.183\nvlan 183\nnameif server-v183\nsecurity-level 75\nip addr 10.1.183.1 255.255.255.0 interface GigabitEthernet0/3.184\nvlan 184\nnameif server-v184\nsecurity-level 75\nip addr 10.1.184.1 255.255.255.0 interface GigabitEthernet0/3.185\nvlan 185\nnameif server-v185\nsecurity-level 75\nip addr 10.1.185.1 255.255.255.0 interface GigabitEthernet0/3.186\nvlan 186\nnameif server-v186\nsecurity-level 75\nip addr 10.1.186.1 255.255.255.0 interface GigabitEthernet0/3.187\nvlan 187\nnameif server-v187\nsecurity-level 75\nip addr 10.1.187.1 255.255.255.0 interface GigabitEthernet0/3.188\nvlan 188\nnameif server-v188\nsecurity-level 75\nip addr 10.1.188.1 255.255.255.0 interface GigabitEthernet0/3.189\nvlan 189\nnameif server-v189\nsecurity-level 75\nip addr 10.1.189.1 255.255.255.0 interface GigabitEthernet0/3.190\nvlan 190\nnameif server-v190\nsecurity-level 75\nip addr 10.1.190.1 255.255.255.0 interface GigabitEthernet0/3.191\nvlan 191\nnameif server-v191\nsecurity-level 75\nip addr 10.1.191.1 255.255.255.0 interface GigabitEthernet0/3.192\nvlan 192\nnameif server-v192\nsecurity-level 75\nip addr 10.1.192.1 255.255.255.0 interface GigabitEthernet0/3.193\nvlan 193\nnameif server-v193\nsecurity-level 75\nip addr 10.1.193.1 255.255.255.0 interface GigabitEthernet0/3.194\nvlan 194\nnameif server-v194\nsecurity-level 75\nip addr 10.1.194.1 255.255.255.0 interface GigabitEthernet0/3.195\nvlan 195\nnameif server-v195\nsecurity-level 75\nip addr 10.1.195.1 255.255.255.0 interface GigabitEthernet0/3.196\nvlan 196\nnameif server-v196\nsecurity-level 75\nip addr 10.1.196.1 255.255.255.0 interface GigabitEthernet0/3.197\nvlan 197\nnameif server-v197\nsecurity-level 75\nip addr 10.1.197.1 255.255.255.0 interface GigabitEthernet0/3.198\nvlan 198\nnameif server-v198\nsecurity-level 75\nip addr 10.1.198.1 255.255.255.0 interface GigabitEthernet0/3.199\nvlan 199\nnameif server-v199\nsecurity-level 75\nip addr 10.1.199.1 255.255.255.0 interface GigabitEthernet0/3.200\nvlan 200\nnameif wired_user-v200\nsecurity-level 75\nip addr 10.1.200.1 255.255.255.0 interface GigabitEthernet0/3.201\nvlan 201\nnameif wired_user-v201\nsecurity-level 75\nip addr 10.1.201.1 255.255.255.0 interface GigabitEthernet0/3.202\nvlan 202\nnameif wired_user-v202\nsecurity-level 75\nip addr 10.1.202.1 255.255.255.0 interface GigabitEthernet0/3.203\nvlan 203\nnameif wired_user-v203\nsecurity-level 75\nip addr 10.1.203.1 255.255.255.0 interface GigabitEthernet0/3.204\nvlan 204\nnameif wired_user-v204\nsecurity-level 75\nip addr 10.1.204.1 255.255.255.0 interface GigabitEthernet0/3.205\nvlan 205\nnameif wired_user-v205\nsecurity-level 75\nip addr 10.1.205.1 255.255.255.0 interface GigabitEthernet0/3.206\nvlan 206\nnameif wired_user-v206\nsecurity-level 75\nip addr 10.1.206.1 255.255.255.0 interface GigabitEthernet0/3.207\nvlan 207\nnameif wired_user-v207\nsecurity-level 75\nip addr 10.1.207.1 255.255.255.0 interface GigabitEthernet0/3.208\nvlan 208\nnameif wired_user-v208\nsecurity-level 75\nip addr 10.1.208.1 255.255.255.0 interface GigabitEthernet0/3.209\nvlan 209\nnameif wired_user-v209\nsecurity-level 75\nip addr 10.1.209.1 255.255.255.0 interface GigabitEthernet0/3.210\nvlan 210\nnameif wired_user-v210\nsecurity-level 75\nip addr 10.1.210.1 255.255.255.0 interface GigabitEthernet0/3.211\nvlan 211\nnameif wired_user-v211\nsecurity-level 75\nip addr 10.1.211.1 255.255.255.0 interface GigabitEthernet0/3.212\nvlan 212\nnameif wired_user-v212\nsecurity-level 75\nip addr 10.1.212.1 255.255.255.0 interface GigabitEthernet0/3.213\nvlan 213\nnameif wired_user-v213\nsecurity-level 75\nip addr 10.1.213.1 255.255.255.0 interface GigabitEthernet0/3.214\nvlan 214\nnameif wired_user-v214\nsecurity-level 75\nip addr 10.1.214.1 255.255.255.0 interface GigabitEthernet0/3.215\nvlan 215\nnameif wired_user-v215\nsecurity-level 75\nip addr 10.1.215.1 255.255.255.0 interface GigabitEthernet0/3.216\nvlan 216\nnameif wired_user-v216\nsecurity-level 75\nip addr 10.1.216.1 255.255.255.0 interface GigabitEthernet0/3.217\nvlan 217\nnameif wired_user-v217\nsecurity-level 75\nip addr 10.1.217.1 255.255.255.0 interface GigabitEthernet0/3.218\nvlan 218\nnameif wired_user-v218\nsecurity-level 75\nip addr 10.1.218.1 255.255.255.0 interface GigabitEthernet0/3.219\nvlan 219\nnameif wired_user-v219\nsecurity-level 75\nip addr 10.1.219.1 255.255.255.0 interface GigabitEthernet0/3.220\nvlan 220\nnameif wired_user-v220\nsecurity-level 75\nip addr 10.1.220.1 255.255.255.0 interface GigabitEthernet0/3.221\nvlan 221\nnameif wired_user-v221\nsecurity-level 75\nip addr 10.1.221.1 255.255.255.0 interface GigabitEthernet0/3.222\nvlan 222\nnameif wired_user-v222\nsecurity-level 75\nip addr 10.1.222.1 255.255.255.0 interface GigabitEthernet0/3.223\nvlan 223\nnameif wired_user-v223\nsecurity-level 75\nip addr 10.1.223.1 255.255.255.0 interface GigabitEthernet0/3.224\nvlan 224\nnameif wired_user-v224\nsecurity-level 75\nip addr 10.1.224.1 255.255.255.0 interface GigabitEthernet0/3.225\nvlan 225\nnameif wired_user-v225\nsecurity-level 75\nip addr 10.1.225.1 255.255.255.0 interface GigabitEthernet0/3.226\nvlan 226\nnameif wired_user-v226\nsecurity-level 75\nip addr 10.1.226.1 255.255.255.0 interface GigabitEthernet0/3.227\nvlan 227\nnameif wired_user-v227\nsecurity-level 75\nip addr 10.1.227.1 255.255.255.0 interface GigabitEthernet0/3.228\nvlan 228\nnameif wired_user-v228\nsecurity-level 75\nip addr 10.1.228.1 255.255.255.0 interface GigabitEthernet0/3.229\nvlan 229\nnameif wired_user-v229\nsecurity-level 75\nip addr 10.1.229.1 255.255.255.0 interface GigabitEthernet0/3.230\nvlan 230\nnameif wired_user-v230\nsecurity-level 75\nip addr 10.1.230.1 255.255.255.0 interface GigabitEthernet0/3.231\nvlan 231\nnameif wired_user-v231\nsecurity-level 75\nip addr 10.1.231.1 255.255.255.0 interface GigabitEthernet0/3.232\nvlan 232\nnameif wired_user-v232\nsecurity-level 75\nip addr 10.1.232.1 255.255.255.0 interface GigabitEthernet0/3.233\nvlan 233\nnameif wired_user-v233\nsecurity-level 75\nip addr 10.1.233.1 255.255.255.0 interface GigabitEthernet0/3.234\nvlan 234\nnameif wired_user-v234\nsecurity-level 75\nip addr 10.1.234.1 255.255.255.0 interface GigabitEthernet0/3.235\nvlan 235\nnameif wired_user-v235\nsecurity-level 75\nip addr 10.1.235.1 255.255.255.0 interface GigabitEthernet0/3.236\nvlan 236\nnameif wired_user-v236\nsecurity-level 75\nip addr 10.1.236.1 255.255.255.0 interface GigabitEthernet0/3.237\nvlan 237\nnameif wired_user-v237\nsecurity-level 75\nip addr 10.1.237.1 255.255.255.0 interface GigabitEthernet0/3.238\nvlan 238\nnameif wired_user-v238\nsecurity-level 75\nip addr 10.1.238.1 255.255.255.0 interface GigabitEthernet0/3.239\nvlan 239\nnameif wired_user-v239\nsecurity-level 75\nip addr 10.1.239.1 255.255.255.0 interface GigabitEthernet0/3.240\nvlan 240\nnameif wired_user-v240\nsecurity-level 75\nip addr 10.1.240.1 255.255.255.0 interface GigabitEthernet0/3.241\nvlan 241\nnameif wired_user-v241\nsecurity-level 75\nip addr 10.1.241.1 255.255.255.0 interface GigabitEthernet0/3.242\nvlan 242\nnameif wired_user-v242\nsecurity-level 75\nip addr 10.1.242.1 255.255.255.0 interface GigabitEthernet0/3.243\nvlan 243\nnameif wired_user-v243\nsecurity-level 75\nip addr 10.1.243.1 255.255.255.0 interface GigabitEthernet0/3.244\nvlan 244\nnameif wired_user-v244\nsecurity-level 75\nip addr 10.1.244.1 255.255.255.0 interface GigabitEthernet0/3.245\nvlan 245\nnameif wired_user-v245\nsecurity-level 75\nip addr 10.1.245.1 255.255.255.0 interface GigabitEthernet0/3.246\nvlan 246\nnameif wired_user-v246\nsecurity-level 75\nip addr 10.1.246.1 255.255.255.0 interface GigabitEthernet0/3.247\nvlan 247\nnameif wired_user-v247\nsecurity-level 75\nip addr 10.1.247.1 255.255.255.0 interface GigabitEthernet0/3.248\nvlan 248\nnameif wired_user-v248\nsecurity-level 75\nip addr 10.1.248.1 255.255.255.0 interface GigabitEthernet0/3.249\nvlan 249\nnameif wired_user-v249\nsecurity-level 75\nip addr 10.1.249.1 255.255.255.0""")
#! /usr/bin/env python3 # coding:utf-8 def main(): #answer = [(a, b, c) for a in range(21) for b in range(34) for c in range(101-a-b) # if a*5 + b*3 +c/3 == 100 and a+b+c == 100] #print(answer) for a in range(21): for b in range(34): c = 100-a-b if a*5 + b*3 +c/3 == 100: print(a, b, c) if __name__ == '__main__': main()
name = "qt" version = "4.8.7" description = \ """ Qt """ build_requires = [ "python-2.7" ] def commands(): # export CMAKE_MODULE_PATH=$CMAKE_MODULE_PATH:!ROOT!/cmake # export QTDIR=!ROOT! # export QT_INCLUDE_DIR=!ROOT!/include # export QT_LIB_DIR=!ROOT!/lib # export LD_LIBRARY_PATH=!ROOT!/lib:$LD_LIBRARY_PATH # export QTLIB=!ROOT!/lib # export QT_QMAKE_EXECUTABLE=!ROOT!/bin/qmake # export PATH=!ROOT!/bin:$PATH # export CMAKE_MODULE_PATH=$CMAKE_MODULE_PATH:!ROOT!/cmake env.LD_LIBRARY_PATH.prepend("{root}/lib") env.QT_ROOT = '{root}' if building: env.CMAKE_MODULE_PATH.append("{root}/cmake") uuid = "repository.qt"
def getCommonLetters(word1, word2): return ''.join(sorted(set(word1).intersection(set(word2)))) print(getCommonLetters('apple', 'strw')) print(getCommonLetters('sing', 'song'))
class ParseFailure(Exception): def __init__(self, message, offset=None, column=None, row=None, text=None): self.message = message self.offset = offset self.column = column self.row = row self.text = text super(ParseFailure, self).__init__( self.message, self.offset, self.column, self.row, self.text) class JSONSquaredError(Exception): pass
# # @lc app=leetcode id=71 lang=python3 # # [71] Simplify Path # # @lc code=start class Solution: def simplifyPath(self, path: str) -> str: stack = [] for token in path.split('/'): if token in ('', '.'): pass elif token == '..': if stack: stack.pop() else: stack.append(token) return '/' + '/'.join(stack) # @lc code=end # Accepted # 254/254 cases passed(24 ms) # Your runtime beats 99.96 % of python3 submissions # Your memory usage beats 100 % of python3 submissions(12.8 MB)
""" Dada 2 listas numéricas ("a" e "b") de tamanho 3, retorne uma nova contendo os seus elementos do meio. """ def middle_way(a, b): return a[int(len(a)/2):int(len(a)/2)+1] + b[int(len(b)/2):int(len(b)/2)+1] print(middle_way([1, 2, 3], [4, 5, 6]))