content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
first = set([int(x) for x in input().split()])
second = set([int(x) for x in input().split()])
n = int(input())
for _ in range(n):
command = input().split()
cmd = command[0]
sequence = command[1]
if cmd == "Add":
numbers = [int(x) for x in command[2:]]
if sequence == "First":
first.update(numbers)
elif sequence == "Second":
second.update(numbers)
elif cmd == "Remove":
numbers = [int(x) for x in command[2:]]
if sequence == "First":
first.difference_update(numbers)
elif sequence == "Second":
second.difference_update(numbers)
elif cmd == "Check":
if first.issubset(second) or second.issubset(first):
print(True)
else:
print(False)
print(*sorted(first), sep=", ")
print(*sorted(second), sep=", ")
| first = set([int(x) for x in input().split()])
second = set([int(x) for x in input().split()])
n = int(input())
for _ in range(n):
command = input().split()
cmd = command[0]
sequence = command[1]
if cmd == 'Add':
numbers = [int(x) for x in command[2:]]
if sequence == 'First':
first.update(numbers)
elif sequence == 'Second':
second.update(numbers)
elif cmd == 'Remove':
numbers = [int(x) for x in command[2:]]
if sequence == 'First':
first.difference_update(numbers)
elif sequence == 'Second':
second.difference_update(numbers)
elif cmd == 'Check':
if first.issubset(second) or second.issubset(first):
print(True)
else:
print(False)
print(*sorted(first), sep=', ')
print(*sorted(second), sep=', ') |
def make_bricks(small, big, goal):
if goal >(small + 5*big):
return False
else:
return ((goal%5)<=small)
| def make_bricks(small, big, goal):
if goal > small + 5 * big:
return False
else:
return goal % 5 <= small |
'''
Determine if a 9 x 9 Sudoku board is valid.
Only the filled cells need to be validated according to the following rules:
Each row must contain the digits 1-9 without repetition.
Each column must contain the digits 1-9 without repetition.
Each of the nine 3 x 3 sub-boxes of the grid must contain the digits 1-9 without repetition.
Note:
A Sudoku board (partially filled) could be valid but is not necessarily solvable.
Only the filled cells need to be validated according to the mentioned rules.
Example 1:
Input: board =
[["5","3",".",".","7",".",".",".","."]
,["6",".",".","1","9","5",".",".","."]
,[".","9","8",".",".",".",".","6","."]
,["8",".",".",".","6",".",".",".","3"]
,["4",".",".","8",".","3",".",".","1"]
,["7",".",".",".","2",".",".",".","6"]
,[".","6",".",".",".",".","2","8","."]
,[".",".",".","4","1","9",".",".","5"]
,[".",".",".",".","8",".",".","7","9"]]
Output: true
Example 2:
Input: board =
[["8","3",".",".","7",".",".",".","."]
,["6",".",".","1","9","5",".",".","."]
,[".","9","8",".",".",".",".","6","."]
,["8",".",".",".","6",".",".",".","3"]
,["4",".",".","8",".","3",".",".","1"]
,["7",".",".",".","2",".",".",".","6"]
,[".","6",".",".",".",".","2","8","."]
,[".",".",".","4","1","9",".",".","5"]
,[".",".",".",".","8",".",".","7","9"]]
Output: false
Explanation: Same as Example 1, except with the 5 in the top left corner being modified to 8. Since there are two 8's in the top left 3x3 sub-box, it is invalid.
board.length == 9
board[i].length == 9
board[i][j] is a digit or '.'.
'''
class Solution:
def isValidSudoku(self, board: List[List[str]]) -> bool:
# checking horizontal rows
valid = True
for row in board:
trimmed_num = [int(num) for num in row if num.isdigit()]
# if any of the digits in the row are > 9
if any((x > 9 for x in trimmed_num)):
valid = False
break
# if the row contains duplicate numbers
if len(set(trimmed_num)) != len(trimmed_num):
valid = False
break
# if above test is pass, checking vertical rows
if valid:
# transpose the matrix
board_t = [[board[j][i] for j in range(len(board))] for i in range(len(board[0]))]
for row in board_t:
trimmed_num = [int(num) for num in row if num.isdigit()]
if any((x > 9 for x in trimmed_num)):
valid = False
break
if len(set(trimmed_num)) != len(trimmed_num):
valid = False
break
# if above test is pass, check for individual 3X3 matrix to be valid
if valid:
for k in range(3):
for i in range(3):
row = []
h_shft = i*3
for j in range(3):
v_shft = j*1 + k*3
row += board[v_shft][h_shft:h_shft+3]
trimmed_num = [int(num) for num in row if num.isdigit()]
if any((x > 9 for x in trimmed_num)):
valid = False
break
if len(set(trimmed_num)) != len(trimmed_num):
valid = False
break
return valid | """
Determine if a 9 x 9 Sudoku board is valid.
Only the filled cells need to be validated according to the following rules:
Each row must contain the digits 1-9 without repetition.
Each column must contain the digits 1-9 without repetition.
Each of the nine 3 x 3 sub-boxes of the grid must contain the digits 1-9 without repetition.
Note:
A Sudoku board (partially filled) could be valid but is not necessarily solvable.
Only the filled cells need to be validated according to the mentioned rules.
Example 1:
Input: board =
[["5","3",".",".","7",".",".",".","."]
,["6",".",".","1","9","5",".",".","."]
,[".","9","8",".",".",".",".","6","."]
,["8",".",".",".","6",".",".",".","3"]
,["4",".",".","8",".","3",".",".","1"]
,["7",".",".",".","2",".",".",".","6"]
,[".","6",".",".",".",".","2","8","."]
,[".",".",".","4","1","9",".",".","5"]
,[".",".",".",".","8",".",".","7","9"]]
Output: true
Example 2:
Input: board =
[["8","3",".",".","7",".",".",".","."]
,["6",".",".","1","9","5",".",".","."]
,[".","9","8",".",".",".",".","6","."]
,["8",".",".",".","6",".",".",".","3"]
,["4",".",".","8",".","3",".",".","1"]
,["7",".",".",".","2",".",".",".","6"]
,[".","6",".",".",".",".","2","8","."]
,[".",".",".","4","1","9",".",".","5"]
,[".",".",".",".","8",".",".","7","9"]]
Output: false
Explanation: Same as Example 1, except with the 5 in the top left corner being modified to 8. Since there are two 8's in the top left 3x3 sub-box, it is invalid.
board.length == 9
board[i].length == 9
board[i][j] is a digit or '.'.
"""
class Solution:
def is_valid_sudoku(self, board: List[List[str]]) -> bool:
valid = True
for row in board:
trimmed_num = [int(num) for num in row if num.isdigit()]
if any((x > 9 for x in trimmed_num)):
valid = False
break
if len(set(trimmed_num)) != len(trimmed_num):
valid = False
break
if valid:
board_t = [[board[j][i] for j in range(len(board))] for i in range(len(board[0]))]
for row in board_t:
trimmed_num = [int(num) for num in row if num.isdigit()]
if any((x > 9 for x in trimmed_num)):
valid = False
break
if len(set(trimmed_num)) != len(trimmed_num):
valid = False
break
if valid:
for k in range(3):
for i in range(3):
row = []
h_shft = i * 3
for j in range(3):
v_shft = j * 1 + k * 3
row += board[v_shft][h_shft:h_shft + 3]
trimmed_num = [int(num) for num in row if num.isdigit()]
if any((x > 9 for x in trimmed_num)):
valid = False
break
if len(set(trimmed_num)) != len(trimmed_num):
valid = False
break
return valid |
def foo():
pass
def bar():
a = 'a'
b = 'b'
| def foo():
pass
def bar():
a = 'a'
b = 'b' |
# This file was automatically generated from "alwaysLandLevel.ma"
points = {}
boxes = {}
boxes['areaOfInterestBounds'] = (-1.045859963, 12.67722855, -5.401537075) + (0.0, 0.0, 0.0) + (34.46156851, 20.94044653, 0.6931564611)
points['ffaSpawn1'] = (-9.295167711, 8.010664315, -5.44451005) + (1.555840357, 1.453808816, 0.1165648888)
points['ffaSpawn2'] = (7.484707127, 8.172681752, -5.614479365) + (1.553861796, 1.453808816, 0.04419853907)
points['ffaSpawn3'] = (9.55724115, 11.30789446, -5.614479365) + (1.337925849, 1.453808816, 0.04419853907)
points['ffaSpawn4'] = (-11.55747023, 10.99170684, -5.614479365) + (1.337925849, 1.453808816, 0.04419853907)
points['ffaSpawn5'] = (-1.878892369, 9.46490571, -5.614479365) + (1.337925849, 1.453808816, 0.04419853907)
points['ffaSpawn6'] = (-0.4912812943, 5.077006397, -5.521672101) + (1.878332089, 1.453808816, 0.007578097856)
points['flag1'] = (-11.75152479, 8.057427485, -5.52)
points['flag2'] = (9.840909039, 8.188634282, -5.52)
points['flag3'] = (-0.2195258696, 5.010273907, -5.52)
points['flag4'] = (-0.04605809154, 12.73369108, -5.52)
points['flagDefault'] = (-0.04201942896, 12.72374492, -5.52)
boxes['levelBounds'] = (-0.8748348681, 9.212941713, -5.729538885) + (0.0, 0.0, 0.0) + (36.09666006, 26.19950145, 7.89541168)
points['powerupSpawn1'] = (1.160232442, 6.745963662, -5.469115985)
points['powerupSpawn2'] = (-1.899700206, 10.56447241, -5.505721177)
points['powerupSpawn3'] = (10.56098871, 12.25165669, -5.576232453)
points['powerupSpawn4'] = (-12.33530337, 12.25165669, -5.576232453)
points['spawn1'] = (-9.295167711, 8.010664315, -5.44451005) + (1.555840357, 1.453808816, 0.1165648888)
points['spawn2'] = (7.484707127, 8.172681752, -5.614479365) + (1.553861796, 1.453808816, 0.04419853907)
points['spawnByFlag1'] = (-9.295167711, 8.010664315, -5.44451005) + (1.555840357, 1.453808816, 0.1165648888)
points['spawnByFlag2'] = (7.484707127, 8.172681752, -5.614479365) + (1.553861796, 1.453808816, 0.04419853907)
points['spawnByFlag3'] = (-1.45994593, 5.038762459, -5.535288724) + (0.9516389866, 0.6666414677, 0.08607244075)
points['spawnByFlag4'] = (0.4932087091, 12.74493212, -5.598987003) + (0.5245740665, 0.5245740665, 0.01941146064)
| points = {}
boxes = {}
boxes['areaOfInterestBounds'] = (-1.045859963, 12.67722855, -5.401537075) + (0.0, 0.0, 0.0) + (34.46156851, 20.94044653, 0.6931564611)
points['ffaSpawn1'] = (-9.295167711, 8.010664315, -5.44451005) + (1.555840357, 1.453808816, 0.1165648888)
points['ffaSpawn2'] = (7.484707127, 8.172681752, -5.614479365) + (1.553861796, 1.453808816, 0.04419853907)
points['ffaSpawn3'] = (9.55724115, 11.30789446, -5.614479365) + (1.337925849, 1.453808816, 0.04419853907)
points['ffaSpawn4'] = (-11.55747023, 10.99170684, -5.614479365) + (1.337925849, 1.453808816, 0.04419853907)
points['ffaSpawn5'] = (-1.878892369, 9.46490571, -5.614479365) + (1.337925849, 1.453808816, 0.04419853907)
points['ffaSpawn6'] = (-0.4912812943, 5.077006397, -5.521672101) + (1.878332089, 1.453808816, 0.007578097856)
points['flag1'] = (-11.75152479, 8.057427485, -5.52)
points['flag2'] = (9.840909039, 8.188634282, -5.52)
points['flag3'] = (-0.2195258696, 5.010273907, -5.52)
points['flag4'] = (-0.04605809154, 12.73369108, -5.52)
points['flagDefault'] = (-0.04201942896, 12.72374492, -5.52)
boxes['levelBounds'] = (-0.8748348681, 9.212941713, -5.729538885) + (0.0, 0.0, 0.0) + (36.09666006, 26.19950145, 7.89541168)
points['powerupSpawn1'] = (1.160232442, 6.745963662, -5.469115985)
points['powerupSpawn2'] = (-1.899700206, 10.56447241, -5.505721177)
points['powerupSpawn3'] = (10.56098871, 12.25165669, -5.576232453)
points['powerupSpawn4'] = (-12.33530337, 12.25165669, -5.576232453)
points['spawn1'] = (-9.295167711, 8.010664315, -5.44451005) + (1.555840357, 1.453808816, 0.1165648888)
points['spawn2'] = (7.484707127, 8.172681752, -5.614479365) + (1.553861796, 1.453808816, 0.04419853907)
points['spawnByFlag1'] = (-9.295167711, 8.010664315, -5.44451005) + (1.555840357, 1.453808816, 0.1165648888)
points['spawnByFlag2'] = (7.484707127, 8.172681752, -5.614479365) + (1.553861796, 1.453808816, 0.04419853907)
points['spawnByFlag3'] = (-1.45994593, 5.038762459, -5.535288724) + (0.9516389866, 0.6666414677, 0.08607244075)
points['spawnByFlag4'] = (0.4932087091, 12.74493212, -5.598987003) + (0.5245740665, 0.5245740665, 0.01941146064) |
# https://leetcode.com/problems/counting-bits/
class Solution:
def countBits(self, num: int) -> [int]:
# return self.solution1(num)
return self.solution2(num)
# Time: O(n * sizeOf(int))
def solution1(self, num):
return list(map(lambda i: bin(i).count("1"), range(0, num + 1)))
# Time: O(n)
# even: countBits(i) == countBits(i // 2)
# odd: countBits(i) == countBits(i - 1) + 1 where (i - 1) is even
# 2: 00010
# 4: 00100
# 8: 01000
def solution2(self, num):
res = [0] * (num + 1)
for i in range(num + 1):
# or i >> 1 or i % 2
res[i] = res[i // 2] + (i & 1)
return res
| class Solution:
def count_bits(self, num: int) -> [int]:
return self.solution2(num)
def solution1(self, num):
return list(map(lambda i: bin(i).count('1'), range(0, num + 1)))
def solution2(self, num):
res = [0] * (num + 1)
for i in range(num + 1):
res[i] = res[i // 2] + (i & 1)
return res |
# -*- coding: utf-8 -*-
def main():
t = int(input())
n = int(input())
a = list(map(int, input().split()))
m = int(input())
b = list(map(int, input().split()))
count = 0
i = 0
j = 0
while i < n:
if j >= m:
break
if a[i] <= b[j] <= a[i] + t:
j += 1
count += 1
i += 1
if count >= m:
print('yes')
else:
print('no')
if __name__ == '__main__':
main()
| def main():
t = int(input())
n = int(input())
a = list(map(int, input().split()))
m = int(input())
b = list(map(int, input().split()))
count = 0
i = 0
j = 0
while i < n:
if j >= m:
break
if a[i] <= b[j] <= a[i] + t:
j += 1
count += 1
i += 1
if count >= m:
print('yes')
else:
print('no')
if __name__ == '__main__':
main() |
# Split into all the possible subset of an array can be either number of string
print("----------INPUT----------")
# For arrays
str_arr = input('Enter array of integers: ').split(' ')
arr = [int(num) for num in str_arr]
# For strings
# str_arr = input('Enter array of strings: ')
# arr = str_arr
# print("----------DP----------")
def splitList(arr, ind, mem, all_mem):
if ind < 0:
return all_mem.append(mem)
temp = mem.copy()
mem.append(arr[ind])
splitList(arr, ind - 1, mem, all_mem)
splitList(arr, ind - 1, temp, all_mem)
def toSplitList(arr):
mem = []
all_mem = []
splitList(arr, len(arr) - 1, mem, all_mem)
return all_mem
print("----------OUTPUT----------")
result = toSplitList(arr)
print(result)
print("----------END----------")
| print('----------INPUT----------')
str_arr = input('Enter array of integers: ').split(' ')
arr = [int(num) for num in str_arr]
def split_list(arr, ind, mem, all_mem):
if ind < 0:
return all_mem.append(mem)
temp = mem.copy()
mem.append(arr[ind])
split_list(arr, ind - 1, mem, all_mem)
split_list(arr, ind - 1, temp, all_mem)
def to_split_list(arr):
mem = []
all_mem = []
split_list(arr, len(arr) - 1, mem, all_mem)
return all_mem
print('----------OUTPUT----------')
result = to_split_list(arr)
print(result)
print('----------END----------') |
def fras(f):
tam = len(f)
print("-"*tam)
print(f)
print("-"*tam)
frase = str(input("Digite uma frase: "))
fras(frase)
| def fras(f):
tam = len(f)
print('-' * tam)
print(f)
print('-' * tam)
frase = str(input('Digite uma frase: '))
fras(frase) |
def show_messages(messages):
print("Printing all messages")
for message in messages:
print(message)
def send_messages(messages,sent_messages):
while messages:
removed_messages = messages.pop()
sent_messages.append(removed_messages)
print(sent_messages)
| def show_messages(messages):
print('Printing all messages')
for message in messages:
print(message)
def send_messages(messages, sent_messages):
while messages:
removed_messages = messages.pop()
sent_messages.append(removed_messages)
print(sent_messages) |
ID_PREFIX = "imvdb"
SITE_URL = "https://imvdb.com"
API_URL = "https://imvdb.com/api/v1"
COUNTRIES = {
"United States": "us",
"United Kingdom": "gb",
"Angola": "ao",
"Antigua And Barbuda": "ag",
"Argentina": "ar",
"Aruba": "aw",
"Australia": "au",
"Austria": "at",
"Bahamas": "bs",
"Barbados": "bb",
"Belarus": "by",
"Belgium": "be",
"Bolivia": "bo",
"Bosnia And Herzegowina": "ba",
"Brazil": "br",
"Bulgaria": "bg",
"Canada": "ca",
"Chile": "cl",
"China": "cn",
"Colombia": "co",
"Costa Rica": "cr",
"Croatia (Local Name: Hrvatska)": "hr",
"Cuba": "cu",
"Czech Republic": "cz",
"Denmark": "dk",
"Dominican Republic": "do",
"Ecuador": "ec",
"Egypt": "eg",
"Estonia": "ee",
"Finland": "fi",
"France": "fr",
"France, Metropolitan": "fx",
"French Southern Territories": "tf",
"Georgia": "ge",
"Germany": "de",
"Ghana": "gh",
"Greece": "gr",
"Hong Kong": "hk",
"Hungary": "hu",
"Iceland": "is",
"India": "in",
"Indonesia": "id",
"Iran (Islamic Republic Of)": "ir",
"Ireland": "ie",
"Israel": "il",
"Italy": "it",
"Jamaica": "jm",
"Japan": "jp",
"Kenya": "ke",
"Korea, Republic Of": "kr",
"Latvia": "lv",
"Lebanon": "lb",
"Macau": "mo",
"Macedonia, Former Yugoslav Republic Of": "mk",
"Malaysia": "my",
"Malta": "mt",
"Martinique": "mq",
"Mauritius": "mu",
"Mexico": "mx",
"Monaco": "mc",
"Morocco": "ma",
"Netherlands": "nl",
"Netherlands Antilles": "an",
"New Zealand": "nz",
"Nigeria": "ng",
"Norway": "no",
"Panama": "pa",
"Peru": "pe",
"Philippines": "ph",
"Poland": "pl",
"Portugal": "pt",
"Puerto Rico": "pr",
"Qatar": "qa",
"Romania": "ro",
"Russian Federation": "ru",
"Saint Lucia": "lc",
"Senegal": "sn",
"Serbia": "rs",
"Slovakia (Slovak Republic)": "sk",
"Slovenia": "si",
"South Africa": "za",
"Spain": "es",
"Sri Lanka": "lk",
"Sweden": "se",
"Switzerland": "ch",
"Taiwan": "tw",
"Thailand": "th",
"Trinidad And Tobago": "tt",
"Tunisia": "tn",
"Turkey": "tr",
"Ukraine": "ua",
"United Arab Emirates": "ae",
"Uruguay": "uy",
"Venezuela": "ve",
"Yugoslavia": "yu",
"Zimbabwe": "zw",
}
| id_prefix = 'imvdb'
site_url = 'https://imvdb.com'
api_url = 'https://imvdb.com/api/v1'
countries = {'United States': 'us', 'United Kingdom': 'gb', 'Angola': 'ao', 'Antigua And Barbuda': 'ag', 'Argentina': 'ar', 'Aruba': 'aw', 'Australia': 'au', 'Austria': 'at', 'Bahamas': 'bs', 'Barbados': 'bb', 'Belarus': 'by', 'Belgium': 'be', 'Bolivia': 'bo', 'Bosnia And Herzegowina': 'ba', 'Brazil': 'br', 'Bulgaria': 'bg', 'Canada': 'ca', 'Chile': 'cl', 'China': 'cn', 'Colombia': 'co', 'Costa Rica': 'cr', 'Croatia (Local Name: Hrvatska)': 'hr', 'Cuba': 'cu', 'Czech Republic': 'cz', 'Denmark': 'dk', 'Dominican Republic': 'do', 'Ecuador': 'ec', 'Egypt': 'eg', 'Estonia': 'ee', 'Finland': 'fi', 'France': 'fr', 'France, Metropolitan': 'fx', 'French Southern Territories': 'tf', 'Georgia': 'ge', 'Germany': 'de', 'Ghana': 'gh', 'Greece': 'gr', 'Hong Kong': 'hk', 'Hungary': 'hu', 'Iceland': 'is', 'India': 'in', 'Indonesia': 'id', 'Iran (Islamic Republic Of)': 'ir', 'Ireland': 'ie', 'Israel': 'il', 'Italy': 'it', 'Jamaica': 'jm', 'Japan': 'jp', 'Kenya': 'ke', 'Korea, Republic Of': 'kr', 'Latvia': 'lv', 'Lebanon': 'lb', 'Macau': 'mo', 'Macedonia, Former Yugoslav Republic Of': 'mk', 'Malaysia': 'my', 'Malta': 'mt', 'Martinique': 'mq', 'Mauritius': 'mu', 'Mexico': 'mx', 'Monaco': 'mc', 'Morocco': 'ma', 'Netherlands': 'nl', 'Netherlands Antilles': 'an', 'New Zealand': 'nz', 'Nigeria': 'ng', 'Norway': 'no', 'Panama': 'pa', 'Peru': 'pe', 'Philippines': 'ph', 'Poland': 'pl', 'Portugal': 'pt', 'Puerto Rico': 'pr', 'Qatar': 'qa', 'Romania': 'ro', 'Russian Federation': 'ru', 'Saint Lucia': 'lc', 'Senegal': 'sn', 'Serbia': 'rs', 'Slovakia (Slovak Republic)': 'sk', 'Slovenia': 'si', 'South Africa': 'za', 'Spain': 'es', 'Sri Lanka': 'lk', 'Sweden': 'se', 'Switzerland': 'ch', 'Taiwan': 'tw', 'Thailand': 'th', 'Trinidad And Tobago': 'tt', 'Tunisia': 'tn', 'Turkey': 'tr', 'Ukraine': 'ua', 'United Arab Emirates': 'ae', 'Uruguay': 'uy', 'Venezuela': 've', 'Yugoslavia': 'yu', 'Zimbabwe': 'zw'} |
class Solution:
def longestPalindrome(self, s: str) -> str:
'''
O(n2) solution
'''
def getLength(s, l, r):
while l >= 0 and r < len(s) and s[l] == s[r]:
l -= 1
r += 1
return r - l - 1
max_len = 0
start = 0
for i in range(len(s)):
curr_len = max(getLength(s, i, i), getLength(s, i, i + 1))
if curr_len > max_len:
max_len = curr_len
start = i - (curr_len - 1) // 2
return s[start:start + max_len]
| class Solution:
def longest_palindrome(self, s: str) -> str:
"""
O(n2) solution
"""
def get_length(s, l, r):
while l >= 0 and r < len(s) and (s[l] == s[r]):
l -= 1
r += 1
return r - l - 1
max_len = 0
start = 0
for i in range(len(s)):
curr_len = max(get_length(s, i, i), get_length(s, i, i + 1))
if curr_len > max_len:
max_len = curr_len
start = i - (curr_len - 1) // 2
return s[start:start + max_len] |
'''
Created on Sep 8, 2010
@author: Wilder Rodrigues (wilder.rodrigues@ekholabs.nl)
'''
'''
PBean (what I call Python Bean) Coordinates.
'''
class Coordinates():
def __init__(self, lat, long):
'''
Class constructor.
'''
self.lat = lat
self.long = long
def __str__(self):
'''
Overrides the __str__ function in order to return a formatted string.
'''
return '[latitude: {0}, longitude: {1}]'.format(self.lat, self.long)
| """
Created on Sep 8, 2010
@author: Wilder Rodrigues (wilder.rodrigues@ekholabs.nl)
"""
'\nPBean (what I call Python Bean) Coordinates.\n'
class Coordinates:
def __init__(self, lat, long):
"""
Class constructor.
"""
self.lat = lat
self.long = long
def __str__(self):
"""
Overrides the __str__ function in order to return a formatted string.
"""
return '[latitude: {0}, longitude: {1}]'.format(self.lat, self.long) |
a=int(input("Enter value of a"))
b=int(input("Enter value of b"))
print("Value of a " + str(a))
print("Value of b " + str(b))
temp=a
a=b
b=temp
print("Value of a " + str(a))
print("Value of b " + str(b))
| a = int(input('Enter value of a'))
b = int(input('Enter value of b'))
print('Value of a ' + str(a))
print('Value of b ' + str(b))
temp = a
a = b
b = temp
print('Value of a ' + str(a))
print('Value of b ' + str(b)) |
# Uses python3
def calc_fib_last_digit(n):
fib_nums_last_dig = []
fib_nums_last_dig.append(0)
fib_nums_last_dig.append(1)
for i in range(2, n + 1):
fib_nums_last_dig.append((fib_nums_last_dig[i - 1] + fib_nums_last_dig[i - 2]) % 10)
return fib_nums_last_dig[n]
n = int(input())
print(calc_fib_last_digit(n))
| def calc_fib_last_digit(n):
fib_nums_last_dig = []
fib_nums_last_dig.append(0)
fib_nums_last_dig.append(1)
for i in range(2, n + 1):
fib_nums_last_dig.append((fib_nums_last_dig[i - 1] + fib_nums_last_dig[i - 2]) % 10)
return fib_nums_last_dig[n]
n = int(input())
print(calc_fib_last_digit(n)) |
_base_ = "./resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO_01_02MasterChefCan.py"
OUTPUT_DIR = (
"output/gdrn/ycbvPbrSO/resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO/04_05TomatoSoupCan"
)
DATASETS = dict(TRAIN=("ycbv_005_tomato_soup_can_train_pbr",))
| _base_ = './resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO_01_02MasterChefCan.py'
output_dir = 'output/gdrn/ycbvPbrSO/resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO/04_05TomatoSoupCan'
datasets = dict(TRAIN=('ycbv_005_tomato_soup_can_train_pbr',)) |
def capitalizeWord(word):
c= word[0].upper()+word[1:]
return c
def capitalizeWord1(word):
return word[0].upper() + word[1:] | def capitalize_word(word):
c = word[0].upper() + word[1:]
return c
def capitalize_word1(word):
return word[0].upper() + word[1:] |
length=int(input())
list1=list(map(int,input().rstrip().split()))
list1=sorted(list1)
list1=list1[::-1]
count=0
for i in range(length):
a=count+(list1[i]*(2**i))
count=a
print(a)
| length = int(input())
list1 = list(map(int, input().rstrip().split()))
list1 = sorted(list1)
list1 = list1[::-1]
count = 0
for i in range(length):
a = count + list1[i] * 2 ** i
count = a
print(a) |
# https://docs.swift.org/swift-book/ReferenceManual/LexicalStructure.html
KEYWORDS = (
# Keywords used in declarations:
'associatedtype', 'class', 'deinit', 'enum', 'extension', 'fileprivate',
'func', 'import', 'init', 'inout', 'internal', 'let', 'open', 'operator',
'private', 'precedencegroup', 'protocol', 'public', 'rethrows', 'static',
'struct', 'subscript', 'typealias', 'var',
# Keywords used in statements:
'break', 'case', 'catch', 'continue', 'default', 'defer', 'do', 'else',
'fallthrough', 'for', 'guard', 'if', 'in', 'repeat', 'return', 'throw',
'switch',
'where', 'while',
# Keywords used in expressions and types:
'Any', 'as', 'catch', 'false', 'is', 'nil', 'rethrows', 'self', 'Self',
'super', 'throw', 'throws', 'true', 'try'
# Keywords used in patterns: _
# We don't care.
# Keywords that begin with a number sign (#):
'#available', '#colorLiteral', '#column', '#dsohandle', '#elseif', '#else',
'#endif', '#error', '#fileID', '#fileLiteral', '#filePath', '#file',
'#function', '#if', '#imageLiteral', '#keyPath', '#line', '#selector',
'#sourceLocation', '#warning',
# Keywords reserved in particular contexts:
'associativity', 'convenience', 'didSet', 'dynamic', 'final', 'get',
'indirect', 'infix', 'lazy', 'left', 'mutating', 'none', 'nonmutating',
'optional', 'override', 'postfix', 'precedence', 'prefix', 'Protocol',
'required', 'right', 'set', 'some', 'Type', 'unowned', 'weak', 'willSet'
)
def is_swift_keyword(s: str) -> bool:
return s in KEYWORDS
def escape_swift_keyword(s: str) -> str:
if is_swift_keyword(s):
return '`' + s + '`'
return s
| keywords = ('associatedtype', 'class', 'deinit', 'enum', 'extension', 'fileprivate', 'func', 'import', 'init', 'inout', 'internal', 'let', 'open', 'operator', 'private', 'precedencegroup', 'protocol', 'public', 'rethrows', 'static', 'struct', 'subscript', 'typealias', 'var', 'break', 'case', 'catch', 'continue', 'default', 'defer', 'do', 'else', 'fallthrough', 'for', 'guard', 'if', 'in', 'repeat', 'return', 'throw', 'switch', 'where', 'while', 'Any', 'as', 'catch', 'false', 'is', 'nil', 'rethrows', 'self', 'Self', 'super', 'throw', 'throws', 'true', 'try#available', '#colorLiteral', '#column', '#dsohandle', '#elseif', '#else', '#endif', '#error', '#fileID', '#fileLiteral', '#filePath', '#file', '#function', '#if', '#imageLiteral', '#keyPath', '#line', '#selector', '#sourceLocation', '#warning', 'associativity', 'convenience', 'didSet', 'dynamic', 'final', 'get', 'indirect', 'infix', 'lazy', 'left', 'mutating', 'none', 'nonmutating', 'optional', 'override', 'postfix', 'precedence', 'prefix', 'Protocol', 'required', 'right', 'set', 'some', 'Type', 'unowned', 'weak', 'willSet')
def is_swift_keyword(s: str) -> bool:
return s in KEYWORDS
def escape_swift_keyword(s: str) -> str:
if is_swift_keyword(s):
return '`' + s + '`'
return s |
header, *data = DATA
result = []
for row in data:
pair = zip(header, row)
result.append(dict(pair))
| (header, *data) = DATA
result = []
for row in data:
pair = zip(header, row)
result.append(dict(pair)) |
#!/usr/bin/python3
# -*- coding: cp949 -*-
def solution(n: int, words: [str]) -> [int]:
ans = [0, 0]
prev = words[0]
history = [words[0]]
pid = 0
turn = 0
for word in words[1:]:
pid = (pid + 1) % n
turn += 1
if prev[-1] != word[0] or word in history:
ans = [pid + 1, int((turn / n) + 1)]
break
prev = word
history.append(word)
return ans
| def solution(n: int, words: [str]) -> [int]:
ans = [0, 0]
prev = words[0]
history = [words[0]]
pid = 0
turn = 0
for word in words[1:]:
pid = (pid + 1) % n
turn += 1
if prev[-1] != word[0] or word in history:
ans = [pid + 1, int(turn / n + 1)]
break
prev = word
history.append(word)
return ans |
# color.py
# string is the original string
# type determines the color/label added
# style can be color or text
class color(object):
GREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
def format(self, string, type, style='color'):
formatted_string = ''
string = str(string)
if style == 'color':
if type in ('success', 'pass'):
formatted_string += self.GREEN + string + self.ENDC
elif type == 'warning':
formatted_string += self.WARNING + string + self.ENDC
elif type in ('error', 'fail'):
formatted_string += self.FAIL + string + self.ENDC
elif style == 'text':
if type == 'success':
formatted_string += string
elif type == 'warning':
formatted_string += 'WARNING: ' + string
elif type == 'error':
formatted_string += 'ERROR: ' + string
return formatted_string
| class Color(object):
green = '\x1b[92m'
warning = '\x1b[93m'
fail = '\x1b[91m'
endc = '\x1b[0m'
bold = '\x1b[1m'
def format(self, string, type, style='color'):
formatted_string = ''
string = str(string)
if style == 'color':
if type in ('success', 'pass'):
formatted_string += self.GREEN + string + self.ENDC
elif type == 'warning':
formatted_string += self.WARNING + string + self.ENDC
elif type in ('error', 'fail'):
formatted_string += self.FAIL + string + self.ENDC
elif style == 'text':
if type == 'success':
formatted_string += string
elif type == 'warning':
formatted_string += 'WARNING: ' + string
elif type == 'error':
formatted_string += 'ERROR: ' + string
return formatted_string |
class Query(object):
def __init__(self, session_id, time_passed, query_id, region_id, documents):
self.query_id = query_id
self.session_id = session_id
self.time_passed = time_passed
self.region_id = region_id
self.documents = documents
def add_documents(self, documents):
self.documents.append(documents)
class Click(object):
def __init__(self, session_id, time_passed, document_id):
self.session_id = session_id
self.document_id = document_id
self.time_passed = time_passed
data = []
with open('YandexRelPredChallenge.txt') as f:
for row in f:
row_data = row.split('\t')
row_data = [col.strip() for col in row_data]
if row_data[2] == 'C':
click = Click(session_id=row_data[0], time_passed=row_data[1],
document_id=row_data[3])
data.append((row_data[0], click))
else:
docs = [row_data[i] for i in range(5, len(row_data))]
query = Query(session_id=row_data[0], time_passed=row_data[1],
query_id=row_data[3], region_id=row_data[4], documents=docs)
data.append((row_data[0], query))
# Test to see if in all session where a query id is repeated,
# if the list of document is different, it has to be completely different
# otherwise it has to be completely identical, in which case we simply have a duplicate
# and the user just hit submit again.
# Counter for identical queries
same_documents = 0
same_doc_sessions = {}
# New documents, i.e. pagination
paginated_documents = 0
paginated_sessions = {}
# This should be 0 always, same query in same session
# only some documents different.
problematic_queries = 0
prob_sessions = {}
index = 0
while index < len(data):
element = data[index]
curr_session = element[0]
curr_index = index
queries = []
query_positions = {}
while curr_session == element[0]:
if isinstance(data[curr_index][1], Query):
query = data[curr_index][1]
if query.query_id in query_positions:
# Found a duplicate, it is either the exact same
# query (i.e. same documents), or the next page of
# that query. Test to see which one
current_position = curr_index
last_query, last_position = query_positions[query.query_id]
# Check if all documents are the same
all_same = True
for j in range(10):
if last_query.documents[j] != query.documents[j]:
all_same = False
break
if all_same:
same_documents += 1
same_doc_sessions[curr_session] = True
all_different = True
for j in range(10):
if last_query.documents[j] == query.documents[j]:
all_different = False
break
if all_different:
paginated_documents += 1
paginated_sessions[curr_session] = True
if not all_same and not all_different:
problematic_queries += 1
prob_sessions[curr_session] = True
else:
queries.append(query)
query_positions[query.query_id] = (query, curr_index)
curr_index += 1
if curr_index < len(data):
curr_session = data[curr_index][0]
else:
curr_session = None
index = curr_index | class Query(object):
def __init__(self, session_id, time_passed, query_id, region_id, documents):
self.query_id = query_id
self.session_id = session_id
self.time_passed = time_passed
self.region_id = region_id
self.documents = documents
def add_documents(self, documents):
self.documents.append(documents)
class Click(object):
def __init__(self, session_id, time_passed, document_id):
self.session_id = session_id
self.document_id = document_id
self.time_passed = time_passed
data = []
with open('YandexRelPredChallenge.txt') as f:
for row in f:
row_data = row.split('\t')
row_data = [col.strip() for col in row_data]
if row_data[2] == 'C':
click = click(session_id=row_data[0], time_passed=row_data[1], document_id=row_data[3])
data.append((row_data[0], click))
else:
docs = [row_data[i] for i in range(5, len(row_data))]
query = query(session_id=row_data[0], time_passed=row_data[1], query_id=row_data[3], region_id=row_data[4], documents=docs)
data.append((row_data[0], query))
same_documents = 0
same_doc_sessions = {}
paginated_documents = 0
paginated_sessions = {}
problematic_queries = 0
prob_sessions = {}
index = 0
while index < len(data):
element = data[index]
curr_session = element[0]
curr_index = index
queries = []
query_positions = {}
while curr_session == element[0]:
if isinstance(data[curr_index][1], Query):
query = data[curr_index][1]
if query.query_id in query_positions:
current_position = curr_index
(last_query, last_position) = query_positions[query.query_id]
all_same = True
for j in range(10):
if last_query.documents[j] != query.documents[j]:
all_same = False
break
if all_same:
same_documents += 1
same_doc_sessions[curr_session] = True
all_different = True
for j in range(10):
if last_query.documents[j] == query.documents[j]:
all_different = False
break
if all_different:
paginated_documents += 1
paginated_sessions[curr_session] = True
if not all_same and (not all_different):
problematic_queries += 1
prob_sessions[curr_session] = True
else:
queries.append(query)
query_positions[query.query_id] = (query, curr_index)
curr_index += 1
if curr_index < len(data):
curr_session = data[curr_index][0]
else:
curr_session = None
index = curr_index |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def splitListToParts(self, head: ListNode, k: int) -> List[ListNode]:
n = 0
newhead = head
while newhead:
newhead = newhead.next
n += 1
lenList = [n // k] * k
for i in range(n % k):
lenList[i] += 1
ans = []
for ll in lenList:
ans.append(head)
while ll:
pre = head
head = head.next
ll -= 1
try:
pre.next = None
except:
pass
return ans
| class Solution:
def split_list_to_parts(self, head: ListNode, k: int) -> List[ListNode]:
n = 0
newhead = head
while newhead:
newhead = newhead.next
n += 1
len_list = [n // k] * k
for i in range(n % k):
lenList[i] += 1
ans = []
for ll in lenList:
ans.append(head)
while ll:
pre = head
head = head.next
ll -= 1
try:
pre.next = None
except:
pass
return ans |
# Sets - A set is an unordered collection of unique and immutable objects.
# Sets are mutable because you add object to it.
# Sample Sets
set_nums = {1, 5, 2, 4, 4, 5}
set_names = {'John', 'Kim', 'Kelly', 'Dora', 'Kim'}
set_cities = set(('Boston', 'Chicago', 'Houston', 'Denver', 'Boston', 'Houston', 'Denver', 'Miami'))
# printing
print(set_nums)
print(set_names)
print(set_cities)
| set_nums = {1, 5, 2, 4, 4, 5}
set_names = {'John', 'Kim', 'Kelly', 'Dora', 'Kim'}
set_cities = set(('Boston', 'Chicago', 'Houston', 'Denver', 'Boston', 'Houston', 'Denver', 'Miami'))
print(set_nums)
print(set_names)
print(set_cities) |
class WaitBot:
def __init__(self):
self.iteration = 0
self.minute = 0
self.do_something_after = 0
| class Waitbot:
def __init__(self):
self.iteration = 0
self.minute = 0
self.do_something_after = 0 |
vendors = ['johnson', 'siemens', 'tridium']
scripts = [{
}]
def get_vendor(vendor_key):
for name in vendors:
if name in vendor_key.lower():
return name
return ''
| vendors = ['johnson', 'siemens', 'tridium']
scripts = [{}]
def get_vendor(vendor_key):
for name in vendors:
if name in vendor_key.lower():
return name
return '' |
#
# PySNMP MIB module IEEE8021-AS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IEEE8021-AS-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:40:30 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion")
IEEE8021BridgePortNumber, = mibBuilder.importSymbols("IEEE8021-TC-MIB", "IEEE8021BridgePortNumber")
ifGeneralInformationGroup, InterfaceIndexOrZero = mibBuilder.importSymbols("IF-MIB", "ifGeneralInformationGroup", "InterfaceIndexOrZero")
ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup")
MibIdentifier, Gauge32, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, Counter32, Bits, Integer32, ModuleIdentity, iso, TimeTicks, Counter64, IpAddress, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "Gauge32", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "Counter32", "Bits", "Integer32", "ModuleIdentity", "iso", "TimeTicks", "Counter64", "IpAddress", "Unsigned32")
TextualConvention, DisplayString, RowStatus, TimeStamp, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "RowStatus", "TimeStamp", "TruthValue")
ieee8021AsTimeSyncMib = ModuleIdentity((1, 3, 111, 2, 802, 1, 1, 20))
ieee8021AsTimeSyncMib.setRevisions(('2012-12-12 00:00', '2010-11-11 00:00',))
if mibBuilder.loadTexts: ieee8021AsTimeSyncMib.setLastUpdated('201212120000Z')
if mibBuilder.loadTexts: ieee8021AsTimeSyncMib.setOrganization('IEEE 802.1 Working Group')
ieee8021AsMIBObjects = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 20, 1))
ieee8021AsConformance = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 20, 2))
class ClockIdentity(TextualConvention, OctetString):
reference = '6.3.3.6 and 8.5.2.2.1'
status = 'current'
displayHint = '1x:'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
class IEEE8021ASClockClassValue(TextualConvention, Integer32):
reference = '14.2.3 and IEEE Std 1588-2008 7.6.2.4'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(6, 7, 13, 14, 52, 58, 187, 193, 248, 255))
namedValues = NamedValues(("primarySync", 6), ("primarySyncLost", 7), ("applicationSpecificSync", 13), ("applicationSpecficSyncLost", 14), ("primarySyncAlternativeA", 52), ("applicationSpecificAlternativeA", 58), ("primarySyncAlternativeB", 187), ("applicationSpecficAlternativeB", 193), ("defaultClock", 248), ("slaveOnlyClock", 255))
class IEEE8021ASClockAccuracyValue(TextualConvention, Integer32):
reference = '8.6.2.3'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 254))
namedValues = NamedValues(("timeAccurateTo25ns", 32), ("timeAccurateTo100ns", 33), ("timeAccurateTo250ns", 34), ("timeAccurateTo1us", 35), ("timeAccurateTo2dot5us", 36), ("timeAccurateTo10us", 37), ("timeAccurateTo25us", 38), ("timeAccurateTo100us", 39), ("timeAccurateTo250us", 40), ("timeAccurateTo1ms", 41), ("timeAccurateTo2dot5ms", 42), ("timeAccurateTo10ms", 43), ("timeAccurateTo25ms", 44), ("timeAccurateTo100ms", 45), ("timeAccurateTo250ms", 46), ("timeAccurateTo1s", 47), ("timeAccurateTo10s", 48), ("timeAccurateToGT10s", 49), ("timeAccurateToUnknown", 254))
class IEEE8021ASTimeSourceValue(TextualConvention, Integer32):
reference = '8.6.2.7 and Table 8-3'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(16, 32, 48, 64, 80, 96, 144, 160))
namedValues = NamedValues(("atomicClock", 16), ("gps", 32), ("terrestrialRadio", 48), ("ptp", 64), ("ntp", 80), ("handSet", 96), ("other", 144), ("internalOscillator", 160))
ieee8021AsDefaultDS = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 1))
ieee8021AsDefaultDSClockIdentity = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 1), ClockIdentity()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSClockIdentity.setStatus('current')
ieee8021AsDefaultDSNumberPorts = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSNumberPorts.setStatus('current')
ieee8021AsDefaultDSClockClass = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 3), IEEE8021ASClockClassValue().clone('defaultClock')).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSClockClass.setStatus('current')
ieee8021AsDefaultDSClockAccuracy = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 4), IEEE8021ASClockAccuracyValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSClockAccuracy.setStatus('current')
ieee8021AsDefaultDSOffsetScaledLogVariance = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSOffsetScaledLogVariance.setStatus('current')
ieee8021AsDefaultDSPriority1 = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsDefaultDSPriority1.setStatus('current')
ieee8021AsDefaultDSPriority2 = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255)).clone(248)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsDefaultDSPriority2.setStatus('current')
ieee8021AsDefaultDSGmCapable = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 8), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSGmCapable.setStatus('current')
ieee8021AsDefaultDSCurrentUTCOffset = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-32768, 32767))).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSCurrentUTCOffset.setStatus('current')
ieee8021AsDefaultDSCurrentUTCOffsetValid = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 10), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSCurrentUTCOffsetValid.setStatus('current')
ieee8021AsDefaultDSLeap59 = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 11), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSLeap59.setStatus('current')
ieee8021AsDefaultDSLeap61 = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 12), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSLeap61.setStatus('current')
ieee8021AsDefaultDSTimeTraceable = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 13), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSTimeTraceable.setStatus('current')
ieee8021AsDefaultDSFrequencyTraceable = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 14), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSFrequencyTraceable.setStatus('current')
ieee8021AsDefaultDSTimeSource = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 15), IEEE8021ASTimeSourceValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsDefaultDSTimeSource.setStatus('current')
ieee8021AsCurrentDS = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 2))
ieee8021AsCurrentDSStepsRemoved = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-32768, 32767))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSStepsRemoved.setStatus('current')
ieee8021AsCurrentDSOffsetFromMasterHs = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 2), Integer32()).setUnits('2**-16 ns * 2**64').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSOffsetFromMasterHs.setStatus('current')
ieee8021AsCurrentDSOffsetFromMasterMs = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 3), Integer32()).setUnits('2**-16 ns * 2**32').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSOffsetFromMasterMs.setStatus('current')
ieee8021AsCurrentDSOffsetFromMasterLs = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 4), Integer32()).setUnits('2**-16 ns').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSOffsetFromMasterLs.setStatus('current')
ieee8021AsCurrentDSLastGmPhaseChangeHs = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSLastGmPhaseChangeHs.setStatus('current')
ieee8021AsCurrentDSLastGmPhaseChangeMs = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSLastGmPhaseChangeMs.setStatus('current')
ieee8021AsCurrentDSLastGmPhaseChangeLs = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSLastGmPhaseChangeLs.setStatus('current')
ieee8021AsCurrentDSLastGmFreqChangeMs = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSLastGmFreqChangeMs.setStatus('current')
ieee8021AsCurrentDSLastGmFreqChangeLs = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 9), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSLastGmFreqChangeLs.setStatus('current')
ieee8021AsCurrentDSGmTimebaseIndicator = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 10), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSGmTimebaseIndicator.setStatus('current')
ieee8021AsCurrentDSGmChangeCount = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSGmChangeCount.setStatus('current')
ieee8021AsCurrentDSTimeOfLastGmChangeEvent = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 12), TimeStamp()).setUnits('0.01 seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSTimeOfLastGmChangeEvent.setStatus('current')
ieee8021AsCurrentDSTimeOfLastGmFreqChangeEvent = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 13), TimeStamp()).setUnits('0.01 seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSTimeOfLastGmFreqChangeEvent.setStatus('current')
ieee8021AsCurrentDSTimeOfLastGmPhaseChangeEvent = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 14), TimeStamp()).setUnits('0.01 seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsCurrentDSTimeOfLastGmPhaseChangeEvent.setStatus('current')
ieee8021AsParentDS = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 3))
ieee8021AsParentDSParentClockIdentity = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 1), ClockIdentity()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsParentDSParentClockIdentity.setStatus('current')
ieee8021AsParentDSParentPortNumber = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsParentDSParentPortNumber.setStatus('current')
ieee8021AsParentDSCumlativeRateRatio = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsParentDSCumlativeRateRatio.setStatus('current')
ieee8021AsParentDSGrandmasterIdentity = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 4), ClockIdentity()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsParentDSGrandmasterIdentity.setStatus('current')
ieee8021AsParentDSGrandmasterClockClass = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 5), IEEE8021ASClockClassValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsParentDSGrandmasterClockClass.setStatus('current')
ieee8021AsParentDSGrandmasterClockAccuracy = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 6), IEEE8021ASClockAccuracyValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsParentDSGrandmasterClockAccuracy.setStatus('current')
ieee8021AsParentDSGrandmasterOffsetScaledLogVariance = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsParentDSGrandmasterOffsetScaledLogVariance.setStatus('current')
ieee8021AsParentDSGrandmasterPriority1 = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 8), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsParentDSGrandmasterPriority1.setStatus('current')
ieee8021AsParentDSGrandmasterPriority2 = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 9), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsParentDSGrandmasterPriority2.setStatus('current')
ieee8021AsTimePropertiesDS = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 4))
ieee8021AsTimePropertiesDSCurrentUtcOffset = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-32768, 32767))).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsTimePropertiesDSCurrentUtcOffset.setStatus('current')
ieee8021AsTimePropertiesDSCurrentUtcOffsetValid = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 2), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsTimePropertiesDSCurrentUtcOffsetValid.setStatus('current')
ieee8021AsTimePropertiesDSLeap59 = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 3), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsTimePropertiesDSLeap59.setStatus('current')
ieee8021AsTimePropertiesDSLeap61 = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 4), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsTimePropertiesDSLeap61.setStatus('current')
ieee8021AsTimePropertiesDSTimeTraceable = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 5), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsTimePropertiesDSTimeTraceable.setStatus('current')
ieee8021AsTimePropertiesDSFrequencyTraceable = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 6), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsTimePropertiesDSFrequencyTraceable.setStatus('current')
ieee8021AsTimePropertiesDSTimeSource = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 7), IEEE8021ASTimeSourceValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsTimePropertiesDSTimeSource.setStatus('current')
ieee8021AsPortDSIfTable = MibTable((1, 3, 111, 2, 802, 1, 1, 20, 1, 5), )
if mibBuilder.loadTexts: ieee8021AsPortDSIfTable.setStatus('current')
ieee8021AsPortDSIfEntry = MibTableRow((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1), ).setIndexNames((0, "IEEE8021-AS-MIB", "ieee8021AsBridgeBasePort"), (0, "IEEE8021-AS-MIB", "ieee8021AsPortDSAsIfIndex"))
if mibBuilder.loadTexts: ieee8021AsPortDSIfEntry.setStatus('current')
ieee8021AsBridgeBasePort = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 1), IEEE8021BridgePortNumber())
if mibBuilder.loadTexts: ieee8021AsBridgeBasePort.setStatus('current')
ieee8021AsPortDSAsIfIndex = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 2), InterfaceIndexOrZero())
if mibBuilder.loadTexts: ieee8021AsPortDSAsIfIndex.setStatus('current')
ieee8021AsPortDSClockIdentity = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 3), ClockIdentity()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSClockIdentity.setStatus('current')
ieee8021AsPortDSPortNumber = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSPortNumber.setStatus('current')
ieee8021AsPortDSPortRole = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(3, 6, 7, 9))).clone(namedValues=NamedValues(("disabledPort", 3), ("masterPort", 6), ("passivePort", 7), ("slavePort", 9))).clone(3)).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSPortRole.setStatus('current')
ieee8021AsPortDSPttPortEnabled = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 6), TruthValue().clone(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSPttPortEnabled.setStatus('current')
ieee8021AsPortDSIsMeasuringDelay = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 7), TruthValue().clone(2)).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSIsMeasuringDelay.setStatus('current')
ieee8021AsPortDSAsCapable = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 8), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSAsCapable.setStatus('current')
ieee8021AsPortDSNeighborPropDelayHs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 9), Unsigned32()).setUnits('2**-16 ns * 2**64').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSNeighborPropDelayHs.setStatus('current')
ieee8021AsPortDSNeighborPropDelayMs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 10), Unsigned32()).setUnits('2**-16 ns * 2**32').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSNeighborPropDelayMs.setStatus('current')
ieee8021AsPortDSNeighborPropDelayLs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 11), Unsigned32()).setUnits('2**-16 ns').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSNeighborPropDelayLs.setStatus('current')
ieee8021AsPortDSNeighborPropDelayThreshHs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 12), Unsigned32()).setUnits('2**-16 ns * 2 ** 64').setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSNeighborPropDelayThreshHs.setStatus('current')
ieee8021AsPortDSNeighborPropDelayThreshMs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 13), Unsigned32()).setUnits('2**-16 ns * 2 ** 32').setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSNeighborPropDelayThreshMs.setStatus('current')
ieee8021AsPortDSNeighborPropDelayThreshLs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 14), Unsigned32()).setUnits('2**-16 ns').setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSNeighborPropDelayThreshLs.setStatus('current')
ieee8021AsPortDSDelayAsymmetryHs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 15), Integer32()).setUnits('2**-16 ns * 2**64').setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSDelayAsymmetryHs.setStatus('current')
ieee8021AsPortDSDelayAsymmetryMs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 16), Unsigned32()).setUnits('2**-16 ns * 2**32').setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSDelayAsymmetryMs.setStatus('current')
ieee8021AsPortDSDelayAsymmetryLs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 17), Unsigned32()).setUnits('2**-16 ns').setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSDelayAsymmetryLs.setStatus('current')
ieee8021AsPortDSNeighborRateRatio = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 18), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSNeighborRateRatio.setStatus('current')
ieee8021AsPortDSInitialLogAnnounceInterval = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-128, 127))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSInitialLogAnnounceInterval.setStatus('current')
ieee8021AsPortDSCurrentLogAnnounceInterval = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-128, 127))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSCurrentLogAnnounceInterval.setStatus('current')
ieee8021AsPortDSAnnounceReceiptTimeout = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 21), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255)).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSAnnounceReceiptTimeout.setStatus('current')
ieee8021AsPortDSInitialLogSyncInterval = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-128, 127)).clone(-3)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSInitialLogSyncInterval.setStatus('current')
ieee8021AsPortDSCurrentLogSyncInterval = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-128, 127)).clone(-3)).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSCurrentLogSyncInterval.setStatus('current')
ieee8021AsPortDSSyncReceiptTimeout = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 24), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255)).clone(3)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSSyncReceiptTimeout.setStatus('current')
ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalHs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 25), Unsigned32().clone(0)).setUnits('2**-16 ns').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalHs.setStatus('current')
ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalMs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 26), Unsigned32().clone(5722)).setUnits('2**-16 ns * 2**32').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalMs.setStatus('current')
ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalLs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 27), Unsigned32().clone(197132288)).setUnits('2**-16 ns').setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalLs.setStatus('current')
ieee8021AsPortDSInitialLogPdelayReqInterval = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 28), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-128, 127))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSInitialLogPdelayReqInterval.setStatus('current')
ieee8021AsPortDSCurrentLogPdelayReqInterval = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 29), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-128, 127))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSCurrentLogPdelayReqInterval.setStatus('current')
ieee8021AsPortDSAllowedLostResponses = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 30), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)).clone(3)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSAllowedLostResponses.setStatus('current')
ieee8021AsPortDSVersionNumber = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 31), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 63)).clone(2)).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortDSVersionNumber.setStatus('current')
ieee8021AsPortDSNupMs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 32), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSNupMs.setStatus('current')
ieee8021AsPortDSNupLs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 33), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSNupLs.setStatus('current')
ieee8021AsPortDSNdownMs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 34), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSNdownMs.setStatus('current')
ieee8021AsPortDSNdownLs = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 35), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSNdownLs.setStatus('current')
ieee8021AsPortDSAcceptableMasterTableEnabled = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 36), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsPortDSAcceptableMasterTableEnabled.setStatus('current')
ieee8021AsPortStatIfTable = MibTable((1, 3, 111, 2, 802, 1, 1, 20, 1, 6), )
if mibBuilder.loadTexts: ieee8021AsPortStatIfTable.setStatus('current')
ieee8021AsPortStatIfEntry = MibTableRow((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1), ).setIndexNames((0, "IEEE8021-AS-MIB", "ieee8021AsBridgeBasePort"), (0, "IEEE8021-AS-MIB", "ieee8021AsPortDSAsIfIndex"))
if mibBuilder.loadTexts: ieee8021AsPortStatIfEntry.setStatus('current')
ieee8021AsPortStatRxSyncCount = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatRxSyncCount.setStatus('current')
ieee8021AsPortStatRxFollowUpCount = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatRxFollowUpCount.setStatus('current')
ieee8021AsPortStatRxPdelayRequest = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatRxPdelayRequest.setStatus('current')
ieee8021AsPortStatRxPdelayResponse = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatRxPdelayResponse.setStatus('current')
ieee8021AsPortStatRxPdelayResponseFollowUp = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatRxPdelayResponseFollowUp.setStatus('current')
ieee8021AsPortStatRxAnnounce = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatRxAnnounce.setStatus('current')
ieee8021AsPortStatRxPTPPacketDiscard = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatRxPTPPacketDiscard.setStatus('current')
ieee8021AsPortStatRxSyncReceiptTimeouts = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatRxSyncReceiptTimeouts.setStatus('current')
ieee8021AsPortStatAnnounceReceiptTimeouts = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatAnnounceReceiptTimeouts.setStatus('current')
ieee8021AsPortStatPdelayAllowedLostResponsesExceeded = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatPdelayAllowedLostResponsesExceeded.setStatus('current')
ieee8021AsPortStatTxSyncCount = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatTxSyncCount.setStatus('current')
ieee8021AsPortStatTxFollowUpCount = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatTxFollowUpCount.setStatus('current')
ieee8021AsPortStatTxPdelayRequest = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatTxPdelayRequest.setStatus('current')
ieee8021AsPortStatTxPdelayResponse = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatTxPdelayResponse.setStatus('current')
ieee8021AsPortStatTxPdelayResponseFollowUp = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatTxPdelayResponseFollowUp.setStatus('current')
ieee8021AsPortStatTxAnnounce = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsPortStatTxAnnounce.setStatus('current')
ieee8021AsAcceptableMasterTableDS = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 7))
ieee8021AsAcceptableMasterTableDSBase = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 1))
ieee8021AsAcceptableMasterTableDSMaster = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2))
ieee8021AsAcceptableMasterTableDSMaxTableSize = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ieee8021AsAcceptableMasterTableDSMaxTableSize.setStatus('current')
ieee8021AsAcceptableMasterTableDSActualTableSize = MibScalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ieee8021AsAcceptableMasterTableDSActualTableSize.setStatus('current')
ieee8021AsAcceptableMasterTableDSMasterTable = MibTable((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1), )
if mibBuilder.loadTexts: ieee8021AsAcceptableMasterTableDSMasterTable.setStatus('current')
ieee8021AsAcceptableMasterTableDSMasterEntry = MibTableRow((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1, 1), ).setIndexNames((0, "IEEE8021-AS-MIB", "ieee8021AsAcceptableMasterTableDSMasterId"))
if mibBuilder.loadTexts: ieee8021AsAcceptableMasterTableDSMasterEntry.setStatus('current')
ieee8021AsAcceptableMasterTableDSMasterId = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1, 1, 1), Unsigned32())
if mibBuilder.loadTexts: ieee8021AsAcceptableMasterTableDSMasterId.setStatus('current')
ieee8021AsAcceptableMasterClockIdentity = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1, 1, 2), ClockIdentity()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: ieee8021AsAcceptableMasterClockIdentity.setStatus('current')
ieee8021AsAcceptableMasterPortNumber = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: ieee8021AsAcceptableMasterPortNumber.setStatus('current')
ieee8021AsAcceptableMasterAlternatePriority1 = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255)).clone(244)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: ieee8021AsAcceptableMasterAlternatePriority1.setStatus('current')
ieee8021AsAcceptableMasterRowStatus = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1, 1, 5), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: ieee8021AsAcceptableMasterRowStatus.setStatus('current')
ieee8021AsCompliances = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 20, 2, 1))
ieee8021AsGroups = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 20, 2, 2))
ieee8021AsCompliancesCor1 = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 20, 2, 3))
ieee8021ASSystemDefaultReqdGroup = ObjectGroup((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 1)).setObjects(("IEEE8021-AS-MIB", "ieee8021AsDefaultDSClockIdentity"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSNumberPorts"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSClockClass"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSClockAccuracy"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSOffsetScaledLogVariance"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSPriority1"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSPriority2"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSGmCapable"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSCurrentUTCOffset"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSCurrentUTCOffsetValid"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSLeap59"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSLeap61"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSTimeTraceable"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSFrequencyTraceable"), ("IEEE8021-AS-MIB", "ieee8021AsDefaultDSTimeSource"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021ASSystemDefaultReqdGroup = ieee8021ASSystemDefaultReqdGroup.setStatus('current')
ieee8021ASSystemCurrentGroup = ObjectGroup((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 2)).setObjects(("IEEE8021-AS-MIB", "ieee8021AsCurrentDSStepsRemoved"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSOffsetFromMasterHs"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSOffsetFromMasterMs"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSOffsetFromMasterLs"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSLastGmPhaseChangeHs"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSLastGmPhaseChangeMs"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSLastGmPhaseChangeLs"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSLastGmFreqChangeMs"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSLastGmFreqChangeLs"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSGmTimebaseIndicator"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSGmChangeCount"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSTimeOfLastGmChangeEvent"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSTimeOfLastGmPhaseChangeEvent"), ("IEEE8021-AS-MIB", "ieee8021AsCurrentDSTimeOfLastGmFreqChangeEvent"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021ASSystemCurrentGroup = ieee8021ASSystemCurrentGroup.setStatus('current')
ieee8021AsSystemClockParentGroup = ObjectGroup((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 3)).setObjects(("IEEE8021-AS-MIB", "ieee8021AsParentDSParentClockIdentity"), ("IEEE8021-AS-MIB", "ieee8021AsParentDSParentPortNumber"), ("IEEE8021-AS-MIB", "ieee8021AsParentDSCumlativeRateRatio"), ("IEEE8021-AS-MIB", "ieee8021AsParentDSGrandmasterIdentity"), ("IEEE8021-AS-MIB", "ieee8021AsParentDSGrandmasterClockClass"), ("IEEE8021-AS-MIB", "ieee8021AsParentDSGrandmasterClockAccuracy"), ("IEEE8021-AS-MIB", "ieee8021AsParentDSGrandmasterOffsetScaledLogVariance"), ("IEEE8021-AS-MIB", "ieee8021AsParentDSGrandmasterPriority1"), ("IEEE8021-AS-MIB", "ieee8021AsParentDSGrandmasterPriority2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021AsSystemClockParentGroup = ieee8021AsSystemClockParentGroup.setStatus('current')
ieee8021AsSystemTimePropertiesGroup = ObjectGroup((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 4)).setObjects(("IEEE8021-AS-MIB", "ieee8021AsTimePropertiesDSCurrentUtcOffset"), ("IEEE8021-AS-MIB", "ieee8021AsTimePropertiesDSCurrentUtcOffsetValid"), ("IEEE8021-AS-MIB", "ieee8021AsTimePropertiesDSLeap59"), ("IEEE8021-AS-MIB", "ieee8021AsTimePropertiesDSLeap61"), ("IEEE8021-AS-MIB", "ieee8021AsTimePropertiesDSTimeTraceable"), ("IEEE8021-AS-MIB", "ieee8021AsTimePropertiesDSFrequencyTraceable"), ("IEEE8021-AS-MIB", "ieee8021AsTimePropertiesDSTimeSource"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021AsSystemTimePropertiesGroup = ieee8021AsSystemTimePropertiesGroup.setStatus('current')
ieee8021AsPortDataSetGlobalGroup = ObjectGroup((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 5)).setObjects(("IEEE8021-AS-MIB", "ieee8021AsPortDSClockIdentity"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSPortNumber"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSPortRole"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSPttPortEnabled"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSIsMeasuringDelay"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSAsCapable"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSNeighborPropDelayHs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSNeighborPropDelayMs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSNeighborPropDelayLs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSNeighborPropDelayThreshHs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSNeighborPropDelayThreshMs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSNeighborPropDelayThreshLs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSDelayAsymmetryHs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSDelayAsymmetryMs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSDelayAsymmetryLs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSNeighborRateRatio"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSInitialLogAnnounceInterval"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSCurrentLogAnnounceInterval"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSAnnounceReceiptTimeout"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSInitialLogSyncInterval"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSCurrentLogSyncInterval"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSSyncReceiptTimeout"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalHs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalMs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalLs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSInitialLogPdelayReqInterval"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSCurrentLogPdelayReqInterval"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSAllowedLostResponses"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSVersionNumber"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSNupMs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSNupLs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSNdownMs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSNdownLs"), ("IEEE8021-AS-MIB", "ieee8021AsPortDSAcceptableMasterTableEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021AsPortDataSetGlobalGroup = ieee8021AsPortDataSetGlobalGroup.setStatus('current')
ieee8021ASPortStatisticsGlobalGroup = ObjectGroup((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 6)).setObjects(("IEEE8021-AS-MIB", "ieee8021AsPortStatRxSyncCount"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatRxFollowUpCount"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatRxPdelayRequest"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatRxPdelayResponse"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatRxPdelayResponseFollowUp"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatRxAnnounce"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatRxPTPPacketDiscard"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatRxSyncReceiptTimeouts"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatAnnounceReceiptTimeouts"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatPdelayAllowedLostResponsesExceeded"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatTxSyncCount"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatTxFollowUpCount"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatTxPdelayRequest"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatTxPdelayResponse"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatTxPdelayResponseFollowUp"), ("IEEE8021-AS-MIB", "ieee8021AsPortStatTxAnnounce"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021ASPortStatisticsGlobalGroup = ieee8021ASPortStatisticsGlobalGroup.setStatus('current')
ieee8021AsAcceptableMasterBaseGroup = ObjectGroup((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 7)).setObjects(("IEEE8021-AS-MIB", "ieee8021AsAcceptableMasterTableDSMaxTableSize"), ("IEEE8021-AS-MIB", "ieee8021AsAcceptableMasterTableDSActualTableSize"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021AsAcceptableMasterBaseGroup = ieee8021AsAcceptableMasterBaseGroup.setStatus('current')
ieee8021AsAcceptableMasterTableGroup = ObjectGroup((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 8)).setObjects(("IEEE8021-AS-MIB", "ieee8021AsAcceptableMasterClockIdentity"), ("IEEE8021-AS-MIB", "ieee8021AsAcceptableMasterPortNumber"), ("IEEE8021-AS-MIB", "ieee8021AsAcceptableMasterAlternatePriority1"), ("IEEE8021-AS-MIB", "ieee8021AsAcceptableMasterRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021AsAcceptableMasterTableGroup = ieee8021AsAcceptableMasterTableGroup.setStatus('current')
ieee8021AsCompliance = ModuleCompliance((1, 3, 111, 2, 802, 1, 1, 20, 2, 1, 1)).setObjects(("SNMPv2-MIB", "systemGroup"), ("IF-MIB", "ifGeneralInformationGroup"), ("IEEE8021-AS-MIB", "ieee8021ASSystemDefaultReqdGroup"), ("IEEE8021-AS-MIB", "ieee8021ASSystemCurrentGroup"), ("IEEE8021-AS-MIB", "ieee8021AsSystemClockParentGroup"), ("IEEE8021-AS-MIB", "ieee8021AsSystemTimePropertiesGroup"), ("IEEE8021-AS-MIB", "ieee8021AsPortDataSetGlobalGroup"), ("IEEE8021-AS-MIB", "ieee8021AsAcceptableMasterBaseGroup"), ("IEEE8021-AS-MIB", "ieee8021AsAcceptableMasterTableGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021AsCompliance = ieee8021AsCompliance.setStatus('deprecated')
ieee8021AsComplianceCor1 = ModuleCompliance((1, 3, 111, 2, 802, 1, 1, 20, 2, 1, 2)).setObjects(("SNMPv2-MIB", "systemGroup"), ("IF-MIB", "ifGeneralInformationGroup"), ("IEEE8021-AS-MIB", "ieee8021ASSystemDefaultReqdGroup"), ("IEEE8021-AS-MIB", "ieee8021ASSystemCurrentGroup"), ("IEEE8021-AS-MIB", "ieee8021AsSystemClockParentGroup"), ("IEEE8021-AS-MIB", "ieee8021AsSystemTimePropertiesGroup"), ("IEEE8021-AS-MIB", "ieee8021AsPortDataSetGlobalGroup"), ("IEEE8021-AS-MIB", "ieee8021AsAcceptableMasterBaseGroup"), ("IEEE8021-AS-MIB", "ieee8021AsAcceptableMasterTableGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021AsComplianceCor1 = ieee8021AsComplianceCor1.setStatus('current')
mibBuilder.exportSymbols("IEEE8021-AS-MIB", ieee8021AsSystemClockParentGroup=ieee8021AsSystemClockParentGroup, ieee8021AsTimePropertiesDS=ieee8021AsTimePropertiesDS, ieee8021AsPortStatIfEntry=ieee8021AsPortStatIfEntry, ieee8021AsParentDSParentPortNumber=ieee8021AsParentDSParentPortNumber, ieee8021AsPortDSCurrentLogSyncInterval=ieee8021AsPortDSCurrentLogSyncInterval, ieee8021AsPortStatRxPdelayRequest=ieee8021AsPortStatRxPdelayRequest, ieee8021AsDefaultDSCurrentUTCOffsetValid=ieee8021AsDefaultDSCurrentUTCOffsetValid, ieee8021AsPortDSIfEntry=ieee8021AsPortDSIfEntry, ieee8021AsPortStatRxAnnounce=ieee8021AsPortStatRxAnnounce, ieee8021AsGroups=ieee8021AsGroups, ieee8021AsAcceptableMasterTableGroup=ieee8021AsAcceptableMasterTableGroup, ieee8021AsPortDSCurrentLogAnnounceInterval=ieee8021AsPortDSCurrentLogAnnounceInterval, ieee8021AsMIBObjects=ieee8021AsMIBObjects, IEEE8021ASClockClassValue=IEEE8021ASClockClassValue, ieee8021AsDefaultDSLeap61=ieee8021AsDefaultDSLeap61, ieee8021AsPortDSNeighborPropDelayThreshLs=ieee8021AsPortDSNeighborPropDelayThreshLs, ieee8021AsTimePropertiesDSCurrentUtcOffset=ieee8021AsTimePropertiesDSCurrentUtcOffset, ieee8021AsPortStatRxPTPPacketDiscard=ieee8021AsPortStatRxPTPPacketDiscard, ieee8021AsPortDSNupMs=ieee8021AsPortDSNupMs, ieee8021AsPortDSAcceptableMasterTableEnabled=ieee8021AsPortDSAcceptableMasterTableEnabled, ieee8021AsSystemTimePropertiesGroup=ieee8021AsSystemTimePropertiesGroup, ieee8021AsPortStatRxPdelayResponseFollowUp=ieee8021AsPortStatRxPdelayResponseFollowUp, ieee8021AsCompliances=ieee8021AsCompliances, ieee8021AsComplianceCor1=ieee8021AsComplianceCor1, ieee8021AsPortStatTxPdelayRequest=ieee8021AsPortStatTxPdelayRequest, ieee8021AsBridgeBasePort=ieee8021AsBridgeBasePort, ieee8021AsCurrentDS=ieee8021AsCurrentDS, ieee8021AsParentDSGrandmasterPriority2=ieee8021AsParentDSGrandmasterPriority2, ieee8021AsCurrentDSLastGmPhaseChangeMs=ieee8021AsCurrentDSLastGmPhaseChangeMs, ieee8021AsCompliancesCor1=ieee8021AsCompliancesCor1, ieee8021AsPortDSIsMeasuringDelay=ieee8021AsPortDSIsMeasuringDelay, ieee8021AsPortDSPortNumber=ieee8021AsPortDSPortNumber, ieee8021AsPortDSClockIdentity=ieee8021AsPortDSClockIdentity, ieee8021AsPortStatTxSyncCount=ieee8021AsPortStatTxSyncCount, ieee8021AsParentDSCumlativeRateRatio=ieee8021AsParentDSCumlativeRateRatio, ieee8021AsPortDSPortRole=ieee8021AsPortDSPortRole, ieee8021AsPortDSDelayAsymmetryHs=ieee8021AsPortDSDelayAsymmetryHs, ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalLs=ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalLs, ieee8021AsParentDSParentClockIdentity=ieee8021AsParentDSParentClockIdentity, ieee8021AsPortDSVersionNumber=ieee8021AsPortDSVersionNumber, ieee8021AsPortDataSetGlobalGroup=ieee8021AsPortDataSetGlobalGroup, ieee8021AsCurrentDSLastGmPhaseChangeHs=ieee8021AsCurrentDSLastGmPhaseChangeHs, ieee8021AsDefaultDSTimeSource=ieee8021AsDefaultDSTimeSource, ieee8021AsCompliance=ieee8021AsCompliance, ieee8021AsPortStatRxSyncCount=ieee8021AsPortStatRxSyncCount, ieee8021AsParentDSGrandmasterClockClass=ieee8021AsParentDSGrandmasterClockClass, ieee8021AsDefaultDSLeap59=ieee8021AsDefaultDSLeap59, ieee8021AsParentDSGrandmasterClockAccuracy=ieee8021AsParentDSGrandmasterClockAccuracy, ieee8021AsDefaultDSTimeTraceable=ieee8021AsDefaultDSTimeTraceable, ieee8021AsPortStatRxFollowUpCount=ieee8021AsPortStatRxFollowUpCount, ieee8021AsPortStatRxPdelayResponse=ieee8021AsPortStatRxPdelayResponse, ieee8021AsAcceptableMasterBaseGroup=ieee8021AsAcceptableMasterBaseGroup, PYSNMP_MODULE_ID=ieee8021AsTimeSyncMib, ieee8021AsAcceptableMasterTableDSActualTableSize=ieee8021AsAcceptableMasterTableDSActualTableSize, ieee8021ASSystemCurrentGroup=ieee8021ASSystemCurrentGroup, ieee8021AsDefaultDSNumberPorts=ieee8021AsDefaultDSNumberPorts, ieee8021AsCurrentDSStepsRemoved=ieee8021AsCurrentDSStepsRemoved, ieee8021AsPortStatTxAnnounce=ieee8021AsPortStatTxAnnounce, ieee8021AsCurrentDSLastGmPhaseChangeLs=ieee8021AsCurrentDSLastGmPhaseChangeLs, ieee8021AsPortDSDelayAsymmetryLs=ieee8021AsPortDSDelayAsymmetryLs, ieee8021AsPortDSNeighborRateRatio=ieee8021AsPortDSNeighborRateRatio, ieee8021AsAcceptableMasterTableDS=ieee8021AsAcceptableMasterTableDS, ieee8021AsPortDSIfTable=ieee8021AsPortDSIfTable, ieee8021AsTimePropertiesDSCurrentUtcOffsetValid=ieee8021AsTimePropertiesDSCurrentUtcOffsetValid, ieee8021AsPortDSAllowedLostResponses=ieee8021AsPortDSAllowedLostResponses, ieee8021AsCurrentDSLastGmFreqChangeLs=ieee8021AsCurrentDSLastGmFreqChangeLs, ieee8021AsPortDSNeighborPropDelayMs=ieee8021AsPortDSNeighborPropDelayMs, ieee8021AsPortStatTxPdelayResponseFollowUp=ieee8021AsPortStatTxPdelayResponseFollowUp, ieee8021AsAcceptableMasterTableDSMasterEntry=ieee8021AsAcceptableMasterTableDSMasterEntry, ieee8021AsTimePropertiesDSTimeSource=ieee8021AsTimePropertiesDSTimeSource, ieee8021AsTimePropertiesDSTimeTraceable=ieee8021AsTimePropertiesDSTimeTraceable, ieee8021AsPortDSAsCapable=ieee8021AsPortDSAsCapable, ieee8021AsPortDSNdownLs=ieee8021AsPortDSNdownLs, ieee8021AsParentDSGrandmasterOffsetScaledLogVariance=ieee8021AsParentDSGrandmasterOffsetScaledLogVariance, ieee8021AsPortDSNeighborPropDelayThreshMs=ieee8021AsPortDSNeighborPropDelayThreshMs, ieee8021AsPortDSAsIfIndex=ieee8021AsPortDSAsIfIndex, ieee8021AsPortDSNeighborPropDelayHs=ieee8021AsPortDSNeighborPropDelayHs, ieee8021AsPortDSNeighborPropDelayLs=ieee8021AsPortDSNeighborPropDelayLs, ieee8021AsCurrentDSTimeOfLastGmPhaseChangeEvent=ieee8021AsCurrentDSTimeOfLastGmPhaseChangeEvent, ieee8021AsAcceptableMasterTableDSBase=ieee8021AsAcceptableMasterTableDSBase, ieee8021AsPortStatAnnounceReceiptTimeouts=ieee8021AsPortStatAnnounceReceiptTimeouts, ieee8021ASSystemDefaultReqdGroup=ieee8021ASSystemDefaultReqdGroup, IEEE8021ASClockAccuracyValue=IEEE8021ASClockAccuracyValue, ieee8021AsConformance=ieee8021AsConformance, ieee8021AsCurrentDSOffsetFromMasterHs=ieee8021AsCurrentDSOffsetFromMasterHs, ieee8021AsPortDSAnnounceReceiptTimeout=ieee8021AsPortDSAnnounceReceiptTimeout, ieee8021AsParentDSGrandmasterPriority1=ieee8021AsParentDSGrandmasterPriority1, ieee8021AsCurrentDSOffsetFromMasterMs=ieee8021AsCurrentDSOffsetFromMasterMs, ieee8021AsDefaultDSFrequencyTraceable=ieee8021AsDefaultDSFrequencyTraceable, ieee8021AsPortDSInitialLogPdelayReqInterval=ieee8021AsPortDSInitialLogPdelayReqInterval, ieee8021AsCurrentDSGmChangeCount=ieee8021AsCurrentDSGmChangeCount, ieee8021AsAcceptableMasterPortNumber=ieee8021AsAcceptableMasterPortNumber, ieee8021AsPortDSNdownMs=ieee8021AsPortDSNdownMs, ieee8021AsPortDSCurrentLogPdelayReqInterval=ieee8021AsPortDSCurrentLogPdelayReqInterval, ieee8021AsAcceptableMasterTableDSMaxTableSize=ieee8021AsAcceptableMasterTableDSMaxTableSize, ieee8021AsCurrentDSTimeOfLastGmFreqChangeEvent=ieee8021AsCurrentDSTimeOfLastGmFreqChangeEvent, ieee8021AsDefaultDSOffsetScaledLogVariance=ieee8021AsDefaultDSOffsetScaledLogVariance, ieee8021AsPortStatPdelayAllowedLostResponsesExceeded=ieee8021AsPortStatPdelayAllowedLostResponsesExceeded, ieee8021AsAcceptableMasterTableDSMasterTable=ieee8021AsAcceptableMasterTableDSMasterTable, ieee8021AsAcceptableMasterAlternatePriority1=ieee8021AsAcceptableMasterAlternatePriority1, ieee8021AsPortStatRxSyncReceiptTimeouts=ieee8021AsPortStatRxSyncReceiptTimeouts, ieee8021AsAcceptableMasterClockIdentity=ieee8021AsAcceptableMasterClockIdentity, ieee8021AsDefaultDSCurrentUTCOffset=ieee8021AsDefaultDSCurrentUTCOffset, ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalMs=ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalMs, ieee8021AsCurrentDSGmTimebaseIndicator=ieee8021AsCurrentDSGmTimebaseIndicator, ieee8021AsTimePropertiesDSLeap61=ieee8021AsTimePropertiesDSLeap61, ieee8021AsPortDSSyncReceiptTimeout=ieee8021AsPortDSSyncReceiptTimeout, ieee8021AsDefaultDSClockClass=ieee8021AsDefaultDSClockClass, ieee8021AsPortStatTxPdelayResponse=ieee8021AsPortStatTxPdelayResponse, ieee8021AsCurrentDSOffsetFromMasterLs=ieee8021AsCurrentDSOffsetFromMasterLs, ieee8021AsPortDSDelayAsymmetryMs=ieee8021AsPortDSDelayAsymmetryMs, IEEE8021ASTimeSourceValue=IEEE8021ASTimeSourceValue, ieee8021AsPortStatTxFollowUpCount=ieee8021AsPortStatTxFollowUpCount, ClockIdentity=ClockIdentity, ieee8021AsDefaultDSPriority1=ieee8021AsDefaultDSPriority1, ieee8021AsPortStatIfTable=ieee8021AsPortStatIfTable, ieee8021AsParentDS=ieee8021AsParentDS, ieee8021AsAcceptableMasterRowStatus=ieee8021AsAcceptableMasterRowStatus, ieee8021AsDefaultDSClockAccuracy=ieee8021AsDefaultDSClockAccuracy, ieee8021AsPortDSNupLs=ieee8021AsPortDSNupLs, ieee8021AsAcceptableMasterTableDSMaster=ieee8021AsAcceptableMasterTableDSMaster, ieee8021AsTimePropertiesDSLeap59=ieee8021AsTimePropertiesDSLeap59, ieee8021AsDefaultDSClockIdentity=ieee8021AsDefaultDSClockIdentity, ieee8021AsDefaultDSPriority2=ieee8021AsDefaultDSPriority2, ieee8021AsParentDSGrandmasterIdentity=ieee8021AsParentDSGrandmasterIdentity, ieee8021AsTimeSyncMib=ieee8021AsTimeSyncMib, ieee8021AsCurrentDSLastGmFreqChangeMs=ieee8021AsCurrentDSLastGmFreqChangeMs, ieee8021AsDefaultDS=ieee8021AsDefaultDS, ieee8021AsPortDSInitialLogAnnounceInterval=ieee8021AsPortDSInitialLogAnnounceInterval, ieee8021ASPortStatisticsGlobalGroup=ieee8021ASPortStatisticsGlobalGroup, ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalHs=ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalHs, ieee8021AsPortDSInitialLogSyncInterval=ieee8021AsPortDSInitialLogSyncInterval, ieee8021AsPortDSPttPortEnabled=ieee8021AsPortDSPttPortEnabled, ieee8021AsAcceptableMasterTableDSMasterId=ieee8021AsAcceptableMasterTableDSMasterId, ieee8021AsDefaultDSGmCapable=ieee8021AsDefaultDSGmCapable, ieee8021AsTimePropertiesDSFrequencyTraceable=ieee8021AsTimePropertiesDSFrequencyTraceable, ieee8021AsCurrentDSTimeOfLastGmChangeEvent=ieee8021AsCurrentDSTimeOfLastGmChangeEvent, ieee8021AsPortDSNeighborPropDelayThreshHs=ieee8021AsPortDSNeighborPropDelayThreshHs)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, constraints_intersection, single_value_constraint, value_range_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion')
(ieee8021_bridge_port_number,) = mibBuilder.importSymbols('IEEE8021-TC-MIB', 'IEEE8021BridgePortNumber')
(if_general_information_group, interface_index_or_zero) = mibBuilder.importSymbols('IF-MIB', 'ifGeneralInformationGroup', 'InterfaceIndexOrZero')
(object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup')
(mib_identifier, gauge32, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type, counter32, bits, integer32, module_identity, iso, time_ticks, counter64, ip_address, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'Gauge32', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType', 'Counter32', 'Bits', 'Integer32', 'ModuleIdentity', 'iso', 'TimeTicks', 'Counter64', 'IpAddress', 'Unsigned32')
(textual_convention, display_string, row_status, time_stamp, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'RowStatus', 'TimeStamp', 'TruthValue')
ieee8021_as_time_sync_mib = module_identity((1, 3, 111, 2, 802, 1, 1, 20))
ieee8021AsTimeSyncMib.setRevisions(('2012-12-12 00:00', '2010-11-11 00:00'))
if mibBuilder.loadTexts:
ieee8021AsTimeSyncMib.setLastUpdated('201212120000Z')
if mibBuilder.loadTexts:
ieee8021AsTimeSyncMib.setOrganization('IEEE 802.1 Working Group')
ieee8021_as_mib_objects = mib_identifier((1, 3, 111, 2, 802, 1, 1, 20, 1))
ieee8021_as_conformance = mib_identifier((1, 3, 111, 2, 802, 1, 1, 20, 2))
class Clockidentity(TextualConvention, OctetString):
reference = '6.3.3.6 and 8.5.2.2.1'
status = 'current'
display_hint = '1x:'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8)
fixed_length = 8
class Ieee8021Asclockclassvalue(TextualConvention, Integer32):
reference = '14.2.3 and IEEE Std 1588-2008 7.6.2.4'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(6, 7, 13, 14, 52, 58, 187, 193, 248, 255))
named_values = named_values(('primarySync', 6), ('primarySyncLost', 7), ('applicationSpecificSync', 13), ('applicationSpecficSyncLost', 14), ('primarySyncAlternativeA', 52), ('applicationSpecificAlternativeA', 58), ('primarySyncAlternativeB', 187), ('applicationSpecficAlternativeB', 193), ('defaultClock', 248), ('slaveOnlyClock', 255))
class Ieee8021Asclockaccuracyvalue(TextualConvention, Integer32):
reference = '8.6.2.3'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 254))
named_values = named_values(('timeAccurateTo25ns', 32), ('timeAccurateTo100ns', 33), ('timeAccurateTo250ns', 34), ('timeAccurateTo1us', 35), ('timeAccurateTo2dot5us', 36), ('timeAccurateTo10us', 37), ('timeAccurateTo25us', 38), ('timeAccurateTo100us', 39), ('timeAccurateTo250us', 40), ('timeAccurateTo1ms', 41), ('timeAccurateTo2dot5ms', 42), ('timeAccurateTo10ms', 43), ('timeAccurateTo25ms', 44), ('timeAccurateTo100ms', 45), ('timeAccurateTo250ms', 46), ('timeAccurateTo1s', 47), ('timeAccurateTo10s', 48), ('timeAccurateToGT10s', 49), ('timeAccurateToUnknown', 254))
class Ieee8021Astimesourcevalue(TextualConvention, Integer32):
reference = '8.6.2.7 and Table 8-3'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(16, 32, 48, 64, 80, 96, 144, 160))
named_values = named_values(('atomicClock', 16), ('gps', 32), ('terrestrialRadio', 48), ('ptp', 64), ('ntp', 80), ('handSet', 96), ('other', 144), ('internalOscillator', 160))
ieee8021_as_default_ds = mib_identifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 1))
ieee8021_as_default_ds_clock_identity = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 1), clock_identity()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSClockIdentity.setStatus('current')
ieee8021_as_default_ds_number_ports = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSNumberPorts.setStatus('current')
ieee8021_as_default_ds_clock_class = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 3), ieee8021_as_clock_class_value().clone('defaultClock')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSClockClass.setStatus('current')
ieee8021_as_default_ds_clock_accuracy = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 4), ieee8021_as_clock_accuracy_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSClockAccuracy.setStatus('current')
ieee8021_as_default_ds_offset_scaled_log_variance = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSOffsetScaledLogVariance.setStatus('current')
ieee8021_as_default_ds_priority1 = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSPriority1.setStatus('current')
ieee8021_as_default_ds_priority2 = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255)).clone(248)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSPriority2.setStatus('current')
ieee8021_as_default_ds_gm_capable = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 8), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSGmCapable.setStatus('current')
ieee8021_as_default_ds_current_utc_offset = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(-32768, 32767))).setUnits('seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSCurrentUTCOffset.setStatus('current')
ieee8021_as_default_ds_current_utc_offset_valid = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 10), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSCurrentUTCOffsetValid.setStatus('current')
ieee8021_as_default_ds_leap59 = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 11), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSLeap59.setStatus('current')
ieee8021_as_default_ds_leap61 = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 12), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSLeap61.setStatus('current')
ieee8021_as_default_ds_time_traceable = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 13), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSTimeTraceable.setStatus('current')
ieee8021_as_default_ds_frequency_traceable = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 14), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSFrequencyTraceable.setStatus('current')
ieee8021_as_default_ds_time_source = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 1, 15), ieee8021_as_time_source_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsDefaultDSTimeSource.setStatus('current')
ieee8021_as_current_ds = mib_identifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 2))
ieee8021_as_current_ds_steps_removed = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 1), integer32().subtype(subtypeSpec=value_range_constraint(-32768, 32767))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSStepsRemoved.setStatus('current')
ieee8021_as_current_ds_offset_from_master_hs = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 2), integer32()).setUnits('2**-16 ns * 2**64').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSOffsetFromMasterHs.setStatus('current')
ieee8021_as_current_ds_offset_from_master_ms = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 3), integer32()).setUnits('2**-16 ns * 2**32').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSOffsetFromMasterMs.setStatus('current')
ieee8021_as_current_ds_offset_from_master_ls = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 4), integer32()).setUnits('2**-16 ns').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSOffsetFromMasterLs.setStatus('current')
ieee8021_as_current_ds_last_gm_phase_change_hs = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSLastGmPhaseChangeHs.setStatus('current')
ieee8021_as_current_ds_last_gm_phase_change_ms = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 6), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSLastGmPhaseChangeMs.setStatus('current')
ieee8021_as_current_ds_last_gm_phase_change_ls = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 7), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSLastGmPhaseChangeLs.setStatus('current')
ieee8021_as_current_ds_last_gm_freq_change_ms = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSLastGmFreqChangeMs.setStatus('current')
ieee8021_as_current_ds_last_gm_freq_change_ls = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 9), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSLastGmFreqChangeLs.setStatus('current')
ieee8021_as_current_ds_gm_timebase_indicator = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 10), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSGmTimebaseIndicator.setStatus('current')
ieee8021_as_current_ds_gm_change_count = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSGmChangeCount.setStatus('current')
ieee8021_as_current_ds_time_of_last_gm_change_event = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 12), time_stamp()).setUnits('0.01 seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSTimeOfLastGmChangeEvent.setStatus('current')
ieee8021_as_current_ds_time_of_last_gm_freq_change_event = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 13), time_stamp()).setUnits('0.01 seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSTimeOfLastGmFreqChangeEvent.setStatus('current')
ieee8021_as_current_ds_time_of_last_gm_phase_change_event = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 2, 14), time_stamp()).setUnits('0.01 seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsCurrentDSTimeOfLastGmPhaseChangeEvent.setStatus('current')
ieee8021_as_parent_ds = mib_identifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 3))
ieee8021_as_parent_ds_parent_clock_identity = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 1), clock_identity()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsParentDSParentClockIdentity.setStatus('current')
ieee8021_as_parent_ds_parent_port_number = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsParentDSParentPortNumber.setStatus('current')
ieee8021_as_parent_ds_cumlative_rate_ratio = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsParentDSCumlativeRateRatio.setStatus('current')
ieee8021_as_parent_ds_grandmaster_identity = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 4), clock_identity()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsParentDSGrandmasterIdentity.setStatus('current')
ieee8021_as_parent_ds_grandmaster_clock_class = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 5), ieee8021_as_clock_class_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsParentDSGrandmasterClockClass.setStatus('current')
ieee8021_as_parent_ds_grandmaster_clock_accuracy = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 6), ieee8021_as_clock_accuracy_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsParentDSGrandmasterClockAccuracy.setStatus('current')
ieee8021_as_parent_ds_grandmaster_offset_scaled_log_variance = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsParentDSGrandmasterOffsetScaledLogVariance.setStatus('current')
ieee8021_as_parent_ds_grandmaster_priority1 = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 8), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsParentDSGrandmasterPriority1.setStatus('current')
ieee8021_as_parent_ds_grandmaster_priority2 = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 3, 9), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsParentDSGrandmasterPriority2.setStatus('current')
ieee8021_as_time_properties_ds = mib_identifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 4))
ieee8021_as_time_properties_ds_current_utc_offset = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 1), integer32().subtype(subtypeSpec=value_range_constraint(-32768, 32767))).setUnits('seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsTimePropertiesDSCurrentUtcOffset.setStatus('current')
ieee8021_as_time_properties_ds_current_utc_offset_valid = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 2), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsTimePropertiesDSCurrentUtcOffsetValid.setStatus('current')
ieee8021_as_time_properties_ds_leap59 = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 3), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsTimePropertiesDSLeap59.setStatus('current')
ieee8021_as_time_properties_ds_leap61 = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 4), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsTimePropertiesDSLeap61.setStatus('current')
ieee8021_as_time_properties_ds_time_traceable = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 5), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsTimePropertiesDSTimeTraceable.setStatus('current')
ieee8021_as_time_properties_ds_frequency_traceable = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 6), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsTimePropertiesDSFrequencyTraceable.setStatus('current')
ieee8021_as_time_properties_ds_time_source = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 4, 7), ieee8021_as_time_source_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsTimePropertiesDSTimeSource.setStatus('current')
ieee8021_as_port_ds_if_table = mib_table((1, 3, 111, 2, 802, 1, 1, 20, 1, 5))
if mibBuilder.loadTexts:
ieee8021AsPortDSIfTable.setStatus('current')
ieee8021_as_port_ds_if_entry = mib_table_row((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1)).setIndexNames((0, 'IEEE8021-AS-MIB', 'ieee8021AsBridgeBasePort'), (0, 'IEEE8021-AS-MIB', 'ieee8021AsPortDSAsIfIndex'))
if mibBuilder.loadTexts:
ieee8021AsPortDSIfEntry.setStatus('current')
ieee8021_as_bridge_base_port = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 1), ieee8021_bridge_port_number())
if mibBuilder.loadTexts:
ieee8021AsBridgeBasePort.setStatus('current')
ieee8021_as_port_ds_as_if_index = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 2), interface_index_or_zero())
if mibBuilder.loadTexts:
ieee8021AsPortDSAsIfIndex.setStatus('current')
ieee8021_as_port_ds_clock_identity = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 3), clock_identity()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSClockIdentity.setStatus('current')
ieee8021_as_port_ds_port_number = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSPortNumber.setStatus('current')
ieee8021_as_port_ds_port_role = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(3, 6, 7, 9))).clone(namedValues=named_values(('disabledPort', 3), ('masterPort', 6), ('passivePort', 7), ('slavePort', 9))).clone(3)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSPortRole.setStatus('current')
ieee8021_as_port_ds_ptt_port_enabled = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 6), truth_value().clone(1)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSPttPortEnabled.setStatus('current')
ieee8021_as_port_ds_is_measuring_delay = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 7), truth_value().clone(2)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSIsMeasuringDelay.setStatus('current')
ieee8021_as_port_ds_as_capable = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 8), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSAsCapable.setStatus('current')
ieee8021_as_port_ds_neighbor_prop_delay_hs = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 9), unsigned32()).setUnits('2**-16 ns * 2**64').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSNeighborPropDelayHs.setStatus('current')
ieee8021_as_port_ds_neighbor_prop_delay_ms = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 10), unsigned32()).setUnits('2**-16 ns * 2**32').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSNeighborPropDelayMs.setStatus('current')
ieee8021_as_port_ds_neighbor_prop_delay_ls = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 11), unsigned32()).setUnits('2**-16 ns').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSNeighborPropDelayLs.setStatus('current')
ieee8021_as_port_ds_neighbor_prop_delay_thresh_hs = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 12), unsigned32()).setUnits('2**-16 ns * 2 ** 64').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSNeighborPropDelayThreshHs.setStatus('current')
ieee8021_as_port_ds_neighbor_prop_delay_thresh_ms = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 13), unsigned32()).setUnits('2**-16 ns * 2 ** 32').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSNeighborPropDelayThreshMs.setStatus('current')
ieee8021_as_port_ds_neighbor_prop_delay_thresh_ls = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 14), unsigned32()).setUnits('2**-16 ns').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSNeighborPropDelayThreshLs.setStatus('current')
ieee8021_as_port_ds_delay_asymmetry_hs = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 15), integer32()).setUnits('2**-16 ns * 2**64').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSDelayAsymmetryHs.setStatus('current')
ieee8021_as_port_ds_delay_asymmetry_ms = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 16), unsigned32()).setUnits('2**-16 ns * 2**32').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSDelayAsymmetryMs.setStatus('current')
ieee8021_as_port_ds_delay_asymmetry_ls = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 17), unsigned32()).setUnits('2**-16 ns').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSDelayAsymmetryLs.setStatus('current')
ieee8021_as_port_ds_neighbor_rate_ratio = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 18), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSNeighborRateRatio.setStatus('current')
ieee8021_as_port_ds_initial_log_announce_interval = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(-128, 127))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSInitialLogAnnounceInterval.setStatus('current')
ieee8021_as_port_ds_current_log_announce_interval = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(-128, 127))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSCurrentLogAnnounceInterval.setStatus('current')
ieee8021_as_port_ds_announce_receipt_timeout = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 21), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255)).clone(2)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSAnnounceReceiptTimeout.setStatus('current')
ieee8021_as_port_ds_initial_log_sync_interval = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 22), integer32().subtype(subtypeSpec=value_range_constraint(-128, 127)).clone(-3)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSInitialLogSyncInterval.setStatus('current')
ieee8021_as_port_ds_current_log_sync_interval = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 23), integer32().subtype(subtypeSpec=value_range_constraint(-128, 127)).clone(-3)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSCurrentLogSyncInterval.setStatus('current')
ieee8021_as_port_ds_sync_receipt_timeout = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 24), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255)).clone(3)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSSyncReceiptTimeout.setStatus('current')
ieee8021_as_port_ds_sync_receipt_timeout_time_interval_hs = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 25), unsigned32().clone(0)).setUnits('2**-16 ns').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalHs.setStatus('current')
ieee8021_as_port_ds_sync_receipt_timeout_time_interval_ms = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 26), unsigned32().clone(5722)).setUnits('2**-16 ns * 2**32').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalMs.setStatus('current')
ieee8021_as_port_ds_sync_receipt_timeout_time_interval_ls = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 27), unsigned32().clone(197132288)).setUnits('2**-16 ns').setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalLs.setStatus('current')
ieee8021_as_port_ds_initial_log_pdelay_req_interval = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 28), integer32().subtype(subtypeSpec=value_range_constraint(-128, 127))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSInitialLogPdelayReqInterval.setStatus('current')
ieee8021_as_port_ds_current_log_pdelay_req_interval = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 29), integer32().subtype(subtypeSpec=value_range_constraint(-128, 127))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSCurrentLogPdelayReqInterval.setStatus('current')
ieee8021_as_port_ds_allowed_lost_responses = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 30), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535)).clone(3)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSAllowedLostResponses.setStatus('current')
ieee8021_as_port_ds_version_number = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 31), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 63)).clone(2)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortDSVersionNumber.setStatus('current')
ieee8021_as_port_ds_nup_ms = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 32), unsigned32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSNupMs.setStatus('current')
ieee8021_as_port_ds_nup_ls = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 33), unsigned32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSNupLs.setStatus('current')
ieee8021_as_port_ds_ndown_ms = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 34), unsigned32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSNdownMs.setStatus('current')
ieee8021_as_port_ds_ndown_ls = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 35), unsigned32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSNdownLs.setStatus('current')
ieee8021_as_port_ds_acceptable_master_table_enabled = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 5, 1, 36), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsPortDSAcceptableMasterTableEnabled.setStatus('current')
ieee8021_as_port_stat_if_table = mib_table((1, 3, 111, 2, 802, 1, 1, 20, 1, 6))
if mibBuilder.loadTexts:
ieee8021AsPortStatIfTable.setStatus('current')
ieee8021_as_port_stat_if_entry = mib_table_row((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1)).setIndexNames((0, 'IEEE8021-AS-MIB', 'ieee8021AsBridgeBasePort'), (0, 'IEEE8021-AS-MIB', 'ieee8021AsPortDSAsIfIndex'))
if mibBuilder.loadTexts:
ieee8021AsPortStatIfEntry.setStatus('current')
ieee8021_as_port_stat_rx_sync_count = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatRxSyncCount.setStatus('current')
ieee8021_as_port_stat_rx_follow_up_count = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatRxFollowUpCount.setStatus('current')
ieee8021_as_port_stat_rx_pdelay_request = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatRxPdelayRequest.setStatus('current')
ieee8021_as_port_stat_rx_pdelay_response = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatRxPdelayResponse.setStatus('current')
ieee8021_as_port_stat_rx_pdelay_response_follow_up = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatRxPdelayResponseFollowUp.setStatus('current')
ieee8021_as_port_stat_rx_announce = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatRxAnnounce.setStatus('current')
ieee8021_as_port_stat_rx_ptp_packet_discard = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatRxPTPPacketDiscard.setStatus('current')
ieee8021_as_port_stat_rx_sync_receipt_timeouts = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatRxSyncReceiptTimeouts.setStatus('current')
ieee8021_as_port_stat_announce_receipt_timeouts = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatAnnounceReceiptTimeouts.setStatus('current')
ieee8021_as_port_stat_pdelay_allowed_lost_responses_exceeded = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatPdelayAllowedLostResponsesExceeded.setStatus('current')
ieee8021_as_port_stat_tx_sync_count = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatTxSyncCount.setStatus('current')
ieee8021_as_port_stat_tx_follow_up_count = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatTxFollowUpCount.setStatus('current')
ieee8021_as_port_stat_tx_pdelay_request = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatTxPdelayRequest.setStatus('current')
ieee8021_as_port_stat_tx_pdelay_response = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatTxPdelayResponse.setStatus('current')
ieee8021_as_port_stat_tx_pdelay_response_follow_up = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatTxPdelayResponseFollowUp.setStatus('current')
ieee8021_as_port_stat_tx_announce = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 6, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsPortStatTxAnnounce.setStatus('current')
ieee8021_as_acceptable_master_table_ds = mib_identifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 7))
ieee8021_as_acceptable_master_table_ds_base = mib_identifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 1))
ieee8021_as_acceptable_master_table_ds_master = mib_identifier((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2))
ieee8021_as_acceptable_master_table_ds_max_table_size = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ieee8021AsAcceptableMasterTableDSMaxTableSize.setStatus('current')
ieee8021_as_acceptable_master_table_ds_actual_table_size = mib_scalar((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ieee8021AsAcceptableMasterTableDSActualTableSize.setStatus('current')
ieee8021_as_acceptable_master_table_ds_master_table = mib_table((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1))
if mibBuilder.loadTexts:
ieee8021AsAcceptableMasterTableDSMasterTable.setStatus('current')
ieee8021_as_acceptable_master_table_ds_master_entry = mib_table_row((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1, 1)).setIndexNames((0, 'IEEE8021-AS-MIB', 'ieee8021AsAcceptableMasterTableDSMasterId'))
if mibBuilder.loadTexts:
ieee8021AsAcceptableMasterTableDSMasterEntry.setStatus('current')
ieee8021_as_acceptable_master_table_ds_master_id = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1, 1, 1), unsigned32())
if mibBuilder.loadTexts:
ieee8021AsAcceptableMasterTableDSMasterId.setStatus('current')
ieee8021_as_acceptable_master_clock_identity = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1, 1, 2), clock_identity()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
ieee8021AsAcceptableMasterClockIdentity.setStatus('current')
ieee8021_as_acceptable_master_port_number = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
ieee8021AsAcceptableMasterPortNumber.setStatus('current')
ieee8021_as_acceptable_master_alternate_priority1 = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255)).clone(244)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
ieee8021AsAcceptableMasterAlternatePriority1.setStatus('current')
ieee8021_as_acceptable_master_row_status = mib_table_column((1, 3, 111, 2, 802, 1, 1, 20, 1, 7, 2, 1, 1, 5), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
ieee8021AsAcceptableMasterRowStatus.setStatus('current')
ieee8021_as_compliances = mib_identifier((1, 3, 111, 2, 802, 1, 1, 20, 2, 1))
ieee8021_as_groups = mib_identifier((1, 3, 111, 2, 802, 1, 1, 20, 2, 2))
ieee8021_as_compliances_cor1 = mib_identifier((1, 3, 111, 2, 802, 1, 1, 20, 2, 3))
ieee8021_as_system_default_reqd_group = object_group((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 1)).setObjects(('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSClockIdentity'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSNumberPorts'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSClockClass'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSClockAccuracy'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSOffsetScaledLogVariance'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSPriority1'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSPriority2'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSGmCapable'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSCurrentUTCOffset'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSCurrentUTCOffsetValid'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSLeap59'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSLeap61'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSTimeTraceable'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSFrequencyTraceable'), ('IEEE8021-AS-MIB', 'ieee8021AsDefaultDSTimeSource'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021_as_system_default_reqd_group = ieee8021ASSystemDefaultReqdGroup.setStatus('current')
ieee8021_as_system_current_group = object_group((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 2)).setObjects(('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSStepsRemoved'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSOffsetFromMasterHs'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSOffsetFromMasterMs'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSOffsetFromMasterLs'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSLastGmPhaseChangeHs'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSLastGmPhaseChangeMs'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSLastGmPhaseChangeLs'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSLastGmFreqChangeMs'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSLastGmFreqChangeLs'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSGmTimebaseIndicator'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSGmChangeCount'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSTimeOfLastGmChangeEvent'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSTimeOfLastGmPhaseChangeEvent'), ('IEEE8021-AS-MIB', 'ieee8021AsCurrentDSTimeOfLastGmFreqChangeEvent'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021_as_system_current_group = ieee8021ASSystemCurrentGroup.setStatus('current')
ieee8021_as_system_clock_parent_group = object_group((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 3)).setObjects(('IEEE8021-AS-MIB', 'ieee8021AsParentDSParentClockIdentity'), ('IEEE8021-AS-MIB', 'ieee8021AsParentDSParentPortNumber'), ('IEEE8021-AS-MIB', 'ieee8021AsParentDSCumlativeRateRatio'), ('IEEE8021-AS-MIB', 'ieee8021AsParentDSGrandmasterIdentity'), ('IEEE8021-AS-MIB', 'ieee8021AsParentDSGrandmasterClockClass'), ('IEEE8021-AS-MIB', 'ieee8021AsParentDSGrandmasterClockAccuracy'), ('IEEE8021-AS-MIB', 'ieee8021AsParentDSGrandmasterOffsetScaledLogVariance'), ('IEEE8021-AS-MIB', 'ieee8021AsParentDSGrandmasterPriority1'), ('IEEE8021-AS-MIB', 'ieee8021AsParentDSGrandmasterPriority2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021_as_system_clock_parent_group = ieee8021AsSystemClockParentGroup.setStatus('current')
ieee8021_as_system_time_properties_group = object_group((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 4)).setObjects(('IEEE8021-AS-MIB', 'ieee8021AsTimePropertiesDSCurrentUtcOffset'), ('IEEE8021-AS-MIB', 'ieee8021AsTimePropertiesDSCurrentUtcOffsetValid'), ('IEEE8021-AS-MIB', 'ieee8021AsTimePropertiesDSLeap59'), ('IEEE8021-AS-MIB', 'ieee8021AsTimePropertiesDSLeap61'), ('IEEE8021-AS-MIB', 'ieee8021AsTimePropertiesDSTimeTraceable'), ('IEEE8021-AS-MIB', 'ieee8021AsTimePropertiesDSFrequencyTraceable'), ('IEEE8021-AS-MIB', 'ieee8021AsTimePropertiesDSTimeSource'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021_as_system_time_properties_group = ieee8021AsSystemTimePropertiesGroup.setStatus('current')
ieee8021_as_port_data_set_global_group = object_group((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 5)).setObjects(('IEEE8021-AS-MIB', 'ieee8021AsPortDSClockIdentity'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSPortNumber'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSPortRole'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSPttPortEnabled'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSIsMeasuringDelay'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSAsCapable'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSNeighborPropDelayHs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSNeighborPropDelayMs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSNeighborPropDelayLs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSNeighborPropDelayThreshHs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSNeighborPropDelayThreshMs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSNeighborPropDelayThreshLs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSDelayAsymmetryHs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSDelayAsymmetryMs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSDelayAsymmetryLs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSNeighborRateRatio'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSInitialLogAnnounceInterval'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSCurrentLogAnnounceInterval'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSAnnounceReceiptTimeout'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSInitialLogSyncInterval'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSCurrentLogSyncInterval'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSSyncReceiptTimeout'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalHs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalMs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalLs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSInitialLogPdelayReqInterval'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSCurrentLogPdelayReqInterval'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSAllowedLostResponses'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSVersionNumber'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSNupMs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSNupLs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSNdownMs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSNdownLs'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDSAcceptableMasterTableEnabled'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021_as_port_data_set_global_group = ieee8021AsPortDataSetGlobalGroup.setStatus('current')
ieee8021_as_port_statistics_global_group = object_group((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 6)).setObjects(('IEEE8021-AS-MIB', 'ieee8021AsPortStatRxSyncCount'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatRxFollowUpCount'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatRxPdelayRequest'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatRxPdelayResponse'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatRxPdelayResponseFollowUp'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatRxAnnounce'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatRxPTPPacketDiscard'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatRxSyncReceiptTimeouts'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatAnnounceReceiptTimeouts'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatPdelayAllowedLostResponsesExceeded'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatTxSyncCount'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatTxFollowUpCount'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatTxPdelayRequest'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatTxPdelayResponse'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatTxPdelayResponseFollowUp'), ('IEEE8021-AS-MIB', 'ieee8021AsPortStatTxAnnounce'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021_as_port_statistics_global_group = ieee8021ASPortStatisticsGlobalGroup.setStatus('current')
ieee8021_as_acceptable_master_base_group = object_group((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 7)).setObjects(('IEEE8021-AS-MIB', 'ieee8021AsAcceptableMasterTableDSMaxTableSize'), ('IEEE8021-AS-MIB', 'ieee8021AsAcceptableMasterTableDSActualTableSize'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021_as_acceptable_master_base_group = ieee8021AsAcceptableMasterBaseGroup.setStatus('current')
ieee8021_as_acceptable_master_table_group = object_group((1, 3, 111, 2, 802, 1, 1, 20, 2, 2, 8)).setObjects(('IEEE8021-AS-MIB', 'ieee8021AsAcceptableMasterClockIdentity'), ('IEEE8021-AS-MIB', 'ieee8021AsAcceptableMasterPortNumber'), ('IEEE8021-AS-MIB', 'ieee8021AsAcceptableMasterAlternatePriority1'), ('IEEE8021-AS-MIB', 'ieee8021AsAcceptableMasterRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021_as_acceptable_master_table_group = ieee8021AsAcceptableMasterTableGroup.setStatus('current')
ieee8021_as_compliance = module_compliance((1, 3, 111, 2, 802, 1, 1, 20, 2, 1, 1)).setObjects(('SNMPv2-MIB', 'systemGroup'), ('IF-MIB', 'ifGeneralInformationGroup'), ('IEEE8021-AS-MIB', 'ieee8021ASSystemDefaultReqdGroup'), ('IEEE8021-AS-MIB', 'ieee8021ASSystemCurrentGroup'), ('IEEE8021-AS-MIB', 'ieee8021AsSystemClockParentGroup'), ('IEEE8021-AS-MIB', 'ieee8021AsSystemTimePropertiesGroup'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDataSetGlobalGroup'), ('IEEE8021-AS-MIB', 'ieee8021AsAcceptableMasterBaseGroup'), ('IEEE8021-AS-MIB', 'ieee8021AsAcceptableMasterTableGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021_as_compliance = ieee8021AsCompliance.setStatus('deprecated')
ieee8021_as_compliance_cor1 = module_compliance((1, 3, 111, 2, 802, 1, 1, 20, 2, 1, 2)).setObjects(('SNMPv2-MIB', 'systemGroup'), ('IF-MIB', 'ifGeneralInformationGroup'), ('IEEE8021-AS-MIB', 'ieee8021ASSystemDefaultReqdGroup'), ('IEEE8021-AS-MIB', 'ieee8021ASSystemCurrentGroup'), ('IEEE8021-AS-MIB', 'ieee8021AsSystemClockParentGroup'), ('IEEE8021-AS-MIB', 'ieee8021AsSystemTimePropertiesGroup'), ('IEEE8021-AS-MIB', 'ieee8021AsPortDataSetGlobalGroup'), ('IEEE8021-AS-MIB', 'ieee8021AsAcceptableMasterBaseGroup'), ('IEEE8021-AS-MIB', 'ieee8021AsAcceptableMasterTableGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ieee8021_as_compliance_cor1 = ieee8021AsComplianceCor1.setStatus('current')
mibBuilder.exportSymbols('IEEE8021-AS-MIB', ieee8021AsSystemClockParentGroup=ieee8021AsSystemClockParentGroup, ieee8021AsTimePropertiesDS=ieee8021AsTimePropertiesDS, ieee8021AsPortStatIfEntry=ieee8021AsPortStatIfEntry, ieee8021AsParentDSParentPortNumber=ieee8021AsParentDSParentPortNumber, ieee8021AsPortDSCurrentLogSyncInterval=ieee8021AsPortDSCurrentLogSyncInterval, ieee8021AsPortStatRxPdelayRequest=ieee8021AsPortStatRxPdelayRequest, ieee8021AsDefaultDSCurrentUTCOffsetValid=ieee8021AsDefaultDSCurrentUTCOffsetValid, ieee8021AsPortDSIfEntry=ieee8021AsPortDSIfEntry, ieee8021AsPortStatRxAnnounce=ieee8021AsPortStatRxAnnounce, ieee8021AsGroups=ieee8021AsGroups, ieee8021AsAcceptableMasterTableGroup=ieee8021AsAcceptableMasterTableGroup, ieee8021AsPortDSCurrentLogAnnounceInterval=ieee8021AsPortDSCurrentLogAnnounceInterval, ieee8021AsMIBObjects=ieee8021AsMIBObjects, IEEE8021ASClockClassValue=IEEE8021ASClockClassValue, ieee8021AsDefaultDSLeap61=ieee8021AsDefaultDSLeap61, ieee8021AsPortDSNeighborPropDelayThreshLs=ieee8021AsPortDSNeighborPropDelayThreshLs, ieee8021AsTimePropertiesDSCurrentUtcOffset=ieee8021AsTimePropertiesDSCurrentUtcOffset, ieee8021AsPortStatRxPTPPacketDiscard=ieee8021AsPortStatRxPTPPacketDiscard, ieee8021AsPortDSNupMs=ieee8021AsPortDSNupMs, ieee8021AsPortDSAcceptableMasterTableEnabled=ieee8021AsPortDSAcceptableMasterTableEnabled, ieee8021AsSystemTimePropertiesGroup=ieee8021AsSystemTimePropertiesGroup, ieee8021AsPortStatRxPdelayResponseFollowUp=ieee8021AsPortStatRxPdelayResponseFollowUp, ieee8021AsCompliances=ieee8021AsCompliances, ieee8021AsComplianceCor1=ieee8021AsComplianceCor1, ieee8021AsPortStatTxPdelayRequest=ieee8021AsPortStatTxPdelayRequest, ieee8021AsBridgeBasePort=ieee8021AsBridgeBasePort, ieee8021AsCurrentDS=ieee8021AsCurrentDS, ieee8021AsParentDSGrandmasterPriority2=ieee8021AsParentDSGrandmasterPriority2, ieee8021AsCurrentDSLastGmPhaseChangeMs=ieee8021AsCurrentDSLastGmPhaseChangeMs, ieee8021AsCompliancesCor1=ieee8021AsCompliancesCor1, ieee8021AsPortDSIsMeasuringDelay=ieee8021AsPortDSIsMeasuringDelay, ieee8021AsPortDSPortNumber=ieee8021AsPortDSPortNumber, ieee8021AsPortDSClockIdentity=ieee8021AsPortDSClockIdentity, ieee8021AsPortStatTxSyncCount=ieee8021AsPortStatTxSyncCount, ieee8021AsParentDSCumlativeRateRatio=ieee8021AsParentDSCumlativeRateRatio, ieee8021AsPortDSPortRole=ieee8021AsPortDSPortRole, ieee8021AsPortDSDelayAsymmetryHs=ieee8021AsPortDSDelayAsymmetryHs, ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalLs=ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalLs, ieee8021AsParentDSParentClockIdentity=ieee8021AsParentDSParentClockIdentity, ieee8021AsPortDSVersionNumber=ieee8021AsPortDSVersionNumber, ieee8021AsPortDataSetGlobalGroup=ieee8021AsPortDataSetGlobalGroup, ieee8021AsCurrentDSLastGmPhaseChangeHs=ieee8021AsCurrentDSLastGmPhaseChangeHs, ieee8021AsDefaultDSTimeSource=ieee8021AsDefaultDSTimeSource, ieee8021AsCompliance=ieee8021AsCompliance, ieee8021AsPortStatRxSyncCount=ieee8021AsPortStatRxSyncCount, ieee8021AsParentDSGrandmasterClockClass=ieee8021AsParentDSGrandmasterClockClass, ieee8021AsDefaultDSLeap59=ieee8021AsDefaultDSLeap59, ieee8021AsParentDSGrandmasterClockAccuracy=ieee8021AsParentDSGrandmasterClockAccuracy, ieee8021AsDefaultDSTimeTraceable=ieee8021AsDefaultDSTimeTraceable, ieee8021AsPortStatRxFollowUpCount=ieee8021AsPortStatRxFollowUpCount, ieee8021AsPortStatRxPdelayResponse=ieee8021AsPortStatRxPdelayResponse, ieee8021AsAcceptableMasterBaseGroup=ieee8021AsAcceptableMasterBaseGroup, PYSNMP_MODULE_ID=ieee8021AsTimeSyncMib, ieee8021AsAcceptableMasterTableDSActualTableSize=ieee8021AsAcceptableMasterTableDSActualTableSize, ieee8021ASSystemCurrentGroup=ieee8021ASSystemCurrentGroup, ieee8021AsDefaultDSNumberPorts=ieee8021AsDefaultDSNumberPorts, ieee8021AsCurrentDSStepsRemoved=ieee8021AsCurrentDSStepsRemoved, ieee8021AsPortStatTxAnnounce=ieee8021AsPortStatTxAnnounce, ieee8021AsCurrentDSLastGmPhaseChangeLs=ieee8021AsCurrentDSLastGmPhaseChangeLs, ieee8021AsPortDSDelayAsymmetryLs=ieee8021AsPortDSDelayAsymmetryLs, ieee8021AsPortDSNeighborRateRatio=ieee8021AsPortDSNeighborRateRatio, ieee8021AsAcceptableMasterTableDS=ieee8021AsAcceptableMasterTableDS, ieee8021AsPortDSIfTable=ieee8021AsPortDSIfTable, ieee8021AsTimePropertiesDSCurrentUtcOffsetValid=ieee8021AsTimePropertiesDSCurrentUtcOffsetValid, ieee8021AsPortDSAllowedLostResponses=ieee8021AsPortDSAllowedLostResponses, ieee8021AsCurrentDSLastGmFreqChangeLs=ieee8021AsCurrentDSLastGmFreqChangeLs, ieee8021AsPortDSNeighborPropDelayMs=ieee8021AsPortDSNeighborPropDelayMs, ieee8021AsPortStatTxPdelayResponseFollowUp=ieee8021AsPortStatTxPdelayResponseFollowUp, ieee8021AsAcceptableMasterTableDSMasterEntry=ieee8021AsAcceptableMasterTableDSMasterEntry, ieee8021AsTimePropertiesDSTimeSource=ieee8021AsTimePropertiesDSTimeSource, ieee8021AsTimePropertiesDSTimeTraceable=ieee8021AsTimePropertiesDSTimeTraceable, ieee8021AsPortDSAsCapable=ieee8021AsPortDSAsCapable, ieee8021AsPortDSNdownLs=ieee8021AsPortDSNdownLs, ieee8021AsParentDSGrandmasterOffsetScaledLogVariance=ieee8021AsParentDSGrandmasterOffsetScaledLogVariance, ieee8021AsPortDSNeighborPropDelayThreshMs=ieee8021AsPortDSNeighborPropDelayThreshMs, ieee8021AsPortDSAsIfIndex=ieee8021AsPortDSAsIfIndex, ieee8021AsPortDSNeighborPropDelayHs=ieee8021AsPortDSNeighborPropDelayHs, ieee8021AsPortDSNeighborPropDelayLs=ieee8021AsPortDSNeighborPropDelayLs, ieee8021AsCurrentDSTimeOfLastGmPhaseChangeEvent=ieee8021AsCurrentDSTimeOfLastGmPhaseChangeEvent, ieee8021AsAcceptableMasterTableDSBase=ieee8021AsAcceptableMasterTableDSBase, ieee8021AsPortStatAnnounceReceiptTimeouts=ieee8021AsPortStatAnnounceReceiptTimeouts, ieee8021ASSystemDefaultReqdGroup=ieee8021ASSystemDefaultReqdGroup, IEEE8021ASClockAccuracyValue=IEEE8021ASClockAccuracyValue, ieee8021AsConformance=ieee8021AsConformance, ieee8021AsCurrentDSOffsetFromMasterHs=ieee8021AsCurrentDSOffsetFromMasterHs, ieee8021AsPortDSAnnounceReceiptTimeout=ieee8021AsPortDSAnnounceReceiptTimeout, ieee8021AsParentDSGrandmasterPriority1=ieee8021AsParentDSGrandmasterPriority1, ieee8021AsCurrentDSOffsetFromMasterMs=ieee8021AsCurrentDSOffsetFromMasterMs, ieee8021AsDefaultDSFrequencyTraceable=ieee8021AsDefaultDSFrequencyTraceable, ieee8021AsPortDSInitialLogPdelayReqInterval=ieee8021AsPortDSInitialLogPdelayReqInterval, ieee8021AsCurrentDSGmChangeCount=ieee8021AsCurrentDSGmChangeCount, ieee8021AsAcceptableMasterPortNumber=ieee8021AsAcceptableMasterPortNumber, ieee8021AsPortDSNdownMs=ieee8021AsPortDSNdownMs, ieee8021AsPortDSCurrentLogPdelayReqInterval=ieee8021AsPortDSCurrentLogPdelayReqInterval, ieee8021AsAcceptableMasterTableDSMaxTableSize=ieee8021AsAcceptableMasterTableDSMaxTableSize, ieee8021AsCurrentDSTimeOfLastGmFreqChangeEvent=ieee8021AsCurrentDSTimeOfLastGmFreqChangeEvent, ieee8021AsDefaultDSOffsetScaledLogVariance=ieee8021AsDefaultDSOffsetScaledLogVariance, ieee8021AsPortStatPdelayAllowedLostResponsesExceeded=ieee8021AsPortStatPdelayAllowedLostResponsesExceeded, ieee8021AsAcceptableMasterTableDSMasterTable=ieee8021AsAcceptableMasterTableDSMasterTable, ieee8021AsAcceptableMasterAlternatePriority1=ieee8021AsAcceptableMasterAlternatePriority1, ieee8021AsPortStatRxSyncReceiptTimeouts=ieee8021AsPortStatRxSyncReceiptTimeouts, ieee8021AsAcceptableMasterClockIdentity=ieee8021AsAcceptableMasterClockIdentity, ieee8021AsDefaultDSCurrentUTCOffset=ieee8021AsDefaultDSCurrentUTCOffset, ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalMs=ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalMs, ieee8021AsCurrentDSGmTimebaseIndicator=ieee8021AsCurrentDSGmTimebaseIndicator, ieee8021AsTimePropertiesDSLeap61=ieee8021AsTimePropertiesDSLeap61, ieee8021AsPortDSSyncReceiptTimeout=ieee8021AsPortDSSyncReceiptTimeout, ieee8021AsDefaultDSClockClass=ieee8021AsDefaultDSClockClass, ieee8021AsPortStatTxPdelayResponse=ieee8021AsPortStatTxPdelayResponse, ieee8021AsCurrentDSOffsetFromMasterLs=ieee8021AsCurrentDSOffsetFromMasterLs, ieee8021AsPortDSDelayAsymmetryMs=ieee8021AsPortDSDelayAsymmetryMs, IEEE8021ASTimeSourceValue=IEEE8021ASTimeSourceValue, ieee8021AsPortStatTxFollowUpCount=ieee8021AsPortStatTxFollowUpCount, ClockIdentity=ClockIdentity, ieee8021AsDefaultDSPriority1=ieee8021AsDefaultDSPriority1, ieee8021AsPortStatIfTable=ieee8021AsPortStatIfTable, ieee8021AsParentDS=ieee8021AsParentDS, ieee8021AsAcceptableMasterRowStatus=ieee8021AsAcceptableMasterRowStatus, ieee8021AsDefaultDSClockAccuracy=ieee8021AsDefaultDSClockAccuracy, ieee8021AsPortDSNupLs=ieee8021AsPortDSNupLs, ieee8021AsAcceptableMasterTableDSMaster=ieee8021AsAcceptableMasterTableDSMaster, ieee8021AsTimePropertiesDSLeap59=ieee8021AsTimePropertiesDSLeap59, ieee8021AsDefaultDSClockIdentity=ieee8021AsDefaultDSClockIdentity, ieee8021AsDefaultDSPriority2=ieee8021AsDefaultDSPriority2, ieee8021AsParentDSGrandmasterIdentity=ieee8021AsParentDSGrandmasterIdentity, ieee8021AsTimeSyncMib=ieee8021AsTimeSyncMib, ieee8021AsCurrentDSLastGmFreqChangeMs=ieee8021AsCurrentDSLastGmFreqChangeMs, ieee8021AsDefaultDS=ieee8021AsDefaultDS, ieee8021AsPortDSInitialLogAnnounceInterval=ieee8021AsPortDSInitialLogAnnounceInterval, ieee8021ASPortStatisticsGlobalGroup=ieee8021ASPortStatisticsGlobalGroup, ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalHs=ieee8021AsPortDSSyncReceiptTimeoutTimeIntervalHs, ieee8021AsPortDSInitialLogSyncInterval=ieee8021AsPortDSInitialLogSyncInterval, ieee8021AsPortDSPttPortEnabled=ieee8021AsPortDSPttPortEnabled, ieee8021AsAcceptableMasterTableDSMasterId=ieee8021AsAcceptableMasterTableDSMasterId, ieee8021AsDefaultDSGmCapable=ieee8021AsDefaultDSGmCapable, ieee8021AsTimePropertiesDSFrequencyTraceable=ieee8021AsTimePropertiesDSFrequencyTraceable, ieee8021AsCurrentDSTimeOfLastGmChangeEvent=ieee8021AsCurrentDSTimeOfLastGmChangeEvent, ieee8021AsPortDSNeighborPropDelayThreshHs=ieee8021AsPortDSNeighborPropDelayThreshHs) |
name = input()
salary = float(input())
cash = float(input())
print("TOTAL = R$ %.2f" % (salary + (cash * 0.15))) | name = input()
salary = float(input())
cash = float(input())
print('TOTAL = R$ %.2f' % (salary + cash * 0.15)) |
# This file was automatically generated from "zigZagLevel.ma"
points = {}
boxes = {}
boxes['areaOfInterestBounds'] = (-1.807378035, 3.943412768, -1.61304303) + (0.0, 0.0, 0.0) + (23.01413538, 13.27980464, 10.0098376)
points['ffaSpawn1'] = (-9.523537347, 4.645005984, -3.193868606) + (0.8511546708, 1.0, 1.303629055)
points['ffaSpawn2'] = (6.217011718, 4.632396767, -3.190279407) + (0.8844870264, 1.0, 1.303629055)
points['ffaSpawn3'] = (-4.433947713, 3.005988298, -4.908942678) + (1.531254794, 1.0, 0.7550370795)
points['ffaSpawn4'] = (1.457496709, 3.01461103, -4.907036892) + (1.531254794, 1.0, 0.7550370795)
points['flag1'] = (-9.969465388, 4.651689505, -4.965994534)
points['flag2'] = (6.844972512, 4.652142027, -4.951156148)
points['flag3'] = (1.155692239, 2.973774873, -4.890524808)
points['flag4'] = (-4.224099354, 3.006208239, -4.890524808)
points['flagDefault'] = (-1.42651413, 3.018804771, 0.8808626995)
boxes['levelBounds'] = (-1.567840276, 8.764115729, -1.311948055) + (0.0, 0.0, 0.0) + (28.76792809, 17.64963076, 19.52220249)
points['powerupSpawn1'] = (2.55551802, 4.369175386, -4.798598276)
points['powerupSpawn2'] = (-6.02484656, 4.369175386, -4.798598276)
points['powerupSpawn3'] = (5.557525662, 5.378865401, -4.798598276)
points['powerupSpawn4'] = (-8.792856883, 5.378865401, -4.816871147)
points['shadowLowerBottom'] = (-1.42651413, 1.681630068, 4.790029929)
points['shadowLowerTop'] = (-1.42651413, 2.54918356, 4.790029929)
points['shadowUpperBottom'] = (-1.42651413, 6.802574329, 4.790029929)
points['shadowUpperTop'] = (-1.42651413, 8.779767257, 4.790029929)
points['spawn1'] = (-9.523537347, 4.645005984, -3.193868606) + (0.8511546708, 1.0, 1.303629055)
points['spawn2'] = (6.217011718, 4.632396767, -3.190279407) + (0.8844870264, 1.0, 1.303629055)
points['spawnByFlag1'] = (-9.523537347, 4.645005984, -3.193868606) + (0.8511546708, 1.0, 1.303629055)
points['spawnByFlag2'] = (6.217011718, 4.632396767, -3.190279407) + (0.8844870264, 1.0, 1.303629055)
points['spawnByFlag3'] = (1.457496709, 3.01461103, -4.907036892) + (1.531254794, 1.0, 0.7550370795)
points['spawnByFlag4'] = (-4.433947713, 3.005988298, -4.908942678) + (1.531254794, 1.0, 0.7550370795)
points['tnt1'] = (-1.42651413, 4.045239665, 0.04094631341)
| points = {}
boxes = {}
boxes['areaOfInterestBounds'] = (-1.807378035, 3.943412768, -1.61304303) + (0.0, 0.0, 0.0) + (23.01413538, 13.27980464, 10.0098376)
points['ffaSpawn1'] = (-9.523537347, 4.645005984, -3.193868606) + (0.8511546708, 1.0, 1.303629055)
points['ffaSpawn2'] = (6.217011718, 4.632396767, -3.190279407) + (0.8844870264, 1.0, 1.303629055)
points['ffaSpawn3'] = (-4.433947713, 3.005988298, -4.908942678) + (1.531254794, 1.0, 0.7550370795)
points['ffaSpawn4'] = (1.457496709, 3.01461103, -4.907036892) + (1.531254794, 1.0, 0.7550370795)
points['flag1'] = (-9.969465388, 4.651689505, -4.965994534)
points['flag2'] = (6.844972512, 4.652142027, -4.951156148)
points['flag3'] = (1.155692239, 2.973774873, -4.890524808)
points['flag4'] = (-4.224099354, 3.006208239, -4.890524808)
points['flagDefault'] = (-1.42651413, 3.018804771, 0.8808626995)
boxes['levelBounds'] = (-1.567840276, 8.764115729, -1.311948055) + (0.0, 0.0, 0.0) + (28.76792809, 17.64963076, 19.52220249)
points['powerupSpawn1'] = (2.55551802, 4.369175386, -4.798598276)
points['powerupSpawn2'] = (-6.02484656, 4.369175386, -4.798598276)
points['powerupSpawn3'] = (5.557525662, 5.378865401, -4.798598276)
points['powerupSpawn4'] = (-8.792856883, 5.378865401, -4.816871147)
points['shadowLowerBottom'] = (-1.42651413, 1.681630068, 4.790029929)
points['shadowLowerTop'] = (-1.42651413, 2.54918356, 4.790029929)
points['shadowUpperBottom'] = (-1.42651413, 6.802574329, 4.790029929)
points['shadowUpperTop'] = (-1.42651413, 8.779767257, 4.790029929)
points['spawn1'] = (-9.523537347, 4.645005984, -3.193868606) + (0.8511546708, 1.0, 1.303629055)
points['spawn2'] = (6.217011718, 4.632396767, -3.190279407) + (0.8844870264, 1.0, 1.303629055)
points['spawnByFlag1'] = (-9.523537347, 4.645005984, -3.193868606) + (0.8511546708, 1.0, 1.303629055)
points['spawnByFlag2'] = (6.217011718, 4.632396767, -3.190279407) + (0.8844870264, 1.0, 1.303629055)
points['spawnByFlag3'] = (1.457496709, 3.01461103, -4.907036892) + (1.531254794, 1.0, 0.7550370795)
points['spawnByFlag4'] = (-4.433947713, 3.005988298, -4.908942678) + (1.531254794, 1.0, 0.7550370795)
points['tnt1'] = (-1.42651413, 4.045239665, 0.04094631341) |
class Manager(object):
def setup(self):
return
def update(self):
return
def stop(self):
return | class Manager(object):
def setup(self):
return
def update(self):
return
def stop(self):
return |
#py_dict_1.py
mydict={}
mydict['team'] = 'Cubs'
#another way to add elements us via update(). For input, just about
# any iterable that's comprised of 2-element iterables will work.
mydict.update([('town', 'Chicago'), ('rival', 'Cards')])
#we can print it out using the items() method (it returns a tuple)
for key, value in mydict.items():
print("key is {} and value is {}".format(key, value))
print("let's get rid of a rival")
print()
#and evaluates left to right; this protects from crashes if no 'rival'
if "rival" in mydict and mydict['rival'] == 'Cards':
#note that del is NOT a dict method
del(mydict['rival'])
print()
print("by the grace of a top-level function, the Cards are gone:\n")
| mydict = {}
mydict['team'] = 'Cubs'
mydict.update([('town', 'Chicago'), ('rival', 'Cards')])
for (key, value) in mydict.items():
print('key is {} and value is {}'.format(key, value))
print("let's get rid of a rival")
print()
if 'rival' in mydict and mydict['rival'] == 'Cards':
del mydict['rival']
print()
print('by the grace of a top-level function, the Cards are gone:\n') |
days = int(input())
type_room = input()
grade = input()
nights = days - 1
if type_room == 'room for one person' and grade == 'positive':
price = nights * 18
price += price * 0.25
print(f'{price:.2f}')
elif type_room == 'room for one person' and grade =='negative':
price = nights * 18
price -= price * 0.1
print(f'{price:.2f}')
elif type_room == 'apartment' and grade == 'positive':
if nights < 10:
price = nights * 25
price -= price * 0.3
price += price * 0.25
print(f'{price:.2f}')
elif 10 <= nights <= 15:
price = nights * 25
price -= price * 0.35
price += price * 0.25
print(f'{price:.2f}')
elif nights > 15:
price = nights * 25
price -= price * 0.5
price += price * 0.25
print(f'{price:.2f}')
elif type_room == 'apartment' and grade == 'negative':
if nights < 10:
price = nights * 25
price -= price * 0.3
price -= price * 0.1
print(f'{price:.2f}')
elif 10 <= nights <= 15:
price = nights * 25
price -= price * 0.35
price -= price * 0.1
print(f'{price:.2f}')
elif nights > 15:
price = nights * 25
price -= price * 0.5
price -= price * 0.1
print(f'{price:.2f}')
elif type_room == 'president apartment' and grade == 'positive':
if nights < 10:
price = nights * 35
price -= price * 0.1
price += price * 0.25
print(f'{price:.2f}')
elif 10 <= nights <= 15:
price = nights * 25
price -= price * 0.15
price += price * 0.25
print(f'{price:.2f}')
elif nights > 15:
price = nights * 35
price -= price * 0.2
price += price * 0.25
print(f'{price:.2f}')
elif type_room == 'president apartment' and grade == 'negative':
if nights < 10:
price = nights * 35
price -= price * 0.1
price -= price * 0.1
print(f'{price:.2f}')
elif 10 <= nights <= 15:
price = nights * 25
price -= price * 0.15
price -= price * 0.1
print(f'{price:.2f}')
elif nights > 15:
price = nights * 35
price -= price * 0.2
price -= price * 0.1
print(f'{price:.2f}') | days = int(input())
type_room = input()
grade = input()
nights = days - 1
if type_room == 'room for one person' and grade == 'positive':
price = nights * 18
price += price * 0.25
print(f'{price:.2f}')
elif type_room == 'room for one person' and grade == 'negative':
price = nights * 18
price -= price * 0.1
print(f'{price:.2f}')
elif type_room == 'apartment' and grade == 'positive':
if nights < 10:
price = nights * 25
price -= price * 0.3
price += price * 0.25
print(f'{price:.2f}')
elif 10 <= nights <= 15:
price = nights * 25
price -= price * 0.35
price += price * 0.25
print(f'{price:.2f}')
elif nights > 15:
price = nights * 25
price -= price * 0.5
price += price * 0.25
print(f'{price:.2f}')
elif type_room == 'apartment' and grade == 'negative':
if nights < 10:
price = nights * 25
price -= price * 0.3
price -= price * 0.1
print(f'{price:.2f}')
elif 10 <= nights <= 15:
price = nights * 25
price -= price * 0.35
price -= price * 0.1
print(f'{price:.2f}')
elif nights > 15:
price = nights * 25
price -= price * 0.5
price -= price * 0.1
print(f'{price:.2f}')
elif type_room == 'president apartment' and grade == 'positive':
if nights < 10:
price = nights * 35
price -= price * 0.1
price += price * 0.25
print(f'{price:.2f}')
elif 10 <= nights <= 15:
price = nights * 25
price -= price * 0.15
price += price * 0.25
print(f'{price:.2f}')
elif nights > 15:
price = nights * 35
price -= price * 0.2
price += price * 0.25
print(f'{price:.2f}')
elif type_room == 'president apartment' and grade == 'negative':
if nights < 10:
price = nights * 35
price -= price * 0.1
price -= price * 0.1
print(f'{price:.2f}')
elif 10 <= nights <= 15:
price = nights * 25
price -= price * 0.15
price -= price * 0.1
print(f'{price:.2f}')
elif nights > 15:
price = nights * 35
price -= price * 0.2
price -= price * 0.1
print(f'{price:.2f}') |
'''https://github.com/be-unkind/skyscrapers_ucu'''
def read_input(path: str) -> list:
'''
Read game board file from path.
Return list of str.
'''
result = []
with open(path, 'r') as file:
for line in file:
line = line.replace('\n', '')
result.append(line)
return result
# print(read_input("check.txt"))
def left_to_right_check(input_line: str, pivot: int) -> bool:
'''
Check row-wise visibility from left to right.
Return True if number of building from the left-most hint is visible looking to the right,
False otherwise.
input_line - representing board row.
pivot - number on the left-most hint of the input_line.
>>> left_to_right_check("412453*", 4)
True
'''
count = 0
temporary_lst = []
input_lst = list(input_line)
if '*' in input_lst:
input_lst.remove('*')
for element in input_lst:
if int(element) == pivot:
idx_of_element = input_lst.index(element)
for element1 in input_lst[idx_of_element:]:
if len(temporary_lst) == 0:
temporary_lst.append(int(element1))
else:
if int(element1) > temporary_lst[0]:
count+=1
del temporary_lst[0]
if count == pivot:
return True
else:
return False
# print(left_to_right_check("452453*", 5))
def check_not_finished_board(board: list) -> bool:
'''
Check if skyscraper board is not finished, i.e., '?' present on the game board.
Return True if finished, False otherwise.
>>> check_not_finished_board(['***21**', '4?????*', '4?????*', '*?????5', '*?????*', '*?????*', '*2*1***'])
False
'''
check_lst = []
for element in board:
if '?' in element:
check_lst.append('False')
else:
check_lst.append('True')
if 'False' in check_lst:
return False
else:
return True
# print(check_not_finished_board(['***21**', '412453*', '423145*', '*543215', '*35214*', '*41532*', '*2*1***']))
def check_uniqueness_in_rows(board: list) -> bool:
'''
Check buildings of unique height in each row.
Return True if buildings in a row have unique length, False otherwise.
>>> check_uniqueness_in_rows(['***21**', '412453*', '423145*', '*543215', '*35214*', '*41532*', '*2*1***'])
True
'''
temporary_lst = []
for element in board:
element_lst = list(element)
del element_lst[0]
del element_lst[len(element_lst)-1]
for count in range(len(element_lst) + 1):
if '*' in element_lst:
element_lst.remove('*')
if len(element_lst) != len(set(element_lst)):
temporary_lst.append('False')
else:
temporary_lst.append('True')
if 'False' in temporary_lst:
return False
else:
return True
# print(check_uniqueness_in_rows(['***21**', '412453*', '423145*', '*543215', '*35214*', '*41532*', '*2*1***']))
def check_horizontal_visibility(board: list):
'''
Check row-wise visibility (left-right and vice versa)
Return True if all horizontal hints are satisfiable,
i.e., for line 412453* , hint is 4, and 1245 are the four buildings
that could be observed from the hint looking to the right.
>>> check_horizontal_visibility(['***21**', '412453*', '423145*', '*543215', '*35214*', '*41532*', '*2*1***'])
True
'''
res_lst = []
for element in board:
element_lst = list(element)
if (element_lst[0] == '*') and (element_lst[-1] == '*'):
continue
if element_lst[-1] == '*':
if left_to_right_check(element, element_lst[0]) == True:
res_lst.append('True')
else:
res_lst.append('False')
if element_lst[0] == '*':
element_lst.reverse()
if left_to_right_check(element, element_lst[0]) == True:
res_lst.append('True')
else:
res_lst.append('False')
if 'False' in res_lst:
return False
else:
return True
# print(check_horizontal_visibility(['***21**', '412453*', '423145*', '*543215', '*35214*', '*41532*', '*2*1***']))
def check_columns(board: list):
'''
Check column-wise compliance of the board for uniqueness (buildings of unique height) and visibility (top-bottom and vice ve
Same as for horizontal cases, but aggregated in one function for vertical case, i.e. columns.
>>> check_columns(['***21**', '412453*', '423145*', '*543215', '*35214*', '*41532*', '*2*1***'])
True
'''
pass
def check_skyscrapers(input_path: str):
'''
Main function to check the status of skyscraper game board.
Return True if the board status is compliant with the rules,
False otherwise.
'''
pass
# if __name__ == "__main__":
# print(check_skyscrapers("check.txt"))
print(left_to_right_check("132345*", 3))
| """https://github.com/be-unkind/skyscrapers_ucu"""
def read_input(path: str) -> list:
"""
Read game board file from path.
Return list of str.
"""
result = []
with open(path, 'r') as file:
for line in file:
line = line.replace('\n', '')
result.append(line)
return result
def left_to_right_check(input_line: str, pivot: int) -> bool:
"""
Check row-wise visibility from left to right.
Return True if number of building from the left-most hint is visible looking to the right,
False otherwise.
input_line - representing board row.
pivot - number on the left-most hint of the input_line.
>>> left_to_right_check("412453*", 4)
True
"""
count = 0
temporary_lst = []
input_lst = list(input_line)
if '*' in input_lst:
input_lst.remove('*')
for element in input_lst:
if int(element) == pivot:
idx_of_element = input_lst.index(element)
for element1 in input_lst[idx_of_element:]:
if len(temporary_lst) == 0:
temporary_lst.append(int(element1))
elif int(element1) > temporary_lst[0]:
count += 1
del temporary_lst[0]
if count == pivot:
return True
else:
return False
def check_not_finished_board(board: list) -> bool:
"""
Check if skyscraper board is not finished, i.e., '?' present on the game board.
Return True if finished, False otherwise.
>>> check_not_finished_board(['***21**', '4?????*', '4?????*', '*?????5', '*?????*', '*?????*', '*2*1***'])
False
"""
check_lst = []
for element in board:
if '?' in element:
check_lst.append('False')
else:
check_lst.append('True')
if 'False' in check_lst:
return False
else:
return True
def check_uniqueness_in_rows(board: list) -> bool:
"""
Check buildings of unique height in each row.
Return True if buildings in a row have unique length, False otherwise.
>>> check_uniqueness_in_rows(['***21**', '412453*', '423145*', '*543215', '*35214*', '*41532*', '*2*1***'])
True
"""
temporary_lst = []
for element in board:
element_lst = list(element)
del element_lst[0]
del element_lst[len(element_lst) - 1]
for count in range(len(element_lst) + 1):
if '*' in element_lst:
element_lst.remove('*')
if len(element_lst) != len(set(element_lst)):
temporary_lst.append('False')
else:
temporary_lst.append('True')
if 'False' in temporary_lst:
return False
else:
return True
def check_horizontal_visibility(board: list):
"""
Check row-wise visibility (left-right and vice versa)
Return True if all horizontal hints are satisfiable,
i.e., for line 412453* , hint is 4, and 1245 are the four buildings
that could be observed from the hint looking to the right.
>>> check_horizontal_visibility(['***21**', '412453*', '423145*', '*543215', '*35214*', '*41532*', '*2*1***'])
True
"""
res_lst = []
for element in board:
element_lst = list(element)
if element_lst[0] == '*' and element_lst[-1] == '*':
continue
if element_lst[-1] == '*':
if left_to_right_check(element, element_lst[0]) == True:
res_lst.append('True')
else:
res_lst.append('False')
if element_lst[0] == '*':
element_lst.reverse()
if left_to_right_check(element, element_lst[0]) == True:
res_lst.append('True')
else:
res_lst.append('False')
if 'False' in res_lst:
return False
else:
return True
def check_columns(board: list):
"""
Check column-wise compliance of the board for uniqueness (buildings of unique height) and visibility (top-bottom and vice ve
Same as for horizontal cases, but aggregated in one function for vertical case, i.e. columns.
>>> check_columns(['***21**', '412453*', '423145*', '*543215', '*35214*', '*41532*', '*2*1***'])
True
"""
pass
def check_skyscrapers(input_path: str):
"""
Main function to check the status of skyscraper game board.
Return True if the board status is compliant with the rules,
False otherwise.
"""
pass
print(left_to_right_check('132345*', 3)) |
# print("Hello World")
# print("Done")
print("HelloWorld")
print("Done")
| print('HelloWorld')
print('Done') |
# !/usr/bin/env python3
#######################################################################################
# #
# Program purpose: Convert the distance (in feet) to inches, yards, and miles. #
# Program Author : Happi Yvan <ivensteinpoker@gmail.com> #
# Creation Date : August 10, 2019 #
# #
#######################################################################################
def get_inches_yards_and_miles(feet):
return [feet * 12, feet / 3.0, feet / 5280.0]
if __name__ == "__main__":
dist_feet = int(input("Input distance in feet: "))
data = get_inches_yards_and_miles(dist_feet)
print(f"The distance in inches is {data[0]} inches.")
print(f"The distance in yards is {data[1]} yards.")
print(f"The distance in miles is {data[2]} miles.") | def get_inches_yards_and_miles(feet):
return [feet * 12, feet / 3.0, feet / 5280.0]
if __name__ == '__main__':
dist_feet = int(input('Input distance in feet: '))
data = get_inches_yards_and_miles(dist_feet)
print(f'The distance in inches is {data[0]} inches.')
print(f'The distance in yards is {data[1]} yards.')
print(f'The distance in miles is {data[2]} miles.') |
#calcular el numero de vocales de una frase
frase = str(input("Digita la frase: "))
vocales = "aeiouAEIOU"
num = 0
for i in frase:
if i == "a" or i == "e" or i == "i" or i == "o" or i == "u":
num = num + 1
print ("La frase tiene: {} vocales" .format(str(num))) | frase = str(input('Digita la frase: '))
vocales = 'aeiouAEIOU'
num = 0
for i in frase:
if i == 'a' or i == 'e' or i == 'i' or (i == 'o') or (i == 'u'):
num = num + 1
print('La frase tiene: {} vocales'.format(str(num))) |
mark = float(input('mark on test?'))
if mark >= 50:
print('congratulations you passed')
else:
print('sorry you failed')
| mark = float(input('mark on test?'))
if mark >= 50:
print('congratulations you passed')
else:
print('sorry you failed') |
board_width = 4000
board_height = 1600
screen_width = 800
screen_height = 600
| board_width = 4000
board_height = 1600
screen_width = 800
screen_height = 600 |
# This test verifies that calling locals() does not pollute
# the local namespace of the class with free variables. Old
# versions of Python had a bug, where a free variable being
# passed through a class namespace would be inserted into
# locals() by locals() or exec or a trace function.
#
# The real bug lies in frame code that copies variables
# between fast locals and the locals dict, e.g. when executing
# a trace function.
def f(x):
class C:
x = 12
def m(self):
return x
locals()
return C
___assertEqual(f(1).x, 12)
def f(x):
class C:
y = x
def m(self):
return x
z = list(locals())
return C
varnames = f(1).z
___assertNotIn("x", varnames)
___assertIn("y", varnames)
| def f(x):
class C:
x = 12
def m(self):
return x
locals()
return C
___assert_equal(f(1).x, 12)
def f(x):
class C:
y = x
def m(self):
return x
z = list(locals())
return C
varnames = f(1).z
___assert_not_in('x', varnames)
___assert_in('y', varnames) |
# PNG ADDRESS
PNG = "0x60781C2586D68229fde47564546784ab3fACA982"
# PGL PNG/AVAX
LP_PNG_AVAX = "0xd7538cABBf8605BdE1f4901B47B8D42c61DE0367"
# FACTORY ADDRESS
FACTORY = '0xefa94DE7a4656D787667C749f7E1223D71E9FD88'
# STAKING CONTRACTS
# EARN AVAX
STAKING_AVAX = "0xD49B406A7A29D64e081164F6C3353C599A2EeAE9"
# EARN OOE
STAKING_OOE = "0xf0eFf017644680B9878429137ccb2c041b4Fb701"
# EARN APEIN
STAKING_APEIN = "0xfe1d712363f2B1971818DBA935eEC13Ddea474cc" | png = '0x60781C2586D68229fde47564546784ab3fACA982'
lp_png_avax = '0xd7538cABBf8605BdE1f4901B47B8D42c61DE0367'
factory = '0xefa94DE7a4656D787667C749f7E1223D71E9FD88'
staking_avax = '0xD49B406A7A29D64e081164F6C3353C599A2EeAE9'
staking_ooe = '0xf0eFf017644680B9878429137ccb2c041b4Fb701'
staking_apein = '0xfe1d712363f2B1971818DBA935eEC13Ddea474cc' |
#!/usr/bin/env python3
serial_number = 7511
grid_size = 300
power_levels = {}
fuel_cells = {}
def power_level(cell):
return (
((((cell[0] + 10) * cell[1] + serial_number) * (cell[0] + 10)) % 1000) // 100
) - 5
def power_of_cell(cell):
power = 0
for xx in range(3):
for yy in range(3):
power += power_levels[(cell[0] - xx, cell[1] - yy)]
return power
for x in range(1, grid_size + 1):
for y in range(1, grid_size + 1):
level = power_level((x, y))
power_levels[(x, y)] = level
if x >= 3 and y >= 3:
fuel_cells[(x, y)] = power_of_cell((x, y))
max_fuel_cell = max(fuel_cells, key=fuel_cells.get)
print(
"The fuel cell of size 3 with maximum power is:",
(max_fuel_cell[0] - 2, max_fuel_cell[1] - 2),
)
| serial_number = 7511
grid_size = 300
power_levels = {}
fuel_cells = {}
def power_level(cell):
return ((cell[0] + 10) * cell[1] + serial_number) * (cell[0] + 10) % 1000 // 100 - 5
def power_of_cell(cell):
power = 0
for xx in range(3):
for yy in range(3):
power += power_levels[cell[0] - xx, cell[1] - yy]
return power
for x in range(1, grid_size + 1):
for y in range(1, grid_size + 1):
level = power_level((x, y))
power_levels[x, y] = level
if x >= 3 and y >= 3:
fuel_cells[x, y] = power_of_cell((x, y))
max_fuel_cell = max(fuel_cells, key=fuel_cells.get)
print('The fuel cell of size 3 with maximum power is:', (max_fuel_cell[0] - 2, max_fuel_cell[1] - 2)) |
# Literally the same problem as 2020 Day 13, part 2. Here is a better constructed version of that solution.
# Originally, I just brute forced every configuration until I found the right one (i.e a different approach to what I did before)...
# but that ended up being only one line of code less than this, whilst this approach is far more scalable, and instantaneous for the given input.
def main(curr_config, disc_positions):
time = 0; i = 0; cf = 1
target_config = [p-i if 0 < p-i < p else (p+i)%p for i,p in enumerate(disc_positions)]
while i < len(disc_positions):
if curr_config[i] == target_config[i]:
cf = cf * disc_positions[i] # cf = cumulative frequency of aligned discs so far i.e we get disc 1 in the correct position, then 1,2, then 1,2,3...
i += 1
else:
curr_config = [pos+cf if pos+cf < mx else (pos+cf)%mx for pos,mx in list(zip(curr_config,disc_positions))]
time += cf
return time-1 # account for 1 second drop time for the capsule to reach the first disc
print(main([11,0,11,0,2,17],[13,5,17,3,7,19]))
print(main([11,0,11,0,2,17,0],[13,5,17,3,7,19,11]))
| def main(curr_config, disc_positions):
time = 0
i = 0
cf = 1
target_config = [p - i if 0 < p - i < p else (p + i) % p for (i, p) in enumerate(disc_positions)]
while i < len(disc_positions):
if curr_config[i] == target_config[i]:
cf = cf * disc_positions[i]
i += 1
else:
curr_config = [pos + cf if pos + cf < mx else (pos + cf) % mx for (pos, mx) in list(zip(curr_config, disc_positions))]
time += cf
return time - 1
print(main([11, 0, 11, 0, 2, 17], [13, 5, 17, 3, 7, 19]))
print(main([11, 0, 11, 0, 2, 17, 0], [13, 5, 17, 3, 7, 19, 11])) |
class ServiceInterface(object):
def __init__(self, **kargs):
pass
def update(self, **kargs):
raise Exception("Not implemented for this class")
def load(self, **kargs):
raise Exception("Not implemented for this class")
def check(self, domain=None, **kargs):
raise Exception("Not implemented for this class")
| class Serviceinterface(object):
def __init__(self, **kargs):
pass
def update(self, **kargs):
raise exception('Not implemented for this class')
def load(self, **kargs):
raise exception('Not implemented for this class')
def check(self, domain=None, **kargs):
raise exception('Not implemented for this class') |
# Django settings for cbc_website project.
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = 'django_esv_tests.db'
INSTALLED_APPS = [
'esv',
'core',
]
TEMPLATE_LOADERS = (
'django.template.loaders.app_directories.load_template_source',
)
| database_engine = 'sqlite3'
database_name = 'django_esv_tests.db'
installed_apps = ['esv', 'core']
template_loaders = ('django.template.loaders.app_directories.load_template_source',) |
def fibonnacijeva_stevila(n):
stevila = [1,1]
i = 2
while len(str(stevila[-1])) < n:
stevila.append(stevila[-1] + stevila[-2])
i += 1
return i
print(fibonnacijeva_stevila(1000)) | def fibonnacijeva_stevila(n):
stevila = [1, 1]
i = 2
while len(str(stevila[-1])) < n:
stevila.append(stevila[-1] + stevila[-2])
i += 1
return i
print(fibonnacijeva_stevila(1000)) |
class SwaggerParser:
def __init__(self, spec: dict):
self.spec = spec
@property
def operations(self) -> dict:
_operations = {}
for uri, resources in self.spec['paths'].items():
for method, resource in resources.items():
op = SwaggerOperation(method, uri, resource)
_operations.update({op.id: op})
return _operations
class SwaggerOperation:
def __init__(self, method: str, uri: str, resource_dict: dict):
self.method = method
self.uri = uri
self.resource_dict = resource_dict
def get_params(self, type: str):
return [param['name'] for param in self.resource_dict['parameters'] if param['in'] == type]
@property
def id(self) -> str:
return self.resource_dict.get('operationId')
@property
def query_params(self) -> list:
return self.get_params(type='query')
@property
def path_params(self) -> list:
return self.get_params(type='path')
@property
def headers(self) -> list:
return self.get_params(type='header')
@property
def body(self) -> [str, None]:
try:
return self.get_params(type='body')[0]
except IndexError:
return None
| class Swaggerparser:
def __init__(self, spec: dict):
self.spec = spec
@property
def operations(self) -> dict:
_operations = {}
for (uri, resources) in self.spec['paths'].items():
for (method, resource) in resources.items():
op = swagger_operation(method, uri, resource)
_operations.update({op.id: op})
return _operations
class Swaggeroperation:
def __init__(self, method: str, uri: str, resource_dict: dict):
self.method = method
self.uri = uri
self.resource_dict = resource_dict
def get_params(self, type: str):
return [param['name'] for param in self.resource_dict['parameters'] if param['in'] == type]
@property
def id(self) -> str:
return self.resource_dict.get('operationId')
@property
def query_params(self) -> list:
return self.get_params(type='query')
@property
def path_params(self) -> list:
return self.get_params(type='path')
@property
def headers(self) -> list:
return self.get_params(type='header')
@property
def body(self) -> [str, None]:
try:
return self.get_params(type='body')[0]
except IndexError:
return None |
#
# PySNMP MIB module CPQPOWER-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CPQPOWER-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:27:50 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint")
compaq, = mibBuilder.importSymbols("CPQHOST-MIB", "compaq")
ifIndex, ifDescr = mibBuilder.importSymbols("IF-MIB", "ifIndex", "ifDescr")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
sysLocation, sysDescr, sysName, sysContact = mibBuilder.importSymbols("SNMPv2-MIB", "sysLocation", "sysDescr", "sysName", "sysContact")
NotificationType, Bits, Integer32, ModuleIdentity, iso, Counter64, Counter32, NotificationType, ObjectIdentity, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, MibIdentifier, Gauge32, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Bits", "Integer32", "ModuleIdentity", "iso", "Counter64", "Counter32", "NotificationType", "ObjectIdentity", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "MibIdentifier", "Gauge32", "IpAddress")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
cpqPower = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165))
powerDevice = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 1))
trapInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 1, 1))
managementModuleIdent = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 1, 2))
pdu = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 2))
pduIdent = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 2, 1))
pduInput = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 2, 2))
pduOutput = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 2, 3))
ups = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 3))
upsIdent = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 1))
upsBattery = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 2))
upsInput = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 3))
upsOutput = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 4))
upsBypass = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 5))
upsEnvironment = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 6))
upsTest = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 7))
upsControl = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 8))
upsConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 9))
upsRecep = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 10))
upsTopology = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 11))
pdr = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 4))
pdrIdent = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 4, 1))
pdrPanel = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 4, 2))
pdrBreaker = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 165, 4, 3))
trapCode = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapCode.setStatus('mandatory')
if mibBuilder.loadTexts: trapCode.setDescription("A number identifying the event for the trap that was sent. Mapped unique trap code per unique event to be used by ISEE's decoder ring.")
trapDescription = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapDescription.setStatus('mandatory')
if mibBuilder.loadTexts: trapDescription.setDescription('A string identifying the event for that last trap that was sent.')
trapDeviceMgmtUrl = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapDeviceMgmtUrl.setStatus('mandatory')
if mibBuilder.loadTexts: trapDeviceMgmtUrl.setDescription('A string contains the URL for the management software.')
trapDeviceDetails = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapDeviceDetails.setStatus('mandatory')
if mibBuilder.loadTexts: trapDeviceDetails.setDescription('A string details information about the device, including model, serial number, part number, etc....')
trapDeviceName = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: trapDeviceName.setStatus('mandatory')
if mibBuilder.loadTexts: trapDeviceName.setDescription('A string contains the name of the device.')
trapCritical = NotificationType((1, 3, 6, 1, 4, 1, 232, 165) + (0,1)).setObjects(("SNMPv2-MIB", "sysName"), ("CPQPOWER-MIB", "trapCode"), ("CPQPOWER-MIB", "trapDescription"), ("CPQPOWER-MIB", "trapDeviceName"), ("CPQPOWER-MIB", "trapDeviceDetails"), ("CPQPOWER-MIB", "trapDeviceMgmtUrl"))
if mibBuilder.loadTexts: trapCritical.setDescription('A critical alarm has occurred. Action: Check the Trap Details for more information.')
trapWarning = NotificationType((1, 3, 6, 1, 4, 1, 232, 165) + (0,2)).setObjects(("SNMPv2-MIB", "sysName"), ("CPQPOWER-MIB", "trapCode"), ("CPQPOWER-MIB", "trapDescription"), ("CPQPOWER-MIB", "trapDeviceName"), ("CPQPOWER-MIB", "trapDeviceDetails"), ("CPQPOWER-MIB", "trapDeviceMgmtUrl"))
if mibBuilder.loadTexts: trapWarning.setDescription('A warning alarm has occurred. Action: Check the Trap Details for more information.')
trapInformation = NotificationType((1, 3, 6, 1, 4, 1, 232, 165) + (0,3)).setObjects(("SNMPv2-MIB", "sysName"), ("CPQPOWER-MIB", "trapCode"), ("CPQPOWER-MIB", "trapDescription"), ("CPQPOWER-MIB", "trapDeviceName"), ("CPQPOWER-MIB", "trapDeviceDetails"), ("CPQPOWER-MIB", "trapDeviceMgmtUrl"))
if mibBuilder.loadTexts: trapInformation.setDescription('An informational alarm has occurred. Action: Check the Trap Details for more information.')
trapCleared = NotificationType((1, 3, 6, 1, 4, 1, 232, 165) + (0,4)).setObjects(("SNMPv2-MIB", "sysName"), ("CPQPOWER-MIB", "trapCode"), ("CPQPOWER-MIB", "trapDescription"), ("CPQPOWER-MIB", "trapDeviceName"), ("CPQPOWER-MIB", "trapDeviceDetails"), ("CPQPOWER-MIB", "trapDeviceMgmtUrl"))
if mibBuilder.loadTexts: trapCleared.setDescription('An alarm has cleared. Action: Check the Trap Details for more information.')
trapTest = NotificationType((1, 3, 6, 1, 4, 1, 232, 165) + (0,5)).setObjects(("SNMPv2-MIB", "sysName"), ("CPQPOWER-MIB", "trapCode"), ("CPQPOWER-MIB", "trapDescription"), ("CPQPOWER-MIB", "trapDeviceName"), ("CPQPOWER-MIB", "trapDeviceDetails"), ("CPQPOWER-MIB", "trapDeviceMgmtUrl"))
if mibBuilder.loadTexts: trapTest.setDescription('Test trap sent to a trap receiver to check proper reception of traps')
deviceTrapInitialization = NotificationType((1, 3, 6, 1, 4, 1, 232, 165) + (0,6)).setObjects(("SNMPv2-MIB", "sysName"), ("CPQPOWER-MIB", "deviceIdentName"))
if mibBuilder.loadTexts: deviceTrapInitialization.setDescription('This trap is sent each time a power device is initialized.')
deviceManufacturer = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: deviceManufacturer.setStatus('mandatory')
if mibBuilder.loadTexts: deviceManufacturer.setDescription('The device manufacturer.')
deviceModel = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: deviceModel.setStatus('mandatory')
if mibBuilder.loadTexts: deviceModel.setDescription('The device model.')
deviceFirmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: deviceFirmwareVersion.setStatus('mandatory')
if mibBuilder.loadTexts: deviceFirmwareVersion.setDescription('The device firmware version(s).')
deviceHardwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: deviceHardwareVersion.setStatus('mandatory')
if mibBuilder.loadTexts: deviceHardwareVersion.setDescription('The device hardware version.')
deviceIdentName = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 5), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: deviceIdentName.setStatus('mandatory')
if mibBuilder.loadTexts: deviceIdentName.setDescription('A string identifying the device.')
devicePartNumber = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 6), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: devicePartNumber.setStatus('mandatory')
if mibBuilder.loadTexts: devicePartNumber.setDescription('The device part number.')
deviceSerialNumber = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: deviceSerialNumber.setStatus('mandatory')
if mibBuilder.loadTexts: deviceSerialNumber.setDescription('The device serial number.')
deviceMACAddress = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: deviceMACAddress.setStatus('mandatory')
if mibBuilder.loadTexts: deviceMACAddress.setDescription('The device MAC address.')
numOfPdu = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: numOfPdu.setStatus('mandatory')
if mibBuilder.loadTexts: numOfPdu.setDescription('The number of PDUs.')
pduIdentTable = MibTable((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2), )
if mibBuilder.loadTexts: pduIdentTable.setStatus('mandatory')
if mibBuilder.loadTexts: pduIdentTable.setDescription('The Aggregate Object with number of entries equal to NumOfPdu and including the PduIdent group.')
pduIdentEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1), ).setIndexNames((0, "CPQPOWER-MIB", "pduIdentIndex"))
if mibBuilder.loadTexts: pduIdentEntry.setStatus('mandatory')
if mibBuilder.loadTexts: pduIdentEntry.setDescription('The ident table entry containing the name, model, manufacturer, firmware version, part number, etc.')
pduIdentIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduIdentIndex.setStatus('mandatory')
if mibBuilder.loadTexts: pduIdentIndex.setDescription('Index for the PduIdentEntry table.')
pduName = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pduName.setStatus('mandatory')
if mibBuilder.loadTexts: pduName.setDescription('The string identify the device.')
pduModel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduModel.setStatus('mandatory')
if mibBuilder.loadTexts: pduModel.setDescription('The Device Model.')
pduManufacturer = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduManufacturer.setStatus('mandatory')
if mibBuilder.loadTexts: pduManufacturer.setDescription('The Device Manufacturer Name (e.g. Hewlett-Packard).')
pduFirmwareVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduFirmwareVersion.setStatus('mandatory')
if mibBuilder.loadTexts: pduFirmwareVersion.setDescription('The firmware revision level of the device.')
pduPartNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduPartNumber.setStatus('mandatory')
if mibBuilder.loadTexts: pduPartNumber.setDescription('The device part number.')
pduSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduSerialNumber.setStatus('mandatory')
if mibBuilder.loadTexts: pduSerialNumber.setDescription('The deice serial number.')
pduStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("degraded", 3), ("failed", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduStatus.setStatus('mandatory')
if mibBuilder.loadTexts: pduStatus.setDescription('The overall status of the device. A value of OK(2) indicates the device is operating normally. A value of degraded(3) indicates the device is operating with warning indicators. A value of failed(4) indicates the device is operating with critical indicators.')
pduControllable = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("yes", 1), ("no", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduControllable.setStatus('mandatory')
if mibBuilder.loadTexts: pduControllable.setDescription('This object indicates whether or not the device is controllable.')
pduInputTable = MibTable((1, 3, 6, 1, 4, 1, 232, 165, 2, 2, 1), )
if mibBuilder.loadTexts: pduInputTable.setStatus('mandatory')
if mibBuilder.loadTexts: pduInputTable.setDescription('The Aggregate Object with number of entries equal to NumOfPdu and including the PduInput group.')
pduInputEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 165, 2, 2, 1, 1), ).setIndexNames((0, "CPQPOWER-MIB", "pduInputIndex"))
if mibBuilder.loadTexts: pduInputEntry.setStatus('mandatory')
if mibBuilder.loadTexts: pduInputEntry.setDescription('The input table entry containing the voltage and current for the PDU')
pduInputIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduInputIndex.setStatus('mandatory')
if mibBuilder.loadTexts: pduInputIndex.setDescription('Index for the PduInputEntry table.')
inputVoltage = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: inputVoltage.setStatus('mandatory')
if mibBuilder.loadTexts: inputVoltage.setDescription('The measured input voltage from the PDU meters in volts.')
inputCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: inputCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: inputCurrent.setDescription('The measured input current from the PDU meters in amps.')
pduOutputTable = MibTable((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1), )
if mibBuilder.loadTexts: pduOutputTable.setStatus('mandatory')
if mibBuilder.loadTexts: pduOutputTable.setDescription('The Aggregate Object with number of entries equal to NumOfPdu and including the PduInput group.')
pduOutputEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1, 1), ).setIndexNames((0, "CPQPOWER-MIB", "pduOutputIndex"))
if mibBuilder.loadTexts: pduOutputEntry.setStatus('mandatory')
if mibBuilder.loadTexts: pduOutputEntry.setDescription('The input table entry containing the name, heat load, current load, power load, firmware, etc.')
pduOutputIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduOutputIndex.setStatus('mandatory')
if mibBuilder.loadTexts: pduOutputIndex.setDescription('Index for the PduOutputEntry table.')
pduOutputLoad = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 200))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduOutputLoad.setStatus('mandatory')
if mibBuilder.loadTexts: pduOutputLoad.setDescription('The device output load in percent of rated capacity. A value of -1 will be returned if the heat load is unable to be measured.')
pduOutputHeat = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduOutputHeat.setStatus('mandatory')
if mibBuilder.loadTexts: pduOutputHeat.setDescription('The total heat load measured on the PDU in BTUs. A value of -1 will be returned if the heat load is unable to be measured.')
pduOutputPower = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduOutputPower.setStatus('mandatory')
if mibBuilder.loadTexts: pduOutputPower.setDescription('The total power load measured on the PDU in watts. A value of -1 will be returned if the power load is unable to be measured.')
pduOutputNumBreakers = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pduOutputNumBreakers.setStatus('mandatory')
if mibBuilder.loadTexts: pduOutputNumBreakers.setDescription('The number of breakers for the device. This variable indicates the number of rows in the breakers table.')
pduOutputBreakerTable = MibTable((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2), )
if mibBuilder.loadTexts: pduOutputBreakerTable.setStatus('mandatory')
if mibBuilder.loadTexts: pduOutputBreakerTable.setDescription('List of breaker table entries. The number of entries is given by pduOutputNumBreakers .')
pduOutputBreakerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2, 1), ).setIndexNames((0, "CPQPOWER-MIB", "pduOutputIndex"), (0, "CPQPOWER-MIB", "breakerIndex"))
if mibBuilder.loadTexts: pduOutputBreakerEntry.setStatus('mandatory')
if mibBuilder.loadTexts: pduOutputBreakerEntry.setDescription('An entry containing information applicable to an breaker.')
breakerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: breakerIndex.setStatus('mandatory')
if mibBuilder.loadTexts: breakerIndex.setDescription('The breaker identifier.')
breakerVoltage = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: breakerVoltage.setStatus('mandatory')
if mibBuilder.loadTexts: breakerVoltage.setDescription('The breaker voltage in volts.')
breakerCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: breakerCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: breakerCurrent.setDescription('The breaker current draw in Amps.')
breakerPercentLoad = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: breakerPercentLoad.setStatus('mandatory')
if mibBuilder.loadTexts: breakerPercentLoad.setDescription('The breaker load in percent.')
breakerStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("normal", 1), ("overloadWarning", 2), ("overloadCritical", 3), ("voltageRangeWarning", 4), ("voltageRangeCritical", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: breakerStatus.setStatus('mandatory')
if mibBuilder.loadTexts: breakerStatus.setDescription('This object indicates the status of the breaker. A value of normal(1) indicates the breaker is operating normally. A value of overloadWarning(2) indicates the breaker has an overload warning. A value of overloadCritical(3) indicates the breaker is overloaded. A value of voltageRangeWarning(4) indicates the breaker voltage is out of tolerance by 10-20%. A value of voltageRangeCritical(5) indicates the breaker voltage is out of tolerance by more than 20%. Note: Overload status has priority over voltage tolerance status.')
upsIdentManufacturer = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsIdentManufacturer.setStatus('mandatory')
if mibBuilder.loadTexts: upsIdentManufacturer.setDescription('The UPS Manufacturer Name (e.g. Hewlett-Packard).')
upsIdentModel = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsIdentModel.setStatus('mandatory')
if mibBuilder.loadTexts: upsIdentModel.setDescription('The UPS Model;Part number;Serial number (e.g. HP R5500 XR;204451-B21;B00123456W).')
upsIdentSoftwareVersions = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsIdentSoftwareVersions.setStatus('mandatory')
if mibBuilder.loadTexts: upsIdentSoftwareVersions.setDescription('The firmware revision level(s) of the UPS microcontroller(s).')
upsIdentOemCode = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsIdentOemCode.setStatus('mandatory')
if mibBuilder.loadTexts: upsIdentOemCode.setDescription('A binary code indicating vendor. This should be a ?0x0c? for HP')
upsBatTimeRemaining = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsBatTimeRemaining.setStatus('mandatory')
if mibBuilder.loadTexts: upsBatTimeRemaining.setDescription('Battery run time in seconds before UPS turns off due to low battery.')
upsBatVoltage = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 2, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsBatVoltage.setStatus('mandatory')
if mibBuilder.loadTexts: upsBatVoltage.setDescription('Battery voltage as reported by the UPS meters.')
upsBatCurrent = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 2, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-2147483648, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsBatCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: upsBatCurrent.setDescription('Battery Current as reported by the UPS metering. Current is positive when discharging, negative when recharging the battery.')
upsBatCapacity = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 2, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsBatCapacity.setStatus('mandatory')
if mibBuilder.loadTexts: upsBatCapacity.setDescription('Battery percent charge.')
upsBatteryAbmStatus = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 2, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("batteryCharging", 1), ("batteryDischarging", 2), ("batteryFloating", 3), ("batteryResting", 4), ("unknown", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsBatteryAbmStatus.setStatus('mandatory')
if mibBuilder.loadTexts: upsBatteryAbmStatus.setDescription('Gives the status of the Advanced Battery Management; batteryFloating(3) status means that the charger is temporarily charging the battery to its float voltage; batteryResting(4) is the state when the battery is fully charged and none of the other actions (charging/discharging/floating) is being done.')
upsInputFrequency = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsInputFrequency.setStatus('mandatory')
if mibBuilder.loadTexts: upsInputFrequency.setDescription('The utility line frequency in tenths of Hz.')
upsInputLineBads = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsInputLineBads.setStatus('mandatory')
if mibBuilder.loadTexts: upsInputLineBads.setDescription('The number of times the Input was out of tolerance in voltage or frequency.')
upsInputNumPhases = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsInputNumPhases.setStatus('mandatory')
if mibBuilder.loadTexts: upsInputNumPhases.setDescription('')
upsInputTable = MibTable((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 4), )
if mibBuilder.loadTexts: upsInputTable.setStatus('mandatory')
if mibBuilder.loadTexts: upsInputTable.setDescription('The Aggregate Object with number of entries equal to NumPhases and including the UpsInput group.')
upsInputEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 4, 1), ).setIndexNames((0, "CPQPOWER-MIB", "upsInputPhase"))
if mibBuilder.loadTexts: upsInputEntry.setStatus('mandatory')
if mibBuilder.loadTexts: upsInputEntry.setDescription('The input table entry containing the current, voltage, etc.')
upsInputPhase = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsInputPhase.setStatus('mandatory')
if mibBuilder.loadTexts: upsInputPhase.setDescription('The number of the phase. Serves as index for input table.')
upsInputVoltage = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsInputVoltage.setStatus('mandatory')
if mibBuilder.loadTexts: upsInputVoltage.setDescription('The measured input voltage from the UPS meters in volts.')
upsInputCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsInputCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: upsInputCurrent.setDescription('The measured input current from the UPS meters in amps.')
upsInputWatts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 4, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsInputWatts.setStatus('mandatory')
if mibBuilder.loadTexts: upsInputWatts.setDescription('The measured input real power in watts.')
upsInputSource = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("other", 1), ("none", 2), ("primaryUtility", 3), ("bypassFeed", 4), ("secondaryUtility", 5), ("generator", 6), ("flywheel", 7), ("fuelcell", 8)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsInputSource.setStatus('mandatory')
if mibBuilder.loadTexts: upsInputSource.setDescription('The present external source of input power. The enumeration none(2) indicates that there is no external source of power, for example, the UPS is On Battery (an internal source). The bypassFeed(4) can only be used when the Bypass source is known to be a separate utility feed than the primaryUtility(3).')
upsOutputLoad = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 200))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsOutputLoad.setStatus('mandatory')
if mibBuilder.loadTexts: upsOutputLoad.setDescription('The UPS output load in percent of rated capacity.')
upsOutputFrequency = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsOutputFrequency.setStatus('mandatory')
if mibBuilder.loadTexts: upsOutputFrequency.setDescription('The measured UPS output frequency in tenths of Hz.')
upsOutputNumPhases = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsOutputNumPhases.setStatus('mandatory')
if mibBuilder.loadTexts: upsOutputNumPhases.setDescription('The number of metered output phases, serves as the table index.')
upsOutputTable = MibTable((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 4), )
if mibBuilder.loadTexts: upsOutputTable.setStatus('mandatory')
if mibBuilder.loadTexts: upsOutputTable.setDescription('The Aggregate Object with number of entries equal to NumPhases and including the UpsOutput group.')
upsOutputEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 4, 1), ).setIndexNames((0, "CPQPOWER-MIB", "upsOutputPhase"))
if mibBuilder.loadTexts: upsOutputEntry.setStatus('mandatory')
if mibBuilder.loadTexts: upsOutputEntry.setDescription('Output Table Entry containing voltage, current, etc.')
upsOutputPhase = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsOutputPhase.setStatus('mandatory')
if mibBuilder.loadTexts: upsOutputPhase.setDescription('The number {1..3} of the output phase.')
upsOutputVoltage = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsOutputVoltage.setStatus('mandatory')
if mibBuilder.loadTexts: upsOutputVoltage.setDescription('The measured output voltage from the UPS metering in volts.')
upsOutputCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsOutputCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: upsOutputCurrent.setDescription('The measured UPS output current in amps.')
upsOutputWatts = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 4, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsOutputWatts.setStatus('mandatory')
if mibBuilder.loadTexts: upsOutputWatts.setDescription('The measured real output power in watts.')
upsOutputSource = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("other", 1), ("none", 2), ("normal", 3), ("bypass", 4), ("battery", 5), ("booster", 6), ("reducer", 7), ("parallelCapacity", 8), ("parallelRedundant", 9), ("highEfficiencyMode", 10)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsOutputSource.setStatus('mandatory')
if mibBuilder.loadTexts: upsOutputSource.setDescription('The present source of output power. The enumeration none(2) indicates that there is no source of output power (and therefore no output power), for example, the system has opened the output breaker.')
upsBypassFrequency = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 5, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsBypassFrequency.setStatus('mandatory')
if mibBuilder.loadTexts: upsBypassFrequency.setDescription('The bypass frequency in tenths of Hz.')
upsBypassNumPhases = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 5, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsBypassNumPhases.setStatus('mandatory')
if mibBuilder.loadTexts: upsBypassNumPhases.setDescription('The number of lines in the UPS bypass table.')
upsBypassTable = MibTable((1, 3, 6, 1, 4, 1, 232, 165, 3, 5, 3), )
if mibBuilder.loadTexts: upsBypassTable.setStatus('mandatory')
if mibBuilder.loadTexts: upsBypassTable.setDescription('')
upsBypassEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 165, 3, 5, 3, 1), ).setIndexNames((0, "CPQPOWER-MIB", "upsBypassPhase"))
if mibBuilder.loadTexts: upsBypassEntry.setStatus('mandatory')
if mibBuilder.loadTexts: upsBypassEntry.setDescription('Entry in the UpsBypassTable.')
upsBypassPhase = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 5, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 6))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsBypassPhase.setStatus('mandatory')
if mibBuilder.loadTexts: upsBypassPhase.setDescription('The Bypass Phase, index for the table.')
upsBypassVoltage = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 5, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsBypassVoltage.setStatus('mandatory')
if mibBuilder.loadTexts: upsBypassVoltage.setDescription('The measured UPS bypass voltage in volts.')
upsEnvAmbientTemp = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-100, 200))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsEnvAmbientTemp.setStatus('mandatory')
if mibBuilder.loadTexts: upsEnvAmbientTemp.setDescription('The reading of the ambient temperature in the vicinity of the UPS or SNMP agent.')
upsEnvAmbientLowerLimit = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-100, 200))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsEnvAmbientLowerLimit.setStatus('mandatory')
if mibBuilder.loadTexts: upsEnvAmbientLowerLimit.setDescription('The Lower Limit of the ambient temperature; if UpsEnvAmbientTemp falls below this value, the UpsAmbientTempBad alarm will occur.')
upsEnvAmbientUpperLimit = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-100, 200))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsEnvAmbientUpperLimit.setStatus('mandatory')
if mibBuilder.loadTexts: upsEnvAmbientUpperLimit.setDescription('The Upper Limit of the ambient temperature; if UpsEnvAmbientTemp rises above this value, the UpsAmbientTempBad alarm will occur. This value should be greater than UpsEnvAmbientLowerLimit.')
upsEnvAmbientHumidity = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsEnvAmbientHumidity.setStatus('mandatory')
if mibBuilder.loadTexts: upsEnvAmbientHumidity.setDescription('The reading of the ambient humidity in the vicinity of the UPS or SNMP agent.')
upsEnvRemoteTemp = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-100, 200))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsEnvRemoteTemp.setStatus('mandatory')
if mibBuilder.loadTexts: upsEnvRemoteTemp.setDescription('The reading of a remote temperature sensor connected to the UPS or SNMP agent.')
upsEnvRemoteHumidity = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsEnvRemoteHumidity.setStatus('mandatory')
if mibBuilder.loadTexts: upsEnvRemoteHumidity.setDescription('The reading of a remote humidity sensor connected to the UPS or SNMP agent.')
upsEnvNumContacts = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsEnvNumContacts.setStatus('mandatory')
if mibBuilder.loadTexts: upsEnvNumContacts.setDescription('The number of Contacts in the UpsContactsTable. This object indicates the number of rows in the UpsContactsTable.')
upsContactsTable = MibTable((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 8), )
if mibBuilder.loadTexts: upsContactsTable.setStatus('mandatory')
if mibBuilder.loadTexts: upsContactsTable.setDescription('A list of Contact Sensing table entries. The number of entries is given by the value of UpsEnvNumContacts.')
upsContactsTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 8, 1), ).setIndexNames((0, "CPQPOWER-MIB", "upsContactIndex"))
if mibBuilder.loadTexts: upsContactsTableEntry.setStatus('mandatory')
if mibBuilder.loadTexts: upsContactsTableEntry.setDescription('An entry containing information applicable to a particular Contact input.')
upsContactIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 8, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsContactIndex.setStatus('mandatory')
if mibBuilder.loadTexts: upsContactIndex.setDescription('The Contact identifier; identical to the Contact Number.')
upsContactType = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 8, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("normallyOpen", 1), ("normallyClosed", 2), ("anyChange", 3), ("notUsed", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsContactType.setStatus('mandatory')
if mibBuilder.loadTexts: upsContactType.setDescription("The normal state for this contact. The 'other' state is the Active state for generating the UpstdContactActiveNotice trap. If anyChange(3) is selected, then this trap is sent any time the contact changes to either Open or Closed. No traps are sent if the Contact is set to notUsed(4). In many cases, the configuration for Contacts may be done by other means, so this object may be read-only.")
upsContactState = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 8, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("open", 1), ("closed", 2), ("openWithNotice", 3), ("closedWithNotice", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsContactState.setStatus('mandatory')
if mibBuilder.loadTexts: upsContactState.setDescription('The current state of the Contact input; the value is based on the open/closed input state and the setting for UpsContactType. When entering the openWithNotice(3) and closedWithNotice(4) states, no entries added to the UpsAlarmTable, but the UpstdContactActiveNotice trap is sent.')
upsContactDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 8, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsContactDescr.setStatus('mandatory')
if mibBuilder.loadTexts: upsContactDescr.setDescription('A label identifying the Contact. This object should be set by the administrator.')
upsEnvRemoteTempLowerLimit = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-100, 200))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsEnvRemoteTempLowerLimit.setStatus('mandatory')
if mibBuilder.loadTexts: upsEnvRemoteTempLowerLimit.setDescription('The Lower Limit of the remote temperature; if UpsEnvRemoteTemp falls below this value, the UpsRemoteTempBad alarm will occur.')
upsEnvRemoteTempUpperLimit = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-100, 200))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsEnvRemoteTempUpperLimit.setStatus('mandatory')
if mibBuilder.loadTexts: upsEnvRemoteTempUpperLimit.setDescription('The Upper Limit of the remote temperature; if UpsEnvRemoteTemp rises above this value, the UpsRemoteTempBad alarm will occur. This value should be greater than UpsEnvRemoteTempLowerLimit.')
upsEnvRemoteHumidityLowerLimit = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsEnvRemoteHumidityLowerLimit.setStatus('mandatory')
if mibBuilder.loadTexts: upsEnvRemoteHumidityLowerLimit.setDescription('The Lower Limit of the remote humidity reading; if UpsEnvRemoteHumidity falls below this value, the UpsRemoteHumidityBad alarm will occur.')
upsEnvRemoteHumidityUpperLimit = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsEnvRemoteHumidityUpperLimit.setStatus('mandatory')
if mibBuilder.loadTexts: upsEnvRemoteHumidityUpperLimit.setDescription('The Upper Limit of the remote humidity reading; if UpsEnvRemoteHumidity rises above this value, the UpsRemoteHumidityBad alarm will occur. This value should be greater than UpsEnvRemoteHumidityLowerLimit.')
upsTestBattery = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 7, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("startTest", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsTestBattery.setStatus('mandatory')
if mibBuilder.loadTexts: upsTestBattery.setDescription('Setting this variable to startTest initiates the battery test. All other set values are invalid.')
upsTestBatteryStatus = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 7, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("unknown", 1), ("passed", 2), ("failed", 3), ("inProgress", 4), ("notSupported", 5), ("inhibited", 6), ("scheduled", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsTestBatteryStatus.setStatus('mandatory')
if mibBuilder.loadTexts: upsTestBatteryStatus.setDescription('Reading this enumerated value gives an indication of the UPS Battery test status.')
upsTestTrap = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 7, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("startTestTrap", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsTestTrap.setStatus('mandatory')
if mibBuilder.loadTexts: upsTestTrap.setDescription('Setting this variable to startTestTrap initiates a TrapTest is sent out from HPMM. All other set values are invalid.')
upsControlOutputOffDelay = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 8, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsControlOutputOffDelay.setStatus('mandatory')
if mibBuilder.loadTexts: upsControlOutputOffDelay.setDescription('Setting this value to other than zero will cause the UPS output to turn off after the number of seconds. Setting it to 0 will cause an attempt to abort a pending shutdown.')
upsControlOutputOnDelay = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 8, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsControlOutputOnDelay.setStatus('mandatory')
if mibBuilder.loadTexts: upsControlOutputOnDelay.setDescription('Setting this value to other than zero will cause the UPS output to turn on after the number of seconds. Setting it to 0 will cause an attempt to abort a pending startup.')
upsControlOutputOffTrapDelay = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 8, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsControlOutputOffTrapDelay.setStatus('mandatory')
if mibBuilder.loadTexts: upsControlOutputOffTrapDelay.setDescription('When UpsControlOutputOffDelay reaches this value, a trap will be sent.')
upsControlOutputOnTrapDelay = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 8, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsControlOutputOnTrapDelay.setStatus('deprecated')
if mibBuilder.loadTexts: upsControlOutputOnTrapDelay.setDescription('When UpsControlOutputOnDelay reaches this value, a UpsOutputOff trap will be sent.')
upsControlToBypassDelay = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 8, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsControlToBypassDelay.setStatus('mandatory')
if mibBuilder.loadTexts: upsControlToBypassDelay.setDescription('Setting this value to other than zero will cause the UPS output to go to Bypass after the number of seconds. If the Bypass is unavailable, this may cause the UPS to not supply power to the load. Setting it to 0 will cause an attempt to abort a pending shutdown.')
upsLoadShedSecsWithRestart = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 8, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsLoadShedSecsWithRestart.setStatus('mandatory')
if mibBuilder.loadTexts: upsLoadShedSecsWithRestart.setDescription("Setting this value will cause the UPS output to turn off after the set number of seconds, then restart (after a UPS-defined 'down time') when the utility is again available. Unlike UpsControlOutputOffDelay, which might or might not, this object always maps to the XCP 0x8A Load Dump & Restart command, so the desired shutdown and restart behavior is guaranteed to happen. Once set, this command cannot be aborted. This is the preferred Control object to use when performing an On Battery OS Shutdown.")
upsConfigOutputVoltage = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsConfigOutputVoltage.setStatus('mandatory')
if mibBuilder.loadTexts: upsConfigOutputVoltage.setDescription('The nominal UPS Output voltage per phase in volts.')
upsConfigInputVoltage = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsConfigInputVoltage.setStatus('mandatory')
if mibBuilder.loadTexts: upsConfigInputVoltage.setDescription('The nominal UPS Input voltage per phase in volts.')
upsConfigOutputWatts = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsConfigOutputWatts.setStatus('mandatory')
if mibBuilder.loadTexts: upsConfigOutputWatts.setDescription('The nominal UPS available real power output in watts.')
upsConfigOutputFreq = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsConfigOutputFreq.setStatus('mandatory')
if mibBuilder.loadTexts: upsConfigOutputFreq.setDescription('The nominal output frequency in tenths of Hz.')
upsConfigDateAndTime = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 22))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsConfigDateAndTime.setStatus('mandatory')
if mibBuilder.loadTexts: upsConfigDateAndTime.setDescription('Date and time information for the UPS. Setting this variable will initiate a set UPS date and time to this value. Reading this variable will return the UPS time and date. This value is not referenced to sysUpTime. It is simply the clock value from the UPS real time clock. Format is as follows: MM/DD/YYYY:HH:MM:SS.')
upsConfigLowOutputVoltageLimit = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsConfigLowOutputVoltageLimit.setStatus('mandatory')
if mibBuilder.loadTexts: upsConfigLowOutputVoltageLimit.setDescription('The Lower limit for acceptable Output Voltage, per the UPS specifications.')
upsConfigHighOutputVoltageLimit = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsConfigHighOutputVoltageLimit.setStatus('mandatory')
if mibBuilder.loadTexts: upsConfigHighOutputVoltageLimit.setDescription('The Upper limit for acceptable Output Voltage, per the UPS specifications.')
upsNumReceptacles = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsNumReceptacles.setStatus('mandatory')
if mibBuilder.loadTexts: upsNumReceptacles.setDescription('The number of independently controllable Receptacles, as described in the UpsRecepTable.')
upsRecepTable = MibTable((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2), )
if mibBuilder.loadTexts: upsRecepTable.setStatus('mandatory')
if mibBuilder.loadTexts: upsRecepTable.setDescription('The Aggregate Object with number of entries equal to NumReceptacles and including the UpsRecep group.')
upsRecepEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1), ).setIndexNames((0, "CPQPOWER-MIB", "upsRecepIndex"))
if mibBuilder.loadTexts: upsRecepEntry.setStatus('mandatory')
if mibBuilder.loadTexts: upsRecepEntry.setDescription('The Recep table entry, etc.')
upsRecepIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsRecepIndex.setStatus('mandatory')
if mibBuilder.loadTexts: upsRecepIndex.setDescription('The number of the Receptacle. Serves as index for Receptacle table.')
upsRecepStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("on", 1), ("off", 2), ("pendingOff", 3), ("pendingOn", 4), ("unknown", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsRecepStatus.setStatus('mandatory')
if mibBuilder.loadTexts: upsRecepStatus.setDescription('The Recep Status 1=On/Close, 2=Off/Open, 3=On w/Pending Off, 4=Off w/Pending ON, 5=Unknown.')
upsRecepOffDelaySecs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsRecepOffDelaySecs.setStatus('mandatory')
if mibBuilder.loadTexts: upsRecepOffDelaySecs.setDescription('The Delay until the Receptacle is turned Off. Setting this value to other than -1 will cause the UPS output to turn off after the number of seconds (0 is immediately). Setting it to -1 will cause an attempt to abort a pending shutdown. When this object is set while the UPS is On Battery, it is not necessary to set UpsRecepOnDelaySecs, since the outlet will turn back on automatically when power is available again.')
upsRecepOnDelaySecs = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsRecepOnDelaySecs.setStatus('mandatory')
if mibBuilder.loadTexts: upsRecepOnDelaySecs.setDescription(' The Delay until the Receptacle is turned On. Setting this value to other than -1 will cause the UPS output to turn on after the number of seconds (0 is immediately). Setting it to -1 will cause an attempt to abort a pending restart.')
upsRecepAutoOffDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 32767))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsRecepAutoOffDelay.setStatus('mandatory')
if mibBuilder.loadTexts: upsRecepAutoOffDelay.setDescription('The delay after going On Battery until the Receptacle is automatically turned Off. A value of -1 means that this Output should never be turned Off automatically, but must be turned Off only by command. Values from 0 to 30 are valid, but probably innappropriate. The AutoOffDelay can be used to prioritize loads in the event of a prolonged power outage; less critical loads will turn off earlier to extend battery time for the more critical loads. If the utility power is restored before the AutoOff delay counts down to 0 on an outlet, that outlet will not turn Off.')
upsRecepAutoOnDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 32767))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsRecepAutoOnDelay.setStatus('mandatory')
if mibBuilder.loadTexts: upsRecepAutoOnDelay.setDescription('Seconds delay after the Outlet is signaled to turn On before the Output is Automatically turned ON. A value of -1 means that this Output should never be turned On automatically, but only when specifically commanded to do so. A value of 0 means that the Receptacle should come On immediately at power-up or for an On command.')
upsRecepShedSecsWithRestart = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsRecepShedSecsWithRestart.setStatus('mandatory')
if mibBuilder.loadTexts: upsRecepShedSecsWithRestart.setDescription("Setting this value will cause the UPS output to turn off after the set number of seconds, then restart (after a UPS-defined 'down time') when the utility is again available. Unlike UpsRecepOffDelaySecs, which might or might not, this object always maps to the XCP 0x8A Load Dump & Restart command, so the desired shutdown and restart behavior is guaranteed to happen. Once set, this command cannot be aborted.")
upsTopologyType = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 11, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 32767))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsTopologyType.setStatus('mandatory')
if mibBuilder.loadTexts: upsTopologyType.setDescription("Value which denotes the type of UPS by its power topology. Values are the same as those described in the XCP Topology block's Overall Topology field.")
upsTopoMachineCode = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 11, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 32767))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsTopoMachineCode.setStatus('mandatory')
if mibBuilder.loadTexts: upsTopoMachineCode.setDescription("ID Value which denotes the Compaq/HP model of the UPS for software. Values are the same as those described in the XCP Configuration block's Machine Code field.")
upsTopoUnitNumber = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 11, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: upsTopoUnitNumber.setStatus('mandatory')
if mibBuilder.loadTexts: upsTopoUnitNumber.setDescription("Identifies which unit and what type of data is being reported. A value of 0 means that this MIB information comes from the top-level system view (eg, manifold module or system bypass cabinet reporting total system output). Standalone units also use a value of 0, since they are the 'full system' view. A value of 1 or higher indicates the number of the module in the system which is reporting only its own data in the HP MIB objects.")
upsTopoPowerStrategy = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 11, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("highAlert", 1), ("standard", 2), ("enableHighEfficiency", 3), ("immediateHighEfficiency", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: upsTopoPowerStrategy.setStatus('mandatory')
if mibBuilder.loadTexts: upsTopoPowerStrategy.setDescription('Value which denotes which Power Strategy is currently set for the UPS. The values are: highAlert(1) - The UPS shall optimize its operating state to maximize its power-protection levels. This mode will be held for at most 24 hours. standard(2) - Balanced, normal power protection strategy. UPS will not enter HE operating mode from this setting. enableHighEfficiency(3) - The UPS is enabled to enter HE operating mode to optimize its operating state to maximize its efficiency, when conditions change to permit it (as determined by the UPS). forceHighEfficiency(4) - If this value is permitted to be Set for this UPS, and if conditions permit, requires the UPS to enter High Efficiency mode now, without delay (for as long as utility conditions permit). After successfully set to forceHighEfficiency(4), UpsTopoPowerStrategy changes to value enableHighEfficiency(3). UpsOutputSource will indicate if the UPS status is actually operating in High Efficiency mode.')
pdrName = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pdrName.setStatus('mandatory')
if mibBuilder.loadTexts: pdrName.setDescription('The string identify the device.')
pdrModel = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrModel.setStatus('mandatory')
if mibBuilder.loadTexts: pdrModel.setDescription('The Device Model.')
pdrManufacturer = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrManufacturer.setStatus('mandatory')
if mibBuilder.loadTexts: pdrManufacturer.setDescription('The Device Manufacturer Name (e.g. Hewlett-Packard).')
pdrFirmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrFirmwareVersion.setStatus('mandatory')
if mibBuilder.loadTexts: pdrFirmwareVersion.setDescription('The firmware revision level of the device.')
pdrPartNumber = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPartNumber.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPartNumber.setDescription('The device part number.')
pdrSerialNumber = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrSerialNumber.setStatus('mandatory')
if mibBuilder.loadTexts: pdrSerialNumber.setDescription("The PDR's serial number.")
pdrVARating = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrVARating.setStatus('mandatory')
if mibBuilder.loadTexts: pdrVARating.setDescription('The VA Rating of this PDR (all phases)')
pdrNominalOutputVoltage = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrNominalOutputVoltage.setStatus('mandatory')
if mibBuilder.loadTexts: pdrNominalOutputVoltage.setDescription('The nominal Output Voltage may differ from the nominal Input Voltage if the PDR has an input transformer')
pdrNumPhases = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 3))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrNumPhases.setStatus('mandatory')
if mibBuilder.loadTexts: pdrNumPhases.setDescription('The number of phases for this PDR')
pdrNumPanels = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrNumPanels.setStatus('mandatory')
if mibBuilder.loadTexts: pdrNumPanels.setDescription('The number of panels or subfeeds in this PDR')
pdrNumBreakers = MibScalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrNumBreakers.setStatus('mandatory')
if mibBuilder.loadTexts: pdrNumBreakers.setDescription('The number of breakers in this PDR')
pdrPanelTable = MibTable((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1), )
if mibBuilder.loadTexts: pdrPanelTable.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelTable.setDescription('Aggregate Object with number of entries equal to pdrNumPanels')
pdrPanelEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1), ).setIndexNames((0, "CPQPOWER-MIB", "pdrPanelIndex"))
if mibBuilder.loadTexts: pdrPanelEntry.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelEntry.setDescription('The panel table entry containing all power parameters for each panel.')
pdrPanelIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelIndex.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelIndex.setDescription('Index for the pdrPanelEntry table.')
pdrPanelFrequency = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelFrequency.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelFrequency.setDescription('The present frequency reading for the panel voltage.')
pdrPanelPower = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelPower.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelPower.setDescription('The present power of the panel.')
pdrPanelRatedCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelRatedCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelRatedCurrent.setDescription('The present rated current of the panel.')
pdrPanelMonthlyKWH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelMonthlyKWH.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelMonthlyKWH.setDescription('The accumulated KWH for this panel since the beginning of this calendar month or since the last reset.')
pdrPanelYearlyKWH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelYearlyKWH.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelYearlyKWH.setDescription('The accumulated KWH for this panel since the beginning of this calendar year or since the last reset.')
pdrPanelTotalKWH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelTotalKWH.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelTotalKWH.setDescription('The accumulated KWH for this panel since it was put into service or since the last reset.')
pdrPanelVoltageA = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelVoltageA.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelVoltageA.setDescription('The measured panel output voltage.')
pdrPanelVoltageB = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelVoltageB.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelVoltageB.setDescription('The measured panel output voltage.')
pdrPanelVoltageC = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelVoltageC.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelVoltageC.setDescription('The measured panel output voltage.')
pdrPanelCurrentA = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelCurrentA.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelCurrentA.setDescription('The measured panel output current.')
pdrPanelCurrentB = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelCurrentB.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelCurrentB.setDescription('The measured panel output current.')
pdrPanelCurrentC = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelCurrentC.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelCurrentC.setDescription('The measured panel output current.')
pdrPanelLoadA = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 200))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelLoadA.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelLoadA.setDescription('The percentage of load is the ratio of each output current to the rated output current to the panel.')
pdrPanelLoadB = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 200))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelLoadB.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelLoadB.setDescription('The percentage of load is the ratio of each output current to the rated output current to the panel.')
pdrPanelLoadC = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 200))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrPanelLoadC.setStatus('mandatory')
if mibBuilder.loadTexts: pdrPanelLoadC.setDescription('The percentage of load is the ratio of each output current to the rated output current to the panel.')
pdrBreakerTable = MibTable((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1), )
if mibBuilder.loadTexts: pdrBreakerTable.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerTable.setDescription('List of breaker table entries. The number of entries is given by pdrNumBreakers for this panel.')
pdrBreakerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1), ).setIndexNames((0, "CPQPOWER-MIB", "pdrPanelIndex"), (0, "CPQPOWER-MIB", "pdrBreakerIndex"))
if mibBuilder.loadTexts: pdrBreakerEntry.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerEntry.setDescription('An entry containing information applicable to a particular output breaker of a particular panel.')
pdrBreakerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerIndex.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerIndex.setDescription('The index of breakers. 42 breakers in each panel, arranged in odd and even columns')
pdrBreakerPanel = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerPanel.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerPanel.setDescription('The index of panel that these breakers are installed on.')
pdrBreakerNumPosition = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerNumPosition.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerNumPosition.setDescription('The position of this breaker in the panel, 1-phase breaker or n-m breaker for 2-phase or n-m-k breaker for 3-phase.')
pdrBreakerNumPhases = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerNumPhases.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerNumPhases.setDescription('The number of phase for this particular breaker.')
pdrBreakerNumSequence = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerNumSequence.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerNumSequence.setDescription('The sequence of this breaker. i.e. 1 for single phase 1,2 for 2-phase or 1,2,3 for 3-phase.')
pdrBreakerRatedCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerRatedCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerRatedCurrent.setDescription('The rated current in Amps for this particular breaker.')
pdrBreakerMonthlyKWH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerMonthlyKWH.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerMonthlyKWH.setDescription('The accumulated KWH for this breaker since the beginning of this calendar month or since the last reset.')
pdrBreakerYearlyKWH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerYearlyKWH.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerYearlyKWH.setDescription('The accumulated KWH for this breaker since the beginning of this calendar year or since the last reset.')
pdrBreakerTotalKWH = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerTotalKWH.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerTotalKWH.setDescription('The accumulated KWH for this breaker since it was put into service or since the last reset.')
pdrBreakerCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerCurrent.setDescription('The measured output current for this breaker Current.')
pdrBreakerCurrentPercent = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 200))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerCurrentPercent.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerCurrentPercent.setDescription('The ratio of output current over rated current for each breaker.')
pdrBreakerPower = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerPower.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerPower.setDescription('The power for this breaker.')
pdrBreakerPercentWarning = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 200))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerPercentWarning.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerPercentWarning.setDescription('The percentage of Warning set for this breaker.')
pdrBreakerPercentOverload = MibTableColumn((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdrBreakerPercentOverload.setStatus('mandatory')
if mibBuilder.loadTexts: pdrBreakerPercentOverload.setDescription('The percentage of Overload set for this breaker.')
mibBuilder.exportSymbols("CPQPOWER-MIB", upsEnvRemoteTempUpperLimit=upsEnvRemoteTempUpperLimit, upsRecepAutoOffDelay=upsRecepAutoOffDelay, pduOutputBreakerTable=pduOutputBreakerTable, upsEnvRemoteHumidityUpperLimit=upsEnvRemoteHumidityUpperLimit, upsOutputPhase=upsOutputPhase, pduIdentIndex=pduIdentIndex, upsBypassNumPhases=upsBypassNumPhases, upsTopology=upsTopology, upsTestBatteryStatus=upsTestBatteryStatus, deviceMACAddress=deviceMACAddress, pduControllable=pduControllable, upsOutputEntry=upsOutputEntry, upsBypassFrequency=upsBypassFrequency, trapWarning=trapWarning, pdrBreakerTotalKWH=pdrBreakerTotalKWH, upsRecepAutoOnDelay=upsRecepAutoOnDelay, deviceIdentName=deviceIdentName, upsInputVoltage=upsInputVoltage, pduOutputBreakerEntry=pduOutputBreakerEntry, pdrPanelCurrentA=pdrPanelCurrentA, upsInputSource=upsInputSource, upsControlOutputOffTrapDelay=upsControlOutputOffTrapDelay, upsOutputNumPhases=upsOutputNumPhases, upsEnvRemoteHumidity=upsEnvRemoteHumidity, trapInformation=trapInformation, pdrPanelRatedCurrent=pdrPanelRatedCurrent, deviceHardwareVersion=deviceHardwareVersion, upsRecep=upsRecep, pduOutputTable=pduOutputTable, pduOutputPower=pduOutputPower, powerDevice=powerDevice, pdrPanelYearlyKWH=pdrPanelYearlyKWH, pdrName=pdrName, upsTopoMachineCode=upsTopoMachineCode, upsRecepOffDelaySecs=upsRecepOffDelaySecs, trapInfo=trapInfo, breakerIndex=breakerIndex, upsContactIndex=upsContactIndex, upsOutputSource=upsOutputSource, upsBatteryAbmStatus=upsBatteryAbmStatus, upsBatCapacity=upsBatCapacity, pdrPanelVoltageB=pdrPanelVoltageB, upsOutput=upsOutput, upsTopoUnitNumber=upsTopoUnitNumber, pduOutputIndex=pduOutputIndex, pduInputIndex=pduInputIndex, upsBattery=upsBattery, trapDeviceDetails=trapDeviceDetails, upsRecepShedSecsWithRestart=upsRecepShedSecsWithRestart, upsBypassTable=upsBypassTable, upsControlToBypassDelay=upsControlToBypassDelay, pduIdent=pduIdent, upsRecepTable=upsRecepTable, pdrPanelPower=pdrPanelPower, pdrBreakerTable=pdrBreakerTable, trapCritical=trapCritical, upsEnvAmbientLowerLimit=upsEnvAmbientLowerLimit, pdrPanelCurrentC=pdrPanelCurrentC, upsIdentModel=upsIdentModel, upsContactState=upsContactState, pduInput=pduInput, pduPartNumber=pduPartNumber, upsContactDescr=upsContactDescr, deviceManufacturer=deviceManufacturer, upsInput=upsInput, breakerStatus=breakerStatus, pdrBreakerPercentOverload=pdrBreakerPercentOverload, upsEnvAmbientHumidity=upsEnvAmbientHumidity, upsBatCurrent=upsBatCurrent, trapDescription=trapDescription, deviceSerialNumber=deviceSerialNumber, pdrBreakerCurrentPercent=pdrBreakerCurrentPercent, upsContactsTableEntry=upsContactsTableEntry, trapCleared=trapCleared, upsInputEntry=upsInputEntry, upsControlOutputOffDelay=upsControlOutputOffDelay, breakerVoltage=breakerVoltage, upsBypassPhase=upsBypassPhase, upsInputPhase=upsInputPhase, pdrNominalOutputVoltage=pdrNominalOutputVoltage, upsBatVoltage=upsBatVoltage, pduName=pduName, pdrBreakerNumSequence=pdrBreakerNumSequence, upsInputNumPhases=upsInputNumPhases, upsConfigHighOutputVoltageLimit=upsConfigHighOutputVoltageLimit, upsControlOutputOnTrapDelay=upsControlOutputOnTrapDelay, upsConfigOutputWatts=upsConfigOutputWatts, pdrPanel=pdrPanel, upsBypassEntry=upsBypassEntry, upsEnvironment=upsEnvironment, pdrPanelTotalKWH=pdrPanelTotalKWH, pdrPanelEntry=pdrPanelEntry, upsConfigOutputVoltage=upsConfigOutputVoltage, pduIdentEntry=pduIdentEntry, pdrNumPanels=pdrNumPanels, pdrManufacturer=pdrManufacturer, pdrBreaker=pdrBreaker, upsEnvAmbientUpperLimit=upsEnvAmbientUpperLimit, pduIdentTable=pduIdentTable, numOfPdu=numOfPdu, pdrPanelLoadB=pdrPanelLoadB, deviceTrapInitialization=deviceTrapInitialization, ups=ups, upsBypassVoltage=upsBypassVoltage, inputVoltage=inputVoltage, pdrPanelLoadC=pdrPanelLoadC, upsControl=upsControl, pdrPartNumber=pdrPartNumber, pdrBreakerEntry=pdrBreakerEntry, trapTest=trapTest, breakerPercentLoad=breakerPercentLoad, upsOutputCurrent=upsOutputCurrent, pduManufacturer=pduManufacturer, pduInputTable=pduInputTable, pduOutputEntry=pduOutputEntry, pduOutputHeat=pduOutputHeat, pdrPanelCurrentB=pdrPanelCurrentB, upsBatTimeRemaining=upsBatTimeRemaining, upsConfigOutputFreq=upsConfigOutputFreq, pdrFirmwareVersion=pdrFirmwareVersion, pdrBreakerPanel=pdrBreakerPanel, pduOutput=pduOutput, upsConfigLowOutputVoltageLimit=upsConfigLowOutputVoltageLimit, pdrSerialNumber=pdrSerialNumber, managementModuleIdent=managementModuleIdent, pdrBreakerPercentWarning=pdrBreakerPercentWarning, upsRecepEntry=upsRecepEntry, pdrPanelMonthlyKWH=pdrPanelMonthlyKWH, pdrBreakerRatedCurrent=pdrBreakerRatedCurrent, upsControlOutputOnDelay=upsControlOutputOnDelay, upsTopoPowerStrategy=upsTopoPowerStrategy, deviceFirmwareVersion=deviceFirmwareVersion, pdrVARating=pdrVARating, upsOutputFrequency=upsOutputFrequency, pduInputEntry=pduInputEntry, upsConfigDateAndTime=upsConfigDateAndTime, pdrBreakerNumPosition=pdrBreakerNumPosition, upsEnvRemoteTempLowerLimit=upsEnvRemoteTempLowerLimit, upsInputLineBads=upsInputLineBads, pdrPanelTable=pdrPanelTable, pdrNumPhases=pdrNumPhases, upsInputFrequency=upsInputFrequency, upsRecepOnDelaySecs=upsRecepOnDelaySecs, pduModel=pduModel, upsEnvRemoteTemp=upsEnvRemoteTemp, cpqPower=cpqPower, upsBypass=upsBypass, upsContactsTable=upsContactsTable, pdrPanelVoltageC=pdrPanelVoltageC, pduOutputNumBreakers=pduOutputNumBreakers, trapCode=trapCode, pdrPanelFrequency=pdrPanelFrequency, deviceModel=deviceModel, pdrBreakerYearlyKWH=pdrBreakerYearlyKWH, pdrBreakerCurrent=pdrBreakerCurrent, upsNumReceptacles=upsNumReceptacles, upsOutputLoad=upsOutputLoad, upsRecepStatus=upsRecepStatus, pdrPanelLoadA=pdrPanelLoadA, trapDeviceMgmtUrl=trapDeviceMgmtUrl, upsInputTable=upsInputTable, upsInputCurrent=upsInputCurrent, upsConfigInputVoltage=upsConfigInputVoltage, upsOutputTable=upsOutputTable, upsRecepIndex=upsRecepIndex, pduFirmwareVersion=pduFirmwareVersion, pduStatus=pduStatus, upsEnvAmbientTemp=upsEnvAmbientTemp, upsEnvRemoteHumidityLowerLimit=upsEnvRemoteHumidityLowerLimit, breakerCurrent=breakerCurrent, pdrModel=pdrModel, devicePartNumber=devicePartNumber, upsTestBattery=upsTestBattery, pduSerialNumber=pduSerialNumber, upsTopologyType=upsTopologyType, pdrNumBreakers=pdrNumBreakers, upsConfig=upsConfig, pdr=pdr, upsLoadShedSecsWithRestart=upsLoadShedSecsWithRestart, trapDeviceName=trapDeviceName, pdrBreakerNumPhases=pdrBreakerNumPhases, upsIdent=upsIdent, pdrIdent=pdrIdent, upsIdentOemCode=upsIdentOemCode, upsContactType=upsContactType, upsTestTrap=upsTestTrap, pdrBreakerIndex=pdrBreakerIndex, pdrPanelIndex=pdrPanelIndex, pdrBreakerMonthlyKWH=pdrBreakerMonthlyKWH, pduOutputLoad=pduOutputLoad, upsIdentSoftwareVersions=upsIdentSoftwareVersions, upsOutputWatts=upsOutputWatts, pdrBreakerPower=pdrBreakerPower, upsIdentManufacturer=upsIdentManufacturer, upsOutputVoltage=upsOutputVoltage, upsEnvNumContacts=upsEnvNumContacts, upsTest=upsTest, pdrPanelVoltageA=pdrPanelVoltageA, inputCurrent=inputCurrent, pdu=pdu, upsInputWatts=upsInputWatts)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, constraints_union, value_range_constraint, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint')
(compaq,) = mibBuilder.importSymbols('CPQHOST-MIB', 'compaq')
(if_index, if_descr) = mibBuilder.importSymbols('IF-MIB', 'ifIndex', 'ifDescr')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(sys_location, sys_descr, sys_name, sys_contact) = mibBuilder.importSymbols('SNMPv2-MIB', 'sysLocation', 'sysDescr', 'sysName', 'sysContact')
(notification_type, bits, integer32, module_identity, iso, counter64, counter32, notification_type, object_identity, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks, mib_identifier, gauge32, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'Bits', 'Integer32', 'ModuleIdentity', 'iso', 'Counter64', 'Counter32', 'NotificationType', 'ObjectIdentity', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks', 'MibIdentifier', 'Gauge32', 'IpAddress')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
cpq_power = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165))
power_device = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 1))
trap_info = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 1, 1))
management_module_ident = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 1, 2))
pdu = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 2))
pdu_ident = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 2, 1))
pdu_input = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 2, 2))
pdu_output = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 2, 3))
ups = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 3))
ups_ident = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 1))
ups_battery = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 2))
ups_input = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 3))
ups_output = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 4))
ups_bypass = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 5))
ups_environment = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 6))
ups_test = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 7))
ups_control = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 8))
ups_config = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 9))
ups_recep = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 10))
ups_topology = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 3, 11))
pdr = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 4))
pdr_ident = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 4, 1))
pdr_panel = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 4, 2))
pdr_breaker = mib_identifier((1, 3, 6, 1, 4, 1, 232, 165, 4, 3))
trap_code = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapCode.setStatus('mandatory')
if mibBuilder.loadTexts:
trapCode.setDescription("A number identifying the event for the trap that was sent. Mapped unique trap code per unique event to be used by ISEE's decoder ring.")
trap_description = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapDescription.setStatus('mandatory')
if mibBuilder.loadTexts:
trapDescription.setDescription('A string identifying the event for that last trap that was sent.')
trap_device_mgmt_url = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapDeviceMgmtUrl.setStatus('mandatory')
if mibBuilder.loadTexts:
trapDeviceMgmtUrl.setDescription('A string contains the URL for the management software.')
trap_device_details = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapDeviceDetails.setStatus('mandatory')
if mibBuilder.loadTexts:
trapDeviceDetails.setDescription('A string details information about the device, including model, serial number, part number, etc....')
trap_device_name = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapDeviceName.setStatus('mandatory')
if mibBuilder.loadTexts:
trapDeviceName.setDescription('A string contains the name of the device.')
trap_critical = notification_type((1, 3, 6, 1, 4, 1, 232, 165) + (0, 1)).setObjects(('SNMPv2-MIB', 'sysName'), ('CPQPOWER-MIB', 'trapCode'), ('CPQPOWER-MIB', 'trapDescription'), ('CPQPOWER-MIB', 'trapDeviceName'), ('CPQPOWER-MIB', 'trapDeviceDetails'), ('CPQPOWER-MIB', 'trapDeviceMgmtUrl'))
if mibBuilder.loadTexts:
trapCritical.setDescription('A critical alarm has occurred. Action: Check the Trap Details for more information.')
trap_warning = notification_type((1, 3, 6, 1, 4, 1, 232, 165) + (0, 2)).setObjects(('SNMPv2-MIB', 'sysName'), ('CPQPOWER-MIB', 'trapCode'), ('CPQPOWER-MIB', 'trapDescription'), ('CPQPOWER-MIB', 'trapDeviceName'), ('CPQPOWER-MIB', 'trapDeviceDetails'), ('CPQPOWER-MIB', 'trapDeviceMgmtUrl'))
if mibBuilder.loadTexts:
trapWarning.setDescription('A warning alarm has occurred. Action: Check the Trap Details for more information.')
trap_information = notification_type((1, 3, 6, 1, 4, 1, 232, 165) + (0, 3)).setObjects(('SNMPv2-MIB', 'sysName'), ('CPQPOWER-MIB', 'trapCode'), ('CPQPOWER-MIB', 'trapDescription'), ('CPQPOWER-MIB', 'trapDeviceName'), ('CPQPOWER-MIB', 'trapDeviceDetails'), ('CPQPOWER-MIB', 'trapDeviceMgmtUrl'))
if mibBuilder.loadTexts:
trapInformation.setDescription('An informational alarm has occurred. Action: Check the Trap Details for more information.')
trap_cleared = notification_type((1, 3, 6, 1, 4, 1, 232, 165) + (0, 4)).setObjects(('SNMPv2-MIB', 'sysName'), ('CPQPOWER-MIB', 'trapCode'), ('CPQPOWER-MIB', 'trapDescription'), ('CPQPOWER-MIB', 'trapDeviceName'), ('CPQPOWER-MIB', 'trapDeviceDetails'), ('CPQPOWER-MIB', 'trapDeviceMgmtUrl'))
if mibBuilder.loadTexts:
trapCleared.setDescription('An alarm has cleared. Action: Check the Trap Details for more information.')
trap_test = notification_type((1, 3, 6, 1, 4, 1, 232, 165) + (0, 5)).setObjects(('SNMPv2-MIB', 'sysName'), ('CPQPOWER-MIB', 'trapCode'), ('CPQPOWER-MIB', 'trapDescription'), ('CPQPOWER-MIB', 'trapDeviceName'), ('CPQPOWER-MIB', 'trapDeviceDetails'), ('CPQPOWER-MIB', 'trapDeviceMgmtUrl'))
if mibBuilder.loadTexts:
trapTest.setDescription('Test trap sent to a trap receiver to check proper reception of traps')
device_trap_initialization = notification_type((1, 3, 6, 1, 4, 1, 232, 165) + (0, 6)).setObjects(('SNMPv2-MIB', 'sysName'), ('CPQPOWER-MIB', 'deviceIdentName'))
if mibBuilder.loadTexts:
deviceTrapInitialization.setDescription('This trap is sent each time a power device is initialized.')
device_manufacturer = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
deviceManufacturer.setStatus('mandatory')
if mibBuilder.loadTexts:
deviceManufacturer.setDescription('The device manufacturer.')
device_model = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
deviceModel.setStatus('mandatory')
if mibBuilder.loadTexts:
deviceModel.setDescription('The device model.')
device_firmware_version = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
deviceFirmwareVersion.setStatus('mandatory')
if mibBuilder.loadTexts:
deviceFirmwareVersion.setDescription('The device firmware version(s).')
device_hardware_version = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
deviceHardwareVersion.setStatus('mandatory')
if mibBuilder.loadTexts:
deviceHardwareVersion.setDescription('The device hardware version.')
device_ident_name = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 5), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
deviceIdentName.setStatus('mandatory')
if mibBuilder.loadTexts:
deviceIdentName.setDescription('A string identifying the device.')
device_part_number = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 6), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
devicePartNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
devicePartNumber.setDescription('The device part number.')
device_serial_number = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
deviceSerialNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
deviceSerialNumber.setDescription('The device serial number.')
device_mac_address = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 1, 2, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
deviceMACAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
deviceMACAddress.setDescription('The device MAC address.')
num_of_pdu = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numOfPdu.setStatus('mandatory')
if mibBuilder.loadTexts:
numOfPdu.setDescription('The number of PDUs.')
pdu_ident_table = mib_table((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2))
if mibBuilder.loadTexts:
pduIdentTable.setStatus('mandatory')
if mibBuilder.loadTexts:
pduIdentTable.setDescription('The Aggregate Object with number of entries equal to NumOfPdu and including the PduIdent group.')
pdu_ident_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1)).setIndexNames((0, 'CPQPOWER-MIB', 'pduIdentIndex'))
if mibBuilder.loadTexts:
pduIdentEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
pduIdentEntry.setDescription('The ident table entry containing the name, model, manufacturer, firmware version, part number, etc.')
pdu_ident_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduIdentIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
pduIdentIndex.setDescription('Index for the PduIdentEntry table.')
pdu_name = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
pduName.setStatus('mandatory')
if mibBuilder.loadTexts:
pduName.setDescription('The string identify the device.')
pdu_model = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduModel.setStatus('mandatory')
if mibBuilder.loadTexts:
pduModel.setDescription('The Device Model.')
pdu_manufacturer = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduManufacturer.setStatus('mandatory')
if mibBuilder.loadTexts:
pduManufacturer.setDescription('The Device Manufacturer Name (e.g. Hewlett-Packard).')
pdu_firmware_version = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduFirmwareVersion.setStatus('mandatory')
if mibBuilder.loadTexts:
pduFirmwareVersion.setDescription('The firmware revision level of the device.')
pdu_part_number = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduPartNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
pduPartNumber.setDescription('The device part number.')
pdu_serial_number = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduSerialNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
pduSerialNumber.setDescription('The deice serial number.')
pdu_status = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('degraded', 3), ('failed', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
pduStatus.setDescription('The overall status of the device. A value of OK(2) indicates the device is operating normally. A value of degraded(3) indicates the device is operating with warning indicators. A value of failed(4) indicates the device is operating with critical indicators.')
pdu_controllable = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 1, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('yes', 1), ('no', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduControllable.setStatus('mandatory')
if mibBuilder.loadTexts:
pduControllable.setDescription('This object indicates whether or not the device is controllable.')
pdu_input_table = mib_table((1, 3, 6, 1, 4, 1, 232, 165, 2, 2, 1))
if mibBuilder.loadTexts:
pduInputTable.setStatus('mandatory')
if mibBuilder.loadTexts:
pduInputTable.setDescription('The Aggregate Object with number of entries equal to NumOfPdu and including the PduInput group.')
pdu_input_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 165, 2, 2, 1, 1)).setIndexNames((0, 'CPQPOWER-MIB', 'pduInputIndex'))
if mibBuilder.loadTexts:
pduInputEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
pduInputEntry.setDescription('The input table entry containing the voltage and current for the PDU')
pdu_input_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 2, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduInputIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
pduInputIndex.setDescription('Index for the PduInputEntry table.')
input_voltage = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 2, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
inputVoltage.setStatus('mandatory')
if mibBuilder.loadTexts:
inputVoltage.setDescription('The measured input voltage from the PDU meters in volts.')
input_current = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 2, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
inputCurrent.setStatus('mandatory')
if mibBuilder.loadTexts:
inputCurrent.setDescription('The measured input current from the PDU meters in amps.')
pdu_output_table = mib_table((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1))
if mibBuilder.loadTexts:
pduOutputTable.setStatus('mandatory')
if mibBuilder.loadTexts:
pduOutputTable.setDescription('The Aggregate Object with number of entries equal to NumOfPdu and including the PduInput group.')
pdu_output_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1, 1)).setIndexNames((0, 'CPQPOWER-MIB', 'pduOutputIndex'))
if mibBuilder.loadTexts:
pduOutputEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
pduOutputEntry.setDescription('The input table entry containing the name, heat load, current load, power load, firmware, etc.')
pdu_output_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduOutputIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
pduOutputIndex.setDescription('Index for the PduOutputEntry table.')
pdu_output_load = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 200))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduOutputLoad.setStatus('mandatory')
if mibBuilder.loadTexts:
pduOutputLoad.setDescription('The device output load in percent of rated capacity. A value of -1 will be returned if the heat load is unable to be measured.')
pdu_output_heat = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduOutputHeat.setStatus('mandatory')
if mibBuilder.loadTexts:
pduOutputHeat.setDescription('The total heat load measured on the PDU in BTUs. A value of -1 will be returned if the heat load is unable to be measured.')
pdu_output_power = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduOutputPower.setStatus('mandatory')
if mibBuilder.loadTexts:
pduOutputPower.setDescription('The total power load measured on the PDU in watts. A value of -1 will be returned if the power load is unable to be measured.')
pdu_output_num_breakers = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 1, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pduOutputNumBreakers.setStatus('mandatory')
if mibBuilder.loadTexts:
pduOutputNumBreakers.setDescription('The number of breakers for the device. This variable indicates the number of rows in the breakers table.')
pdu_output_breaker_table = mib_table((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2))
if mibBuilder.loadTexts:
pduOutputBreakerTable.setStatus('mandatory')
if mibBuilder.loadTexts:
pduOutputBreakerTable.setDescription('List of breaker table entries. The number of entries is given by pduOutputNumBreakers .')
pdu_output_breaker_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2, 1)).setIndexNames((0, 'CPQPOWER-MIB', 'pduOutputIndex'), (0, 'CPQPOWER-MIB', 'breakerIndex'))
if mibBuilder.loadTexts:
pduOutputBreakerEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
pduOutputBreakerEntry.setDescription('An entry containing information applicable to an breaker.')
breaker_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
breakerIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
breakerIndex.setDescription('The breaker identifier.')
breaker_voltage = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
breakerVoltage.setStatus('mandatory')
if mibBuilder.loadTexts:
breakerVoltage.setDescription('The breaker voltage in volts.')
breaker_current = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
breakerCurrent.setStatus('mandatory')
if mibBuilder.loadTexts:
breakerCurrent.setDescription('The breaker current draw in Amps.')
breaker_percent_load = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
breakerPercentLoad.setStatus('mandatory')
if mibBuilder.loadTexts:
breakerPercentLoad.setDescription('The breaker load in percent.')
breaker_status = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 2, 3, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('normal', 1), ('overloadWarning', 2), ('overloadCritical', 3), ('voltageRangeWarning', 4), ('voltageRangeCritical', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
breakerStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
breakerStatus.setDescription('This object indicates the status of the breaker. A value of normal(1) indicates the breaker is operating normally. A value of overloadWarning(2) indicates the breaker has an overload warning. A value of overloadCritical(3) indicates the breaker is overloaded. A value of voltageRangeWarning(4) indicates the breaker voltage is out of tolerance by 10-20%. A value of voltageRangeCritical(5) indicates the breaker voltage is out of tolerance by more than 20%. Note: Overload status has priority over voltage tolerance status.')
ups_ident_manufacturer = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsIdentManufacturer.setStatus('mandatory')
if mibBuilder.loadTexts:
upsIdentManufacturer.setDescription('The UPS Manufacturer Name (e.g. Hewlett-Packard).')
ups_ident_model = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsIdentModel.setStatus('mandatory')
if mibBuilder.loadTexts:
upsIdentModel.setDescription('The UPS Model;Part number;Serial number (e.g. HP R5500 XR;204451-B21;B00123456W).')
ups_ident_software_versions = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsIdentSoftwareVersions.setStatus('mandatory')
if mibBuilder.loadTexts:
upsIdentSoftwareVersions.setDescription('The firmware revision level(s) of the UPS microcontroller(s).')
ups_ident_oem_code = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsIdentOemCode.setStatus('mandatory')
if mibBuilder.loadTexts:
upsIdentOemCode.setDescription('A binary code indicating vendor. This should be a ?0x0c? for HP')
ups_bat_time_remaining = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 2, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsBatTimeRemaining.setStatus('mandatory')
if mibBuilder.loadTexts:
upsBatTimeRemaining.setDescription('Battery run time in seconds before UPS turns off due to low battery.')
ups_bat_voltage = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 2, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsBatVoltage.setStatus('mandatory')
if mibBuilder.loadTexts:
upsBatVoltage.setDescription('Battery voltage as reported by the UPS meters.')
ups_bat_current = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 2, 3), integer32().subtype(subtypeSpec=value_range_constraint(-2147483648, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsBatCurrent.setStatus('mandatory')
if mibBuilder.loadTexts:
upsBatCurrent.setDescription('Battery Current as reported by the UPS metering. Current is positive when discharging, negative when recharging the battery.')
ups_bat_capacity = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 2, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsBatCapacity.setStatus('mandatory')
if mibBuilder.loadTexts:
upsBatCapacity.setDescription('Battery percent charge.')
ups_battery_abm_status = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 2, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('batteryCharging', 1), ('batteryDischarging', 2), ('batteryFloating', 3), ('batteryResting', 4), ('unknown', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsBatteryAbmStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
upsBatteryAbmStatus.setDescription('Gives the status of the Advanced Battery Management; batteryFloating(3) status means that the charger is temporarily charging the battery to its float voltage; batteryResting(4) is the state when the battery is fully charged and none of the other actions (charging/discharging/floating) is being done.')
ups_input_frequency = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsInputFrequency.setStatus('mandatory')
if mibBuilder.loadTexts:
upsInputFrequency.setDescription('The utility line frequency in tenths of Hz.')
ups_input_line_bads = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsInputLineBads.setStatus('mandatory')
if mibBuilder.loadTexts:
upsInputLineBads.setDescription('The number of times the Input was out of tolerance in voltage or frequency.')
ups_input_num_phases = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 6))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsInputNumPhases.setStatus('mandatory')
if mibBuilder.loadTexts:
upsInputNumPhases.setDescription('')
ups_input_table = mib_table((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 4))
if mibBuilder.loadTexts:
upsInputTable.setStatus('mandatory')
if mibBuilder.loadTexts:
upsInputTable.setDescription('The Aggregate Object with number of entries equal to NumPhases and including the UpsInput group.')
ups_input_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 4, 1)).setIndexNames((0, 'CPQPOWER-MIB', 'upsInputPhase'))
if mibBuilder.loadTexts:
upsInputEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
upsInputEntry.setDescription('The input table entry containing the current, voltage, etc.')
ups_input_phase = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 6))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsInputPhase.setStatus('mandatory')
if mibBuilder.loadTexts:
upsInputPhase.setDescription('The number of the phase. Serves as index for input table.')
ups_input_voltage = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 4, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsInputVoltage.setStatus('mandatory')
if mibBuilder.loadTexts:
upsInputVoltage.setDescription('The measured input voltage from the UPS meters in volts.')
ups_input_current = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 4, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsInputCurrent.setStatus('mandatory')
if mibBuilder.loadTexts:
upsInputCurrent.setDescription('The measured input current from the UPS meters in amps.')
ups_input_watts = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 4, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsInputWatts.setStatus('mandatory')
if mibBuilder.loadTexts:
upsInputWatts.setDescription('The measured input real power in watts.')
ups_input_source = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 3, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('other', 1), ('none', 2), ('primaryUtility', 3), ('bypassFeed', 4), ('secondaryUtility', 5), ('generator', 6), ('flywheel', 7), ('fuelcell', 8)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsInputSource.setStatus('mandatory')
if mibBuilder.loadTexts:
upsInputSource.setDescription('The present external source of input power. The enumeration none(2) indicates that there is no external source of power, for example, the UPS is On Battery (an internal source). The bypassFeed(4) can only be used when the Bypass source is known to be a separate utility feed than the primaryUtility(3).')
ups_output_load = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 200))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsOutputLoad.setStatus('mandatory')
if mibBuilder.loadTexts:
upsOutputLoad.setDescription('The UPS output load in percent of rated capacity.')
ups_output_frequency = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsOutputFrequency.setStatus('mandatory')
if mibBuilder.loadTexts:
upsOutputFrequency.setDescription('The measured UPS output frequency in tenths of Hz.')
ups_output_num_phases = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 6))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsOutputNumPhases.setStatus('mandatory')
if mibBuilder.loadTexts:
upsOutputNumPhases.setDescription('The number of metered output phases, serves as the table index.')
ups_output_table = mib_table((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 4))
if mibBuilder.loadTexts:
upsOutputTable.setStatus('mandatory')
if mibBuilder.loadTexts:
upsOutputTable.setDescription('The Aggregate Object with number of entries equal to NumPhases and including the UpsOutput group.')
ups_output_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 4, 1)).setIndexNames((0, 'CPQPOWER-MIB', 'upsOutputPhase'))
if mibBuilder.loadTexts:
upsOutputEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
upsOutputEntry.setDescription('Output Table Entry containing voltage, current, etc.')
ups_output_phase = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 6))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsOutputPhase.setStatus('mandatory')
if mibBuilder.loadTexts:
upsOutputPhase.setDescription('The number {1..3} of the output phase.')
ups_output_voltage = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 4, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsOutputVoltage.setStatus('mandatory')
if mibBuilder.loadTexts:
upsOutputVoltage.setDescription('The measured output voltage from the UPS metering in volts.')
ups_output_current = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 4, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsOutputCurrent.setStatus('mandatory')
if mibBuilder.loadTexts:
upsOutputCurrent.setDescription('The measured UPS output current in amps.')
ups_output_watts = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 4, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsOutputWatts.setStatus('mandatory')
if mibBuilder.loadTexts:
upsOutputWatts.setDescription('The measured real output power in watts.')
ups_output_source = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 4, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=named_values(('other', 1), ('none', 2), ('normal', 3), ('bypass', 4), ('battery', 5), ('booster', 6), ('reducer', 7), ('parallelCapacity', 8), ('parallelRedundant', 9), ('highEfficiencyMode', 10)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsOutputSource.setStatus('mandatory')
if mibBuilder.loadTexts:
upsOutputSource.setDescription('The present source of output power. The enumeration none(2) indicates that there is no source of output power (and therefore no output power), for example, the system has opened the output breaker.')
ups_bypass_frequency = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 5, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsBypassFrequency.setStatus('mandatory')
if mibBuilder.loadTexts:
upsBypassFrequency.setDescription('The bypass frequency in tenths of Hz.')
ups_bypass_num_phases = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 5, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 6))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsBypassNumPhases.setStatus('mandatory')
if mibBuilder.loadTexts:
upsBypassNumPhases.setDescription('The number of lines in the UPS bypass table.')
ups_bypass_table = mib_table((1, 3, 6, 1, 4, 1, 232, 165, 3, 5, 3))
if mibBuilder.loadTexts:
upsBypassTable.setStatus('mandatory')
if mibBuilder.loadTexts:
upsBypassTable.setDescription('')
ups_bypass_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 165, 3, 5, 3, 1)).setIndexNames((0, 'CPQPOWER-MIB', 'upsBypassPhase'))
if mibBuilder.loadTexts:
upsBypassEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
upsBypassEntry.setDescription('Entry in the UpsBypassTable.')
ups_bypass_phase = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 5, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 6))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsBypassPhase.setStatus('mandatory')
if mibBuilder.loadTexts:
upsBypassPhase.setDescription('The Bypass Phase, index for the table.')
ups_bypass_voltage = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 5, 3, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsBypassVoltage.setStatus('mandatory')
if mibBuilder.loadTexts:
upsBypassVoltage.setDescription('The measured UPS bypass voltage in volts.')
ups_env_ambient_temp = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 1), integer32().subtype(subtypeSpec=value_range_constraint(-100, 200))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsEnvAmbientTemp.setStatus('mandatory')
if mibBuilder.loadTexts:
upsEnvAmbientTemp.setDescription('The reading of the ambient temperature in the vicinity of the UPS or SNMP agent.')
ups_env_ambient_lower_limit = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 2), integer32().subtype(subtypeSpec=value_range_constraint(-100, 200))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsEnvAmbientLowerLimit.setStatus('mandatory')
if mibBuilder.loadTexts:
upsEnvAmbientLowerLimit.setDescription('The Lower Limit of the ambient temperature; if UpsEnvAmbientTemp falls below this value, the UpsAmbientTempBad alarm will occur.')
ups_env_ambient_upper_limit = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 3), integer32().subtype(subtypeSpec=value_range_constraint(-100, 200))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsEnvAmbientUpperLimit.setStatus('mandatory')
if mibBuilder.loadTexts:
upsEnvAmbientUpperLimit.setDescription('The Upper Limit of the ambient temperature; if UpsEnvAmbientTemp rises above this value, the UpsAmbientTempBad alarm will occur. This value should be greater than UpsEnvAmbientLowerLimit.')
ups_env_ambient_humidity = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsEnvAmbientHumidity.setStatus('mandatory')
if mibBuilder.loadTexts:
upsEnvAmbientHumidity.setDescription('The reading of the ambient humidity in the vicinity of the UPS or SNMP agent.')
ups_env_remote_temp = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 5), integer32().subtype(subtypeSpec=value_range_constraint(-100, 200))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsEnvRemoteTemp.setStatus('mandatory')
if mibBuilder.loadTexts:
upsEnvRemoteTemp.setDescription('The reading of a remote temperature sensor connected to the UPS or SNMP agent.')
ups_env_remote_humidity = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsEnvRemoteHumidity.setStatus('mandatory')
if mibBuilder.loadTexts:
upsEnvRemoteHumidity.setDescription('The reading of a remote humidity sensor connected to the UPS or SNMP agent.')
ups_env_num_contacts = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsEnvNumContacts.setStatus('mandatory')
if mibBuilder.loadTexts:
upsEnvNumContacts.setDescription('The number of Contacts in the UpsContactsTable. This object indicates the number of rows in the UpsContactsTable.')
ups_contacts_table = mib_table((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 8))
if mibBuilder.loadTexts:
upsContactsTable.setStatus('mandatory')
if mibBuilder.loadTexts:
upsContactsTable.setDescription('A list of Contact Sensing table entries. The number of entries is given by the value of UpsEnvNumContacts.')
ups_contacts_table_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 8, 1)).setIndexNames((0, 'CPQPOWER-MIB', 'upsContactIndex'))
if mibBuilder.loadTexts:
upsContactsTableEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
upsContactsTableEntry.setDescription('An entry containing information applicable to a particular Contact input.')
ups_contact_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 8, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsContactIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
upsContactIndex.setDescription('The Contact identifier; identical to the Contact Number.')
ups_contact_type = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 8, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('normallyOpen', 1), ('normallyClosed', 2), ('anyChange', 3), ('notUsed', 4)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsContactType.setStatus('mandatory')
if mibBuilder.loadTexts:
upsContactType.setDescription("The normal state for this contact. The 'other' state is the Active state for generating the UpstdContactActiveNotice trap. If anyChange(3) is selected, then this trap is sent any time the contact changes to either Open or Closed. No traps are sent if the Contact is set to notUsed(4). In many cases, the configuration for Contacts may be done by other means, so this object may be read-only.")
ups_contact_state = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 8, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('open', 1), ('closed', 2), ('openWithNotice', 3), ('closedWithNotice', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsContactState.setStatus('mandatory')
if mibBuilder.loadTexts:
upsContactState.setDescription('The current state of the Contact input; the value is based on the open/closed input state and the setting for UpsContactType. When entering the openWithNotice(3) and closedWithNotice(4) states, no entries added to the UpsAlarmTable, but the UpstdContactActiveNotice trap is sent.')
ups_contact_descr = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 8, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsContactDescr.setStatus('mandatory')
if mibBuilder.loadTexts:
upsContactDescr.setDescription('A label identifying the Contact. This object should be set by the administrator.')
ups_env_remote_temp_lower_limit = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 9), integer32().subtype(subtypeSpec=value_range_constraint(-100, 200))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsEnvRemoteTempLowerLimit.setStatus('mandatory')
if mibBuilder.loadTexts:
upsEnvRemoteTempLowerLimit.setDescription('The Lower Limit of the remote temperature; if UpsEnvRemoteTemp falls below this value, the UpsRemoteTempBad alarm will occur.')
ups_env_remote_temp_upper_limit = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 10), integer32().subtype(subtypeSpec=value_range_constraint(-100, 200))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsEnvRemoteTempUpperLimit.setStatus('mandatory')
if mibBuilder.loadTexts:
upsEnvRemoteTempUpperLimit.setDescription('The Upper Limit of the remote temperature; if UpsEnvRemoteTemp rises above this value, the UpsRemoteTempBad alarm will occur. This value should be greater than UpsEnvRemoteTempLowerLimit.')
ups_env_remote_humidity_lower_limit = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsEnvRemoteHumidityLowerLimit.setStatus('mandatory')
if mibBuilder.loadTexts:
upsEnvRemoteHumidityLowerLimit.setDescription('The Lower Limit of the remote humidity reading; if UpsEnvRemoteHumidity falls below this value, the UpsRemoteHumidityBad alarm will occur.')
ups_env_remote_humidity_upper_limit = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 6, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsEnvRemoteHumidityUpperLimit.setStatus('mandatory')
if mibBuilder.loadTexts:
upsEnvRemoteHumidityUpperLimit.setDescription('The Upper Limit of the remote humidity reading; if UpsEnvRemoteHumidity rises above this value, the UpsRemoteHumidityBad alarm will occur. This value should be greater than UpsEnvRemoteHumidityLowerLimit.')
ups_test_battery = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 7, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('startTest', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsTestBattery.setStatus('mandatory')
if mibBuilder.loadTexts:
upsTestBattery.setDescription('Setting this variable to startTest initiates the battery test. All other set values are invalid.')
ups_test_battery_status = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 7, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('unknown', 1), ('passed', 2), ('failed', 3), ('inProgress', 4), ('notSupported', 5), ('inhibited', 6), ('scheduled', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsTestBatteryStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
upsTestBatteryStatus.setDescription('Reading this enumerated value gives an indication of the UPS Battery test status.')
ups_test_trap = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 7, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('startTestTrap', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsTestTrap.setStatus('mandatory')
if mibBuilder.loadTexts:
upsTestTrap.setDescription('Setting this variable to startTestTrap initiates a TrapTest is sent out from HPMM. All other set values are invalid.')
ups_control_output_off_delay = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 8, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsControlOutputOffDelay.setStatus('mandatory')
if mibBuilder.loadTexts:
upsControlOutputOffDelay.setDescription('Setting this value to other than zero will cause the UPS output to turn off after the number of seconds. Setting it to 0 will cause an attempt to abort a pending shutdown.')
ups_control_output_on_delay = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 8, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsControlOutputOnDelay.setStatus('mandatory')
if mibBuilder.loadTexts:
upsControlOutputOnDelay.setDescription('Setting this value to other than zero will cause the UPS output to turn on after the number of seconds. Setting it to 0 will cause an attempt to abort a pending startup.')
ups_control_output_off_trap_delay = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 8, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsControlOutputOffTrapDelay.setStatus('mandatory')
if mibBuilder.loadTexts:
upsControlOutputOffTrapDelay.setDescription('When UpsControlOutputOffDelay reaches this value, a trap will be sent.')
ups_control_output_on_trap_delay = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 8, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsControlOutputOnTrapDelay.setStatus('deprecated')
if mibBuilder.loadTexts:
upsControlOutputOnTrapDelay.setDescription('When UpsControlOutputOnDelay reaches this value, a UpsOutputOff trap will be sent.')
ups_control_to_bypass_delay = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 8, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsControlToBypassDelay.setStatus('mandatory')
if mibBuilder.loadTexts:
upsControlToBypassDelay.setDescription('Setting this value to other than zero will cause the UPS output to go to Bypass after the number of seconds. If the Bypass is unavailable, this may cause the UPS to not supply power to the load. Setting it to 0 will cause an attempt to abort a pending shutdown.')
ups_load_shed_secs_with_restart = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 8, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsLoadShedSecsWithRestart.setStatus('mandatory')
if mibBuilder.loadTexts:
upsLoadShedSecsWithRestart.setDescription("Setting this value will cause the UPS output to turn off after the set number of seconds, then restart (after a UPS-defined 'down time') when the utility is again available. Unlike UpsControlOutputOffDelay, which might or might not, this object always maps to the XCP 0x8A Load Dump & Restart command, so the desired shutdown and restart behavior is guaranteed to happen. Once set, this command cannot be aborted. This is the preferred Control object to use when performing an On Battery OS Shutdown.")
ups_config_output_voltage = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsConfigOutputVoltage.setStatus('mandatory')
if mibBuilder.loadTexts:
upsConfigOutputVoltage.setDescription('The nominal UPS Output voltage per phase in volts.')
ups_config_input_voltage = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsConfigInputVoltage.setStatus('mandatory')
if mibBuilder.loadTexts:
upsConfigInputVoltage.setDescription('The nominal UPS Input voltage per phase in volts.')
ups_config_output_watts = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsConfigOutputWatts.setStatus('mandatory')
if mibBuilder.loadTexts:
upsConfigOutputWatts.setDescription('The nominal UPS available real power output in watts.')
ups_config_output_freq = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsConfigOutputFreq.setStatus('mandatory')
if mibBuilder.loadTexts:
upsConfigOutputFreq.setDescription('The nominal output frequency in tenths of Hz.')
ups_config_date_and_time = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 22))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsConfigDateAndTime.setStatus('mandatory')
if mibBuilder.loadTexts:
upsConfigDateAndTime.setDescription('Date and time information for the UPS. Setting this variable will initiate a set UPS date and time to this value. Reading this variable will return the UPS time and date. This value is not referenced to sysUpTime. It is simply the clock value from the UPS real time clock. Format is as follows: MM/DD/YYYY:HH:MM:SS.')
ups_config_low_output_voltage_limit = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsConfigLowOutputVoltageLimit.setStatus('mandatory')
if mibBuilder.loadTexts:
upsConfigLowOutputVoltageLimit.setDescription('The Lower limit for acceptable Output Voltage, per the UPS specifications.')
ups_config_high_output_voltage_limit = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 9, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsConfigHighOutputVoltageLimit.setStatus('mandatory')
if mibBuilder.loadTexts:
upsConfigHighOutputVoltageLimit.setDescription('The Upper limit for acceptable Output Voltage, per the UPS specifications.')
ups_num_receptacles = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsNumReceptacles.setStatus('mandatory')
if mibBuilder.loadTexts:
upsNumReceptacles.setDescription('The number of independently controllable Receptacles, as described in the UpsRecepTable.')
ups_recep_table = mib_table((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2))
if mibBuilder.loadTexts:
upsRecepTable.setStatus('mandatory')
if mibBuilder.loadTexts:
upsRecepTable.setDescription('The Aggregate Object with number of entries equal to NumReceptacles and including the UpsRecep group.')
ups_recep_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1)).setIndexNames((0, 'CPQPOWER-MIB', 'upsRecepIndex'))
if mibBuilder.loadTexts:
upsRecepEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
upsRecepEntry.setDescription('The Recep table entry, etc.')
ups_recep_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 64))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsRecepIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
upsRecepIndex.setDescription('The number of the Receptacle. Serves as index for Receptacle table.')
ups_recep_status = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('on', 1), ('off', 2), ('pendingOff', 3), ('pendingOn', 4), ('unknown', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsRecepStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
upsRecepStatus.setDescription('The Recep Status 1=On/Close, 2=Off/Open, 3=On w/Pending Off, 4=Off w/Pending ON, 5=Unknown.')
ups_recep_off_delay_secs = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(-1, 2147483647))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsRecepOffDelaySecs.setStatus('mandatory')
if mibBuilder.loadTexts:
upsRecepOffDelaySecs.setDescription('The Delay until the Receptacle is turned Off. Setting this value to other than -1 will cause the UPS output to turn off after the number of seconds (0 is immediately). Setting it to -1 will cause an attempt to abort a pending shutdown. When this object is set while the UPS is On Battery, it is not necessary to set UpsRecepOnDelaySecs, since the outlet will turn back on automatically when power is available again.')
ups_recep_on_delay_secs = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(-1, 2147483647))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsRecepOnDelaySecs.setStatus('mandatory')
if mibBuilder.loadTexts:
upsRecepOnDelaySecs.setDescription(' The Delay until the Receptacle is turned On. Setting this value to other than -1 will cause the UPS output to turn on after the number of seconds (0 is immediately). Setting it to -1 will cause an attempt to abort a pending restart.')
ups_recep_auto_off_delay = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(-1, 32767))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsRecepAutoOffDelay.setStatus('mandatory')
if mibBuilder.loadTexts:
upsRecepAutoOffDelay.setDescription('The delay after going On Battery until the Receptacle is automatically turned Off. A value of -1 means that this Output should never be turned Off automatically, but must be turned Off only by command. Values from 0 to 30 are valid, but probably innappropriate. The AutoOffDelay can be used to prioritize loads in the event of a prolonged power outage; less critical loads will turn off earlier to extend battery time for the more critical loads. If the utility power is restored before the AutoOff delay counts down to 0 on an outlet, that outlet will not turn Off.')
ups_recep_auto_on_delay = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(-1, 32767))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsRecepAutoOnDelay.setStatus('mandatory')
if mibBuilder.loadTexts:
upsRecepAutoOnDelay.setDescription('Seconds delay after the Outlet is signaled to turn On before the Output is Automatically turned ON. A value of -1 means that this Output should never be turned On automatically, but only when specifically commanded to do so. A value of 0 means that the Receptacle should come On immediately at power-up or for an On command.')
ups_recep_shed_secs_with_restart = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 3, 10, 2, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsRecepShedSecsWithRestart.setStatus('mandatory')
if mibBuilder.loadTexts:
upsRecepShedSecsWithRestart.setDescription("Setting this value will cause the UPS output to turn off after the set number of seconds, then restart (after a UPS-defined 'down time') when the utility is again available. Unlike UpsRecepOffDelaySecs, which might or might not, this object always maps to the XCP 0x8A Load Dump & Restart command, so the desired shutdown and restart behavior is guaranteed to happen. Once set, this command cannot be aborted.")
ups_topology_type = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 11, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 32767))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsTopologyType.setStatus('mandatory')
if mibBuilder.loadTexts:
upsTopologyType.setDescription("Value which denotes the type of UPS by its power topology. Values are the same as those described in the XCP Topology block's Overall Topology field.")
ups_topo_machine_code = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 11, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 32767))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsTopoMachineCode.setStatus('mandatory')
if mibBuilder.loadTexts:
upsTopoMachineCode.setDescription("ID Value which denotes the Compaq/HP model of the UPS for software. Values are the same as those described in the XCP Configuration block's Machine Code field.")
ups_topo_unit_number = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 11, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
upsTopoUnitNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
upsTopoUnitNumber.setDescription("Identifies which unit and what type of data is being reported. A value of 0 means that this MIB information comes from the top-level system view (eg, manifold module or system bypass cabinet reporting total system output). Standalone units also use a value of 0, since they are the 'full system' view. A value of 1 or higher indicates the number of the module in the system which is reporting only its own data in the HP MIB objects.")
ups_topo_power_strategy = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 3, 11, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('highAlert', 1), ('standard', 2), ('enableHighEfficiency', 3), ('immediateHighEfficiency', 4)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
upsTopoPowerStrategy.setStatus('mandatory')
if mibBuilder.loadTexts:
upsTopoPowerStrategy.setDescription('Value which denotes which Power Strategy is currently set for the UPS. The values are: highAlert(1) - The UPS shall optimize its operating state to maximize its power-protection levels. This mode will be held for at most 24 hours. standard(2) - Balanced, normal power protection strategy. UPS will not enter HE operating mode from this setting. enableHighEfficiency(3) - The UPS is enabled to enter HE operating mode to optimize its operating state to maximize its efficiency, when conditions change to permit it (as determined by the UPS). forceHighEfficiency(4) - If this value is permitted to be Set for this UPS, and if conditions permit, requires the UPS to enter High Efficiency mode now, without delay (for as long as utility conditions permit). After successfully set to forceHighEfficiency(4), UpsTopoPowerStrategy changes to value enableHighEfficiency(3). UpsOutputSource will indicate if the UPS status is actually operating in High Efficiency mode.')
pdr_name = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
pdrName.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrName.setDescription('The string identify the device.')
pdr_model = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrModel.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrModel.setDescription('The Device Model.')
pdr_manufacturer = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrManufacturer.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrManufacturer.setDescription('The Device Manufacturer Name (e.g. Hewlett-Packard).')
pdr_firmware_version = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrFirmwareVersion.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrFirmwareVersion.setDescription('The firmware revision level of the device.')
pdr_part_number = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPartNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPartNumber.setDescription('The device part number.')
pdr_serial_number = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrSerialNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrSerialNumber.setDescription("The PDR's serial number.")
pdr_va_rating = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrVARating.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrVARating.setDescription('The VA Rating of this PDR (all phases)')
pdr_nominal_output_voltage = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrNominalOutputVoltage.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrNominalOutputVoltage.setDescription('The nominal Output Voltage may differ from the nominal Input Voltage if the PDR has an input transformer')
pdr_num_phases = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(1, 3))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrNumPhases.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrNumPhases.setDescription('The number of phases for this PDR')
pdr_num_panels = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrNumPanels.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrNumPanels.setDescription('The number of panels or subfeeds in this PDR')
pdr_num_breakers = mib_scalar((1, 3, 6, 1, 4, 1, 232, 165, 4, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrNumBreakers.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrNumBreakers.setDescription('The number of breakers in this PDR')
pdr_panel_table = mib_table((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1))
if mibBuilder.loadTexts:
pdrPanelTable.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelTable.setDescription('Aggregate Object with number of entries equal to pdrNumPanels')
pdr_panel_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1)).setIndexNames((0, 'CPQPOWER-MIB', 'pdrPanelIndex'))
if mibBuilder.loadTexts:
pdrPanelEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelEntry.setDescription('The panel table entry containing all power parameters for each panel.')
pdr_panel_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelIndex.setDescription('Index for the pdrPanelEntry table.')
pdr_panel_frequency = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelFrequency.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelFrequency.setDescription('The present frequency reading for the panel voltage.')
pdr_panel_power = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelPower.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelPower.setDescription('The present power of the panel.')
pdr_panel_rated_current = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelRatedCurrent.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelRatedCurrent.setDescription('The present rated current of the panel.')
pdr_panel_monthly_kwh = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelMonthlyKWH.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelMonthlyKWH.setDescription('The accumulated KWH for this panel since the beginning of this calendar month or since the last reset.')
pdr_panel_yearly_kwh = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelYearlyKWH.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelYearlyKWH.setDescription('The accumulated KWH for this panel since the beginning of this calendar year or since the last reset.')
pdr_panel_total_kwh = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelTotalKWH.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelTotalKWH.setDescription('The accumulated KWH for this panel since it was put into service or since the last reset.')
pdr_panel_voltage_a = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelVoltageA.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelVoltageA.setDescription('The measured panel output voltage.')
pdr_panel_voltage_b = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelVoltageB.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelVoltageB.setDescription('The measured panel output voltage.')
pdr_panel_voltage_c = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelVoltageC.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelVoltageC.setDescription('The measured panel output voltage.')
pdr_panel_current_a = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelCurrentA.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelCurrentA.setDescription('The measured panel output current.')
pdr_panel_current_b = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelCurrentB.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelCurrentB.setDescription('The measured panel output current.')
pdr_panel_current_c = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelCurrentC.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelCurrentC.setDescription('The measured panel output current.')
pdr_panel_load_a = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 200))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelLoadA.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelLoadA.setDescription('The percentage of load is the ratio of each output current to the rated output current to the panel.')
pdr_panel_load_b = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(0, 200))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelLoadB.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelLoadB.setDescription('The percentage of load is the ratio of each output current to the rated output current to the panel.')
pdr_panel_load_c = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 2, 1, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 200))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrPanelLoadC.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrPanelLoadC.setDescription('The percentage of load is the ratio of each output current to the rated output current to the panel.')
pdr_breaker_table = mib_table((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1))
if mibBuilder.loadTexts:
pdrBreakerTable.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerTable.setDescription('List of breaker table entries. The number of entries is given by pdrNumBreakers for this panel.')
pdr_breaker_entry = mib_table_row((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1)).setIndexNames((0, 'CPQPOWER-MIB', 'pdrPanelIndex'), (0, 'CPQPOWER-MIB', 'pdrBreakerIndex'))
if mibBuilder.loadTexts:
pdrBreakerEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerEntry.setDescription('An entry containing information applicable to a particular output breaker of a particular panel.')
pdr_breaker_index = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerIndex.setDescription('The index of breakers. 42 breakers in each panel, arranged in odd and even columns')
pdr_breaker_panel = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerPanel.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerPanel.setDescription('The index of panel that these breakers are installed on.')
pdr_breaker_num_position = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerNumPosition.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerNumPosition.setDescription('The position of this breaker in the panel, 1-phase breaker or n-m breaker for 2-phase or n-m-k breaker for 3-phase.')
pdr_breaker_num_phases = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerNumPhases.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerNumPhases.setDescription('The number of phase for this particular breaker.')
pdr_breaker_num_sequence = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerNumSequence.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerNumSequence.setDescription('The sequence of this breaker. i.e. 1 for single phase 1,2 for 2-phase or 1,2,3 for 3-phase.')
pdr_breaker_rated_current = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerRatedCurrent.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerRatedCurrent.setDescription('The rated current in Amps for this particular breaker.')
pdr_breaker_monthly_kwh = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerMonthlyKWH.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerMonthlyKWH.setDescription('The accumulated KWH for this breaker since the beginning of this calendar month or since the last reset.')
pdr_breaker_yearly_kwh = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerYearlyKWH.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerYearlyKWH.setDescription('The accumulated KWH for this breaker since the beginning of this calendar year or since the last reset.')
pdr_breaker_total_kwh = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerTotalKWH.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerTotalKWH.setDescription('The accumulated KWH for this breaker since it was put into service or since the last reset.')
pdr_breaker_current = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerCurrent.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerCurrent.setDescription('The measured output current for this breaker Current.')
pdr_breaker_current_percent = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 200))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerCurrentPercent.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerCurrentPercent.setDescription('The ratio of output current over rated current for each breaker.')
pdr_breaker_power = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerPower.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerPower.setDescription('The power for this breaker.')
pdr_breaker_percent_warning = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 200))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerPercentWarning.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerPercentWarning.setDescription('The percentage of Warning set for this breaker.')
pdr_breaker_percent_overload = mib_table_column((1, 3, 6, 1, 4, 1, 232, 165, 4, 3, 1, 1, 14), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdrBreakerPercentOverload.setStatus('mandatory')
if mibBuilder.loadTexts:
pdrBreakerPercentOverload.setDescription('The percentage of Overload set for this breaker.')
mibBuilder.exportSymbols('CPQPOWER-MIB', upsEnvRemoteTempUpperLimit=upsEnvRemoteTempUpperLimit, upsRecepAutoOffDelay=upsRecepAutoOffDelay, pduOutputBreakerTable=pduOutputBreakerTable, upsEnvRemoteHumidityUpperLimit=upsEnvRemoteHumidityUpperLimit, upsOutputPhase=upsOutputPhase, pduIdentIndex=pduIdentIndex, upsBypassNumPhases=upsBypassNumPhases, upsTopology=upsTopology, upsTestBatteryStatus=upsTestBatteryStatus, deviceMACAddress=deviceMACAddress, pduControllable=pduControllable, upsOutputEntry=upsOutputEntry, upsBypassFrequency=upsBypassFrequency, trapWarning=trapWarning, pdrBreakerTotalKWH=pdrBreakerTotalKWH, upsRecepAutoOnDelay=upsRecepAutoOnDelay, deviceIdentName=deviceIdentName, upsInputVoltage=upsInputVoltage, pduOutputBreakerEntry=pduOutputBreakerEntry, pdrPanelCurrentA=pdrPanelCurrentA, upsInputSource=upsInputSource, upsControlOutputOffTrapDelay=upsControlOutputOffTrapDelay, upsOutputNumPhases=upsOutputNumPhases, upsEnvRemoteHumidity=upsEnvRemoteHumidity, trapInformation=trapInformation, pdrPanelRatedCurrent=pdrPanelRatedCurrent, deviceHardwareVersion=deviceHardwareVersion, upsRecep=upsRecep, pduOutputTable=pduOutputTable, pduOutputPower=pduOutputPower, powerDevice=powerDevice, pdrPanelYearlyKWH=pdrPanelYearlyKWH, pdrName=pdrName, upsTopoMachineCode=upsTopoMachineCode, upsRecepOffDelaySecs=upsRecepOffDelaySecs, trapInfo=trapInfo, breakerIndex=breakerIndex, upsContactIndex=upsContactIndex, upsOutputSource=upsOutputSource, upsBatteryAbmStatus=upsBatteryAbmStatus, upsBatCapacity=upsBatCapacity, pdrPanelVoltageB=pdrPanelVoltageB, upsOutput=upsOutput, upsTopoUnitNumber=upsTopoUnitNumber, pduOutputIndex=pduOutputIndex, pduInputIndex=pduInputIndex, upsBattery=upsBattery, trapDeviceDetails=trapDeviceDetails, upsRecepShedSecsWithRestart=upsRecepShedSecsWithRestart, upsBypassTable=upsBypassTable, upsControlToBypassDelay=upsControlToBypassDelay, pduIdent=pduIdent, upsRecepTable=upsRecepTable, pdrPanelPower=pdrPanelPower, pdrBreakerTable=pdrBreakerTable, trapCritical=trapCritical, upsEnvAmbientLowerLimit=upsEnvAmbientLowerLimit, pdrPanelCurrentC=pdrPanelCurrentC, upsIdentModel=upsIdentModel, upsContactState=upsContactState, pduInput=pduInput, pduPartNumber=pduPartNumber, upsContactDescr=upsContactDescr, deviceManufacturer=deviceManufacturer, upsInput=upsInput, breakerStatus=breakerStatus, pdrBreakerPercentOverload=pdrBreakerPercentOverload, upsEnvAmbientHumidity=upsEnvAmbientHumidity, upsBatCurrent=upsBatCurrent, trapDescription=trapDescription, deviceSerialNumber=deviceSerialNumber, pdrBreakerCurrentPercent=pdrBreakerCurrentPercent, upsContactsTableEntry=upsContactsTableEntry, trapCleared=trapCleared, upsInputEntry=upsInputEntry, upsControlOutputOffDelay=upsControlOutputOffDelay, breakerVoltage=breakerVoltage, upsBypassPhase=upsBypassPhase, upsInputPhase=upsInputPhase, pdrNominalOutputVoltage=pdrNominalOutputVoltage, upsBatVoltage=upsBatVoltage, pduName=pduName, pdrBreakerNumSequence=pdrBreakerNumSequence, upsInputNumPhases=upsInputNumPhases, upsConfigHighOutputVoltageLimit=upsConfigHighOutputVoltageLimit, upsControlOutputOnTrapDelay=upsControlOutputOnTrapDelay, upsConfigOutputWatts=upsConfigOutputWatts, pdrPanel=pdrPanel, upsBypassEntry=upsBypassEntry, upsEnvironment=upsEnvironment, pdrPanelTotalKWH=pdrPanelTotalKWH, pdrPanelEntry=pdrPanelEntry, upsConfigOutputVoltage=upsConfigOutputVoltage, pduIdentEntry=pduIdentEntry, pdrNumPanels=pdrNumPanels, pdrManufacturer=pdrManufacturer, pdrBreaker=pdrBreaker, upsEnvAmbientUpperLimit=upsEnvAmbientUpperLimit, pduIdentTable=pduIdentTable, numOfPdu=numOfPdu, pdrPanelLoadB=pdrPanelLoadB, deviceTrapInitialization=deviceTrapInitialization, ups=ups, upsBypassVoltage=upsBypassVoltage, inputVoltage=inputVoltage, pdrPanelLoadC=pdrPanelLoadC, upsControl=upsControl, pdrPartNumber=pdrPartNumber, pdrBreakerEntry=pdrBreakerEntry, trapTest=trapTest, breakerPercentLoad=breakerPercentLoad, upsOutputCurrent=upsOutputCurrent, pduManufacturer=pduManufacturer, pduInputTable=pduInputTable, pduOutputEntry=pduOutputEntry, pduOutputHeat=pduOutputHeat, pdrPanelCurrentB=pdrPanelCurrentB, upsBatTimeRemaining=upsBatTimeRemaining, upsConfigOutputFreq=upsConfigOutputFreq, pdrFirmwareVersion=pdrFirmwareVersion, pdrBreakerPanel=pdrBreakerPanel, pduOutput=pduOutput, upsConfigLowOutputVoltageLimit=upsConfigLowOutputVoltageLimit, pdrSerialNumber=pdrSerialNumber, managementModuleIdent=managementModuleIdent, pdrBreakerPercentWarning=pdrBreakerPercentWarning, upsRecepEntry=upsRecepEntry, pdrPanelMonthlyKWH=pdrPanelMonthlyKWH, pdrBreakerRatedCurrent=pdrBreakerRatedCurrent, upsControlOutputOnDelay=upsControlOutputOnDelay, upsTopoPowerStrategy=upsTopoPowerStrategy, deviceFirmwareVersion=deviceFirmwareVersion, pdrVARating=pdrVARating, upsOutputFrequency=upsOutputFrequency, pduInputEntry=pduInputEntry, upsConfigDateAndTime=upsConfigDateAndTime, pdrBreakerNumPosition=pdrBreakerNumPosition, upsEnvRemoteTempLowerLimit=upsEnvRemoteTempLowerLimit, upsInputLineBads=upsInputLineBads, pdrPanelTable=pdrPanelTable, pdrNumPhases=pdrNumPhases, upsInputFrequency=upsInputFrequency, upsRecepOnDelaySecs=upsRecepOnDelaySecs, pduModel=pduModel, upsEnvRemoteTemp=upsEnvRemoteTemp, cpqPower=cpqPower, upsBypass=upsBypass, upsContactsTable=upsContactsTable, pdrPanelVoltageC=pdrPanelVoltageC, pduOutputNumBreakers=pduOutputNumBreakers, trapCode=trapCode, pdrPanelFrequency=pdrPanelFrequency, deviceModel=deviceModel, pdrBreakerYearlyKWH=pdrBreakerYearlyKWH, pdrBreakerCurrent=pdrBreakerCurrent, upsNumReceptacles=upsNumReceptacles, upsOutputLoad=upsOutputLoad, upsRecepStatus=upsRecepStatus, pdrPanelLoadA=pdrPanelLoadA, trapDeviceMgmtUrl=trapDeviceMgmtUrl, upsInputTable=upsInputTable, upsInputCurrent=upsInputCurrent, upsConfigInputVoltage=upsConfigInputVoltage, upsOutputTable=upsOutputTable, upsRecepIndex=upsRecepIndex, pduFirmwareVersion=pduFirmwareVersion, pduStatus=pduStatus, upsEnvAmbientTemp=upsEnvAmbientTemp, upsEnvRemoteHumidityLowerLimit=upsEnvRemoteHumidityLowerLimit, breakerCurrent=breakerCurrent, pdrModel=pdrModel, devicePartNumber=devicePartNumber, upsTestBattery=upsTestBattery, pduSerialNumber=pduSerialNumber, upsTopologyType=upsTopologyType, pdrNumBreakers=pdrNumBreakers, upsConfig=upsConfig, pdr=pdr, upsLoadShedSecsWithRestart=upsLoadShedSecsWithRestart, trapDeviceName=trapDeviceName, pdrBreakerNumPhases=pdrBreakerNumPhases, upsIdent=upsIdent, pdrIdent=pdrIdent, upsIdentOemCode=upsIdentOemCode, upsContactType=upsContactType, upsTestTrap=upsTestTrap, pdrBreakerIndex=pdrBreakerIndex, pdrPanelIndex=pdrPanelIndex, pdrBreakerMonthlyKWH=pdrBreakerMonthlyKWH, pduOutputLoad=pduOutputLoad, upsIdentSoftwareVersions=upsIdentSoftwareVersions, upsOutputWatts=upsOutputWatts, pdrBreakerPower=pdrBreakerPower, upsIdentManufacturer=upsIdentManufacturer, upsOutputVoltage=upsOutputVoltage, upsEnvNumContacts=upsEnvNumContacts, upsTest=upsTest, pdrPanelVoltageA=pdrPanelVoltageA, inputCurrent=inputCurrent, pdu=pdu, upsInputWatts=upsInputWatts) |
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
# GN version: //components/mime_util/mime_util
'target_name': 'mime_util',
'type': 'static_library',
'dependencies': [
'../../base/base.gyp:base',
'../../net/net.gyp:net',
],
'sources': [
'mime_util.cc',
'mime_util.h',
],
'conditions': [
['OS!="ios"', {
# iOS doesn't use and must not depend on //media
'dependencies': [
'../../media/media.gyp:media',
],
}],
],
}
],
}
| {'targets': [{'target_name': 'mime_util', 'type': 'static_library', 'dependencies': ['../../base/base.gyp:base', '../../net/net.gyp:net'], 'sources': ['mime_util.cc', 'mime_util.h'], 'conditions': [['OS!="ios"', {'dependencies': ['../../media/media.gyp:media']}]]}]} |
# TLE
N = int(input())
sq = int(N ** 0.5)
s = set()
for a in range(2, sq + 1):
x = a * a
while x <= N:
s.add(x)
x *= a
print(N - len(s)) | n = int(input())
sq = int(N ** 0.5)
s = set()
for a in range(2, sq + 1):
x = a * a
while x <= N:
s.add(x)
x *= a
print(N - len(s)) |
# user-defined function for sorting the list
# it has List as parameter
def selectionSort(List):
#n is the length of the list
n=len(List)
#if list is empty
if n==0:
return(List)
#if list is not empty
for i in range(n-1):
#we are finding minimum of the sublist from List[i] to end of the List
minimum_sublist = min(List[i:])
#above line of code we found the minimun of sublist, now we are getting its index
index_minimum = List.index(minimum_sublist)
#swapping of List[i] with List[index_minimum]
List[i], List[index_minimum] = List[index_minimum], List[i]
#returning the sorted list
return(List)
listA = [6,4,2,1,5]
print("Initial List:", listA)
# Selection sort function is called with listA passed as argument,
# the call returns the sortedlist and it is assigned back to listA
listA = selectionSort(listA)
print("Sorted List:", listA)
'''
Output:-
Initial List: [6, 4, 2, 1, 5]
Sorted List: [1, 2, 4, 5, 6]
''' | def selection_sort(List):
n = len(List)
if n == 0:
return List
for i in range(n - 1):
minimum_sublist = min(List[i:])
index_minimum = List.index(minimum_sublist)
(List[i], List[index_minimum]) = (List[index_minimum], List[i])
return List
list_a = [6, 4, 2, 1, 5]
print('Initial List:', listA)
list_a = selection_sort(listA)
print('Sorted List:', listA)
'\nOutput:-\n\nInitial List: [6, 4, 2, 1, 5]\nSorted List: [1, 2, 4, 5, 6]\n' |
class MyHashMap:
def __init__(self):
self.arr = [-1 for _ in range(10 ** 6)]
def put(self, key: int, value: int):
self.arr[key] = value
def get(self, key):
return self.arr[key]
def remove(self, key):
self.arr[key] = -1
# Your MyHashMap object will be instantiated and called as such:
# obj = MyHashMap()
# obj.put(key,value)
# param_2 = obj.get(key)
# obj.remove(key)
| class Myhashmap:
def __init__(self):
self.arr = [-1 for _ in range(10 ** 6)]
def put(self, key: int, value: int):
self.arr[key] = value
def get(self, key):
return self.arr[key]
def remove(self, key):
self.arr[key] = -1 |
print("Hello world!")
print("What is your name?")
name = input()
print("It is good to meet you,", name)
| print('Hello world!')
print('What is your name?')
name = input()
print('It is good to meet you,', name) |
# This lab demonstrates how to creates lists in Python
# The list will be used in ways that relate to real life scenarios
# It will also aim to format, add and remove items from the list
line_break = "\n"
# declare a list that includes the names of users
users = ['lamin', 'sally', 'bakay', 'satou', 'sainey']
# print all the names in the list
print('These are all the items in the list of users %s' % users)
print(line_break)
# print a single name based on its index (e.g. 'lamin' = index 0, 'sally' = index 1)
print('User at index 0 is ' + users[0].capitalize())
print('User at index 1 is ' + users[1].capitalize(), line_break)
# print the last item in the list
print('Last item in the list is ' + users[-1])
print('Second to last item in the list is ' + users[-2], line_break)
# print users from index 2 to the end of the list
print('Users at index 0 to the index 3 %s' % (users[:3]))
print('Users at index 1 to end of the list are ', users[1:] ) # for a multiple names, this method will result in an err
# example below will result in an error because list cannot be concatenated!!
#print('Users at index 1 to end of the list are ' + users[1:3]) | line_break = '\n'
users = ['lamin', 'sally', 'bakay', 'satou', 'sainey']
print('These are all the items in the list of users %s' % users)
print(line_break)
print('User at index 0 is ' + users[0].capitalize())
print('User at index 1 is ' + users[1].capitalize(), line_break)
print('Last item in the list is ' + users[-1])
print('Second to last item in the list is ' + users[-2], line_break)
print('Users at index 0 to the index 3 %s' % users[:3])
print('Users at index 1 to end of the list are ', users[1:]) |
class UserDataStorage:
def __init__(self):
self._users = {}
def for_user(self, user_id: int):
result = self._users.get(user_id)
if result is None:
user_data = {}
self._users[user_id] = user_data
return user_data
return result
| class Userdatastorage:
def __init__(self):
self._users = {}
def for_user(self, user_id: int):
result = self._users.get(user_id)
if result is None:
user_data = {}
self._users[user_id] = user_data
return user_data
return result |
# Host to initialise the application on
HOST = "0.0.0.0"
# set the webapp mode to debug on startup?
DEBUG = False
# port to deploy the webapp on
PORT = 5000
# apply SSL to the site?
SSL = True
# Start the webapp with threading enabled?
THREADED = False | host = '0.0.0.0'
debug = False
port = 5000
ssl = True
threaded = False |
#Olivetti metricas
#Get the font
thisFont = Glyphs.font
#Get the masters
allMasters = thisFont.masters
#Get The glyphs
allGlyphs = thisFont.glyphs
ascendentes = 780
capHeight = 700
xHeight = 510
descendentes = -220
#Loop in masters /// enumerate ayuda a iterar sobre el indice de las capas
for index, master in enumerate(allMasters):
master.xHeight = xHeight
master.ascender = ascendentes
master.capHeight = capHeight
master.descender = descendentes
#print(master.alignmentZones)
print(f"xHeight: {master.xHeight} | Ascendentes: {master.ascender} | CapHeight: {master.capHeight} | Descendentes: {master.descender} | ") | this_font = Glyphs.font
all_masters = thisFont.masters
all_glyphs = thisFont.glyphs
ascendentes = 780
cap_height = 700
x_height = 510
descendentes = -220
for (index, master) in enumerate(allMasters):
master.xHeight = xHeight
master.ascender = ascendentes
master.capHeight = capHeight
master.descender = descendentes
print(f'xHeight: {master.xHeight} | Ascendentes: {master.ascender} | CapHeight: {master.capHeight} | Descendentes: {master.descender} | ') |
class BaseDeployAzureVMResourceModel(object):
def __init__(self):
self.vm_size = '' # type: str
self.autoload = False # type: bool
self.add_public_ip = False # type: bool
self.inbound_ports = '' # type: str
self.public_ip_type = '' # type: str
self.app_name = '' # type: str
self.username = '' # type: str
self.password = '' # type: str
self.extension_script_file = ''
self.extension_script_configurations = ''
self.extension_script_timeout = 0 # type: int
self.disk_type = '' # type: str
class DeployAzureVMResourceModel(BaseDeployAzureVMResourceModel):
def __init__(self):
super(DeployAzureVMResourceModel, self).__init__()
self.image_publisher = '' # type: str
self.image_offer = '' # type: str
self.image_sku = '' # type: str
self.image_version = '' # type: str
class DeployAzureVMFromCustomImageResourceModel(BaseDeployAzureVMResourceModel):
def __init__(self):
super(DeployAzureVMFromCustomImageResourceModel, self).__init__()
self.image_name = ""
self.image_resource_group = ""
| class Basedeployazurevmresourcemodel(object):
def __init__(self):
self.vm_size = ''
self.autoload = False
self.add_public_ip = False
self.inbound_ports = ''
self.public_ip_type = ''
self.app_name = ''
self.username = ''
self.password = ''
self.extension_script_file = ''
self.extension_script_configurations = ''
self.extension_script_timeout = 0
self.disk_type = ''
class Deployazurevmresourcemodel(BaseDeployAzureVMResourceModel):
def __init__(self):
super(DeployAzureVMResourceModel, self).__init__()
self.image_publisher = ''
self.image_offer = ''
self.image_sku = ''
self.image_version = ''
class Deployazurevmfromcustomimageresourcemodel(BaseDeployAzureVMResourceModel):
def __init__(self):
super(DeployAzureVMFromCustomImageResourceModel, self).__init__()
self.image_name = ''
self.image_resource_group = '' |
num_rows = 8
num_cols = 20
rows = 1 #create a number to start counting from for rows
while rows <= num_rows: #start iterating through number of rows
cols = 1 #create a number to start counting from for columns
alpha = 'A' #starting point for alphabet
while cols <= num_cols: #iterates through number of columns
print('%s%s' % (rows, alpha), end=' ')
cols +=1 #number of columns needs to increase
alpha = chr(ord(alpha) + 1) #alphabet needs to increase
rows += 1 #number of rows needs to increase
print()
| num_rows = 8
num_cols = 20
rows = 1
while rows <= num_rows:
cols = 1
alpha = 'A'
while cols <= num_cols:
print('%s%s' % (rows, alpha), end=' ')
cols += 1
alpha = chr(ord(alpha) + 1)
rows += 1
print() |
# Chapter03_04
# Python Tuple
# Should know about difference with List
# Cannot modify or remove
# Declaring Tuple
a = ()
b = (1,)
c = (11, 12, 13, 14)
d = (100, 1000, 'Ace', 'Base', 'Captine')
e = (100, 1000, ('Ace', 'Base', 'Captine'))
# Indexing
print('>>>>>')
print('d - ', d[1])
print('d - ', d[0] + d[1] + d[1])
print('d - ', d[-1])
print('e - ', e[-1][1])
print('e - ', list(e[-1][1]))
# Cannot Modify
# d[0] = 1500 # ERROR
# Slicing
print('>>>>>')
print('d - ', d[0:3])
print('d - ', d[2:])
print('e - ', e[2][1:3])
# Calcuate Tuple
print('>>>>>')
print('c + d', c + d)
print('c * 3', c * 3)
# Tuple Function
a = (5, 2, 3, 1, 4)
print('a - ', a)
print('a - ', a.index(3))
print('a - ', a.count(2))
# Packing & Unpacking
# Packing
t = ('foo', 'bar', 'baz', 'qux')
print(t)
print(t[0])
print(t[-1])
# Unpacking 1
(x1, x2, x3, x4) = t
print(type(x1), type(x2), type(x3), type(x1))
print(x1, x2, x3, x4)
# Packing & Unpacking 2
t2 = 1, 2, 3
t3 = 4,
x1, x2, x3 = t2
x4, x5, x6 = 4, 5, 6
print(t2)
print(t3)
print(x1, x2, x3)
print(x4, x5, x6) | a = ()
b = (1,)
c = (11, 12, 13, 14)
d = (100, 1000, 'Ace', 'Base', 'Captine')
e = (100, 1000, ('Ace', 'Base', 'Captine'))
print('>>>>>')
print('d - ', d[1])
print('d - ', d[0] + d[1] + d[1])
print('d - ', d[-1])
print('e - ', e[-1][1])
print('e - ', list(e[-1][1]))
print('>>>>>')
print('d - ', d[0:3])
print('d - ', d[2:])
print('e - ', e[2][1:3])
print('>>>>>')
print('c + d', c + d)
print('c * 3', c * 3)
a = (5, 2, 3, 1, 4)
print('a - ', a)
print('a - ', a.index(3))
print('a - ', a.count(2))
t = ('foo', 'bar', 'baz', 'qux')
print(t)
print(t[0])
print(t[-1])
(x1, x2, x3, x4) = t
print(type(x1), type(x2), type(x3), type(x1))
print(x1, x2, x3, x4)
t2 = (1, 2, 3)
t3 = (4,)
(x1, x2, x3) = t2
(x4, x5, x6) = (4, 5, 6)
print(t2)
print(t3)
print(x1, x2, x3)
print(x4, x5, x6) |
def digitize(n: int) -> list:
num = []
for el in str(n):
num.append((int(el)))
return list(reversed(num)) | def digitize(n: int) -> list:
num = []
for el in str(n):
num.append(int(el))
return list(reversed(num)) |
class DwightException(Exception):
pass
class CommandFailed(DwightException):
pass
class UsageException(DwightException):
pass
class NotRootException(UsageException):
pass
class ConfigurationException(DwightException):
pass
class CannotLoadConfiguration(ConfigurationException):
pass
class InvalidConfiguration(ConfigurationException):
pass
class UnknownConfigurationOptions(ConfigurationException):
pass
class RuntimeDwightException(DwightException):
pass
class CannotMountPath(RuntimeDwightException):
pass
| class Dwightexception(Exception):
pass
class Commandfailed(DwightException):
pass
class Usageexception(DwightException):
pass
class Notrootexception(UsageException):
pass
class Configurationexception(DwightException):
pass
class Cannotloadconfiguration(ConfigurationException):
pass
class Invalidconfiguration(ConfigurationException):
pass
class Unknownconfigurationoptions(ConfigurationException):
pass
class Runtimedwightexception(DwightException):
pass
class Cannotmountpath(RuntimeDwightException):
pass |
masses = {'H':'1.008',
'He':'4.003',
'Li':'6.941',
'Be':'9.012',
'B':'10.81',
'C':'12.01',
'N':'14.01',
'O':'16.00',
'F':'19.00',
'Ne':'20.18',
'Na':'22.99',
'Mg':'24.31',
'Al':'26.98',
'Si':'28.09',
'P':'30.97',
'S':'32.07',
'Cl':'35.45',
'Ar':'39.95',
'K':'39.10',
'Ca':'40.08',
'Sc':'44.96',
'Ti':'47.87',
'V':'50.94',
'Cr':'52.00',
'Mn':'54.94',
'Fe':'55.85',
'Co':'58.93',
'Ni':'58.69',
'Cu':'63.55',
'Zn':'65.38',
'Ga':'69.72',
'Ge':'72.64',
'As':'74.92',
'Se':'78.96',
'Br':'79.90',
'Kr':'83.80',
'Rb':'85.47',
'Sr':'87.61',
'Y':'88.91',
'Zr':'91.22',
'Nb':'92.91',
'Mo':'95.96',
'Tc':'0',
'Ru':'101.1',
'Rh':'102.9',
'Pd':'106.4',
'Ag':'107.9',
'Cd':'112.4',
'In':'114.8',
'Sn':'118.7',
'Sb':'121.8',
'Te':'127.6',
'I':'126.9',
'Xe':'131.3',
'Cs':'132.9',
'Ba':'137.3',
'La':'138.9',
'Ce':'140.1',
'Pr':'140.9',
'Nd':'144.2',
'Pm':'0',
'Sm':'150.4',
'Eu':'152.0',
'Gd':'157.3',
'Tb':'158.9',
'Dy':'162.5',
'Ho':'164.9',
'Er':'167.3',
'Tm':'168.9',
'Yb':'173.1',
'Lu':'175.0',
'Hf':'178.5',
'Ta':'180.9',
'W':'183.9',
'Re':'186.2',
'Os':'190.2',
'Ir':'192.2',
'Pt':'195.1',
'Au':'197.0',
'Hg':'200.6',
'Tl':'204.4',
'Pb':'207.2',
'Bi':'209.0',
'Po':'0',
'At':'0',
'Rn':'0',
'Fr':'0',
'Ra':'0',
'Ac':'0',
'Th':'232.0',
'Pa':'231.0',
'U':'238.0',
'Np':'0',
'Pu':'0',
'Am':'0',
'Cm':'0',
'Bk':'0',
'Cf':'0',
'Es':'0',
'Fm':'0',
'Md':'0',
'No':'0',
'Lr':'0',
'Rf':'0',
'Db':'0',
'Sg':'0',
'Bh':'0',
'Hs':'0',
'Mt':'0',
'Ds':'0',
'Rg':'0',
'Cn':'0',
'Uut':'0',
'Uuq':'0',
'Uup':'0',
'Uuh':'0',
'Uus':'0',
'Uuo':'0'} | masses = {'H': '1.008', 'He': '4.003', 'Li': '6.941', 'Be': '9.012', 'B': '10.81', 'C': '12.01', 'N': '14.01', 'O': '16.00', 'F': '19.00', 'Ne': '20.18', 'Na': '22.99', 'Mg': '24.31', 'Al': '26.98', 'Si': '28.09', 'P': '30.97', 'S': '32.07', 'Cl': '35.45', 'Ar': '39.95', 'K': '39.10', 'Ca': '40.08', 'Sc': '44.96', 'Ti': '47.87', 'V': '50.94', 'Cr': '52.00', 'Mn': '54.94', 'Fe': '55.85', 'Co': '58.93', 'Ni': '58.69', 'Cu': '63.55', 'Zn': '65.38', 'Ga': '69.72', 'Ge': '72.64', 'As': '74.92', 'Se': '78.96', 'Br': '79.90', 'Kr': '83.80', 'Rb': '85.47', 'Sr': '87.61', 'Y': '88.91', 'Zr': '91.22', 'Nb': '92.91', 'Mo': '95.96', 'Tc': '0', 'Ru': '101.1', 'Rh': '102.9', 'Pd': '106.4', 'Ag': '107.9', 'Cd': '112.4', 'In': '114.8', 'Sn': '118.7', 'Sb': '121.8', 'Te': '127.6', 'I': '126.9', 'Xe': '131.3', 'Cs': '132.9', 'Ba': '137.3', 'La': '138.9', 'Ce': '140.1', 'Pr': '140.9', 'Nd': '144.2', 'Pm': '0', 'Sm': '150.4', 'Eu': '152.0', 'Gd': '157.3', 'Tb': '158.9', 'Dy': '162.5', 'Ho': '164.9', 'Er': '167.3', 'Tm': '168.9', 'Yb': '173.1', 'Lu': '175.0', 'Hf': '178.5', 'Ta': '180.9', 'W': '183.9', 'Re': '186.2', 'Os': '190.2', 'Ir': '192.2', 'Pt': '195.1', 'Au': '197.0', 'Hg': '200.6', 'Tl': '204.4', 'Pb': '207.2', 'Bi': '209.0', 'Po': '0', 'At': '0', 'Rn': '0', 'Fr': '0', 'Ra': '0', 'Ac': '0', 'Th': '232.0', 'Pa': '231.0', 'U': '238.0', 'Np': '0', 'Pu': '0', 'Am': '0', 'Cm': '0', 'Bk': '0', 'Cf': '0', 'Es': '0', 'Fm': '0', 'Md': '0', 'No': '0', 'Lr': '0', 'Rf': '0', 'Db': '0', 'Sg': '0', 'Bh': '0', 'Hs': '0', 'Mt': '0', 'Ds': '0', 'Rg': '0', 'Cn': '0', 'Uut': '0', 'Uuq': '0', 'Uup': '0', 'Uuh': '0', 'Uus': '0', 'Uuo': '0'} |
# Ternary Operator
# condition_if_true if condition else condition_if_else
is_friend = True
can_message = "message allowed" if is_friend else "not allowed"
print(can_message)
| is_friend = True
can_message = 'message allowed' if is_friend else 'not allowed'
print(can_message) |
names = ['Jack', 'John', 'Joe']
ages = [18, 19, 20]
for name, age in zip(names, ages):
print(name, age)
| names = ['Jack', 'John', 'Joe']
ages = [18, 19, 20]
for (name, age) in zip(names, ages):
print(name, age) |
jungle_template = {
0 : {
"entity_type" : {"base": "room", "group": "jungle", "model": None, "sub_model": None},
"ship_id" : None,
"name" : "Thinned Jungle",
"description" : "The jungle here is thinner.",
"region" : "Jungle",
"zone" : "jungle",
"elevation" : "",
"effects" : "",
"owner" : "",
},
1 : {
"entity_type" : {"base": "room", "group": "jungle", "model": None, "sub_model": None},
"ship_id" : None,
"name" : "Thick Jungle",
"description" : "The jungle here is thick and difficult to navigate.",
"region" : "Jungle",
"zone" : "jungle",
"elevation" : "",
"effects" : "",
"owner" : "",
},
2 : {
"entity_type" : {"base": "room", "group": "jungle", "model": None, "sub_model": None},
"ship_id" : None,
"name" : "Sparse Jungle",
"description" : "The jungle here is quite open, providing for good visibility.",
"region" : "Jungle",
"zone" : "jungle",
"elevation" : "",
"effects" : "",
"owner" : "",
}
} | jungle_template = {0: {'entity_type': {'base': 'room', 'group': 'jungle', 'model': None, 'sub_model': None}, 'ship_id': None, 'name': 'Thinned Jungle', 'description': 'The jungle here is thinner.', 'region': 'Jungle', 'zone': 'jungle', 'elevation': '', 'effects': '', 'owner': ''}, 1: {'entity_type': {'base': 'room', 'group': 'jungle', 'model': None, 'sub_model': None}, 'ship_id': None, 'name': 'Thick Jungle', 'description': 'The jungle here is thick and difficult to navigate.', 'region': 'Jungle', 'zone': 'jungle', 'elevation': '', 'effects': '', 'owner': ''}, 2: {'entity_type': {'base': 'room', 'group': 'jungle', 'model': None, 'sub_model': None}, 'ship_id': None, 'name': 'Sparse Jungle', 'description': 'The jungle here is quite open, providing for good visibility.', 'region': 'Jungle', 'zone': 'jungle', 'elevation': '', 'effects': '', 'owner': ''}} |
def update_doc_with_invalid_hype_hint(doc: str):
postfix = '(Note: parameter type can be wrong)'
separator = ' ' if doc else ''
return separator.join((doc, postfix))
| def update_doc_with_invalid_hype_hint(doc: str):
postfix = '(Note: parameter type can be wrong)'
separator = ' ' if doc else ''
return separator.join((doc, postfix)) |
def frame_is_montecarlo(frame):
return ("MCInIcePrimary" in frame) or ("I3MCTree" in frame)
def frame_is_noise(frame):
try:
frame["I3MCTree"][0].energy
return False
except: # noqa: E722
try:
frame["MCInIcePrimary"].energy
return False
except: # noqa: E722
return True
| def frame_is_montecarlo(frame):
return 'MCInIcePrimary' in frame or 'I3MCTree' in frame
def frame_is_noise(frame):
try:
frame['I3MCTree'][0].energy
return False
except:
try:
frame['MCInIcePrimary'].energy
return False
except:
return True |
try:
score = float(input('enter score'))
# A program that prompts a user to enter a score from 0 to 1 and prints the corresponding grade
if 0 <= score < 0.6:
print(score, 'F')
elif 0.6 <= score < 0.7:
print(score, 'D')
elif 0.7 <= score < 0.8:
print(score, 'C')
elif 0.8 <= score < 0.9:
print(score, 'B')
elif 0.9 <= score <= 1:
print(score, 'A')
else:
print('error, out of range')
except:
print("INVALID ENTRY")
| try:
score = float(input('enter score'))
if 0 <= score < 0.6:
print(score, 'F')
elif 0.6 <= score < 0.7:
print(score, 'D')
elif 0.7 <= score < 0.8:
print(score, 'C')
elif 0.8 <= score < 0.9:
print(score, 'B')
elif 0.9 <= score <= 1:
print(score, 'A')
else:
print('error, out of range')
except:
print('INVALID ENTRY') |
def motif(dna, frag):
'''
Function that looks for a defined
DNA fragment in a DNA sequence and
gives the position of the start of each
instance of the fragment within the
DNA sequence.
Input params:
dna = dna sequence
frag = fragment to be searched for within
the sequence
Output params:
repeats = a list of start positions
of the fragment without commas as separators.
'''
repeats = []
for i in range(len(dna)):
if frag == dna[i: i+len(frag)]:
repeats.append(i+1)
repeats = ''.join(str(repeats).split(','))
return repeats
dna = "GCCGCCCTAATGAATTTAATGAATAATGAACCTACGCCTAATGAAGTAATGAAGGCTGCATAATGAACGGCTTAATGAATAATGAAGTAGTAATGAACTGTGACTAATGAAACTAATAATGAACTGTTCATAATGAATAATGAATAATGAAAGCTCTTAATGAATAATGAATAATGAATCGTGCGGCTTCTAATGAATAATGAAGAACCGTAATGAATAATGAATCACTAATGAAGACATTAATGAATATGTAATGAATAATGAATAAGTTAATGAATTTCTAATGAAGTAGTATAATGAACGCATAATGAAGTAATGAAGATCTAATGAATAATGAAATAATGAAATCCGTAATGAAACGTAATGAATAATGAACTAATTAATGAATAATGAATCGTAATGAATTTAATGAATAATGAATCCTAATGAAAAGCTAATGAATAATGAATAATGAATAATGAATAATGAAATCTAATGAAGATAATGAAGCCCACTGTAATGAACATAATGAACGCATAATGAATGTAATGAATAATGAAGTAATGAAGCATAATGAATAATGAATAATGAAATCTTAATGAAATAATGAATAATGAAGGTTAATGAATAATGAATGACGGTTAATGAAATCTAATGAAGTTTAATGAAGTAATGAACGTTGATAATGAATAATGAAGTAATGAATAATGAAGTAATGAATAATGAAACAGTAATGAATAATGAACTAATGAAATTAATGAAATTAATGAATAATGAATTTAATGAATAATGAATAATGAATAATGAATAATGAAGGCGAGGTAGAGTTTAATGAAGTTAATGAAGCTAATGAAATAATGAACTCACTAATGAA"
fragment = "TAATGAATA"
print(motif(dna, fragment))
| def motif(dna, frag):
"""
Function that looks for a defined
DNA fragment in a DNA sequence and
gives the position of the start of each
instance of the fragment within the
DNA sequence.
Input params:
dna = dna sequence
frag = fragment to be searched for within
the sequence
Output params:
repeats = a list of start positions
of the fragment without commas as separators.
"""
repeats = []
for i in range(len(dna)):
if frag == dna[i:i + len(frag)]:
repeats.append(i + 1)
repeats = ''.join(str(repeats).split(','))
return repeats
dna = 'GCCGCCCTAATGAATTTAATGAATAATGAACCTACGCCTAATGAAGTAATGAAGGCTGCATAATGAACGGCTTAATGAATAATGAAGTAGTAATGAACTGTGACTAATGAAACTAATAATGAACTGTTCATAATGAATAATGAATAATGAAAGCTCTTAATGAATAATGAATAATGAATCGTGCGGCTTCTAATGAATAATGAAGAACCGTAATGAATAATGAATCACTAATGAAGACATTAATGAATATGTAATGAATAATGAATAAGTTAATGAATTTCTAATGAAGTAGTATAATGAACGCATAATGAAGTAATGAAGATCTAATGAATAATGAAATAATGAAATCCGTAATGAAACGTAATGAATAATGAACTAATTAATGAATAATGAATCGTAATGAATTTAATGAATAATGAATCCTAATGAAAAGCTAATGAATAATGAATAATGAATAATGAATAATGAAATCTAATGAAGATAATGAAGCCCACTGTAATGAACATAATGAACGCATAATGAATGTAATGAATAATGAAGTAATGAAGCATAATGAATAATGAATAATGAAATCTTAATGAAATAATGAATAATGAAGGTTAATGAATAATGAATGACGGTTAATGAAATCTAATGAAGTTTAATGAAGTAATGAACGTTGATAATGAATAATGAAGTAATGAATAATGAAGTAATGAATAATGAAACAGTAATGAATAATGAACTAATGAAATTAATGAAATTAATGAATAATGAATTTAATGAATAATGAATAATGAATAATGAATAATGAAGGCGAGGTAGAGTTTAATGAAGTTAATGAAGCTAATGAAATAATGAACTCACTAATGAA'
fragment = 'TAATGAATA'
print(motif(dna, fragment)) |
N = int(input())
s = set()
for i in range(2, int(N ** 0.5) + 1):
for j in range(2, N + 1):
t = i ** j
if t > N:
break
s.add(t)
print(N - len(s))
| n = int(input())
s = set()
for i in range(2, int(N ** 0.5) + 1):
for j in range(2, N + 1):
t = i ** j
if t > N:
break
s.add(t)
print(N - len(s)) |
'''
cardcountvalue.py
Name: Wengel Gemu
Collaborators: None
Date: September 6th, 2019
Description: This program takes user input of a card value and prints
the card counting number for that card.
'''
# MIT card counting values:
#
# 2 - 6 should add one to the count, so their value is 1
# 7 - 9 have no effect on the count, so their value is 0
# A, 10, J, Q, and K should subtract one from the count,
# so their value is -1
# this is a list containing all of the valid values for a card
cards = ['A','2','3','4','5','6','7','8','9','10','J','Q','K']
card_value = input("Enter a card value: ")
count = 0
if card_value in ['2','3','4','5','6']:
count += 1
print("the card is " + str(count))
elif card_value in ['7','8','9']:
count += 0
print("the card is " + str(count))
elif card_value in ['10','J','Q','K', 'A']:
count -= 1
print("the card is " + str(count))
else:
print("the card is invalid")
# Write some code that takes a card as input (remember to
# check it for validity) and outputs the MIT card counting
# value of that card. Use multiple if/else statements
# to determine the card counting value of the user's input.
| """
cardcountvalue.py
Name: Wengel Gemu
Collaborators: None
Date: September 6th, 2019
Description: This program takes user input of a card value and prints
the card counting number for that card.
"""
cards = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']
card_value = input('Enter a card value: ')
count = 0
if card_value in ['2', '3', '4', '5', '6']:
count += 1
print('the card is ' + str(count))
elif card_value in ['7', '8', '9']:
count += 0
print('the card is ' + str(count))
elif card_value in ['10', 'J', 'Q', 'K', 'A']:
count -= 1
print('the card is ' + str(count))
else:
print('the card is invalid') |
class Solution:
def mySqrt(self, x):
high = x
low = 1
if x == 0:
return 0
# digit-by-digit calculation
while high - low > 1:
mid = (low + high)//2
#print("+++ ",mid)
if mid**2 > x:
high = mid
else:
low = mid
return low
| class Solution:
def my_sqrt(self, x):
high = x
low = 1
if x == 0:
return 0
while high - low > 1:
mid = (low + high) // 2
if mid ** 2 > x:
high = mid
else:
low = mid
return low |
class StringI(file):
pass
def StringIO(s=''):
return StringI(s)
| class Stringi(file):
pass
def string_io(s=''):
return string_i(s) |
# -*- coding: utf-8 -*-
class NotReadyError(Exception):
pass
| class Notreadyerror(Exception):
pass |
# Portfolio Task 2 - Recursive Palindrome Checker
def PalindromeChecker(String):
# Removing empty spaces and converting string to lowercase
str = String.replace(" ", "").lower()
if len(str) < 2:
return True
if str[0] != str[-1]:
return False
return PalindromeChecker(str[1:-1])
# Testing
# Test 1 - Was It A Rat I Saw
Ans1 = PalindromeChecker("Was It A Rat I Saw")
print("Is this a palindrome: Was it a Rat I Saw: " + str(Ans1))
# Test 2 - I do not like green eggs and ham. I do not like them, Sam-I-Am
Ans2 = PalindromeChecker("I do not like green eggs and ham. I do not like them, Sam-I-Am")
print("I do not like green eggs and ham I do not like them Sam-I-Am: " + str(Ans2))
# Test 3 - Racecar
Ans3 = PalindromeChecker("Racecar")
print("Is this a palindrome: Racecar: " + str(Ans3))
# Test 4 - George
Ans4 = PalindromeChecker("George")
print("Is this a palindrome: George: " + str(Ans4))
# Test 5 - Was it a car or a cat I saw
Ans5 = PalindromeChecker("Was it a car or a cat I saw")
print("Is this a palindrome: Was it a car or a cat I saw: " + str(Ans5)) | def palindrome_checker(String):
str = String.replace(' ', '').lower()
if len(str) < 2:
return True
if str[0] != str[-1]:
return False
return palindrome_checker(str[1:-1])
ans1 = palindrome_checker('Was It A Rat I Saw')
print('Is this a palindrome: Was it a Rat I Saw: ' + str(Ans1))
ans2 = palindrome_checker('I do not like green eggs and ham. I do not like them, Sam-I-Am')
print('I do not like green eggs and ham I do not like them Sam-I-Am: ' + str(Ans2))
ans3 = palindrome_checker('Racecar')
print('Is this a palindrome: Racecar: ' + str(Ans3))
ans4 = palindrome_checker('George')
print('Is this a palindrome: George: ' + str(Ans4))
ans5 = palindrome_checker('Was it a car or a cat I saw')
print('Is this a palindrome: Was it a car or a cat I saw: ' + str(Ans5)) |
def setup():
size(1000, 1000)
stroke(0)
background(255)
def draw():
if (keyPressed):
x = ord(key) - 32
line(x, 0, x, height)
def draw():
pass
# pass just tells Python mode to not do anything here, draw() keeps the program running
def mousePressed():
fill(0, 102)
rect(mouseX, mouseY, 330, 330)
# works with no background in draw(), in draw!!!!
moveX = moveY = dragX = dragY = -20
def draw():
global moveX, moveY, dragX, dragY
#background(205)
fill(0)
ellipse(dragX, dragY, 33, 33) # Black circle
fill(153)
ellipse(moveX, moveY, 33, 33) # Gray circle
def mouseMoved(): # Move gray circle
global moveX, moveY
moveX = mouseX
moveY = mouseY
def mouseDragged(): # Move black circle
global dragX, dragY
dragX = mouseX
dragY = mouseY
| def setup():
size(1000, 1000)
stroke(0)
background(255)
def draw():
if keyPressed:
x = ord(key) - 32
line(x, 0, x, height)
def draw():
pass
def mouse_pressed():
fill(0, 102)
rect(mouseX, mouseY, 330, 330)
move_x = move_y = drag_x = drag_y = -20
def draw():
global moveX, moveY, dragX, dragY
fill(0)
ellipse(dragX, dragY, 33, 33)
fill(153)
ellipse(moveX, moveY, 33, 33)
def mouse_moved():
global moveX, moveY
move_x = mouseX
move_y = mouseY
def mouse_dragged():
global dragX, dragY
drag_x = mouseX
drag_y = mouseY |
#runas solve(2, 100)
#pythran export solve(int, int)
'''
How many distinct terms are in the sequence generated by ab for 2 <= a <= 100 and 2 <= b <= 100
'''
def solve(start, end):
terms = {}
count = 0
for a in xrange(start, end + 1):
for b in xrange(start, end + 1):
c = pow(long(a),b)
if not terms.get(c, 0):
terms[c] = 1
count = count + 1
return count
| """
How many distinct terms are in the sequence generated by ab for 2 <= a <= 100 and 2 <= b <= 100
"""
def solve(start, end):
terms = {}
count = 0
for a in xrange(start, end + 1):
for b in xrange(start, end + 1):
c = pow(long(a), b)
if not terms.get(c, 0):
terms[c] = 1
count = count + 1
return count |
a, b, c = [int(input()) for i in range(3)]
if a + b == c or b + c == a or a + c == b:
print("HAPPY CROWD")
else:
print("UNHAPPY CROWD")
| (a, b, c) = [int(input()) for i in range(3)]
if a + b == c or b + c == a or a + c == b:
print('HAPPY CROWD')
else:
print('UNHAPPY CROWD') |
class Classification:
# The leaf nodes of the decision tree
def __init__(self, c=0, label="NONE", threshold=None):
self.c = c
self.label = label
self.threshold = threshold
def getClass(self):
return self.c
def getLabel(self):
return self.label
def setClass(self, c):
self.c = c
def setLabel(self, l):
self.label = l
def getThreshold(self):
return self.threshold
def setThreshold(self, t):
self.threshold = t | class Classification:
def __init__(self, c=0, label='NONE', threshold=None):
self.c = c
self.label = label
self.threshold = threshold
def get_class(self):
return self.c
def get_label(self):
return self.label
def set_class(self, c):
self.c = c
def set_label(self, l):
self.label = l
def get_threshold(self):
return self.threshold
def set_threshold(self, t):
self.threshold = t |
# Copyright 2021 Google LLC
#
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
def parse_tvs(tvdir):
p = tvdir / "external" / "polyval.txt"
with p.open() as f:
d = None
k = None
v = None
for l in f:
l = l.strip()
if l == "":
if d:
d[k] = bytes.fromhex(v)
yield d
d = None
k = None
v = None
elif "=" in l:
if d is None:
d = {}
else:
d[k] = bytes.fromhex(v)
k, v = l.split("=", 2)
k = k.strip()
v = v.strip()
else:
v += l
if d is not None:
d[k] = bytes.fromhex(v)
yield d
| def parse_tvs(tvdir):
p = tvdir / 'external' / 'polyval.txt'
with p.open() as f:
d = None
k = None
v = None
for l in f:
l = l.strip()
if l == '':
if d:
d[k] = bytes.fromhex(v)
yield d
d = None
k = None
v = None
elif '=' in l:
if d is None:
d = {}
else:
d[k] = bytes.fromhex(v)
(k, v) = l.split('=', 2)
k = k.strip()
v = v.strip()
else:
v += l
if d is not None:
d[k] = bytes.fromhex(v)
yield d |
def is_git_url(url):
if url.startswith('http'):
return True
elif url.startswith('https'):
return True
elif url.startswith('git'):
return True
elif url.startswith('ssh'):
return True
return False
def is_not_git_url(url):
return not is_git_url(url)
class FilterModule(object):
'''
custom jinja2 filters for working with collections
'''
def filters(self):
return {
'is_git_url': is_git_url,
'is_not_git_url': is_not_git_url
}
| def is_git_url(url):
if url.startswith('http'):
return True
elif url.startswith('https'):
return True
elif url.startswith('git'):
return True
elif url.startswith('ssh'):
return True
return False
def is_not_git_url(url):
return not is_git_url(url)
class Filtermodule(object):
"""
custom jinja2 filters for working with collections
"""
def filters(self):
return {'is_git_url': is_git_url, 'is_not_git_url': is_not_git_url} |
# encoding: utf-8
# module cv2.ogl
# from /home/davtoh/anaconda3/envs/rrtools/lib/python3.5/site-packages/cv2.cpython-35m-x86_64-linux-gnu.so
# by generator 1.144
# no doc
# no imports
# Variables with simple values
BUFFER_ARRAY_BUFFER = 34962
Buffer_ARRAY_BUFFER = 34962
Buffer_ELEMENT_ARRAY_BUFFER = 34963
BUFFER_ELEMENT_ARRAY_BUFFER = 34963
BUFFER_PIXEL_PACK_BUFFER = 35051
Buffer_PIXEL_PACK_BUFFER = 35051
BUFFER_PIXEL_UNPACK_BUFFER = 35052
Buffer_PIXEL_UNPACK_BUFFER = 35052
BUFFER_READ_ONLY = 35000
Buffer_READ_ONLY = 35000
Buffer_READ_WRITE = 35002
BUFFER_READ_WRITE = 35002
BUFFER_WRITE_ONLY = 35001
Buffer_WRITE_ONLY = 35001
LINES = 1
LINE_LOOP = 2
LINE_STRIP = 3
POINTS = 0
POLYGON = 9
QUADS = 7
QUAD_STRIP = 8
TEXTURE2D_DEPTH_COMPONENT = 6402
Texture2D_DEPTH_COMPONENT = 6402
Texture2D_NONE = 0
TEXTURE2D_NONE = 0
TEXTURE2D_RGB = 6407
Texture2D_RGB = 6407
Texture2D_RGBA = 6408
TEXTURE2D_RGBA = 6408
TRIANGLES = 4
TRIANGLE_FAN = 6
TRIANGLE_STRIP = 5
__loader__ = None
__spec__ = None
# no functions
# no classes
| buffer_array_buffer = 34962
buffer_array_buffer = 34962
buffer_element_array_buffer = 34963
buffer_element_array_buffer = 34963
buffer_pixel_pack_buffer = 35051
buffer_pixel_pack_buffer = 35051
buffer_pixel_unpack_buffer = 35052
buffer_pixel_unpack_buffer = 35052
buffer_read_only = 35000
buffer_read_only = 35000
buffer_read_write = 35002
buffer_read_write = 35002
buffer_write_only = 35001
buffer_write_only = 35001
lines = 1
line_loop = 2
line_strip = 3
points = 0
polygon = 9
quads = 7
quad_strip = 8
texture2_d_depth_component = 6402
texture2_d_depth_component = 6402
texture2_d_none = 0
texture2_d_none = 0
texture2_d_rgb = 6407
texture2_d_rgb = 6407
texture2_d_rgba = 6408
texture2_d_rgba = 6408
triangles = 4
triangle_fan = 6
triangle_strip = 5
__loader__ = None
__spec__ = None |
# 2. Data of XYZ company is stored in sorted list. Write a program for searching specific data from that list.
# Hint: Use if/elif to deal with conditions.
string = input("Enter list of items (comma seperated)>>> ")
find_ele = input("Enter the elements which needs to find>>> ")
list_eles = str(string).split(",")
if find_ele in list_eles:
print(f"{find_ele} is present in given list at position {list_eles.index(find_ele)+1}")
else:
print(f"{find_ele} is not present in given list")
| string = input('Enter list of items (comma seperated)>>> ')
find_ele = input('Enter the elements which needs to find>>> ')
list_eles = str(string).split(',')
if find_ele in list_eles:
print(f'{find_ele} is present in given list at position {list_eles.index(find_ele) + 1}')
else:
print(f'{find_ele} is not present in given list') |
class Iterator:
def set_client_response(self, client_response: dict):
self.client_response = client_response
return self
def count(self):
return len(self.client_response['Environments'])
| class Iterator:
def set_client_response(self, client_response: dict):
self.client_response = client_response
return self
def count(self):
return len(self.client_response['Environments']) |
class Solution:
def canTransform(self, start: str, end: str) -> bool:
n = len(start)
L = R = 0
for i in range(n):
s, e = start[i], end[i]
if s == 'R':
if L != 0:
return False
else:
R += 1
if e == 'R':
if R == 0 or L != 0:
return False
else:
R -= 1
if e == 'L':
if R != 0:
return False
else:
L += 1
if s == 'L':
if L == 0 or R != 0:
return False
else:
L -= 1
return L == 0 and R == 0
| class Solution:
def can_transform(self, start: str, end: str) -> bool:
n = len(start)
l = r = 0
for i in range(n):
(s, e) = (start[i], end[i])
if s == 'R':
if L != 0:
return False
else:
r += 1
if e == 'R':
if R == 0 or L != 0:
return False
else:
r -= 1
if e == 'L':
if R != 0:
return False
else:
l += 1
if s == 'L':
if L == 0 or R != 0:
return False
else:
l -= 1
return L == 0 and R == 0 |
values = [int(i) for i in open('input','r').readline().split(",")]
data = [0,1,2,3,4,5,6,7,8,9]
steps = 256
for i in range(10):
data[i] = values.count(i)
for i in range(steps):
item = data.pop(0)
data[6] += item
data[8] = item
data.append(0)
print(sum(data))
| values = [int(i) for i in open('input', 'r').readline().split(',')]
data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
steps = 256
for i in range(10):
data[i] = values.count(i)
for i in range(steps):
item = data.pop(0)
data[6] += item
data[8] = item
data.append(0)
print(sum(data)) |
# Null Object Sentinel
class NullObject:
def __repr__(self):
return '< Null object >'
| class Nullobject:
def __repr__(self):
return '< Null object >' |
############################################################################
# Copyright (C) 2008 - 2015 Bosch Sensortec GmbH
#
# File : bmp180.h
#
# Date : 20150327
#
# Revision : 2.2.2
#
# Usage: Sensor Driver for BMP180 sensor
#
############################################################################
#file bmp180.py
# brief Header file for all define constants and function prototypes
############################################################################
## I2C ADDRESS DEFINITION OF BMP180
############################################################################
#BMP180 I2C Address#
BMP180_ADDR = 0x77
############################################################################
## ERROR CODE DEFINITIONS
############################################################################
#E_BMP_NULL_PTR = ((s8)-127)
#E_BMP_COMM_RES = ((s8)-1)
#E_BMP_OUT_OF_RANGE = ((s8)-2)
############################################################################
## CONSTANTS
############################################################################
#BMP180_RETURN_FUNCTION_TYPE s8
#BMP180_INIT_VALUE ((u8)0)
#BMP180_INITIALIZE_OVERSAMP_SETTING_U8X ((u8)0)
#BMP180_INITIALIZE_SW_OVERSAMP_U8X ((u8)0)
#BMP180_INITIALIZE_NUMBER_OF_SAMPLES_U8X ((u8)1)
#BMP180_GEN_READ_WRITE_DATA_LENGTH ((u8)1)
#BMP180_TEMPERATURE_DATA_LENGTH ((u8)2)
#BMP180_PRESSURE_DATA_LENGTH ((u8)3)
#BMP180_SW_OVERSAMP_U8X ((u8)1)
#BMP180_OVERSAMP_SETTING_U8X ((u8)3)
#BMP180_2MS_DELAY_U8X (2)
#BMP180_3MS_DELAY_U8X (3)
#BMP180_AVERAGE_U8X (3)
#BMP180_INVALID_DATA (0)
#BMP180_CHECK_DIVISOR (0)
#BMP180_DATA_MEASURE (3)
#BMP180_CALCULATE_TRUE_PRESSURE (8)
#BMP180_CALCULATE_TRUE_TEMPERATURE (8)
#BMP180_SHIFT_BIT_POSITION_BY_01_BIT (1)
#BMP180_SHIFT_BIT_POSITION_BY_02_BITS (2)
#BMP180_SHIFT_BIT_POSITION_BY_04_BITS (4)
#BMP180_SHIFT_BIT_POSITION_BY_06_BITS (6)
#BMP180_SHIFT_BIT_POSITION_BY_08_BITS (8)
#BMP180_SHIFT_BIT_POSITION_BY_11_BITS (11)
#BMP180_SHIFT_BIT_POSITION_BY_12_BITS (12)
#BMP180_SHIFT_BIT_POSITION_BY_13_BITS (13)
#BMP180_SHIFT_BIT_POSITION_BY_15_BITS (15)
#BMP180_SHIFT_BIT_POSITION_BY_16_BITS (16)
############################################################################
## REGISTER ADDRESS DEFINITION
############################################################################
#register definitions #
BMP180_START = (0xAA)
BMP180_PROM_DATA__LEN = (22)
BMP180_CHIP_ID_REG = (0xD0)
BMP180_VERSION_REG = (0xD1)
BMP180_CTRL_MEAS_REG = (0xF4)
BMP180_ADC_OUT_MSB_REG = (0xF6)
BMP180_ADC_OUT_LSB_REG = (0xF7)
BMP180_SOFT_RESET_REG = (0xE0)
BMP180_T_MEASURE = (0x2E) # temperature measurement #
BMP180_P_MEASURE = (0x34) # pressure measurement#
BMP180_TEMP_CONVERSION_TIME = (5) # TO be spec'd by GL or SB#
BMP180_PARAM_MG = (3038)
BMP180_PARAM_MH = (-7357)
BMP180_PARAM_MI = (3791)
############################################################################
## ARRAY SIZE DEFINITIONS
############################################################################
#BMP180_TEMPERATURE_DATA_BYTES (2)
#BMP180_PRESSURE_DATA_BYTES (3)
#BMP180_TEMPERATURE_LSB_DATA (1)
#BMP180_TEMPERATURE_MSB_DATA (0)
#BMP180_PRESSURE_MSB_DATA (0)
#BMP180_PRESSURE_LSB_DATA (1)
#BMP180_PRESSURE_XLSB_DATA (2)
#BMP180_CALIB_DATA_SIZE (22)
#BMP180_CALIB_PARAM_AC1_MSB (0)
#BMP180_CALIB_PARAM_AC1_LSB (1)
#BMP180_CALIB_PARAM_AC2_MSB (2)
#BMP180_CALIB_PARAM_AC2_LSB (3)
#BMP180_CALIB_PARAM_AC3_MSB (4)
#BMP180_CALIB_PARAM_AC3_LSB (5)
#BMP180_CALIB_PARAM_AC4_MSB (6)
#BMP180_CALIB_PARAM_AC4_LSB (7)
#BMP180_CALIB_PARAM_AC5_MSB (8)
#BMP180_CALIB_PARAM_AC5_LSB (9)
#BMP180_CALIB_PARAM_AC6_MSB (10)
#BMP180_CALIB_PARAM_AC6_LSB (11)
#BMP180_CALIB_PARAM_B1_MSB (12)
#BMP180_CALIB_PARAM_B1_LSB (13)
#BMP180_CALIB_PARAM_B2_MSB (14)
#BMP180_CALIB_PARAM_B2_LSB (15)
#BMP180_CALIB_PARAM_MB_MSB (16)
#BMP180_CALIB_PARAM_MB_LSB (17)
#BMP180_CALIB_PARAM_MC_MSB (18)
#BMP180_CALIB_PARAM_MC_LSB (19)
#BMP180_CALIB_PARAM_MD_MSB (20)
#BMP180_CALIB_PARAM_MD_LSB (21)
############################################################################
## BIT MASK, LENGTH AND POSITION FOR REGISTERS
############################################################################
############################################################################
## BIT MASK, LENGTH AND POSITION FOR CHIP ID REGISTERS
############################################################################
BMP180_CHIP_ID__POS = (0)
BMP180_CHIP_ID__MSK = (0xFF)
BMP180_CHIP_ID__LEN = (8)
BMP180_CHIP_ID__REG = (BMP180_CHIP_ID_REG)
############################################################################
## BIT MASK, LENGTH AND POSITION FOR ML VERSION
############################################################################
BMP180_ML_VERSION__POS = (0)
BMP180_ML_VERSION__LEN = (4)
BMP180_ML_VERSION__MSK = (0x0F)
BMP180_ML_VERSION__REG = (BMP180_VERSION_REG)
############################################################################
##name BIT MASK, LENGTH AND POSITION FOR AL VERSION
############################################################################
BMP180_AL_VERSION__POS = (4)
BMP180_AL_VERSION__LEN = (4)
BMP180_AL_VERSION__MSK = (0xF0)
BMP180_AL_VERSION__REG = (BMP180_VERSION_REG)
############################################################################
## FUNCTION FOR CALIBRATION
############################################################################
#
# @brief this function used for read the calibration
# parameter from the register
#
# Parameter | MSB | LSB | bit
# ------------|---------|---------|-----------
# AC1 | 0xAA | 0xAB | 0 to 7
# AC2 | 0xAC | 0xAD | 0 to 7
# AC3 | 0xAE | 0xAF | 0 to 7
# AC4 | 0xB0 | 0xB1 | 0 to 7
# AC5 | 0xB2 | 0xB3 | 0 to 7
# AC6 | 0xB4 | 0xB5 | 0 to 7
# B1 | 0xB6 | 0xB7 | 0 to 7
# B2 | 0xB8 | 0xB9 | 0 to 7
# MB | 0xBA | 0xBB | 0 to 7
# MC | 0xBC | 0xBD | 0 to 7
# MD | 0xBE | 0xBF | 0 to 7
#
#
# @return results of bus communication function
# @retval 0 -> Success
# @retval -1 -> Error
#
| bmp180_addr = 119
bmp180_start = 170
bmp180_prom_data__len = 22
bmp180_chip_id_reg = 208
bmp180_version_reg = 209
bmp180_ctrl_meas_reg = 244
bmp180_adc_out_msb_reg = 246
bmp180_adc_out_lsb_reg = 247
bmp180_soft_reset_reg = 224
bmp180_t_measure = 46
bmp180_p_measure = 52
bmp180_temp_conversion_time = 5
bmp180_param_mg = 3038
bmp180_param_mh = -7357
bmp180_param_mi = 3791
bmp180_chip_id__pos = 0
bmp180_chip_id__msk = 255
bmp180_chip_id__len = 8
bmp180_chip_id__reg = BMP180_CHIP_ID_REG
bmp180_ml_version__pos = 0
bmp180_ml_version__len = 4
bmp180_ml_version__msk = 15
bmp180_ml_version__reg = BMP180_VERSION_REG
bmp180_al_version__pos = 4
bmp180_al_version__len = 4
bmp180_al_version__msk = 240
bmp180_al_version__reg = BMP180_VERSION_REG |
class Solution:
def diagonalSort(self, mat: List[List[int]]) -> List[List[int]]:
m, n = len(mat), len(mat[0])
q = [[] for i in range(m + n)]
for i in range(m):
for j in range(n):
q[i - j + n].append(mat[i][j])
q = list(map(lambda x: sorted(x, reverse=True), q))
for i in range(m):
for j in range(n):
mat[i][j] = q[i - j + n].pop()
return mat
| class Solution:
def diagonal_sort(self, mat: List[List[int]]) -> List[List[int]]:
(m, n) = (len(mat), len(mat[0]))
q = [[] for i in range(m + n)]
for i in range(m):
for j in range(n):
q[i - j + n].append(mat[i][j])
q = list(map(lambda x: sorted(x, reverse=True), q))
for i in range(m):
for j in range(n):
mat[i][j] = q[i - j + n].pop()
return mat |
#
# PySNMP MIB module ATTO-PRODUCTS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ATTO-PRODUCTS-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:31:53 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
MibIdentifier, TimeTicks, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, IpAddress, NotificationType, ObjectIdentity, Bits, Counter64, ModuleIdentity, Integer32, iso, enterprises, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "TimeTicks", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "IpAddress", "NotificationType", "ObjectIdentity", "Bits", "Counter64", "ModuleIdentity", "Integer32", "iso", "enterprises", "Unsigned32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
attoProductsMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 4547, 3, 2))
attoProductsMIB.setRevisions(('2013-04-19 13:45',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: attoProductsMIB.setRevisionsDescriptions(('Initial version of this module.',))
if mibBuilder.loadTexts: attoProductsMIB.setLastUpdated('201304191345Z')
if mibBuilder.loadTexts: attoProductsMIB.setOrganization('ATTO Technology, Inc.')
if mibBuilder.loadTexts: attoProductsMIB.setContactInfo('ATTO Technology 155 Crosspoint Parkway Amherst NY 14068 EMail: <support@attotech.com>')
if mibBuilder.loadTexts: attoProductsMIB.setDescription('This modules defines object identifiers assigned to various hardware platforms, which are returned as values for sysObjectID.')
attotech = MibIdentifier((1, 3, 6, 1, 4, 1, 4547))
attoProducts = MibIdentifier((1, 3, 6, 1, 4, 1, 4547, 1))
attoMgmt = MibIdentifier((1, 3, 6, 1, 4, 1, 4547, 2))
attoModules = MibIdentifier((1, 3, 6, 1, 4, 1, 4547, 3))
attoAgentCapability = MibIdentifier((1, 3, 6, 1, 4, 1, 4547, 4))
attoGenericDevice = MibIdentifier((1, 3, 6, 1, 4, 1, 4547, 1, 1))
attoHba = MibIdentifier((1, 3, 6, 1, 4, 1, 4547, 1, 3))
attoFB6500 = MibIdentifier((1, 3, 6, 1, 4, 1, 4547, 1, 4))
attoFB6500N = MibIdentifier((1, 3, 6, 1, 4, 1, 4547, 1, 5))
mibBuilder.exportSymbols("ATTO-PRODUCTS-MIB", attoFB6500=attoFB6500, attoModules=attoModules, attotech=attotech, attoMgmt=attoMgmt, attoProductsMIB=attoProductsMIB, attoFB6500N=attoFB6500N, attoHba=attoHba, attoGenericDevice=attoGenericDevice, attoProducts=attoProducts, attoAgentCapability=attoAgentCapability, PYSNMP_MODULE_ID=attoProductsMIB)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, single_value_constraint, value_size_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(mib_identifier, time_ticks, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, ip_address, notification_type, object_identity, bits, counter64, module_identity, integer32, iso, enterprises, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'TimeTicks', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'IpAddress', 'NotificationType', 'ObjectIdentity', 'Bits', 'Counter64', 'ModuleIdentity', 'Integer32', 'iso', 'enterprises', 'Unsigned32')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
atto_products_mib = module_identity((1, 3, 6, 1, 4, 1, 4547, 3, 2))
attoProductsMIB.setRevisions(('2013-04-19 13:45',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
attoProductsMIB.setRevisionsDescriptions(('Initial version of this module.',))
if mibBuilder.loadTexts:
attoProductsMIB.setLastUpdated('201304191345Z')
if mibBuilder.loadTexts:
attoProductsMIB.setOrganization('ATTO Technology, Inc.')
if mibBuilder.loadTexts:
attoProductsMIB.setContactInfo('ATTO Technology 155 Crosspoint Parkway Amherst NY 14068 EMail: <support@attotech.com>')
if mibBuilder.loadTexts:
attoProductsMIB.setDescription('This modules defines object identifiers assigned to various hardware platforms, which are returned as values for sysObjectID.')
attotech = mib_identifier((1, 3, 6, 1, 4, 1, 4547))
atto_products = mib_identifier((1, 3, 6, 1, 4, 1, 4547, 1))
atto_mgmt = mib_identifier((1, 3, 6, 1, 4, 1, 4547, 2))
atto_modules = mib_identifier((1, 3, 6, 1, 4, 1, 4547, 3))
atto_agent_capability = mib_identifier((1, 3, 6, 1, 4, 1, 4547, 4))
atto_generic_device = mib_identifier((1, 3, 6, 1, 4, 1, 4547, 1, 1))
atto_hba = mib_identifier((1, 3, 6, 1, 4, 1, 4547, 1, 3))
atto_fb6500 = mib_identifier((1, 3, 6, 1, 4, 1, 4547, 1, 4))
atto_fb6500_n = mib_identifier((1, 3, 6, 1, 4, 1, 4547, 1, 5))
mibBuilder.exportSymbols('ATTO-PRODUCTS-MIB', attoFB6500=attoFB6500, attoModules=attoModules, attotech=attotech, attoMgmt=attoMgmt, attoProductsMIB=attoProductsMIB, attoFB6500N=attoFB6500N, attoHba=attoHba, attoGenericDevice=attoGenericDevice, attoProducts=attoProducts, attoAgentCapability=attoAgentCapability, PYSNMP_MODULE_ID=attoProductsMIB) |
def cCollateralBugHandler_fbPoisonRegister(
oSelf,
oProcess,
oThread,
sInstruction,
duPoisonedRegisterValue_by_sbName,
u0PointerSizedOriginalValue,
sbRegisterName,
uSizeInBits,
):
uPoisonValue = oSelf.fuGetPoisonedValue(
oProcess = oProcess,
oWindowsAPIThread = oProcess.foGetWindowsAPIThreadForId(oThread.uId),
sDestination = str(b"register %s" % sbRegisterName, "ascii", "strict"),
sInstruction = sInstruction,
i0CurrentValue = oThread.fu0GetRegister(sbRegisterName),
uBits = uSizeInBits,
u0PointerSizedOriginalValue = u0PointerSizedOriginalValue,
);
# print "Faked read %d bits (0x%X) into %d bits %s" % (uSourceSize, uPoisonValue, uDestinationSizeInBits, sbRegisterName);
duPoisonedRegisterValue_by_sbName[sbRegisterName] = uPoisonValue;
return True; | def c_collateral_bug_handler_fb_poison_register(oSelf, oProcess, oThread, sInstruction, duPoisonedRegisterValue_by_sbName, u0PointerSizedOriginalValue, sbRegisterName, uSizeInBits):
u_poison_value = oSelf.fuGetPoisonedValue(oProcess=oProcess, oWindowsAPIThread=oProcess.foGetWindowsAPIThreadForId(oThread.uId), sDestination=str(b'register %s' % sbRegisterName, 'ascii', 'strict'), sInstruction=sInstruction, i0CurrentValue=oThread.fu0GetRegister(sbRegisterName), uBits=uSizeInBits, u0PointerSizedOriginalValue=u0PointerSizedOriginalValue)
duPoisonedRegisterValue_by_sbName[sbRegisterName] = uPoisonValue
return True |
''' Challenge
Suppose the following input is supplied to the program:
without,hello,bag,world
Then, the output should be:
bag,hello,without,world
'''
items = [x for x in input('Enter words separated with comma: ').split(',')]
items.sort()
print(','.join(items))
| """ Challenge
Suppose the following input is supplied to the program:
without,hello,bag,world
Then, the output should be:
bag,hello,without,world
"""
items = [x for x in input('Enter words separated with comma: ').split(',')]
items.sort()
print(','.join(items)) |
def left_join(phrases):
if(len(phrases) < 1 or len(phrases) > 41):
return "Error"
mytext = ','.join(phrases);
mytext = mytext.replace("right", "left");
return mytext
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert left_join(("left", "right", "left", "stop")) == "left,left,left,stop", "All to left"
assert left_join(("bright aright", "ok")) == "bleft aleft,ok", "Bright Left"
assert left_join(("brightness wright",)) == "bleftness wleft", "One phrase"
assert left_join(("enough", "jokes")) == "enough,jokes", "Nothing to replace"
| def left_join(phrases):
if len(phrases) < 1 or len(phrases) > 41:
return 'Error'
mytext = ','.join(phrases)
mytext = mytext.replace('right', 'left')
return mytext
if __name__ == '__main__':
assert left_join(('left', 'right', 'left', 'stop')) == 'left,left,left,stop', 'All to left'
assert left_join(('bright aright', 'ok')) == 'bleft aleft,ok', 'Bright Left'
assert left_join(('brightness wright',)) == 'bleftness wleft', 'One phrase'
assert left_join(('enough', 'jokes')) == 'enough,jokes', 'Nothing to replace' |
class ONE(object):
symbol = 'I'
value = 1
class FIVE(object):
symbol = 'V'
value = 5
class TEN(object):
symbol = 'X'
value = 10
class FIFTY(object):
symbol = 'L'
value = 50
class HUNDRED(object):
symbol = 'C'
value = 100
class FOUR(object):
symbol = ONE.symbol + FIVE.symbol
value = FIVE.value - ONE.value
class NINE(object):
symbol = ONE.symbol + TEN.symbol
value = TEN.value - ONE.value
class FOURTY(object):
symbol = TEN.symbol + FIFTY.symbol
value = FIFTY.value - TEN.value
interval = range(value, value + TEN.value)
class NINETY(object):
symbol = TEN. symbol + HUNDRED.symbol
value = HUNDRED.value - TEN.value
interval = range(value, value + TEN.value)
class Roman(object):
@staticmethod
def translate(number):
if number <= 3:
return ONE.symbol * number
base = Roman.base_roman_for(number)
return base.symbol + Roman.translate(number - base.value)
@staticmethod
def is_special_value(number):
return number in [FOUR.value, NINE.value] + FOURTY.interval + NINETY.interval
@staticmethod
def base_roman_for(number):
if number in NINETY.interval:
return NINETY
if number in FOURTY.interval:
return FOURTY
if number == FOUR.value:
return FOUR
if number == NINE.value:
return NINE
if number >= HUNDRED.value:
return HUNDRED
if number >= FIFTY.value:
return FIFTY
if number >= TEN.value:
return TEN
if number >= FIVE.value:
return FIVE
| class One(object):
symbol = 'I'
value = 1
class Five(object):
symbol = 'V'
value = 5
class Ten(object):
symbol = 'X'
value = 10
class Fifty(object):
symbol = 'L'
value = 50
class Hundred(object):
symbol = 'C'
value = 100
class Four(object):
symbol = ONE.symbol + FIVE.symbol
value = FIVE.value - ONE.value
class Nine(object):
symbol = ONE.symbol + TEN.symbol
value = TEN.value - ONE.value
class Fourty(object):
symbol = TEN.symbol + FIFTY.symbol
value = FIFTY.value - TEN.value
interval = range(value, value + TEN.value)
class Ninety(object):
symbol = TEN.symbol + HUNDRED.symbol
value = HUNDRED.value - TEN.value
interval = range(value, value + TEN.value)
class Roman(object):
@staticmethod
def translate(number):
if number <= 3:
return ONE.symbol * number
base = Roman.base_roman_for(number)
return base.symbol + Roman.translate(number - base.value)
@staticmethod
def is_special_value(number):
return number in [FOUR.value, NINE.value] + FOURTY.interval + NINETY.interval
@staticmethod
def base_roman_for(number):
if number in NINETY.interval:
return NINETY
if number in FOURTY.interval:
return FOURTY
if number == FOUR.value:
return FOUR
if number == NINE.value:
return NINE
if number >= HUNDRED.value:
return HUNDRED
if number >= FIFTY.value:
return FIFTY
if number >= TEN.value:
return TEN
if number >= FIVE.value:
return FIVE |
# python3
def naive_fibonacci_partial_sum(m: int, n: int) -> int:
total = 0
previous, current = 0, 1
for i in range(n + 1):
if i >= m:
total += previous
previous, current = current, previous + current
return total % 10
def fast_fibonacci_huge(n: int, m: int) -> int:
pisano = list()
pisano.append(0)
pisano.append(1)
previous, current, last = 0, 1, 2
for i in range(n - 1):
previous, current = current, previous + current
pisano.append(current % m)
for step in range(last, len(pisano) // 2):
if pisano[:step] == pisano[step:2 * step]:
return pisano[n % step]
last = step + 1
return current % m
def fast_fibonacci_partial_sum(m: int, n: int) -> int:
# sum(fm-1) = fm+1 - f1
# sum(fn) = fn+2 - f1 (see the previous solution)
# partial sum(fm...fn) = sum(fn) - sum(fm-1) = fn+2 - fm+1
subset, full = fast_fibonacci_huge(m + 1, 10), fast_fibonacci_huge(n + 2, 10)
return full - subset if full > subset else (10 - subset + full) % 10
if __name__ == '__main__':
print(fast_fibonacci_partial_sum(*map(int, input().split())))
| def naive_fibonacci_partial_sum(m: int, n: int) -> int:
total = 0
(previous, current) = (0, 1)
for i in range(n + 1):
if i >= m:
total += previous
(previous, current) = (current, previous + current)
return total % 10
def fast_fibonacci_huge(n: int, m: int) -> int:
pisano = list()
pisano.append(0)
pisano.append(1)
(previous, current, last) = (0, 1, 2)
for i in range(n - 1):
(previous, current) = (current, previous + current)
pisano.append(current % m)
for step in range(last, len(pisano) // 2):
if pisano[:step] == pisano[step:2 * step]:
return pisano[n % step]
last = step + 1
return current % m
def fast_fibonacci_partial_sum(m: int, n: int) -> int:
(subset, full) = (fast_fibonacci_huge(m + 1, 10), fast_fibonacci_huge(n + 2, 10))
return full - subset if full > subset else (10 - subset + full) % 10
if __name__ == '__main__':
print(fast_fibonacci_partial_sum(*map(int, input().split()))) |
def longest_palindrome(s: str) -> str:
def expand(left: int, right: int) -> str:
while left >= 0 and right < len(s) and s[left] == s[right]:
left -= 1
right += 1
return s[left + 1:right]
if len(s) < 2 or s == s[::-1]:
return s
result = ''
for i in range(len(s)-1):
result = max(result, expand(i, i+1), expand(i, i+2), key=len)
return result
def test_case():
case1 = 'babad'
case2 = 'cbbd'
result1 = longest_palindrome(case1)
print(result1)
result2 = longest_palindrome(case2)
print(result2)
| def longest_palindrome(s: str) -> str:
def expand(left: int, right: int) -> str:
while left >= 0 and right < len(s) and (s[left] == s[right]):
left -= 1
right += 1
return s[left + 1:right]
if len(s) < 2 or s == s[::-1]:
return s
result = ''
for i in range(len(s) - 1):
result = max(result, expand(i, i + 1), expand(i, i + 2), key=len)
return result
def test_case():
case1 = 'babad'
case2 = 'cbbd'
result1 = longest_palindrome(case1)
print(result1)
result2 = longest_palindrome(case2)
print(result2) |
#
# PySNMP MIB module ASCEND-MIBREDHM-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ASCEND-MIBREDHM-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:12:05 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
configuration, = mibBuilder.importSymbols("ASCEND-MIB", "configuration")
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, ObjectIdentity, MibIdentifier, NotificationType, Integer32, TimeTicks, Gauge32, Counter64, Unsigned32, Counter32, iso, IpAddress, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "ObjectIdentity", "MibIdentifier", "NotificationType", "Integer32", "TimeTicks", "Gauge32", "Counter64", "Unsigned32", "Counter32", "iso", "IpAddress", "Bits")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
class DisplayString(OctetString):
pass
mibredHealthMonitoringProfile = MibIdentifier((1, 3, 6, 1, 4, 1, 529, 23, 179))
mibredHealthMonitoringProfileTable = MibTable((1, 3, 6, 1, 4, 1, 529, 23, 179, 1), )
if mibBuilder.loadTexts: mibredHealthMonitoringProfileTable.setStatus('mandatory')
mibredHealthMonitoringProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1), ).setIndexNames((0, "ASCEND-MIBREDHM-MIB", "redHealthMonitoringProfile-Index-o"))
if mibBuilder.loadTexts: mibredHealthMonitoringProfileEntry.setStatus('mandatory')
redHealthMonitoringProfile_Index_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 1), Integer32()).setLabel("redHealthMonitoringProfile-Index-o").setMaxAccess("readonly")
if mibBuilder.loadTexts: redHealthMonitoringProfile_Index_o.setStatus('mandatory')
redHealthMonitoringProfile_HmEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("redHealthMonitoringProfile-HmEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_HmEnabled.setStatus('mandatory')
redHealthMonitoringProfile_MaxWarningPrimary = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 3), Integer32()).setLabel("redHealthMonitoringProfile-MaxWarningPrimary").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_MaxWarningPrimary.setStatus('mandatory')
redHealthMonitoringProfile_MaxWarningSecondary = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 4), Integer32()).setLabel("redHealthMonitoringProfile-MaxWarningSecondary").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_MaxWarningSecondary.setStatus('mandatory')
redHealthMonitoringProfile_MaxWarningPerMinutePrimary = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 5), Integer32()).setLabel("redHealthMonitoringProfile-MaxWarningPerMinutePrimary").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_MaxWarningPerMinutePrimary.setStatus('mandatory')
redHealthMonitoringProfile_MaxWarningPerMinuteSecondary = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 6), Integer32()).setLabel("redHealthMonitoringProfile-MaxWarningPerMinuteSecondary").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_MaxWarningPerMinuteSecondary.setStatus('mandatory')
redHealthMonitoringProfile_MemoryThresholdPrimary = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 7), Integer32()).setLabel("redHealthMonitoringProfile-MemoryThresholdPrimary").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_MemoryThresholdPrimary.setStatus('mandatory')
redHealthMonitoringProfile_MemoryThresholdSecondary = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 8), Integer32()).setLabel("redHealthMonitoringProfile-MemoryThresholdSecondary").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_MemoryThresholdSecondary.setStatus('mandatory')
redHealthMonitoringProfile_MemoryAlertThresholdPrimary = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 9), Integer32()).setLabel("redHealthMonitoringProfile-MemoryAlertThresholdPrimary").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_MemoryAlertThresholdPrimary.setStatus('mandatory')
redHealthMonitoringProfile_MemoryAlertThresholdSecondary = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 10), Integer32()).setLabel("redHealthMonitoringProfile-MemoryAlertThresholdSecondary").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_MemoryAlertThresholdSecondary.setStatus('mandatory')
redHealthMonitoringProfile_MemoryAlertTimeoutPrimary = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 11), Integer32()).setLabel("redHealthMonitoringProfile-MemoryAlertTimeoutPrimary").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_MemoryAlertTimeoutPrimary.setStatus('mandatory')
redHealthMonitoringProfile_MemoryAlertTimeoutSecondary = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 12), Integer32()).setLabel("redHealthMonitoringProfile-MemoryAlertTimeoutSecondary").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_MemoryAlertTimeoutSecondary.setStatus('mandatory')
redHealthMonitoringProfile_ResetStuckPrimaryTimeout = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 13), Integer32()).setLabel("redHealthMonitoringProfile-ResetStuckPrimaryTimeout").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_ResetStuckPrimaryTimeout.setStatus('mandatory')
redHealthMonitoringProfile_Action_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noAction", 1), ("createProfile", 2), ("deleteProfile", 3)))).setLabel("redHealthMonitoringProfile-Action-o").setMaxAccess("readwrite")
if mibBuilder.loadTexts: redHealthMonitoringProfile_Action_o.setStatus('mandatory')
mibBuilder.exportSymbols("ASCEND-MIBREDHM-MIB", redHealthMonitoringProfile_MaxWarningPrimary=redHealthMonitoringProfile_MaxWarningPrimary, redHealthMonitoringProfile_MemoryAlertTimeoutPrimary=redHealthMonitoringProfile_MemoryAlertTimeoutPrimary, DisplayString=DisplayString, redHealthMonitoringProfile_MemoryAlertTimeoutSecondary=redHealthMonitoringProfile_MemoryAlertTimeoutSecondary, mibredHealthMonitoringProfile=mibredHealthMonitoringProfile, redHealthMonitoringProfile_MemoryAlertThresholdSecondary=redHealthMonitoringProfile_MemoryAlertThresholdSecondary, redHealthMonitoringProfile_MaxWarningPerMinutePrimary=redHealthMonitoringProfile_MaxWarningPerMinutePrimary, redHealthMonitoringProfile_MaxWarningPerMinuteSecondary=redHealthMonitoringProfile_MaxWarningPerMinuteSecondary, redHealthMonitoringProfile_MaxWarningSecondary=redHealthMonitoringProfile_MaxWarningSecondary, redHealthMonitoringProfile_MemoryThresholdSecondary=redHealthMonitoringProfile_MemoryThresholdSecondary, mibredHealthMonitoringProfileTable=mibredHealthMonitoringProfileTable, redHealthMonitoringProfile_HmEnabled=redHealthMonitoringProfile_HmEnabled, redHealthMonitoringProfile_MemoryAlertThresholdPrimary=redHealthMonitoringProfile_MemoryAlertThresholdPrimary, redHealthMonitoringProfile_Action_o=redHealthMonitoringProfile_Action_o, mibredHealthMonitoringProfileEntry=mibredHealthMonitoringProfileEntry, redHealthMonitoringProfile_Index_o=redHealthMonitoringProfile_Index_o, redHealthMonitoringProfile_ResetStuckPrimaryTimeout=redHealthMonitoringProfile_ResetStuckPrimaryTimeout, redHealthMonitoringProfile_MemoryThresholdPrimary=redHealthMonitoringProfile_MemoryThresholdPrimary)
| (configuration,) = mibBuilder.importSymbols('ASCEND-MIB', 'configuration')
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, single_value_constraint, constraints_union, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, object_identity, mib_identifier, notification_type, integer32, time_ticks, gauge32, counter64, unsigned32, counter32, iso, ip_address, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'ObjectIdentity', 'MibIdentifier', 'NotificationType', 'Integer32', 'TimeTicks', 'Gauge32', 'Counter64', 'Unsigned32', 'Counter32', 'iso', 'IpAddress', 'Bits')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
class Displaystring(OctetString):
pass
mibred_health_monitoring_profile = mib_identifier((1, 3, 6, 1, 4, 1, 529, 23, 179))
mibred_health_monitoring_profile_table = mib_table((1, 3, 6, 1, 4, 1, 529, 23, 179, 1))
if mibBuilder.loadTexts:
mibredHealthMonitoringProfileTable.setStatus('mandatory')
mibred_health_monitoring_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1)).setIndexNames((0, 'ASCEND-MIBREDHM-MIB', 'redHealthMonitoringProfile-Index-o'))
if mibBuilder.loadTexts:
mibredHealthMonitoringProfileEntry.setStatus('mandatory')
red_health_monitoring_profile__index_o = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 1), integer32()).setLabel('redHealthMonitoringProfile-Index-o').setMaxAccess('readonly')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_Index_o.setStatus('mandatory')
red_health_monitoring_profile__hm_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('redHealthMonitoringProfile-HmEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_HmEnabled.setStatus('mandatory')
red_health_monitoring_profile__max_warning_primary = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 3), integer32()).setLabel('redHealthMonitoringProfile-MaxWarningPrimary').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_MaxWarningPrimary.setStatus('mandatory')
red_health_monitoring_profile__max_warning_secondary = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 4), integer32()).setLabel('redHealthMonitoringProfile-MaxWarningSecondary').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_MaxWarningSecondary.setStatus('mandatory')
red_health_monitoring_profile__max_warning_per_minute_primary = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 5), integer32()).setLabel('redHealthMonitoringProfile-MaxWarningPerMinutePrimary').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_MaxWarningPerMinutePrimary.setStatus('mandatory')
red_health_monitoring_profile__max_warning_per_minute_secondary = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 6), integer32()).setLabel('redHealthMonitoringProfile-MaxWarningPerMinuteSecondary').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_MaxWarningPerMinuteSecondary.setStatus('mandatory')
red_health_monitoring_profile__memory_threshold_primary = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 7), integer32()).setLabel('redHealthMonitoringProfile-MemoryThresholdPrimary').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_MemoryThresholdPrimary.setStatus('mandatory')
red_health_monitoring_profile__memory_threshold_secondary = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 8), integer32()).setLabel('redHealthMonitoringProfile-MemoryThresholdSecondary').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_MemoryThresholdSecondary.setStatus('mandatory')
red_health_monitoring_profile__memory_alert_threshold_primary = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 9), integer32()).setLabel('redHealthMonitoringProfile-MemoryAlertThresholdPrimary').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_MemoryAlertThresholdPrimary.setStatus('mandatory')
red_health_monitoring_profile__memory_alert_threshold_secondary = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 10), integer32()).setLabel('redHealthMonitoringProfile-MemoryAlertThresholdSecondary').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_MemoryAlertThresholdSecondary.setStatus('mandatory')
red_health_monitoring_profile__memory_alert_timeout_primary = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 11), integer32()).setLabel('redHealthMonitoringProfile-MemoryAlertTimeoutPrimary').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_MemoryAlertTimeoutPrimary.setStatus('mandatory')
red_health_monitoring_profile__memory_alert_timeout_secondary = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 12), integer32()).setLabel('redHealthMonitoringProfile-MemoryAlertTimeoutSecondary').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_MemoryAlertTimeoutSecondary.setStatus('mandatory')
red_health_monitoring_profile__reset_stuck_primary_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 13), integer32()).setLabel('redHealthMonitoringProfile-ResetStuckPrimaryTimeout').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_ResetStuckPrimaryTimeout.setStatus('mandatory')
red_health_monitoring_profile__action_o = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 179, 1, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('noAction', 1), ('createProfile', 2), ('deleteProfile', 3)))).setLabel('redHealthMonitoringProfile-Action-o').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
redHealthMonitoringProfile_Action_o.setStatus('mandatory')
mibBuilder.exportSymbols('ASCEND-MIBREDHM-MIB', redHealthMonitoringProfile_MaxWarningPrimary=redHealthMonitoringProfile_MaxWarningPrimary, redHealthMonitoringProfile_MemoryAlertTimeoutPrimary=redHealthMonitoringProfile_MemoryAlertTimeoutPrimary, DisplayString=DisplayString, redHealthMonitoringProfile_MemoryAlertTimeoutSecondary=redHealthMonitoringProfile_MemoryAlertTimeoutSecondary, mibredHealthMonitoringProfile=mibredHealthMonitoringProfile, redHealthMonitoringProfile_MemoryAlertThresholdSecondary=redHealthMonitoringProfile_MemoryAlertThresholdSecondary, redHealthMonitoringProfile_MaxWarningPerMinutePrimary=redHealthMonitoringProfile_MaxWarningPerMinutePrimary, redHealthMonitoringProfile_MaxWarningPerMinuteSecondary=redHealthMonitoringProfile_MaxWarningPerMinuteSecondary, redHealthMonitoringProfile_MaxWarningSecondary=redHealthMonitoringProfile_MaxWarningSecondary, redHealthMonitoringProfile_MemoryThresholdSecondary=redHealthMonitoringProfile_MemoryThresholdSecondary, mibredHealthMonitoringProfileTable=mibredHealthMonitoringProfileTable, redHealthMonitoringProfile_HmEnabled=redHealthMonitoringProfile_HmEnabled, redHealthMonitoringProfile_MemoryAlertThresholdPrimary=redHealthMonitoringProfile_MemoryAlertThresholdPrimary, redHealthMonitoringProfile_Action_o=redHealthMonitoringProfile_Action_o, mibredHealthMonitoringProfileEntry=mibredHealthMonitoringProfileEntry, redHealthMonitoringProfile_Index_o=redHealthMonitoringProfile_Index_o, redHealthMonitoringProfile_ResetStuckPrimaryTimeout=redHealthMonitoringProfile_ResetStuckPrimaryTimeout, redHealthMonitoringProfile_MemoryThresholdPrimary=redHealthMonitoringProfile_MemoryThresholdPrimary) |
work = True
while(work):
t = 2
t = t+1
work = False
print(t) | work = True
while work:
t = 2
t = t + 1
work = False
print(t) |
class Solution(object):
def countNumbersWithUniqueDigits(self, n):
return self.fn(n)
def fn(self,n):
if n==0:
return 1
if n==1:
return 10
if n>10:
return 0
f = 9
i = 1
while i<n and i<=10:
f *= 10-i
i+=1
return f+self.fn(n-1)
s = Solution()
# print(s.isMatch('aaabc', 'a*bc'))
print('3',s.countNumbersWithUniqueDigits(0))
print('3',s.countNumbersWithUniqueDigits(1))
print('3',s.countNumbersWithUniqueDigits(2))
print('3',s.countNumbersWithUniqueDigits(3))
print('4',s.countNumbersWithUniqueDigits(4))
print('5',s.countNumbersWithUniqueDigits(5)) | class Solution(object):
def count_numbers_with_unique_digits(self, n):
return self.fn(n)
def fn(self, n):
if n == 0:
return 1
if n == 1:
return 10
if n > 10:
return 0
f = 9
i = 1
while i < n and i <= 10:
f *= 10 - i
i += 1
return f + self.fn(n - 1)
s = solution()
print('3', s.countNumbersWithUniqueDigits(0))
print('3', s.countNumbersWithUniqueDigits(1))
print('3', s.countNumbersWithUniqueDigits(2))
print('3', s.countNumbersWithUniqueDigits(3))
print('4', s.countNumbersWithUniqueDigits(4))
print('5', s.countNumbersWithUniqueDigits(5)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.